cf 0.14.0 → 0.15.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.
Files changed (448) hide show
  1. package/dist/_meta/commands.json +4040 -1629
  2. package/dist/_meta/hand-written-commands.json +16 -43
  3. package/dist/_meta/schemas.json +445 -756
  4. package/dist/abuse-reports-BAQR1w79.mjs +26 -0
  5. package/dist/access-C8KMplzp.mjs +27 -0
  6. package/dist/account-B-KQSR0L.mjs +12 -0
  7. package/dist/account-tags-EncLJpLc.mjs +15 -0
  8. package/dist/accounts-BA4Mp3A_.mjs +132 -0
  9. package/dist/acm-ByxUJcqF.mjs +15 -0
  10. package/dist/addressing-C-ym0h0G.mjs +93 -0
  11. package/dist/agent-memory-CkPSiZDI.mjs +34 -0
  12. package/dist/ai-DkE_Q64s.mjs +31 -0
  13. package/dist/ai-audit-pPcjYWI5.mjs +6 -0
  14. package/dist/ai-gateway-DtrwF1lQ.mjs +147 -0
  15. package/dist/ai-search-DLD_kDS1.mjs +79 -0
  16. package/dist/ai-security-jyZcBl9g.mjs +10 -0
  17. package/dist/alerting-DOROjm8E.mjs +56 -0
  18. package/dist/analytics-rQ-h-plT.mjs +21 -0
  19. package/dist/analytics_engine-Cg9gCAMt.mjs +4 -0
  20. package/dist/{lifecycle-CadF_i2n.mjs → ansi-styles-eKEZXVwN.mjs} +1 -1
  21. package/dist/api-security-B8p8vp8u.mjs +154 -0
  22. package/dist/argo-g8SjUb_t.mjs +10 -0
  23. package/dist/artifacts-B1PaeF5h.mjs +43 -0
  24. package/dist/audit-logs-DmU_PHy_.mjs +4 -0
  25. package/dist/auth-CZqics6E.mjs +2 -0
  26. package/dist/auth-Cp7gT-AF.mjs +8 -0
  27. package/dist/billing-CvTbUg-H.mjs +23 -0
  28. package/dist/bot-management-z53tbcbH.mjs +9 -0
  29. package/dist/botnet-feed-CSBbJdr_.mjs +11 -0
  30. package/dist/brand-protection-DzV211IQ.mjs +27 -0
  31. package/dist/browser-extension-C0Hi9CHX.mjs +15 -0
  32. package/dist/browser-run-DYQvMAyo.mjs +46 -0
  33. package/dist/build-BPIp8J5F.mjs +2 -0
  34. package/dist/build-OC77a1zq.mjs +2 -0
  35. package/dist/builds-CwKRqjQ5.mjs +71 -0
  36. package/dist/cache-CugNPPsJ.mjs +45 -0
  37. package/dist/certificate-authorities-DaEnJYge.mjs +6 -0
  38. package/dist/cf-oadujOtC.mjs +18 -0
  39. package/dist/{chunk-6EUZQHAF-B7bSMYLe.mjs → chunk-6EUZQHAF-QVTL_mC-.mjs} +1 -1
  40. package/dist/chunk-DL5FNmn1.mjs +2 -0
  41. package/dist/{chunk-Q72B4Q5Z-CPy_WJKU.mjs → chunk-Q72B4Q5Z-Cr1H_iK6.mjs} +1 -1
  42. package/dist/chunk-Q72B4Q5Z-DKhx_4ok.mjs +2 -0
  43. package/dist/chunk-QBZBEHZB-Byagrlop.mjs +2 -0
  44. package/dist/chunk-XLADBZ7F-BXKOjWbx.mjs +374 -0
  45. package/dist/client-certificates-DZUIqBTB.mjs +13 -0
  46. package/dist/client-side-security-Dk6F1ENG.mjs +63 -0
  47. package/dist/cloud-connector-avpf86kG.mjs +6 -0
  48. package/dist/cloudflared-DhItYrCq.mjs +2 -0
  49. package/dist/cloudforce-one-DNRhUD8z.mjs +456 -0
  50. package/dist/command-B2Qe-WUa.mjs +2 -0
  51. package/dist/{command-BL6weJf3.mjs → command-CF0giIIc.mjs} +1 -1
  52. package/dist/command-D45NW-R3.mjs +2 -0
  53. package/dist/command-DIvPLK8x.mjs +2 -0
  54. package/dist/{completions-Dn621okY.mjs → completions-xPLd1cvL.mjs} +3 -3
  55. package/dist/{config-BY6KpMZs.mjs → config-B4vIa0zp.mjs} +1 -1
  56. package/dist/connector-interrupts-BSztJ-Ko.mjs +6 -0
  57. package/dist/connector-telemetry-events-_M8CCK6_.mjs +6 -0
  58. package/dist/connector-telemetry-snapshots-DySvmR9a.mjs +6 -0
  59. package/dist/connectors-BSmhzNB7.mjs +15 -0
  60. package/dist/containers-B5vDcFzo.mjs +78 -0
  61. package/dist/{dist-CFQREIRi.mjs → containers-CFzvhmyz.mjs} +84 -83
  62. package/dist/content-scan-CeLZAcbT.mjs +14 -0
  63. package/dist/cps-BlI_Od72.mjs +6 -0
  64. package/dist/csamScanner-Cn7d0HWS.mjs +10 -0
  65. package/dist/ct-alerting-lhgFPu-y.mjs +5 -0
  66. package/dist/custom-certificates-Ba4Do5qt.mjs +17 -0
  67. package/dist/custom-csrs-MNUIx8yX.mjs +11 -0
  68. package/dist/custom-hostnames-Dj1SBd0J.mjs +27 -0
  69. package/dist/custom-nameservers-C7nzhNzV.mjs +9 -0
  70. package/dist/custom-pages-BgfhGksj.mjs +21 -0
  71. package/dist/d1-P2kWbdID.mjs +45 -0
  72. package/dist/data-security-pBIozmRL.mjs +71 -0
  73. package/dist/dcv-delegation-Bpy9WnKZ.mjs +4 -0
  74. package/dist/delegate-GctF_lrq.mjs +2 -0
  75. package/dist/delegate.mjs +1 -1
  76. package/dist/{deploy-BtETDvDA.mjs → deploy-CVYdt3NK.mjs} +1 -1
  77. package/dist/{deploy-input-BoLTdQzS.mjs → deploy-input-DpOgndz4.mjs} +1 -1
  78. package/dist/{dev-B5WcIpEr.mjs → dev-PPUBjWcm.mjs} +1 -1
  79. package/dist/diagnostics-C62habGQ.mjs +15 -0
  80. package/dist/{dialog-Bud0hiYv.mjs → dialog-C_ccBiZp.mjs} +1 -1
  81. package/dist/dist-B4pQ4CXK.mjs +48 -0
  82. package/dist/{dist-BRg_z9Ut.mjs → dist-BpadEMNY.mjs} +1 -1
  83. package/dist/dist-dc4E1u01.mjs +272 -0
  84. package/dist/dls-CpkcyQ8C.mjs +17 -0
  85. package/dist/dns-DG1X4Wap.mjs +135 -0
  86. package/dist/dns-firewall-B1gGHEDo.mjs +71 -0
  87. package/dist/{dot-prop-6SRZBKHT-wIVDg_fl.mjs → dot-prop-6SRZBKHT-Dj7YOlwR.mjs} +1 -1
  88. package/dist/dry-run-CLX6Pbtq.mjs +2 -0
  89. package/dist/durable-objects-D214VhxH.mjs +8 -0
  90. package/dist/email-auth-Ba4ONan2.mjs +6 -0
  91. package/dist/email-routing-BlqKnqNM.mjs +45 -0
  92. package/dist/email-security-Dl1E1Dko.mjs +160 -0
  93. package/dist/email-sending-DIRSSRIz.mjs +47 -0
  94. package/dist/error-sanitization-BkgUhGVc.mjs +2 -0
  95. package/dist/error-sanitization-DOlqWkNu.mjs +2 -0
  96. package/dist/fieldExtractors-zqYKMCEn.mjs +9 -0
  97. package/dist/firewall-DdsDh8GD.mjs +56 -0
  98. package/dist/flagship-CkUIVW7c.mjs +28 -0
  99. package/dist/fraud-BUpZgvQT.mjs +22 -0
  100. package/dist/google-tag-gateway-Bi1uLnEU.mjs +6 -0
  101. package/dist/healthchecks-DjQWb3EM.mjs +22 -0
  102. package/dist/hostnames-ClBLPbct.mjs +11 -0
  103. package/dist/hyperdrive-U54xZsWU.mjs +37 -0
  104. package/dist/iam-T-wWmOep.mjs +52 -0
  105. package/dist/images-ia5UG1GW.mjs +71 -0
  106. package/dist/index.mjs +1 -1
  107. package/dist/intel-BhswZLMI.mjs +76 -0
  108. package/dist/{interactive-CGOh-aYq.mjs → interactive-B6woOLo-.mjs} +23 -23
  109. package/dist/interactive-DnUvQHjc.mjs +2 -0
  110. package/dist/ips-Dad_EvhM.mjs +4 -0
  111. package/dist/keyless-certificates-BhHaxLjM.mjs +13 -0
  112. package/dist/keys-DjIPvqj4.mjs +4 -0
  113. package/dist/kv-DzXVnK94.mjs +21 -0
  114. package/dist/leaked-credential-checks-B9G_ZTNH.mjs +18 -0
  115. package/dist/lifecycle-Ichnb2x1.mjs +2 -0
  116. package/dist/load-balancers-3wGHPsYz.mjs +76 -0
  117. package/dist/local-B6b2OIBW.mjs +2 -0
  118. package/dist/local-BrfySqnx.mjs +2 -0
  119. package/dist/{local-runtime-Dj8k-p62.mjs → local-runtime-DD8DAIlm.mjs} +1 -1
  120. package/dist/login-CEQbOgBM.mjs +5 -0
  121. package/dist/login-DEWvGuaU.mjs +2 -0
  122. package/dist/logo-matches-YGRPstPi.mjs +6 -0
  123. package/dist/logos-BirufUgo.mjs +7 -0
  124. package/dist/logpush-BlNbUHyV.mjs +46 -0
  125. package/dist/logs-DmFlVF9q.mjs +48 -0
  126. package/dist/magic-cloud-networking-B3Wj2dhJ.mjs +71 -0
  127. package/dist/magic-network-monitoring-ry63w2Rw.mjs +36 -0
  128. package/dist/magic-transit-CBVOK2aa.mjs +387 -0
  129. package/dist/managed-defense-BdW6s483.mjs +18 -0
  130. package/dist/managed-transforms-BIeiofIS.mjs +9 -0
  131. package/dist/matches-CAnwci0P.mjs +6 -0
  132. package/dist/mcp-BfhOMGFE.mjs +32 -0
  133. package/dist/mesh-CxUL2Wf-.mjs +26 -0
  134. package/dist/mtls-certificates-CzmTw4zs.mjs +13 -0
  135. package/dist/network-C68psMbz.mjs +50 -0
  136. package/dist/network-interconnects-CLsMrTuk.mjs +73 -0
  137. package/dist/oauth-D4bkeMAw.mjs +14 -0
  138. package/dist/oauth-DouM-qz0.mjs +2 -0
  139. package/dist/oauth-clients-DbUmVE_5.mjs +16 -0
  140. package/dist/oauth-scopes-CQ18rwBg.mjs +4 -0
  141. package/dist/observability-DpYxkFeZ.mjs +80 -0
  142. package/dist/{open-PBXRGS4R-ClEt4E8F.mjs → open-PBXRGS4R-C4CKEADM.mjs} +1 -1
  143. package/dist/open-PBXRGS4R-C_-G_4DC.mjs +4 -0
  144. package/dist/organization-Dg55Xfz7.mjs +75 -0
  145. package/dist/organizations-QnyzGjB2.mjs +4 -0
  146. package/dist/origin-ca-certificates-Co5lqIGL.mjs +11 -0
  147. package/dist/origin-post-quantum-encryption-Cz8JZamC.mjs +6 -0
  148. package/dist/origin-tls-client-auth-Dd0T1Kfv.mjs +30 -0
  149. package/dist/{output-Z2lQmPUW.mjs → output-Bia1u2k5.mjs} +1 -1
  150. package/dist/page-rules--D3eXrCf.mjs +39 -0
  151. package/dist/pages-Ce8DDgNr.mjs +60 -0
  152. package/dist/pay-per-crawl-CpkEbasz.mjs +65 -0
  153. package/dist/pay-per-use-fyM1DWgY.mjs +6 -0
  154. package/dist/pipelines-CAqCgBLh.mjs +44 -0
  155. package/dist/precursor-DBnn4Q35.mjs +4 -0
  156. package/dist/previews-y_nSqWK5.mjs +4 -0
  157. package/dist/progress-Bi02B6v4.mjs +2 -0
  158. package/dist/{prompt-BP8XrQSj.mjs → prompt-Bx2PB-tt.mjs} +1 -1
  159. package/dist/queries-dg-CVXjf.mjs +9 -0
  160. package/dist/queues-C_ilLbRI.mjs +63 -0
  161. package/dist/r2-data-catalog-DGv6aROr.mjs +44 -0
  162. package/dist/r2-hZAkra-l.mjs +127 -0
  163. package/dist/radar-BO9b0aZy.mjs +300 -0
  164. package/dist/{raw-fetch-DNH2V8qH.mjs → raw-fetch-DNTQkXbg.mjs} +1 -1
  165. package/dist/realtime-eSavuSeE.mjs +172 -0
  166. package/dist/registrar-Ct30kOXZ.mjs +43 -0
  167. package/dist/registrar-sandbox-Dmn9zGUk.mjs +56 -0
  168. package/dist/{registry-BrtVdMrC.mjs → registry-vreNkX6u.mjs} +1 -1
  169. package/dist/reporting-B-F5aWUJ.mjs +14 -0
  170. package/dist/request-headers-Dnbzv6RZ.mjs +2 -0
  171. package/dist/request-tracers-CaubpUFV.mjs +4 -0
  172. package/dist/resolve-BXemCSyA.mjs +2 -0
  173. package/dist/resolve-CUDKxUrW.mjs +2 -0
  174. package/dist/resource-sharing-6Snv-b69.mjs +40 -0
  175. package/dist/resource-tagging-W_LFiX2J.mjs +4 -0
  176. package/dist/rules-C26eyeA5.mjs +18 -0
  177. package/dist/rulesets-BKzIwVtJ.mjs +37 -0
  178. package/dist/rum-Xdw5hyWY.mjs +30 -0
  179. package/dist/run-BBBMrSrs.mjs +2 -0
  180. package/dist/run-BRucX7Rz.mjs +2 -0
  181. package/dist/{schema-DmuJtMN5.mjs → schema-DqtYndhB.mjs} +1 -1
  182. package/dist/{schema-flags-CUGxFeZe.mjs → schema-flags-CebDI0f1.mjs} +1 -1
  183. package/dist/scim-odJTXiIe.mjs +18 -0
  184. package/dist/{sdk-Bvqx-_3z.mjs → sdk-CvIO3tWS.mjs} +1 -1
  185. package/dist/secrets-store-RYpWWzaw.mjs +24 -0
  186. package/dist/security-center-B3D95vCa.mjs +30 -0
  187. package/dist/security-txt-BSytVv-9.mjs +9 -0
  188. package/dist/shared-D67owd9x.mjs +2 -0
  189. package/dist/smart-shield-C83Sfnf4.mjs +24 -0
  190. package/dist/snippets-B6oE9WIa.mjs +20 -0
  191. package/dist/source-BR4_k2ad.mjs +6 -0
  192. package/dist/spawn-CKqJ9J4_.mjs +523 -0
  193. package/dist/spectrum-CfxY--X_.mjs +83 -0
  194. package/dist/speed-DzK-kiWt.mjs +24 -0
  195. package/dist/src-B3h6tKMt.mjs +108 -0
  196. package/dist/ssl-dnjzPcSB.mjs +45 -0
  197. package/dist/startup-profile-CYEokTVe.mjs +2 -0
  198. package/dist/startup-profile-CgWHy4rE.mjs +17 -0
  199. package/dist/state-BxCejn42.mjs +2 -0
  200. package/dist/state-DSzkxXML.mjs +2 -0
  201. package/dist/stream-oFyhS4Wi.mjs +102 -0
  202. package/dist/submit-4f-ravmC.mjs +4 -0
  203. package/dist/tags-DrIP6Uiq.mjs +4 -0
  204. package/dist/{telemetry-2s9Y3FaN.mjs → telemetry-Dk1GcQ0u.mjs} +1 -1
  205. package/dist/telemetry-Ds4epd3D.mjs +2 -0
  206. package/dist/telemetry-mKEb8lYB.mjs +2 -0
  207. package/dist/tenant-C-gc3NWv.mjs +12 -0
  208. package/dist/tenant-custom-nameservers-DduTQIwh.mjs +9 -0
  209. package/dist/{tools-Dz1JCrHd.mjs → tools-BMKpYraQ.mjs} +1 -1
  210. package/dist/tunnels-D0QYsskp.mjs +29 -0
  211. package/dist/turnstile-C6Q3spRB.mjs +33 -0
  212. package/dist/ui-DH95w1Qk.mjs +5 -0
  213. package/dist/undici-DTSBJHNS.mjs +96 -0
  214. package/dist/update-check-BBS1K1jt.mjs +2 -0
  215. package/dist/update-check-CTLoakFV.mjs +2 -0
  216. package/dist/update-check-worker.mjs +2 -0
  217. package/dist/url-info-Cs0V89qq.mjs +4 -0
  218. package/dist/url-normalization-DaEQYy5h.mjs +9 -0
  219. package/dist/url-scanner-C4YVeQ4v.mjs +16 -0
  220. package/dist/user-BV1VY3Kl.mjs +112 -0
  221. package/dist/values-qDS63E43.mjs +4 -0
  222. package/dist/vectorize-NFzD3mP5.mjs +32 -0
  223. package/dist/version-W6_TN_kN.mjs +2 -0
  224. package/dist/waiting-rooms-Y9YGj3ih.mjs +53 -0
  225. package/dist/web-assets-Gd6z8dbt.mjs +64 -0
  226. package/dist/web3-DCJx4NRp.mjs +28 -0
  227. package/dist/workers-B-j-1ygi.mjs +36 -0
  228. package/dist/workers-builds-DPrNKjZW.mjs +14 -0
  229. package/dist/workers-for-platforms-BjKAhMLA.mjs +25 -0
  230. package/dist/workers-vpc-C5YoCnQK.mjs +13 -0
  231. package/dist/workflows-C2KKIJjl.mjs +43 -0
  232. package/dist/zaraz-CVLCs1IX.mjs +22 -0
  233. package/dist/zero-trust-BtJi4OXF.mjs +795 -0
  234. package/dist/zone-hKgt0WzO.mjs +4 -0
  235. package/dist/zones-CCNyaD3J.mjs +124 -0
  236. package/package.json +12 -9
  237. package/dist/_meta/agent-context.json +0 -195
  238. package/dist/abuse-reports-CDFjJ2e8.mjs +0 -8
  239. package/dist/access-BoT1waG4.mjs +0 -11
  240. package/dist/account-agnMUKWj.mjs +0 -2
  241. package/dist/account-tags-BRMMHCee.mjs +0 -9
  242. package/dist/accounts-Cut77dAt.mjs +0 -30
  243. package/dist/acm-C8WgXNCl.mjs +0 -3
  244. package/dist/addressing-CR8EV42x.mjs +0 -13
  245. package/dist/agent-context-Wj5TRRbW.mjs +0 -8
  246. package/dist/agent-memory-CVJpKKZy.mjs +0 -6
  247. package/dist/ai-BbNYt-yI.mjs +0 -5
  248. package/dist/ai-audit-mVajM-2i.mjs +0 -2
  249. package/dist/ai-gateway-BsepSA_v.mjs +0 -13
  250. package/dist/ai-search-DbEJqm5-.mjs +0 -7
  251. package/dist/ai-security-DmyB5EYk.mjs +0 -4
  252. package/dist/alerting-dmy3hd8O.mjs +0 -6
  253. package/dist/analytics-B1xBMla0.mjs +0 -5
  254. package/dist/analytics_engine-DazCn3iC.mjs +0 -2
  255. package/dist/api-security-0HXCzfHk.mjs +0 -50
  256. package/dist/argo-DSHsE8zv.mjs +0 -2
  257. package/dist/artifacts-CwiU9Mxu.mjs +0 -5
  258. package/dist/audit-logs-DwFtMDwH.mjs +0 -2
  259. package/dist/auth-B0ZyXc3y.mjs +0 -5
  260. package/dist/auth-DWxtJ918.mjs +0 -8
  261. package/dist/billing-Cbpadkgu.mjs +0 -3
  262. package/dist/bot-management-B6M2Vyyn.mjs +0 -5
  263. package/dist/botnet-feed-Dn8UuE4h.mjs +0 -3
  264. package/dist/brand-protection-B5R0b3pu.mjs +0 -3
  265. package/dist/browser-extension-D55pYZf_.mjs +0 -3
  266. package/dist/browser-run-C1b2VkGB.mjs +0 -4
  267. package/dist/build-CP2JUfV1.mjs +0 -2
  268. package/dist/builds-CVEXO_4a.mjs +0 -9
  269. package/dist/cache-BU5xX82E.mjs +0 -9
  270. package/dist/certificate-authorities--tZTWJWD.mjs +0 -2
  271. package/dist/cf-BV2HLCQm.mjs +0 -18
  272. package/dist/chunk-QBZBEHZB-BcCMlc8C.mjs +0 -2
  273. package/dist/chunk-XLADBZ7F-DgFrtUhW.mjs +0 -103
  274. package/dist/chunk-vbHwaUoU.mjs +0 -2
  275. package/dist/client-certificates-DX84qeYG.mjs +0 -3
  276. package/dist/client-side-security-DsSO2rZQ.mjs +0 -37
  277. package/dist/cloud-connector-cf8qlxap.mjs +0 -2
  278. package/dist/cloudforce-one-DzVXorbu.mjs +0 -32
  279. package/dist/command-DYrspBc0.mjs +0 -2
  280. package/dist/connector-interrupts-DqpqPPkp.mjs +0 -2
  281. package/dist/connector-telemetry-events-CCD-_B-8.mjs +0 -2
  282. package/dist/connector-telemetry-snapshots-D3CeGGhk.mjs +0 -2
  283. package/dist/connectors-aPQspZdg.mjs +0 -3
  284. package/dist/containers-D0Kjl8h-.mjs +0 -58
  285. package/dist/content-scan-BVx18XmS.mjs +0 -4
  286. package/dist/cps-ByazyM0x.mjs +0 -2
  287. package/dist/csamScanner-OG5lQxBC.mjs +0 -6
  288. package/dist/ct-alerting-BJx5n8Zf.mjs +0 -3
  289. package/dist/custom-certificates-BuJ2e9TA.mjs +0 -5
  290. package/dist/custom-csrs-CR_5qbST.mjs +0 -3
  291. package/dist/custom-hostnames-BzDTsQXb.mjs +0 -5
  292. package/dist/custom-nameservers-OfMPRGkD.mjs +0 -3
  293. package/dist/custom-pages-BmGXoTIo.mjs +0 -3
  294. package/dist/d1-DedC8N0N.mjs +0 -21
  295. package/dist/data-security-B2UB26ry.mjs +0 -7
  296. package/dist/dcv-delegation-C11vmzbG.mjs +0 -2
  297. package/dist/diagnostics-Cf6BLpAo.mjs +0 -3
  298. package/dist/dist-CyisSore.mjs +0 -371
  299. package/dist/dist-Dr4Hg_Up.mjs +0 -48
  300. package/dist/dls-R6PvHbhj.mjs +0 -3
  301. package/dist/dns-Cl8se64c.mjs +0 -29
  302. package/dist/dns-firewall-WtmKilDT.mjs +0 -57
  303. package/dist/dry-run-YSQndLvt.mjs +0 -2
  304. package/dist/durable-objects-jfVU6yp_.mjs +0 -2
  305. package/dist/email-auth-DPmZ85eW.mjs +0 -2
  306. package/dist/email-routing-Bf6DbNTr.mjs +0 -6
  307. package/dist/email-security-DTifjSxM.mjs +0 -18
  308. package/dist/email-sending-Dm3WkFHV.mjs +0 -7
  309. package/dist/error-sanitization-D8zuyPj_.mjs +0 -2
  310. package/dist/fieldExtractors-CeXZL0-I.mjs +0 -3
  311. package/dist/firewall-D5N2APXO.mjs +0 -8
  312. package/dist/flagship-sUOy9jei.mjs +0 -4
  313. package/dist/fraud-WLW2Ep1Z.mjs +0 -20
  314. package/dist/google-tag-gateway-lbww1FaJ.mjs +0 -2
  315. package/dist/healthchecks-0ih8Qjiw.mjs +0 -4
  316. package/dist/hostnames-Ba6FuL8K.mjs +0 -3
  317. package/dist/hyperdrive-DMqcU639.mjs +0 -21
  318. package/dist/iam-CXlYm0uC.mjs +0 -6
  319. package/dist/images-D_g1oli6.mjs +0 -8
  320. package/dist/intel-B8bS0ARd.mjs +0 -8
  321. package/dist/ips-68fzniN4.mjs +0 -2
  322. package/dist/keyless-certificates-CeLnqBvX.mjs +0 -3
  323. package/dist/keys-DkVdS2lF.mjs +0 -2
  324. package/dist/kv-gDAN50BQ.mjs +0 -5
  325. package/dist/leaked-credential-checks-DfnvHpvg.mjs +0 -4
  326. package/dist/load-balancers-m0HqyXPZ.mjs +0 -6
  327. package/dist/local-BwL_gesw.mjs +0 -2
  328. package/dist/logo-matches-DPbHlsKQ.mjs +0 -2
  329. package/dist/logos-DFBJFAYJ.mjs +0 -3
  330. package/dist/logpush-gzmlZayc.mjs +0 -4
  331. package/dist/logs-BuzwQgt5.mjs +0 -18
  332. package/dist/magic-cloud-networking-BbHCi1Vp.mjs +0 -5
  333. package/dist/magic-network-monitoring-kWMmnPTG.mjs +0 -4
  334. package/dist/magic-transit-ClSmJDKw.mjs +0 -111
  335. package/dist/managed-defense-EOihg1UR.mjs +0 -2
  336. package/dist/managed-transforms-BZ_XdGE2.mjs +0 -3
  337. package/dist/matches-B6sG0_fr.mjs +0 -2
  338. package/dist/mcp--kK0vS5i.mjs +0 -4
  339. package/dist/mesh-DfXYUHOO.mjs +0 -4
  340. package/dist/mtls-certificates-DZd-0X7l.mjs +0 -3
  341. package/dist/network-U6f_5ihp.mjs +0 -6
  342. package/dist/network-interconnects-DKZGTiYM.mjs +0 -41
  343. package/dist/oauth-BdVr2hJp.mjs +0 -14
  344. package/dist/oauth-clients-CY3OkPhC.mjs +0 -4
  345. package/dist/oauth-scopes-BTY7_5L-.mjs +0 -2
  346. package/dist/observability-Bsp-LdmJ.mjs +0 -10
  347. package/dist/organization-BSeMdj-7.mjs +0 -45
  348. package/dist/organizations-BroR48Nv.mjs +0 -2
  349. package/dist/origin-ca-certificates-jC-EMn6W.mjs +0 -3
  350. package/dist/origin-post-quantum-encryption-DIspLvA0.mjs +0 -2
  351. package/dist/origin-tls-client-auth-CZ_nUEcM.mjs +0 -4
  352. package/dist/page-rules-ZcdjPohY.mjs +0 -27
  353. package/dist/pages-W4tKa7xk.mjs +0 -14
  354. package/dist/pay-per-crawl-BNM1mJmP.mjs +0 -5
  355. package/dist/pay-per-use-DKxlnkH3.mjs +0 -2
  356. package/dist/pipelines-Dug0BR-c.mjs +0 -6
  357. package/dist/precursor-D-11DkRU.mjs +0 -4
  358. package/dist/previews-D_Nv4dR6.mjs +0 -4
  359. package/dist/progress-a5IKeKni.mjs +0 -2
  360. package/dist/queries-BdA2vJoe.mjs +0 -3
  361. package/dist/queues-Bu06ZqUE.mjs +0 -7
  362. package/dist/r2-COC9wMKb.mjs +0 -25
  363. package/dist/r2-data-catalog-CX5Rl5Qx.mjs +0 -16
  364. package/dist/radar-L-yoLIHF.mjs +0 -2
  365. package/dist/realtime-JKIiXfzi.mjs +0 -20
  366. package/dist/registrar-_dYUZrK0.mjs +0 -43
  367. package/dist/registrar-sandbox-D1yfW_Q_.mjs +0 -56
  368. package/dist/reporting-3fyoMcmb.mjs +0 -2
  369. package/dist/request-headers-BhQQAfJt.mjs +0 -2
  370. package/dist/request-tracers-TisEth2p.mjs +0 -2
  371. package/dist/resolve-CYUp6YgC.mjs +0 -2
  372. package/dist/resource-sharing-C4-dnohU.mjs +0 -6
  373. package/dist/resource-tagging-BRDifKqM.mjs +0 -2
  374. package/dist/rules-BCF3gIkw.mjs +0 -4
  375. package/dist/rulesets-wp6rllt3.mjs +0 -5
  376. package/dist/rum-B77awgoB.mjs +0 -4
  377. package/dist/run-BS8otL3u.mjs +0 -2
  378. package/dist/scim-C9BmUYil.mjs +0 -4
  379. package/dist/secrets-store-ckkZR2dM.mjs +0 -7
  380. package/dist/security-center-BCahKT57.mjs +0 -2
  381. package/dist/security-txt-0SI5du7I.mjs +0 -3
  382. package/dist/shared-D0B-7q-D.mjs +0 -2
  383. package/dist/smart-shield-BDPbrZa4.mjs +0 -4
  384. package/dist/snippets-CVRR_h0i.mjs +0 -4
  385. package/dist/spawn-DP4T92ss.mjs +0 -519
  386. package/dist/spectrum-CjNXQIQE.mjs +0 -63
  387. package/dist/speed-CrXCHk3h.mjs +0 -4
  388. package/dist/src-BbnV77C4.mjs +0 -108
  389. package/dist/ssl-DKORhHkh.mjs +0 -15
  390. package/dist/startup-profile-CBIH6yZy.mjs +0 -17
  391. package/dist/state-QUu6HfxC.mjs +0 -2
  392. package/dist/stream-wY3zi3FK.mjs +0 -16
  393. package/dist/submit-B-4oCBSk.mjs +0 -2
  394. package/dist/tags-5uJEkYJZ.mjs +0 -2
  395. package/dist/telemetry-n3NJourL.mjs +0 -2
  396. package/dist/tenant-BkFvv2o3.mjs +0 -2
  397. package/dist/tenant-custom-nameservers-DcjC1q0r.mjs +0 -3
  398. package/dist/tunnel-Cd4ipbvJ.mjs +0 -2
  399. package/dist/tunnels-9Zg3ePwD.mjs +0 -5
  400. package/dist/turnstile-BTwKYpzD.mjs +0 -23
  401. package/dist/ui-DQSZeaG5.mjs +0 -5
  402. package/dist/url-info-D7Y61BFd.mjs +0 -2
  403. package/dist/url-normalization-B4n8HiNQ.mjs +0 -3
  404. package/dist/url-scanner-CiCIltSQ.mjs +0 -2
  405. package/dist/user-DDFDGJ0Y.mjs +0 -12
  406. package/dist/values-DRznB_Cl.mjs +0 -2
  407. package/dist/vectorize-CbznPhzq.mjs +0 -4
  408. package/dist/waiting-rooms-CKP5hYBK.mjs +0 -11
  409. package/dist/web-assets-C-ZoSkkh.mjs +0 -8
  410. package/dist/web3-DwlN4dOw.mjs +0 -4
  411. package/dist/workers-builds-ECw_x_kp.mjs +0 -2
  412. package/dist/workers-for-platforms-BYGy46R6.mjs +0 -5
  413. package/dist/workers-vpc-CCosFcxz.mjs +0 -3
  414. package/dist/workers-zFMrbUkg.mjs +0 -6
  415. package/dist/workflows-C8GXGDRW.mjs +0 -5
  416. package/dist/zaraz-B5UIREaz.mjs +0 -2
  417. package/dist/zero-trust-DUp0XoIo.mjs +0 -91
  418. package/dist/zone-BGLkk-mL.mjs +0 -2
  419. package/dist/zones-CwYjNXMH.mjs +0 -44
  420. /package/dist/{alerts-CarPLL8k.mjs → alerts-CstOk8n0.mjs} +0 -0
  421. /package/dist/{autorag-zK-3harf.mjs → autorag-PRTwXGgn.mjs} +0 -0
  422. /package/dist/{body-parser-Cmw7PZ7a.mjs → body-parser-CUWbw_Tq.mjs} +0 -0
  423. /package/dist/{brands-CpgTsX8h.mjs → brands-BHRXlWDm.mjs} +0 -0
  424. /package/dist/{clear-C5gzBA8G.mjs → clear-UvKESVx3.mjs} +0 -0
  425. /package/dist/{cli-types-abvWQN3T.mjs → cli-types-tt_LZMbn.mjs} +0 -0
  426. /package/dist/{connector-telemetry-events-latest-BY-dbhQZ.mjs → connector-telemetry-events-latest-DwnFeZg0.mjs} +0 -0
  427. /package/dist/{connector-telemetry-snapshots-latest-DoMvHvCO.mjs → connector-telemetry-snapshots-latest-Dv6rZlxs.mjs} +0 -0
  428. /package/dist/{domain-info-Cw3G4nap.mjs → domain-info-BqTDXNBo.mjs} +0 -0
  429. /package/dist/{health-DkEXPkS6.mjs → health-CwPzzrV6.mjs} +0 -0
  430. /package/dist/{input-validation-nF-0Ze2h.mjs → input-validation-Ch4Vllrm.mjs} +0 -0
  431. /package/dist/{internal-4fU2r5en.mjs → internal-WLHfxX64.mjs} +0 -0
  432. /package/dist/{live-B4iGrwY2.mjs → live-D_k7eHdv.mjs} +0 -0
  433. /package/dist/{metadata-C5fJJr-k.mjs → metadata-APBiectA.mjs} +0 -0
  434. /package/dist/{project-settings-Bc3wYHo8.mjs → project-settings-DSXevRvj.mjs} +0 -0
  435. /package/dist/{rate-limit-analytics-DNsAFIeM.mjs → rate-limit-analytics-CDTPxSET.mjs} +0 -0
  436. /package/dist/{rate-limits-CsOim7bm.mjs → rate-limits-C3K9smdl.mjs} +0 -0
  437. /package/dist/{ready-tTe-zcIw.mjs → ready-CvwvbdTX.mjs} +0 -0
  438. /package/dist/{recent-submissions-B3eTV5yC.mjs → recent-submissions-CjzcT-iH.mjs} +0 -0
  439. /package/dist/{refute-BY76YVrT.mjs → refute-CIAFMj00.mjs} +0 -0
  440. /package/dist/{scan-logo-DdoF_a5y.mjs → scan-logo-zFkphtQ3.mjs} +0 -0
  441. /package/dist/{scan-page-sSgLwwZN.mjs → scan-page-CLl2MAkZ.mjs} +0 -0
  442. /package/dist/{search-BFvQr-sl.mjs → search-12jA1b4l.mjs} +0 -0
  443. /package/dist/{signed-url-Cr8hiZPJ.mjs → signed-url-U0T_PEMR.mjs} +0 -0
  444. /package/dist/{submission-info-DT2mLnu1.mjs → submission-info-CZ84a3Nb.mjs} +0 -0
  445. /package/dist/{theme-CeVf-5qG.mjs → theme-BiIYWOed.mjs} +0 -0
  446. /package/dist/{total-queries-6gs5iy9T.mjs → total-queries-CJTc9Pde.mjs} +0 -0
  447. /package/dist/{tracked-domains-D6XKO2EV.mjs → tracked-domains-BKLxnnSv.mjs} +0 -0
  448. /package/dist/{verify-CM1NakP0.mjs → verify-CZW5Fo1q.mjs} +0 -0
