cf 0.14.0 → 0.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (448) hide show
  1. package/dist/_meta/commands.json +4040 -1629
  2. package/dist/_meta/hand-written-commands.json +16 -43
  3. package/dist/_meta/schemas.json +445 -756
  4. package/dist/abuse-reports-BAQR1w79.mjs +26 -0
  5. package/dist/access-C8KMplzp.mjs +27 -0
  6. package/dist/account-B-KQSR0L.mjs +12 -0
  7. package/dist/account-tags-EncLJpLc.mjs +15 -0
  8. package/dist/accounts-BA4Mp3A_.mjs +132 -0
  9. package/dist/acm-ByxUJcqF.mjs +15 -0
  10. package/dist/addressing-C-ym0h0G.mjs +93 -0
  11. package/dist/agent-memory-CkPSiZDI.mjs +34 -0
  12. package/dist/ai-DkE_Q64s.mjs +31 -0
  13. package/dist/ai-audit-pPcjYWI5.mjs +6 -0
  14. package/dist/ai-gateway-DtrwF1lQ.mjs +147 -0
  15. package/dist/ai-search-DLD_kDS1.mjs +79 -0
  16. package/dist/ai-security-jyZcBl9g.mjs +10 -0
  17. package/dist/alerting-DOROjm8E.mjs +56 -0
  18. package/dist/analytics-rQ-h-plT.mjs +21 -0
  19. package/dist/analytics_engine-Cg9gCAMt.mjs +4 -0
  20. package/dist/{lifecycle-CadF_i2n.mjs → ansi-styles-eKEZXVwN.mjs} +1 -1
  21. package/dist/api-security-B8p8vp8u.mjs +154 -0
  22. package/dist/argo-g8SjUb_t.mjs +10 -0
  23. package/dist/artifacts-B1PaeF5h.mjs +43 -0
  24. package/dist/audit-logs-DmU_PHy_.mjs +4 -0
  25. package/dist/auth-CZqics6E.mjs +2 -0
  26. package/dist/auth-Cp7gT-AF.mjs +8 -0
  27. package/dist/billing-CvTbUg-H.mjs +23 -0
  28. package/dist/bot-management-z53tbcbH.mjs +9 -0
  29. package/dist/botnet-feed-CSBbJdr_.mjs +11 -0
  30. package/dist/brand-protection-DzV211IQ.mjs +27 -0
  31. package/dist/browser-extension-C0Hi9CHX.mjs +15 -0
  32. package/dist/browser-run-DYQvMAyo.mjs +46 -0
  33. package/dist/build-BPIp8J5F.mjs +2 -0
  34. package/dist/build-OC77a1zq.mjs +2 -0
  35. package/dist/builds-CwKRqjQ5.mjs +71 -0
  36. package/dist/cache-CugNPPsJ.mjs +45 -0
  37. package/dist/certificate-authorities-DaEnJYge.mjs +6 -0
  38. package/dist/cf-oadujOtC.mjs +18 -0
  39. package/dist/{chunk-6EUZQHAF-B7bSMYLe.mjs → chunk-6EUZQHAF-QVTL_mC-.mjs} +1 -1
  40. package/dist/chunk-DL5FNmn1.mjs +2 -0
  41. package/dist/{chunk-Q72B4Q5Z-CPy_WJKU.mjs → chunk-Q72B4Q5Z-Cr1H_iK6.mjs} +1 -1
  42. package/dist/chunk-Q72B4Q5Z-DKhx_4ok.mjs +2 -0
  43. package/dist/chunk-QBZBEHZB-Byagrlop.mjs +2 -0
  44. package/dist/chunk-XLADBZ7F-BXKOjWbx.mjs +374 -0
  45. package/dist/client-certificates-DZUIqBTB.mjs +13 -0
  46. package/dist/client-side-security-Dk6F1ENG.mjs +63 -0
  47. package/dist/cloud-connector-avpf86kG.mjs +6 -0
  48. package/dist/cloudflared-DhItYrCq.mjs +2 -0
  49. package/dist/cloudforce-one-DNRhUD8z.mjs +456 -0
  50. package/dist/command-B2Qe-WUa.mjs +2 -0
  51. package/dist/{command-BL6weJf3.mjs → command-CF0giIIc.mjs} +1 -1
  52. package/dist/command-D45NW-R3.mjs +2 -0
  53. package/dist/command-DIvPLK8x.mjs +2 -0
  54. package/dist/{completions-Dn621okY.mjs → completions-xPLd1cvL.mjs} +3 -3
  55. package/dist/{config-BY6KpMZs.mjs → config-B4vIa0zp.mjs} +1 -1
  56. package/dist/connector-interrupts-BSztJ-Ko.mjs +6 -0
  57. package/dist/connector-telemetry-events-_M8CCK6_.mjs +6 -0
  58. package/dist/connector-telemetry-snapshots-DySvmR9a.mjs +6 -0
  59. package/dist/connectors-BSmhzNB7.mjs +15 -0
  60. package/dist/containers-B5vDcFzo.mjs +78 -0
  61. package/dist/{dist-CFQREIRi.mjs → containers-CFzvhmyz.mjs} +84 -83
  62. package/dist/content-scan-CeLZAcbT.mjs +14 -0
  63. package/dist/cps-BlI_Od72.mjs +6 -0
  64. package/dist/csamScanner-Cn7d0HWS.mjs +10 -0
  65. package/dist/ct-alerting-lhgFPu-y.mjs +5 -0
  66. package/dist/custom-certificates-Ba4Do5qt.mjs +17 -0
  67. package/dist/custom-csrs-MNUIx8yX.mjs +11 -0
  68. package/dist/custom-hostnames-Dj1SBd0J.mjs +27 -0
  69. package/dist/custom-nameservers-C7nzhNzV.mjs +9 -0
  70. package/dist/custom-pages-BgfhGksj.mjs +21 -0
  71. package/dist/d1-P2kWbdID.mjs +45 -0
  72. package/dist/data-security-pBIozmRL.mjs +71 -0
  73. package/dist/dcv-delegation-Bpy9WnKZ.mjs +4 -0
  74. package/dist/delegate-GctF_lrq.mjs +2 -0
  75. package/dist/delegate.mjs +1 -1
  76. package/dist/{deploy-BtETDvDA.mjs → deploy-CVYdt3NK.mjs} +1 -1
  77. package/dist/{deploy-input-BoLTdQzS.mjs → deploy-input-DpOgndz4.mjs} +1 -1
  78. package/dist/{dev-B5WcIpEr.mjs → dev-PPUBjWcm.mjs} +1 -1
  79. package/dist/diagnostics-C62habGQ.mjs +15 -0
  80. package/dist/{dialog-Bud0hiYv.mjs → dialog-C_ccBiZp.mjs} +1 -1
  81. package/dist/dist-B4pQ4CXK.mjs +48 -0
  82. package/dist/{dist-BRg_z9Ut.mjs → dist-BpadEMNY.mjs} +1 -1
  83. package/dist/dist-dc4E1u01.mjs +272 -0
  84. package/dist/dls-CpkcyQ8C.mjs +17 -0
  85. package/dist/dns-DG1X4Wap.mjs +135 -0
  86. package/dist/dns-firewall-B1gGHEDo.mjs +71 -0
  87. package/dist/{dot-prop-6SRZBKHT-wIVDg_fl.mjs → dot-prop-6SRZBKHT-Dj7YOlwR.mjs} +1 -1
  88. package/dist/dry-run-CLX6Pbtq.mjs +2 -0
  89. package/dist/durable-objects-D214VhxH.mjs +8 -0
  90. package/dist/email-auth-Ba4ONan2.mjs +6 -0
  91. package/dist/email-routing-BlqKnqNM.mjs +45 -0
  92. package/dist/email-security-Dl1E1Dko.mjs +160 -0
  93. package/dist/email-sending-DIRSSRIz.mjs +47 -0
  94. package/dist/error-sanitization-BkgUhGVc.mjs +2 -0
  95. package/dist/error-sanitization-DOlqWkNu.mjs +2 -0
  96. package/dist/fieldExtractors-zqYKMCEn.mjs +9 -0
  97. package/dist/firewall-DdsDh8GD.mjs +56 -0
  98. package/dist/flagship-CkUIVW7c.mjs +28 -0
  99. package/dist/fraud-BUpZgvQT.mjs +22 -0
  100. package/dist/google-tag-gateway-Bi1uLnEU.mjs +6 -0
  101. package/dist/healthchecks-DjQWb3EM.mjs +22 -0
  102. package/dist/hostnames-ClBLPbct.mjs +11 -0
  103. package/dist/hyperdrive-U54xZsWU.mjs +37 -0
  104. package/dist/iam-T-wWmOep.mjs +52 -0
  105. package/dist/images-ia5UG1GW.mjs +71 -0
  106. package/dist/index.mjs +1 -1
  107. package/dist/intel-BhswZLMI.mjs +76 -0
  108. package/dist/{interactive-CGOh-aYq.mjs → interactive-B6woOLo-.mjs} +23 -23
  109. package/dist/interactive-DnUvQHjc.mjs +2 -0
  110. package/dist/ips-Dad_EvhM.mjs +4 -0
  111. package/dist/keyless-certificates-BhHaxLjM.mjs +13 -0
  112. package/dist/keys-DjIPvqj4.mjs +4 -0
  113. package/dist/kv-DzXVnK94.mjs +21 -0
  114. package/dist/leaked-credential-checks-B9G_ZTNH.mjs +18 -0
  115. package/dist/lifecycle-Ichnb2x1.mjs +2 -0
  116. package/dist/load-balancers-3wGHPsYz.mjs +76 -0
  117. package/dist/local-B6b2OIBW.mjs +2 -0
  118. package/dist/local-BrfySqnx.mjs +2 -0
  119. package/dist/{local-runtime-Dj8k-p62.mjs → local-runtime-DD8DAIlm.mjs} +1 -1
  120. package/dist/login-CEQbOgBM.mjs +5 -0
  121. package/dist/login-DEWvGuaU.mjs +2 -0
  122. package/dist/logo-matches-YGRPstPi.mjs +6 -0
  123. package/dist/logos-BirufUgo.mjs +7 -0
  124. package/dist/logpush-BlNbUHyV.mjs +46 -0
  125. package/dist/logs-DmFlVF9q.mjs +48 -0
  126. package/dist/magic-cloud-networking-B3Wj2dhJ.mjs +71 -0
  127. package/dist/magic-network-monitoring-ry63w2Rw.mjs +36 -0
  128. package/dist/magic-transit-CBVOK2aa.mjs +387 -0
  129. package/dist/managed-defense-BdW6s483.mjs +18 -0
  130. package/dist/managed-transforms-BIeiofIS.mjs +9 -0
  131. package/dist/matches-CAnwci0P.mjs +6 -0
  132. package/dist/mcp-BfhOMGFE.mjs +32 -0
  133. package/dist/mesh-CxUL2Wf-.mjs +26 -0
  134. package/dist/mtls-certificates-CzmTw4zs.mjs +13 -0
  135. package/dist/network-C68psMbz.mjs +50 -0
  136. package/dist/network-interconnects-CLsMrTuk.mjs +73 -0
  137. package/dist/oauth-D4bkeMAw.mjs +14 -0
  138. package/dist/oauth-DouM-qz0.mjs +2 -0
  139. package/dist/oauth-clients-DbUmVE_5.mjs +16 -0
  140. package/dist/oauth-scopes-CQ18rwBg.mjs +4 -0
  141. package/dist/observability-DpYxkFeZ.mjs +80 -0
  142. package/dist/{open-PBXRGS4R-ClEt4E8F.mjs → open-PBXRGS4R-C4CKEADM.mjs} +1 -1
  143. package/dist/open-PBXRGS4R-C_-G_4DC.mjs +4 -0
  144. package/dist/organization-Dg55Xfz7.mjs +75 -0
  145. package/dist/organizations-QnyzGjB2.mjs +4 -0
  146. package/dist/origin-ca-certificates-Co5lqIGL.mjs +11 -0
  147. package/dist/origin-post-quantum-encryption-Cz8JZamC.mjs +6 -0
  148. package/dist/origin-tls-client-auth-Dd0T1Kfv.mjs +30 -0
  149. package/dist/{output-Z2lQmPUW.mjs → output-Bia1u2k5.mjs} +1 -1
  150. package/dist/page-rules--D3eXrCf.mjs +39 -0
  151. package/dist/pages-Ce8DDgNr.mjs +60 -0
  152. package/dist/pay-per-crawl-CpkEbasz.mjs +65 -0
  153. package/dist/pay-per-use-fyM1DWgY.mjs +6 -0
  154. package/dist/pipelines-CAqCgBLh.mjs +44 -0
  155. package/dist/precursor-DBnn4Q35.mjs +4 -0
  156. package/dist/previews-y_nSqWK5.mjs +4 -0
  157. package/dist/progress-Bi02B6v4.mjs +2 -0
  158. package/dist/{prompt-BP8XrQSj.mjs → prompt-Bx2PB-tt.mjs} +1 -1
  159. package/dist/queries-dg-CVXjf.mjs +9 -0
  160. package/dist/queues-C_ilLbRI.mjs +63 -0
  161. package/dist/r2-data-catalog-DGv6aROr.mjs +44 -0
  162. package/dist/r2-hZAkra-l.mjs +127 -0
  163. package/dist/radar-BO9b0aZy.mjs +300 -0
  164. package/dist/{raw-fetch-DNH2V8qH.mjs → raw-fetch-DNTQkXbg.mjs} +1 -1
  165. package/dist/realtime-eSavuSeE.mjs +172 -0
  166. package/dist/registrar-Ct30kOXZ.mjs +43 -0
  167. package/dist/registrar-sandbox-Dmn9zGUk.mjs +56 -0
  168. package/dist/{registry-BrtVdMrC.mjs → registry-vreNkX6u.mjs} +1 -1
  169. package/dist/reporting-B-F5aWUJ.mjs +14 -0
  170. package/dist/request-headers-Dnbzv6RZ.mjs +2 -0
  171. package/dist/request-tracers-CaubpUFV.mjs +4 -0
  172. package/dist/resolve-BXemCSyA.mjs +2 -0
  173. package/dist/resolve-CUDKxUrW.mjs +2 -0
  174. package/dist/resource-sharing-6Snv-b69.mjs +40 -0
  175. package/dist/resource-tagging-W_LFiX2J.mjs +4 -0
  176. package/dist/rules-C26eyeA5.mjs +18 -0
  177. package/dist/rulesets-BKzIwVtJ.mjs +37 -0
  178. package/dist/rum-Xdw5hyWY.mjs +30 -0
  179. package/dist/run-BBBMrSrs.mjs +2 -0
  180. package/dist/run-BRucX7Rz.mjs +2 -0
  181. package/dist/{schema-DmuJtMN5.mjs → schema-DqtYndhB.mjs} +1 -1
  182. package/dist/{schema-flags-CUGxFeZe.mjs → schema-flags-CebDI0f1.mjs} +1 -1
  183. package/dist/scim-odJTXiIe.mjs +18 -0
  184. package/dist/{sdk-Bvqx-_3z.mjs → sdk-CvIO3tWS.mjs} +1 -1
  185. package/dist/secrets-store-RYpWWzaw.mjs +24 -0
  186. package/dist/security-center-B3D95vCa.mjs +30 -0
  187. package/dist/security-txt-BSytVv-9.mjs +9 -0
  188. package/dist/shared-D67owd9x.mjs +2 -0
  189. package/dist/smart-shield-C83Sfnf4.mjs +24 -0
  190. package/dist/snippets-B6oE9WIa.mjs +20 -0
  191. package/dist/source-BR4_k2ad.mjs +6 -0
  192. package/dist/spawn-CKqJ9J4_.mjs +523 -0
  193. package/dist/spectrum-CfxY--X_.mjs +83 -0
  194. package/dist/speed-DzK-kiWt.mjs +24 -0
  195. package/dist/src-B3h6tKMt.mjs +108 -0
  196. package/dist/ssl-dnjzPcSB.mjs +45 -0
  197. package/dist/startup-profile-CYEokTVe.mjs +2 -0
  198. package/dist/startup-profile-CgWHy4rE.mjs +17 -0
  199. package/dist/state-BxCejn42.mjs +2 -0
  200. package/dist/state-DSzkxXML.mjs +2 -0
  201. package/dist/stream-oFyhS4Wi.mjs +102 -0
  202. package/dist/submit-4f-ravmC.mjs +4 -0
  203. package/dist/tags-DrIP6Uiq.mjs +4 -0
  204. package/dist/{telemetry-2s9Y3FaN.mjs → telemetry-Dk1GcQ0u.mjs} +1 -1
  205. package/dist/telemetry-Ds4epd3D.mjs +2 -0
  206. package/dist/telemetry-mKEb8lYB.mjs +2 -0
  207. package/dist/tenant-C-gc3NWv.mjs +12 -0
  208. package/dist/tenant-custom-nameservers-DduTQIwh.mjs +9 -0
  209. package/dist/{tools-Dz1JCrHd.mjs → tools-BMKpYraQ.mjs} +1 -1
  210. package/dist/tunnels-D0QYsskp.mjs +29 -0
  211. package/dist/turnstile-C6Q3spRB.mjs +33 -0
  212. package/dist/ui-DH95w1Qk.mjs +5 -0
  213. package/dist/undici-DTSBJHNS.mjs +96 -0
  214. package/dist/update-check-BBS1K1jt.mjs +2 -0
  215. package/dist/update-check-CTLoakFV.mjs +2 -0
  216. package/dist/update-check-worker.mjs +2 -0
  217. package/dist/url-info-Cs0V89qq.mjs +4 -0
  218. package/dist/url-normalization-DaEQYy5h.mjs +9 -0
  219. package/dist/url-scanner-C4YVeQ4v.mjs +16 -0
  220. package/dist/user-BV1VY3Kl.mjs +112 -0
  221. package/dist/values-qDS63E43.mjs +4 -0
  222. package/dist/vectorize-NFzD3mP5.mjs +32 -0
  223. package/dist/version-W6_TN_kN.mjs +2 -0
  224. package/dist/waiting-rooms-Y9YGj3ih.mjs +53 -0
  225. package/dist/web-assets-Gd6z8dbt.mjs +64 -0
  226. package/dist/web3-DCJx4NRp.mjs +28 -0
  227. package/dist/workers-B-j-1ygi.mjs +36 -0
  228. package/dist/workers-builds-DPrNKjZW.mjs +14 -0
  229. package/dist/workers-for-platforms-BjKAhMLA.mjs +25 -0
  230. package/dist/workers-vpc-C5YoCnQK.mjs +13 -0
  231. package/dist/workflows-C2KKIJjl.mjs +43 -0
  232. package/dist/zaraz-CVLCs1IX.mjs +22 -0
  233. package/dist/zero-trust-BtJi4OXF.mjs +795 -0
  234. package/dist/zone-hKgt0WzO.mjs +4 -0
  235. package/dist/zones-CCNyaD3J.mjs +124 -0
  236. package/package.json +12 -9
  237. package/dist/_meta/agent-context.json +0 -195
  238. package/dist/abuse-reports-CDFjJ2e8.mjs +0 -8
  239. package/dist/access-BoT1waG4.mjs +0 -11
  240. package/dist/account-agnMUKWj.mjs +0 -2
  241. package/dist/account-tags-BRMMHCee.mjs +0 -9
  242. package/dist/accounts-Cut77dAt.mjs +0 -30
  243. package/dist/acm-C8WgXNCl.mjs +0 -3
  244. package/dist/addressing-CR8EV42x.mjs +0 -13
  245. package/dist/agent-context-Wj5TRRbW.mjs +0 -8
  246. package/dist/agent-memory-CVJpKKZy.mjs +0 -6
  247. package/dist/ai-BbNYt-yI.mjs +0 -5
  248. package/dist/ai-audit-mVajM-2i.mjs +0 -2
  249. package/dist/ai-gateway-BsepSA_v.mjs +0 -13
  250. package/dist/ai-search-DbEJqm5-.mjs +0 -7
  251. package/dist/ai-security-DmyB5EYk.mjs +0 -4
  252. package/dist/alerting-dmy3hd8O.mjs +0 -6
  253. package/dist/analytics-B1xBMla0.mjs +0 -5
  254. package/dist/analytics_engine-DazCn3iC.mjs +0 -2
  255. package/dist/api-security-0HXCzfHk.mjs +0 -50
  256. package/dist/argo-DSHsE8zv.mjs +0 -2
  257. package/dist/artifacts-CwiU9Mxu.mjs +0 -5
  258. package/dist/audit-logs-DwFtMDwH.mjs +0 -2
  259. package/dist/auth-B0ZyXc3y.mjs +0 -5
  260. package/dist/auth-DWxtJ918.mjs +0 -8
  261. package/dist/billing-Cbpadkgu.mjs +0 -3
  262. package/dist/bot-management-B6M2Vyyn.mjs +0 -5
  263. package/dist/botnet-feed-Dn8UuE4h.mjs +0 -3
  264. package/dist/brand-protection-B5R0b3pu.mjs +0 -3
  265. package/dist/browser-extension-D55pYZf_.mjs +0 -3
  266. package/dist/browser-run-C1b2VkGB.mjs +0 -4
  267. package/dist/build-CP2JUfV1.mjs +0 -2
  268. package/dist/builds-CVEXO_4a.mjs +0 -9
  269. package/dist/cache-BU5xX82E.mjs +0 -9
  270. package/dist/certificate-authorities--tZTWJWD.mjs +0 -2
  271. package/dist/cf-BV2HLCQm.mjs +0 -18
  272. package/dist/chunk-QBZBEHZB-BcCMlc8C.mjs +0 -2
  273. package/dist/chunk-XLADBZ7F-DgFrtUhW.mjs +0 -103
  274. package/dist/chunk-vbHwaUoU.mjs +0 -2
  275. package/dist/client-certificates-DX84qeYG.mjs +0 -3
  276. package/dist/client-side-security-DsSO2rZQ.mjs +0 -37
  277. package/dist/cloud-connector-cf8qlxap.mjs +0 -2
  278. package/dist/cloudforce-one-DzVXorbu.mjs +0 -32
  279. package/dist/command-DYrspBc0.mjs +0 -2
  280. package/dist/connector-interrupts-DqpqPPkp.mjs +0 -2
  281. package/dist/connector-telemetry-events-CCD-_B-8.mjs +0 -2
  282. package/dist/connector-telemetry-snapshots-D3CeGGhk.mjs +0 -2
  283. package/dist/connectors-aPQspZdg.mjs +0 -3
  284. package/dist/containers-D0Kjl8h-.mjs +0 -58
  285. package/dist/content-scan-BVx18XmS.mjs +0 -4
  286. package/dist/cps-ByazyM0x.mjs +0 -2
  287. package/dist/csamScanner-OG5lQxBC.mjs +0 -6
  288. package/dist/ct-alerting-BJx5n8Zf.mjs +0 -3
  289. package/dist/custom-certificates-BuJ2e9TA.mjs +0 -5
  290. package/dist/custom-csrs-CR_5qbST.mjs +0 -3
  291. package/dist/custom-hostnames-BzDTsQXb.mjs +0 -5
  292. package/dist/custom-nameservers-OfMPRGkD.mjs +0 -3
  293. package/dist/custom-pages-BmGXoTIo.mjs +0 -3
  294. package/dist/d1-DedC8N0N.mjs +0 -21
  295. package/dist/data-security-B2UB26ry.mjs +0 -7
  296. package/dist/dcv-delegation-C11vmzbG.mjs +0 -2
  297. package/dist/diagnostics-Cf6BLpAo.mjs +0 -3
  298. package/dist/dist-CyisSore.mjs +0 -371
  299. package/dist/dist-Dr4Hg_Up.mjs +0 -48
  300. package/dist/dls-R6PvHbhj.mjs +0 -3
  301. package/dist/dns-Cl8se64c.mjs +0 -29
  302. package/dist/dns-firewall-WtmKilDT.mjs +0 -57
  303. package/dist/dry-run-YSQndLvt.mjs +0 -2
  304. package/dist/durable-objects-jfVU6yp_.mjs +0 -2
  305. package/dist/email-auth-DPmZ85eW.mjs +0 -2
  306. package/dist/email-routing-Bf6DbNTr.mjs +0 -6
  307. package/dist/email-security-DTifjSxM.mjs +0 -18
  308. package/dist/email-sending-Dm3WkFHV.mjs +0 -7
  309. package/dist/error-sanitization-D8zuyPj_.mjs +0 -2
  310. package/dist/fieldExtractors-CeXZL0-I.mjs +0 -3
  311. package/dist/firewall-D5N2APXO.mjs +0 -8
  312. package/dist/flagship-sUOy9jei.mjs +0 -4
  313. package/dist/fraud-WLW2Ep1Z.mjs +0 -20
  314. package/dist/google-tag-gateway-lbww1FaJ.mjs +0 -2
  315. package/dist/healthchecks-0ih8Qjiw.mjs +0 -4
  316. package/dist/hostnames-Ba6FuL8K.mjs +0 -3
  317. package/dist/hyperdrive-DMqcU639.mjs +0 -21
  318. package/dist/iam-CXlYm0uC.mjs +0 -6
  319. package/dist/images-D_g1oli6.mjs +0 -8
  320. package/dist/intel-B8bS0ARd.mjs +0 -8
  321. package/dist/ips-68fzniN4.mjs +0 -2
  322. package/dist/keyless-certificates-CeLnqBvX.mjs +0 -3
  323. package/dist/keys-DkVdS2lF.mjs +0 -2
  324. package/dist/kv-gDAN50BQ.mjs +0 -5
  325. package/dist/leaked-credential-checks-DfnvHpvg.mjs +0 -4
  326. package/dist/load-balancers-m0HqyXPZ.mjs +0 -6
  327. package/dist/local-BwL_gesw.mjs +0 -2
  328. package/dist/logo-matches-DPbHlsKQ.mjs +0 -2
  329. package/dist/logos-DFBJFAYJ.mjs +0 -3
  330. package/dist/logpush-gzmlZayc.mjs +0 -4
  331. package/dist/logs-BuzwQgt5.mjs +0 -18
  332. package/dist/magic-cloud-networking-BbHCi1Vp.mjs +0 -5
  333. package/dist/magic-network-monitoring-kWMmnPTG.mjs +0 -4
  334. package/dist/magic-transit-ClSmJDKw.mjs +0 -111
  335. package/dist/managed-defense-EOihg1UR.mjs +0 -2
  336. package/dist/managed-transforms-BZ_XdGE2.mjs +0 -3
  337. package/dist/matches-B6sG0_fr.mjs +0 -2
  338. package/dist/mcp--kK0vS5i.mjs +0 -4
  339. package/dist/mesh-DfXYUHOO.mjs +0 -4
  340. package/dist/mtls-certificates-DZd-0X7l.mjs +0 -3
  341. package/dist/network-U6f_5ihp.mjs +0 -6
  342. package/dist/network-interconnects-DKZGTiYM.mjs +0 -41
  343. package/dist/oauth-BdVr2hJp.mjs +0 -14
  344. package/dist/oauth-clients-CY3OkPhC.mjs +0 -4
  345. package/dist/oauth-scopes-BTY7_5L-.mjs +0 -2
  346. package/dist/observability-Bsp-LdmJ.mjs +0 -10
  347. package/dist/organization-BSeMdj-7.mjs +0 -45
  348. package/dist/organizations-BroR48Nv.mjs +0 -2
  349. package/dist/origin-ca-certificates-jC-EMn6W.mjs +0 -3
  350. package/dist/origin-post-quantum-encryption-DIspLvA0.mjs +0 -2
  351. package/dist/origin-tls-client-auth-CZ_nUEcM.mjs +0 -4
  352. package/dist/page-rules-ZcdjPohY.mjs +0 -27
  353. package/dist/pages-W4tKa7xk.mjs +0 -14
  354. package/dist/pay-per-crawl-BNM1mJmP.mjs +0 -5
  355. package/dist/pay-per-use-DKxlnkH3.mjs +0 -2
  356. package/dist/pipelines-Dug0BR-c.mjs +0 -6
  357. package/dist/precursor-D-11DkRU.mjs +0 -4
  358. package/dist/previews-D_Nv4dR6.mjs +0 -4
  359. package/dist/progress-a5IKeKni.mjs +0 -2
  360. package/dist/queries-BdA2vJoe.mjs +0 -3
  361. package/dist/queues-Bu06ZqUE.mjs +0 -7
  362. package/dist/r2-COC9wMKb.mjs +0 -25
  363. package/dist/r2-data-catalog-CX5Rl5Qx.mjs +0 -16
  364. package/dist/radar-L-yoLIHF.mjs +0 -2
  365. package/dist/realtime-JKIiXfzi.mjs +0 -20
  366. package/dist/registrar-_dYUZrK0.mjs +0 -43
  367. package/dist/registrar-sandbox-D1yfW_Q_.mjs +0 -56
  368. package/dist/reporting-3fyoMcmb.mjs +0 -2
  369. package/dist/request-headers-BhQQAfJt.mjs +0 -2
  370. package/dist/request-tracers-TisEth2p.mjs +0 -2
  371. package/dist/resolve-CYUp6YgC.mjs +0 -2
  372. package/dist/resource-sharing-C4-dnohU.mjs +0 -6
  373. package/dist/resource-tagging-BRDifKqM.mjs +0 -2
  374. package/dist/rules-BCF3gIkw.mjs +0 -4
  375. package/dist/rulesets-wp6rllt3.mjs +0 -5
  376. package/dist/rum-B77awgoB.mjs +0 -4
  377. package/dist/run-BS8otL3u.mjs +0 -2
  378. package/dist/scim-C9BmUYil.mjs +0 -4
  379. package/dist/secrets-store-ckkZR2dM.mjs +0 -7
  380. package/dist/security-center-BCahKT57.mjs +0 -2
  381. package/dist/security-txt-0SI5du7I.mjs +0 -3
  382. package/dist/shared-D0B-7q-D.mjs +0 -2
  383. package/dist/smart-shield-BDPbrZa4.mjs +0 -4
  384. package/dist/snippets-CVRR_h0i.mjs +0 -4
  385. package/dist/spawn-DP4T92ss.mjs +0 -519
  386. package/dist/spectrum-CjNXQIQE.mjs +0 -63
  387. package/dist/speed-CrXCHk3h.mjs +0 -4
  388. package/dist/src-BbnV77C4.mjs +0 -108
  389. package/dist/ssl-DKORhHkh.mjs +0 -15
  390. package/dist/startup-profile-CBIH6yZy.mjs +0 -17
  391. package/dist/state-QUu6HfxC.mjs +0 -2
  392. package/dist/stream-wY3zi3FK.mjs +0 -16
  393. package/dist/submit-B-4oCBSk.mjs +0 -2
  394. package/dist/tags-5uJEkYJZ.mjs +0 -2
  395. package/dist/telemetry-n3NJourL.mjs +0 -2
  396. package/dist/tenant-BkFvv2o3.mjs +0 -2
  397. package/dist/tenant-custom-nameservers-DcjC1q0r.mjs +0 -3
  398. package/dist/tunnel-Cd4ipbvJ.mjs +0 -2
  399. package/dist/tunnels-9Zg3ePwD.mjs +0 -5
  400. package/dist/turnstile-BTwKYpzD.mjs +0 -23
  401. package/dist/ui-DQSZeaG5.mjs +0 -5
  402. package/dist/url-info-D7Y61BFd.mjs +0 -2
  403. package/dist/url-normalization-B4n8HiNQ.mjs +0 -3
  404. package/dist/url-scanner-CiCIltSQ.mjs +0 -2
  405. package/dist/user-DDFDGJ0Y.mjs +0 -12
  406. package/dist/values-DRznB_Cl.mjs +0 -2
  407. package/dist/vectorize-CbznPhzq.mjs +0 -4
  408. package/dist/waiting-rooms-CKP5hYBK.mjs +0 -11
  409. package/dist/web-assets-C-ZoSkkh.mjs +0 -8
  410. package/dist/web3-DwlN4dOw.mjs +0 -4
  411. package/dist/workers-builds-ECw_x_kp.mjs +0 -2
  412. package/dist/workers-for-platforms-BYGy46R6.mjs +0 -5
  413. package/dist/workers-vpc-CCosFcxz.mjs +0 -3
  414. package/dist/workers-zFMrbUkg.mjs +0 -6
  415. package/dist/workflows-C8GXGDRW.mjs +0 -5
  416. package/dist/zaraz-B5UIREaz.mjs +0 -2
  417. package/dist/zero-trust-DUp0XoIo.mjs +0 -91
  418. package/dist/zone-BGLkk-mL.mjs +0 -2
  419. package/dist/zones-CwYjNXMH.mjs +0 -44
  420. /package/dist/{alerts-CarPLL8k.mjs → alerts-CstOk8n0.mjs} +0 -0
  421. /package/dist/{autorag-zK-3harf.mjs → autorag-PRTwXGgn.mjs} +0 -0
  422. /package/dist/{body-parser-Cmw7PZ7a.mjs → body-parser-CUWbw_Tq.mjs} +0 -0
  423. /package/dist/{brands-CpgTsX8h.mjs → brands-BHRXlWDm.mjs} +0 -0
  424. /package/dist/{clear-C5gzBA8G.mjs → clear-UvKESVx3.mjs} +0 -0
  425. /package/dist/{cli-types-abvWQN3T.mjs → cli-types-tt_LZMbn.mjs} +0 -0
  426. /package/dist/{connector-telemetry-events-latest-BY-dbhQZ.mjs → connector-telemetry-events-latest-DwnFeZg0.mjs} +0 -0
  427. /package/dist/{connector-telemetry-snapshots-latest-DoMvHvCO.mjs → connector-telemetry-snapshots-latest-Dv6rZlxs.mjs} +0 -0
  428. /package/dist/{domain-info-Cw3G4nap.mjs → domain-info-BqTDXNBo.mjs} +0 -0
  429. /package/dist/{health-DkEXPkS6.mjs → health-CwPzzrV6.mjs} +0 -0
  430. /package/dist/{input-validation-nF-0Ze2h.mjs → input-validation-Ch4Vllrm.mjs} +0 -0
  431. /package/dist/{internal-4fU2r5en.mjs → internal-WLHfxX64.mjs} +0 -0
  432. /package/dist/{live-B4iGrwY2.mjs → live-D_k7eHdv.mjs} +0 -0
  433. /package/dist/{metadata-C5fJJr-k.mjs → metadata-APBiectA.mjs} +0 -0
  434. /package/dist/{project-settings-Bc3wYHo8.mjs → project-settings-DSXevRvj.mjs} +0 -0
  435. /package/dist/{rate-limit-analytics-DNsAFIeM.mjs → rate-limit-analytics-CDTPxSET.mjs} +0 -0
  436. /package/dist/{rate-limits-CsOim7bm.mjs → rate-limits-C3K9smdl.mjs} +0 -0
  437. /package/dist/{ready-tTe-zcIw.mjs → ready-CvwvbdTX.mjs} +0 -0
  438. /package/dist/{recent-submissions-B3eTV5yC.mjs → recent-submissions-CjzcT-iH.mjs} +0 -0
  439. /package/dist/{refute-BY76YVrT.mjs → refute-CIAFMj00.mjs} +0 -0
  440. /package/dist/{scan-logo-DdoF_a5y.mjs → scan-logo-zFkphtQ3.mjs} +0 -0
  441. /package/dist/{scan-page-sSgLwwZN.mjs → scan-page-CLl2MAkZ.mjs} +0 -0
  442. /package/dist/{search-BFvQr-sl.mjs → search-12jA1b4l.mjs} +0 -0
  443. /package/dist/{signed-url-Cr8hiZPJ.mjs → signed-url-U0T_PEMR.mjs} +0 -0
  444. /package/dist/{submission-info-DT2mLnu1.mjs → submission-info-CZ84a3Nb.mjs} +0 -0
  445. /package/dist/{theme-CeVf-5qG.mjs → theme-BiIYWOed.mjs} +0 -0
  446. /package/dist/{total-queries-6gs5iy9T.mjs → total-queries-CJTc9Pde.mjs} +0 -0
  447. /package/dist/{tracked-domains-D6XKO2EV.mjs → tracked-domains-BKLxnnSv.mjs} +0 -0
  448. /package/dist/{verify-CM1NakP0.mjs → verify-CZW5Fo1q.mjs} +0 -0
