cf 1.0.0-beta.17 → 1.0.0-beta.19

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 (319) hide show
  1. package/README.md +7 -0
  2. package/dist/_meta/commands.json +9122 -6086
  3. package/dist/_meta/hand-written-commands.json +6 -0
  4. package/dist/_meta/schemas.json +8392 -5576
  5. package/dist/{abuse-reports-C4LxDvUM.mjs → abuse-reports-DhgunVFo.mjs} +6 -6
  6. package/dist/{access-DnWW2AAT.mjs → access-BDoDq_WZ.mjs} +1 -1
  7. package/dist/{accounts-8UcHNm3S.mjs → accounts-DLTCzZJg.mjs} +17 -13
  8. package/dist/{acm-qRM3iy4Z.mjs → acm-DS1CosYq.mjs} +1 -1
  9. package/dist/{addressing-CAb8z2Dq.mjs → addressing-DFeYj8TY.mjs} +19 -19
  10. package/dist/{agent-memory-oIUP4ZV5.mjs → agent-memory-DXjQ8N0g.mjs} +6 -6
  11. package/dist/{ai-DnhytGdc.mjs → ai-V5YopMkS.mjs} +4 -4
  12. package/dist/{ai-audit-B7_5EOcN.mjs → ai-audit-yg8D0azz.mjs} +2 -2
  13. package/dist/{ai-gateway-b3FFu6UV.mjs → ai-gateway--dkH9qGz.mjs} +42 -42
  14. package/dist/ai-search-BRtsUaUI.mjs +79 -0
  15. package/dist/{ai-security-KUs94UW-.mjs → ai-security-DRJCcLpF.mjs} +5 -5
  16. package/dist/{alerting-CCmyEPzN.mjs → alerting-8DsyMKGG.mjs} +30 -30
  17. package/dist/{analytics-BAvBj6qx.mjs → analytics-BpYUZTtQ.mjs} +7 -7
  18. package/dist/{analytics-engine-DAJp89gM.mjs → analytics-engine-CT2E0Dkw.mjs} +1 -1
  19. package/dist/{api-security-BItVQymb.mjs → api-security-CBhWZE8z.mjs} +26 -26
  20. package/dist/{argo-DsJCvfml.mjs → argo-B0u2N3Dh.mjs} +1 -1
  21. package/dist/{artifacts-DzHXeah6.mjs → artifacts-B6XzjMiM.mjs} +1 -1
  22. package/dist/{audit-logs-D9XxsVZm.mjs → audit-logs-59fCc1aw.mjs} +1 -1
  23. package/dist/auth-5cgi8ePZ.mjs +2 -0
  24. package/dist/auth-BaUNb1Ed.mjs +2 -0
  25. package/dist/auth-ChYOc_rS.mjs +2 -0
  26. package/dist/{auth-token-Cw4c0y89.mjs → auth-token-B1pP2jaK.mjs} +1 -1
  27. package/dist/{autoconfig-9po_tqsS.mjs → autoconfig-Cdm2IFLM.mjs} +20 -20
  28. package/dist/{basin-catalog-DcMiZV9J.mjs → basin-catalog-CV05WlA4.mjs} +1 -1
  29. package/dist/{billing-COgAWTYh.mjs → billing-Ad-rK-JH.mjs} +6 -6
  30. package/dist/{blocks-Bat9A8V_.mjs → blocks-CKb_aLWN.mjs} +1 -1
  31. package/dist/body-parser-ChnyBsfm.mjs +2 -0
  32. package/dist/{bot-management-Dx3lh9Fi.mjs → bot-management-CGpfjQ4w.mjs} +4 -4
  33. package/dist/{botnet-feed-C8496Nhl.mjs → botnet-feed-CMrF6ZGq.mjs} +1 -1
  34. package/dist/{brand-protection-B0p8Sv6s.mjs → brand-protection-CP73_yX8.mjs} +5 -5
  35. package/dist/browser-run-OpUfawh_.mjs +42 -0
  36. package/dist/{build-i8l2qGVZ.mjs → build-CMPlf8mh.mjs} +1 -1
  37. package/dist/build-DQZ2w_dQ.mjs +2 -0
  38. package/dist/builds-DsRNlILV.mjs +71 -0
  39. package/dist/{cache-BUh85NRr.mjs → cache-RppXjxXA.mjs} +3 -3
  40. package/dist/{cf-Bq4pA4n6.mjs → cf-PISMdEje.mjs} +11 -11
  41. package/dist/{chunk-2HLTAS5V-D7COzUOd.mjs → chunk-2HLTAS5V-B92NbX1j.mjs} +1 -1
  42. package/dist/{chunk-2K52M2W5-CYxfQXUq.mjs → chunk-2K52M2W5-c__08AOB.mjs} +7 -7
  43. package/dist/chunk-DSGVRFIS-DfQO1boa.mjs +2 -0
  44. package/dist/{cli-DJhpXf38.mjs → cli-Dd1n2YAJ.mjs} +1 -1
  45. package/dist/{client-side-security-km3-4L_4.mjs → client-side-security-BYfwOkUo.mjs} +1 -1
  46. package/dist/{cloud-connector-BoKFprDD.mjs → cloud-connector-CQZUqAMQ.mjs} +2 -2
  47. package/dist/{cloudflared-By8BzYXc.mjs → cloudflared-C1SdXpYv.mjs} +1 -1
  48. package/dist/cloudforce-one-C1xdpspb.mjs +395 -0
  49. package/dist/{command-RC9WM5jq.mjs → command-BioiZMm9.mjs} +1 -1
  50. package/dist/{command-rx0Kb5pn.mjs → command-C0nJ2LRd.mjs} +1 -1
  51. package/dist/{command-CiApsRql.mjs → command-C5ARgURy.mjs} +1 -1
  52. package/dist/{command-CCq-Z2Ua.mjs → command-C7NIRU-u.mjs} +1 -1
  53. package/dist/{command-B694oLDo.mjs → command-C8DV-x_C.mjs} +1 -1
  54. package/dist/{command-Bmee6uwe.mjs → command-CFV1cqfR.mjs} +1 -1
  55. package/dist/{command-CbQFbfps.mjs → command-ChQXv0jP.mjs} +1 -1
  56. package/dist/{command-DCQgsd2U.mjs → command-D203VrTG.mjs} +1 -1
  57. package/dist/{command-DZfKHiru.mjs → command-D5BUzDX8.mjs} +1 -1
  58. package/dist/{command-CAs3SxlI.mjs → command-DWE7YdeC.mjs} +1 -1
  59. package/dist/{command-C6w1OdoC.mjs → command-DlB10kIb.mjs} +1 -1
  60. package/dist/{command-D1JR8Fb7.mjs → command-DmPQXNRg.mjs} +1 -1
  61. package/dist/{command-Bgb-3yPg.mjs → command-F0jlqvKr.mjs} +1 -1
  62. package/dist/{command-DppVezAB.mjs → command-FOQNhNqP.mjs} +1 -1
  63. package/dist/{command-DerHAjQL.mjs → command-yAXk5NXh.mjs} +1 -1
  64. package/dist/{completions-11latun5.mjs → completions-Bh0Hz-hA.mjs} +3 -3
  65. package/dist/{connector-interrupts-wvQcZsO1.mjs → connector-interrupts-Bd949WX0.mjs} +1 -1
  66. package/dist/{connector-telemetry-events-C0GGCIQk.mjs → connector-telemetry-events-Dw8iIg5Q.mjs} +1 -1
  67. package/dist/{connector-telemetry-snapshots-ZXzsFgea.mjs → connector-telemetry-snapshots-DqEIaz99.mjs} +1 -1
  68. package/dist/{connectors-DXIUG4Zi.mjs → connectors-RUEU1QDB.mjs} +1 -1
  69. package/dist/containers-xU-0EhLO.mjs +78 -0
  70. package/dist/{containers-WMWKhLkp.mjs → containers-yUOvm-4V.mjs} +211 -211
  71. package/dist/{content-scan-CRDmR7rD.mjs → content-scan-Cm2-Xhqo.mjs} +2 -2
  72. package/dist/{context-q-6bMSL-.mjs → context-BQ6KeMgq.mjs} +2 -2
  73. package/dist/cps-CgPduy0H.mjs +6 -0
  74. package/dist/csam-scanner-B0Ra6fXL.mjs +10 -0
  75. package/dist/{custom-csrs-BV017SqE.mjs → custom-csrs-6lfu1-RR.mjs} +1 -1
  76. package/dist/custom-hostnames-Dzov_CPw.mjs +27 -0
  77. package/dist/{custom-nameservers-BLoE8VGG.mjs → custom-nameservers-Bfhv_9_k.mjs} +1 -1
  78. package/dist/custom-pages-DxVD_f10.mjs +21 -0
  79. package/dist/{d1-Dbs8HItA.mjs → d1-D7p4uJ-e.mjs} +17 -19
  80. package/dist/delegate.mjs +1 -1
  81. package/dist/{deploy-5utIiOMN.mjs → deploy-BjWvVZol.mjs} +1 -1
  82. package/dist/deploy-context-C-ZdGP0Z.mjs +56 -0
  83. package/dist/{deploy-input-KK6yyBN_.mjs → deploy-input-B8Nq6Eh6.mjs} +1 -1
  84. package/dist/{dev-CnoMHxf4.mjs → dev-D20UkcYT.mjs} +1 -1
  85. package/dist/{diagnostics-C9B07eJY.mjs → diagnostics-DdhTemYB.mjs} +2 -2
  86. package/dist/{dialog-D4Y9ocuF.mjs → dialog-BnIgdgWi.mjs} +1 -1
  87. package/dist/discover-DEjUARkU.mjs +2 -0
  88. package/dist/{dist-DZRTPMMA.mjs → dist-CnKd5XoR.mjs} +19 -19
  89. package/dist/{dist-uRuGmkMB.mjs → dist-DAeCUX-u.mjs} +3 -3
  90. package/dist/{dls-lbM3i4x-.mjs → dls-BBODA9Rk.mjs} +1 -1
  91. package/dist/{dns-QTMPGYMa.mjs → dns-CK_hyn5q.mjs} +22 -22
  92. package/dist/{dns-firewall-Bfv0S44I.mjs → dns-firewall-DbvX9R-7.mjs} +9 -9
  93. package/dist/{docs-bV3hPwQL.mjs → docs-BDTijwM3.mjs} +1 -1
  94. package/dist/{dot-prop-IITUZ2XW-BnPfnQkb.mjs → dot-prop-IITUZ2XW-C4pkmT-K.mjs} +1 -1
  95. package/dist/{dotenv-usOKkeW7.mjs → dotenv-Ck-6V1hm.mjs} +1 -1
  96. package/dist/{dry-run-C2KjGX10.mjs → dry-run-DQmFkNK_.mjs} +1 -1
  97. package/dist/{durable-objects-0JvGTV27.mjs → durable-objects-DcFbd1Ka.mjs} +1 -1
  98. package/dist/{email-auth-PzRqG0ex.mjs → email-auth-BEgDxU-g.mjs} +1 -1
  99. package/dist/{email-routing-BgHL0Rbz.mjs → email-routing-DKWmPOVo.mjs} +13 -13
  100. package/dist/{email-security-CSTKIecn.mjs → email-security-RWbAp8qa.mjs} +44 -44
  101. package/dist/{email-sending-BSwuAir8.mjs → email-sending-BbJy_vl8.mjs} +18 -18
  102. package/dist/error-sanitization-Byb-_IS9.mjs +2 -0
  103. package/dist/{error-sanitization-pOyzm2F1.mjs → error-sanitization-DWJ5ka7h.mjs} +1 -1
  104. package/dist/{field-extractors-B_lFnwaL.mjs → field-extractors-Bob6udAc.mjs} +2 -2
  105. package/dist/{firewall-BsZxVitA.mjs → firewall-DziiEsR8.mjs} +20 -20
  106. package/dist/{flagship-qBohOZaM.mjs → flagship-xOtgddUK.mjs} +11 -11
  107. package/dist/{fraud-vGNdrSm-.mjs → fraud-BUS7i5Yh.mjs} +1 -1
  108. package/dist/generate-D6V4Q58z.mjs +2 -0
  109. package/dist/get-BTisquA3.mjs +2 -0
  110. package/dist/{google-tag-gateway-BHdOg4VW.mjs → google-tag-gateway-DgSzyeK-.mjs} +1 -1
  111. package/dist/{gt-3bcLGJ7V.mjs → gt-D6YemCLh.mjs} +1 -1
  112. package/dist/healthchecks-CbD2PsnM.mjs +22 -0
  113. package/dist/{hyperdrive-CXTqaIqk.mjs → hyperdrive-Cs_cfSXU.mjs} +1 -1
  114. package/dist/{iam-Dl_n_Lqq.mjs → iam-DvsCztqU.mjs} +9 -9
  115. package/dist/{images-vMtXk2Rf.mjs → images-BipVjHNw.mjs} +37 -37
  116. package/dist/index.mjs +1 -1
  117. package/dist/init-LvFgCsNX.mjs +43 -0
  118. package/dist/{intel-Bq4GGXv-.mjs → intel-D1LPkkBM.mjs} +31 -41
  119. package/dist/{interactive-BW9T1D1q.mjs → interactive-d_lFnSev.mjs} +3 -3
  120. package/dist/interactive-pjVqirHx.mjs +2 -0
  121. package/dist/{ips-BcvZS46g.mjs → ips-2iUGs8ws.mjs} +1 -1
  122. package/dist/{k2-DL4hrVTj.mjs → k2-DGzRm3NJ.mjs} +2 -2
  123. package/dist/{kv-BLo9wMgb.mjs → kv-BW-s9MJY.mjs} +4 -4
  124. package/dist/{lazy-command-CRcT6Dx-.mjs → lazy-command-Bq-rWPQe.mjs} +1 -1
  125. package/dist/{leaked-credential-checks-Dx4RXMyN.mjs → leaked-credential-checks-CnY6ih6p.mjs} +1 -1
  126. package/dist/load-balancers-CtnusAzP.mjs +76 -0
  127. package/dist/{local-Dil4fTWX.mjs → local-B4sZZTRA.mjs} +1 -1
  128. package/dist/local-DCnFIgLJ.mjs +2 -0
  129. package/dist/{local-runtime-B7TKFu6E.mjs → local-runtime-DoBuyriC.mjs} +1 -1
  130. package/dist/login-CqZJgUF1.mjs +5 -0
  131. package/dist/{login-Du_W6b9o.mjs → login-DR60WiAY.mjs} +1 -1
  132. package/dist/{logo-matches-C-1J0Oc3.mjs → logo-matches-C1-6KOkZ.mjs} +1 -1
  133. package/dist/{logos-BuhvSu_H.mjs → logos-Yzhd-VKb.mjs} +2 -2
  134. package/dist/logpush-JYG4gXZ-.mjs +46 -0
  135. package/dist/{logs-CaKOk-1v.mjs → logs-DLblEjK0.mjs} +3 -3
  136. package/dist/{magic-cloud-networking-CKxXYT8r.mjs → magic-cloud-networking-CblQwsQr.mjs} +13 -13
  137. package/dist/{magic-network-monitoring-BykFGQCz.mjs → magic-network-monitoring-D2px4Ep4.mjs} +9 -9
  138. package/dist/{magic-transit-DYULsrUP.mjs → magic-transit-Bnwsi0UQ.mjs} +170 -170
  139. package/dist/{managed-defense-DIb_uN25.mjs → managed-defense-CTtNoxzW.mjs} +9 -9
  140. package/dist/{managed-transforms-an3wQ0DW.mjs → managed-transforms-B92mJi5i.mjs} +2 -2
  141. package/dist/{matches-DkLSWb5X.mjs → matches-CzbL1XD-.mjs} +1 -1
  142. package/dist/{mcp-BcV1XqE8.mjs → mcp-Cic_aMer.mjs} +10 -10
  143. package/dist/{mesh-CSSlZ-0F.mjs → mesh-DZTgD16C.mjs} +14 -14
  144. package/dist/{migrate-DerOyuv2.mjs → migrate-DtNDRcAI.mjs} +1 -1
  145. package/dist/{monetization-B-nJ0SyI.mjs → monetization-DCQ2_niU.mjs} +4 -4
  146. package/dist/{network-ZzxQ_Dcz.mjs → network-BqMqD2qn.mjs} +27 -25
  147. package/dist/{network-interconnects-CI9NXQpe.mjs → network-interconnects-BFQ1yARl.mjs} +2 -2
  148. package/dist/o11y-CS5q1vSh.mjs +93 -0
  149. package/dist/oauth-DPLYUvRl.mjs +2 -0
  150. package/dist/oauth-DdYSPYoE.mjs +4 -0
  151. package/dist/{oauth-clients-BA30rTEl.mjs → oauth-clients-9BPswYm_.mjs} +1 -1
  152. package/dist/{oauth-scopes-hseWES1v.mjs → oauth-scopes-CLOKfQi2.mjs} +1 -1
  153. package/dist/{open-PCXX3ZDZ-5J5IU2MX-CKla-jDt.mjs → open-PCXX3ZDZ-5J5IU2MX-DFe2CQkm.mjs} +1 -1
  154. package/dist/{open-PCXX3ZDZ-D55O2jpQ.mjs → open-PCXX3ZDZ-BD2iNJqn.mjs} +1 -1
  155. package/dist/organization-DFRN2g6z.mjs +75 -0
  156. package/dist/{organizations-CcgZPmFl.mjs → organizations-yiGopnKf.mjs} +1 -1
  157. package/dist/{origin-post-quantum-encryption-BhdlaolV.mjs → origin-post-quantum-encryption-n9gsxikn.mjs} +1 -1
  158. package/dist/output-O6b9MR9R.mjs +2 -0
  159. package/dist/{page-rules-DFfqfllI.mjs → page-rules-F1Jdxx6A.mjs} +4 -4
  160. package/dist/pages-CezC0YrR.mjs +54 -0
  161. package/dist/pay-per-crawl-fZ-kTBbN.mjs +38 -0
  162. package/dist/{pay-per-use-C_HxhpM4.mjs → pay-per-use-B14BTKVI.mjs} +8 -8
  163. package/dist/pipelines-BN7ydBHl.mjs +44 -0
  164. package/dist/precursor-B88RDDZT.mjs +4 -0
  165. package/dist/previews-CiqRIq_k.mjs +7 -0
  166. package/dist/process-DiXf4VPi.mjs +2 -0
  167. package/dist/{progress-DaQ4MzBI.mjs → progress-CdlDthXA.mjs} +1 -1
  168. package/dist/{prompt-KWYZvJWM.mjs → prompt-1AC-qwxS.mjs} +1 -1
  169. package/dist/{queries-DoyhspQf.mjs → queries-C2sgUI9j.mjs} +3 -3
  170. package/dist/{queues-BPxTU2rU.mjs → queues-DCP5x-PZ.mjs} +17 -17
  171. package/dist/{r2-CQt4S7o7.mjs → r2-D7UhzWR7.mjs} +21 -21
  172. package/dist/{radar-CALpR1vq.mjs → radar-osOiFeY_.mjs} +1 -1
  173. package/dist/{raw-fetch-Cy09TjHc.mjs → raw-fetch-1VlXDwwX.mjs} +1 -1
  174. package/dist/{realtime-BiHKBoI4.mjs → realtime-DCnqxiWo.mjs} +90 -87
  175. package/dist/registrar-DAFYjjRa.mjs +43 -0
  176. package/dist/{registrar-sandbox-BttFwYqE.mjs → registrar-sandbox-zeNHABZ0.mjs} +11 -9
  177. package/dist/{registry-CRnk93ur.mjs → registry-DG4ZiuN9.mjs} +1 -1
  178. package/dist/{reporting-8aRJD5HX.mjs → reporting-KehV_PXm.mjs} +1 -1
  179. package/dist/{request-headers-CqfJOkpO.mjs → request-headers-ojAw3pQO.mjs} +1 -1
  180. package/dist/request-tracers-BStCgh6m.mjs +4 -0
  181. package/dist/resolve-BGNMAcGR.mjs +2 -0
  182. package/dist/{resource-sharing-uVVpMW0w.mjs → resource-sharing-3xtSgWG7.mjs} +19 -19
  183. package/dist/{rules-CFOuN3t2.mjs → rules-7F-G2Bg_.mjs} +6 -6
  184. package/dist/{rulesets-DkhV2Hny.mjs → rulesets-B0YtS2br.mjs} +20 -20
  185. package/dist/{rum-BnMW0Tlb.mjs → rum-B3V6tqS-.mjs} +6 -6
  186. package/dist/{run-Clc3P2u7.mjs → run-B_07PrkW.mjs} +1 -1
  187. package/dist/run-D6AJfZT-.mjs +2 -0
  188. package/dist/{schema-S3pUZwpI.mjs → schema-C-tyhSnb.mjs} +1 -1
  189. package/dist/{schema-flags-b096XMpt.mjs → schema-flags-DY3OKCvr.mjs} +4 -4
  190. package/dist/{scim-tvZm6A-r.mjs → scim-CQ9TdajH.mjs} +6 -6
  191. package/dist/{secrets-store-DuNxSh1_.mjs → secrets-store-Dl2hDxXu.mjs} +2 -2
  192. package/dist/{security-insights-C17c9ZYZ.mjs → security-insights-BsLMdo1r.mjs} +2 -2
  193. package/dist/{security-txt-D4pRk7-w.mjs → security-txt-pCAiHvys.mjs} +1 -1
  194. package/dist/session-BsNzFtPi.mjs +2 -0
  195. package/dist/shared-CWBjMZDR.mjs +2 -0
  196. package/dist/smart-shield-BTXQsVxz.mjs +24 -0
  197. package/dist/{snippets-BIcZ6vSW.mjs → snippets-CYVieyc3.mjs} +3 -3
  198. package/dist/source-AlTrHNem.mjs +6 -0
  199. package/dist/{spawn-BW2bJmKO.mjs → spawn-Bdznd0EB.mjs} +2 -2
  200. package/dist/{spectrum-DjDX0geK.mjs → spectrum-DLRr4Q03.mjs} +14 -14
  201. package/dist/{speed-DiPoFJMm.mjs → speed-BJfaDYxz.mjs} +13 -13
  202. package/dist/sql-DQ4xrdc2.mjs +4 -0
  203. package/dist/src-BnMvFE3q.mjs +125 -0
  204. package/dist/ssl-CL1B69Pw.mjs +139 -0
  205. package/dist/startup-profile-DuaJFX1y.mjs +2 -0
  206. package/dist/startup-profile-HMblAiBi.mjs +29 -0
  207. package/dist/{state-Boubf1X6.mjs → state-DN9yfd2C.mjs} +1 -1
  208. package/dist/state-DePlO0Kv.mjs +2 -0
  209. package/dist/{stream-uhn_Zsni.mjs → stream-DrMZOO5u.mjs} +55 -55
  210. package/dist/{submit-C3suIDBX.mjs → submit-DjlLoVk2.mjs} +1 -1
  211. package/dist/tags-DY7Ur1k-.mjs +23 -0
  212. package/dist/{telemetry-DYjsavEr.mjs → telemetry-BG3kcYsV.mjs} +1 -1
  213. package/dist/telemetry-Dpm6GfZD.mjs +2 -0
  214. package/dist/{tenant-DK88yQM4.mjs → tenant-BEMfNMjO.mjs} +1 -1
  215. package/dist/{tenant-custom-nameservers-BZ1JD1Yf.mjs → tenant-custom-nameservers-CCRbb0ch.mjs} +1 -1
  216. package/dist/{tools-BCCRUENY.mjs → tools-ZffhHUDd.mjs} +1 -1
  217. package/dist/tunnels-_JXe-UgM.mjs +29 -0
  218. package/dist/{turnstile-DXrbEy2A.mjs → turnstile-DXEfneQq.mjs} +5 -5
  219. package/dist/ui-CY79jlGZ.mjs +2 -0
  220. package/dist/update-check-DfbYVefm.mjs +2 -0
  221. package/dist/{update-check-BhhtSXVZ.mjs → update-check-atcehhBC.mjs} +1 -1
  222. package/dist/update-check-worker.mjs +1 -1
  223. package/dist/{url-info-a0mY4UsC.mjs → url-info-B1kL9asc.mjs} +1 -1
  224. package/dist/{url-normalization-DiwpDIhc.mjs → url-normalization-CUHKRKJh.mjs} +1 -1
  225. package/dist/url-scanner-OnZP_-jm.mjs +16 -0
  226. package/dist/{user-DDH9lxf5.mjs → user-BBBuFNj4.mjs} +59 -59
  227. package/dist/{vectorize-DaT3amFV.mjs → vectorize-DcctB8bw.mjs} +17 -17
  228. package/dist/version-CLgSHoNm.mjs +2 -0
  229. package/dist/{waiting-rooms-BGMpu9gS.mjs → waiting-rooms-JaFE5wP1.mjs} +13 -13
  230. package/dist/{web-assets-NqNglLSI.mjs → web-assets-Cu0swUPe.mjs} +35 -35
  231. package/dist/{web3-UnCUuIfB.mjs → web3-C67z4OtQ.mjs} +6 -6
  232. package/dist/workers-ClTP0Ysl.mjs +43 -0
  233. package/dist/workers-builds-C5wKhvKe.mjs +14 -0
  234. package/dist/{workers-for-platforms-JscCHivQ.mjs → workers-for-platforms-rxwkYyb3.mjs} +25 -22
  235. package/dist/{workers-vpc-FDZQBqOu.mjs → workers-vpc-B4vyvr1W.mjs} +1 -1
  236. package/dist/{workflows-Dq-k81hU.mjs → workflows-COJ5jwvk.mjs} +24 -24
  237. package/dist/wrangler-migration-Cp546RDG.mjs +946 -0
  238. package/dist/zaraz-BkZ7yW05.mjs +22 -0
  239. package/dist/{zero-trust-CZ685QhO.mjs → zero-trust-lUFLYuL1.mjs} +509 -454
  240. package/dist/{zone-DcZIUTWt.mjs → zone-CC1_qxt-.mjs} +1 -1
  241. package/dist/{zones-BVdvYUCv.mjs → zones-BRiLlTmW.mjs} +45 -36
  242. package/package.json +14 -14
  243. package/dist/account-tags-zvHRQZxb.mjs +0 -15
  244. package/dist/ai-search-CtfW5fzl.mjs +0 -79
  245. package/dist/auth-C530fHKQ.mjs +0 -2
  246. package/dist/auth-Ccm5viK_.mjs +0 -2
  247. package/dist/auth-MNz2D-PD.mjs +0 -2
  248. package/dist/body-parser-DkHKPkJ7.mjs +0 -2
  249. package/dist/browser-run-ChXohmNG.mjs +0 -42
  250. package/dist/build-BRJnyeu8.mjs +0 -2
  251. package/dist/builds-DmEFTQTa.mjs +0 -71
  252. package/dist/certificate-authorities-BTLdA7EQ.mjs +0 -6
  253. package/dist/chunk-DSGVRFIS-C5SqiTOz.mjs +0 -2
  254. package/dist/client-certificates-B3UxH_Au.mjs +0 -13
  255. package/dist/cloudforce-one-DN5N3C3w.mjs +0 -405
  256. package/dist/containers-DCH6MFjY.mjs +0 -78
  257. package/dist/cps-Due0P5IW.mjs +0 -6
  258. package/dist/csam-scanner-DvLrPw45.mjs +0 -10
  259. package/dist/ct-alerting-BtEGkRJi.mjs +0 -5
  260. package/dist/custom-certificates-CMLXTTEc.mjs +0 -17
  261. package/dist/custom-hostnames-DI_dFaof.mjs +0 -27
  262. package/dist/custom-pages-ubava9Qm.mjs +0 -21
  263. package/dist/dcv-delegation-sGGt6UU_.mjs +0 -4
  264. package/dist/deploy-context-C0iVbWRG.mjs +0 -56
  265. package/dist/discover-DIDEGKo3.mjs +0 -2
  266. package/dist/error-sanitization-CIQOep3I.mjs +0 -2
  267. package/dist/generate-D80-1GnZ.mjs +0 -2
  268. package/dist/get-By1q8YlI.mjs +0 -2
  269. package/dist/healthchecks-DAYYLZ6u.mjs +0 -22
  270. package/dist/hostnames-CLlaMqHu.mjs +0 -11
  271. package/dist/init-_7djeBVw.mjs +0 -43
  272. package/dist/interactive-DGUWZ2Gk.mjs +0 -2
  273. package/dist/keyless-certificates-0pzjkZb6.mjs +0 -13
  274. package/dist/keys-BSV5IXdU.mjs +0 -4
  275. package/dist/load-balancers-CCCWoQXv.mjs +0 -76
  276. package/dist/local-DxWDQDnG.mjs +0 -2
  277. package/dist/login-DT6Q1UJw.mjs +0 -5
  278. package/dist/logpush-DgZtF9vG.mjs +0 -46
  279. package/dist/mtls-certificates-ukwDz6Lc.mjs +0 -13
  280. package/dist/o11y-LG6Y9LUZ.mjs +0 -93
  281. package/dist/oauth-Bx693Af5.mjs +0 -2
  282. package/dist/oauth-CP82E1_0.mjs +0 -4
  283. package/dist/organization-DMr_z6n4.mjs +0 -71
  284. package/dist/origin-ca-certificates-BZxUbB5N.mjs +0 -11
  285. package/dist/origin-tls-client-auth-DzbZvtmi.mjs +0 -30
  286. package/dist/output-Co4xdFf6.mjs +0 -2
  287. package/dist/pages-BkcL5rC4.mjs +0 -54
  288. package/dist/pay-per-crawl-Dulm7Xy5.mjs +0 -38
  289. package/dist/pipelines-DUMIVwof.mjs +0 -44
  290. package/dist/precursor-DsGbA_YJ.mjs +0 -4
  291. package/dist/previews-Cma3-M7K.mjs +0 -7
  292. package/dist/process-2wmDCy17.mjs +0 -2
  293. package/dist/registrar-gERQ3b85.mjs +0 -43
  294. package/dist/request-tracers-DcnwQg3K.mjs +0 -4
  295. package/dist/resolve-BpgXeklt.mjs +0 -2
  296. package/dist/resource-tagging-SlsUtLsq.mjs +0 -4
  297. package/dist/run-CHNyLZLG.mjs +0 -2
  298. package/dist/session-Cq3YNLoI.mjs +0 -2
  299. package/dist/shared-zePemxHi.mjs +0 -2
  300. package/dist/smart-shield-2egm1Vaw.mjs +0 -24
  301. package/dist/source-mXUcrTVw.mjs +0 -6
  302. package/dist/sql-DLjCt_R3.mjs +0 -4
  303. package/dist/src-CutrsNl4.mjs +0 -125
  304. package/dist/ssl-vNzK0c9S.mjs +0 -45
  305. package/dist/startup-profile-BOaseXnO.mjs +0 -29
  306. package/dist/startup-profile-BwEZFVGS.mjs +0 -2
  307. package/dist/state-CODDG9Nx.mjs +0 -2
  308. package/dist/tags-Dy2jG-Dt.mjs +0 -4
  309. package/dist/telemetry-Bdv5LZZs.mjs +0 -2
  310. package/dist/tunnels-DjbomhCa.mjs +0 -29
  311. package/dist/ui-BtIBQeaG.mjs +0 -2
  312. package/dist/update-check-Dld7rbLd.mjs +0 -2
  313. package/dist/url-scanner-D0egjBe5.mjs +0 -16
  314. package/dist/values-Bfr5-bL6.mjs +0 -4
  315. package/dist/version-CAuKDZAG.mjs +0 -2
  316. package/dist/workers-DfA9ugmb.mjs +0 -40
  317. package/dist/workers-builds-Cy6fdtm5.mjs +0 -14
  318. package/dist/wrangler-migration-R9TQ_4Qd.mjs +0 -946
  319. package/dist/zaraz-Dpr1pLDx.mjs +0 -22
