cf 1.0.0-beta.26 → 1.0.0-beta.28

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 (294) hide show
  1. package/dist/_meta/commands.json +7373 -4926
  2. package/dist/_meta/hand-written-commands.json +2 -2
  3. package/dist/_meta/schemas.json +11614 -4465
  4. package/dist/abuse-reports-D9edOyag.mjs +24 -0
  5. package/dist/{access-DCOOmDC5.mjs → access-CKCCSrrU.mjs} +1 -1
  6. package/dist/{accounts-HC6XuIwP.mjs → accounts-CNb9U9bK.mjs} +33 -27
  7. package/dist/{acm-DYgr6SAR.mjs → acm-CdKTAToZ.mjs} +3 -3
  8. package/dist/{addressing-BS66pJ_a.mjs → addressing-eZI_C-b0.mjs} +18 -18
  9. package/dist/{agent-memory-BbXdueL0.mjs → agent-memory-BBHCEE7h.mjs} +7 -7
  10. package/dist/{ai-BiIKznNv.mjs → ai-Csl_QNwv.mjs} +7 -7
  11. package/dist/ai-audit-DlqWsQi-.mjs +6 -0
  12. package/dist/{ai-gateway-rlYCbts5.mjs → ai-gateway-Lj4On37s.mjs} +13 -13
  13. package/dist/ai-search-BxyhS3X7.mjs +74 -0
  14. package/dist/{ai-security-BUwS6kVh.mjs → ai-security-DvU2iYkY.mjs} +3 -3
  15. package/dist/{alerting-BSzuvFk1.mjs → alerting-r0G2X9y9.mjs} +10 -10
  16. package/dist/analytics-C6bfqm-W.mjs +17 -0
  17. package/dist/analytics-engine-BlIecoOe.mjs +4 -0
  18. package/dist/api-Dnt6lRJG.mjs +3 -0
  19. package/dist/{api-security-BBxEJjGv.mjs → api-security-DZ7GWOqD.mjs} +26 -26
  20. package/dist/argo-Bh0_cj49.mjs +14 -0
  21. package/dist/{artifacts-B9g9aPrk.mjs → artifacts-VZJWVq_6.mjs} +16 -16
  22. package/dist/{audit-logs-BhJs-OS2.mjs → audit-logs-B8cGL4B9.mjs} +1 -1
  23. package/dist/auth-B-h0BHg7.mjs +2 -0
  24. package/dist/auth-B6tswVxH.mjs +2 -0
  25. package/dist/{auth-C50SqX9F.mjs → auth-clmqFEWU.mjs} +3 -3
  26. package/dist/{auth-token-DvNoIhRL.mjs → auth-token-DW4dJVdj.mjs} +1 -1
  27. package/dist/{autoconfig-ldsgXxa6.mjs → autoconfig-C0ynlGHf.mjs} +23 -23
  28. package/dist/{basin-catalog-CtKFiH-n.mjs → basin-catalog-TehR1sKZ.mjs} +11 -11
  29. package/dist/billing-B2KusU6g.mjs +22 -0
  30. package/dist/{blocks-DnNrvi8s.mjs → blocks-BFulF68V.mjs} +1 -1
  31. package/dist/body-parser-DoewLePl.mjs +2 -0
  32. package/dist/body-unions-DNs981Ia.mjs +2 -0
  33. package/dist/bot-management-CXHXgrQC.mjs +9 -0
  34. package/dist/{botnet-feed-lD9s2oLA.mjs → botnet-feed-UyK7Rfp6.mjs} +1 -1
  35. package/dist/brand-protection-kv1ba80i.mjs +14 -0
  36. package/dist/browser-run-D-vRoZmf.mjs +40 -0
  37. package/dist/build-BzJGqb2o.mjs +2 -0
  38. package/dist/build-FFxzigo4.mjs +2 -0
  39. package/dist/{builds-D3mAH87h.mjs → builds-BbxINHRP.mjs} +27 -27
  40. package/dist/cache-BacNNtLu.mjs +36 -0
  41. package/dist/{cf-CpC4giTf.mjs → cf-BQ_LRiut.mjs} +2 -2
  42. package/dist/{chunk-DSGVRFIS-vdfri8fR.mjs → chunk-DSGVRFIS-BaNZNW-M.mjs} +1 -1
  43. package/dist/chunk-SOBRPAPT-QTjnHSNs.mjs +363 -0
  44. package/dist/{cli-Cm4Twas4.mjs → cli-B7vslRfu.mjs} +1 -1
  45. package/dist/{client-side-security-BRn7KBpu.mjs → client-side-security-bzB9JosR.mjs} +6 -6
  46. package/dist/{cloud-connector-DqkOIRDr.mjs → cloud-connector-BHtf37R5.mjs} +2 -2
  47. package/dist/{cloudflared-DDp_8PTK.mjs → cloudflared-QDdHMUEY.mjs} +1 -1
  48. package/dist/{cloudforce-one-B9k8vhso.mjs → cloudforce-one-DWBPQDA3.mjs} +126 -124
  49. package/dist/{command--Y_QAiU2.mjs → command-AVwd7XjE.mjs} +1 -1
  50. package/dist/{command-DlI7Z_7j.mjs → command-B87T_f2f.mjs} +1 -1
  51. package/dist/{command-QHmV62Fv.mjs → command-CEHhi3t0.mjs} +1 -1
  52. package/dist/{command-B-_ba4rQ.mjs → command-CYmQE79n.mjs} +1 -1
  53. package/dist/{command-DsOv6z9q.mjs → command-CbxXc5IW.mjs} +1 -1
  54. package/dist/{command-BKNQsGqu.mjs → command-Ce8CVLth.mjs} +1 -1
  55. package/dist/{command-MxFFWqMg.mjs → command-CqDudQZs.mjs} +1 -1
  56. package/dist/{command-BV8-laJK.mjs → command-D4YcwpVp.mjs} +1 -1
  57. package/dist/{command-BVz2aES3.mjs → command-D895kdlh.mjs} +1 -1
  58. package/dist/{command-yOG9VUtq.mjs → command-D9Qyi1B0.mjs} +1 -1
  59. package/dist/{command-CfOqnqlN.mjs → command-DeutqL1n.mjs} +1 -1
  60. package/dist/{command-Dn39o5xQ.mjs → command-Dl9ICrRK.mjs} +1 -1
  61. package/dist/{command-CN8NFLs2.mjs → command-DtCSe8Hy.mjs} +1 -1
  62. package/dist/{command-BsCFkho-.mjs → command-DwzVtmb3.mjs} +1 -1
  63. package/dist/{command-CQMRxiDz.mjs → command-wtBubtZ4.mjs} +1 -1
  64. package/dist/{completions-BA52jTea.mjs → completions-BvdKtzsX.mjs} +1 -1
  65. package/dist/{connector-interrupts-zL7pxPn6.mjs → connector-interrupts-dUPW6Ya_.mjs} +2 -2
  66. package/dist/{connector-telemetry-events-PL4Fqqvu.mjs → connector-telemetry-events-DWVCqnhn.mjs} +1 -1
  67. package/dist/{connector-telemetry-snapshots-DyBSuEFB.mjs → connector-telemetry-snapshots-CeMP3qeI.mjs} +1 -1
  68. package/dist/{connectors-D8H6rQz9.mjs → connectors-DZFGNw3i.mjs} +4 -4
  69. package/dist/{containers-D4sa-Eoy.mjs → containers-B06OGOEB.mjs} +212 -212
  70. package/dist/{containers-Db-eWudu.mjs → containers-DCzQCo79.mjs} +8 -8
  71. package/dist/{content-scan-DUVq09i8.mjs → content-scan-XhnNJqXf.mjs} +4 -4
  72. package/dist/{context-BvLXzoMs.mjs → context-BY1Eh_Qe.mjs} +1 -1
  73. package/dist/{cps-CqaRliZZ.mjs → cps-CohlxvuN.mjs} +2 -2
  74. package/dist/create-DmLDMvrj.mjs +2 -0
  75. package/dist/{csam-scanner-DsXvOOsZ.mjs → csam-scanner-BV4bHq8v.mjs} +2 -4
  76. package/dist/custom-csrs-BVdMQjYq.mjs +18 -0
  77. package/dist/{custom-hostnames-Cj_csfo_.mjs → custom-hostnames-r-CxhSa1.mjs} +5 -5
  78. package/dist/custom-nameservers-CapMDyly.mjs +12 -0
  79. package/dist/custom-pages-BVIniWfq.mjs +38 -0
  80. package/dist/d1-nJCOJZb8.mjs +50 -0
  81. package/dist/{delegate-CMfEjvHn.mjs → delegate-CcL6RoGw.mjs} +1 -1
  82. package/dist/delegate.mjs +1 -1
  83. package/dist/{deploy-DDbmxkiX.mjs → deploy-DJMnWFNk.mjs} +1 -1
  84. package/dist/{deploy-context-DsEVu7bf.mjs → deploy-context-YCW3eqP1.mjs} +15 -15
  85. package/dist/{deploy-input-BA_3Q2Xu.mjs → deploy-input-CQLBXFEB.mjs} +1 -1
  86. package/dist/{dev-BS156bim.mjs → dev-GsYHvMah.mjs} +1 -1
  87. package/dist/{diagnostics-BmkQnSEb.mjs → diagnostics-C3nqxsAO.mjs} +4 -4
  88. package/dist/{dist-DehXZozc.mjs → dist-D-ihn_mV.mjs} +42 -33
  89. package/dist/{dls-DciZC_gQ.mjs → dls-N1x8sAK3.mjs} +3 -3
  90. package/dist/{dns-C2YPspGN.mjs → dns-DATWP-PF.mjs} +36 -30
  91. package/dist/{dns-firewall-CRfde07f.mjs → dns-firewall-n3Y2ui6W.mjs} +8 -8
  92. package/dist/{docs-CYjyBA8q.mjs → docs-CRc_WOXh.mjs} +1 -1
  93. package/dist/{dry-run-gy0Hl9xo.mjs → dry-run-kJbjn4kG.mjs} +1 -1
  94. package/dist/{durable-objects-DcI97y4p.mjs → durable-objects-DHK9w-vO.mjs} +2 -2
  95. package/dist/{email-auth-CMCQAu99.mjs → email-auth-ptdqNSTZ.mjs} +1 -1
  96. package/dist/email-domains-uL22-zRY.mjs +14 -0
  97. package/dist/{email-routing-7p9dr5Ue.mjs → email-routing-CV43rMJC.mjs} +15 -13
  98. package/dist/{email-security-Bu0fAYh-.mjs → email-security-DK_SJ0yi.mjs} +38 -38
  99. package/dist/{email-sending-OpMZNaHZ.mjs → email-sending-CTQafGec.mjs} +17 -17
  100. package/dist/{error-sanitization-DG8WSzHe.mjs → error-sanitization-BkgtZ0Vx.mjs} +1 -1
  101. package/dist/error-sanitization-D069tpKk.mjs +2 -0
  102. package/dist/{errors-C5RGao2J.mjs → errors-VG1mgwJl.mjs} +1 -1
  103. package/dist/{field-extractors-BfsNjd0e.mjs → field-extractors-jcZ_bAGc.mjs} +2 -2
  104. package/dist/{firewall-CJ-VIOk1.mjs → firewall-CW-fAI9m.mjs} +30 -14
  105. package/dist/{flagship-C5PTR1ND.mjs → flagship-RiLnDwfJ.mjs} +8 -8
  106. package/dist/{fraud-B7hwBheX.mjs → fraud-DvfBBTe8.mjs} +2 -2
  107. package/dist/get-3XNn0upb.mjs +2 -0
  108. package/dist/global-options-DiKj2cQy.mjs +2 -0
  109. package/dist/{google-tag-gateway-D7iFDVEa.mjs → google-tag-gateway-C5WYsSXv.mjs} +2 -2
  110. package/dist/{healthchecks-B4jTcKV7.mjs → healthchecks-BA1fmzTm.mjs} +5 -5
  111. package/dist/{hyperdrive-1432DM-p.mjs → hyperdrive-Ch6klUp3.mjs} +4 -4
  112. package/dist/iam-LlGEzRCq.mjs +62 -0
  113. package/dist/{images-Ttea4khD.mjs → images-C5WqUXkK.mjs} +11 -11
  114. package/dist/index.mjs +1 -1
  115. package/dist/{init-BeYrAg7Q.mjs → init-EVsjBrOz.mjs} +2 -2
  116. package/dist/{intel-CJznBf5n.mjs → intel-vcWyslaX.mjs} +18 -19
  117. package/dist/{interactive-DsU8VDvK.mjs → interactive-BCDFSPtq.mjs} +1 -1
  118. package/dist/{internal-DOho_iA0.mjs → internal-BhV9WjLp.mjs} +1 -1
  119. package/dist/{ips-BgNoRwFN.mjs → ips-CqHjVsqd.mjs} +1 -1
  120. package/dist/{k2-Cj1ORHul.mjs → k2-CZT2Pd5J.mjs} +2 -2
  121. package/dist/kv-Ipa7dnvF.mjs +12 -0
  122. package/dist/{lazy-command-DeTzOWvU.mjs → lazy-command-DbKVgdGT.mjs} +1 -1
  123. package/dist/{leaked-credential-checks-21Wc7OqL.mjs → leaked-credential-checks-EzT4TTjO.mjs} +4 -4
  124. package/dist/{live-BfrWKfq8.mjs → live-C9L1bNuE.mjs} +1 -1
  125. package/dist/load-balancers-Cb3VkSfc.mjs +84 -0
  126. package/dist/local-D5Vq6ooZ.mjs +2 -0
  127. package/dist/{local-CvzO-cQH.mjs → local-DIJ7SIKC.mjs} +1 -1
  128. package/dist/{local-runtime-DOpR_Tnc.mjs → local-runtime-BZjgkacr.mjs} +1 -1
  129. package/dist/{login-CVWkMh1L.mjs → login-DG5ebyab.mjs} +1 -1
  130. package/dist/login-DRJugxya.mjs +2 -0
  131. package/dist/logpush-C5Gw7F_9.mjs +68 -0
  132. package/dist/logs-y3REfHbb.mjs +51 -0
  133. package/dist/magic-network-monitoring-BZBGZB6M.mjs +34 -0
  134. package/dist/{magic-transit-BhP424T-.mjs → magic-transit-BPV_POf5.mjs} +129 -129
  135. package/dist/{managed-defense-6l_B3hn_.mjs → managed-defense-BaUBSUcz.mjs} +3 -3
  136. package/dist/{managed-transforms-D7FMBsnq.mjs → managed-transforms-CjkjLzMC.mjs} +2 -2
  137. package/dist/{mcp-BUOfMkBP.mjs → mcp-RPtrISTy.mjs} +6 -6
  138. package/dist/{mesh-B1RrhAT1.mjs → mesh-DZ4QHBPE.mjs} +5 -5
  139. package/dist/{migrate-BTU8AvlP.mjs → migrate-CRIUqGi2.mjs} +1 -1
  140. package/dist/{monetization-Da3ooFLC.mjs → monetization-CVZqM8Xo.mjs} +9 -5
  141. package/dist/{network-CjhSzhMm.mjs → network-DLt2JUo1.mjs} +15 -15
  142. package/dist/{network-interconnects-DEQD6GM8.mjs → network-interconnects-9nS5jL__.mjs} +10 -10
  143. package/dist/o11y-ySxrnP1Z.mjs +88 -0
  144. package/dist/{oauth-Dnog5v-Q.mjs → oauth-CFVUl-Wv.mjs} +1 -1
  145. package/dist/{oauth-DdXkpU44.mjs → oauth-Cidoyxfp.mjs} +1 -1
  146. package/dist/observability-C-KNh__y.mjs +4 -0
  147. package/dist/ohttp-gateway-B5nCl4s3.mjs +8 -0
  148. package/dist/organizations-DbeeWUL4.mjs +71 -0
  149. package/dist/output-BZQEl3mK.mjs +2 -0
  150. package/dist/package-B7RgwuFR.mjs +2 -0
  151. package/dist/{page-rules-D2eFbKWb.mjs → page-rules-DRw763O1.mjs} +4 -4
  152. package/dist/{pages-DYZDvWK6.mjs → pages-DfQnxiTk.mjs} +12 -12
  153. package/dist/{pay-per-crawl-CgPFv5HT.mjs → pay-per-crawl-EHYtSKxX.mjs} +13 -13
  154. package/dist/{pay-per-use-BIQrsrTy.mjs → pay-per-use-wdEhl8k4.mjs} +14 -12
  155. package/dist/{pipelines-D6pkhlpm.mjs → pipelines-DbyrI6F4.mjs} +11 -11
  156. package/dist/precursor-Dx8lN4UJ.mjs +4 -0
  157. package/dist/previews-DEVNSip2.mjs +6 -0
  158. package/dist/{progress-B-CVX0kn.mjs → progress-yvPscjYg.mjs} +1 -1
  159. package/dist/{prompt-DJF_Rs5S.mjs → prompt-CEpZ-lQZ.mjs} +1 -1
  160. package/dist/{queues-DaqLO-UO.mjs → queues-DgMc7Z6A.mjs} +18 -18
  161. package/dist/{r2-DDIU9JN3.mjs → r2-BpTVicIq.mjs} +43 -43
  162. package/dist/{radar-D59qCgld.mjs → radar-DW-S1VUh.mjs} +11 -11
  163. package/dist/{raw-fetch-BrOxDN9k.mjs → raw-fetch-Cl5spWC3.mjs} +1 -1
  164. package/dist/{ready-DgE08svD.mjs → ready-d0li0X6r.mjs} +1 -1
  165. package/dist/realtime-DMKHLYF4.mjs +170 -0
  166. package/dist/registrar-D23gfKBi.mjs +43 -0
  167. package/dist/{registrar-sandbox-uzs3eOKk.mjs → registrar-sandbox-lVLB1-mC.mjs} +4 -4
  168. package/dist/{reporting-Dx2YTick.mjs → reporting-WX8P3Y0k.mjs} +2 -2
  169. package/dist/{request-headers-DHzBX7dQ.mjs → request-headers-C0FpeBhz.mjs} +1 -1
  170. package/dist/{request-tracers-B49cBKkj.mjs → request-tracers-qd7XOAka.mjs} +2 -2
  171. package/dist/resource-sharing-B2ZSt_cA.mjs +36 -0
  172. package/dist/{rules-CjgLSlUC.mjs → rules-CB0QQTB3.mjs} +5 -5
  173. package/dist/rulesets-DmqwixUC.mjs +42 -0
  174. package/dist/{rum-vPEpMS_h.mjs → rum-BZ_24qZU.mjs} +9 -9
  175. package/dist/{run-BZ6Fj3jQ.mjs → run-BOKI1uWa.mjs} +1 -1
  176. package/dist/run-DBqOjD1P.mjs +2 -0
  177. package/dist/{schema-DuLIZRhA.mjs → schema-Dj9STsWI.mjs} +1 -1
  178. package/dist/{schema-cache-C_rvto6Y.mjs → schema-cache-5NkOj7Y3.mjs} +1 -1
  179. package/dist/schema-flags-CXm9iIv6.mjs +4 -0
  180. package/dist/{scim-BA7XbsSu.mjs → scim-DchxaJfE.mjs} +8 -8
  181. package/dist/{secrets-store-MEUNt1Ph.mjs → secrets-store-oAft1cFE.mjs} +5 -5
  182. package/dist/security-insights-DMm0qg_m.mjs +62 -0
  183. package/dist/{security-txt-DikhnR2L.mjs → security-txt-CIt0494b.mjs} +2 -2
  184. package/dist/{session-BOnam-Wv.mjs → session-vzNfUhPl.mjs} +1 -1
  185. package/dist/{shared-DmmWSObC.mjs → shared-MK-_lkbn.mjs} +1 -1
  186. package/dist/{signed-url-C-24KbWB.mjs → signed-url-gNangfwc.mjs} +1 -1
  187. package/dist/{smart-shield-DPqLMz7M.mjs → smart-shield-Boy_qbqd.mjs} +6 -6
  188. package/dist/{snippets-Bi3Uq1DF.mjs → snippets-DdoDYXW-.mjs} +3 -3
  189. package/dist/{spawn-C3hzWVrJ.mjs → spawn-B5F4OIHG.mjs} +1 -1
  190. package/dist/{spectrum-BaWKMoAl.mjs → spectrum-DLYIHelC.mjs} +3 -3
  191. package/dist/{speed-DShjlpAs.mjs → speed-DugG9Tm9.mjs} +2 -2
  192. package/dist/{sql-DCoFf15T.mjs → sql-Bb56llsb.mjs} +2 -2
  193. package/dist/src-BoSDeQ9m.mjs +133 -0
  194. package/dist/{ssl-C4nt4pJK.mjs → ssl-Bg4X3WGk.mjs} +24 -24
  195. package/dist/startup-profile-DQVkZZpb.mjs +2 -0
  196. package/dist/{startup-profile-CFJ_Lu1c.mjs → startup-profile-DZL2DC44.mjs} +1 -1
  197. package/dist/state-DW3QZtfh.mjs +2 -0
  198. package/dist/{state-DmjHXZat.mjs → state-mr5ux1Nb.mjs} +1 -1
  199. package/dist/{stream-CpZbnSpH.mjs → stream-BuZYDbNR.mjs} +21 -21
  200. package/dist/{tags-BIjQ3Kjh.mjs → tags-SKz2odE_.mjs} +12 -6
  201. package/dist/{telemetry-BDhqOpUw.mjs → telemetry-B4zmCpT0.mjs} +1 -1
  202. package/dist/telemetry-DkDUr4KK.mjs +2 -0
  203. package/dist/tenant-custom-nameservers-BhkhBerL.mjs +8 -0
  204. package/dist/tenants-DD-GMq0K.mjs +13 -0
  205. package/dist/{tools-C-vmgYSv.mjs → tools-KW_4hvzY.mjs} +1 -1
  206. package/dist/{tunnels-CXAO2CeL.mjs → tunnels-D90ztENM.mjs} +6 -6
  207. package/dist/{turnstile-Ctm0rs0q.mjs → turnstile-DhSU_Xar.mjs} +4 -4
  208. package/dist/ui-xjCox-gU.mjs +2 -0
  209. package/dist/{update-check-D_Wtw0_D.mjs → update-check-CRttabfu.mjs} +1 -1
  210. package/dist/{update-check-Dc7cRFlx.mjs → update-check-HltjTMDE.mjs} +1 -1
  211. package/dist/update-check-worker.mjs +1 -1
  212. package/dist/{url-normalization-DOfc2Q7a.mjs → url-normalization-K7gkmPvG.mjs} +2 -2
  213. package/dist/{url-scanner-J8M3X2tR.mjs → url-scanner-BRdWwka4.mjs} +3 -3
  214. package/dist/{user-BaF0qvvO.mjs → user-Cmb1_Wu5.mjs} +50 -52
  215. package/dist/{vectorize-D5qiggZU.mjs → vectorize-BTBerJME.mjs} +11 -11
  216. package/dist/verify-B9ILCohg.mjs +2 -0
  217. package/dist/verify-BCuWaO-L.mjs +2 -0
  218. package/dist/version-6Bpy6Bgt.mjs +2 -0
  219. package/dist/{waiting-rooms-BdmAq7ul.mjs → waiting-rooms-LymmKIGr.mjs} +16 -14
  220. package/dist/{web-assets-BySw_Tme.mjs → web-assets-LHPQsrnY.mjs} +21 -21
  221. package/dist/{web3-BKkKf1RF.mjs → web3-BsOio0Ae.mjs} +12 -12
  222. package/dist/workers-BnLiOjZf.mjs +39 -0
  223. package/dist/{workers-builds-CVJ4FqzB.mjs → workers-builds-sKpITeRk.mjs} +4 -4
  224. package/dist/{workers-for-platforms-mzdtmr6r.mjs → workers-for-platforms-BGp6yr6P.mjs} +9 -9
  225. package/dist/workers-vpc-D8lefWDo.mjs +12 -0
  226. package/dist/{workflows-Cr957c4U.mjs → workflows-B-ZIG3y7.mjs} +22 -22
  227. package/dist/{wrangler-migration-DZV7-4Fp.mjs → wrangler-migration-6E6wT_LZ.mjs} +67 -58
  228. package/dist/zaraz-BBKki5WS.mjs +22 -0
  229. package/dist/{zero-trust-BVCvQJ4e.mjs → zero-trust-BZDXM5r6.mjs} +487 -409
  230. package/dist/{zones-BzyjOT10.mjs → zones-B-UV_DGE.mjs} +24 -24
  231. package/package.json +16 -16
  232. package/dist/abuse-reports-zPrsxbRz.mjs +0 -24
  233. package/dist/ai-audit-DI4Rw2wl.mjs +0 -6
  234. package/dist/ai-search-QOenIzDL.mjs +0 -74
  235. package/dist/analytics-CQ-Yt1mm.mjs +0 -17
  236. package/dist/analytics-engine-CdrY5-95.mjs +0 -4
  237. package/dist/api-X3wKppsT.mjs +0 -3
  238. package/dist/argo-BiefH8wc.mjs +0 -14
  239. package/dist/auth-Czzy5Rs_.mjs +0 -2
  240. package/dist/auth-D5Yj9eYU.mjs +0 -2
  241. package/dist/billing-BrLJqlOf.mjs +0 -22
  242. package/dist/body-parser-BKcZS9iJ.mjs +0 -2
  243. package/dist/bot-management-BSBVuKc0.mjs +0 -9
  244. package/dist/brand-protection-Byoa1hvj.mjs +0 -26
  245. package/dist/browser-run-BSVANGzU.mjs +0 -40
  246. package/dist/build-CPKxZ3kL.mjs +0 -2
  247. package/dist/build-Dwd1_7o0.mjs +0 -2
  248. package/dist/cache-0xCdyNg9.mjs +0 -36
  249. package/dist/chunk-3PJ54H4K-CY8EY_n2.mjs +0 -363
  250. package/dist/create-BtmuVqVL.mjs +0 -2
  251. package/dist/custom-csrs-Dl_daAbX.mjs +0 -10
  252. package/dist/custom-nameservers-Bw2P7F_W.mjs +0 -8
  253. package/dist/custom-pages-CJ7ecSX6.mjs +0 -20
  254. package/dist/d1-BsWI546w.mjs +0 -89
  255. package/dist/email-domains-1Nx60ETD.mjs +0 -12
  256. package/dist/error-sanitization-B025CygB.mjs +0 -2
  257. package/dist/get-Be821dio.mjs +0 -2
  258. package/dist/iam-DuZenYtc.mjs +0 -48
  259. package/dist/kv-CTyuvcAz.mjs +0 -12
  260. package/dist/load-balancers-DMTsh-9q.mjs +0 -72
  261. package/dist/local-CWTti4ot.mjs +0 -2
  262. package/dist/login-Djz5mvHJ.mjs +0 -2
  263. package/dist/logpush-OMhp7VgE.mjs +0 -44
  264. package/dist/logs-BSyyNwso.mjs +0 -35
  265. package/dist/magic-cloud-networking-DD29yMnE.mjs +0 -68
  266. package/dist/magic-network-monitoring-DRRvSrDP.mjs +0 -34
  267. package/dist/o11y-DeNxXxcp.mjs +0 -86
  268. package/dist/oauth-clients-UnbMcHkx.mjs +0 -14
  269. package/dist/oauth-scopes-DbtnZVO4.mjs +0 -4
  270. package/dist/organization-IsxVyWol.mjs +0 -73
  271. package/dist/organizations-p8Mgo8A7.mjs +0 -4
  272. package/dist/origin-post-quantum-encryption-Bwysyttf.mjs +0 -6
  273. package/dist/output-BJEgbI0G.mjs +0 -2
  274. package/dist/package-BOE_De2L.mjs +0 -2
  275. package/dist/precursor-B35P8h6h.mjs +0 -4
  276. package/dist/previews-B1mqjXaJ.mjs +0 -6
  277. package/dist/realtime-DWjdrDzv.mjs +0 -168
  278. package/dist/registrar-uYOU1U27.mjs +0 -43
  279. package/dist/resource-sharing-CIsLVAcK.mjs +0 -36
  280. package/dist/rulesets-C7_aZA7m.mjs +0 -34
  281. package/dist/run-D4-K_cbQ.mjs +0 -2
  282. package/dist/schema-flags-Cr6kleor.mjs +0 -4
  283. package/dist/security-insights-ZKtey62s.mjs +0 -40
  284. package/dist/src-jyCTFHcS.mjs +0 -131
  285. package/dist/startup-profile-D_Qjgca1.mjs +0 -2
  286. package/dist/state-C7lNNN31.mjs +0 -2
  287. package/dist/telemetry-BZdRnr26.mjs +0 -2
  288. package/dist/tenant-CqYoylyU.mjs +0 -10
  289. package/dist/tenant-custom-nameservers-DDzzdyY3.mjs +0 -8
  290. package/dist/ui-BUCBQ3Sq.mjs +0 -2
  291. package/dist/version-DNcdABcr.mjs +0 -2
  292. package/dist/workers-TS0oQ-XH.mjs +0 -39
  293. package/dist/workers-vpc-xB1hHFPd.mjs +0 -12
  294. package/dist/zaraz-C8__FhOh.mjs +0 -22
