cf 0.13.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 (455) hide show
  1. package/dist/_meta/commands.json +6724 -3970
  2. package/dist/_meta/hand-written-commands.json +150 -32
  3. package/dist/_meta/schemas.json +2083 -2159
  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-XswDq0ZB.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-CF0giIIc.mjs +3 -0
  52. package/dist/command-D45NW-R3.mjs +2 -0
  53. package/dist/command-DIvPLK8x.mjs +2 -0
  54. package/dist/{completions-nPO9PdSu.mjs → completions-xPLd1cvL.mjs} +3 -3
  55. package/dist/{config-B8lwPpVl.mjs → config-B4vIa0zp.mjs} +1 -1
  56. package/dist/config.d.mts +1 -1729
  57. package/dist/config.mjs +1 -1
  58. package/dist/connector-interrupts-BSztJ-Ko.mjs +6 -0
  59. package/dist/connector-telemetry-events-_M8CCK6_.mjs +6 -0
  60. package/dist/connector-telemetry-snapshots-DySvmR9a.mjs +6 -0
  61. package/dist/connectors-BSmhzNB7.mjs +15 -0
  62. package/dist/containers-B5vDcFzo.mjs +78 -0
  63. package/dist/{shared-YJtB5KZB.mjs → containers-CFzvhmyz.mjs} +85 -84
  64. package/dist/content-scan-CeLZAcbT.mjs +14 -0
  65. package/dist/cps-BlI_Od72.mjs +6 -0
  66. package/dist/csamScanner-Cn7d0HWS.mjs +10 -0
  67. package/dist/ct-alerting-lhgFPu-y.mjs +5 -0
  68. package/dist/custom-certificates-Ba4Do5qt.mjs +17 -0
  69. package/dist/custom-csrs-MNUIx8yX.mjs +11 -0
  70. package/dist/custom-hostnames-Dj1SBd0J.mjs +27 -0
  71. package/dist/custom-nameservers-C7nzhNzV.mjs +9 -0
  72. package/dist/custom-pages-BgfhGksj.mjs +21 -0
  73. package/dist/d1-P2kWbdID.mjs +45 -0
  74. package/dist/data-security-pBIozmRL.mjs +71 -0
  75. package/dist/dcv-delegation-Bpy9WnKZ.mjs +4 -0
  76. package/dist/delegate-GctF_lrq.mjs +2 -0
  77. package/dist/delegate.mjs +1 -1
  78. package/dist/{deploy-QTGENpOM.mjs → deploy-CVYdt3NK.mjs} +1 -1
  79. package/dist/{deploy-input-C7W1Bsji.mjs → deploy-input-DpOgndz4.mjs} +1 -1
  80. package/dist/dev-PPUBjWcm.mjs +4 -0
  81. package/dist/diagnostics-C62habGQ.mjs +15 -0
  82. package/dist/dialog-C_ccBiZp.mjs +2 -0
  83. package/dist/dist-B4pQ4CXK.mjs +48 -0
  84. package/dist/{dist-DW5BPGFs.mjs → dist-BpadEMNY.mjs} +1 -1
  85. package/dist/dist-dc4E1u01.mjs +272 -0
  86. package/dist/dls-CpkcyQ8C.mjs +17 -0
  87. package/dist/dns-DG1X4Wap.mjs +135 -0
  88. package/dist/dns-firewall-B1gGHEDo.mjs +71 -0
  89. package/dist/{dot-prop-6SRZBKHT-wIVDg_fl.mjs → dot-prop-6SRZBKHT-Dj7YOlwR.mjs} +1 -1
  90. package/dist/dry-run-CLX6Pbtq.mjs +2 -0
  91. package/dist/durable-objects-D214VhxH.mjs +8 -0
  92. package/dist/email-auth-Ba4ONan2.mjs +6 -0
  93. package/dist/email-routing-BlqKnqNM.mjs +45 -0
  94. package/dist/email-security-Dl1E1Dko.mjs +160 -0
  95. package/dist/email-sending-DIRSSRIz.mjs +47 -0
  96. package/dist/error-sanitization-BkgUhGVc.mjs +2 -0
  97. package/dist/error-sanitization-DOlqWkNu.mjs +2 -0
  98. package/dist/fieldExtractors-zqYKMCEn.mjs +9 -0
  99. package/dist/firewall-DdsDh8GD.mjs +56 -0
  100. package/dist/flagship-CkUIVW7c.mjs +28 -0
  101. package/dist/fraud-BUpZgvQT.mjs +22 -0
  102. package/dist/google-tag-gateway-Bi1uLnEU.mjs +6 -0
  103. package/dist/healthchecks-DjQWb3EM.mjs +22 -0
  104. package/dist/hostnames-ClBLPbct.mjs +11 -0
  105. package/dist/hyperdrive-U54xZsWU.mjs +37 -0
  106. package/dist/iam-T-wWmOep.mjs +52 -0
  107. package/dist/images-ia5UG1GW.mjs +71 -0
  108. package/dist/index.mjs +1 -1
  109. package/dist/intel-BhswZLMI.mjs +76 -0
  110. package/dist/interactive-B6woOLo-.mjs +32 -0
  111. package/dist/interactive-DnUvQHjc.mjs +2 -0
  112. package/dist/ips-Dad_EvhM.mjs +4 -0
  113. package/dist/keyless-certificates-BhHaxLjM.mjs +13 -0
  114. package/dist/keys-DjIPvqj4.mjs +4 -0
  115. package/dist/kv-DzXVnK94.mjs +21 -0
  116. package/dist/leaked-credential-checks-B9G_ZTNH.mjs +18 -0
  117. package/dist/lifecycle-Ichnb2x1.mjs +2 -0
  118. package/dist/load-balancers-3wGHPsYz.mjs +76 -0
  119. package/dist/local-B6b2OIBW.mjs +2 -0
  120. package/dist/local-BrfySqnx.mjs +2 -0
  121. package/dist/{local-runtime-BUGCbx8r.mjs → local-runtime-DD8DAIlm.mjs} +1 -1
  122. package/dist/login-CEQbOgBM.mjs +5 -0
  123. package/dist/login-DEWvGuaU.mjs +2 -0
  124. package/dist/logo-matches-YGRPstPi.mjs +6 -0
  125. package/dist/logos-BirufUgo.mjs +7 -0
  126. package/dist/logpush-BlNbUHyV.mjs +46 -0
  127. package/dist/logs-DmFlVF9q.mjs +48 -0
  128. package/dist/magic-cloud-networking-B3Wj2dhJ.mjs +71 -0
  129. package/dist/magic-network-monitoring-ry63w2Rw.mjs +36 -0
  130. package/dist/magic-transit-CBVOK2aa.mjs +387 -0
  131. package/dist/managed-defense-BdW6s483.mjs +18 -0
  132. package/dist/managed-transforms-BIeiofIS.mjs +9 -0
  133. package/dist/matches-CAnwci0P.mjs +6 -0
  134. package/dist/mcp-BfhOMGFE.mjs +32 -0
  135. package/dist/mesh-CxUL2Wf-.mjs +26 -0
  136. package/dist/mtls-certificates-CzmTw4zs.mjs +13 -0
  137. package/dist/network-C68psMbz.mjs +50 -0
  138. package/dist/network-interconnects-CLsMrTuk.mjs +73 -0
  139. package/dist/oauth-D4bkeMAw.mjs +14 -0
  140. package/dist/oauth-DouM-qz0.mjs +2 -0
  141. package/dist/oauth-clients-DbUmVE_5.mjs +16 -0
  142. package/dist/oauth-scopes-CQ18rwBg.mjs +4 -0
  143. package/dist/observability-DpYxkFeZ.mjs +80 -0
  144. package/dist/{open-PBXRGS4R-DARSUDEI.mjs → open-PBXRGS4R-C4CKEADM.mjs} +3 -3
  145. package/dist/open-PBXRGS4R-C_-G_4DC.mjs +4 -0
  146. package/dist/organization-Dg55Xfz7.mjs +75 -0
  147. package/dist/organizations-QnyzGjB2.mjs +4 -0
  148. package/dist/origin-ca-certificates-Co5lqIGL.mjs +11 -0
  149. package/dist/origin-post-quantum-encryption-Cz8JZamC.mjs +6 -0
  150. package/dist/origin-tls-client-auth-Dd0T1Kfv.mjs +30 -0
  151. package/dist/{output-COcSQsfn.mjs → output-Bia1u2k5.mjs} +1 -1
  152. package/dist/page-rules--D3eXrCf.mjs +39 -0
  153. package/dist/pages-Ce8DDgNr.mjs +60 -0
  154. package/dist/pay-per-crawl-CpkEbasz.mjs +65 -0
  155. package/dist/pay-per-use-fyM1DWgY.mjs +6 -0
  156. package/dist/pipelines-CAqCgBLh.mjs +44 -0
  157. package/dist/precursor-DBnn4Q35.mjs +4 -0
  158. package/dist/previews-y_nSqWK5.mjs +4 -0
  159. package/dist/progress-Bi02B6v4.mjs +2 -0
  160. package/dist/project-settings-DSXevRvj.mjs +3 -0
  161. package/dist/prompt-Bx2PB-tt.mjs +3 -0
  162. package/dist/queries-dg-CVXjf.mjs +9 -0
  163. package/dist/queues-C_ilLbRI.mjs +63 -0
  164. package/dist/r2-data-catalog-DGv6aROr.mjs +44 -0
  165. package/dist/r2-hZAkra-l.mjs +127 -0
  166. package/dist/radar-BO9b0aZy.mjs +300 -0
  167. package/dist/{raw-fetch-BVYQR6C5.mjs → raw-fetch-DNTQkXbg.mjs} +1 -1
  168. package/dist/realtime-eSavuSeE.mjs +172 -0
  169. package/dist/registrar-Ct30kOXZ.mjs +43 -0
  170. package/dist/registrar-sandbox-Dmn9zGUk.mjs +56 -0
  171. package/dist/{registry-CWUfXloz.mjs → registry-vreNkX6u.mjs} +1 -1
  172. package/dist/reporting-B-F5aWUJ.mjs +14 -0
  173. package/dist/request-headers-Dnbzv6RZ.mjs +2 -0
  174. package/dist/request-tracers-CaubpUFV.mjs +4 -0
  175. package/dist/resolve-BXemCSyA.mjs +2 -0
  176. package/dist/resolve-CUDKxUrW.mjs +2 -0
  177. package/dist/resource-sharing-6Snv-b69.mjs +40 -0
  178. package/dist/resource-tagging-W_LFiX2J.mjs +4 -0
  179. package/dist/rules-C26eyeA5.mjs +18 -0
  180. package/dist/rulesets-BKzIwVtJ.mjs +37 -0
  181. package/dist/rum-Xdw5hyWY.mjs +30 -0
  182. package/dist/run-BBBMrSrs.mjs +2 -0
  183. package/dist/run-BRucX7Rz.mjs +2 -0
  184. package/dist/{schema-C8hU6G9R.mjs → schema-DqtYndhB.mjs} +1 -1
  185. package/dist/{schema-flags-DC4c6dka.mjs → schema-flags-CebDI0f1.mjs} +4 -4
  186. package/dist/scim-odJTXiIe.mjs +18 -0
  187. package/dist/{sdk-C12y5qCN.mjs → sdk-CvIO3tWS.mjs} +1 -1
  188. package/dist/secrets-store-RYpWWzaw.mjs +24 -0
  189. package/dist/security-center-B3D95vCa.mjs +30 -0
  190. package/dist/security-txt-BSytVv-9.mjs +9 -0
  191. package/dist/shared-D67owd9x.mjs +2 -0
  192. package/dist/smart-shield-C83Sfnf4.mjs +24 -0
  193. package/dist/snippets-B6oE9WIa.mjs +20 -0
  194. package/dist/source-BR4_k2ad.mjs +6 -0
  195. package/dist/spawn-CKqJ9J4_.mjs +523 -0
  196. package/dist/spectrum-CfxY--X_.mjs +83 -0
  197. package/dist/speed-DzK-kiWt.mjs +24 -0
  198. package/dist/src-B3h6tKMt.mjs +108 -0
  199. package/dist/ssl-dnjzPcSB.mjs +45 -0
  200. package/dist/startup-profile-CYEokTVe.mjs +2 -0
  201. package/dist/startup-profile-CgWHy4rE.mjs +17 -0
  202. package/dist/state-BxCejn42.mjs +2 -0
  203. package/dist/state-DSzkxXML.mjs +2 -0
  204. package/dist/stream-oFyhS4Wi.mjs +102 -0
  205. package/dist/submit-4f-ravmC.mjs +4 -0
  206. package/dist/tags-DrIP6Uiq.mjs +4 -0
  207. package/dist/{telemetry-DjGNSlkU.mjs → telemetry-Dk1GcQ0u.mjs} +1 -1
  208. package/dist/telemetry-Ds4epd3D.mjs +2 -0
  209. package/dist/telemetry-mKEb8lYB.mjs +2 -0
  210. package/dist/tenant-C-gc3NWv.mjs +12 -0
  211. package/dist/tenant-custom-nameservers-DduTQIwh.mjs +9 -0
  212. package/dist/{tools-D9RZkZRc.mjs → tools-BMKpYraQ.mjs} +1 -1
  213. package/dist/tunnels-D0QYsskp.mjs +29 -0
  214. package/dist/turnstile-C6Q3spRB.mjs +33 -0
  215. package/dist/ui-DH95w1Qk.mjs +5 -0
  216. package/dist/undici-DTSBJHNS.mjs +96 -0
  217. package/dist/update-check-BBS1K1jt.mjs +2 -0
  218. package/dist/update-check-CTLoakFV.mjs +2 -0
  219. package/dist/update-check-worker.mjs +2 -0
  220. package/dist/url-info-Cs0V89qq.mjs +4 -0
  221. package/dist/url-normalization-DaEQYy5h.mjs +9 -0
  222. package/dist/url-scanner-C4YVeQ4v.mjs +16 -0
  223. package/dist/user-BV1VY3Kl.mjs +112 -0
  224. package/dist/values-qDS63E43.mjs +4 -0
  225. package/dist/vectorize-NFzD3mP5.mjs +32 -0
  226. package/dist/version-W6_TN_kN.mjs +2 -0
  227. package/dist/waiting-rooms-Y9YGj3ih.mjs +53 -0
  228. package/dist/web-assets-Gd6z8dbt.mjs +64 -0
  229. package/dist/web3-DCJx4NRp.mjs +28 -0
  230. package/dist/workers-B-j-1ygi.mjs +36 -0
  231. package/dist/workers-builds-DPrNKjZW.mjs +14 -0
  232. package/dist/workers-for-platforms-BjKAhMLA.mjs +25 -0
  233. package/dist/workers-vpc-C5YoCnQK.mjs +13 -0
  234. package/dist/workflows-C2KKIJjl.mjs +43 -0
  235. package/dist/zaraz-CVLCs1IX.mjs +22 -0
  236. package/dist/zero-trust-BtJi4OXF.mjs +795 -0
  237. package/dist/zone-hKgt0WzO.mjs +4 -0
  238. package/dist/zones-CCNyaD3J.mjs +124 -0
  239. package/package.json +15 -12
  240. package/dist/_meta/agent-context.json +0 -193
  241. package/dist/abuse-reports-BbaHw4ST.mjs +0 -8
  242. package/dist/access-D6Xz892p.mjs +0 -11
  243. package/dist/account-DvxcqeaK.mjs +0 -2
  244. package/dist/account-tags-CeqfEWpz.mjs +0 -9
  245. package/dist/accounts-Bx-8BMH9.mjs +0 -30
  246. package/dist/acm--0opdSGE.mjs +0 -3
  247. package/dist/addressing-BS1ynzLA.mjs +0 -13
  248. package/dist/agent-context-BPhyrSns.mjs +0 -8
  249. package/dist/agent-memory-DczzpEw5.mjs +0 -6
  250. package/dist/ai-CDdCTcQl.mjs +0 -5
  251. package/dist/ai-audit-Bx9KMQYh.mjs +0 -2
  252. package/dist/ai-gateway-BSXJEaYS.mjs +0 -13
  253. package/dist/ai-search-DRQj1aMu.mjs +0 -7
  254. package/dist/ai-security-C_Rb0lGT.mjs +0 -4
  255. package/dist/alerting-BAR9eFs2.mjs +0 -6
  256. package/dist/analytics-BaUZwNc5.mjs +0 -4
  257. package/dist/analytics_engine-DkEzlhfT.mjs +0 -2
  258. package/dist/api-security-jA0lOk6a.mjs +0 -50
  259. package/dist/argo-Cz4pDagx.mjs +0 -2
  260. package/dist/artifacts-BcLTGfAv.mjs +0 -5
  261. package/dist/audit-logs-DbIv4n6u.mjs +0 -2
  262. package/dist/auth-rW5d3jtr.mjs +0 -5
  263. package/dist/auth-tvDdC1J-.mjs +0 -8
  264. package/dist/billing-Md87QjqW.mjs +0 -3
  265. package/dist/bot-management-VHMo4hpU.mjs +0 -5
  266. package/dist/botnet-feed-BHqfo3sa.mjs +0 -3
  267. package/dist/brand-protection-HUeR6Pof.mjs +0 -3
  268. package/dist/browser-extension-199oZg3X.mjs +0 -3
  269. package/dist/browser-run-DDasyux-.mjs +0 -4
  270. package/dist/build-0QlYUfFS.mjs +0 -2
  271. package/dist/builds-B-lXn6JR.mjs +0 -9
  272. package/dist/cache-CevKpiTM.mjs +0 -9
  273. package/dist/certificate-authorities-DAg-aO1B.mjs +0 -2
  274. package/dist/cf-C11NGkjx.mjs +0 -18
  275. package/dist/chunk-LQW53VED-CoECHA3R.mjs +0 -119
  276. package/dist/chunk-QBZBEHZB-BuiXJn8j.mjs +0 -2
  277. package/dist/chunk-vbHwaUoU.mjs +0 -2
  278. package/dist/client-certificates-Bay7oPLE.mjs +0 -3
  279. package/dist/client-side-security-CbU9xn0k.mjs +0 -37
  280. package/dist/cloud-connector-AH2ClcSL.mjs +0 -2
  281. package/dist/cloudforce-one-DwOfS75V.mjs +0 -32
  282. package/dist/command-CMzMsll4.mjs +0 -2
  283. package/dist/connector-interrupts-DcLrqM2V.mjs +0 -2
  284. package/dist/connector-telemetry-events-PrJWgNs9.mjs +0 -2
  285. package/dist/connector-telemetry-snapshots-CIjJm5yu.mjs +0 -2
  286. package/dist/connectors-CEAy30E-.mjs +0 -3
  287. package/dist/containers-BsbDqbSn.mjs +0 -58
  288. package/dist/content-scan-BdK936iO.mjs +0 -4
  289. package/dist/cps-oP97-qkm.mjs +0 -2
  290. package/dist/csamScanner-DUNN4INg.mjs +0 -6
  291. package/dist/ct-alerting-dV_gsV2w.mjs +0 -3
  292. package/dist/custom-certificates-DYspvjo4.mjs +0 -5
  293. package/dist/custom-csrs-DjSWLQRu.mjs +0 -3
  294. package/dist/custom-hostnames-df1lH6IY.mjs +0 -5
  295. package/dist/custom-nameservers-CLTbN-9R.mjs +0 -3
  296. package/dist/custom-pages-DzKnSgL3.mjs +0 -3
  297. package/dist/d1-JBEqjJoj.mjs +0 -20
  298. package/dist/data-security-CIktWnXt.mjs +0 -7
  299. package/dist/dcv-delegation-_r6Vc6VL.mjs +0 -2
  300. package/dist/dev-CAubuxCc.mjs +0 -4
  301. package/dist/diagnostics-B0DRh714.mjs +0 -3
  302. package/dist/dist-12KzRsBM.mjs +0 -387
  303. package/dist/dist-BCVqQpg2.mjs +0 -2
  304. package/dist/dist-Cp3uJN1x.mjs +0 -48
  305. package/dist/dist-S9K_8gq9.mjs +0 -9
  306. package/dist/dls-CFzTHcZM.mjs +0 -3
  307. package/dist/dns-Dw6u-NV1.mjs +0 -29
  308. package/dist/dns-firewall-CIPptslp.mjs +0 -57
  309. package/dist/dry-run-DiVy1lVo.mjs +0 -2
  310. package/dist/durable-objects-CCkeqqBq.mjs +0 -2
  311. package/dist/email-auth-kdxO51Oz.mjs +0 -2
  312. package/dist/email-routing-BLggZdQq.mjs +0 -6
  313. package/dist/email-security-DjADlgdM.mjs +0 -18
  314. package/dist/email-sending-Cz7E7GoP.mjs +0 -7
  315. package/dist/error-sanitization-DfLijlBJ.mjs +0 -2
  316. package/dist/fieldExtractors-BWaMi6lD.mjs +0 -3
  317. package/dist/firewall-5t6OBIOl.mjs +0 -8
  318. package/dist/flagship-CzG_VoNR.mjs +0 -4
  319. package/dist/fraud-UOg_69Ob.mjs +0 -20
  320. package/dist/google-tag-gateway-DirkD-Q2.mjs +0 -2
  321. package/dist/healthchecks-BkHZGTp1.mjs +0 -4
  322. package/dist/hostnames-EUYOZm21.mjs +0 -3
  323. package/dist/hyperdrive-ZoLJlJCL.mjs +0 -21
  324. package/dist/iam-BQ2xSgYN.mjs +0 -6
  325. package/dist/images-CkEq6ScP.mjs +0 -8
  326. package/dist/intel-DDWEdGyl.mjs +0 -8
  327. package/dist/interactive-B2E03Fs-.mjs +0 -11
  328. package/dist/interactive-_B-EqD0Y.mjs +0 -23
  329. package/dist/ips-54Qmy-Uw.mjs +0 -2
  330. package/dist/keyless-certificates-CXHLc3Qz.mjs +0 -3
  331. package/dist/keys-rvI4TC3Z.mjs +0 -2
  332. package/dist/kv-CAeN1zBy.mjs +0 -5
  333. package/dist/leaked-credential-checks-CbbwtG-p.mjs +0 -4
  334. package/dist/load-balancers-BFwdwAIU.mjs +0 -6
  335. package/dist/local-C6XsFD_W.mjs +0 -2
  336. package/dist/logexplorer-D8rOPB5I.mjs +0 -17
  337. package/dist/logo-matches-Y3PxVn7t.mjs +0 -2
  338. package/dist/logos-BN8SvJhS.mjs +0 -3
  339. package/dist/logpush-BnLA4WVm.mjs +0 -4
  340. package/dist/logs-CDo7Y5sA.mjs +0 -3
  341. package/dist/magic-cloud-networking-wPuLwu-F.mjs +0 -5
  342. package/dist/magic-network-monitoring-BNERUpxS.mjs +0 -4
  343. package/dist/magic-transit-6tvVOECW.mjs +0 -111
  344. package/dist/managed-defense-AYwBOYIH.mjs +0 -2
  345. package/dist/managed-transforms-HZZNrkC7.mjs +0 -3
  346. package/dist/matches-Dp91L3dL.mjs +0 -2
  347. package/dist/mcp-P7pcieiT.mjs +0 -4
  348. package/dist/mesh-DjFrk6PL.mjs +0 -4
  349. package/dist/mtls-certificates-DZMoef2H.mjs +0 -3
  350. package/dist/network-7cd1U6-I.mjs +0 -6
  351. package/dist/network-interconnects-CQ7cPZjK.mjs +0 -41
  352. package/dist/oauth-DH3kMXSs.mjs +0 -14
  353. package/dist/oauth-clients-P9t-eMnx.mjs +0 -4
  354. package/dist/oauth-scopes-C3r9Qh_y.mjs +0 -2
  355. package/dist/observability-M1DnLhMR.mjs +0 -10
  356. package/dist/organization-cUE7GDCt.mjs +0 -45
  357. package/dist/organizations-C-Hcpd0w.mjs +0 -2
  358. package/dist/origin-ca-certificates-C8cJMyQH.mjs +0 -3
  359. package/dist/origin-post-quantum-encryption-DjZJCk8M.mjs +0 -2
  360. package/dist/origin-tls-client-auth-BsjR5EAV.mjs +0 -4
  361. package/dist/page-rules-B-zq1EUb.mjs +0 -27
  362. package/dist/pages-B6YpkPos.mjs +0 -14
  363. package/dist/pay-per-crawl-B4wx0lUb.mjs +0 -4
  364. package/dist/pipelines-BJc_RylD.mjs +0 -6
  365. package/dist/precursor-CLQu7suY.mjs +0 -4
  366. package/dist/progress-V6SZV3Ux.mjs +0 -2
  367. package/dist/prompt-DjRTpML4.mjs +0 -3
  368. package/dist/public-BMg6-Hxh-BfUOZTDP.mjs +0 -2
  369. package/dist/queries-DSrrket-.mjs +0 -3
  370. package/dist/queues-Tf7kPBpn.mjs +0 -7
  371. package/dist/r2-DmKNnxtC.mjs +0 -25
  372. package/dist/r2-data-catalog-DBxoifOq.mjs +0 -16
  373. package/dist/radar-Csk7Ab-b.mjs +0 -2
  374. package/dist/realtime-CDehZVhV.mjs +0 -20
  375. package/dist/registrar-sandbox-BxVdfnam.mjs +0 -56
  376. package/dist/registrar-vflzeNQ9.mjs +0 -43
  377. package/dist/reporting-BaPZ1PHN.mjs +0 -2
  378. package/dist/request-headers-CC4eHmI2.mjs +0 -3
  379. package/dist/request-tracers-C_UVBexV.mjs +0 -2
  380. package/dist/resolve-B8CyM1mi.mjs +0 -2
  381. package/dist/resource-sharing-CoB4S9j1.mjs +0 -6
  382. package/dist/resource-tagging-CUiUC5g4.mjs +0 -2
  383. package/dist/rules-4O8076_s.mjs +0 -4
  384. package/dist/rulesets-C84MxTYo.mjs +0 -5
  385. package/dist/rum-Bvwkrntx.mjs +0 -4
  386. package/dist/run-CRfinkSe.mjs +0 -2
  387. package/dist/schemas-O_ZNaF8R.mjs +0 -65
  388. package/dist/scim-BvxQmde6.mjs +0 -4
  389. package/dist/secrets-store-DOKWiC-j.mjs +0 -7
  390. package/dist/security-center-Bhy_aC-w.mjs +0 -2
  391. package/dist/security-txt-L7HJ9tq5.mjs +0 -3
  392. package/dist/smart-shield-COMXuQ1S.mjs +0 -4
  393. package/dist/snippets-DffQhlKt.mjs +0 -4
  394. package/dist/spawn-C1AISA2V.mjs +0 -526
  395. package/dist/spectrum-Cmf7SqQE.mjs +0 -63
  396. package/dist/speed-m8cdhLFS.mjs +0 -4
  397. package/dist/src-C8phrg-8.mjs +0 -109
  398. package/dist/ssl-D4ffsdSw.mjs +0 -15
  399. package/dist/startup-profile-Dx95Y5cl.mjs +0 -17
  400. package/dist/state-CHif8Y5I.mjs +0 -2
  401. package/dist/stream-DPF5fojV.mjs +0 -16
  402. package/dist/submit-Br8hfP0_.mjs +0 -2
  403. package/dist/tags-Bnt4JuxQ.mjs +0 -2
  404. package/dist/telemetry-Ch1vCICm.mjs +0 -2
  405. package/dist/tenant-D8u0CxoC.mjs +0 -2
  406. package/dist/tenant-custom-nameservers-BrWMyslZ.mjs +0 -3
  407. package/dist/tunnels-BkNPpTHa.mjs +0 -5
  408. package/dist/turnstile-MgwRECJv.mjs +0 -23
  409. package/dist/ui-DQSZeaG5.mjs +0 -5
  410. package/dist/url-info-Ddp7MgcI.mjs +0 -2
  411. package/dist/url-normalization-3ptK9ntV.mjs +0 -3
  412. package/dist/url-scanner-Psb9ollR.mjs +0 -2
  413. package/dist/user-DWdshcIu.mjs +0 -12
  414. package/dist/values-CDKQL1z2.mjs +0 -2
  415. package/dist/vectorize-CTYYUyQj.mjs +0 -4
  416. package/dist/waiting-rooms-BUdmwXDY.mjs +0 -11
  417. package/dist/web-assets-CpDwDEx8.mjs +0 -8
  418. package/dist/web3-YsjDyAzH.mjs +0 -4
  419. package/dist/workers-BKKxaZcz.mjs +0 -6
  420. package/dist/workers-builds-BWo5vUA9.mjs +0 -2
  421. package/dist/workers-for-platforms-ASJsxYdM.mjs +0 -5
  422. package/dist/workers-vpc-RkTnRvA2.mjs +0 -3
  423. package/dist/workflows-KrIFI9ns.mjs +0 -5
  424. package/dist/zaraz-DglXbVzZ.mjs +0 -2
  425. package/dist/zero-trust-RilTdSjX.mjs +0 -91
  426. package/dist/zone-DsBtVkvT.mjs +0 -2
  427. package/dist/zones-BFxvWFQW.mjs +0 -44
  428. /package/dist/{alerts-B2SJO4nd.mjs → alerts-CstOk8n0.mjs} +0 -0
  429. /package/dist/{autorag-iNjZXw1n.mjs → autorag-PRTwXGgn.mjs} +0 -0
  430. /package/dist/{body-parser-DIlfApuJ.mjs → body-parser-CUWbw_Tq.mjs} +0 -0
  431. /package/dist/{brands-BrVnNrT3.mjs → brands-BHRXlWDm.mjs} +0 -0
  432. /package/dist/{clear-an9o3dJ3.mjs → clear-UvKESVx3.mjs} +0 -0
  433. /package/dist/{cli-types-CrSoSMPF.mjs → cli-types-tt_LZMbn.mjs} +0 -0
  434. /package/dist/{connector-telemetry-events-latest-BqWfopFc.mjs → connector-telemetry-events-latest-DwnFeZg0.mjs} +0 -0
  435. /package/dist/{connector-telemetry-snapshots-latest-C1m9U1En.mjs → connector-telemetry-snapshots-latest-Dv6rZlxs.mjs} +0 -0
  436. /package/dist/{domain-info-B0Ykqv5l.mjs → domain-info-BqTDXNBo.mjs} +0 -0
  437. /package/dist/{health-CIUg1C5o.mjs → health-CwPzzrV6.mjs} +0 -0
  438. /package/dist/{input-validation-BxchZ9jE.mjs → input-validation-Ch4Vllrm.mjs} +0 -0
  439. /package/dist/{internal-DmpATljO.mjs → internal-WLHfxX64.mjs} +0 -0
  440. /package/dist/{live-B66u3_0g.mjs → live-D_k7eHdv.mjs} +0 -0
  441. /package/dist/{metadata-D062SVyy.mjs → metadata-APBiectA.mjs} +0 -0
  442. /package/dist/{rate-limit-analytics-BknoecoM.mjs → rate-limit-analytics-CDTPxSET.mjs} +0 -0
  443. /package/dist/{rate-limits-cdChIg_S.mjs → rate-limits-C3K9smdl.mjs} +0 -0
  444. /package/dist/{ready-C-H2cwp_.mjs → ready-CvwvbdTX.mjs} +0 -0
  445. /package/dist/{recent-submissions-DyuH_n5u.mjs → recent-submissions-CjzcT-iH.mjs} +0 -0
  446. /package/dist/{refute-uSlzkQKq.mjs → refute-CIAFMj00.mjs} +0 -0
  447. /package/dist/{scan-logo-DMk--WT7.mjs → scan-logo-zFkphtQ3.mjs} +0 -0
  448. /package/dist/{scan-page-DEHnAOJo.mjs → scan-page-CLl2MAkZ.mjs} +0 -0
  449. /package/dist/{search-BlKeSfVD.mjs → search-12jA1b4l.mjs} +0 -0
  450. /package/dist/{signed-url-CiGmGkLQ.mjs → signed-url-U0T_PEMR.mjs} +0 -0
  451. /package/dist/{submission-info-DHlTHDrs.mjs → submission-info-CZ84a3Nb.mjs} +0 -0
  452. /package/dist/{theme-CeVf-5qG.mjs → theme-BiIYWOed.mjs} +0 -0
  453. /package/dist/{total-queries-D5WvVfYi.mjs → total-queries-CJTc9Pde.mjs} +0 -0
  454. /package/dist/{tracked-domains-9deBK9bp.mjs → tracked-domains-BKLxnnSv.mjs} +0 -0
  455. /package/dist/{verify-S-TmhUDr.mjs → verify-CZW5Fo1q.mjs} +0 -0
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{n as e,r as t}from"./update-check-CTLoakFV.mjs";export{e as getUpdateNotice,t as maybeStartBackgroundUpdateCheck};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{r as e,t}from"./chunk-DL5FNmn1.mjs";import{n}from"./version-W6_TN_kN.mjs";import{i as r}from"./cf-oadujOtC.mjs";import{closeSync as i,mkdirSync as a,openSync as o,readFileSync as s,renameSync as c,statSync as l,unlinkSync as u,writeFileSync as d}from"node:fs";import{dirname as f,join as p}from"node:path";import{fileURLToPath as m}from"node:url";import{spawn as h}from"node:child_process";var g=t(((e,t)=>{t.exports=typeof process==`object`&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error(`SEMVER`,...e):()=>{}})),_=t(((e,t)=>{t.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:2**53-1||9007199254740991,RELEASE_TYPES:[`major`,`premajor`,`minor`,`preminor`,`patch`,`prepatch`,`prerelease`],SEMVER_SPEC_VERSION:`2.0.0`,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}})),v=t(((e,t)=>{let{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:i}=_(),a=g();e=t.exports={};let o=e.re=[],s=e.safeRe=[],c=e.src=[],l=e.safeSrc=[],u=e.t={},d=0,f=`[a-zA-Z0-9-]`,p=[[`\\s`,1],[`\\d`,i],[f,r]],m=e=>{for(let[t,n]of p)e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return e},h=(e,t,n)=>{let r=m(t),i=d++;a(e,i,t),u[e]=i,c[i]=t,l[i]=r,o[i]=new RegExp(t,n?`g`:void 0),s[i]=new RegExp(r,n?`g`:void 0)};h(`NUMERICIDENTIFIER`,`0|[1-9]\\d*`),h(`NUMERICIDENTIFIERLOOSE`,`\\d+`),h(`NONNUMERICIDENTIFIER`,`\\d*[a-zA-Z-]${f}*`),h(`MAINVERSION`,`(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})`),h(`MAINVERSIONLOOSE`,`(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})`),h(`PRERELEASEIDENTIFIER`,`(?:${c[u.NONNUMERICIDENTIFIER]}|${c[u.NUMERICIDENTIFIER]})`),h(`PRERELEASEIDENTIFIERLOOSE`,`(?:${c[u.NONNUMERICIDENTIFIER]}|${c[u.NUMERICIDENTIFIERLOOSE]})`),h(`PRERELEASE`,`(?:-(${c[u.PRERELEASEIDENTIFIER]}(?:\\.${c[u.PRERELEASEIDENTIFIER]})*))`),h(`PRERELEASELOOSE`,`(?:-?(${c[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[u.PRERELEASEIDENTIFIERLOOSE]})*))`),h(`BUILDIDENTIFIER`,`${f}+`),h(`BUILD`,`(?:\\+(${c[u.BUILDIDENTIFIER]}(?:\\.${c[u.BUILDIDENTIFIER]})*))`),h(`FULLPLAIN`,`v?${c[u.MAINVERSION]}${c[u.PRERELEASE]}?${c[u.BUILD]}?`),h(`FULL`,`^${c[u.FULLPLAIN]}$`),h(`LOOSEPLAIN`,`[v=\\s]*${c[u.MAINVERSIONLOOSE]}${c[u.PRERELEASELOOSE]}?${c[u.BUILD]}?`),h(`LOOSE`,`^${c[u.LOOSEPLAIN]}$`),h(`GTLT`,`((?:<|>)?=?)`),h(`XRANGEIDENTIFIERLOOSE`,`${c[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),h(`XRANGEIDENTIFIER`,`${c[u.NUMERICIDENTIFIER]}|x|X|\\*`),h(`XRANGEPLAIN`,`[v=\\s]*(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:${c[u.PRERELEASE]})?${c[u.BUILD]}?)?)?`),h(`XRANGEPLAINLOOSE`,`[v=\\s]*(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:${c[u.PRERELEASELOOSE]})?${c[u.BUILD]}?)?)?`),h(`XRANGE`,`^${c[u.GTLT]}\\s*${c[u.XRANGEPLAIN]}$`),h(`XRANGELOOSE`,`^${c[u.GTLT]}\\s*${c[u.XRANGEPLAINLOOSE]}$`),h(`COERCEPLAIN`,`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),h(`COERCE`,`${c[u.COERCEPLAIN]}(?:$|[^\\d])`),h(`COERCEFULL`,c[u.COERCEPLAIN]+`(?:${c[u.PRERELEASE]})?(?:${c[u.BUILD]})?(?:$|[^\\d])`),h(`COERCERTL`,c[u.COERCE],!0),h(`COERCERTLFULL`,c[u.COERCEFULL],!0),h(`LONETILDE`,`(?:~>?)`),h(`TILDETRIM`,`(\\s*)${c[u.LONETILDE]}\\s+`,!0),e.tildeTrimReplace=`$1~`,h(`TILDE`,`^${c[u.LONETILDE]}${c[u.XRANGEPLAIN]}$`),h(`TILDELOOSE`,`^${c[u.LONETILDE]}${c[u.XRANGEPLAINLOOSE]}$`),h(`LONECARET`,`(?:\\^)`),h(`CARETTRIM`,`(\\s*)${c[u.LONECARET]}\\s+`,!0),e.caretTrimReplace=`$1^`,h(`CARET`,`^${c[u.LONECARET]}${c[u.XRANGEPLAIN]}$`),h(`CARETLOOSE`,`^${c[u.LONECARET]}${c[u.XRANGEPLAINLOOSE]}$`),h(`COMPARATORLOOSE`,`^${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]})$|^$`),h(`COMPARATOR`,`^${c[u.GTLT]}\\s*(${c[u.FULLPLAIN]})$|^$`),h(`COMPARATORTRIM`,`(\\s*)${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]}|${c[u.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace=`$1$2$3`,h(`HYPHENRANGE`,`^\\s*(${c[u.XRANGEPLAIN]})\\s+-\\s+(${c[u.XRANGEPLAIN]})\\s*$`),h(`HYPHENRANGELOOSE`,`^\\s*(${c[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[u.XRANGEPLAINLOOSE]})\\s*$`),h(`STAR`,`(<|>)?=?\\s*\\*`),h(`GTE0`,`^\\s*>=\\s*0\\.0\\.0\\s*$`),h(`GTE0PRE`,`^\\s*>=\\s*0\\.0\\.0-0\\s*$`)})),y=t(((e,t)=>{let n=Object.freeze({loose:!0}),r=Object.freeze({});t.exports=e=>e?typeof e==`object`?e:n:r})),b=t(((e,t)=>{let n=/^[0-9]+$/,r=(e,t)=>{if(typeof e==`number`&&typeof t==`number`)return e===t?0:e<t?-1:1;let r=n.test(e),i=n.test(t);return r&&i&&(e=+e,t=+t),e===t?0:r&&!i?-1:i&&!r?1:e<t?-1:1};t.exports={compareIdentifiers:r,rcompareIdentifiers:(e,t)=>r(t,e)}})),x=t(((e,t)=>{let n=g(),{MAX_LENGTH:r,MAX_SAFE_INTEGER:i}=_(),{safeRe:a,t:o}=v(),s=y(),{compareIdentifiers:c}=b(),l=(e,t)=>{let n=t.split(`.`);if(n.length>e.length)return!1;for(let t=0;t<n.length;t++)if(c(e[t],n[t])!==0)return!1;return!0};t.exports=class e{constructor(t,c){if(c=s(c),t instanceof e){if(t.loose===!!c.loose&&t.includePrerelease===!!c.includePrerelease)return t;t=t.version}else if(typeof t!=`string`)throw TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>r)throw TypeError(`version is longer than ${r} characters`);n(`SemVer`,t,c),this.options=c,this.loose=!!c.loose,this.includePrerelease=!!c.includePrerelease;let l=t.trim().match(c.loose?a[o.LOOSE]:a[o.FULL]);if(!l)throw TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+l[1],this.minor=+l[2],this.patch=+l[3],this.major>i||this.major<0)throw TypeError(`Invalid major version`);if(this.minor>i||this.minor<0)throw TypeError(`Invalid minor version`);if(this.patch>i||this.patch<0)throw TypeError(`Invalid patch version`);l[4]?this.prerelease=l[4].split(`.`).map(e=>{if(/^[0-9]+$/.test(e)){let t=+e;if(t>=0&&t<i)return t}return e}):this.prerelease=[],this.build=l[5]?l[5].split(`.`):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(`.`)}`),this.version}toString(){return this.version}compare(t){if(n(`SemVer.compare`,this.version,this.options,t),!(t instanceof e)){if(typeof t==`string`&&t===this.version)return 0;t=new e(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof e||(t=new e(t,this.options)),this.major<t.major?-1:this.major>t.major?1:this.minor<t.minor?-1:this.minor>t.minor?1:this.patch<t.patch?-1:+(this.patch>t.patch)}comparePre(t){if(t instanceof e||(t=new e(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let r=0;do{let e=this.prerelease[r],i=t.prerelease[r];if(n(`prerelease compare`,r,e,i),e===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(e===void 0)return-1;if(e===i)continue;return c(e,i)}while(++r)}compareBuild(t){t instanceof e||(t=new e(t,this.options));let r=0;do{let e=this.build[r],i=t.build[r];if(n(`build compare`,r,e,i),e===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(e===void 0)return-1;if(e===i)continue;return c(e,i)}while(++r)}inc(e,t,n){if(e.startsWith(`pre`)){if(!t&&n===!1)throw Error(`invalid increment argument: identifier is empty`);if(t){let e=`-${t}`.match(this.options.loose?a[o.PRERELEASELOOSE]:a[o.PRERELEASE]);if(!e||e[1]!==t)throw Error(`invalid identifier: ${t}`)}}switch(e){case`premajor`:this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc(`pre`,t,n);break;case`preminor`:this.prerelease.length=0,this.patch=0,this.minor++,this.inc(`pre`,t,n);break;case`prepatch`:this.prerelease.length=0,this.inc(`patch`,t,n),this.inc(`pre`,t,n);break;case`prerelease`:this.prerelease.length===0&&this.inc(`patch`,t,n),this.inc(`pre`,t,n);break;case`release`:if(this.prerelease.length===0)throw Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case`major`:(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case`minor`:(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case`patch`:this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case`pre`:{let e=+!!Number(n);if(this.prerelease.length===0)this.prerelease=[e];else{let r=this.prerelease.length;for(;--r>=0;)typeof this.prerelease[r]==`number`&&(this.prerelease[r]++,r=-2);if(r===-1){if(t===this.prerelease.join(`.`)&&n===!1)throw Error(`invalid increment argument: identifier already exists`);this.prerelease.push(e)}}if(t){let r=[t,e];if(n===!1&&(r=[t]),l(this.prerelease,t)){let e=this.prerelease[t.split(`.`).length];isNaN(e)&&(this.prerelease=r)}else this.prerelease=r}break}default:throw Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(`.`)}`),this}}})),S=t(((e,t)=>{let n=x();t.exports=(e,t,r)=>new n(e,r).compare(new n(t,r))})),C=t(((e,t)=>{let n=S();t.exports=(e,t,r)=>n(e,t,r)>0})),w=t(((e,t)=>{let n=x();t.exports=(e,t)=>new n(e,t).major})),T=t(((e,t)=>{let n=x();t.exports=(e,t,r=!1)=>{if(e instanceof n)return e;try{return new n(e,t)}catch(e){if(!r)return null;throw e}}})),E=t(((e,t)=>{let n=T();t.exports=(e,t)=>{let r=n(e,t);return r&&r.prerelease.length?r.prerelease:null}})),D=t(((e,t)=>{let n=T();t.exports=(e,t)=>{let r=n(e,t);return r?r.version:null}})),O=e(C(),1),k=e(w(),1),A=e(E(),1),j=e(D(),1);const M=1440*60*1e3;function N(e){return(0,A.default)(e)?.includes(`beta`)?`beta`:`latest`}function P(e=n){return p(r(),`cache`,`update-check-${N(e)}.json`)}function F(e=P()){try{let t=JSON.parse(s(e,`utf8`));if(typeof t!=`object`||!t||Array.isArray(t))return{};let n=t;return{lastAttemptedAt:typeof n.lastAttemptedAt==`number`&&Number.isFinite(n.lastAttemptedAt)?n.lastAttemptedAt:void 0,lastSuccessfulAt:typeof n.lastSuccessfulAt==`number`&&Number.isFinite(n.lastSuccessfulAt)?n.lastSuccessfulAt:void 0,latestVersion:typeof n.latestVersion==`string`&&(0,j.default)(n.latestVersion)?n.latestVersion:void 0}}catch{return{}}}function I(e,t=P()){let n=`${t}.${process.pid}.tmp`;try{return a(f(t),{recursive:!0}),d(n,`${JSON.stringify(e)}\n`,{encoding:`utf8`,mode:384}),c(n,t),!0}catch{try{u(n)}catch{}return!1}}function L(e,t,n){let r=`${e}.lock`,s;try{a(f(e),{recursive:!0});try{s=o(r,`wx`,384)}catch{try{if(t-l(r).mtimeMs<=5e3)return;u(r),s=o(r,`wx`,384)}catch{return}}return n()}catch{return}finally{if(s!==void 0)try{i(s),u(r)}catch{}}}function R(e,t){if(!(0,j.default)(e)||!t.latestVersion||!(0,O.default)(t.latestVersion,e))return;let n=(0,k.default)(t.latestVersion)>(0,k.default)(e);return{latestVersion:t.latestVersion,isMajor:n}}function z(e,t=P(e)){return R(e,F(t))}function B(){let e=import.meta.url.endsWith(`.ts`),t=new URL(e?`../update-check-worker.ts`:`./update-check-worker.mjs`,import.meta.url),n=e?[...process.execArgv,m(t)]:[m(t)];h(process.execPath,n,{detached:!0,stdio:`ignore`,windowsHide:!0}).unref()}function V(e={}){let t=e.cachePath??P(e.currentVersion??n),r=e.now??Date.now();if(L(t,r,()=>{let e=F(t);return e.lastAttemptedAt!==void 0&&r-e.lastAttemptedAt<864e5?!1:I({...e,lastAttemptedAt:r},t)}))try{(e.spawnWorker??B)()}catch{}}async function H(e,t,r,i){if(!(0,j.default)(t))return{status:`failed`};let a=await i(`https://registry.npmjs.org/${encodeURIComponent(e)}/${r}`,{headers:{accept:`application/json`,"user-agent":`cf-cli/${n}`},signal:AbortSignal.timeout(3e3)});if(!a.ok)return{status:`failed`};let o=await a.json();if(typeof o!=`object`||!o||Array.isArray(o))return{status:`failed`};let s=o;return s.name!==e||typeof s.version!=`string`||!(0,j.default)(s.version)?{status:`failed`}:(0,O.default)(s.version,t)?{status:`update-available`,latest:s.version}:{status:`up-to-date`}}async function U(e={}){let t=e.currentVersion??n,r=N(t),i=e.cachePath??P(t),a=e.now??Date.now();try{let n=await(e.check??((t,n,r)=>H(t,n,r,e.fetch??globalThis.fetch)))(`cf`,t,r);if(n.status===`failed`)return;let o=n.status===`update-available`?n.latest:t;if(!(0,j.default)(o))return;I({...F(i),latestVersion:o,lastSuccessfulAt:a},i)}catch{}}export{U as i,z as n,V as r,M as t};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{i as e}from"./update-check-CTLoakFV.mjs";await e();export{};
@@ -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 url-info get
3
+
4
+ Return submitted URLs based on ID`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const l={command:`get`,describe:`Read submitted URLs by ID`,builder:c,handler:async c=>s({command:`url-info get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf url-info get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/brand-protection/url-info`,pathParams:{},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.urlInfo.get({account_id:l})),{successLabel:`Loaded`})})},u={command:`url-info`,describe:`url-info`,builder:e=>e.command(l).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{u as default};
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env node
2
+ import{_ as e}from"./oauth-D4bkeMAw.mjs";import{r as t}from"./auth-Cp7gT-AF.mjs";import{t as n}from"./output-Bia1u2k5.mjs";import{t as r}from"./dry-run-CLX6Pbtq.mjs";import{t as i}from"./progress-Bi02B6v4.mjs";import{t as a}from"./run-BBBMrSrs.mjs";import"./telemetry-mKEb8lYB.mjs";import{n as o,t as s}from"./body-parser-CUWbw_Tq.mjs";import{n as c}from"./input-validation-Ch4Vllrm.mjs";import{i as l,n as u}from"./prompt-Bx2PB-tt.mjs";function d(e){return e.usage(`$0 url-normalization delete
3
+
4
+ Deletes the URL Normalization settings.`).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 f={command:`delete`,describe:`Delete URL Normalization settings`,builder:d,handler:async o=>a({command:`url-normalization delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},o,async()=>{if(o.dryRun){r({command:`cf url-normalization delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/url_normalization`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});if(o.zoneId=s,!await u({force:!!o.force})){process.stderr.write(`Aborted.
5
+ `);return}n(await i(`Deleting`,async()=>a.urlNormalization.delete({zone_id:s})),{successLabel:`Deleted`})})};function p(e){return e.usage(`$0 url-normalization get
6
+
7
+ Fetches the current URL Normalization settings.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const m={command:`get`,describe:`Get URL Normalization settings`,builder:p,handler:async o=>a({command:`url-normalization get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf url-normalization get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/url_normalization`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s,n(await i(`Loading`,async()=>a.urlNormalization.get({zone_id:s})),{successLabel:`Loaded`})})};function h(e){return e.usage(`$0 url-normalization update
8
+
9
+ Updates the URL Normalization settings.`).option(`scope`,{type:`string`,description:`The scope of the URL normalization.`,choices:[`incoming`,`both`,`none`]}).option(`type`,{type:`string`,description:`The type of URL normalization performed by Cloudflare.`,choices:[`cloudflare`,`rfc3986`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`A URL Normalization object.`})}const g={command:`update`,describe:`Update URL Normalization settings`,builder:h,handler:async u=>a({command:`url-normalization update`,classification:{safeFlags:[`scope`,`type`,`dry-run`]}},u,async()=>{if(u.dryRun){r({command:`cf url-normalization update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${u.zone??u.zoneId??`<zone>`}/url_normalization`,pathParams:{"zone-id":String(u.zone??u[`zone-id`]??``)},bodyKind:`json`,body:u.body===void 0?s({scope:c(u.scope,`scope`,`text`),type:c(u.type,`type`,`text`)}):o(u.body)});return}let a=await t(u),d=await e({zone:u.zone},a,{quiet:u.quiet});if(u.zoneId=d,u.body){let e=o(u.body);n(await i(`Updating`,async()=>a.urlNormalization.update({body:e,zone_id:d})),{successLabel:`Updated`});return}u.scope===void 0&&(u.scope=await l(`scope`,`The scope of the URL normalization.`,[`incoming`,`both`,`none`])),u.type===void 0&&(u.type=await l(`type`,`The type of URL normalization performed by Cloudflare.`,[`cloudflare`,`rfc3986`]));let f=s({scope:c(u.scope,`scope`,`text`),type:c(u.type,`type`,`text`)});n(await i(`Updating`,async()=>a.urlNormalization.update({body:f,zone_id:d})),{successLabel:`Updated`})})},_={command:`url-normalization`,describe:`url-normalization`,builder:e=>e.command(f).command(m).command(g).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{_ as default};
@@ -0,0 +1,16 @@
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";import{n as f,t as p}from"./raw-fetch-DNTQkXbg.mjs";function m(e){return e.usage("$0 url-scanner responses get <response-id>\n\nReturns the raw response of the network request. Find the `response_id` in the `data.requests.response.hash`.").positional(`response-id`,{type:`string`,description:`Response hash.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const h={command:`get <response-id>`,describe:`Get raw response`,builder:m,handler:async i=>s({command:`url-scanner responses get`,classification:{safeFlags:[`dry-run`]}},i,async()=>{if(i.dryRun){a({command:`cf url-scanner responses get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/urlscanner/v2/responses/${i[`response-id`]==null?`<response-id>`:encodeURIComponent(String(i[`response-id`]))}`,pathParams:{"response-id":String(i[`response-id`]??``)},bodyKind:`none`});return}await r(i);let s=i.local?e:await t();i.accountId=s,f((await o(`Loading`,async()=>p(`/accounts/${s}/urlscanner/v2/responses/${encodeURIComponent(String(i[`response-id`]))}`,{method:`GET`,local:i.local===!0,persistTo:i.persistTo}))).toString(`utf-8`))})},g={command:`responses`,describe:`Raw HTTP response data captured during URL scans`,builder:e=>e.command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function _(e){return e.usage(`$0 url-scanner scans bulk-create
3
+
4
+ Submit URLs to scan. Check limits at https://developers.cloudflare.com/security-center/investigate/scan-limits/ and take into account scans submitted in bulk have lower priority and may take longer to finish.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`List of urls to scan (up to a 100).`})}const v={command:`bulk-create`,describe:`Bulk create URL Scans`,builder:_,handler:async l=>s({command:`url-scanner scans bulk-create`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf url-scanner scans bulk-create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/urlscanner/v2/bulk`,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(`Creating`,async()=>s.urlScanner.scans.bulkCreate({body:e,account_id:u})),{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 y(e){return e.usage(`$0 url-scanner scans create
5
+
6
+ Submit a URL to scan. Check limits at https://developers.cloudflare.com/security-center/investigate/scan-limits/.`).option(`agent-readiness`,{type:`boolean`,description:`Enable agent readiness checks.`}).option(`country`,{type:`string`,description:`Country to geo egress from`,choices:`AF.AL.DZ.AD.AO.AG.AR.AM.AU.AT.AZ.BH.BD.BB.BY.BE.BZ.BJ.BM.BT.BO.BA.BW.BR.BN.BG.BF.BI.KH.CM.CA.CV.KY.CF.TD.CL.CN.CO.KM.CG.CR.CI.HR.CU.CY.CZ.CD.DK.DJ.DM.DO.EC.EG.SV.GQ.ER.EE.SZ.ET.FJ.FI.FR.GA.GE.DE.GH.GR.GL.GD.GT.GN.GW.GY.HT.HN.HU.IS.IN.ID.IR.IQ.IE.IL.IT.JM.JP.JO.KZ.KE.KI.KW.KG.LA.LV.LB.LS.LR.LY.LI.LT.LU.MO.MG.MW.MY.MV.ML.MR.MU.MX.FM.MD.MC.MN.MS.MA.MZ.MM.NA.NR.NP.NL.NZ.NI.NE.NG.KP.MK.NO.OM.PK.PS.PA.PG.PY.PE.PH.PL.PT.QA.RO.RU.RW.SH.KN.LC.VC.WS.SM.ST.SA.SN.RS.SC.SL.SK.SI.SB.SO.ZA.KR.SS.ES.LK.SD.SR.SE.CH.SY.TW.TJ.TZ.TH.BS.GM.TL.TG.TO.TT.TN.TR.TM.UG.UA.AE.GB.US.UY.UZ.VU.VE.VN.YE.ZM.ZW`.split(`.`)}).option(`customagent`,{type:`string`,description:`The customagent field`}).option(`referer`,{type:`string`,description:`The referer field`}).option(`screenshots-resolutions`,{type:`string`,array:!0,description:`Take multiple screenshots targeting different device types.`}).option(`url`,{type:`string`,description:`The url field`}).option(`visibility`,{type:`string`,description:"The option `Public` means it will be included in listings like recent scans and search results. `Unlisted` means it will not be included in the aforementioned listings, users will need to have the scan's ID to access it. A a scan will be automatically marked as unlisted if it fails, if it contains potential PII or other sensitive material.",choices:[`Public`,`Unlisted`],default:`Public`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const b={command:`create`,describe:`Create URL Scan`,builder:y,handler:async f=>s({command:`url-scanner scans create`,classification:{safeFlags:[`agent-readiness`,`country`,`visibility`,`dry-run`]}},f,async()=>{if(f.dryRun){a({command:`cf url-scanner scans create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/urlscanner/v2/scan`,pathParams:{},bodyKind:`json`,body:f.body===void 0?l({agentReadiness:f[`agent-readiness`],country:u(f.country,`country`,`text`),customagent:u(f.customagent,`customagent`,`text`),referer:u(f.referer,`referer`,`text`),screenshotsResolutions:f[`screenshots-resolutions`],url:u(f.url,`url`,`text`),visibility:u(f.visibility,`visibility`,`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.urlScanner.scans.create({...e,account_id:p})),{successLabel:`Created`});return}f.url===void 0&&(f.url=await d(`url`,`The url field`));let m=l({agentReadiness:f[`agent-readiness`],country:u(f.country,`country`,`text`),customagent:u(f.customagent,`customagent`,`text`),referer:u(f.referer,`referer`,`text`),screenshotsResolutions:f[`screenshots-resolutions`],url:u(f.url,`url`,`text`),visibility:u(f.visibility,`visibility`,`text`)});i(await o(`Creating`,async()=>s.urlScanner.scans.create({...m,account_id:p})),{successLabel:`Created`})})};function x(e){return e.usage(`$0 url-scanner scans dom <scan-id>
7
+
8
+ Returns a plain text response, with the scan's DOM content as rendered by Chrome.`).positional(`scan-id`,{type:`string`,description:`Scan UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const S={command:`dom <scan-id>`,describe:`Get URL scan's DOM`,builder:x,handler:async i=>s({command:`url-scanner scans dom`,classification:{safeFlags:[`dry-run`]}},i,async()=>{if(i.dryRun){a({command:`cf url-scanner scans dom`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/urlscanner/v2/dom/${i[`scan-id`]==null?`<scan-id>`:encodeURIComponent(String(i[`scan-id`]))}`,pathParams:{"scan-id":String(i[`scan-id`]??``)},bodyKind:`none`});return}await r(i);let s=i.local?e:await t();i.accountId=s,f((await o(`Loading`,async()=>p(`/accounts/${s}/urlscanner/v2/dom/${encodeURIComponent(String(i[`scan-id`]))}`,{method:`GET`,local:i.local===!0,persistTo:i.persistTo}))).toString(`utf-8`))})};function C(e){return e.usage(`$0 url-scanner scans get <scan-id>
9
+
10
+ Get URL scan by uuid`).positional(`scan-id`,{type:`string`,description:`Scan UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const w={command:`get <scan-id>`,describe:`Get URL scan`,builder:C,handler:async c=>s({command:`url-scanner scans get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf url-scanner scans get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/urlscanner/v2/result/${c[`scan-id`]==null?`<scan-id>`:encodeURIComponent(String(c[`scan-id`]))}`,pathParams:{"scan-id":String(c[`scan-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.urlScanner.scans.get({account_id:l,scan_id:c[`scan-id`]})),{successLabel:`Loaded`})})};function T(e){return e.usage(`$0 url-scanner scans har <scan-id>
11
+
12
+ Get a URL scan's HAR file. See HAR spec at http://www.softwareishard.com/blog/har-12-spec/.`).positional(`scan-id`,{type:`string`,description:`Scan UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`har <scan-id>`,describe:`Get URL scan's HAR`,builder:T,handler:async c=>s({command:`url-scanner scans har`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf url-scanner scans har`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/urlscanner/v2/har/${c[`scan-id`]==null?`<scan-id>`:encodeURIComponent(String(c[`scan-id`]))}`,pathParams:{"scan-id":String(c[`scan-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.urlScanner.scans.har({account_id:l,scan_id:c[`scan-id`]})),{successLabel:`Loaded`})})};function D(e){return e.usage(`$0 url-scanner scans list
13
+
14
+ Use a subset of ElasticSearch Query syntax to filter scans. Some example queries:<br/> <br/>- 'path:"/bundles/jquery.js"': Searches for scans who requested resources with the given path.<br/>- 'page.asn:AS24940 AND hash:xxx': Websites hosted in AS24940 where a resource with the given hash was downloaded.<br/>- 'page.domain:microsoft* AND verdicts.malicious:true AND NOT page.domain:microsoft.com': malicious scans whose hostname starts with "microsoft".<br/>- 'apikey:me AND date:[2025-01 TO 2025-02]': my scans from 2025 January to 2025 February.`).option(`size`,{type:`number`,description:`Limit the number of objects in the response.`}).option(`query`,{type:`string`,description:`Filter scans`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const O={command:`list`,describe:`Search URL scans`,builder:D,handler:async c=>s({command:`url-scanner scans list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={size:c.size,q:c.query};if(c.dryRun){a({command:`cf url-scanner scans list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/urlscanner/v2/search`,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.urlScanner.scans.list({account_id:u,...s})),{successLabel:`Loaded`})})};function k(e){return e.usage(`$0 url-scanner scans screenshot <scan-id>
15
+
16
+ Get scan's screenshot by resolution (desktop/mobile/tablet).`).positional(`scan-id`,{type:`string`,description:`Scan UUID.`,demandOption:!0}).option(`resolution`,{type:`string`,description:`Target device type.`,choices:[`desktop`,`mobile`,`tablet`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`text`,{type:`boolean`,description:`Decode the response body as UTF-8 text instead of writing raw bytes`,default:!1})}const A={command:`screenshot <scan-id>`,describe:`Get screenshot`,builder:k,handler:async i=>s({command:`url-scanner scans screenshot`,classification:{safeFlags:[`resolution`,`dry-run`,`text`]}},i,async()=>{let s={resolution:i.resolution};if(i.dryRun){a({command:`cf url-scanner scans screenshot`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/urlscanner/v2/screenshots/${i[`scan-id`]==null?`<scan-id>`:encodeURIComponent(String(i[`scan-id`]))}.png`,pathParams:{"scan-id":String(i[`scan-id`]??``)},query:s,bodyKind:`none`});return}await r(i);let c=i.local?e:await t();i.accountId=c;let l=new URLSearchParams(Object.entries(s).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),u=await o(`Loading`,async()=>p(`/accounts/${c}/urlscanner/v2/screenshots/${encodeURIComponent(String(i[`scan-id`]))}.png${l?`?`+l:``}`,{method:`GET`,local:i.local===!0,persistTo:i.persistTo}));f(i.text===!0?u.toString(`utf-8`):u)})},j={command:`scans`,describe:`URL scan requests and results — submit URLs for analysis and retrieve threat verdicts`,builder:e=>e.command(v).command(b).command(S).command(w).command(E).command(O).command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},M={command:`url-scanner`,describe:`Scan URLs for phishing, malware, and other threats — submit scans and retrieve detailed results`,builder:e=>e.command(g).command(j).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{M as default};
@@ -0,0 +1,112 @@
1
+ #!/usr/bin/env node
2
+ import{a as e,r as t}from"./auth-Cp7gT-AF.mjs";import{t as n}from"./output-Bia1u2k5.mjs";import{t as r}from"./dry-run-CLX6Pbtq.mjs";import{t as i}from"./progress-Bi02B6v4.mjs";import{t as a}from"./run-BBBMrSrs.mjs";import"./telemetry-mKEb8lYB.mjs";import{i as o,n as s,r as c,t as l}from"./body-parser-CUWbw_Tq.mjs";import{n as u}from"./input-validation-Ch4Vllrm.mjs";import{a as d,n as f}from"./prompt-Bx2PB-tt.mjs";import{t as p}from"./cli-types-tt_LZMbn.mjs";function ee(e){return e.usage(`$0 user audit-logs list
3
+
4
+ Gets a list of audit logs for a user account. Can be filtered by who made the change, on which zone, and the timeframe of the change.`).option(`id`,{type:`string`,description:`Finds a specific log by its ID.`}).option(`export`,{type:`boolean`,description:`Indicates that this request is an export of logs in CSV format.`}).option(`action-type`,{type:`string`,description:`Filters by the action type.`}).option(`actor-ip`,{type:`string`,description:`Filters by the IP address of the request that made the change by specific IP address or valid CIDR Range.`}).option(`actor-email`,{type:`string`,description:`Filters by the email address of the actor that made the change.`}).option(`since`,{type:`string`,description:"Limits the returned results to logs newer than the specified date. A `full-date` that conforms to RFC3339."}).option(`before`,{type:`string`,description:"Limits the returned results to logs older than the specified date. A `full-date` that conforms to RFC3339."}).option(`zone-name`,{type:`string`,description:`Filters by the name of the zone associated to the change.`}).option(`direction`,{type:`string`,description:`Changes the direction of the chronological sorting.`,choices:[`desc`,`asc`]}).option(`per-page`,{type:`number`,description:`Sets the number of results to return per page.`}).option(`page`,{type:`number`,description:`Defines which page of results to return.`}).option(`hide-user-logs`,{type:`boolean`,description:`Indicates whether or not to hide user level audit logs.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const te={command:`list`,describe:`Get user audit logs`,builder:p(ee),handler:async e=>a({command:`user audit-logs list`,classification:{safeFlags:[`export`,`direction`,`hide-user-logs`,`dry-run`]}},e,async()=>{let a={id:e.id,export:e.export,"action.type":e[`action-type`],"actor.ip":e[`actor-ip`],"actor.email":e[`actor-email`],since:e.since,before:e.before,"zone.name":e[`zone-name`],direction:e.direction,per_page:e[`per-page`],page:e.page,hide_user_logs:e[`hide-user-logs`]};if(e.dryRun){r({command:`cf user audit-logs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/user/audit_logs`,pathParams:{},query:a,bodyKind:`none`});return}let o=await t(e);n(await i(`Loading`,async()=>o.user.auditLogs.list(a)),{successLabel:`Loaded`})})},m={command:`audit-logs`,describe:`Operations for audit-logs`,builder:e=>e.command(te).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function h(e){return e.usage(`$0 user billing history list
5
+
6
+ Accesses your billing history object.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of items per page.`}).option(`order`,{type:`string`,description:`Field to order billing history by.`,choices:[`type`,`occurred_at`,`action`]}).option(`occurred-at`,{type:`string`,description:`When the billing item was created.`}).option(`type`,{type:`string`,description:`The billing item type.`}).option(`action`,{type:`string`,description:`The billing item action.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`list`,describe:`Billing History Details`,builder:p(h),handler:async e=>a({command:`user billing history list`,classification:{safeFlags:[`order`,`dry-run`]}},e,async()=>{let a={page:e.page,per_page:e[`per-page`],order:e.order,occurred_at:e[`occurred-at`],type:e.type,action:e.action};if(e.dryRun){r({command:`cf user billing history list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/user/billing/history`,pathParams:{},query:a,bodyKind:`none`});return}let o=await t(e);n(await i(`Loading`,async()=>o.user.billing.history.list(a)),{successLabel:`Loaded`})})},_={command:`history`,describe:`Operations for billing.history`,builder:e=>e.command(g).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function v(e){return e.usage(`$0 user billing profile get
7
+
8
+ Accesses your billing profile object.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const y={command:`get`,describe:`Billing Profile Details`,builder:v,handler:async e=>a({command:`user billing profile get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf user billing profile get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/user/billing/profile`,pathParams:{},bodyKind:`none`});return}let a=await t(e);n(await i(`Loading`,async()=>a.user.billing.profile.get()),{successLabel:`Loaded`})})},b={command:`profile`,describe:`Operations for billing.profile`,builder:e=>e.command(y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},x={command:`billing`,describe:`View billing history and payment profile for your user (deprecated — prefer account-level billing)`,builder:e=>e.command(_).command(b).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function S(e){return e.usage(`$0 user edit
9
+
10
+ Edit part of your user details.`).option(`country`,{type:`string`,description:`The country in which the user lives.`}).option(`first-name`,{type:`string`,description:`User's first name`}).option(`last-name`,{type:`string`,description:`User's last name`}).option(`telephone`,{type:`string`,description:`User's telephone number`}).option(`zipcode`,{type:`string`,description:`The zipcode or postal code where the user lives.`}).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 C={command:`edit`,describe:`Edit User`,builder:S,handler:async e=>a({command:`user edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf user edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/user`,pathParams:{},bodyKind:`json`,body:e.body===void 0?l({country:u(e.country,`country`,`text`),first_name:u(e[`first-name`],`first-name`,`text`),last_name:u(e[`last-name`],`last-name`,`text`),telephone:u(e.telephone,`telephone`,`text`),zipcode:u(e.zipcode,`zipcode`,`text`)}):s(e.body)});return}let a=await t(e);if(e.body){let t=s(e.body);n(await i(`Updating`,async()=>a.user.edit({...t})),{successLabel:`Updated`});return}let o=l({country:u(e.country,`country`,`text`),first_name:u(e[`first-name`],`first-name`,`text`),last_name:u(e[`last-name`],`last-name`,`text`),telephone:u(e.telephone,`telephone`,`text`),zipcode:u(e.zipcode,`zipcode`,`text`)});n(await i(`Updating`,async()=>a.user.edit({...o})),{successLabel:`Updated`})})};function w(e){return e.usage(`$0 user firewall access-rules create
11
+
12
+ Creates a new IP Access rule for all zones owned by the current user. Note: To create an IP Access rule that applies to a specific zone, refer to the [IP Access rules for a zone](#ip-access-rules-for-a-zone) endpoints.`).option(`configuration-target`,{type:`string`,description:"The configuration target. You must set the target to `ip` when specifying an IP address in the rule.",choices:[`ip`,`ip6`,`ip_range`,`asn`,`country`]}).option(`configuration-value`,{type:`string`,description:`The IP address to match. This address will be compared to the IP address of incoming requests.`}).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 T={command:`create`,describe:`Create an IP Access rule`,builder:w,handler:async e=>a({command:`user firewall access-rules create`,classification:{safeFlags:[`configuration-target`,`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf user firewall access-rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/user/firewall/access_rules/rules`,pathParams:{},bodyKind:`json`,body:e.body===void 0?l({configuration:{target:u(e[`configuration-target`],`configuration-target`,`text`),value:u(e[`configuration-value`],`configuration-value`,`text`)}}):s(e.body)});return}let a=await t(e);if(e.body){let t=s(e.body);n(await i(`Creating`,async()=>a.user.firewall.accessRules.create({...t})),{successLabel:`Created`});return}let o=l({configuration:{target:u(e[`configuration-target`],`configuration-target`,`text`),value:u(e[`configuration-value`],`configuration-value`,`text`)}});n(await i(`Creating`,async()=>a.user.firewall.accessRules.create({...o})),{successLabel:`Created`})})};function E(e){return e.usage(`$0 user firewall access-rules delete <rule-id>
13
+
14
+ Deletes an IP Access rule at the user level. Note: Deleting a user-level rule will affect all zones owned by the user.`).positional(`rule-id`,{type:`string`,description:`Unique identifier for a rule.`,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 D={command:`delete <rule-id>`,describe:`Delete an IP Access rule`,builder:E,handler:async e=>a({command:`user firewall access-rules delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){r({command:`cf user firewall access-rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/user/firewall/access_rules/rules/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,pathParams:{"rule-id":String(e[`rule-id`]??``)},bodyKind:`none`});return}let a=await t(e);if(!await f({force:!!e.force,message:`This operation deletes the user-level IP Access Rule and affects every zone owned by the user.`})){process.stderr.write(`Aborted.
15
+ `);return}n(await i(`Deleting`,async()=>a.user.firewall.accessRules.delete({rule_id:e[`rule-id`]})),{successLabel:`Deleted`})})};function O(e){return e.usage(`$0 user firewall access-rules edit <rule-id>
16
+
17
+ Updates an IP Access rule defined at the user level. You can only update the rule action (\`mode\` parameter) and notes.`).positional(`rule-id`,{type:`string`,description:`Unique identifier for a rule.`,demandOption:!0}).option(`notes`,{type:`string`,description:`An informative summary of the rule, typically used as a reminder or explanation.`}).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:`edit <rule-id>`,describe:`Update an IP Access rule`,builder:O,handler:async e=>a({command:`user firewall access-rules edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf user firewall access-rules edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/user/firewall/access_rules/rules/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,pathParams:{"rule-id":String(e[`rule-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({notes:u(e.notes,`notes`,`text`)}):s(e.body)});return}let a=await t(e);if(e.body){let t=s(e.body);n(await i(`Updating`,async()=>a.user.firewall.accessRules.edit({...t,rule_id:e[`rule-id`]})),{successLabel:`Updated`});return}let o=l({notes:u(e.notes,`notes`,`text`)});n(await i(`Updating`,async()=>a.user.firewall.accessRules.edit({...o,rule_id:e[`rule-id`]})),{successLabel:`Updated`})})};function A(e){return e.usage(`$0 user firewall access-rules get <rule-id>
18
+
19
+ Fetches the details of an IP Access rule defined at the user level.`).positional(`rule-id`,{type:`string`,description:`Unique identifier for a rule.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const j={command:`get <rule-id>`,describe:`Get an IP Access rule`,builder:A,handler:async e=>a({command:`user firewall access-rules get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf user firewall access-rules get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/user/firewall/access_rules/rules/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,pathParams:{"rule-id":String(e[`rule-id`]??``)},bodyKind:`none`});return}let a=await t(e);n(await i(`Loading`,async()=>a.user.firewall.accessRules.get({rule_id:e[`rule-id`]})),{successLabel:`Loaded`})})};function M(e){return e.usage(`$0 user firewall access-rules list
20
+
21
+ Fetches IP Access rules of the user. You can filter the results using several optional parameters.`).option(`configuration-target`,{type:`string`,description:`Defines the target to search in existing rules.`,choices:[`ip`,`ip_range`,`asn`,`country`]}).option(`configuration-value`,{type:`string`,description:"Defines the target value to search for in existing rules: an IP address, an IP address range, or a country code, depending on the provided `configuration.target`.\nNotes: You can search for a single IPv4 address, an IP address range with a subnet of '/16' or '/24', or a two-letter ISO-3166-1 alpha-2 country code."}).option(`notes`,{type:`string`,description:`Defines the string to search for in the notes of existing IP Access rules.
22
+ Notes: For example, the string 'attack' would match IP Access rules with notes 'Attack 26/02' and 'Attack 27/02'. The search is case insensitive.`}).option(`match`,{type:`string`,description:"Defines the search requirements. When set to `all`, all the search requirements must match. When set to `any`, only one of the search requirements has to match.",choices:[`any`,`all`]}).option(`page`,{type:`number`,description:`Defines the requested page within paginated list of results.`}).option(`per-page`,{type:`number`,description:`Defines the maximum number of results requested.`}).option(`order`,{type:`string`,description:`Defines the field used to sort returned rules.`,choices:[`configuration.target`,`configuration.value`,`mode`]}).option(`direction`,{type:`string`,description:`Defines the direction used to sort returned rules.`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const N={command:`list`,describe:`List IP Access rules`,builder:p(M),handler:async e=>a({command:`user firewall access-rules list`,classification:{safeFlags:[`configuration-target`,`match`,`order`,`direction`,`dry-run`]}},e,async()=>{let a={"configuration.target":e[`configuration-target`],"configuration.value":e[`configuration-value`],notes:e.notes,match:e.match,page:e.page,per_page:e[`per-page`],order:e.order,direction:e.direction};if(e.dryRun){r({command:`cf user firewall access-rules list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/user/firewall/access_rules/rules`,pathParams:{},query:a,bodyKind:`none`});return}let o=await t(e);n(await i(`Loading`,async()=>o.user.firewall.accessRules.list(a)),{successLabel:`Loaded`})})},P={command:`access-rules`,describe:`Operations for firewall.access-rules`,builder:e=>e.command(T).command(D).command(k).command(j).command(N).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},F={command:`firewall`,describe:`Firewall operations`,builder:e=>e.command(P).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function I(e){return e.usage(`$0 user get
23
+
24
+ Retrieves detailed information about the currently authenticated user, including email, name, and account memberships.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const L={command:`get`,describe:`User Details`,builder:I,handler:async e=>a({command:`user get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf user get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/user`,pathParams:{},bodyKind:`none`});return}let a=await t(e);n(await i(`Loading`,async()=>a.user.get()),{successLabel:`Loaded`})})};function R(e){return e.usage(`$0 user invites get <invite-id>
25
+
26
+ Gets the details of an invitation.`).positional(`invite-id`,{type:`string`,description:`Invite identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const z={command:`get <invite-id>`,describe:`Invitation Details`,builder:R,handler:async e=>a({command:`user invites get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf user invites get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/user/invites/${e[`invite-id`]==null?`<invite-id>`:encodeURIComponent(String(e[`invite-id`]))}`,pathParams:{"invite-id":String(e[`invite-id`]??``)},bodyKind:`none`});return}let a=await t(e);n(await i(`Loading`,async()=>a.user.invites.get({invite_id:e[`invite-id`]})),{successLabel:`Loaded`})})};function B(e){return e.usage(`$0 user invites list
27
+
28
+ Lists all invitations associated with my user.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const V={command:`list`,describe:`List Invitations`,builder:B,handler:async e=>a({command:`user invites list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf user invites list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/user/invites`,pathParams:{},bodyKind:`none`});return}let a=await t(e);n(await i(`Loading`,async()=>a.user.invites.list()),{successLabel:`Loaded`})})};function H(e){return e.usage(`$0 user invites respond <invite-id>
29
+
30
+ Responds to an invitation.`).positional(`invite-id`,{type:`string`,description:`Invite 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 U={command:`respond <invite-id>`,describe:`Respond to Invitation`,builder:H,handler:async o=>a({command:`user invites respond`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf user invites respond`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/user/invites/${o[`invite-id`]==null?`<invite-id>`:encodeURIComponent(String(o[`invite-id`]))}`,pathParams:{"invite-id":String(o[`invite-id`]??``)},bodyKind:`json`,body:o.body===void 0?void 0:s(o.body)});return}let a=await t(o);if(o.body){let e=s(o.body);n(await i(`Updating`,async()=>a.user.invites.respond({...e,invite_id:o[`invite-id`]})),{successLabel:`Updated`});return}n(await i(`Updating`,async()=>e(a,`PATCH`,`/user/invites/${encodeURIComponent(String(o[`invite-id`]))}`)),{successLabel:`Updated`})})},W={command:`invites`,describe:`Operations for invites`,builder:e=>e.command(z).command(V).command(U).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function G(e){return e.usage(`$0 user load-balancers monitors create
31
+
32
+ Create a configured monitor.`).option(`allow-insecure`,{type:`boolean`,description:`Do not validate the certificate when monitor use HTTPS. This parameter is currently only valid for HTTP and HTTPS monitors.`,default:!1}).option(`consecutive-down`,{type:`number`,description:`To be marked unhealthy the monitored origin must fail this healthcheck N consecutive times.`}).option(`consecutive-up`,{type:`number`,description:`To be marked healthy the monitored origin must pass this healthcheck N consecutive times.`}).option(`description`,{type:`string`,description:`Object description.`,default:``}).option(`expected-body`,{type:`string`,description:`A case-insensitive sub-string to look for in the response body. If this string is not found, the origin will be marked as unhealthy. This parameter is only valid for HTTP and HTTPS monitors.`,default:``}).option(`expected-codes`,{type:`string`,description:`The expected HTTP response code or code range of the health check. This parameter is only valid for HTTP and HTTPS monitors.`,default:``}).option(`follow-redirects`,{type:`boolean`,description:`Follow redirects if returned by the origin. This parameter is only valid for HTTP and HTTPS monitors.`,default:!1}).option(`interval`,{type:`number`,description:`The interval between each health check. Shorter intervals may improve failover time, but will increase load on the origins as we check from multiple locations.`,default:60}).option(`method`,{type:`string`,description:`The method to use for the health check. This defaults to 'GET' for HTTP/HTTPS based checks and 'connection_established' for TCP based health checks.`}).option(`path`,{type:`string`,description:`The endpoint path you want to conduct a health check against. This parameter is only valid for HTTP and HTTPS monitors.`}).option(`port`,{type:`number`,description:`The port number to connect to for the health check. Required for TCP, UDP, and SMTP checks. HTTP and HTTPS checks should only define the port when using a non-standard port (HTTP: default 80, HTTPS: default 443).`}).option(`probe-zone`,{type:`string`,description:`Assign this monitor to emulate the specified zone while probing. This parameter is only valid for HTTP and HTTPS monitors.`,default:``}).option(`retries`,{type:`number`,description:`The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.`,default:2}).option(`timeout`,{type:`number`,description:`The timeout (in seconds) before marking the health check as failed.`,default:5}).option(`type`,{type:`string`,description:`The protocol to use for the health check. Currently supported protocols are 'HTTP','HTTPS', 'TCP', 'ICMP-PING', 'UDP-ICMP', and 'SMTP'.`,choices:[`http`,`https`,`tcp`,`udp_icmp`,`icmp_ping`,`smtp`],default:`http`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const K={command:`create`,describe:`Create Monitor`,builder:G,handler:async e=>a({command:`user load-balancers monitors create`,classification:{safeFlags:[`allow-insecure`,`follow-redirects`,`type`,`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf user load-balancers monitors create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/user/load_balancers/monitors`,pathParams:{},bodyKind:`json`,body:e.body===void 0?l({allow_insecure:e[`allow-insecure`],consecutive_down:e[`consecutive-down`],consecutive_up:e[`consecutive-up`],description:u(e.description,`description`,`text`),expected_body:u(e[`expected-body`],`expected-body`,`text`),expected_codes:u(e[`expected-codes`],`expected-codes`,`text`),follow_redirects:e[`follow-redirects`],interval:e.interval,method:u(e.method,`method`,`text`),path:u(e.path,`path`,`text`),port:e.port,probe_zone:u(e[`probe-zone`],`probe-zone`,`text`),retries:e.retries,timeout:e.timeout,type:u(e.type,`type`,`text`)}):s(e.body)});return}let a=await t(e);if(e.body){let t=s(e.body);n(await i(`Creating`,async()=>a.user.loadBalancers.monitors.create({...t})),{successLabel:`Created`});return}let o=l({allow_insecure:e[`allow-insecure`],consecutive_down:e[`consecutive-down`],consecutive_up:e[`consecutive-up`],description:u(e.description,`description`,`text`),expected_body:u(e[`expected-body`],`expected-body`,`text`),expected_codes:u(e[`expected-codes`],`expected-codes`,`text`),follow_redirects:e[`follow-redirects`],interval:e.interval,method:u(e.method,`method`,`text`),path:u(e.path,`path`,`text`),port:e.port,probe_zone:u(e[`probe-zone`],`probe-zone`,`text`),retries:e.retries,timeout:e.timeout,type:u(e.type,`type`,`text`)});n(await i(`Creating`,async()=>a.user.loadBalancers.monitors.create({...o})),{successLabel:`Created`})})};function q(e){return e.usage(`$0 user load-balancers monitors delete <monitor-id>
33
+
34
+ Delete a configured monitor.`).positional(`monitor-id`,{type:`string`,description:`Monitor ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const J={command:`delete <monitor-id>`,describe:`Delete Monitor`,builder:q,handler:async e=>a({command:`user load-balancers monitors delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){r({command:`cf user load-balancers monitors delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/user/load_balancers/monitors/${e[`monitor-id`]==null?`<monitor-id>`:encodeURIComponent(String(e[`monitor-id`]))}`,pathParams:{"monitor-id":String(e[`monitor-id`]??``)},bodyKind:`none`});return}let a=await t(e);if(!await f({force:!!e.force})){process.stderr.write(`Aborted.
35
+ `);return}n(await i(`Deleting`,async()=>a.user.loadBalancers.monitors.delete({monitor_id:e[`monitor-id`]})),{successLabel:`Deleted`})})};function Y(e){return e.usage(`$0 user load-balancers monitors edit <monitor-id>
36
+
37
+ Apply changes to an existing monitor, overwriting the supplied properties.`).positional(`monitor-id`,{type:`string`,description:`Monitor ID`,demandOption:!0}).option(`allow-insecure`,{type:`boolean`,description:`Do not validate the certificate when monitor use HTTPS. This parameter is currently only valid for HTTP and HTTPS monitors.`}).option(`consecutive-down`,{type:`number`,description:`To be marked unhealthy the monitored origin must fail this healthcheck N consecutive times.`}).option(`consecutive-up`,{type:`number`,description:`To be marked healthy the monitored origin must pass this healthcheck N consecutive times.`}).option(`description`,{type:`string`,description:`Object description.`}).option(`expected-body`,{type:`string`,description:`A case-insensitive sub-string to look for in the response body. If this string is not found, the origin will be marked as unhealthy. This parameter is only valid for HTTP and HTTPS monitors.`}).option(`expected-codes`,{type:`string`,description:`The expected HTTP response code or code range of the health check. This parameter is only valid for HTTP and HTTPS monitors.`}).option(`follow-redirects`,{type:`boolean`,description:`Follow redirects if returned by the origin. This parameter is only valid for HTTP and HTTPS monitors.`}).option(`interval`,{type:`number`,description:`The interval between each health check. Shorter intervals may improve failover time, but will increase load on the origins as we check from multiple locations.`}).option(`method`,{type:`string`,description:`The method to use for the health check. This defaults to 'GET' for HTTP/HTTPS based checks and 'connection_established' for TCP based health checks.`}).option(`path`,{type:`string`,description:`The endpoint path you want to conduct a health check against. This parameter is only valid for HTTP and HTTPS monitors.`}).option(`port`,{type:`number`,description:`The port number to connect to for the health check. Required for TCP, UDP, and SMTP checks. HTTP and HTTPS checks should only define the port when using a non-standard port (HTTP: default 80, HTTPS: default 443).`}).option(`probe-zone`,{type:`string`,description:`Assign this monitor to emulate the specified zone while probing. This parameter is only valid for HTTP and HTTPS monitors.`}).option(`retries`,{type:`number`,description:`The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.`}).option(`timeout`,{type:`number`,description:`The timeout (in seconds) before marking the health check as failed.`}).option(`type`,{type:`string`,description:`The protocol to use for the health check. Currently supported protocols are 'HTTP','HTTPS', 'TCP', 'ICMP-PING', 'UDP-ICMP', and 'SMTP'.`,choices:[`http`,`https`,`tcp`,`udp_icmp`,`icmp_ping`,`smtp`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const X={command:`edit <monitor-id>`,describe:`Patch Monitor`,builder:Y,handler:async e=>a({command:`user load-balancers monitors edit`,classification:{safeFlags:[`allow-insecure`,`follow-redirects`,`type`,`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf user load-balancers monitors edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/user/load_balancers/monitors/${e[`monitor-id`]==null?`<monitor-id>`:encodeURIComponent(String(e[`monitor-id`]))}`,pathParams:{"monitor-id":String(e[`monitor-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({allow_insecure:e[`allow-insecure`],consecutive_down:e[`consecutive-down`],consecutive_up:e[`consecutive-up`],description:u(e.description,`description`,`text`),expected_body:u(e[`expected-body`],`expected-body`,`text`),expected_codes:u(e[`expected-codes`],`expected-codes`,`text`),follow_redirects:e[`follow-redirects`],interval:e.interval,method:u(e.method,`method`,`text`),path:u(e.path,`path`,`text`),port:e.port,probe_zone:u(e[`probe-zone`],`probe-zone`,`text`),retries:e.retries,timeout:e.timeout,type:u(e.type,`type`,`text`)}):s(e.body)});return}let a=await t(e);if(e.body){let t=s(e.body);n(await i(`Updating`,async()=>a.user.loadBalancers.monitors.edit({body:t,monitor_id:e[`monitor-id`]})),{successLabel:`Updated`});return}let o=l({allow_insecure:e[`allow-insecure`],consecutive_down:e[`consecutive-down`],consecutive_up:e[`consecutive-up`],description:u(e.description,`description`,`text`),expected_body:u(e[`expected-body`],`expected-body`,`text`),expected_codes:u(e[`expected-codes`],`expected-codes`,`text`),follow_redirects:e[`follow-redirects`],interval:e.interval,method:u(e.method,`method`,`text`),path:u(e.path,`path`,`text`),port:e.port,probe_zone:u(e[`probe-zone`],`probe-zone`,`text`),retries:e.retries,timeout:e.timeout,type:u(e.type,`type`,`text`)});n(await i(`Updating`,async()=>a.user.loadBalancers.monitors.edit({body:o,monitor_id:e[`monitor-id`]})),{successLabel:`Updated`})})};function Z(e){return e.usage(`$0 user load-balancers monitors get <monitor-id>
38
+
39
+ List a single configured monitor for a user.`).positional(`monitor-id`,{type:`string`,description:`Monitor ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Q={command:`get <monitor-id>`,describe:`Monitor Details`,builder:Z,handler:async e=>a({command:`user load-balancers monitors get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf user load-balancers monitors get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/user/load_balancers/monitors/${e[`monitor-id`]==null?`<monitor-id>`:encodeURIComponent(String(e[`monitor-id`]))}`,pathParams:{"monitor-id":String(e[`monitor-id`]??``)},bodyKind:`none`});return}let a=await t(e);n(await i(`Loading`,async()=>a.user.loadBalancers.monitors.get({monitor_id:e[`monitor-id`]})),{successLabel:`Loaded`})})};function ne(e){return e.usage(`$0 user load-balancers monitors list
40
+
41
+ List configured monitors for a user.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const re={command:`list`,describe:`List Monitors`,builder:ne,handler:async e=>a({command:`user load-balancers monitors list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf user load-balancers monitors list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/user/load_balancers/monitors`,pathParams:{},bodyKind:`none`});return}let a=await t(e);n(await i(`Loading`,async()=>a.user.loadBalancers.monitors.list()),{successLabel:`Loaded`})})};function ie(e){return e.usage(`$0 user load-balancers monitors preview create <monitor-id>
42
+
43
+ Preview pools using the specified monitor with provided monitor details. The returned preview_id can be used in the preview endpoint to retrieve the results.`).positional(`monitor-id`,{type:`string`,description:`Monitor ID`,demandOption:!0}).option(`allow-insecure`,{type:`boolean`,description:`Do not validate the certificate when monitor use HTTPS. This parameter is currently only valid for HTTP and HTTPS monitors.`,default:!1}).option(`consecutive-down`,{type:`number`,description:`To be marked unhealthy the monitored origin must fail this healthcheck N consecutive times.`}).option(`consecutive-up`,{type:`number`,description:`To be marked healthy the monitored origin must pass this healthcheck N consecutive times.`}).option(`description`,{type:`string`,description:`Object description.`,default:``}).option(`expected-body`,{type:`string`,description:`A case-insensitive sub-string to look for in the response body. If this string is not found, the origin will be marked as unhealthy. This parameter is only valid for HTTP and HTTPS monitors.`,default:``}).option(`expected-codes`,{type:`string`,description:`The expected HTTP response code or code range of the health check. This parameter is only valid for HTTP and HTTPS monitors.`,default:``}).option(`follow-redirects`,{type:`boolean`,description:`Follow redirects if returned by the origin. This parameter is only valid for HTTP and HTTPS monitors.`,default:!1}).option(`interval`,{type:`number`,description:`The interval between each health check. Shorter intervals may improve failover time, but will increase load on the origins as we check from multiple locations.`,default:60}).option(`method`,{type:`string`,description:`The method to use for the health check. This defaults to 'GET' for HTTP/HTTPS based checks and 'connection_established' for TCP based health checks.`}).option(`path`,{type:`string`,description:`The endpoint path you want to conduct a health check against. This parameter is only valid for HTTP and HTTPS monitors.`}).option(`port`,{type:`number`,description:`The port number to connect to for the health check. Required for TCP, UDP, and SMTP checks. HTTP and HTTPS checks should only define the port when using a non-standard port (HTTP: default 80, HTTPS: default 443).`}).option(`probe-zone`,{type:`string`,description:`Assign this monitor to emulate the specified zone while probing. This parameter is only valid for HTTP and HTTPS monitors.`,default:``}).option(`retries`,{type:`number`,description:`The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.`,default:2}).option(`timeout`,{type:`number`,description:`The timeout (in seconds) before marking the health check as failed.`,default:5}).option(`type`,{type:`string`,description:`The protocol to use for the health check. Currently supported protocols are 'HTTP','HTTPS', 'TCP', 'ICMP-PING', 'UDP-ICMP', and 'SMTP'.`,choices:[`http`,`https`,`tcp`,`udp_icmp`,`icmp_ping`,`smtp`],default:`http`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ae={command:`create <monitor-id>`,describe:`Preview Monitor`,builder:ie,handler:async e=>a({command:`user load-balancers monitors preview create`,classification:{safeFlags:[`allow-insecure`,`follow-redirects`,`type`,`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf user load-balancers monitors preview create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/user/load_balancers/monitors/${e[`monitor-id`]==null?`<monitor-id>`:encodeURIComponent(String(e[`monitor-id`]))}/preview`,pathParams:{"monitor-id":String(e[`monitor-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({allow_insecure:e[`allow-insecure`],consecutive_down:e[`consecutive-down`],consecutive_up:e[`consecutive-up`],description:u(e.description,`description`,`text`),expected_body:u(e[`expected-body`],`expected-body`,`text`),expected_codes:u(e[`expected-codes`],`expected-codes`,`text`),follow_redirects:e[`follow-redirects`],interval:e.interval,method:u(e.method,`method`,`text`),path:u(e.path,`path`,`text`),port:e.port,probe_zone:u(e[`probe-zone`],`probe-zone`,`text`),retries:e.retries,timeout:e.timeout,type:u(e.type,`type`,`text`)}):s(e.body)});return}let a=await t(e);if(e.body){let t=s(e.body);n(await i(`Creating`,async()=>a.user.loadBalancers.monitors.preview.create({body:t,monitor_id:e[`monitor-id`]})),{successLabel:`Created`});return}let o=l({allow_insecure:e[`allow-insecure`],consecutive_down:e[`consecutive-down`],consecutive_up:e[`consecutive-up`],description:u(e.description,`description`,`text`),expected_body:u(e[`expected-body`],`expected-body`,`text`),expected_codes:u(e[`expected-codes`],`expected-codes`,`text`),follow_redirects:e[`follow-redirects`],interval:e.interval,method:u(e.method,`method`,`text`),path:u(e.path,`path`,`text`),port:e.port,probe_zone:u(e[`probe-zone`],`probe-zone`,`text`),retries:e.retries,timeout:e.timeout,type:u(e.type,`type`,`text`)});n(await i(`Creating`,async()=>a.user.loadBalancers.monitors.preview.create({body:o,monitor_id:e[`monitor-id`]})),{successLabel:`Created`})})},oe={command:`preview`,describe:`Load Balancers operations`,builder:e=>e.command(ae).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function se(e){return e.usage(`$0 user load-balancers monitors references list
44
+
45
+ Get the list of resources that reference the provided monitor.`).option(`monitor-id`,{type:`string`,description:`Monitor ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ce={command:`list`,describe:`List Monitor References`,builder:se,handler:async e=>a({command:`user load-balancers monitors references list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf user load-balancers monitors references list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/user/load_balancers/monitors/${e[`monitor-id`]==null?`<monitor-id>`:encodeURIComponent(String(e[`monitor-id`]))}/references`,pathParams:{"monitor-id":String(e[`monitor-id`]??``)},bodyKind:`none`});return}let a=await t(e);n(await i(`Loading`,async()=>a.user.loadBalancers.monitors.references.list({monitor_id:e[`monitor-id`]})),{successLabel:`Loaded`})})},le={command:`references`,describe:`Load Balancers operations`,builder:e=>e.command(ce).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ue(e){return e.usage(`$0 user load-balancers monitors update <monitor-id>
46
+
47
+ Modify a configured monitor.`).positional(`monitor-id`,{type:`string`,description:`Monitor ID`,demandOption:!0}).option(`allow-insecure`,{type:`boolean`,description:`Do not validate the certificate when monitor use HTTPS. This parameter is currently only valid for HTTP and HTTPS monitors.`}).option(`consecutive-down`,{type:`number`,description:`To be marked unhealthy the monitored origin must fail this healthcheck N consecutive times.`}).option(`consecutive-up`,{type:`number`,description:`To be marked healthy the monitored origin must pass this healthcheck N consecutive times.`}).option(`description`,{type:`string`,description:`Object description.`}).option(`expected-body`,{type:`string`,description:`A case-insensitive sub-string to look for in the response body. If this string is not found, the origin will be marked as unhealthy. This parameter is only valid for HTTP and HTTPS monitors.`}).option(`expected-codes`,{type:`string`,description:`The expected HTTP response code or code range of the health check. This parameter is only valid for HTTP and HTTPS monitors.`}).option(`follow-redirects`,{type:`boolean`,description:`Follow redirects if returned by the origin. This parameter is only valid for HTTP and HTTPS monitors.`}).option(`interval`,{type:`number`,description:`The interval between each health check. Shorter intervals may improve failover time, but will increase load on the origins as we check from multiple locations.`}).option(`method`,{type:`string`,description:`The method to use for the health check. This defaults to 'GET' for HTTP/HTTPS based checks and 'connection_established' for TCP based health checks.`}).option(`path`,{type:`string`,description:`The endpoint path you want to conduct a health check against. This parameter is only valid for HTTP and HTTPS monitors.`}).option(`port`,{type:`number`,description:`The port number to connect to for the health check. Required for TCP, UDP, and SMTP checks. HTTP and HTTPS checks should only define the port when using a non-standard port (HTTP: default 80, HTTPS: default 443).`}).option(`probe-zone`,{type:`string`,description:`Assign this monitor to emulate the specified zone while probing. This parameter is only valid for HTTP and HTTPS monitors.`}).option(`retries`,{type:`number`,description:`The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.`}).option(`timeout`,{type:`number`,description:`The timeout (in seconds) before marking the health check as failed.`}).option(`type`,{type:`string`,description:`The protocol to use for the health check. Currently supported protocols are 'HTTP','HTTPS', 'TCP', 'ICMP-PING', 'UDP-ICMP', and 'SMTP'.`,choices:[`http`,`https`,`tcp`,`udp_icmp`,`icmp_ping`,`smtp`]}).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 de={command:`update <monitor-id>`,describe:`Update Monitor`,builder:ue,handler:async e=>a({command:`user load-balancers monitors update`,classification:{safeFlags:[`allow-insecure`,`follow-redirects`,`type`,`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf user load-balancers monitors update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/user/load_balancers/monitors/${e[`monitor-id`]==null?`<monitor-id>`:encodeURIComponent(String(e[`monitor-id`]))}`,pathParams:{"monitor-id":String(e[`monitor-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({allow_insecure:e[`allow-insecure`],consecutive_down:e[`consecutive-down`],consecutive_up:e[`consecutive-up`],description:u(e.description,`description`,`text`),expected_body:u(e[`expected-body`],`expected-body`,`text`),expected_codes:u(e[`expected-codes`],`expected-codes`,`text`),follow_redirects:e[`follow-redirects`],interval:e.interval,method:u(e.method,`method`,`text`),path:u(e.path,`path`,`text`),port:e.port,probe_zone:u(e[`probe-zone`],`probe-zone`,`text`),retries:e.retries,timeout:e.timeout,type:u(e.type,`type`,`text`)}):s(e.body)});return}let a=await t(e);if(e.body){let t=s(e.body);n(await i(`Updating`,async()=>a.user.loadBalancers.monitors.update({body:t,monitor_id:e[`monitor-id`]})),{successLabel:`Updated`});return}let o=l({allow_insecure:e[`allow-insecure`],consecutive_down:e[`consecutive-down`],consecutive_up:e[`consecutive-up`],description:u(e.description,`description`,`text`),expected_body:u(e[`expected-body`],`expected-body`,`text`),expected_codes:u(e[`expected-codes`],`expected-codes`,`text`),follow_redirects:e[`follow-redirects`],interval:e.interval,method:u(e.method,`method`,`text`),path:u(e.path,`path`,`text`),port:e.port,probe_zone:u(e[`probe-zone`],`probe-zone`,`text`),retries:e.retries,timeout:e.timeout,type:u(e.type,`type`,`text`)});n(await i(`Updating`,async()=>a.user.loadBalancers.monitors.update({body:o,monitor_id:e[`monitor-id`]})),{successLabel:`Updated`})})},fe={command:`monitors`,describe:`Load Balancers operations`,builder:e=>e.command(K).command(J).command(X).command(Q).command(re).command(de).command(oe).command(le).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function pe(e){return e.usage(`$0 user load-balancers pools create
48
+
49
+ Create a new pool.`).option(`check-regions`,{type:`string`,array:!0,description:`A list of regions from which to run health checks. Null means every Cloudflare data center.`}).option(`description`,{type:`string`,description:`A human-readable description of the pool.`,default:``}).option(`enabled`,{type:`boolean`,description:`Whether to enable (the default) or disable this pool. Disabled pools will not receive traffic and are excluded from health checks. Disabling a pool will cause any load balancers using it to failover to the next pool (if any).`,default:!0}).option(`health-sources`,{type:`string`,array:!0,description:`A list of health sources, ordered from highest to lowest priority, used to evaluate individual origin health and overall pool health. The load balancer uses the first source that has data and falls back to the next. Currently accepted values are null or the exact array ["regional", "global"]; any other combination is rejected. Null (the default) behaves like ["local", "global"]. ["regional", "global"] makes each region steer on its own health, falling back to the global decision when a region has no fresh data. Setting regional requires at least one region in check_regions.`}).option(`latitude`,{type:`number`,description:`The latitude of the data center containing the origins used in this pool in decimal degrees. If this is set, longitude must also be set.`}).option(`load-shedding-default-percent`,{type:`number`,description:`The percent of traffic to shed from the pool, according to the default policy. Applies to new sessions and traffic without session affinity.`}).option(`load-shedding-default-policy`,{type:`string`,description:`The default policy to use when load shedding. A random policy randomly sheds a given percent of requests. A hash policy computes a hash over the CF-Connecting-IP address and sheds all requests originating from a percent of IPs.`,choices:[`random`,`hash`]}).option(`load-shedding-session-percent`,{type:`number`,description:`The percent of existing sessions to shed from the pool, according to the session policy.`}).option(`load-shedding-session-policy`,{type:`string`,description:`Only the hash policy is supported for existing sessions (to avoid exponential decay).`,choices:[`hash`]}).option(`longitude`,{type:`number`,description:`The longitude of the data center containing the origins used in this pool in decimal degrees. If this is set, latitude must also be set.`}).option(`minimum-origins`,{type:`number`,description:`The minimum number of origins that must be healthy for this pool to serve traffic. If the number of healthy origins falls below this number, the pool will be marked unhealthy and will failover to the next available pool.`,default:1}).option(`monitor`,{type:`string`,description:`The ID of the Monitor to use for checking the health of origins within this pool.`}).option(`monitor-group`,{type:`string`,description:`The ID of the Monitor Group to use for checking the health of origins within this pool.`}).option(`name`,{type:`string`,description:`A short name (tag) for the pool. Only alphanumeric characters, hyphens, and underscores are allowed.`}).option(`networks`,{type:`string`,array:!0,description:`List of networks where Load Balancer or Pool is enabled.`}).option(`notification-email`,{type:`string`,description:`This field is now deprecated. It has been moved to Cloudflare's Centralized Notification service https://developers.cloudflare.com/fundamentals/notifications/. The email address to send health status notifications to. This can be an individual mailbox or a mailing list. Multiple emails can be supplied as a comma delimited list.`,default:``}).option(`notification-filter-origin-disable`,{type:`boolean`,description:`If set true, disable notifications for this type of resource (pool or origin).`}).option(`notification-filter-origin-healthy`,{type:`boolean`,description:`If present, send notifications only for this health status (e.g. false for only DOWN events). Use null to reset (all events).`}).option(`notification-filter-pool-disable`,{type:`boolean`,description:`If set true, disable notifications for this type of resource (pool or origin).`}).option(`notification-filter-pool-healthy`,{type:`boolean`,description:`If present, send notifications only for this health status (e.g. false for only DOWN events). Use null to reset (all events).`}).option(`origin-steering-policy`,{type:`string`,description:'The type of origin steering policy to use.\n- `"random"`: Select an origin randomly.\n- `"hash"`: Select an origin by computing a hash over the CF-Connecting-IP address.\n- `"least_outstanding_requests"`: Select an origin by taking into consideration origin weights, as well as each origin\'s number of outstanding requests. Origins with more pending requests are weighted proportionately less relative to others.\n- `"least_connections"`: Select an origin by taking into consideration origin weights, as well as each origin\'s number of open connections. Origins with more open connections are weighted proportionately less relative to others. Supported for HTTP/1 and HTTP/2 connections.',choices:[`random`,`hash`,`least_outstanding_requests`,`least_connections`]}).option(`origins`,{type:`string`,description:`The list of origins within this pool. Traffic directed at this pool is balanced across all currently healthy origins, provided the pool itself is healthy. 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 me={command:`create`,describe:`Create Pool`,builder:pe,handler:async e=>a({command:`user load-balancers pools create`,classification:{safeFlags:[`enabled`,`load-shedding-default-policy`,`load-shedding-session-policy`,`notification-filter-origin-disable`,`notification-filter-origin-healthy`,`notification-filter-pool-disable`,`notification-filter-pool-healthy`,`origin-steering-policy`,`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf user load-balancers pools create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/user/load_balancers/pools`,pathParams:{},bodyKind:`json`,body:e.body===void 0?l({check_regions:e[`check-regions`],description:u(e.description,`description`,`text`),enabled:e.enabled,health_sources:e[`health-sources`],latitude:e.latitude,load_shedding:{default_percent:e[`load-shedding-default-percent`],default_policy:u(e[`load-shedding-default-policy`],`load-shedding-default-policy`,`text`),session_percent:e[`load-shedding-session-percent`],session_policy:u(e[`load-shedding-session-policy`],`load-shedding-session-policy`,`text`)},longitude:e.longitude,minimum_origins:e[`minimum-origins`],monitor:u(e.monitor,`monitor`,`text`),monitor_group:u(e[`monitor-group`],`monitor-group`,`text`),name:u(e.name,`name`,`text`),networks:e.networks,notification_email:u(e[`notification-email`],`notification-email`,`text`),notification_filter:{origin:{disable:e[`notification-filter-origin-disable`],healthy:e[`notification-filter-origin-healthy`]},pool:{disable:e[`notification-filter-pool-disable`],healthy:e[`notification-filter-pool-healthy`]}},origin_steering:{policy:u(e[`origin-steering-policy`],`origin-steering-policy`,`text`)},origins:c(e.origins,`origins`)}):s(e.body)});return}let a=await t(e);if(e.body){let t=s(e.body);n(await i(`Creating`,async()=>a.user.loadBalancers.pools.create({...t})),{successLabel:`Created`});return}if(e.name===void 0&&(e.name=await d(`name`,`A short name (tag) for the pool. Only alphanumeric characters, hyphens, and underscores are allowed.`)),e.origins===void 0)throw Error(`--origins is required (or pass --body with this field set).`);let o=l({check_regions:e[`check-regions`],description:u(e.description,`description`,`text`),enabled:e.enabled,health_sources:e[`health-sources`],latitude:e.latitude,load_shedding:{default_percent:e[`load-shedding-default-percent`],default_policy:u(e[`load-shedding-default-policy`],`load-shedding-default-policy`,`text`),session_percent:e[`load-shedding-session-percent`],session_policy:u(e[`load-shedding-session-policy`],`load-shedding-session-policy`,`text`)},longitude:e.longitude,minimum_origins:e[`minimum-origins`],monitor:u(e.monitor,`monitor`,`text`),monitor_group:u(e[`monitor-group`],`monitor-group`,`text`),name:u(e.name,`name`,`text`),networks:e.networks,notification_email:u(e[`notification-email`],`notification-email`,`text`),notification_filter:{origin:{disable:e[`notification-filter-origin-disable`],healthy:e[`notification-filter-origin-healthy`]},pool:{disable:e[`notification-filter-pool-disable`],healthy:e[`notification-filter-pool-healthy`]}},origin_steering:{policy:u(e[`origin-steering-policy`],`origin-steering-policy`,`text`)},origins:c(e.origins,`origins`)});n(await i(`Creating`,async()=>a.user.loadBalancers.pools.create({...o})),{successLabel:`Created`})})};function he(e){return e.usage(`$0 user load-balancers pools delete <pool-id>
50
+
51
+ Delete a configured pool.`).positional(`pool-id`,{type:`string`,description:`Pool ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ge={command:`delete <pool-id>`,describe:`Delete Pool`,builder:he,handler:async e=>a({command:`user load-balancers pools delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){r({command:`cf user load-balancers pools delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/user/load_balancers/pools/${e[`pool-id`]==null?`<pool-id>`:encodeURIComponent(String(e[`pool-id`]))}`,pathParams:{"pool-id":String(e[`pool-id`]??``)},bodyKind:`none`});return}let a=await t(e);if(!await f({force:!!e.force})){process.stderr.write(`Aborted.
52
+ `);return}n(await i(`Deleting`,async()=>a.user.loadBalancers.pools.delete({pool_id:e[`pool-id`]})),{successLabel:`Deleted`})})};function _e(e){return e.usage(`$0 user load-balancers pools edit pools pool <pool-id>
53
+
54
+ Apply changes to an existing pool, overwriting the supplied properties.`).positional(`pool-id`,{type:`string`,description:`Pool ID`,demandOption:!0}).option(`check-regions`,{type:`string`,array:!0,description:`A list of regions from which to run health checks. Null means every Cloudflare data center.`}).option(`description`,{type:`string`,description:`A human-readable description of the pool.`}).option(`enabled`,{type:`boolean`,description:`Whether to enable (the default) or disable this pool. Disabled pools will not receive traffic and are excluded from health checks. Disabling a pool will cause any load balancers using it to failover to the next pool (if any).`}).option(`health-sources`,{type:`string`,array:!0,description:`A list of health sources, ordered from highest to lowest priority, used to evaluate individual origin health and overall pool health. The load balancer uses the first source that has data and falls back to the next. Currently accepted values are null or the exact array ["regional", "global"]; any other combination is rejected. Null (the default) behaves like ["local", "global"]. ["regional", "global"] makes each region steer on its own health, falling back to the global decision when a region has no fresh data. Setting regional requires at least one region in check_regions.`}).option(`latitude`,{type:`number`,description:`The latitude of the data center containing the origins used in this pool in decimal degrees. If this is set, longitude must also be set.`}).option(`load-shedding-default-percent`,{type:`number`,description:`The percent of traffic to shed from the pool, according to the default policy. Applies to new sessions and traffic without session affinity.`}).option(`load-shedding-default-policy`,{type:`string`,description:`The default policy to use when load shedding. A random policy randomly sheds a given percent of requests. A hash policy computes a hash over the CF-Connecting-IP address and sheds all requests originating from a percent of IPs.`,choices:[`random`,`hash`]}).option(`load-shedding-session-percent`,{type:`number`,description:`The percent of existing sessions to shed from the pool, according to the session policy.`}).option(`load-shedding-session-policy`,{type:`string`,description:`Only the hash policy is supported for existing sessions (to avoid exponential decay).`,choices:[`hash`]}).option(`longitude`,{type:`number`,description:`The longitude of the data center containing the origins used in this pool in decimal degrees. If this is set, latitude must also be set.`}).option(`minimum-origins`,{type:`number`,description:`The minimum number of origins that must be healthy for this pool to serve traffic. If the number of healthy origins falls below this number, the pool will be marked unhealthy and will failover to the next available pool.`}).option(`monitor`,{type:`string`,description:`The ID of the Monitor to use for checking the health of origins within this pool.`}).option(`monitor-group`,{type:`string`,description:`The ID of the Monitor Group to use for checking the health of origins within this pool.`}).option(`name`,{type:`string`,description:`A short name (tag) for the pool. Only alphanumeric characters, hyphens, and underscores are allowed.`}).option(`notification-email`,{type:`string`,description:`This field is now deprecated. It has been moved to Cloudflare's Centralized Notification service https://developers.cloudflare.com/fundamentals/notifications/. The email address to send health status notifications to. This can be an individual mailbox or a mailing list. Multiple emails can be supplied as a comma delimited list.`}).option(`notification-filter-origin-disable`,{type:`boolean`,description:`If set true, disable notifications for this type of resource (pool or origin).`}).option(`notification-filter-origin-healthy`,{type:`boolean`,description:`If present, send notifications only for this health status (e.g. false for only DOWN events). Use null to reset (all events).`}).option(`notification-filter-pool-disable`,{type:`boolean`,description:`If set true, disable notifications for this type of resource (pool or origin).`}).option(`notification-filter-pool-healthy`,{type:`boolean`,description:`If present, send notifications only for this health status (e.g. false for only DOWN events). Use null to reset (all events).`}).option(`origin-steering-policy`,{type:`string`,description:'The type of origin steering policy to use.\n- `"random"`: Select an origin randomly.\n- `"hash"`: Select an origin by computing a hash over the CF-Connecting-IP address.\n- `"least_outstanding_requests"`: Select an origin by taking into consideration origin weights, as well as each origin\'s number of outstanding requests. Origins with more pending requests are weighted proportionately less relative to others.\n- `"least_connections"`: Select an origin by taking into consideration origin weights, as well as each origin\'s number of open connections. Origins with more open connections are weighted proportionately less relative to others. Supported for HTTP/1 and HTTP/2 connections.',choices:[`random`,`hash`,`least_outstanding_requests`,`least_connections`]}).option(`origins`,{type:`string`,description:`The list of origins within this pool. Traffic directed at this pool is balanced across all currently healthy origins, provided the pool itself is healthy. 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 ve={command:`pool <pool-id>`,describe:`Patch Pool`,builder:_e,handler:async e=>a({command:`user load-balancers pools edit pools pool`,classification:{safeFlags:[`enabled`,`load-shedding-default-policy`,`load-shedding-session-policy`,`notification-filter-origin-disable`,`notification-filter-origin-healthy`,`notification-filter-pool-disable`,`notification-filter-pool-healthy`,`origin-steering-policy`,`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf user load-balancers pools edit pools pool`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/user/load_balancers/pools/${e[`pool-id`]==null?`<pool-id>`:encodeURIComponent(String(e[`pool-id`]))}`,pathParams:{"pool-id":String(e[`pool-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({check_regions:e[`check-regions`],description:u(e.description,`description`,`text`),enabled:e.enabled,health_sources:e[`health-sources`],latitude:e.latitude,load_shedding:{default_percent:e[`load-shedding-default-percent`],default_policy:u(e[`load-shedding-default-policy`],`load-shedding-default-policy`,`text`),session_percent:e[`load-shedding-session-percent`],session_policy:u(e[`load-shedding-session-policy`],`load-shedding-session-policy`,`text`)},longitude:e.longitude,minimum_origins:e[`minimum-origins`],monitor:u(e.monitor,`monitor`,`text`),monitor_group:u(e[`monitor-group`],`monitor-group`,`text`),name:u(e.name,`name`,`text`),notification_email:u(e[`notification-email`],`notification-email`,`text`),notification_filter:{origin:{disable:e[`notification-filter-origin-disable`],healthy:e[`notification-filter-origin-healthy`]},pool:{disable:e[`notification-filter-pool-disable`],healthy:e[`notification-filter-pool-healthy`]}},origin_steering:{policy:u(e[`origin-steering-policy`],`origin-steering-policy`,`text`)},origins:c(e.origins,`origins`)}):s(e.body)});return}let a=await t(e);if(e.body){let t=s(e.body);n(await i(`Updating`,async()=>a.user.loadBalancers.pools.edit.pools.pool({...t,pool_id:e[`pool-id`]})),{successLabel:`Updated`});return}let o=l({check_regions:e[`check-regions`],description:u(e.description,`description`,`text`),enabled:e.enabled,health_sources:e[`health-sources`],latitude:e.latitude,load_shedding:{default_percent:e[`load-shedding-default-percent`],default_policy:u(e[`load-shedding-default-policy`],`load-shedding-default-policy`,`text`),session_percent:e[`load-shedding-session-percent`],session_policy:u(e[`load-shedding-session-policy`],`load-shedding-session-policy`,`text`)},longitude:e.longitude,minimum_origins:e[`minimum-origins`],monitor:u(e.monitor,`monitor`,`text`),monitor_group:u(e[`monitor-group`],`monitor-group`,`text`),name:u(e.name,`name`,`text`),notification_email:u(e[`notification-email`],`notification-email`,`text`),notification_filter:{origin:{disable:e[`notification-filter-origin-disable`],healthy:e[`notification-filter-origin-healthy`]},pool:{disable:e[`notification-filter-pool-disable`],healthy:e[`notification-filter-pool-healthy`]}},origin_steering:{policy:u(e[`origin-steering-policy`],`origin-steering-policy`,`text`)},origins:c(e.origins,`origins`)});n(await i(`Updating`,async()=>a.user.loadBalancers.pools.edit.pools.pool({...o,pool_id:e[`pool-id`]})),{successLabel:`Updated`})})};function ye(e){return e.usage("$0 user load-balancers pools edit pools pools\n\nApply changes to a number of existing pools, overwriting the supplied properties. Pools are ordered by ascending `name`. Returns the list of affected pools. Supports the standard pagination query parameters, either `limit`/`offset` or `per_page`/`page`.").option(`notification-email`,{type:`string`,description:'The email address to send health status notifications to. This field is now deprecated in favor of Cloudflare Notifications for Load Balancing, so only resetting this field with an empty string `""` is accepted.'}).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 be={command:`pools`,describe:`Patch Pools`,builder:ye,handler:async c=>a({command:`user load-balancers pools edit pools pools`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){r({command:`cf user load-balancers pools edit pools pools`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/user/load_balancers/pools`,pathParams:{},bodyKind:`json`,body:c.body===void 0?l({notification_email:u(c[`notification-email`],`notification-email`,`text`)}):s(c.body)});return}let a=await t(c);if(c.body){let t=s(c.body);n(await i(`Updating`,async()=>e(a,`PATCH`,`/user/load_balancers/pools`,{body:t})),{successLabel:`Updated`});return}let d={};c[`notification-email`]!==void 0&&o(d,[`notification_email`],u(c[`notification-email`],`notification-email`,`text`)),n(await i(`Updating`,async()=>e(a,`PATCH`,`/user/load_balancers/pools`,{body:Object.keys(d).length>0?d:void 0})),{successLabel:`Updated`})})},xe={command:`pools`,describe:`Load Balancers operations`,builder:e=>e.command(ve).command(be).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Se={command:`edit`,describe:`Operations for load-balancers.pools.edit`,builder:e=>e.command(xe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ce(e){return e.usage(`$0 user load-balancers pools get <pool-id>
55
+
56
+ Fetch a single configured pool.`).positional(`pool-id`,{type:`string`,description:`Pool ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const we={command:`get <pool-id>`,describe:`Pool Details`,builder:Ce,handler:async e=>a({command:`user load-balancers pools get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf user load-balancers pools get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/user/load_balancers/pools/${e[`pool-id`]==null?`<pool-id>`:encodeURIComponent(String(e[`pool-id`]))}`,pathParams:{"pool-id":String(e[`pool-id`]??``)},bodyKind:`none`});return}let a=await t(e);n(await i(`Loading`,async()=>a.user.loadBalancers.pools.get({pool_id:e[`pool-id`]})),{successLabel:`Loaded`})})};function Te(e){return e.usage(`$0 user load-balancers pools health get <pool-id>
57
+
58
+ Fetch the latest pool health status for a single pool.`).positional(`pool-id`,{type:`string`,description:`Pool ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ee={command:`get <pool-id>`,describe:`Pool Health Details`,builder:Te,handler:async e=>a({command:`user load-balancers pools health get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf user load-balancers pools health get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/user/load_balancers/pools/${e[`pool-id`]==null?`<pool-id>`:encodeURIComponent(String(e[`pool-id`]))}/health`,pathParams:{"pool-id":String(e[`pool-id`]??``)},bodyKind:`none`});return}let a=await t(e);n(await i(`Loading`,async()=>a.user.loadBalancers.pools.health.get({pool_id:e[`pool-id`]})),{successLabel:`Loaded`})})},De={command:`health`,describe:`Load Balancers operations`,builder:e=>e.command(Ee).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Oe(e){return e.usage(`$0 user load-balancers pools list
59
+
60
+ List configured pools.`).option(`monitor`,{type:`string`,description:`The ID of the Monitor to use for checking the health of origins within this pool.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ke={command:`list`,describe:`List Pools`,builder:Oe,handler:async e=>a({command:`user load-balancers pools list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let a={monitor:e.monitor};if(e.dryRun){r({command:`cf user load-balancers pools list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/user/load_balancers/pools`,pathParams:{},query:a,bodyKind:`none`});return}let o=await t(e);n(await i(`Loading`,async()=>o.user.loadBalancers.pools.list(a)),{successLabel:`Loaded`})})};function Ae(e){return e.usage(`$0 user load-balancers pools preview create <pool-id>
61
+
62
+ Preview pool health using provided monitor details. The returned preview_id can be used in the preview endpoint to retrieve the results.`).positional(`pool-id`,{type:`string`,description:`Pool ID`,demandOption:!0}).option(`allow-insecure`,{type:`boolean`,description:`Do not validate the certificate when monitor use HTTPS. This parameter is currently only valid for HTTP and HTTPS monitors.`,default:!1}).option(`consecutive-down`,{type:`number`,description:`To be marked unhealthy the monitored origin must fail this healthcheck N consecutive times.`}).option(`consecutive-up`,{type:`number`,description:`To be marked healthy the monitored origin must pass this healthcheck N consecutive times.`}).option(`description`,{type:`string`,description:`Object description.`,default:``}).option(`expected-body`,{type:`string`,description:`A case-insensitive sub-string to look for in the response body. If this string is not found, the origin will be marked as unhealthy. This parameter is only valid for HTTP and HTTPS monitors.`,default:``}).option(`expected-codes`,{type:`string`,description:`The expected HTTP response code or code range of the health check. This parameter is only valid for HTTP and HTTPS monitors.`,default:``}).option(`follow-redirects`,{type:`boolean`,description:`Follow redirects if returned by the origin. This parameter is only valid for HTTP and HTTPS monitors.`,default:!1}).option(`interval`,{type:`number`,description:`The interval between each health check. Shorter intervals may improve failover time, but will increase load on the origins as we check from multiple locations.`,default:60}).option(`method`,{type:`string`,description:`The method to use for the health check. This defaults to 'GET' for HTTP/HTTPS based checks and 'connection_established' for TCP based health checks.`}).option(`path`,{type:`string`,description:`The endpoint path you want to conduct a health check against. This parameter is only valid for HTTP and HTTPS monitors.`}).option(`port`,{type:`number`,description:`The port number to connect to for the health check. Required for TCP, UDP, and SMTP checks. HTTP and HTTPS checks should only define the port when using a non-standard port (HTTP: default 80, HTTPS: default 443).`}).option(`probe-zone`,{type:`string`,description:`Assign this monitor to emulate the specified zone while probing. This parameter is only valid for HTTP and HTTPS monitors.`,default:``}).option(`retries`,{type:`number`,description:`The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.`,default:2}).option(`timeout`,{type:`number`,description:`The timeout (in seconds) before marking the health check as failed.`,default:5}).option(`type`,{type:`string`,description:`The protocol to use for the health check. Currently supported protocols are 'HTTP','HTTPS', 'TCP', 'ICMP-PING', 'UDP-ICMP', and 'SMTP'.`,choices:[`http`,`https`,`tcp`,`udp_icmp`,`icmp_ping`,`smtp`],default:`http`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const je={command:`create <pool-id>`,describe:`Preview Pool`,builder:Ae,handler:async e=>a({command:`user load-balancers pools preview create`,classification:{safeFlags:[`allow-insecure`,`follow-redirects`,`type`,`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf user load-balancers pools preview create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/user/load_balancers/pools/${e[`pool-id`]==null?`<pool-id>`:encodeURIComponent(String(e[`pool-id`]))}/preview`,pathParams:{"pool-id":String(e[`pool-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({allow_insecure:e[`allow-insecure`],consecutive_down:e[`consecutive-down`],consecutive_up:e[`consecutive-up`],description:u(e.description,`description`,`text`),expected_body:u(e[`expected-body`],`expected-body`,`text`),expected_codes:u(e[`expected-codes`],`expected-codes`,`text`),follow_redirects:e[`follow-redirects`],interval:e.interval,method:u(e.method,`method`,`text`),path:u(e.path,`path`,`text`),port:e.port,probe_zone:u(e[`probe-zone`],`probe-zone`,`text`),retries:e.retries,timeout:e.timeout,type:u(e.type,`type`,`text`)}):s(e.body)});return}let a=await t(e);if(e.body){let t=s(e.body);n(await i(`Creating`,async()=>a.user.loadBalancers.pools.preview.create({body:t,pool_id:e[`pool-id`]})),{successLabel:`Created`});return}let o=l({allow_insecure:e[`allow-insecure`],consecutive_down:e[`consecutive-down`],consecutive_up:e[`consecutive-up`],description:u(e.description,`description`,`text`),expected_body:u(e[`expected-body`],`expected-body`,`text`),expected_codes:u(e[`expected-codes`],`expected-codes`,`text`),follow_redirects:e[`follow-redirects`],interval:e.interval,method:u(e.method,`method`,`text`),path:u(e.path,`path`,`text`),port:e.port,probe_zone:u(e[`probe-zone`],`probe-zone`,`text`),retries:e.retries,timeout:e.timeout,type:u(e.type,`type`,`text`)});n(await i(`Creating`,async()=>a.user.loadBalancers.pools.preview.create({body:o,pool_id:e[`pool-id`]})),{successLabel:`Created`})})},Me={command:`preview`,describe:`Load Balancers operations`,builder:e=>e.command(je).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ne(e){return e.usage(`$0 user load-balancers pools references list
63
+
64
+ Get the list of resources that reference the provided pool.`).option(`pool-id`,{type:`string`,description:`Pool ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Pe={command:`list`,describe:`List Pool References`,builder:Ne,handler:async e=>a({command:`user load-balancers pools references list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf user load-balancers pools references list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/user/load_balancers/pools/${e[`pool-id`]==null?`<pool-id>`:encodeURIComponent(String(e[`pool-id`]))}/references`,pathParams:{"pool-id":String(e[`pool-id`]??``)},bodyKind:`none`});return}let a=await t(e);n(await i(`Loading`,async()=>a.user.loadBalancers.pools.references.list({pool_id:e[`pool-id`]})),{successLabel:`Loaded`})})},Fe={command:`references`,describe:`Load Balancers operations`,builder:e=>e.command(Pe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ie(e){return e.usage(`$0 user load-balancers pools update <pool-id>
65
+
66
+ Modify a configured pool.`).positional(`pool-id`,{type:`string`,description:`Pool ID`,demandOption:!0}).option(`check-regions`,{type:`string`,array:!0,description:`A list of regions from which to run health checks. Null means every Cloudflare data center.`}).option(`description`,{type:`string`,description:`A human-readable description of the pool.`}).option(`enabled`,{type:`boolean`,description:`Whether to enable (the default) or disable this pool. Disabled pools will not receive traffic and are excluded from health checks. Disabling a pool will cause any load balancers using it to failover to the next pool (if any).`}).option(`health-sources`,{type:`string`,array:!0,description:`A list of health sources, ordered from highest to lowest priority, used to evaluate individual origin health and overall pool health. The load balancer uses the first source that has data and falls back to the next. Currently accepted values are null or the exact array ["regional", "global"]; any other combination is rejected. Null (the default) behaves like ["local", "global"]. ["regional", "global"] makes each region steer on its own health, falling back to the global decision when a region has no fresh data. Setting regional requires at least one region in check_regions.`}).option(`latitude`,{type:`number`,description:`The latitude of the data center containing the origins used in this pool in decimal degrees. If this is set, longitude must also be set.`}).option(`load-shedding-default-percent`,{type:`number`,description:`The percent of traffic to shed from the pool, according to the default policy. Applies to new sessions and traffic without session affinity.`}).option(`load-shedding-default-policy`,{type:`string`,description:`The default policy to use when load shedding. A random policy randomly sheds a given percent of requests. A hash policy computes a hash over the CF-Connecting-IP address and sheds all requests originating from a percent of IPs.`,choices:[`random`,`hash`]}).option(`load-shedding-session-percent`,{type:`number`,description:`The percent of existing sessions to shed from the pool, according to the session policy.`}).option(`load-shedding-session-policy`,{type:`string`,description:`Only the hash policy is supported for existing sessions (to avoid exponential decay).`,choices:[`hash`]}).option(`longitude`,{type:`number`,description:`The longitude of the data center containing the origins used in this pool in decimal degrees. If this is set, latitude must also be set.`}).option(`minimum-origins`,{type:`number`,description:`The minimum number of origins that must be healthy for this pool to serve traffic. If the number of healthy origins falls below this number, the pool will be marked unhealthy and will failover to the next available pool.`}).option(`monitor`,{type:`string`,description:`The ID of the Monitor to use for checking the health of origins within this pool.`}).option(`monitor-group`,{type:`string`,description:`The ID of the Monitor Group to use for checking the health of origins within this pool.`}).option(`name`,{type:`string`,description:`A short name (tag) for the pool. Only alphanumeric characters, hyphens, and underscores are allowed.`}).option(`networks`,{type:`string`,array:!0,description:`List of networks where Load Balancer or Pool is enabled.`}).option(`notification-email`,{type:`string`,description:`This field is now deprecated. It has been moved to Cloudflare's Centralized Notification service https://developers.cloudflare.com/fundamentals/notifications/. The email address to send health status notifications to. This can be an individual mailbox or a mailing list. Multiple emails can be supplied as a comma delimited list.`}).option(`notification-filter-origin-disable`,{type:`boolean`,description:`If set true, disable notifications for this type of resource (pool or origin).`}).option(`notification-filter-origin-healthy`,{type:`boolean`,description:`If present, send notifications only for this health status (e.g. false for only DOWN events). Use null to reset (all events).`}).option(`notification-filter-pool-disable`,{type:`boolean`,description:`If set true, disable notifications for this type of resource (pool or origin).`}).option(`notification-filter-pool-healthy`,{type:`boolean`,description:`If present, send notifications only for this health status (e.g. false for only DOWN events). Use null to reset (all events).`}).option(`origin-steering-policy`,{type:`string`,description:'The type of origin steering policy to use.\n- `"random"`: Select an origin randomly.\n- `"hash"`: Select an origin by computing a hash over the CF-Connecting-IP address.\n- `"least_outstanding_requests"`: Select an origin by taking into consideration origin weights, as well as each origin\'s number of outstanding requests. Origins with more pending requests are weighted proportionately less relative to others.\n- `"least_connections"`: Select an origin by taking into consideration origin weights, as well as each origin\'s number of open connections. Origins with more open connections are weighted proportionately less relative to others. Supported for HTTP/1 and HTTP/2 connections.',choices:[`random`,`hash`,`least_outstanding_requests`,`least_connections`]}).option(`origins`,{type:`string`,description:`The list of origins within this pool. Traffic directed at this pool is balanced across all currently healthy origins, provided the pool itself is healthy. 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 Le={command:`update <pool-id>`,describe:`Update Pool`,builder:Ie,handler:async e=>a({command:`user load-balancers pools update`,classification:{safeFlags:[`enabled`,`load-shedding-default-policy`,`load-shedding-session-policy`,`notification-filter-origin-disable`,`notification-filter-origin-healthy`,`notification-filter-pool-disable`,`notification-filter-pool-healthy`,`origin-steering-policy`,`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf user load-balancers pools update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/user/load_balancers/pools/${e[`pool-id`]==null?`<pool-id>`:encodeURIComponent(String(e[`pool-id`]))}`,pathParams:{"pool-id":String(e[`pool-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({check_regions:e[`check-regions`],description:u(e.description,`description`,`text`),enabled:e.enabled,health_sources:e[`health-sources`],latitude:e.latitude,load_shedding:{default_percent:e[`load-shedding-default-percent`],default_policy:u(e[`load-shedding-default-policy`],`load-shedding-default-policy`,`text`),session_percent:e[`load-shedding-session-percent`],session_policy:u(e[`load-shedding-session-policy`],`load-shedding-session-policy`,`text`)},longitude:e.longitude,minimum_origins:e[`minimum-origins`],monitor:u(e.monitor,`monitor`,`text`),monitor_group:u(e[`monitor-group`],`monitor-group`,`text`),name:u(e.name,`name`,`text`),networks:e.networks,notification_email:u(e[`notification-email`],`notification-email`,`text`),notification_filter:{origin:{disable:e[`notification-filter-origin-disable`],healthy:e[`notification-filter-origin-healthy`]},pool:{disable:e[`notification-filter-pool-disable`],healthy:e[`notification-filter-pool-healthy`]}},origin_steering:{policy:u(e[`origin-steering-policy`],`origin-steering-policy`,`text`)},origins:c(e.origins,`origins`)}):s(e.body)});return}let a=await t(e);if(e.body){let t=s(e.body);n(await i(`Updating`,async()=>a.user.loadBalancers.pools.update({...t,pool_id:e[`pool-id`]})),{successLabel:`Updated`});return}if(e.name===void 0&&(e.name=await d(`name`,`A short name (tag) for the pool. Only alphanumeric characters, hyphens, and underscores are allowed.`)),e.origins===void 0)throw Error(`--origins is required (or pass --body with this field set).`);let o=l({check_regions:e[`check-regions`],description:u(e.description,`description`,`text`),enabled:e.enabled,health_sources:e[`health-sources`],latitude:e.latitude,load_shedding:{default_percent:e[`load-shedding-default-percent`],default_policy:u(e[`load-shedding-default-policy`],`load-shedding-default-policy`,`text`),session_percent:e[`load-shedding-session-percent`],session_policy:u(e[`load-shedding-session-policy`],`load-shedding-session-policy`,`text`)},longitude:e.longitude,minimum_origins:e[`minimum-origins`],monitor:u(e.monitor,`monitor`,`text`),monitor_group:u(e[`monitor-group`],`monitor-group`,`text`),name:u(e.name,`name`,`text`),networks:e.networks,notification_email:u(e[`notification-email`],`notification-email`,`text`),notification_filter:{origin:{disable:e[`notification-filter-origin-disable`],healthy:e[`notification-filter-origin-healthy`]},pool:{disable:e[`notification-filter-pool-disable`],healthy:e[`notification-filter-pool-healthy`]}},origin_steering:{policy:u(e[`origin-steering-policy`],`origin-steering-policy`,`text`)},origins:c(e.origins,`origins`)});n(await i(`Updating`,async()=>a.user.loadBalancers.pools.update({...o,pool_id:e[`pool-id`]})),{successLabel:`Updated`})})},Re={command:`pools`,describe:`Load Balancers operations`,builder:e=>e.command(me).command(ge).command(we).command(ke).command(Le).command(Se).command(De).command(Me).command(Fe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ze(e){return e.usage(`$0 user load-balancers preview get <preview-id>
67
+
68
+ Get the result of a previous preview operation using the provided preview_id.`).positional(`preview-id`,{type:`string`,description:`Preview ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Be={command:`get <preview-id>`,describe:`Preview Result`,builder:ze,handler:async e=>a({command:`user load-balancers preview get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf user load-balancers preview get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/user/load_balancers/preview/${e[`preview-id`]==null?`<preview-id>`:encodeURIComponent(String(e[`preview-id`]))}`,pathParams:{"preview-id":String(e[`preview-id`]??``)},bodyKind:`none`});return}let a=await t(e);n(await i(`Loading`,async()=>a.user.loadBalancers.preview.get({preview_id:e[`preview-id`]})),{successLabel:`Loaded`})})},Ve={command:`preview`,describe:`Load Balancers operations`,builder:e=>e.command(Be).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function He(e){return e.usage(`$0 user load-balancers regions list
69
+
70
+ List all region mappings in the user context.`).option(`subdivision-code`,{type:`string`,description:`Two-letter subdivision code followed in ISO 3166-2.`}).option(`country-code`,{type:`string`,description:`Two-letter alpha-2 country code as defined in ISO 3166-1.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ue={command:`list`,describe:`List Regions`,builder:He,handler:async e=>a({command:`user load-balancers regions list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let a={subdivision_code:e[`subdivision-code`],country_code:e[`country-code`]};if(e.dryRun){r({command:`cf user load-balancers regions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/user/load_balancers/regions`,pathParams:{},query:a,bodyKind:`none`});return}let o=await t(e);n(await i(`Loading`,async()=>o.user.loadBalancers.regions.list(a)),{successLabel:`Loaded`})})},We={command:`regions`,describe:`Operations for load-balancers.regions`,builder:e=>e.command(Ue).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ge={command:`load-balancers`,describe:`Operations for load-balancers`,builder:e=>e.command(fe).command(Re).command(Ve).command(We).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ke(e){return e.usage(`$0 user load-balancing-analytics events list
71
+
72
+ List origin health changes.`).option(`until`,{type:`string`,description:`End date and time of requesting data period in the ISO8601 format.`}).option(`pool-name`,{type:`string`,description:`The name for the pool to filter.`}).option(`origin-healthy`,{type:`boolean`,description:`If true, filter events where the origin status is healthy. If false, filter events where the origin status is unhealthy.`}).option(`pool-id`,{type:`string`,description:`Pool ID`}).option(`since`,{type:`string`,description:`Start date and time of requesting data period in the ISO8601 format.`}).option(`origin-name`,{type:`string`,description:`The name for the origin to filter.`}).option(`pool-healthy`,{type:`boolean`,description:`If true, filter events where the pool status is healthy. If false, filter events where the pool status is unhealthy.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const qe={command:`list`,describe:`List Healthcheck Events`,builder:Ke,handler:async e=>a({command:`user load-balancing-analytics events list`,classification:{safeFlags:[`origin-healthy`,`pool-healthy`,`dry-run`]}},e,async()=>{let a={until:e.until,pool_name:e[`pool-name`],origin_healthy:e[`origin-healthy`],pool_id:e[`pool-id`],since:e.since,origin_name:e[`origin-name`],pool_healthy:e[`pool-healthy`]};if(e.dryRun){r({command:`cf user load-balancing-analytics events list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/user/load_balancing_analytics/events`,pathParams:{},query:a,bodyKind:`none`});return}let o=await t(e);n(await i(`Loading`,async()=>o.user.loadBalancingAnalytics.events.list(a)),{successLabel:`Loaded`})})},Je={command:`events`,describe:`Load Balancing Analytics operations`,builder:e=>e.command(qe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ye={command:`load-balancing-analytics`,describe:`Operations for load-balancing-analytics`,builder:e=>e.command(Je).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Xe(e){return e.usage(`$0 user memberships delete <membership-id>
73
+
74
+ Remove the associated member from an account.`).positional(`membership-id`,{type:`string`,description:`Membership 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 Ze={command:`delete <membership-id>`,describe:`Delete Membership`,builder:Xe,handler:async e=>a({command:`user memberships delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){r({command:`cf user memberships delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/memberships/${e[`membership-id`]==null?`<membership-id>`:encodeURIComponent(String(e[`membership-id`]))}`,pathParams:{"membership-id":String(e[`membership-id`]??``)},bodyKind:`none`});return}let a=await t(e);if(!await f({force:!!e.force,message:`Are you sure? This action cannot be undone.`})){process.stderr.write(`Aborted.
75
+ `);return}n(await i(`Deleting`,async()=>a.user.memberships.delete({membership_id:e[`membership-id`]})),{successLabel:`Deleted`})})};function Qe(e){return e.usage(`$0 user memberships list
76
+
77
+ List memberships of accounts the user can access.`).option(`account-name`,{type:`string`,description:`Account name`}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of memberships per page.`}).option(`order`,{type:`string`,description:`Field to order memberships by.`,choices:[`id`,`account.name`,`status`]}).option(`direction`,{type:`string`,description:`Direction to order memberships.`,choices:[`asc`,`desc`]}).option(`name`,{type:`string`,description:`Account name`}).option(`status`,{type:`string`,description:`Status of this membership.`,choices:[`accepted`,`pending`,`rejected`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const $e={command:`list`,describe:`List Memberships`,builder:p(Qe),handler:async e=>a({command:`user memberships list`,classification:{safeFlags:[`order`,`direction`,`status`,`dry-run`]}},e,async()=>{let a={"account.name":e[`account-name`],page:e.page,per_page:e[`per-page`],order:e.order,direction:e.direction,name:e.name,status:e.status};if(e.dryRun){r({command:`cf user memberships list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/memberships`,pathParams:{},query:a,bodyKind:`none`});return}let o=await t(e);n(await i(`Loading`,async()=>o.user.memberships.list(a)),{successLabel:`Loaded`})})};function et(e){return e.usage(`$0 user memberships update <membership-id>
78
+
79
+ Accept or reject this account invitation.`).positional(`membership-id`,{type:`string`,description:`Membership 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 tt={command:`update <membership-id>`,describe:`Update Membership`,builder:et,handler:async o=>a({command:`user memberships update`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf user memberships update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/memberships/${o[`membership-id`]==null?`<membership-id>`:encodeURIComponent(String(o[`membership-id`]))}`,pathParams:{"membership-id":String(o[`membership-id`]??``)},bodyKind:`json`,body:o.body===void 0?void 0:s(o.body)});return}let a=await t(o);if(o.body){let e=s(o.body);n(await i(`Updating`,async()=>a.user.memberships.update({...e,membership_id:o[`membership-id`]})),{successLabel:`Updated`});return}n(await i(`Updating`,async()=>e(a,`PUT`,`/memberships/${encodeURIComponent(String(o[`membership-id`]))}`)),{successLabel:`Updated`})})};function nt(e){return e.usage(`$0 user memberships userMembershipsGet <membership-id>
80
+
81
+ Get a specific membership for the currently authenticated user.`).positional(`membership-id`,{type:`string`,description:`Membership identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const rt={command:`userMembershipsGet <membership-id>`,describe:`Get User Membership`,builder:nt,handler:async e=>a({command:`user memberships userMembershipsGet`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf user memberships userMembershipsGet`,method:`GET`,url:`https://api.cloudflare.com/client/v4/user/memberships/${e[`membership-id`]==null?`<membership-id>`:encodeURIComponent(String(e[`membership-id`]))}`,pathParams:{"membership-id":String(e[`membership-id`]??``)},bodyKind:`none`});return}let a=await t(e);n(await i(`Loading`,async()=>a.user.memberships.userMembershipsGet({membership_id:e[`membership-id`]})),{successLabel:`Loaded`})})};function it(e){return e.usage(`$0 user memberships userSAccountMembershipsMembershipDetails <membership-id>
82
+
83
+ Get a specific membership.`).positional(`membership-id`,{type:`string`,description:`Membership identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const at={command:`userSAccountMembershipsMembershipDetails <membership-id>`,describe:`Membership Details`,builder:it,handler:async e=>a({command:`user memberships userSAccountMembershipsMembershipDetails`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf user memberships userSAccountMembershipsMembershipDetails`,method:`GET`,url:`https://api.cloudflare.com/client/v4/memberships/${e[`membership-id`]==null?`<membership-id>`:encodeURIComponent(String(e[`membership-id`]))}`,pathParams:{"membership-id":String(e[`membership-id`]??``)},bodyKind:`none`});return}let a=await t(e);n(await i(`Loading`,async()=>a.user.memberships.userSAccountMembershipsMembershipDetails({membership_id:e[`membership-id`]})),{successLabel:`Loaded`})})},ot={command:`memberships`,describe:`Operations for memberships`,builder:e=>e.command(Ze).command($e).command(tt).command(rt).command(at).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function st(e){return e.usage(`$0 user subscriptions delete <identifier>
84
+
85
+ Deletes a user's subscription.`).positional(`identifier`,{type:`string`,description:`Subscription 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 ct={command:`delete <identifier>`,describe:`Delete User Subscription`,builder:st,handler:async e=>a({command:`user subscriptions delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){r({command:`cf user subscriptions delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/user/subscriptions/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}`,pathParams:{identifier:String(e.identifier??``)},bodyKind:`none`});return}let a=await t(e);if(!await f({force:!!e.force})){process.stderr.write(`Aborted.
86
+ `);return}n(await i(`Deleting`,async()=>a.user.subscriptions.delete({identifier:e.identifier})),{successLabel:`Deleted`})})};function lt(e){return e.usage(`$0 user subscriptions get
87
+
88
+ Lists all of a user's subscriptions.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ut={command:`get`,describe:`Get User Subscriptions`,builder:lt,handler:async e=>a({command:`user subscriptions get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf user subscriptions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/user/subscriptions`,pathParams:{},bodyKind:`none`});return}let a=await t(e);n(await i(`Loading`,async()=>a.user.subscriptions.get()),{successLabel:`Loaded`})})};function dt(e){return e.usage(`$0 user subscriptions update <identifier>
89
+
90
+ Updates a user's subscriptions.`).positional(`identifier`,{type:`string`,description:`Subscription identifier tag.`,demandOption:!0}).option(`app-install-id`,{type:`string`,description:`app install id.`}).option(`component-values`,{type:`string`,description:`Configurable component values for the subscription. Provide as a JSON array of objects or @path/to/file.json.`}).option(`frequency`,{type:`string`,description:`How often the subscription is renewed automatically.`,choices:[`weekly`,`monthly`,`quarterly`,`yearly`]}).option(`rate-plan-currency`,{type:`string`,description:`The currency applied to the rate plan subscription.`}).option(`rate-plan-externally-managed`,{type:`boolean`,description:`Whether this rate plan is managed externally from Cloudflare.`}).option(`rate-plan-id`,{type:`string`,description:`The ID of the rate plan.`}).option(`rate-plan-is-contract`,{type:`boolean`,description:`Whether a rate plan is enterprise-based (or newly adopted term contract).`}).option(`rate-plan-public-name`,{type:`string`,description:`The full name of the rate plan.`}).option(`rate-plan-scope`,{type:`string`,description:`The scope that this rate plan applies to.`}).option(`rate-plan-sets`,{type:`string`,array:!0,description:`The list of sets this rate plan applies to. Returns array of strings.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ft={command:`update <identifier>`,describe:`Update User Subscription`,builder:dt,handler:async e=>a({command:`user subscriptions update`,classification:{safeFlags:[`frequency`,`rate-plan-externally-managed`,`rate-plan-is-contract`,`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf user subscriptions update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/user/subscriptions/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}`,pathParams:{identifier:String(e.identifier??``)},bodyKind:`json`,body:e.body===void 0?l({app:{install_id:u(e[`app-install-id`],`app-install-id`,`text`)},component_values:c(e[`component-values`],`component-values`),frequency:u(e.frequency,`frequency`,`text`),rate_plan:{currency:u(e[`rate-plan-currency`],`rate-plan-currency`,`text`),externally_managed:e[`rate-plan-externally-managed`],id:u(e[`rate-plan-id`],`rate-plan-id`,`text`),is_contract:e[`rate-plan-is-contract`],public_name:u(e[`rate-plan-public-name`],`rate-plan-public-name`,`text`),scope:u(e[`rate-plan-scope`],`rate-plan-scope`,`text`),sets:e[`rate-plan-sets`]}}):s(e.body)});return}let a=await t(e);if(e.body){let t=s(e.body);n(await i(`Updating`,async()=>a.user.subscriptions.update({body:t,identifier:e.identifier})),{successLabel:`Updated`});return}let o=l({app:{install_id:u(e[`app-install-id`],`app-install-id`,`text`)},component_values:c(e[`component-values`],`component-values`),frequency:u(e.frequency,`frequency`,`text`),rate_plan:{currency:u(e[`rate-plan-currency`],`rate-plan-currency`,`text`),externally_managed:e[`rate-plan-externally-managed`],id:u(e[`rate-plan-id`],`rate-plan-id`,`text`),is_contract:e[`rate-plan-is-contract`],public_name:u(e[`rate-plan-public-name`],`rate-plan-public-name`,`text`),scope:u(e[`rate-plan-scope`],`rate-plan-scope`,`text`),sets:e[`rate-plan-sets`]}});n(await i(`Updating`,async()=>a.user.subscriptions.update({body:o,identifier:e.identifier})),{successLabel:`Updated`})})},pt={command:`subscriptions`,describe:`View and manage zone-level plan subscriptions owned by your user`,builder:e=>e.command(ct).command(ut).command(ft).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function mt(e){return e.usage(`$0 user tenant list
91
+
92
+ Retrieves list of tenants the authenticated user / method has access to.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ht={command:`list`,describe:`List user tenants`,builder:mt,handler:async e=>a({command:`user tenant list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf user tenant list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/user/tenants`,pathParams:{},bodyKind:`none`});return}let a=await t(e);n(await i(`Loading`,async()=>a.user.tenant.list()),{successLabel:`Loaded`})})},gt={command:`tenant`,describe:`Operations for tenant`,builder:e=>e.command(ht).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function _t(e){return e.usage(`$0 user tokens create
93
+
94
+ Create a new access token.`).option(`condition-request-ip-in`,{type:`string`,array:!0,description:`List of IPv4/IPv6 CIDR addresses.`}).option(`condition-request-ip-not-in`,{type:`string`,array:!0,description:`List of IPv4/IPv6 CIDR addresses.`}).option(`expires-on`,{type:`string`,description:`The expiration time on or after which the JWT MUST NOT be accepted for processing.`}).option(`name`,{type:`string`,description:`Token name.`}).option(`not-before`,{type:`string`,description:`The time before which the token MUST NOT be accepted for processing.`}).option(`policies`,{type:`string`,description:`List of access policies assigned to the token. 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 vt={command:`create`,describe:`Create Token`,builder:_t,handler:async e=>a({command:`user tokens create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf user tokens create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/user/tokens`,pathParams:{},bodyKind:`json`,body:e.body===void 0?l({condition:{request_ip:{in:e[`condition-request-ip-in`],not_in:e[`condition-request-ip-not-in`]}},expires_on:u(e[`expires-on`],`expires-on`,`text`),name:u(e.name,`name`,`text`),not_before:u(e[`not-before`],`not-before`,`text`),policies:c(e.policies,`policies`)}):s(e.body)});return}let a=await t(e);if(e.body){let t=s(e.body);n(await i(`Creating`,async()=>a.user.tokens.create({...t})),{successLabel:`Created`});return}if(e.name===void 0&&(e.name=await d(`name`,`Token name.`)),e.policies===void 0)throw Error(`--policies is required (or pass --body with this field set).`);let o=l({condition:{request_ip:{in:e[`condition-request-ip-in`],not_in:e[`condition-request-ip-not-in`]}},expires_on:u(e[`expires-on`],`expires-on`,`text`),name:u(e.name,`name`,`text`),not_before:u(e[`not-before`],`not-before`,`text`),policies:c(e.policies,`policies`)});n(await i(`Creating`,async()=>a.user.tokens.create({...o})),{successLabel:`Created`})})};function yt(e){return e.usage(`$0 user tokens delete <token-id>
95
+
96
+ Destroy a token.`).positional(`token-id`,{type:`string`,description:`Token identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const $={command:`delete <token-id>`,describe:`Delete Token`,builder:yt,handler:async e=>a({command:`user tokens delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){r({command:`cf user tokens delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/user/tokens/${e[`token-id`]==null?`<token-id>`:encodeURIComponent(String(e[`token-id`]))}`,pathParams:{"token-id":String(e[`token-id`]??``)},bodyKind:`none`});return}let a=await t(e);if(!await f({force:!!e.force,message:`Are you sure? This action cannot be undone.`})){process.stderr.write(`Aborted.
97
+ `);return}n(await i(`Deleting`,async()=>a.user.tokens.delete({token_id:e[`token-id`]})),{successLabel:`Deleted`})})};function bt(e){return e.usage(`$0 user tokens get <token-id>
98
+
99
+ Get information about a specific token.`).positional(`token-id`,{type:`string`,description:`Token identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const xt={command:`get <token-id>`,describe:`Token Details`,builder:bt,handler:async e=>a({command:`user tokens get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf user tokens get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/user/tokens/${e[`token-id`]==null?`<token-id>`:encodeURIComponent(String(e[`token-id`]))}`,pathParams:{"token-id":String(e[`token-id`]??``)},bodyKind:`none`});return}let a=await t(e);n(await i(`Loading`,async()=>a.user.tokens.get({token_id:e[`token-id`]})),{successLabel:`Loaded`})})};function St(e){return e.usage(`$0 user tokens list
100
+
101
+ List all access tokens you created. Results include active, disabled, and recently-expired tokens when include_expired is set to true.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results per page.`}).option(`direction`,{type:`string`,description:`Direction to order results.`,choices:[`asc`,`desc`]}).option(`include-expired`,{type:`boolean`,description:`When true, includes recently-expired tokens in the response.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ct={command:`list`,describe:`List Tokens`,builder:p(St),handler:async e=>a({command:`user tokens list`,classification:{safeFlags:[`direction`,`include-expired`,`dry-run`]}},e,async()=>{let a={page:e.page,per_page:e[`per-page`],direction:e.direction,include_expired:e[`include-expired`]};if(e.dryRun){r({command:`cf user tokens list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/user/tokens`,pathParams:{},query:a,bodyKind:`none`});return}let o=await t(e);n(await i(`Loading`,async()=>o.user.tokens.list(a)),{successLabel:`Loaded`})})};function wt(e){return e.usage(`$0 user tokens permission-groups list
102
+
103
+ Find all available permission groups for API Tokens.`).option(`name`,{type:`string`,description:`Filter by the name of the permission group.
104
+ The value must be URL-encoded.`}).option(`scope`,{type:`string`,description:`Filter by the scope of the permission group.
105
+ The value must be URL-encoded.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Tt={command:`list`,describe:`List Token Permission Groups`,builder:wt,handler:async e=>a({command:`user tokens permission-groups list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let a={name:e.name,scope:e.scope};if(e.dryRun){r({command:`cf user tokens permission-groups list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/user/tokens/permission_groups`,pathParams:{},query:a,bodyKind:`none`});return}let o=await t(e);n(await i(`Loading`,async()=>o.user.tokens.permissionGroups.list(a)),{successLabel:`Loaded`})})},Et={command:`permission-groups`,describe:`Operations for tokens.permission-groups`,builder:e=>e.command(Tt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Dt(e){return e.usage(`$0 user tokens roll <token-id>
106
+
107
+ Roll the token secret.`).positional(`token-id`,{type:`string`,description:`Token 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 Ot={command:`roll <token-id>`,describe:`Roll Token`,builder:Dt,handler:async e=>a({command:`user tokens roll`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){r({command:`cf user tokens roll`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/user/tokens/${e[`token-id`]==null?`<token-id>`:encodeURIComponent(String(e[`token-id`]))}/value`,pathParams:{"token-id":String(e[`token-id`]??``)},bodyKind:`none`});return}let a=await t(e);if(!await f({force:!!e.force,message:`Rolling this token will invalidate the current secret and generate a new one. Any integrations using the current secret will stop working.`})){process.stderr.write(`Aborted.
108
+ `);return}n(await i(`Deleting`,async()=>a.user.tokens.roll({token_id:e[`token-id`]})),{successLabel:`Deleted`})})};function kt(e){return e.usage(`$0 user tokens update <token-id>
109
+
110
+ Update an existing token.`).positional(`token-id`,{type:`string`,description:`Token identifier tag.`,demandOption:!0}).option(`condition-request-ip-in`,{type:`string`,array:!0,description:`List of IPv4/IPv6 CIDR addresses.`}).option(`condition-request-ip-not-in`,{type:`string`,array:!0,description:`List of IPv4/IPv6 CIDR addresses.`}).option(`expires-on`,{type:`string`,description:`The expiration time on or after which the JWT MUST NOT be accepted for processing.`}).option(`name`,{type:`string`,description:`Token name.`}).option(`not-before`,{type:`string`,description:`The time before which the token MUST NOT be accepted for processing.`}).option(`policies`,{type:`string`,description:`List of access policies assigned to the token. Provide as a JSON array of objects or @path/to/file.json.`}).option(`status`,{type:`string`,description:`Status of the token.`,choices:[`active`,`disabled`,`expired`]}).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 At={command:`update <token-id>`,describe:`Update Token`,builder:kt,handler:async e=>a({command:`user tokens update`,classification:{safeFlags:[`status`,`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf user tokens update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/user/tokens/${e[`token-id`]==null?`<token-id>`:encodeURIComponent(String(e[`token-id`]))}`,pathParams:{"token-id":String(e[`token-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({condition:{request_ip:{in:e[`condition-request-ip-in`],not_in:e[`condition-request-ip-not-in`]}},expires_on:u(e[`expires-on`],`expires-on`,`text`),name:u(e.name,`name`,`text`),not_before:u(e[`not-before`],`not-before`,`text`),policies:c(e.policies,`policies`),status:u(e.status,`status`,`text`)}):s(e.body)});return}let a=await t(e);if(e.body){let t=s(e.body);n(await i(`Updating`,async()=>a.user.tokens.update({body:t,token_id:e[`token-id`]})),{successLabel:`Updated`});return}if(e.name===void 0&&(e.name=await d(`name`,`Token name.`)),e.policies===void 0)throw Error(`--policies is required (or pass --body with this field set).`);let o=l({condition:{request_ip:{in:e[`condition-request-ip-in`],not_in:e[`condition-request-ip-not-in`]}},expires_on:u(e[`expires-on`],`expires-on`,`text`),name:u(e.name,`name`,`text`),not_before:u(e[`not-before`],`not-before`,`text`),policies:c(e.policies,`policies`),status:u(e.status,`status`,`text`)});n(await i(`Updating`,async()=>a.user.tokens.update({body:o,token_id:e[`token-id`]})),{successLabel:`Updated`})})};function jt(e){return e.usage(`$0 user tokens verify
111
+
112
+ Test whether a token works.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Mt={command:`verify`,describe:`Verify Token`,builder:jt,handler:async e=>a({command:`user tokens verify`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf user tokens verify`,method:`GET`,url:`https://api.cloudflare.com/client/v4/user/tokens/verify`,pathParams:{},bodyKind:`none`});return}let a=await t(e);n(await i(`Loading`,async()=>a.user.tokens.verify()),{successLabel:`Loaded`})})},Nt={command:`tokens`,describe:`Create and manage personal API tokens scoped to your user for programmatic API access`,builder:e=>e.command(vt).command($).command(xt).command(Ct).command(Ot).command(At).command(Mt).command(Et).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Pt={command:`user`,describe:`Your Cloudflare user profile, invitations, organizations, billing, and personal API tokens`,builder:e=>e.command(C).command(L).command(m).command(x).command(F).command(W).command(Ge).command(Ye).command(ot).command(pt).command(gt).command(Nt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Pt 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";import{t as c}from"./cli-types-tt_LZMbn.mjs";function l(e){return e.usage(`$0 values list
3
+
4
+ Lists all distinct values for a given tag key, optionally filtered by resource type.`).option(`tag-key`,{type:`string`,description:`The tag key to retrieve values for.`,demandOption:!0}).option(`type`,{type:`string`,description:`Filter by resource type.`,choices:`access_application.access_application_policy.access_group.account.account_ruleset.ai_gateway.alerting_policy.alerting_webhook.api_gateway_operation.cloudflared_tunnel.custom_certificate.custom_hostname.cws_deployment.cws_policy.cws_policy_set.cws_workload.d1_database.dns_record.durable_object_namespace.gateway_list.gateway_rule.healthcheck.image.infrastructure_target.kv_namespace.load_balancer.load_balancer_monitor.load_balancer_pool.managed_client_certificate.pages_project.queue.r2_bucket.resource_share.stream_live_input.stream_video.vectorize_index.worker.worker_route.worker_version.zone.zone_ruleset`.split(`.`)}).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 u={command:`list`,describe:`List tag values`,builder:c(l),handler:async c=>s({command:`values list`,classification:{safeFlags:[`type`,`dry-run`]}},c,async()=>{let s={type:c.type,cursor:c.cursor};if(c.dryRun){a({command:`cf values list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/tags/values/${c[`tag-key`]==null?`<tag-key>`:encodeURIComponent(String(c[`tag-key`]))}`,pathParams:{"tag-key":String(c[`tag-key`]??``)},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.values.list({account_id:u,tag_key:c[`tag-key`],...s})),{successLabel:`Loaded`})})},d={command:`values`,describe:`values`,builder:e=>e.command(u).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{d as default};
@@ -0,0 +1,32 @@
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{n as l,t as u}from"./body-parser-CUWbw_Tq.mjs";import{n as d,t as f}from"./input-validation-Ch4Vllrm.mjs";import{a as p,i as m,n as h}from"./prompt-Bx2PB-tt.mjs";function g(e){return e.usage(`$0 vectorize create
3
+
4
+ Creates and returns a new Vectorize Index.`).option(`config-dimensions`,{type:`number`,description:`Specifies the number of dimensions for the index`}).option(`config-metric`,{type:`string`,description:`Specifies the type of metric to use calculating distance.`,choices:[`cosine`,`euclidean`,`dot-product`]}).option(`config-preset`,{type:`string`,description:`Specifies the preset to use for the index.`,choices:[`@cf/baai/bge-small-en-v1.5`,`@cf/baai/bge-base-en-v1.5`,`@cf/baai/bge-large-en-v1.5`,`openai/text-embedding-ada-002`,`cohere/embed-multilingual-v2.0`]}).option(`description`,{type:`string`,description:`Specifies the description of the index.`}).option(`name`,{type:`string`,description:`The name field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).conflicts(`config-dimensions`,[`config-preset`]).implies(`config-dimensions`,[`config-metric`]).conflicts(`config-metric`,[`config-preset`]).implies(`config-metric`,[`config-dimensions`]).conflicts(`config-preset`,[`config-dimensions`,`config-metric`])}const _={command:`create`,describe:`Create Vectorize Index`,builder:g,handler:async r=>c({command:`vectorize create`,classification:{safeFlags:[`config-metric`,`config-preset`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf vectorize create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/vectorize/v2/indexes`,pathParams:{},bodyKind:`json`,body:r.body===void 0?u({config:{dimensions:r[`config-dimensions`],metric:d(r[`config-metric`],`config-metric`,`text`),preset:d(r[`config-preset`],`config-preset`,`text`)},description:d(r.description,`description`,`text`),name:d(r.name,`name`,`text`)}):l(r.body)});return}let c=await i(r),f=r.local?e:await t();if(r.accountId=f,r.body){let e=l(r.body);a(await s(`Creating`,async()=>c.vectorize.create({body:e,account_id:f})),{successLabel:`Created`});return}r.name===void 0&&(r.name=await p(`name`,`The name field`));let m=u({config:{dimensions:r[`config-dimensions`],metric:d(r[`config-metric`],`config-metric`,`text`),preset:d(r[`config-preset`],`config-preset`,`text`)},description:d(r.description,`description`,`text`),name:d(r.name,`name`,`text`)});a(await s(`Creating`,async()=>c.vectorize.create({body:m,account_id:f})),{successLabel:`Created`})})};function v(e){return e.usage(`$0 vectorize delete-by-ids <index-name>
5
+
6
+ Delete a set of vectors from an index by their vector identifiers.`).positional(`index-name`,{type:`string`,description:`Index name`,demandOption:!0}).option(`ids`,{type:`string`,array:!0,description:`A list of vector identifiers to delete from the index indicated by the path.`}).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 y={command:`delete-by-ids <index-name>`,describe:`Delete Vectors By Identifier`,builder:v,handler:async r=>c({command:`vectorize delete-by-ids`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf vectorize delete-by-ids`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/vectorize/v2/indexes/${r[`index-name`]==null?`<index-name>`:encodeURIComponent(String(r[`index-name`]))}/delete_by_ids`,pathParams:{"index-name":String(r[`index-name`]??``)},bodyKind:`json`,body:r.body===void 0?u({ids:r.ids}):l(r.body)});return}let c=await i(r),d=r.local?e:await t();if(r.accountId=d,r.body){let e=l(r.body);a(await s(`Creating`,async()=>c.vectorize.deleteByIds({body:e,account_id:d,index_name:r[`index-name`]})),{successLabel:`Created`});return}let f=u({ids:r.ids});a(await s(`Creating`,async()=>c.vectorize.deleteByIds({body:f,account_id:d,index_name:r[`index-name`]})),{successLabel:`Created`})})};function b(e){return e.usage(`$0 vectorize delete <index-name>
7
+
8
+ Deletes the specified Vectorize Index.`).positional(`index-name`,{type:`string`,description:`Index name`,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 x={command:`delete <index-name>`,describe:`Delete Vectorize Index`,builder:b,handler:async r=>c({command:`vectorize delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf vectorize delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/vectorize/v2/indexes/${r[`index-name`]==null?`<index-name>`:encodeURIComponent(String(r[`index-name`]))}`,pathParams:{"index-name":String(r[`index-name`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,!await h({force:!!r.force})){process.stderr.write(`Aborted.
9
+ `);return}a(await s(`Deleting`,async()=>c.vectorize.delete({account_id:l,index_name:r[`index-name`]})),{successLabel:`Deleted`})})};function S(e){return e.usage(`$0 vectorize get-by-ids <index-name>
10
+
11
+ Get a set of vectors from an index by their vector identifiers.`).positional(`index-name`,{type:`string`,description:`Index name`,demandOption:!0}).option(`ids`,{type:`string`,array:!0,description:`A list of vector identifiers to retrieve from the index indicated by the path.`}).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 C={command:`get-by-ids <index-name>`,describe:`Get Vectors By Identifier`,builder:S,handler:async r=>c({command:`vectorize get-by-ids`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf vectorize get-by-ids`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/vectorize/v2/indexes/${r[`index-name`]==null?`<index-name>`:encodeURIComponent(String(r[`index-name`]))}/get_by_ids`,pathParams:{"index-name":String(r[`index-name`]??``)},bodyKind:`json`,body:r.body===void 0?u({ids:r.ids}):l(r.body)});return}let c=await i(r),d=r.local?e:await t();if(r.accountId=d,r.body){let e=l(r.body);a(await s(`Creating`,async()=>c.vectorize.getByIds({body:e,account_id:d,index_name:r[`index-name`]})),{successLabel:`Created`});return}let f=u({ids:r.ids});a(await s(`Creating`,async()=>c.vectorize.getByIds({body:f,account_id:d,index_name:r[`index-name`]})),{successLabel:`Created`})})};function w(e){return e.usage(`$0 vectorize get <index-name>
12
+
13
+ Returns the specified Vectorize Index.`).positional(`index-name`,{type:`string`,description:`Index name`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const T={command:`get <index-name>`,describe:`Get Vectorize Index`,builder:w,handler:async r=>c({command:`vectorize get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf vectorize get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/vectorize/v2/indexes/${r[`index-name`]==null?`<index-name>`:encodeURIComponent(String(r[`index-name`]))}`,pathParams:{"index-name":String(r[`index-name`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.vectorize.get({account_id:l,index_name:r[`index-name`]})),{successLabel:`Loaded`})})};function E(e){return e.usage(`$0 vectorize info <index-name>
14
+
15
+ Get information about a vectorize index.`).positional(`index-name`,{type:`string`,description:`Index name`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const D={command:`info <index-name>`,describe:`Get Vectorize Index Info`,builder:E,handler:async r=>c({command:`vectorize info`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf vectorize info`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/vectorize/v2/indexes/${r[`index-name`]==null?`<index-name>`:encodeURIComponent(String(r[`index-name`]))}/info`,pathParams:{"index-name":String(r[`index-name`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.vectorize.info({account_id:l,index_name:r[`index-name`]})),{successLabel:`Loaded`})})};function O(e){return e.usage(`$0 vectorize insert <index-name>
16
+
17
+ Inserts vectors into the specified index and returns a mutation id corresponding to the vectors enqueued for insertion.`).positional(`index-name`,{type:`string`,description:`Index name`,demandOption:!0}).option(`unparsable-behavior`,{type:`string`,description:`Behavior for ndjson parse failures.`,choices:[`error`,`discard`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`})}const k={command:`insert <index-name>`,describe:`Insert Vectors`,builder:O,handler:async l=>c({command:`vectorize insert`,classification:{safeFlags:[`unparsable-behavior`,`dry-run`]}},l,async()=>{let c={"unparsable-behavior":l[`unparsable-behavior`]};if(l.dryRun){o({command:`cf vectorize insert`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/vectorize/v2/indexes/${l[`index-name`]==null?`<index-name>`:encodeURIComponent(String(l[`index-name`]))}/insert`,pathParams:{"index-name":String(l[`index-name`]??``)},query:c,bodyKind:`octet-stream`,body:l.body});return}let u=await i(l),p=l.local?e:await t();if(l.accountId=p,l.file){let e=f(l.file);a(await s(`Creating`,async()=>r(u,`POST`,`/accounts/${p}/vectorize/v2/indexes/${encodeURIComponent(String(l[`index-name`]))}/insert`,{body:e,headers:{"Content-Type":`application/x-ndjson`}})),{successLabel:`Created`});return}if(l.body){let e=d(l.body,`body`,`binary`),t=new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();a(await s(`Creating`,async()=>r(u,`POST`,`/accounts/${p}/vectorize/v2/indexes/${encodeURIComponent(String(l[`index-name`]))}/insert${t?`?`+t:``}`,{body:e,headers:{"Content-Type":`application/x-ndjson`}})),{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 A(e){return e.usage(`$0 vectorize list-vectors <index-name>
18
+
19
+ Returns a paginated list of vector identifiers from the specified index.`).positional(`index-name`,{type:`string`,description:`Index name`,demandOption:!0}).option(`count`,{type:`number`,description:`Maximum number of vectors to return`}).option(`cursor`,{type:`string`,description:`Cursor for pagination to get the next page of results`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const j={command:`list-vectors <index-name>`,describe:`List Vectors`,builder:A,handler:async r=>c({command:`vectorize list-vectors`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={count:r.count,cursor:r.cursor};if(r.dryRun){o({command:`cf vectorize list-vectors`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/vectorize/v2/indexes/${r[`index-name`]==null?`<index-name>`:encodeURIComponent(String(r[`index-name`]))}/list`,pathParams:{"index-name":String(r[`index-name`]??``)},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.vectorize.listVectors({account_id:u,index_name:r[`index-name`],...c})),{successLabel:`Loaded`})})};function M(e){return e.usage(`$0 vectorize list
20
+
21
+ Returns a list of Vectorize Indexes`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const N={command:`list`,describe:`List Vectorize Indexes`,builder:M,handler:async r=>c({command:`vectorize list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf vectorize list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/vectorize/v2/indexes`,pathParams:{},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.vectorize.list({account_id:l})),{successLabel:`Loaded`})})};function P(e){return e.usage(`$0 vectorize metadata-index create <index-name>
22
+
23
+ Enable metadata filtering based on metadata property. Limited to 10 properties.`).positional(`index-name`,{type:`string`,description:`Index name`,demandOption:!0}).option(`index-type`,{type:`string`,description:`Specifies the type of metadata property to index.`,choices:[`string`,`number`,`boolean`]}).option(`property-name`,{type:`string`,description:`Specifies the metadata property to index.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const F={command:`create <index-name>`,describe:`Create Metadata Index`,builder:P,handler:async r=>c({command:`vectorize metadata-index create`,classification:{safeFlags:[`index-type`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf vectorize metadata-index create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/vectorize/v2/indexes/${r[`index-name`]==null?`<index-name>`:encodeURIComponent(String(r[`index-name`]))}/metadata_index/create`,pathParams:{"index-name":String(r[`index-name`]??``)},bodyKind:`json`,body:r.body===void 0?u({indexType:d(r[`index-type`],`index-type`,`text`),propertyName:d(r[`property-name`],`property-name`,`text`)}):l(r.body)});return}let c=await i(r),f=r.local?e:await t();if(r.accountId=f,r.body){let e=l(r.body);a(await s(`Creating`,async()=>c.vectorize.metadataIndex.create({...e,account_id:f,index_name:r[`index-name`]})),{successLabel:`Created`});return}r[`index-type`]===void 0&&(r[`index-type`]=await m(`index-type`,`Specifies the type of metadata property to index.`,[`string`,`number`,`boolean`])),r[`property-name`]===void 0&&(r[`property-name`]=await p(`property-name`,`Specifies the metadata property to index.`));let h=u({indexType:d(r[`index-type`],`index-type`,`text`),propertyName:d(r[`property-name`],`property-name`,`text`)});a(await s(`Creating`,async()=>c.vectorize.metadataIndex.create({...h,account_id:f,index_name:r[`index-name`]})),{successLabel:`Created`})})};function I(e){return e.usage(`$0 vectorize metadata-index delete <index-name>
24
+
25
+ Allow Vectorize to delete the specified metadata index.`).positional(`index-name`,{type:`string`,description:`Index name`,demandOption:!0}).option(`property-name`,{type:`string`,description:`Specifies the metadata property for which the index must be deleted.`}).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 L={command:`delete <index-name>`,describe:`Delete Metadata Index`,builder:I,handler:async r=>c({command:`vectorize metadata-index delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf vectorize metadata-index delete`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/vectorize/v2/indexes/${r[`index-name`]==null?`<index-name>`:encodeURIComponent(String(r[`index-name`]))}/metadata_index/delete`,pathParams:{"index-name":String(r[`index-name`]??``)},bodyKind:`json`,body:r.body===void 0?u({propertyName:d(r[`property-name`],`property-name`,`text`)}):l(r.body)});return}let c=await i(r),f=r.local?e:await t();if(r.accountId=f,!await h({force:!!r.force,message:`This operation deletes a metadata index destructively.`})){process.stderr.write(`Aborted.
26
+ `);return}if(r.body){let e=l(r.body);a(await s(`Deleting`,async()=>c.vectorize.metadataIndex.delete({...e,account_id:f,index_name:r[`index-name`]})),{successLabel:`Deleted`});return}r[`property-name`]===void 0&&(r[`property-name`]=await p(`property-name`,`Specifies the metadata property for which the index must be deleted.`));let m=u({propertyName:d(r[`property-name`],`property-name`,`text`)});a(await s(`Deleting`,async()=>c.vectorize.metadataIndex.delete({...m,account_id:f,index_name:r[`index-name`]})),{successLabel:`Deleted`})})};function R(e){return e.usage(`$0 vectorize metadata-index list
27
+
28
+ List Metadata Indexes for the specified Vectorize Index.`).option(`index-name`,{type:`string`,description:`Index name`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const z={command:`list`,describe:`List Metadata Indexes`,builder:R,handler:async r=>c({command:`vectorize metadata-index list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf vectorize metadata-index list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/vectorize/v2/indexes/${r[`index-name`]==null?`<index-name>`:encodeURIComponent(String(r[`index-name`]))}/metadata_index/list`,pathParams:{"index-name":String(r[`index-name`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.vectorize.metadataIndex.list({account_id:l,index_name:r[`index-name`]})),{successLabel:`Loaded`})})},B={command:`metadata-index`,describe:`Operations for metadata-index`,builder:e=>e.command(F).command(L).command(z).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function V(e){return e.usage(`$0 vectorize query <index-name>
29
+
30
+ Finds vectors closest to a given vector in an index.`).positional(`index-name`,{type:`string`,description:`Index name`,demandOption:!0}).option(`return-metadata`,{type:`string`,description:`Whether to return no metadata, indexed metadata or all metadata associated with the closest vectors.`,choices:[`none`,`indexed`,`all`],default:`none`}).option(`return-values`,{type:`boolean`,description:`Whether to return the values associated with the closest vectors.`,default:!1}).option(`top-k`,{type:`number`,description:`The number of nearest neighbors to find.`,default:5}).option(`vector`,{type:`string`,array:!0,description:`The search vector that will be used to find the nearest neighbors.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const H={command:`query <index-name>`,describe:`Query Vectors`,builder:V,handler:async r=>c({command:`vectorize query`,classification:{safeFlags:[`return-metadata`,`return-values`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf vectorize query`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/vectorize/v2/indexes/${r[`index-name`]==null?`<index-name>`:encodeURIComponent(String(r[`index-name`]))}/query`,pathParams:{"index-name":String(r[`index-name`]??``)},bodyKind:`json`,body:r.body===void 0?u({returnMetadata:d(r[`return-metadata`],`return-metadata`,`text`),returnValues:r[`return-values`],topK:r[`top-k`],vector:r.vector}):l(r.body)});return}let c=await i(r),f=r.local?e:await t();if(r.accountId=f,r.body){let e=l(r.body);a(await s(`Loading`,async()=>c.vectorize.query({...e,account_id:f,index_name:r[`index-name`]})),{successLabel:`Loaded`});return}if(r.vector===void 0)throw Error(`--vector is required (or pass --body with this field set).`);let p=u({returnMetadata:d(r[`return-metadata`],`return-metadata`,`text`),returnValues:r[`return-values`],topK:r[`top-k`],vector:r.vector});a(await s(`Loading`,async()=>c.vectorize.query({...p,account_id:f,index_name:r[`index-name`]})),{successLabel:`Loaded`})})};function U(e){return e.usage(`$0 vectorize upsert <index-name>
31
+
32
+ Upserts vectors into the specified index, creating them if they do not exist and returns a mutation id corresponding to the vectors enqueued for upsertion.`).positional(`index-name`,{type:`string`,description:`Index name`,demandOption:!0}).option(`unparsable-behavior`,{type:`string`,description:`Behavior for ndjson parse failures.`,choices:[`error`,`discard`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`})}const W={command:`upsert <index-name>`,describe:`Upsert Vectors`,builder:U,handler:async l=>c({command:`vectorize upsert`,classification:{safeFlags:[`unparsable-behavior`,`dry-run`]}},l,async()=>{let c={"unparsable-behavior":l[`unparsable-behavior`]};if(l.dryRun){o({command:`cf vectorize upsert`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/vectorize/v2/indexes/${l[`index-name`]==null?`<index-name>`:encodeURIComponent(String(l[`index-name`]))}/upsert`,pathParams:{"index-name":String(l[`index-name`]??``)},query:c,bodyKind:`octet-stream`,body:l.body});return}let u=await i(l),p=l.local?e:await t();if(l.accountId=p,l.file){let e=f(l.file);a(await s(`Creating`,async()=>r(u,`POST`,`/accounts/${p}/vectorize/v2/indexes/${encodeURIComponent(String(l[`index-name`]))}/upsert`,{body:e,headers:{"Content-Type":`application/x-ndjson`}})),{successLabel:`Created`});return}if(l.body){let e=d(l.body,`body`,`binary`),t=new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();a(await s(`Creating`,async()=>r(u,`POST`,`/accounts/${p}/vectorize/v2/indexes/${encodeURIComponent(String(l[`index-name`]))}/upsert${t?`?`+t:``}`,{body:e,headers:{"Content-Type":`application/x-ndjson`}})),{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.`)})},G={command:`vectorize`,describe:`vectorize`,builder:e=>e.command(_).command(x).command(y).command(T).command(C).command(D).command(k).command(N).command(j).command(H).command(W).command(B).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{G as default};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ const e=process.env.CLI_VERSION??`0.15.0`,t=`cf-cli/${e}`;export{e as n,t};