cf 1.0.0-beta.12 → 1.0.0-beta.13

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 (283) hide show
  1. package/dist/_meta/commands.json +3119 -2067
  2. package/dist/_meta/hand-written-commands.json +14 -1
  3. package/dist/_meta/schemas.json +1856 -1132
  4. package/dist/{abuse-reports-Cy9RcWPu.mjs → abuse-reports-BjU1s8cf.mjs} +10 -10
  5. package/dist/{access-DwJm1qet.mjs → access-C_G2MZnA.mjs} +1 -1
  6. package/dist/account-tags-CaXDDeZ4.mjs +15 -0
  7. package/dist/{accounts-BSd4b-1j.mjs → accounts-BALwxDQY.mjs} +70 -77
  8. package/dist/{acm-BfI0p2sX.mjs → acm-CP9EaXQN.mjs} +1 -1
  9. package/dist/{addressing-lfeJf7YB.mjs → addressing-DRlaxqrI.mjs} +1 -1
  10. package/dist/{agent-memory-CP1qpn-y.mjs → agent-memory-vGhlfZBx.mjs} +1 -1
  11. package/dist/{ai-jFzFBANM.mjs → ai-CJtbWfB9.mjs} +18 -16
  12. package/dist/{ai-audit-B_tSl78A.mjs → ai-audit-C0BJNqZZ.mjs} +1 -1
  13. package/dist/ai-gateway-BQtv3U3x.mjs +80 -0
  14. package/dist/ai-search-DGU1Y5By.mjs +79 -0
  15. package/dist/{ai-security-CKGE547U.mjs → ai-security-CFTaYk_X.mjs} +1 -1
  16. package/dist/{alerting-CuxoqG3S.mjs → alerting-1hun27JC.mjs} +3 -3
  17. package/dist/analytics-DXUSjvzT.mjs +17 -0
  18. package/dist/{analytics_engine-BoapM9wd.mjs → analytics_engine-CQsnL09C.mjs} +1 -1
  19. package/dist/{api-security-Nk_bg-Kg.mjs → api-security-BXhrfR6-.mjs} +4 -4
  20. package/dist/argo-LPUCTnee.mjs +14 -0
  21. package/dist/{artifacts-BS6cEqCB.mjs → artifacts-Dt6easua.mjs} +1 -1
  22. package/dist/{audit-logs-x5tLqeX2.mjs → audit-logs-CVznAM2Z.mjs} +1 -1
  23. package/dist/{auth-AobvBmz4.mjs → auth-CGLsxbc6.mjs} +1 -1
  24. package/dist/auth-CrmVwfpJ.mjs +2 -0
  25. package/dist/{auth-CKotxfap.mjs → auth-eQr-kQCH.mjs} +1 -1
  26. package/dist/{auth-token-CtguMdmF.mjs → auth-token-pNQrX_9O.mjs} +1 -1
  27. package/dist/{autoconfig-PfnbLuEO.mjs → autoconfig-sD7Frryg.mjs} +151 -151
  28. package/dist/{basin-catalog-Ddi-t3q9.mjs → basin-catalog-ZQICw-zF.mjs} +1 -1
  29. package/dist/{billing-CDMc4tvX.mjs → billing-Dy1-dV_B.mjs} +2 -2
  30. package/dist/{bot-management-UrCM3P8K.mjs → bot-management-DTgPwL7O.mjs} +1 -1
  31. package/dist/{botnet-feed-CVwRm42k.mjs → botnet-feed-xb98Cj3Y.mjs} +1 -1
  32. package/dist/{brand-protection-DfNf5REj.mjs → brand-protection-Ck3okE2k.mjs} +1 -1
  33. package/dist/browser-run-DJGJSzFX.mjs +42 -0
  34. package/dist/build-B1L6xrgC.mjs +2 -0
  35. package/dist/{build-BKPVP5ip.mjs → build-HmSXqjGn.mjs} +1 -1
  36. package/dist/{builds-BG5DHqU3.mjs → builds-CYxcZtkG.mjs} +3 -3
  37. package/dist/{cache-C05hHXUp.mjs → cache-D9tSfovH.mjs} +1 -1
  38. package/dist/{certificate-authorities-DyCFmZwR.mjs → certificate-authorities-CpiveTFC.mjs} +1 -1
  39. package/dist/cf-BxsXrVeh.mjs +18 -0
  40. package/dist/chunk-DSGVRFIS-C1_SEtRK.mjs +2 -0
  41. package/dist/{chunk-FT2NMTJB-DQ7s3x7Q.mjs → chunk-NDZDTP46-Bjx_wtJe.mjs} +3 -3
  42. package/dist/{chunk-AUSY7DKT-BJX6Fdc4.mjs → chunk-TAK63GWY-DdMktrgc.mjs} +9 -2
  43. package/dist/{cli-D9qlPB-6.mjs → cli-DeJc9U8z.mjs} +1 -1
  44. package/dist/{client-certificates-B-m8rfM9.mjs → client-certificates-CF6YZyvP.mjs} +1 -1
  45. package/dist/{client-side-security-M4oIUqID.mjs → client-side-security-BLoe9kS5.mjs} +1 -1
  46. package/dist/{cloud-connector-B63Dwn6n.mjs → cloud-connector-DXRUHsjt.mjs} +1 -1
  47. package/dist/cloudflared--1Ws1RJy.mjs +2 -0
  48. package/dist/{cloudforce-one-Dlc1GNFy.mjs → cloudforce-one-CBLxXi6v.mjs} +162 -162
  49. package/dist/{command-BQpXcGKV.mjs → command-83uVfXh9.mjs} +1 -1
  50. package/dist/{command-BWlpCtHe.mjs → command-BDe67N_n.mjs} +1 -1
  51. package/dist/{command-CXxh5Hce.mjs → command-BlIb6RR2.mjs} +1 -1
  52. package/dist/{command-ZBQ1WITj.mjs → command-Bpzp8Mz2.mjs} +1 -1
  53. package/dist/{command-CKQlxypn.mjs → command-BvfKhMl7.mjs} +1 -1
  54. package/dist/command-CG6RvZs0.mjs +2 -0
  55. package/dist/{command-CRl00uA2.mjs → command-CcuLC6CJ.mjs} +1 -1
  56. package/dist/{command-CUkXxZsc.mjs → command-Cu7dcaHT.mjs} +1 -1
  57. package/dist/{command-SS1z_t68.mjs → command-D3fyhdy-.mjs} +1 -1
  58. package/dist/{command-DyE8v4sd.mjs → command-DUhX8Dcr.mjs} +1 -1
  59. package/dist/{command-VuxpEvmH.mjs → command-Dh7RmjFu.mjs} +1 -1
  60. package/dist/{command-DEQSv-S1.mjs → command-DwXiDOeH.mjs} +1 -1
  61. package/dist/{command-BlGILcTA.mjs → command-UiHLJ8Ji.mjs} +1 -1
  62. package/dist/{command-Rv2MR-eh.mjs → command-_rqD0hXF.mjs} +1 -1
  63. package/dist/{command-DBaNgfA4.mjs → command-oNVwyjGB.mjs} +1 -1
  64. package/dist/{completions-lf50FBGm.mjs → completions-D06AO7A8.mjs} +11 -11
  65. package/dist/{connector-interrupts-DHN1KtUE.mjs → connector-interrupts-DelTmNyw.mjs} +1 -1
  66. package/dist/{connector-telemetry-events-CHg7FmXh.mjs → connector-telemetry-events-BwxR3G8d.mjs} +1 -1
  67. package/dist/{connector-telemetry-snapshots-CSifYi9r.mjs → connector-telemetry-snapshots-Bqq-hrpJ.mjs} +1 -1
  68. package/dist/{connectors-0UwPUav-.mjs → connectors-D-m3rEpk.mjs} +1 -1
  69. package/dist/{containers-DuIsM7lM.mjs → containers-CVNfEjJs.mjs} +3 -3
  70. package/dist/{containers-DRzgE46U.mjs → containers-DeoZyeQe.mjs} +25 -25
  71. package/dist/{content-scan-COyTz0Wb.mjs → content-scan-W0BNzbQp.mjs} +1 -1
  72. package/dist/{context-Bwkz4Lm_.mjs → context-q7UaYK69.mjs} +2 -2
  73. package/dist/{cps-B7_BJaAU.mjs → cps-BZ6hqRb5.mjs} +1 -1
  74. package/dist/{csamScanner-jez2EYXC.mjs → csamScanner-Bo1t3CLh.mjs} +1 -1
  75. package/dist/{ct-alerting-CACDrY0E.mjs → ct-alerting-E03faC7p.mjs} +1 -1
  76. package/dist/{custom-certificates-BBd92YlF.mjs → custom-certificates-CUySSPzi.mjs} +3 -3
  77. package/dist/{custom-csrs-DTwBiNMX.mjs → custom-csrs-gNpWkJPQ.mjs} +1 -1
  78. package/dist/{custom-hostnames-DIWlqvN9.mjs → custom-hostnames-abGBAbx7.mjs} +4 -4
  79. package/dist/{custom-nameservers-DISy8v8u.mjs → custom-nameservers-BgNXol1P.mjs} +1 -1
  80. package/dist/{custom-pages-BHXO_NFv.mjs → custom-pages-DMKX3aoD.mjs} +1 -1
  81. package/dist/{d1-MvAQMvvo.mjs → d1-CE08YqYk.mjs} +26 -22
  82. package/dist/{dcv-delegation-Buq0hcm_.mjs → dcv-delegation-B5YUEWu0.mjs} +1 -1
  83. package/dist/deploy-CWNm1-5v.mjs +2 -0
  84. package/dist/deploy-context-Dr6bxNcB.mjs +56 -0
  85. package/dist/deploy-input-Cc0_2QlW.mjs +2 -0
  86. package/dist/{dev-D8FGPKRt.mjs → dev-ZA8itQE7.mjs} +1 -1
  87. package/dist/{diagnostics-ChDfJ-Gv.mjs → diagnostics-UMbG6m4n.mjs} +1 -1
  88. package/dist/dialog-D4Y9ocuF.mjs +2 -0
  89. package/dist/{dist-CYFkGHYv.mjs → dist-BHEmAAHr.mjs} +4 -4
  90. package/dist/dist-uRuGmkMB.mjs +60 -0
  91. package/dist/{dls-8D00tqvC.mjs → dls-DIl16mLp.mjs} +1 -1
  92. package/dist/{dns-C-A5pwf3.mjs → dns-QUpgljRG.mjs} +5 -5
  93. package/dist/{dns-firewall-DIiF4pro.mjs → dns-firewall-BZwJXHLj.mjs} +1 -1
  94. package/dist/dry-run-DRj2_uV3.mjs +2 -0
  95. package/dist/{durable-objects-CnIqbj84.mjs → durable-objects-BCj4ykpU.mjs} +1 -1
  96. package/dist/{email-auth-v97Md32E.mjs → email-auth-DlHIYhCk.mjs} +1 -1
  97. package/dist/{email-routing-I29RG4hb.mjs → email-routing-UKVS4DYy.mjs} +1 -1
  98. package/dist/{email-security-BCarmbky.mjs → email-security-CZjfRIg0.mjs} +8 -8
  99. package/dist/{email-sending-CsHk2HAJ.mjs → email-sending-Dquc880C.mjs} +1 -1
  100. package/dist/{error-sanitization-BWnGnB73.mjs → error-sanitization-DE_zSrXw.mjs} +1 -1
  101. package/dist/error-sanitization-DOCQ9Ykh.mjs +2 -0
  102. package/dist/{fieldExtractors-GIVe9jZa.mjs → fieldExtractors-BbwDRquU.mjs} +1 -1
  103. package/dist/{firewall-DpgFqJr3.mjs → firewall--mTfDnCJ.mjs} +3 -3
  104. package/dist/{flagship-BVaXXlsX.mjs → flagship-cfoSwwM9.mjs} +1 -1
  105. package/dist/{fraud-B5GQdEF2.mjs → fraud-Dcsq3EYK.mjs} +1 -1
  106. package/dist/{google-tag-gateway-C4O61lp-.mjs → google-tag-gateway-DPKSkZQi.mjs} +1 -1
  107. package/dist/{healthchecks-BwYMnKSF.mjs → healthchecks-D78hIIBC.mjs} +1 -1
  108. package/dist/{hostnames-DhrGRFeI.mjs → hostnames-sF999-6H.mjs} +1 -1
  109. package/dist/{hyperdrive-DAA8Fazg.mjs → hyperdrive-qWACKfA4.mjs} +2 -2
  110. package/dist/{iam-sRKDU2Z3.mjs → iam-Bvg_PayW.mjs} +1 -1
  111. package/dist/{images-DXdekLVs.mjs → images-DI_lEZ4L.mjs} +1 -1
  112. package/dist/index.mjs +1 -1
  113. package/dist/init-1w_mcgk3.mjs +43 -0
  114. package/dist/{intel-CnVeSjIS.mjs → intel-BxElBUMP.mjs} +1 -1
  115. package/dist/interactive-BW9T1D1q.mjs +48 -0
  116. package/dist/interactive-DGUWZ2Gk.mjs +2 -0
  117. package/dist/{ips-COCUG8mk.mjs → ips-DWoaKxi7.mjs} +1 -1
  118. package/dist/k2-tFjaftl-.mjs +11 -0
  119. package/dist/{keyless-certificates-l2_S__h3.mjs → keyless-certificates-BrvxHU4J.mjs} +1 -1
  120. package/dist/{keys-CDZreums.mjs → keys-DcwTYKRf.mjs} +1 -1
  121. package/dist/{kv-DkpKVimq.mjs → kv-htXS-7uP.mjs} +2 -2
  122. package/dist/{lazy-command-_vZGz6mv.mjs → lazy-command-BDiIwpss.mjs} +1 -1
  123. package/dist/{leaked-credential-checks-edbapECI.mjs → leaked-credential-checks-bvGrLOmQ.mjs} +1 -1
  124. package/dist/{load-balancers-C5YMvhXD.mjs → load-balancers-BNTUt4yG.mjs} +1 -1
  125. package/dist/local-DlDumOSC.mjs +2 -0
  126. package/dist/{local-C0lQ9sTg.mjs → local-DlT72Xpn.mjs} +1 -1
  127. package/dist/{local-runtime-DtnWXN0a.mjs → local-runtime-CokO6qaX.mjs} +1 -1
  128. package/dist/{login-BrjOuHKu.mjs → login-BGF_I_LT.mjs} +1 -1
  129. package/dist/{login-DeOM4v0L.mjs → login-Ccw-mYwT.mjs} +1 -1
  130. package/dist/{logo-matches-CF8321pb.mjs → logo-matches-tE8LTKgg.mjs} +1 -1
  131. package/dist/{logos-Bd8xNRKW.mjs → logos-Bj845Mcw.mjs} +1 -1
  132. package/dist/{logpush-BYk3qqwY.mjs → logpush-Cs8JdvKi.mjs} +7 -7
  133. package/dist/{logs-Jcj2NN8H.mjs → logs-C92XZvNu.mjs} +1 -1
  134. package/dist/{magic-cloud-networking-Dgdb9H0f.mjs → magic-cloud-networking-hNp5MMw-.mjs} +1 -1
  135. package/dist/{magic-network-monitoring-CxVU4MZB.mjs → magic-network-monitoring-68GuWAnv.mjs} +1 -1
  136. package/dist/{magic-transit-KDyfUgTv.mjs → magic-transit-DNd7gu4j.mjs} +6 -6
  137. package/dist/{managed-defense-CxaDeNUd.mjs → managed-defense-B_wCAuFD.mjs} +1 -1
  138. package/dist/{managed-transforms-C7rT5E-x.mjs → managed-transforms-DZdxHPOh.mjs} +1 -1
  139. package/dist/{matches-BtKqG8T9.mjs → matches-B65CkflD.mjs} +1 -1
  140. package/dist/{mcp-QDd1Iyc0.mjs → mcp-DrJW5ayK.mjs} +4 -4
  141. package/dist/mesh-DfVzYTn1.mjs +26 -0
  142. package/dist/{migrate-DHlfR_gZ.mjs → migrate-CZNq63Uj.mjs} +1 -1
  143. package/dist/{monetization-pLalYYMI.mjs → monetization-BGaI8CMO.mjs} +1 -1
  144. package/dist/{mtls-certificates-DYA9Wu-c.mjs → mtls-certificates-BsU2emDD.mjs} +2 -2
  145. package/dist/{network-DrJxPWXQ.mjs → network-BEMD8P0U.mjs} +1 -1
  146. package/dist/{network-interconnects-D73MlYG8.mjs → network-interconnects-DMu_fcbo.mjs} +2 -7
  147. package/dist/o11y-C1a4gDGF.mjs +93 -0
  148. package/dist/{oauth-B08YQ4xq.mjs → oauth-Bj5Ne1o8.mjs} +1 -1
  149. package/dist/{oauth-clients-CkPDLFd-.mjs → oauth-clients-p4Etdqy_.mjs} +1 -1
  150. package/dist/{oauth-TGbM1Q0V.mjs → oauth-mspHHU5U.mjs} +1 -1
  151. package/dist/{oauth-scopes-VgliqcQe.mjs → oauth-scopes-B2IabFza.mjs} +1 -1
  152. package/dist/{organization-DIwqRBBV.mjs → organization-CdXt7AVZ.mjs} +1 -1
  153. package/dist/{organizations-Dk0D9ukm.mjs → organizations-5S6xEp7T.mjs} +1 -1
  154. package/dist/{origin-ca-certificates-BSFqMTn-.mjs → origin-ca-certificates-_VJAoK1D.mjs} +1 -1
  155. package/dist/{origin-post-quantum-encryption-BOKWKDTY.mjs → origin-post-quantum-encryption-GcldDsT2.mjs} +1 -1
  156. package/dist/{origin-tls-client-auth-BzE3WpcN.mjs → origin-tls-client-auth-DZHld9fA.mjs} +3 -3
  157. package/dist/{output-BGqhvqe2.mjs → output-BOe-3AQG.mjs} +1 -1
  158. package/dist/{page-rules-BKaU37cM.mjs → page-rules-o1tAMMsD.mjs} +1 -1
  159. package/dist/{pages-2Xg-lrMf.mjs → pages-CmiOhjSl.mjs} +4 -4
  160. package/dist/pay-per-crawl-BsnOxGYU.mjs +38 -0
  161. package/dist/pay-per-use-BXWMCSyE.mjs +33 -0
  162. package/dist/{pipelines-BM-T7mMK.mjs → pipelines-DWLQC0F6.mjs} +2 -2
  163. package/dist/{precursor-DmQ32-Sp.mjs → precursor-B6DjBib6.mjs} +1 -1
  164. package/dist/{previews-DDQ9ACDJ.mjs → previews-dUKEBGSM.mjs} +1 -1
  165. package/dist/process-2wmDCy17.mjs +2 -0
  166. package/dist/{progress-BYVZuEcG.mjs → progress-BtkTVcHI.mjs} +1 -1
  167. package/dist/prompt-RlgRrmbm.mjs +3 -0
  168. package/dist/{queries-DPBkVynK.mjs → queries-yLwoJRHV.mjs} +1 -1
  169. package/dist/{queues-CCXRs98q.mjs → queues-CnJRaE1o.mjs} +1 -1
  170. package/dist/{r2-BKuBSW8h.mjs → r2-CuC6-zQX.mjs} +48 -45
  171. package/dist/{radar-Gv1yFoRX.mjs → radar-DrQLcbkq.mjs} +1 -1
  172. package/dist/{raw-fetch-DyYWa923.mjs → raw-fetch-B4NvWuZD.mjs} +1 -1
  173. package/dist/{realtime-CVl-rvgx.mjs → realtime-CjsnzHxD.mjs} +1 -1
  174. package/dist/{registrar-swlnh22i.mjs → registrar-BgOsxTnX.mjs} +1 -1
  175. package/dist/{registrar-sandbox-cmOYDnkp.mjs → registrar-sandbox-3ikBD9fB.mjs} +1 -1
  176. package/dist/{registry-C20J1MW0.mjs → registry-CHowrQsZ.mjs} +1 -1
  177. package/dist/{reporting-Bgwsvol1.mjs → reporting-hE127s5r.mjs} +1 -1
  178. package/dist/{request-headers-CUee83pa.mjs → request-headers-DiJeDAn1.mjs} +1 -1
  179. package/dist/{request-tracers-BBiJvVDz.mjs → request-tracers-BCwLxmPN.mjs} +1 -1
  180. package/dist/{resolve-DvxgnWjL.mjs → resolve-CaTBV-c6.mjs} +1 -1
  181. package/dist/resolve-DCGSzUDQ.mjs +2 -0
  182. package/dist/{resource-sharing-C1JiYLbl.mjs → resource-sharing-2qvWUuMa.mjs} +11 -11
  183. package/dist/{resource-tagging-C9VOSlDR.mjs → resource-tagging-Dwx7iL3v.mjs} +1 -1
  184. package/dist/{rules-BDunCGMj.mjs → rules-DxVQ6jIg.mjs} +1 -1
  185. package/dist/rulesets-Cdh8YjI9.mjs +37 -0
  186. package/dist/{rum-B7XiECe9.mjs → rum-a4CMq4Qu.mjs} +1 -1
  187. package/dist/{run-CrZgB8L_.mjs → run-BvHwWWUX.mjs} +1 -1
  188. package/dist/run-CkbrPJPx.mjs +2 -0
  189. package/dist/{schema-DC0kdqgV.mjs → schema-elj12WOx.mjs} +1 -1
  190. package/dist/{schema-flags-BUZR9SLd.mjs → schema-flags-BzoBGPWk.mjs} +1 -1
  191. package/dist/{scim-CORcs2wK.mjs → scim-B8XlXl8v.mjs} +1 -1
  192. package/dist/{secrets-store-BoZQaFey.mjs → secrets-store-Cqhedh_i.mjs} +2 -2
  193. package/dist/{security-insights-DblK_6sg.mjs → security-insights-le2-DteL.mjs} +1 -1
  194. package/dist/{security-txt-Dl7RPnRb.mjs → security-txt-cCArWXur.mjs} +1 -1
  195. package/dist/{session-BWe9et4K.mjs → session-C1BhT1ZJ.mjs} +1 -1
  196. package/dist/shared-BPjcpXuA.mjs +2 -0
  197. package/dist/{smart-shield-DX0-8ruu.mjs → smart-shield-Csyh8hwB.mjs} +1 -1
  198. package/dist/{snippets-BFN-Lg3K.mjs → snippets-DUWx25q6.mjs} +1 -1
  199. package/dist/spawn-IysxuTNW.mjs +10 -0
  200. package/dist/{spectrum-HYWLWB0X.mjs → spectrum-Da3UYSOR.mjs} +1 -1
  201. package/dist/{speed-Dj0YhfRe.mjs → speed-NxlMnB2e.mjs} +1 -1
  202. package/dist/sql-CNdHAlQ8.mjs +4 -0
  203. package/dist/src-JfLDUxFr.mjs +125 -0
  204. package/dist/{ssl-BQL1fNtD.mjs → ssl-BtaX2WEJ.mjs} +1 -1
  205. package/dist/startup-profile-B2l0ChVu.mjs +2 -0
  206. package/dist/{startup-profile-0X5ebbng.mjs → startup-profile-CdJWgNjd.mjs} +1 -1
  207. package/dist/{state-Dy6-rKNd.mjs → state-BDSvdSdP.mjs} +1 -1
  208. package/dist/state-JB4_BU1o.mjs +2 -0
  209. package/dist/{stream-DKv2TtZN.mjs → stream-C1Ijjzn4.mjs} +3 -3
  210. package/dist/{submit-Byt2KBGI.mjs → submit-MdkuU_Pt.mjs} +1 -1
  211. package/dist/{tags-BIBsdG68.mjs → tags-CA1xMM96.mjs} +1 -1
  212. package/dist/telemetry-BsYO3nxG.mjs +2 -0
  213. package/dist/{telemetry-bu3txnIR.mjs → telemetry-Cm39QJ-M.mjs} +1 -1
  214. package/dist/{tenant-Bs4Ac4n3.mjs → tenant-BB6Oszcl.mjs} +1 -1
  215. package/dist/{tenant-custom-nameservers-DcaELeCE.mjs → tenant-custom-nameservers-BsbgYAEo.mjs} +1 -1
  216. package/dist/{tools-BbTX7rlM.mjs → tools-CSc5DmFi.mjs} +1 -1
  217. package/dist/{tunnels-DWcrz9Sf.mjs → tunnels-CRFtyHWz.mjs} +4 -4
  218. package/dist/{turnstile-2MIGp2ce.mjs → turnstile-DBXWo_Xe.mjs} +1 -1
  219. package/dist/update-check-C2oVEbXx.mjs +2 -0
  220. package/dist/{update-check-CfB0PNTY.mjs → update-check-CMXSdres.mjs} +1 -1
  221. package/dist/update-check-worker.mjs +1 -1
  222. package/dist/{url-info-B8udoxlx.mjs → url-info-t-XAs0Mk.mjs} +1 -1
  223. package/dist/{url-normalization-C6AdWtaE.mjs → url-normalization-Cs4F8e0a.mjs} +1 -1
  224. package/dist/{url-scanner-Dg0c_yVb.mjs → url-scanner-CBIoDbTx.mjs} +1 -1
  225. package/dist/{user-BLZ-0Bgv.mjs → user-CevdOMoa.mjs} +3 -3
  226. package/dist/values-CjNlkbIh.mjs +4 -0
  227. package/dist/{vectorize-DEUSEQXY.mjs → vectorize-9d9tPmg5.mjs} +1 -1
  228. package/dist/version-BdVUXLnK.mjs +2 -0
  229. package/dist/{waiting-rooms-BycGk2Y0.mjs → waiting-rooms--5WmrWb3.mjs} +1 -1
  230. package/dist/{web-assets-CLZdWOmN.mjs → web-assets-BHot_MU8.mjs} +1 -1
  231. package/dist/{web3-DjeavuLg.mjs → web3-CYfWAF6b.mjs} +1 -1
  232. package/dist/{workers-C_SfyU-v.mjs → workers-S17M0n3h.mjs} +23 -21
  233. package/dist/{workers-builds-COn5Ne5G.mjs → workers-builds-Dw7ho3So.mjs} +2 -2
  234. package/dist/{workers-for-platforms-tchCXwNF.mjs → workers-for-platforms-A3yjyLh3.mjs} +4 -6
  235. package/dist/{workers-vpc-CKts8Av0.mjs → workers-vpc-BZ2xXtC3.mjs} +1 -1
  236. package/dist/{workflows-BibtWuOx.mjs → workflows-BgGrVpSR.mjs} +1 -1
  237. package/dist/{wrangler-migration-BpJqCFAa.mjs → wrangler-migration-C6FKHER1.mjs} +1 -1
  238. package/dist/{zaraz-BvQZB0YY.mjs → zaraz-BsD2dMI3.mjs} +1 -1
  239. package/dist/{zero-trust-FStq4uhn.mjs → zero-trust-CA3iGQbG.mjs} +413 -397
  240. package/dist/{zone-tymlghWb.mjs → zone-D2M4EZD0.mjs} +1 -1
  241. package/dist/{zones-Bz6dgT9_.mjs → zones-BoOC_JzC.mjs} +1 -1
  242. package/package.json +25 -26
  243. package/dist/account-tags-d0RkEw6s.mjs +0 -15
  244. package/dist/ai-gateway-CJaUlfGc.mjs +0 -82
  245. package/dist/ai-search-PTlpY1T9.mjs +0 -79
  246. package/dist/analytics-NPND7aHB.mjs +0 -20
  247. package/dist/argo-DYfLQhd2.mjs +0 -10
  248. package/dist/auth-CBtzZ3Sw.mjs +0 -2
  249. package/dist/browser-run-DVaiBLYX.mjs +0 -46
  250. package/dist/build-C4giET85.mjs +0 -2
  251. package/dist/cf-B9aqZZKD.mjs +0 -18
  252. package/dist/chunk-KKDV4JPS-D3kwd1Nq.mjs +0 -2
  253. package/dist/cloudflared-B48cfu95.mjs +0 -2
  254. package/dist/command-CzvlHvov.mjs +0 -2
  255. package/dist/deploy-BS47vZvJ.mjs +0 -2
  256. package/dist/deploy-context-Cfushp8j.mjs +0 -56
  257. package/dist/deploy-input-BAhS5LYx.mjs +0 -2
  258. package/dist/dialog-CL1Zy4pn.mjs +0 -2
  259. package/dist/dist-8rP3V95o.mjs +0 -57
  260. package/dist/dry-run-DmsbOMF1.mjs +0 -2
  261. package/dist/error-sanitization-C_a2LxOK.mjs +0 -2
  262. package/dist/init-j47MT4Qe.mjs +0 -39
  263. package/dist/interactive-Dqv0RWVU.mjs +0 -42
  264. package/dist/interactive-Wpd3FcDc.mjs +0 -2
  265. package/dist/k2-CmHkArHL.mjs +0 -13
  266. package/dist/local-D5L5Bwju.mjs +0 -2
  267. package/dist/mesh-DtrIzl5z.mjs +0 -26
  268. package/dist/observability-CvN9oxAo.mjs +0 -80
  269. package/dist/pay-per-crawl-5-KTQXRr.mjs +0 -65
  270. package/dist/pay-per-use-sGebKzNK.mjs +0 -6
  271. package/dist/prompt-F5wxc8zq.mjs +0 -3
  272. package/dist/resolve-qwL1LmKN.mjs +0 -2
  273. package/dist/rulesets-BMGxrnv9.mjs +0 -37
  274. package/dist/run-nNxXb_Cv.mjs +0 -2
  275. package/dist/shared-0N31BXkY.mjs +0 -2
  276. package/dist/spawn-DZ9A-xXb.mjs +0 -10
  277. package/dist/src-CAiZlihY.mjs +0 -117
  278. package/dist/startup-profile-CXnsF4c7.mjs +0 -2
  279. package/dist/state-BA2CanJ_.mjs +0 -2
  280. package/dist/telemetry-DBXOMuLh.mjs +0 -2
  281. package/dist/update-check-B-CvDAUz.mjs +0 -2
  282. package/dist/values-BUK-m0Jg.mjs +0 -4
  283. package/dist/version-BZNc7Y3t.mjs +0 -2