@@ -1,17 +1,17 @@
1
1
  #!/usr/bin/env node
2
- import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CvzO-cQH.mjs";import{i as n,n as r}from"./auth-D5Yj9eYU.mjs";import{a as i,t as a}from"./context-BvLXzoMs.mjs";import{t as o}from"./output-BJEgbI0G.mjs";import{t as s}from"./dry-run-gy0Hl9xo.mjs";import{t as c}from"./progress-B-CVX0kn.mjs";import{t as l}from"./run-BZ6Fj3jQ.mjs";import"./telemetry-BZdRnr26.mjs";import{a as u,n as d,s as f,t as p}from"./body-parser-BKcZS9iJ.mjs";import{n as m,t as h}from"./input-validation-D7z60HJH.mjs";import{a as g,i as _,n as v}from"./prompt-DJF_Rs5S.mjs";import{n as y,t as b}from"./raw-fetch-BrOxDN9k.mjs";function ee(e){return e.usage(`$0 r2 buckets cors delete <bucket-name>
2
+ import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-DIJ7SIKC.mjs";import{i as n,n as r}from"./auth-B-h0BHg7.mjs";import{a as i,t as a}from"./context-BY1Eh_Qe.mjs";import{t as o}from"./output-BZQEl3mK.mjs";import{t as s}from"./dry-run-kJbjn4kG.mjs";import{t as c}from"./progress-yvPscjYg.mjs";import{t as l}from"./run-BOKI1uWa.mjs";import"./telemetry-DkDUr4KK.mjs";import{a as u,n as d,s as f,t as p}from"./body-parser-DoewLePl.mjs";import{n as m,t as h}from"./input-validation-D7z60HJH.mjs";import{a as g,i as _,n as v}from"./prompt-CEpZ-lQZ.mjs";import{n as y,t as b}from"./raw-fetch-Cl5spWC3.mjs";import{t as x}from"./body-unions-DNs981Ia.mjs";function ee(e){return e.usage(`$0 r2 buckets cors delete <bucket-name>
3
3
 