@@ -1,71 +1,71 @@
1
1
  #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-Dil4fTWX.mjs";import{i as n,n as r}from"./auth-MNz2D-PD.mjs";import{a as i,i as a,t as o}from"./context-q-6bMSL-.mjs";import{t as s}from"./output-Co4xdFf6.mjs";import{t as c}from"./dry-run-C2KjGX10.mjs";import{t as l}from"./progress-DaQ4MzBI.mjs";import{t as u}from"./run-Clc3P2u7.mjs";import"./telemetry-Bdv5LZZs.mjs";import{n as d,r as f,t as p}from"./body-parser-DkHKPkJ7.mjs";import{n as m,t as h}from"./input-validation-D7z60HJH.mjs";import{a as g,i as _,n as v}from"./prompt-KWYZvJWM.mjs";import{n as y,t as b}from"./raw-fetch-Cy09TjHc.mjs";var x={method:`POST`,path:t=>e`/accounts/${t.account_id}/images/v1`,pathParams:[`account_id`],body:`form`};function ee(e){return e.usage(`$0 images create
2
+ import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-B4sZZTRA.mjs";import{i as n,n as r}from"./auth-BaUNb1Ed.mjs";import{a as i,i as a,t as o}from"./context-BQ6KeMgq.mjs";import{t as s}from"./output-O6b9MR9R.mjs";import{t as c}from"./dry-run-DQmFkNK_.mjs";import{t as l}from"./progress-CdlDthXA.mjs";import{t as u}from"./run-B_07PrkW.mjs";import"./telemetry-Dpm6GfZD.mjs";import{a as d,n as f,r as p,t as m}from"./body-parser-ChnyBsfm.mjs";import{n as h,t as g}from"./input-validation-D7z60HJH.mjs";import{a as _,i as v,n as y}from"./prompt-1AC-qwxS.mjs";import{n as b,t as x}from"./raw-fetch-1VlXDwwX.mjs";var S={method:`POST`,path:t=>e`/accounts/${t.account_id}/images/v1`,pathParams:[`account_id`],body:`form`};function ee(e){return e.usage(`$0 images create
3
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 te={command:`create`,describe:`Upload an image`,builder:ee,handler:async e=>u({command:`images create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v1`,pathParams:{},bodyKind:`multipart`,body:{body:e.body,file:e.file,creator:e.creator,id:e.id,metadata:e.metadata,"require-signed-urls":e[`require-signed-urls`],url:e.url}});return}let a=await r(e),u=e.local?t:await o();if(e.accountId=u,e.file!==void 0||e.body!==void 0||e.creator!==void 0||e.id!==void 0||e.metadata!==void 0||e[`require-signed-urls`]!==void 0||e.url!==void 0){let t=new FormData;if(e.file){let n=h(e.file);t.append(`file`,new Blob([n]),e.file.split(/[\\/]/).filter(Boolean).pop())}else e.body!==void 0&&t.append(`file`,e.body);if(e.creator!==void 0&&t.append(`creator`,String(m(e.creator,`creator`,`text`)??``)),e.id!==void 0&&t.append(`id`,String(m(e.id,`id`,`text`)??``)),e.metadata!==void 0){let n=typeof e.metadata==`string`?m(e.metadata,`metadata`,`text`):e.metadata;t.append(`metadata`,typeof n==`string`?n:JSON.stringify(n))}e[`require-signed-urls`]!==void 0&&t.append(`requireSignedURLs`,String(e[`require-signed-urls`])),e.url!==void 0&&t.append(`url`,String(m(e.url,`url`,`text`)??``));let r=await l(`Creating`,async()=>n(a,`POST`,`/accounts/${u}/images/v1`,{body:t}));s(r,{successLabel:`Created`});return}if(e.body){let t=m(e.body,`body`,`binary`),r=await l(`Creating`,async()=>n(a,`POST`,`/accounts/${u}/images/v1`,{body:t,headers:{"Content-Type":`multipart/form-data`}}));s(r,{successLabel:`Created`});return}let d=await l(`Creating`,async()=>a.send(x,{account_id:u}));s(d,{successLabel:`Created`})})};var ne={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/images/v1/${t.image_id}`};function re(e){return e.usage(`$0 images delete <image-id>
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 te={command:`create`,describe:`Upload an image`,builder:ee,handler:async e=>u({command:`images create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v1`,pathParams:{},bodyKind:`multipart`,body:{body:e.body,file:e.file,creator:e.creator,id:e.id,metadata:e.metadata,"require-signed-urls":e[`require-signed-urls`],url:e.url}});return}let a=await r(e),u=e.local?t:await o();if(e.accountId=u,e.file!==void 0||e.body!==void 0||e.creator!==void 0||e.id!==void 0||e.metadata!==void 0||e[`require-signed-urls`]!==void 0||e.url!==void 0){let t=new FormData;if(e.file){let n=g(e.file);t.append(`file`,new Blob([n]),e.file.split(/[\\/]/).filter(Boolean).pop())}else e.body!==void 0&&t.append(`file`,e.body);if(e.creator!==void 0&&t.append(`creator`,String(h(e.creator,`creator`,`text`)??``)),e.id!==void 0&&t.append(`id`,String(h(e.id,`id`,`text`)??``)),e.metadata!==void 0){let n=typeof e.metadata==`string`?h(e.metadata,`metadata`,`text`):e.metadata;t.append(`metadata`,typeof n==`string`?n:JSON.stringify(n))}e[`require-signed-urls`]!==void 0&&t.append(`requireSignedURLs`,String(e[`require-signed-urls`])),e.url!==void 0&&t.append(`url`,String(h(e.url,`url`,`text`)??``));let r=await l(`Creating`,async()=>n(a,`POST`,`/accounts/${u}/images/v1`,{body:t}));s(r,{successLabel:`Created`});return}if(e.body){let t=h(e.body,`body`,`binary`),r=await l(`Creating`,async()=>n(a,`POST`,`/accounts/${u}/images/v1`,{body:t,headers:{"Content-Type":`multipart/form-data`}}));s(r,{successLabel:`Created`});return}let d=await l(`Creating`,async()=>a.send(S,{account_id:u}));s(d,{successLabel:`Created`})})};var ne={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/images/v1/${t.image_id}`};function re(e){return e.usage(`$0 images delete <image-id>
5
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 ie={command:`delete <image-id>`,describe:`Delete image`,builder:re,handler:async e=>u({command:`images delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v1/${e[`image-id`]==null?`<image-id>`:encodeURIComponent(String(e[`image-id`]))}`,pathParams:{"image-id":String(e[`image-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await v({force:!!e.force,message:`This operation will delete this image.`})){process.stderr.write(`Aborted.
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 ie={command:`delete <image-id>`,describe:`Delete image`,builder:re,handler:async e=>u({command:`images delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v1/${e[`image-id`]==null?`<image-id>`:encodeURIComponent(String(e[`image-id`]))}`,pathParams:{"image-id":String(e[`image-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await y({force:!!e.force,message:`This operation will delete this image.`})){process.stderr.write(`Aborted.
7
7
  `);return}let u=await l(`Deleting`,async()=>n.send(ne,{account_id:a,image_id:e[`image-id`]}));s(u,{successLabel:`Deleted`})})};var ae={method:`POST`,path:t=>e`/accounts/${t.account_id}/images/v2/direct_upload`,pathParams:[`account_id`],body:`form`};function oe(e){return e.usage(`$0 images direct-upload
8
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 S={command:`direct-upload`,describe:`Create authenticated direct upload URL V2`,builder:oe,handler:async e=>u({command:`images direct-upload`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images direct-upload`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v2/direct_upload`,pathParams:{},bodyKind:`multipart`,body:{body:e.body,file:e.file,creator:e.creator,expiry:e.expiry,id:e.id,metadata:e.metadata,"require-signed-urls":e[`require-signed-urls`]}});return}let a=await r(e),u=e.local?t:await o();if(e.accountId=u,e.file!==void 0||e.body!==void 0||e.creator!==void 0||e.expiry!==void 0||e.id!==void 0||e.metadata!==void 0||e[`require-signed-urls`]!==void 0){let t=new FormData;if(e.file){let n=h(e.file);t.append(`file`,new Blob([n]),e.file.split(/[\\/]/).filter(Boolean).pop())}else e.body!==void 0&&t.append(`file`,e.body);if(e.creator!==void 0&&t.append(`creator`,String(m(e.creator,`creator`,`text`)??``)),e.expiry!==void 0&&t.append(`expiry`,String(m(e.expiry,`expiry`,`text`)??``)),e.id!==void 0&&t.append(`id`,String(m(e.id,`id`,`text`)??``)),e.metadata!==void 0){let n=typeof e.metadata==`string`?m(e.metadata,`metadata`,`text`):e.metadata;t.append(`metadata`,typeof n==`string`?n:JSON.stringify(n))}e[`require-signed-urls`]!==void 0&&t.append(`requireSignedURLs`,String(e[`require-signed-urls`]));let r=await l(`Creating`,async()=>n(a,`POST`,`/accounts/${u}/images/v2/direct_upload`,{body:t}));s(r,{successLabel:`Created`});return}if(e.body){let t=m(e.body,`body`,`binary`),r=await l(`Creating`,async()=>n(a,`POST`,`/accounts/${u}/images/v2/direct_upload`,{body:t,headers:{"Content-Type":`multipart/form-data`}}));s(r,{successLabel:`Created`});return}let d=await l(`Creating`,async()=>a.send(ae,{account_id:u}));s(d,{successLabel:`Created`})})};var C={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/images/v1/${t.image_id}`,body:`json`};function w(e){return e.usage(`$0 images edit <image-id>
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 C={command:`direct-upload`,describe:`Create authenticated direct upload URL V2`,builder:oe,handler:async e=>u({command:`images direct-upload`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images direct-upload`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v2/direct_upload`,pathParams:{},bodyKind:`multipart`,body:{body:e.body,file:e.file,creator:e.creator,expiry:e.expiry,id:e.id,metadata:e.metadata,"require-signed-urls":e[`require-signed-urls`]}});return}let a=await r(e),u=e.local?t:await o();if(e.accountId=u,e.file!==void 0||e.body!==void 0||e.creator!==void 0||e.expiry!==void 0||e.id!==void 0||e.metadata!==void 0||e[`require-signed-urls`]!==void 0){let t=new FormData;if(e.file){let n=g(e.file);t.append(`file`,new Blob([n]),e.file.split(/[\\/]/).filter(Boolean).pop())}else e.body!==void 0&&t.append(`file`,e.body);if(e.creator!==void 0&&t.append(`creator`,String(h(e.creator,`creator`,`text`)??``)),e.expiry!==void 0&&t.append(`expiry`,String(h(e.expiry,`expiry`,`text`)??``)),e.id!==void 0&&t.append(`id`,String(h(e.id,`id`,`text`)??``)),e.metadata!==void 0){let n=typeof e.metadata==`string`?h(e.metadata,`metadata`,`text`):e.metadata;t.append(`metadata`,typeof n==`string`?n:JSON.stringify(n))}e[`require-signed-urls`]!==void 0&&t.append(`requireSignedURLs`,String(e[`require-signed-urls`]));let r=await l(`Creating`,async()=>n(a,`POST`,`/accounts/${u}/images/v2/direct_upload`,{body:t}));s(r,{successLabel:`Created`});return}if(e.body){let t=h(e.body,`body`,`binary`),r=await l(`Creating`,async()=>n(a,`POST`,`/accounts/${u}/images/v2/direct_upload`,{body:t,headers:{"Content-Type":`multipart/form-data`}}));s(r,{successLabel:`Created`});return}let d=await l(`Creating`,async()=>a.send(ae,{account_id:u}));s(d,{successLabel:`Created`})})};var w={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/images/v1/${t.image_id}`,body:`json`};function T(e){return e.usage(`$0 images edit <image-id>
10
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 T={command:`edit <image-id>`,describe:`Update image`,builder:w,handler:async e=>u({command:`images edit`,classification:{safeFlags:[`require-signed-urls`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v1/${e[`image-id`]==null?`<image-id>`:encodeURIComponent(String(e[`image-id`]))}`,pathParams:{"image-id":String(e[`image-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({creator:m(e.creator,`creator`,`text`),requireSignedURLs:e[`require-signed-urls`]}):d(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=d(e.body),r=await l(`Updating`,async()=>n.send(C,{body:t,account_id:a,image_id:e[`image-id`]}));s(r,{successLabel:`Updated`});return}let u=p({creator:m(e.creator,`creator`,`text`),requireSignedURLs:e[`require-signed-urls`]}),f=await l(`Updating`,async()=>n.send(C,{body:u,account_id:a,image_id:e[`image-id`]}));s(f,{successLabel:`Updated`})})};var E={method:`GET`,path:t=>e`/zones/${t.zone_id}/images/v1/flows`};function D(e){return e.usage(`$0 images flows get
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(`metadata`,{type:`string`,description:`User modifiable key-value store. Can be used for keeping references to another system of record for managing images. No change if not specified. Provide as a JSON object or @path/to/file.json.`}).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 e=>u({command:`images edit`,classification:{safeFlags:[`require-signed-urls`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v1/${e[`image-id`]==null?`<image-id>`:encodeURIComponent(String(e[`image-id`]))}`,pathParams:{"image-id":String(e[`image-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({creator:h(e.creator,`creator`,`text`),metadata:p(e.metadata,`metadata`),requireSignedURLs:e[`require-signed-urls`]},[[`metadata`]]):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Updating`,async()=>n.send(w,{body:t,account_id:a,image_id:e[`image-id`]}));s(r,{successLabel:`Updated`});return}let u=m({creator:h(e.creator,`creator`,`text`),metadata:p(e.metadata,`metadata`),requireSignedURLs:e[`require-signed-urls`]},[[`metadata`]]),d=await l(`Updating`,async()=>n.send(w,{body:u,account_id:a,image_id:e[`image-id`]}));s(d,{successLabel:`Updated`})})};var D={method:`GET`,path:t=>e`/zones/${t.zone_id}/images/v1/flows`};function O(e){return e.usage(`$0 images flows get
12
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=>u({command:`images flows get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){c({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 t=await r(e),n=await a({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n;let i=await l(`Loading`,async()=>t.send(E,{zone_id:n}));s(i,{successLabel:`Loaded`})})};var k={method:`PUT`,path:t=>e`/zones/${t.zone_id}/images/v1/flows`,body:`json`};function A(e){return e.usage(`$0 images flows update
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 k={command:`get`,describe:`Get transformation flows`,builder:O,handler:async e=>u({command:`images flows get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){c({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 t=await r(e),n=await a({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n;let i=await l(`Loading`,async()=>t.send(D,{zone_id:n}));s(i,{successLabel:`Loaded`})})};var A={method:`PUT`,path:t=>e`/zones/${t.zone_id}/images/v1/flows`,body:`json`};function j(e){return e.usage(`$0 images flows update
14
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 j={command:`update`,describe:`Update transformation flows`,builder:A,handler:async e=>u({command:`images flows update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){c({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?p({etag:m(e.etag,`etag`,`text`),flows:f(e.flows,`flows`),version:e[`config-version`]}):d(e.body)});return}let t=await r(e),n=await a({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=d(e.body),i=await l(`Updating`,async()=>t.send(k,{body:r,zone_id:n}));s(i,{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=p({etag:m(e.etag,`etag`,`text`),flows:f(e.flows,`flows`),version:e[`config-version`]}),o=await l(`Updating`,async()=>t.send(k,{body:i,zone_id:n}));s(o,{successLabel:`Updated`})})},M={command:`flows`,describe:`Zone-level transformation flows that control how images are resized and optimized on delivery`,builder:e=>e.command(O).command(j).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function N(e){return e.usage(`$0 images get-blob <image-id>
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 M={command:`update`,describe:`Update transformation flows`,builder:j,handler:async e=>u({command:`images flows update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){c({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?m({etag:h(e.etag,`etag`,`text`),flows:d(e.flows,`flows`),version:e[`config-version`]}):f(e.body)});return}let t=await r(e),n=await a({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=f(e.body),i=await l(`Updating`,async()=>t.send(A,{body:r,zone_id:n}));s(i,{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=m({etag:h(e.etag,`etag`,`text`),flows:d(e.flows,`flows`),version:e[`config-version`]}),o=await l(`Updating`,async()=>t.send(A,{body:i,zone_id:n}));s(o,{successLabel:`Updated`})})},N={command:`flows`,describe:`Zone-level transformation flows that control how images are resized and optimized on delivery`,builder:e=>e.command(k).command(M).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function P(e){return e.usage(`$0 images get-blob <image-id>
16
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 P={command:`get-blob <image-id>`,describe:`Download image`,builder:N,handler:async e=>u({command:`images get-blob`,classification:{safeFlags:[`dry-run`,`text`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images get-blob`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v1/${e[`image-id`]==null?`<image-id>`:encodeURIComponent(String(e[`image-id`]))}/blob`,pathParams:{"image-id":String(e[`image-id`]??``)},bodyKind:`none`});return}await r(e);let n=e.local?t:await o();e.accountId=n;let a=await l(`Loading`,async()=>b(`/accounts/${n}/images/v1/${encodeURIComponent(String(e[`image-id`]))}/blob`,{method:`GET`,local:e.local===!0,persistTo:e.persistTo}));y(e.text===!0?a.toString(`utf-8`):a)})};var F={method:`GET`,path:t=>e`/accounts/${t.account_id}/images/v1/${t.image_id}`};function I(e){return e.usage(`$0 images get <image-id>
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 F={command:`get-blob <image-id>`,describe:`Download image`,builder:P,handler:async e=>u({command:`images get-blob`,classification:{safeFlags:[`dry-run`,`text`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images get-blob`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v1/${e[`image-id`]==null?`<image-id>`:encodeURIComponent(String(e[`image-id`]))}/blob`,pathParams:{"image-id":String(e[`image-id`]??``)},bodyKind:`none`});return}await r(e);let n=e.local?t:await o();e.accountId=n;let a=await l(`Loading`,async()=>x(`/accounts/${n}/images/v1/${encodeURIComponent(String(e[`image-id`]))}/blob`,{method:`GET`,local:e.local===!0,persistTo:e.persistTo}));b(e.text===!0?a.toString(`utf-8`):a)})};var I={method:`GET`,path:t=>e`/accounts/${t.account_id}/images/v1/${t.image_id}`};function L(e){return e.usage(`$0 images get <image-id>
18
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 L={command:`get <image-id>`,describe:`Image details`,builder:I,handler:async e=>u({command:`images get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v1/${e[`image-id`]==null?`<image-id>`:encodeURIComponent(String(e[`image-id`]))}`,pathParams:{"image-id":String(e[`image-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(F,{account_id:a,image_id:e[`image-id`]}));s(u,{successLabel:`Loaded`})})};var R={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/images/v2/sourcingkit/migrations/${t.migration_id}/lifecycle/abort`};function z(e){return e.usage(`$0 images import abort <migration-id>
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 R={command:`get <image-id>`,describe:`Image details`,builder:L,handler:async e=>u({command:`images get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v1/${e[`image-id`]==null?`<image-id>`:encodeURIComponent(String(e[`image-id`]))}`,pathParams:{"image-id":String(e[`image-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(I,{account_id:a,image_id:e[`image-id`]}));s(u,{successLabel:`Loaded`})})};var z={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/images/v2/sourcingkit/migrations/${t.migration_id}/lifecycle/abort`};function B(e){return e.usage(`$0 images import abort <migration-id>
20
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 B={command:`abort <migration-id>`,describe:`Abort a migration`,builder:z,handler:async e=>u({command:`images import abort`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images import abort`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v2/sourcingkit/migrations/${e[`migration-id`]==null?`<migration-id>`:encodeURIComponent(String(e[`migration-id`]))}/lifecycle/abort`,pathParams:{"migration-id":String(e[`migration-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Updating`,async()=>n.send(R,{account_id:a,migration_id:e[`migration-id`]}));s(u,{successLabel:`Updated`})})};var V={method:`POST`,path:t=>e`/accounts/${t.account_id}/images/v2/sourcingkit/migrations`,body:`json`};function H(e){return e.usage(`$0 images import create
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 V={command:`abort <migration-id>`,describe:`Abort a migration`,builder:B,handler:async e=>u({command:`images import abort`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images import abort`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v2/sourcingkit/migrations/${e[`migration-id`]==null?`<migration-id>`:encodeURIComponent(String(e[`migration-id`]))}/lifecycle/abort`,pathParams:{"migration-id":String(e[`migration-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Updating`,async()=>n.send(z,{account_id:a,migration_id:e[`migration-id`]}));s(u,{successLabel:`Updated`})})};var H={method:`POST`,path:t=>e`/accounts/${t.account_id}/images/v2/sourcingkit/migrations`,body:`json`};function U(e){return e.usage(`$0 images import create
22
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`}).coerce(`conflict-behaviour`,e=>m(e,`conflict-behaviour`,`text`)).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 U={command:`create`,describe:`Create a sourcing kit migration`,builder:H,handler:async e=>u({command:`images import create`,classification:{safeFlags:[`conflict-behaviour`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images import create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v2/sourcingkit/migrations`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({conflictBehaviour:e[`conflict-behaviour`],excludedContentTypes:e[`excluded-content-types`],pathPrefix:m(e[`path-prefix`],`path-prefix`,`text`),rootDirectory:m(e[`root-directory`],`root-directory`,`text`),sourceId:m(e[`source-id`],`source-id`,`text`)}):d(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=d(e.body),r=await l(`Creating`,async()=>n.send(V,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}e[`source-id`]===void 0&&(e[`source-id`]=await g(`source-id`,`The identifier of the source to migrate from.`));let u=p({conflictBehaviour:e[`conflict-behaviour`],excludedContentTypes:e[`excluded-content-types`],pathPrefix:m(e[`path-prefix`],`path-prefix`,`text`),rootDirectory:m(e[`root-directory`],`root-directory`,`text`),sourceId:m(e[`source-id`],`source-id`,`text`)}),f=await l(`Creating`,async()=>n.send(V,{body:u,account_id:a}));s(f,{successLabel:`Created`})})};var W={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/images/v2/sourcingkit/migrations/${t.migration_id}`};function G(e){return e.usage(`$0 images import delete <migration-id>
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`}).coerce(`conflict-behaviour`,e=>h(e,`conflict-behaviour`,`text`)).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 W={command:`create`,describe:`Create a sourcing kit migration`,builder:U,handler:async e=>u({command:`images import create`,classification:{safeFlags:[`conflict-behaviour`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images import create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v2/sourcingkit/migrations`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({conflictBehaviour:e[`conflict-behaviour`],excludedContentTypes:e[`excluded-content-types`],pathPrefix:h(e[`path-prefix`],`path-prefix`,`text`),rootDirectory:h(e[`root-directory`],`root-directory`,`text`),sourceId:h(e[`source-id`],`source-id`,`text`)}):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Creating`,async()=>n.send(H,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}e[`source-id`]===void 0&&(e[`source-id`]=await _(`source-id`,`The identifier of the source to migrate from.`));let u=m({conflictBehaviour:e[`conflict-behaviour`],excludedContentTypes:e[`excluded-content-types`],pathPrefix:h(e[`path-prefix`],`path-prefix`,`text`),rootDirectory:h(e[`root-directory`],`root-directory`,`text`),sourceId:h(e[`source-id`],`source-id`,`text`)}),d=await l(`Creating`,async()=>n.send(H,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var G={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/images/v2/sourcingkit/migrations/${t.migration_id}`};function K(e){return e.usage(`$0 images import delete <migration-id>
24
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 K={command:`delete <migration-id>`,describe:`Delete a sourcing kit migration`,builder:G,handler:async e=>u({command:`images import delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images import delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v2/sourcingkit/migrations/${e[`migration-id`]==null?`<migration-id>`:encodeURIComponent(String(e[`migration-id`]))}`,pathParams:{"migration-id":String(e[`migration-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await v({force:!!e.force,message:`This operation will delete this import migration.`})){process.stderr.write(`Aborted.
26
- `);return}let u=await l(`Deleting`,async()=>n.send(W,{account_id:a,migration_id:e[`migration-id`]}));s(u,{successLabel:`Deleted`})})};var q={method:`GET`,path:t=>e`/accounts/${t.account_id}/images/v2/sourcingkit/migrations/${t.migration_id}`};function se(e){return e.usage(`$0 images import get <migration-id>
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 q={command:`delete <migration-id>`,describe:`Delete a sourcing kit migration`,builder:K,handler:async e=>u({command:`images import delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images import delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v2/sourcingkit/migrations/${e[`migration-id`]==null?`<migration-id>`:encodeURIComponent(String(e[`migration-id`]))}`,pathParams:{"migration-id":String(e[`migration-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await y({force:!!e.force,message:`This operation will delete this import migration.`})){process.stderr.write(`Aborted.
26
+ `);return}let u=await l(`Deleting`,async()=>n.send(G,{account_id:a,migration_id:e[`migration-id`]}));s(u,{successLabel:`Deleted`})})};var se={method:`GET`,path:t=>e`/accounts/${t.account_id}/images/v2/sourcingkit/migrations/${t.migration_id}`};function ce(e){return e.usage(`$0 images import get <migration-id>
27
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 ce={command:`get <migration-id>`,describe:`Get sourcing kit migration`,builder:se,handler:async e=>u({command:`images import get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images import get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v2/sourcingkit/migrations/${e[`migration-id`]==null?`<migration-id>`:encodeURIComponent(String(e[`migration-id`]))}`,pathParams:{"migration-id":String(e[`migration-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(q,{account_id:a,migration_id:e[`migration-id`]}));s(u,{successLabel:`Loaded`})})};var le={method:`GET`,path:t=>e`/accounts/${t.account_id}/images/v2/sourcingkit/migrations`,query:[`offset`,`limit`]};function ue(e){return e.usage(`$0 images import list
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 le={command:`get <migration-id>`,describe:`Get sourcing kit migration`,builder:ce,handler:async e=>u({command:`images import get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images import get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v2/sourcingkit/migrations/${e[`migration-id`]==null?`<migration-id>`:encodeURIComponent(String(e[`migration-id`]))}`,pathParams:{"migration-id":String(e[`migration-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(se,{account_id:a,migration_id:e[`migration-id`]}));s(u,{successLabel:`Loaded`})})};var ue={method:`GET`,path:t=>e`/accounts/${t.account_id}/images/v2/sourcingkit/migrations`,query:[`offset`,`limit`]};function de(e){return e.usage(`$0 images import list
29
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 de={command:`list`,describe:`List sourcing kit migrations`,builder:ue,handler:async e=>u({command:`images import list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={offset:e.offset,limit:e.limit};if(e.dryRun){let e=await i();c({command:`cf images import list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/images/v2/sourcingkit/migrations`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(le,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})};var fe={method:`GET`,path:t=>e`/accounts/${t.account_id}/images/v2/sourcingkit/migrations/${t.migration_id}/logs`,query:[`offset`,`limit`]};function pe(e){return e.usage(`$0 images import logs <migration-id>
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 fe={command:`list`,describe:`List sourcing kit migrations`,builder:de,handler:async e=>u({command:`images import list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={offset:e.offset,limit:e.limit};if(e.dryRun){let e=await i();c({command:`cf images import list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/images/v2/sourcingkit/migrations`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(ue,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})};var pe={method:`GET`,path:t=>e`/accounts/${t.account_id}/images/v2/sourcingkit/migrations/${t.migration_id}/logs`,query:[`offset`,`limit`]};function me(e){return e.usage(`$0 images import logs <migration-id>
31
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 me={command:`logs <migration-id>`,describe:`List migration logs`,builder:pe,handler:async e=>u({command:`images import logs`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={offset:e.offset,limit:e.limit};if(e.dryRun){let t=await i();c({command:`cf images import logs`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v2/sourcingkit/migrations/${e[`migration-id`]==null?`<migration-id>`:encodeURIComponent(String(e[`migration-id`]))}/logs`,pathParams:{"migration-id":String(e[`migration-id`]??``)},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(fe,{account_id:u,migration_id:e[`migration-id`],...n}));s(d,{successLabel:`Loaded`})})};var he={method:`GET`,path:t=>e`/accounts/${t.account_id}/images/v2/sourcingkit/migrations/${t.migration_id}/lifecycle`};function ge(e){return e.usage(`$0 images import progress <migration-id>
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 he={command:`logs <migration-id>`,describe:`List migration logs`,builder:me,handler:async e=>u({command:`images import logs`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={offset:e.offset,limit:e.limit};if(e.dryRun){let t=await i();c({command:`cf images import logs`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v2/sourcingkit/migrations/${e[`migration-id`]==null?`<migration-id>`:encodeURIComponent(String(e[`migration-id`]))}/logs`,pathParams:{"migration-id":String(e[`migration-id`]??``)},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(pe,{account_id:u,migration_id:e[`migration-id`],...n}));s(d,{successLabel:`Loaded`})})};var ge={method:`GET`,path:t=>e`/accounts/${t.account_id}/images/v2/sourcingkit/migrations/${t.migration_id}/lifecycle`};function _e(e){return e.usage(`$0 images import progress <migration-id>
33
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 _e={command:`progress <migration-id>`,describe:`Get migration progress`,builder:ge,handler:async e=>u({command:`images import progress`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images import progress`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v2/sourcingkit/migrations/${e[`migration-id`]==null?`<migration-id>`:encodeURIComponent(String(e[`migration-id`]))}/lifecycle`,pathParams:{"migration-id":String(e[`migration-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(he,{account_id:a,migration_id:e[`migration-id`]}));s(u,{successLabel:`Loaded`})})};var ve={method:`GET`,path:t=>e`/accounts/${t.account_id}/images/v2/sourcingkit/sources/${t.source_id}/connectivity`};function ye(e){return e.usage(`$0 images import sources check <source-id>
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 ve={command:`progress <migration-id>`,describe:`Get migration progress`,builder:_e,handler:async e=>u({command:`images import progress`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images import progress`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v2/sourcingkit/migrations/${e[`migration-id`]==null?`<migration-id>`:encodeURIComponent(String(e[`migration-id`]))}/lifecycle`,pathParams:{"migration-id":String(e[`migration-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(ge,{account_id:a,migration_id:e[`migration-id`]}));s(u,{successLabel:`Loaded`})})};var ye={method:`GET`,path:t=>e`/accounts/${t.account_id}/images/v2/sourcingkit/sources/${t.source_id}/connectivity`};function be(e){return e.usage(`$0 images import sources check <source-id>
35
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 be={command:`check <source-id>`,describe:`Get source connectivity status`,builder:ye,handler:async e=>u({command:`images import sources check`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images import sources check`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v2/sourcingkit/sources/${e[`source-id`]==null?`<source-id>`:encodeURIComponent(String(e[`source-id`]))}/connectivity`,pathParams:{"source-id":String(e[`source-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(ve,{account_id:a,source_id:e[`source-id`]}));s(u,{successLabel:`Loaded`})})};var J={method:`POST`,path:t=>e`/accounts/${t.account_id}/images/v2/sourcingkit/sources`,body:`json`};function xe(e){return e.usage(`$0 images import sources create
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 xe={command:`check <source-id>`,describe:`Get source connectivity status`,builder:be,handler:async e=>u({command:`images import sources check`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images import sources check`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v2/sourcingkit/sources/${e[`source-id`]==null?`<source-id>`:encodeURIComponent(String(e[`source-id`]))}/connectivity`,pathParams:{"source-id":String(e[`source-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(ye,{account_id:a,source_id:e[`source-id`]}));s(u,{successLabel:`Loaded`})})};var J={method:`POST`,path:t=>e`/accounts/${t.account_id}/images/v2/sourcingkit/sources`,body:`json`};function Se(e){return e.usage(`$0 images import sources create
37
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`]}).coerce(`vendor`,e=>m(e,`vendor`,`text`)).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 Se={command:`create`,describe:`Create a sourcing kit source`,builder:xe,handler:async e=>u({command:`images import sources create`,classification:{safeFlags:[`vendor`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images import sources create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v2/sourcingkit/sources`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({account:m(e.account,`account`,`text`),bucket:m(e.bucket,`bucket`,`text`),name:m(e.name,`name`,`text`),vendor:e.vendor}):d(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=d(e.body),r=await l(`Creating`,async()=>n.send(J,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}e.bucket===void 0&&(e.bucket=await g(`bucket`,`The name of the storage bucket.`)),e.name===void 0&&(e.name=await g(`name`,`A human-readable name for the source.`)),e.vendor===void 0&&(e.vendor=await _(`vendor`,`The cloud storage vendor of the source bucket.`,[`s3`,`r2`]));let u=p({account:m(e.account,`account`,`text`),bucket:m(e.bucket,`bucket`,`text`),name:m(e.name,`name`,`text`),vendor:e.vendor}),f=await l(`Creating`,async()=>n.send(J,{body:u,account_id:a}));s(f,{successLabel:`Created`})})};var Ce={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/images/v2/sourcingkit/sources/${t.source_id}`};function we(e){return e.usage(`$0 images import sources delete <source-id>
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(`secret`,{type:`string`,description:`Storage credentials for accessing the bucket. Shape depends on vendor. Provide as a JSON object or @path/to/file.json.`}).option(`vendor`,{type:`string`,description:`The cloud storage vendor of the source bucket.`,choices:[`s3`,`r2`]}).coerce(`vendor`,e=>h(e,`vendor`,`text`)).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 Ce={command:`create`,describe:`Create a sourcing kit source`,builder:Se,handler:async e=>u({command:`images import sources create`,classification:{safeFlags:[`vendor`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images import sources create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v2/sourcingkit/sources`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({account:h(e.account,`account`,`text`),bucket:h(e.bucket,`bucket`,`text`),name:h(e.name,`name`,`text`),secret:p(e.secret,`secret`,!0),vendor:e.vendor},[[`secret`]]):f(e.body,[{path:[`secret`],flag:`secret`}])});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body,[{path:[`secret`],flag:`secret`}]),r=await l(`Creating`,async()=>n.send(J,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}if(e.bucket===void 0&&(e.bucket=await _(`bucket`,`The name of the storage bucket.`)),e.name===void 0&&(e.name=await _(`name`,`A human-readable name for the source.`)),e.secret===void 0)throw Error(`--secret is required (or pass --body with this field set).`);e.vendor===void 0&&(e.vendor=await v(`vendor`,`The cloud storage vendor of the source bucket.`,[`s3`,`r2`]));let u=m({account:h(e.account,`account`,`text`),bucket:h(e.bucket,`bucket`,`text`),name:h(e.name,`name`,`text`),secret:p(e.secret,`secret`,!0),vendor:e.vendor},[[`secret`]]),d=await l(`Creating`,async()=>n.send(J,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var we={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/images/v2/sourcingkit/sources/${t.source_id}`};function Te(e){return e.usage(`$0 images import sources delete <source-id>
39
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 Te={command:`delete <source-id>`,describe:`Delete a sourcing kit source`,builder:we,handler:async e=>u({command:`images import sources delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images import sources delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v2/sourcingkit/sources/${e[`source-id`]==null?`<source-id>`:encodeURIComponent(String(e[`source-id`]))}`,pathParams:{"source-id":String(e[`source-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await v({force:!!e.force,message:`This operation will delete this import source.`})){process.stderr.write(`Aborted.
41
- `);return}let u=await l(`Deleting`,async()=>n.send(Ce,{account_id:a,source_id:e[`source-id`]}));s(u,{successLabel:`Deleted`})})};var Ee={method:`GET`,path:t=>e`/accounts/${t.account_id}/images/v2/sourcingkit/sources/${t.source_id}`};function De(e){return e.usage(`$0 images import sources get <source-id>
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 Ee={command:`delete <source-id>`,describe:`Delete a sourcing kit source`,builder:Te,handler:async e=>u({command:`images import sources delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images import sources delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v2/sourcingkit/sources/${e[`source-id`]==null?`<source-id>`:encodeURIComponent(String(e[`source-id`]))}`,pathParams:{"source-id":String(e[`source-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await y({force:!!e.force,message:`This operation will delete this import source.`})){process.stderr.write(`Aborted.
41
+ `);return}let u=await l(`Deleting`,async()=>n.send(we,{account_id:a,source_id:e[`source-id`]}));s(u,{successLabel:`Deleted`})})};var De={method:`GET`,path:t=>e`/accounts/${t.account_id}/images/v2/sourcingkit/sources/${t.source_id}`};function Oe(e){return e.usage(`$0 images import sources get <source-id>
42
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:De,handler:async e=>u({command:`images import sources get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images import sources get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v2/sourcingkit/sources/${e[`source-id`]==null?`<source-id>`:encodeURIComponent(String(e[`source-id`]))}`,pathParams:{"source-id":String(e[`source-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(Ee,{account_id:a,source_id:e[`source-id`]}));s(u,{successLabel:`Loaded`})})};var ke={method:`GET`,path:t=>e`/accounts/${t.account_id}/images/v2/sourcingkit/sources`,query:[`offset`,`limit`,`name`]};function Ae(e){return e.usage(`$0 images import sources list
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 ke={command:`get <source-id>`,describe:`Get sourcing kit source`,builder:Oe,handler:async e=>u({command:`images import sources get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images import sources get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v2/sourcingkit/sources/${e[`source-id`]==null?`<source-id>`:encodeURIComponent(String(e[`source-id`]))}`,pathParams:{"source-id":String(e[`source-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(De,{account_id:a,source_id:e[`source-id`]}));s(u,{successLabel:`Loaded`})})};var Ae={method:`GET`,path:t=>e`/accounts/${t.account_id}/images/v2/sourcingkit/sources`,query:[`offset`,`limit`,`name`]};function je(e){return e.usage(`$0 images import sources list
44
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 je={command:`list`,describe:`List sourcing kit sources`,builder:Ae,handler:async e=>u({command:`images import sources list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={offset:e.offset,limit:e.limit,name:e.name};if(e.dryRun){let e=await i();c({command:`cf images import sources list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/images/v2/sourcingkit/sources`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(ke,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})};var Y={method:`POST`,path:t=>e`/accounts/${t.account_id}/images/v2/sourcingkit/sources/connectivity-precheck`,body:`json`};function Me(e){return e.usage(`$0 images import sources pre-check
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 Me={command:`list`,describe:`List sourcing kit sources`,builder:je,handler:async e=>u({command:`images import sources list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={offset:e.offset,limit:e.limit,name:e.name};if(e.dryRun){let e=await i();c({command:`cf images import sources list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/images/v2/sourcingkit/sources`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(Ae,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})};var Y={method:`POST`,path:t=>e`/accounts/${t.account_id}/images/v2/sourcingkit/sources/connectivity-precheck`,body:`json`};function Ne(e){return e.usage(`$0 images import sources pre-check
46
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`]}).coerce(`vendor`,e=>m(e,`vendor`,`text`)).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:`pre-check`,describe:`Precheck source connectivity`,builder:Me,handler:async e=>u({command:`images import sources pre-check`,classification:{safeFlags:[`vendor`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images import sources pre-check`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v2/sourcingkit/sources/connectivity-precheck`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({account:m(e.account,`account`,`text`),bucket:m(e.bucket,`bucket`,`text`),region:m(e.region,`region`,`text`),vendor:e.vendor}):d(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=d(e.body),r=await l(`Creating`,async()=>n.send(Y,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}e.bucket===void 0&&(e.bucket=await g(`bucket`,`The name of the storage bucket.`)),e.vendor===void 0&&(e.vendor=await _(`vendor`,`The cloud storage vendor of the source bucket.`,[`s3`,`r2`]));let u=p({account:m(e.account,`account`,`text`),bucket:m(e.bucket,`bucket`,`text`),region:m(e.region,`region`,`text`),vendor:e.vendor}),f=await l(`Creating`,async()=>n.send(Y,{body:u,account_id:a}));s(f,{successLabel:`Created`})})};var X={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/images/v2/sourcingkit/sources/${t.source_id}`,body:`json`};function Pe(e){return e.usage(`$0 images import sources update <source-id>
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(`secret`,{type:`string`,description:`Storage credentials for accessing the bucket. Provide as a JSON object or @path/to/file.json.`}).option(`vendor`,{type:`string`,description:`The cloud storage vendor of the source bucket.`,choices:[`s3`,`r2`]}).coerce(`vendor`,e=>h(e,`vendor`,`text`)).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 Pe={command:`pre-check`,describe:`Precheck source connectivity`,builder:Ne,handler:async e=>u({command:`images import sources pre-check`,classification:{safeFlags:[`vendor`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images import sources pre-check`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v2/sourcingkit/sources/connectivity-precheck`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({account:h(e.account,`account`,`text`),bucket:h(e.bucket,`bucket`,`text`),region:h(e.region,`region`,`text`),secret:p(e.secret,`secret`,!0),vendor:e.vendor},[[`secret`]]):f(e.body,[{path:[`secret`],flag:`secret`}])});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body,[{path:[`secret`],flag:`secret`}]),r=await l(`Creating`,async()=>n.send(Y,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}if(e.bucket===void 0&&(e.bucket=await _(`bucket`,`The name of the storage bucket.`)),e.secret===void 0)throw Error(`--secret is required (or pass --body with this field set).`);e.vendor===void 0&&(e.vendor=await v(`vendor`,`The cloud storage vendor of the source bucket.`,[`s3`,`r2`]));let u=m({account:h(e.account,`account`,`text`),bucket:h(e.bucket,`bucket`,`text`),region:h(e.region,`region`,`text`),secret:p(e.secret,`secret`,!0),vendor:e.vendor},[[`secret`]]),d=await l(`Creating`,async()=>n.send(Y,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var X={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/images/v2/sourcingkit/sources/${t.source_id}`,body:`json`};function Fe(e){return e.usage(`$0 images import sources update <source-id>
48
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:Pe,handler:async e=>u({command:`images import sources update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images import sources update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v2/sourcingkit/sources/${e[`source-id`]==null?`<source-id>`:encodeURIComponent(String(e[`source-id`]))}`,pathParams:{"source-id":String(e[`source-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({name:m(e.name,`name`,`text`)}):d(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=d(e.body),r=await l(`Updating`,async()=>n.send(X,{body:t,account_id:a,source_id:e[`source-id`]}));s(r,{successLabel:`Updated`});return}e.name===void 0&&(e.name=await g(`name`,`Updated name for the source.`));let u=p({name:m(e.name,`name`,`text`)}),f=await l(`Updating`,async()=>n.send(X,{body:u,account_id:a,source_id:e[`source-id`]}));s(f,{successLabel:`Updated`})})},Ie={command:`sources`,describe:`Operations for import.sources`,builder:e=>e.command(be).command(Se).command(Te).command(Oe).command(je).command(Ne).command(Fe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Le={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/images/v2/sourcingkit/migrations/${t.migration_id}/lifecycle/start`};function Re(e){return e.usage(`$0 images import start <migration-id>
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 Ie={command:`update <source-id>`,describe:`Update a sourcing kit source`,builder:Fe,handler:async e=>u({command:`images import sources update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images import sources update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v2/sourcingkit/sources/${e[`source-id`]==null?`<source-id>`:encodeURIComponent(String(e[`source-id`]))}`,pathParams:{"source-id":String(e[`source-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({name:h(e.name,`name`,`text`)}):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Updating`,async()=>n.send(X,{body:t,account_id:a,source_id:e[`source-id`]}));s(r,{successLabel:`Updated`});return}e.name===void 0&&(e.name=await _(`name`,`Updated name for the source.`));let u=m({name:h(e.name,`name`,`text`)}),d=await l(`Updating`,async()=>n.send(X,{body:u,account_id:a,source_id:e[`source-id`]}));s(d,{successLabel:`Updated`})})},Le={command:`sources`,describe:`Operations for import.sources`,builder:e=>e.command(xe).command(Ce).command(Ee).command(ke).command(Me).command(Pe).command(Ie).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Re={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/images/v2/sourcingkit/migrations/${t.migration_id}/lifecycle/start`};function ze(e){return e.usage(`$0 images import start <migration-id>
50
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 ze={command:`start <migration-id>`,describe:`Start a migration`,builder:Re,handler:async e=>u({command:`images import start`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images import start`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v2/sourcingkit/migrations/${e[`migration-id`]==null?`<migration-id>`:encodeURIComponent(String(e[`migration-id`]))}/lifecycle/start`,pathParams:{"migration-id":String(e[`migration-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Updating`,async()=>n.send(Le,{account_id:a,migration_id:e[`migration-id`]}));s(u,{successLabel:`Updated`})})},Be={command:`import`,describe:`Import images from S3`,builder:e=>e.command(B).command(U).command(K).command(ce).command(de).command(me).command(_e).command(ze).command(Ie).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ve={method:`PUT`,path:t=>e`/accounts/${t.account_id}/images/v1/keys/${t.signing_key_name}`};function He(e){return e.usage(`$0 images keys create <signing-key-name>
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 Be={command:`start <migration-id>`,describe:`Start a migration`,builder:ze,handler:async e=>u({command:`images import start`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images import start`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v2/sourcingkit/migrations/${e[`migration-id`]==null?`<migration-id>`:encodeURIComponent(String(e[`migration-id`]))}/lifecycle/start`,pathParams:{"migration-id":String(e[`migration-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Updating`,async()=>n.send(Re,{account_id:a,migration_id:e[`migration-id`]}));s(u,{successLabel:`Updated`})})},Ve={command:`import`,describe:`Import images from S3`,builder:e=>e.command(V).command(W).command(q).command(le).command(fe).command(he).command(ve).command(Be).command(Le).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var He={method:`PUT`,path:t=>e`/accounts/${t.account_id}/images/v1/keys/${t.signing_key_name}`};function Ue(e){return e.usage(`$0 images keys create <signing-key-name>
52
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 Ue={command:`create <signing-key-name>`,describe:`Create a new Signing Key`,builder:He,handler:async e=>u({command:`images keys create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images keys create`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v1/keys/${e[`signing-key-name`]==null?`<signing-key-name>`:encodeURIComponent(String(e[`signing-key-name`]))}`,pathParams:{"signing-key-name":String(e[`signing-key-name`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Updating`,async()=>n.send(Ve,{account_id:a,signing_key_name:e[`signing-key-name`]}));s(u,{successLabel:`Updated`})})};var We={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/images/v1/keys/${t.signing_key_name}`};function Ge(e){return e.usage(`$0 images keys delete <signing-key-name>
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 We={command:`create <signing-key-name>`,describe:`Create a new Signing Key`,builder:Ue,handler:async e=>u({command:`images keys create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images keys create`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v1/keys/${e[`signing-key-name`]==null?`<signing-key-name>`:encodeURIComponent(String(e[`signing-key-name`]))}`,pathParams:{"signing-key-name":String(e[`signing-key-name`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Updating`,async()=>n.send(He,{account_id:a,signing_key_name:e[`signing-key-name`]}));s(u,{successLabel:`Updated`})})};var Ge={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/images/v1/keys/${t.signing_key_name}`};function Ke(e){return e.usage(`$0 images keys delete <signing-key-name>
54
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 Ke={command:`delete <signing-key-name>`,describe:`Delete Signing Key`,builder:Ge,handler:async e=>u({command:`images keys delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images keys delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v1/keys/${e[`signing-key-name`]==null?`<signing-key-name>`:encodeURIComponent(String(e[`signing-key-name`]))}`,pathParams:{"signing-key-name":String(e[`signing-key-name`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await v({force:!!e.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}let u=await l(`Deleting`,async()=>n.send(We,{account_id:a,signing_key_name:e[`signing-key-name`]}));s(u,{successLabel:`Deleted`})})};var qe={method:`GET`,path:t=>e`/accounts/${t.account_id}/images/v1/keys`};function Je(e){return e.usage(`$0 images keys list
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 qe={command:`delete <signing-key-name>`,describe:`Delete Signing Key`,builder:Ke,handler:async e=>u({command:`images keys delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images keys delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v1/keys/${e[`signing-key-name`]==null?`<signing-key-name>`:encodeURIComponent(String(e[`signing-key-name`]))}`,pathParams:{"signing-key-name":String(e[`signing-key-name`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await y({force:!!e.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}let u=await l(`Deleting`,async()=>n.send(Ge,{account_id:a,signing_key_name:e[`signing-key-name`]}));s(u,{successLabel:`Deleted`})})};var Je={method:`GET`,path:t=>e`/accounts/${t.account_id}/images/v1/keys`};function Ye(e){return e.usage(`$0 images keys list
57
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 Ye={command:`list`,describe:`List Signing Keys`,builder:Je,handler:async e=>u({command:`images keys list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf images keys list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/images/v1/keys`,pathParams:{},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(qe,{account_id:a}));s(u,{successLabel:`Loaded`})})},Xe={command:`keys`,describe:`Manage signing keys for generating private image URLs`,builder:e=>e.command(Ue).command(Ke).command(Ye).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ze={method:`GET`,path:t=>e`/accounts/${t.account_id}/images/v2`,query:[`continuation_token`,`per_page`,`sort_order`,`creator`,`meta.<field>[<operator>]`],errors:{400:`BadRequestError`}};function Qe(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 $e={command:`list`,describe:`List images V2`,builder:Qe,handler:async e=>u({command:`images list`,classification:{safeFlags:[`sort-order`,`dry-run`]}},e,async()=>{let n={continuation_token:e[`continuation-token`],per_page:e[`per-page`],sort_order:e[`sort-order`],creator:e.creator};if(e.dryRun){let e=await i();c({command:`cf images list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/images/v2`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(Ze,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})};var et={method:`GET`,path:t=>e`/accounts/${t.account_id}/images/v1/stats`};function tt(e){return e.usage(`$0 images stats
58
+ List your CF Images signing keys.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Xe={command:`list`,describe:`List Signing Keys`,builder:Ye,handler:async e=>u({command:`images keys list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf images keys list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/images/v1/keys`,pathParams:{},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(Je,{account_id:a}));s(u,{successLabel:`Loaded`})})},Ze={command:`keys`,describe:`Manage signing keys for generating private image URLs`,builder:e=>e.command(We).command(qe).command(Xe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Qe={method:`GET`,path:t=>e`/accounts/${t.account_id}/images/v2`,query:[`continuation_token`,`per_page`,`sort_order`,`creator`,`meta.<field>[<operator>]`],errors:{400:`BadRequestError`}};function $e(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 et={command:`list`,describe:`List images V2`,builder:$e,handler:async e=>u({command:`images list`,classification:{safeFlags:[`sort-order`,`dry-run`]}},e,async()=>{let n={continuation_token:e[`continuation-token`],per_page:e[`per-page`],sort_order:e[`sort-order`],creator:e.creator};if(e.dryRun){let e=await i();c({command:`cf images list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/images/v2`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(Qe,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})};var tt={method:`GET`,path:t=>e`/accounts/${t.account_id}/images/v1/stats`};function nt(e){return e.usage(`$0 images stats
59
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 nt={command:`stats`,describe:`Images usage statistics`,builder:tt,handler:async e=>u({command:`images stats`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf images stats`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/images/v1/stats`,pathParams:{},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(et,{account_id:a}));s(u,{successLabel:`Loaded`})})};var Z={method:`POST`,path:t=>e`/accounts/${t.account_id}/images/v1/variants`,body:`json`};function Q(e){return e.usage(`$0 images variants create
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 rt={command:`stats`,describe:`Images usage statistics`,builder:nt,handler:async e=>u({command:`images stats`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf images stats`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/images/v1/stats`,pathParams:{},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(tt,{account_id:a}));s(u,{successLabel:`Loaded`})})};var Z={method:`POST`,path:t=>e`/accounts/${t.account_id}/images/v1/variants`,body:`json`};function it(e){return e.usage(`$0 images variants create
61
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`]}).coerce(`options-fit`,e=>m(e,`options-fit`,`text`)).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`]}).coerce(`options-metadata`,e=>m(e,`options-metadata`,`text`)).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 rt={command:`create`,describe:`Create a variant`,builder:Q,handler:async e=>u({command:`images variants create`,classification:{safeFlags:[`never-require-signed-urls`,`options-fit`,`options-metadata`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images variants create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v1/variants`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({id:m(e.id,`id`,`text`),neverRequireSignedURLs:e[`never-require-signed-urls`],options:{fit:e[`options-fit`],height:e[`options-height`],metadata:e[`options-metadata`],width:e[`options-width`]}}):d(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=d(e.body),r=await l(`Creating`,async()=>n.send(Z,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}if(e.id===void 0&&(e.id=await g(`id`,`The id field`)),e[`options-fit`]===void 0&&(e[`options-fit`]=await _(`options-fit`,`The fit property describes how the width and height dimensions should be interpreted.`,[`scale-down`,`contain`,`cover`,`crop`,`pad`])),e[`options-height`]===void 0)throw Error(`--options-height is required (or pass --body with this field set).`);if(e[`options-metadata`]===void 0&&(e[`options-metadata`]=await _(`options-metadata`,`What EXIF data should be preserved in the output image.`,[`keep`,`copyright`,`none`])),e[`options-width`]===void 0)throw Error(`--options-width is required (or pass --body with this field set).`);let u=p({id:m(e.id,`id`,`text`),neverRequireSignedURLs:e[`never-require-signed-urls`],options:{fit:e[`options-fit`],height:e[`options-height`],metadata:e[`options-metadata`],width:e[`options-width`]}}),f=await l(`Creating`,async()=>n.send(Z,{body:u,account_id:a}));s(f,{successLabel:`Created`})})};var it={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/images/v1/variants/${t.variant_id}`};function at(e){return e.usage(`$0 images variants delete <variant-id>
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`]}).coerce(`options-fit`,e=>h(e,`options-fit`,`text`)).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`]}).coerce(`options-metadata`,e=>h(e,`options-metadata`,`text`)).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 at={command:`create`,describe:`Create a variant`,builder:it,handler:async e=>u({command:`images variants create`,classification:{safeFlags:[`never-require-signed-urls`,`options-fit`,`options-metadata`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images variants create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v1/variants`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({id:h(e.id,`id`,`text`),neverRequireSignedURLs:e[`never-require-signed-urls`],options:{fit:e[`options-fit`],height:e[`options-height`],metadata:e[`options-metadata`],width:e[`options-width`]}}):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Creating`,async()=>n.send(Z,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}if(e.id===void 0&&(e.id=await _(`id`,`The id field`)),e[`options-fit`]===void 0&&(e[`options-fit`]=await v(`options-fit`,`The fit property describes how the width and height dimensions should be interpreted.`,[`scale-down`,`contain`,`cover`,`crop`,`pad`])),e[`options-height`]===void 0)throw Error(`--options-height is required (or pass --body with this field set).`);if(e[`options-metadata`]===void 0&&(e[`options-metadata`]=await v(`options-metadata`,`What EXIF data should be preserved in the output image.`,[`keep`,`copyright`,`none`])),e[`options-width`]===void 0)throw Error(`--options-width is required (or pass --body with this field set).`);let u=m({id:h(e.id,`id`,`text`),neverRequireSignedURLs:e[`never-require-signed-urls`],options:{fit:e[`options-fit`],height:e[`options-height`],metadata:e[`options-metadata`],width:e[`options-width`]}}),d=await l(`Creating`,async()=>n.send(Z,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var Q={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/images/v1/variants/${t.variant_id}`};function ot(e){return e.usage(`$0 images variants delete <variant-id>
63
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 ot={command:`delete <variant-id>`,describe:`Delete a variant`,builder:at,handler:async e=>u({command:`images variants delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images variants delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v1/variants/${e[`variant-id`]==null?`<variant-id>`:encodeURIComponent(String(e[`variant-id`]))}`,pathParams:{"variant-id":String(e[`variant-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await v({force:!!e.force,message:`This operation will delete this variant.`})){process.stderr.write(`Aborted.
65
- `);return}let u=await l(`Deleting`,async()=>n.send(it,{account_id:a,variant_id:e[`variant-id`]}));s(u,{successLabel:`Deleted`})})};var $={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/images/v1/variants/${t.variant_id}`,body:`json`};function st(e){return e.usage(`$0 images variants edit <variant-id>
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 st={command:`delete <variant-id>`,describe:`Delete a variant`,builder:ot,handler:async e=>u({command:`images variants delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images variants delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v1/variants/${e[`variant-id`]==null?`<variant-id>`:encodeURIComponent(String(e[`variant-id`]))}`,pathParams:{"variant-id":String(e[`variant-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await y({force:!!e.force,message:`This operation will delete this variant.`})){process.stderr.write(`Aborted.
65
+ `);return}let u=await l(`Deleting`,async()=>n.send(Q,{account_id:a,variant_id:e[`variant-id`]}));s(u,{successLabel:`Deleted`})})};var $={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/images/v1/variants/${t.variant_id}`,body:`json`};function ct(e){return e.usage(`$0 images variants edit <variant-id>
66
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`]}).coerce(`options-fit`,e=>m(e,`options-fit`,`text`)).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`]}).coerce(`options-metadata`,e=>m(e,`options-metadata`,`text`)).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 ct={command:`edit <variant-id>`,describe:`Update a variant`,builder:st,handler:async e=>u({command:`images variants edit`,classification:{safeFlags:[`never-require-signed-urls`,`options-fit`,`options-metadata`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images variants edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v1/variants/${e[`variant-id`]==null?`<variant-id>`:encodeURIComponent(String(e[`variant-id`]))}`,pathParams:{"variant-id":String(e[`variant-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({neverRequireSignedURLs:e[`never-require-signed-urls`],options:{fit:e[`options-fit`],height:e[`options-height`],metadata:e[`options-metadata`],width:e[`options-width`]}}):d(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=d(e.body),r=await l(`Updating`,async()=>n.send($,{body:t,account_id:a,variant_id:e[`variant-id`]}));s(r,{successLabel:`Updated`});return}if(e[`options-fit`]===void 0&&(e[`options-fit`]=await _(`options-fit`,`The fit property describes how the width and height dimensions should be interpreted.`,[`scale-down`,`contain`,`cover`,`crop`,`pad`])),e[`options-height`]===void 0)throw Error(`--options-height is required (or pass --body with this field set).`);if(e[`options-metadata`]===void 0&&(e[`options-metadata`]=await _(`options-metadata`,`What EXIF data should be preserved in the output image.`,[`keep`,`copyright`,`none`])),e[`options-width`]===void 0)throw Error(`--options-width is required (or pass --body with this field set).`);let u=p({neverRequireSignedURLs:e[`never-require-signed-urls`],options:{fit:e[`options-fit`],height:e[`options-height`],metadata:e[`options-metadata`],width:e[`options-width`]}}),f=await l(`Updating`,async()=>n.send($,{body:u,account_id:a,variant_id:e[`variant-id`]}));s(f,{successLabel:`Updated`})})};var lt={method:`GET`,path:t=>e`/accounts/${t.account_id}/images/v1/variants/${t.variant_id}`};function ut(e){return e.usage(`$0 images variants get <variant-id>
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`]}).coerce(`options-fit`,e=>h(e,`options-fit`,`text`)).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`]}).coerce(`options-metadata`,e=>h(e,`options-metadata`,`text`)).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 lt={command:`edit <variant-id>`,describe:`Update a variant`,builder:ct,handler:async e=>u({command:`images variants edit`,classification:{safeFlags:[`never-require-signed-urls`,`options-fit`,`options-metadata`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images variants edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v1/variants/${e[`variant-id`]==null?`<variant-id>`:encodeURIComponent(String(e[`variant-id`]))}`,pathParams:{"variant-id":String(e[`variant-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({neverRequireSignedURLs:e[`never-require-signed-urls`],options:{fit:e[`options-fit`],height:e[`options-height`],metadata:e[`options-metadata`],width:e[`options-width`]}}):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Updating`,async()=>n.send($,{body:t,account_id:a,variant_id:e[`variant-id`]}));s(r,{successLabel:`Updated`});return}if(e[`options-fit`]===void 0&&(e[`options-fit`]=await v(`options-fit`,`The fit property describes how the width and height dimensions should be interpreted.`,[`scale-down`,`contain`,`cover`,`crop`,`pad`])),e[`options-height`]===void 0)throw Error(`--options-height is required (or pass --body with this field set).`);if(e[`options-metadata`]===void 0&&(e[`options-metadata`]=await v(`options-metadata`,`What EXIF data should be preserved in the output image.`,[`keep`,`copyright`,`none`])),e[`options-width`]===void 0)throw Error(`--options-width is required (or pass --body with this field set).`);let u=m({neverRequireSignedURLs:e[`never-require-signed-urls`],options:{fit:e[`options-fit`],height:e[`options-height`],metadata:e[`options-metadata`],width:e[`options-width`]}}),d=await l(`Updating`,async()=>n.send($,{body:u,account_id:a,variant_id:e[`variant-id`]}));s(d,{successLabel:`Updated`})})};var ut={method:`GET`,path:t=>e`/accounts/${t.account_id}/images/v1/variants/${t.variant_id}`};function dt(e){return e.usage(`$0 images variants get <variant-id>
68
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 dt={command:`get <variant-id>`,describe:`Variant details`,builder:ut,handler:async e=>u({command:`images variants get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images variants get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v1/variants/${e[`variant-id`]==null?`<variant-id>`:encodeURIComponent(String(e[`variant-id`]))}`,pathParams:{"variant-id":String(e[`variant-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(lt,{account_id:a,variant_id:e[`variant-id`]}));s(u,{successLabel:`Loaded`})})};var ft={method:`GET`,path:t=>e`/accounts/${t.account_id}/images/v1/variants`};function pt(e){return e.usage(`$0 images variants list
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 ft={command:`get <variant-id>`,describe:`Variant details`,builder:dt,handler:async e=>u({command:`images variants get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images variants get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v1/variants/${e[`variant-id`]==null?`<variant-id>`:encodeURIComponent(String(e[`variant-id`]))}`,pathParams:{"variant-id":String(e[`variant-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(ut,{account_id:a,variant_id:e[`variant-id`]}));s(u,{successLabel:`Loaded`})})};var pt={method:`GET`,path:t=>e`/accounts/${t.account_id}/images/v1/variants`};function mt(e){return e.usage(`$0 images variants list
70
70
 
71
- List existing CF Images variants.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const mt={command:`list`,describe:`List variants`,builder:pt,handler:async e=>u({command:`images variants list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf images variants list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/images/v1/variants`,pathParams:{},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(ft,{account_id:a}));s(u,{successLabel:`Loaded`})})},ht={command:`variants`,describe:`Manage named resize variants for transforming images on delivery`,builder:e=>e.command(rt).command(ot).command(ct).command(dt).command(mt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},gt={command:`images`,describe:`Store, resize, and deliver optimized images globally — variants, signing keys, and direct uploads`,builder:e=>e.command(te).command(ie).command(S).command(T).command(L).command(P).command($e).command(nt).command(M).command(Be).command(Xe).command(ht).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{gt as default};
71
+ List existing CF Images variants.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ht={command:`list`,describe:`List variants`,builder:mt,handler:async e=>u({command:`images variants list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf images variants list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/images/v1/variants`,pathParams:{},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(pt,{account_id:a}));s(u,{successLabel:`Loaded`})})},gt={command:`variants`,describe:`Manage named resize variants for transforming images on delivery`,builder:e=>e.command(at).command(st).command(lt).command(ft).command(ht).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},_t={command:`images`,describe:`Store, resize, and deliver optimized images globally — variants, signing keys, and direct uploads`,builder:e=>e.command(te).command(ie).command(C).command(E).command(R).command(F).command(et).command(rt).command(N).command(Ve).command(Ze).command(gt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{_t as default};
package/dist/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{n as e,r as t,t as n}from"./src-CutrsNl4.mjs";import{t as r}from"./cli-exit-CstFZ1eJ.mjs";export{r as CliExit,n as buildCli,e as main,t as runMain};
2
+ import{n as e,r as t,t as n}from"./src-BnMvFE3q.mjs";import{t as r}from"./cli-exit-CstFZ1eJ.mjs";export{r as CliExit,n as buildCli,e as main,t as runMain};
@@ -0,0 +1,43 @@
1
+ #!/usr/bin/env node
2
+ import"./src-BnMvFE3q.mjs";import{r as e}from"./theme-BGHWSKCw.mjs";import{t}from"./cli-exit-CstFZ1eJ.mjs";import{R as n,n as r}from"./dist-CnKd5XoR.mjs";import{i,n as a,t as o}from"./autoconfig-Cdm2IFLM.mjs";import{n as s}from"./version-CLgSHoNm.mjs";import{n as c}from"./delegate-Tgfxa-MZ.mjs";import{t as l}from"./project-settings-nBMEx1f-.mjs";import"./ui-CY79jlGZ.mjs";import{n as u}from"./dist-DAeCUX-u.mjs";import{t as d}from"./progress-CdlDthXA.mjs";import{n as f}from"./run-B_07PrkW.mjs";import"./telemetry-Dpm6GfZD.mjs";import{n as p,r as m}from"./dialog-BnIgdgWi.mjs";import{basename as h,dirname as g,isAbsolute as _,join as v,relative as y,resolve as b}from"node:path";import{mkdir as x,readdir as S,stat as C,writeFile as w}from"node:fs/promises";const T={"@cloudflare/vite-plugin":`beta`,typescript:`^7.0.2`,vite:`^8.3.0`};function ee(e){return{".gitignore":M(),"cloudflare.config.ts":D(e),"package.json":A(e),...e.packageManager===`pnpm`?{"pnpm-workspace.yaml":te()}:{},"src/index.ts":k(),"tsconfig.json":j(),"vite.config.ts":O()}}function te(){return`# Approve build scripts needed by the generated Worker's dependencies.
3
+ allowBuilds:
4
+ esbuild: true
5
+ workerd: true
6
+ `}function E(e){return/^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?$/.test(e)?`^${e}`:`latest`}function D(e){return`import { bindings, defineConfig } from "cf/config";
7
+ import * as entrypoint from "./src/index.ts" with { type: "cf-worker" };
8
+
9
+ export default defineConfig({
10
+ worker: {
11
+ name: ${JSON.stringify(e.name)},
12
+ compatibilityDate: ${JSON.stringify(e.compatibilityDate)},
13
+ entrypoint,
14
+ env: {
15
+ WORLD: bindings.text("World"),
16
+ },
17
+ },
18
+ });
19
+ `}function O(){return`import { cloudflare } from "@cloudflare/vite-plugin";
20
+ import { defineConfig } from "vite";
21
+
22
+ export default defineConfig({
23
+ plugins: [cloudflare()],
24
+ });
25
+ `}function k(){return`import { env } from "cloudflare:workers";
26
+
27
+ export default {
28
+ fetch() {
29
+ return new Response(\`Hello \${env.WORLD}!\`);
30
+ },
31
+ } satisfies ExportedHandler;
32
+ `}function A(e){let t={name:e.name,private:!0,type:`module`,scripts:{dev:`cf dev`,build:`cf build`,deploy:`cf deploy`,typecheck:`cf workers types && tsc`},devDependencies:{"@cloudflare/vite-plugin":T[`@cloudflare/vite-plugin`],cf:E(e.cfVersion),typescript:T.typescript,vite:T.vite}};return`${JSON.stringify(t,null,` `)}\n`}function j(){return`${JSON.stringify({compilerOptions:{target:`es2024`,lib:[`es2024`],module:`preserve`,moduleResolution:`bundler`,types:[],strict:!0,noEmit:!0,allowImportingTsExtensions:!0,isolatedModules:!0,verbatimModuleSyntax:!0,skipLibCheck:!0},include:[`src`,`cloudflare.config.ts`,`.cloudflare/types`]},null,` `)}\n`}function M(){return`node_modules/
33
+ dist/
34
+ .cloudflare/
35
+ .wrangler/
36
+ .dev.vars*
37
+ !.dev.vars.example
38
+ .env*
39
+ !.env.example
40
+ *.log
41
+ .DS_Store
42
+ `}const N=[`npm`,`pnpm`,`yarn`,`bun`],P=[`install`,`package-manager`],F=/* @__PURE__ */ new Set([`.git`]);function I(e){return e.positional(`directory`,{type:`string`,describe:`Directory to initialize; created when missing (prompts when omitted; use . for the current directory)`}).option(`install`,{type:`boolean`,default:!0,describe:`Install dependencies after creating a new project (use --no-install to skip)`}).option(`package-manager`,{type:`string`,choices:N,describe:`Package manager for a new project (prompts when interactive)`})}async function L(e){let t=b(e.directory??await R());await H(t)===`not-empty`?await K(t,e):await U(t,e)}async function R(){return(await p(`Which directory do you want to initialize?`,{defaultValue:`.`,placeholder:`. (the current directory)`,fallbackError:`Pass the directory to initialize, for example ${e.code(`cf init my-worker`)}, or ${e.code(`cf init .`)} for the current directory.`})).trim()||`.`}function z(e){return{directory:e.directory,install:e.install??!0,packageManager:V(e.packageManager),mode:e.mode}}function B(e=process.env.npm_config_user_agent){return V(e?.split(`/`,1)[0])}function V(e){return N.find(t=>t===e)}async function H(e){let t;try{t=(await C(e)).isDirectory()}catch(e){if(ne(e)&&e.code===`ENOENT`)return`missing`;throw e}if(!t)throw Error(`Cannot initialize ${Z(e)} because it is not a directory.`);return(await S(e)).every(e=>F.has(e))?`empty`:`not-empty`}async function U(a,o){u.info(`Creating a new Worker in ${e.bold(a)}`,{spacing:0});let c=await G(o),l=n(h(a).toLowerCase().replace(/\s+/g,`-`)).replace(/-+$/,``),d=ee({name:l,compatibilityDate:r,cfVersion:s,packageManager:c});for(let[e,t]of Object.entries(d)){let n=v(a,e);await x(g(n),{recursive:!0}),await w(n,t,{flag:`wx`})}if(u.success(`Created the ${e.bold(l)} Worker in ${Z(a)}`,{spacing:0}),o.install){let n=`${c} install`,r=await i(n,a);if(r.exitCode!==0||r.signal)throw u.error(`Dependency installation failed. Run ${e.code(n)} in ${Z(a)} to try again.`,{spacing:0}),new t(r.exitCode,{signal:r.signal});await W(a,o.mode)}Y(a,[...o.install?[]:[{command:`${c} install`,description:`Install dependencies`}],...J()])}async function W(t,n){try{let{generateWorkerTypes:e}=await import(`./generate-D6V4Q58z.mjs`),r=await d(`Generating types`,()=>e({configPath:v(t,l),mode:n,includeRuntime:!0}));u.success(`Generated types in ${Z(r)}`,{spacing:0})}catch(n){let r=n instanceof Error?n.message:String(n);u.warn(`Could not generate types: ${r}\nRun ${e.code(`${q()} workers types`)} in ${Z(t)} to try again.`,{spacing:0})}}async function G(e){if(e.packageManager)return e.packageManager;let t=B()??`npm`;return e.install?m(`Which package manager do you want to use?`,{choices:N.map(e=>({title:e,value:e})),defaultOption:N.indexOf(t)}):t}async function K(t,n){let r=Z(t);u.info(`Setting up the existing project in ${e.bold(t)}`,{spacing:0}),(!n.install||n.packageManager)&&u.warn(`${e.code(`--no-install`)} and ${e.code(`--package-manager`)} only apply when creating a new project. Setting up an existing project uses its own package manager.`,{spacing:0});let i=process.cwd();process.chdir(t);let s=!1;try{let n=await o(t);if(!n)throw Error(`cf could not detect a project to set up in ${r}, and the directory is not empty.\nRun ${e.code(`cf init`)} in an empty directory, or pass a new directory name (for example, ${e.code(`cf init my-worker`)}).`);s=n.configured,s||await a(n)}finally{process.chdir(i)}s?u.info(`Found an existing Cloudflare configuration in ${r}.`,{spacing:0}):u.success(`Set up ${r} for Cloudflare.`,{spacing:0}),Y(t,J())}function q(){return c()?`npx cf`:`cf`}function J(){let e=q();return[{command:`${e} dev`,description:`Start a local development server`},{command:`${e} deploy`,description:`Deploy to Cloudflare`}]}function Y(t,n){let r=[...X(t).map(e=>({command:e})),...n],i=Math.max(...r.filter(e=>e.description).map(e=>e.command.length)),a=r.map(({command:t,description:n})=>n?` ${e.code(t)}${` `.repeat(i-t.length+2)}${e.muted(n)}`:` ${e.code(t)}`);u.message([e.bold(`Next steps`),...a].join(`
43
+ `),{symbol:e.muted(`├`)})}function X(e){let t=y(process.cwd(),e);if(t===``)return[];let n=Q(t)?e:t;return[`cd ${/\s/.test(n)?JSON.stringify(n):n}`]}function Z(e){let t=y(process.cwd(),e);return t===``?`the current directory`:Q(t)?e:t}function Q(e){return e.startsWith(`..`)||_(e)}function ne(e){return e instanceof Error&&`code`in e}const $={command:`workers [directory]`,describe:`Create a new Workers project or set up an existing one`,builder:I,handler:async e=>{await L(z(e))}},re={command:`init [directory]`,describe:`Create a new Cloudflare project or set up an existing one`,builder:e=>I(e).command(f({...$,describe:`${$.describe} [default]`},{command:`init workers`,classification:{safeFlags:P}})).epilogue(`Running cf init without a subcommand runs cf init workers. An empty directory, or one containing only .git, receives a new hello-world Worker. A directory with other files is set up with autoconfig instead. When no directory is given, cf asks for one; non-interactive runs must pass it. Use ./workers to initialize a directory named workers.`),handler:async e=>{await L(z(e))}};export{re as default};