@@ -0,0 +1,43 @@
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-D4bkeMAw.mjs";import{a,o,r as s}from"./auth-Cp7gT-AF.mjs";import{t as c}from"./output-Bia1u2k5.mjs";import{t as l}from"./dry-run-CLX6Pbtq.mjs";import{t as u}from"./progress-Bi02B6v4.mjs";import{n as d,t as f}from"./run-BBBMrSrs.mjs";import"./telemetry-mKEb8lYB.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-Bx2PB-tt.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-CebDI0f1.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
+ Pass this value to fetch the next page of results. Omit (or
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
+ `)}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(`
6
+ `)}\n\nRun \`cf registrar registrations create ${h} --help\` for .${S}'s registration fields.`);o={domain_name:m,...r.body}}let D;try{D=Me(o,C)}catch(e){let t=E(C,o);if(we(m,x.extension,w,o,t))return;throw e}let O=E(C,o);if(we(m,x.extension,w,o,O))return;if(O.length>0)throw Error(`${O.join(`
7
+ `)}\n\nRun \`cf registrar registrations create ${h} --help\` for this extension's registration fields.`);if(e.dryRun){l({command:`cf registrar registrations create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${g}/registrar/registrations`,pathParams:{},bodyKind:`json`,body:o});return}let k=await P(await y(),g,m),A=De(k,D);if(e.force||process.stderr.write(`${ye({domain:m,accountId:g,years:D,quotedCost:A,pricing:k,body:o,schema:C,descriptors:w})}\n`),!await ee({force:e.force,message:`Registering ${h} for ${D} ${D===1?`year`:`years`} costs ${A}, charges the account's default payment method, and cannot be refunded.`}))return;if(o.years!==D)throw Error(`The registration term changed after confirmation, so cf will not submit this registration.`);let j=await P(await y(),g,m);if(j.currency!==k.currency||j.registration_cost!==k.registration_cost||j.renewal_cost!==k.renewal_cost)throw Error(`Availability or pricing changed while awaiting confirmation, so cf will not submit this registration. Re-run the command to review the current quote.`);let M=await y();e.accountId=g,c(await u(`Registering`,async()=>a(M,`POST`,`/accounts/${g}/registrar/registrations`,{body:o,headers:Object.keys(n).length>0?n:void 0})),{successLabel:`Registered ${h}`})}},{command:`registrar registrations create`,recordArgs:!1});function Be(e){return e.usage("$0 registrar 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 Ve={command:`check <domains>`,describe:`Check domain availability`,builder:Be,handler:async e=>f({command:`registrar registrations check`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){l({command:`cf registrar registrations check`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await i()??`<account-id>`}/registrar/domain-check`,pathParams:{},bodyKind:`json`,body:e.body===void 0?void 0:m(e.body)});return}let t=await s(e),a=e.local?n:await r();if(e.accountId=a,e.body){let n=m(e.body);c(await u(`Creating`,async()=>t.registrar.registrations.check({...n,account_id:a})),{successLabel:`Created`});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function He(e){return e.usage("$0 registrar registrations get-registration-status <domain-name>\n\nReturns the current status of a domain registration workflow. Use this endpoint to poll for completion when the POST response returned `202 Accepted`. The URL is provided in the `links.self` field of the workflow status response. Poll this endpoint until the workflow reaches a terminal state or a state that requires user attention. **Terminal states:** `succeeded` and `failed` are terminal and always have `completed: true`. **Non-terminal states:** - `action_required` has `completed: false` and will not resolve on its own. The workflow is paused pending user intervention. - `blocked` has `completed: false` and indicates the workflow is waiting on a third party such as the extension registry or losing registrar. Continue polling while informing the user of the delay. Use increasing backoff between polls. When `state: blocked`, use a longer polling interval and do not poll indefinitely. A naive polling loop that only checks `completed` can run indefinitely when `state: action_required`. Break explicitly on `action_required`: ```js let status; do { await new Promise(r => setTimeout(r, 2000)); status = await cloudflare.request({ method: 'GET', path: reg.result.links.self, }); } while ( !status.result.completed && status.result.state !== 'action_required' ); if (status.result.state === 'action_required') { // Surface context.action and context.confirmation_sent_to to the user. // Do not re-submit the registration request. } ```").positional(`domain-name`,{type:`string`,description:"Provides a fully qualified domain name (FQDN), including the extension (e.g., `example.com`, `mybrand.app`). The domain name uniquely identifies a registration. Cloudflare permits only one registration per domain, making the domain name a natural idempotency key for registration requests.",demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ue={command:`get-registration-status <domain-name>`,describe:`Get Registration Status`,builder:He,handler:async e=>f({command:`registrar registrations get-registration-status`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){l({command:`cf registrar registrations get-registration-status`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await i()??`<account-id>`}/registrar/registrations/${e[`domain-name`]==null?`<domain-name>`:encodeURIComponent(String(e[`domain-name`]))}/registration-status`,pathParams:{"domain-name":String(e[`domain-name`]??``)},bodyKind:`none`});return}let t=await s(e),a=e.local?n:await r();e.accountId=a,c(await u(`Loading`,async()=>t.registrar.registrations.getRegistrationStatus({account_id:a,domain_name:e[`domain-name`]})),{successLabel:`Loaded`})})};function We(e){return e.usage("$0 registrar registrations get-transfer-status <domain-name>\n\nReturns the current status of a domain transfer workflow. Use this endpoint to poll transfer progress after initiating a transfer with `POST /accounts/{account_id}/registrar/registrations/{domain_name}/transfer-in`. The URL is provided in the `links.self` field of the transfer response. ### Transfer timelines Transfers typically take 1–10 days due to ICANN-mandated approval windows. ### Workflow states **Terminal states:** `succeeded` and `failed` are terminal and always have `completed: true`. **Non-terminal states:** - `in_progress`: Transfer has been submitted to the registry and is being processed. Continue polling. - `blocked`: The workflow is waiting on the losing registrar or registry to release the domain. This is the **most common state** for transfers and is entirely normal — it means the ICANN transfer approval window is in effect. The losing registrar has up to 5 days to approve or reject. Continue polling with longer intervals (e.g., every 30–60 minutes). - `action_required`: The user needs to take action (e.g., the FOA email needs to be accepted). See `context` for details on what is needed. - `pending`: Transfer workflow created but not yet started processing. ### Polling guidance Adjust your polling interval based on the current workflow state: - `pending` or `in_progress`: Poll every 30 seconds. - `blocked`: The transfer is waiting on a third party (e.g., losing registrar approval). Poll every 30–60 minutes. - `action_required`: Stop polling. The workflow will not advance until the user takes action. Check `context` for details on what is needed. - `succeeded` or `failed`: Terminal — stop polling.").positional(`domain-name`,{type:`string`,description:"Provides a fully qualified domain name (FQDN), including the extension (e.g., `example.com`, `mybrand.app`). The domain name uniquely identifies a registration. Cloudflare permits only one registration per domain, making the domain name a natural idempotency key for registration requests.",demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ge={command:`get-transfer-status <domain-name>`,describe:`Get Transfer Status`,builder:We,handler:async e=>f({command:`registrar registrations get-transfer-status`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){l({command:`cf registrar registrations get-transfer-status`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await i()??`<account-id>`}/registrar/registrations/${e[`domain-name`]==null?`<domain-name>`:encodeURIComponent(String(e[`domain-name`]))}/transfer-in-status`,pathParams:{"domain-name":String(e[`domain-name`]??``)},bodyKind:`none`});return}let t=await s(e),a=e.local?n:await r();e.accountId=a,c(await u(`Loading`,async()=>t.registrar.registrations.getTransferStatus({account_id:a,domain_name:e[`domain-name`]})),{successLabel:`Loaded`})})};function Ke(e){return e.usage("$0 registrar registrations get-update-status <domain-name>\n\nReturns the current status of a domain update workflow. Use this endpoint to poll for completion when the PATCH response returned `202 Accepted`. The URL is provided in the `links.self` field of the workflow status response. Poll this endpoint until the workflow reaches a terminal state or a state that requires user attention. Use increasing backoff between polls. When the workflow remains blocked on a third party, use a longer polling interval and do not poll indefinitely.").positional(`domain-name`,{type:`string`,description:"Provides a fully qualified domain name (FQDN), including the extension (e.g., `example.com`, `mybrand.app`). The domain name uniquely identifies a registration. Cloudflare permits only one registration per domain, making the domain name a natural idempotency key for registration requests.",demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const qe={command:`get-update-status <domain-name>`,describe:`Get Update Status`,builder:Ke,handler:async e=>f({command:`registrar registrations get-update-status`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){l({command:`cf registrar registrations get-update-status`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await i()??`<account-id>`}/registrar/registrations/${e[`domain-name`]==null?`<domain-name>`:encodeURIComponent(String(e[`domain-name`]))}/update-status`,pathParams:{"domain-name":String(e[`domain-name`]??``)},bodyKind:`none`});return}let t=await s(e),a=e.local?n:await r();e.accountId=a,c(await u(`Loading`,async()=>t.registrar.registrations.getUpdateStatus({account_id:a,domain_name:e[`domain-name`]})),{successLabel:`Loaded`})})};function Je(e){return e.usage("$0 registrar registrations get <domain-name>\n\nReturns the current state of a domain registration. This is the canonical read endpoint for a domain you own. It returns the full registration resource including current settings and expiration. When the registration resource is ready, both `created_at` and `expires_at` are present in the response.").positional(`domain-name`,{type:`string`,description:`Domain name to retrieve.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ye={command:`get <domain-name>`,describe:`Get Registration`,builder:Je,handler:async e=>f({command:`registrar registrations get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){l({command:`cf registrar registrations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await i()??`<account-id>`}/registrar/registrations/${e[`domain-name`]==null?`<domain-name>`:encodeURIComponent(String(e[`domain-name`]))}`,pathParams:{"domain-name":String(e[`domain-name`]??``)},bodyKind:`none`});return}let t=await s(e),a=e.local?n:await r();e.accountId=a,c(await u(`Loading`,async()=>t.registrar.registrations.get({account_id:a,domain_name:e[`domain-name`]})),{successLabel:`Loaded`})})};function Xe(e){return e.usage("$0 registrar registrations list\n\nReturns a paginated list of domain registrations owned by the account. This endpoint uses cursor-based pagination. Results are ordered by registration date 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.").option(`cursor`,{type:`string`,description:`Opaque token from a previous response's \`result_info.cursor\`.
8
+ Pass this value to fetch the next page of results. Omit (or
9
+ 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 registration date (`registry_created_at`) when omitted.",choices:[`registry_created_at`,`registry_expires_at`,`name`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ze={command:`list`,describe:`List Registrations`,builder:S(Xe),handler:async e=>f({command:`registrar registrations list`,classification:{safeFlags:[`direction`,`sort-by`,`dry-run`]}},e,async()=>{let t={cursor:e.cursor,per_page:e[`per-page`],direction:e.direction,sort_by:e[`sort-by`]};if(e.dryRun){l({command:`cf registrar registrations list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await i()??`<account-id>`}/registrar/registrations`,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.registrations.list({account_id:o,...t})),{successLabel:`Loaded`})})};function Qe(e){return e.usage('$0 registrar registrations search\n\nSearches for domain name suggestions based on a keyword, phrase, or partial domain name. Returns a list of potentially available domains with pricing information. **Important:** Results are non-authoritative and based on cached data. Always use the `/domain-check` endpoint to verify real-time availability before attempting registration. Suggestions are scoped to extensions supported for programmatic registration via this API (`POST /registrations`). Domains on unsupported extensions will not appear in results, even if they are available at the registry level. ### Use cases - Brand name discovery (e.g., "acme corp" → acmecorp.com, acmecorp.dev) - Keyword-based suggestions (e.g., "coffee shop" → coffeeshop.com, mycoffeeshop.net) - Alternative extension discovery (e.g., "example.com" → example.com, example.app, example.xyz) ### Workflow 1. Call this endpoint with a keyword or domain name. 2. Present suggestions to the user. 3. Call `/domain-check` with the user\'s chosen domains to confirm real-time availability and pricing. 4. Proceed to `POST /registrations` only for supported non-premium domains where the Check response returns `registrable: true`. **Note:** Searching with just a domain extension (e.g., "com" or ".app") is not supported. Provide a keyword or domain name.').option(`query`,{type:`string`,description:`The search term to find domain suggestions. Accepts keywords, phrases, or full domain names.
10
+ - Phrases: "coffee shop" returns coffeeshop.com, mycoffeeshop.net, etc.
11
+ - Domain names: "example.com" returns example.com and variations across extensions`,demandOption:!0}).option(`extensions`,{type:`string`,description:`Limits results to specific domain extensions from the supported set. If not specified,
12
+ returns results across all supported extensions. Extensions not in the supported
13
+ set are silently ignored.`}).option(`limit`,{type:`number`,description:`Maximum number of domain suggestions to return. Defaults to 20 if not specified.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const $e={command:`search`,describe:`Search for available domains`,builder:Qe,handler:async e=>f({command:`registrar registrations search`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let t={q:e.query,extensions:e.extensions,limit:e.limit};if(e.dryRun){l({command:`cf registrar registrations search`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await i()??`<account-id>`}/registrar/domain-search`,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.registrations.search({account_id:o,...t})),{successLabel:`Loaded`})})};function et(e){return e.usage("$0 registrar registrations transfer-check\n\nPerforms real-time, authoritative eligibility checks directly against needed upstreams. Use this endpoint to verify a domain is available before attempting a transfer via `POST /registrations/:domain_name/transfer-in`. **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. ### Behavior - Maximum 10 domains per request - Pricing is only returned for domains where `transferable: true` - Results are not cached; each request queries the registry & other needed upstreams ## Extension Support All `.uk` extensions (`.uk`, `.co.uk`, etc) do not support auth codes. As such, Cloudflare will ignore the `auth_code` section of this request for Nominet domains. This means that a `.uk` domain depends on public data to obtain domain information, so it might be a few minutes outdated. ### Workflow 1. Call this endpoint with domains the user wants to transfer. 2. For each domain where `transferable: true`, present pricing to the user. 3. For each domain where `transferable: false`, present reasons to the user 4. Proceed to `POST /registrations/:domain_name/transfer-in` only for the `transferable: true` domains.").option(`domains`,{type:`string`,description:`List of domain objects to evaluate for transfer eligibility. 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:`List of transferable domain objects to check.`})}const tt={command:`transfer-check`,describe:`Check domain transfer eligibility`,builder:et,handler:async e=>f({command:`registrar registrations transfer-check`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){l({command:`cf registrar registrations transfer-check`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await i()??`<account-id>`}/registrar/domain-transfer-check`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({domains:h(e.domains,`domains`)}):m(e.body)});return}let t=await s(e),a=e.local?n:await r();if(e.accountId=a,e.body){let n=m(e.body);c(await u(`Creating`,async()=>t.registrar.registrations.transferCheck({...n,account_id:a})),{successLabel:`Created`});return}if(e.domains===void 0)throw Error(`--domains is required (or pass --body with this field set).`);let o=g({domains:h(e.domains,`domains`)});c(await u(`Creating`,async()=>t.registrar.registrations.transferCheck({...o,account_id:a})),{successLabel:`Created`})})};function nt(e){return e.usage("$0 registrar registrations transfer-in <domain-name>\n\nStarts a domain transfer-in workflow. This is typically a billable operation — successful transfers charge the account's default payment method, except for extensions with zero transfer pricing (e.g. UK extensions). All successful domain transfers are non-refundable. ### How transfers work Domain transfers move a domain from another registrar to Cloudflare. Transfers typically take 1-10 days due to ICANN-mandated approval windows. ### Prerequisites - The domain must already have a zone in the Cloudflare account (added through the dashboard or zone API). - The zone must have DNSSec disabled. - For billable transfers (i.e. extensions with non-zero transfer pricing), the account must have a billing profile with a valid default payment method. Set this up at `https://dash.cloudflare.com/{account_id}/billing/payment-info`. - The domain must be unlocked at the current registrar. - An authorization/EPP code from the current registrar is required, except for UK extensions — see Auth code below. ### Auth code An authorization code (also called EPP code, transfer key, or auth-info code) is required for most extensions, with the exception of UK extensions. Obtain this from your current registrar's control panel. The auth code in the request body must be base64-encoded per RFC 4648 §4 (standard alphabet, no line breaks). ### Response behavior Successful transfer initiation returns `202 Accepted`. Validation or initiation failures return the documented `4XX` responses. Poll `GET /accounts/{account_id}/registrar/registrations/{domain_name}/transfer-in-status` to track progress. ### Premium domains Premium domain transfers are not currently supported by this API. Please use the [dashboard](https://dash.cloudflare.com/) for now. ### Billing The account's default payment method is charged upon successful transfer completion, unless the extension has zero transfer pricing (e.g. UK extensions). The transfer adds time to the domain's existing expiration date (typically 1 year).").positional(`domain-name`,{type:`string`,description:`Domain name to transfer.`,demandOption:!0}).option(`prefer`,{type:`string`,description:"Set to `respond-async` to indicate a preference for asynchronous\nprocessing (RFC 7240)."}).option(`auth-code`,{type:`string`,description:`The EPP/authorization code from your current registrar, base64-encoded
14
+ per RFC 4648 §4. Obtain this from your current registrar's control panel.
15
+ Required for all extensions, except for UK.
16
+ `}).option(`auto-renew`,{type:`boolean`,description:"Enable or disable automatic renewal after transfer. Defaults to `false` if omitted.\n",default:!1}).option(`contacts-administrator-email`,{type:`string`,description:`Email address for the registrant. Used for domain-related
17
+ communications from the registry, including ownership verification
18
+ and renewal notices.
19
+ `}).option(`contacts-administrator-fax`,{type:`string`,description:`Fax number in E.164 format (e.g., \`+1.5555555555\`). Optional.
20
+ Most registrations do not require a fax number.
21
+ `}).option(`contacts-administrator-phone`,{type:`string`,description:"Phone number in E.164 format: `+{country_code}.{number}` without spaces or dashes. Examples: `+1.5555555555` (US), `+44.2071234567` (UK), `+81.312345678` (Japan)."}).option(`contacts-administrator-postal-info-name`,{type:`string`,description:"Full legal name of the contact, including all required name components for an individual or authorized representative. Some registries require a complete personal name that includes a family or last name where applicable. Provide the complete name in this single field, for example `Ada Lovelace`; do not send separate first-name or last-name fields."}).option(`contacts-administrator-postal-info-organization`,{type:`string`,description:`Organization or company name. Optional for individual registrants.`}).option(`contacts-billing-email`,{type:`string`,description:`Email address for the registrant. Used for domain-related
22
+ communications from the registry, including ownership verification
23
+ and renewal notices.
24
+ `}).option(`contacts-billing-fax`,{type:`string`,description:`Fax number in E.164 format (e.g., \`+1.5555555555\`). Optional.
25
+ Most registrations do not require a fax number.
26
+ `}).option(`contacts-billing-phone`,{type:`string`,description:"Phone number in E.164 format: `+{country_code}.{number}` without spaces or dashes. Examples: `+1.5555555555` (US), `+44.2071234567` (UK), `+81.312345678` (Japan)."}).option(`contacts-billing-postal-info-name`,{type:`string`,description:"Full legal name of the contact, including all required name components for an individual or authorized representative. Some registries require a complete personal name that includes a family or last name where applicable. Provide the complete name in this single field, for example `Ada Lovelace`; do not send separate first-name or last-name fields."}).option(`contacts-billing-postal-info-organization`,{type:`string`,description:`Organization or company name. Optional for individual registrants.`}).option(`contacts-registrant-email`,{type:`string`,description:`Email address for the registrant. Used for domain-related
27
+ communications from the registry, including ownership verification
28
+ and renewal notices.
29
+ `}).option(`contacts-registrant-fax`,{type:`string`,description:`Fax number in E.164 format (e.g., \`+1.5555555555\`). Optional.
30
+ Most registrations do not require a fax number.
31
+ `}).option(`contacts-registrant-phone`,{type:`string`,description:"Phone number in E.164 format: `+{country_code}.{number}` without spaces or dashes. Examples: `+1.5555555555` (US), `+44.2071234567` (UK), `+81.312345678` (Japan)."}).option(`contacts-registrant-postal-info-name`,{type:`string`,description:"Full legal name of the contact, including all required name components for an individual or authorized representative. Some registries require a complete personal name that includes a family or last name where applicable. Provide the complete name in this single field, for example `Ada Lovelace`; do not send separate first-name or last-name fields."}).option(`contacts-registrant-postal-info-organization`,{type:`string`,description:`Organization or company name. Optional for individual registrants.`}).option(`contacts-technical-email`,{type:`string`,description:`Email address for the registrant. Used for domain-related
32
+ communications from the registry, including ownership verification
33
+ and renewal notices.
34
+ `}).option(`contacts-technical-fax`,{type:`string`,description:`Fax number in E.164 format (e.g., \`+1.5555555555\`). Optional.
35
+ Most registrations do not require a fax number.
36
+ `}).option(`contacts-technical-phone`,{type:`string`,description:"Phone number in E.164 format: `+{country_code}.{number}` without spaces or dashes. Examples: `+1.5555555555` (US), `+44.2071234567` (UK), `+81.312345678` (Japan)."}).option(`contacts-technical-postal-info-name`,{type:`string`,description:"Full legal name of the contact, including all required name components for an individual or authorized representative. Some registries require a complete personal name that includes a family or last name where applicable. Provide the complete name in this single field, for example `Ada Lovelace`; do not send separate first-name or last-name fields."}).option(`contacts-technical-postal-info-organization`,{type:`string`,description:`Organization or company name. Optional for individual registrants.`}).option(`privacy-mode`,{type:`string`,description:`WHOIS privacy mode to apply after transfer completes. Defaults to
37
+ the extension's default privacy mode (typically \`redaction\`).
38
+ `,choices:[`off`,`redaction`]}).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)`}).check(e=>{if([`contacts-administrator-email`,`contacts-administrator-fax`,`contacts-administrator-phone`,`contacts-administrator-postal-info-name`,`contacts-administrator-postal-info-organization`,`contacts-billing-email`,`contacts-billing-fax`,`contacts-billing-phone`,`contacts-billing-postal-info-name`,`contacts-billing-postal-info-organization`,`contacts-registrant-email`,`contacts-registrant-fax`,`contacts-registrant-phone`,`contacts-registrant-postal-info-name`,`contacts-registrant-postal-info-organization`,`contacts-technical-email`,`contacts-technical-fax`,`contacts-technical-phone`,`contacts-technical-postal-info-name`,`contacts-technical-postal-info-organization`].some(t=>e[t]!==void 0)){let t=[`contacts-administrator-email`,`contacts-administrator-phone`,`contacts-administrator-postal-info-name`,`contacts-billing-email`,`contacts-billing-phone`,`contacts-billing-postal-info-name`,`contacts-registrant-email`,`contacts-registrant-phone`,`contacts-registrant-postal-info-name`,`contacts-technical-email`,`contacts-technical-phone`,`contacts-technical-postal-info-name`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --contacts-* flag is set`)}return!0})}const rt={command:`transfer-in <domain-name>`,describe:`Initiate Transfer`,builder:nt,handler:async e=>f({command:`registrar registrations transfer-in`,classification:{safeFlags:[`auto-renew`,`privacy-mode`,`dry-run`]}},e,async()=>{let t={};if(e.prefer!==void 0&&(t.Prefer=String(e.prefer)),e.dryRun){l({command:`cf registrar registrations transfer-in`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await i()??`<account-id>`}/registrar/registrations/${e[`domain-name`]==null?`<domain-name>`:encodeURIComponent(String(e[`domain-name`]))}/transfer-in`,pathParams:{"domain-name":String(e[`domain-name`]??``)},bodyKind:`json`,body:e.body===void 0?g({auth_code:_(e[`auth-code`],`auth-code`,`text`),auto_renew:e[`auto-renew`],contacts:{administrator:{email:_(e[`contacts-administrator-email`],`contacts-administrator-email`,`text`),fax:_(e[`contacts-administrator-fax`],`contacts-administrator-fax`,`text`),phone:_(e[`contacts-administrator-phone`],`contacts-administrator-phone`,`text`),postal_info:{name:_(e[`contacts-administrator-postal-info-name`],`contacts-administrator-postal-info-name`,`text`),organization:_(e[`contacts-administrator-postal-info-organization`],`contacts-administrator-postal-info-organization`,`text`)}},billing:{email:_(e[`contacts-billing-email`],`contacts-billing-email`,`text`),fax:_(e[`contacts-billing-fax`],`contacts-billing-fax`,`text`),phone:_(e[`contacts-billing-phone`],`contacts-billing-phone`,`text`),postal_info:{name:_(e[`contacts-billing-postal-info-name`],`contacts-billing-postal-info-name`,`text`),organization:_(e[`contacts-billing-postal-info-organization`],`contacts-billing-postal-info-organization`,`text`)}},registrant:{email:_(e[`contacts-registrant-email`],`contacts-registrant-email`,`text`),fax:_(e[`contacts-registrant-fax`],`contacts-registrant-fax`,`text`),phone:_(e[`contacts-registrant-phone`],`contacts-registrant-phone`,`text`),postal_info:{name:_(e[`contacts-registrant-postal-info-name`],`contacts-registrant-postal-info-name`,`text`),organization:_(e[`contacts-registrant-postal-info-organization`],`contacts-registrant-postal-info-organization`,`text`)}},technical:{email:_(e[`contacts-technical-email`],`contacts-technical-email`,`text`),fax:_(e[`contacts-technical-fax`],`contacts-technical-fax`,`text`),phone:_(e[`contacts-technical-phone`],`contacts-technical-phone`,`text`),postal_info:{name:_(e[`contacts-technical-postal-info-name`],`contacts-technical-postal-info-name`,`text`),organization:_(e[`contacts-technical-postal-info-organization`],`contacts-technical-postal-info-organization`,`text`)}}},privacy_mode:_(e[`privacy-mode`],`privacy-mode`,`text`)}):m(e.body)});return}let o=await s(e),d=e.local?n:await r();if(e.accountId=d,e.body){let n=m(e.body);c(await u(`Creating`,async()=>a(o,`POST`,`/accounts/${d}/registrar/registrations/${encodeURIComponent(String(e[`domain-name`]))}/transfer-in`,{body:n,headers:Object.keys(t).length>0?t:void 0})),{successLabel:`Created`});return}let f={};e[`auth-code`]!==void 0&&p(f,[`auth_code`],_(e[`auth-code`],`auth-code`,`text`)),e[`auto-renew`]!==void 0&&p(f,[`auto_renew`],e[`auto-renew`]),e[`contacts-administrator-email`]!==void 0&&p(f,[`contacts`,`administrator`,`email`],_(e[`contacts-administrator-email`],`contacts-administrator-email`,`text`)),e[`contacts-administrator-fax`]!==void 0&&p(f,[`contacts`,`administrator`,`fax`],_(e[`contacts-administrator-fax`],`contacts-administrator-fax`,`text`)),e[`contacts-administrator-phone`]!==void 0&&p(f,[`contacts`,`administrator`,`phone`],_(e[`contacts-administrator-phone`],`contacts-administrator-phone`,`text`)),e[`contacts-administrator-postal-info-name`]!==void 0&&p(f,[`contacts`,`administrator`,`postal_info`,`name`],_(e[`contacts-administrator-postal-info-name`],`contacts-administrator-postal-info-name`,`text`)),e[`contacts-administrator-postal-info-organization`]!==void 0&&p(f,[`contacts`,`administrator`,`postal_info`,`organization`],_(e[`contacts-administrator-postal-info-organization`],`contacts-administrator-postal-info-organization`,`text`)),e[`contacts-billing-email`]!==void 0&&p(f,[`contacts`,`billing`,`email`],_(e[`contacts-billing-email`],`contacts-billing-email`,`text`)),e[`contacts-billing-fax`]!==void 0&&p(f,[`contacts`,`billing`,`fax`],_(e[`contacts-billing-fax`],`contacts-billing-fax`,`text`)),e[`contacts-billing-phone`]!==void 0&&p(f,[`contacts`,`billing`,`phone`],_(e[`contacts-billing-phone`],`contacts-billing-phone`,`text`)),e[`contacts-billing-postal-info-name`]!==void 0&&p(f,[`contacts`,`billing`,`postal_info`,`name`],_(e[`contacts-billing-postal-info-name`],`contacts-billing-postal-info-name`,`text`)),e[`contacts-billing-postal-info-organization`]!==void 0&&p(f,[`contacts`,`billing`,`postal_info`,`organization`],_(e[`contacts-billing-postal-info-organization`],`contacts-billing-postal-info-organization`,`text`)),e[`contacts-registrant-email`]!==void 0&&p(f,[`contacts`,`registrant`,`email`],_(e[`contacts-registrant-email`],`contacts-registrant-email`,`text`)),e[`contacts-registrant-fax`]!==void 0&&p(f,[`contacts`,`registrant`,`fax`],_(e[`contacts-registrant-fax`],`contacts-registrant-fax`,`text`)),e[`contacts-registrant-phone`]!==void 0&&p(f,[`contacts`,`registrant`,`phone`],_(e[`contacts-registrant-phone`],`contacts-registrant-phone`,`text`)),e[`contacts-registrant-postal-info-name`]!==void 0&&p(f,[`contacts`,`registrant`,`postal_info`,`name`],_(e[`contacts-registrant-postal-info-name`],`contacts-registrant-postal-info-name`,`text`)),e[`contacts-registrant-postal-info-organization`]!==void 0&&p(f,[`contacts`,`registrant`,`postal_info`,`organization`],_(e[`contacts-registrant-postal-info-organization`],`contacts-registrant-postal-info-organization`,`text`)),e[`contacts-technical-email`]!==void 0&&p(f,[`contacts`,`technical`,`email`],_(e[`contacts-technical-email`],`contacts-technical-email`,`text`)),e[`contacts-technical-fax`]!==void 0&&p(f,[`contacts`,`technical`,`fax`],_(e[`contacts-technical-fax`],`contacts-technical-fax`,`text`)),e[`contacts-technical-phone`]!==void 0&&p(f,[`contacts`,`technical`,`phone`],_(e[`contacts-technical-phone`],`contacts-technical-phone`,`text`)),e[`contacts-technical-postal-info-name`]!==void 0&&p(f,[`contacts`,`technical`,`postal_info`,`name`],_(e[`contacts-technical-postal-info-name`],`contacts-technical-postal-info-name`,`text`)),e[`contacts-technical-postal-info-organization`]!==void 0&&p(f,[`contacts`,`technical`,`postal_info`,`organization`],_(e[`contacts-technical-postal-info-organization`],`contacts-technical-postal-info-organization`,`text`)),e[`privacy-mode`]!==void 0&&p(f,[`privacy_mode`],_(e[`privacy-mode`],`privacy-mode`,`text`)),c(await u(`Creating`,async()=>a(o,`POST`,`/accounts/${d}/registrar/registrations/${encodeURIComponent(String(e[`domain-name`]))}/transfer-in`,{body:Object.keys(f).length>0?f:void 0,headers:Object.keys(t).length>0?t:void 0})),{successLabel:`Created`})})};function it(e){return e.usage("$0 registrar registrations update <domain-name>\n\nUpdates an existing domain registration. By default, the server holds the connection for a bounded, server-defined amount of time while the update completes. Most updates finish within this window and return `200 OK` with a completed workflow status. If the update 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`. This endpoint currently supports updating `auto_renew` only.").positional(`domain-name`,{type:`string`,description:`Domain name to update.`,demandOption:!0}).option(`prefer`,{type:`string`,description:"Set to `respond-async` to receive an immediate `202 Accepted` without\nwaiting for the operation to complete (RFC 7240)."}).option(`auto-renew`,{type:`boolean`,description:`Enable or disable automatic renewal.
39
+ Setting this field to \`true\` authorizes Cloudflare to charge the
40
+ account's default payment method up to 30 days before domain expiry
41
+ to renew the domain automatically. Renewal pricing may change over
42
+ time based on registry pricing.
43
+ `}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:"Request to update an existing domain registration. This endpoint currently supports updating `auto_renew` only. "})}const at={command:`update <domain-name>`,describe:`Update Registration`,builder:it,handler:async e=>f({command:`registrar registrations update`,classification:{safeFlags:[`auto-renew`,`dry-run`]}},e,async()=>{let t={};if(e.prefer!==void 0&&(t.Prefer=String(e.prefer)),e.dryRun){l({command:`cf registrar registrations update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await i()??`<account-id>`}/registrar/registrations/${e[`domain-name`]==null?`<domain-name>`:encodeURIComponent(String(e[`domain-name`]))}`,pathParams:{"domain-name":String(e[`domain-name`]??``)},bodyKind:`json`,body:e.body===void 0?g({auto_renew:e[`auto-renew`]}):m(e.body)});return}let o=await s(e),d=e.local?n:await r();if(e.accountId=d,e.body){let n=m(e.body);c(await u(`Updating`,async()=>a(o,`PATCH`,`/accounts/${d}/registrar/registrations/${encodeURIComponent(String(e[`domain-name`]))}`,{body:n,headers:Object.keys(t).length>0?t:void 0})),{successLabel:`Updated`});return}let f={};e[`auto-renew`]!==void 0&&p(f,[`auto_renew`],e[`auto-renew`]),c(await u(`Updating`,async()=>a(o,`PATCH`,`/accounts/${d}/registrar/registrations/${encodeURIComponent(String(e[`domain-name`]))}`,{body:Object.keys(f).length>0?f:void 0,headers:Object.keys(t).length>0?t:void 0})),{successLabel:`Updated`})})},ot={command:`registrations`,describe:`Operations for registrations`,builder:e=>e.command(Ve).command(ze).command(Ye).command(Ue).command(Ge).command(qe).command(Ze).command($e).command(tt).command(rt).command(at).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},st={command:`registrar`,describe:`registrar`,builder:e=>e.command(ue).command(ot).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{st as default};
@@ -0,0 +1,56 @@
1
+ #!/usr/bin/env node
2
+ import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-D4bkeMAw.mjs";import{a as r,r as i}from"./auth-Cp7gT-AF.mjs";import{t as a}from"./output-Bia1u2k5.mjs";import{t as o}from"./dry-run-CLX6Pbtq.mjs";import{t as s}from"./progress-Bi02B6v4.mjs";import{t as c}from"./run-BBBMrSrs.mjs";import"./telemetry-mKEb8lYB.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-Bx2PB-tt.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
+ Pass this value to fetch the next page of results. Omit (or
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
+ waiting for the operation to complete (RFC 7240).
6
+
7
+ The header may be combined with other preferences using standard
8
+ comma-separated syntax.`}).option(`auto-renew`,{type:`boolean`,description:`Enable or disable automatic renewal. Defaults to \`false\` if omitted.
9
+ Setting this field to \`true\` is an explicit opt-in authorizing
10
+ Cloudflare to charge the account's default payment method up to 30
11
+ days before domain expiry to renew the domain automatically.
12
+ Renewal pricing may change over time based on registry pricing.
13
+ `,default:!1}).option(`contacts-administrator-email`,{type:`string`,description:`Email address for the registrant. Used for domain-related
14
+ communications from the registry, including ownership verification
15
+ and renewal notices.
16
+ `}).option(`contacts-administrator-fax`,{type:`string`,description:`Fax number in E.164 format (e.g., \`+1.5555555555\`). Optional.
17
+ Most registrations do not require a fax number.
18
+ `}).option(`contacts-administrator-phone`,{type:`string`,description:"Phone number in E.164 format: `+{country_code}.{number}` without spaces or dashes. Examples: `+1.5555555555` (US), `+44.2071234567` (UK), `+81.312345678` (Japan)."}).option(`contacts-administrator-postal-info-name`,{type:`string`,description:"Full legal name of the contact, including all required name components for an individual or authorized representative. Some registries require a complete personal name that includes a family or last name where applicable. Provide the complete name in this single field, for example `Ada Lovelace`; do not send separate first-name or last-name fields."}).option(`contacts-administrator-postal-info-organization`,{type:`string`,description:`Organization or company name. Optional for individual registrants.`}).option(`contacts-billing-email`,{type:`string`,description:`Email address for the registrant. Used for domain-related
19
+ communications from the registry, including ownership verification
20
+ and renewal notices.
21
+ `}).option(`contacts-billing-fax`,{type:`string`,description:`Fax number in E.164 format (e.g., \`+1.5555555555\`). Optional.
22
+ Most registrations do not require a fax number.
23
+ `}).option(`contacts-billing-phone`,{type:`string`,description:"Phone number in E.164 format: `+{country_code}.{number}` without spaces or dashes. Examples: `+1.5555555555` (US), `+44.2071234567` (UK), `+81.312345678` (Japan)."}).option(`contacts-billing-postal-info-name`,{type:`string`,description:"Full legal name of the contact, including all required name components for an individual or authorized representative. Some registries require a complete personal name that includes a family or last name where applicable. Provide the complete name in this single field, for example `Ada Lovelace`; do not send separate first-name or last-name fields."}).option(`contacts-billing-postal-info-organization`,{type:`string`,description:`Organization or company name. Optional for individual registrants.`}).option(`contacts-registrant-email`,{type:`string`,description:`Email address for the registrant. Used for domain-related
24
+ communications from the registry, including ownership verification
25
+ and renewal notices.
26
+ `}).option(`contacts-registrant-fax`,{type:`string`,description:`Fax number in E.164 format (e.g., \`+1.5555555555\`). Optional.
27
+ Most registrations do not require a fax number.
28
+ `}).option(`contacts-registrant-phone`,{type:`string`,description:"Phone number in E.164 format: `+{country_code}.{number}` without spaces or dashes. Examples: `+1.5555555555` (US), `+44.2071234567` (UK), `+81.312345678` (Japan)."}).option(`contacts-registrant-postal-info-name`,{type:`string`,description:"Full legal name of the contact, including all required name components for an individual or authorized representative. Some registries require a complete personal name that includes a family or last name where applicable. Provide the complete name in this single field, for example `Ada Lovelace`; do not send separate first-name or last-name fields."}).option(`contacts-registrant-postal-info-organization`,{type:`string`,description:`Organization or company name. Optional for individual registrants.`}).option(`contacts-technical-email`,{type:`string`,description:`Email address for the registrant. Used for domain-related
29
+ communications from the registry, including ownership verification
30
+ and renewal notices.
31
+ `}).option(`contacts-technical-fax`,{type:`string`,description:`Fax number in E.164 format (e.g., \`+1.5555555555\`). Optional.
32
+ Most registrations do not require a fax number.
33
+ `}).option(`contacts-technical-phone`,{type:`string`,description:"Phone number in E.164 format: `+{country_code}.{number}` without spaces or dashes. Examples: `+1.5555555555` (US), `+44.2071234567` (UK), `+81.312345678` (Japan)."}).option(`contacts-technical-postal-info-name`,{type:`string`,description:"Full legal name of the contact, including all required name components for an individual or authorized representative. Some registries require a complete personal name that includes a family or last name where applicable. Provide the complete name in this single field, for example `Ada Lovelace`; do not send separate first-name or last-name fields."}).option(`contacts-technical-postal-info-organization`,{type:`string`,description:`Organization or company name. Optional for individual registrants.`}).option(`domain-name`,{type:`string`,description:`Provides a fully qualified domain name (FQDN), including the extension
34
+ (e.g., \`example.com\`, \`mybrand.app\`). The domain name uniquely identifies
35
+ a registration. Cloudflare permits only one registration per domain, making
36
+ the domain name a natural idempotency key for registration requests.
37
+ `}).option(`privacy-mode`,{type:`string`,description:"Sets the WHOIS privacy mode for the registration. Defaults to `redaction`.\n- `off`: Disables WHOIS privacy.\n- `redaction`: Requests WHOIS redaction where the extension supports it.\n Some extensions exclude privacy and redaction.\n",choices:[`off`,`redaction`],default:`redaction`}).option(`years`,{type:`number`,description:`Sets the registration term from 1 to 10 years. When omitted, this
38
+ field defaults to the registry's minimum registration period for the
39
+ extension. Most extensions require 1 year, while some require longer
40
+ minimum terms (e.g., \`.ai\` requires 2 years).
41
+
42
+ Each registry may also enforce its own maximum registration term. A
43
+ request above that maximum fails. When uncertain, omit this field to
44
+ use the default.
45
+ `}).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)`}).check(e=>{if([`contacts-administrator-email`,`contacts-administrator-fax`,`contacts-administrator-phone`,`contacts-administrator-postal-info-name`,`contacts-administrator-postal-info-organization`,`contacts-billing-email`,`contacts-billing-fax`,`contacts-billing-phone`,`contacts-billing-postal-info-name`,`contacts-billing-postal-info-organization`,`contacts-registrant-email`,`contacts-registrant-fax`,`contacts-registrant-phone`,`contacts-registrant-postal-info-name`,`contacts-registrant-postal-info-organization`,`contacts-technical-email`,`contacts-technical-fax`,`contacts-technical-phone`,`contacts-technical-postal-info-name`,`contacts-technical-postal-info-organization`].some(t=>e[t]!==void 0)){let t=[`contacts-administrator-email`,`contacts-administrator-phone`,`contacts-administrator-postal-info-name`,`contacts-billing-email`,`contacts-billing-phone`,`contacts-billing-postal-info-name`,`contacts-registrant-email`,`contacts-registrant-phone`,`contacts-registrant-postal-info-name`,`contacts-technical-email`,`contacts-technical-phone`,`contacts-technical-postal-info-name`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --contacts-* flag is set`)}return!0})}const C={command:`create`,describe:`Create Registration`,builder:S,handler:async m=>c({command:`registrar-sandbox registrations create`,classification:{safeFlags:[`auto-renew`,`privacy-mode`,`dry-run`]}},m,async()=>{let c={};if(m.prefer!==void 0&&(c.Prefer=String(m.prefer)),m.dryRun){o({command:`cf registrar-sandbox registrations create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/registrar-sandbox/registrations`,pathParams:{},bodyKind:`json`,body:m.body===void 0?d({auto_renew:m[`auto-renew`],contacts:{administrator:{email:f(m[`contacts-administrator-email`],`contacts-administrator-email`,`text`),fax:f(m[`contacts-administrator-fax`],`contacts-administrator-fax`,`text`),phone:f(m[`contacts-administrator-phone`],`contacts-administrator-phone`,`text`),postal_info:{name:f(m[`contacts-administrator-postal-info-name`],`contacts-administrator-postal-info-name`,`text`),organization:f(m[`contacts-administrator-postal-info-organization`],`contacts-administrator-postal-info-organization`,`text`)}},billing:{email:f(m[`contacts-billing-email`],`contacts-billing-email`,`text`),fax:f(m[`contacts-billing-fax`],`contacts-billing-fax`,`text`),phone:f(m[`contacts-billing-phone`],`contacts-billing-phone`,`text`),postal_info:{name:f(m[`contacts-billing-postal-info-name`],`contacts-billing-postal-info-name`,`text`),organization:f(m[`contacts-billing-postal-info-organization`],`contacts-billing-postal-info-organization`,`text`)}},registrant:{email:f(m[`contacts-registrant-email`],`contacts-registrant-email`,`text`),fax:f(m[`contacts-registrant-fax`],`contacts-registrant-fax`,`text`),phone:f(m[`contacts-registrant-phone`],`contacts-registrant-phone`,`text`),postal_info:{name:f(m[`contacts-registrant-postal-info-name`],`contacts-registrant-postal-info-name`,`text`),organization:f(m[`contacts-registrant-postal-info-organization`],`contacts-registrant-postal-info-organization`,`text`)}},technical:{email:f(m[`contacts-technical-email`],`contacts-technical-email`,`text`),fax:f(m[`contacts-technical-fax`],`contacts-technical-fax`,`text`),phone:f(m[`contacts-technical-phone`],`contacts-technical-phone`,`text`),postal_info:{name:f(m[`contacts-technical-postal-info-name`],`contacts-technical-postal-info-name`,`text`),organization:f(m[`contacts-technical-postal-info-organization`],`contacts-technical-postal-info-organization`,`text`)}}},domain_name:f(m[`domain-name`],`domain-name`,`text`),privacy_mode:f(m[`privacy-mode`],`privacy-mode`,`text`),years:m.years}):u(m.body)});return}let h=await i(m),g=m.local?e:await t();if(m.accountId=g,m.body){let e=u(m.body);a(await s(`Creating`,async()=>r(h,`POST`,`/accounts/${g}/registrar-sandbox/registrations`,{body:e,headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Created`});return}m[`domain-name`]===void 0&&(m[`domain-name`]=await p(`domain-name`,"Provides a fully qualified domain name (FQDN), including the extension (e.g., `example.com`, `mybrand.app`). The domain name uniquely identifies a registration. Cloudflare permits only one registration per domain, making the domain name a natural idempotency key for registration requests. "));let _={};m[`auto-renew`]!==void 0&&l(_,[`auto_renew`],m[`auto-renew`]),m[`contacts-administrator-email`]!==void 0&&l(_,[`contacts`,`administrator`,`email`],f(m[`contacts-administrator-email`],`contacts-administrator-email`,`text`)),m[`contacts-administrator-fax`]!==void 0&&l(_,[`contacts`,`administrator`,`fax`],f(m[`contacts-administrator-fax`],`contacts-administrator-fax`,`text`)),m[`contacts-administrator-phone`]!==void 0&&l(_,[`contacts`,`administrator`,`phone`],f(m[`contacts-administrator-phone`],`contacts-administrator-phone`,`text`)),m[`contacts-administrator-postal-info-name`]!==void 0&&l(_,[`contacts`,`administrator`,`postal_info`,`name`],f(m[`contacts-administrator-postal-info-name`],`contacts-administrator-postal-info-name`,`text`)),m[`contacts-administrator-postal-info-organization`]!==void 0&&l(_,[`contacts`,`administrator`,`postal_info`,`organization`],f(m[`contacts-administrator-postal-info-organization`],`contacts-administrator-postal-info-organization`,`text`)),m[`contacts-billing-email`]!==void 0&&l(_,[`contacts`,`billing`,`email`],f(m[`contacts-billing-email`],`contacts-billing-email`,`text`)),m[`contacts-billing-fax`]!==void 0&&l(_,[`contacts`,`billing`,`fax`],f(m[`contacts-billing-fax`],`contacts-billing-fax`,`text`)),m[`contacts-billing-phone`]!==void 0&&l(_,[`contacts`,`billing`,`phone`],f(m[`contacts-billing-phone`],`contacts-billing-phone`,`text`)),m[`contacts-billing-postal-info-name`]!==void 0&&l(_,[`contacts`,`billing`,`postal_info`,`name`],f(m[`contacts-billing-postal-info-name`],`contacts-billing-postal-info-name`,`text`)),m[`contacts-billing-postal-info-organization`]!==void 0&&l(_,[`contacts`,`billing`,`postal_info`,`organization`],f(m[`contacts-billing-postal-info-organization`],`contacts-billing-postal-info-organization`,`text`)),m[`contacts-registrant-email`]!==void 0&&l(_,[`contacts`,`registrant`,`email`],f(m[`contacts-registrant-email`],`contacts-registrant-email`,`text`)),m[`contacts-registrant-fax`]!==void 0&&l(_,[`contacts`,`registrant`,`fax`],f(m[`contacts-registrant-fax`],`contacts-registrant-fax`,`text`)),m[`contacts-registrant-phone`]!==void 0&&l(_,[`contacts`,`registrant`,`phone`],f(m[`contacts-registrant-phone`],`contacts-registrant-phone`,`text`)),m[`contacts-registrant-postal-info-name`]!==void 0&&l(_,[`contacts`,`registrant`,`postal_info`,`name`],f(m[`contacts-registrant-postal-info-name`],`contacts-registrant-postal-info-name`,`text`)),m[`contacts-registrant-postal-info-organization`]!==void 0&&l(_,[`contacts`,`registrant`,`postal_info`,`organization`],f(m[`contacts-registrant-postal-info-organization`],`contacts-registrant-postal-info-organization`,`text`)),m[`contacts-technical-email`]!==void 0&&l(_,[`contacts`,`technical`,`email`],f(m[`contacts-technical-email`],`contacts-technical-email`,`text`)),m[`contacts-technical-fax`]!==void 0&&l(_,[`contacts`,`technical`,`fax`],f(m[`contacts-technical-fax`],`contacts-technical-fax`,`text`)),m[`contacts-technical-phone`]!==void 0&&l(_,[`contacts`,`technical`,`phone`],f(m[`contacts-technical-phone`],`contacts-technical-phone`,`text`)),m[`contacts-technical-postal-info-name`]!==void 0&&l(_,[`contacts`,`technical`,`postal_info`,`name`],f(m[`contacts-technical-postal-info-name`],`contacts-technical-postal-info-name`,`text`)),m[`contacts-technical-postal-info-organization`]!==void 0&&l(_,[`contacts`,`technical`,`postal_info`,`organization`],f(m[`contacts-technical-postal-info-organization`],`contacts-technical-postal-info-organization`,`text`)),m[`domain-name`]!==void 0&&l(_,[`domain_name`],f(m[`domain-name`],`domain-name`,`text`)),m[`privacy-mode`]!==void 0&&l(_,[`privacy_mode`],f(m[`privacy-mode`],`privacy-mode`,`text`)),m.years!==void 0&&l(_,[`years`],m.years),a(await s(`Creating`,async()=>r(h,`POST`,`/accounts/${g}/registrar-sandbox/registrations`,{body:Object.keys(_).length>0?_:void 0,headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Created`})})};function w(e){return e.usage("$0 registrar-sandbox registrations get-registration-status <domain-name>\n\nReturns the current status of a domain registration workflow. Use this endpoint to poll for completion when the POST response returned `202 Accepted`. The URL is provided in the `links.self` field of the workflow status response. Poll this endpoint until the workflow reaches a terminal state or a state that requires user attention. **Terminal states:** `succeeded` and `failed` are terminal and always have `completed: true`. **Non-terminal states:** - `action_required` has `completed: false` and will not resolve on its own. The workflow is paused pending user intervention. - `blocked` has `completed: false` and indicates the workflow is waiting on a third party such as the extension registry or losing registrar. Continue polling while informing the user of the delay. Use increasing backoff between polls. When `state: blocked`, use a longer polling interval and do not poll indefinitely. A naive polling loop that only checks `completed` can run indefinitely when `state: action_required`. Break explicitly on `action_required`: ```js let status; do { await new Promise(r => setTimeout(r, 2000)); status = await cloudflare.request({ method: 'GET', path: reg.result.links.self, }); } while ( !status.result.completed && status.result.state !== 'action_required' ); if (status.result.state === 'action_required') { // Surface context.action and context.confirmation_sent_to to the user. // Do not re-submit the registration request. } ```").positional(`domain-name`,{type:`string`,description:"Provides a fully qualified domain name (FQDN), including the extension (e.g., `example.com`, `mybrand.app`). The domain name uniquely identifies a registration. Cloudflare permits only one registration per domain, making the domain name a natural idempotency key for registration requests.",demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const T={command:`get-registration-status <domain-name>`,describe:`Get Registration Status`,builder:w,handler:async r=>c({command:`registrar-sandbox registrations get-registration-status`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf registrar-sandbox registrations get-registration-status`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/registrar-sandbox/registrations/${r[`domain-name`]==null?`<domain-name>`:encodeURIComponent(String(r[`domain-name`]))}/registration-status`,pathParams:{"domain-name":String(r[`domain-name`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.registrarSandbox.registrations.getRegistrationStatus({account_id:l,domain_name:r[`domain-name`]})),{successLabel:`Loaded`})})};function E(e){return e.usage("$0 registrar-sandbox registrations get-update-status <domain-name>\n\nReturns the current status of a domain update workflow. Use this endpoint to poll for completion when the PATCH response returned `202 Accepted`. The URL is provided in the `links.self` field of the workflow status response. Poll this endpoint until the workflow reaches a terminal state or a state that requires user attention. Use increasing backoff between polls. When the workflow remains blocked on a third party, use a longer polling interval and do not poll indefinitely.").positional(`domain-name`,{type:`string`,description:"Provides a fully qualified domain name (FQDN), including the extension (e.g., `example.com`, `mybrand.app`). The domain name uniquely identifies a registration. Cloudflare permits only one registration per domain, making the domain name a natural idempotency key for registration requests.",demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const D={command:`get-update-status <domain-name>`,describe:`Get Update Status`,builder:E,handler:async r=>c({command:`registrar-sandbox registrations get-update-status`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf registrar-sandbox registrations get-update-status`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/registrar-sandbox/registrations/${r[`domain-name`]==null?`<domain-name>`:encodeURIComponent(String(r[`domain-name`]))}/update-status`,pathParams:{"domain-name":String(r[`domain-name`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.registrarSandbox.registrations.getUpdateStatus({account_id:l,domain_name:r[`domain-name`]})),{successLabel:`Loaded`})})};function O(e){return e.usage("$0 registrar-sandbox registrations get <domain-name>\n\nReturns the current state of a domain registration. This is the canonical read endpoint for a domain you own. It returns the full registration resource including current settings and expiration. When the registration resource is ready, both `created_at` and `expires_at` are present in the response.").positional(`domain-name`,{type:`string`,description:`Domain name to retrieve.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`get <domain-name>`,describe:`Get Registration`,builder:O,handler:async r=>c({command:`registrar-sandbox registrations get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf registrar-sandbox registrations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/registrar-sandbox/registrations/${r[`domain-name`]==null?`<domain-name>`:encodeURIComponent(String(r[`domain-name`]))}`,pathParams:{"domain-name":String(r[`domain-name`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.registrarSandbox.registrations.get({account_id:l,domain_name:r[`domain-name`]})),{successLabel:`Loaded`})})};function A(e){return e.usage("$0 registrar-sandbox registrations list\n\nReturns a paginated list of domain registrations owned by the account. This endpoint uses cursor-based pagination. Results are ordered by registration date 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.").option(`cursor`,{type:`string`,description:`Opaque token from a previous response's \`result_info.cursor\`.
46
+ Pass this value to fetch the next page of results. Omit (or
47
+ 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 registration date (`registry_created_at`) when omitted.",choices:[`registry_created_at`,`registry_expires_at`,`name`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const j={command:`list`,describe:`List Registrations`,builder:m(A),handler:async r=>c({command:`registrar-sandbox registrations list`,classification:{safeFlags:[`direction`,`sort-by`,`dry-run`]}},r,async()=>{let c={cursor:r.cursor,per_page:r[`per-page`],direction:r.direction,sort_by:r[`sort-by`]};if(r.dryRun){o({command:`cf registrar-sandbox registrations list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/registrar-sandbox/registrations`,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.registrations.list({account_id:u,...c})),{successLabel:`Loaded`})})};function M(e){return e.usage('$0 registrar-sandbox registrations search\n\nSearches for domain name suggestions based on a keyword, phrase, or partial domain name. Returns a list of potentially available domains with pricing information. **Important:** Results are non-authoritative and based on cached data. Always use the `/domain-check` endpoint to verify real-time availability before attempting registration. Suggestions are scoped to extensions supported for programmatic registration via this API (`POST /registrations`). Domains on unsupported extensions will not appear in results, even if they are available at the registry level. ### Use cases - Brand name discovery (e.g., "acme corp" → acmecorp.com, acmecorp.dev) - Keyword-based suggestions (e.g., "coffee shop" → coffeeshop.com, mycoffeeshop.net) - Alternative extension discovery (e.g., "example.com" → example.com, example.app, example.xyz) ### Workflow 1. Call this endpoint with a keyword or domain name. 2. Present suggestions to the user. 3. Call `/domain-check` with the user\'s chosen domains to confirm real-time availability and pricing. 4. Proceed to `POST /registrations` only for supported non-premium domains where the Check response returns `registrable: true`. **Note:** Searching with just a domain extension (e.g., "com" or ".app") is not supported. Provide a keyword or domain name.').option(`query`,{type:`string`,description:`The search term to find domain suggestions. Accepts keywords, phrases, or full domain names.
48
+ - Phrases: "coffee shop" returns coffeeshop.com, mycoffeeshop.net, etc.
49
+ - Domain names: "example.com" returns example.com and variations across extensions`,demandOption:!0}).option(`extensions`,{type:`string`,description:`Limits results to specific domain extensions from the supported set. If not specified,
50
+ returns results across all supported extensions. Extensions not in the supported
51
+ set are silently ignored.`}).option(`limit`,{type:`number`,description:`Maximum number of domain suggestions to return. Defaults to 20 if not specified.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const N={command:`search`,describe:`Search for available domains`,builder:M,handler:async r=>c({command:`registrar-sandbox registrations search`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={q:r.query,extensions:r.extensions,limit:r.limit};if(r.dryRun){o({command:`cf registrar-sandbox registrations search`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/registrar-sandbox/domain-search`,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.registrations.search({account_id:u,...c})),{successLabel:`Loaded`})})};function P(e){return e.usage("$0 registrar-sandbox registrations update <domain-name>\n\nUpdates an existing domain registration. By default, the server holds the connection for a bounded, server-defined amount of time while the update completes. Most updates finish within this window and return `200 OK` with a completed workflow status. If the update 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`. This endpoint currently supports updating `auto_renew` only.").positional(`domain-name`,{type:`string`,description:`Domain name to update.`,demandOption:!0}).option(`prefer`,{type:`string`,description:"Set to `respond-async` to receive an immediate `202 Accepted` without\nwaiting for the operation to complete (RFC 7240)."}).option(`auto-renew`,{type:`boolean`,description:`Enable or disable automatic renewal.
52
+ Setting this field to \`true\` authorizes Cloudflare to charge the
53
+ account's default payment method up to 30 days before domain expiry
54
+ to renew the domain automatically. Renewal pricing may change over
55
+ time based on registry pricing.
56
+ `}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:"Request to update an existing domain registration. This endpoint currently supports updating `auto_renew` only. "})}const F={command:`update <domain-name>`,describe:`Update Registration`,builder:P,handler:async f=>c({command:`registrar-sandbox registrations update`,classification:{safeFlags:[`auto-renew`,`dry-run`]}},f,async()=>{let c={};if(f.prefer!==void 0&&(c.Prefer=String(f.prefer)),f.dryRun){o({command:`cf registrar-sandbox registrations update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/registrar-sandbox/registrations/${f[`domain-name`]==null?`<domain-name>`:encodeURIComponent(String(f[`domain-name`]))}`,pathParams:{"domain-name":String(f[`domain-name`]??``)},bodyKind:`json`,body:f.body===void 0?d({auto_renew:f[`auto-renew`]}):u(f.body)});return}let p=await i(f),m=f.local?e:await t();if(f.accountId=m,f.body){let e=u(f.body);a(await s(`Updating`,async()=>r(p,`PATCH`,`/accounts/${m}/registrar-sandbox/registrations/${encodeURIComponent(String(f[`domain-name`]))}`,{body:e,headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Updated`});return}let h={};f[`auto-renew`]!==void 0&&l(h,[`auto_renew`],f[`auto-renew`]),a(await s(`Updating`,async()=>r(p,`PATCH`,`/accounts/${m}/registrar-sandbox/registrations/${encodeURIComponent(String(f[`domain-name`]))}`,{body:Object.keys(h).length>0?h:void 0,headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Updated`})})},I={command:`registrations`,describe:`Operations for registrations`,builder:e=>e.command(x).command(C).command(k).command(T).command(D).command(j).command(N).command(F).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},L={command:`registrar-sandbox`,describe:`registrar-sandbox`,builder:e=>e.command(y).command(I).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{L as default};
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{i as e}from"./cf-BV2HLCQm.mjs";import{resolve as t}from"node:path";const n=`CLOUDFLARE_REGISTRY_PATH`;function r(r=process.env){let i=r[n];return i===void 0||i===``?t(e(),`registry`):t(i)}function i(e=process.env){let t=r(e);return{[n]:t,WRANGLER_REGISTRY_PATH:t,MINIFLARE_REGISTRY_PATH:t}}export{r as n,i as t};
2
+ import{i as e}from"./cf-oadujOtC.mjs";import{resolve as t}from"node:path";const n=`CLOUDFLARE_REGISTRY_PATH`;function r(r=process.env){let i=r[n];return i===void 0||i===``?t(e(),`registry`):t(i)}function i(e=process.env){let t=r(e);return{[n]:t,WRANGLER_REGISTRY_PATH:t,MINIFLARE_REGISTRY_PATH:t}}export{r as n,i as t};
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env node
2
+ import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-D4bkeMAw.mjs";import{r}from"./auth-Cp7gT-AF.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-Bi02B6v4.mjs";import{t as s}from"./run-BBBMrSrs.mjs";import"./telemetry-mKEb8lYB.mjs";import{n as c}from"./body-parser-CUWbw_Tq.mjs";function l(e){return e.usage(`$0 reporting industry get
3
+
4
+ Gets the industry classification for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const u={command:`get`,describe:`Get an account industry`,builder:l,handler:async c=>s({command:`reporting industry get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf reporting industry get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/reporting/industry`,pathParams:{},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.reporting.industry.get({account_id:l})),{successLabel:`Loaded`})})};function d(e){return e.usage(`$0 reporting industry update
5
+
6
+ Updates the industry classification for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const f={command:`update`,describe:`Update an account industry`,builder:d,handler:async l=>s({command:`reporting industry update`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf reporting industry update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/reporting/industry`,pathParams:{},bodyKind:`json`,body:l.body===void 0?void 0:c(l.body)});return}let s=await r(l),u=l.local?e:await t();if(l.accountId=u,l.body){let e=c(l.body);i(await o(`Updating`,async()=>s.reporting.industry.update({...e,account_id:u})),{successLabel:`Updated`});return}if(l.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},p={command:`industry`,describe:`Operations for industry`,builder:e=>e.command(u).command(f).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function m(e){return e.usage(`$0 reporting policies get <policy-id>
7
+
8
+ Gets a reporting policy by identifier.`).positional(`policy-id`,{type:`string`,description:`Unique identifier for the policy (UUID format)`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const h={command:`get <policy-id>`,describe:`Get a reporting policy`,builder:m,handler:async c=>s({command:`reporting policies get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf reporting policies get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/reporting/policies/${c[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(c[`policy-id`]))}`,pathParams:{"policy-id":String(c[`policy-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.reporting.policies.get({account_id:l,policy_id:c[`policy-id`]})),{successLabel:`Loaded`})})};function g(e){return e.usage(`$0 reporting policies list
9
+
10
+ Lists all reporting policies for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _={command:`list`,describe:`List reporting policies`,builder:g,handler:async c=>s({command:`reporting policies list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf reporting policies list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/reporting/policies`,pathParams:{},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.reporting.policies.list({account_id:l})),{successLabel:`Loaded`})})},v={command:`policies`,describe:`Operations for policies`,builder:e=>e.command(h).command(_).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function y(e){return e.usage(`$0 reporting reports get <report-id>
11
+
12
+ Gets a generated report by identifier.`).positional(`report-id`,{type:`string`,description:`Unique report identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const b={command:`get <report-id>`,describe:`Get a generated report`,builder:y,handler:async c=>s({command:`reporting reports get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf reporting reports get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/reporting/reports/${c[`report-id`]==null?`<report-id>`:encodeURIComponent(String(c[`report-id`]))}`,pathParams:{"report-id":String(c[`report-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.reporting.reports.get({account_id:l,report_id:c[`report-id`]})),{successLabel:`Loaded`})})};function x(e){return e.usage(`$0 reporting reports list
13
+
14
+ Lists all generated reports for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const S={command:`list`,describe:`List generated reports`,builder:x,handler:async c=>s({command:`reporting reports list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf reporting reports list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/reporting/reports`,pathParams:{},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.reporting.reports.list({account_id:l})),{successLabel:`Loaded`})})},C={command:`reports`,describe:`Operations for reports`,builder:e=>e.command(b).command(S).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},w={command:`reporting`,describe:`reporting`,builder:e=>e.command(p).command(v).command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{w as default};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{t as e}from"./version-W6_TN_kN.mjs";import{i as t,t as n}from"./interactive-B6woOLo-.mjs";const r=new Set([``,`0`,`false`,`no`,`off`]);function i(e,t){let n=e[t];if(typeof n!=`string`)return;let i=n.trim();return r.has(i.toLowerCase())?void 0:i}function a(e,t,n){return e[t]===n}function o(e,t,n){return t&&e.push(n),t}function s(e,t,n={}){return{harness:e,...n,signals:t}}const c=[e=>a(e,`OPENCODE`,`1`)?s({id:`opencode`,name:`OpenCode`},[`OPENCODE`]):null,e=>{let t=i(e,`QWEN_CODE_SESSION_ID`);if(!t)return null;let n=[`QWEN_CODE_SESSION_ID`],r=i(e,`QWEN_CODE_MODEL`),a=i(e,`QWEN_CODE_AGENT_ID`),o=i(e,`QWEN_CODE_PROMPT_ID`);return r&&n.push(`QWEN_CODE_MODEL`),a&&n.push(`QWEN_CODE_AGENT_ID`),o&&n.push(`QWEN_CODE_PROMPT_ID`),s({id:`qwen-code`,name:`Qwen Code`},n,{model:r?{id:r}:void 0,sessionId:t,invocationId:a??o})},e=>{let t=[],n=o(t,a(e,`PI_CODING_AGENT`,`true`),`PI_CODING_AGENT`),r=o(t,a(e,`AI_AGENT`,`pi`),`AI_AGENT`);if(!n&&!r)return null;let c=i(e,`PI_SESSION_ID`),l=i(e,`PI_PROVIDER`),u=i(e,`PI_MODEL`);return c&&t.push(`PI_SESSION_ID`),l&&t.push(`PI_PROVIDER`),u&&t.push(`PI_MODEL`),s({id:`pi`,name:`Pi`},t,{model:u?{id:u,provider:l}:void 0,sessionId:c})},e=>{if(!a(e,`CURSOR_AGENT`,`1`))return null;let t=[`CURSOR_AGENT`],n=i(e,`CURSOR_CONVERSATION_ID`),r=i(e,`CURSOR_TRACE_ID`);return n&&t.push(`CURSOR_CONVERSATION_ID`),r&&t.push(`CURSOR_TRACE_ID`),s({id:`cursor-agent`,name:`Cursor Agent`},t,{sessionId:n,invocationId:r})},e=>{if(!a(e,`CLAUDECODE`,`1`))return null;let t=[`CLAUDECODE`],n=i(e,`CLAUDE_CODE_SESSION_ID`);return n&&t.push(`CLAUDE_CODE_SESSION_ID`),s({id:`claude-code`,name:`Claude Code`},t,{sessionId:n})},e=>{let t=i(e,`CODEX_THREAD_ID`);return t?s({id:`codex`,name:`OpenAI Codex`},[`CODEX_THREAD_ID`],{sessionId:t}):null},e=>{let t=i(e,`AMP_CURRENT_THREAD_ID`);return t?s({id:`amp`,name:`Amp`},[`AMP_CURRENT_THREAD_ID`],{sessionId:t}):null},e=>a(e,`GEMINI_CLI`,`1`)?s({id:`gemini-agent`,name:`Gemini CLI`},[`GEMINI_CLI`]):null,e=>a(e,`AUGMENT_AGENT`,`1`)?s({id:`auggie`,name:`Auggie`},[`AUGMENT_AGENT`]):null,e=>{let t=[],n=o(t,a(e,`CRUSH`,`1`),`CRUSH`),r=o(t,a(e,`AI_AGENT`,`crush`),`AI_AGENT`);return n||r?s({id:`crush`,name:`Crush`},t):null},e=>{let t=[],n=o(t,a(e,`AI_AGENT`,`github_copilot_vscode_agent`),`AI_AGENT`),r=o(t,a(e,`COPILOT_AGENT`,`1`),`COPILOT_AGENT`);return n||r?s({id:`vscode-copilot-agent`,name:`GitHub Copilot in VS Code`,surface:`vscode`},t):null},e=>{let t=i(e,`OZ_RUN_ID`);return t?s({id:`warp`,name:`Warp`},[`OZ_RUN_ID`],{sessionId:t}):null}];function l(e=process.env,t=c){let n=[];for(let r of t)try{let t=r(e);t&&n.push(t)}catch{}return{isAgentic:n.length>0,harness:n[0]?.harness??null,model:n.find(e=>e.model)?.model??null,sessionId:n.find(e=>e.sessionId)?.sessionId??null,invocationId:n.find(e=>e.invocationId)?.invocationId??null,matches:n}}function u(){return n?`ci`:t()?`interactive`:`non-interactive`}function d(){let t=l(),n=t.isAgentic&&t.harness!==null?{"X-CF-CLI-Agent":t.harness.id}:{};return{"User-Agent":e,"X-CF-CLI-Mode":u(),...n}}export{d as n,l as r,u as t};
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env node
2
+ import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-D4bkeMAw.mjs";import{r}from"./auth-Cp7gT-AF.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-Bi02B6v4.mjs";import{t as s}from"./run-BBBMrSrs.mjs";import"./telemetry-mKEb8lYB.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}from"./prompt-Bx2PB-tt.mjs";function f(e){return e.usage(`$0 request-tracers traces create
3
+
4
+ Traces a simulated HTTP request through Cloudflare's edge to analyze how rules, settings, and configurations would process the request. Useful for debugging firewall rules, page rules, and other request transformations without sending actual traffic. Supports custom headers, cookies, body content, and geolocation context.`).option(`body-base64`,{type:`string`,description:`Base64 encoded request body`}).option(`body-plain-text`,{type:`string`,description:`Request body as plain text`}).option(`context-bot-score`,{type:`number`,description:`Bot score used for evaluating tracing request processing`}).option(`context-geoloc-city`,{type:`string`,description:`The context.geoloc.city field`}).option(`context-geoloc-continent`,{type:`string`,description:`The context.geoloc.continent field`}).option(`context-geoloc-is-eu-country`,{type:`boolean`,description:`The context.geoloc.is_eu_country field`}).option(`context-geoloc-iso-code`,{type:`string`,description:`The context.geoloc.iso_code field`}).option(`context-geoloc-latitude`,{type:`number`,description:`The context.geoloc.latitude field`}).option(`context-geoloc-longitude`,{type:`number`,description:`The context.geoloc.longitude field`}).option(`context-geoloc-postal-code`,{type:`string`,description:`The context.geoloc.postal_code field`}).option(`context-geoloc-region-code`,{type:`string`,description:`The context.geoloc.region_code field`}).option(`context-geoloc-subdivision-2-iso-code`,{type:`string`,description:`The context.geoloc.subdivision_2_iso_code field`}).option(`context-geoloc-timezone`,{type:`string`,description:`The context.geoloc.timezone field`}).option(`context-skip-challenge`,{type:`boolean`,description:`Whether to skip any challenges for tracing request (e.g.: captcha)`}).option(`context-threat-score`,{type:`number`,description:`Threat score used for evaluating tracing request processing`}).option(`method`,{type:`string`,description:`HTTP Method of tracing request`}).option(`protocol`,{type:`string`,description:`HTTP Protocol of tracing request`}).option(`skip-response`,{type:`boolean`,description:`Skip sending the request to the Origin server after all rules evaluation`}).option(`url`,{type:`string`,description:`URL to which perform tracing request`}).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:`Request Trace`,builder:f,handler:async f=>s({command:`request-tracers traces create`,classification:{safeFlags:[`context-geoloc-is-eu-country`,`context-skip-challenge`,`skip-response`,`dry-run`]}},f,async()=>{if(f.dryRun){a({command:`cf request-tracers traces create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/request-tracer/trace`,pathParams:{},bodyKind:`json`,body:f.body===void 0?l({body:{base64:u(f[`body-base64`],`body-base64`,`text`),plain_text:u(f[`body-plain-text`],`body-plain-text`,`text`)},context:{bot_score:f[`context-bot-score`],geoloc:{city:u(f[`context-geoloc-city`],`context-geoloc-city`,`text`),continent:u(f[`context-geoloc-continent`],`context-geoloc-continent`,`text`),is_eu_country:f[`context-geoloc-is-eu-country`],iso_code:u(f[`context-geoloc-iso-code`],`context-geoloc-iso-code`,`text`),latitude:f[`context-geoloc-latitude`],longitude:f[`context-geoloc-longitude`],postal_code:u(f[`context-geoloc-postal-code`],`context-geoloc-postal-code`,`text`),region_code:u(f[`context-geoloc-region-code`],`context-geoloc-region-code`,`text`),subdivision_2_iso_code:u(f[`context-geoloc-subdivision-2-iso-code`],`context-geoloc-subdivision-2-iso-code`,`text`),timezone:u(f[`context-geoloc-timezone`],`context-geoloc-timezone`,`text`)},skip_challenge:f[`context-skip-challenge`],threat_score:f[`context-threat-score`]},method:u(f.method,`method`,`text`),protocol:u(f.protocol,`protocol`,`text`),skip_response:f[`skip-response`],url:u(f.url,`url`,`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.requestTracers.traces.create({...e,account_id:p})),{successLabel:`Created`});return}f.method===void 0&&(f.method=await d(`method`,`HTTP Method of tracing request`)),f.url===void 0&&(f.url=await d(`url`,`URL to which perform tracing request`));let m=l({body:{base64:u(f[`body-base64`],`body-base64`,`text`),plain_text:u(f[`body-plain-text`],`body-plain-text`,`text`)},context:{bot_score:f[`context-bot-score`],geoloc:{city:u(f[`context-geoloc-city`],`context-geoloc-city`,`text`),continent:u(f[`context-geoloc-continent`],`context-geoloc-continent`,`text`),is_eu_country:f[`context-geoloc-is-eu-country`],iso_code:u(f[`context-geoloc-iso-code`],`context-geoloc-iso-code`,`text`),latitude:f[`context-geoloc-latitude`],longitude:f[`context-geoloc-longitude`],postal_code:u(f[`context-geoloc-postal-code`],`context-geoloc-postal-code`,`text`),region_code:u(f[`context-geoloc-region-code`],`context-geoloc-region-code`,`text`),subdivision_2_iso_code:u(f[`context-geoloc-subdivision-2-iso-code`],`context-geoloc-subdivision-2-iso-code`,`text`),timezone:u(f[`context-geoloc-timezone`],`context-geoloc-timezone`,`text`)},skip_challenge:f[`context-skip-challenge`],threat_score:f[`context-threat-score`]},method:u(f.method,`method`,`text`),protocol:u(f.protocol,`protocol`,`text`),skip_response:f[`skip-response`],url:u(f.url,`url`,`text`)});i(await o(`Creating`,async()=>s.requestTracers.traces.create({...m,account_id:p})),{successLabel:`Created`})})},m={command:`traces`,describe:`Simulate request processing to debug rule matches, transforms, and routing decisions`,builder:e=>e.command(p).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},h={command:`request-tracers`,describe:`Trace how a request would be processed through Cloudflare's rules and configuration pipeline`,builder:e=>e.command(m).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{h as default};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{a as e}from"./resolve-CUDKxUrW.mjs";export{e as resolveZoneId};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ const e=new Map;async function t(t,n,r=6e4){let i=e.get(t),a=Date.now();if(i&&i.expires>a)return i.data;let o=await n();return e.set(t,{data:o,expires:a+r}),o}function n(e){return/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(e)}function r(e){return/^[0-9a-f]{32}$/i.test(e)}function i(e){return n(e)||r(e)}function a(e){if(!e||e.length>253||!e.includes(`.`))return!1;let t=e.split(`.`);for(let e of t)if(e.length===0||e.length>63||!/^[a-zA-Z0-9]/.test(e)||!/[a-zA-Z0-9]$/.test(e)||!/^[a-zA-Z0-9-]+$/.test(e))return!1;return!0}async function o(e,n,r){if(i(r))return r;if(!a(r))throw Error(`Invalid zone identifier: "${r}". Must be a zone ID or valid domain name.`);let o=(await t(`zones:${n}`,async()=>(await e.zones.list({"account.id":n})).result)).find(e=>e.name===r||e.name===r.toLowerCase());if(!o)throw Error(`Zone not found: ${r}`);return o.id}export{o as a,a as i,i as n,n as r,r as t};
@@ -0,0 +1,40 @@
1
+ #!/usr/bin/env node
2
+ import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-D4bkeMAw.mjs";import{r}from"./auth-Cp7gT-AF.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-Bi02B6v4.mjs";import{t as s}from"./run-BBBMrSrs.mjs";import"./telemetry-mKEb8lYB.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-Bx2PB-tt.mjs";import{t as h}from"./cli-types-tt_LZMbn.mjs";function g(e){return e.usage(`$0 resource-sharing create
3
+
4
+ Creates a new resource share for sharing Cloudflare resources with other accounts or organizations.`).option(`name`,{type:`string`,description:`The name of the share.`}).option(`recipients`,{type:`string`,description:`The recipients field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`resources`,{type:`string`,description:`The resources 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 _={command:`create`,describe:`Create a new share`,builder:g,handler:async p=>s({command:`resource-sharing create`,classification:{safeFlags:[`dry-run`]}},p,async()=>{if(p.dryRun){a({command:`cf resource-sharing create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/shares`,pathParams:{},bodyKind:`json`,body:p.body===void 0?u({name:d(p.name,`name`,`text`),recipients:l(p.recipients,`recipients`),resources:l(p.resources,`resources`)}):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.resourceSharing.create({...e,account_id:m})),{successLabel:`Created`});return}if(p.name===void 0&&(p.name=await f(`name`,`The name of the share.`)),p.recipients===void 0)throw Error(`--recipients is required (or pass --body with this field set).`);if(p.resources===void 0)throw Error(`--resources is required (or pass --body with this field set).`);let h=u({name:d(p.name,`name`,`text`),recipients:l(p.recipients,`recipients`),resources:l(p.resources,`resources`)});i(await o(`Creating`,async()=>s.resourceSharing.create({...h,account_id:m})),{successLabel:`Created`})})};function v(e){return e.usage(`$0 resource-sharing delete <share-id>
5
+
6
+ Deletion is not immediate, an updated share object with a new status will be returned.`).positional(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const y={command:`delete <share-id>`,describe:`Delete a share`,builder:v,handler:async c=>s({command:`resource-sharing delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf resource-sharing delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/shares/${c[`share-id`]==null?`<share-id>`:encodeURIComponent(String(c[`share-id`]))}`,pathParams:{"share-id":String(c[`share-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();if(c.accountId=l,!await m({force:!!c.force,message:`Are you sure? This action cannot be undone.`})){process.stderr.write(`Aborted.
7
+ `);return}i(await o(`Deleting`,async()=>s.resourceSharing.delete({account_id:l,share_id:c[`share-id`]})),{successLabel:`Deleted`})})};function b(e){return e.usage(`$0 resource-sharing excluded-recipients create <share-id>
8
+
9
+ Excludes a single account from an organization-targeted share. The share continues to target the entire organization, but the excluded account is skipped during reconciliation.`).positional(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`account-id-path`,{type:`string`,description:`Account identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const x={command:`create <share-id>`,describe:`Create a new share excluded recipient`,builder:b,handler:async e=>s({command:`resource-sharing excluded-recipients create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf resource-sharing excluded-recipients create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e[`account-id-path`]==null?`<account-id-path>`:encodeURIComponent(String(e[`account-id-path`]))}/shares/${e[`share-id`]==null?`<share-id>`:encodeURIComponent(String(e[`share-id`]))}/excluded-recipients`,pathParams:{"account-id-path":String(e[`account-id-path`]??``),"share-id":String(e[`share-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:c(e.body)});return}let t=await r(e);if(e.body){let n=c(e.body);i(await o(`Creating`,async()=>t.resourceSharing.excludedRecipients.create({body:n,account_id_path:e[`account-id-path`],share_id:e[`share-id`]})),{successLabel:`Created`});return}if(e.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 resource-sharing excluded-recipients delete <excluded-recipient-id>
10
+
11
+ Removes a single account from a share's excluded-recipient list. The account becomes eligible to receive the share again on the next reconciliation cycle.`).positional(`excluded-recipient-id`,{type:`string`,description:`Share Excluded Recipient identifier tag.`,demandOption:!0}).option(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const C={command:`delete <excluded-recipient-id>`,describe:`Delete a share excluded recipient`,builder:S,handler:async c=>s({command:`resource-sharing excluded-recipients delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf resource-sharing excluded-recipients delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/shares/${c[`share-id`]==null?`<share-id>`:encodeURIComponent(String(c[`share-id`]))}/excluded-recipients/${c[`excluded-recipient-id`]==null?`<excluded-recipient-id>`:encodeURIComponent(String(c[`excluded-recipient-id`]))}`,pathParams:{"share-id":String(c[`share-id`]??``),"excluded-recipient-id":String(c[`excluded-recipient-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();if(c.accountId=l,!await m({force:!!c.force})){process.stderr.write(`Aborted.
12
+ `);return}i(await o(`Deleting`,async()=>s.resourceSharing.excludedRecipients.delete({account_id:l,share_id:c[`share-id`],excluded_recipient_id:c[`excluded-recipient-id`]})),{successLabel:`Deleted`})})};function w(e){return e.usage(`$0 resource-sharing excluded-recipients get <excluded-recipient-id>
13
+
14
+ Gets a single excluded recipient of a share by its identifier tag.`).positional(`excluded-recipient-id`,{type:`string`,description:`Share Excluded Recipient identifier tag.`,demandOption:!0}).option(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const T={command:`get <excluded-recipient-id>`,describe:`Get share excluded recipient by ID`,builder:w,handler:async c=>s({command:`resource-sharing excluded-recipients get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf resource-sharing excluded-recipients get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/shares/${c[`share-id`]==null?`<share-id>`:encodeURIComponent(String(c[`share-id`]))}/excluded-recipients/${c[`excluded-recipient-id`]==null?`<excluded-recipient-id>`:encodeURIComponent(String(c[`excluded-recipient-id`]))}`,pathParams:{"share-id":String(c[`share-id`]??``),"excluded-recipient-id":String(c[`excluded-recipient-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.resourceSharing.excludedRecipients.get({account_id:l,share_id:c[`share-id`],excluded_recipient_id:c[`excluded-recipient-id`]})),{successLabel:`Loaded`})})};function E(e){return e.usage(`$0 resource-sharing excluded-recipients list
15
+
16
+ Lists the accounts excluded from an organization-targeted share. Only valid for shares with \`target_type=organization\`.`).option(`account-id-path`,{type:`string`,description:`Account identifier.`,demandOption:!0}).option(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`page`,{type:`number`,description:"Page number. Defaults to `1` when `per_page` is supplied without\n`page`. May be omitted entirely along with `per_page` to receive a\nnon-paginated response."}).option(`per-page`,{type:`number`,description:"Number of objects to return per page. Defaults to `20` when `page`\nis supplied without `per_page`. May be omitted entirely along with\n`page` to receive a non-paginated response."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const D={command:`list`,describe:`List share excluded recipients by share ID`,builder:E,handler:async e=>s({command:`resource-sharing excluded-recipients list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let t={page:e.page,per_page:e[`per-page`]};if(e.dryRun){a({command:`cf resource-sharing excluded-recipients list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e[`account-id-path`]==null?`<account-id-path>`:encodeURIComponent(String(e[`account-id-path`]))}/shares/${e[`share-id`]==null?`<share-id>`:encodeURIComponent(String(e[`share-id`]))}/excluded-recipients`,pathParams:{"account-id-path":String(e[`account-id-path`]??``),"share-id":String(e[`share-id`]??``)},query:t,bodyKind:`none`});return}let n=await r(e);i(await o(`Loading`,async()=>n.resourceSharing.excludedRecipients.list({account_id_path:e[`account-id-path`],share_id:e[`share-id`],...t})),{successLabel:`Loaded`})})};function O(e){return e.usage(`$0 resource-sharing excluded-recipients update <share-id>
17
+
18
+ Reconciles a share's excluded recipients to match the given list. Only valid for shares with \`target_type=organization\`.`).positional(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`account-id-path`,{type:`string`,description:`Account identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const k={command:`update <share-id>`,describe:`Update a share's excluded recipients`,builder:O,handler:async e=>s({command:`resource-sharing excluded-recipients update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf resource-sharing excluded-recipients update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e[`account-id-path`]==null?`<account-id-path>`:encodeURIComponent(String(e[`account-id-path`]))}/shares/${e[`share-id`]==null?`<share-id>`:encodeURIComponent(String(e[`share-id`]))}/excluded-recipients`,pathParams:{"account-id-path":String(e[`account-id-path`]??``),"share-id":String(e[`share-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:c(e.body)});return}let t=await r(e);if(e.body){let n=c(e.body);i(await o(`Updating`,async()=>t.resourceSharing.excludedRecipients.update({body:n,account_id_path:e[`account-id-path`],share_id:e[`share-id`]})),{successLabel:`Updated`});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},A={command:`excluded-recipients`,describe:`Operations for excluded-recipients`,builder:e=>e.command(x).command(C).command(T).command(D).command(k).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function j(e){return e.usage(`$0 resource-sharing get <share-id>
19
+
20
+ Fetches share by ID.`).positional(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`include-resources`,{type:`boolean`,description:`Include resources in the response.`}).option(`include-recipient-counts`,{type:`boolean`,description:`Include recipient counts in the response.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const M={command:`get <share-id>`,describe:`Get account share by ID`,builder:j,handler:async c=>s({command:`resource-sharing get`,classification:{safeFlags:[`include-resources`,`include-recipient-counts`,`dry-run`]}},c,async()=>{let s={include_resources:c[`include-resources`],include_recipient_counts:c[`include-recipient-counts`]};if(c.dryRun){a({command:`cf resource-sharing get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/shares/${c[`share-id`]==null?`<share-id>`:encodeURIComponent(String(c[`share-id`]))}`,pathParams:{"share-id":String(c[`share-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.resourceSharing.get({account_id:u,share_id:c[`share-id`],...s})),{successLabel:`Loaded`})})};function N(e){return e.usage(`$0 resource-sharing list
21
+
22
+ Lists all account shares.`).option(`status`,{type:`string`,description:`Filter shares by status.`,choices:[`active`,`deleting`,`deleted`]}).option(`kind`,{type:`string`,description:`Filter shares by kind.`,choices:[`sent`,`received`]}).option(`target-type`,{type:`string`,description:`Filter shares by target_type.`,choices:[`account`,`organization`]}).option(`resource-types`,{type:`string`,description:`Filter share resources by resource_types.`}).option(`order`,{type:`string`,description:`Order shares by values in the given field.`,choices:[`name`,`created`]}).option(`direction`,{type:`string`,description:`Direction to sort objects.`,choices:[`asc`,`desc`]}).option(`page`,{type:`number`,description:"Page number. Defaults to `1` when `per_page` is supplied without\n`page`. May be omitted entirely along with `per_page` to receive a\nnon-paginated response."}).option(`per-page`,{type:`number`,description:"Number of objects to return per page. Defaults to `20` when `page`\nis supplied without `per_page`. May be omitted entirely along with\n`page` to receive a non-paginated response."}).option(`include-resources`,{type:`boolean`,description:`Include resources in the response.`}).option(`include-recipient-counts`,{type:`boolean`,description:`Include recipient counts in the response.`}).option(`tag`,{type:`string`,description:"Filter shares by tag. Each value is either `key=value` (matches shares whose tags contain that key/value pair) or `key` alone (matches shares that have any value for that key). May be repeated; multiple `tag` parameters are ANDed together. Maximum 20 `tag` parameters per request."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const P={command:`list`,describe:`List account shares`,builder:h(N),handler:async c=>s({command:`resource-sharing list`,classification:{safeFlags:[`status`,`kind`,`target-type`,`order`,`direction`,`include-resources`,`include-recipient-counts`,`dry-run`]}},c,async()=>{let s={status:c.status,kind:c.kind,target_type:c[`target-type`],resource_types:c[`resource-types`],order:c.order,direction:c.direction,page:c.page,per_page:c[`per-page`],include_resources:c[`include-resources`],include_recipient_counts:c[`include-recipient-counts`],tag:c.tag};if(c.dryRun){a({command:`cf resource-sharing list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/shares`,pathParams:{},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.resourceSharing.list({account_id:u,...s})),{successLabel:`Loaded`})})};function F(e){return e.usage(`$0 resource-sharing recipients create <share-id>
23
+
24
+ Adds a single recipient to an account-targeted resource share, granting them access to the shared resources. The recipient account must belong to the same organization as the share owner. To replace the entire recipient list in one call, use \`PUT /accounts/{account_id}/shares/{share_id}/recipients\` instead.`).positional(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`account-id-path`,{type:`string`,description:`Account identifier.`,demandOption:!0}).option(`organization-id`,{type:`string`,description:`Organization identifier.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:"Optionally specify `recipient_account_id` to target a specific account, or `organization_id` to target the caller's whole organization. If neither is provided, the caller's organization is used. The legacy field `account_id` is accepted as a synonym for `recipient_account_id` during the deprecation period (see `x-sunset` on that field). "})}const I={command:`create <share-id>`,describe:`Create a new share recipient`,builder:F,handler:async e=>s({command:`resource-sharing recipients create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf resource-sharing recipients create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e[`account-id-path`]==null?`<account-id-path>`:encodeURIComponent(String(e[`account-id-path`]))}/shares/${e[`share-id`]==null?`<share-id>`:encodeURIComponent(String(e[`share-id`]))}/recipients`,pathParams:{"account-id-path":String(e[`account-id-path`]??``),"share-id":String(e[`share-id`]??``)},bodyKind:`json`,body:e.body===void 0?u({organization_id:d(e[`organization-id`],`organization-id`,`text`)}):c(e.body)});return}let t=await r(e);if(e.body){let n=c(e.body);i(await o(`Creating`,async()=>t.resourceSharing.recipients.create({body:n,account_id_path:e[`account-id-path`],share_id:e[`share-id`]})),{successLabel:`Created`});return}let n=u({organization_id:d(e[`organization-id`],`organization-id`,`text`)});i(await o(`Creating`,async()=>t.resourceSharing.recipients.create({body:n,account_id_path:e[`account-id-path`],share_id:e[`share-id`]})),{successLabel:`Created`})})};function ee(e){return e.usage("$0 resource-sharing recipients delete <recipient-id>\n\nPerforms a **soft delete**: sets the recipient's `desired_association_status` to `disassociated`, which signals the background reconciliation workflow (Temporal) to remove the shared resources from the recipient account. The recipient record remains in the database for audit purposes and is still returned by `GET /accounts/{account_id}/shares/{share_id}/recipients` with its updated status. Resource access is not fully removed until the workflow completes and `current_association_status` transitions to `disassociated`. The recipient record itself is never physically deleted.").positional(`recipient-id`,{type:`string`,description:`Share Recipient identifier tag.`,demandOption:!0}).option(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const L={command:`delete <recipient-id>`,describe:`Delete a share recipient`,builder:ee,handler:async c=>s({command:`resource-sharing recipients delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf resource-sharing recipients delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/shares/${c[`share-id`]==null?`<share-id>`:encodeURIComponent(String(c[`share-id`]))}/recipients/${c[`recipient-id`]==null?`<recipient-id>`:encodeURIComponent(String(c[`recipient-id`]))}`,pathParams:{"share-id":String(c[`share-id`]??``),"recipient-id":String(c[`recipient-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();if(c.accountId=l,!await m({force:!!c.force,message:`Are you sure? This action cannot be undone.`})){process.stderr.write(`Aborted.
25
+ `);return}i(await o(`Deleting`,async()=>s.resourceSharing.recipients.delete({account_id:l,share_id:c[`share-id`],recipient_id:c[`recipient-id`]})),{successLabel:`Deleted`})})};function R(e){return e.usage(`$0 resource-sharing recipients get <recipient-id>
26
+
27
+ Get share recipient by ID.`).positional(`recipient-id`,{type:`string`,description:`Share Recipient identifier tag.`,demandOption:!0}).option(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`include-resources`,{type:`boolean`,description:`Include resources in the response.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const z={command:`get <recipient-id>`,describe:`Get share recipient by ID`,builder:R,handler:async c=>s({command:`resource-sharing recipients get`,classification:{safeFlags:[`include-resources`,`dry-run`]}},c,async()=>{let s={include_resources:c[`include-resources`]};if(c.dryRun){a({command:`cf resource-sharing recipients get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/shares/${c[`share-id`]==null?`<share-id>`:encodeURIComponent(String(c[`share-id`]))}/recipients/${c[`recipient-id`]==null?`<recipient-id>`:encodeURIComponent(String(c[`recipient-id`]))}`,pathParams:{"share-id":String(c[`share-id`]??``),"recipient-id":String(c[`recipient-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.resourceSharing.recipients.get({account_id:u,share_id:c[`share-id`],recipient_id:c[`recipient-id`],...s})),{successLabel:`Loaded`})})};function B(e){return e.usage('$0 resource-sharing recipients list\n\nList share recipients by share ID. Returns **all** recipients regardless of their `association_status` (associating, associated, disassociating, disassociated). Callers that want only "active" recipients must filter client-side on the `association_status` field.').option(`account-id-path`,{type:`string`,description:`Account identifier.`,demandOption:!0}).option(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`include-resources`,{type:`boolean`,description:`Include resources in the response.`}).option(`page`,{type:`number`,description:"Page number. Defaults to `1` when `per_page` is supplied without\n`page`. May be omitted entirely along with `per_page` to receive a\nnon-paginated response."}).option(`per-page`,{type:`number`,description:"Number of objects to return per page. Defaults to `20` when `page`\nis supplied without `per_page`. May be omitted entirely along with\n`page` to receive a non-paginated response."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const V={command:`list`,describe:`List share recipients by share ID`,builder:B,handler:async e=>s({command:`resource-sharing recipients list`,classification:{safeFlags:[`include-resources`,`dry-run`]}},e,async()=>{let t={include_resources:e[`include-resources`],page:e.page,per_page:e[`per-page`]};if(e.dryRun){a({command:`cf resource-sharing recipients list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e[`account-id-path`]==null?`<account-id-path>`:encodeURIComponent(String(e[`account-id-path`]))}/shares/${e[`share-id`]==null?`<share-id>`:encodeURIComponent(String(e[`share-id`]))}/recipients`,pathParams:{"account-id-path":String(e[`account-id-path`]??``),"share-id":String(e[`share-id`]??``)},query:t,bodyKind:`none`});return}let n=await r(e);i(await o(`Loading`,async()=>n.resourceSharing.recipients.list({account_id_path:e[`account-id-path`],share_id:e[`share-id`],...t})),{successLabel:`Loaded`})})};function H(e){return e.usage(`$0 resource-sharing recipients update <share-id>
28
+
29
+ Replaces the full recipient list for an account-targeted share. The server computes the diff between the current and desired recipients: new accounts are added, accounts no longer in the list are marked for disassociation, and unchanged accounts are left as-is. Returns an error if the share targets an organization (\`target_type=organization\`); org-targeted shares derive their recipients dynamically from org membership and cannot be modified through this endpoint.`).positional(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`account-id-path`,{type:`string`,description:`Account identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const U={command:`update <share-id>`,describe:`Update a share's recipients`,builder:H,handler:async e=>s({command:`resource-sharing recipients update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf resource-sharing recipients update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e[`account-id-path`]==null?`<account-id-path>`:encodeURIComponent(String(e[`account-id-path`]))}/shares/${e[`share-id`]==null?`<share-id>`:encodeURIComponent(String(e[`share-id`]))}/recipients`,pathParams:{"account-id-path":String(e[`account-id-path`]??``),"share-id":String(e[`share-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:c(e.body)});return}let t=await r(e);if(e.body){let n=c(e.body);i(await o(`Updating`,async()=>t.resourceSharing.recipients.update({body:n,account_id_path:e[`account-id-path`],share_id:e[`share-id`]})),{successLabel:`Updated`});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},W={command:`recipients`,describe:`Update share recipients`,builder:e=>e.command(I).command(L).command(z).command(V).command(U).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function G(e){return e.usage(`$0 resource-sharing resources create <share-id>
30
+
31
+ Adds a resource to an existing share, making it available to share recipients.`).positional(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`resource-account-id`,{type:`string`,description:`Account identifier.`}).option(`resource-id`,{type:`string`,description:`Share Resource identifier.`}).option(`resource-type`,{type:`string`,description:`Resource Type.`,choices:[`custom-ruleset`,`gateway-policy`,`gateway-destination-ip`,`gateway-block-page-settings`,`gateway-extended-email-matching`,`idp-federation-grant`,`trust-grant`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const K={command:`create <share-id>`,describe:`Create a new share resource`,builder:G,handler:async l=>s({command:`resource-sharing resources create`,classification:{safeFlags:[`resource-type`,`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf resource-sharing resources create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/shares/${l[`share-id`]==null?`<share-id>`:encodeURIComponent(String(l[`share-id`]))}/resources`,pathParams:{"share-id":String(l[`share-id`]??``)},bodyKind:`json`,body:l.body===void 0?u({resource_account_id:d(l[`resource-account-id`],`resource-account-id`,`text`),resource_id:d(l[`resource-id`],`resource-id`,`text`),resource_type:d(l[`resource-type`],`resource-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.resourceSharing.resources.create({body:e,account_id:m,share_id:l[`share-id`]})),{successLabel:`Created`});return}l[`resource-account-id`]===void 0&&(l[`resource-account-id`]=await f(`resource-account-id`,`Account identifier.`)),l[`resource-id`]===void 0&&(l[`resource-id`]=await f(`resource-id`,`Share Resource identifier.`)),l[`resource-type`]===void 0&&(l[`resource-type`]=await p(`resource-type`,`Resource Type.`,[`custom-ruleset`,`gateway-policy`,`gateway-destination-ip`,`gateway-block-page-settings`,`gateway-extended-email-matching`,`idp-federation-grant`,`trust-grant`]));let h=u({resource_account_id:d(l[`resource-account-id`],`resource-account-id`,`text`),resource_id:d(l[`resource-id`],`resource-id`,`text`),resource_type:d(l[`resource-type`],`resource-type`,`text`)});i(await o(`Creating`,async()=>s.resourceSharing.resources.create({body:h,account_id:m,share_id:l[`share-id`]})),{successLabel:`Created`})})};function q(e){return e.usage(`$0 resource-sharing resources delete <share-resource-id>
32
+
33
+ Deletion is not immediate, an updated share resource object with a new status will be returned.`).positional(`share-resource-id`,{type:`string`,description:`Share Resource identifier.`,demandOption:!0}).option(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const J={command:`delete <share-resource-id>`,describe:`Delete a share resource`,builder:q,handler:async c=>s({command:`resource-sharing resources delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf resource-sharing resources delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/shares/${c[`share-id`]==null?`<share-id>`:encodeURIComponent(String(c[`share-id`]))}/resources/${c[`share-resource-id`]==null?`<share-resource-id>`:encodeURIComponent(String(c[`share-resource-id`]))}`,pathParams:{"share-id":String(c[`share-id`]??``),"share-resource-id":String(c[`share-resource-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();if(c.accountId=l,!await m({force:!!c.force,message:`Are you sure? This action cannot be undone.`})){process.stderr.write(`Aborted.
34
+ `);return}i(await o(`Deleting`,async()=>s.resourceSharing.resources.delete({account_id:l,share_id:c[`share-id`],share_resource_id:c[`share-resource-id`]})),{successLabel:`Deleted`})})};function Y(e){return e.usage(`$0 resource-sharing resources get <share-resource-id>
35
+
36
+ Get share resource by ID.`).positional(`share-resource-id`,{type:`string`,description:`Share Resource identifier.`,demandOption:!0}).option(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const X={command:`get <share-resource-id>`,describe:`Get share resource by ID`,builder:Y,handler:async c=>s({command:`resource-sharing resources get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf resource-sharing resources get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/shares/${c[`share-id`]==null?`<share-id>`:encodeURIComponent(String(c[`share-id`]))}/resources/${c[`share-resource-id`]==null?`<share-resource-id>`:encodeURIComponent(String(c[`share-resource-id`]))}`,pathParams:{"share-id":String(c[`share-id`]??``),"share-resource-id":String(c[`share-resource-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.resourceSharing.resources.get({account_id:l,share_id:c[`share-id`],share_resource_id:c[`share-resource-id`]})),{successLabel:`Loaded`})})};function Z(e){return e.usage(`$0 resource-sharing resources list
37
+
38
+ List share resources by share ID.`).option(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`status`,{type:`string`,description:`Filter share resources by status.`,choices:[`active`,`deleting`,`deleted`]}).option(`resource-type`,{type:`string`,description:`Filter share resources by resource_type.`,choices:[`custom-ruleset`,`gateway-policy`,`gateway-destination-ip`,`gateway-block-page-settings`,`gateway-extended-email-matching`,`idp-federation-grant`,`trust-grant`]}).option(`page`,{type:`number`,description:"Page number. Defaults to `1` when `per_page` is supplied without\n`page`. May be omitted entirely along with `per_page` to receive a\nnon-paginated response."}).option(`per-page`,{type:`number`,description:"Number of objects to return per page. Defaults to `20` when `page`\nis supplied without `per_page`. May be omitted entirely along with\n`page` to receive a non-paginated response."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Q={command:`list`,describe:`List share resources by share ID`,builder:h(Z),handler:async c=>s({command:`resource-sharing resources list`,classification:{safeFlags:[`status`,`resource-type`,`dry-run`]}},c,async()=>{let s={status:c.status,resource_type:c[`resource-type`],page:c.page,per_page:c[`per-page`]};if(c.dryRun){a({command:`cf resource-sharing resources list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/shares/${c[`share-id`]==null?`<share-id>`:encodeURIComponent(String(c[`share-id`]))}/resources`,pathParams:{"share-id":String(c[`share-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.resourceSharing.resources.list({account_id:u,share_id:c[`share-id`],...s})),{successLabel:`Loaded`})})};function $(e){return e.usage(`$0 resource-sharing resources update <share-resource-id>
39
+
40
+ Update is not immediate, an updated share resource object with a new status will be returned.`).positional(`share-resource-id`,{type:`string`,description:`Share Resource identifier.`,demandOption:!0}).option(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const te={command:`update <share-resource-id>`,describe:`Update a share resource`,builder:$,handler:async l=>s({command:`resource-sharing resources update`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf resource-sharing resources update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/shares/${l[`share-id`]==null?`<share-id>`:encodeURIComponent(String(l[`share-id`]))}/resources/${l[`share-resource-id`]==null?`<share-resource-id>`:encodeURIComponent(String(l[`share-resource-id`]))}`,pathParams:{"share-id":String(l[`share-id`]??``),"share-resource-id":String(l[`share-resource-id`]??``)},bodyKind:`json`,body:l.body===void 0?void 0:c(l.body)});return}let s=await r(l),u=l.local?e:await t();if(l.accountId=u,l.body){let e=c(l.body);i(await o(`Updating`,async()=>s.resourceSharing.resources.update({...e,account_id:u,share_id:l[`share-id`],share_resource_id:l[`share-resource-id`]})),{successLabel:`Updated`});return}if(l.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},ne={command:`resources`,describe:`Individual resources (zones, configs) that have been shared with recipients`,builder:e=>e.command(K).command(J).command(X).command(Q).command(te).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function re(e){return e.usage("$0 resource-sharing update <share-id>\n\nUpdates the share's display name and tags. This endpoint does **not** modify recipients or resources — those are managed via dedicated subresource endpoints: - **Recipients**: Use `POST /accounts/{account_id}/shares/{share_id}/recipients` to add a single recipient, `PUT /accounts/{account_id}/shares/{share_id}/recipients` to replace the full recipient list, or `DELETE /accounts/{account_id}/shares/{share_id}/recipients/{recipient_id}` to remove a recipient. - **Resources**: Use the share's resource subresource endpoints. Updating is not immediate; an updated share object with a new status will be returned.").positional(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`name`,{type:`string`,description:`The name of the share.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:"Request body for `PUT /accounts/{account_id}/shares/{share_id}`. The share's display `name` and `tags` can be updated via this endpoint. To modify recipients, use the `/accounts/{account_id}/shares/{share_id}/recipients` subresource endpoints (POST, PUT, DELETE). "})}const ie={command:`update <share-id>`,describe:`Update a share`,builder:re,handler:async l=>s({command:`resource-sharing update`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf resource-sharing update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/shares/${l[`share-id`]==null?`<share-id>`:encodeURIComponent(String(l[`share-id`]))}`,pathParams:{"share-id":String(l[`share-id`]??``)},bodyKind:`json`,body:l.body===void 0?u({name:d(l.name,`name`,`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(`Updating`,async()=>s.resourceSharing.update({...e,account_id:p,share_id:l[`share-id`]})),{successLabel:`Updated`});return}l.name===void 0&&(l.name=await f(`name`,`The name of the share.`));let m=u({name:d(l.name,`name`,`text`)});i(await o(`Updating`,async()=>s.resourceSharing.update({...m,account_id:p,share_id:l[`share-id`]})),{successLabel:`Updated`})})},ae={command:`resource-sharing`,describe:`Share Cloudflare resources (zones, accounts) across organizations with granular access controls`,builder:e=>e.command(_).command(y).command(M).command(P).command(ie).command(A).command(W).command(ne).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{ae as default};
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env node
2
+ import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-D4bkeMAw.mjs";import{r}from"./auth-Cp7gT-AF.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-Bi02B6v4.mjs";import{t as s}from"./run-BBBMrSrs.mjs";import"./telemetry-mKEb8lYB.mjs";function c(e){return e.usage(`$0 resource-tagging summary get
3
+
4
+ Lists all distinct tag keys and their distinct values across resources in an account.`).option(`cursor`,{type:`string`,description:`Cursor for pagination.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const l={command:`get`,describe:`List tag key summary`,builder:c,handler:async c=>s({command:`resource-tagging summary get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={cursor:c.cursor};if(c.dryRun){a({command:`cf resource-tagging summary get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/tags/summary`,pathParams:{},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.resourceTagging.summary.get({account_id:u,...s})),{successLabel:`Loaded`})})},u={command:`summary`,describe:`Operations for summary`,builder:e=>e.command(l).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},d={command:`resource-tagging`,describe:`resource-tagging`,builder:e=>e.command(u).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{d as default};
@@ -0,0 +1,18 @@
1
+ #!/usr/bin/env node
2
+ import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-D4bkeMAw.mjs";import{r}from"./auth-Cp7gT-AF.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-Bi02B6v4.mjs";import{t as s}from"./run-BBBMrSrs.mjs";import"./telemetry-mKEb8lYB.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,n as p}from"./prompt-Bx2PB-tt.mjs";function m(e){return e.usage("$0 rules lists bulk-operations get <operation-id>\n\nGets the current status of an asynchronous operation on a list. The `status` property can have one of the following values: `pending`, `running`, `completed`, or `failed`. If the status is `failed`, the `error` property will contain a message describing the error.").positional(`operation-id`,{type:`string`,description:`The unique operation ID of the asynchronous action.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const h={command:`get <operation-id>`,describe:`Get bulk operation status`,builder:m,handler:async c=>s({command:`rules lists bulk-operations get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf rules lists bulk-operations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/rules/lists/bulk_operations/${c[`operation-id`]==null?`<operation-id>`:encodeURIComponent(String(c[`operation-id`]))}`,pathParams:{"operation-id":String(c[`operation-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.rules.lists.bulkOperations.get({account_id:l,operation_id:c[`operation-id`]})),{successLabel:`Loaded`})})},g={command:`bulk-operations`,describe:`Operations for lists.bulk-operations`,builder:e=>e.command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function _(e){return e.usage(`$0 rules lists create
3
+
4
+ Creates a new list of the specified kind.`).option(`description`,{type:`string`,description:`An informative summary of the list.`}).option(`name`,{type:`string`,description:`An informative name for the list. Use this name in filter and rule expressions.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const v={command:`create`,describe:`Create a list`,builder:_,handler:async l=>s({command:`rules lists create`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf rules lists create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/rules/lists`,pathParams:{},bodyKind:`json`,body:l.body===void 0?u({description:d(l.description,`description`,`text`),name:d(l.name,`name`,`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.rules.lists.create({...e,account_id:p})),{successLabel:`Created`});return}l.name===void 0&&(l.name=await f(`name`,`An informative name for the list. Use this name in filter and rule expressions.`));let m=u({description:d(l.description,`description`,`text`),name:d(l.name,`name`,`text`)});i(await o(`Creating`,async()=>s.rules.lists.create({...m,account_id:p})),{successLabel:`Created`})})};function y(e){return e.usage(`$0 rules lists delete <list-id>
5
+
6
+ Deletes a specific list and all its items.`).positional(`list-id`,{type:`string`,description:`The unique ID of the list.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const b={command:`delete <list-id>`,describe:`Delete a list`,builder:y,handler:async c=>s({command:`rules lists delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf rules lists delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/rules/lists/${c[`list-id`]==null?`<list-id>`:encodeURIComponent(String(c[`list-id`]))}`,pathParams:{"list-id":String(c[`list-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();if(c.accountId=l,!await p({force:!!c.force,message:`This operation deletes the custom list and every item it contains.`})){process.stderr.write(`Aborted.
7
+ `);return}i(await o(`Deleting`,async()=>s.rules.lists.delete({account_id:l,list_id:c[`list-id`]})),{successLabel:`Deleted`})})};function x(e){return e.usage(`$0 rules lists get <list-id>
8
+
9
+ Fetches the details of a list.`).positional(`list-id`,{type:`string`,description:`The unique ID of the list.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const S={command:`get <list-id>`,describe:`Get a list`,builder:x,handler:async c=>s({command:`rules lists get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf rules lists get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/rules/lists/${c[`list-id`]==null?`<list-id>`:encodeURIComponent(String(c[`list-id`]))}`,pathParams:{"list-id":String(c[`list-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.rules.lists.get({account_id:l,list_id:c[`list-id`]})),{successLabel:`Loaded`})})};function C(e){return e.usage("$0 rules lists items create <list-id>\n\nAppends new items to the list. This operation is asynchronous. To get current the operation status, invoke the `Get bulk operation status` endpoint with the returned `operation_id`. There is a limit of 1 pending bulk operation per account. If an outstanding bulk operation is in progress, the request will be rejected.").positional(`list-id`,{type:`string`,description:`The unique ID of the list.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const w={command:`create <list-id>`,describe:`Create list items`,builder:C,handler:async l=>s({command:`rules lists items create`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf rules lists items create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/rules/lists/${l[`list-id`]==null?`<list-id>`:encodeURIComponent(String(l[`list-id`]))}/items`,pathParams:{"list-id":String(l[`list-id`]??``)},bodyKind:`json`,body:l.body===void 0?void 0:c(l.body)});return}let s=await r(l),u=l.local?e:await t();if(l.accountId=u,l.body){let e=c(l.body);i(await o(`Creating`,async()=>s.rules.lists.items.create({body:e,account_id:u,list_id:l[`list-id`]})),{successLabel:`Created`});return}if(l.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function T(e){return e.usage("$0 rules lists items delete <list-id>\n\nRemoves one or more items from a list. This operation is asynchronous. To get current the operation status, invoke the `Get bulk operation status` endpoint with the returned `operation_id`. There is a limit of 1 pending bulk operation per account. If an outstanding bulk operation is in progress, the request will be rejected.").positional(`list-id`,{type:`string`,description:`The unique ID of the list.`,demandOption:!0}).option(`items`,{type:`string`,description:`The items 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(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const E={command:`delete <list-id>`,describe:`Delete list items`,builder:T,handler:async d=>s({command:`rules lists items delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},d,async()=>{if(d.dryRun){a({command:`cf rules lists items delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/rules/lists/${d[`list-id`]==null?`<list-id>`:encodeURIComponent(String(d[`list-id`]))}/items`,pathParams:{"list-id":String(d[`list-id`]??``)},bodyKind:`json`,body:d.body===void 0?u({items:l(d.items,`items`)}):c(d.body)});return}let s=await r(d),f=d.local?e:await t();if(d.accountId=f,!await p({force:!!d.force,message:`This operation deletes the selected items from the custom list.`})){process.stderr.write(`Aborted.
10
+ `);return}if(d.body){let e=c(d.body);i(await o(`Deleting`,async()=>s.rules.lists.items.delete({...e,account_id:f,list_id:d[`list-id`]})),{successLabel:`Deleted`});return}let m=u({items:l(d.items,`items`)});i(await o(`Deleting`,async()=>s.rules.lists.items.delete({...m,account_id:f,list_id:d[`list-id`]})),{successLabel:`Deleted`})})};function D(e){return e.usage(`$0 rules lists items get <item-id>
11
+
12
+ Fetches a list item in the list.`).positional(`item-id`,{type:`string`,description:`Defines the unique ID of the item in the List.`,demandOption:!0}).option(`list-id`,{type:`string`,description:`The unique ID of the list.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const O={command:`get <item-id>`,describe:`Get a list item`,builder:D,handler:async c=>s({command:`rules lists items get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf rules lists items get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/rules/lists/${c[`list-id`]==null?`<list-id>`:encodeURIComponent(String(c[`list-id`]))}/items/${c[`item-id`]==null?`<item-id>`:encodeURIComponent(String(c[`item-id`]))}`,pathParams:{"item-id":String(c[`item-id`]??``),"list-id":String(c[`list-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.rules.lists.items.get({account_id:l,list_id:c[`list-id`],item_id:c[`item-id`]})),{successLabel:`Loaded`})})};function k(e){return e.usage(`$0 rules lists items list
13
+
14
+ Fetches all the items in the list.`).option(`list-id`,{type:`string`,description:`The unique ID of the list.`,demandOption:!0}).option(`cursor`,{type:`string`,description:"The pagination cursor. An opaque string token that indicates where to continue when requesting the next/previous set of records. The response provides cursor values under `result_info.cursors`. You should make no assumptions about a cursor's content or length."}).option(`per-page`,{type:`number`,description:`Amount of results to include in each paginated response. A non-negative 32 bit integer.`}).option(`search`,{type:`string`,description:`A search query to filter returned items. Its meaning depends on the list type: IP addresses must start with the provided string, hostnames and bulk redirects must contain the string, and ASNs must match the string exactly.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const A={command:`list`,describe:`Get list items`,builder:k,handler:async c=>s({command:`rules lists items list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={cursor:c.cursor,per_page:c[`per-page`],search:c.search};if(c.dryRun){a({command:`cf rules lists items list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/rules/lists/${c[`list-id`]==null?`<list-id>`:encodeURIComponent(String(c[`list-id`]))}/items`,pathParams:{"list-id":String(c[`list-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.rules.lists.items.list({account_id:u,list_id:c[`list-id`],...s})),{successLabel:`Loaded`})})};function j(e){return e.usage("$0 rules lists items update <list-id>\n\nRemoves all existing items from the list and adds the provided items to the list. This operation is asynchronous. To get current the operation status, invoke the `Get bulk operation status` endpoint with the returned `operation_id`. There is a limit of 1 pending bulk operation per account. If an outstanding bulk operation is in progress, the request will be rejected.").positional(`list-id`,{type:`string`,description:`The unique ID of the list.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const M={command:`update <list-id>`,describe:`Update all list items`,builder:j,handler:async l=>s({command:`rules lists items update`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf rules lists items update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/rules/lists/${l[`list-id`]==null?`<list-id>`:encodeURIComponent(String(l[`list-id`]))}/items`,pathParams:{"list-id":String(l[`list-id`]??``)},bodyKind:`json`,body:l.body===void 0?void 0:c(l.body)});return}let s=await r(l),u=l.local?e:await t();if(l.accountId=u,l.body){let e=c(l.body);i(await o(`Updating`,async()=>s.rules.lists.items.update({body:e,account_id:u,list_id:l[`list-id`]})),{successLabel:`Updated`});return}if(l.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},N={command:`items`,describe:`Operations for lists.items`,builder:e=>e.command(w).command(E).command(O).command(A).command(M).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function P(e){return e.usage(`$0 rules lists list
15
+
16
+ Fetches all lists in the account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const F={command:`list`,describe:`Get lists`,builder:P,handler:async c=>s({command:`rules lists list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf rules lists list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/rules/lists`,pathParams:{},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.rules.lists.list({account_id:l})),{successLabel:`Loaded`})})};function I(e){return e.usage(`$0 rules lists update <list-id>
17
+
18
+ Updates the description of a list.`).positional(`list-id`,{type:`string`,description:`The unique ID of the list.`,demandOption:!0}).option(`description`,{type:`string`,description:`An informative summary of the list.`}).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 L={command:`update <list-id>`,describe:`Update a list`,builder:I,handler:async l=>s({command:`rules lists update`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf rules lists update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/rules/lists/${l[`list-id`]==null?`<list-id>`:encodeURIComponent(String(l[`list-id`]))}`,pathParams:{"list-id":String(l[`list-id`]??``)},bodyKind:`json`,body:l.body===void 0?u({description:d(l.description,`description`,`text`)}):c(l.body)});return}let s=await r(l),f=l.local?e:await t();if(l.accountId=f,l.body){let e=c(l.body);i(await o(`Updating`,async()=>s.rules.lists.update({...e,account_id:f,list_id:l[`list-id`]})),{successLabel:`Updated`});return}let p=u({description:d(l.description,`description`,`text`)});i(await o(`Updating`,async()=>s.rules.lists.update({...p,account_id:f,list_id:l[`list-id`]})),{successLabel:`Updated`})})},R={command:`lists`,describe:`Named lists of IPs, hostnames, ASNs, or redirects that can be referenced in rule expressions`,builder:e=>e.command(v).command(b).command(S).command(F).command(L).command(g).command(N).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},z={command:`rules`,describe:`Account-level IP lists, hostname lists, and other reusable lists referenced by Rulesets rules`,builder:e=>e.command(R).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{z as default};