@@ -0,0 +1,37 @@
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,i as f,n as p}from"./prompt-Bx2PB-tt.mjs";function m(e){return e.usage(`$0 hyperdrive create-database-signature <integration>
3
+
4
+ Returns a short-lived signed authorization for creating a database that is billed through Cloudflare. The caller passes these values to the integration partner's own CLI, which verifies the signature before creating the database. Requires the account to be entitled to Cloudflare-billed databases for the integration.`).positional(`integration`,{type:`string`,description:`The database integration to authorize against. This value is case-insensitive.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const h={command:`create-database-signature <integration>`,describe:`Create Database Signature`,builder:m,handler:async c=>s({command:`hyperdrive create-database-signature`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf hyperdrive create-database-signature`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/hyperdrive/integrationsOperations/${c.integration==null?`<integration>`:encodeURIComponent(String(c.integration))}/createDatabaseSignature`,pathParams:{integration:String(c.integration??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Creating`,async()=>s.hyperdrive.createDatabaseSignature({account_id:l,integration:c.integration})),{successLabel:`Created`})})};function g(e){return e.usage(`$0 hyperdrive create
5
+
6
+ Creates and returns a new Hyperdrive configuration. For a PlanetScale integration, the Cloudflare account must already be linked to PlanetScale in the Hyperdrive dashboard.`).option(`mtls-ca-certificate-id`,{type:`string`,description:`Define CA certificate ID obtained after uploading CA cert.`}).option(`mtls-mtls-certificate-id`,{type:`string`,description:`Define mTLS certificate ID obtained after uploading client cert.`}).option(`mtls-sslmode`,{type:`string`,description:"PostgreSQL accepts `require`, `verify-ca`, and `verify-full`. MySQL accepts `REQUIRED`, `VERIFY_CA`, and `VERIFY_IDENTITY`. The verify modes require a CA certificate; the require modes cannot be used with a CA certificate.",choices:[`require`,`verify-ca`,`verify-full`,`REQUIRED`,`VERIFY_CA`,`VERIFY_IDENTITY`]}).option(`name`,{type:`string`,description:`The name of the Hyperdrive configuration. Used to identify the configuration in the Cloudflare dashboard and API.`}).option(`origin-connection-limit`,{type:`number`,description:`The (soft) maximum number of connections the Hyperdrive is allowed to make to the origin database.
7
+
8
+ Maximum allowed: 20 for free tier accounts, 100 for paid tier accounts.
9
+ If not specified, defaults to 20 for free tier and 60 for paid tier.
10
+ Certain Cloudflare-managed origins may be permitted a higher limit.
11
+ Contact Cloudflare if you need a higher limit.
12
+ `}).option(`integration-custom-database-name`,{type:`string`,description:"The database name to use when connecting. Defaults to `postgres` for PostgreSQL and `mysql` for MySQL."}).option(`integration-database-branch-name`,{type:`string`,description:`The name of the PlanetScale database branch.`}).option(`integration-database-name`,{type:`string`,description:`The name of the PlanetScale database.`}).option(`integration-integration`,{type:`string`,description:`The database integration used by this operation.`,choices:[`planetscale`]}).option(`integration-organization-name`,{type:`string`,description:`The name of the PlanetScale organization.`}).option(`integration-scheme`,{type:`string`,description:`Specifies the URL scheme used to connect to your origin database.`,choices:[`postgres`,`postgresql`,`mysql`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`A request to create a Hyperdrive configuration using exactly one of caller-supplied origin credentials or a managed integration.`})}const _={command:`create`,describe:`Create Hyperdrive`,builder:g,handler:async f=>s({command:`hyperdrive create`,classification:{safeFlags:[`mtls-sslmode`,`integration-integration`,`integration-scheme`,`dry-run`]}},f,async()=>{if(f.dryRun){a({command:`cf hyperdrive create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/hyperdrive/configs`,pathParams:{},bodyKind:`json`,body:f.body===void 0?l({mtls:{ca_certificate_id:u(f[`mtls-ca-certificate-id`],`mtls-ca-certificate-id`,`text`),mtls_certificate_id:u(f[`mtls-mtls-certificate-id`],`mtls-mtls-certificate-id`,`text`),sslmode:u(f[`mtls-sslmode`],`mtls-sslmode`,`text`)},name:u(f.name,`name`,`text`),origin_connection_limit:f[`origin-connection-limit`],integration:{custom_database_name:u(f[`integration-custom-database-name`],`integration-custom-database-name`,`text`),database_branch_name:u(f[`integration-database-branch-name`],`integration-database-branch-name`,`text`),database_name:u(f[`integration-database-name`],`integration-database-name`,`text`),integration:u(f[`integration-integration`],`integration-integration`,`text`),organization_name:u(f[`integration-organization-name`],`integration-organization-name`,`text`),scheme:u(f[`integration-scheme`],`integration-scheme`,`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.hyperdrive.create({body:e,account_id:p})),{successLabel:`Created`});return}f.name===void 0&&(f.name=await d(`name`,`The name of the Hyperdrive configuration. Used to identify the configuration in the Cloudflare dashboard and API.`));let m=l({mtls:{ca_certificate_id:u(f[`mtls-ca-certificate-id`],`mtls-ca-certificate-id`,`text`),mtls_certificate_id:u(f[`mtls-mtls-certificate-id`],`mtls-mtls-certificate-id`,`text`),sslmode:u(f[`mtls-sslmode`],`mtls-sslmode`,`text`)},name:u(f.name,`name`,`text`),origin_connection_limit:f[`origin-connection-limit`],integration:{custom_database_name:u(f[`integration-custom-database-name`],`integration-custom-database-name`,`text`),database_branch_name:u(f[`integration-database-branch-name`],`integration-database-branch-name`,`text`),database_name:u(f[`integration-database-name`],`integration-database-name`,`text`),integration:u(f[`integration-integration`],`integration-integration`,`text`),organization_name:u(f[`integration-organization-name`],`integration-organization-name`,`text`),scheme:u(f[`integration-scheme`],`integration-scheme`,`text`)}});i(await o(`Creating`,async()=>s.hyperdrive.create({body:m,account_id:p})),{successLabel:`Created`})})};function v(e){return e.usage(`$0 hyperdrive delete <hyperdrive-id>
13
+
14
+ Deletes the specified Hyperdrive.`).positional(`hyperdrive-id`,{type:`string`,description:`The unique identifier of the Hyperdrive configuration.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const y={command:`delete <hyperdrive-id>`,describe:`Delete Hyperdrive`,builder:v,handler:async c=>s({command:`hyperdrive delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf hyperdrive delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/hyperdrive/configs/${c[`hyperdrive-id`]==null?`<hyperdrive-id>`:encodeURIComponent(String(c[`hyperdrive-id`]))}`,pathParams:{"hyperdrive-id":String(c[`hyperdrive-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();if(c.accountId=l,!await p({force:!!c.force,message:`This operation deletes an existing Hyperdrive configuration.`})){process.stderr.write(`Aborted.
15
+ `);return}i(await o(`Deleting`,async()=>s.hyperdrive.delete({account_id:l,hyperdrive_id:c[`hyperdrive-id`]})),{successLabel:`Deleted`})})};function b(e){return e.usage(`$0 hyperdrive get <hyperdrive-id>
16
+
17
+ Returns the specified Hyperdrive configuration.`).positional(`hyperdrive-id`,{type:`string`,description:`The unique identifier of the Hyperdrive configuration.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const x={command:`get <hyperdrive-id>`,describe:`Get Hyperdrive`,builder:b,handler:async c=>s({command:`hyperdrive get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf hyperdrive get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/hyperdrive/configs/${c[`hyperdrive-id`]==null?`<hyperdrive-id>`:encodeURIComponent(String(c[`hyperdrive-id`]))}`,pathParams:{"hyperdrive-id":String(c[`hyperdrive-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.hyperdrive.get({account_id:l,hyperdrive_id:c[`hyperdrive-id`]})),{successLabel:`Loaded`})})};function S(e){return e.usage(`$0 hyperdrive list
18
+
19
+ Returns a list of Hyperdrives.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const C={command:`list`,describe:`List Hyperdrives`,builder:S,handler:async c=>s({command:`hyperdrive list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={page:c.page,per_page:c[`per-page`]};if(c.dryRun){a({command:`cf hyperdrive list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/hyperdrive/configs`,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.hyperdrive.list({account_id:u,...s})),{successLabel:`Loaded`})})};function w(e){return e.usage(`$0 hyperdrive replace <hyperdrive-id>
20
+
21
+ Replaces and returns the specified Hyperdrive configuration. The request must include the name and complete origin connection details. Omitted caching settings are reset to their defaults, while omitted mTLS settings and origin connection limits are preserved. Use the update operation to modify only selected fields.`).positional(`hyperdrive-id`,{type:`string`,description:`The unique identifier of the Hyperdrive configuration.`,demandOption:!0}).option(`caching-disabled`,{type:`boolean`,description:`Set to true to disable caching of SQL responses. Default is false.`}).option(`caching-max-age`,{type:`number`,description:`Specify the maximum duration (in seconds) items should persist in the cache. Defaults to 60 seconds if not specified.`}).option(`caching-stale-while-revalidate`,{type:`number`,description:`Specify the number of seconds the cache may serve a stale response. Defaults to 15 seconds if not specified.`}).option(`mtls-ca-certificate-id`,{type:`string`,description:`Define CA certificate ID obtained after uploading CA cert.`}).option(`mtls-mtls-certificate-id`,{type:`string`,description:`Define mTLS certificate ID obtained after uploading client cert.`}).option(`mtls-sslmode`,{type:`string`,description:"PostgreSQL accepts `require`, `verify-ca`, and `verify-full`. MySQL accepts `REQUIRED`, `VERIFY_CA`, and `VERIFY_IDENTITY`. The verify modes require a CA certificate; the require modes cannot be used with a CA certificate.",choices:[`require`,`verify-ca`,`verify-full`,`REQUIRED`,`VERIFY_CA`,`VERIFY_IDENTITY`]}).option(`name`,{type:`string`,description:`The name of the Hyperdrive configuration. Used to identify the configuration in the Cloudflare dashboard and API.`}).option(`origin-database`,{type:`string`,description:`Set the name of your origin database.`}).option(`origin-password`,{type:`string`,description:`Set the password needed to access your origin database. The API never returns this write-only value.`}).option(`origin-scheme`,{type:`string`,description:`Specifies the URL scheme used to connect to your origin database.`,choices:[`postgres`,`postgresql`,`mysql`]}).option(`origin-user`,{type:`string`,description:`Set the user of your origin database.`}).option(`origin-host`,{type:`string`,description:`Defines the publicly reachable hostname or IP of your origin database. Private, loopback, and link-local IP addresses are not allowed.`}).option(`origin-port`,{type:`number`,description:`Defines the port of your origin database. Defaults to 5432 for PostgreSQL or 3306 for MySQL if not specified.`}).option(`origin-access-client-id`,{type:`string`,description:`Defines the Client ID of the Access token to use when connecting to the origin database.`}).option(`origin-access-client-secret`,{type:`string`,description:`Defines the Client Secret of the Access Token to use when connecting to the origin database. The API never returns this write-only value.`}).option(`origin-service-id`,{type:`string`,description:`The identifier of the Workers VPC Service to connect through. Hyperdrive will egress through the specified VPC Service to reach the origin database.`}).option(`origin-connection-limit`,{type:`number`,description:`The (soft) maximum number of connections the Hyperdrive is allowed to make to the origin database.
22
+
23
+ Maximum allowed: 20 for free tier accounts, 100 for paid tier accounts.
24
+ If not specified, defaults to 20 for free tier and 60 for paid tier.
25
+ Certain Cloudflare-managed origins may be permitted a higher limit.
26
+ Contact Cloudflare if you need a higher limit.
27
+ `}).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(`origin-host`,[`origin-service-id`]).conflicts(`origin-port`,[`origin-access-client-id`,`origin-access-client-secret`,`origin-service-id`]).implies(`origin-port`,[`origin-host`]).conflicts(`origin-access-client-id`,[`origin-port`,`origin-service-id`]).implies(`origin-access-client-id`,[`origin-host`,`origin-access-client-secret`]).conflicts(`origin-access-client-secret`,[`origin-port`,`origin-service-id`]).implies(`origin-access-client-secret`,[`origin-host`,`origin-access-client-id`]).conflicts(`origin-service-id`,[`origin-host`,`origin-port`,`origin-access-client-id`,`origin-access-client-secret`])}const T={command:`replace <hyperdrive-id>`,describe:`Replace Hyperdrive`,builder:w,handler:async p=>s({command:`hyperdrive replace`,classification:{safeFlags:[`caching-disabled`,`mtls-sslmode`,`origin-scheme`,`dry-run`]}},p,async()=>{if(p.dryRun){a({command:`cf hyperdrive replace`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/hyperdrive/configs/${p[`hyperdrive-id`]==null?`<hyperdrive-id>`:encodeURIComponent(String(p[`hyperdrive-id`]))}`,pathParams:{"hyperdrive-id":String(p[`hyperdrive-id`]??``)},bodyKind:`json`,body:p.body===void 0?l({caching:{disabled:p[`caching-disabled`],max_age:p[`caching-max-age`],stale_while_revalidate:p[`caching-stale-while-revalidate`]},mtls:{ca_certificate_id:u(p[`mtls-ca-certificate-id`],`mtls-ca-certificate-id`,`text`),mtls_certificate_id:u(p[`mtls-mtls-certificate-id`],`mtls-mtls-certificate-id`,`text`),sslmode:u(p[`mtls-sslmode`],`mtls-sslmode`,`text`)},name:u(p.name,`name`,`text`),origin:{database:u(p[`origin-database`],`origin-database`,`text`),password:u(p[`origin-password`],`origin-password`,`text`),scheme:u(p[`origin-scheme`],`origin-scheme`,`text`),user:u(p[`origin-user`],`origin-user`,`text`),host:u(p[`origin-host`],`origin-host`,`text`),port:p[`origin-port`],access_client_id:u(p[`origin-access-client-id`],`origin-access-client-id`,`text`),access_client_secret:u(p[`origin-access-client-secret`],`origin-access-client-secret`,`text`),service_id:u(p[`origin-service-id`],`origin-service-id`,`text`)},origin_connection_limit:p[`origin-connection-limit`]}):c(p.body)});return}let s=await r(p),m=p.local?e:await t();if(p.accountId=m,p.body){let e=c(p.body);i(await o(`Updating`,async()=>s.hyperdrive.replace({...e,account_id:m,hyperdrive_id:p[`hyperdrive-id`]})),{successLabel:`Updated`});return}p.name===void 0&&(p.name=await d(`name`,`The name of the Hyperdrive configuration. Used to identify the configuration in the Cloudflare dashboard and API.`)),p[`origin-database`]===void 0&&(p[`origin-database`]=await d(`origin-database`,`Set the name of your origin database.`)),p[`origin-password`]===void 0&&(p[`origin-password`]=await d(`origin-password`,`Set the password needed to access your origin database. The API never returns this write-only value.`,{kind:`secret`})),p[`origin-scheme`]===void 0&&(p[`origin-scheme`]=await f(`origin-scheme`,`Specifies the URL scheme used to connect to your origin database.`,[`postgres`,`postgresql`,`mysql`])),p[`origin-user`]===void 0&&(p[`origin-user`]=await d(`origin-user`,`Set the user of your origin database.`));let h=l({caching:{disabled:p[`caching-disabled`],max_age:p[`caching-max-age`],stale_while_revalidate:p[`caching-stale-while-revalidate`]},mtls:{ca_certificate_id:u(p[`mtls-ca-certificate-id`],`mtls-ca-certificate-id`,`text`),mtls_certificate_id:u(p[`mtls-mtls-certificate-id`],`mtls-mtls-certificate-id`,`text`),sslmode:u(p[`mtls-sslmode`],`mtls-sslmode`,`text`)},name:u(p.name,`name`,`text`),origin:{database:u(p[`origin-database`],`origin-database`,`text`),password:u(p[`origin-password`],`origin-password`,`text`),scheme:u(p[`origin-scheme`],`origin-scheme`,`text`),user:u(p[`origin-user`],`origin-user`,`text`),host:u(p[`origin-host`],`origin-host`,`text`),port:p[`origin-port`],access_client_id:u(p[`origin-access-client-id`],`origin-access-client-id`,`text`),access_client_secret:u(p[`origin-access-client-secret`],`origin-access-client-secret`,`text`),service_id:u(p[`origin-service-id`],`origin-service-id`,`text`)},origin_connection_limit:p[`origin-connection-limit`]});i(await o(`Updating`,async()=>s.hyperdrive.replace({...h,account_id:m,hyperdrive_id:p[`hyperdrive-id`]})),{successLabel:`Updated`})})};function E(e){return e.usage(`$0 hyperdrive restart <hyperdrive-id>
28
+
29
+ Restarts the connection pool for the specified Hyperdrive configuration without changing its configuration. Existing connections are drained and a new pool is established at the edge.`).positional(`hyperdrive-id`,{type:`string`,description:`The unique identifier of the Hyperdrive configuration.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const D={command:`restart <hyperdrive-id>`,describe:`Restart Hyperdrive`,builder:E,handler:async c=>s({command:`hyperdrive restart`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf hyperdrive restart`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/hyperdrive/configs/${c[`hyperdrive-id`]==null?`<hyperdrive-id>`:encodeURIComponent(String(c[`hyperdrive-id`]))}/restart`,pathParams:{"hyperdrive-id":String(c[`hyperdrive-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Creating`,async()=>s.hyperdrive.restart({account_id:l,hyperdrive_id:c[`hyperdrive-id`]})),{successLabel:`Created`})})};function O(e){return e.usage(`$0 hyperdrive update <hyperdrive-id>
30
+
31
+ Updates and returns the specified fields of the Hyperdrive configuration. Custom caching settings are not kept if caching is disabled.`).positional(`hyperdrive-id`,{type:`string`,description:`The unique identifier of the Hyperdrive configuration.`,demandOption:!0}).option(`caching-disabled`,{type:`boolean`,description:`Set to true to disable caching of SQL responses. Default is false.`}).option(`caching-max-age`,{type:`number`,description:`Specify the maximum duration (in seconds) items should persist in the cache. Defaults to 60 seconds if not specified.`}).option(`caching-stale-while-revalidate`,{type:`number`,description:`Specify the number of seconds the cache may serve a stale response. Defaults to 15 seconds if not specified.`}).option(`mtls-ca-certificate-id`,{type:`string`,description:`Define CA certificate ID obtained after uploading CA cert.`}).option(`mtls-mtls-certificate-id`,{type:`string`,description:`Define mTLS certificate ID obtained after uploading client cert.`}).option(`mtls-sslmode`,{type:`string`,description:"PostgreSQL accepts `require`, `verify-ca`, and `verify-full`. MySQL accepts `REQUIRED`, `VERIFY_CA`, and `VERIFY_IDENTITY`. The verify modes require a CA certificate; the require modes cannot be used with a CA certificate.",choices:[`require`,`verify-ca`,`verify-full`,`REQUIRED`,`VERIFY_CA`,`VERIFY_IDENTITY`]}).option(`name`,{type:`string`,description:`The name of the Hyperdrive configuration. Used to identify the configuration in the Cloudflare dashboard and API. An empty value leaves the name unchanged.`}).option(`origin-connection-limit`,{type:`number`,description:`The (soft) maximum number of connections the Hyperdrive is allowed to make to the origin database.
32
+
33
+ Maximum allowed: 20 for free tier accounts, 100 for paid tier accounts.
34
+ If not specified, defaults to 20 for free tier and 60 for paid tier.
35
+ Certain Cloudflare-managed origins may be permitted a higher limit.
36
+ Contact Cloudflare if you need a higher limit.
37
+ `}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const k={command:`update <hyperdrive-id>`,describe:`Update Hyperdrive`,builder:O,handler:async d=>s({command:`hyperdrive update`,classification:{safeFlags:[`caching-disabled`,`mtls-sslmode`,`dry-run`]}},d,async()=>{if(d.dryRun){a({command:`cf hyperdrive update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/hyperdrive/configs/${d[`hyperdrive-id`]==null?`<hyperdrive-id>`:encodeURIComponent(String(d[`hyperdrive-id`]))}`,pathParams:{"hyperdrive-id":String(d[`hyperdrive-id`]??``)},bodyKind:`json`,body:d.body===void 0?l({caching:{disabled:d[`caching-disabled`],max_age:d[`caching-max-age`],stale_while_revalidate:d[`caching-stale-while-revalidate`]},mtls:{ca_certificate_id:u(d[`mtls-ca-certificate-id`],`mtls-ca-certificate-id`,`text`),mtls_certificate_id:u(d[`mtls-mtls-certificate-id`],`mtls-mtls-certificate-id`,`text`),sslmode:u(d[`mtls-sslmode`],`mtls-sslmode`,`text`)},name:u(d.name,`name`,`text`),origin_connection_limit:d[`origin-connection-limit`]}):c(d.body)});return}let s=await r(d),f=d.local?e:await t();if(d.accountId=f,d.body){let e=c(d.body);i(await o(`Updating`,async()=>s.hyperdrive.update({...e,account_id:f,hyperdrive_id:d[`hyperdrive-id`]})),{successLabel:`Updated`});return}let p=l({caching:{disabled:d[`caching-disabled`],max_age:d[`caching-max-age`],stale_while_revalidate:d[`caching-stale-while-revalidate`]},mtls:{ca_certificate_id:u(d[`mtls-ca-certificate-id`],`mtls-ca-certificate-id`,`text`),mtls_certificate_id:u(d[`mtls-mtls-certificate-id`],`mtls-mtls-certificate-id`,`text`),sslmode:u(d[`mtls-sslmode`],`mtls-sslmode`,`text`)},name:u(d.name,`name`,`text`),origin_connection_limit:d[`origin-connection-limit`]});i(await o(`Updating`,async()=>s.hyperdrive.update({...p,account_id:f,hyperdrive_id:d[`hyperdrive-id`]})),{successLabel:`Updated`})})},A={command:`hyperdrive`,describe:`Accelerate access to existing databases by caching queries and pooling connections at the edge`,builder:e=>e.command(_).command(h).command(y).command(x).command(C).command(T).command(D).command(k).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{A as default};
@@ -0,0 +1,52 @@
1
+ #!/usr/bin/env node
2
+ import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-D4bkeMAw.mjs";import{r}from"./auth-Cp7gT-AF.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-Bi02B6v4.mjs";import{t as s}from"./run-BBBMrSrs.mjs";import"./telemetry-mKEb8lYB.mjs";import{n as c,r as l,t as u}from"./body-parser-CUWbw_Tq.mjs";import{n as d}from"./input-validation-Ch4Vllrm.mjs";import{a as f,n as p}from"./prompt-Bx2PB-tt.mjs";import{t as m}from"./cli-types-tt_LZMbn.mjs";function h(e){return e.usage(`$0 iam permission-groups get <permission-group-id>
3
+
4
+ Get information about a specific permission group in an account.`).positional(`permission-group-id`,{type:`string`,description:`Permission Group identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ee={command:`get <permission-group-id>`,describe:`Permission Group Details`,builder:h,handler:async c=>s({command:`iam permission-groups get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf iam permission-groups get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/iam/permission_groups/${c[`permission-group-id`]==null?`<permission-group-id>`:encodeURIComponent(String(c[`permission-group-id`]))}`,pathParams:{"permission-group-id":String(c[`permission-group-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.iam.permissionGroups.get({account_id:l,permission_group_id:c[`permission-group-id`]})),{successLabel:`Loaded`})})};function g(e){return e.usage(`$0 iam permission-groups list
5
+
6
+ List all the permissions groups for an account.`).option(`id`,{type:`string`,description:`ID of the permission group to be fetched.`}).option(`name`,{type:`string`,description:`Name of the permission group to be fetched.`}).option(`label`,{type:`string`,description:`Label of the permission group to be fetched.`}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _={command:`list`,describe:`List Account Permission Groups`,builder:g,handler:async c=>s({command:`iam permission-groups list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={id:c.id,name:c.name,label:c.label,page:c.page,per_page:c[`per-page`]};if(c.dryRun){a({command:`cf iam permission-groups list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/iam/permission_groups`,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.iam.permissionGroups.list({account_id:u,...s})),{successLabel:`Loaded`})})},v={command:`permission-groups`,describe:`View the permission groups that can be assigned to API tokens and policies`,builder:e=>e.command(ee).command(_).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function y(e){return e.usage(`$0 iam resource-groups create
7
+
8
+ Create a new Resource Group under the specified account.`).option(`name`,{type:`string`,description:`Name of the resource group`}).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 Resource Group`,builder:y,handler:async l=>s({command:`iam resource-groups create`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf iam resource-groups create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/iam/resource_groups`,pathParams:{},bodyKind:`json`,body:l.body===void 0?u({name:d(l.name,`name`,`text`)}):c(l.body)});return}let s=await r(l),p=l.local?e:await t();if(l.accountId=p,l.body){let e=c(l.body);i(await o(`Creating`,async()=>s.iam.resourceGroups.create({...e,account_id:p})),{successLabel:`Created`});return}l.name===void 0&&(l.name=await f(`name`,`Name of the resource group`));let m=u({name:d(l.name,`name`,`text`)});i(await o(`Creating`,async()=>s.iam.resourceGroups.create({...m,account_id:p})),{successLabel:`Created`})})};function x(e){return e.usage(`$0 iam resource-groups delete <resource-group-id>
9
+
10
+ Remove a resource group from an account.`).positional(`resource-group-id`,{type:`string`,description:`Resource Group 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 S={command:`delete <resource-group-id>`,describe:`Remove Resource Group`,builder:x,handler:async c=>s({command:`iam resource-groups delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf iam resource-groups delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/iam/resource_groups/${c[`resource-group-id`]==null?`<resource-group-id>`:encodeURIComponent(String(c[`resource-group-id`]))}`,pathParams:{"resource-group-id":String(c[`resource-group-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();if(c.accountId=l,!await p({force:!!c.force,message:`Are you sure? This action cannot be undone.`})){process.stderr.write(`Aborted.
11
+ `);return}i(await o(`Deleting`,async()=>s.iam.resourceGroups.delete({account_id:l,resource_group_id:c[`resource-group-id`]})),{successLabel:`Deleted`})})};function C(e){return e.usage(`$0 iam resource-groups get <resource-group-id>
12
+
13
+ Get information about a specific resource group in an account.`).positional(`resource-group-id`,{type:`string`,description:`Resource Group identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const w={command:`get <resource-group-id>`,describe:`Resource Group Details`,builder:C,handler:async c=>s({command:`iam resource-groups get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf iam resource-groups get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/iam/resource_groups/${c[`resource-group-id`]==null?`<resource-group-id>`:encodeURIComponent(String(c[`resource-group-id`]))}`,pathParams:{"resource-group-id":String(c[`resource-group-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.iam.resourceGroups.get({account_id:l,resource_group_id:c[`resource-group-id`]})),{successLabel:`Loaded`})})};function T(e){return e.usage(`$0 iam resource-groups list
14
+
15
+ List all the resource groups for an account.`).option(`id`,{type:`string`,description:`ID of the resource group to be fetched.`}).option(`name`,{type:`string`,description:`Name of the resource group to be fetched.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`list`,describe:`List Resource Groups`,builder:T,handler:async c=>s({command:`iam resource-groups list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={id:c.id,name:c.name};if(c.dryRun){a({command:`cf iam resource-groups list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/iam/resource_groups`,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.iam.resourceGroups.list({account_id:u,...s})),{successLabel:`Loaded`})})};function D(e){return e.usage(`$0 iam resource-groups update <resource-group-id>
16
+
17
+ Modify an existing resource group.`).positional(`resource-group-id`,{type:`string`,description:`Resource Group identifier tag.`,demandOption:!0}).option(`name`,{type:`string`,description:`Name of the resource group`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const O={command:`update <resource-group-id>`,describe:`Update Resource Group`,builder:D,handler:async l=>s({command:`iam resource-groups update`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf iam resource-groups update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/iam/resource_groups/${l[`resource-group-id`]==null?`<resource-group-id>`:encodeURIComponent(String(l[`resource-group-id`]))}`,pathParams:{"resource-group-id":String(l[`resource-group-id`]??``)},bodyKind:`json`,body:l.body===void 0?u({name:d(l.name,`name`,`text`)}):c(l.body)});return}let s=await r(l),f=l.local?e:await t();if(l.accountId=f,l.body){let e=c(l.body);i(await o(`Updating`,async()=>s.iam.resourceGroups.update({...e,account_id:f,resource_group_id:l[`resource-group-id`]})),{successLabel:`Updated`});return}let p=u({name:d(l.name,`name`,`text`)});i(await o(`Updating`,async()=>s.iam.resourceGroups.update({...p,account_id:f,resource_group_id:l[`resource-group-id`]})),{successLabel:`Updated`})})},k={command:`resource-groups`,describe:`Define scopes that limit which account resources a policy or token can access`,builder:e=>e.command(b).command(S).command(w).command(E).command(O).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function A(e){return e.usage(`$0 iam sso begin-verification <sso-connector-id>
18
+
19
+ Validates the user has added the DNS TXT record required for validating ownership of the domain they are trying to set up a connector for.`).positional(`sso-connector-id`,{type:`string`,description:`SSO Connector identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const j={command:`begin-verification <sso-connector-id>`,describe:`Begin SSO connector verification`,builder:A,handler:async c=>s({command:`iam sso begin-verification`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf iam sso begin-verification`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/sso_connectors/${c[`sso-connector-id`]==null?`<sso-connector-id>`:encodeURIComponent(String(c[`sso-connector-id`]))}/begin_verification`,pathParams:{"sso-connector-id":String(c[`sso-connector-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Creating`,async()=>s.iam.sso.beginVerification({account_id:l,sso_connector_id:c[`sso-connector-id`]})),{successLabel:`Created`})})};function M(e){return e.usage(`$0 iam sso create
20
+
21
+ Creates a new SSO connector for logging into Cloudflare through an identity provider.`).option(`begin-verification`,{type:`boolean`,description:`Begin the verification process after creation`,default:!0}).option(`email-domain`,{type:`string`,description:`Email domain of the new SSO connector`}).option(`use-fedramp-language`,{type:`boolean`,description:`Controls the display of FedRAMP language to the user during SSO login`,default:!1}).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 N={command:`create`,describe:`Initialize new SSO connector`,builder:M,handler:async l=>s({command:`iam sso create`,classification:{safeFlags:[`begin-verification`,`use-fedramp-language`,`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf iam sso create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/sso_connectors`,pathParams:{},bodyKind:`json`,body:l.body===void 0?u({begin_verification:l[`begin-verification`],email_domain:d(l[`email-domain`],`email-domain`,`text`),use_fedramp_language:l[`use-fedramp-language`]}):c(l.body)});return}let s=await r(l),p=l.local?e:await t();if(l.accountId=p,l.body){let e=c(l.body);i(await o(`Creating`,async()=>s.iam.sso.create({...e,account_id:p})),{successLabel:`Created`});return}l[`email-domain`]===void 0&&(l[`email-domain`]=await f(`email-domain`,`Email domain of the new SSO connector`));let m=u({begin_verification:l[`begin-verification`],email_domain:d(l[`email-domain`],`email-domain`,`text`),use_fedramp_language:l[`use-fedramp-language`]});i(await o(`Creating`,async()=>s.iam.sso.create({...m,account_id:p})),{successLabel:`Created`})})};function P(e){return e.usage(`$0 iam sso delete <sso-connector-id>
22
+
23
+ Deletes an SSO connector from the account.`).positional(`sso-connector-id`,{type:`string`,description:`SSO Connector 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 F={command:`delete <sso-connector-id>`,describe:`Delete SSO connector`,builder:P,handler:async c=>s({command:`iam sso delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf iam sso delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/sso_connectors/${c[`sso-connector-id`]==null?`<sso-connector-id>`:encodeURIComponent(String(c[`sso-connector-id`]))}`,pathParams:{"sso-connector-id":String(c[`sso-connector-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();if(c.accountId=l,!await p({force:!!c.force,message:`Are you sure? This action cannot be undone.`})){process.stderr.write(`Aborted.
24
+ `);return}i(await o(`Deleting`,async()=>s.iam.sso.delete({account_id:l,sso_connector_id:c[`sso-connector-id`]})),{successLabel:`Deleted`})})};function I(e){return e.usage(`$0 iam sso get <sso-connector-id>
25
+
26
+ Retrieves details for a specific SSO connector.`).positional(`sso-connector-id`,{type:`string`,description:`SSO Connector identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const L={command:`get <sso-connector-id>`,describe:`Get single SSO connector`,builder:I,handler:async c=>s({command:`iam sso get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf iam sso get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/sso_connectors/${c[`sso-connector-id`]==null?`<sso-connector-id>`:encodeURIComponent(String(c[`sso-connector-id`]))}`,pathParams:{"sso-connector-id":String(c[`sso-connector-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.iam.sso.get({account_id:l,sso_connector_id:c[`sso-connector-id`]})),{successLabel:`Loaded`})})};function R(e){return e.usage(`$0 iam sso list
27
+
28
+ Lists all SSO connectors configured for the account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const z={command:`list`,describe:`Get all SSO connectors`,builder:R,handler:async c=>s({command:`iam sso list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf iam sso list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/sso_connectors`,pathParams:{},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.iam.sso.list({account_id:l})),{successLabel:`Loaded`})})};function te(e){return e.usage(`$0 iam sso update <sso-connector-id>
29
+
30
+ Updates the state or configuration of an SSO connector.`).positional(`sso-connector-id`,{type:`string`,description:`SSO Connector identifier tag.`,demandOption:!0}).option(`enabled`,{type:`boolean`,description:`SSO Connector enabled state`}).option(`use-fedramp-language`,{type:`boolean`,description:`Controls the display of FedRAMP language to the user during SSO login`}).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:`update <sso-connector-id>`,describe:`Update SSO connector state`,builder:te,handler:async l=>s({command:`iam sso update`,classification:{safeFlags:[`enabled`,`use-fedramp-language`,`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf iam sso update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/sso_connectors/${l[`sso-connector-id`]==null?`<sso-connector-id>`:encodeURIComponent(String(l[`sso-connector-id`]))}`,pathParams:{"sso-connector-id":String(l[`sso-connector-id`]??``)},bodyKind:`json`,body:l.body===void 0?u({enabled:l.enabled,use_fedramp_language:l[`use-fedramp-language`]}):c(l.body)});return}let s=await r(l),d=l.local?e:await t();if(l.accountId=d,l.body){let e=c(l.body);i(await o(`Updating`,async()=>s.iam.sso.update({...e,account_id:d,sso_connector_id:l[`sso-connector-id`]})),{successLabel:`Updated`});return}let f=u({enabled:l.enabled,use_fedramp_language:l[`use-fedramp-language`]});i(await o(`Updating`,async()=>s.iam.sso.update({...f,account_id:d,sso_connector_id:l[`sso-connector-id`]})),{successLabel:`Updated`})})},V={command:`sso`,describe:`Configure single sign-on connectors to authenticate account members through an external identity provider`,builder:e=>e.command(j).command(N).command(F).command(L).command(z).command(B).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function H(e){return e.usage(`$0 iam user-groups create
31
+
32
+ Create a new user group under the specified account.`).option(`name`,{type:`string`,description:`Name of the User group.`}).option(`policies`,{type:`string`,description:`Policies attached to the User group. 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 U={command:`create`,describe:`Create User Group`,builder:H,handler:async p=>s({command:`iam user-groups create`,classification:{safeFlags:[`dry-run`]}},p,async()=>{if(p.dryRun){a({command:`cf iam user-groups create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/iam/user_groups`,pathParams:{},bodyKind:`json`,body:p.body===void 0?u({name:d(p.name,`name`,`text`),policies:l(p.policies,`policies`)}):c(p.body)});return}let s=await r(p),m=p.local?e:await t();if(p.accountId=m,p.body){let e=c(p.body);i(await o(`Creating`,async()=>s.iam.userGroups.create({...e,account_id:m})),{successLabel:`Created`});return}p.name===void 0&&(p.name=await f(`name`,`Name of the User group.`));let h=u({name:d(p.name,`name`,`text`),policies:l(p.policies,`policies`)});i(await o(`Creating`,async()=>s.iam.userGroups.create({...h,account_id:m})),{successLabel:`Created`})})};function W(e){return e.usage(`$0 iam user-groups delete <user-group-id>
33
+
34
+ Remove a user group from an account.`).positional(`user-group-id`,{type:`string`,description:`User Group 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 G={command:`delete <user-group-id>`,describe:`Remove User Group`,builder:W,handler:async c=>s({command:`iam user-groups delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf iam user-groups delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/iam/user_groups/${c[`user-group-id`]==null?`<user-group-id>`:encodeURIComponent(String(c[`user-group-id`]))}`,pathParams:{"user-group-id":String(c[`user-group-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();if(c.accountId=l,!await p({force:!!c.force,message:`Are you sure? This action cannot be undone.`})){process.stderr.write(`Aborted.
35
+ `);return}i(await o(`Deleting`,async()=>s.iam.userGroups.delete({account_id:l,user_group_id:c[`user-group-id`]})),{successLabel:`Deleted`})})};function K(e){return e.usage(`$0 iam user-groups get <user-group-id>
36
+
37
+ Get information about a specific user group in an account.`).positional(`user-group-id`,{type:`string`,description:`User Group identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const q={command:`get <user-group-id>`,describe:`User Group Details`,builder:K,handler:async c=>s({command:`iam user-groups get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf iam user-groups get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/iam/user_groups/${c[`user-group-id`]==null?`<user-group-id>`:encodeURIComponent(String(c[`user-group-id`]))}`,pathParams:{"user-group-id":String(c[`user-group-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.iam.userGroups.get({account_id:l,user_group_id:c[`user-group-id`]})),{successLabel:`Loaded`})})};function J(e){return e.usage(`$0 iam user-groups list
38
+
39
+ List all the user groups for an account.`).option(`id`,{type:`string`,description:`ID of the user group to be fetched.`}).option(`name`,{type:`string`,description:`Name of the user group to be fetched.`}).option(`fuzzy-name`,{type:`string`,description:`A string used for searching for user groups containing that substring.`}).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:`The sort order of returned user groups by name (ascending or descending).`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Y={command:`list`,describe:`List User Groups`,builder:m(J),handler:async c=>s({command:`iam user-groups list`,classification:{safeFlags:[`direction`,`dry-run`]}},c,async()=>{let s={id:c.id,name:c.name,fuzzyName:c[`fuzzy-name`],page:c.page,per_page:c[`per-page`],direction:c.direction};if(c.dryRun){a({command:`cf iam user-groups list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/iam/user_groups`,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.iam.userGroups.list({account_id:u,...s})),{successLabel:`Loaded`})})};function X(e){return e.usage(`$0 iam user-groups members create <user-group-id>
40
+
41
+ Add members to a User Group.`).positional(`user-group-id`,{type:`string`,description:`User Group 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 Z={command:`create <user-group-id>`,describe:`Add User Group Members`,builder:X,handler:async l=>s({command:`iam user-groups members create`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf iam user-groups members create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/iam/user_groups/${l[`user-group-id`]==null?`<user-group-id>`:encodeURIComponent(String(l[`user-group-id`]))}/members`,pathParams:{"user-group-id":String(l[`user-group-id`]??``)},bodyKind:`json`,body:l.body===void 0?void 0:c(l.body)});return}let s=await r(l),u=l.local?e:await t();if(l.accountId=u,l.body){let e=c(l.body);i(await o(`Creating`,async()=>s.iam.userGroups.members.create({body:e,account_id:u,user_group_id:l[`user-group-id`]})),{successLabel:`Created`});return}if(l.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function Q(e){return e.usage(`$0 iam user-groups members delete <member-id>
42
+
43
+ Remove a member from User Group`).positional(`member-id`,{type:`string`,description:`The identifier of an existing account Member.`,demandOption:!0}).option(`user-group-id`,{type:`string`,description:`User Group 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 ne={command:`delete <member-id>`,describe:`Remove User Group Member`,builder:Q,handler:async c=>s({command:`iam user-groups members delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf iam user-groups members delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/iam/user_groups/${c[`user-group-id`]==null?`<user-group-id>`:encodeURIComponent(String(c[`user-group-id`]))}/members/${c[`member-id`]==null?`<member-id>`:encodeURIComponent(String(c[`member-id`]))}`,pathParams:{"user-group-id":String(c[`user-group-id`]??``),"member-id":String(c[`member-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();if(c.accountId=l,!await p({force:!!c.force,message:`Are you sure? This action cannot be undone.`})){process.stderr.write(`Aborted.
44
+ `);return}i(await o(`Deleting`,async()=>s.iam.userGroups.members.delete({account_id:l,user_group_id:c[`user-group-id`],member_id:c[`member-id`]})),{successLabel:`Deleted`})})};function re(e){return e.usage(`$0 iam user-groups members get <member-id>
45
+
46
+ Get details of a specific member in a user group.`).positional(`member-id`,{type:`string`,description:`The identifier of an existing account Member.`,demandOption:!0}).option(`user-group-id`,{type:`string`,description:`User Group identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ie={command:`get <member-id>`,describe:`Get User Group Member`,builder:re,handler:async c=>s({command:`iam user-groups members get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf iam user-groups members get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/iam/user_groups/${c[`user-group-id`]==null?`<user-group-id>`:encodeURIComponent(String(c[`user-group-id`]))}/members/${c[`member-id`]==null?`<member-id>`:encodeURIComponent(String(c[`member-id`]))}`,pathParams:{"user-group-id":String(c[`user-group-id`]??``),"member-id":String(c[`member-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.iam.userGroups.members.get({account_id:l,user_group_id:c[`user-group-id`],member_id:c[`member-id`]})),{successLabel:`Loaded`})})};function ae(e){return e.usage(`$0 iam user-groups members list
47
+
48
+ List all the members attached to a user group.`).option(`user-group-id`,{type:`string`,description:`User Group identifier tag.`,demandOption:!0}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results per page.`}).option(`fuzzy-email`,{type:`string`,description:`A string used for filtering members by partial email match.`}).option(`direction`,{type:`string`,description:`The sort order of returned user group members by email.`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const oe={command:`list`,describe:`List User Group Members`,builder:m(ae),handler:async c=>s({command:`iam user-groups members list`,classification:{safeFlags:[`direction`,`dry-run`]}},c,async()=>{let s={page:c.page,per_page:c[`per-page`],fuzzyEmail:c[`fuzzy-email`],direction:c.direction};if(c.dryRun){a({command:`cf iam user-groups members list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/iam/user_groups/${c[`user-group-id`]==null?`<user-group-id>`:encodeURIComponent(String(c[`user-group-id`]))}/members`,pathParams:{"user-group-id":String(c[`user-group-id`]??``)},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.iam.userGroups.members.list({account_id:u,user_group_id:c[`user-group-id`],...s})),{successLabel:`Loaded`})})};function $(e){return e.usage(`$0 iam user-groups members update <user-group-id>
49
+
50
+ Replace the set of members attached to a User Group.`).positional(`user-group-id`,{type:`string`,description:`User Group 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:`Set/Replace members to a user group.`})}const se={command:`update <user-group-id>`,describe:`Update User Group Members`,builder:$,handler:async l=>s({command:`iam user-groups members update`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf iam user-groups members update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/iam/user_groups/${l[`user-group-id`]==null?`<user-group-id>`:encodeURIComponent(String(l[`user-group-id`]))}/members`,pathParams:{"user-group-id":String(l[`user-group-id`]??``)},bodyKind:`json`,body:l.body===void 0?void 0:c(l.body)});return}let s=await r(l),u=l.local?e:await t();if(l.accountId=u,l.body){let e=c(l.body);i(await o(`Updating`,async()=>s.iam.userGroups.members.update({body:e,account_id:u,user_group_id:l[`user-group-id`]})),{successLabel:`Updated`});return}if(l.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},ce={command:`members`,describe:`Operations for user-groups.members`,builder:e=>e.command(Z).command(ne).command(ie).command(oe).command(se).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function le(e){return e.usage(`$0 iam user-groups update <user-group-id>
51
+
52
+ Modify an existing user group.`).positional(`user-group-id`,{type:`string`,description:`User Group identifier tag.`,demandOption:!0}).option(`name`,{type:`string`,description:`Name of the User group.`}).option(`policies`,{type:`string`,description:`Policies attached to the User group. 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 ue={command:`update <user-group-id>`,describe:`Update User Group`,builder:le,handler:async f=>s({command:`iam user-groups update`,classification:{safeFlags:[`dry-run`]}},f,async()=>{if(f.dryRun){a({command:`cf iam user-groups update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/iam/user_groups/${f[`user-group-id`]==null?`<user-group-id>`:encodeURIComponent(String(f[`user-group-id`]))}`,pathParams:{"user-group-id":String(f[`user-group-id`]??``)},bodyKind:`json`,body:f.body===void 0?u({name:d(f.name,`name`,`text`),policies:l(f.policies,`policies`)}):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(`Updating`,async()=>s.iam.userGroups.update({...e,account_id:p,user_group_id:f[`user-group-id`]})),{successLabel:`Updated`});return}let m=u({name:d(f.name,`name`,`text`),policies:l(f.policies,`policies`)});i(await o(`Updating`,async()=>s.iam.userGroups.update({...m,account_id:p,user_group_id:f[`user-group-id`]})),{successLabel:`Updated`})})},de={command:`user-groups`,describe:`Organize account members into groups for easier permission assignment`,builder:e=>e.command(U).command(G).command(q).command(Y).command(ue).command(ce).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},fe={command:`iam`,describe:`Identity and access management — permission groups, resource groups, user groups, and SSO connectors`,builder:e=>e.command(v).command(k).command(V).command(de).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{fe as default};
@@ -0,0 +1,71 @@
1
+ #!/usr/bin/env node
2
+ import{t as e}from"./local-B6b2OIBW.mjs";import{_ as t,m as n,v as r}from"./oauth-D4bkeMAw.mjs";import{a as i,r as a}from"./auth-Cp7gT-AF.mjs";import{t as o}from"./output-Bia1u2k5.mjs";import{t as s}from"./dry-run-CLX6Pbtq.mjs";import{t as c}from"./progress-Bi02B6v4.mjs";import{t as l}from"./run-BBBMrSrs.mjs";import"./telemetry-mKEb8lYB.mjs";import{n as u,r as d,t as f}from"./body-parser-CUWbw_Tq.mjs";import{n as p,t as m}from"./input-validation-Ch4Vllrm.mjs";import{a as h,i as g,n as _}from"./prompt-Bx2PB-tt.mjs";import{t as ee}from"./cli-types-tt_LZMbn.mjs";import{n as te,t as v}from"./raw-fetch-DNTQkXbg.mjs";function y(e){return e.usage(`$0 images create
3
+
4
+ Upload an image to CF Images. Images up to 10 Megabytes can be uploaded using a single HTTP POST (multipart/form-data) request by sending an image file or passing a URL accessible to the API.`).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`}).option(`creator`,{type:`string`,description:`Can set the creator field with an internal user ID.`}).option(`id`,{type:`string`,description:`An optional custom unique identifier for your image.`}).option(`metadata`,{type:`string`,description:`User modifiable key-value store. Can use used for keeping references to another system of record for managing images.`}).option(`require-signed-urls`,{type:`boolean`,description:`Indicates whether the image requires a signature token for the access.`}).option(`url`,{type:`string`,description:`A URL to fetch an image from origin. Only needed when type is uploading from a URL.`})}const b={command:`create`,describe:`Upload an image`,builder:y,handler:async t=>l({command:`images create`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf images create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v1`,pathParams:{},bodyKind:`multipart`,body:{body:t.body,file:t.file,creator:t.creator,id:t.id,metadata:t.metadata,"require-signed-urls":t[`require-signed-urls`],url:t.url}});return}let l=await a(t),u=t.local?e:await n();if(t.accountId=u,t.file!==void 0||t.body!==void 0||t.creator!==void 0||t.id!==void 0||t.metadata!==void 0||t[`require-signed-urls`]!==void 0||t.url!==void 0){let e=new FormData;if(t.file){let n=m(t.file);e.append(`file`,new Blob([n]),t.file.split(/[\\/]/).filter(Boolean).pop())}else t.body!==void 0&&e.append(`file`,t.body);if(t.creator!==void 0&&e.append(`creator`,String(p(t.creator,`creator`,`text`)??``)),t.id!==void 0&&e.append(`id`,String(p(t.id,`id`,`text`)??``)),t.metadata!==void 0){let n=typeof t.metadata==`string`?p(t.metadata,`metadata`,`text`):t.metadata;e.append(`metadata`,typeof n==`string`?n:JSON.stringify(n))}t[`require-signed-urls`]!==void 0&&e.append(`requireSignedURLs`,String(t[`require-signed-urls`])),t.url!==void 0&&e.append(`url`,String(p(t.url,`url`,`text`)??``)),o(await c(`Creating`,async()=>i(l,`POST`,`/accounts/${u}/images/v1`,{body:e})),{successLabel:`Created`});return}if(t.body){let e=p(t.body,`body`,`binary`);o(await c(`Creating`,async()=>i(l,`POST`,`/accounts/${u}/images/v1`,{body:e,headers:{"Content-Type":`multipart/form-data`}})),{successLabel:`Created`});return}o(await c(`Creating`,async()=>l.images.create({account_id:u})),{successLabel:`Created`})})};function x(e){return e.usage(`$0 images delete <image-id>
5
+
6
+ Delete an image on Cloudflare Images. On success, all copies of the image are deleted and purged from cache.`).positional(`image-id`,{type:`string`,description:`Image unique identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const S={command:`delete <image-id>`,describe:`Delete image`,builder:x,handler:async t=>l({command:`images delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){s({command:`cf images delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v1/${t[`image-id`]==null?`<image-id>`:encodeURIComponent(String(t[`image-id`]))}`,pathParams:{"image-id":String(t[`image-id`]??``)},bodyKind:`none`});return}let i=await a(t),l=t.local?e:await n();if(t.accountId=l,!await _({force:!!t.force,message:`This operation will delete this image.`})){process.stderr.write(`Aborted.
7
+ `);return}o(await c(`Deleting`,async()=>i.images.delete({account_id:l,image_id:t[`image-id`]})),{successLabel:`Deleted`})})};function C(e){return e.usage(`$0 images direct-upload
8
+
9
+ Direct uploads allow users to upload images without API keys. A common use case are web apps, client-side applications, or mobile devices where users upload content directly to Cloudflare Images. This method creates a draft record for a future image. It returns an upload URL and an image identifier. To verify if the image itself has been uploaded, send an image details request (accounts/:account_identifier/images/v1/:identifier), and check that the \`draft: true\` property is not present.`).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`}).option(`creator`,{type:`string`,description:`Can set the creator field with an internal user ID.`}).option(`expiry`,{type:`string`,description:`The date after which the upload will not be accepted. Minimum: Now + 2 minutes. Maximum: Now + 6 hours.`}).option(`id`,{type:`string`,description:`Optional Image Custom ID. Up to 1024 chars. Can include any number of subpaths, and utf8 characters. Cannot start nor end with a / (forward slash). Cannot be a UUID.`}).option(`metadata`,{type:`string`,description:`User modifiable key-value store. Can be used for keeping references to another system of record, for managing images.`}).option(`require-signed-urls`,{type:`boolean`,description:`Indicates whether the image requires a signature token to be accessed.`})}const w={command:`direct-upload`,describe:`Create authenticated direct upload URL V2`,builder:C,handler:async t=>l({command:`images direct-upload`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf images direct-upload`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v2/direct_upload`,pathParams:{},bodyKind:`multipart`,body:{body:t.body,file:t.file,creator:t.creator,expiry:t.expiry,id:t.id,metadata:t.metadata,"require-signed-urls":t[`require-signed-urls`]}});return}let l=await a(t),u=t.local?e:await n();if(t.accountId=u,t.file!==void 0||t.body!==void 0||t.creator!==void 0||t.expiry!==void 0||t.id!==void 0||t.metadata!==void 0||t[`require-signed-urls`]!==void 0){let e=new FormData;if(t.file){let n=m(t.file);e.append(`file`,new Blob([n]),t.file.split(/[\\/]/).filter(Boolean).pop())}else t.body!==void 0&&e.append(`file`,t.body);if(t.creator!==void 0&&e.append(`creator`,String(p(t.creator,`creator`,`text`)??``)),t.expiry!==void 0&&e.append(`expiry`,String(p(t.expiry,`expiry`,`text`)??``)),t.id!==void 0&&e.append(`id`,String(p(t.id,`id`,`text`)??``)),t.metadata!==void 0){let n=typeof t.metadata==`string`?p(t.metadata,`metadata`,`text`):t.metadata;e.append(`metadata`,typeof n==`string`?n:JSON.stringify(n))}t[`require-signed-urls`]!==void 0&&e.append(`requireSignedURLs`,String(t[`require-signed-urls`])),o(await c(`Creating`,async()=>i(l,`POST`,`/accounts/${u}/images/v2/direct_upload`,{body:e})),{successLabel:`Created`});return}if(t.body){let e=p(t.body,`body`,`binary`);o(await c(`Creating`,async()=>i(l,`POST`,`/accounts/${u}/images/v2/direct_upload`,{body:e,headers:{"Content-Type":`multipart/form-data`}})),{successLabel:`Created`});return}o(await c(`Creating`,async()=>l.images.directUpload({account_id:u})),{successLabel:`Created`})})};function T(e){return e.usage(`$0 images edit <image-id>
10
+
11
+ Update a CF Images image's metadata, creator, or access control. On access control change, all copies of the image are purged from cache.`).positional(`image-id`,{type:`string`,description:`Image unique identifier.`,demandOption:!0}).option(`creator`,{type:`string`,description:`Can set the creator field with an internal user ID.`}).option(`require-signed-urls`,{type:`boolean`,description:"Indicates whether the image can be accessed using only its UID. If set to `true`, a signed token needs to be generated with a signing key to view the image. Returns a new UID on a change. No change if not specified."}).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 E={command:`edit <image-id>`,describe:`Update image`,builder:T,handler:async t=>l({command:`images edit`,classification:{safeFlags:[`require-signed-urls`,`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf images edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v1/${t[`image-id`]==null?`<image-id>`:encodeURIComponent(String(t[`image-id`]))}`,pathParams:{"image-id":String(t[`image-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({creator:p(t.creator,`creator`,`text`),requireSignedURLs:t[`require-signed-urls`]}):u(t.body)});return}let i=await a(t),l=t.local?e:await n();if(t.accountId=l,t.body){let e=u(t.body);o(await c(`Updating`,async()=>i.images.edit({...e,account_id:l,image_id:t[`image-id`]})),{successLabel:`Updated`});return}let d=f({creator:p(t.creator,`creator`,`text`),requireSignedURLs:t[`require-signed-urls`]});o(await c(`Updating`,async()=>i.images.edit({...d,account_id:l,image_id:t[`image-id`]})),{successLabel:`Updated`})})};function D(e){return e.usage(`$0 images flows get
12
+
13
+ Get the current transformation flows configuration for a zone.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const O={command:`get`,describe:`Get transformation flows`,builder:D,handler:async e=>l({command:`images flows get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf images flows get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/images/v1/flows`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let n=await a(e),r=await t({zone:e.zone},n,{quiet:e.quiet});e.zoneId=r,o(await c(`Loading`,async()=>n.images.flows.get({zone_id:r})),{successLabel:`Loaded`})})};function k(e){return e.usage(`$0 images flows update
14
+
15
+ Replace the entire transformation flows configuration for a zone.`).option(`etag`,{type:`string`,description:`The etag field`}).option(`flows`,{type:`string`,description:`The flows field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`config-version`,{type:`number`,description:`The version field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const A={command:`update`,describe:`Update transformation flows`,builder:k,handler:async e=>l({command:`images flows update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf images flows update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/images/v1/flows`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({etag:p(e.etag,`etag`,`text`),flows:d(e.flows,`flows`),version:e[`config-version`]}):u(e.body)});return}let n=await a(e),r=await t({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=r,e.body){let t=u(e.body);o(await c(`Updating`,async()=>n.images.flows.update({...t,zone_id:r})),{successLabel:`Updated`});return}if(e.flows===void 0)throw Error(`--flows is required (or pass --body with this field set).`);if(e[`config-version`]===void 0)throw Error(`--config-version is required (or pass --body with this field set).`);let i=f({etag:p(e.etag,`etag`,`text`),flows:d(e.flows,`flows`),version:e[`config-version`]});o(await c(`Updating`,async()=>n.images.flows.update({...i,zone_id:r})),{successLabel:`Updated`})})},j={command:`flows`,describe:`Zone-level transformation flows that control how images are resized and optimized on delivery`,builder:e=>e.command(O).command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function M(e){return e.usage(`$0 images get-blob <image-id>
16
+
17
+ Download an image from CF Images. For most images this will be the originally uploaded file. For larger images it can be a near-lossless version of the original.`).positional(`image-id`,{type:`string`,description:`Image unique identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`text`,{type:`boolean`,description:`Decode the response body as UTF-8 text instead of writing raw bytes`,default:!1})}const N={command:`get-blob <image-id>`,describe:`Download image`,builder:M,handler:async t=>l({command:`images get-blob`,classification:{safeFlags:[`dry-run`,`text`]}},t,async()=>{if(t.dryRun){s({command:`cf images get-blob`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v1/${t[`image-id`]==null?`<image-id>`:encodeURIComponent(String(t[`image-id`]))}/blob`,pathParams:{"image-id":String(t[`image-id`]??``)},bodyKind:`none`});return}await a(t);let i=t.local?e:await n();t.accountId=i;let o=await c(`Loading`,async()=>v(`/accounts/${i}/images/v1/${encodeURIComponent(String(t[`image-id`]))}/blob`,{method:`GET`,local:t.local===!0,persistTo:t.persistTo}));te(t.text===!0?o.toString(`utf-8`):o)})};function P(e){return e.usage(`$0 images get <image-id>
18
+
19
+ Fetch details for a CF Images image.`).positional(`image-id`,{type:`string`,description:`Image unique identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const F={command:`get <image-id>`,describe:`Image details`,builder:P,handler:async t=>l({command:`images get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf images get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v1/${t[`image-id`]==null?`<image-id>`:encodeURIComponent(String(t[`image-id`]))}`,pathParams:{"image-id":String(t[`image-id`]??``)},bodyKind:`none`});return}let i=await a(t),l=t.local?e:await n();t.accountId=l,o(await c(`Loading`,async()=>i.images.get({account_id:l,image_id:t[`image-id`]})),{successLabel:`Loaded`})})};function I(e){return e.usage(`$0 images import abort <migration-id>
20
+
21
+ Abort a running CF Images import. Already imported images will remain.`).positional(`migration-id`,{type:`string`,description:`Sourcing kit resource identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const L={command:`abort <migration-id>`,describe:`Abort a migration`,builder:I,handler:async t=>l({command:`images import abort`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf images import abort`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v2/sourcingkit/migrations/${t[`migration-id`]==null?`<migration-id>`:encodeURIComponent(String(t[`migration-id`]))}/lifecycle/abort`,pathParams:{"migration-id":String(t[`migration-id`]??``)},bodyKind:`none`});return}let i=await a(t),l=t.local?e:await n();t.accountId=l,o(await c(`Updating`,async()=>i.images.import.abort({account_id:l,migration_id:t[`migration-id`]})),{successLabel:`Updated`})})};function R(e){return e.usage(`$0 images import create
22
+
23
+ Create a pending CF Images import from a configured source.`).option(`conflict-behaviour`,{type:`string`,description:`How to handle objects that already exist at the destination.`,choices:[`skip`,`overwrite`],default:`skip`}).option(`excluded-content-types`,{type:`string`,array:!0,description:`Content types to skip during migration.`}).option(`path-prefix`,{type:`string`,description:`Prefix to prepend to image custom IDs.`}).option(`root-directory`,{type:`string`,description:`Only import objects under this prefix in the source bucket.`}).option(`source-id`,{type:`string`,description:`The identifier of the source to migrate from.`}).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 z={command:`create`,describe:`Create a sourcing kit migration`,builder:R,handler:async t=>l({command:`images import create`,classification:{safeFlags:[`conflict-behaviour`,`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf images import create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v2/sourcingkit/migrations`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({conflictBehaviour:p(t[`conflict-behaviour`],`conflict-behaviour`,`text`),excludedContentTypes:t[`excluded-content-types`],pathPrefix:p(t[`path-prefix`],`path-prefix`,`text`),rootDirectory:p(t[`root-directory`],`root-directory`,`text`),sourceId:p(t[`source-id`],`source-id`,`text`)}):u(t.body)});return}let i=await a(t),l=t.local?e:await n();if(t.accountId=l,t.body){let e=u(t.body);o(await c(`Creating`,async()=>i.images.import.create({...e,account_id:l})),{successLabel:`Created`});return}t[`source-id`]===void 0&&(t[`source-id`]=await h(`source-id`,`The identifier of the source to migrate from.`));let d=f({conflictBehaviour:p(t[`conflict-behaviour`],`conflict-behaviour`,`text`),excludedContentTypes:t[`excluded-content-types`],pathPrefix:p(t[`path-prefix`],`path-prefix`,`text`),rootDirectory:p(t[`root-directory`],`root-directory`,`text`),sourceId:p(t[`source-id`],`source-id`,`text`)});o(await c(`Creating`,async()=>i.images.import.create({...d,account_id:l})),{successLabel:`Created`})})};function B(e){return e.usage(`$0 images import delete <migration-id>
24
+
25
+ Delete a completed, failed, or aborted CF Images import.`).positional(`migration-id`,{type:`string`,description:`Sourcing kit resource identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const V={command:`delete <migration-id>`,describe:`Delete a sourcing kit migration`,builder:B,handler:async t=>l({command:`images import delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){s({command:`cf images import delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v2/sourcingkit/migrations/${t[`migration-id`]==null?`<migration-id>`:encodeURIComponent(String(t[`migration-id`]))}`,pathParams:{"migration-id":String(t[`migration-id`]??``)},bodyKind:`none`});return}let i=await a(t),l=t.local?e:await n();if(t.accountId=l,!await _({force:!!t.force,message:`This operation will delete this import migration.`})){process.stderr.write(`Aborted.
26
+ `);return}o(await c(`Deleting`,async()=>i.images.import.delete({account_id:l,migration_id:t[`migration-id`]})),{successLabel:`Deleted`})})};function H(e){return e.usage(`$0 images import get <migration-id>
27
+
28
+ Get the configuration and status of a CF Images import.`).positional(`migration-id`,{type:`string`,description:`Sourcing kit resource identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const U={command:`get <migration-id>`,describe:`Get sourcing kit migration`,builder:H,handler:async t=>l({command:`images import get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf images import get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v2/sourcingkit/migrations/${t[`migration-id`]==null?`<migration-id>`:encodeURIComponent(String(t[`migration-id`]))}`,pathParams:{"migration-id":String(t[`migration-id`]??``)},bodyKind:`none`});return}let i=await a(t),l=t.local?e:await n();t.accountId=l,o(await c(`Loading`,async()=>i.images.import.get({account_id:l,migration_id:t[`migration-id`]})),{successLabel:`Loaded`})})};function W(e){return e.usage(`$0 images import list
29
+
30
+ List CF Images imports.`).option(`offset`,{type:`number`,description:`Number of items to skip before returning results.`}).option(`limit`,{type:`number`,description:`Maximum number of items to return.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const G={command:`list`,describe:`List sourcing kit migrations`,builder:W,handler:async t=>l({command:`images import list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let i={offset:t.offset,limit:t.limit};if(t.dryRun){s({command:`cf images import list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v2/sourcingkit/migrations`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(t),u=t.local?e:await n();t.accountId=u,o(await c(`Loading`,async()=>l.images.import.list({account_id:u,...i})),{successLabel:`Loaded`})})};function K(e){return e.usage(`$0 images import logs <migration-id>
31
+
32
+ List log entries for a CF Images import.`).positional(`migration-id`,{type:`string`,description:`Sourcing kit resource identifier.`,demandOption:!0}).option(`offset`,{type:`number`,description:`Number of items to skip before returning results.`}).option(`limit`,{type:`number`,description:`Maximum number of items to return.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const q={command:`logs <migration-id>`,describe:`List migration logs`,builder:K,handler:async t=>l({command:`images import logs`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let i={offset:t.offset,limit:t.limit};if(t.dryRun){s({command:`cf images import logs`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v2/sourcingkit/migrations/${t[`migration-id`]==null?`<migration-id>`:encodeURIComponent(String(t[`migration-id`]))}/logs`,pathParams:{"migration-id":String(t[`migration-id`]??``)},query:i,bodyKind:`none`});return}let l=await a(t),u=t.local?e:await n();t.accountId=u,o(await c(`Loading`,async()=>l.images.import.logs({account_id:u,migration_id:t[`migration-id`],...i})),{successLabel:`Loaded`})})};function J(e){return e.usage(`$0 images import progress <migration-id>
33
+
34
+ Get progress and object counts for a CF Images import.`).positional(`migration-id`,{type:`string`,description:`Sourcing kit resource identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Y={command:`progress <migration-id>`,describe:`Get migration progress`,builder:J,handler:async t=>l({command:`images import progress`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf images import progress`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v2/sourcingkit/migrations/${t[`migration-id`]==null?`<migration-id>`:encodeURIComponent(String(t[`migration-id`]))}/lifecycle`,pathParams:{"migration-id":String(t[`migration-id`]??``)},bodyKind:`none`});return}let i=await a(t),l=t.local?e:await n();t.accountId=l,o(await c(`Loading`,async()=>i.images.import.progress({account_id:l,migration_id:t[`migration-id`]})),{successLabel:`Loaded`})})};function X(e){return e.usage(`$0 images import sources check <source-id>
35
+
36
+ Check whether a source can still access its S3 bucket.`).positional(`source-id`,{type:`string`,description:`Sourcing kit resource identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Z={command:`check <source-id>`,describe:`Get source connectivity status`,builder:X,handler:async t=>l({command:`images import sources check`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf images import sources check`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v2/sourcingkit/sources/${t[`source-id`]==null?`<source-id>`:encodeURIComponent(String(t[`source-id`]))}/connectivity`,pathParams:{"source-id":String(t[`source-id`]??``)},bodyKind:`none`});return}let i=await a(t),l=t.local?e:await n();t.accountId=l,o(await c(`Loading`,async()=>i.images.import.sources.check({account_id:l,source_id:t[`source-id`]})),{successLabel:`Loaded`})})};function Q(e){return e.usage(`$0 images import sources create
37
+
38
+ Configure an S3 source for CF Images imports.`).option(`account`,{type:`string`,description:`Account identifier for the bucket (required for R2 vendor).`}).option(`bucket`,{type:`string`,description:`The name of the storage bucket.`}).option(`name`,{type:`string`,description:`A human-readable name for the source.`}).option(`vendor`,{type:`string`,description:`The cloud storage vendor of the source bucket.`,choices:[`s3`,`r2`]}).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 ne={command:`create`,describe:`Create a sourcing kit source`,builder:Q,handler:async t=>l({command:`images import sources create`,classification:{safeFlags:[`vendor`,`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf images import sources create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v2/sourcingkit/sources`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({account:p(t.account,`account`,`text`),bucket:p(t.bucket,`bucket`,`text`),name:p(t.name,`name`,`text`),vendor:p(t.vendor,`vendor`,`text`)}):u(t.body)});return}let i=await a(t),l=t.local?e:await n();if(t.accountId=l,t.body){let e=u(t.body);o(await c(`Creating`,async()=>i.images.import.sources.create({...e,account_id:l})),{successLabel:`Created`});return}t.bucket===void 0&&(t.bucket=await h(`bucket`,`The name of the storage bucket.`)),t.name===void 0&&(t.name=await h(`name`,`A human-readable name for the source.`)),t.vendor===void 0&&(t.vendor=await g(`vendor`,`The cloud storage vendor of the source bucket.`,[`s3`,`r2`]));let d=f({account:p(t.account,`account`,`text`),bucket:p(t.bucket,`bucket`,`text`),name:p(t.name,`name`,`text`),vendor:p(t.vendor,`vendor`,`text`)});o(await c(`Creating`,async()=>i.images.import.sources.create({...d,account_id:l})),{successLabel:`Created`})})};function re(e){return e.usage(`$0 images import sources delete <source-id>
39
+
40
+ Delete a source configured for CF Images imports. Sources used by active imports cannot be deleted.`).positional(`source-id`,{type:`string`,description:`Sourcing kit resource identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ie={command:`delete <source-id>`,describe:`Delete a sourcing kit source`,builder:re,handler:async t=>l({command:`images import sources delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){s({command:`cf images import sources delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v2/sourcingkit/sources/${t[`source-id`]==null?`<source-id>`:encodeURIComponent(String(t[`source-id`]))}`,pathParams:{"source-id":String(t[`source-id`]??``)},bodyKind:`none`});return}let i=await a(t),l=t.local?e:await n();if(t.accountId=l,!await _({force:!!t.force,message:`This operation will delete this import source.`})){process.stderr.write(`Aborted.
41
+ `);return}o(await c(`Deleting`,async()=>i.images.import.sources.delete({account_id:l,source_id:t[`source-id`]})),{successLabel:`Deleted`})})};function ae(e){return e.usage(`$0 images import sources get <source-id>
42
+
43
+ Get details of a source configured for CF Images imports.`).positional(`source-id`,{type:`string`,description:`Sourcing kit resource identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const oe={command:`get <source-id>`,describe:`Get sourcing kit source`,builder:ae,handler:async t=>l({command:`images import sources get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf images import sources get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v2/sourcingkit/sources/${t[`source-id`]==null?`<source-id>`:encodeURIComponent(String(t[`source-id`]))}`,pathParams:{"source-id":String(t[`source-id`]??``)},bodyKind:`none`});return}let i=await a(t),l=t.local?e:await n();t.accountId=l,o(await c(`Loading`,async()=>i.images.import.sources.get({account_id:l,source_id:t[`source-id`]})),{successLabel:`Loaded`})})};function se(e){return e.usage(`$0 images import sources list
44
+
45
+ List sources configured for CF Images imports.`).option(`offset`,{type:`number`,description:`Number of items to skip before returning results.`}).option(`limit`,{type:`number`,description:`Maximum number of items to return.`}).option(`name`,{type:`string`,description:`Filter sources by name (partial match).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ce={command:`list`,describe:`List sourcing kit sources`,builder:se,handler:async t=>l({command:`images import sources list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let i={offset:t.offset,limit:t.limit,name:t.name};if(t.dryRun){s({command:`cf images import sources list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v2/sourcingkit/sources`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(t),u=t.local?e:await n();t.accountId=u,o(await c(`Loading`,async()=>l.images.import.sources.list({account_id:u,...i})),{successLabel:`Loaded`})})};function le(e){return e.usage(`$0 images import sources pre-check
46
+
47
+ Check S3 credentials without saving a source.`).option(`account`,{type:`string`,description:`Account identifier for the bucket (required for R2 vendor).`}).option(`bucket`,{type:`string`,description:`The name of the storage bucket.`}).option(`region`,{type:`string`,description:`The region hint for the bucket (S3 only).`}).option(`vendor`,{type:`string`,description:`The cloud storage vendor of the source bucket.`,choices:[`s3`,`r2`]}).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 ue={command:`pre-check`,describe:`Precheck source connectivity`,builder:le,handler:async t=>l({command:`images import sources pre-check`,classification:{safeFlags:[`vendor`,`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf images import sources pre-check`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v2/sourcingkit/sources/connectivity-precheck`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({account:p(t.account,`account`,`text`),bucket:p(t.bucket,`bucket`,`text`),region:p(t.region,`region`,`text`),vendor:p(t.vendor,`vendor`,`text`)}):u(t.body)});return}let i=await a(t),l=t.local?e:await n();if(t.accountId=l,t.body){let e=u(t.body);o(await c(`Creating`,async()=>i.images.import.sources.preCheck({...e,account_id:l})),{successLabel:`Created`});return}t.bucket===void 0&&(t.bucket=await h(`bucket`,`The name of the storage bucket.`)),t.vendor===void 0&&(t.vendor=await g(`vendor`,`The cloud storage vendor of the source bucket.`,[`s3`,`r2`]));let d=f({account:p(t.account,`account`,`text`),bucket:p(t.bucket,`bucket`,`text`),region:p(t.region,`region`,`text`),vendor:p(t.vendor,`vendor`,`text`)});o(await c(`Creating`,async()=>i.images.import.sources.preCheck({...d,account_id:l})),{successLabel:`Created`})})};function de(e){return e.usage(`$0 images import sources update <source-id>
48
+
49
+ Rename a source configured for CF Images imports.`).positional(`source-id`,{type:`string`,description:`Sourcing kit resource identifier.`,demandOption:!0}).option(`name`,{type:`string`,description:`Updated name for the source.`}).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 fe={command:`update <source-id>`,describe:`Update a sourcing kit source`,builder:de,handler:async t=>l({command:`images import sources update`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf images import sources update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v2/sourcingkit/sources/${t[`source-id`]==null?`<source-id>`:encodeURIComponent(String(t[`source-id`]))}`,pathParams:{"source-id":String(t[`source-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({name:p(t.name,`name`,`text`)}):u(t.body)});return}let i=await a(t),l=t.local?e:await n();if(t.accountId=l,t.body){let e=u(t.body);o(await c(`Updating`,async()=>i.images.import.sources.update({...e,account_id:l,source_id:t[`source-id`]})),{successLabel:`Updated`});return}t.name===void 0&&(t.name=await h(`name`,`Updated name for the source.`));let d=f({name:p(t.name,`name`,`text`)});o(await c(`Updating`,async()=>i.images.import.sources.update({...d,account_id:l,source_id:t[`source-id`]})),{successLabel:`Updated`})})},pe={command:`sources`,describe:`Operations for import.sources`,builder:e=>e.command(Z).command(ne).command(ie).command(oe).command(ce).command(ue).command(fe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function me(e){return e.usage(`$0 images import start <migration-id>
50
+
51
+ Start a pending CF Images import.`).positional(`migration-id`,{type:`string`,description:`Sourcing kit resource identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const he={command:`start <migration-id>`,describe:`Start a migration`,builder:me,handler:async t=>l({command:`images import start`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf images import start`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v2/sourcingkit/migrations/${t[`migration-id`]==null?`<migration-id>`:encodeURIComponent(String(t[`migration-id`]))}/lifecycle/start`,pathParams:{"migration-id":String(t[`migration-id`]??``)},bodyKind:`none`});return}let i=await a(t),l=t.local?e:await n();t.accountId=l,o(await c(`Updating`,async()=>i.images.import.start({account_id:l,migration_id:t[`migration-id`]})),{successLabel:`Updated`})})},ge={command:`import`,describe:`Import images from S3`,builder:e=>e.command(L).command(z).command(V).command(U).command(G).command(q).command(Y).command(he).command(pe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function _e(e){return e.usage(`$0 images keys create <signing-key-name>
52
+
53
+ Create a new CF Images signing key with specified name. Returns all keys available.`).positional(`signing-key-name`,{type:`string`,description:`Signing key name`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ve={command:`create <signing-key-name>`,describe:`Create a new Signing Key`,builder:_e,handler:async t=>l({command:`images keys create`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf images keys create`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v1/keys/${t[`signing-key-name`]==null?`<signing-key-name>`:encodeURIComponent(String(t[`signing-key-name`]))}`,pathParams:{"signing-key-name":String(t[`signing-key-name`]??``)},bodyKind:`none`});return}let i=await a(t),l=t.local?e:await n();t.accountId=l,o(await c(`Updating`,async()=>i.images.keys.create({account_id:l,signing_key_name:t[`signing-key-name`]})),{successLabel:`Updated`})})};function ye(e){return e.usage(`$0 images keys delete <signing-key-name>
54
+
55
+ Delete a CF Images signing key with specified name. Returns all keys available. When the last key is removed, a new default signing key will be generated.`).positional(`signing-key-name`,{type:`string`,description:`Signing key 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 be={command:`delete <signing-key-name>`,describe:`Delete Signing Key`,builder:ye,handler:async t=>l({command:`images keys delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){s({command:`cf images keys delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v1/keys/${t[`signing-key-name`]==null?`<signing-key-name>`:encodeURIComponent(String(t[`signing-key-name`]))}`,pathParams:{"signing-key-name":String(t[`signing-key-name`]??``)},bodyKind:`none`});return}let i=await a(t),l=t.local?e:await n();if(t.accountId=l,!await _({force:!!t.force,message:`This operation will delete this signing key. This will invalidate any URLs that are signed with this key.`})){process.stderr.write(`Aborted.
56
+ `);return}o(await c(`Deleting`,async()=>i.images.keys.delete({account_id:l,signing_key_name:t[`signing-key-name`]})),{successLabel:`Deleted`})})};function xe(e){return e.usage(`$0 images keys list
57
+
58
+ List your CF Images signing keys.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Se={command:`list`,describe:`List Signing Keys`,builder:xe,handler:async t=>l({command:`images keys list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf images keys list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v1/keys`,pathParams:{},bodyKind:`none`});return}let i=await a(t),l=t.local?e:await n();t.accountId=l,o(await c(`Loading`,async()=>i.images.keys.list({account_id:l})),{successLabel:`Loaded`})})},Ce={command:`keys`,describe:`Manage signing keys for generating private image URLs`,builder:e=>e.command(ve).command(be).command(Se).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function we(e){return e.usage("$0 images list\n\nList up to 10000 images from CF Images, with up to 1000 results per page. Use the optional parameters below to get a specific range of images. Pagination is supported via continuation_token. **Metadata Filtering (Optional):** You can optionally filter images by custom metadata fields using the `meta.<field>[<operator>]=<value>` syntax. **Supported Operators:** - `eq` / `eq:string` / `eq:number` / `eq:boolean` - Exact match - `gt` / `gt:number` - Greater than (number only) - `gte` / `gte:number` - Greater than or equal (number only) - `lt` / `lt:number` - Less than (number only) - `lte` / `lte:number` - Less than or equal (number only) - `in` / `in:string` / `in:number` - Match any value in list (pipe-separated) **Metadata Filter Constraints:** - Maximum 5 metadata filters per request - Maximum 5 levels of nesting (e.g., `meta.first.second.third.fourth.fifth`) - Maximum 10 elements for list operators (`in`) - Supports string, number, and boolean value types - Range operators (`gt`, `gte`, `lt`, `lte`) only accept numeric values **Filter Consistency:** Filters are combined with AND logic. The system does not validate whether filter combinations are logically consistent. For example, `meta.priority[eq:number]=5&meta.priority[lte:number]=3` will return zero results because no value can satisfy both conditions simultaneously. It is the caller's responsibility to ensure filter combinations make sense. **Examples:** ``` # List all images /images/v2 # Filter by metadata [eq] /images/v2?meta.status[eq:string]=active # Filter by metadata [in] /images/v2?meta.status[in]=pending|deleted|flagged # Filter by metadata [in:number] /images/v2?meta.ratings[in:number]=4|5 # Filter by metadata range [gte:number] /images/v2?meta.priority[gte:number]=1 # Filter by bounded range /images/v2?meta.priority[gte:number]=1&meta.priority[lte:number]=5 # Filter by nested metadata /images/v2?meta.region.name[eq]=eu-west # Combine metadata filters with creator /images/v2?meta.status[eq]=active&creator=user123 # Multiple metadata filters (AND logic) /images/v2?meta.status[eq]=active&meta.priority[eq:number]=5 ```").option(`continuation-token`,{type:`string`,description:`Continuation token to fetch next page. Passed as a query param when requesting List V2 api endpoint.`}).option(`per-page`,{type:`number`,description:`Number of items per page`}).option(`sort-order`,{type:`string`,description:`Sorting order by upload time`,choices:[`asc`,`desc`]}).option(`creator`,{type:`string`,description:`Internal user ID set within the creator field. Setting to empty string "" will return images where creator field is not set`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Te={command:`list`,describe:`List images V2`,builder:ee(we),handler:async t=>l({command:`images list`,classification:{safeFlags:[`sort-order`,`dry-run`]}},t,async()=>{let i={continuation_token:t[`continuation-token`],per_page:t[`per-page`],sort_order:t[`sort-order`],creator:t.creator};if(t.dryRun){s({command:`cf images list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v2`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(t),u=t.local?e:await n();t.accountId=u,o(await c(`Loading`,async()=>l.images.list({account_id:u,...i})),{successLabel:`Loaded`})})};function Ee(e){return e.usage(`$0 images stats
59
+
60
+ Fetch image statistics details for Cloudflare Images. The returned statistics detail storage usage, including the current image count vs this account's allowance.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const De={command:`stats`,describe:`Images usage statistics`,builder:Ee,handler:async t=>l({command:`images stats`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf images stats`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v1/stats`,pathParams:{},bodyKind:`none`});return}let i=await a(t),l=t.local?e:await n();t.accountId=l,o(await c(`Loading`,async()=>i.images.stats({account_id:l})),{successLabel:`Loaded`})})};function $(e){return e.usage(`$0 images variants create
61
+
62
+ Create a CF Images variant that allows you to resize images for different use cases.`).option(`id`,{type:`string`,description:`The id field`}).option(`never-require-signed-urls`,{type:`boolean`,description:`Indicates whether the variant can access an image without a signature, regardless of image access control.`,default:!1}).option(`options-fit`,{type:`string`,description:`The fit property describes how the width and height dimensions should be interpreted.`,choices:[`scale-down`,`contain`,`cover`,`crop`,`pad`]}).option(`options-height`,{type:`number`,description:`Maximum height in image pixels.`}).option(`options-metadata`,{type:`string`,description:`What EXIF data should be preserved in the output image.`,choices:[`keep`,`copyright`,`none`]}).option(`options-width`,{type:`number`,description:`Maximum width in image pixels.`}).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 Oe={command:`create`,describe:`Create a variant`,builder:$,handler:async t=>l({command:`images variants create`,classification:{safeFlags:[`never-require-signed-urls`,`options-fit`,`options-metadata`,`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf images variants create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v1/variants`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({id:p(t.id,`id`,`text`),neverRequireSignedURLs:t[`never-require-signed-urls`],options:{fit:p(t[`options-fit`],`options-fit`,`text`),height:t[`options-height`],metadata:p(t[`options-metadata`],`options-metadata`,`text`),width:t[`options-width`]}}):u(t.body)});return}let i=await a(t),l=t.local?e:await n();if(t.accountId=l,t.body){let e=u(t.body);o(await c(`Creating`,async()=>i.images.variants.create({body:e,account_id:l})),{successLabel:`Created`});return}if(t.id===void 0&&(t.id=await h(`id`,`The id field`)),t[`options-fit`]===void 0&&(t[`options-fit`]=await g(`options-fit`,`The fit property describes how the width and height dimensions should be interpreted.`,[`scale-down`,`contain`,`cover`,`crop`,`pad`])),t[`options-height`]===void 0)throw Error(`--options-height is required (or pass --body with this field set).`);if(t[`options-metadata`]===void 0&&(t[`options-metadata`]=await g(`options-metadata`,`What EXIF data should be preserved in the output image.`,[`keep`,`copyright`,`none`])),t[`options-width`]===void 0)throw Error(`--options-width is required (or pass --body with this field set).`);let d=f({id:p(t.id,`id`,`text`),neverRequireSignedURLs:t[`never-require-signed-urls`],options:{fit:p(t[`options-fit`],`options-fit`,`text`),height:t[`options-height`],metadata:p(t[`options-metadata`],`options-metadata`,`text`),width:t[`options-width`]}});o(await c(`Creating`,async()=>i.images.variants.create({body:d,account_id:l})),{successLabel:`Created`})})};function ke(e){return e.usage(`$0 images variants delete <variant-id>
63
+
64
+ Delete a CF Images variant. This will purge the cache for all images associated with the variant.`).positional(`variant-id`,{type:`string`,description:`Variant 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 Ae={command:`delete <variant-id>`,describe:`Delete a variant`,builder:ke,handler:async t=>l({command:`images variants delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){s({command:`cf images variants delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v1/variants/${t[`variant-id`]==null?`<variant-id>`:encodeURIComponent(String(t[`variant-id`]))}`,pathParams:{"variant-id":String(t[`variant-id`]??``)},bodyKind:`none`});return}let i=await a(t),l=t.local?e:await n();if(t.accountId=l,!await _({force:!!t.force,message:`This operation will delete this variant.`})){process.stderr.write(`Aborted.
65
+ `);return}o(await c(`Deleting`,async()=>i.images.variants.delete({account_id:l,variant_id:t[`variant-id`]})),{successLabel:`Deleted`})})};function je(e){return e.usage(`$0 images variants edit <variant-id>
66
+
67
+ Update a CF Images variant. This will purge the cache for all images associated with the variant.`).positional(`variant-id`,{type:`string`,description:`Variant ID`,demandOption:!0}).option(`never-require-signed-urls`,{type:`boolean`,description:`Indicates whether the variant can access an image without a signature, regardless of image access control.`}).option(`options-fit`,{type:`string`,description:`The fit property describes how the width and height dimensions should be interpreted.`,choices:[`scale-down`,`contain`,`cover`,`crop`,`pad`]}).option(`options-height`,{type:`number`,description:`Maximum height in image pixels.`}).option(`options-metadata`,{type:`string`,description:`What EXIF data should be preserved in the output image.`,choices:[`keep`,`copyright`,`none`]}).option(`options-width`,{type:`number`,description:`Maximum width in image pixels.`}).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:`edit <variant-id>`,describe:`Update a variant`,builder:je,handler:async t=>l({command:`images variants edit`,classification:{safeFlags:[`never-require-signed-urls`,`options-fit`,`options-metadata`,`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf images variants edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v1/variants/${t[`variant-id`]==null?`<variant-id>`:encodeURIComponent(String(t[`variant-id`]))}`,pathParams:{"variant-id":String(t[`variant-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({neverRequireSignedURLs:t[`never-require-signed-urls`],options:{fit:p(t[`options-fit`],`options-fit`,`text`),height:t[`options-height`],metadata:p(t[`options-metadata`],`options-metadata`,`text`),width:t[`options-width`]}}):u(t.body)});return}let i=await a(t),l=t.local?e:await n();if(t.accountId=l,t.body){let e=u(t.body);o(await c(`Updating`,async()=>i.images.variants.edit({...e,account_id:l,variant_id:t[`variant-id`]})),{successLabel:`Updated`});return}if(t[`options-fit`]===void 0&&(t[`options-fit`]=await g(`options-fit`,`The fit property describes how the width and height dimensions should be interpreted.`,[`scale-down`,`contain`,`cover`,`crop`,`pad`])),t[`options-height`]===void 0)throw Error(`--options-height is required (or pass --body with this field set).`);if(t[`options-metadata`]===void 0&&(t[`options-metadata`]=await g(`options-metadata`,`What EXIF data should be preserved in the output image.`,[`keep`,`copyright`,`none`])),t[`options-width`]===void 0)throw Error(`--options-width is required (or pass --body with this field set).`);let d=f({neverRequireSignedURLs:t[`never-require-signed-urls`],options:{fit:p(t[`options-fit`],`options-fit`,`text`),height:t[`options-height`],metadata:p(t[`options-metadata`],`options-metadata`,`text`),width:t[`options-width`]}});o(await c(`Updating`,async()=>i.images.variants.edit({...d,account_id:l,variant_id:t[`variant-id`]})),{successLabel:`Updated`})})};function Ne(e){return e.usage(`$0 images variants get <variant-id>
68
+
69
+ Fetch details for a CF Images variant.`).positional(`variant-id`,{type:`string`,description:`Variant ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Pe={command:`get <variant-id>`,describe:`Variant details`,builder:Ne,handler:async t=>l({command:`images variants get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf images variants get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v1/variants/${t[`variant-id`]==null?`<variant-id>`:encodeURIComponent(String(t[`variant-id`]))}`,pathParams:{"variant-id":String(t[`variant-id`]??``)},bodyKind:`none`});return}let i=await a(t),l=t.local?e:await n();t.accountId=l,o(await c(`Loading`,async()=>i.images.variants.get({account_id:l,variant_id:t[`variant-id`]})),{successLabel:`Loaded`})})};function Fe(e){return e.usage(`$0 images variants list
70
+
71
+ List existing CF Images variants.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ie={command:`list`,describe:`List variants`,builder:Fe,handler:async t=>l({command:`images variants list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf images variants list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v1/variants`,pathParams:{},bodyKind:`none`});return}let i=await a(t),l=t.local?e:await n();t.accountId=l,o(await c(`Loading`,async()=>i.images.variants.list({account_id:l})),{successLabel:`Loaded`})})},Le={command:`variants`,describe:`Manage named resize variants for transforming images on delivery`,builder:e=>e.command(Oe).command(Ae).command(Me).command(Pe).command(Ie).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Re={command:`images`,describe:`Store, resize, and deliver optimized images globally — variants, signing keys, and direct uploads`,builder:e=>e.command(b).command(S).command(w).command(E).command(F).command(N).command(Te).command(De).command(j).command(ge).command(Ce).command(Le).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Re as default};
package/dist/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{i as e,n as t,r as n,t as r}from"./src-BbnV77C4.mjs";export{r as CliExit,t as buildCli,n as main,e as runMain};
2
+ import{i as e,n as t,r as n,t as r}from"./src-B3h6tKMt.mjs";export{r as CliExit,t as buildCli,n as main,e as runMain};