4
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 te={command:`delete <bucket-name>`,describe:`Delete Bucket CORS Policy`,builder:ee,handler:async e=>l({command:`r2 buckets cors delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let l={};if(e[`cf-r2-jurisdiction`]!==void 0&&(l[`cf-r2-jurisdiction`]=String(e[`cf-r2-jurisdiction`])),e.dryRun){let t=await i();s({command:`cf r2 buckets cors delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/r2/buckets/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/cors`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},bodyKind:`none`});return}let u=await r(e),d=e.local?t:await a();if(e.accountId=d,!await v({force:!!e.force,message:`This removes the R2 bucket's CORS policy. Browser requests that depend on these cross-origin permissions may fail.`}))return;let f=await c(`Deleting`,async()=>n(u,`DELETE`,`/accounts/${d}/r2/buckets/${encodeURIComponent(String(e[`bucket-name`]))}/cors`,{headers:Object.keys(l).length>0?l:void 0}));o(f,{successLabel:`Deleted`})})};function ne(e){return e.usage(`$0 r2 buckets cors get <bucket-name>
5
5
 
6
6
  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 re={command:`get <bucket-name>`,describe:`Get Bucket CORS Policy`,builder:ne,handler:async e=>l({command:`r2 buckets cors get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={};if(e[`cf-r2-jurisdiction`]!==void 0&&(l[`cf-r2-jurisdiction`]=String(e[`cf-r2-jurisdiction`])),e.dryRun){let t=await i();s({command:`cf r2 buckets cors get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/r2/buckets/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/cors`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},bodyKind:`none`});return}let u=await r(e),d=e.local?t:await a();e.accountId=d;let f=await c(`Loading`,async()=>n(u,`GET`,`/accounts/${d}/r2/buckets/${encodeURIComponent(String(e[`bucket-name`]))}/cors`,{headers:Object.keys(l).length>0?l:void 0}));o(f,{successLabel:`Loaded`})})};function ie(e){return e.usage(`$0 r2 buckets cors update <bucket-name>
7
7
 
8
- 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 ae={command:`update <bucket-name>`,describe:`Set Bucket CORS Policy`,builder:ie,handler:async e=>l({command:`r2 buckets cors update`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let l={};if(e[`cf-r2-jurisdiction`]!==void 0&&(l[`cf-r2-jurisdiction`]=String(e[`cf-r2-jurisdiction`])),e.dryRun){let t=await i();s({command:`cf r2 buckets cors update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/r2/buckets/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/cors`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},bodyKind:`json`,body:e.body===void 0?p({rules:u(e.rules,`rules`)}):d(e.body)});return}let m=await r(e),h=e.local?t:await a();if(e.accountId=h,!await v({force:!!e.force,message:`This replaces the R2 bucket's CORS policy. Browser requests that relied on the previous rules may fail.`}))return;if(e.body){let t=d(e.body),r=await c(`Deleting`,async()=>n(m,`PUT`,`/accounts/${h}/r2/buckets/${encodeURIComponent(String(e[`bucket-name`]))}/cors`,{body:t,headers:Object.keys(l).length>0?l:void 0}));o(r,{successLabel:`Deleted`});return}let g={};e.rules!==void 0&&f(g,[`rules`],u(e.rules,`rules`));let _=await c(`Deleting`,async()=>n(m,`PUT`,`/accounts/${h}/r2/buckets/${encodeURIComponent(String(e[`bucket-name`]))}/cors`,{body:g,headers:Object.keys(l).length>0?l:void 0}));o(_,{successLabel:`Deleted`})})},oe={command:`cors`,describe:`Operations for buckets.cors`,builder:e=>e.command(te).command(re).command(ae).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function x(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 S={command:`create-by-name <bucket-name>`,describe:`Create Bucket (by name)`,builder:x,handler:async e=>l({command:`r2 buckets create-by-name`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={};if(e[`cf-r2-jurisdiction`]!==void 0&&(l[`cf-r2-jurisdiction`]=String(e[`cf-r2-jurisdiction`])),e[`cf-r2-storage-class`]!==void 0&&(l[`cf-r2-storage-class`]=String(e[`cf-r2-storage-class`])),e.dryRun){let t=await i();s({command:`cf r2 buckets create-by-name`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/r2/buckets/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},bodyKind:`none`});return}let u=await r(e),d=e.local?t:await a();e.accountId=d;let f=await c(`Updating`,async()=>n(u,`PUT`,`/accounts/${d}/r2/buckets/${encodeURIComponent(String(e[`bucket-name`]))}`,{headers:Object.keys(l).length>0?l:void 0}));o(f,{successLabel:`Updated`})})};function C(e){return e.usage(`$0 r2 buckets create
8
+ 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 ae={command:`update <bucket-name>`,describe:`Set Bucket CORS Policy`,builder:ie,handler:async e=>l({command:`r2 buckets cors update`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let l={};if(e[`cf-r2-jurisdiction`]!==void 0&&(l[`cf-r2-jurisdiction`]=String(e[`cf-r2-jurisdiction`])),e.dryRun){let t=await i();s({command:`cf r2 buckets cors update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/r2/buckets/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/cors`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},bodyKind:`json`,body:e.body===void 0?p({rules:u(e.rules,`rules`)}):d(e.body)});return}let m=e.body===void 0?void 0:d(e.body),h=await r(e),g=e.local?t:await a();if(e.accountId=g,!await v({force:!!e.force,message:`This replaces the R2 bucket's CORS policy. Browser requests that relied on the previous rules may fail.`}))return;if(e.body!==void 0){let t=m,r=await c(`Updating`,async()=>n(h,`PUT`,`/accounts/${g}/r2/buckets/${encodeURIComponent(String(e[`bucket-name`]))}/cors`,{body:t,headers:Object.keys(l).length>0?l:void 0}));o(r,{successLabel:`Updated`});return}let _={};e.rules!==void 0&&f(_,[`rules`],u(e.rules,`rules`));let y=await c(`Updating`,async()=>n(h,`PUT`,`/accounts/${g}/r2/buckets/${encodeURIComponent(String(e[`bucket-name`]))}/cors`,{body:_,headers:Object.keys(l).length>0?l:void 0}));o(y,{successLabel:`Updated`})})},oe={command:`cors`,describe:`Operations for buckets.cors`,builder:e=>e.command(te).command(re).command(ae).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function se(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 S={command:`create-by-name <bucket-name>`,describe:`Create Bucket (by name)`,builder:se,handler:async e=>l({command:`r2 buckets create-by-name`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={};if(e[`cf-r2-jurisdiction`]!==void 0&&(l[`cf-r2-jurisdiction`]=String(e[`cf-r2-jurisdiction`])),e[`cf-r2-storage-class`]!==void 0&&(l[`cf-r2-storage-class`]=String(e[`cf-r2-storage-class`])),e.dryRun){let t=await i();s({command:`cf r2 buckets create-by-name`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/r2/buckets/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},bodyKind:`none`});return}let u=await r(e),d=e.local?t:await a();e.accountId=d;let f=await c(`Updating`,async()=>n(u,`PUT`,`/accounts/${d}/r2/buckets/${encodeURIComponent(String(e[`bucket-name`]))}`,{headers:Object.keys(l).length>0?l:void 0}));o(f,{successLabel:`Updated`})})};function C(e){return e.usage(`$0 r2 buckets create
9
9
 
10
- 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`]}).coerce(`location-hint`,e=>m(e,`location-hint`,`text`)).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`}).coerce(`storage-class`,e=>m(e,`storage-class`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const w={command:`create`,describe:`Create Bucket`,builder:C,handler:async e=>l({command:`r2 buckets create`,classification:{safeFlags:[`location-hint`,`storage-class`,`dry-run`]}},e,async()=>{let l={};if(e[`cf-r2-jurisdiction`]!==void 0&&(l[`cf-r2-jurisdiction`]=String(e[`cf-r2-jurisdiction`])),e.dryRun){let t=await i();s({command:`cf r2 buckets create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/r2/buckets`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({locationHint:e[`location-hint`],name:m(e.name,`name`,`text`),storageClass:e[`storage-class`]}):d(e.body)});return}let u=await r(e),h=e.local?t:await a();if(e.accountId=h,e.body){let t=d(e.body),r=await c(`Creating`,async()=>n(u,`POST`,`/accounts/${h}/r2/buckets`,{body:t,headers:Object.keys(l).length>0?l:void 0}));o(r,{successLabel:`Created`});return}e.name===void 0&&(e.name=await g(`name`,`Name of the bucket.`));let _={};e[`location-hint`]!==void 0&&f(_,[`locationHint`],e[`location-hint`]),e.name!==void 0&&f(_,[`name`],m(e.name,`name`,`text`)),e[`storage-class`]!==void 0&&f(_,[`storageClass`],e[`storage-class`]);let v=await c(`Creating`,async()=>n(u,`POST`,`/accounts/${h}/r2/buckets`,{body:_,headers:Object.keys(l).length>0?l:void 0}));o(v,{successLabel:`Created`})})};function T(e){return e.usage(`$0 r2 buckets delete <bucket-name>
10
+ 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`]}).coerce(`location-hint`,e=>m(e,`location-hint`,`text`)).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`}).coerce(`storage-class`,e=>m(e,`storage-class`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const w={command:`create`,describe:`Create Bucket`,builder:C,handler:async e=>l({command:`r2 buckets create`,classification:{safeFlags:[`location-hint`,`storage-class`,`dry-run`]}},e,async()=>{let l={};if(e[`cf-r2-jurisdiction`]!==void 0&&(l[`cf-r2-jurisdiction`]=String(e[`cf-r2-jurisdiction`])),e.dryRun){let t=await i();s({command:`cf r2 buckets create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/r2/buckets`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({locationHint:e[`location-hint`],name:m(e.name,`name`,`text`),storageClass:e[`storage-class`]}):d(e.body)});return}let u=e.body===void 0?void 0:d(e.body),h=await r(e),_=e.local?t:await a();if(e.accountId=_,e.body!==void 0){let e=u,t=await c(`Creating`,async()=>n(h,`POST`,`/accounts/${_}/r2/buckets`,{body:e,headers:Object.keys(l).length>0?l:void 0}));o(t,{successLabel:`Created`});return}e.name===void 0&&(e.name=await g(`name`,`Name of the bucket.`));let v={};e[`location-hint`]!==void 0&&f(v,[`locationHint`],e[`location-hint`]),e.name!==void 0&&f(v,[`name`],m(e.name,`name`,`text`)),e[`storage-class`]!==void 0&&f(v,[`storageClass`],e[`storage-class`]);let y=await c(`Creating`,async()=>n(h,`POST`,`/accounts/${_}/r2/buckets`,{body:v,headers:Object.keys(l).length>0?l:void 0}));o(y,{successLabel:`Created`})})};function T(e){return e.usage(`$0 r2 buckets delete <bucket-name>
11
11
 
12
12
  Deletes an empty R2 bucket and its configuration. The bucket must have no objects, no in-progress multipart uploads, and no event notification rules; otherwise the request fails.`).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 E={command:`delete <bucket-name>`,describe:`Delete Bucket`,builder:T,handler:async e=>l({command:`r2 buckets delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let l={};if(e[`cf-r2-jurisdiction`]!==void 0&&(l[`cf-r2-jurisdiction`]=String(e[`cf-r2-jurisdiction`])),e.dryRun){let t=await i();s({command:`cf r2 buckets delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/r2/buckets/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},bodyKind:`none`});return}let u=await r(e),d=e.local?t:await a();if(e.accountId=d,!await v({force:!!e.force,message:`This permanently deletes the empty R2 bucket and its configuration.`}))return;let f=await c(`Deleting`,async()=>n(u,`DELETE`,`/accounts/${d}/r2/buckets/${encodeURIComponent(String(e[`bucket-name`]))}`,{headers:Object.keys(l).length>0?l:void 0}));o(f,{successLabel:`Deleted`})})};function D(e){return e.usage(`$0 r2 buckets domains custom create <bucket-name>
13
13
 
14
- Register a new custom domain 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(`ciphers`,{type:`string`,array:!0,description:`An allowlist of ciphers for TLS termination. These ciphers must be in the BoringSSL format.`}).option(`domain`,{type:`string`,description:`Name of the custom domain to be added.`}).option(`enabled`,{type:`boolean`,description:`Whether to enable public bucket access at the custom domain. If undefined, the domain will be enabled.`}).option(`min-tls`,{type:`string`,description:`Minimum TLS Version the custom domain will accept for incoming connections. If not set, defaults to 1.0.`,choices:[`1.0`,`1.1`,`1.2`,`1.3`]}).coerce(`min-tls`,e=>m(e,`min-tls`,`text`)).option(`zone-id`,{type:`string`,description:`Zone ID of the custom domain.`}).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 <bucket-name>`,describe:`Attach Custom Domain To Bucket`,builder:D,handler:async e=>l({command:`r2 buckets domains custom create`,classification:{safeFlags:[`enabled`,`min-tls`,`dry-run`]}},e,async()=>{let l={};if(e[`cf-r2-jurisdiction`]!==void 0&&(l[`cf-r2-jurisdiction`]=String(e[`cf-r2-jurisdiction`])),e.dryRun){let t=await i();s({command:`cf r2 buckets domains custom create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/r2/buckets/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/domains/custom`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},bodyKind:`json`,body:e.body===void 0?p({ciphers:e.ciphers,domain:m(e.domain,`domain`,`text`),enabled:e.enabled,minTLS:e[`min-tls`],zoneId:m(e[`zone-id`],`zone-id`,`text`)}):d(e.body)});return}let u=await r(e),h=e.local?t:await a();if(e.accountId=h,e.body){let t=d(e.body),r=await c(`Creating`,async()=>n(u,`POST`,`/accounts/${h}/r2/buckets/${encodeURIComponent(String(e[`bucket-name`]))}/domains/custom`,{body:t,headers:Object.keys(l).length>0?l:void 0}));o(r,{successLabel:`Created`});return}if(e.domain===void 0&&(e.domain=await g(`domain`,`Name of the custom domain to be added.`)),e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);e[`zone-id`]===void 0&&(e[`zone-id`]=await g(`zone-id`,`Zone ID of the custom domain.`));let _={};e.ciphers!==void 0&&f(_,[`ciphers`],e.ciphers),e.domain!==void 0&&f(_,[`domain`],m(e.domain,`domain`,`text`)),e.enabled!==void 0&&f(_,[`enabled`],e.enabled),e[`min-tls`]!==void 0&&f(_,[`minTLS`],e[`min-tls`]),e[`zone-id`]!==void 0&&f(_,[`zoneId`],m(e[`zone-id`],`zone-id`,`text`));let v=await c(`Creating`,async()=>n(u,`POST`,`/accounts/${h}/r2/buckets/${encodeURIComponent(String(e[`bucket-name`]))}/domains/custom`,{body:_,headers:Object.keys(l).length>0?l:void 0}));o(v,{successLabel:`Created`})})};function k(e){return e.usage(`$0 r2 buckets domains custom delete <domain>
14
+ Register a new custom domain 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(`ciphers`,{type:`string`,array:!0,description:`An allowlist of ciphers for TLS termination. These ciphers must be in the BoringSSL format.`}).option(`domain`,{type:`string`,description:`Name of the custom domain to be added.`}).option(`enabled`,{type:`boolean`,description:`Whether to enable public bucket access at the custom domain. If undefined, the domain will be enabled.`}).option(`min-tls`,{type:`string`,description:`Minimum TLS Version the custom domain will accept for incoming connections. If not set, defaults to 1.0.`,choices:[`1.0`,`1.1`,`1.2`,`1.3`]}).coerce(`min-tls`,e=>m(e,`min-tls`,`text`)).option(`zone-id`,{type:`string`,description:`Zone ID of the custom domain.`}).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 <bucket-name>`,describe:`Attach Custom Domain To Bucket`,builder:D,handler:async e=>l({command:`r2 buckets domains custom create`,classification:{safeFlags:[`enabled`,`min-tls`,`dry-run`]}},e,async()=>{let l={};if(e[`cf-r2-jurisdiction`]!==void 0&&(l[`cf-r2-jurisdiction`]=String(e[`cf-r2-jurisdiction`])),e.dryRun){let t=await i();s({command:`cf r2 buckets domains custom create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/r2/buckets/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/domains/custom`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},bodyKind:`json`,body:e.body===void 0?p({ciphers:e.ciphers,domain:m(e.domain,`domain`,`text`),enabled:e.enabled,minTLS:e[`min-tls`],zoneId:m(e[`zone-id`],`zone-id`,`text`)}):d(e.body)});return}let u=e.body===void 0?void 0:d(e.body),h=await r(e),_=e.local?t:await a();if(e.accountId=_,e.body!==void 0){let t=u,r=await c(`Creating`,async()=>n(h,`POST`,`/accounts/${_}/r2/buckets/${encodeURIComponent(String(e[`bucket-name`]))}/domains/custom`,{body:t,headers:Object.keys(l).length>0?l:void 0}));o(r,{successLabel:`Created`});return}if(e.domain===void 0&&(e.domain=await g(`domain`,`Name of the custom domain to be added.`)),e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);e[`zone-id`]===void 0&&(e[`zone-id`]=await g(`zone-id`,`Zone ID of the custom domain.`));let v={};e.ciphers!==void 0&&f(v,[`ciphers`],e.ciphers),e.domain!==void 0&&f(v,[`domain`],m(e.domain,`domain`,`text`)),e.enabled!==void 0&&f(v,[`enabled`],e.enabled),e[`min-tls`]!==void 0&&f(v,[`minTLS`],e[`min-tls`]),e[`zone-id`]!==void 0&&f(v,[`zoneId`],m(e[`zone-id`],`zone-id`,`text`));let y=await c(`Creating`,async()=>n(h,`POST`,`/accounts/${_}/r2/buckets/${encodeURIComponent(String(e[`bucket-name`]))}/domains/custom`,{body:v,headers:Object.keys(l).length>0?l:void 0}));o(y,{successLabel:`Created`})})};function k(e){return e.usage(`$0 r2 buckets domains custom delete <domain>
15
15
 
16
16
  Disconnects a custom domain from an R2 bucket and removes its configuration. Access through other enabled custom domains or the bucket's r2.dev domain is unaffected.`).positional(`domain`,{type:`string`,description:`Name of the custom domain.`,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 A={command:`delete <domain>`,describe:`Remove Custom Domain From Bucket`,builder:k,handler:async e=>l({command:`r2 buckets domains custom delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let l={};if(e[`cf-r2-jurisdiction`]!==void 0&&(l[`cf-r2-jurisdiction`]=String(e[`cf-r2-jurisdiction`])),e.dryRun){let t=await i();s({command:`cf r2 buckets domains custom delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/r2/buckets/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/domains/custom/${e.domain==null?`<domain>`:encodeURIComponent(String(e.domain))}`,pathParams:{"bucket-name":String(e[`bucket-name`]??``),domain:String(e.domain??``)},bodyKind:`none`});return}let u=await r(e),d=e.local?t:await a();if(e.accountId=d,!await v({force:!!e.force,message:`This disconnects the custom domain from the R2 bucket. Access through other enabled domains remains available.`}))return;let f=await c(`Deleting`,async()=>n(u,`DELETE`,`/accounts/${d}/r2/buckets/${encodeURIComponent(String(e[`bucket-name`]))}/domains/custom/${encodeURIComponent(String(e.domain))}`,{headers:Object.keys(l).length>0?l:void 0}));o(f,{successLabel:`Deleted`})})};function j(e){return e.usage(`$0 r2 buckets domains custom get <domain>
17
17
 
@@ -19,49 +19,49 @@ Get the configuration for a custom domain on an existing R2 bucket.`).positional
19
19
 
20
20
  Gets a list of all custom domains registered with an existing R2 bucket.`).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 P={command:`list`,describe:`List Custom Domains of Bucket`,builder:N,handler:async e=>l({command:`r2 buckets domains custom list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={};if(e[`cf-r2-jurisdiction`]!==void 0&&(l[`cf-r2-jurisdiction`]=String(e[`cf-r2-jurisdiction`])),e.dryRun){let t=await i();s({command:`cf r2 buckets domains custom list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/r2/buckets/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/domains/custom`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},bodyKind:`none`});return}let u=await r(e),d=e.local?t:await a();e.accountId=d;let f=await c(`Loading`,async()=>n(u,`GET`,`/accounts/${d}/r2/buckets/${encodeURIComponent(String(e[`bucket-name`]))}/domains/custom`,{headers:Object.keys(l).length>0?l:void 0}));o(f,{successLabel:`Loaded`})})};function F(e){return e.usage(`$0 r2 buckets domains custom update <domain>
21
21
 
22
- Edit the configuration for a custom domain on an existing R2 bucket.`).positional(`domain`,{type:`string`,description:`Name of the custom domain.`,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(`ciphers`,{type:`string`,array:!0,description:`An allowlist of ciphers for TLS termination. These ciphers must be in the BoringSSL format.`}).option(`enabled`,{type:`boolean`,description:`Whether to enable public bucket access at the specified custom domain.`}).option(`min-tls`,{type:`string`,description:`Minimum TLS Version the custom domain will accept for incoming connections. If not set, defaults to previous value.`,choices:[`1.0`,`1.1`,`1.2`,`1.3`]}).coerce(`min-tls`,e=>m(e,`min-tls`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const I={command:`update <domain>`,describe:`Configure Custom Domain Settings`,builder:F,handler:async e=>l({command:`r2 buckets domains custom update`,classification:{safeFlags:[`enabled`,`min-tls`,`dry-run`]}},e,async()=>{let l={};if(e[`cf-r2-jurisdiction`]!==void 0&&(l[`cf-r2-jurisdiction`]=String(e[`cf-r2-jurisdiction`])),e.dryRun){let t=await i();s({command:`cf r2 buckets domains custom update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/r2/buckets/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/domains/custom/${e.domain==null?`<domain>`:encodeURIComponent(String(e.domain))}`,pathParams:{"bucket-name":String(e[`bucket-name`]??``),domain:String(e.domain??``)},bodyKind:`json`,body:e.body===void 0?p({ciphers:e.ciphers,enabled:e.enabled,minTLS:e[`min-tls`]}):d(e.body)});return}let u=await r(e),m=e.local?t:await a();if(e.accountId=m,e.body){let t=d(e.body),r=await c(`Updating`,async()=>n(u,`PUT`,`/accounts/${m}/r2/buckets/${encodeURIComponent(String(e[`bucket-name`]))}/domains/custom/${encodeURIComponent(String(e.domain))}`,{body:t,headers:Object.keys(l).length>0?l:void 0}));o(r,{successLabel:`Updated`});return}let h={};e.ciphers!==void 0&&f(h,[`ciphers`],e.ciphers),e.enabled!==void 0&&f(h,[`enabled`],e.enabled),e[`min-tls`]!==void 0&&f(h,[`minTLS`],e[`min-tls`]);let g=await c(`Updating`,async()=>n(u,`PUT`,`/accounts/${m}/r2/buckets/${encodeURIComponent(String(e[`bucket-name`]))}/domains/custom/${encodeURIComponent(String(e.domain))}`,{body:h,headers:Object.keys(l).length>0?l:void 0}));o(g,{successLabel:`Updated`})})},L={command:`custom`,describe:`Operations for buckets.domains.custom`,builder:e=>e.command(O).command(A).command(M).command(P).command(I).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function R(e){return e.usage(`$0 r2 buckets domains managed list
22
+ Edit the configuration for a custom domain on an existing R2 bucket.`).positional(`domain`,{type:`string`,description:`Name of the custom domain.`,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(`ciphers`,{type:`string`,array:!0,description:`An allowlist of ciphers for TLS termination. These ciphers must be in the BoringSSL format.`}).option(`enabled`,{type:`boolean`,description:`Whether to enable public bucket access at the specified custom domain.`}).option(`min-tls`,{type:`string`,description:`Minimum TLS Version the custom domain will accept for incoming connections. If not set, defaults to previous value.`,choices:[`1.0`,`1.1`,`1.2`,`1.3`]}).coerce(`min-tls`,e=>m(e,`min-tls`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const I={command:`update <domain>`,describe:`Configure Custom Domain Settings`,builder:F,handler:async e=>l({command:`r2 buckets domains custom update`,classification:{safeFlags:[`enabled`,`min-tls`,`dry-run`]}},e,async()=>{let l={};if(e[`cf-r2-jurisdiction`]!==void 0&&(l[`cf-r2-jurisdiction`]=String(e[`cf-r2-jurisdiction`])),e.dryRun){let t=await i();s({command:`cf r2 buckets domains custom update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/r2/buckets/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/domains/custom/${e.domain==null?`<domain>`:encodeURIComponent(String(e.domain))}`,pathParams:{"bucket-name":String(e[`bucket-name`]??``),domain:String(e.domain??``)},bodyKind:`json`,body:e.body===void 0?p({ciphers:e.ciphers,enabled:e.enabled,minTLS:e[`min-tls`]}):d(e.body)});return}let u=e.body===void 0?void 0:d(e.body),m=await r(e),h=e.local?t:await a();if(e.accountId=h,e.body!==void 0){let t=u,r=await c(`Updating`,async()=>n(m,`PUT`,`/accounts/${h}/r2/buckets/${encodeURIComponent(String(e[`bucket-name`]))}/domains/custom/${encodeURIComponent(String(e.domain))}`,{body:t,headers:Object.keys(l).length>0?l:void 0}));o(r,{successLabel:`Updated`});return}let g={};e.ciphers!==void 0&&f(g,[`ciphers`],e.ciphers),e.enabled!==void 0&&f(g,[`enabled`],e.enabled),e[`min-tls`]!==void 0&&f(g,[`minTLS`],e[`min-tls`]);let _=await c(`Updating`,async()=>n(m,`PUT`,`/accounts/${h}/r2/buckets/${encodeURIComponent(String(e[`bucket-name`]))}/domains/custom/${encodeURIComponent(String(e.domain))}`,{body:g,headers:Object.keys(l).length>0?l:void 0}));o(_,{successLabel:`Updated`})})},L={command:`custom`,describe:`Operations for buckets.domains.custom`,builder:e=>e.command(O).command(A).command(M).command(P).command(I).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function R(e){return e.usage(`$0 r2 buckets domains managed get <bucket-name>
23
23
 
24
- Gets the R2 bucket's managed r2.dev domain and whether public access is enabled. The r2.dev domain is rate-limited and intended for development use.`).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 z={command:`list`,describe:`Get r2.dev Domain of Bucket`,builder:R,handler:async e=>l({command:`r2 buckets domains managed list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={};if(e[`cf-r2-jurisdiction`]!==void 0&&(l[`cf-r2-jurisdiction`]=String(e[`cf-r2-jurisdiction`])),e.dryRun){let t=await i();s({command:`cf r2 buckets domains managed list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/r2/buckets/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/domains/managed`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},bodyKind:`none`});return}let u=await r(e),d=e.local?t:await a();e.accountId=d;let f=await c(`Loading`,async()=>n(u,`GET`,`/accounts/${d}/r2/buckets/${encodeURIComponent(String(e[`bucket-name`]))}/domains/managed`,{headers:Object.keys(l).length>0?l:void 0}));o(f,{successLabel:`Loaded`})})};function B(e){return e.usage(`$0 r2 buckets domains managed update <bucket-name>
24
+ Gets the R2 bucket's managed r2.dev domain and whether public access is enabled. The r2.dev domain is rate-limited and intended for development use.`).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 z={command:`get <bucket-name>`,describe:`Get r2.dev Domain of Bucket`,builder:R,handler:async e=>l({command:`r2 buckets domains managed get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={};if(e[`cf-r2-jurisdiction`]!==void 0&&(l[`cf-r2-jurisdiction`]=String(e[`cf-r2-jurisdiction`])),e.dryRun){let t=await i();s({command:`cf r2 buckets domains managed get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/r2/buckets/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/domains/managed`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},bodyKind:`none`});return}let u=await r(e),d=e.local?t:await a();e.accountId=d;let f=await c(`Loading`,async()=>n(u,`GET`,`/accounts/${d}/r2/buckets/${encodeURIComponent(String(e[`bucket-name`]))}/domains/managed`,{headers:Object.keys(l).length>0?l:void 0}));o(f,{successLabel:`Loaded`})})};function B(e){return e.usage(`$0 r2 buckets domains managed update <bucket-name>
25
25
 
26
- Enables or disables public access to the R2 bucket through its managed r2.dev domain. Custom domain access is unaffected. The r2.dev domain is rate-limited and intended for development use.`).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(`enabled`,{type:`boolean`,description:`Whether to enable public bucket access at the r2.dev domain.`}).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 V={command:`update <bucket-name>`,describe:`Update r2.dev Domain of Bucket`,builder:B,handler:async e=>l({command:`r2 buckets domains managed update`,classification:{safeFlags:[`enabled`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let l={};if(e[`cf-r2-jurisdiction`]!==void 0&&(l[`cf-r2-jurisdiction`]=String(e[`cf-r2-jurisdiction`])),e.dryRun){let t=await i();s({command:`cf r2 buckets domains managed update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/r2/buckets/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/domains/managed`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},bodyKind:`json`,body:e.body===void 0?p({enabled:e.enabled}):d(e.body)});return}let u=await r(e),m=e.local?t:await a();if(e.accountId=m,!await v({force:!!e.force,message:`This changes public access to the R2 bucket through its r2.dev domain.`}))return;if(e.body){let t=d(e.body),r=await c(`Deleting`,async()=>n(u,`PUT`,`/accounts/${m}/r2/buckets/${encodeURIComponent(String(e[`bucket-name`]))}/domains/managed`,{body:t,headers:Object.keys(l).length>0?l:void 0}));o(r,{successLabel:`Deleted`});return}if(e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);let h={};e.enabled!==void 0&&f(h,[`enabled`],e.enabled);let g=await c(`Deleting`,async()=>n(u,`PUT`,`/accounts/${m}/r2/buckets/${encodeURIComponent(String(e[`bucket-name`]))}/domains/managed`,{body:h,headers:Object.keys(l).length>0?l:void 0}));o(g,{successLabel:`Deleted`})})},H={command:`managed`,describe:`Operations for buckets.domains.managed`,builder:e=>e.command(z).command(V).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},U={command:`domains`,describe:`Operations for buckets.domains`,builder:e=>e.command(L).command(H).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function W(e){return e.usage(`$0 r2 buckets edit <bucket-name>
26
+ Enables or disables public access to the R2 bucket through its managed r2.dev domain. Custom domain access is unaffected. The r2.dev domain is rate-limited and intended for development use.`).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(`enabled`,{type:`boolean`,description:`Whether to enable public bucket access at the r2.dev domain.`}).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 V={command:`update <bucket-name>`,describe:`Update r2.dev Domain of Bucket`,builder:B,handler:async e=>l({command:`r2 buckets domains managed update`,classification:{safeFlags:[`enabled`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let l={};if(e[`cf-r2-jurisdiction`]!==void 0&&(l[`cf-r2-jurisdiction`]=String(e[`cf-r2-jurisdiction`])),e.dryRun){let t=await i();s({command:`cf r2 buckets domains managed update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/r2/buckets/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/domains/managed`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},bodyKind:`json`,body:e.body===void 0?p({enabled:e.enabled}):d(e.body)});return}let u=e.body===void 0?void 0:d(e.body),m=await r(e),h=e.local?t:await a();if(e.accountId=h,!await v({force:!!e.force,message:`This changes public access to the R2 bucket through its r2.dev domain.`}))return;if(e.body!==void 0){let t=u,r=await c(`Updating`,async()=>n(m,`PUT`,`/accounts/${h}/r2/buckets/${encodeURIComponent(String(e[`bucket-name`]))}/domains/managed`,{body:t,headers:Object.keys(l).length>0?l:void 0}));o(r,{successLabel:`Updated`});return}if(e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);let g={};e.enabled!==void 0&&f(g,[`enabled`],e.enabled);let _=await c(`Updating`,async()=>n(m,`PUT`,`/accounts/${h}/r2/buckets/${encodeURIComponent(String(e[`bucket-name`]))}/domains/managed`,{body:g,headers:Object.keys(l).length>0?l:void 0}));o(_,{successLabel:`Updated`})})},H={command:`managed`,describe:`Operations for buckets.domains.managed`,builder:e=>e.command(z).command(V).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},U={command:`domains`,describe:`Operations for buckets.domains`,builder:e=>e.command(L).command(H).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function W(e){return e.usage(`$0 r2 buckets edit <bucket-name>
27
27
 
28
28
  Changes the default storage class for newly uploaded objects in an existing R2 bucket. Existing objects retain their storage class, and individual uploads can override the bucket default.`).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.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const G={command:`edit <bucket-name>`,describe:`Patch Bucket`,builder:W,handler:async e=>l({command:`r2 buckets edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={};if(e[`cf-r2-jurisdiction`]!==void 0&&(l[`cf-r2-jurisdiction`]=String(e[`cf-r2-jurisdiction`])),e[`cf-r2-storage-class`]!==void 0&&(l[`cf-r2-storage-class`]=String(e[`cf-r2-storage-class`])),e.dryRun){let t=await i();s({command:`cf r2 buckets edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/r2/buckets/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},bodyKind:`none`});return}let u=await r(e),d=e.local?t:await a();e.accountId=d;let f=await c(`Updating`,async()=>n(u,`PATCH`,`/accounts/${d}/r2/buckets/${encodeURIComponent(String(e[`bucket-name`]))}`,{headers:Object.keys(l).length>0?l:void 0}));o(f,{successLabel:`Updated`})})};function K(e){return e.usage(`$0 r2 buckets event-notifications delete <queue-id>
29
29
 
30
- Deletes the specified event notification rules for an R2 bucket and Cloudflare Queue. Provide ruleIds in the request body to select rules. If no body is provided, all rules for that bucket and queue are deleted.`).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(`rule-ids`,{type:`string`,array:!0,description:`Array of rule ids to delete.`}).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 q={command:`delete <queue-id>`,describe:`Delete Event Notification Rules`,builder:K,handler:async e=>l({command:`r2 buckets event-notifications delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let l={};if(e[`cf-r2-jurisdiction`]!==void 0&&(l[`cf-r2-jurisdiction`]=String(e[`cf-r2-jurisdiction`])),e.dryRun){let t=await i();s({command:`cf r2 buckets event-notifications delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/event_notifications/r2/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/configuration/queues/${e[`queue-id`]==null?`<queue-id>`:encodeURIComponent(String(e[`queue-id`]))}`,pathParams:{"bucket-name":String(e[`bucket-name`]??``),"queue-id":String(e[`queue-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({ruleIds:e[`rule-ids`]}):d(e.body)});return}let u=await r(e),m=e.local?t:await a();if(e.accountId=m,!await v({force:!!e.force,message:`This deletes event notification rules for the selected R2 bucket and queue. Without a request body, all rules for that bucket and queue are deleted.`}))return;if(e.body){let t=d(e.body),r=await c(`Deleting`,async()=>n(u,`DELETE`,`/accounts/${m}/event_notifications/r2/${encodeURIComponent(String(e[`bucket-name`]))}/configuration/queues/${encodeURIComponent(String(e[`queue-id`]))}`,{body:t,headers:Object.keys(l).length>0?l:void 0}));o(r,{successLabel:`Deleted`});return}let h={};e[`rule-ids`]!==void 0&&f(h,[`ruleIds`],e[`rule-ids`]);let g=await c(`Deleting`,async()=>n(u,`DELETE`,`/accounts/${m}/event_notifications/r2/${encodeURIComponent(String(e[`bucket-name`]))}/configuration/queues/${encodeURIComponent(String(e[`queue-id`]))}`,{body:h,headers:Object.keys(l).length>0?l:void 0}));o(g,{successLabel:`Deleted`})})};function se(e){return e.usage(`$0 r2 buckets event-notifications get <queue-id>
30
+ Deletes the specified event notification rules for an R2 bucket and Cloudflare Queue. Provide ruleIds in the request body to select rules. If no body is provided, all rules for that bucket and queue are deleted.`).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(`rule-ids`,{type:`string`,array:!0,description:`Array of rule ids to delete.`}).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 ce={command:`delete <queue-id>`,describe:`Delete Event Notification Rules`,builder:K,handler:async e=>l({command:`r2 buckets event-notifications delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let l={};if(e[`cf-r2-jurisdiction`]!==void 0&&(l[`cf-r2-jurisdiction`]=String(e[`cf-r2-jurisdiction`])),e.dryRun){let t=await i();s({command:`cf r2 buckets event-notifications delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/event_notifications/r2/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/configuration/queues/${e[`queue-id`]==null?`<queue-id>`:encodeURIComponent(String(e[`queue-id`]))}`,pathParams:{"bucket-name":String(e[`bucket-name`]??``),"queue-id":String(e[`queue-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({ruleIds:e[`rule-ids`]}):d(e.body)});return}let u=e.body===void 0?void 0:d(e.body),m=await r(e),h=e.local?t:await a();if(e.accountId=h,!await v({force:!!e.force,message:`This deletes event notification rules for the selected R2 bucket and queue. Without a request body, all rules for that bucket and queue are deleted.`}))return;if(e.body!==void 0){let t=u,r=await c(`Deleting`,async()=>n(m,`DELETE`,`/accounts/${h}/event_notifications/r2/${encodeURIComponent(String(e[`bucket-name`]))}/configuration/queues/${encodeURIComponent(String(e[`queue-id`]))}`,{body:t,headers:Object.keys(l).length>0?l:void 0}));o(r,{successLabel:`Deleted`});return}let g={};e[`rule-ids`]!==void 0&&f(g,[`ruleIds`],e[`rule-ids`]);let _=await c(`Deleting`,async()=>n(m,`DELETE`,`/accounts/${h}/event_notifications/r2/${encodeURIComponent(String(e[`bucket-name`]))}/configuration/queues/${encodeURIComponent(String(e[`queue-id`]))}`,{body:g,headers:Object.keys(l).length>0?l:void 0}));o(_,{successLabel:`Deleted`})})};function le(e){return e.usage(`$0 r2 buckets event-notifications get <queue-id>
31
31
 
32
- Gets the event notification rules for the specified R2 bucket and Cloudflare Queue. The response includes the queue's configuration and its array of rules.`).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(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ce={command:`get <queue-id>`,describe:`Get Event Notification Rules for a Queue`,builder:se,handler:async e=>l({command:`r2 buckets event-notifications get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={};if(e[`cf-r2-jurisdiction`]!==void 0&&(l[`cf-r2-jurisdiction`]=String(e[`cf-r2-jurisdiction`])),e.dryRun){let t=await i();s({command:`cf r2 buckets event-notifications get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/event_notifications/r2/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/configuration/queues/${e[`queue-id`]==null?`<queue-id>`:encodeURIComponent(String(e[`queue-id`]))}`,pathParams:{"bucket-name":String(e[`bucket-name`]??``),"queue-id":String(e[`queue-id`]??``)},bodyKind:`none`});return}let u=await r(e),d=e.local?t:await a();e.accountId=d;let f=await c(`Loading`,async()=>n(u,`GET`,`/accounts/${d}/event_notifications/r2/${encodeURIComponent(String(e[`bucket-name`]))}/configuration/queues/${encodeURIComponent(String(e[`queue-id`]))}`,{headers:Object.keys(l).length>0?l:void 0}));o(f,{successLabel:`Loaded`})})};function le(e){return e.usage(`$0 r2 buckets event-notifications list
32
+ Gets the event notification rules for the specified R2 bucket and Cloudflare Queue. The response includes the queue's configuration and its array of rules.`).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(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ue={command:`get <queue-id>`,describe:`Get Event Notification Rules for a Queue`,builder:le,handler:async e=>l({command:`r2 buckets event-notifications get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={};if(e[`cf-r2-jurisdiction`]!==void 0&&(l[`cf-r2-jurisdiction`]=String(e[`cf-r2-jurisdiction`])),e.dryRun){let t=await i();s({command:`cf r2 buckets event-notifications get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/event_notifications/r2/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/configuration/queues/${e[`queue-id`]==null?`<queue-id>`:encodeURIComponent(String(e[`queue-id`]))}`,pathParams:{"bucket-name":String(e[`bucket-name`]??``),"queue-id":String(e[`queue-id`]??``)},bodyKind:`none`});return}let u=await r(e),d=e.local?t:await a();e.accountId=d;let f=await c(`Loading`,async()=>n(u,`GET`,`/accounts/${d}/event_notifications/r2/${encodeURIComponent(String(e[`bucket-name`]))}/configuration/queues/${encodeURIComponent(String(e[`queue-id`]))}`,{headers:Object.keys(l).length>0?l:void 0}));o(f,{successLabel:`Loaded`})})};function de(e){return e.usage(`$0 r2 buckets event-notifications list
33
33
 
34
- Lists event notification rules for an R2 bucket, grouped by the Cloudflare Queue that receives matching object events.`).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 ue={command:`list`,describe:`List Event Notification Rules`,builder:le,handler:async e=>l({command:`r2 buckets event-notifications list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={};if(e[`cf-r2-jurisdiction`]!==void 0&&(l[`cf-r2-jurisdiction`]=String(e[`cf-r2-jurisdiction`])),e.dryRun){let t=await i();s({command:`cf r2 buckets event-notifications list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/event_notifications/r2/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/configuration`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},bodyKind:`none`});return}let u=await r(e),d=e.local?t:await a();e.accountId=d;let f=await c(`Loading`,async()=>n(u,`GET`,`/accounts/${d}/event_notifications/r2/${encodeURIComponent(String(e[`bucket-name`]))}/configuration`,{headers:Object.keys(l).length>0?l:void 0}));o(f,{successLabel:`Loaded`})})};function de(e){return e.usage(`$0 r2 buckets event-notifications update <queue-id>
34
+ Lists event notification rules for an R2 bucket, grouped by the Cloudflare Queue that receives matching object events.`).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 fe={command:`list`,describe:`List Event Notification Rules`,builder:de,handler:async e=>l({command:`r2 buckets event-notifications list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={};if(e[`cf-r2-jurisdiction`]!==void 0&&(l[`cf-r2-jurisdiction`]=String(e[`cf-r2-jurisdiction`])),e.dryRun){let t=await i();s({command:`cf r2 buckets event-notifications list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/event_notifications/r2/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/configuration`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},bodyKind:`none`});return}let u=await r(e),d=e.local?t:await a();e.accountId=d;let f=await c(`Loading`,async()=>n(u,`GET`,`/accounts/${d}/event_notifications/r2/${encodeURIComponent(String(e[`bucket-name`]))}/configuration`,{headers:Object.keys(l).length>0?l:void 0}));o(f,{successLabel:`Loaded`})})};function pe(e){return e.usage(`$0 r2 buckets event-notifications update <queue-id>
35
35
 
36
- 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 fe={command:`update <queue-id>`,describe:`Create Event Notification Rules`,builder:de,handler:async e=>l({command:`r2 buckets event-notifications update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={};if(e[`cf-r2-jurisdiction`]!==void 0&&(l[`cf-r2-jurisdiction`]=String(e[`cf-r2-jurisdiction`])),e.dryRun){let t=await i();s({command:`cf r2 buckets event-notifications update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/event_notifications/r2/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/configuration/queues/${e[`queue-id`]==null?`<queue-id>`:encodeURIComponent(String(e[`queue-id`]))}`,pathParams:{"bucket-name":String(e[`bucket-name`]??``),"queue-id":String(e[`queue-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({rules:u(e.rules,`rules`)}):d(e.body)});return}let m=await r(e),h=e.local?t:await a();if(e.accountId=h,e.body){let t=d(e.body),r=await c(`Updating`,async()=>n(m,`PUT`,`/accounts/${h}/event_notifications/r2/${encodeURIComponent(String(e[`bucket-name`]))}/configuration/queues/${encodeURIComponent(String(e[`queue-id`]))}`,{body:t,headers:Object.keys(l).length>0?l:void 0}));o(r,{successLabel:`Updated`});return}if(e.rules===void 0)throw Error(`--rules is required (or pass --body with this field set).`);let g={};e.rules!==void 0&&f(g,[`rules`],u(e.rules,`rules`));let _=await c(`Updating`,async()=>n(m,`PUT`,`/accounts/${h}/event_notifications/r2/${encodeURIComponent(String(e[`bucket-name`]))}/configuration/queues/${encodeURIComponent(String(e[`queue-id`]))}`,{body:g,headers:Object.keys(l).length>0?l:void 0}));o(_,{successLabel:`Updated`})})},pe={command:`event-notifications`,describe:`Operations for buckets.event-notifications`,builder:e=>e.command(q).command(ce).command(ue).command(fe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function me(e){return e.usage(`$0 r2 buckets get <bucket-name>
36
+ 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 me={command:`update <queue-id>`,describe:`Create Event Notification Rules`,builder:pe,handler:async e=>l({command:`r2 buckets event-notifications update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={};if(e[`cf-r2-jurisdiction`]!==void 0&&(l[`cf-r2-jurisdiction`]=String(e[`cf-r2-jurisdiction`])),e.dryRun){let t=await i();s({command:`cf r2 buckets event-notifications update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/event_notifications/r2/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/configuration/queues/${e[`queue-id`]==null?`<queue-id>`:encodeURIComponent(String(e[`queue-id`]))}`,pathParams:{"bucket-name":String(e[`bucket-name`]??``),"queue-id":String(e[`queue-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({rules:u(e.rules,`rules`)}):d(e.body)});return}let m=e.body===void 0?void 0:d(e.body),h=await r(e),g=e.local?t:await a();if(e.accountId=g,e.body!==void 0){let t=m,r=await c(`Updating`,async()=>n(h,`PUT`,`/accounts/${g}/event_notifications/r2/${encodeURIComponent(String(e[`bucket-name`]))}/configuration/queues/${encodeURIComponent(String(e[`queue-id`]))}`,{body:t,headers:Object.keys(l).length>0?l:void 0}));o(r,{successLabel:`Updated`});return}if(e.rules===void 0)throw Error(`--rules is required (or pass --body with this field set).`);let _={};e.rules!==void 0&&f(_,[`rules`],u(e.rules,`rules`));let v=await c(`Updating`,async()=>n(h,`PUT`,`/accounts/${g}/event_notifications/r2/${encodeURIComponent(String(e[`bucket-name`]))}/configuration/queues/${encodeURIComponent(String(e[`queue-id`]))}`,{body:_,headers:Object.keys(l).length>0?l:void 0}));o(v,{successLabel:`Updated`})})},he={command:`event-notifications`,describe:`Operations for buckets.event-notifications`,builder:e=>e.command(ce).command(ue).command(fe).command(me).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ge(e){return e.usage(`$0 r2 buckets get <bucket-name>
37
37
 
38
- 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 he={command:`get <bucket-name>`,describe:`Get Bucket`,builder:me,handler:async e=>l({command:`r2 buckets get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={};if(e[`cf-r2-jurisdiction`]!==void 0&&(l[`cf-r2-jurisdiction`]=String(e[`cf-r2-jurisdiction`])),e.dryRun){let t=await i();s({command:`cf r2 buckets get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/r2/buckets/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},bodyKind:`none`});return}let u=await r(e),d=e.local?t:await a();e.accountId=d;let f=await c(`Loading`,async()=>n(u,`GET`,`/accounts/${d}/r2/buckets/${encodeURIComponent(String(e[`bucket-name`]))}`,{headers:Object.keys(l).length>0?l:void 0}));o(f,{successLabel:`Loaded`})})};function ge(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`]}).coerce(`job-type`,e=>m(e,`job-type`,`text`)).option(`prefix`,{type:`string`,description:`Prefix matched against object keys. A non-empty value must end in \`/\`.
38
+ 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 _e={command:`get <bucket-name>`,describe:`Get Bucket`,builder:ge,handler:async e=>l({command:`r2 buckets get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={};if(e[`cf-r2-jurisdiction`]!==void 0&&(l[`cf-r2-jurisdiction`]=String(e[`cf-r2-jurisdiction`])),e.dryRun){let t=await i();s({command:`cf r2 buckets get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/r2/buckets/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},bodyKind:`none`});return}let u=await r(e),d=e.local?t:await a();e.accountId=d;let f=await c(`Loading`,async()=>n(u,`GET`,`/accounts/${d}/r2/buckets/${encodeURIComponent(String(e[`bucket-name`]))}`,{headers:Object.keys(l).length>0?l:void 0}));o(f,{successLabel:`Loaded`})})};function ve(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`]}).coerce(`job-type`,e=>m(e,`job-type`,`text`)).option(`prefix`,{type:`string`,description:`Prefix matched against object keys. A non-empty value must end in \`/\`.
39
39
  An empty string empties the entire bucket.
40
- `}).option(`destination-storage-class`,{type:`string`,description:`The destinationStorageClass field`,choices:[`Standard`,`InfrequentAccess`]}).coerce(`destination-storage-class`,e=>m(e,`destination-storage-class`,`text`)).option(`source-storage-class`,{type:`string`,description:`The sourceStorageClass field`,choices:[`Standard`,`InfrequentAccess`]}).coerce(`source-storage-class`,e=>m(e,`source-storage-class`,`text`)).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 _e={command:`create <bucket-name>`,describe:`Create Bucket Job`,builder:ge,handler:async e=>l({command:`r2 buckets jobs create`,classification:{safeFlags:[`job-type`,`destination-storage-class`,`source-storage-class`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let l={};if(e[`cf-r2-jurisdiction`]!==void 0&&(l[`cf-r2-jurisdiction`]=String(e[`cf-r2-jurisdiction`])),e[`cf-r2-data-catalog-check`]!==void 0&&(l[`cf-r2-data-catalog-check`]=String(e[`cf-r2-data-catalog-check`])),e.dryRun){let t=await i();s({command:`cf r2 buckets jobs create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/r2/buckets/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/jobs`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},bodyKind:`json`,body:e.body===void 0?p({jobType:e[`job-type`],prefix:m(e.prefix,`prefix`,`text`),destinationStorageClass:e[`destination-storage-class`],sourceStorageClass:e[`source-storage-class`]}):d(e.body)});return}let u=await r(e),h=e.local?t:await a();if(e.accountId=h,!await v({force:!!e.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.`}))return;if(e.body){let t=d(e.body),r=await c(`Deleting`,async()=>n(u,`POST`,`/accounts/${h}/r2/buckets/${encodeURIComponent(String(e[`bucket-name`]))}/jobs`,{body:t,headers:Object.keys(l).length>0?l:void 0}));o(r,{successLabel:`Deleted`});return}e[`job-type`]===void 0&&(e[`job-type`]=await _(`job-type`,`The jobType field`,[`prefixDelete`,`storageClassMigration`])),e[`job-type`]===`prefixDelete`&&e.prefix===void 0&&(e.prefix=await g(`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={};e[`job-type`]!==void 0&&f(y,[`jobType`],e[`job-type`]),e.prefix!==void 0&&f(y,[`prefix`],m(e.prefix,`prefix`,`text`)),e[`destination-storage-class`]!==void 0&&f(y,[`destinationStorageClass`],e[`destination-storage-class`]),e[`source-storage-class`]!==void 0&&f(y,[`sourceStorageClass`],e[`source-storage-class`]);let b=await c(`Deleting`,async()=>n(u,`POST`,`/accounts/${h}/r2/buckets/${encodeURIComponent(String(e[`bucket-name`]))}/jobs`,{body:y,headers:Object.keys(l).length>0?l:void 0}));o(b,{successLabel:`Deleted`})})};function ve(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 ye={command:`get <job-id>`,describe:`Get Bucket Job`,builder:ve,handler:async e=>l({command:`r2 buckets jobs get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={};if(e[`cf-r2-jurisdiction`]!==void 0&&(l[`cf-r2-jurisdiction`]=String(e[`cf-r2-jurisdiction`])),e.dryRun){let t=await i();s({command:`cf r2 buckets jobs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/r2/buckets/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/jobs/${e[`job-id`]==null?`<job-id>`:encodeURIComponent(String(e[`job-id`]))}`,pathParams:{"bucket-name":String(e[`bucket-name`]??``),"job-id":String(e[`job-id`]??``)},bodyKind:`none`});return}let u=await r(e),d=e.local?t:await a();e.accountId=d;let f=await c(`Loading`,async()=>n(u,`GET`,`/accounts/${d}/r2/buckets/${encodeURIComponent(String(e[`bucket-name`]))}/jobs/${encodeURIComponent(String(e[`job-id`]))}`,{headers:Object.keys(l).length>0?l:void 0}));o(f,{successLabel:`Loaded`})})};function be(e){return e.usage(`$0 r2 buckets jobs list
40
+ `}).option(`destination-storage-class`,{type:`string`,description:`The destinationStorageClass field`,choices:[`Standard`,`InfrequentAccess`]}).coerce(`destination-storage-class`,e=>m(e,`destination-storage-class`,`text`)).option(`source-storage-class`,{type:`string`,description:`The sourceStorageClass field`,choices:[`Standard`,`InfrequentAccess`]}).coerce(`source-storage-class`,e=>m(e,`source-storage-class`,`text`)).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 ye={command:`create <bucket-name>`,describe:`Create Bucket Job`,builder:ve,handler:async e=>l({command:`r2 buckets jobs create`,classification:{safeFlags:[`job-type`,`destination-storage-class`,`source-storage-class`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let l={};if(e[`cf-r2-jurisdiction`]!==void 0&&(l[`cf-r2-jurisdiction`]=String(e[`cf-r2-jurisdiction`])),e[`cf-r2-data-catalog-check`]!==void 0&&(l[`cf-r2-data-catalog-check`]=String(e[`cf-r2-data-catalog-check`])),e.dryRun){let t=await i();s({command:`cf r2 buckets jobs create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/r2/buckets/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/jobs`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},bodyKind:`json`,body:e.body===void 0?p({jobType:e[`job-type`],prefix:m(e.prefix,`prefix`,`text`),destinationStorageClass:e[`destination-storage-class`],sourceStorageClass:e[`source-storage-class`]}):d(e.body)});return}let u=e.body===void 0?void 0:d(e.body),h=await r(e),y=e.local?t:await a();if(e.accountId=y,!await v({force:!!e.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.`}))return;if(e.body!==void 0){let t=u,r=await c(`Processing`,async()=>n(h,`POST`,`/accounts/${y}/r2/buckets/${encodeURIComponent(String(e[`bucket-name`]))}/jobs`,{body:t,headers:Object.keys(l).length>0?l:void 0}));o(r,{successLabel:`Done`});return}e[`job-type`]===void 0&&(e[`job-type`]=await _(`job-type`,`The jobType field`,[`prefixDelete`,`storageClassMigration`])),e[`job-type`]===`prefixDelete`&&e.prefix===void 0&&(e.prefix=await g(`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 b={};e[`job-type`]!==void 0&&f(b,[`jobType`],e[`job-type`]),e.prefix!==void 0&&f(b,[`prefix`],m(e.prefix,`prefix`,`text`)),e[`destination-storage-class`]!==void 0&&f(b,[`destinationStorageClass`],e[`destination-storage-class`]),e[`source-storage-class`]!==void 0&&f(b,[`sourceStorageClass`],e[`source-storage-class`]);let x=await c(`Processing`,async()=>n(h,`POST`,`/accounts/${y}/r2/buckets/${encodeURIComponent(String(e[`bucket-name`]))}/jobs`,{body:b,headers:Object.keys(l).length>0?l:void 0}));o(x,{successLabel:`Done`})})};function be(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 xe={command:`get <job-id>`,describe:`Get Bucket Job`,builder:be,handler:async e=>l({command:`r2 buckets jobs get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={};if(e[`cf-r2-jurisdiction`]!==void 0&&(l[`cf-r2-jurisdiction`]=String(e[`cf-r2-jurisdiction`])),e.dryRun){let t=await i();s({command:`cf r2 buckets jobs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/r2/buckets/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/jobs/${e[`job-id`]==null?`<job-id>`:encodeURIComponent(String(e[`job-id`]))}`,pathParams:{"bucket-name":String(e[`bucket-name`]??``),"job-id":String(e[`job-id`]??``)},bodyKind:`none`});return}let u=await r(e),d=e.local?t:await a();e.accountId=d;let f=await c(`Loading`,async()=>n(u,`GET`,`/accounts/${d}/r2/buckets/${encodeURIComponent(String(e[`bucket-name`]))}/jobs/${encodeURIComponent(String(e[`job-id`]))}`,{headers:Object.keys(l).length>0?l:void 0}));o(f,{successLabel:`Loaded`})})};function Se(e){return e.usage(`$0 r2 buckets jobs list
41
41
 
42
- 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 xe={command:`list`,describe:`List Bucket Jobs`,builder:be,handler:async e=>l({command:`r2 buckets jobs list`,classification:{safeFlags:[`job-type`,`status`,`dry-run`]}},e,async()=>{let l={jobType:e[`job-type`],status:e.status,maxKeys:e[`max-keys`],continuationToken:e[`continuation-token`]},u={};if(e[`cf-r2-jurisdiction`]!==void 0&&(u[`cf-r2-jurisdiction`]=String(e[`cf-r2-jurisdiction`])),e.dryRun){let t=await i();s({command:`cf r2 buckets jobs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/r2/buckets/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/jobs`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},query:l,bodyKind:`none`});return}let d=await r(e),f=e.local?t:await a();e.accountId=f;let p=await c(`Loading`,async()=>n(d,`GET`,`/accounts/${f}/r2/buckets/${encodeURIComponent(String(e[`bucket-name`]))}/jobs`,{query:l,headers:Object.keys(u).length>0?u:void 0}));o(p,{successLabel:`Loaded`})})},Se={command:`jobs`,describe:`Create and inspect background jobs for an R2 bucket`,builder:e=>e.command(_e).command(ye).command(xe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ce(e){return e.usage(`$0 r2 buckets lifecycle get <bucket-name>
42
+ 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 Ce={command:`list`,describe:`List Bucket Jobs`,builder:Se,handler:async e=>l({command:`r2 buckets jobs list`,classification:{safeFlags:[`job-type`,`status`,`dry-run`]}},e,async()=>{let l={jobType:e[`job-type`],status:e.status,maxKeys:e[`max-keys`],continuationToken:e[`continuation-token`]},u={};if(e[`cf-r2-jurisdiction`]!==void 0&&(u[`cf-r2-jurisdiction`]=String(e[`cf-r2-jurisdiction`])),e.dryRun){let t=await i();s({command:`cf r2 buckets jobs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/r2/buckets/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/jobs`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},query:l,bodyKind:`none`});return}let d=await r(e),f=e.local?t:await a();e.accountId=f;let p=await c(`Loading`,async()=>n(d,`GET`,`/accounts/${f}/r2/buckets/${encodeURIComponent(String(e[`bucket-name`]))}/jobs`,{query:l,headers:Object.keys(u).length>0?u:void 0}));o(p,{successLabel:`Loaded`})})},we={command:`jobs`,describe:`Create and inspect background jobs for an R2 bucket`,builder:e=>e.command(ye).command(xe).command(Ce).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Te(e){return e.usage(`$0 r2 buckets lifecycle get <bucket-name>
43
43
 
44
- 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 we={command:`get <bucket-name>`,describe:`Get Object Lifecycle Rules`,builder:Ce,handler:async e=>l({command:`r2 buckets lifecycle get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={};if(e[`cf-r2-jurisdiction`]!==void 0&&(l[`cf-r2-jurisdiction`]=String(e[`cf-r2-jurisdiction`])),e.dryRun){let t=await i();s({command:`cf r2 buckets lifecycle get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/r2/buckets/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/lifecycle`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},bodyKind:`none`});return}let u=await r(e),d=e.local?t:await a();e.accountId=d;let f=await c(`Loading`,async()=>n(u,`GET`,`/accounts/${d}/r2/buckets/${encodeURIComponent(String(e[`bucket-name`]))}/lifecycle`,{headers:Object.keys(l).length>0?l:void 0}));o(f,{successLabel:`Loaded`})})};function Te(e){return e.usage(`$0 r2 buckets lifecycle update <bucket-name>
44
+ 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 Ee={command:`get <bucket-name>`,describe:`Get Object Lifecycle Rules`,builder:Te,handler:async e=>l({command:`r2 buckets lifecycle get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={};if(e[`cf-r2-jurisdiction`]!==void 0&&(l[`cf-r2-jurisdiction`]=String(e[`cf-r2-jurisdiction`])),e.dryRun){let t=await i();s({command:`cf r2 buckets lifecycle get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/r2/buckets/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/lifecycle`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},bodyKind:`none`});return}let u=await r(e),d=e.local?t:await a();e.accountId=d;let f=await c(`Loading`,async()=>n(u,`GET`,`/accounts/${d}/r2/buckets/${encodeURIComponent(String(e[`bucket-name`]))}/lifecycle`,{headers:Object.keys(l).length>0?l:void 0}));o(f,{successLabel:`Loaded`})})};function De(e){return e.usage(`$0 r2 buckets lifecycle update <bucket-name>
45
45
 
46
- 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 Ee={command:`update <bucket-name>`,describe:`Set Object Lifecycle Rules`,builder:Te,handler:async e=>l({command:`r2 buckets lifecycle update`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let l={};if(e[`cf-r2-jurisdiction`]!==void 0&&(l[`cf-r2-jurisdiction`]=String(e[`cf-r2-jurisdiction`])),e.dryRun){let t=await i();s({command:`cf r2 buckets lifecycle update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/r2/buckets/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/lifecycle`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},bodyKind:`json`,body:e.body===void 0?p({rules:u(e.rules,`rules`)}):d(e.body)});return}let m=await r(e),h=e.local?t:await a();if(e.accountId=h,!await v({force:!!e.force,message:`This replaces the R2 bucket's object lifecycle rules and can schedule object deletion or abort multipart uploads.`}))return;if(e.body){let t=d(e.body),r=await c(`Deleting`,async()=>n(m,`PUT`,`/accounts/${h}/r2/buckets/${encodeURIComponent(String(e[`bucket-name`]))}/lifecycle`,{body:t,headers:Object.keys(l).length>0?l:void 0}));o(r,{successLabel:`Deleted`});return}let g={};e.rules!==void 0&&f(g,[`rules`],u(e.rules,`rules`));let _=await c(`Deleting`,async()=>n(m,`PUT`,`/accounts/${h}/r2/buckets/${encodeURIComponent(String(e[`bucket-name`]))}/lifecycle`,{body:g,headers:Object.keys(l).length>0?l:void 0}));o(_,{successLabel:`Deleted`})})},De={command:`lifecycle`,describe:`Operations for buckets.lifecycle`,builder:e=>e.command(we).command(Ee).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Oe(e){return e.usage(`$0 r2 buckets list
46
+ 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 Oe={command:`update <bucket-name>`,describe:`Set Object Lifecycle Rules`,builder:De,handler:async e=>l({command:`r2 buckets lifecycle update`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let l={};if(e[`cf-r2-jurisdiction`]!==void 0&&(l[`cf-r2-jurisdiction`]=String(e[`cf-r2-jurisdiction`])),e.dryRun){let t=await i();s({command:`cf r2 buckets lifecycle update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/r2/buckets/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/lifecycle`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},bodyKind:`json`,body:e.body===void 0?p({rules:u(e.rules,`rules`)}):d(e.body)});return}let m=e.body===void 0?void 0:d(e.body),h=await r(e),g=e.local?t:await a();if(e.accountId=g,!await v({force:!!e.force,message:`This replaces the R2 bucket's object lifecycle rules and can schedule object deletion or abort multipart uploads.`}))return;if(e.body!==void 0){let t=m,r=await c(`Updating`,async()=>n(h,`PUT`,`/accounts/${g}/r2/buckets/${encodeURIComponent(String(e[`bucket-name`]))}/lifecycle`,{body:t,headers:Object.keys(l).length>0?l:void 0}));o(r,{successLabel:`Updated`});return}let _={};e.rules!==void 0&&f(_,[`rules`],u(e.rules,`rules`));let y=await c(`Updating`,async()=>n(h,`PUT`,`/accounts/${g}/r2/buckets/${encodeURIComponent(String(e[`bucket-name`]))}/lifecycle`,{body:_,headers:Object.keys(l).length>0?l:void 0}));o(y,{successLabel:`Updated`})})},ke={command:`lifecycle`,describe:`Operations for buckets.lifecycle`,builder:e=>e.command(Ee).command(Oe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ae(e){return e.usage(`$0 r2 buckets list
47
47
 
48
- 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 ke={command:`list`,describe:`List Buckets`,builder:Oe,handler:async e=>l({command:`r2 buckets list`,classification:{safeFlags:[`order`,`direction`,`dry-run`]}},e,async()=>{let l={name_contains:e[`name-contains`],start_after:e[`start-after`],per_page:e[`per-page`],order:e.order,direction:e.direction,cursor:e.cursor},u={};if(e[`cf-r2-jurisdiction`]!==void 0&&(u[`cf-r2-jurisdiction`]=String(e[`cf-r2-jurisdiction`])),e.dryRun){let e=await i();s({command:`cf r2 buckets list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/r2/buckets`,pathParams:{},query:l,bodyKind:`none`});return}let d=await r(e),f=e.local?t:await a();e.accountId=f;let p=await c(`Loading`,async()=>n(d,`GET`,`/accounts/${f}/r2/buckets`,{query:l,headers:Object.keys(u).length>0?u:void 0}));o(p,{successLabel:`Loaded`})})};var Ae={method:`GET`,path:t=>e`/accounts/${t.account_id}/r2/buckets/${t.bucket_name}/local-uploads`};function je(e){return e.usage(`$0 r2 buckets local-uploads get <bucket-name>
48
+ 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 je={command:`list`,describe:`List Buckets`,builder:Ae,handler:async e=>l({command:`r2 buckets list`,classification:{safeFlags:[`order`,`direction`,`dry-run`]}},e,async()=>{let l={name_contains:e[`name-contains`],start_after:e[`start-after`],per_page:e[`per-page`],order:e.order,direction:e.direction,cursor:e.cursor},u={};if(e[`cf-r2-jurisdiction`]!==void 0&&(u[`cf-r2-jurisdiction`]=String(e[`cf-r2-jurisdiction`])),e.dryRun){let e=await i();s({command:`cf r2 buckets list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/r2/buckets`,pathParams:{},query:l,bodyKind:`none`});return}let d=await r(e),f=e.local?t:await a();e.accountId=f;let p=await c(`Loading`,async()=>n(d,`GET`,`/accounts/${f}/r2/buckets`,{query:l,headers:Object.keys(u).length>0?u:void 0}));o(p,{successLabel:`Loaded`})})};var Me={method:`GET`,path:t=>e`/accounts/${t.account_id}/r2/buckets/${t.bucket_name}/local-uploads`};function Ne(e){return e.usage(`$0 r2 buckets local-uploads get <bucket-name>
49
49
 
50
- 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 Me={command:`get <bucket-name>`,describe:`Get Local Uploads Configuration`,builder:je,handler:async e=>l({command:`r2 buckets local-uploads get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf r2 buckets local-uploads get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/r2/buckets/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/local-uploads`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Ae,{account_id:l,bucket_name:e[`bucket-name`]}));o(u,{successLabel:`Loaded`})})};var J={method:`PUT`,path:t=>e`/accounts/${t.account_id}/r2/buckets/${t.bucket_name}/local-uploads`,body:`json`};function Ne(e){return e.usage(`$0 r2 buckets local-uploads update <bucket-name>
50
+ 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 Pe={command:`get <bucket-name>`,describe:`Get Local Uploads Configuration`,builder:Ne,handler:async e=>l({command:`r2 buckets local-uploads get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf r2 buckets local-uploads get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/r2/buckets/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/local-uploads`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Me,{account_id:l,bucket_name:e[`bucket-name`]}));o(u,{successLabel:`Loaded`})})};var q={method:`PUT`,path:t=>e`/accounts/${t.account_id}/r2/buckets/${t.bucket_name}/local-uploads`,body:`json`};function Fe(e){return e.usage(`$0 r2 buckets local-uploads update <bucket-name>
51
51
 
52
- 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 Pe={command:`update <bucket-name>`,describe:`Set Local Uploads Configuration`,builder:Ne,handler:async e=>l({command:`r2 buckets local-uploads update`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf r2 buckets local-uploads update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/r2/buckets/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/local-uploads`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},bodyKind:`json`,body:e.body===void 0?p({enabled:e.enabled}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Updating`,async()=>n.send(J,{body:t,account_id:l,bucket_name:e[`bucket-name`]}));o(r,{successLabel:`Updated`});return}if(e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);let u=p({enabled:e.enabled}),f=await c(`Updating`,async()=>n.send(J,{body:u,account_id:l,bucket_name:e[`bucket-name`]}));o(f,{successLabel:`Updated`})})},Fe={command:`local-uploads`,describe:`R2 bucket local upload configuration`,builder:e=>e.command(Me).command(Pe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ie(e){return e.usage(`$0 r2 buckets locks delete <bucket-name>
52
+ 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 Ie={command:`update <bucket-name>`,describe:`Set Local Uploads Configuration`,builder:Fe,handler:async e=>l({command:`r2 buckets local-uploads update`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf r2 buckets local-uploads update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/r2/buckets/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/local-uploads`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},bodyKind:`json`,body:e.body===void 0?p({enabled:e.enabled}):d(e.body)});return}let n=e.body===void 0?void 0:d(e.body),l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body!==void 0){let t=n,r=await c(`Updating`,async()=>l.send(q,{body:t,account_id:u,bucket_name:e[`bucket-name`]}));o(r,{successLabel:`Updated`});return}if(e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);let f=p({enabled:e.enabled}),m=await c(`Updating`,async()=>l.send(q,{body:f,account_id:u,bucket_name:e[`bucket-name`]}));o(m,{successLabel:`Updated`})})},Le={command:`local-uploads`,describe:`R2 bucket local upload configuration`,builder:e=>e.command(Pe).command(Ie).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Re(e){return e.usage(`$0 r2 buckets locks delete <bucket-name>
53
53
 
54
- 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 Le={command:`delete <bucket-name>`,describe:`Delete Bucket Lock Rules`,builder:Ie,handler:async e=>l({command:`r2 buckets locks delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let l={};if(e[`cf-r2-jurisdiction`]!==void 0&&(l[`cf-r2-jurisdiction`]=String(e[`cf-r2-jurisdiction`])),e.dryRun){let t=await i();s({command:`cf r2 buckets locks delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/r2/buckets/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/lock`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},bodyKind:`none`});return}let u=await r(e),d=e.local?t:await a();if(e.accountId=d,!await v({force:!!e.force,message:`This removes all lock rules from the R2 bucket, removing their protection against object deletion and overwriting.`}))return;let f=await c(`Deleting`,async()=>n(u,`DELETE`,`/accounts/${d}/r2/buckets/${encodeURIComponent(String(e[`bucket-name`]))}/lock`,{headers:Object.keys(l).length>0?l:void 0}));o(f,{successLabel:`Deleted`})})};function Re(e){return e.usage(`$0 r2 buckets locks get <bucket-name>
54
+ 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 ze={command:`delete <bucket-name>`,describe:`Delete Bucket Lock Rules`,builder:Re,handler:async e=>l({command:`r2 buckets locks delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let l={};if(e[`cf-r2-jurisdiction`]!==void 0&&(l[`cf-r2-jurisdiction`]=String(e[`cf-r2-jurisdiction`])),e.dryRun){let t=await i();s({command:`cf r2 buckets locks delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/r2/buckets/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/lock`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},bodyKind:`none`});return}let u=await r(e),d=e.local?t:await a();if(e.accountId=d,!await v({force:!!e.force,message:`This removes all lock rules from the R2 bucket, removing their protection against object deletion and overwriting.`}))return;let f=await c(`Deleting`,async()=>n(u,`DELETE`,`/accounts/${d}/r2/buckets/${encodeURIComponent(String(e[`bucket-name`]))}/lock`,{headers:Object.keys(l).length>0?l:void 0}));o(f,{successLabel:`Deleted`})})};function Be(e){return e.usage(`$0 r2 buckets locks get <bucket-name>
55
55
 
56
- 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 ze={command:`get <bucket-name>`,describe:`Get Bucket Lock Rules`,builder:Re,handler:async e=>l({command:`r2 buckets locks get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={};if(e[`cf-r2-jurisdiction`]!==void 0&&(l[`cf-r2-jurisdiction`]=String(e[`cf-r2-jurisdiction`])),e.dryRun){let t=await i();s({command:`cf r2 buckets locks get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/r2/buckets/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/lock`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},bodyKind:`none`});return}let u=await r(e),d=e.local?t:await a();e.accountId=d;let f=await c(`Loading`,async()=>n(u,`GET`,`/accounts/${d}/r2/buckets/${encodeURIComponent(String(e[`bucket-name`]))}/lock`,{headers:Object.keys(l).length>0?l:void 0}));o(f,{successLabel:`Loaded`})})};function Be(e){return e.usage(`$0 r2 buckets locks update <bucket-name>
56
+ 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 Ve={command:`get <bucket-name>`,describe:`Get Bucket Lock Rules`,builder:Be,handler:async e=>l({command:`r2 buckets locks get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={};if(e[`cf-r2-jurisdiction`]!==void 0&&(l[`cf-r2-jurisdiction`]=String(e[`cf-r2-jurisdiction`])),e.dryRun){let t=await i();s({command:`cf r2 buckets locks get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/r2/buckets/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/lock`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},bodyKind:`none`});return}let u=await r(e),d=e.local?t:await a();e.accountId=d;let f=await c(`Loading`,async()=>n(u,`GET`,`/accounts/${d}/r2/buckets/${encodeURIComponent(String(e[`bucket-name`]))}/lock`,{headers:Object.keys(l).length>0?l:void 0}));o(f,{successLabel:`Loaded`})})};function He(e){return e.usage(`$0 r2 buckets locks update <bucket-name>
57
57
 
58
- 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 Ve={command:`update <bucket-name>`,describe:`Set Bucket Lock Rules`,builder:Be,handler:async e=>l({command:`r2 buckets locks update`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let l={};if(e[`cf-r2-jurisdiction`]!==void 0&&(l[`cf-r2-jurisdiction`]=String(e[`cf-r2-jurisdiction`])),e.dryRun){let t=await i();s({command:`cf r2 buckets locks update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/r2/buckets/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/lock`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},bodyKind:`json`,body:e.body===void 0?p({rules:u(e.rules,`rules`)}):d(e.body)});return}let m=await r(e),h=e.local?t:await a();if(e.accountId=h,!await v({force:!!e.force,message:`This replaces the R2 bucket's lock rules. Removing or shortening retention can allow objects to be overwritten or deleted.`}))return;if(e.body){let t=d(e.body),r=await c(`Deleting`,async()=>n(m,`PUT`,`/accounts/${h}/r2/buckets/${encodeURIComponent(String(e[`bucket-name`]))}/lock`,{body:t,headers:Object.keys(l).length>0?l:void 0}));o(r,{successLabel:`Deleted`});return}let g={};e.rules!==void 0&&f(g,[`rules`],u(e.rules,`rules`));let _=await c(`Deleting`,async()=>n(m,`PUT`,`/accounts/${h}/r2/buckets/${encodeURIComponent(String(e[`bucket-name`]))}/lock`,{body:g,headers:Object.keys(l).length>0?l:void 0}));o(_,{successLabel:`Deleted`})})},He={command:`locks`,describe:`Operations for buckets.locks`,builder:e=>e.command(Le).command(ze).command(Ve).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ue={method:`GET`,path:t=>e`/accounts/${t.account_id}/r2/metrics`};function We(e){return e.usage(`$0 r2 buckets metrics list
58
+ 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 Ue={command:`update <bucket-name>`,describe:`Set Bucket Lock Rules`,builder:He,handler:async e=>l({command:`r2 buckets locks update`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let l={};if(e[`cf-r2-jurisdiction`]!==void 0&&(l[`cf-r2-jurisdiction`]=String(e[`cf-r2-jurisdiction`])),e.dryRun){let t=await i();s({command:`cf r2 buckets locks update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/r2/buckets/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/lock`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},bodyKind:`json`,body:e.body===void 0?p({rules:u(e.rules,`rules`)}):d(e.body)});return}let m=e.body===void 0?void 0:d(e.body),h=await r(e),g=e.local?t:await a();if(e.accountId=g,!await v({force:!!e.force,message:`This replaces the R2 bucket's lock rules. Removing or shortening retention can allow objects to be overwritten or deleted.`}))return;if(e.body!==void 0){let t=m,r=await c(`Updating`,async()=>n(h,`PUT`,`/accounts/${g}/r2/buckets/${encodeURIComponent(String(e[`bucket-name`]))}/lock`,{body:t,headers:Object.keys(l).length>0?l:void 0}));o(r,{successLabel:`Updated`});return}let _={};e.rules!==void 0&&f(_,[`rules`],u(e.rules,`rules`));let y=await c(`Updating`,async()=>n(h,`PUT`,`/accounts/${g}/r2/buckets/${encodeURIComponent(String(e[`bucket-name`]))}/lock`,{body:_,headers:Object.keys(l).length>0?l:void 0}));o(y,{successLabel:`Updated`})})},We={command:`locks`,describe:`Operations for buckets.locks`,builder:e=>e.command(ze).command(Ve).command(Ue).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ge={method:`GET`,path:t=>e`/accounts/${t.account_id}/r2/metrics`};function Ke(e){return e.usage(`$0 r2 buckets metrics list
59
59
 
60
- 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 Ge={command:`list`,describe:`Get Account-Level Metrics`,builder:We,handler:async e=>l({command:`r2 buckets metrics list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({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 n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Ue,{account_id:l}));o(u,{successLabel:`Loaded`})})},Ke={command:`metrics`,describe:`Operations for buckets.metrics`,builder:e=>e.command(Ge).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function qe(e){return e.usage(`$0 r2 buckets sippy delete <bucket-name>
60
+ 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 qe={command:`list`,describe:`Get Account-Level Metrics`,builder:Ke,handler:async e=>l({command:`r2 buckets metrics list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({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 n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Ge,{account_id:l}));o(u,{successLabel:`Loaded`})})},Je={command:`metrics`,describe:`Operations for buckets.metrics`,builder:e=>e.command(qe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ye(e){return e.usage(`$0 r2 buckets sippy delete <bucket-name>
61
61
 
62
- 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 Je={command:`delete <bucket-name>`,describe:`Disable Sippy`,builder:qe,handler:async e=>l({command:`r2 buckets sippy delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let l={};if(e[`cf-r2-jurisdiction`]!==void 0&&(l[`cf-r2-jurisdiction`]=String(e[`cf-r2-jurisdiction`])),e.dryRun){let t=await i();s({command:`cf r2 buckets sippy delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/r2/buckets/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/sippy`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},bodyKind:`none`});return}let u=await r(e),d=e.local?t:await a();if(e.accountId=d,!await v({force:!!e.force,message:`This disables Sippy on-demand migration for the R2 bucket. Objects already copied to R2 remain in the bucket.`}))return;let f=await c(`Deleting`,async()=>n(u,`DELETE`,`/accounts/${d}/r2/buckets/${encodeURIComponent(String(e[`bucket-name`]))}/sippy`,{headers:Object.keys(l).length>0?l:void 0}));o(f,{successLabel:`Deleted`})})};function Ye(e){return e.usage(`$0 r2 buckets sippy get <bucket-name>
62
+ 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 Xe={command:`delete <bucket-name>`,describe:`Disable Sippy`,builder:Ye,handler:async e=>l({command:`r2 buckets sippy delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let l={};if(e[`cf-r2-jurisdiction`]!==void 0&&(l[`cf-r2-jurisdiction`]=String(e[`cf-r2-jurisdiction`])),e.dryRun){let t=await i();s({command:`cf r2 buckets sippy delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/r2/buckets/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/sippy`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},bodyKind:`none`});return}let u=await r(e),d=e.local?t:await a();if(e.accountId=d,!await v({force:!!e.force,message:`This disables Sippy on-demand migration for the R2 bucket. Objects already copied to R2 remain in the bucket.`}))return;let f=await c(`Deleting`,async()=>n(u,`DELETE`,`/accounts/${d}/r2/buckets/${encodeURIComponent(String(e[`bucket-name`]))}/sippy`,{headers:Object.keys(l).length>0?l:void 0}));o(f,{successLabel:`Deleted`})})};function Ze(e){return e.usage(`$0 r2 buckets sippy get <bucket-name>
63
63
 
64
- 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 Xe={command:`get <bucket-name>`,describe:`Get Sippy Configuration`,builder:Ye,handler:async e=>l({command:`r2 buckets sippy get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={};if(e[`cf-r2-jurisdiction`]!==void 0&&(l[`cf-r2-jurisdiction`]=String(e[`cf-r2-jurisdiction`])),e.dryRun){let t=await i();s({command:`cf r2 buckets sippy get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/r2/buckets/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/sippy`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},bodyKind:`none`});return}let u=await r(e),d=e.local?t:await a();e.accountId=d;let f=await c(`Loading`,async()=>n(u,`GET`,`/accounts/${d}/r2/buckets/${encodeURIComponent(String(e[`bucket-name`]))}/sippy`,{headers:Object.keys(l).length>0?l:void 0}));o(f,{successLabel:`Loaded`})})};function Ze(e){return e.usage(`$0 r2 buckets sippy update <bucket-name>
64
+ 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 Qe={command:`get <bucket-name>`,describe:`Get Sippy Configuration`,builder:Ze,handler:async e=>l({command:`r2 buckets sippy get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={};if(e[`cf-r2-jurisdiction`]!==void 0&&(l[`cf-r2-jurisdiction`]=String(e[`cf-r2-jurisdiction`])),e.dryRun){let t=await i();s({command:`cf r2 buckets sippy get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/r2/buckets/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/sippy`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},bodyKind:`none`});return}let u=await r(e),d=e.local?t:await a();e.accountId=d;let f=await c(`Loading`,async()=>n(u,`GET`,`/accounts/${d}/r2/buckets/${encodeURIComponent(String(e[`bucket-name`]))}/sippy`,{headers:Object.keys(l).length>0?l:void 0}));o(f,{successLabel:`Loaded`})})};function $e(e){return e.usage(`$0 r2 buckets sippy update <bucket-name>
65
65
 
66
66
  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.
67
67
  This is the value labelled "Access Key ID" when creating an API.
@@ -75,38 +75,38 @@ token from the [R2 dashboard](https://dash.cloudflare.com/?to=/:account/r2/api-t
75
75
 
76
76
  Sippy will use this token when writing objects to R2, so it is
77
77
  best to scope this token to the bucket you're enabling Sippy for.
78
- `}).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`]}).coerce(`source-provider`,e=>m(e,`source-provider`,`text`)).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 Qe={command:`update <bucket-name>`,describe:`Enable Sippy`,builder:Ze,handler:async e=>l({command:`r2 buckets sippy update`,classification:{safeFlags:[`destination-provider`,`source-provider`,`dry-run`]}},e,async()=>{let l={};if(e[`cf-r2-jurisdiction`]!==void 0&&(l[`cf-r2-jurisdiction`]=String(e[`cf-r2-jurisdiction`])),e.dryRun){let t=await i();s({command:`cf r2 buckets sippy update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/r2/buckets/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/sippy`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},bodyKind:`json`,body:e.body===void 0?p({destination:{accessKeyId:m(e[`destination-access-key-id`],`destination-access-key-id`,`text`),provider:e[`destination-provider`],secretAccessKey:m(e[`destination-secret-access-key`],`destination-secret-access-key`,`text`)},source:{accessKeyId:m(e[`source-access-key-id`],`source-access-key-id`,`text`),bucket:m(e[`source-bucket`],`source-bucket`,`text`),provider:e[`source-provider`],region:m(e[`source-region`],`source-region`,`text`),secretAccessKey:m(e[`source-secret-access-key`],`source-secret-access-key`,`text`),clientEmail:m(e[`source-client-email`],`source-client-email`,`text`),privateKey:m(e[`source-private-key`],`source-private-key`,`text`),bucketUrl:m(e[`source-bucket-url`],`source-bucket-url`,`text`),accountKey:m(e[`source-account-key`],`source-account-key`,`text`),accountName:m(e[`source-account-name`],`source-account-name`,`text`),container:m(e[`source-container`],`source-container`,`text`),sasToken:m(e[`source-sas-token`],`source-sas-token`,`text`)}}):d(e.body),sensitiveBodyPaths:[[`destination`,`secretAccessKey`],[`source`,`secretAccessKey`],[`source`,`privateKey`],[`source`,`accountKey`],[`source`,`sasToken`]]});return}let u=await r(e),h=e.local?t:await a();if(e.accountId=h,e.body){let t=d(e.body),r=await c(`Updating`,async()=>n(u,`PUT`,`/accounts/${h}/r2/buckets/${encodeURIComponent(String(e[`bucket-name`]))}/sippy`,{body:t,headers:Object.keys(l).length>0?l:void 0}));o(r,{successLabel:`Updated`});return}let g={};e[`destination-access-key-id`]!==void 0&&f(g,[`destination`,`accessKeyId`],m(e[`destination-access-key-id`],`destination-access-key-id`,`text`)),e[`destination-provider`]!==void 0&&f(g,[`destination`,`provider`],e[`destination-provider`]),e[`destination-secret-access-key`]!==void 0&&f(g,[`destination`,`secretAccessKey`],m(e[`destination-secret-access-key`],`destination-secret-access-key`,`text`)),e[`source-access-key-id`]!==void 0&&f(g,[`source`,`accessKeyId`],m(e[`source-access-key-id`],`source-access-key-id`,`text`)),e[`source-bucket`]!==void 0&&f(g,[`source`,`bucket`],m(e[`source-bucket`],`source-bucket`,`text`)),e[`source-provider`]!==void 0&&f(g,[`source`,`provider`],e[`source-provider`]),e[`source-region`]!==void 0&&f(g,[`source`,`region`],m(e[`source-region`],`source-region`,`text`)),e[`source-secret-access-key`]!==void 0&&f(g,[`source`,`secretAccessKey`],m(e[`source-secret-access-key`],`source-secret-access-key`,`text`)),e[`source-client-email`]!==void 0&&f(g,[`source`,`clientEmail`],m(e[`source-client-email`],`source-client-email`,`text`)),e[`source-private-key`]!==void 0&&f(g,[`source`,`privateKey`],m(e[`source-private-key`],`source-private-key`,`text`)),e[`source-bucket-url`]!==void 0&&f(g,[`source`,`bucketUrl`],m(e[`source-bucket-url`],`source-bucket-url`,`text`)),e[`source-account-key`]!==void 0&&f(g,[`source`,`accountKey`],m(e[`source-account-key`],`source-account-key`,`text`)),e[`source-account-name`]!==void 0&&f(g,[`source`,`accountName`],m(e[`source-account-name`],`source-account-name`,`text`)),e[`source-container`]!==void 0&&f(g,[`source`,`container`],m(e[`source-container`],`source-container`,`text`)),e[`source-sas-token`]!==void 0&&f(g,[`source`,`sasToken`],m(e[`source-sas-token`],`source-sas-token`,`text`));let _=await c(`Updating`,async()=>n(u,`PUT`,`/accounts/${h}/r2/buckets/${encodeURIComponent(String(e[`bucket-name`]))}/sippy`,{body:g,headers:Object.keys(l).length>0?l:void 0}));o(_,{successLabel:`Updated`})})},$e={command:`sippy`,describe:`Operations for buckets.sippy`,builder:e=>e.command(Je).command(Xe).command(Qe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},et={command:`buckets`,describe:`Create and configure R2 buckets including CORS, lifecycle, custom domains, event notifications, and object locks`,builder:e=>e.command(w).command(S).command(E).command(G).command(he).command(ke).command(oe).command(U).command(pe).command(Se).command(De).command(Fe).command(He).command(Ke).command($e).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function tt(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 nt={command:`bulk-delete`,describe:`Delete Objects`,builder:tt,handler:async e=>l({command:`r2 objects bulk-delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let l={prefix:e.prefix},u={};if(e[`cf-r2-jurisdiction`]!==void 0&&(u[`cf-r2-jurisdiction`]=String(e[`cf-r2-jurisdiction`])),e[`cf-r2-data-catalog-check`]!==void 0&&(u[`cf-r2-data-catalog-check`]=String(e[`cf-r2-data-catalog-check`])),e.dryRun){let t=await i();s({command:`cf r2 objects bulk-delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/r2/buckets/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/objects`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},query:l,bodyKind:`json`,body:e.body===void 0?void 0:d(e.body)});return}let f=await r(e),p=e.local?t:await a();if(e.accountId=p,await v({force:!!e.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."})){if(e.body){let t=d(e.body),r=new URLSearchParams(Object.entries(l).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();if(Array.isArray(t)&&t.length>1e3){let i=Math.ceil(t.length/1e3),a=null;for(let o=0;o<t.length;o+=1e3){let s=t.slice(o,o+1e3),l=Math.floor(o/1e3)+1;a=await c(`Deleting: batch ${l}/${i}`,async()=>n(f,`DELETE`,`/accounts/${p}/r2/buckets/${encodeURIComponent(String(e[`bucket-name`]))}/objects${r?`?`+r:``}`,{body:s,headers:Object.keys(u).length>0?u:void 0}))}o(a,{successLabel:`Deleted`});return}let i=await c(`Deleting`,async()=>n(f,`DELETE`,`/accounts/${p}/r2/buckets/${encodeURIComponent(String(e[`bucket-name`]))}/objects${r?`?`+r:``}`,{body:t,headers:Object.keys(u).length>0?u:void 0}));o(i,{successLabel:`Deleted`})}else if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)}})};function rt(e){return e.usage(`$0 r2 objects delete <object-key>
78
+ `}).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`]}).coerce(`source-provider`,e=>m(e,`source-provider`,`text`)).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)`})}const et={command:`update <bucket-name>`,describe:`Enable Sippy`,builder:$e,handler:async e=>l({command:`r2 buckets sippy update`,classification:{safeFlags:[`destination-provider`,`source-provider`,`dry-run`]}},e,async()=>{let l={};if(e[`cf-r2-jurisdiction`]!==void 0&&(l[`cf-r2-jurisdiction`]=String(e[`cf-r2-jurisdiction`])),e.dryRun){let t=await i();s({command:`cf r2 buckets sippy update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/r2/buckets/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/sippy`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},bodyKind:`json`,body:e.body===void 0?p({destination:{accessKeyId:m(e[`destination-access-key-id`],`destination-access-key-id`,`text`),provider:e[`destination-provider`],secretAccessKey:m(e[`destination-secret-access-key`],`destination-secret-access-key`,`text`)},source:{accessKeyId:m(e[`source-access-key-id`],`source-access-key-id`,`text`),bucket:m(e[`source-bucket`],`source-bucket`,`text`),provider:e[`source-provider`],region:m(e[`source-region`],`source-region`,`text`),secretAccessKey:m(e[`source-secret-access-key`],`source-secret-access-key`,`text`),clientEmail:m(e[`source-client-email`],`source-client-email`,`text`),privateKey:m(e[`source-private-key`],`source-private-key`,`text`),bucketUrl:m(e[`source-bucket-url`],`source-bucket-url`,`text`),accountKey:m(e[`source-account-key`],`source-account-key`,`text`),accountName:m(e[`source-account-name`],`source-account-name`,`text`),container:m(e[`source-container`],`source-container`,`text`),sasToken:m(e[`source-sas-token`],`source-sas-token`,`text`)}}):d(e.body),sensitiveBodyPaths:[[`destination`,`secretAccessKey`],[`source`,`secretAccessKey`],[`source`,`privateKey`],[`source`,`accountKey`],[`source`,`sasToken`]]});return}let u=e.body===void 0?void 0:d(e.body),h=await r(e),g=e.local?t:await a();if(e.accountId=g,e.body!==void 0){let t=u,r=await c(`Updating`,async()=>n(h,`PUT`,`/accounts/${g}/r2/buckets/${encodeURIComponent(String(e[`bucket-name`]))}/sippy`,{body:t,headers:Object.keys(l).length>0?l:void 0}));o(r,{successLabel:`Updated`});return}let _={};e[`destination-access-key-id`]!==void 0&&f(_,[`destination`,`accessKeyId`],m(e[`destination-access-key-id`],`destination-access-key-id`,`text`)),e[`destination-provider`]!==void 0&&f(_,[`destination`,`provider`],e[`destination-provider`]),e[`destination-secret-access-key`]!==void 0&&f(_,[`destination`,`secretAccessKey`],m(e[`destination-secret-access-key`],`destination-secret-access-key`,`text`)),e[`source-access-key-id`]!==void 0&&f(_,[`source`,`accessKeyId`],m(e[`source-access-key-id`],`source-access-key-id`,`text`)),e[`source-bucket`]!==void 0&&f(_,[`source`,`bucket`],m(e[`source-bucket`],`source-bucket`,`text`)),e[`source-provider`]!==void 0&&f(_,[`source`,`provider`],e[`source-provider`]),e[`source-region`]!==void 0&&f(_,[`source`,`region`],m(e[`source-region`],`source-region`,`text`)),e[`source-secret-access-key`]!==void 0&&f(_,[`source`,`secretAccessKey`],m(e[`source-secret-access-key`],`source-secret-access-key`,`text`)),e[`source-client-email`]!==void 0&&f(_,[`source`,`clientEmail`],m(e[`source-client-email`],`source-client-email`,`text`)),e[`source-private-key`]!==void 0&&f(_,[`source`,`privateKey`],m(e[`source-private-key`],`source-private-key`,`text`)),e[`source-bucket-url`]!==void 0&&f(_,[`source`,`bucketUrl`],m(e[`source-bucket-url`],`source-bucket-url`,`text`)),e[`source-account-key`]!==void 0&&f(_,[`source`,`accountKey`],m(e[`source-account-key`],`source-account-key`,`text`)),e[`source-account-name`]!==void 0&&f(_,[`source`,`accountName`],m(e[`source-account-name`],`source-account-name`,`text`)),e[`source-container`]!==void 0&&f(_,[`source`,`container`],m(e[`source-container`],`source-container`,`text`)),e[`source-sas-token`]!==void 0&&f(_,[`source`,`sasToken`],m(e[`source-sas-token`],`source-sas-token`,`text`));let v=await c(`Updating`,async()=>n(h,`PUT`,`/accounts/${g}/r2/buckets/${encodeURIComponent(String(e[`bucket-name`]))}/sippy`,{body:_,headers:Object.keys(l).length>0?l:void 0}));o(v,{successLabel:`Updated`})})},tt={command:`sippy`,describe:`Operations for buckets.sippy`,builder:e=>e.command(Xe).command(Qe).command(et).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},nt={command:`buckets`,describe:`Create and configure R2 buckets including CORS, lifecycle, custom domains, event notifications, and object locks`,builder:e=>e.command(w).command(S).command(E).command(G).command(_e).command(je).command(oe).command(U).command(he).command(we).command(ke).command(Le).command(We).command(Je).command(tt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function rt(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 it={command:`bulk-delete`,describe:`Delete Objects`,builder:rt,handler:async e=>l({command:`r2 objects bulk-delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let l={prefix:e.prefix},u={};if(e[`cf-r2-jurisdiction`]!==void 0&&(u[`cf-r2-jurisdiction`]=String(e[`cf-r2-jurisdiction`])),e[`cf-r2-data-catalog-check`]!==void 0&&(u[`cf-r2-data-catalog-check`]=String(e[`cf-r2-data-catalog-check`])),e.dryRun){let t=await i();s({command:`cf r2 objects bulk-delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/r2/buckets/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/objects`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},query:l,bodyKind:`json`,body:e.body===void 0?void 0:d(e.body,[],1e3)});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`);let f=e.body===void 0?void 0:d(e.body,[],1e3),p=await r(e),m=e.local?t:await a();if(e.accountId=m,await v({force:!!e.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."})&&e.body!==void 0){let t=f,r=new URLSearchParams(Object.entries(l).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),i=await c(`Deleting`,async()=>n(p,`DELETE`,`/accounts/${m}/r2/buckets/${encodeURIComponent(String(e[`bucket-name`]))}/objects${r?`?`+r:``}`,{body:t,headers:Object.keys(u).length>0?u:void 0}));o(i,{successLabel:`Deleted`})}})};function at(e){return e.usage(`$0 r2 objects delete <object-key>
79
79
 
80
- 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 it={command:`delete <object-key>`,describe:`Delete Object`,builder:rt,handler:async e=>l({command:`r2 objects delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let l={};if(e[`cf-r2-jurisdiction`]!==void 0&&(l[`cf-r2-jurisdiction`]=String(e[`cf-r2-jurisdiction`])),e.dryRun){let t=await i();s({command:`cf r2 objects delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/r2/buckets/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/objects/${e[`object-key`]==null?`<object-key>`:encodeURIComponent(String(e[`object-key`]))}`,pathParams:{"bucket-name":String(e[`bucket-name`]??``),"object-key":String(e[`object-key`]??``)},bodyKind:`none`});return}let u=await r(e),d=e.local?t:await a();if(e.accountId=d,!await v({force:!!e.force,message:`This permanently deletes the specified object from the R2 bucket.`}))return;let f=await c(`Deleting`,async()=>n(u,`DELETE`,`/accounts/${d}/r2/buckets/${encodeURIComponent(String(e[`bucket-name`]))}/objects/${encodeURIComponent(String(e[`object-key`]))}`,{headers:Object.keys(l).length>0?l:void 0}));o(f,{successLabel:`Deleted`})})};function at(e){return e.usage(`$0 r2 objects get <object-key>
80
+ 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 ot={command:`delete <object-key>`,describe:`Delete Object`,builder:at,handler:async e=>l({command:`r2 objects delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let l={};if(e[`cf-r2-jurisdiction`]!==void 0&&(l[`cf-r2-jurisdiction`]=String(e[`cf-r2-jurisdiction`])),e.dryRun){let t=await i();s({command:`cf r2 objects delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/r2/buckets/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/objects/${e[`object-key`]==null?`<object-key>`:encodeURIComponent(String(e[`object-key`]))}`,pathParams:{"bucket-name":String(e[`bucket-name`]??``),"object-key":String(e[`object-key`]??``)},bodyKind:`none`});return}let u=await r(e),d=e.local?t:await a();if(e.accountId=d,!await v({force:!!e.force,message:`This permanently deletes the specified object from the R2 bucket.`}))return;let f=await c(`Deleting`,async()=>n(u,`DELETE`,`/accounts/${d}/r2/buckets/${encodeURIComponent(String(e[`bucket-name`]))}/objects/${encodeURIComponent(String(e[`object-key`]))}`,{headers:Object.keys(l).length>0?l:void 0}));o(f,{successLabel:`Deleted`})})};function st(e){return e.usage(`$0 r2 objects get <object-key>
81
81
 
82
- 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 ot={command:`get <object-key>`,describe:`Get Object`,builder:at,handler:async e=>l({command:`r2 objects get`,classification:{safeFlags:[`dry-run`,`text`]}},e,async()=>{let n={};if(e[`cf-r2-jurisdiction`]!==void 0&&(n[`cf-r2-jurisdiction`]=String(e[`cf-r2-jurisdiction`])),e[`if-none-match`]!==void 0&&(n[`If-None-Match`]=String(e[`if-none-match`])),e[`if-modified-since`]!==void 0&&(n[`If-Modified-Since`]=String(e[`if-modified-since`])),e.dryRun){let t=await i();s({command:`cf r2 objects get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/r2/buckets/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/objects/${e[`object-key`]==null?`<object-key>`:encodeURIComponent(String(e[`object-key`]))}`,pathParams:{"bucket-name":String(e[`bucket-name`]??``),"object-key":String(e[`object-key`]??``)},bodyKind:`none`});return}await r(e);let o=e.local?t:await a();e.accountId=o;let l=await c(`Loading`,async()=>b(`/accounts/${o}/r2/buckets/${encodeURIComponent(String(e[`bucket-name`]))}/objects/${encodeURIComponent(String(e[`object-key`]))}`,{method:`GET`,local:e.local===!0,persistTo:e.persistTo,headers:Object.keys(n).length>0?n:void 0}));y(e.text===!0?l.toString(`utf-8`):l)})};function st(e){return e.usage(`$0 r2 objects list
82
+ 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 ct={command:`get <object-key>`,describe:`Get Object`,builder:st,handler:async e=>l({command:`r2 objects get`,classification:{safeFlags:[`dry-run`,`text`]}},e,async()=>{let n={};if(e[`cf-r2-jurisdiction`]!==void 0&&(n[`cf-r2-jurisdiction`]=String(e[`cf-r2-jurisdiction`])),e[`if-none-match`]!==void 0&&(n[`If-None-Match`]=String(e[`if-none-match`])),e[`if-modified-since`]!==void 0&&(n[`If-Modified-Since`]=String(e[`if-modified-since`])),e.dryRun){let t=await i();s({command:`cf r2 objects get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/r2/buckets/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/objects/${e[`object-key`]==null?`<object-key>`:encodeURIComponent(String(e[`object-key`]))}`,pathParams:{"bucket-name":String(e[`bucket-name`]??``),"object-key":String(e[`object-key`]??``)},bodyKind:`none`});return}await r(e);let o=e.local?t:await a();e.accountId=o;let l=await c(`Loading`,async()=>b(`/accounts/${o}/r2/buckets/${encodeURIComponent(String(e[`bucket-name`]))}/objects/${encodeURIComponent(String(e[`object-key`]))}`,{method:`GET`,local:e.local===!0,persistTo:e.persistTo,headers:Object.keys(n).length>0?n:void 0}));y(e.text===!0?l.toString(`utf-8`):l)})};function lt(e){return e.usage(`$0 r2 objects list
83
83
 
84
- 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 ct={command:`list`,describe:`List Objects`,builder:st,handler:async e=>l({command:`r2 objects list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={per_page:e[`per-page`],prefix:e.prefix,delimiter:e.delimiter,cursor:e.cursor,start_after:e[`start-after`]},u={};if(e[`cf-r2-jurisdiction`]!==void 0&&(u[`cf-r2-jurisdiction`]=String(e[`cf-r2-jurisdiction`])),e.dryRun){let t=await i();s({command:`cf r2 objects list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/r2/buckets/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/objects`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},query:l,bodyKind:`none`});return}let d=await r(e),f=e.local?t:await a();e.accountId=f;let p=await c(`Loading`,async()=>n(d,`GET`,`/accounts/${f}/r2/buckets/${encodeURIComponent(String(e[`bucket-name`]))}/objects`,{query:l,headers:Object.keys(u).length>0?u:void 0}));o(p,{successLabel:`Loaded`})})};function lt(e){return e.usage(`$0 r2 objects put <object-key>
84
+ 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 ut={command:`list`,describe:`List Objects`,builder:lt,handler:async e=>l({command:`r2 objects list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={per_page:e[`per-page`],prefix:e.prefix,delimiter:e.delimiter,cursor:e.cursor,start_after:e[`start-after`]},u={};if(e[`cf-r2-jurisdiction`]!==void 0&&(u[`cf-r2-jurisdiction`]=String(e[`cf-r2-jurisdiction`])),e.dryRun){let t=await i();s({command:`cf r2 objects list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/r2/buckets/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/objects`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},query:l,bodyKind:`none`});return}let d=await r(e),f=e.local?t:await a();e.accountId=f;let p=await c(`Loading`,async()=>n(d,`GET`,`/accounts/${f}/r2/buckets/${encodeURIComponent(String(e[`bucket-name`]))}/objects`,{query:l,headers:Object.keys(u).length>0?u:void 0}));o(p,{successLabel:`Loaded`})})};function dt(e){return e.usage(`$0 r2 objects put <object-key>
85
85
 
86
- 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 ut={command:`put <object-key>`,describe:`Upload Object`,builder:lt,handler:async e=>l({command:`r2 objects put`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={};if(e[`cf-r2-jurisdiction`]!==void 0&&(l[`cf-r2-jurisdiction`]=String(e[`cf-r2-jurisdiction`])),e[`content-type`]!==void 0&&(l[`Content-Type`]=String(e[`content-type`])),e[`content-length`]!==void 0&&(l[`Content-Length`]=String(e[`content-length`])),e[`cf-r2-storage-class`]!==void 0&&(l[`cf-r2-storage-class`]=String(e[`cf-r2-storage-class`])),e.dryRun){let t=await i();s({command:`cf r2 objects put`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/r2/buckets/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/objects/${e[`object-key`]==null?`<object-key>`:encodeURIComponent(String(e[`object-key`]))}`,pathParams:{"bucket-name":String(e[`bucket-name`]??``),"object-key":String(e[`object-key`]??``)},bodyKind:`octet-stream`,body:e.body});return}let u=await r(e),d=e.local?t:await a();if(e.accountId=d,e.file){let t=h(e.file),r=await c(`Updating`,async()=>n(u,`PUT`,`/accounts/${d}/r2/buckets/${encodeURIComponent(String(e[`bucket-name`]))}/objects/${encodeURIComponent(String(e[`object-key`]))}`,{body:t,headers:{"Content-Type":`application/octet-stream`,...Object.keys(l).length>0?l:void 0}}));o(r,{successLabel:`Updated`})}else if(e.body){let t=m(e.body,`body`,`binary`),r=await c(`Updating`,async()=>n(u,`PUT`,`/accounts/${d}/r2/buckets/${encodeURIComponent(String(e[`bucket-name`]))}/objects/${encodeURIComponent(String(e[`object-key`]))}`,{body:t,headers:{"Content-Type":`application/octet-stream`,...l}}));o(r,{successLabel:`Updated`})}else if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},dt={command:`objects`,describe:`Operations for objects`,builder:e=>e.command(nt).command(it).command(ot).command(ct).command(ut).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Y={method:`PUT`,path:t=>e`/accounts/${t.account_id}/slurper/source/connectivity-precheck`,body:`json`};function ft(e){return e.usage(`$0 r2 super-slurper connectivity-precheck source
86
+ 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 ft={command:`put <object-key>`,describe:`Upload Object`,builder:dt,handler:async e=>l({command:`r2 objects put`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={};if(e[`cf-r2-jurisdiction`]!==void 0&&(l[`cf-r2-jurisdiction`]=String(e[`cf-r2-jurisdiction`])),e[`content-type`]!==void 0&&(l[`Content-Type`]=String(e[`content-type`])),e[`content-length`]!==void 0&&(l[`Content-Length`]=String(e[`content-length`])),e[`cf-r2-storage-class`]!==void 0&&(l[`cf-r2-storage-class`]=String(e[`cf-r2-storage-class`])),e.dryRun){let t=await i();s({command:`cf r2 objects put`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/r2/buckets/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/objects/${e[`object-key`]==null?`<object-key>`:encodeURIComponent(String(e[`object-key`]))}`,pathParams:{"bucket-name":String(e[`bucket-name`]??``),"object-key":String(e[`object-key`]??``)},bodyKind:`octet-stream`,body:e.file===void 0?e.body:{file:e.file}});return}if(e.body===void 0&&e.file===void 0)throw Error(`--body or --file is required for this command. Pass --body '<value>' or --file path/to/file.`);let u=e.file===void 0?m(e.body,`body`,`binary`):void 0,d=await r(e),f=e.local?t:await a();if(e.accountId=f,e.file!==void 0){let t=h(e.file),r=await c(`Updating`,async()=>n(d,`PUT`,`/accounts/${f}/r2/buckets/${encodeURIComponent(String(e[`bucket-name`]))}/objects/${encodeURIComponent(String(e[`object-key`]))}`,{body:t,headers:{"Content-Type":`application/octet-stream`,...Object.keys(l).length>0?l:void 0}}));o(r,{successLabel:`Updated`})}else if(e.body!==void 0){let t=u,r=await c(`Updating`,async()=>n(d,`PUT`,`/accounts/${f}/r2/buckets/${encodeURIComponent(String(e[`bucket-name`]))}/objects/${encodeURIComponent(String(e[`object-key`]))}`,{body:t,headers:{"Content-Type":`application/octet-stream`,...l}}));o(r,{successLabel:`Updated`})}})},pt={command:`objects`,describe:`Operations for objects`,builder:e=>e.command(it).command(ot).command(ct).command(ut).command(ft).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var J={method:`PUT`,path:t=>e`/accounts/${t.account_id}/slurper/source/connectivity-precheck`,body:`json`};function mt(e){return e.usage(`$0 r2 super-slurper connectivity-precheck source
87
87
 
88
- 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`]}).coerce(`vendor`,e=>m(e,`vendor`,`text`)).option(`jurisdiction`,{type:`string`,description:`The jurisdiction field`,choices:[`default`,`eu`,`us`,`fedramp`]}).coerce(`jurisdiction`,e=>m(e,`jurisdiction`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).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 pt={command:`source`,describe:`Check source connectivity`,builder:ft,handler:async e=>l({command:`r2 super-slurper connectivity-precheck source`,classification:{safeFlags:[`vendor`,`jurisdiction`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf r2 super-slurper connectivity-precheck source`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/slurper/source/connectivity-precheck`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({bucket:m(e.bucket,`bucket`,`text`),endpoint:m(e.endpoint,`endpoint`,`text`),keys:e.keys,pathPrefix:m(e[`path-prefix`],`path-prefix`,`text`),region:m(e.region,`region`,`text`),secret:{accessKeyId:m(e[`secret-access-key-id`],`secret-access-key-id`,`text`),secretAccessKey:m(e[`secret-secret-access-key`],`secret-secret-access-key`,`text`),clientEmail:m(e[`secret-client-email`],`secret-client-email`,`text`),privateKey:m(e[`secret-private-key`],`secret-private-key`,`text`)},vendor:e.vendor,jurisdiction:e.jurisdiction}):d(e.body),sensitiveBodyPaths:[[`secret`,`secretAccessKey`],[`secret`,`privateKey`]]});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Updating`,async()=>n.send(Y,{body:t,account_id:l}));o(r,{successLabel:`Updated`});return}e.bucket===void 0&&(e.bucket=await g(`bucket`,`The bucket field`)),e.vendor===void 0&&(e.vendor=await _(`vendor`,`The vendor field`,[`s3`,`gcs`,`r2`]));let u=p({bucket:m(e.bucket,`bucket`,`text`),endpoint:m(e.endpoint,`endpoint`,`text`),keys:e.keys,pathPrefix:m(e[`path-prefix`],`path-prefix`,`text`),region:m(e.region,`region`,`text`),secret:{accessKeyId:m(e[`secret-access-key-id`],`secret-access-key-id`,`text`),secretAccessKey:m(e[`secret-secret-access-key`],`secret-secret-access-key`,`text`),clientEmail:m(e[`secret-client-email`],`secret-client-email`,`text`),privateKey:m(e[`secret-private-key`],`secret-private-key`,`text`)},vendor:e.vendor,jurisdiction:e.jurisdiction}),f=await c(`Updating`,async()=>n.send(Y,{body:u,account_id:l}));o(f,{successLabel:`Updated`})})};var X={method:`PUT`,path:t=>e`/accounts/${t.account_id}/slurper/target/connectivity-precheck`,body:`json`,constants:{vendor:`r2`}};function mt(e){return e.usage(`$0 r2 super-slurper connectivity-precheck target
88
+ 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`]}).coerce(`vendor`,e=>m(e,`vendor`,`text`)).option(`jurisdiction`,{type:`string`,description:`The jurisdiction field`,choices:[`default`,`eu`,`us`,`fedramp`]}).coerce(`jurisdiction`,e=>m(e,`jurisdiction`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).conflicts(`endpoint`,[`secret-client-email`,`secret-private-key`,`jurisdiction`]).implies(`endpoint`,[`secret-access-key-id`,`secret-secret-access-key`]).conflicts(`region`,[`secret-client-email`,`secret-private-key`,`jurisdiction`]).implies(`region`,[`secret-access-key-id`,`secret-secret-access-key`]).conflicts(`secret-access-key-id`,[`secret-client-email`,`secret-private-key`]).implies(`secret-access-key-id`,[`secret-secret-access-key`]).conflicts(`secret-secret-access-key`,[`secret-client-email`,`secret-private-key`]).implies(`secret-secret-access-key`,[`secret-access-key-id`]).conflicts(`secret-client-email`,[`endpoint`,`region`,`secret-access-key-id`,`secret-secret-access-key`,`jurisdiction`]).implies(`secret-client-email`,[`secret-private-key`]).conflicts(`secret-private-key`,[`endpoint`,`region`,`secret-access-key-id`,`secret-secret-access-key`,`jurisdiction`]).implies(`secret-private-key`,[`secret-client-email`]).conflicts(`jurisdiction`,[`endpoint`,`region`,`secret-client-email`,`secret-private-key`]).implies(`jurisdiction`,[`secret-access-key-id`,`secret-secret-access-key`])}const ht={command:`source`,describe:`Check source connectivity`,builder:mt,handler:async e=>l({command:`r2 super-slurper connectivity-precheck source`,classification:{safeFlags:[`vendor`,`jurisdiction`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf r2 super-slurper connectivity-precheck source`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/slurper/source/connectivity-precheck`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({bucket:m(e.bucket,`bucket`,`text`),endpoint:m(e.endpoint,`endpoint`,`text`),keys:e.keys,pathPrefix:m(e[`path-prefix`],`path-prefix`,`text`),region:m(e.region,`region`,`text`),secret:{accessKeyId:m(e[`secret-access-key-id`],`secret-access-key-id`,`text`),secretAccessKey:m(e[`secret-secret-access-key`],`secret-secret-access-key`,`text`),clientEmail:m(e[`secret-client-email`],`secret-client-email`,`text`),privateKey:m(e[`secret-private-key`],`secret-private-key`,`text`)},vendor:e.vendor,jurisdiction:e.jurisdiction}):d(e.body),sensitiveBodyPaths:[[`secret`,`secretAccessKey`],[`secret`,`privateKey`]]});return}let n=e.body===void 0?void 0:d(e.body),l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body!==void 0){let e=n,t=await c(`Updating`,async()=>l.send(J,{body:e,account_id:u}));o(t,{successLabel:`Updated`});return}e.bucket===void 0&&(e.bucket=await g(`bucket`,`The bucket field`)),e.vendor===void 0&&(e.vendor=await _(`vendor`,`The vendor field`,[`s3`,`gcs`,`r2`]));let f=p({bucket:m(e.bucket,`bucket`,`text`),endpoint:m(e.endpoint,`endpoint`,`text`),keys:e.keys,pathPrefix:m(e[`path-prefix`],`path-prefix`,`text`),region:m(e.region,`region`,`text`),secret:{accessKeyId:m(e[`secret-access-key-id`],`secret-access-key-id`,`text`),secretAccessKey:m(e[`secret-secret-access-key`],`secret-secret-access-key`,`text`),clientEmail:m(e[`secret-client-email`],`secret-client-email`,`text`),privateKey:m(e[`secret-private-key`],`secret-private-key`,`text`)},vendor:e.vendor,jurisdiction:e.jurisdiction}),h=await c(`Updating`,async()=>l.send(J,{body:f,account_id:u}));o(h,{successLabel:`Updated`})})};var Y={method:`PUT`,path:t=>e`/accounts/${t.account_id}/slurper/target/connectivity-precheck`,body:`json`,constants:{vendor:`r2`}};function gt(e){return e.usage(`$0 r2 super-slurper connectivity-precheck target
89
89
 
90
- 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`]}).coerce(`jurisdiction`,e=>m(e,`jurisdiction`,`text`)).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`]}).coerce(`vendor`,e=>m(e,`vendor`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ht={command:`target`,describe:`Check target connectivity`,builder:mt,handler:async e=>l({command:`r2 super-slurper connectivity-precheck target`,classification:{safeFlags:[`jurisdiction`,`vendor`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf r2 super-slurper connectivity-precheck target`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/slurper/target/connectivity-precheck`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({bucket:m(e.bucket,`bucket`,`text`),jurisdiction:e.jurisdiction,secret:{accessKeyId:m(e[`secret-access-key-id`],`secret-access-key-id`,`text`),secretAccessKey:m(e[`secret-secret-access-key`],`secret-secret-access-key`,`text`)},vendor:e.vendor}):d(e.body),sensitiveBodyPaths:[[`secret`,`secretAccessKey`]]});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Updating`,async()=>n.send(X,{body:t,account_id:l}));o(r,{successLabel:`Updated`});return}e.bucket===void 0&&(e.bucket=await g(`bucket`,`The bucket field`)),e[`secret-access-key-id`]===void 0&&(e[`secret-access-key-id`]=await g(`secret-access-key-id`,`The secret.accessKeyId field`)),e[`secret-secret-access-key`]===void 0&&(e[`secret-secret-access-key`]=await g(`secret-secret-access-key`,`The secret.secretAccessKey field`,{kind:`secret`})),e.vendor===void 0&&(e.vendor=await _(`vendor`,`The vendor field`,[`r2`]));let u=p({bucket:m(e.bucket,`bucket`,`text`),jurisdiction:e.jurisdiction,secret:{accessKeyId:m(e[`secret-access-key-id`],`secret-access-key-id`,`text`),secretAccessKey:m(e[`secret-secret-access-key`],`secret-secret-access-key`,`text`)},vendor:e.vendor}),f=await c(`Updating`,async()=>n.send(X,{body:u,account_id:l}));o(f,{successLabel:`Updated`})})},gt={command:`connectivity-precheck`,describe:`Operations for super-slurper.connectivity-precheck`,builder:e=>e.command(pt).command(ht).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var _t={method:`PUT`,path:t=>e`/accounts/${t.account_id}/slurper/jobs/abortAll`};function vt(e){return e.usage(`$0 r2 super-slurper jobs abort-all
90
+ 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`]}).coerce(`jurisdiction`,e=>m(e,`jurisdiction`,`text`)).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`]}).coerce(`vendor`,e=>m(e,`vendor`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const _t={command:`target`,describe:`Check target connectivity`,builder:gt,handler:async e=>l({command:`r2 super-slurper connectivity-precheck target`,classification:{safeFlags:[`jurisdiction`,`vendor`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf r2 super-slurper connectivity-precheck target`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/slurper/target/connectivity-precheck`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({bucket:m(e.bucket,`bucket`,`text`),jurisdiction:e.jurisdiction,secret:{accessKeyId:m(e[`secret-access-key-id`],`secret-access-key-id`,`text`),secretAccessKey:m(e[`secret-secret-access-key`],`secret-secret-access-key`,`text`)},vendor:e.vendor}):d(e.body),sensitiveBodyPaths:[[`secret`,`secretAccessKey`]]});return}let n=e.body===void 0?void 0:d(e.body),l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body!==void 0){let e=n,t=await c(`Updating`,async()=>l.send(Y,{body:e,account_id:u}));o(t,{successLabel:`Updated`});return}e.bucket===void 0&&(e.bucket=await g(`bucket`,`The bucket field`)),e[`secret-access-key-id`]===void 0&&(e[`secret-access-key-id`]=await g(`secret-access-key-id`,`The secret.accessKeyId field`)),e[`secret-secret-access-key`]===void 0&&(e[`secret-secret-access-key`]=await g(`secret-secret-access-key`,`The secret.secretAccessKey field`,{kind:`secret`})),e.vendor===void 0&&(e.vendor=await _(`vendor`,`The vendor field`,[`r2`]));let f=p({bucket:m(e.bucket,`bucket`,`text`),jurisdiction:e.jurisdiction,secret:{accessKeyId:m(e[`secret-access-key-id`],`secret-access-key-id`,`text`),secretAccessKey:m(e[`secret-secret-access-key`],`secret-secret-access-key`,`text`)},vendor:e.vendor}),h=await c(`Updating`,async()=>l.send(Y,{body:f,account_id:u}));o(h,{successLabel:`Updated`})})},vt={command:`connectivity-precheck`,describe:`Operations for super-slurper.connectivity-precheck`,builder:e=>e.command(ht).command(_t).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var yt={method:`PUT`,path:t=>e`/accounts/${t.account_id}/slurper/jobs/abortAll`};function bt(e){return e.usage(`$0 r2 super-slurper jobs abort-all
91
91
 
92
- 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 yt={command:`abort-all`,describe:`Abort all jobs`,builder:vt,handler:async e=>l({command:`r2 super-slurper jobs abort-all`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let e=await i();s({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 n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force,message:`This operation stops every running migration job.`}))return;let u=await c(`Deleting`,async()=>n.send(_t,{account_id:l}));o(u,{successLabel:`Deleted`})})};var bt={method:`PUT`,path:t=>e`/accounts/${t.account_id}/slurper/jobs/${t.job_id}/abort`};function xt(e){return e.usage(`$0 r2 super-slurper jobs abort <job-id>
92
+ 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 xt={command:`abort-all`,describe:`Abort all jobs`,builder:bt,handler:async e=>l({command:`r2 super-slurper jobs abort-all`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let e=await i();s({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 n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force,message:`This operation stops every running migration job.`}))return;let u=await c(`Updating`,async()=>n.send(yt,{account_id:l}));o(u,{successLabel:`Updated`})})};var St={method:`PUT`,path:t=>e`/accounts/${t.account_id}/slurper/jobs/${t.job_id}/abort`};function Ct(e){return e.usage(`$0 r2 super-slurper jobs abort <job-id>
93
93
 
94
- 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 St={command:`abort <job-id>`,describe:`Abort a job`,builder:xt,handler:async e=>l({command:`r2 super-slurper jobs abort`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf r2 super-slurper jobs abort`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/slurper/jobs/${e[`job-id`]==null?`<job-id>`:encodeURIComponent(String(e[`job-id`]))}/abort`,pathParams:{"job-id":String(e[`job-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force,message:`This operation stops a running migration job.`}))return;let u=await c(`Deleting`,async()=>n.send(bt,{account_id:l,job_id:e[`job-id`]}));o(u,{successLabel:`Deleted`})})};var Z={method:`POST`,path:t=>e`/accounts/${t.account_id}/slurper/jobs`,body:`json`,errors:{409:`ConflictError`}};function Ct(e){return e.usage(`$0 r2 super-slurper jobs create
94
+ 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 wt={command:`abort <job-id>`,describe:`Abort a job`,builder:Ct,handler:async e=>l({command:`r2 super-slurper jobs abort`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf r2 super-slurper jobs abort`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/slurper/jobs/${e[`job-id`]==null?`<job-id>`:encodeURIComponent(String(e[`job-id`]))}/abort`,pathParams:{"job-id":String(e[`job-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force,message:`This operation stops a running migration job.`}))return;let u=await c(`Updating`,async()=>n.send(St,{account_id:l,job_id:e[`job-id`]}));o(u,{successLabel:`Updated`})})};var X={method:`POST`,path:t=>e`/accounts/${t.account_id}/slurper/jobs`,body:`json`,errors:{409:`ConflictError`}};function Tt(e){return e.usage(`$0 r2 super-slurper jobs create
95
95
 
96
- 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`]}).coerce(`source-vendor`,e=>m(e,`source-vendor`,`text`)).option(`source-jurisdiction`,{type:`string`,description:`The source.jurisdiction field`,choices:[`default`,`eu`,`us`,`fedramp`]}).coerce(`source-jurisdiction`,e=>m(e,`source-jurisdiction`,`text`)).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`]}).coerce(`target-jurisdiction`,e=>m(e,`target-jurisdiction`,`text`)).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`]}).coerce(`target-vendor`,e=>m(e,`target-vendor`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).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 wt={command:`create`,describe:`Create a job`,builder:Ct,handler:async e=>l({command:`r2 super-slurper jobs create`,classification:{safeFlags:[`overwrite`,`source-vendor`,`source-jurisdiction`,`target-jurisdiction`,`target-vendor`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf r2 super-slurper jobs create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/slurper/jobs`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({overwrite:e.overwrite,source:{bucket:m(e[`source-bucket`],`source-bucket`,`text`),endpoint:m(e[`source-endpoint`],`source-endpoint`,`text`),keys:e[`source-keys`],pathPrefix:m(e[`source-path-prefix`],`source-path-prefix`,`text`),region:m(e[`source-region`],`source-region`,`text`),secret:{accessKeyId:m(e[`source-secret-access-key-id`],`source-secret-access-key-id`,`text`),secretAccessKey:m(e[`source-secret-secret-access-key`],`source-secret-secret-access-key`,`text`),clientEmail:m(e[`source-secret-client-email`],`source-secret-client-email`,`text`),privateKey:m(e[`source-secret-private-key`],`source-secret-private-key`,`text`)},vendor:e[`source-vendor`],jurisdiction:e[`source-jurisdiction`]},target:{bucket:m(e[`target-bucket`],`target-bucket`,`text`),jurisdiction:e[`target-jurisdiction`],secret:{accessKeyId:m(e[`target-secret-access-key-id`],`target-secret-access-key-id`,`text`),secretAccessKey:m(e[`target-secret-secret-access-key`],`target-secret-secret-access-key`,`text`)},vendor:e[`target-vendor`]}}):d(e.body),sensitiveBodyPaths:[[`source`,`secret`,`secretAccessKey`],[`source`,`secret`,`privateKey`],[`target`,`secret`,`secretAccessKey`]]});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Creating`,async()=>n.send(Z,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}let u=p({overwrite:e.overwrite,source:{bucket:m(e[`source-bucket`],`source-bucket`,`text`),endpoint:m(e[`source-endpoint`],`source-endpoint`,`text`),keys:e[`source-keys`],pathPrefix:m(e[`source-path-prefix`],`source-path-prefix`,`text`),region:m(e[`source-region`],`source-region`,`text`),secret:{accessKeyId:m(e[`source-secret-access-key-id`],`source-secret-access-key-id`,`text`),secretAccessKey:m(e[`source-secret-secret-access-key`],`source-secret-secret-access-key`,`text`),clientEmail:m(e[`source-secret-client-email`],`source-secret-client-email`,`text`),privateKey:m(e[`source-secret-private-key`],`source-secret-private-key`,`text`)},vendor:e[`source-vendor`],jurisdiction:e[`source-jurisdiction`]},target:{bucket:m(e[`target-bucket`],`target-bucket`,`text`),jurisdiction:e[`target-jurisdiction`],secret:{accessKeyId:m(e[`target-secret-access-key-id`],`target-secret-access-key-id`,`text`),secretAccessKey:m(e[`target-secret-secret-access-key`],`target-secret-secret-access-key`,`text`)},vendor:e[`target-vendor`]}}),f=await c(`Creating`,async()=>n.send(Z,{body:u,account_id:l}));o(f,{successLabel:`Created`})})};var Tt={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/slurper/jobs/${t.job_id}`,errors:{409:`ConflictError`}};function Et(e){return e.usage(`$0 r2 super-slurper jobs delete <job-id>
96
+ 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`]}).coerce(`source-vendor`,e=>m(e,`source-vendor`,`text`)).option(`source-jurisdiction`,{type:`string`,description:`The source.jurisdiction field`,choices:[`default`,`eu`,`us`,`fedramp`]}).coerce(`source-jurisdiction`,e=>m(e,`source-jurisdiction`,`text`)).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`]}).coerce(`target-jurisdiction`,e=>m(e,`target-jurisdiction`,`text`)).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`]}).coerce(`target-vendor`,e=>m(e,`target-vendor`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).conflicts(`source-endpoint`,[`source-secret-client-email`,`source-secret-private-key`,`source-jurisdiction`]).implies(`source-endpoint`,[`source-secret-access-key-id`,`source-secret-secret-access-key`]).conflicts(`source-region`,[`source-secret-client-email`,`source-secret-private-key`,`source-jurisdiction`]).implies(`source-region`,[`source-secret-access-key-id`,`source-secret-secret-access-key`]).conflicts(`source-secret-access-key-id`,[`source-secret-client-email`,`source-secret-private-key`]).implies(`source-secret-access-key-id`,[`source-secret-secret-access-key`]).conflicts(`source-secret-secret-access-key`,[`source-secret-client-email`,`source-secret-private-key`]).implies(`source-secret-secret-access-key`,[`source-secret-access-key-id`]).conflicts(`source-secret-client-email`,[`source-endpoint`,`source-region`,`source-secret-access-key-id`,`source-secret-secret-access-key`,`source-jurisdiction`]).implies(`source-secret-client-email`,[`source-secret-private-key`]).conflicts(`source-secret-private-key`,[`source-endpoint`,`source-region`,`source-secret-access-key-id`,`source-secret-secret-access-key`,`source-jurisdiction`]).implies(`source-secret-private-key`,[`source-secret-client-email`]).conflicts(`source-jurisdiction`,[`source-endpoint`,`source-region`,`source-secret-client-email`,`source-secret-private-key`]).implies(`source-jurisdiction`,[`source-secret-access-key-id`,`source-secret-secret-access-key`]).check(e=>{let t=[`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);if(!e.body&&t){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=>{let t=[`target-bucket`,`target-jurisdiction`,`target-secret-access-key-id`,`target-secret-secret-access-key`,`target-vendor`].some(t=>e[t]!==void 0);if(!e.body&&t){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 Z=[{path:[`source`],selector:`vendor`,variants:[{values:[`s3`],schema:{type:`object`,properties:{bucket:{type:`string`},endpoint:{anyOf:[{type:`string`},{type:`null`}]},keys:{anyOf:[{type:`array`,items:{type:`string`},maxItems:1e4},{type:`null`}]},pathPrefix:{anyOf:[{type:`string`},{type:`null`}]},region:{anyOf:[{type:`string`},{type:`null`}]},secret:{type:`object`,properties:{accessKeyId:{type:`string`},secretAccessKey:{type:`string`}},required:[`accessKeyId`,`secretAccessKey`],additionalProperties:!1},vendor:{enum:[`s3`]}},required:[`bucket`,`secret`,`vendor`],additionalProperties:!1}},{values:[`gcs`],schema:{type:`object`,properties:{bucket:{type:`string`},keys:{anyOf:[{type:`array`,items:{type:`string`},maxItems:1e4},{type:`null`}]},pathPrefix:{anyOf:[{type:`string`},{type:`null`}]},secret:{type:`object`,properties:{clientEmail:{type:`string`},privateKey:{type:`string`}},required:[`clientEmail`,`privateKey`],additionalProperties:!1},vendor:{enum:[`gcs`]}},required:[`bucket`,`secret`,`vendor`],additionalProperties:!1}},{values:[`r2`],schema:{type:`object`,properties:{bucket:{type:`string`},jurisdiction:{anyOf:[{enum:[`default`,`eu`,`us`,`fedramp`]},{type:`null`}]},keys:{anyOf:[{type:`array`,items:{type:`string`},maxItems:1e4},{type:`null`}]},pathPrefix:{anyOf:[{type:`string`},{type:`null`}]},secret:{type:`object`,properties:{accessKeyId:{type:`string`},secretAccessKey:{type:`string`}},required:[`accessKeyId`,`secretAccessKey`],additionalProperties:!1},vendor:{enum:[`r2`]}},required:[`bucket`,`secret`,`vendor`],additionalProperties:!1}}]}],Et={command:`create`,describe:`Create a job`,builder:Tt,handler:async e=>l({command:`r2 super-slurper jobs create`,classification:{safeFlags:[`overwrite`,`source-vendor`,`source-jurisdiction`,`target-jurisdiction`,`target-vendor`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf r2 super-slurper jobs create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/slurper/jobs`,pathParams:{},bodyKind:`json`,body:e.body===void 0?x(p({overwrite:e.overwrite,source:{bucket:m(e[`source-bucket`],`source-bucket`,`text`),endpoint:m(e[`source-endpoint`],`source-endpoint`,`text`),keys:e[`source-keys`],pathPrefix:m(e[`source-path-prefix`],`source-path-prefix`,`text`),region:m(e[`source-region`],`source-region`,`text`),secret:{accessKeyId:m(e[`source-secret-access-key-id`],`source-secret-access-key-id`,`text`),secretAccessKey:m(e[`source-secret-secret-access-key`],`source-secret-secret-access-key`,`text`),clientEmail:m(e[`source-secret-client-email`],`source-secret-client-email`,`text`),privateKey:m(e[`source-secret-private-key`],`source-secret-private-key`,`text`)},vendor:e[`source-vendor`],jurisdiction:e[`source-jurisdiction`]},target:{bucket:m(e[`target-bucket`],`target-bucket`,`text`),jurisdiction:e[`target-jurisdiction`],secret:{accessKeyId:m(e[`target-secret-access-key-id`],`target-secret-access-key-id`,`text`),secretAccessKey:m(e[`target-secret-secret-access-key`],`target-secret-secret-access-key`,`text`)},vendor:e[`target-vendor`]}}),Z):d(e.body),sensitiveBodyPaths:[[`source`,`secret`,`secretAccessKey`],[`source`,`secret`,`privateKey`],[`target`,`secret`,`secretAccessKey`]]});return}let n=e.body===void 0?void 0:d(e.body),l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body!==void 0){let e=n,t=await c(`Creating`,async()=>l.send(X,{body:e,account_id:u}));o(t,{successLabel:`Created`});return}let f=p({overwrite:e.overwrite,source:{bucket:m(e[`source-bucket`],`source-bucket`,`text`),endpoint:m(e[`source-endpoint`],`source-endpoint`,`text`),keys:e[`source-keys`],pathPrefix:m(e[`source-path-prefix`],`source-path-prefix`,`text`),region:m(e[`source-region`],`source-region`,`text`),secret:{accessKeyId:m(e[`source-secret-access-key-id`],`source-secret-access-key-id`,`text`),secretAccessKey:m(e[`source-secret-secret-access-key`],`source-secret-secret-access-key`,`text`),clientEmail:m(e[`source-secret-client-email`],`source-secret-client-email`,`text`),privateKey:m(e[`source-secret-private-key`],`source-secret-private-key`,`text`)},vendor:e[`source-vendor`],jurisdiction:e[`source-jurisdiction`]},target:{bucket:m(e[`target-bucket`],`target-bucket`,`text`),jurisdiction:e[`target-jurisdiction`],secret:{accessKeyId:m(e[`target-secret-access-key-id`],`target-secret-access-key-id`,`text`),secretAccessKey:m(e[`target-secret-secret-access-key`],`target-secret-secret-access-key`,`text`)},vendor:e[`target-vendor`]}});x(f,Z);let h=await c(`Creating`,async()=>l.send(X,{body:f,account_id:u}));o(h,{successLabel:`Created`})})};var Dt={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/slurper/jobs/${t.job_id}`,errors:{409:`ConflictError`}};function Ot(e){return e.usage(`$0 r2 super-slurper jobs delete <job-id>
97
97
 
98
- 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 Dt={command:`delete <job-id>`,describe:`Delete a job`,builder:Et,handler:async e=>l({command:`r2 super-slurper jobs delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf r2 super-slurper jobs delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/slurper/jobs/${e[`job-id`]==null?`<job-id>`:encodeURIComponent(String(e[`job-id`]))}`,pathParams:{"job-id":String(e[`job-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force}))return;let u=await c(`Deleting`,async()=>n.send(Tt,{account_id:l,job_id:e[`job-id`]}));o(u,{successLabel:`Deleted`})})};var Ot={method:`GET`,path:t=>e`/accounts/${t.account_id}/slurper/jobs/${t.job_id}`};function kt(e){return e.usage(`$0 r2 super-slurper jobs get <job-id>
98
+ 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 kt={command:`delete <job-id>`,describe:`Delete a job`,builder:Ot,handler:async e=>l({command:`r2 super-slurper jobs delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf r2 super-slurper jobs delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/slurper/jobs/${e[`job-id`]==null?`<job-id>`:encodeURIComponent(String(e[`job-id`]))}`,pathParams:{"job-id":String(e[`job-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force}))return;let u=await c(`Deleting`,async()=>n.send(Dt,{account_id:l,job_id:e[`job-id`]}));o(u,{successLabel:`Deleted`})})};var At={method:`GET`,path:t=>e`/accounts/${t.account_id}/slurper/jobs/${t.job_id}`};function jt(e){return e.usage(`$0 r2 super-slurper jobs get <job-id>
99
99
 
100
- 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 At={command:`get <job-id>`,describe:`Get job details`,builder:kt,handler:async e=>l({command:`r2 super-slurper jobs get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf r2 super-slurper jobs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/slurper/jobs/${e[`job-id`]==null?`<job-id>`:encodeURIComponent(String(e[`job-id`]))}`,pathParams:{"job-id":String(e[`job-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Ot,{account_id:l,job_id:e[`job-id`]}));o(u,{successLabel:`Loaded`})})};var jt={method:`GET`,path:t=>e`/accounts/${t.account_id}/slurper/jobs`,query:[`limit`,`offset`]};function Mt(e){return e.usage(`$0 r2 super-slurper jobs list
100
+ 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 Mt={command:`get <job-id>`,describe:`Get job details`,builder:jt,handler:async e=>l({command:`r2 super-slurper jobs get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf r2 super-slurper jobs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/slurper/jobs/${e[`job-id`]==null?`<job-id>`:encodeURIComponent(String(e[`job-id`]))}`,pathParams:{"job-id":String(e[`job-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(At,{account_id:l,job_id:e[`job-id`]}));o(u,{successLabel:`Loaded`})})};var Nt={method:`GET`,path:t=>e`/accounts/${t.account_id}/slurper/jobs`,query:[`limit`,`offset`]};function Pt(e){return e.usage(`$0 r2 super-slurper jobs list
101
101
 
102
- 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 Nt={command:`list`,describe:`List jobs`,builder:Mt,handler:async e=>l({command:`r2 super-slurper jobs list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={limit:e.limit,offset:e.offset};if(e.dryRun){let e=await i();s({command:`cf r2 super-slurper jobs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/slurper/jobs`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(jt,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var Pt={method:`GET`,path:t=>e`/accounts/${t.account_id}/slurper/jobs/${t.job_id}/logs`,query:[`limit`,`offset`]};function Ft(e){return e.usage(`$0 r2 super-slurper jobs logs list
102
+ 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 Ft={command:`list`,describe:`List jobs`,builder:Pt,handler:async e=>l({command:`r2 super-slurper jobs list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={limit:e.limit,offset:e.offset};if(e.dryRun){let e=await i();s({command:`cf r2 super-slurper jobs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/slurper/jobs`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(Nt,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var It={method:`GET`,path:t=>e`/accounts/${t.account_id}/slurper/jobs/${t.job_id}/logs`,query:[`limit`,`offset`]};function Lt(e){return e.usage(`$0 r2 super-slurper jobs logs list
103
103
 
104
- 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 It={command:`list`,describe:`Get job logs`,builder:Ft,handler:async e=>l({command:`r2 super-slurper jobs logs list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={limit:e.limit,offset:e.offset};if(e.dryRun){let t=await i();s({command:`cf r2 super-slurper jobs logs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/slurper/jobs/${e[`job-id`]==null?`<job-id>`:encodeURIComponent(String(e[`job-id`]))}/logs`,pathParams:{"job-id":String(e[`job-id`]??``)},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(Pt,{account_id:u,job_id:e[`job-id`],...n}));o(d,{successLabel:`Loaded`})})},Lt={command:`logs`,describe:`Operations for super-slurper.jobs.logs`,builder:e=>e.command(It).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Rt={method:`PUT`,path:t=>e`/accounts/${t.account_id}/slurper/jobs/${t.job_id}/pause`,errors:{409:`ConflictError`}};function zt(e){return e.usage(`$0 r2 super-slurper jobs pause <job-id>
104
+ 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 Rt={command:`list`,describe:`Get job logs`,builder:Lt,handler:async e=>l({command:`r2 super-slurper jobs logs list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={limit:e.limit,offset:e.offset};if(e.dryRun){let t=await i();s({command:`cf r2 super-slurper jobs logs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/slurper/jobs/${e[`job-id`]==null?`<job-id>`:encodeURIComponent(String(e[`job-id`]))}/logs`,pathParams:{"job-id":String(e[`job-id`]??``)},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(It,{account_id:u,job_id:e[`job-id`],...n}));o(d,{successLabel:`Loaded`})})},zt={command:`logs`,describe:`Operations for super-slurper.jobs.logs`,builder:e=>e.command(Rt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Bt={method:`PUT`,path:t=>e`/accounts/${t.account_id}/slurper/jobs/${t.job_id}/pause`,errors:{409:`ConflictError`}};function Vt(e){return e.usage(`$0 r2 super-slurper jobs pause <job-id>
105
105
 
106
- 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 Bt={command:`pause <job-id>`,describe:`Pause a job`,builder:zt,handler:async e=>l({command:`r2 super-slurper jobs pause`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf r2 super-slurper jobs pause`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/slurper/jobs/${e[`job-id`]==null?`<job-id>`:encodeURIComponent(String(e[`job-id`]))}/pause`,pathParams:{"job-id":String(e[`job-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Updating`,async()=>n.send(Rt,{account_id:l,job_id:e[`job-id`]}));o(u,{successLabel:`Updated`})})};var Vt={method:`GET`,path:t=>e`/accounts/${t.account_id}/slurper/jobs/${t.job_id}/progress`};function Q(e){return e.usage(`$0 r2 super-slurper jobs progress <job-id>
106
+ 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 Q={command:`pause <job-id>`,describe:`Pause a job`,builder:Vt,handler:async e=>l({command:`r2 super-slurper jobs pause`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf r2 super-slurper jobs pause`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/slurper/jobs/${e[`job-id`]==null?`<job-id>`:encodeURIComponent(String(e[`job-id`]))}/pause`,pathParams:{"job-id":String(e[`job-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Updating`,async()=>n.send(Bt,{account_id:l,job_id:e[`job-id`]}));o(u,{successLabel:`Updated`})})};var Ht={method:`GET`,path:t=>e`/accounts/${t.account_id}/slurper/jobs/${t.job_id}/progress`};function Ut(e){return e.usage(`$0 r2 super-slurper jobs progress <job-id>
107
107
 
108
- 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 Ht={command:`progress <job-id>`,describe:`Get job progress`,builder:Q,handler:async e=>l({command:`r2 super-slurper jobs progress`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf r2 super-slurper jobs progress`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/slurper/jobs/${e[`job-id`]==null?`<job-id>`:encodeURIComponent(String(e[`job-id`]))}/progress`,pathParams:{"job-id":String(e[`job-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Vt,{account_id:l,job_id:e[`job-id`]}));o(u,{successLabel:`Loaded`})})};var Ut={method:`PUT`,path:t=>e`/accounts/${t.account_id}/slurper/jobs/${t.job_id}/resume`};function Wt(e){return e.usage(`$0 r2 super-slurper jobs resume <job-id>
108
+ 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:Ut,handler:async e=>l({command:`r2 super-slurper jobs progress`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf r2 super-slurper jobs progress`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/slurper/jobs/${e[`job-id`]==null?`<job-id>`:encodeURIComponent(String(e[`job-id`]))}/progress`,pathParams:{"job-id":String(e[`job-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Ht,{account_id:l,job_id:e[`job-id`]}));o(u,{successLabel:`Loaded`})})};var Gt={method:`PUT`,path:t=>e`/accounts/${t.account_id}/slurper/jobs/${t.job_id}/resume`};function Kt(e){return e.usage(`$0 r2 super-slurper jobs resume <job-id>
109
109
 
110
- 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 Gt={command:`resume <job-id>`,describe:`Resume a job`,builder:Wt,handler:async e=>l({command:`r2 super-slurper jobs resume`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf r2 super-slurper jobs resume`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/slurper/jobs/${e[`job-id`]==null?`<job-id>`:encodeURIComponent(String(e[`job-id`]))}/resume`,pathParams:{"job-id":String(e[`job-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Updating`,async()=>n.send(Ut,{account_id:l,job_id:e[`job-id`]}));o(u,{successLabel:`Updated`})})},Kt={command:`jobs`,describe:`Operations for super-slurper.jobs`,builder:e=>e.command(St).command(yt).command(wt).command(Dt).command(At).command(Nt).command(Bt).command(Ht).command(Gt).command(Lt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},qt={command:`super-slurper`,describe:`Migrate data from external S3-compatible storage into R2 buckets with resumable transfer jobs`,builder:e=>e.command(gt).command(Kt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var $={method:`POST`,path:t=>e`/accounts/${t.account_id}/r2/temp-access-credentials`,body:`json`};function Jt(e){return e.usage(`$0 r2 temporary-credentials create
110
+ 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 qt={command:`resume <job-id>`,describe:`Resume a job`,builder:Kt,handler:async e=>l({command:`r2 super-slurper jobs resume`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf r2 super-slurper jobs resume`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/slurper/jobs/${e[`job-id`]==null?`<job-id>`:encodeURIComponent(String(e[`job-id`]))}/resume`,pathParams:{"job-id":String(e[`job-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Updating`,async()=>n.send(Gt,{account_id:l,job_id:e[`job-id`]}));o(u,{successLabel:`Updated`})})},Jt={command:`jobs`,describe:`Operations for super-slurper.jobs`,builder:e=>e.command(wt).command(xt).command(Et).command(kt).command(Mt).command(Ft).command(Q).command(Wt).command(qt).command(zt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Yt={command:`super-slurper`,describe:`Migrate data from external S3-compatible storage into R2 buckets with resumable transfer jobs`,builder:e=>e.command(vt).command(Jt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var $={method:`POST`,path:t=>e`/accounts/${t.account_id}/r2/temp-access-credentials`,body:`json`};function Xt(e){return e.usage(`$0 r2 temporary-credentials create
111
111
 
112
- 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`]}).coerce(`permission`,e=>m(e,`permission`,`text`)).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 Yt={command:`create`,describe:`Create Temporary Access Credentials`,builder:Jt,handler:async e=>l({command:`r2 temporary-credentials create`,classification:{safeFlags:[`permission`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf r2 temporary-credentials create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/r2/temp-access-credentials`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({bucket:m(e.bucket,`bucket`,`text`),objects:e.objects,parentAccessKeyId:m(e[`parent-access-key-id`],`parent-access-key-id`,`text`),permission:e.permission,prefixes:e.prefixes,ttlSeconds:e[`ttl-seconds`]}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Creating`,async()=>n.send($,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}if(e.bucket===void 0&&(e.bucket=await g(`bucket`,`Name of the R2 bucket.`)),e[`parent-access-key-id`]===void 0&&(e[`parent-access-key-id`]=await g(`parent-access-key-id`,`Access key ID of the parent R2 API token. The temporary credentials cannot exceed this token's permissions.`)),e.permission===void 0&&(e.permission=await _(`permission`,`Permissions allowed on the credentials.`,[`admin-read-write`,`admin-read-only`,`object-read-write`,`object-read-only`])),e[`ttl-seconds`]===void 0)throw Error(`--ttl-seconds is required (or pass --body with this field set).`);let u=p({bucket:m(e.bucket,`bucket`,`text`),objects:e.objects,parentAccessKeyId:m(e[`parent-access-key-id`],`parent-access-key-id`,`text`),permission:e.permission,prefixes:e.prefixes,ttlSeconds:e[`ttl-seconds`]}),f=await c(`Creating`,async()=>n.send($,{body:u,account_id:l}));o(f,{successLabel:`Created`})})},Xt={command:`temporary-credentials`,describe:`Generate short-lived S3-compatible credentials scoped to specific buckets and operations`,builder:e=>e.command(Yt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Zt={command:`r2`,describe:`S3-compatible object storage with zero egress fees — buckets, lifecycle rules, event notifications, and data migration`,builder:e=>e.command(et).command(dt).command(qt).command(Xt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Zt as default};
112
+ 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`]}).coerce(`permission`,e=>m(e,`permission`,`text`)).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 Zt={command:`create`,describe:`Create Temporary Access Credentials`,builder:Xt,handler:async e=>l({command:`r2 temporary-credentials create`,classification:{safeFlags:[`permission`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf r2 temporary-credentials create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/r2/temp-access-credentials`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({bucket:m(e.bucket,`bucket`,`text`),objects:e.objects,parentAccessKeyId:m(e[`parent-access-key-id`],`parent-access-key-id`,`text`),permission:e.permission,prefixes:e.prefixes,ttlSeconds:e[`ttl-seconds`]}):d(e.body)});return}let n=e.body===void 0?void 0:d(e.body),l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body!==void 0){let e=n,t=await c(`Creating`,async()=>l.send($,{body:e,account_id:u}));o(t,{successLabel:`Created`});return}if(e.bucket===void 0&&(e.bucket=await g(`bucket`,`Name of the R2 bucket.`)),e[`parent-access-key-id`]===void 0&&(e[`parent-access-key-id`]=await g(`parent-access-key-id`,`Access key ID of the parent R2 API token. The temporary credentials cannot exceed this token's permissions.`)),e.permission===void 0&&(e.permission=await _(`permission`,`Permissions allowed on the credentials.`,[`admin-read-write`,`admin-read-only`,`object-read-write`,`object-read-only`])),e[`ttl-seconds`]===void 0)throw Error(`--ttl-seconds is required (or pass --body with this field set).`);let f=p({bucket:m(e.bucket,`bucket`,`text`),objects:e.objects,parentAccessKeyId:m(e[`parent-access-key-id`],`parent-access-key-id`,`text`),permission:e.permission,prefixes:e.prefixes,ttlSeconds:e[`ttl-seconds`]}),h=await c(`Creating`,async()=>l.send($,{body:f,account_id:u}));o(h,{successLabel:`Created`})})},Qt={command:`temporary-credentials`,describe:`Generate short-lived S3-compatible credentials scoped to specific buckets and operations`,builder:e=>e.command(Zt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},$t={command:`r2`,describe:`S3-compatible object storage with zero egress fees — buckets, lifecycle rules, event notifications, and data migration`,builder:e=>e.command(nt).command(pt).command(Yt).command(Qt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{$t as default};