@@ -1,13 +1,13 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-C0lQ9sTg.mjs";import{i as t,n}from"./auth-AobvBmz4.mjs";import{a as r,t as i}from"./context-Bwkz4Lm_.mjs";import{t as a}from"./output-BGqhvqe2.mjs";import{t as o}from"./dry-run-DmsbOMF1.mjs";import{t as s}from"./progress-BYVZuEcG.mjs";import{t as c}from"./run-CrZgB8L_.mjs";import"./telemetry-DBXOMuLh.mjs";import{i as l,n as u,r as d,t as f}from"./body-parser-DkHKPkJ7.mjs";import{n as p,t as m}from"./input-validation-D7z60HJH.mjs";import{a as h,i as g,n as _}from"./prompt-F5wxc8zq.mjs";import{n as v,t as ee}from"./raw-fetch-DyYWa923.mjs";function te(e){return e.usage(`$0 r2 buckets cors delete <bucket-name>
2
+ import{t as e}from"./local-DlT72Xpn.mjs";import{i as t,n}from"./auth-CGLsxbc6.mjs";import{a as r,t as i}from"./context-q7UaYK69.mjs";import{t as a}from"./output-BOe-3AQG.mjs";import{t as o}from"./dry-run-DRj2_uV3.mjs";import{t as s}from"./progress-BtkTVcHI.mjs";import{t as c}from"./run-BvHwWWUX.mjs";import"./telemetry-BsYO3nxG.mjs";import{i as l,n as u,r as d,t as f}from"./body-parser-DkHKPkJ7.mjs";import{n as p,t as m}from"./input-validation-D7z60HJH.mjs";import{a as h,i as g,n as _}from"./prompt-RlgRrmbm.mjs";import{n as v,t as y}from"./raw-fetch-B4NvWuZD.mjs";function b(e){return e.usage(`$0 r2 buckets cors delete <bucket-name>
3
3
 
4
- Delete the CORS policy for a bucket.`).positional(`bucket-name`,{type:`string`,description:`Name of the bucket.`,demandOption:!0}).option(`cf-r2-jurisdiction`,{type:`string`,description:`Jurisdiction where objects in this bucket are guaranteed to be stored.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const y={command:`delete <bucket-name>`,describe:`Delete Bucket CORS Policy`,builder:te,handler:async l=>c({command:`r2 buckets cors delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},l,async()=>{let c={};if(l[`cf-r2-jurisdiction`]!==void 0&&(c[`cf-r2-jurisdiction`]=String(l[`cf-r2-jurisdiction`])),l.dryRun){let e=await r();o({command:`cf r2 buckets cors delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/r2/buckets/${l[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(l[`bucket-name`]))}/cors`,pathParams:{"bucket-name":String(l[`bucket-name`]??``)},bodyKind:`none`});return}let u=await n(l),d=l.local?e:await i();if(l.accountId=d,!await _({force:!!l.force,message:`This removes the R2 bucket's CORS policy. Browser requests that depend on these cross-origin permissions may fail.`})){process.stderr.write(`Aborted.
5
- `);return}let f=await s(`Deleting`,async()=>t(u,`DELETE`,`/accounts/${d}/r2/buckets/${encodeURIComponent(String(l[`bucket-name`]))}/cors`,{headers:Object.keys(c).length>0?c:void 0}));a(f,{successLabel:`Deleted`})})};function b(e){return e.usage(`$0 r2 buckets cors get <bucket-name>
4
+ Delete the CORS policy for a bucket.`).positional(`bucket-name`,{type:`string`,description:`Name of the bucket.`,demandOption:!0}).option(`cf-r2-jurisdiction`,{type:`string`,description:`Jurisdiction where objects in this bucket are guaranteed to be stored.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ee={command:`delete <bucket-name>`,describe:`Delete Bucket CORS Policy`,builder:b,handler:async l=>c({command:`r2 buckets cors delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},l,async()=>{let c={};if(l[`cf-r2-jurisdiction`]!==void 0&&(c[`cf-r2-jurisdiction`]=String(l[`cf-r2-jurisdiction`])),l.dryRun){let e=await r();o({command:`cf r2 buckets cors delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/r2/buckets/${l[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(l[`bucket-name`]))}/cors`,pathParams:{"bucket-name":String(l[`bucket-name`]??``)},bodyKind:`none`});return}let u=await n(l),d=l.local?e:await i();if(l.accountId=d,!await _({force:!!l.force,message:`This removes the R2 bucket's CORS policy. Browser requests that depend on these cross-origin permissions may fail.`})){process.stderr.write(`Aborted.
5
+ `);return}let f=await s(`Deleting`,async()=>t(u,`DELETE`,`/accounts/${d}/r2/buckets/${encodeURIComponent(String(l[`bucket-name`]))}/cors`,{headers:Object.keys(c).length>0?c:void 0}));a(f,{successLabel:`Deleted`})})};function te(e){return e.usage(`$0 r2 buckets cors get <bucket-name>
6
6
 
7
- Get the CORS policy for a bucket.`).positional(`bucket-name`,{type:`string`,description:`Name of the bucket.`,demandOption:!0}).option(`cf-r2-jurisdiction`,{type:`string`,description:`Jurisdiction where objects in this bucket are guaranteed to be stored.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const x={command:`get <bucket-name>`,describe:`Get Bucket CORS Policy`,builder:b,handler:async l=>c({command:`r2 buckets cors get`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={};if(l[`cf-r2-jurisdiction`]!==void 0&&(c[`cf-r2-jurisdiction`]=String(l[`cf-r2-jurisdiction`])),l.dryRun){let e=await r();o({command:`cf r2 buckets cors get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/r2/buckets/${l[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(l[`bucket-name`]))}/cors`,pathParams:{"bucket-name":String(l[`bucket-name`]??``)},bodyKind:`none`});return}let u=await n(l),d=l.local?e:await i();l.accountId=d;let f=await s(`Loading`,async()=>t(u,`GET`,`/accounts/${d}/r2/buckets/${encodeURIComponent(String(l[`bucket-name`]))}/cors`,{headers:Object.keys(c).length>0?c:void 0}));a(f,{successLabel:`Loaded`})})};function S(e){return e.usage(`$0 r2 buckets cors update <bucket-name>
7
+ Get the CORS policy for a bucket.`).positional(`bucket-name`,{type:`string`,description:`Name of the bucket.`,demandOption:!0}).option(`cf-r2-jurisdiction`,{type:`string`,description:`Jurisdiction where objects in this bucket are guaranteed to be stored.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const x={command:`get <bucket-name>`,describe:`Get Bucket CORS Policy`,builder:te,handler:async l=>c({command:`r2 buckets cors get`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={};if(l[`cf-r2-jurisdiction`]!==void 0&&(c[`cf-r2-jurisdiction`]=String(l[`cf-r2-jurisdiction`])),l.dryRun){let e=await r();o({command:`cf r2 buckets cors get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/r2/buckets/${l[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(l[`bucket-name`]))}/cors`,pathParams:{"bucket-name":String(l[`bucket-name`]??``)},bodyKind:`none`});return}let u=await n(l),d=l.local?e:await i();l.accountId=d;let f=await s(`Loading`,async()=>t(u,`GET`,`/accounts/${d}/r2/buckets/${encodeURIComponent(String(l[`bucket-name`]))}/cors`,{headers:Object.keys(c).length>0?c:void 0}));a(f,{successLabel:`Loaded`})})};function S(e){return e.usage(`$0 r2 buckets cors update <bucket-name>
8
8
 
9
9
  Replaces the Cross-Origin Resource Sharing (CORS) rules for an R2 bucket. Rules specify which origins, methods, and headers are allowed for browser requests to objects in the bucket.`).positional(`bucket-name`,{type:`string`,description:`Name of the bucket.`,demandOption:!0}).option(`cf-r2-jurisdiction`,{type:`string`,description:`Jurisdiction where objects in this bucket are guaranteed to be stored.`}).option(`rules`,{type:`string`,description:`The rules field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const C={command:`update <bucket-name>`,describe:`Set Bucket CORS Policy`,builder:S,handler:async p=>c({command:`r2 buckets cors update`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},p,async()=>{let c={};if(p[`cf-r2-jurisdiction`]!==void 0&&(c[`cf-r2-jurisdiction`]=String(p[`cf-r2-jurisdiction`])),p.dryRun){let e=await r();o({command:`cf r2 buckets cors update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/r2/buckets/${p[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(p[`bucket-name`]))}/cors`,pathParams:{"bucket-name":String(p[`bucket-name`]??``)},bodyKind:`json`,body:p.body===void 0?f({rules:d(p.rules,`rules`)}):u(p.body)});return}let m=await n(p),h=p.local?e:await i();if(p.accountId=h,!await _({force:!!p.force,message:`This replaces the R2 bucket's CORS policy. Browser requests that relied on the previous rules may fail.`})){process.stderr.write(`Aborted.
10
- `);return}if(p.body){let e=u(p.body),n=await s(`Deleting`,async()=>t(m,`PUT`,`/accounts/${h}/r2/buckets/${encodeURIComponent(String(p[`bucket-name`]))}/cors`,{body:e,headers:Object.keys(c).length>0?c:void 0}));a(n,{successLabel:`Deleted`});return}let g={};p.rules!==void 0&&l(g,[`rules`],d(p.rules,`rules`));let v=await s(`Deleting`,async()=>t(m,`PUT`,`/accounts/${h}/r2/buckets/${encodeURIComponent(String(p[`bucket-name`]))}/cors`,{body:Object.keys(g).length>0?g:void 0,headers:Object.keys(c).length>0?c:void 0}));a(v,{successLabel:`Deleted`})})},w={command:`cors`,describe:`Operations for buckets.cors`,builder:e=>e.command(y).command(x).command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function T(e){return e.usage("$0 r2 buckets create-by-name <bucket-name>\n\nCreates a new R2 bucket using the name from the URL path. Similar to `r2-create-bucket` (POST), but the bucket name comes from the path and the optional storage class is supplied via the `cf-r2-storage-class` header. There is no request body. Unlike the POST variant, this endpoint does not accept a location hint — the bucket is placed in the R2 region for the caller's edge colo. Use the POST variant if you need to set a `locationHint`.").positional(`bucket-name`,{type:`string`,description:`Name of the bucket.`,demandOption:!0}).option(`cf-r2-jurisdiction`,{type:`string`,description:`Jurisdiction where objects in this bucket are guaranteed to be stored.`}).option(`cf-r2-storage-class`,{type:`string`,description:`Storage class for newly uploaded objects, unless specified otherwise.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`create-by-name <bucket-name>`,describe:`Create Bucket (by name)`,builder:T,handler:async l=>c({command:`r2 buckets create-by-name`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={};if(l[`cf-r2-jurisdiction`]!==void 0&&(c[`cf-r2-jurisdiction`]=String(l[`cf-r2-jurisdiction`])),l[`cf-r2-storage-class`]!==void 0&&(c[`cf-r2-storage-class`]=String(l[`cf-r2-storage-class`])),l.dryRun){let e=await r();o({command:`cf r2 buckets create-by-name`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/r2/buckets/${l[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(l[`bucket-name`]))}`,pathParams:{"bucket-name":String(l[`bucket-name`]??``)},bodyKind:`none`});return}let u=await n(l),d=l.local?e:await i();l.accountId=d;let f=await s(`Updating`,async()=>t(u,`PUT`,`/accounts/${d}/r2/buckets/${encodeURIComponent(String(l[`bucket-name`]))}`,{headers:Object.keys(c).length>0?c:void 0}));a(f,{successLabel:`Updated`})})};function D(e){return e.usage(`$0 r2 buckets create
10
+ `);return}if(p.body){let e=u(p.body),n=await s(`Deleting`,async()=>t(m,`PUT`,`/accounts/${h}/r2/buckets/${encodeURIComponent(String(p[`bucket-name`]))}/cors`,{body:e,headers:Object.keys(c).length>0?c:void 0}));a(n,{successLabel:`Deleted`});return}let g={};p.rules!==void 0&&l(g,[`rules`],d(p.rules,`rules`));let v=await s(`Deleting`,async()=>t(m,`PUT`,`/accounts/${h}/r2/buckets/${encodeURIComponent(String(p[`bucket-name`]))}/cors`,{body:Object.keys(g).length>0?g:void 0,headers:Object.keys(c).length>0?c:void 0}));a(v,{successLabel:`Deleted`})})},w={command:`cors`,describe:`Operations for buckets.cors`,builder:e=>e.command(ee).command(x).command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function T(e){return e.usage("$0 r2 buckets create-by-name <bucket-name>\n\nCreates a new R2 bucket using the name from the URL path. Similar to `r2-create-bucket` (POST), but the bucket name comes from the path and the optional storage class is supplied via the `cf-r2-storage-class` header. There is no request body. Unlike the POST variant, this endpoint does not accept a location hint — the bucket is placed in the R2 region for the caller's edge colo. Use the POST variant if you need to set a `locationHint`.").positional(`bucket-name`,{type:`string`,description:`Name of the bucket.`,demandOption:!0}).option(`cf-r2-jurisdiction`,{type:`string`,description:`Jurisdiction where objects in this bucket are guaranteed to be stored.`}).option(`cf-r2-storage-class`,{type:`string`,description:`Storage class for newly uploaded objects, unless specified otherwise.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`create-by-name <bucket-name>`,describe:`Create Bucket (by name)`,builder:T,handler:async l=>c({command:`r2 buckets create-by-name`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={};if(l[`cf-r2-jurisdiction`]!==void 0&&(c[`cf-r2-jurisdiction`]=String(l[`cf-r2-jurisdiction`])),l[`cf-r2-storage-class`]!==void 0&&(c[`cf-r2-storage-class`]=String(l[`cf-r2-storage-class`])),l.dryRun){let e=await r();o({command:`cf r2 buckets create-by-name`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/r2/buckets/${l[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(l[`bucket-name`]))}`,pathParams:{"bucket-name":String(l[`bucket-name`]??``)},bodyKind:`none`});return}let u=await n(l),d=l.local?e:await i();l.accountId=d;let f=await s(`Updating`,async()=>t(u,`PUT`,`/accounts/${d}/r2/buckets/${encodeURIComponent(String(l[`bucket-name`]))}`,{headers:Object.keys(c).length>0?c:void 0}));a(f,{successLabel:`Updated`})})};function D(e){return e.usage(`$0 r2 buckets create
11
11
 
12
12
  Creates an R2 bucket in the account and selected jurisdiction, with an optional location hint and default storage class.`).option(`cf-r2-jurisdiction`,{type:`string`,description:`Jurisdiction where objects in this bucket are guaranteed to be stored.`}).option(`location-hint`,{type:`string`,description:`Location of the bucket.`,choices:[`apac`,`eeur`,`enam`,`weur`,`wnam`,`oc`]}).option(`name`,{type:`string`,description:`Name of the bucket.`}).option(`storage-class`,{type:`string`,description:`Storage class for newly uploaded objects, unless specified otherwise.`,choices:[`Standard`,`InfrequentAccess`],default:`Standard`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const O={command:`create`,describe:`Create Bucket`,builder:D,handler:async d=>c({command:`r2 buckets create`,classification:{safeFlags:[`location-hint`,`storage-class`,`dry-run`]}},d,async()=>{let c={};if(d[`cf-r2-jurisdiction`]!==void 0&&(c[`cf-r2-jurisdiction`]=String(d[`cf-r2-jurisdiction`])),d.dryRun){let e=await r();o({command:`cf r2 buckets create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/r2/buckets`,pathParams:{},bodyKind:`json`,body:d.body===void 0?f({locationHint:p(d[`location-hint`],`location-hint`,`text`),name:p(d.name,`name`,`text`),storageClass:p(d[`storage-class`],`storage-class`,`text`)}):u(d.body)});return}let m=await n(d),g=d.local?e:await i();if(d.accountId=g,d.body){let e=u(d.body),n=await s(`Creating`,async()=>t(m,`POST`,`/accounts/${g}/r2/buckets`,{body:e,headers:Object.keys(c).length>0?c:void 0}));a(n,{successLabel:`Created`});return}d.name===void 0&&(d.name=await h(`name`,`Name of the bucket.`));let _={};d[`location-hint`]!==void 0&&l(_,[`locationHint`],p(d[`location-hint`],`location-hint`,`text`)),d.name!==void 0&&l(_,[`name`],p(d.name,`name`,`text`)),d[`storage-class`]!==void 0&&l(_,[`storageClass`],p(d[`storage-class`],`storage-class`,`text`));let v=await s(`Creating`,async()=>t(m,`POST`,`/accounts/${g}/r2/buckets`,{body:Object.keys(_).length>0?_:void 0,headers:Object.keys(c).length>0?c:void 0}));a(v,{successLabel:`Created`})})};function k(e){return e.usage(`$0 r2 buckets delete <bucket-name>
13
13
 
@@ -41,35 +41,38 @@ Lists event notification rules for an R2 bucket, grouped by the Cloudflare Queue
41
41
 
42
42
  Creates rules that send notifications for matching R2 object events to the specified Cloudflare Queue. Rules can filter objects by key prefix and suffix. New rules are added to any existing rules for the queue; a rule that overlaps an existing rule is rejected.`).positional(`queue-id`,{type:`string`,description:`ID of the Cloudflare Queue that receives notifications for matching R2 object events.`,demandOption:!0}).option(`bucket-name`,{type:`string`,description:`Name of the bucket.`,demandOption:!0}).option(`cf-r2-jurisdiction`,{type:`string`,description:`Jurisdiction where objects in this bucket are guaranteed to be stored.`}).option(`rules`,{type:`string`,description:`Array of rules to drive notifications. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const oe={command:`update <queue-id>`,describe:`Create Event Notification Rules`,builder:ae,handler:async p=>c({command:`r2 buckets event-notifications update`,classification:{safeFlags:[`dry-run`]}},p,async()=>{let c={};if(p[`cf-r2-jurisdiction`]!==void 0&&(c[`cf-r2-jurisdiction`]=String(p[`cf-r2-jurisdiction`])),p.dryRun){let e=await r();o({command:`cf r2 buckets event-notifications update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/event_notifications/r2/${p[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(p[`bucket-name`]))}/configuration/queues/${p[`queue-id`]==null?`<queue-id>`:encodeURIComponent(String(p[`queue-id`]))}`,pathParams:{"queue-id":String(p[`queue-id`]??``),"bucket-name":String(p[`bucket-name`]??``)},bodyKind:`json`,body:p.body===void 0?f({rules:d(p.rules,`rules`)}):u(p.body)});return}let m=await n(p),h=p.local?e:await i();if(p.accountId=h,p.body){let e=u(p.body),n=await s(`Updating`,async()=>t(m,`PUT`,`/accounts/${h}/event_notifications/r2/${encodeURIComponent(String(p[`bucket-name`]))}/configuration/queues/${encodeURIComponent(String(p[`queue-id`]))}`,{body:e,headers:Object.keys(c).length>0?c:void 0}));a(n,{successLabel:`Updated`});return}if(p.rules===void 0)throw Error(`--rules is required (or pass --body with this field set).`);let g={};p.rules!==void 0&&l(g,[`rules`],d(p.rules,`rules`));let _=await s(`Updating`,async()=>t(m,`PUT`,`/accounts/${h}/event_notifications/r2/${encodeURIComponent(String(p[`bucket-name`]))}/configuration/queues/${encodeURIComponent(String(p[`queue-id`]))}`,{body:Object.keys(g).length>0?g:void 0,headers:Object.keys(c).length>0?c:void 0}));a(_,{successLabel:`Updated`})})},se={command:`event-notifications`,describe:`Operations for buckets.event-notifications`,builder:e=>e.command(Z).command(ne).command(ie).command(oe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ce(e){return e.usage(`$0 r2 buckets get <bucket-name>
43
43
 
44
- Gets properties of an existing R2 bucket.`).positional(`bucket-name`,{type:`string`,description:`Name of the bucket.`,demandOption:!0}).option(`cf-r2-jurisdiction`,{type:`string`,description:`Jurisdiction where objects in this bucket are guaranteed to be stored.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const le={command:`get <bucket-name>`,describe:`Get Bucket`,builder:ce,handler:async l=>c({command:`r2 buckets get`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={};if(l[`cf-r2-jurisdiction`]!==void 0&&(c[`cf-r2-jurisdiction`]=String(l[`cf-r2-jurisdiction`])),l.dryRun){let e=await r();o({command:`cf r2 buckets get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/r2/buckets/${l[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(l[`bucket-name`]))}`,pathParams:{"bucket-name":String(l[`bucket-name`]??``)},bodyKind:`none`});return}let u=await n(l),d=l.local?e:await i();l.accountId=d;let f=await s(`Loading`,async()=>t(u,`GET`,`/accounts/${d}/r2/buckets/${encodeURIComponent(String(l[`bucket-name`]))}`,{headers:Object.keys(c).length>0?c:void 0}));a(f,{successLabel:`Loaded`})})};function ue(e){return e.usage("$0 r2 buckets jobs get <job-id>\n\nGets the current status of a background job of any type for an R2 bucket. Poll this endpoint with the job identifier returned when the operation was submitted until the status is `COMPLETED`, `FAILED`, or `CANCELLED`.").positional(`job-id`,{type:`string`,description:`Identifier returned when the background job was submitted.`,demandOption:!0}).option(`bucket-name`,{type:`string`,description:`Name of the bucket.`,demandOption:!0}).option(`cf-r2-jurisdiction`,{type:`string`,description:`Jurisdiction where objects in this bucket are guaranteed to be stored.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const de={command:`get <job-id>`,describe:`Get Bucket Job`,builder:ue,handler:async l=>c({command:`r2 buckets jobs get`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={};if(l[`cf-r2-jurisdiction`]!==void 0&&(c[`cf-r2-jurisdiction`]=String(l[`cf-r2-jurisdiction`])),l.dryRun){let e=await r();o({command:`cf r2 buckets jobs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/r2/buckets/${l[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(l[`bucket-name`]))}/jobs/${l[`job-id`]==null?`<job-id>`:encodeURIComponent(String(l[`job-id`]))}`,pathParams:{"bucket-name":String(l[`bucket-name`]??``),"job-id":String(l[`job-id`]??``)},bodyKind:`none`});return}let u=await n(l),d=l.local?e:await i();l.accountId=d;let f=await s(`Loading`,async()=>t(u,`GET`,`/accounts/${d}/r2/buckets/${encodeURIComponent(String(l[`bucket-name`]))}/jobs/${encodeURIComponent(String(l[`job-id`]))}`,{headers:Object.keys(c).length>0?c:void 0}));a(f,{successLabel:`Loaded`})})};function fe(e){return e.usage(`$0 r2 buckets jobs list
44
+ Gets properties of an existing R2 bucket.`).positional(`bucket-name`,{type:`string`,description:`Name of the bucket.`,demandOption:!0}).option(`cf-r2-jurisdiction`,{type:`string`,description:`Jurisdiction where objects in this bucket are guaranteed to be stored.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const le={command:`get <bucket-name>`,describe:`Get Bucket`,builder:ce,handler:async l=>c({command:`r2 buckets get`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={};if(l[`cf-r2-jurisdiction`]!==void 0&&(c[`cf-r2-jurisdiction`]=String(l[`cf-r2-jurisdiction`])),l.dryRun){let e=await r();o({command:`cf r2 buckets get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/r2/buckets/${l[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(l[`bucket-name`]))}`,pathParams:{"bucket-name":String(l[`bucket-name`]??``)},bodyKind:`none`});return}let u=await n(l),d=l.local?e:await i();l.accountId=d;let f=await s(`Loading`,async()=>t(u,`GET`,`/accounts/${d}/r2/buckets/${encodeURIComponent(String(l[`bucket-name`]))}`,{headers:Object.keys(c).length>0?c:void 0}));a(f,{successLabel:`Loaded`})})};function ue(e){return e.usage('$0 r2 buckets jobs create <bucket-name>\n\nCreates a background job for an R2 bucket. The `jobType` field selects the job: - **`prefixDelete`**: deletes every object whose key begins with `prefix`. A non-empty prefix must end in `/`. An empty prefix (`""`) empties the entire bucket. - **`storageClassMigration`**: migrates every object in the bucket between storage classes. `sourceStorageClass` and `destinationStorageClass` must be provided together and must differ; omitting both migrates from `InfrequentAccess` to `Standard`. Poll the returned `id` with the Get Bucket Job endpoint. Small prefix-delete jobs can finish synchronously and return `COMPLETED`. Objects uploaded after a background job starts are not affected by that job. For prefix-delete jobs: abort active multipart uploads before submitting the request, since a synchronously completed job does not abort them, and avoid writing objects or starting multipart uploads while a bucket-emptying job is in progress. Each request creates a distinct job, and the number of active prefix-delete jobs is limited per bucket; wait for an existing job to finish before retrying a request rejected with HTTP 429. A bucket cannot be emptied while event notifications are configured (HTTP 409 / error code 10083). To protect a bucket with R2 Data Catalog enabled, send the `cf-r2-data-catalog-check` header; a conflict is returned with HTTP 409 / error code 10081. Prefix-delete jobs require permission to delete objects; storage-class migration jobs require permission to write to the bucket.').positional(`bucket-name`,{type:`string`,description:`Name of the bucket.`,demandOption:!0}).option(`cf-r2-jurisdiction`,{type:`string`,description:`Jurisdiction where objects in this bucket are guaranteed to be stored.`}).option(`cf-r2-data-catalog-check`,{type:`string`,description:`For prefix-delete jobs, set this header to reject the request when R2 Data Catalog is enabled for the bucket.`}).option(`job-type`,{type:`string`,description:`The jobType field`,choices:[`prefixDelete`,`storageClassMigration`]}).option(`prefix`,{type:`string`,description:`Prefix matched against object keys. A non-empty value must end in \`/\`.
45
+ An empty string empties the entire bucket.
46
+ `}).option(`destination-storage-class`,{type:`string`,description:`The destinationStorageClass field`,choices:[`Standard`,`InfrequentAccess`]}).option(`source-storage-class`,{type:`string`,description:`The sourceStorageClass field`,choices:[`Standard`,`InfrequentAccess`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).conflicts(`prefix`,[`destination-storage-class`,`source-storage-class`]).conflicts(`destination-storage-class`,[`prefix`]).conflicts(`source-storage-class`,[`prefix`])}const de={command:`create <bucket-name>`,describe:`Create Bucket Job`,builder:ue,handler:async d=>c({command:`r2 buckets jobs create`,classification:{safeFlags:[`job-type`,`destination-storage-class`,`source-storage-class`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},d,async()=>{let c={};if(d[`cf-r2-jurisdiction`]!==void 0&&(c[`cf-r2-jurisdiction`]=String(d[`cf-r2-jurisdiction`])),d[`cf-r2-data-catalog-check`]!==void 0&&(c[`cf-r2-data-catalog-check`]=String(d[`cf-r2-data-catalog-check`])),d.dryRun){let e=await r();o({command:`cf r2 buckets jobs create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/r2/buckets/${d[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(d[`bucket-name`]))}/jobs`,pathParams:{"bucket-name":String(d[`bucket-name`]??``)},bodyKind:`json`,body:d.body===void 0?f({jobType:p(d[`job-type`],`job-type`,`text`),prefix:p(d.prefix,`prefix`,`text`),destinationStorageClass:p(d[`destination-storage-class`],`destination-storage-class`,`text`),sourceStorageClass:p(d[`source-storage-class`],`source-storage-class`,`text`)}):u(d.body)});return}let m=await n(d),v=d.local?e:await i();if(d.accountId=v,!await _({force:!!d.force,message:`This starts a background job that either permanently deletes every object under the given prefix (every object in the bucket for an empty prefix) or migrates every object in the bucket between storage classes.`})){process.stderr.write(`Aborted.
47
+ `);return}if(d.body){let e=u(d.body),n=await s(`Deleting`,async()=>t(m,`POST`,`/accounts/${v}/r2/buckets/${encodeURIComponent(String(d[`bucket-name`]))}/jobs`,{body:e,headers:Object.keys(c).length>0?c:void 0}));a(n,{successLabel:`Deleted`});return}d[`job-type`]===void 0&&(d[`job-type`]=await g(`job-type`,`The jobType field`,[`prefixDelete`,`storageClassMigration`])),d[`job-type`]===`prefixDelete`&&d.prefix===void 0&&(d.prefix=await h(`prefix`,"Prefix matched against object keys. A non-empty value must end in `/`. An empty string empties the entire bucket. ",{question:`Enter value for --prefix`}));let y={};d[`job-type`]!==void 0&&l(y,[`jobType`],p(d[`job-type`],`job-type`,`text`)),d.prefix!==void 0&&l(y,[`prefix`],p(d.prefix,`prefix`,`text`)),d[`destination-storage-class`]!==void 0&&l(y,[`destinationStorageClass`],p(d[`destination-storage-class`],`destination-storage-class`,`text`)),d[`source-storage-class`]!==void 0&&l(y,[`sourceStorageClass`],p(d[`source-storage-class`],`source-storage-class`,`text`));let b=await s(`Deleting`,async()=>t(m,`POST`,`/accounts/${v}/r2/buckets/${encodeURIComponent(String(d[`bucket-name`]))}/jobs`,{body:Object.keys(y).length>0?y:void 0,headers:Object.keys(c).length>0?c:void 0}));a(b,{successLabel:`Deleted`})})};function fe(e){return e.usage("$0 r2 buckets jobs get <job-id>\n\nGets the current status of a background job of any type for an R2 bucket. Poll this endpoint with the job identifier returned by Create Bucket Job until the status is `COMPLETED`, `FAILED`, or `CANCELLED`.").positional(`job-id`,{type:`string`,description:`Identifier returned when the background job was submitted.`,demandOption:!0}).option(`bucket-name`,{type:`string`,description:`Name of the bucket.`,demandOption:!0}).option(`cf-r2-jurisdiction`,{type:`string`,description:`Jurisdiction where objects in this bucket are guaranteed to be stored.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const pe={command:`get <job-id>`,describe:`Get Bucket Job`,builder:fe,handler:async l=>c({command:`r2 buckets jobs get`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={};if(l[`cf-r2-jurisdiction`]!==void 0&&(c[`cf-r2-jurisdiction`]=String(l[`cf-r2-jurisdiction`])),l.dryRun){let e=await r();o({command:`cf r2 buckets jobs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/r2/buckets/${l[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(l[`bucket-name`]))}/jobs/${l[`job-id`]==null?`<job-id>`:encodeURIComponent(String(l[`job-id`]))}`,pathParams:{"bucket-name":String(l[`bucket-name`]??``),"job-id":String(l[`job-id`]??``)},bodyKind:`none`});return}let u=await n(l),d=l.local?e:await i();l.accountId=d;let f=await s(`Loading`,async()=>t(u,`GET`,`/accounts/${d}/r2/buckets/${encodeURIComponent(String(l[`bucket-name`]))}/jobs/${encodeURIComponent(String(l[`job-id`]))}`,{headers:Object.keys(c).length>0?c:void 0}));a(f,{successLabel:`Loaded`})})};function me(e){return e.usage(`$0 r2 buckets jobs list
45
48
 
46
- Lists background jobs for an R2 bucket, including prefix-delete (and bucket-emptying) jobs and storage-class migration jobs. Jobs of every type are returned unless \`jobType\` is provided.`).option(`bucket-name`,{type:`string`,description:`Name of the bucket.`,demandOption:!0}).option(`job-type`,{type:`string`,description:`Restricts results to jobs of the specified type.`,choices:[`prefixDelete`,`storageClassMigration`]}).option(`status`,{type:`string`,description:"Restricts results to jobs with the specified status. `jobType` is required when this parameter is provided.",choices:[`ENQUEUED`,`RUNNING`,`COMPLETED`,`FAILED`,`CANCELLED`]}).option(`max-keys`,{type:`number`,description:`Maximum number of jobs to return.`}).option(`continuation-token`,{type:`string`,description:"Pagination token received as `nextContinuationToken` in the previous response."}).option(`cf-r2-jurisdiction`,{type:`string`,description:`Jurisdiction where objects in this bucket are guaranteed to be stored.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const pe={command:`list`,describe:`List Bucket Jobs`,builder:fe,handler:async l=>c({command:`r2 buckets jobs list`,classification:{safeFlags:[`job-type`,`status`,`dry-run`]}},l,async()=>{let c={jobType:l[`job-type`],status:l.status,maxKeys:l[`max-keys`],continuationToken:l[`continuation-token`]},u={};if(l[`cf-r2-jurisdiction`]!==void 0&&(u[`cf-r2-jurisdiction`]=String(l[`cf-r2-jurisdiction`])),l.dryRun){let e=await r();o({command:`cf r2 buckets jobs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/r2/buckets/${l[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(l[`bucket-name`]))}/jobs`,pathParams:{"bucket-name":String(l[`bucket-name`]??``)},query:c,bodyKind:`none`});return}let d=await n(l),f=l.local?e:await i();l.accountId=f;let p=await s(`Loading`,async()=>t(d,`GET`,`/accounts/${f}/r2/buckets/${encodeURIComponent(String(l[`bucket-name`]))}/jobs`,{query:c,headers:Object.keys(u).length>0?u:void 0}));a(p,{successLabel:`Loaded`})})},me={command:`jobs`,describe:`Inspect background jobs for an R2 bucket`,builder:e=>e.command(de).command(pe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function he(e){return e.usage(`$0 r2 buckets lifecycle get <bucket-name>
49
+ Lists background jobs for an R2 bucket, including prefix-delete (and bucket-emptying) jobs and storage-class migration jobs. Jobs of every type are returned unless \`jobType\` is provided.`).option(`bucket-name`,{type:`string`,description:`Name of the bucket.`,demandOption:!0}).option(`job-type`,{type:`string`,description:`Restricts results to jobs of the specified type.`,choices:[`prefixDelete`,`storageClassMigration`]}).option(`status`,{type:`string`,description:"Restricts results to jobs with the specified status. `jobType` is required when this parameter is provided.",choices:[`ENQUEUED`,`RUNNING`,`COMPLETED`,`FAILED`,`CANCELLED`]}).option(`max-keys`,{type:`number`,description:`Maximum number of jobs to return.`}).option(`continuation-token`,{type:`string`,description:"Pagination token received as `nextContinuationToken` in the previous response."}).option(`cf-r2-jurisdiction`,{type:`string`,description:`Jurisdiction where objects in this bucket are guaranteed to be stored.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const he={command:`list`,describe:`List Bucket Jobs`,builder:me,handler:async l=>c({command:`r2 buckets jobs list`,classification:{safeFlags:[`job-type`,`status`,`dry-run`]}},l,async()=>{let c={jobType:l[`job-type`],status:l.status,maxKeys:l[`max-keys`],continuationToken:l[`continuation-token`]},u={};if(l[`cf-r2-jurisdiction`]!==void 0&&(u[`cf-r2-jurisdiction`]=String(l[`cf-r2-jurisdiction`])),l.dryRun){let e=await r();o({command:`cf r2 buckets jobs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/r2/buckets/${l[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(l[`bucket-name`]))}/jobs`,pathParams:{"bucket-name":String(l[`bucket-name`]??``)},query:c,bodyKind:`none`});return}let d=await n(l),f=l.local?e:await i();l.accountId=f;let p=await s(`Loading`,async()=>t(d,`GET`,`/accounts/${f}/r2/buckets/${encodeURIComponent(String(l[`bucket-name`]))}/jobs`,{query:c,headers:Object.keys(u).length>0?u:void 0}));a(p,{successLabel:`Loaded`})})},ge={command:`jobs`,describe:`Create and inspect background jobs for an R2 bucket`,builder:e=>e.command(de).command(pe).command(he).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function _e(e){return e.usage(`$0 r2 buckets lifecycle get <bucket-name>
47
50
 
48
- Get object lifecycle rules for a bucket.`).positional(`bucket-name`,{type:`string`,description:`Name of the bucket.`,demandOption:!0}).option(`cf-r2-jurisdiction`,{type:`string`,description:`Jurisdiction where objects in this bucket are guaranteed to be stored.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ge={command:`get <bucket-name>`,describe:`Get Object Lifecycle Rules`,builder:he,handler:async l=>c({command:`r2 buckets lifecycle get`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={};if(l[`cf-r2-jurisdiction`]!==void 0&&(c[`cf-r2-jurisdiction`]=String(l[`cf-r2-jurisdiction`])),l.dryRun){let e=await r();o({command:`cf r2 buckets lifecycle get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/r2/buckets/${l[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(l[`bucket-name`]))}/lifecycle`,pathParams:{"bucket-name":String(l[`bucket-name`]??``)},bodyKind:`none`});return}let u=await n(l),d=l.local?e:await i();l.accountId=d;let f=await s(`Loading`,async()=>t(u,`GET`,`/accounts/${d}/r2/buckets/${encodeURIComponent(String(l[`bucket-name`]))}/lifecycle`,{headers:Object.keys(c).length>0?c:void 0}));a(f,{successLabel:`Loaded`})})};function _e(e){return e.usage(`$0 r2 buckets lifecycle update <bucket-name>
51
+ Get object lifecycle rules for a bucket.`).positional(`bucket-name`,{type:`string`,description:`Name of the bucket.`,demandOption:!0}).option(`cf-r2-jurisdiction`,{type:`string`,description:`Jurisdiction where objects in this bucket are guaranteed to be stored.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ve={command:`get <bucket-name>`,describe:`Get Object Lifecycle Rules`,builder:_e,handler:async l=>c({command:`r2 buckets lifecycle get`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={};if(l[`cf-r2-jurisdiction`]!==void 0&&(c[`cf-r2-jurisdiction`]=String(l[`cf-r2-jurisdiction`])),l.dryRun){let e=await r();o({command:`cf r2 buckets lifecycle get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/r2/buckets/${l[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(l[`bucket-name`]))}/lifecycle`,pathParams:{"bucket-name":String(l[`bucket-name`]??``)},bodyKind:`none`});return}let u=await n(l),d=l.local?e:await i();l.accountId=d;let f=await s(`Loading`,async()=>t(u,`GET`,`/accounts/${d}/r2/buckets/${encodeURIComponent(String(l[`bucket-name`]))}/lifecycle`,{headers:Object.keys(c).length>0?c:void 0}));a(f,{successLabel:`Loaded`})})};function ye(e){return e.usage(`$0 r2 buckets lifecycle update <bucket-name>
49
52
 
50
- Replaces the object lifecycle rules for an R2 bucket. Rules match object-key prefixes and can expire objects, abort incomplete multipart uploads, or transition objects to Infrequent Access storage.`).positional(`bucket-name`,{type:`string`,description:`Name of the bucket.`,demandOption:!0}).option(`cf-r2-jurisdiction`,{type:`string`,description:`Jurisdiction where objects in this bucket are guaranteed to be stored.`}).option(`rules`,{type:`string`,description:`The rules field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ve={command:`update <bucket-name>`,describe:`Set Object Lifecycle Rules`,builder:_e,handler:async p=>c({command:`r2 buckets lifecycle update`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},p,async()=>{let c={};if(p[`cf-r2-jurisdiction`]!==void 0&&(c[`cf-r2-jurisdiction`]=String(p[`cf-r2-jurisdiction`])),p.dryRun){let e=await r();o({command:`cf r2 buckets lifecycle update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/r2/buckets/${p[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(p[`bucket-name`]))}/lifecycle`,pathParams:{"bucket-name":String(p[`bucket-name`]??``)},bodyKind:`json`,body:p.body===void 0?f({rules:d(p.rules,`rules`)}):u(p.body)});return}let m=await n(p),h=p.local?e:await i();if(p.accountId=h,!await _({force:!!p.force,message:`This replaces the R2 bucket's object lifecycle rules and can schedule object deletion or abort multipart uploads.`})){process.stderr.write(`Aborted.
51
- `);return}if(p.body){let e=u(p.body),n=await s(`Deleting`,async()=>t(m,`PUT`,`/accounts/${h}/r2/buckets/${encodeURIComponent(String(p[`bucket-name`]))}/lifecycle`,{body:e,headers:Object.keys(c).length>0?c:void 0}));a(n,{successLabel:`Deleted`});return}let g={};p.rules!==void 0&&l(g,[`rules`],d(p.rules,`rules`));let v=await s(`Deleting`,async()=>t(m,`PUT`,`/accounts/${h}/r2/buckets/${encodeURIComponent(String(p[`bucket-name`]))}/lifecycle`,{body:Object.keys(g).length>0?g:void 0,headers:Object.keys(c).length>0?c:void 0}));a(v,{successLabel:`Deleted`})})},ye={command:`lifecycle`,describe:`Operations for buckets.lifecycle`,builder:e=>e.command(ge).command(ve).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function be(e){return e.usage(`$0 r2 buckets list
53
+ Replaces the object lifecycle rules for an R2 bucket. Rules match object-key prefixes and can expire objects, abort incomplete multipart uploads, or transition objects to Infrequent Access storage.`).positional(`bucket-name`,{type:`string`,description:`Name of the bucket.`,demandOption:!0}).option(`cf-r2-jurisdiction`,{type:`string`,description:`Jurisdiction where objects in this bucket are guaranteed to be stored.`}).option(`rules`,{type:`string`,description:`The rules field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const be={command:`update <bucket-name>`,describe:`Set Object Lifecycle Rules`,builder:ye,handler:async p=>c({command:`r2 buckets lifecycle update`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},p,async()=>{let c={};if(p[`cf-r2-jurisdiction`]!==void 0&&(c[`cf-r2-jurisdiction`]=String(p[`cf-r2-jurisdiction`])),p.dryRun){let e=await r();o({command:`cf r2 buckets lifecycle update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/r2/buckets/${p[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(p[`bucket-name`]))}/lifecycle`,pathParams:{"bucket-name":String(p[`bucket-name`]??``)},bodyKind:`json`,body:p.body===void 0?f({rules:d(p.rules,`rules`)}):u(p.body)});return}let m=await n(p),h=p.local?e:await i();if(p.accountId=h,!await _({force:!!p.force,message:`This replaces the R2 bucket's object lifecycle rules and can schedule object deletion or abort multipart uploads.`})){process.stderr.write(`Aborted.
54
+ `);return}if(p.body){let e=u(p.body),n=await s(`Deleting`,async()=>t(m,`PUT`,`/accounts/${h}/r2/buckets/${encodeURIComponent(String(p[`bucket-name`]))}/lifecycle`,{body:e,headers:Object.keys(c).length>0?c:void 0}));a(n,{successLabel:`Deleted`});return}let g={};p.rules!==void 0&&l(g,[`rules`],d(p.rules,`rules`));let v=await s(`Deleting`,async()=>t(m,`PUT`,`/accounts/${h}/r2/buckets/${encodeURIComponent(String(p[`bucket-name`]))}/lifecycle`,{body:Object.keys(g).length>0?g:void 0,headers:Object.keys(c).length>0?c:void 0}));a(v,{successLabel:`Deleted`})})},xe={command:`lifecycle`,describe:`Operations for buckets.lifecycle`,builder:e=>e.command(ve).command(be).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Se(e){return e.usage(`$0 r2 buckets list
52
55
 
53
- Lists a page of R2 buckets in the account and selected jurisdiction. Use the returned cursor to retrieve the next page.`).option(`name-contains`,{type:`string`,description:`Bucket names to filter by. Only buckets with this phrase in their name will be returned.`}).option(`start-after`,{type:`string`,description:`Bucket name to start searching after. Buckets are ordered lexicographically.`}).option(`per-page`,{type:`number`,description:`Maximum number of buckets to return in a single call.`}).option(`order`,{type:`string`,description:`Field to order buckets by.`,choices:[`name`]}).option(`direction`,{type:`string`,description:`Direction to order buckets.`,choices:[`asc`,`desc`]}).option(`cursor`,{type:`string`,description:`Pagination cursor received during the last List Buckets call. R2 buckets are paginated using cursors instead of page numbers.`}).option(`cf-r2-jurisdiction`,{type:`string`,description:`Jurisdiction where objects in this bucket are guaranteed to be stored.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const xe={command:`list`,describe:`List Buckets`,builder:be,handler:async l=>c({command:`r2 buckets list`,classification:{safeFlags:[`order`,`direction`,`dry-run`]}},l,async()=>{let c={name_contains:l[`name-contains`],start_after:l[`start-after`],per_page:l[`per-page`],order:l.order,direction:l.direction,cursor:l.cursor},u={};if(l[`cf-r2-jurisdiction`]!==void 0&&(u[`cf-r2-jurisdiction`]=String(l[`cf-r2-jurisdiction`])),l.dryRun){let e=await r();o({command:`cf r2 buckets list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/r2/buckets`,pathParams:{},query:c,bodyKind:`none`});return}let d=await n(l),f=l.local?e:await i();l.accountId=f;let p=await s(`Loading`,async()=>t(d,`GET`,`/accounts/${f}/r2/buckets`,{query:c,headers:Object.keys(u).length>0?u:void 0}));a(p,{successLabel:`Loaded`})})};function Se(e){return e.usage(`$0 r2 buckets local-uploads get <bucket-name>
56
+ Lists a page of R2 buckets in the account and selected jurisdiction. Use the returned cursor to retrieve the next page.`).option(`name-contains`,{type:`string`,description:`Bucket names to filter by. Only buckets with this phrase in their name will be returned.`}).option(`start-after`,{type:`string`,description:`Bucket name to start searching after. Buckets are ordered lexicographically.`}).option(`per-page`,{type:`number`,description:`Maximum number of buckets to return in a single call.`}).option(`order`,{type:`string`,description:`Field to order buckets by.`,choices:[`name`]}).option(`direction`,{type:`string`,description:`Direction to order buckets.`,choices:[`asc`,`desc`]}).option(`cursor`,{type:`string`,description:`Pagination cursor received during the last List Buckets call. R2 buckets are paginated using cursors instead of page numbers.`}).option(`cf-r2-jurisdiction`,{type:`string`,description:`Jurisdiction where objects in this bucket are guaranteed to be stored.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ce={command:`list`,describe:`List Buckets`,builder:Se,handler:async l=>c({command:`r2 buckets list`,classification:{safeFlags:[`order`,`direction`,`dry-run`]}},l,async()=>{let c={name_contains:l[`name-contains`],start_after:l[`start-after`],per_page:l[`per-page`],order:l.order,direction:l.direction,cursor:l.cursor},u={};if(l[`cf-r2-jurisdiction`]!==void 0&&(u[`cf-r2-jurisdiction`]=String(l[`cf-r2-jurisdiction`])),l.dryRun){let e=await r();o({command:`cf r2 buckets list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/r2/buckets`,pathParams:{},query:c,bodyKind:`none`});return}let d=await n(l),f=l.local?e:await i();l.accountId=f;let p=await s(`Loading`,async()=>t(d,`GET`,`/accounts/${f}/r2/buckets`,{query:c,headers:Object.keys(u).length>0?u:void 0}));a(p,{successLabel:`Loaded`})})};function we(e){return e.usage(`$0 r2 buckets local-uploads get <bucket-name>
54
57
 
55
- Gets the Local Uploads configuration for an R2 bucket. When enabled, object data is written near the client before being asynchronously copied to the bucket's primary region. Local Uploads is only supported in the default jurisdiction.`).positional(`bucket-name`,{type:`string`,description:`Name of the bucket.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ce={command:`get <bucket-name>`,describe:`Get Local Uploads Configuration`,builder:Se,handler:async t=>c({command:`r2 buckets local-uploads get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf r2 buckets local-uploads get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/r2/buckets/${t[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(t[`bucket-name`]))}/local-uploads`,pathParams:{"bucket-name":String(t[`bucket-name`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.r2.buckets.localUploads.get({account_id:l,bucket_name:t[`bucket-name`]}));a(u,{successLabel:`Loaded`})})};function we(e){return e.usage(`$0 r2 buckets local-uploads update <bucket-name>
58
+ Gets the Local Uploads configuration for an R2 bucket. When enabled, object data is written near the client before being asynchronously copied to the bucket's primary region. Local Uploads is only supported in the default jurisdiction.`).positional(`bucket-name`,{type:`string`,description:`Name of the bucket.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Te={command:`get <bucket-name>`,describe:`Get Local Uploads Configuration`,builder:we,handler:async t=>c({command:`r2 buckets local-uploads get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf r2 buckets local-uploads get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/r2/buckets/${t[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(t[`bucket-name`]))}/local-uploads`,pathParams:{"bucket-name":String(t[`bucket-name`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.r2.buckets.localUploads.get({account_id:l,bucket_name:t[`bucket-name`]}));a(u,{successLabel:`Loaded`})})};function Ee(e){return e.usage(`$0 r2 buckets local-uploads update <bucket-name>
56
59
 
57
- Enables or disables Local Uploads for an R2 bucket in the default jurisdiction. When enabled, object data is written near the client before being asynchronously copied to the bucket's primary region. Disabling Local Uploads allows existing replication to finish.`).positional(`bucket-name`,{type:`string`,description:`Name of the bucket.`,demandOption:!0}).option(`enabled`,{type:`boolean`,description:`Whether to enable local uploads for this bucket.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Te={command:`update <bucket-name>`,describe:`Set Local Uploads Configuration`,builder:we,handler:async t=>c({command:`r2 buckets local-uploads update`,classification:{safeFlags:[`enabled`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf r2 buckets local-uploads update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/r2/buckets/${t[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(t[`bucket-name`]))}/local-uploads`,pathParams:{"bucket-name":String(t[`bucket-name`]??``)},bodyKind:`json`,body:t.body===void 0?f({enabled:t.enabled}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.r2.buckets.localUploads.update({...e,account_id:l,bucket_name:t[`bucket-name`]}));a(n,{successLabel:`Updated`});return}if(t.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);let d=f({enabled:t.enabled}),p=await s(`Updating`,async()=>c.r2.buckets.localUploads.update({...d,account_id:l,bucket_name:t[`bucket-name`]}));a(p,{successLabel:`Updated`})})},Ee={command:`local-uploads`,describe:`R2 bucket local upload configuration`,builder:e=>e.command(Ce).command(Te).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function De(e){return e.usage(`$0 r2 buckets locks delete <bucket-name>
60
+ Enables or disables Local Uploads for an R2 bucket in the default jurisdiction. When enabled, object data is written near the client before being asynchronously copied to the bucket's primary region. Disabling Local Uploads allows existing replication to finish.`).positional(`bucket-name`,{type:`string`,description:`Name of the bucket.`,demandOption:!0}).option(`enabled`,{type:`boolean`,description:`Whether to enable local uploads for this bucket.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const De={command:`update <bucket-name>`,describe:`Set Local Uploads Configuration`,builder:Ee,handler:async t=>c({command:`r2 buckets local-uploads update`,classification:{safeFlags:[`enabled`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf r2 buckets local-uploads update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/r2/buckets/${t[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(t[`bucket-name`]))}/local-uploads`,pathParams:{"bucket-name":String(t[`bucket-name`]??``)},bodyKind:`json`,body:t.body===void 0?f({enabled:t.enabled}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.r2.buckets.localUploads.update({...e,account_id:l,bucket_name:t[`bucket-name`]}));a(n,{successLabel:`Updated`});return}if(t.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);let d=f({enabled:t.enabled}),p=await s(`Updating`,async()=>c.r2.buckets.localUploads.update({...d,account_id:l,bucket_name:t[`bucket-name`]}));a(p,{successLabel:`Updated`})})},Oe={command:`local-uploads`,describe:`R2 bucket local upload configuration`,builder:e=>e.command(Te).command(De).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ke(e){return e.usage(`$0 r2 buckets locks delete <bucket-name>
58
61
 
59
- Delete all lock rules for a bucket.`).positional(`bucket-name`,{type:`string`,description:`Name of the bucket.`,demandOption:!0}).option(`cf-r2-jurisdiction`,{type:`string`,description:`Jurisdiction where objects in this bucket are guaranteed to be stored.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Oe={command:`delete <bucket-name>`,describe:`Delete Bucket Lock Rules`,builder:De,handler:async l=>c({command:`r2 buckets locks delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},l,async()=>{let c={};if(l[`cf-r2-jurisdiction`]!==void 0&&(c[`cf-r2-jurisdiction`]=String(l[`cf-r2-jurisdiction`])),l.dryRun){let e=await r();o({command:`cf r2 buckets locks delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/r2/buckets/${l[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(l[`bucket-name`]))}/lock`,pathParams:{"bucket-name":String(l[`bucket-name`]??``)},bodyKind:`none`});return}let u=await n(l),d=l.local?e:await i();if(l.accountId=d,!await _({force:!!l.force,message:`This removes all lock rules from the R2 bucket, removing their protection against object deletion and overwriting.`})){process.stderr.write(`Aborted.
60
- `);return}let f=await s(`Deleting`,async()=>t(u,`DELETE`,`/accounts/${d}/r2/buckets/${encodeURIComponent(String(l[`bucket-name`]))}/lock`,{headers:Object.keys(c).length>0?c:void 0}));a(f,{successLabel:`Deleted`})})};function ke(e){return e.usage(`$0 r2 buckets locks get <bucket-name>
62
+ Delete all lock rules for a bucket.`).positional(`bucket-name`,{type:`string`,description:`Name of the bucket.`,demandOption:!0}).option(`cf-r2-jurisdiction`,{type:`string`,description:`Jurisdiction where objects in this bucket are guaranteed to be stored.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Ae={command:`delete <bucket-name>`,describe:`Delete Bucket Lock Rules`,builder:ke,handler:async l=>c({command:`r2 buckets locks delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},l,async()=>{let c={};if(l[`cf-r2-jurisdiction`]!==void 0&&(c[`cf-r2-jurisdiction`]=String(l[`cf-r2-jurisdiction`])),l.dryRun){let e=await r();o({command:`cf r2 buckets locks delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/r2/buckets/${l[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(l[`bucket-name`]))}/lock`,pathParams:{"bucket-name":String(l[`bucket-name`]??``)},bodyKind:`none`});return}let u=await n(l),d=l.local?e:await i();if(l.accountId=d,!await _({force:!!l.force,message:`This removes all lock rules from the R2 bucket, removing their protection against object deletion and overwriting.`})){process.stderr.write(`Aborted.
63
+ `);return}let f=await s(`Deleting`,async()=>t(u,`DELETE`,`/accounts/${d}/r2/buckets/${encodeURIComponent(String(l[`bucket-name`]))}/lock`,{headers:Object.keys(c).length>0?c:void 0}));a(f,{successLabel:`Deleted`})})};function je(e){return e.usage(`$0 r2 buckets locks get <bucket-name>
61
64
 
62
- Get lock rules for a bucket.`).positional(`bucket-name`,{type:`string`,description:`Name of the bucket.`,demandOption:!0}).option(`cf-r2-jurisdiction`,{type:`string`,description:`Jurisdiction where objects in this bucket are guaranteed to be stored.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ae={command:`get <bucket-name>`,describe:`Get Bucket Lock Rules`,builder:ke,handler:async l=>c({command:`r2 buckets locks get`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={};if(l[`cf-r2-jurisdiction`]!==void 0&&(c[`cf-r2-jurisdiction`]=String(l[`cf-r2-jurisdiction`])),l.dryRun){let e=await r();o({command:`cf r2 buckets locks get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/r2/buckets/${l[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(l[`bucket-name`]))}/lock`,pathParams:{"bucket-name":String(l[`bucket-name`]??``)},bodyKind:`none`});return}let u=await n(l),d=l.local?e:await i();l.accountId=d;let f=await s(`Loading`,async()=>t(u,`GET`,`/accounts/${d}/r2/buckets/${encodeURIComponent(String(l[`bucket-name`]))}/lock`,{headers:Object.keys(c).length>0?c:void 0}));a(f,{successLabel:`Loaded`})})};function je(e){return e.usage(`$0 r2 buckets locks update <bucket-name>
65
+ Get lock rules for a bucket.`).positional(`bucket-name`,{type:`string`,description:`Name of the bucket.`,demandOption:!0}).option(`cf-r2-jurisdiction`,{type:`string`,description:`Jurisdiction where objects in this bucket are guaranteed to be stored.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Me={command:`get <bucket-name>`,describe:`Get Bucket Lock Rules`,builder:je,handler:async l=>c({command:`r2 buckets locks get`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={};if(l[`cf-r2-jurisdiction`]!==void 0&&(c[`cf-r2-jurisdiction`]=String(l[`cf-r2-jurisdiction`])),l.dryRun){let e=await r();o({command:`cf r2 buckets locks get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/r2/buckets/${l[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(l[`bucket-name`]))}/lock`,pathParams:{"bucket-name":String(l[`bucket-name`]??``)},bodyKind:`none`});return}let u=await n(l),d=l.local?e:await i();l.accountId=d;let f=await s(`Loading`,async()=>t(u,`GET`,`/accounts/${d}/r2/buckets/${encodeURIComponent(String(l[`bucket-name`]))}/lock`,{headers:Object.keys(c).length>0?c:void 0}));a(f,{successLabel:`Loaded`})})};function Ne(e){return e.usage(`$0 r2 buckets locks update <bucket-name>
63
66
 
64
- Replaces the lock rules for an R2 bucket. Enabled rules prevent matching objects from being overwritten or deleted for a duration, until a date, or indefinitely. Rules apply to existing and newly uploaded objects.`).positional(`bucket-name`,{type:`string`,description:`Name of the bucket.`,demandOption:!0}).option(`cf-r2-jurisdiction`,{type:`string`,description:`Jurisdiction where objects in this bucket are guaranteed to be stored.`}).option(`rules`,{type:`string`,description:`The rules field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Me={command:`update <bucket-name>`,describe:`Set Bucket Lock Rules`,builder:je,handler:async p=>c({command:`r2 buckets locks update`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},p,async()=>{let c={};if(p[`cf-r2-jurisdiction`]!==void 0&&(c[`cf-r2-jurisdiction`]=String(p[`cf-r2-jurisdiction`])),p.dryRun){let e=await r();o({command:`cf r2 buckets locks update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/r2/buckets/${p[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(p[`bucket-name`]))}/lock`,pathParams:{"bucket-name":String(p[`bucket-name`]??``)},bodyKind:`json`,body:p.body===void 0?f({rules:d(p.rules,`rules`)}):u(p.body)});return}let m=await n(p),h=p.local?e:await i();if(p.accountId=h,!await _({force:!!p.force,message:`This replaces the R2 bucket's lock rules. Removing or shortening retention can allow objects to be overwritten or deleted.`})){process.stderr.write(`Aborted.
65
- `);return}if(p.body){let e=u(p.body),n=await s(`Deleting`,async()=>t(m,`PUT`,`/accounts/${h}/r2/buckets/${encodeURIComponent(String(p[`bucket-name`]))}/lock`,{body:e,headers:Object.keys(c).length>0?c:void 0}));a(n,{successLabel:`Deleted`});return}let g={};p.rules!==void 0&&l(g,[`rules`],d(p.rules,`rules`));let v=await s(`Deleting`,async()=>t(m,`PUT`,`/accounts/${h}/r2/buckets/${encodeURIComponent(String(p[`bucket-name`]))}/lock`,{body:Object.keys(g).length>0?g:void 0,headers:Object.keys(c).length>0?c:void 0}));a(v,{successLabel:`Deleted`})})},Ne={command:`locks`,describe:`Operations for buckets.locks`,builder:e=>e.command(Oe).command(Ae).command(Me).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Pe(e){return e.usage(`$0 r2 buckets metrics list
67
+ Replaces the lock rules for an R2 bucket. Enabled rules prevent matching objects from being overwritten or deleted for a duration, until a date, or indefinitely. Rules apply to existing and newly uploaded objects.`).positional(`bucket-name`,{type:`string`,description:`Name of the bucket.`,demandOption:!0}).option(`cf-r2-jurisdiction`,{type:`string`,description:`Jurisdiction where objects in this bucket are guaranteed to be stored.`}).option(`rules`,{type:`string`,description:`The rules field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Pe={command:`update <bucket-name>`,describe:`Set Bucket Lock Rules`,builder:Ne,handler:async p=>c({command:`r2 buckets locks update`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},p,async()=>{let c={};if(p[`cf-r2-jurisdiction`]!==void 0&&(c[`cf-r2-jurisdiction`]=String(p[`cf-r2-jurisdiction`])),p.dryRun){let e=await r();o({command:`cf r2 buckets locks update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/r2/buckets/${p[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(p[`bucket-name`]))}/lock`,pathParams:{"bucket-name":String(p[`bucket-name`]??``)},bodyKind:`json`,body:p.body===void 0?f({rules:d(p.rules,`rules`)}):u(p.body)});return}let m=await n(p),h=p.local?e:await i();if(p.accountId=h,!await _({force:!!p.force,message:`This replaces the R2 bucket's lock rules. Removing or shortening retention can allow objects to be overwritten or deleted.`})){process.stderr.write(`Aborted.
68
+ `);return}if(p.body){let e=u(p.body),n=await s(`Deleting`,async()=>t(m,`PUT`,`/accounts/${h}/r2/buckets/${encodeURIComponent(String(p[`bucket-name`]))}/lock`,{body:e,headers:Object.keys(c).length>0?c:void 0}));a(n,{successLabel:`Deleted`});return}let g={};p.rules!==void 0&&l(g,[`rules`],d(p.rules,`rules`));let v=await s(`Deleting`,async()=>t(m,`PUT`,`/accounts/${h}/r2/buckets/${encodeURIComponent(String(p[`bucket-name`]))}/lock`,{body:Object.keys(g).length>0?g:void 0,headers:Object.keys(c).length>0?c:void 0}));a(v,{successLabel:`Deleted`})})},Fe={command:`locks`,describe:`Operations for buckets.locks`,builder:e=>e.command(Ae).command(Me).command(Pe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ie(e){return e.usage(`$0 r2 buckets metrics list
66
69
 
67
- Get Storage/Object Count Metrics across all buckets in your account. Note that Account-Level Metrics may not immediately reflect the latest data.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Fe={command:`list`,describe:`Get Account-Level Metrics`,builder:Pe,handler:async t=>c({command:`r2 buckets metrics list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf r2 buckets metrics list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/r2/metrics`,pathParams:{},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.r2.buckets.metrics.list({account_id:l}));a(u,{successLabel:`Loaded`})})},Ie={command:`metrics`,describe:`Operations for buckets.metrics`,builder:e=>e.command(Fe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Le(e){return e.usage(`$0 r2 buckets sippy delete <bucket-name>
70
+ Get Storage/Object Count Metrics across all buckets in your account. Note that Account-Level Metrics may not immediately reflect the latest data.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Le={command:`list`,describe:`Get Account-Level Metrics`,builder:Ie,handler:async t=>c({command:`r2 buckets metrics list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf r2 buckets metrics list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/r2/metrics`,pathParams:{},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.r2.buckets.metrics.list({account_id:l}));a(u,{successLabel:`Loaded`})})},Re={command:`metrics`,describe:`Operations for buckets.metrics`,builder:e=>e.command(Le).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ze(e){return e.usage(`$0 r2 buckets sippy delete <bucket-name>
68
71
 
69
- Disables Sippy on-demand migration for an R2 bucket. Requests no longer fetch missing objects from the source storage provider. Objects already copied to R2 remain in the bucket.`).positional(`bucket-name`,{type:`string`,description:`Name of the bucket.`,demandOption:!0}).option(`cf-r2-jurisdiction`,{type:`string`,description:`Jurisdiction where objects in this bucket are guaranteed to be stored.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Re={command:`delete <bucket-name>`,describe:`Disable Sippy`,builder:Le,handler:async l=>c({command:`r2 buckets sippy delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},l,async()=>{let c={};if(l[`cf-r2-jurisdiction`]!==void 0&&(c[`cf-r2-jurisdiction`]=String(l[`cf-r2-jurisdiction`])),l.dryRun){let e=await r();o({command:`cf r2 buckets sippy delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/r2/buckets/${l[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(l[`bucket-name`]))}/sippy`,pathParams:{"bucket-name":String(l[`bucket-name`]??``)},bodyKind:`none`});return}let u=await n(l),d=l.local?e:await i();if(l.accountId=d,!await _({force:!!l.force,message:`This disables Sippy on-demand migration for the R2 bucket. Objects already copied to R2 remain in the bucket.`})){process.stderr.write(`Aborted.
70
- `);return}let f=await s(`Deleting`,async()=>t(u,`DELETE`,`/accounts/${d}/r2/buckets/${encodeURIComponent(String(l[`bucket-name`]))}/sippy`,{headers:Object.keys(c).length>0?c:void 0}));a(f,{successLabel:`Deleted`})})};function ze(e){return e.usage(`$0 r2 buckets sippy get <bucket-name>
72
+ Disables Sippy on-demand migration for an R2 bucket. Requests no longer fetch missing objects from the source storage provider. Objects already copied to R2 remain in the bucket.`).positional(`bucket-name`,{type:`string`,description:`Name of the bucket.`,demandOption:!0}).option(`cf-r2-jurisdiction`,{type:`string`,description:`Jurisdiction where objects in this bucket are guaranteed to be stored.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Be={command:`delete <bucket-name>`,describe:`Disable Sippy`,builder:ze,handler:async l=>c({command:`r2 buckets sippy delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},l,async()=>{let c={};if(l[`cf-r2-jurisdiction`]!==void 0&&(c[`cf-r2-jurisdiction`]=String(l[`cf-r2-jurisdiction`])),l.dryRun){let e=await r();o({command:`cf r2 buckets sippy delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/r2/buckets/${l[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(l[`bucket-name`]))}/sippy`,pathParams:{"bucket-name":String(l[`bucket-name`]??``)},bodyKind:`none`});return}let u=await n(l),d=l.local?e:await i();if(l.accountId=d,!await _({force:!!l.force,message:`This disables Sippy on-demand migration for the R2 bucket. Objects already copied to R2 remain in the bucket.`})){process.stderr.write(`Aborted.
73
+ `);return}let f=await s(`Deleting`,async()=>t(u,`DELETE`,`/accounts/${d}/r2/buckets/${encodeURIComponent(String(l[`bucket-name`]))}/sippy`,{headers:Object.keys(c).length>0?c:void 0}));a(f,{successLabel:`Deleted`})})};function Ve(e){return e.usage(`$0 r2 buckets sippy get <bucket-name>
71
74
 
72
- Gets configuration for Sippy for an existing R2 bucket.`).positional(`bucket-name`,{type:`string`,description:`Name of the bucket.`,demandOption:!0}).option(`cf-r2-jurisdiction`,{type:`string`,description:`Jurisdiction where objects in this bucket are guaranteed to be stored.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Be={command:`get <bucket-name>`,describe:`Get Sippy Configuration`,builder:ze,handler:async l=>c({command:`r2 buckets sippy get`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={};if(l[`cf-r2-jurisdiction`]!==void 0&&(c[`cf-r2-jurisdiction`]=String(l[`cf-r2-jurisdiction`])),l.dryRun){let e=await r();o({command:`cf r2 buckets sippy get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/r2/buckets/${l[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(l[`bucket-name`]))}/sippy`,pathParams:{"bucket-name":String(l[`bucket-name`]??``)},bodyKind:`none`});return}let u=await n(l),d=l.local?e:await i();l.accountId=d;let f=await s(`Loading`,async()=>t(u,`GET`,`/accounts/${d}/r2/buckets/${encodeURIComponent(String(l[`bucket-name`]))}/sippy`,{headers:Object.keys(c).length>0?c:void 0}));a(f,{successLabel:`Loaded`})})};function Ve(e){return e.usage(`$0 r2 buckets sippy update <bucket-name>
75
+ Gets configuration for Sippy for an existing R2 bucket.`).positional(`bucket-name`,{type:`string`,description:`Name of the bucket.`,demandOption:!0}).option(`cf-r2-jurisdiction`,{type:`string`,description:`Jurisdiction where objects in this bucket are guaranteed to be stored.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const He={command:`get <bucket-name>`,describe:`Get Sippy Configuration`,builder:Ve,handler:async l=>c({command:`r2 buckets sippy get`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={};if(l[`cf-r2-jurisdiction`]!==void 0&&(c[`cf-r2-jurisdiction`]=String(l[`cf-r2-jurisdiction`])),l.dryRun){let e=await r();o({command:`cf r2 buckets sippy get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/r2/buckets/${l[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(l[`bucket-name`]))}/sippy`,pathParams:{"bucket-name":String(l[`bucket-name`]??``)},bodyKind:`none`});return}let u=await n(l),d=l.local?e:await i();l.accountId=d;let f=await s(`Loading`,async()=>t(u,`GET`,`/accounts/${d}/r2/buckets/${encodeURIComponent(String(l[`bucket-name`]))}/sippy`,{headers:Object.keys(c).length>0?c:void 0}));a(f,{successLabel:`Loaded`})})};function Ue(e){return e.usage(`$0 r2 buckets sippy update <bucket-name>
73
76
 
74
77
  Configures and enables Sippy on-demand migration for an R2 bucket. When a requested object is missing from R2, Sippy serves it from the configured source storage provider and copies it to R2.`).positional(`bucket-name`,{type:`string`,description:`Name of the bucket.`,demandOption:!0}).option(`cf-r2-jurisdiction`,{type:`string`,description:`Jurisdiction where objects in this bucket are guaranteed to be stored.`}).option(`destination-access-key-id`,{type:`string`,description:`ID of a Cloudflare API token.
75
78
  This is the value labelled "Access Key ID" when creating an API.
@@ -83,43 +86,43 @@ token from the [R2 dashboard](https://dash.cloudflare.com/?to=/:account/r2/api-t
83
86
 
84
87
  Sippy will use this token when writing objects to R2, so it is
85
88
  best to scope this token to the bucket you're enabling Sippy for.
86
- `}).option(`source-access-key-id`,{type:`string`,description:`Access Key ID of an IAM credential (ideally scoped to a single S3 bucket).`}).option(`source-bucket`,{type:`string`,description:`Name of the AWS S3 bucket.`}).option(`source-provider`,{type:`string`,description:`The source.provider field`,choices:[`aws`,`gcs`,`s3`,`azure`]}).option(`source-region`,{type:`string`,description:`AWS region containing the source S3 bucket.`}).option(`source-secret-access-key`,{type:`string`,description:`Secret Access Key of an IAM credential (ideally scoped to a single S3 bucket).`}).option(`source-client-email`,{type:`string`,description:`Client email of an IAM credential (ideally scoped to a single GCS bucket).`}).option(`source-private-key`,{type:`string`,description:`Private Key of an IAM credential (ideally scoped to a single GCS bucket).`}).option(`source-bucket-url`,{type:`string`,description:`URL to the S3-compatible API of the bucket.`}).option(`source-account-key`,{type:`string`,description:`Access key for the Azure Storage account. Mutually exclusive with sasToken.`}).option(`source-account-name`,{type:`string`,description:`Name of the Azure Storage account.`}).option(`source-container`,{type:`string`,description:`Name of the Azure Blob Storage container.`}).option(`source-sas-token`,{type:`string`,description:`Shared Access Signature token for the Azure Storage account. Mutually exclusive with accountKey.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).conflicts(`source-bucket`,[`source-bucket-url`,`source-account-key`,`source-account-name`,`source-container`,`source-sas-token`]).conflicts(`source-region`,[`source-client-email`,`source-private-key`,`source-bucket-url`,`source-account-key`,`source-account-name`,`source-container`,`source-sas-token`]).conflicts(`source-client-email`,[`source-region`,`source-bucket-url`,`source-account-key`,`source-account-name`,`source-container`,`source-sas-token`]).conflicts(`source-private-key`,[`source-region`,`source-bucket-url`,`source-account-key`,`source-account-name`,`source-container`,`source-sas-token`]).conflicts(`source-bucket-url`,[`source-bucket`,`source-region`,`source-client-email`,`source-private-key`,`source-account-key`,`source-account-name`,`source-container`,`source-sas-token`]).conflicts(`source-account-key`,[`source-bucket`,`source-region`,`source-client-email`,`source-private-key`,`source-bucket-url`]).conflicts(`source-account-name`,[`source-bucket`,`source-region`,`source-client-email`,`source-private-key`,`source-bucket-url`]).conflicts(`source-container`,[`source-bucket`,`source-region`,`source-client-email`,`source-private-key`,`source-bucket-url`]).conflicts(`source-sas-token`,[`source-bucket`,`source-region`,`source-client-email`,`source-private-key`,`source-bucket-url`])}const He={command:`update <bucket-name>`,describe:`Enable Sippy`,builder:Ve,handler:async d=>c({command:`r2 buckets sippy update`,classification:{safeFlags:[`destination-provider`,`source-provider`,`dry-run`]}},d,async()=>{let c={};if(d[`cf-r2-jurisdiction`]!==void 0&&(c[`cf-r2-jurisdiction`]=String(d[`cf-r2-jurisdiction`])),d.dryRun){let e=await r();o({command:`cf r2 buckets sippy update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/r2/buckets/${d[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(d[`bucket-name`]))}/sippy`,pathParams:{"bucket-name":String(d[`bucket-name`]??``)},bodyKind:`json`,body:d.body===void 0?f({destination:{accessKeyId:p(d[`destination-access-key-id`],`destination-access-key-id`,`text`),provider:p(d[`destination-provider`],`destination-provider`,`text`),secretAccessKey:p(d[`destination-secret-access-key`],`destination-secret-access-key`,`text`)},source:{accessKeyId:p(d[`source-access-key-id`],`source-access-key-id`,`text`),bucket:p(d[`source-bucket`],`source-bucket`,`text`),provider:p(d[`source-provider`],`source-provider`,`text`),region:p(d[`source-region`],`source-region`,`text`),secretAccessKey:p(d[`source-secret-access-key`],`source-secret-access-key`,`text`),clientEmail:p(d[`source-client-email`],`source-client-email`,`text`),privateKey:p(d[`source-private-key`],`source-private-key`,`text`),bucketUrl:p(d[`source-bucket-url`],`source-bucket-url`,`text`),accountKey:p(d[`source-account-key`],`source-account-key`,`text`),accountName:p(d[`source-account-name`],`source-account-name`,`text`),container:p(d[`source-container`],`source-container`,`text`),sasToken:p(d[`source-sas-token`],`source-sas-token`,`text`)}}):u(d.body)});return}let m=await n(d),h=d.local?e:await i();if(d.accountId=h,d.body){let e=u(d.body),n=await s(`Updating`,async()=>t(m,`PUT`,`/accounts/${h}/r2/buckets/${encodeURIComponent(String(d[`bucket-name`]))}/sippy`,{body:e,headers:Object.keys(c).length>0?c:void 0}));a(n,{successLabel:`Updated`});return}let g={};d[`destination-access-key-id`]!==void 0&&l(g,[`destination`,`accessKeyId`],p(d[`destination-access-key-id`],`destination-access-key-id`,`text`)),d[`destination-provider`]!==void 0&&l(g,[`destination`,`provider`],p(d[`destination-provider`],`destination-provider`,`text`)),d[`destination-secret-access-key`]!==void 0&&l(g,[`destination`,`secretAccessKey`],p(d[`destination-secret-access-key`],`destination-secret-access-key`,`text`)),d[`source-access-key-id`]!==void 0&&l(g,[`source`,`accessKeyId`],p(d[`source-access-key-id`],`source-access-key-id`,`text`)),d[`source-bucket`]!==void 0&&l(g,[`source`,`bucket`],p(d[`source-bucket`],`source-bucket`,`text`)),d[`source-provider`]!==void 0&&l(g,[`source`,`provider`],p(d[`source-provider`],`source-provider`,`text`)),d[`source-region`]!==void 0&&l(g,[`source`,`region`],p(d[`source-region`],`source-region`,`text`)),d[`source-secret-access-key`]!==void 0&&l(g,[`source`,`secretAccessKey`],p(d[`source-secret-access-key`],`source-secret-access-key`,`text`)),d[`source-client-email`]!==void 0&&l(g,[`source`,`clientEmail`],p(d[`source-client-email`],`source-client-email`,`text`)),d[`source-private-key`]!==void 0&&l(g,[`source`,`privateKey`],p(d[`source-private-key`],`source-private-key`,`text`)),d[`source-bucket-url`]!==void 0&&l(g,[`source`,`bucketUrl`],p(d[`source-bucket-url`],`source-bucket-url`,`text`)),d[`source-account-key`]!==void 0&&l(g,[`source`,`accountKey`],p(d[`source-account-key`],`source-account-key`,`text`)),d[`source-account-name`]!==void 0&&l(g,[`source`,`accountName`],p(d[`source-account-name`],`source-account-name`,`text`)),d[`source-container`]!==void 0&&l(g,[`source`,`container`],p(d[`source-container`],`source-container`,`text`)),d[`source-sas-token`]!==void 0&&l(g,[`source`,`sasToken`],p(d[`source-sas-token`],`source-sas-token`,`text`));let _=await s(`Updating`,async()=>t(m,`PUT`,`/accounts/${h}/r2/buckets/${encodeURIComponent(String(d[`bucket-name`]))}/sippy`,{body:Object.keys(g).length>0?g:void 0,headers:Object.keys(c).length>0?c:void 0}));a(_,{successLabel:`Updated`})})},Ue={command:`sippy`,describe:`Operations for buckets.sippy`,builder:e=>e.command(Re).command(Be).command(He).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},We={command:`buckets`,describe:`Create and configure R2 buckets including CORS, lifecycle, custom domains, event notifications, and object locks`,builder:e=>e.command(O).command(E).command(A).command(Y).command(le).command(xe).command(w).command(q).command(se).command(me).command(ye).command(Ee).command(Ne).command(Ie).command(Ue).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ge(e){return e.usage("$0 r2 objects bulk-delete\n\nDeletes objects from an R2 bucket. Three modes are supported: 1. **Delete by list** (default): Provide a JSON array of object keys in the request body. All listed objects are deleted; per-key errors are reported in the response. 2. **Delete by prefix**: Provide a non-empty `prefix` query parameter and no request body to delete every object whose key begins with that prefix. 3. **Empty bucket**: Provide the `prefix` query parameter with an empty value (`?prefix=`) and no request body to delete all objects in the bucket. Prefix and empty-bucket requests return a job descriptor. Small jobs can finish synchronously and return `COMPLETED`; larger jobs continue in the background. Poll the returned `id` with the Get Bucket Job endpoint. Objects uploaded after a background job starts are not deleted by that job. Abort active multipart uploads before submitting the request; a synchronously completed job does not abort them. Avoid writing objects or starting multipart uploads while a bucket-emptying job is in progress. Each repeated or concurrent request creates a distinct job. The number of active jobs is limited per bucket; wait for an existing job to finish before retrying a request rejected with HTTP 429. A bucket cannot be emptied while event notifications are configured. Remove the event notification rules and retry requests rejected with HTTP 409 / error code 10034. To protect a bucket with R2 Data Catalog enabled, send the `cf-r2-data-catalog-check` header; a conflict is returned with HTTP 409 / error code 10081. For most workloads, we recommend using R2's [S3-compatible API](https://developers.cloudflare.com/r2/api/s3/api/) or a [Worker with an R2 binding](https://developers.cloudflare.com/r2/api/workers/workers-api-reference/) instead.").option(`bucket-name`,{type:`string`,description:`Name of the bucket.`,demandOption:!0}).option(`prefix`,{type:`string`,description:"When present, switches the operation to prefix-delete mode. A non-empty value must\nend in `/` and deletes keys beginning with that prefix. Preserve an empty value\n(`?prefix=`) to empty the entire bucket. Omitting this parameter instead selects\ndelete-by-list mode and requires a JSON request body."}).option(`cf-r2-jurisdiction`,{type:`string`,description:`Jurisdiction where objects in this bucket are guaranteed to be stored.`}).option(`cf-r2-data-catalog-check`,{type:`string`,description:`Set this header to reject the operation when R2 Data Catalog is enabled for the bucket.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:'Required for "delete by list" mode (when `prefix` query parameter is omitted). A JSON array of object keys to delete. Ignored when `prefix` is provided. '})}const Ke={command:`bulk-delete`,describe:`Delete Objects or Empty a Bucket`,builder:Ge,handler:async l=>c({command:`r2 objects bulk-delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},l,async()=>{let c={prefix:l.prefix},d={};if(l[`cf-r2-jurisdiction`]!==void 0&&(d[`cf-r2-jurisdiction`]=String(l[`cf-r2-jurisdiction`])),l[`cf-r2-data-catalog-check`]!==void 0&&(d[`cf-r2-data-catalog-check`]=String(l[`cf-r2-data-catalog-check`])),l.dryRun){let e=await r();o({command:`cf r2 objects bulk-delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/r2/buckets/${l[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(l[`bucket-name`]))}/objects`,pathParams:{"bucket-name":String(l[`bucket-name`]??``)},query:c,bodyKind:`json`,body:l.body===void 0?void 0:u(l.body)});return}let f=await n(l),p=l.local?e:await i();if(l.accountId=p,!await _({force:!!l.force,message:`This permanently deletes the selected R2 objects. An explicitly empty prefix deletes every object in the bucket while retaining the bucket itself.`})){process.stderr.write(`Aborted.
87
- `);return}if(l.body){let e=u(l.body),n=new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),r=await s(`Deleting`,async()=>t(f,`DELETE`,`/accounts/${p}/r2/buckets/${encodeURIComponent(String(l[`bucket-name`]))}/objects${n?`?`+n:``}`,{body:e,headers:Object.keys(d).length>0?d:void 0}));a(r,{successLabel:`Deleted`});return}if(l.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function qe(e){return e.usage(`$0 r2 objects delete <object-key>
89
+ `}).option(`source-access-key-id`,{type:`string`,description:`Access Key ID of an IAM credential (ideally scoped to a single S3 bucket).`}).option(`source-bucket`,{type:`string`,description:`Name of the AWS S3 bucket.`}).option(`source-provider`,{type:`string`,description:`The source.provider field`,choices:[`aws`,`gcs`,`s3`,`azure`]}).option(`source-region`,{type:`string`,description:`AWS region containing the source S3 bucket.`}).option(`source-secret-access-key`,{type:`string`,description:`Secret Access Key of an IAM credential (ideally scoped to a single S3 bucket).`}).option(`source-client-email`,{type:`string`,description:`Client email of an IAM credential (ideally scoped to a single GCS bucket).`}).option(`source-private-key`,{type:`string`,description:`Private Key of an IAM credential (ideally scoped to a single GCS bucket).`}).option(`source-bucket-url`,{type:`string`,description:`URL to the S3-compatible API of the bucket.`}).option(`source-account-key`,{type:`string`,description:`Access key for the Azure Storage account. Mutually exclusive with sasToken.`}).option(`source-account-name`,{type:`string`,description:`Name of the Azure Storage account.`}).option(`source-container`,{type:`string`,description:`Name of the Azure Blob Storage container.`}).option(`source-sas-token`,{type:`string`,description:`Shared Access Signature token for the Azure Storage account. Mutually exclusive with accountKey.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).conflicts(`source-bucket`,[`source-bucket-url`,`source-account-key`,`source-account-name`,`source-container`,`source-sas-token`]).conflicts(`source-region`,[`source-client-email`,`source-private-key`,`source-bucket-url`,`source-account-key`,`source-account-name`,`source-container`,`source-sas-token`]).conflicts(`source-client-email`,[`source-region`,`source-bucket-url`,`source-account-key`,`source-account-name`,`source-container`,`source-sas-token`]).conflicts(`source-private-key`,[`source-region`,`source-bucket-url`,`source-account-key`,`source-account-name`,`source-container`,`source-sas-token`]).conflicts(`source-bucket-url`,[`source-bucket`,`source-region`,`source-client-email`,`source-private-key`,`source-account-key`,`source-account-name`,`source-container`,`source-sas-token`]).conflicts(`source-account-key`,[`source-bucket`,`source-region`,`source-client-email`,`source-private-key`,`source-bucket-url`]).conflicts(`source-account-name`,[`source-bucket`,`source-region`,`source-client-email`,`source-private-key`,`source-bucket-url`]).conflicts(`source-container`,[`source-bucket`,`source-region`,`source-client-email`,`source-private-key`,`source-bucket-url`]).conflicts(`source-sas-token`,[`source-bucket`,`source-region`,`source-client-email`,`source-private-key`,`source-bucket-url`])}const We={command:`update <bucket-name>`,describe:`Enable Sippy`,builder:Ue,handler:async d=>c({command:`r2 buckets sippy update`,classification:{safeFlags:[`destination-provider`,`source-provider`,`dry-run`]}},d,async()=>{let c={};if(d[`cf-r2-jurisdiction`]!==void 0&&(c[`cf-r2-jurisdiction`]=String(d[`cf-r2-jurisdiction`])),d.dryRun){let e=await r();o({command:`cf r2 buckets sippy update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/r2/buckets/${d[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(d[`bucket-name`]))}/sippy`,pathParams:{"bucket-name":String(d[`bucket-name`]??``)},bodyKind:`json`,body:d.body===void 0?f({destination:{accessKeyId:p(d[`destination-access-key-id`],`destination-access-key-id`,`text`),provider:p(d[`destination-provider`],`destination-provider`,`text`),secretAccessKey:p(d[`destination-secret-access-key`],`destination-secret-access-key`,`text`)},source:{accessKeyId:p(d[`source-access-key-id`],`source-access-key-id`,`text`),bucket:p(d[`source-bucket`],`source-bucket`,`text`),provider:p(d[`source-provider`],`source-provider`,`text`),region:p(d[`source-region`],`source-region`,`text`),secretAccessKey:p(d[`source-secret-access-key`],`source-secret-access-key`,`text`),clientEmail:p(d[`source-client-email`],`source-client-email`,`text`),privateKey:p(d[`source-private-key`],`source-private-key`,`text`),bucketUrl:p(d[`source-bucket-url`],`source-bucket-url`,`text`),accountKey:p(d[`source-account-key`],`source-account-key`,`text`),accountName:p(d[`source-account-name`],`source-account-name`,`text`),container:p(d[`source-container`],`source-container`,`text`),sasToken:p(d[`source-sas-token`],`source-sas-token`,`text`)}}):u(d.body),sensitiveBodyPaths:[[`destination`,`secretAccessKey`],[`source`,`secretAccessKey`],[`source`,`privateKey`],[`source`,`accountKey`],[`source`,`sasToken`]]});return}let m=await n(d),h=d.local?e:await i();if(d.accountId=h,d.body){let e=u(d.body),n=await s(`Updating`,async()=>t(m,`PUT`,`/accounts/${h}/r2/buckets/${encodeURIComponent(String(d[`bucket-name`]))}/sippy`,{body:e,headers:Object.keys(c).length>0?c:void 0}));a(n,{successLabel:`Updated`});return}let g={};d[`destination-access-key-id`]!==void 0&&l(g,[`destination`,`accessKeyId`],p(d[`destination-access-key-id`],`destination-access-key-id`,`text`)),d[`destination-provider`]!==void 0&&l(g,[`destination`,`provider`],p(d[`destination-provider`],`destination-provider`,`text`)),d[`destination-secret-access-key`]!==void 0&&l(g,[`destination`,`secretAccessKey`],p(d[`destination-secret-access-key`],`destination-secret-access-key`,`text`)),d[`source-access-key-id`]!==void 0&&l(g,[`source`,`accessKeyId`],p(d[`source-access-key-id`],`source-access-key-id`,`text`)),d[`source-bucket`]!==void 0&&l(g,[`source`,`bucket`],p(d[`source-bucket`],`source-bucket`,`text`)),d[`source-provider`]!==void 0&&l(g,[`source`,`provider`],p(d[`source-provider`],`source-provider`,`text`)),d[`source-region`]!==void 0&&l(g,[`source`,`region`],p(d[`source-region`],`source-region`,`text`)),d[`source-secret-access-key`]!==void 0&&l(g,[`source`,`secretAccessKey`],p(d[`source-secret-access-key`],`source-secret-access-key`,`text`)),d[`source-client-email`]!==void 0&&l(g,[`source`,`clientEmail`],p(d[`source-client-email`],`source-client-email`,`text`)),d[`source-private-key`]!==void 0&&l(g,[`source`,`privateKey`],p(d[`source-private-key`],`source-private-key`,`text`)),d[`source-bucket-url`]!==void 0&&l(g,[`source`,`bucketUrl`],p(d[`source-bucket-url`],`source-bucket-url`,`text`)),d[`source-account-key`]!==void 0&&l(g,[`source`,`accountKey`],p(d[`source-account-key`],`source-account-key`,`text`)),d[`source-account-name`]!==void 0&&l(g,[`source`,`accountName`],p(d[`source-account-name`],`source-account-name`,`text`)),d[`source-container`]!==void 0&&l(g,[`source`,`container`],p(d[`source-container`],`source-container`,`text`)),d[`source-sas-token`]!==void 0&&l(g,[`source`,`sasToken`],p(d[`source-sas-token`],`source-sas-token`,`text`));let _=await s(`Updating`,async()=>t(m,`PUT`,`/accounts/${h}/r2/buckets/${encodeURIComponent(String(d[`bucket-name`]))}/sippy`,{body:Object.keys(g).length>0?g:void 0,headers:Object.keys(c).length>0?c:void 0}));a(_,{successLabel:`Updated`})})},Ge={command:`sippy`,describe:`Operations for buckets.sippy`,builder:e=>e.command(Be).command(He).command(We).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ke={command:`buckets`,describe:`Create and configure R2 buckets including CORS, lifecycle, custom domains, event notifications, and object locks`,builder:e=>e.command(O).command(E).command(A).command(Y).command(le).command(Ce).command(w).command(q).command(se).command(ge).command(xe).command(Oe).command(Fe).command(Re).command(Ge).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function qe(e){return e.usage("$0 r2 objects bulk-delete\n\nDeletes the listed objects from an R2 bucket. Provide a JSON array of 1 to 1000 object keys in the request body. If any key cannot be deleted (for example, because it does not exist or is locked), the remaining keys are still deleted, but the response is HTTP 200 with `success: false`, `result: null` and one entry in `errors` per failed key. The entries in `errors` do not identify which key failed. To delete every object under a prefix, or to empty a bucket, create a `prefixDelete` job with the Create Bucket Job endpoint instead. The `prefix` query parameter on this endpoint is deprecated; it creates the same job, but responses to it carry a `Deprecation` header and a message pointing to Create Bucket Job. For most workloads, we recommend using R2's [S3-compatible API](https://developers.cloudflare.com/r2/api/s3/api/) or a [Worker with an R2 binding](https://developers.cloudflare.com/r2/api/workers/workers-api-reference/) instead.").option(`bucket-name`,{type:`string`,description:`Name of the bucket.`,demandOption:!0}).option(`prefix`,{type:`string`,description:"Deprecated. Create a `prefixDelete` job with the Create Bucket Job endpoint instead.\nWhen present, the request body is ignored and a prefix-delete job is created for this\nprefix, exactly as Create Bucket Job does; an empty value empties the bucket. The\nresponse is the job descriptor, with a `Deprecation` header and a deprecation message\nin `messages`."}).option(`cf-r2-jurisdiction`,{type:`string`,description:`Jurisdiction where objects in this bucket are guaranteed to be stored.`}).option(`cf-r2-data-catalog-check`,{type:`string`,description:`Set this header to reject the operation when R2 Data Catalog is enabled for the bucket.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:"A JSON array of 1 to 1000 object keys to delete. Required unless the deprecated `prefix` parameter is present."})}const Je={command:`bulk-delete`,describe:`Delete Objects`,builder:qe,handler:async l=>c({command:`r2 objects bulk-delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},l,async()=>{let c={prefix:l.prefix},d={};if(l[`cf-r2-jurisdiction`]!==void 0&&(d[`cf-r2-jurisdiction`]=String(l[`cf-r2-jurisdiction`])),l[`cf-r2-data-catalog-check`]!==void 0&&(d[`cf-r2-data-catalog-check`]=String(l[`cf-r2-data-catalog-check`])),l.dryRun){let e=await r();o({command:`cf r2 objects bulk-delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/r2/buckets/${l[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(l[`bucket-name`]))}/objects`,pathParams:{"bucket-name":String(l[`bucket-name`]??``)},query:c,bodyKind:`json`,body:l.body===void 0?void 0:u(l.body)});return}let f=await n(l),p=l.local?e:await i();if(l.accountId=p,!await _({force:!!l.force,message:"This permanently deletes the listed R2 objects. With the deprecated `prefix` parameter it deletes every object under that prefix, and an empty prefix empties the bucket."})){process.stderr.write(`Aborted.
90
+ `);return}if(l.body){let e=u(l.body),n=new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();if(Array.isArray(e)&&e.length>1e3){let r=Math.ceil(e.length/1e3),i=null;for(let a=0;a<e.length;a+=1e3){let o=e.slice(a,a+1e3),c=Math.floor(a/1e3)+1;i=await s(`Deleting: batch ${c}/${r}`,async()=>t(f,`DELETE`,`/accounts/${p}/r2/buckets/${encodeURIComponent(String(l[`bucket-name`]))}/objects${n?`?`+n:``}`,{body:o,headers:Object.keys(d).length>0?d:void 0}))}a(i,{successLabel:`Deleted`});return}let r=await s(`Deleting`,async()=>t(f,`DELETE`,`/accounts/${p}/r2/buckets/${encodeURIComponent(String(l[`bucket-name`]))}/objects${n?`?`+n:``}`,{body:e,headers:Object.keys(d).length>0?d:void 0}));a(r,{successLabel:`Deleted`});return}if(l.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function Ye(e){return e.usage(`$0 r2 objects delete <object-key>
88
91
 
89
- Deletes an object from an R2 bucket. For most workloads, we recommend using R2's [S3-compatible API](https://developers.cloudflare.com/r2/api/s3/api/) or a [Worker with an R2 binding](https://developers.cloudflare.com/r2/api/workers/workers-api-reference/) instead.`).positional(`object-key`,{type:`string`,description:"The key (name) of the object to delete. May contain slashes for path-like keys. Slashes (`/`) within the key MUST be sent literally and MUST NOT be percent-encoded (i.e. `%2F`); other reserved characters should be percent-encoded as usual.",demandOption:!0}).option(`bucket-name`,{type:`string`,description:`Name of the bucket.`,demandOption:!0}).option(`cf-r2-jurisdiction`,{type:`string`,description:`Jurisdiction where objects in this bucket are guaranteed to be stored.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Je={command:`delete <object-key>`,describe:`Delete Object`,builder:qe,handler:async l=>c({command:`r2 objects delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},l,async()=>{let c={};if(l[`cf-r2-jurisdiction`]!==void 0&&(c[`cf-r2-jurisdiction`]=String(l[`cf-r2-jurisdiction`])),l.dryRun){let e=await r();o({command:`cf r2 objects delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/r2/buckets/${l[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(l[`bucket-name`]))}/objects/${l[`object-key`]==null?`<object-key>`:encodeURIComponent(String(l[`object-key`]))}`,pathParams:{"bucket-name":String(l[`bucket-name`]??``),"object-key":String(l[`object-key`]??``)},bodyKind:`none`});return}let u=await n(l),d=l.local?e:await i();if(l.accountId=d,!await _({force:!!l.force,message:`This permanently deletes the specified object from the R2 bucket.`})){process.stderr.write(`Aborted.
90
- `);return}let f=await s(`Deleting`,async()=>t(u,`DELETE`,`/accounts/${d}/r2/buckets/${encodeURIComponent(String(l[`bucket-name`]))}/objects/${encodeURIComponent(String(l[`object-key`]))}`,{headers:Object.keys(c).length>0?c:void 0}));a(f,{successLabel:`Deleted`})})};function Ye(e){return e.usage(`$0 r2 objects get <object-key>
92
+ Deletes an object from an R2 bucket. For most workloads, we recommend using R2's [S3-compatible API](https://developers.cloudflare.com/r2/api/s3/api/) or a [Worker with an R2 binding](https://developers.cloudflare.com/r2/api/workers/workers-api-reference/) instead.`).positional(`object-key`,{type:`string`,description:"The key (name) of the object to delete. May contain slashes for path-like keys. Slashes (`/`) within the key MUST be sent literally and MUST NOT be percent-encoded (i.e. `%2F`); other reserved characters should be percent-encoded as usual.",demandOption:!0}).option(`bucket-name`,{type:`string`,description:`Name of the bucket.`,demandOption:!0}).option(`cf-r2-jurisdiction`,{type:`string`,description:`Jurisdiction where objects in this bucket are guaranteed to be stored.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Xe={command:`delete <object-key>`,describe:`Delete Object`,builder:Ye,handler:async l=>c({command:`r2 objects delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},l,async()=>{let c={};if(l[`cf-r2-jurisdiction`]!==void 0&&(c[`cf-r2-jurisdiction`]=String(l[`cf-r2-jurisdiction`])),l.dryRun){let e=await r();o({command:`cf r2 objects delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/r2/buckets/${l[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(l[`bucket-name`]))}/objects/${l[`object-key`]==null?`<object-key>`:encodeURIComponent(String(l[`object-key`]))}`,pathParams:{"bucket-name":String(l[`bucket-name`]??``),"object-key":String(l[`object-key`]??``)},bodyKind:`none`});return}let u=await n(l),d=l.local?e:await i();if(l.accountId=d,!await _({force:!!l.force,message:`This permanently deletes the specified object from the R2 bucket.`})){process.stderr.write(`Aborted.
93
+ `);return}let f=await s(`Deleting`,async()=>t(u,`DELETE`,`/accounts/${d}/r2/buckets/${encodeURIComponent(String(l[`bucket-name`]))}/objects/${encodeURIComponent(String(l[`object-key`]))}`,{headers:Object.keys(c).length>0?c:void 0}));a(f,{successLabel:`Deleted`})})};function Ze(e){return e.usage(`$0 r2 objects get <object-key>
91
94
 
92
- Retrieves an object from an R2 bucket. Returns the object body along with metadata headers. For most workloads, we recommend using R2's [S3-compatible API](https://developers.cloudflare.com/r2/api/s3/api/) or a [Worker with an R2 binding](https://developers.cloudflare.com/r2/api/workers/workers-api-reference/) instead.`).positional(`object-key`,{type:`string`,description:"The key (name) of the object to retrieve. May contain slashes for path-like keys. Slashes (`/`) within the key MUST be sent literally and MUST NOT be percent-encoded (i.e. `%2F`); other reserved characters should be percent-encoded as usual.",demandOption:!0}).option(`bucket-name`,{type:`string`,description:`Name of the bucket.`,demandOption:!0}).option(`cf-r2-jurisdiction`,{type:`string`,description:`Jurisdiction where objects in this bucket are guaranteed to be stored.`}).option(`if-none-match`,{type:`string`,description:`Returns the object only if its ETag does not match the given value.`}).option(`if-modified-since`,{type:`string`,description:"Returns the object only if it has been modified since the specified time.\nMust be formatted as an HTTP-date (RFC 7231), e.g. `Tue, 15 Jan 2024 10:30:00 GMT`."}).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 Xe={command:`get <object-key>`,describe:`Get Object`,builder:Ye,handler:async t=>c({command:`r2 objects get`,classification:{safeFlags:[`dry-run`,`text`]}},t,async()=>{if(t[`cf-r2-jurisdiction`]!==void 0&&String(t[`cf-r2-jurisdiction`]),t[`if-none-match`]!==void 0&&String(t[`if-none-match`]),t[`if-modified-since`]!==void 0&&String(t[`if-modified-since`]),t.dryRun){let e=await r();o({command:`cf r2 objects get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/r2/buckets/${t[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(t[`bucket-name`]))}/objects/${t[`object-key`]==null?`<object-key>`:encodeURIComponent(String(t[`object-key`]))}`,pathParams:{"bucket-name":String(t[`bucket-name`]??``),"object-key":String(t[`object-key`]??``)},bodyKind:`none`});return}await n(t);let a=t.local?e:await i();t.accountId=a;let c=await s(`Loading`,async()=>ee(`/accounts/${a}/r2/buckets/${encodeURIComponent(String(t[`bucket-name`]))}/objects/${encodeURIComponent(String(t[`object-key`]))}`,{method:`GET`,local:t.local===!0,persistTo:t.persistTo}));v(t.text===!0?c.toString(`utf-8`):c)})};function Ze(e){return e.usage(`$0 r2 objects list
95
+ Retrieves an object from an R2 bucket. Returns the object body along with metadata headers. For most workloads, we recommend using R2's [S3-compatible API](https://developers.cloudflare.com/r2/api/s3/api/) or a [Worker with an R2 binding](https://developers.cloudflare.com/r2/api/workers/workers-api-reference/) instead.`).positional(`object-key`,{type:`string`,description:"The key (name) of the object to retrieve. May contain slashes for path-like keys. Slashes (`/`) within the key MUST be sent literally and MUST NOT be percent-encoded (i.e. `%2F`); other reserved characters should be percent-encoded as usual.",demandOption:!0}).option(`bucket-name`,{type:`string`,description:`Name of the bucket.`,demandOption:!0}).option(`cf-r2-jurisdiction`,{type:`string`,description:`Jurisdiction where objects in this bucket are guaranteed to be stored.`}).option(`if-none-match`,{type:`string`,description:`Returns the object only if its ETag does not match the given value.`}).option(`if-modified-since`,{type:`string`,description:"Returns the object only if it has been modified since the specified time.\nMust be formatted as an HTTP-date (RFC 7231), e.g. `Tue, 15 Jan 2024 10:30:00 GMT`."}).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 Qe={command:`get <object-key>`,describe:`Get Object`,builder:Ze,handler:async t=>c({command:`r2 objects get`,classification:{safeFlags:[`dry-run`,`text`]}},t,async()=>{if(t[`cf-r2-jurisdiction`]!==void 0&&String(t[`cf-r2-jurisdiction`]),t[`if-none-match`]!==void 0&&String(t[`if-none-match`]),t[`if-modified-since`]!==void 0&&String(t[`if-modified-since`]),t.dryRun){let e=await r();o({command:`cf r2 objects get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/r2/buckets/${t[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(t[`bucket-name`]))}/objects/${t[`object-key`]==null?`<object-key>`:encodeURIComponent(String(t[`object-key`]))}`,pathParams:{"bucket-name":String(t[`bucket-name`]??``),"object-key":String(t[`object-key`]??``)},bodyKind:`none`});return}await n(t);let a=t.local?e:await i();t.accountId=a;let c=await s(`Loading`,async()=>y(`/accounts/${a}/r2/buckets/${encodeURIComponent(String(t[`bucket-name`]))}/objects/${encodeURIComponent(String(t[`object-key`]))}`,{method:`GET`,local:t.local===!0,persistTo:t.persistTo}));v(t.text===!0?c.toString(`utf-8`):c)})};function $e(e){return e.usage(`$0 r2 objects list
93
96
 
94
- Lists objects in an R2 bucket. Returns object metadata including key, size, etag, last modified date, HTTP metadata, and custom metadata. For most workloads, we recommend using R2's [S3-compatible API](https://developers.cloudflare.com/r2/api/s3/api/) or a [Worker with an R2 binding](https://developers.cloudflare.com/r2/api/workers/workers-api-reference/) instead.`).option(`bucket-name`,{type:`string`,description:`Name of the bucket.`,demandOption:!0}).option(`per-page`,{type:`number`,description:`Maximum number of objects to return per page.`}).option(`prefix`,{type:`string`,description:`Restricts results to only those objects whose keys begin with the specified prefix.`}).option(`delimiter`,{type:`string`,description:`A single character used to group keys. All keys that contain the delimiter between the prefix and the first occurrence of the delimiter after the prefix are grouped under a single result element.`}).option(`cursor`,{type:`string`,description:`Pagination cursor received from a previous List Objects call. Used to retrieve the next page of results.`}).option(`start-after`,{type:`string`,description:`Returns objects with keys that come after the specified key in lexicographic order.`}).option(`cf-r2-jurisdiction`,{type:`string`,description:`Jurisdiction where objects in this bucket are guaranteed to be stored.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Qe={command:`list`,describe:`List Objects`,builder:Ze,handler:async l=>c({command:`r2 objects list`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={per_page:l[`per-page`],prefix:l.prefix,delimiter:l.delimiter,cursor:l.cursor,start_after:l[`start-after`]},u={};if(l[`cf-r2-jurisdiction`]!==void 0&&(u[`cf-r2-jurisdiction`]=String(l[`cf-r2-jurisdiction`])),l.dryRun){let e=await r();o({command:`cf r2 objects list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/r2/buckets/${l[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(l[`bucket-name`]))}/objects`,pathParams:{"bucket-name":String(l[`bucket-name`]??``)},query:c,bodyKind:`none`});return}let d=await n(l),f=l.local?e:await i();l.accountId=f;let p=await s(`Loading`,async()=>t(d,`GET`,`/accounts/${f}/r2/buckets/${encodeURIComponent(String(l[`bucket-name`]))}/objects`,{query:c,headers:Object.keys(u).length>0?u:void 0}));a(p,{successLabel:`Loaded`})})};function $e(e){return e.usage(`$0 r2 objects put <object-key>
97
+ Lists objects in an R2 bucket. Returns object metadata including key, size, etag, last modified date, HTTP metadata, and custom metadata. For most workloads, we recommend using R2's [S3-compatible API](https://developers.cloudflare.com/r2/api/s3/api/) or a [Worker with an R2 binding](https://developers.cloudflare.com/r2/api/workers/workers-api-reference/) instead.`).option(`bucket-name`,{type:`string`,description:`Name of the bucket.`,demandOption:!0}).option(`per-page`,{type:`number`,description:`Maximum number of objects to return per page.`}).option(`prefix`,{type:`string`,description:`Restricts results to only those objects whose keys begin with the specified prefix.`}).option(`delimiter`,{type:`string`,description:`A single character used to group keys. All keys that contain the delimiter between the prefix and the first occurrence of the delimiter after the prefix are grouped under a single result element.`}).option(`cursor`,{type:`string`,description:`Pagination cursor received from a previous List Objects call. Used to retrieve the next page of results.`}).option(`start-after`,{type:`string`,description:`Returns objects with keys that come after the specified key in lexicographic order.`}).option(`cf-r2-jurisdiction`,{type:`string`,description:`Jurisdiction where objects in this bucket are guaranteed to be stored.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const et={command:`list`,describe:`List Objects`,builder:$e,handler:async l=>c({command:`r2 objects list`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={per_page:l[`per-page`],prefix:l.prefix,delimiter:l.delimiter,cursor:l.cursor,start_after:l[`start-after`]},u={};if(l[`cf-r2-jurisdiction`]!==void 0&&(u[`cf-r2-jurisdiction`]=String(l[`cf-r2-jurisdiction`])),l.dryRun){let e=await r();o({command:`cf r2 objects list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/r2/buckets/${l[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(l[`bucket-name`]))}/objects`,pathParams:{"bucket-name":String(l[`bucket-name`]??``)},query:c,bodyKind:`none`});return}let d=await n(l),f=l.local?e:await i();l.accountId=f;let p=await s(`Loading`,async()=>t(d,`GET`,`/accounts/${f}/r2/buckets/${encodeURIComponent(String(l[`bucket-name`]))}/objects`,{query:c,headers:Object.keys(u).length>0?u:void 0}));a(p,{successLabel:`Loaded`})})};function tt(e){return e.usage(`$0 r2 objects put <object-key>
95
98
 
96
- Uploads an object to an R2 bucket. The object body is provided as the request body. Returns metadata about the uploaded object. The maximum upload size for this endpoint is 300 MB. For most workloads, we recommend using R2's [S3-compatible API](https://developers.cloudflare.com/r2/api/s3/api/) or a [Worker with an R2 binding](https://developers.cloudflare.com/r2/api/workers/workers-api-reference/) instead.`).positional(`object-key`,{type:`string`,description:"The key (name) to assign to the object. May contain slashes for path-like keys. Slashes (`/`) within the key MUST be sent literally and MUST NOT be percent-encoded (i.e. `%2F`); other reserved characters should be percent-encoded as usual.",demandOption:!0}).option(`bucket-name`,{type:`string`,description:`Name of the bucket.`,demandOption:!0}).option(`cf-r2-jurisdiction`,{type:`string`,description:`Jurisdiction where objects in this bucket are guaranteed to be stored.`}).option(`content-type`,{type:`string`,description:`The MIME type of the object being uploaded.`}).option(`content-length`,{type:`string`,description:`The size of the object body in bytes.`}).option(`cf-r2-storage-class`,{type:`string`,description:`Storage class for this object. Overrides the bucket default.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The object body to upload.`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`})}const et={command:`put <object-key>`,describe:`Upload Object`,builder:$e,handler:async l=>c({command:`r2 objects put`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={};if(l[`cf-r2-jurisdiction`]!==void 0&&(c[`cf-r2-jurisdiction`]=String(l[`cf-r2-jurisdiction`])),l[`content-type`]!==void 0&&(c[`Content-Type`]=String(l[`content-type`])),l[`content-length`]!==void 0&&(c[`Content-Length`]=String(l[`content-length`])),l[`cf-r2-storage-class`]!==void 0&&(c[`cf-r2-storage-class`]=String(l[`cf-r2-storage-class`])),l.dryRun){let e=await r();o({command:`cf r2 objects put`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/r2/buckets/${l[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(l[`bucket-name`]))}/objects/${l[`object-key`]==null?`<object-key>`:encodeURIComponent(String(l[`object-key`]))}`,pathParams:{"bucket-name":String(l[`bucket-name`]??``),"object-key":String(l[`object-key`]??``)},bodyKind:`octet-stream`,body:l.body});return}let u=await n(l),d=l.local?e:await i();if(l.accountId=d,l.file){let e=m(l.file),n=await s(`Updating`,async()=>t(u,`PUT`,`/accounts/${d}/r2/buckets/${encodeURIComponent(String(l[`bucket-name`]))}/objects/${encodeURIComponent(String(l[`object-key`]))}`,{body:e,headers:{"Content-Type":`application/octet-stream`,...Object.keys(c).length>0?c:void 0}}));a(n,{successLabel:`Updated`});return}if(l.body){let e=p(l.body,`body`,`binary`),n=await s(`Updating`,async()=>t(u,`PUT`,`/accounts/${d}/r2/buckets/${encodeURIComponent(String(l[`bucket-name`]))}/objects/${encodeURIComponent(String(l[`object-key`]))}`,{body:e,headers:{"Content-Type":`application/octet-stream`,...c}}));a(n,{successLabel:`Updated`});return}if(l.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},tt={command:`objects`,describe:`Operations for objects`,builder:e=>e.command(Ke).command(Je).command(Xe).command(Qe).command(et).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function nt(e){return e.usage(`$0 r2 super-slurper connectivity-precheck source
99
+ Uploads an object to an R2 bucket. The object body is provided as the request body. Returns metadata about the uploaded object. The maximum upload size for this endpoint is 300 MB. For most workloads, we recommend using R2's [S3-compatible API](https://developers.cloudflare.com/r2/api/s3/api/) or a [Worker with an R2 binding](https://developers.cloudflare.com/r2/api/workers/workers-api-reference/) instead.`).positional(`object-key`,{type:`string`,description:"The key (name) to assign to the object. May contain slashes for path-like keys. Slashes (`/`) within the key MUST be sent literally and MUST NOT be percent-encoded (i.e. `%2F`); other reserved characters should be percent-encoded as usual.",demandOption:!0}).option(`bucket-name`,{type:`string`,description:`Name of the bucket.`,demandOption:!0}).option(`cf-r2-jurisdiction`,{type:`string`,description:`Jurisdiction where objects in this bucket are guaranteed to be stored.`}).option(`content-type`,{type:`string`,description:`The MIME type of the object being uploaded.`}).option(`content-length`,{type:`string`,description:`The size of the object body in bytes.`}).option(`cf-r2-storage-class`,{type:`string`,description:`Storage class for this object. Overrides the bucket default.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The object body to upload.`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`})}const nt={command:`put <object-key>`,describe:`Upload Object`,builder:tt,handler:async l=>c({command:`r2 objects put`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={};if(l[`cf-r2-jurisdiction`]!==void 0&&(c[`cf-r2-jurisdiction`]=String(l[`cf-r2-jurisdiction`])),l[`content-type`]!==void 0&&(c[`Content-Type`]=String(l[`content-type`])),l[`content-length`]!==void 0&&(c[`Content-Length`]=String(l[`content-length`])),l[`cf-r2-storage-class`]!==void 0&&(c[`cf-r2-storage-class`]=String(l[`cf-r2-storage-class`])),l.dryRun){let e=await r();o({command:`cf r2 objects put`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/r2/buckets/${l[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(l[`bucket-name`]))}/objects/${l[`object-key`]==null?`<object-key>`:encodeURIComponent(String(l[`object-key`]))}`,pathParams:{"bucket-name":String(l[`bucket-name`]??``),"object-key":String(l[`object-key`]??``)},bodyKind:`octet-stream`,body:l.body});return}let u=await n(l),d=l.local?e:await i();if(l.accountId=d,l.file){let e=m(l.file),n=await s(`Updating`,async()=>t(u,`PUT`,`/accounts/${d}/r2/buckets/${encodeURIComponent(String(l[`bucket-name`]))}/objects/${encodeURIComponent(String(l[`object-key`]))}`,{body:e,headers:{"Content-Type":`application/octet-stream`,...Object.keys(c).length>0?c:void 0}}));a(n,{successLabel:`Updated`});return}if(l.body){let e=p(l.body,`body`,`binary`),n=await s(`Updating`,async()=>t(u,`PUT`,`/accounts/${d}/r2/buckets/${encodeURIComponent(String(l[`bucket-name`]))}/objects/${encodeURIComponent(String(l[`object-key`]))}`,{body:e,headers:{"Content-Type":`application/octet-stream`,...c}}));a(n,{successLabel:`Updated`});return}if(l.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},rt={command:`objects`,describe:`Operations for objects`,builder:e=>e.command(Je).command(Xe).command(Qe).command(et).command(nt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function it(e){return e.usage(`$0 r2 super-slurper connectivity-precheck source
97
100
 
98
- Check whether tokens are valid against the source bucket`).option(`bucket`,{type:`string`,description:`The bucket field`}).option(`endpoint`,{type:`string`,description:`Custom S3-compatible endpoint that must use https://.`}).option(`keys`,{type:`string`,array:!0,description:`The keys field`}).option(`path-prefix`,{type:`string`,description:`The pathPrefix field`}).option(`region`,{type:`string`,description:`The region field`}).option(`secret-access-key-id`,{type:`string`,description:`The secret.accessKeyId field`}).option(`secret-secret-access-key`,{type:`string`,description:`The secret.secretAccessKey field`}).option(`secret-client-email`,{type:`string`,description:`The secret.clientEmail field`}).option(`secret-private-key`,{type:`string`,description:`The secret.privateKey field`}).option(`vendor`,{type:`string`,description:`The vendor field`,choices:[`s3`,`gcs`,`r2`]}).option(`jurisdiction`,{type:`string`,description:`The jurisdiction field`,choices:[`default`,`eu`,`us`,`fedramp`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).conflicts(`endpoint`,[`secret-client-email`,`secret-private-key`,`jurisdiction`]).conflicts(`region`,[`secret-client-email`,`secret-private-key`,`jurisdiction`]).conflicts(`secret-access-key-id`,[`secret-client-email`,`secret-private-key`]).conflicts(`secret-secret-access-key`,[`secret-client-email`,`secret-private-key`]).conflicts(`secret-client-email`,[`endpoint`,`region`,`secret-access-key-id`,`secret-secret-access-key`,`jurisdiction`]).conflicts(`secret-private-key`,[`endpoint`,`region`,`secret-access-key-id`,`secret-secret-access-key`,`jurisdiction`]).conflicts(`jurisdiction`,[`endpoint`,`region`,`secret-client-email`,`secret-private-key`])}const rt={command:`source`,describe:`Check source connectivity`,builder:nt,handler:async t=>c({command:`r2 super-slurper connectivity-precheck source`,classification:{safeFlags:[`vendor`,`jurisdiction`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf r2 super-slurper connectivity-precheck source`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/slurper/source/connectivity-precheck`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({bucket:p(t.bucket,`bucket`,`text`),endpoint:p(t.endpoint,`endpoint`,`text`),keys:t.keys,pathPrefix:p(t[`path-prefix`],`path-prefix`,`text`),region:p(t.region,`region`,`text`),secret:{accessKeyId:p(t[`secret-access-key-id`],`secret-access-key-id`,`text`),secretAccessKey:p(t[`secret-secret-access-key`],`secret-secret-access-key`,`text`),clientEmail:p(t[`secret-client-email`],`secret-client-email`,`text`),privateKey:p(t[`secret-private-key`],`secret-private-key`,`text`)},vendor:p(t.vendor,`vendor`,`text`),jurisdiction:p(t.jurisdiction,`jurisdiction`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.r2.superSlurper.connectivityPrecheck.source({body:e,account_id:l}));a(n,{successLabel:`Updated`});return}t.bucket===void 0&&(t.bucket=await h(`bucket`,`The bucket field`)),t.vendor===void 0&&(t.vendor=await g(`vendor`,`The vendor field`,[`s3`,`gcs`,`r2`]));let d=f({bucket:p(t.bucket,`bucket`,`text`),endpoint:p(t.endpoint,`endpoint`,`text`),keys:t.keys,pathPrefix:p(t[`path-prefix`],`path-prefix`,`text`),region:p(t.region,`region`,`text`),secret:{accessKeyId:p(t[`secret-access-key-id`],`secret-access-key-id`,`text`),secretAccessKey:p(t[`secret-secret-access-key`],`secret-secret-access-key`,`text`),clientEmail:p(t[`secret-client-email`],`secret-client-email`,`text`),privateKey:p(t[`secret-private-key`],`secret-private-key`,`text`)},vendor:p(t.vendor,`vendor`,`text`),jurisdiction:p(t.jurisdiction,`jurisdiction`,`text`)}),m=await s(`Updating`,async()=>c.r2.superSlurper.connectivityPrecheck.source({body:d,account_id:l}));a(m,{successLabel:`Updated`})})};function it(e){return e.usage(`$0 r2 super-slurper connectivity-precheck target
101
+ Check whether tokens are valid against the source bucket`).option(`bucket`,{type:`string`,description:`The bucket field`}).option(`endpoint`,{type:`string`,description:`Custom S3-compatible endpoint that must use https://.`}).option(`keys`,{type:`string`,array:!0,description:`The keys field`}).option(`path-prefix`,{type:`string`,description:`The pathPrefix field`}).option(`region`,{type:`string`,description:`The region field`}).option(`secret-access-key-id`,{type:`string`,description:`The secret.accessKeyId field`}).option(`secret-secret-access-key`,{type:`string`,description:`The secret.secretAccessKey field`}).option(`secret-client-email`,{type:`string`,description:`The secret.clientEmail field`}).option(`secret-private-key`,{type:`string`,description:`The secret.privateKey field`}).option(`vendor`,{type:`string`,description:`The vendor field`,choices:[`s3`,`gcs`,`r2`]}).option(`jurisdiction`,{type:`string`,description:`The jurisdiction field`,choices:[`default`,`eu`,`us`,`fedramp`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).conflicts(`endpoint`,[`secret-client-email`,`secret-private-key`,`jurisdiction`]).conflicts(`region`,[`secret-client-email`,`secret-private-key`,`jurisdiction`]).conflicts(`secret-access-key-id`,[`secret-client-email`,`secret-private-key`]).conflicts(`secret-secret-access-key`,[`secret-client-email`,`secret-private-key`]).conflicts(`secret-client-email`,[`endpoint`,`region`,`secret-access-key-id`,`secret-secret-access-key`,`jurisdiction`]).conflicts(`secret-private-key`,[`endpoint`,`region`,`secret-access-key-id`,`secret-secret-access-key`,`jurisdiction`]).conflicts(`jurisdiction`,[`endpoint`,`region`,`secret-client-email`,`secret-private-key`])}const at={command:`source`,describe:`Check source connectivity`,builder:it,handler:async t=>c({command:`r2 super-slurper connectivity-precheck source`,classification:{safeFlags:[`vendor`,`jurisdiction`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf r2 super-slurper connectivity-precheck source`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/slurper/source/connectivity-precheck`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({bucket:p(t.bucket,`bucket`,`text`),endpoint:p(t.endpoint,`endpoint`,`text`),keys:t.keys,pathPrefix:p(t[`path-prefix`],`path-prefix`,`text`),region:p(t.region,`region`,`text`),secret:{accessKeyId:p(t[`secret-access-key-id`],`secret-access-key-id`,`text`),secretAccessKey:p(t[`secret-secret-access-key`],`secret-secret-access-key`,`text`),clientEmail:p(t[`secret-client-email`],`secret-client-email`,`text`),privateKey:p(t[`secret-private-key`],`secret-private-key`,`text`)},vendor:p(t.vendor,`vendor`,`text`),jurisdiction:p(t.jurisdiction,`jurisdiction`,`text`)}):u(t.body),sensitiveBodyPaths:[[`secret`,`secretAccessKey`],[`secret`,`privateKey`]]});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.r2.superSlurper.connectivityPrecheck.source({body:e,account_id:l}));a(n,{successLabel:`Updated`});return}t.bucket===void 0&&(t.bucket=await h(`bucket`,`The bucket field`)),t.vendor===void 0&&(t.vendor=await g(`vendor`,`The vendor field`,[`s3`,`gcs`,`r2`]));let d=f({bucket:p(t.bucket,`bucket`,`text`),endpoint:p(t.endpoint,`endpoint`,`text`),keys:t.keys,pathPrefix:p(t[`path-prefix`],`path-prefix`,`text`),region:p(t.region,`region`,`text`),secret:{accessKeyId:p(t[`secret-access-key-id`],`secret-access-key-id`,`text`),secretAccessKey:p(t[`secret-secret-access-key`],`secret-secret-access-key`,`text`),clientEmail:p(t[`secret-client-email`],`secret-client-email`,`text`),privateKey:p(t[`secret-private-key`],`secret-private-key`,`text`)},vendor:p(t.vendor,`vendor`,`text`),jurisdiction:p(t.jurisdiction,`jurisdiction`,`text`)}),m=await s(`Updating`,async()=>c.r2.superSlurper.connectivityPrecheck.source({body:d,account_id:l}));a(m,{successLabel:`Updated`})})};function ot(e){return e.usage(`$0 r2 super-slurper connectivity-precheck target
99
102
 
100
- Check whether tokens are valid against the target bucket`).option(`bucket`,{type:`string`,description:`The bucket field`}).option(`jurisdiction`,{type:`string`,description:`The jurisdiction field`,choices:[`default`,`eu`,`us`,`fedramp`]}).option(`secret-access-key-id`,{type:`string`,description:`The secret.accessKeyId field`}).option(`secret-secret-access-key`,{type:`string`,description:`The secret.secretAccessKey field`}).option(`vendor`,{type:`string`,description:`The vendor field`,choices:[`r2`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const at={command:`target`,describe:`Check target connectivity`,builder:it,handler:async t=>c({command:`r2 super-slurper connectivity-precheck target`,classification:{safeFlags:[`jurisdiction`,`vendor`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf r2 super-slurper connectivity-precheck target`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/slurper/target/connectivity-precheck`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({bucket:p(t.bucket,`bucket`,`text`),jurisdiction:p(t.jurisdiction,`jurisdiction`,`text`),secret:{accessKeyId:p(t[`secret-access-key-id`],`secret-access-key-id`,`text`),secretAccessKey:p(t[`secret-secret-access-key`],`secret-secret-access-key`,`text`)},vendor:p(t.vendor,`vendor`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.r2.superSlurper.connectivityPrecheck.target({body:e,account_id:l}));a(n,{successLabel:`Updated`});return}t.bucket===void 0&&(t.bucket=await h(`bucket`,`The bucket field`)),t[`secret-access-key-id`]===void 0&&(t[`secret-access-key-id`]=await h(`secret-access-key-id`,`The secret.accessKeyId field`)),t[`secret-secret-access-key`]===void 0&&(t[`secret-secret-access-key`]=await h(`secret-secret-access-key`,`The secret.secretAccessKey field`,{kind:`secret`})),t.vendor===void 0&&(t.vendor=await g(`vendor`,`The vendor field`,[`r2`]));let d=f({bucket:p(t.bucket,`bucket`,`text`),jurisdiction:p(t.jurisdiction,`jurisdiction`,`text`),secret:{accessKeyId:p(t[`secret-access-key-id`],`secret-access-key-id`,`text`),secretAccessKey:p(t[`secret-secret-access-key`],`secret-secret-access-key`,`text`)},vendor:p(t.vendor,`vendor`,`text`)}),m=await s(`Updating`,async()=>c.r2.superSlurper.connectivityPrecheck.target({body:d,account_id:l}));a(m,{successLabel:`Updated`})})},ot={command:`connectivity-precheck`,describe:`Operations for super-slurper.connectivity-precheck`,builder:e=>e.command(rt).command(at).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function st(e){return e.usage(`$0 r2 super-slurper jobs abort-all
103
+ Check whether tokens are valid against the target bucket`).option(`bucket`,{type:`string`,description:`The bucket field`}).option(`jurisdiction`,{type:`string`,description:`The jurisdiction field`,choices:[`default`,`eu`,`us`,`fedramp`]}).option(`secret-access-key-id`,{type:`string`,description:`The secret.accessKeyId field`}).option(`secret-secret-access-key`,{type:`string`,description:`The secret.secretAccessKey field`}).option(`vendor`,{type:`string`,description:`The vendor field`,choices:[`r2`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const st={command:`target`,describe:`Check target connectivity`,builder:ot,handler:async t=>c({command:`r2 super-slurper connectivity-precheck target`,classification:{safeFlags:[`jurisdiction`,`vendor`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf r2 super-slurper connectivity-precheck target`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/slurper/target/connectivity-precheck`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({bucket:p(t.bucket,`bucket`,`text`),jurisdiction:p(t.jurisdiction,`jurisdiction`,`text`),secret:{accessKeyId:p(t[`secret-access-key-id`],`secret-access-key-id`,`text`),secretAccessKey:p(t[`secret-secret-access-key`],`secret-secret-access-key`,`text`)},vendor:p(t.vendor,`vendor`,`text`)}):u(t.body),sensitiveBodyPaths:[[`secret`,`secretAccessKey`]]});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.r2.superSlurper.connectivityPrecheck.target({body:e,account_id:l}));a(n,{successLabel:`Updated`});return}t.bucket===void 0&&(t.bucket=await h(`bucket`,`The bucket field`)),t[`secret-access-key-id`]===void 0&&(t[`secret-access-key-id`]=await h(`secret-access-key-id`,`The secret.accessKeyId field`)),t[`secret-secret-access-key`]===void 0&&(t[`secret-secret-access-key`]=await h(`secret-secret-access-key`,`The secret.secretAccessKey field`,{kind:`secret`})),t.vendor===void 0&&(t.vendor=await g(`vendor`,`The vendor field`,[`r2`]));let d=f({bucket:p(t.bucket,`bucket`,`text`),jurisdiction:p(t.jurisdiction,`jurisdiction`,`text`),secret:{accessKeyId:p(t[`secret-access-key-id`],`secret-access-key-id`,`text`),secretAccessKey:p(t[`secret-secret-access-key`],`secret-secret-access-key`,`text`)},vendor:p(t.vendor,`vendor`,`text`)}),m=await s(`Updating`,async()=>c.r2.superSlurper.connectivityPrecheck.target({body:d,account_id:l}));a(m,{successLabel:`Updated`})})},ct={command:`connectivity-precheck`,describe:`Operations for super-slurper.connectivity-precheck`,builder:e=>e.command(at).command(st).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function lt(e){return e.usage(`$0 r2 super-slurper jobs abort-all
101
104
 
102
- Cancels all running R2 Super Slurper migration jobs for the account. Any objects in the middle of a transfer will finish, but no new objects will start transferring.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ct={command:`abort-all`,describe:`Abort all jobs`,builder:st,handler:async t=>c({command:`r2 super-slurper jobs abort-all`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf r2 super-slurper jobs abort-all`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/slurper/jobs/abortAll`,pathParams:{},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await _({force:!!t.force,message:`This operation stops every running migration job.`})){process.stderr.write(`Aborted.
103
- `);return}let u=await s(`Deleting`,async()=>c.r2.superSlurper.jobs.abortAll({account_id:l}));a(u,{successLabel:`Deleted`})})};function lt(e){return e.usage(`$0 r2 super-slurper jobs abort <job-id>
105
+ Cancels all running R2 Super Slurper migration jobs for the account. Any objects in the middle of a transfer will finish, but no new objects will start transferring.`).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 ut={command:`abort-all`,describe:`Abort all jobs`,builder:lt,handler:async t=>c({command:`r2 super-slurper jobs abort-all`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf r2 super-slurper jobs abort-all`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/slurper/jobs/abortAll`,pathParams:{},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await _({force:!!t.force,message:`This operation stops every running migration job.`})){process.stderr.write(`Aborted.
106
+ `);return}let u=await s(`Deleting`,async()=>c.r2.superSlurper.jobs.abortAll({account_id:l}));a(u,{successLabel:`Deleted`})})};function dt(e){return e.usage(`$0 r2 super-slurper jobs abort <job-id>
104
107
 
105
- Cancels a specific R2 Super Slurper migration job. Any objects in the middle of a transfer will finish, but no new objects will start transferring.`).positional(`job-id`,{type:`string`,description:`Job 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 ut={command:`abort <job-id>`,describe:`Abort a job`,builder:lt,handler:async t=>c({command:`r2 super-slurper jobs abort`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf r2 super-slurper jobs abort`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/slurper/jobs/${t[`job-id`]==null?`<job-id>`:encodeURIComponent(String(t[`job-id`]))}/abort`,pathParams:{"job-id":String(t[`job-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await _({force:!!t.force,message:`This operation stops a running migration job.`})){process.stderr.write(`Aborted.
106
- `);return}let u=await s(`Deleting`,async()=>c.r2.superSlurper.jobs.abort({account_id:l,job_id:t[`job-id`]}));a(u,{successLabel:`Deleted`})})};function dt(e){return e.usage(`$0 r2 super-slurper jobs create
108
+ Cancels a specific R2 Super Slurper migration job. Any objects in the middle of a transfer will finish, but no new objects will start transferring.`).positional(`job-id`,{type:`string`,description:`Job 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 ft={command:`abort <job-id>`,describe:`Abort a job`,builder:dt,handler:async t=>c({command:`r2 super-slurper jobs abort`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf r2 super-slurper jobs abort`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/slurper/jobs/${t[`job-id`]==null?`<job-id>`:encodeURIComponent(String(t[`job-id`]))}/abort`,pathParams:{"job-id":String(t[`job-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await _({force:!!t.force,message:`This operation stops a running migration job.`})){process.stderr.write(`Aborted.
109
+ `);return}let u=await s(`Deleting`,async()=>c.r2.superSlurper.jobs.abort({account_id:l,job_id:t[`job-id`]}));a(u,{successLabel:`Deleted`})})};function pt(e){return e.usage(`$0 r2 super-slurper jobs create
107
110
 
108
- Creates a new R2 Super Slurper migration job to transfer objects from a source bucket (e.g. S3, GCS, R2) to R2.`).option(`overwrite`,{type:`boolean`,description:`The overwrite field`,default:!0}).option(`source-bucket`,{type:`string`,description:`The source.bucket field`}).option(`source-endpoint`,{type:`string`,description:`Custom S3-compatible endpoint that must use https://.`}).option(`source-keys`,{type:`string`,array:!0,description:`The source.keys field`}).option(`source-path-prefix`,{type:`string`,description:`The source.pathPrefix field`}).option(`source-region`,{type:`string`,description:`The source.region field`}).option(`source-secret-access-key-id`,{type:`string`,description:`The source.secret.accessKeyId field`}).option(`source-secret-secret-access-key`,{type:`string`,description:`The source.secret.secretAccessKey field`}).option(`source-secret-client-email`,{type:`string`,description:`The source.secret.clientEmail field`}).option(`source-secret-private-key`,{type:`string`,description:`The source.secret.privateKey field`}).option(`source-vendor`,{type:`string`,description:`The source.vendor field`,choices:[`s3`,`gcs`,`r2`]}).option(`source-jurisdiction`,{type:`string`,description:`The source.jurisdiction field`,choices:[`default`,`eu`,`us`,`fedramp`]}).option(`target-bucket`,{type:`string`,description:`The target.bucket field`}).option(`target-jurisdiction`,{type:`string`,description:`The target.jurisdiction field`,choices:[`default`,`eu`,`us`,`fedramp`]}).option(`target-secret-access-key-id`,{type:`string`,description:`The target.secret.accessKeyId field`}).option(`target-secret-secret-access-key`,{type:`string`,description:`The target.secret.secretAccessKey field`}).option(`target-vendor`,{type:`string`,description:`The target.vendor field`,choices:[`r2`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).conflicts(`source-endpoint`,[`source-secret-client-email`,`source-secret-private-key`,`source-jurisdiction`]).conflicts(`source-region`,[`source-secret-client-email`,`source-secret-private-key`,`source-jurisdiction`]).conflicts(`source-secret-access-key-id`,[`source-secret-client-email`,`source-secret-private-key`]).conflicts(`source-secret-secret-access-key`,[`source-secret-client-email`,`source-secret-private-key`]).conflicts(`source-secret-client-email`,[`source-endpoint`,`source-region`,`source-secret-access-key-id`,`source-secret-secret-access-key`,`source-jurisdiction`]).conflicts(`source-secret-private-key`,[`source-endpoint`,`source-region`,`source-secret-access-key-id`,`source-secret-secret-access-key`,`source-jurisdiction`]).conflicts(`source-jurisdiction`,[`source-endpoint`,`source-region`,`source-secret-client-email`,`source-secret-private-key`]).check(e=>{if([`source-bucket`,`source-endpoint`,`source-keys`,`source-path-prefix`,`source-region`,`source-secret-access-key-id`,`source-secret-secret-access-key`,`source-secret-client-email`,`source-secret-private-key`,`source-vendor`,`source-jurisdiction`].some(t=>e[t]!==void 0)){let t=[`source-bucket`,`source-vendor`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --source-* flag is set`)}return!0}).check(e=>{if([`target-bucket`,`target-jurisdiction`,`target-secret-access-key-id`,`target-secret-secret-access-key`,`target-vendor`].some(t=>e[t]!==void 0)){let t=[`target-bucket`,`target-secret-access-key-id`,`target-secret-secret-access-key`,`target-vendor`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --target-* flag is set`)}return!0})}const ft={command:`create`,describe:`Create a job`,builder:dt,handler:async t=>c({command:`r2 super-slurper jobs create`,classification:{safeFlags:[`overwrite`,`source-vendor`,`source-jurisdiction`,`target-jurisdiction`,`target-vendor`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf r2 super-slurper jobs create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/slurper/jobs`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({overwrite:t.overwrite,source:{bucket:p(t[`source-bucket`],`source-bucket`,`text`),endpoint:p(t[`source-endpoint`],`source-endpoint`,`text`),keys:t[`source-keys`],pathPrefix:p(t[`source-path-prefix`],`source-path-prefix`,`text`),region:p(t[`source-region`],`source-region`,`text`),secret:{accessKeyId:p(t[`source-secret-access-key-id`],`source-secret-access-key-id`,`text`),secretAccessKey:p(t[`source-secret-secret-access-key`],`source-secret-secret-access-key`,`text`),clientEmail:p(t[`source-secret-client-email`],`source-secret-client-email`,`text`),privateKey:p(t[`source-secret-private-key`],`source-secret-private-key`,`text`)},vendor:p(t[`source-vendor`],`source-vendor`,`text`),jurisdiction:p(t[`source-jurisdiction`],`source-jurisdiction`,`text`)},target:{bucket:p(t[`target-bucket`],`target-bucket`,`text`),jurisdiction:p(t[`target-jurisdiction`],`target-jurisdiction`,`text`),secret:{accessKeyId:p(t[`target-secret-access-key-id`],`target-secret-access-key-id`,`text`),secretAccessKey:p(t[`target-secret-secret-access-key`],`target-secret-secret-access-key`,`text`)},vendor:p(t[`target-vendor`],`target-vendor`,`text`)}}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.r2.superSlurper.jobs.create({...e,account_id:l}));a(n,{successLabel:`Created`});return}let d=f({overwrite:t.overwrite,source:{bucket:p(t[`source-bucket`],`source-bucket`,`text`),endpoint:p(t[`source-endpoint`],`source-endpoint`,`text`),keys:t[`source-keys`],pathPrefix:p(t[`source-path-prefix`],`source-path-prefix`,`text`),region:p(t[`source-region`],`source-region`,`text`),secret:{accessKeyId:p(t[`source-secret-access-key-id`],`source-secret-access-key-id`,`text`),secretAccessKey:p(t[`source-secret-secret-access-key`],`source-secret-secret-access-key`,`text`),clientEmail:p(t[`source-secret-client-email`],`source-secret-client-email`,`text`),privateKey:p(t[`source-secret-private-key`],`source-secret-private-key`,`text`)},vendor:p(t[`source-vendor`],`source-vendor`,`text`),jurisdiction:p(t[`source-jurisdiction`],`source-jurisdiction`,`text`)},target:{bucket:p(t[`target-bucket`],`target-bucket`,`text`),jurisdiction:p(t[`target-jurisdiction`],`target-jurisdiction`,`text`),secret:{accessKeyId:p(t[`target-secret-access-key-id`],`target-secret-access-key-id`,`text`),secretAccessKey:p(t[`target-secret-secret-access-key`],`target-secret-secret-access-key`,`text`)},vendor:p(t[`target-vendor`],`target-vendor`,`text`)}}),m=await s(`Creating`,async()=>c.r2.superSlurper.jobs.create({...d,account_id:l}));a(m,{successLabel:`Created`})})};function pt(e){return e.usage(`$0 r2 super-slurper jobs delete <job-id>
111
+ Creates a new R2 Super Slurper migration job to transfer objects from a source bucket (e.g. S3, GCS, R2) to R2.`).option(`overwrite`,{type:`boolean`,description:`The overwrite field`,default:!0}).option(`source-bucket`,{type:`string`,description:`The source.bucket field`}).option(`source-endpoint`,{type:`string`,description:`Custom S3-compatible endpoint that must use https://.`}).option(`source-keys`,{type:`string`,array:!0,description:`The source.keys field`}).option(`source-path-prefix`,{type:`string`,description:`The source.pathPrefix field`}).option(`source-region`,{type:`string`,description:`The source.region field`}).option(`source-secret-access-key-id`,{type:`string`,description:`The source.secret.accessKeyId field`}).option(`source-secret-secret-access-key`,{type:`string`,description:`The source.secret.secretAccessKey field`}).option(`source-secret-client-email`,{type:`string`,description:`The source.secret.clientEmail field`}).option(`source-secret-private-key`,{type:`string`,description:`The source.secret.privateKey field`}).option(`source-vendor`,{type:`string`,description:`The source.vendor field`,choices:[`s3`,`gcs`,`r2`]}).option(`source-jurisdiction`,{type:`string`,description:`The source.jurisdiction field`,choices:[`default`,`eu`,`us`,`fedramp`]}).option(`target-bucket`,{type:`string`,description:`The target.bucket field`}).option(`target-jurisdiction`,{type:`string`,description:`The target.jurisdiction field`,choices:[`default`,`eu`,`us`,`fedramp`]}).option(`target-secret-access-key-id`,{type:`string`,description:`The target.secret.accessKeyId field`}).option(`target-secret-secret-access-key`,{type:`string`,description:`The target.secret.secretAccessKey field`}).option(`target-vendor`,{type:`string`,description:`The target.vendor field`,choices:[`r2`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).conflicts(`source-endpoint`,[`source-secret-client-email`,`source-secret-private-key`,`source-jurisdiction`]).conflicts(`source-region`,[`source-secret-client-email`,`source-secret-private-key`,`source-jurisdiction`]).conflicts(`source-secret-access-key-id`,[`source-secret-client-email`,`source-secret-private-key`]).conflicts(`source-secret-secret-access-key`,[`source-secret-client-email`,`source-secret-private-key`]).conflicts(`source-secret-client-email`,[`source-endpoint`,`source-region`,`source-secret-access-key-id`,`source-secret-secret-access-key`,`source-jurisdiction`]).conflicts(`source-secret-private-key`,[`source-endpoint`,`source-region`,`source-secret-access-key-id`,`source-secret-secret-access-key`,`source-jurisdiction`]).conflicts(`source-jurisdiction`,[`source-endpoint`,`source-region`,`source-secret-client-email`,`source-secret-private-key`]).check(e=>{if([`source-bucket`,`source-endpoint`,`source-keys`,`source-path-prefix`,`source-region`,`source-secret-access-key-id`,`source-secret-secret-access-key`,`source-secret-client-email`,`source-secret-private-key`,`source-vendor`,`source-jurisdiction`].some(t=>e[t]!==void 0)){let t=[`source-bucket`,`source-vendor`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --source-* flag is set`)}return!0}).check(e=>{if([`target-bucket`,`target-jurisdiction`,`target-secret-access-key-id`,`target-secret-secret-access-key`,`target-vendor`].some(t=>e[t]!==void 0)){let t=[`target-bucket`,`target-secret-access-key-id`,`target-secret-secret-access-key`,`target-vendor`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --target-* flag is set`)}return!0})}const mt={command:`create`,describe:`Create a job`,builder:pt,handler:async t=>c({command:`r2 super-slurper jobs create`,classification:{safeFlags:[`overwrite`,`source-vendor`,`source-jurisdiction`,`target-jurisdiction`,`target-vendor`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf r2 super-slurper jobs create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/slurper/jobs`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({overwrite:t.overwrite,source:{bucket:p(t[`source-bucket`],`source-bucket`,`text`),endpoint:p(t[`source-endpoint`],`source-endpoint`,`text`),keys:t[`source-keys`],pathPrefix:p(t[`source-path-prefix`],`source-path-prefix`,`text`),region:p(t[`source-region`],`source-region`,`text`),secret:{accessKeyId:p(t[`source-secret-access-key-id`],`source-secret-access-key-id`,`text`),secretAccessKey:p(t[`source-secret-secret-access-key`],`source-secret-secret-access-key`,`text`),clientEmail:p(t[`source-secret-client-email`],`source-secret-client-email`,`text`),privateKey:p(t[`source-secret-private-key`],`source-secret-private-key`,`text`)},vendor:p(t[`source-vendor`],`source-vendor`,`text`),jurisdiction:p(t[`source-jurisdiction`],`source-jurisdiction`,`text`)},target:{bucket:p(t[`target-bucket`],`target-bucket`,`text`),jurisdiction:p(t[`target-jurisdiction`],`target-jurisdiction`,`text`),secret:{accessKeyId:p(t[`target-secret-access-key-id`],`target-secret-access-key-id`,`text`),secretAccessKey:p(t[`target-secret-secret-access-key`],`target-secret-secret-access-key`,`text`)},vendor:p(t[`target-vendor`],`target-vendor`,`text`)}}):u(t.body),sensitiveBodyPaths:[[`source`,`secret`,`secretAccessKey`],[`source`,`secret`,`privateKey`],[`target`,`secret`,`secretAccessKey`]]});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.r2.superSlurper.jobs.create({...e,account_id:l}));a(n,{successLabel:`Created`});return}let d=f({overwrite:t.overwrite,source:{bucket:p(t[`source-bucket`],`source-bucket`,`text`),endpoint:p(t[`source-endpoint`],`source-endpoint`,`text`),keys:t[`source-keys`],pathPrefix:p(t[`source-path-prefix`],`source-path-prefix`,`text`),region:p(t[`source-region`],`source-region`,`text`),secret:{accessKeyId:p(t[`source-secret-access-key-id`],`source-secret-access-key-id`,`text`),secretAccessKey:p(t[`source-secret-secret-access-key`],`source-secret-secret-access-key`,`text`),clientEmail:p(t[`source-secret-client-email`],`source-secret-client-email`,`text`),privateKey:p(t[`source-secret-private-key`],`source-secret-private-key`,`text`)},vendor:p(t[`source-vendor`],`source-vendor`,`text`),jurisdiction:p(t[`source-jurisdiction`],`source-jurisdiction`,`text`)},target:{bucket:p(t[`target-bucket`],`target-bucket`,`text`),jurisdiction:p(t[`target-jurisdiction`],`target-jurisdiction`,`text`),secret:{accessKeyId:p(t[`target-secret-access-key-id`],`target-secret-access-key-id`,`text`),secretAccessKey:p(t[`target-secret-secret-access-key`],`target-secret-secret-access-key`,`text`)},vendor:p(t[`target-vendor`],`target-vendor`,`text`)}}),m=await s(`Creating`,async()=>c.r2.superSlurper.jobs.create({...d,account_id:l}));a(m,{successLabel:`Created`})})};function ht(e){return e.usage(`$0 r2 super-slurper jobs delete <job-id>
109
112
 
110
- Deletes a completed, aborted, or errored R2 Super Slurper migration job. Active jobs cannot be deleted.`).positional(`job-id`,{type:`string`,description:`Job 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 mt={command:`delete <job-id>`,describe:`Delete a job`,builder:pt,handler:async t=>c({command:`r2 super-slurper jobs delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf r2 super-slurper jobs delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/slurper/jobs/${t[`job-id`]==null?`<job-id>`:encodeURIComponent(String(t[`job-id`]))}`,pathParams:{"job-id":String(t[`job-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await _({force:!!t.force})){process.stderr.write(`Aborted.
111
- `);return}let u=await s(`Deleting`,async()=>c.r2.superSlurper.jobs.delete({account_id:l,job_id:t[`job-id`]}));a(u,{successLabel:`Deleted`})})};function ht(e){return e.usage(`$0 r2 super-slurper jobs get <job-id>
113
+ Deletes a completed, aborted, or errored R2 Super Slurper migration job. Active jobs cannot be deleted.`).positional(`job-id`,{type:`string`,description:`Job 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 gt={command:`delete <job-id>`,describe:`Delete a job`,builder:ht,handler:async t=>c({command:`r2 super-slurper jobs delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf r2 super-slurper jobs delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/slurper/jobs/${t[`job-id`]==null?`<job-id>`:encodeURIComponent(String(t[`job-id`]))}`,pathParams:{"job-id":String(t[`job-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await _({force:!!t.force})){process.stderr.write(`Aborted.
114
+ `);return}let u=await s(`Deleting`,async()=>c.r2.superSlurper.jobs.delete({account_id:l,job_id:t[`job-id`]}));a(u,{successLabel:`Deleted`})})};function _t(e){return e.usage(`$0 r2 super-slurper jobs get <job-id>
112
115
 
113
- Retrieves detailed status and configuration for a specific R2 Super Slurper migration job.`).positional(`job-id`,{type:`string`,description:`Job ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const gt={command:`get <job-id>`,describe:`Get job details`,builder:ht,handler:async t=>c({command:`r2 super-slurper jobs get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf r2 super-slurper jobs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/slurper/jobs/${t[`job-id`]==null?`<job-id>`:encodeURIComponent(String(t[`job-id`]))}`,pathParams:{"job-id":String(t[`job-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.r2.superSlurper.jobs.get({account_id:l,job_id:t[`job-id`]}));a(u,{successLabel:`Loaded`})})};function _t(e){return e.usage(`$0 r2 super-slurper jobs list
116
+ Retrieves detailed status and configuration for a specific R2 Super Slurper migration job.`).positional(`job-id`,{type:`string`,description:`Job ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const vt={command:`get <job-id>`,describe:`Get job details`,builder:_t,handler:async t=>c({command:`r2 super-slurper jobs get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf r2 super-slurper jobs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/slurper/jobs/${t[`job-id`]==null?`<job-id>`:encodeURIComponent(String(t[`job-id`]))}`,pathParams:{"job-id":String(t[`job-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.r2.superSlurper.jobs.get({account_id:l,job_id:t[`job-id`]}));a(u,{successLabel:`Loaded`})})};function yt(e){return e.usage(`$0 r2 super-slurper jobs list
114
117
 
115
- Lists all R2 Super Slurper migration jobs for the account with their status.`).option(`limit`,{type:`number`,description:`Limit`}).option(`offset`,{type:`number`,description:`Offset`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const vt={command:`list`,describe:`List jobs`,builder:_t,handler:async t=>c({command:`r2 super-slurper jobs list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let c={limit:t.limit,offset:t.offset};if(t.dryRun){let e=await r();o({command:`cf r2 super-slurper jobs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/slurper/jobs`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await i();t.accountId=u;let d=await s(`Loading`,async()=>l.r2.superSlurper.jobs.list({account_id:u,...c}));a(d,{successLabel:`Loaded`})})};function yt(e){return e.usage(`$0 r2 super-slurper jobs logs list
118
+ Lists all R2 Super Slurper migration jobs for the account with their status.`).option(`limit`,{type:`number`,description:`Limit`}).option(`offset`,{type:`number`,description:`Offset`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const $={command:`list`,describe:`List jobs`,builder:yt,handler:async t=>c({command:`r2 super-slurper jobs list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let c={limit:t.limit,offset:t.offset};if(t.dryRun){let e=await r();o({command:`cf r2 super-slurper jobs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/slurper/jobs`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await i();t.accountId=u;let d=await s(`Loading`,async()=>l.r2.superSlurper.jobs.list({account_id:u,...c}));a(d,{successLabel:`Loaded`})})};function bt(e){return e.usage(`$0 r2 super-slurper jobs logs list
116
119
 
117
- Gets log entries for an R2 Super Slurper migration job, showing migration status changes, errors, etc.`).option(`job-id`,{type:`string`,description:`Job ID`,demandOption:!0}).option(`limit`,{type:`number`,description:`Limit`}).option(`offset`,{type:`number`,description:`Offset`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const $={command:`list`,describe:`Get job logs`,builder:yt,handler:async t=>c({command:`r2 super-slurper jobs logs list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let c={limit:t.limit,offset:t.offset};if(t.dryRun){let e=await r();o({command:`cf r2 super-slurper jobs logs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/slurper/jobs/${t[`job-id`]==null?`<job-id>`:encodeURIComponent(String(t[`job-id`]))}/logs`,pathParams:{"job-id":String(t[`job-id`]??``)},query:c,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await i();t.accountId=u;let d=await s(`Loading`,async()=>l.r2.superSlurper.jobs.logs.list({account_id:u,job_id:t[`job-id`],...c}));a(d,{successLabel:`Loaded`})})},bt={command:`logs`,describe:`Operations for super-slurper.jobs.logs`,builder:e=>e.command($).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function xt(e){return e.usage(`$0 r2 super-slurper jobs pause <job-id>
120
+ Gets log entries for an R2 Super Slurper migration job, showing migration status changes, errors, etc.`).option(`job-id`,{type:`string`,description:`Job ID`,demandOption:!0}).option(`limit`,{type:`number`,description:`Limit`}).option(`offset`,{type:`number`,description:`Offset`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const xt={command:`list`,describe:`Get job logs`,builder:bt,handler:async t=>c({command:`r2 super-slurper jobs logs list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let c={limit:t.limit,offset:t.offset};if(t.dryRun){let e=await r();o({command:`cf r2 super-slurper jobs logs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/slurper/jobs/${t[`job-id`]==null?`<job-id>`:encodeURIComponent(String(t[`job-id`]))}/logs`,pathParams:{"job-id":String(t[`job-id`]??``)},query:c,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await i();t.accountId=u;let d=await s(`Loading`,async()=>l.r2.superSlurper.jobs.logs.list({account_id:u,job_id:t[`job-id`],...c}));a(d,{successLabel:`Loaded`})})},St={command:`logs`,describe:`Operations for super-slurper.jobs.logs`,builder:e=>e.command(xt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ct(e){return e.usage(`$0 r2 super-slurper jobs pause <job-id>
118
121
 
119
- Pauses a running R2 Super Slurper migration job. The job can be resumed later to continue transferring.`).positional(`job-id`,{type:`string`,description:`Job ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const St={command:`pause <job-id>`,describe:`Pause a job`,builder:xt,handler:async t=>c({command:`r2 super-slurper jobs pause`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf r2 super-slurper jobs pause`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/slurper/jobs/${t[`job-id`]==null?`<job-id>`:encodeURIComponent(String(t[`job-id`]))}/pause`,pathParams:{"job-id":String(t[`job-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Updating`,async()=>c.r2.superSlurper.jobs.pause({account_id:l,job_id:t[`job-id`]}));a(u,{successLabel:`Updated`})})};function Ct(e){return e.usage(`$0 r2 super-slurper jobs progress <job-id>
122
+ Pauses a running R2 Super Slurper migration job. The job can be resumed later to continue transferring.`).positional(`job-id`,{type:`string`,description:`Job ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const wt={command:`pause <job-id>`,describe:`Pause a job`,builder:Ct,handler:async t=>c({command:`r2 super-slurper jobs pause`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf r2 super-slurper jobs pause`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/slurper/jobs/${t[`job-id`]==null?`<job-id>`:encodeURIComponent(String(t[`job-id`]))}/pause`,pathParams:{"job-id":String(t[`job-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Updating`,async()=>c.r2.superSlurper.jobs.pause({account_id:l,job_id:t[`job-id`]}));a(u,{successLabel:`Updated`})})};function Tt(e){return e.usage(`$0 r2 super-slurper jobs progress <job-id>
120
123
 
121
- Retrieves current progress metrics for an R2 Super Slurper migration job`).positional(`job-id`,{type:`string`,description:`Job ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const wt={command:`progress <job-id>`,describe:`Get job progress`,builder:Ct,handler:async t=>c({command:`r2 super-slurper jobs progress`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf r2 super-slurper jobs progress`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/slurper/jobs/${t[`job-id`]==null?`<job-id>`:encodeURIComponent(String(t[`job-id`]))}/progress`,pathParams:{"job-id":String(t[`job-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.r2.superSlurper.jobs.progress({account_id:l,job_id:t[`job-id`]}));a(u,{successLabel:`Loaded`})})};function Tt(e){return e.usage(`$0 r2 super-slurper jobs resume <job-id>
124
+ Retrieves current progress metrics for an R2 Super Slurper migration job`).positional(`job-id`,{type:`string`,description:`Job ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Et={command:`progress <job-id>`,describe:`Get job progress`,builder:Tt,handler:async t=>c({command:`r2 super-slurper jobs progress`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf r2 super-slurper jobs progress`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/slurper/jobs/${t[`job-id`]==null?`<job-id>`:encodeURIComponent(String(t[`job-id`]))}/progress`,pathParams:{"job-id":String(t[`job-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.r2.superSlurper.jobs.progress({account_id:l,job_id:t[`job-id`]}));a(u,{successLabel:`Loaded`})})};function Dt(e){return e.usage(`$0 r2 super-slurper jobs resume <job-id>
122
125
 
123
- Resumes a paused R2 Super Slurper migration job, continuing the transfer from where it stopped.`).positional(`job-id`,{type:`string`,description:`Job ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Et={command:`resume <job-id>`,describe:`Resume a job`,builder:Tt,handler:async t=>c({command:`r2 super-slurper jobs resume`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf r2 super-slurper jobs resume`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/slurper/jobs/${t[`job-id`]==null?`<job-id>`:encodeURIComponent(String(t[`job-id`]))}/resume`,pathParams:{"job-id":String(t[`job-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Updating`,async()=>c.r2.superSlurper.jobs.resume({account_id:l,job_id:t[`job-id`]}));a(u,{successLabel:`Updated`})})},Dt={command:`jobs`,describe:`Operations for super-slurper.jobs`,builder:e=>e.command(ut).command(ct).command(ft).command(mt).command(gt).command(vt).command(St).command(wt).command(Et).command(bt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ot={command:`super-slurper`,describe:`Migrate data from external S3-compatible storage into R2 buckets with resumable transfer jobs`,builder:e=>e.command(ot).command(Dt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function kt(e){return e.usage(`$0 r2 temporary-credentials create
126
+ Resumes a paused R2 Super Slurper migration job, continuing the transfer from where it stopped.`).positional(`job-id`,{type:`string`,description:`Job ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ot={command:`resume <job-id>`,describe:`Resume a job`,builder:Dt,handler:async t=>c({command:`r2 super-slurper jobs resume`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf r2 super-slurper jobs resume`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/slurper/jobs/${t[`job-id`]==null?`<job-id>`:encodeURIComponent(String(t[`job-id`]))}/resume`,pathParams:{"job-id":String(t[`job-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Updating`,async()=>c.r2.superSlurper.jobs.resume({account_id:l,job_id:t[`job-id`]}));a(u,{successLabel:`Updated`})})},kt={command:`jobs`,describe:`Operations for super-slurper.jobs`,builder:e=>e.command(ft).command(ut).command(mt).command(gt).command(vt).command($).command(wt).command(Et).command(Ot).command(St).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},At={command:`super-slurper`,describe:`Migrate data from external S3-compatible storage into R2 buckets with resumable transfer jobs`,builder:e=>e.command(ct).command(kt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function jt(e){return e.usage(`$0 r2 temporary-credentials create
124
127
 
125
- Creates temporary access credentials on a bucket that can be optionally scoped to prefixes or objects.`).option(`bucket`,{type:`string`,description:`Name of the R2 bucket.`}).option(`objects`,{type:`string`,array:!0,description:`Optional object paths to scope the credentials to.`}).option(`parent-access-key-id`,{type:`string`,description:`Access key ID of the parent R2 API token. The temporary credentials cannot exceed this token's permissions.`}).option(`permission`,{type:`string`,description:`Permissions allowed on the credentials.`,choices:[`admin-read-write`,`admin-read-only`,`object-read-write`,`object-read-only`]}).option(`prefixes`,{type:`string`,array:!0,description:`Optional prefix paths to scope the credentials to.`}).option(`ttl-seconds`,{type:`number`,description:`Lifetime of the temporary credentials in seconds, up to 604800 seconds (7 days).`,default:900}).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 Temporary Access Credentials`,builder:kt,handler:async t=>c({command:`r2 temporary-credentials create`,classification:{safeFlags:[`permission`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf r2 temporary-credentials create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/r2/temp-access-credentials`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({bucket:p(t.bucket,`bucket`,`text`),objects:t.objects,parentAccessKeyId:p(t[`parent-access-key-id`],`parent-access-key-id`,`text`),permission:p(t.permission,`permission`,`text`),prefixes:t.prefixes,ttlSeconds:t[`ttl-seconds`]}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.r2.temporaryCredentials.create({...e,account_id:l}));a(n,{successLabel:`Created`});return}if(t.bucket===void 0&&(t.bucket=await h(`bucket`,`Name of the R2 bucket.`)),t[`parent-access-key-id`]===void 0&&(t[`parent-access-key-id`]=await h(`parent-access-key-id`,`Access key ID of the parent R2 API token. The temporary credentials cannot exceed this token's permissions.`)),t.permission===void 0&&(t.permission=await g(`permission`,`Permissions allowed on the credentials.`,[`admin-read-write`,`admin-read-only`,`object-read-write`,`object-read-only`])),t[`ttl-seconds`]===void 0)throw Error(`--ttl-seconds is required (or pass --body with this field set).`);let d=f({bucket:p(t.bucket,`bucket`,`text`),objects:t.objects,parentAccessKeyId:p(t[`parent-access-key-id`],`parent-access-key-id`,`text`),permission:p(t.permission,`permission`,`text`),prefixes:t.prefixes,ttlSeconds:t[`ttl-seconds`]}),m=await s(`Creating`,async()=>c.r2.temporaryCredentials.create({...d,account_id:l}));a(m,{successLabel:`Created`})})},jt={command:`temporary-credentials`,describe:`Generate short-lived S3-compatible credentials scoped to specific buckets and operations`,builder:e=>e.command(At).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Mt={command:`r2`,describe:`S3-compatible object storage with zero egress fees — buckets, lifecycle rules, event notifications, and data migration`,builder:e=>e.command(We).command(tt).command(Ot).command(jt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Mt as default};
128
+ Creates temporary access credentials on a bucket that can be optionally scoped to prefixes or objects.`).option(`bucket`,{type:`string`,description:`Name of the R2 bucket.`}).option(`objects`,{type:`string`,array:!0,description:`Optional object paths to scope the credentials to.`}).option(`parent-access-key-id`,{type:`string`,description:`Access key ID of the parent R2 API token. The temporary credentials cannot exceed this token's permissions.`}).option(`permission`,{type:`string`,description:`Permissions allowed on the credentials.`,choices:[`admin-read-write`,`admin-read-only`,`object-read-write`,`object-read-only`]}).option(`prefixes`,{type:`string`,array:!0,description:`Optional prefix paths to scope the credentials to.`}).option(`ttl-seconds`,{type:`number`,description:`Lifetime of the temporary credentials in seconds, up to 604800 seconds (7 days).`,default:900}).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 Mt={command:`create`,describe:`Create Temporary Access Credentials`,builder:jt,handler:async t=>c({command:`r2 temporary-credentials create`,classification:{safeFlags:[`permission`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf r2 temporary-credentials create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/r2/temp-access-credentials`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({bucket:p(t.bucket,`bucket`,`text`),objects:t.objects,parentAccessKeyId:p(t[`parent-access-key-id`],`parent-access-key-id`,`text`),permission:p(t.permission,`permission`,`text`),prefixes:t.prefixes,ttlSeconds:t[`ttl-seconds`]}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.r2.temporaryCredentials.create({...e,account_id:l}));a(n,{successLabel:`Created`});return}if(t.bucket===void 0&&(t.bucket=await h(`bucket`,`Name of the R2 bucket.`)),t[`parent-access-key-id`]===void 0&&(t[`parent-access-key-id`]=await h(`parent-access-key-id`,`Access key ID of the parent R2 API token. The temporary credentials cannot exceed this token's permissions.`)),t.permission===void 0&&(t.permission=await g(`permission`,`Permissions allowed on the credentials.`,[`admin-read-write`,`admin-read-only`,`object-read-write`,`object-read-only`])),t[`ttl-seconds`]===void 0)throw Error(`--ttl-seconds is required (or pass --body with this field set).`);let d=f({bucket:p(t.bucket,`bucket`,`text`),objects:t.objects,parentAccessKeyId:p(t[`parent-access-key-id`],`parent-access-key-id`,`text`),permission:p(t.permission,`permission`,`text`),prefixes:t.prefixes,ttlSeconds:t[`ttl-seconds`]}),m=await s(`Creating`,async()=>c.r2.temporaryCredentials.create({...d,account_id:l}));a(m,{successLabel:`Created`})})},Nt={command:`temporary-credentials`,describe:`Generate short-lived S3-compatible credentials scoped to specific buckets and operations`,builder:e=>e.command(Mt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Pt={command:`r2`,describe:`S3-compatible object storage with zero egress fees — buckets, lifecycle rules, event notifications, and data migration`,builder:e=>e.command(Ke).command(rt).command(At).command(Nt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Pt as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{n as e}from"./auth-AobvBmz4.mjs";import{t}from"./output-BGqhvqe2.mjs";import{t as n}from"./dry-run-DmsbOMF1.mjs";import{t as r}from"./progress-BYVZuEcG.mjs";import{t as i}from"./run-CrZgB8L_.mjs";import"./telemetry-DBXOMuLh.mjs";import{n as a,t as o}from"./body-parser-DkHKPkJ7.mjs";import{t as s}from"./cli-types-9oYmRTHJ.mjs";import{n as c,t as l}from"./raw-fetch-DyYWa923.mjs";function u(e){return e.usage(`$0 radar agent-readiness summary <dimension>
2
+ import{n as e}from"./auth-CGLsxbc6.mjs";import{t}from"./output-BOe-3AQG.mjs";import{t as n}from"./dry-run-DRj2_uV3.mjs";import{t as r}from"./progress-BtkTVcHI.mjs";import{t as i}from"./run-BvHwWWUX.mjs";import"./telemetry-BsYO3nxG.mjs";import{n as a,t as o}from"./body-parser-DkHKPkJ7.mjs";import{t as s}from"./cli-types-9oYmRTHJ.mjs";import{n as c,t as l}from"./raw-fetch-B4NvWuZD.mjs";function u(e){return e.usage(`$0 radar agent-readiness summary <dimension>
3
3
 
4
4
  Returns a summary of AI agent readiness scores across scanned domains, grouped by the specified dimension. Data is sourced from weekly bulk scans. All values are raw domain counts.`).positional(`dimension`,{type:`string`,description:`Specifies the agent readiness data dimension by which to group the results.`,demandOption:!0}).option(`date`,{type:`string`,description:`Filters results by the specified date.`}).option(`domain-category`,{type:`string`,description:`Filters results by domain category.`}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ee={command:`summary <dimension>`,describe:`Get agent readiness summary`,builder:s(u),handler:async a=>i({command:`radar agent-readiness summary`,classification:{safeFlags:[`format`,`dry-run`]}},a,async()=>{let i={date:a.date,domainCategory:a[`domain-category`],name:a.name,format:a.format};if(a.dryRun){n({command:`cf radar agent-readiness summary`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/agent_readiness/summary/${a.dimension==null?`<dimension>`:encodeURIComponent(String(a.dimension))}`,pathParams:{dimension:String(a.dimension??``)},query:i,bodyKind:`none`});return}let o=await e(a),s=await r(`Loading`,async()=>o.radar.agentReadiness.summary({dimension:a.dimension,...i}));t(s,{successLabel:`Loaded`})})},te={command:`agent-readiness`,describe:`Agent readiness summary statistics across the Cloudflare network`,builder:e=>e.command(ee).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function d(e){return e.usage(`$0 radar ai bots timeseries-groups <dimension>
5
5
 
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{G as e}from"./dist-CYFkGHYv.mjs";import{n as t}from"./errors-_sob7Ihu.mjs";import{r as n}from"./local-C0lQ9sTg.mjs";import{o as r}from"./auth-AobvBmz4.mjs";import{n as i}from"./context-Bwkz4Lm_.mjs";import{t as a}from"./auth-token-CtguMdmF.mjs";import{n as o}from"./request-headers-CUee83pa.mjs";async function s(s,c={}){let{method:l=`GET`,local:u=!1}=c,d=e({compliance_region:await i()}),f=`${d.replace(/\/+$/,``)}${s}`,p={...o()};c.headers&&Object.assign(p,c.headers);let m=globalThis.fetch;u?m=n({persistTo:c.persistTo,apiBaseUrl:d}):p.Authorization=`Bearer ${await a()}`;let h,g=c.body;g!=null&&(g instanceof FormData?h=g:Buffer.isBuffer(g)||g instanceof Uint8Array||g instanceof ArrayBuffer?(h=g,p[`Content-Type`]??=c.contentType??`application/octet-stream`):typeof g==`string`?(h=g,c.contentType&&(p[`Content-Type`]??=c.contentType)):(h=JSON.stringify(g),p[`Content-Type`]??=c.contentType??`application/json`));let _=await m(f,{method:l,headers:p,...h===void 0?{}:{body:h},signal:AbortSignal.timeout(r)});if(!_.ok){let e=_.headers.get(`content-type`)??``,n;try{n=e.includes(`application/json`)?await _.json():await _.text()}catch{n=null}throw new t({statusCode:_.status,body:n,rawResponse:{status:_.status,statusText:_.statusText,url:_.url||f,headers:_.headers,redirected:_.redirected,type:_.type}})}let v=await _.arrayBuffer();return Buffer.from(v)}function c(e){process.stdout.write(e)}export{c as n,s as t};
2
+ import{G as e}from"./dist-BHEmAAHr.mjs";import{n as t}from"./errors-_sob7Ihu.mjs";import{r as n}from"./local-DlT72Xpn.mjs";import{o as r}from"./auth-CGLsxbc6.mjs";import{n as i}from"./context-q7UaYK69.mjs";import{t as a}from"./auth-token-pNQrX_9O.mjs";import{n as o}from"./request-headers-DiJeDAn1.mjs";async function s(s,c={}){let{method:l=`GET`,local:u=!1}=c,d=e({compliance_region:await i()}),f=`${d.replace(/\/+$/,``)}${s}`,p={...o()};c.headers&&Object.assign(p,c.headers);let m=globalThis.fetch;u?m=n({persistTo:c.persistTo,apiBaseUrl:d}):p.Authorization=`Bearer ${await a()}`;let h,g=c.body;g!=null&&(g instanceof FormData?h=g:Buffer.isBuffer(g)||g instanceof Uint8Array||g instanceof ArrayBuffer?(h=g,p[`Content-Type`]??=c.contentType??`application/octet-stream`):typeof g==`string`?(h=g,c.contentType&&(p[`Content-Type`]??=c.contentType)):(h=JSON.stringify(g),p[`Content-Type`]??=c.contentType??`application/json`));let _=await m(f,{method:l,headers:p,...h===void 0?{}:{body:h},signal:AbortSignal.timeout(r)});if(!_.ok){let e=_.headers.get(`content-type`)??``,n;try{n=e.includes(`application/json`)?await _.json():await _.text()}catch{n=null}throw new t({statusCode:_.status,body:n,rawResponse:{status:_.status,statusText:_.statusText,url:_.url||f,headers:_.headers,redirected:_.redirected,type:_.type}})}let v=await _.arrayBuffer();return Buffer.from(v)}function c(e){process.stdout.write(e)}export{c as n,s as t};