cf 1.0.0-beta.6 → 1.0.0-beta.8

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 (237) hide show
  1. package/dist/_meta/commands.json +119 -218
  2. package/dist/_meta/schemas.json +77 -126
  3. package/dist/{abuse-reports-BtI6fvRl.mjs → abuse-reports-D9LttL99.mjs} +1 -1
  4. package/dist/{access-CqOyTHw4.mjs → access-CSUG9fDH.mjs} +1 -1
  5. package/dist/{account-tags-7I77Dwsd.mjs → account-tags-BkmuF6bd.mjs} +2 -2
  6. package/dist/{accounts-Cq-eOPzL.mjs → accounts-CmqKD3xG.mjs} +1 -1
  7. package/dist/{acm-CSXnlN6o.mjs → acm-D9WirG6Y.mjs} +1 -1
  8. package/dist/{addressing-C5XvjNhk.mjs → addressing-DAdzF3M5.mjs} +1 -1
  9. package/dist/{agent-memory-CSzr9gty.mjs → agent-memory-CIEk0dD-.mjs} +1 -1
  10. package/dist/{ai-C0xWIvsG.mjs → ai-Dq1GOYn7.mjs} +3 -3
  11. package/dist/{ai-audit-B43vm1KJ.mjs → ai-audit-D5XtqDkx.mjs} +1 -1
  12. package/dist/{ai-gateway-BK3MbIzT.mjs → ai-gateway-D16_7Zbq.mjs} +1 -1
  13. package/dist/{ai-search-TrFTxBbn.mjs → ai-search-Ce3p9ccc.mjs} +1 -1
  14. package/dist/{ai-security-JrYa27qd.mjs → ai-security-BodoNshv.mjs} +1 -1
  15. package/dist/{alerting-B1-ZwfVT.mjs → alerting-DuF0tdhO.mjs} +1 -1
  16. package/dist/{analytics-B-wlVtDV.mjs → analytics-DmnqxoBT.mjs} +1 -1
  17. package/dist/{analytics_engine-DWzzQzOs.mjs → analytics_engine-BOYHgzoX.mjs} +1 -1
  18. package/dist/{api-security-BWFWWmXl.mjs → api-security-B3v-EKrg.mjs} +1 -1
  19. package/dist/{argo-DHPGTvCT.mjs → argo-BsSvWev6.mjs} +1 -1
  20. package/dist/{artifacts-mmBDk3wO.mjs → artifacts-Dq5t2ZQO.mjs} +1 -1
  21. package/dist/{audit-logs-CCF5e500.mjs → audit-logs-DpszUSNO.mjs} +1 -1
  22. package/dist/{auth-gOCL6Pm0.mjs → auth-BjxUTZWb.mjs} +2 -2
  23. package/dist/{auth-Dnp10uLy.mjs → auth-skaSvH3I.mjs} +1 -1
  24. package/dist/{autoconfig-DqEPKpj0.mjs → autoconfig-DXXV-Xyz.mjs} +1 -1
  25. package/dist/{basin-catalog-hRY01t_Z.mjs → basin-catalog-c_Z-KmdC.mjs} +20 -18
  26. package/dist/{billing-C_ev-9nh.mjs → billing-D8eSkPUk.mjs} +1 -1
  27. package/dist/{bot-management-CyYsXkZt.mjs → bot-management-gPqJF81w.mjs} +1 -1
  28. package/dist/{botnet-feed-Dj5R5v2o.mjs → botnet-feed-B1TeX5OO.mjs} +1 -1
  29. package/dist/{brand-protection-CmQ6Iu0I.mjs → brand-protection-jjdTCYeF.mjs} +1 -1
  30. package/dist/{browser-run-sWHTsCSB.mjs → browser-run-CkmofJ6D.mjs} +1 -1
  31. package/dist/{build-_qqitpn0.mjs → build-B-tN7mO-.mjs} +1 -1
  32. package/dist/build-D5D56lvE.mjs +2 -0
  33. package/dist/{builds-c21rTfcg.mjs → builds-Ca9hPvgz.mjs} +1 -1
  34. package/dist/{cache-CuNjJl6m.mjs → cache-BnRnlPjP.mjs} +1 -1
  35. package/dist/{certificate-authorities-DRUUzvI3.mjs → certificate-authorities-D2J5rh-m.mjs} +1 -1
  36. package/dist/{cf-O3gEaXYZ.mjs → cf-Bh_fTFIj.mjs} +2 -2
  37. package/dist/chunk-FT2NMTJB-1VFYM1Ro.mjs +97 -0
  38. package/dist/chunk-KKDV4JPS-DdzLLtnl.mjs +2 -0
  39. package/dist/{cli-Caa776EB.mjs → cli-xbKU3h28.mjs} +1 -1
  40. package/dist/{client-certificates-BSi1CEGk.mjs → client-certificates-D3mKJGFa.mjs} +1 -1
  41. package/dist/{client-side-security-BdxUX3Y8.mjs → client-side-security-DcO8apX2.mjs} +1 -1
  42. package/dist/{cloud-connector-B46ajuAj.mjs → cloud-connector-CCbT4xFi.mjs} +1 -1
  43. package/dist/{cloudflared-Ciq4L97v.mjs → cloudflared-C4KjWoEY.mjs} +1 -1
  44. package/dist/{cloudforce-one-adbVR2Ah.mjs → cloudforce-one-Cnj0OnZF.mjs} +1 -1
  45. package/dist/{command-C2bU5Etc.mjs → command-8lsstsSi.mjs} +1 -1
  46. package/dist/{command-CRgQ0dM3.mjs → command-B9rrie65.mjs} +1 -1
  47. package/dist/{command-DV196MKR.mjs → command-BUWmTl5w.mjs} +1 -1
  48. package/dist/{command-eBmGBTA7.mjs → command-BWUoVso3.mjs} +1 -1
  49. package/dist/{command-Bw-M_qxb.mjs → command-BtmIP6e1.mjs} +1 -1
  50. package/dist/{command-CkJvjkfK.mjs → command-BvwvCWkB.mjs} +1 -1
  51. package/dist/{command-B5Itp2BM.mjs → command-BxrOxsu9.mjs} +1 -1
  52. package/dist/{command-Du3MiYA7.mjs → command-CUQF-QFP.mjs} +1 -1
  53. package/dist/{command-CVg0qT13.mjs → command-CvzUv83h.mjs} +1 -1
  54. package/dist/{command-BmXnByw9.mjs → command-CwsA28Vt.mjs} +1 -1
  55. package/dist/{command-CHcCSvVz.mjs → command-D5vy9tlg.mjs} +1 -1
  56. package/dist/{command-B47VlNBp.mjs → command-DwbJIcAA.mjs} +1 -1
  57. package/dist/{command-D1Z5uf_S.mjs → command-WCtue6i1.mjs} +1 -1
  58. package/dist/{command-eqgT8zz4.mjs → command-_4j_XD3U.mjs} +1 -1
  59. package/dist/{completions-DbT6O2ol.mjs → completions-EHied_ON.mjs} +1 -1
  60. package/dist/{connector-interrupts-BhfMiPcq.mjs → connector-interrupts-CyeiC7gw.mjs} +1 -1
  61. package/dist/{connector-telemetry-events-CxKECRgO.mjs → connector-telemetry-events-D-cL2RuW.mjs} +1 -1
  62. package/dist/{connector-telemetry-snapshots-BHi-jHE5.mjs → connector-telemetry-snapshots-MrpBZ5fC.mjs} +1 -1
  63. package/dist/{connectors-gkP2aNSN.mjs → connectors-Ds5PWdpP.mjs} +1 -1
  64. package/dist/{containers-DUvBpnRo.mjs → containers-BR6paNcL.mjs} +1 -1
  65. package/dist/{containers-BY8pinEV.mjs → containers-D9masRwv.mjs} +7 -7
  66. package/dist/{content-scan-BCPhAjMZ.mjs → content-scan-eX3wIB8J.mjs} +1 -1
  67. package/dist/{context-CE7QFX-z.mjs → context-M2Ho8pi3.mjs} +1 -1
  68. package/dist/{cps-B35EPUAk.mjs → cps-CyviY22M.mjs} +1 -1
  69. package/dist/{csamScanner-DcTA9oLR.mjs → csamScanner-CHF53DZw.mjs} +1 -1
  70. package/dist/{ct-alerting-B3CS-CPk.mjs → ct-alerting-BORxnBtn.mjs} +1 -1
  71. package/dist/{custom-certificates-IjJJhl7_.mjs → custom-certificates-KsS8xnfG.mjs} +1 -1
  72. package/dist/{custom-csrs-ChYOaEQg.mjs → custom-csrs-BtNQaSVn.mjs} +1 -1
  73. package/dist/{custom-hostnames-Bai3cqAD.mjs → custom-hostnames-4tLpHtCK.mjs} +1 -1
  74. package/dist/{custom-nameservers-DsukmLNZ.mjs → custom-nameservers-DYM29vGA.mjs} +1 -1
  75. package/dist/{custom-pages-CiboX-9D.mjs → custom-pages-BIwM1IyN.mjs} +1 -1
  76. package/dist/{d1-s293SFAJ.mjs → d1-Yhj_t0--.mjs} +1 -1
  77. package/dist/{dcv-delegation-BfgvmpQT.mjs → dcv-delegation-DXspPfEr.mjs} +1 -1
  78. package/dist/{deploy-input-CNrImP7B.mjs → deploy-input-DJWWJs3a.mjs} +1 -1
  79. package/dist/{deploy-CvxNMDbS.mjs → deploy-su0BR90P.mjs} +1 -1
  80. package/dist/{dev-Z6vYszaT.mjs → dev-DqgkwmRH.mjs} +1 -1
  81. package/dist/{diagnostics-Ops0RjxG.mjs → diagnostics-B6FqDbQY.mjs} +1 -1
  82. package/dist/dist-BuCJ_55d.mjs +366 -0
  83. package/dist/{dist-Dgnf_i4w.mjs → dist-CxGYQfpW.mjs} +3 -3
  84. package/dist/{dls-uo7NYEqE.mjs → dls-CDvZjyjo.mjs} +1 -1
  85. package/dist/{dns-B-NwBOpQ.mjs → dns-DGMcGcBE.mjs} +1 -1
  86. package/dist/{dns-firewall-LTIP13nb.mjs → dns-firewall-BahlWOJO.mjs} +1 -1
  87. package/dist/{durable-objects-o7uB3YYg.mjs → durable-objects-Cnho3J7w.mjs} +1 -1
  88. package/dist/{email-auth-BUdBDCaE.mjs → email-auth-CkqeIq8V.mjs} +1 -1
  89. package/dist/{email-routing-BPRliM3z.mjs → email-routing-D_Mw8HSX.mjs} +1 -1
  90. package/dist/{email-security-dbLE3I5c.mjs → email-security-D9yMRsXl.mjs} +1 -1
  91. package/dist/{email-sending-BLlGy5Mn.mjs → email-sending-CQfuE7h6.mjs} +1 -1
  92. package/dist/{error-sanitization-CcNUzN1f.mjs → error-sanitization-BXqhvJsR.mjs} +1 -1
  93. package/dist/error-sanitization-CSlapZbU.mjs +2 -0
  94. package/dist/{fieldExtractors-M-KfLOGw.mjs → fieldExtractors-Bbbegy-c.mjs} +1 -1
  95. package/dist/{firewall-DzbLwqo3.mjs → firewall-DtlT_8mG.mjs} +1 -1
  96. package/dist/{flagship-DcXWEywy.mjs → flagship-BWEdMJSQ.mjs} +1 -1
  97. package/dist/{fraud-CGXRWANi.mjs → fraud-mszBJHV6.mjs} +1 -1
  98. package/dist/{google-tag-gateway-B3Z3Puwl.mjs → google-tag-gateway-DD8rztUs.mjs} +1 -1
  99. package/dist/{healthchecks-BIiV29q7.mjs → healthchecks-CzCJR3df.mjs} +1 -1
  100. package/dist/{hostnames-ueWsZFwv.mjs → hostnames-BTSxAv-T.mjs} +1 -1
  101. package/dist/hyperdrive-Bg1T58qE.mjs +37 -0
  102. package/dist/{iam-kA9gcv79.mjs → iam-cAzxdXI7.mjs} +1 -1
  103. package/dist/{images-CK4J5as7.mjs → images-CfHt8v2n.mjs} +1 -1
  104. package/dist/index.mjs +1 -1
  105. package/dist/{init-COcG8sp5.mjs → init-9TwyFuzD.mjs} +1 -1
  106. package/dist/{intel-z7DkM9Xc.mjs → intel-WWPG0-t7.mjs} +1 -1
  107. package/dist/{ips-BXdBK4Co.mjs → ips-CxSw5R88.mjs} +1 -1
  108. package/dist/{keyless-certificates-Dp9xTYtD.mjs → keyless-certificates-Jfsyada7.mjs} +1 -1
  109. package/dist/{keys-DrVlj4VI.mjs → keys-BrDarg28.mjs} +1 -1
  110. package/dist/{kv-WX-dlUT1.mjs → kv-C8eauBSy.mjs} +1 -1
  111. package/dist/{lazy-command-g04RHlS2.mjs → lazy-command-B0914_IJ.mjs} +1 -1
  112. package/dist/{leaked-credential-checks-BMQ0VhCd.mjs → leaked-credential-checks-Y9mDSJKn.mjs} +1 -1
  113. package/dist/{load-balancers-BbkSL89c.mjs → load-balancers-DsKJIF_U.mjs} +1 -1
  114. package/dist/local-B5d4OPhA.mjs +2 -0
  115. package/dist/{local-Cyk8fPvL.mjs → local-CQc36Viv.mjs} +1 -1
  116. package/dist/{local-runtime-CWWJJB2E.mjs → local-runtime-CifOYlPq.mjs} +1 -1
  117. package/dist/{login-CyU_ZTNI.mjs → login-DFZ3DEjI.mjs} +1 -1
  118. package/dist/{login-DYQ8UgJQ.mjs → login-DGXSiCII.mjs} +1 -1
  119. package/dist/{logo-matches-HFmD2hK6.mjs → logo-matches-D1vjZF-k.mjs} +1 -1
  120. package/dist/{logos-Di2PABE_.mjs → logos-CCEIMvE7.mjs} +1 -1
  121. package/dist/{logpush-DEqdt0I0.mjs → logpush-DAx2y5MY.mjs} +1 -1
  122. package/dist/{logs-Ckfw-3Q_.mjs → logs-D9BsByMt.mjs} +3 -4
  123. package/dist/{magic-cloud-networking-C0yBJKMb.mjs → magic-cloud-networking-C_FsIQoS.mjs} +1 -1
  124. package/dist/{magic-network-monitoring-CLvaiI7s.mjs → magic-network-monitoring-DBo1mI3a.mjs} +1 -1
  125. package/dist/{magic-transit-Bhb1kxYj.mjs → magic-transit-BgRq6ZeA.mjs} +1 -1
  126. package/dist/{managed-defense-COL3aqXw.mjs → managed-defense-BRdCrVVh.mjs} +1 -1
  127. package/dist/{managed-transforms-cK0strTK.mjs → managed-transforms-cmvRuRQ7.mjs} +1 -1
  128. package/dist/{matches-Df4WEz0x.mjs → matches-B0bzP6tB.mjs} +1 -1
  129. package/dist/{mcp-DK_5OUVl.mjs → mcp-CSxoAB-y.mjs} +1 -1
  130. package/dist/{mesh-CVXpTYED.mjs → mesh-C-n2gi4F.mjs} +1 -1
  131. package/dist/{monetization-BHk0S5BF.mjs → monetization-DHFiy5qs.mjs} +1 -1
  132. package/dist/{mtls-certificates-8pzdxzOX.mjs → mtls-certificates-o11WJKM1.mjs} +1 -1
  133. package/dist/{network-ClNeXTvG.mjs → network-Ck6XHs9j.mjs} +1 -1
  134. package/dist/{network-interconnects-t3jSoV7o.mjs → network-interconnects-CT4a_D5b.mjs} +1 -1
  135. package/dist/{oauth-CNSirGUu.mjs → oauth-D6EZEBcY.mjs} +1 -1
  136. package/dist/{oauth-CJamdfrC.mjs → oauth-D9jA6L9a.mjs} +1 -1
  137. package/dist/{oauth-clients-DBxdvlJC.mjs → oauth-clients-DRBvDDNL.mjs} +1 -1
  138. package/dist/{oauth-scopes-D39GYkt6.mjs → oauth-scopes-eV0VbNV-.mjs} +1 -1
  139. package/dist/{observability-ZV1yPflB.mjs → observability-CBCuWCen.mjs} +1 -1
  140. package/dist/{organization-Bk-TkQlB.mjs → organization-3y27rtm7.mjs} +1 -1
  141. package/dist/{organizations-hXITNpPl.mjs → organizations-Q9QPbB-p.mjs} +1 -1
  142. package/dist/{origin-ca-certificates-DsLR_Z2e.mjs → origin-ca-certificates-CbTgmQ2N.mjs} +1 -1
  143. package/dist/{origin-post-quantum-encryption-C_egsVQu.mjs → origin-post-quantum-encryption-D5zeAJJ1.mjs} +1 -1
  144. package/dist/{origin-tls-client-auth-DPG6A6kz.mjs → origin-tls-client-auth-V5hB1Bwu.mjs} +1 -1
  145. package/dist/{page-rules-B8lrkiiF.mjs → page-rules-BYYBcKRU.mjs} +1 -1
  146. package/dist/{pages-Cx4doLvQ.mjs → pages-CfinrrWX.mjs} +1 -1
  147. package/dist/{pay-per-crawl-BUVHqPPA.mjs → pay-per-crawl-C-S5WxQT.mjs} +1 -1
  148. package/dist/{pay-per-use-CzYgryid.mjs → pay-per-use-B3gl7GQo.mjs} +1 -1
  149. package/dist/{pipelines-CGHmwc4a.mjs → pipelines-lfvTXng7.mjs} +1 -1
  150. package/dist/{precursor--Jim5u4y.mjs → precursor-CNm5rIPl.mjs} +1 -1
  151. package/dist/{previews-BKO1pZyG.mjs → previews-DV7OxoSM.mjs} +1 -1
  152. package/dist/{progress-CRjK46r1.mjs → progress-BnIv4lh5.mjs} +1 -1
  153. package/dist/{prompt-C_90YsVE.mjs → prompt-DjRAo2Up.mjs} +1 -1
  154. package/dist/{queries-z2pjzXlA.mjs → queries-D0obyA9I.mjs} +1 -1
  155. package/dist/{queues-D0IXxSa7.mjs → queues-G1CS4M1H.mjs} +1 -1
  156. package/dist/{r2-DQ7w9dCM.mjs → r2-BLXUGlGq.mjs} +27 -34
  157. package/dist/{radar-DyLO7Zg1.mjs → radar-hGFsVuHs.mjs} +1 -1
  158. package/dist/{raw-fetch-C8SdmQBp.mjs → raw-fetch-CuMHmrn0.mjs} +1 -1
  159. package/dist/{realtime-mQzLbDxe.mjs → realtime-CZYwfmjr.mjs} +1 -1
  160. package/dist/{registrar-ClbtM5Dy.mjs → registrar-dvv2gU93.mjs} +1 -1
  161. package/dist/{registrar-sandbox-BIEHm_Jp.mjs → registrar-sandbox-Cnqn9BDJ.mjs} +1 -1
  162. package/dist/{registry-CSv7HR1J.mjs → registry-DWTPK8_Q.mjs} +1 -1
  163. package/dist/{reporting-CjkMzSsZ.mjs → reporting-Bfwnpc7z.mjs} +1 -1
  164. package/dist/{request-headers-jr2VznA9.mjs → request-headers-DaUqNccK.mjs} +1 -1
  165. package/dist/{request-tracers-BoSXOTox.mjs → request-tracers-CF4_bzqx.mjs} +1 -1
  166. package/dist/{resource-sharing-CFS39nJq.mjs → resource-sharing-DaY7ISTQ.mjs} +1 -1
  167. package/dist/{resource-tagging-CZ5mvMhE.mjs → resource-tagging-D669i7sI.mjs} +1 -1
  168. package/dist/{rules-CfqumI45.mjs → rules-C9w-8uyl.mjs} +1 -1
  169. package/dist/{rulesets-o3jsPv4U.mjs → rulesets-yYRTXZ71.mjs} +1 -1
  170. package/dist/{rum-BZ0rYlun.mjs → rum-DPrqqYSC.mjs} +1 -1
  171. package/dist/run-Dkcz54xY.mjs +2 -0
  172. package/dist/run-Duj1fsxa.mjs +2 -0
  173. package/dist/{schema-flags-nL7pHvaE.mjs → schema-flags-CK4J4XhG.mjs} +1 -1
  174. package/dist/{scim-0-eR9pvC.mjs → scim-DAZek91U.mjs} +1 -1
  175. package/dist/{sdk-Bmz7t_CD.mjs → sdk-DzVznUuv.mjs} +1 -1
  176. package/dist/{secrets-store-Duc29Zs-.mjs → secrets-store-COlaXNll.mjs} +1 -1
  177. package/dist/{security-insights-5CuLC-Yo.mjs → security-insights-DF6ffEWO.mjs} +1 -1
  178. package/dist/{security-txt-qm2PqCPz.mjs → security-txt-D1nLEOCZ.mjs} +1 -1
  179. package/dist/{session-CjQFm10R.mjs → session-CZTuHcbm.mjs} +1 -1
  180. package/dist/{shared-BDIrEKWt.mjs → shared-_YyZp2AY.mjs} +1 -1
  181. package/dist/{smart-shield-BXLH9OM0.mjs → smart-shield-CKSVq1sT.mjs} +1 -1
  182. package/dist/{snippets-DZG6UWeH.mjs → snippets-D5zLR7Nj.mjs} +1 -1
  183. package/dist/{spawn-KZqyx6KK.mjs → spawn-DiZTRMi2.mjs} +1 -1
  184. package/dist/{spectrum-Be4ImAIY.mjs → spectrum-L56rh44p.mjs} +1 -1
  185. package/dist/{speed-CNWujfIC.mjs → speed-CfufTtTk.mjs} +1 -1
  186. package/dist/{src-CW6py11z.mjs → src-BIRFlqDR.mjs} +5 -5
  187. package/dist/{ssl-BIlS4Qs8.mjs → ssl-BrDo1vL9.mjs} +1 -1
  188. package/dist/startup-profile-CLmojOrn.mjs +2 -0
  189. package/dist/{startup-profile-DrV846S5.mjs → startup-profile-CR7GMuLx.mjs} +2 -2
  190. package/dist/{state-DhHOAdTo.mjs → state-BaGRaYow.mjs} +1 -1
  191. package/dist/state-CpXhcMdX.mjs +2 -0
  192. package/dist/{stream-C5RvTAKF.mjs → stream-1BpcnrhV.mjs} +1 -1
  193. package/dist/{submit-Bpru4P79.mjs → submit-C-ICyQA7.mjs} +1 -1
  194. package/dist/{tags-Rv7X1rU9.mjs → tags-BA2CG06z.mjs} +1 -1
  195. package/dist/telemetry-Bn5lYtiy.mjs +2 -0
  196. package/dist/{telemetry-0npQCuKc.mjs → telemetry-D14VqvDU.mjs} +1 -1
  197. package/dist/{tenant-CjYf6OPN.mjs → tenant-DZ4dgD2t.mjs} +1 -1
  198. package/dist/{tenant-custom-nameservers-BbHaaEhv.mjs → tenant-custom-nameservers-YjOHEMtf.mjs} +1 -1
  199. package/dist/{tunnels-CLWPaIIF.mjs → tunnels-l8YE_pie.mjs} +1 -1
  200. package/dist/{turnstile-C5ezKSoz.mjs → turnstile-BQrUOlSx.mjs} +1 -1
  201. package/dist/{update-check-aOpHVlzB.mjs → update-check-BPVQSvnH.mjs} +1 -1
  202. package/dist/update-check-worker.mjs +1 -1
  203. package/dist/update-check-zLVAcGWy.mjs +2 -0
  204. package/dist/{url-info-Gcf8-MyB.mjs → url-info-D2l_0t3y.mjs} +1 -1
  205. package/dist/{url-normalization-Dvg8mZRk.mjs → url-normalization-K8zAzorz.mjs} +1 -1
  206. package/dist/{url-scanner-BZCsgh0O.mjs → url-scanner-Dv7lSDeH.mjs} +1 -1
  207. package/dist/{user-BnkvXmjc.mjs → user-DleZBZED.mjs} +1 -1
  208. package/dist/{values-yUGls__L.mjs → values-BnpLZYLh.mjs} +1 -1
  209. package/dist/{vectorize-BiXngTuI.mjs → vectorize-DyHeuA7K.mjs} +1 -1
  210. package/dist/version-CH8K5y4G.mjs +2 -0
  211. package/dist/{waiting-rooms-BoLWF74U.mjs → waiting-rooms-CKp_ty0T.mjs} +1 -1
  212. package/dist/{web-assets-CEJ9Zne1.mjs → web-assets-XrKWHvN4.mjs} +1 -1
  213. package/dist/{web3-CIjm7EuJ.mjs → web3-Bntbgx_4.mjs} +1 -1
  214. package/dist/{workers-DdtWb7Ws.mjs → workers-DM3cs8PN.mjs} +1 -1
  215. package/dist/{workers-builds-DT4tA-KT.mjs → workers-builds-02i1psK2.mjs} +1 -1
  216. package/dist/{workers-for-platforms-CaCr8ApU.mjs → workers-for-platforms-B5RlZXZK.mjs} +1 -1
  217. package/dist/{workers-vpc-DRtjG39D.mjs → workers-vpc-kjiAIRuT.mjs} +1 -1
  218. package/dist/{workflows-DRme6yrC.mjs → workflows-BkuFC47X.mjs} +1 -1
  219. package/dist/{zaraz-DmjDEnUJ.mjs → zaraz-BPOqw7RU.mjs} +1 -1
  220. package/dist/{zero-trust-BRAHExxa.mjs → zero-trust-B4sjDfre.mjs} +1 -1
  221. package/dist/{zone-CclLvb-g.mjs → zone-DkaGQuB6.mjs} +1 -1
  222. package/dist/{zones-C6tc2OOV.mjs → zones-DIlihhZN.mjs} +1 -1
  223. package/package.json +12 -12
  224. package/dist/build-Dyt1M_Ib.mjs +0 -2
  225. package/dist/chunk-M77HNR46-DPbhuhiy.mjs +0 -2
  226. package/dist/chunk-RV27PEH3-Cws_30ln.mjs +0 -97
  227. package/dist/dist-DfMipWKR.mjs +0 -366
  228. package/dist/error-sanitization-CEf4JTNN.mjs +0 -2
  229. package/dist/hyperdrive-Bxk9LZf5.mjs +0 -37
  230. package/dist/local-BWhuu9TH.mjs +0 -2
  231. package/dist/run-D0_7wBp2.mjs +0 -2
  232. package/dist/run-huwFFwXd.mjs +0 -2
  233. package/dist/startup-profile-B0UCc9_J.mjs +0 -2
  234. package/dist/state-Dyo8DcW7.mjs +0 -2
  235. package/dist/telemetry-B4_YhD82.mjs +0 -2
  236. package/dist/update-check-CebyUyqG.mjs +0 -2
  237. package/dist/version-C3q1GMTe.mjs +0 -2
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-Cyk8fPvL.mjs";import{a as t,t as n}from"./context-CE7QFX-z.mjs";import{a as r,r as i}from"./auth-gOCL6Pm0.mjs";import{t as a}from"./output-CvQFJkvi.mjs";import{t as o}from"./dry-run-Bq0JAsbX.mjs";import{t as s}from"./progress-CRjK46r1.mjs";import{t as c}from"./run-huwFFwXd.mjs";import"./telemetry-B4_YhD82.mjs";import{i as l,n as u,r as d,t as f}from"./body-parser-hh2avzkz.mjs";import{n as p,t as m}from"./input-validation-Dk52b0me.mjs";import{a as h,i as g,n as _}from"./prompt-C_90YsVE.mjs";import{n as v,t as ee}from"./raw-fetch-C8SdmQBp.mjs";function te(e){return e.usage(`$0 r2 buckets cors delete <bucket-name>
2
+ import{t as e}from"./local-CQc36Viv.mjs";import{a as t,t as n}from"./context-M2Ho8pi3.mjs";import{a as r,r as i}from"./auth-BjxUTZWb.mjs";import{t as a}from"./output-CvQFJkvi.mjs";import{t as o}from"./dry-run-Bq0JAsbX.mjs";import{t as s}from"./progress-BnIv4lh5.mjs";import{t as c}from"./run-Duj1fsxa.mjs";import"./telemetry-Bn5lYtiy.mjs";import{i as l,n as u,r as d,t as f}from"./body-parser-hh2avzkz.mjs";import{n as p,t as m}from"./input-validation-Dk52b0me.mjs";import{a as h,i as g,n as _}from"./prompt-DjRAo2Up.mjs";import{n as ee,t as te}from"./raw-fetch-CuMHmrn0.mjs";function v(e){return e.usage(`$0 r2 buckets cors delete <bucket-name>
3
3
 
4
- Delete the CORS policy for a bucket.`).positional(`bucket-name`,{type:`string`,description:`Name of the bucket.`,demandOption:!0}).option(`cf-r2-jurisdiction`,{type:`string`,description:`Jurisdiction where objects in this bucket are guaranteed to be stored.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const y={command:`delete <bucket-name>`,describe:`Delete Bucket CORS Policy`,builder:te,handler:async l=>c({command:`r2 buckets cors delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},l,async()=>{let c={};if(l[`cf-r2-jurisdiction`]!==void 0&&(c[`cf-r2-jurisdiction`]=String(l[`cf-r2-jurisdiction`])),l.dryRun){o({command:`cf r2 buckets cors delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/r2/buckets/${l[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(l[`bucket-name`]))}/cors`,pathParams:{"bucket-name":String(l[`bucket-name`]??``)},bodyKind:`none`});return}let u=await i(l),d=l.local?e:await n();if(l.accountId=d,!await _({force:!!l.force,message:`This removes the R2 bucket's CORS policy. Browser requests that depend on these cross-origin permissions may fail.`})){process.stderr.write(`Aborted.
4
+ Delete the CORS policy for a bucket.`).positional(`bucket-name`,{type:`string`,description:`Name of the bucket.`,demandOption:!0}).option(`cf-r2-jurisdiction`,{type:`string`,description:`Jurisdiction where objects in this bucket are guaranteed to be stored.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const y={command:`delete <bucket-name>`,describe:`Delete Bucket CORS Policy`,builder:v,handler:async l=>c({command:`r2 buckets cors delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},l,async()=>{let c={};if(l[`cf-r2-jurisdiction`]!==void 0&&(c[`cf-r2-jurisdiction`]=String(l[`cf-r2-jurisdiction`])),l.dryRun){o({command:`cf r2 buckets cors delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/r2/buckets/${l[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(l[`bucket-name`]))}/cors`,pathParams:{"bucket-name":String(l[`bucket-name`]??``)},bodyKind:`none`});return}let u=await i(l),d=l.local?e:await n();if(l.accountId=d,!await _({force:!!l.force,message:`This removes the R2 bucket's CORS policy. Browser requests that depend on these cross-origin permissions may fail.`})){process.stderr.write(`Aborted.
5
5
  `);return}a(await s(`Deleting`,async()=>r(u,`DELETE`,`/accounts/${d}/r2/buckets/${encodeURIComponent(String(l[`bucket-name`]))}/cors`,{headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Deleted`})})};function b(e){return e.usage(`$0 r2 buckets cors get <bucket-name>
6
6
 
7
7
  Get the CORS policy for a bucket.`).positional(`bucket-name`,{type:`string`,description:`Name of the bucket.`,demandOption:!0}).option(`cf-r2-jurisdiction`,{type:`string`,description:`Jurisdiction where objects in this bucket are guaranteed to be stored.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const x={command:`get <bucket-name>`,describe:`Get Bucket CORS Policy`,builder:b,handler:async l=>c({command:`r2 buckets cors get`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={};if(l[`cf-r2-jurisdiction`]!==void 0&&(c[`cf-r2-jurisdiction`]=String(l[`cf-r2-jurisdiction`])),l.dryRun){o({command:`cf r2 buckets cors get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/r2/buckets/${l[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(l[`bucket-name`]))}/cors`,pathParams:{"bucket-name":String(l[`bucket-name`]??``)},bodyKind:`none`});return}let u=await i(l),d=l.local?e:await n();l.accountId=d,a(await s(`Loading`,async()=>r(u,`GET`,`/accounts/${d}/r2/buckets/${encodeURIComponent(String(l[`bucket-name`]))}/cors`,{headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Loaded`})})};function S(e){return e.usage(`$0 r2 buckets cors update <bucket-name>
@@ -41,9 +41,9 @@ Lists event notification rules for an R2 bucket, grouped by the Cloudflare Queue
41
41
 
42
42
  Creates rules that send notifications for matching R2 object events to the specified Cloudflare Queue. Rules can filter objects by key prefix and suffix. New rules are added to any existing rules for the queue; a rule that overlaps an existing rule is rejected.`).positional(`queue-id`,{type:`string`,description:`ID of the Cloudflare Queue that receives notifications for matching R2 object events.`,demandOption:!0}).option(`bucket-name`,{type:`string`,description:`Name of the bucket.`,demandOption:!0}).option(`cf-r2-jurisdiction`,{type:`string`,description:`Jurisdiction where objects in this bucket are guaranteed to be stored.`}).option(`rules`,{type:`string`,description:`Array of rules to drive notifications. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const oe={command:`update <queue-id>`,describe:`Create Event Notification Rules`,builder:ae,handler:async p=>c({command:`r2 buckets event-notifications update`,classification:{safeFlags:[`dry-run`]}},p,async()=>{let c={};if(p[`cf-r2-jurisdiction`]!==void 0&&(c[`cf-r2-jurisdiction`]=String(p[`cf-r2-jurisdiction`])),p.dryRun){o({command:`cf r2 buckets event-notifications update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/event_notifications/r2/${p[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(p[`bucket-name`]))}/configuration/queues/${p[`queue-id`]==null?`<queue-id>`:encodeURIComponent(String(p[`queue-id`]))}`,pathParams:{"queue-id":String(p[`queue-id`]??``),"bucket-name":String(p[`bucket-name`]??``)},bodyKind:`json`,body:p.body===void 0?f({rules:d(p.rules,`rules`)}):u(p.body)});return}let m=await i(p),h=p.local?e:await n();if(p.accountId=h,p.body){let e=u(p.body);a(await s(`Updating`,async()=>r(m,`PUT`,`/accounts/${h}/event_notifications/r2/${encodeURIComponent(String(p[`bucket-name`]))}/configuration/queues/${encodeURIComponent(String(p[`queue-id`]))}`,{body:e,headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Updated`});return}if(p.rules===void 0)throw Error(`--rules is required (or pass --body with this field set).`);let g={};p.rules!==void 0&&l(g,[`rules`],d(p.rules,`rules`)),a(await s(`Updating`,async()=>r(m,`PUT`,`/accounts/${h}/event_notifications/r2/${encodeURIComponent(String(p[`bucket-name`]))}/configuration/queues/${encodeURIComponent(String(p[`queue-id`]))}`,{body:Object.keys(g).length>0?g:void 0,headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Updated`})})},se={command:`event-notifications`,describe:`Operations for buckets.event-notifications`,builder:e=>e.command(Z).command(ne).command(ie).command(oe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ce(e){return e.usage(`$0 r2 buckets get <bucket-name>
43
43
 
44
- Gets properties of an existing R2 bucket.`).positional(`bucket-name`,{type:`string`,description:`Name of the bucket.`,demandOption:!0}).option(`cf-r2-jurisdiction`,{type:`string`,description:`Jurisdiction where objects in this bucket are guaranteed to be stored.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const le={command:`get <bucket-name>`,describe:`Get Bucket`,builder:ce,handler:async l=>c({command:`r2 buckets get`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={};if(l[`cf-r2-jurisdiction`]!==void 0&&(c[`cf-r2-jurisdiction`]=String(l[`cf-r2-jurisdiction`])),l.dryRun){o({command:`cf r2 buckets get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/r2/buckets/${l[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(l[`bucket-name`]))}`,pathParams:{"bucket-name":String(l[`bucket-name`]??``)},bodyKind:`none`});return}let u=await i(l),d=l.local?e:await n();l.accountId=d,a(await s(`Loading`,async()=>r(u,`GET`,`/accounts/${d}/r2/buckets/${encodeURIComponent(String(l[`bucket-name`]))}`,{headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Loaded`})})};function ue(e){return e.usage("$0 r2 buckets jobs get <job-id>\n\nGets the current status of a prefix-deletion or bucket-emptying job for an R2 bucket. Poll this endpoint with the job identifier returned when the operation was submitted until the status is `COMPLETED`, `FAILED`, or `CANCELLED`.").positional(`job-id`,{type:`string`,description:`Identifier returned when the background job was submitted.`,demandOption:!0}).option(`bucket-name`,{type:`string`,description:`Name of the bucket.`,demandOption:!0}).option(`cf-r2-jurisdiction`,{type:`string`,description:`Jurisdiction where objects in this bucket are guaranteed to be stored.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const de={command:`get <job-id>`,describe:`Get Bucket Job`,builder:ue,handler:async l=>c({command:`r2 buckets jobs get`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={};if(l[`cf-r2-jurisdiction`]!==void 0&&(c[`cf-r2-jurisdiction`]=String(l[`cf-r2-jurisdiction`])),l.dryRun){o({command:`cf r2 buckets jobs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/r2/buckets/${l[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(l[`bucket-name`]))}/jobs/${l[`job-id`]==null?`<job-id>`:encodeURIComponent(String(l[`job-id`]))}`,pathParams:{"bucket-name":String(l[`bucket-name`]??``),"job-id":String(l[`job-id`]??``)},bodyKind:`none`});return}let u=await i(l),d=l.local?e:await n();l.accountId=d,a(await s(`Loading`,async()=>r(u,`GET`,`/accounts/${d}/r2/buckets/${encodeURIComponent(String(l[`bucket-name`]))}/jobs/${encodeURIComponent(String(l[`job-id`]))}`,{headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Loaded`})})};function fe(e){return e.usage(`$0 r2 buckets jobs list
44
+ Gets properties of an existing R2 bucket.`).positional(`bucket-name`,{type:`string`,description:`Name of the bucket.`,demandOption:!0}).option(`cf-r2-jurisdiction`,{type:`string`,description:`Jurisdiction where objects in this bucket are guaranteed to be stored.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const le={command:`get <bucket-name>`,describe:`Get Bucket`,builder:ce,handler:async l=>c({command:`r2 buckets get`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={};if(l[`cf-r2-jurisdiction`]!==void 0&&(c[`cf-r2-jurisdiction`]=String(l[`cf-r2-jurisdiction`])),l.dryRun){o({command:`cf r2 buckets get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/r2/buckets/${l[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(l[`bucket-name`]))}`,pathParams:{"bucket-name":String(l[`bucket-name`]??``)},bodyKind:`none`});return}let u=await i(l),d=l.local?e:await n();l.accountId=d,a(await s(`Loading`,async()=>r(u,`GET`,`/accounts/${d}/r2/buckets/${encodeURIComponent(String(l[`bucket-name`]))}`,{headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Loaded`})})};function ue(e){return e.usage("$0 r2 buckets jobs get <job-id>\n\nGets the current status of a background job of any type for an R2 bucket. Poll this endpoint with the job identifier returned when the operation was submitted until the status is `COMPLETED`, `FAILED`, or `CANCELLED`.").positional(`job-id`,{type:`string`,description:`Identifier returned when the background job was submitted.`,demandOption:!0}).option(`bucket-name`,{type:`string`,description:`Name of the bucket.`,demandOption:!0}).option(`cf-r2-jurisdiction`,{type:`string`,description:`Jurisdiction where objects in this bucket are guaranteed to be stored.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const de={command:`get <job-id>`,describe:`Get Bucket Job`,builder:ue,handler:async l=>c({command:`r2 buckets jobs get`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={};if(l[`cf-r2-jurisdiction`]!==void 0&&(c[`cf-r2-jurisdiction`]=String(l[`cf-r2-jurisdiction`])),l.dryRun){o({command:`cf r2 buckets jobs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/r2/buckets/${l[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(l[`bucket-name`]))}/jobs/${l[`job-id`]==null?`<job-id>`:encodeURIComponent(String(l[`job-id`]))}`,pathParams:{"bucket-name":String(l[`bucket-name`]??``),"job-id":String(l[`job-id`]??``)},bodyKind:`none`});return}let u=await i(l),d=l.local?e:await n();l.accountId=d,a(await s(`Loading`,async()=>r(u,`GET`,`/accounts/${d}/r2/buckets/${encodeURIComponent(String(l[`bucket-name`]))}/jobs/${encodeURIComponent(String(l[`job-id`]))}`,{headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Loaded`})})};function fe(e){return e.usage(`$0 r2 buckets jobs list
45
45
 
46
- Lists a page of prefix-deletion and bucket-emptying jobs for an R2 bucket. Use the returned job identifiers to inspect progress with Get Bucket Job. Storage-class migration jobs are listed by the separate List Storage Class Migration Jobs endpoint.`).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`]}).option(`status`,{type:`string`,description:"Restricts results to jobs with the specified status. `jobType` is required when this parameter is provided.",choices:[`ENQUEUED`,`RUNNING`,`COMPLETED`,`FAILED`,`CANCELLED`]}).option(`max-keys`,{type:`number`,description:`Maximum number of jobs to return.`}).option(`continuation-token`,{type:`string`,description:"Pagination token received as `nextContinuationToken` in the previous response."}).option(`cf-r2-jurisdiction`,{type:`string`,description:`Jurisdiction where objects in this bucket are guaranteed to be stored.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const pe={command:`list`,describe:`List Bucket Jobs`,builder:fe,handler:async l=>c({command:`r2 buckets jobs list`,classification:{safeFlags:[`job-type`,`status`,`dry-run`]}},l,async()=>{let c={jobType:l[`job-type`],status:l.status,maxKeys:l[`max-keys`],continuationToken:l[`continuation-token`]},u={};if(l[`cf-r2-jurisdiction`]!==void 0&&(u[`cf-r2-jurisdiction`]=String(l[`cf-r2-jurisdiction`])),l.dryRun){o({command:`cf r2 buckets jobs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/r2/buckets/${l[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(l[`bucket-name`]))}/jobs`,pathParams:{"bucket-name":String(l[`bucket-name`]??``)},query:c,bodyKind:`none`});return}let d=await i(l),f=l.local?e:await n();l.accountId=f,a(await s(`Loading`,async()=>r(d,`GET`,`/accounts/${f}/r2/buckets/${encodeURIComponent(String(l[`bucket-name`]))}/jobs`,{query:c,headers:Object.keys(u).length>0?u:void 0})),{successLabel:`Loaded`})})},me={command:`jobs`,describe:`Inspect background jobs for an R2 bucket`,builder:e=>e.command(de).command(pe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function he(e){return e.usage(`$0 r2 buckets lifecycle get <bucket-name>
46
+ Lists background jobs for an R2 bucket, including prefix-delete (and bucket-emptying) jobs and storage-class migration jobs. Jobs of every type are returned unless \`jobType\` is provided.`).option(`bucket-name`,{type:`string`,description:`Name of the bucket.`,demandOption:!0}).option(`job-type`,{type:`string`,description:`Restricts results to jobs of the specified type.`,choices:[`prefixDelete`,`storageClassMigration`]}).option(`status`,{type:`string`,description:"Restricts results to jobs with the specified status. `jobType` is required when this parameter is provided.",choices:[`ENQUEUED`,`RUNNING`,`COMPLETED`,`FAILED`,`CANCELLED`]}).option(`max-keys`,{type:`number`,description:`Maximum number of jobs to return.`}).option(`continuation-token`,{type:`string`,description:"Pagination token received as `nextContinuationToken` in the previous response."}).option(`cf-r2-jurisdiction`,{type:`string`,description:`Jurisdiction where objects in this bucket are guaranteed to be stored.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const pe={command:`list`,describe:`List Bucket Jobs`,builder:fe,handler:async l=>c({command:`r2 buckets jobs list`,classification:{safeFlags:[`job-type`,`status`,`dry-run`]}},l,async()=>{let c={jobType:l[`job-type`],status:l.status,maxKeys:l[`max-keys`],continuationToken:l[`continuation-token`]},u={};if(l[`cf-r2-jurisdiction`]!==void 0&&(u[`cf-r2-jurisdiction`]=String(l[`cf-r2-jurisdiction`])),l.dryRun){o({command:`cf r2 buckets jobs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/r2/buckets/${l[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(l[`bucket-name`]))}/jobs`,pathParams:{"bucket-name":String(l[`bucket-name`]??``)},query:c,bodyKind:`none`});return}let d=await i(l),f=l.local?e:await n();l.accountId=f,a(await s(`Loading`,async()=>r(d,`GET`,`/accounts/${f}/r2/buckets/${encodeURIComponent(String(l[`bucket-name`]))}/jobs`,{query:c,headers:Object.keys(u).length>0?u:void 0})),{successLabel:`Loaded`})})},me={command:`jobs`,describe:`Inspect background jobs for an R2 bucket`,builder:e=>e.command(de).command(pe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function he(e){return e.usage(`$0 r2 buckets lifecycle get <bucket-name>
47
47
 
48
48
  Get object lifecycle rules for a bucket.`).positional(`bucket-name`,{type:`string`,description:`Name of the bucket.`,demandOption:!0}).option(`cf-r2-jurisdiction`,{type:`string`,description:`Jurisdiction where objects in this bucket are guaranteed to be stored.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ge={command:`get <bucket-name>`,describe:`Get Object Lifecycle Rules`,builder:he,handler:async l=>c({command:`r2 buckets lifecycle get`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={};if(l[`cf-r2-jurisdiction`]!==void 0&&(c[`cf-r2-jurisdiction`]=String(l[`cf-r2-jurisdiction`])),l.dryRun){o({command:`cf r2 buckets lifecycle get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/r2/buckets/${l[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(l[`bucket-name`]))}/lifecycle`,pathParams:{"bucket-name":String(l[`bucket-name`]??``)},bodyKind:`none`});return}let u=await i(l),d=l.local?e:await n();l.accountId=d,a(await s(`Loading`,async()=>r(u,`GET`,`/accounts/${d}/r2/buckets/${encodeURIComponent(String(l[`bucket-name`]))}/lifecycle`,{headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Loaded`})})};function _e(e){return e.usage(`$0 r2 buckets lifecycle update <bucket-name>
49
49
 
@@ -83,50 +83,43 @@ token from the [R2 dashboard](https://dash.cloudflare.com/?to=/:account/r2/api-t
83
83
 
84
84
  Sippy will use this token when writing objects to R2, so it is
85
85
  best to scope this token to the bucket you're enabling Sippy for.
86
- `}).option(`source-access-key-id`,{type:`string`,description:`Access Key ID of an IAM credential (ideally scoped to a single S3 bucket).`}).option(`source-bucket`,{type:`string`,description:`Name of the AWS S3 bucket.`}).option(`source-provider`,{type:`string`,description:`The source.provider field`,choices:[`aws`,`gcs`,`s3`,`azure`]}).option(`source-region`,{type:`string`,description:`AWS region containing the source S3 bucket.`}).option(`source-secret-access-key`,{type:`string`,description:`Secret Access Key of an IAM credential (ideally scoped to a single S3 bucket).`}).option(`source-client-email`,{type:`string`,description:`Client email of an IAM credential (ideally scoped to a single GCS bucket).`}).option(`source-private-key`,{type:`string`,description:`Private Key of an IAM credential (ideally scoped to a single GCS bucket).`}).option(`source-bucket-url`,{type:`string`,description:`URL to the S3-compatible API of the bucket.`}).option(`source-account-key`,{type:`string`,description:`Access key for the Azure Storage account. Mutually exclusive with sasToken.`}).option(`source-account-name`,{type:`string`,description:`Name of the Azure Storage account.`}).option(`source-container`,{type:`string`,description:`Name of the Azure Blob Storage container.`}).option(`source-sas-token`,{type:`string`,description:`Shared Access Signature token for the Azure Storage account. Mutually exclusive with accountKey.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).conflicts(`source-bucket`,[`source-bucket-url`,`source-account-key`,`source-account-name`,`source-container`,`source-sas-token`]).conflicts(`source-region`,[`source-client-email`,`source-private-key`,`source-bucket-url`,`source-account-key`,`source-account-name`,`source-container`,`source-sas-token`]).conflicts(`source-client-email`,[`source-region`,`source-bucket-url`,`source-account-key`,`source-account-name`,`source-container`,`source-sas-token`]).conflicts(`source-private-key`,[`source-region`,`source-bucket-url`,`source-account-key`,`source-account-name`,`source-container`,`source-sas-token`]).conflicts(`source-bucket-url`,[`source-bucket`,`source-region`,`source-client-email`,`source-private-key`,`source-account-key`,`source-account-name`,`source-container`,`source-sas-token`]).conflicts(`source-account-key`,[`source-bucket`,`source-region`,`source-client-email`,`source-private-key`,`source-bucket-url`]).conflicts(`source-account-name`,[`source-bucket`,`source-region`,`source-client-email`,`source-private-key`,`source-bucket-url`]).conflicts(`source-container`,[`source-bucket`,`source-region`,`source-client-email`,`source-private-key`,`source-bucket-url`]).conflicts(`source-sas-token`,[`source-bucket`,`source-region`,`source-client-email`,`source-private-key`,`source-bucket-url`])}const He={command:`update <bucket-name>`,describe:`Enable Sippy`,builder:Ve,handler:async d=>c({command:`r2 buckets sippy update`,classification:{safeFlags:[`destination-provider`,`source-provider`,`dry-run`]}},d,async()=>{let c={};if(d[`cf-r2-jurisdiction`]!==void 0&&(c[`cf-r2-jurisdiction`]=String(d[`cf-r2-jurisdiction`])),d.dryRun){o({command:`cf r2 buckets sippy update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/r2/buckets/${d[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(d[`bucket-name`]))}/sippy`,pathParams:{"bucket-name":String(d[`bucket-name`]??``)},bodyKind:`json`,body:d.body===void 0?f({destination:{accessKeyId:p(d[`destination-access-key-id`],`destination-access-key-id`,`text`),provider:p(d[`destination-provider`],`destination-provider`,`text`),secretAccessKey:p(d[`destination-secret-access-key`],`destination-secret-access-key`,`text`)},source:{accessKeyId:p(d[`source-access-key-id`],`source-access-key-id`,`text`),bucket:p(d[`source-bucket`],`source-bucket`,`text`),provider:p(d[`source-provider`],`source-provider`,`text`),region:p(d[`source-region`],`source-region`,`text`),secretAccessKey:p(d[`source-secret-access-key`],`source-secret-access-key`,`text`),clientEmail:p(d[`source-client-email`],`source-client-email`,`text`),privateKey:p(d[`source-private-key`],`source-private-key`,`text`),bucketUrl:p(d[`source-bucket-url`],`source-bucket-url`,`text`),accountKey:p(d[`source-account-key`],`source-account-key`,`text`),accountName:p(d[`source-account-name`],`source-account-name`,`text`),container:p(d[`source-container`],`source-container`,`text`),sasToken:p(d[`source-sas-token`],`source-sas-token`,`text`)}}):u(d.body)});return}let m=await i(d),h=d.local?e:await n();if(d.accountId=h,d.body){let e=u(d.body);a(await s(`Updating`,async()=>r(m,`PUT`,`/accounts/${h}/r2/buckets/${encodeURIComponent(String(d[`bucket-name`]))}/sippy`,{body:e,headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Updated`});return}let g={};d[`destination-access-key-id`]!==void 0&&l(g,[`destination`,`accessKeyId`],p(d[`destination-access-key-id`],`destination-access-key-id`,`text`)),d[`destination-provider`]!==void 0&&l(g,[`destination`,`provider`],p(d[`destination-provider`],`destination-provider`,`text`)),d[`destination-secret-access-key`]!==void 0&&l(g,[`destination`,`secretAccessKey`],p(d[`destination-secret-access-key`],`destination-secret-access-key`,`text`)),d[`source-access-key-id`]!==void 0&&l(g,[`source`,`accessKeyId`],p(d[`source-access-key-id`],`source-access-key-id`,`text`)),d[`source-bucket`]!==void 0&&l(g,[`source`,`bucket`],p(d[`source-bucket`],`source-bucket`,`text`)),d[`source-provider`]!==void 0&&l(g,[`source`,`provider`],p(d[`source-provider`],`source-provider`,`text`)),d[`source-region`]!==void 0&&l(g,[`source`,`region`],p(d[`source-region`],`source-region`,`text`)),d[`source-secret-access-key`]!==void 0&&l(g,[`source`,`secretAccessKey`],p(d[`source-secret-access-key`],`source-secret-access-key`,`text`)),d[`source-client-email`]!==void 0&&l(g,[`source`,`clientEmail`],p(d[`source-client-email`],`source-client-email`,`text`)),d[`source-private-key`]!==void 0&&l(g,[`source`,`privateKey`],p(d[`source-private-key`],`source-private-key`,`text`)),d[`source-bucket-url`]!==void 0&&l(g,[`source`,`bucketUrl`],p(d[`source-bucket-url`],`source-bucket-url`,`text`)),d[`source-account-key`]!==void 0&&l(g,[`source`,`accountKey`],p(d[`source-account-key`],`source-account-key`,`text`)),d[`source-account-name`]!==void 0&&l(g,[`source`,`accountName`],p(d[`source-account-name`],`source-account-name`,`text`)),d[`source-container`]!==void 0&&l(g,[`source`,`container`],p(d[`source-container`],`source-container`,`text`)),d[`source-sas-token`]!==void 0&&l(g,[`source`,`sasToken`],p(d[`source-sas-token`],`source-sas-token`,`text`)),a(await s(`Updating`,async()=>r(m,`PUT`,`/accounts/${h}/r2/buckets/${encodeURIComponent(String(d[`bucket-name`]))}/sippy`,{body:Object.keys(g).length>0?g:void 0,headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Updated`})})},Ue={command:`sippy`,describe:`Operations for buckets.sippy`,builder:e=>e.command(Re).command(Be).command(He).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function We(e){return e.usage(`$0 r2 buckets storage-class-migration-jobs create <bucket-name>
86
+ `}).option(`source-access-key-id`,{type:`string`,description:`Access Key ID of an IAM credential (ideally scoped to a single S3 bucket).`}).option(`source-bucket`,{type:`string`,description:`Name of the AWS S3 bucket.`}).option(`source-provider`,{type:`string`,description:`The source.provider field`,choices:[`aws`,`gcs`,`s3`,`azure`]}).option(`source-region`,{type:`string`,description:`AWS region containing the source S3 bucket.`}).option(`source-secret-access-key`,{type:`string`,description:`Secret Access Key of an IAM credential (ideally scoped to a single S3 bucket).`}).option(`source-client-email`,{type:`string`,description:`Client email of an IAM credential (ideally scoped to a single GCS bucket).`}).option(`source-private-key`,{type:`string`,description:`Private Key of an IAM credential (ideally scoped to a single GCS bucket).`}).option(`source-bucket-url`,{type:`string`,description:`URL to the S3-compatible API of the bucket.`}).option(`source-account-key`,{type:`string`,description:`Access key for the Azure Storage account. Mutually exclusive with sasToken.`}).option(`source-account-name`,{type:`string`,description:`Name of the Azure Storage account.`}).option(`source-container`,{type:`string`,description:`Name of the Azure Blob Storage container.`}).option(`source-sas-token`,{type:`string`,description:`Shared Access Signature token for the Azure Storage account. Mutually exclusive with accountKey.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).conflicts(`source-bucket`,[`source-bucket-url`,`source-account-key`,`source-account-name`,`source-container`,`source-sas-token`]).conflicts(`source-region`,[`source-client-email`,`source-private-key`,`source-bucket-url`,`source-account-key`,`source-account-name`,`source-container`,`source-sas-token`]).conflicts(`source-client-email`,[`source-region`,`source-bucket-url`,`source-account-key`,`source-account-name`,`source-container`,`source-sas-token`]).conflicts(`source-private-key`,[`source-region`,`source-bucket-url`,`source-account-key`,`source-account-name`,`source-container`,`source-sas-token`]).conflicts(`source-bucket-url`,[`source-bucket`,`source-region`,`source-client-email`,`source-private-key`,`source-account-key`,`source-account-name`,`source-container`,`source-sas-token`]).conflicts(`source-account-key`,[`source-bucket`,`source-region`,`source-client-email`,`source-private-key`,`source-bucket-url`]).conflicts(`source-account-name`,[`source-bucket`,`source-region`,`source-client-email`,`source-private-key`,`source-bucket-url`]).conflicts(`source-container`,[`source-bucket`,`source-region`,`source-client-email`,`source-private-key`,`source-bucket-url`]).conflicts(`source-sas-token`,[`source-bucket`,`source-region`,`source-client-email`,`source-private-key`,`source-bucket-url`])}const He={command:`update <bucket-name>`,describe:`Enable Sippy`,builder:Ve,handler:async d=>c({command:`r2 buckets sippy update`,classification:{safeFlags:[`destination-provider`,`source-provider`,`dry-run`]}},d,async()=>{let c={};if(d[`cf-r2-jurisdiction`]!==void 0&&(c[`cf-r2-jurisdiction`]=String(d[`cf-r2-jurisdiction`])),d.dryRun){o({command:`cf r2 buckets sippy update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/r2/buckets/${d[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(d[`bucket-name`]))}/sippy`,pathParams:{"bucket-name":String(d[`bucket-name`]??``)},bodyKind:`json`,body:d.body===void 0?f({destination:{accessKeyId:p(d[`destination-access-key-id`],`destination-access-key-id`,`text`),provider:p(d[`destination-provider`],`destination-provider`,`text`),secretAccessKey:p(d[`destination-secret-access-key`],`destination-secret-access-key`,`text`)},source:{accessKeyId:p(d[`source-access-key-id`],`source-access-key-id`,`text`),bucket:p(d[`source-bucket`],`source-bucket`,`text`),provider:p(d[`source-provider`],`source-provider`,`text`),region:p(d[`source-region`],`source-region`,`text`),secretAccessKey:p(d[`source-secret-access-key`],`source-secret-access-key`,`text`),clientEmail:p(d[`source-client-email`],`source-client-email`,`text`),privateKey:p(d[`source-private-key`],`source-private-key`,`text`),bucketUrl:p(d[`source-bucket-url`],`source-bucket-url`,`text`),accountKey:p(d[`source-account-key`],`source-account-key`,`text`),accountName:p(d[`source-account-name`],`source-account-name`,`text`),container:p(d[`source-container`],`source-container`,`text`),sasToken:p(d[`source-sas-token`],`source-sas-token`,`text`)}}):u(d.body)});return}let m=await i(d),h=d.local?e:await n();if(d.accountId=h,d.body){let e=u(d.body);a(await s(`Updating`,async()=>r(m,`PUT`,`/accounts/${h}/r2/buckets/${encodeURIComponent(String(d[`bucket-name`]))}/sippy`,{body:e,headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Updated`});return}let g={};d[`destination-access-key-id`]!==void 0&&l(g,[`destination`,`accessKeyId`],p(d[`destination-access-key-id`],`destination-access-key-id`,`text`)),d[`destination-provider`]!==void 0&&l(g,[`destination`,`provider`],p(d[`destination-provider`],`destination-provider`,`text`)),d[`destination-secret-access-key`]!==void 0&&l(g,[`destination`,`secretAccessKey`],p(d[`destination-secret-access-key`],`destination-secret-access-key`,`text`)),d[`source-access-key-id`]!==void 0&&l(g,[`source`,`accessKeyId`],p(d[`source-access-key-id`],`source-access-key-id`,`text`)),d[`source-bucket`]!==void 0&&l(g,[`source`,`bucket`],p(d[`source-bucket`],`source-bucket`,`text`)),d[`source-provider`]!==void 0&&l(g,[`source`,`provider`],p(d[`source-provider`],`source-provider`,`text`)),d[`source-region`]!==void 0&&l(g,[`source`,`region`],p(d[`source-region`],`source-region`,`text`)),d[`source-secret-access-key`]!==void 0&&l(g,[`source`,`secretAccessKey`],p(d[`source-secret-access-key`],`source-secret-access-key`,`text`)),d[`source-client-email`]!==void 0&&l(g,[`source`,`clientEmail`],p(d[`source-client-email`],`source-client-email`,`text`)),d[`source-private-key`]!==void 0&&l(g,[`source`,`privateKey`],p(d[`source-private-key`],`source-private-key`,`text`)),d[`source-bucket-url`]!==void 0&&l(g,[`source`,`bucketUrl`],p(d[`source-bucket-url`],`source-bucket-url`,`text`)),d[`source-account-key`]!==void 0&&l(g,[`source`,`accountKey`],p(d[`source-account-key`],`source-account-key`,`text`)),d[`source-account-name`]!==void 0&&l(g,[`source`,`accountName`],p(d[`source-account-name`],`source-account-name`,`text`)),d[`source-container`]!==void 0&&l(g,[`source`,`container`],p(d[`source-container`],`source-container`,`text`)),d[`source-sas-token`]!==void 0&&l(g,[`source`,`sasToken`],p(d[`source-sas-token`],`source-sas-token`,`text`)),a(await s(`Updating`,async()=>r(m,`PUT`,`/accounts/${h}/r2/buckets/${encodeURIComponent(String(d[`bucket-name`]))}/sippy`,{body:Object.keys(g).length>0?g:void 0,headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Updated`})})},Ue={command:`sippy`,describe:`Operations for buckets.sippy`,builder:e=>e.command(Re).command(Be).command(He).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},We={command:`buckets`,describe:`Create and configure R2 buckets including CORS, lifecycle, custom domains, event notifications, and object locks`,builder:e=>e.command(O).command(E).command(A).command(Y).command(le).command(xe).command(w).command(q).command(se).command(me).command(ye).command(Ee).command(Ne).command(Ie).command(Ue).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ge(e){return e.usage("$0 r2 objects bulk-delete\n\nDeletes objects from an R2 bucket. Three modes are supported: 1. **Delete by list** (default): Provide a JSON array of object keys in the request body. All listed objects are deleted; per-key errors are reported in the response. 2. **Delete by prefix**: Provide a non-empty `prefix` query parameter and no request body to delete every object whose key begins with that prefix. 3. **Empty bucket**: Provide the `prefix` query parameter with an empty value (`?prefix=`) and no request body to delete all objects in the bucket. Prefix and empty-bucket requests return a job descriptor. Small jobs can finish synchronously and return `COMPLETED`; larger jobs continue in the background. Poll the returned `id` with the Get Bucket Job endpoint. Objects uploaded after a background job starts are not deleted by that job. Abort active multipart uploads before submitting the request; a synchronously completed job does not abort them. Avoid writing objects or starting multipart uploads while a bucket-emptying job is in progress. Each repeated or concurrent request creates a distinct job. The number of active jobs is limited per bucket; wait for an existing job to finish before retrying a request rejected with HTTP 429. A bucket cannot be emptied while event notifications are configured. Remove the event notification rules and retry requests rejected with HTTP 409 / error code 10034. To protect a bucket with R2 Data Catalog enabled, send the `cf-r2-data-catalog-check` header; a conflict is returned with HTTP 409 / error code 10081. For most workloads, we recommend using R2's [S3-compatible API](https://developers.cloudflare.com/r2/api/s3/api/) or a [Worker with an R2 binding](https://developers.cloudflare.com/r2/api/workers/workers-api-reference/) instead.").option(`bucket-name`,{type:`string`,description:`Name of the bucket.`,demandOption:!0}).option(`prefix`,{type:`string`,description:"When present, switches the operation to prefix-delete mode. A non-empty value must\nend in `/` and deletes keys beginning with that prefix. Preserve an empty value\n(`?prefix=`) to empty the entire bucket. Omitting this parameter instead selects\ndelete-by-list mode and requires a JSON request body."}).option(`cf-r2-jurisdiction`,{type:`string`,description:`Jurisdiction where objects in this bucket are guaranteed to be stored.`}).option(`cf-r2-data-catalog-check`,{type:`string`,description:`Set this header to reject the operation when R2 Data Catalog is enabled for the bucket.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:'Required for "delete by list" mode (when `prefix` query parameter is omitted). A JSON array of object keys to delete. Ignored when `prefix` is provided. '})}const Ke={command:`bulk-delete`,describe:`Delete Objects or Empty a Bucket`,builder:Ge,handler:async l=>c({command:`r2 objects bulk-delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},l,async()=>{let c={prefix:l.prefix},d={};if(l[`cf-r2-jurisdiction`]!==void 0&&(d[`cf-r2-jurisdiction`]=String(l[`cf-r2-jurisdiction`])),l[`cf-r2-data-catalog-check`]!==void 0&&(d[`cf-r2-data-catalog-check`]=String(l[`cf-r2-data-catalog-check`])),l.dryRun){o({command:`cf r2 objects bulk-delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/r2/buckets/${l[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(l[`bucket-name`]))}/objects`,pathParams:{"bucket-name":String(l[`bucket-name`]??``)},query:c,bodyKind:`json`,body:l.body===void 0?void 0:u(l.body)});return}let f=await i(l),p=l.local?e:await n();if(l.accountId=p,!await _({force:!!l.force,message:`This permanently deletes the selected R2 objects. An explicitly empty prefix deletes every object in the bucket while retaining the bucket itself.`})){process.stderr.write(`Aborted.
87
+ `);return}if(l.body){let e=u(l.body),t=new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();a(await s(`Deleting`,async()=>r(f,`DELETE`,`/accounts/${p}/r2/buckets/${encodeURIComponent(String(l[`bucket-name`]))}/objects${t?`?`+t:``}`,{body:e,headers:Object.keys(d).length>0?d:void 0})),{successLabel:`Deleted`});return}if(l.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function qe(e){return e.usage(`$0 r2 objects delete <object-key>
87
88
 
88
- Creates a background job to migrate existing objects in an R2 bucket between storage classes. Provide both source and destination classes, or omit both to migrate from InfrequentAccess to Standard. Use the returned job ID with Get Storage Class Migration Job to inspect progress.`).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-storage-class`,{type:`string`,description:`Storage class to migrate objects to. Provide together with sourceStorageClass; the two classes must differ.`,choices:[`Standard`,`InfrequentAccess`]}).option(`job-type`,{type:`string`,description:`The jobType field`,choices:[`storageClassMigration`]}).option(`source-storage-class`,{type:`string`,description:`Storage class to migrate objects from. Provide together with destinationStorageClass; the two classes must differ.`,choices:[`Standard`,`InfrequentAccess`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Creates a storage-class migration background job. Direction fields must be provided together and must differ. Omitting both defaults to InfrequentAccess to Standard. `})}const Ge={command:`create <bucket-name>`,describe:`Create a Storage Class Migration Job`,builder:We,handler:async d=>c({command:`r2 buckets storage-class-migration-jobs create`,classification:{safeFlags:[`destination-storage-class`,`job-type`,`source-storage-class`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},d,async()=>{let c={};if(d[`cf-r2-jurisdiction`]!==void 0&&(c[`cf-r2-jurisdiction`]=String(d[`cf-r2-jurisdiction`])),d.dryRun){o({command:`cf r2 buckets storage-class-migration-jobs create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/r2/buckets/${d[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(d[`bucket-name`]))}/storage-class-migration-jobs`,pathParams:{"bucket-name":String(d[`bucket-name`]??``)},bodyKind:`json`,body:d.body===void 0?f({destinationStorageClass:p(d[`destination-storage-class`],`destination-storage-class`,`text`),jobType:p(d[`job-type`],`job-type`,`text`),sourceStorageClass:p(d[`source-storage-class`],`source-storage-class`,`text`)}):u(d.body)});return}let m=await i(d),h=d.local?e:await n();if(d.accountId=h,!await _({force:!!d.force,message:`This starts a bucket-wide storage-class migration of existing R2 objects in the selected source storage class.`})){process.stderr.write(`Aborted.
89
- `);return}if(d.body){let e=u(d.body);a(await s(`Deleting`,async()=>r(m,`POST`,`/accounts/${h}/r2/buckets/${encodeURIComponent(String(d[`bucket-name`]))}/storage-class-migration-jobs`,{body:e,headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Deleted`});return}d[`job-type`]===void 0&&(d[`job-type`]=await g(`job-type`,`The jobType field`,[`storageClassMigration`]));let v={};d[`destination-storage-class`]!==void 0&&l(v,[`destinationStorageClass`],p(d[`destination-storage-class`],`destination-storage-class`,`text`)),d[`job-type`]!==void 0&&l(v,[`jobType`],p(d[`job-type`],`job-type`,`text`)),d[`source-storage-class`]!==void 0&&l(v,[`sourceStorageClass`],p(d[`source-storage-class`],`source-storage-class`,`text`)),a(await s(`Deleting`,async()=>r(m,`POST`,`/accounts/${h}/r2/buckets/${encodeURIComponent(String(d[`bucket-name`]))}/storage-class-migration-jobs`,{body:Object.keys(v).length>0?v:void 0,headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Deleted`})})};function Ke(e){return e.usage(`$0 r2 buckets storage-class-migration-jobs get <job-id>
89
+ Deletes an object from an R2 bucket. For most workloads, we recommend using R2's [S3-compatible API](https://developers.cloudflare.com/r2/api/s3/api/) or a [Worker with an R2 binding](https://developers.cloudflare.com/r2/api/workers/workers-api-reference/) instead.`).positional(`object-key`,{type:`string`,description:"The key (name) of the object to delete. May contain slashes for path-like keys. Slashes (`/`) within the key MUST be sent literally and MUST NOT be percent-encoded (i.e. `%2F`); other reserved characters should be percent-encoded as usual.",demandOption:!0}).option(`bucket-name`,{type:`string`,description:`Name of the bucket.`,demandOption:!0}).option(`cf-r2-jurisdiction`,{type:`string`,description:`Jurisdiction where objects in this bucket are guaranteed to be stored.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Je={command:`delete <object-key>`,describe:`Delete Object`,builder:qe,handler:async l=>c({command:`r2 objects delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},l,async()=>{let c={};if(l[`cf-r2-jurisdiction`]!==void 0&&(c[`cf-r2-jurisdiction`]=String(l[`cf-r2-jurisdiction`])),l.dryRun){o({command:`cf r2 objects delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/r2/buckets/${l[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(l[`bucket-name`]))}/objects/${l[`object-key`]==null?`<object-key>`:encodeURIComponent(String(l[`object-key`]))}`,pathParams:{"bucket-name":String(l[`bucket-name`]??``),"object-key":String(l[`object-key`]??``)},bodyKind:`none`});return}let u=await i(l),d=l.local?e:await n();if(l.accountId=d,!await _({force:!!l.force,message:`This permanently deletes the specified object from the R2 bucket.`})){process.stderr.write(`Aborted.
90
+ `);return}a(await s(`Deleting`,async()=>r(u,`DELETE`,`/accounts/${d}/r2/buckets/${encodeURIComponent(String(l[`bucket-name`]))}/objects/${encodeURIComponent(String(l[`object-key`]))}`,{headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Deleted`})})};function Ye(e){return e.usage(`$0 r2 objects get <object-key>
90
91
 
91
- Gets the current status of a storage-class migration job.`).positional(`job-id`,{type:`string`,description:`Identifier returned when the migration 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 qe={command:`get <job-id>`,describe:`Get Storage Class Migration Job`,builder:Ke,handler:async l=>c({command:`r2 buckets storage-class-migration-jobs get`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={};if(l[`cf-r2-jurisdiction`]!==void 0&&(c[`cf-r2-jurisdiction`]=String(l[`cf-r2-jurisdiction`])),l.dryRun){o({command:`cf r2 buckets storage-class-migration-jobs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/r2/buckets/${l[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(l[`bucket-name`]))}/storage-class-migration-jobs/${l[`job-id`]==null?`<job-id>`:encodeURIComponent(String(l[`job-id`]))}`,pathParams:{"bucket-name":String(l[`bucket-name`]??``),"job-id":String(l[`job-id`]??``)},bodyKind:`none`});return}let u=await i(l),d=l.local?e:await n();l.accountId=d,a(await s(`Loading`,async()=>r(u,`GET`,`/accounts/${d}/r2/buckets/${encodeURIComponent(String(l[`bucket-name`]))}/storage-class-migration-jobs/${encodeURIComponent(String(l[`job-id`]))}`,{headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Loaded`})})};function Je(e){return e.usage(`$0 r2 buckets storage-class-migration-jobs list
92
+ Retrieves an object from an R2 bucket. Returns the object body along with metadata headers. For most workloads, we recommend using R2's [S3-compatible API](https://developers.cloudflare.com/r2/api/s3/api/) or a [Worker with an R2 binding](https://developers.cloudflare.com/r2/api/workers/workers-api-reference/) instead.`).positional(`object-key`,{type:`string`,description:"The key (name) of the object to retrieve. May contain slashes for path-like keys. Slashes (`/`) within the key MUST be sent literally and MUST NOT be percent-encoded (i.e. `%2F`); other reserved characters should be percent-encoded as usual.",demandOption:!0}).option(`bucket-name`,{type:`string`,description:`Name of the bucket.`,demandOption:!0}).option(`cf-r2-jurisdiction`,{type:`string`,description:`Jurisdiction where objects in this bucket are guaranteed to be stored.`}).option(`if-none-match`,{type:`string`,description:`Returns the object only if its ETag does not match the given value.`}).option(`if-modified-since`,{type:`string`,description:"Returns the object only if it has been modified since the specified time.\nMust be formatted as an HTTP-date (RFC 7231), e.g. `Tue, 15 Jan 2024 10:30:00 GMT`."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`text`,{type:`boolean`,description:`Decode the response body as UTF-8 text instead of writing raw bytes`,default:!1})}const Xe={command:`get <object-key>`,describe:`Get Object`,builder:Ye,handler:async r=>c({command:`r2 objects get`,classification:{safeFlags:[`dry-run`,`text`]}},r,async()=>{let a={};if(r[`cf-r2-jurisdiction`]!==void 0&&(a[`cf-r2-jurisdiction`]=String(r[`cf-r2-jurisdiction`])),r[`if-none-match`]!==void 0&&(a[`If-None-Match`]=String(r[`if-none-match`])),r[`if-modified-since`]!==void 0&&(a[`If-Modified-Since`]=String(r[`if-modified-since`])),r.dryRun){o({command:`cf r2 objects get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/r2/buckets/${r[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(r[`bucket-name`]))}/objects/${r[`object-key`]==null?`<object-key>`:encodeURIComponent(String(r[`object-key`]))}`,pathParams:{"bucket-name":String(r[`bucket-name`]??``),"object-key":String(r[`object-key`]??``)},bodyKind:`none`});return}await i(r);let c=r.local?e:await n();r.accountId=c;let l=await s(`Loading`,async()=>te(`/accounts/${c}/r2/buckets/${encodeURIComponent(String(r[`bucket-name`]))}/objects/${encodeURIComponent(String(r[`object-key`]))}`,{method:`GET`,local:r.local===!0,persistTo:r.persistTo}));ee(r.text===!0?l.toString(`utf-8`):l)})};function Ze(e){return e.usage(`$0 r2 objects list
92
93
 
93
- Lists storage-class migration jobs for an R2 bucket.`).option(`bucket-name`,{type:`string`,description:`Name of the bucket.`,demandOption:!0}).option(`status`,{type:`string`,description:`Restricts results to jobs with the specified status.`,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 Ye={command:`list`,describe:`List Storage Class Migration Jobs`,builder:Je,handler:async l=>c({command:`r2 buckets storage-class-migration-jobs list`,classification:{safeFlags:[`status`,`dry-run`]}},l,async()=>{let c={status:l.status,maxKeys:l[`max-keys`],continuationToken:l[`continuation-token`]},u={};if(l[`cf-r2-jurisdiction`]!==void 0&&(u[`cf-r2-jurisdiction`]=String(l[`cf-r2-jurisdiction`])),l.dryRun){o({command:`cf r2 buckets storage-class-migration-jobs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/r2/buckets/${l[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(l[`bucket-name`]))}/storage-class-migration-jobs`,pathParams:{"bucket-name":String(l[`bucket-name`]??``)},query:c,bodyKind:`none`});return}let d=await i(l),f=l.local?e:await n();l.accountId=f,a(await s(`Loading`,async()=>r(d,`GET`,`/accounts/${f}/r2/buckets/${encodeURIComponent(String(l[`bucket-name`]))}/storage-class-migration-jobs`,{query:c,headers:Object.keys(u).length>0?u:void 0})),{successLabel:`Loaded`})})},Xe={command:`storage-class-migration-jobs`,describe:`Operations for buckets.storage-class-migration-jobs`,builder:e=>e.command(Ge).command(qe).command(Ye).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ze={command:`buckets`,describe:`Create and configure R2 buckets including CORS, lifecycle, custom domains, event notifications, and object locks`,builder:e=>e.command(O).command(E).command(A).command(Y).command(le).command(xe).command(w).command(q).command(se).command(me).command(ye).command(Ee).command(Ne).command(Ie).command(Ue).command(Xe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Qe(e){return e.usage("$0 r2 objects bulk-delete\n\nDeletes objects from an R2 bucket. Three modes are supported: 1. **Delete by list** (default): Provide a JSON array of object keys in the request body. All listed objects are deleted; per-key errors are reported in the response. 2. **Delete by prefix**: Provide a non-empty `prefix` query parameter and no request body to delete every object whose key begins with that prefix. 3. **Empty bucket**: Provide the `prefix` query parameter with an empty value (`?prefix=`) and no request body to delete all objects in the bucket. Prefix and empty-bucket requests return a job descriptor. Small jobs can finish synchronously and return `COMPLETED`; larger jobs continue in the background. Poll the returned `id` with the Get Bucket Job endpoint. Objects uploaded after a background job starts are not deleted by that job. Abort active multipart uploads before submitting the request; a synchronously completed job does not abort them. Avoid writing objects or starting multipart uploads while a bucket-emptying job is in progress. Each repeated or concurrent request creates a distinct job. The number of active jobs is limited per bucket; wait for an existing job to finish before retrying a request rejected with HTTP 429. A bucket cannot be emptied while event notifications are configured. Remove the event notification rules and retry requests rejected with HTTP 409 / error code 10034. To protect a bucket with R2 Data Catalog enabled, send the `cf-r2-data-catalog-check` header; a conflict is returned with HTTP 409 / error code 10081. For most workloads, we recommend using R2's [S3-compatible API](https://developers.cloudflare.com/r2/api/s3/api/) or a [Worker with an R2 binding](https://developers.cloudflare.com/r2/api/workers/workers-api-reference/) instead.").option(`bucket-name`,{type:`string`,description:`Name of the bucket.`,demandOption:!0}).option(`prefix`,{type:`string`,description:"When present, switches the operation to prefix-delete mode. A non-empty value must\nend in `/` and deletes keys beginning with that prefix. Preserve an empty value\n(`?prefix=`) to empty the entire bucket. Omitting this parameter instead selects\ndelete-by-list mode and requires a JSON request body."}).option(`cf-r2-jurisdiction`,{type:`string`,description:`Jurisdiction where objects in this bucket are guaranteed to be stored.`}).option(`cf-r2-data-catalog-check`,{type:`string`,description:`Set this header to reject the operation when R2 Data Catalog is enabled for the bucket.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:'Required for "delete by list" mode (when `prefix` query parameter is omitted). A JSON array of object keys to delete. Ignored when `prefix` is provided. '})}const $e={command:`bulk-delete`,describe:`Delete Objects or Empty a Bucket`,builder:Qe,handler:async l=>c({command:`r2 objects bulk-delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},l,async()=>{let c={prefix:l.prefix},d={};if(l[`cf-r2-jurisdiction`]!==void 0&&(d[`cf-r2-jurisdiction`]=String(l[`cf-r2-jurisdiction`])),l[`cf-r2-data-catalog-check`]!==void 0&&(d[`cf-r2-data-catalog-check`]=String(l[`cf-r2-data-catalog-check`])),l.dryRun){o({command:`cf r2 objects bulk-delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/r2/buckets/${l[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(l[`bucket-name`]))}/objects`,pathParams:{"bucket-name":String(l[`bucket-name`]??``)},query:c,bodyKind:`json`,body:l.body===void 0?void 0:u(l.body)});return}let f=await i(l),p=l.local?e:await n();if(l.accountId=p,!await _({force:!!l.force,message:`This permanently deletes the selected R2 objects. An explicitly empty prefix deletes every object in the bucket while retaining the bucket itself.`})){process.stderr.write(`Aborted.
94
- `);return}if(l.body){let e=u(l.body),t=new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();a(await s(`Deleting`,async()=>r(f,`DELETE`,`/accounts/${p}/r2/buckets/${encodeURIComponent(String(l[`bucket-name`]))}/objects${t?`?`+t:``}`,{body:e,headers:Object.keys(d).length>0?d:void 0})),{successLabel:`Deleted`});return}if(l.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function et(e){return e.usage(`$0 r2 objects delete <object-key>
94
+ Lists objects in an R2 bucket. Returns object metadata including key, size, etag, last modified date, HTTP metadata, and custom metadata. For most workloads, we recommend using R2's [S3-compatible API](https://developers.cloudflare.com/r2/api/s3/api/) or a [Worker with an R2 binding](https://developers.cloudflare.com/r2/api/workers/workers-api-reference/) instead.`).option(`bucket-name`,{type:`string`,description:`Name of the bucket.`,demandOption:!0}).option(`per-page`,{type:`number`,description:`Maximum number of objects to return per page.`}).option(`prefix`,{type:`string`,description:`Restricts results to only those objects whose keys begin with the specified prefix.`}).option(`delimiter`,{type:`string`,description:`A single character used to group keys. All keys that contain the delimiter between the prefix and the first occurrence of the delimiter after the prefix are grouped under a single result element.`}).option(`cursor`,{type:`string`,description:`Pagination cursor received from a previous List Objects call. Used to retrieve the next page of results.`}).option(`start-after`,{type:`string`,description:`Returns objects with keys that come after the specified key in lexicographic order.`}).option(`cf-r2-jurisdiction`,{type:`string`,description:`Jurisdiction where objects in this bucket are guaranteed to be stored.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Qe={command:`list`,describe:`List Objects`,builder:Ze,handler:async l=>c({command:`r2 objects list`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={per_page:l[`per-page`],prefix:l.prefix,delimiter:l.delimiter,cursor:l.cursor,start_after:l[`start-after`]},u={};if(l[`cf-r2-jurisdiction`]!==void 0&&(u[`cf-r2-jurisdiction`]=String(l[`cf-r2-jurisdiction`])),l.dryRun){o({command:`cf r2 objects list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/r2/buckets/${l[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(l[`bucket-name`]))}/objects`,pathParams:{"bucket-name":String(l[`bucket-name`]??``)},query:c,bodyKind:`none`});return}let d=await i(l),f=l.local?e:await n();l.accountId=f,a(await s(`Loading`,async()=>r(d,`GET`,`/accounts/${f}/r2/buckets/${encodeURIComponent(String(l[`bucket-name`]))}/objects`,{query:c,headers:Object.keys(u).length>0?u:void 0})),{successLabel:`Loaded`})})};function $e(e){return e.usage(`$0 r2 objects put <object-key>
95
95
 
96
- 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 tt={command:`delete <object-key>`,describe:`Delete Object`,builder:et,handler:async l=>c({command:`r2 objects delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},l,async()=>{let c={};if(l[`cf-r2-jurisdiction`]!==void 0&&(c[`cf-r2-jurisdiction`]=String(l[`cf-r2-jurisdiction`])),l.dryRun){o({command:`cf r2 objects delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/r2/buckets/${l[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(l[`bucket-name`]))}/objects/${l[`object-key`]==null?`<object-key>`:encodeURIComponent(String(l[`object-key`]))}`,pathParams:{"bucket-name":String(l[`bucket-name`]??``),"object-key":String(l[`object-key`]??``)},bodyKind:`none`});return}let u=await i(l),d=l.local?e:await n();if(l.accountId=d,!await _({force:!!l.force,message:`This permanently deletes the specified object from the R2 bucket.`})){process.stderr.write(`Aborted.
97
- `);return}a(await s(`Deleting`,async()=>r(u,`DELETE`,`/accounts/${d}/r2/buckets/${encodeURIComponent(String(l[`bucket-name`]))}/objects/${encodeURIComponent(String(l[`object-key`]))}`,{headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Deleted`})})};function nt(e){return e.usage(`$0 r2 objects get <object-key>
96
+ Uploads an object to an R2 bucket. The object body is provided as the request body. Returns metadata about the uploaded object. The maximum upload size for this endpoint is 300 MB. For most workloads, we recommend using R2's [S3-compatible API](https://developers.cloudflare.com/r2/api/s3/api/) or a [Worker with an R2 binding](https://developers.cloudflare.com/r2/api/workers/workers-api-reference/) instead.`).positional(`object-key`,{type:`string`,description:"The key (name) to assign to the object. May contain slashes for path-like keys. Slashes (`/`) within the key MUST be sent literally and MUST NOT be percent-encoded (i.e. `%2F`); other reserved characters should be percent-encoded as usual.",demandOption:!0}).option(`bucket-name`,{type:`string`,description:`Name of the bucket.`,demandOption:!0}).option(`cf-r2-jurisdiction`,{type:`string`,description:`Jurisdiction where objects in this bucket are guaranteed to be stored.`}).option(`content-type`,{type:`string`,description:`The MIME type of the object being uploaded.`}).option(`content-length`,{type:`string`,description:`The size of the object body in bytes.`}).option(`cf-r2-storage-class`,{type:`string`,description:`Storage class for this object. Overrides the bucket default.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The object body to upload.`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`})}const et={command:`put <object-key>`,describe:`Upload Object`,builder:$e,handler:async l=>c({command:`r2 objects put`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={};if(l[`cf-r2-jurisdiction`]!==void 0&&(c[`cf-r2-jurisdiction`]=String(l[`cf-r2-jurisdiction`])),l[`content-type`]!==void 0&&(c[`Content-Type`]=String(l[`content-type`])),l[`content-length`]!==void 0&&(c[`Content-Length`]=String(l[`content-length`])),l[`cf-r2-storage-class`]!==void 0&&(c[`cf-r2-storage-class`]=String(l[`cf-r2-storage-class`])),l.dryRun){o({command:`cf r2 objects put`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/r2/buckets/${l[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(l[`bucket-name`]))}/objects/${l[`object-key`]==null?`<object-key>`:encodeURIComponent(String(l[`object-key`]))}`,pathParams:{"bucket-name":String(l[`bucket-name`]??``),"object-key":String(l[`object-key`]??``)},bodyKind:`octet-stream`,body:l.body});return}let u=await i(l),d=l.local?e:await n();if(l.accountId=d,l.file){let e=m(l.file);a(await s(`Updating`,async()=>r(u,`PUT`,`/accounts/${d}/r2/buckets/${encodeURIComponent(String(l[`bucket-name`]))}/objects/${encodeURIComponent(String(l[`object-key`]))}`,{body:e,headers:{"Content-Type":`application/octet-stream`,...Object.keys(c).length>0?c:void 0}})),{successLabel:`Updated`});return}if(l.body){let e=p(l.body,`body`,`binary`);a(await s(`Updating`,async()=>r(u,`PUT`,`/accounts/${d}/r2/buckets/${encodeURIComponent(String(l[`bucket-name`]))}/objects/${encodeURIComponent(String(l[`object-key`]))}`,{body:e,headers:{"Content-Type":`application/octet-stream`,...c}})),{successLabel:`Updated`});return}if(l.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},tt={command:`objects`,describe:`Operations for objects`,builder:e=>e.command(Ke).command(Je).command(Xe).command(Qe).command(et).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function nt(e){return e.usage(`$0 r2 super-slurper connectivity-precheck source
98
97
 
99
- 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 rt={command:`get <object-key>`,describe:`Get Object`,builder:nt,handler:async r=>c({command:`r2 objects get`,classification:{safeFlags:[`dry-run`,`text`]}},r,async()=>{let a={};if(r[`cf-r2-jurisdiction`]!==void 0&&(a[`cf-r2-jurisdiction`]=String(r[`cf-r2-jurisdiction`])),r[`if-none-match`]!==void 0&&(a[`If-None-Match`]=String(r[`if-none-match`])),r[`if-modified-since`]!==void 0&&(a[`If-Modified-Since`]=String(r[`if-modified-since`])),r.dryRun){o({command:`cf r2 objects get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/r2/buckets/${r[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(r[`bucket-name`]))}/objects/${r[`object-key`]==null?`<object-key>`:encodeURIComponent(String(r[`object-key`]))}`,pathParams:{"bucket-name":String(r[`bucket-name`]??``),"object-key":String(r[`object-key`]??``)},bodyKind:`none`});return}await i(r);let c=r.local?e:await n();r.accountId=c;let l=await s(`Loading`,async()=>ee(`/accounts/${c}/r2/buckets/${encodeURIComponent(String(r[`bucket-name`]))}/objects/${encodeURIComponent(String(r[`object-key`]))}`,{method:`GET`,local:r.local===!0,persistTo:r.persistTo}));v(r.text===!0?l.toString(`utf-8`):l)})};function it(e){return e.usage(`$0 r2 objects list
98
+ Check whether tokens are valid against the source bucket`).option(`bucket`,{type:`string`,description:`The bucket field`}).option(`endpoint`,{type:`string`,description:`Custom S3-compatible endpoint that must use https://.`}).option(`keys`,{type:`string`,array:!0,description:`The keys field`}).option(`path-prefix`,{type:`string`,description:`The pathPrefix field`}).option(`region`,{type:`string`,description:`The region field`}).option(`secret-access-key-id`,{type:`string`,description:`The secret.accessKeyId field`}).option(`secret-secret-access-key`,{type:`string`,description:`The secret.secretAccessKey field`}).option(`secret-client-email`,{type:`string`,description:`The secret.clientEmail field`}).option(`secret-private-key`,{type:`string`,description:`The secret.privateKey field`}).option(`vendor`,{type:`string`,description:`The vendor field`,choices:[`s3`,`gcs`,`r2`]}).option(`jurisdiction`,{type:`string`,description:`The jurisdiction field`,choices:[`default`,`eu`,`us`,`fedramp`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).conflicts(`endpoint`,[`secret-client-email`,`secret-private-key`,`jurisdiction`]).conflicts(`region`,[`secret-client-email`,`secret-private-key`,`jurisdiction`]).conflicts(`secret-access-key-id`,[`secret-client-email`,`secret-private-key`]).conflicts(`secret-secret-access-key`,[`secret-client-email`,`secret-private-key`]).conflicts(`secret-client-email`,[`endpoint`,`region`,`secret-access-key-id`,`secret-secret-access-key`,`jurisdiction`]).conflicts(`secret-private-key`,[`endpoint`,`region`,`secret-access-key-id`,`secret-secret-access-key`,`jurisdiction`]).conflicts(`jurisdiction`,[`endpoint`,`region`,`secret-client-email`,`secret-private-key`])}const rt={command:`source`,describe:`Check source connectivity`,builder:nt,handler:async r=>c({command:`r2 super-slurper connectivity-precheck source`,classification:{safeFlags:[`vendor`,`jurisdiction`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf r2 super-slurper connectivity-precheck source`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/slurper/source/connectivity-precheck`,pathParams:{},bodyKind:`json`,body:r.body===void 0?f({bucket:p(r.bucket,`bucket`,`text`),endpoint:p(r.endpoint,`endpoint`,`text`),keys:r.keys,pathPrefix:p(r[`path-prefix`],`path-prefix`,`text`),region:p(r.region,`region`,`text`),secret:{accessKeyId:p(r[`secret-access-key-id`],`secret-access-key-id`,`text`),secretAccessKey:p(r[`secret-secret-access-key`],`secret-secret-access-key`,`text`),clientEmail:p(r[`secret-client-email`],`secret-client-email`,`text`),privateKey:p(r[`secret-private-key`],`secret-private-key`,`text`)},vendor:p(r.vendor,`vendor`,`text`),jurisdiction:p(r.jurisdiction,`jurisdiction`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Updating`,async()=>c.r2.superSlurper.connectivityPrecheck.source({body:e,account_id:l})),{successLabel:`Updated`});return}r.bucket===void 0&&(r.bucket=await h(`bucket`,`The bucket field`)),r.vendor===void 0&&(r.vendor=await g(`vendor`,`The vendor field`,[`s3`,`gcs`,`r2`]));let d=f({bucket:p(r.bucket,`bucket`,`text`),endpoint:p(r.endpoint,`endpoint`,`text`),keys:r.keys,pathPrefix:p(r[`path-prefix`],`path-prefix`,`text`),region:p(r.region,`region`,`text`),secret:{accessKeyId:p(r[`secret-access-key-id`],`secret-access-key-id`,`text`),secretAccessKey:p(r[`secret-secret-access-key`],`secret-secret-access-key`,`text`),clientEmail:p(r[`secret-client-email`],`secret-client-email`,`text`),privateKey:p(r[`secret-private-key`],`secret-private-key`,`text`)},vendor:p(r.vendor,`vendor`,`text`),jurisdiction:p(r.jurisdiction,`jurisdiction`,`text`)});a(await s(`Updating`,async()=>c.r2.superSlurper.connectivityPrecheck.source({body:d,account_id:l})),{successLabel:`Updated`})})};function it(e){return e.usage(`$0 r2 super-slurper connectivity-precheck target
100
99
 
101
- 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 at={command:`list`,describe:`List Objects`,builder:it,handler:async l=>c({command:`r2 objects list`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={per_page:l[`per-page`],prefix:l.prefix,delimiter:l.delimiter,cursor:l.cursor,start_after:l[`start-after`]},u={};if(l[`cf-r2-jurisdiction`]!==void 0&&(u[`cf-r2-jurisdiction`]=String(l[`cf-r2-jurisdiction`])),l.dryRun){o({command:`cf r2 objects list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/r2/buckets/${l[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(l[`bucket-name`]))}/objects`,pathParams:{"bucket-name":String(l[`bucket-name`]??``)},query:c,bodyKind:`none`});return}let d=await i(l),f=l.local?e:await n();l.accountId=f,a(await s(`Loading`,async()=>r(d,`GET`,`/accounts/${f}/r2/buckets/${encodeURIComponent(String(l[`bucket-name`]))}/objects`,{query:c,headers:Object.keys(u).length>0?u:void 0})),{successLabel:`Loaded`})})};function ot(e){return e.usage(`$0 r2 objects put <object-key>
100
+ Check whether tokens are valid against the target bucket`).option(`bucket`,{type:`string`,description:`The bucket field`}).option(`jurisdiction`,{type:`string`,description:`The jurisdiction field`,choices:[`default`,`eu`,`us`,`fedramp`]}).option(`secret-access-key-id`,{type:`string`,description:`The secret.accessKeyId field`}).option(`secret-secret-access-key`,{type:`string`,description:`The secret.secretAccessKey field`}).option(`vendor`,{type:`string`,description:`The vendor field`,choices:[`r2`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const at={command:`target`,describe:`Check target connectivity`,builder:it,handler:async r=>c({command:`r2 super-slurper connectivity-precheck target`,classification:{safeFlags:[`jurisdiction`,`vendor`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf r2 super-slurper connectivity-precheck target`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/slurper/target/connectivity-precheck`,pathParams:{},bodyKind:`json`,body:r.body===void 0?f({bucket:p(r.bucket,`bucket`,`text`),jurisdiction:p(r.jurisdiction,`jurisdiction`,`text`),secret:{accessKeyId:p(r[`secret-access-key-id`],`secret-access-key-id`,`text`),secretAccessKey:p(r[`secret-secret-access-key`],`secret-secret-access-key`,`text`)},vendor:p(r.vendor,`vendor`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Updating`,async()=>c.r2.superSlurper.connectivityPrecheck.target({body:e,account_id:l})),{successLabel:`Updated`});return}r.bucket===void 0&&(r.bucket=await h(`bucket`,`The bucket field`)),r[`secret-access-key-id`]===void 0&&(r[`secret-access-key-id`]=await h(`secret-access-key-id`,`The secret.accessKeyId field`)),r[`secret-secret-access-key`]===void 0&&(r[`secret-secret-access-key`]=await h(`secret-secret-access-key`,`The secret.secretAccessKey field`,{kind:`secret`})),r.vendor===void 0&&(r.vendor=await g(`vendor`,`The vendor field`,[`r2`]));let d=f({bucket:p(r.bucket,`bucket`,`text`),jurisdiction:p(r.jurisdiction,`jurisdiction`,`text`),secret:{accessKeyId:p(r[`secret-access-key-id`],`secret-access-key-id`,`text`),secretAccessKey:p(r[`secret-secret-access-key`],`secret-secret-access-key`,`text`)},vendor:p(r.vendor,`vendor`,`text`)});a(await s(`Updating`,async()=>c.r2.superSlurper.connectivityPrecheck.target({body:d,account_id:l})),{successLabel:`Updated`})})},ot={command:`connectivity-precheck`,describe:`Operations for super-slurper.connectivity-precheck`,builder:e=>e.command(rt).command(at).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function st(e){return e.usage(`$0 r2 super-slurper jobs abort-all
102
101
 
103
- 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 st={command:`put <object-key>`,describe:`Upload Object`,builder:ot,handler:async l=>c({command:`r2 objects put`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={};if(l[`cf-r2-jurisdiction`]!==void 0&&(c[`cf-r2-jurisdiction`]=String(l[`cf-r2-jurisdiction`])),l[`content-type`]!==void 0&&(c[`Content-Type`]=String(l[`content-type`])),l[`content-length`]!==void 0&&(c[`Content-Length`]=String(l[`content-length`])),l[`cf-r2-storage-class`]!==void 0&&(c[`cf-r2-storage-class`]=String(l[`cf-r2-storage-class`])),l.dryRun){o({command:`cf r2 objects put`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/r2/buckets/${l[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(l[`bucket-name`]))}/objects/${l[`object-key`]==null?`<object-key>`:encodeURIComponent(String(l[`object-key`]))}`,pathParams:{"bucket-name":String(l[`bucket-name`]??``),"object-key":String(l[`object-key`]??``)},bodyKind:`octet-stream`,body:l.body});return}let u=await i(l),d=l.local?e:await n();if(l.accountId=d,l.file){let e=m(l.file);a(await s(`Updating`,async()=>r(u,`PUT`,`/accounts/${d}/r2/buckets/${encodeURIComponent(String(l[`bucket-name`]))}/objects/${encodeURIComponent(String(l[`object-key`]))}`,{body:e,headers:{"Content-Type":`application/octet-stream`,...Object.keys(c).length>0?c:void 0}})),{successLabel:`Updated`});return}if(l.body){let e=p(l.body,`body`,`binary`);a(await s(`Updating`,async()=>r(u,`PUT`,`/accounts/${d}/r2/buckets/${encodeURIComponent(String(l[`bucket-name`]))}/objects/${encodeURIComponent(String(l[`object-key`]))}`,{body:e,headers:{"Content-Type":`application/octet-stream`,...c}})),{successLabel:`Updated`});return}if(l.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},ct={command:`objects`,describe:`Operations for objects`,builder:e=>e.command($e).command(tt).command(rt).command(at).command(st).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function lt(e){return e.usage(`$0 r2 super-slurper connectivity-precheck source
102
+ Cancels all running R2 Super Slurper migration jobs for the account. Any objects in the middle of a transfer will finish, but no new objects will start transferring.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ct={command:`abort-all`,describe:`Abort all jobs`,builder:st,handler:async r=>c({command:`r2 super-slurper jobs abort-all`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf r2 super-slurper jobs abort-all`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/slurper/jobs/abortAll`,pathParams:{},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,!await _({force:!!r.force,message:`This operation stops every running migration job.`})){process.stderr.write(`Aborted.
103
+ `);return}a(await s(`Deleting`,async()=>c.r2.superSlurper.jobs.abortAll({account_id:l})),{successLabel:`Deleted`})})};function lt(e){return e.usage(`$0 r2 super-slurper jobs abort <job-id>
104
104
 
105
- Check whether tokens are valid against the source bucket`).option(`bucket`,{type:`string`,description:`The bucket field`}).option(`endpoint`,{type:`string`,description:`Custom S3-compatible endpoint that must use https://.`}).option(`keys`,{type:`string`,array:!0,description:`The keys field`}).option(`path-prefix`,{type:`string`,description:`The pathPrefix field`}).option(`region`,{type:`string`,description:`The region field`}).option(`secret-access-key-id`,{type:`string`,description:`The secret.accessKeyId field`}).option(`secret-secret-access-key`,{type:`string`,description:`The secret.secretAccessKey field`}).option(`secret-client-email`,{type:`string`,description:`The secret.clientEmail field`}).option(`secret-private-key`,{type:`string`,description:`The secret.privateKey field`}).option(`vendor`,{type:`string`,description:`The vendor field`,choices:[`s3`,`gcs`,`r2`]}).option(`jurisdiction`,{type:`string`,description:`The jurisdiction field`,choices:[`default`,`eu`,`us`,`fedramp`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).conflicts(`endpoint`,[`secret-client-email`,`secret-private-key`,`jurisdiction`]).conflicts(`region`,[`secret-client-email`,`secret-private-key`,`jurisdiction`]).conflicts(`secret-access-key-id`,[`secret-client-email`,`secret-private-key`]).conflicts(`secret-secret-access-key`,[`secret-client-email`,`secret-private-key`]).conflicts(`secret-client-email`,[`endpoint`,`region`,`secret-access-key-id`,`secret-secret-access-key`,`jurisdiction`]).conflicts(`secret-private-key`,[`endpoint`,`region`,`secret-access-key-id`,`secret-secret-access-key`,`jurisdiction`]).conflicts(`jurisdiction`,[`endpoint`,`region`,`secret-client-email`,`secret-private-key`])}const ut={command:`source`,describe:`Check source connectivity`,builder:lt,handler:async r=>c({command:`r2 super-slurper connectivity-precheck source`,classification:{safeFlags:[`vendor`,`jurisdiction`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf r2 super-slurper connectivity-precheck source`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/slurper/source/connectivity-precheck`,pathParams:{},bodyKind:`json`,body:r.body===void 0?f({bucket:p(r.bucket,`bucket`,`text`),endpoint:p(r.endpoint,`endpoint`,`text`),keys:r.keys,pathPrefix:p(r[`path-prefix`],`path-prefix`,`text`),region:p(r.region,`region`,`text`),secret:{accessKeyId:p(r[`secret-access-key-id`],`secret-access-key-id`,`text`),secretAccessKey:p(r[`secret-secret-access-key`],`secret-secret-access-key`,`text`),clientEmail:p(r[`secret-client-email`],`secret-client-email`,`text`),privateKey:p(r[`secret-private-key`],`secret-private-key`,`text`)},vendor:p(r.vendor,`vendor`,`text`),jurisdiction:p(r.jurisdiction,`jurisdiction`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Updating`,async()=>c.r2.superSlurper.connectivityPrecheck.source({body:e,account_id:l})),{successLabel:`Updated`});return}r.bucket===void 0&&(r.bucket=await h(`bucket`,`The bucket field`)),r.vendor===void 0&&(r.vendor=await g(`vendor`,`The vendor field`,[`s3`,`gcs`,`r2`]));let d=f({bucket:p(r.bucket,`bucket`,`text`),endpoint:p(r.endpoint,`endpoint`,`text`),keys:r.keys,pathPrefix:p(r[`path-prefix`],`path-prefix`,`text`),region:p(r.region,`region`,`text`),secret:{accessKeyId:p(r[`secret-access-key-id`],`secret-access-key-id`,`text`),secretAccessKey:p(r[`secret-secret-access-key`],`secret-secret-access-key`,`text`),clientEmail:p(r[`secret-client-email`],`secret-client-email`,`text`),privateKey:p(r[`secret-private-key`],`secret-private-key`,`text`)},vendor:p(r.vendor,`vendor`,`text`),jurisdiction:p(r.jurisdiction,`jurisdiction`,`text`)});a(await s(`Updating`,async()=>c.r2.superSlurper.connectivityPrecheck.source({body:d,account_id:l})),{successLabel:`Updated`})})};function dt(e){return e.usage(`$0 r2 super-slurper connectivity-precheck target
105
+ Cancels a specific R2 Super Slurper migration job. Any objects in the middle of a transfer will finish, but no new objects will start transferring.`).positional(`job-id`,{type:`string`,description:`Job ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ut={command:`abort <job-id>`,describe:`Abort a job`,builder:lt,handler:async r=>c({command:`r2 super-slurper jobs abort`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf r2 super-slurper jobs abort`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/slurper/jobs/${r[`job-id`]==null?`<job-id>`:encodeURIComponent(String(r[`job-id`]))}/abort`,pathParams:{"job-id":String(r[`job-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,!await _({force:!!r.force,message:`This operation stops a running migration job.`})){process.stderr.write(`Aborted.
106
+ `);return}a(await s(`Deleting`,async()=>c.r2.superSlurper.jobs.abort({account_id:l,job_id:r[`job-id`]})),{successLabel:`Deleted`})})};function dt(e){return e.usage(`$0 r2 super-slurper jobs create
106
107
 
107
- Check whether tokens are valid against the target bucket`).option(`bucket`,{type:`string`,description:`The bucket field`}).option(`jurisdiction`,{type:`string`,description:`The jurisdiction field`,choices:[`default`,`eu`,`us`,`fedramp`]}).option(`secret-access-key-id`,{type:`string`,description:`The secret.accessKeyId field`}).option(`secret-secret-access-key`,{type:`string`,description:`The secret.secretAccessKey field`}).option(`vendor`,{type:`string`,description:`The vendor field`,choices:[`r2`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ft={command:`target`,describe:`Check target connectivity`,builder:dt,handler:async r=>c({command:`r2 super-slurper connectivity-precheck target`,classification:{safeFlags:[`jurisdiction`,`vendor`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf r2 super-slurper connectivity-precheck target`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/slurper/target/connectivity-precheck`,pathParams:{},bodyKind:`json`,body:r.body===void 0?f({bucket:p(r.bucket,`bucket`,`text`),jurisdiction:p(r.jurisdiction,`jurisdiction`,`text`),secret:{accessKeyId:p(r[`secret-access-key-id`],`secret-access-key-id`,`text`),secretAccessKey:p(r[`secret-secret-access-key`],`secret-secret-access-key`,`text`)},vendor:p(r.vendor,`vendor`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Updating`,async()=>c.r2.superSlurper.connectivityPrecheck.target({body:e,account_id:l})),{successLabel:`Updated`});return}r.bucket===void 0&&(r.bucket=await h(`bucket`,`The bucket field`)),r[`secret-access-key-id`]===void 0&&(r[`secret-access-key-id`]=await h(`secret-access-key-id`,`The secret.accessKeyId field`)),r[`secret-secret-access-key`]===void 0&&(r[`secret-secret-access-key`]=await h(`secret-secret-access-key`,`The secret.secretAccessKey field`,{kind:`secret`})),r.vendor===void 0&&(r.vendor=await g(`vendor`,`The vendor field`,[`r2`]));let d=f({bucket:p(r.bucket,`bucket`,`text`),jurisdiction:p(r.jurisdiction,`jurisdiction`,`text`),secret:{accessKeyId:p(r[`secret-access-key-id`],`secret-access-key-id`,`text`),secretAccessKey:p(r[`secret-secret-access-key`],`secret-secret-access-key`,`text`)},vendor:p(r.vendor,`vendor`,`text`)});a(await s(`Updating`,async()=>c.r2.superSlurper.connectivityPrecheck.target({body:d,account_id:l})),{successLabel:`Updated`})})},pt={command:`connectivity-precheck`,describe:`Operations for super-slurper.connectivity-precheck`,builder:e=>e.command(ut).command(ft).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function mt(e){return e.usage(`$0 r2 super-slurper jobs abort-all
108
+ Creates a new R2 Super Slurper migration job to transfer objects from a source bucket (e.g. S3, GCS, R2) to R2.`).option(`overwrite`,{type:`boolean`,description:`The overwrite field`,default:!0}).option(`source-bucket`,{type:`string`,description:`The source.bucket field`}).option(`source-endpoint`,{type:`string`,description:`Custom S3-compatible endpoint that must use https://.`}).option(`source-keys`,{type:`string`,array:!0,description:`The source.keys field`}).option(`source-path-prefix`,{type:`string`,description:`The source.pathPrefix field`}).option(`source-region`,{type:`string`,description:`The source.region field`}).option(`source-secret-access-key-id`,{type:`string`,description:`The source.secret.accessKeyId field`}).option(`source-secret-secret-access-key`,{type:`string`,description:`The source.secret.secretAccessKey field`}).option(`source-secret-client-email`,{type:`string`,description:`The source.secret.clientEmail field`}).option(`source-secret-private-key`,{type:`string`,description:`The source.secret.privateKey field`}).option(`source-vendor`,{type:`string`,description:`The source.vendor field`,choices:[`s3`,`gcs`,`r2`]}).option(`source-jurisdiction`,{type:`string`,description:`The source.jurisdiction field`,choices:[`default`,`eu`,`us`,`fedramp`]}).option(`target-bucket`,{type:`string`,description:`The target.bucket field`}).option(`target-jurisdiction`,{type:`string`,description:`The target.jurisdiction field`,choices:[`default`,`eu`,`us`,`fedramp`]}).option(`target-secret-access-key-id`,{type:`string`,description:`The target.secret.accessKeyId field`}).option(`target-secret-secret-access-key`,{type:`string`,description:`The target.secret.secretAccessKey field`}).option(`target-vendor`,{type:`string`,description:`The target.vendor field`,choices:[`r2`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).conflicts(`source-endpoint`,[`source-secret-client-email`,`source-secret-private-key`,`source-jurisdiction`]).conflicts(`source-region`,[`source-secret-client-email`,`source-secret-private-key`,`source-jurisdiction`]).conflicts(`source-secret-access-key-id`,[`source-secret-client-email`,`source-secret-private-key`]).conflicts(`source-secret-secret-access-key`,[`source-secret-client-email`,`source-secret-private-key`]).conflicts(`source-secret-client-email`,[`source-endpoint`,`source-region`,`source-secret-access-key-id`,`source-secret-secret-access-key`,`source-jurisdiction`]).conflicts(`source-secret-private-key`,[`source-endpoint`,`source-region`,`source-secret-access-key-id`,`source-secret-secret-access-key`,`source-jurisdiction`]).conflicts(`source-jurisdiction`,[`source-endpoint`,`source-region`,`source-secret-client-email`,`source-secret-private-key`]).check(e=>{if([`source-bucket`,`source-endpoint`,`source-keys`,`source-path-prefix`,`source-region`,`source-secret-access-key-id`,`source-secret-secret-access-key`,`source-secret-client-email`,`source-secret-private-key`,`source-vendor`,`source-jurisdiction`].some(t=>e[t]!==void 0)){let t=[`source-bucket`,`source-vendor`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --source-* flag is set`)}return!0}).check(e=>{if([`target-bucket`,`target-jurisdiction`,`target-secret-access-key-id`,`target-secret-secret-access-key`,`target-vendor`].some(t=>e[t]!==void 0)){let t=[`target-bucket`,`target-secret-access-key-id`,`target-secret-secret-access-key`,`target-vendor`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --target-* flag is set`)}return!0})}const ft={command:`create`,describe:`Create a job`,builder:dt,handler:async r=>c({command:`r2 super-slurper jobs create`,classification:{safeFlags:[`overwrite`,`source-vendor`,`source-jurisdiction`,`target-jurisdiction`,`target-vendor`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf r2 super-slurper jobs create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/slurper/jobs`,pathParams:{},bodyKind:`json`,body:r.body===void 0?f({overwrite:r.overwrite,source:{bucket:p(r[`source-bucket`],`source-bucket`,`text`),endpoint:p(r[`source-endpoint`],`source-endpoint`,`text`),keys:r[`source-keys`],pathPrefix:p(r[`source-path-prefix`],`source-path-prefix`,`text`),region:p(r[`source-region`],`source-region`,`text`),secret:{accessKeyId:p(r[`source-secret-access-key-id`],`source-secret-access-key-id`,`text`),secretAccessKey:p(r[`source-secret-secret-access-key`],`source-secret-secret-access-key`,`text`),clientEmail:p(r[`source-secret-client-email`],`source-secret-client-email`,`text`),privateKey:p(r[`source-secret-private-key`],`source-secret-private-key`,`text`)},vendor:p(r[`source-vendor`],`source-vendor`,`text`),jurisdiction:p(r[`source-jurisdiction`],`source-jurisdiction`,`text`)},target:{bucket:p(r[`target-bucket`],`target-bucket`,`text`),jurisdiction:p(r[`target-jurisdiction`],`target-jurisdiction`,`text`),secret:{accessKeyId:p(r[`target-secret-access-key-id`],`target-secret-access-key-id`,`text`),secretAccessKey:p(r[`target-secret-secret-access-key`],`target-secret-secret-access-key`,`text`)},vendor:p(r[`target-vendor`],`target-vendor`,`text`)}}):u(r.body)});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.r2.superSlurper.jobs.create({...e,account_id:l})),{successLabel:`Created`});return}let d=f({overwrite:r.overwrite,source:{bucket:p(r[`source-bucket`],`source-bucket`,`text`),endpoint:p(r[`source-endpoint`],`source-endpoint`,`text`),keys:r[`source-keys`],pathPrefix:p(r[`source-path-prefix`],`source-path-prefix`,`text`),region:p(r[`source-region`],`source-region`,`text`),secret:{accessKeyId:p(r[`source-secret-access-key-id`],`source-secret-access-key-id`,`text`),secretAccessKey:p(r[`source-secret-secret-access-key`],`source-secret-secret-access-key`,`text`),clientEmail:p(r[`source-secret-client-email`],`source-secret-client-email`,`text`),privateKey:p(r[`source-secret-private-key`],`source-secret-private-key`,`text`)},vendor:p(r[`source-vendor`],`source-vendor`,`text`),jurisdiction:p(r[`source-jurisdiction`],`source-jurisdiction`,`text`)},target:{bucket:p(r[`target-bucket`],`target-bucket`,`text`),jurisdiction:p(r[`target-jurisdiction`],`target-jurisdiction`,`text`),secret:{accessKeyId:p(r[`target-secret-access-key-id`],`target-secret-access-key-id`,`text`),secretAccessKey:p(r[`target-secret-secret-access-key`],`target-secret-secret-access-key`,`text`)},vendor:p(r[`target-vendor`],`target-vendor`,`text`)}});a(await s(`Creating`,async()=>c.r2.superSlurper.jobs.create({...d,account_id:l})),{successLabel:`Created`})})};function pt(e){return e.usage(`$0 r2 super-slurper jobs delete <job-id>
108
109
 
109
- 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 ht={command:`abort-all`,describe:`Abort all jobs`,builder:mt,handler:async r=>c({command:`r2 super-slurper jobs abort-all`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf r2 super-slurper jobs abort-all`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/slurper/jobs/abortAll`,pathParams:{},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,!await _({force:!!r.force,message:`This operation stops every running migration job.`})){process.stderr.write(`Aborted.
110
- `);return}a(await s(`Deleting`,async()=>c.r2.superSlurper.jobs.abortAll({account_id:l})),{successLabel:`Deleted`})})};function gt(e){return e.usage(`$0 r2 super-slurper jobs abort <job-id>
110
+ Deletes a completed, aborted, or errored R2 Super Slurper migration job. Active jobs cannot be deleted.`).positional(`job-id`,{type:`string`,description:`Job ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const mt={command:`delete <job-id>`,describe:`Delete a job`,builder:pt,handler:async r=>c({command:`r2 super-slurper jobs delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf r2 super-slurper jobs delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/slurper/jobs/${r[`job-id`]==null?`<job-id>`:encodeURIComponent(String(r[`job-id`]))}`,pathParams:{"job-id":String(r[`job-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,!await _({force:!!r.force})){process.stderr.write(`Aborted.
111
+ `);return}a(await s(`Deleting`,async()=>c.r2.superSlurper.jobs.delete({account_id:l,job_id:r[`job-id`]})),{successLabel:`Deleted`})})};function ht(e){return e.usage(`$0 r2 super-slurper jobs get <job-id>
111
112
 
112
- 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 _t={command:`abort <job-id>`,describe:`Abort a job`,builder:gt,handler:async r=>c({command:`r2 super-slurper jobs abort`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf r2 super-slurper jobs abort`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/slurper/jobs/${r[`job-id`]==null?`<job-id>`:encodeURIComponent(String(r[`job-id`]))}/abort`,pathParams:{"job-id":String(r[`job-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,!await _({force:!!r.force,message:`This operation stops a running migration job.`})){process.stderr.write(`Aborted.
113
- `);return}a(await s(`Deleting`,async()=>c.r2.superSlurper.jobs.abort({account_id:l,job_id:r[`job-id`]})),{successLabel:`Deleted`})})};function vt(e){return e.usage(`$0 r2 super-slurper jobs create
113
+ Retrieves detailed status and configuration for a specific R2 Super Slurper migration job.`).positional(`job-id`,{type:`string`,description:`Job ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const gt={command:`get <job-id>`,describe:`Get job details`,builder:ht,handler:async r=>c({command:`r2 super-slurper jobs get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf r2 super-slurper jobs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/slurper/jobs/${r[`job-id`]==null?`<job-id>`:encodeURIComponent(String(r[`job-id`]))}`,pathParams:{"job-id":String(r[`job-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();r.accountId=l,a(await s(`Loading`,async()=>c.r2.superSlurper.jobs.get({account_id:l,job_id:r[`job-id`]})),{successLabel:`Loaded`})})};function _t(e){return e.usage(`$0 r2 super-slurper jobs list
114
114
 
115
- Creates a new R2 Super Slurper migration job to transfer objects from a source bucket (e.g. S3, GCS, R2) to R2.`).option(`overwrite`,{type:`boolean`,description:`The overwrite field`,default:!0}).option(`source-bucket`,{type:`string`,description:`The source.bucket field`}).option(`source-endpoint`,{type:`string`,description:`Custom S3-compatible endpoint that must use https://.`}).option(`source-keys`,{type:`string`,array:!0,description:`The source.keys field`}).option(`source-path-prefix`,{type:`string`,description:`The source.pathPrefix field`}).option(`source-region`,{type:`string`,description:`The source.region field`}).option(`source-secret-access-key-id`,{type:`string`,description:`The source.secret.accessKeyId field`}).option(`source-secret-secret-access-key`,{type:`string`,description:`The source.secret.secretAccessKey field`}).option(`source-secret-client-email`,{type:`string`,description:`The source.secret.clientEmail field`}).option(`source-secret-private-key`,{type:`string`,description:`The source.secret.privateKey field`}).option(`source-vendor`,{type:`string`,description:`The source.vendor field`,choices:[`s3`,`gcs`,`r2`]}).option(`source-jurisdiction`,{type:`string`,description:`The source.jurisdiction field`,choices:[`default`,`eu`,`us`,`fedramp`]}).option(`target-bucket`,{type:`string`,description:`The target.bucket field`}).option(`target-jurisdiction`,{type:`string`,description:`The target.jurisdiction field`,choices:[`default`,`eu`,`us`,`fedramp`]}).option(`target-secret-access-key-id`,{type:`string`,description:`The target.secret.accessKeyId field`}).option(`target-secret-secret-access-key`,{type:`string`,description:`The target.secret.secretAccessKey field`}).option(`target-vendor`,{type:`string`,description:`The target.vendor field`,choices:[`r2`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).conflicts(`source-endpoint`,[`source-secret-client-email`,`source-secret-private-key`,`source-jurisdiction`]).conflicts(`source-region`,[`source-secret-client-email`,`source-secret-private-key`,`source-jurisdiction`]).conflicts(`source-secret-access-key-id`,[`source-secret-client-email`,`source-secret-private-key`]).conflicts(`source-secret-secret-access-key`,[`source-secret-client-email`,`source-secret-private-key`]).conflicts(`source-secret-client-email`,[`source-endpoint`,`source-region`,`source-secret-access-key-id`,`source-secret-secret-access-key`,`source-jurisdiction`]).conflicts(`source-secret-private-key`,[`source-endpoint`,`source-region`,`source-secret-access-key-id`,`source-secret-secret-access-key`,`source-jurisdiction`]).conflicts(`source-jurisdiction`,[`source-endpoint`,`source-region`,`source-secret-client-email`,`source-secret-private-key`]).check(e=>{if([`source-bucket`,`source-endpoint`,`source-keys`,`source-path-prefix`,`source-region`,`source-secret-access-key-id`,`source-secret-secret-access-key`,`source-secret-client-email`,`source-secret-private-key`,`source-vendor`,`source-jurisdiction`].some(t=>e[t]!==void 0)){let t=[`source-bucket`,`source-vendor`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --source-* flag is set`)}return!0}).check(e=>{if([`target-bucket`,`target-jurisdiction`,`target-secret-access-key-id`,`target-secret-secret-access-key`,`target-vendor`].some(t=>e[t]!==void 0)){let t=[`target-bucket`,`target-secret-access-key-id`,`target-secret-secret-access-key`,`target-vendor`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --target-* flag is set`)}return!0})}const yt={command:`create`,describe:`Create a job`,builder:vt,handler:async r=>c({command:`r2 super-slurper jobs create`,classification:{safeFlags:[`overwrite`,`source-vendor`,`source-jurisdiction`,`target-jurisdiction`,`target-vendor`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf r2 super-slurper jobs create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/slurper/jobs`,pathParams:{},bodyKind:`json`,body:r.body===void 0?f({overwrite:r.overwrite,source:{bucket:p(r[`source-bucket`],`source-bucket`,`text`),endpoint:p(r[`source-endpoint`],`source-endpoint`,`text`),keys:r[`source-keys`],pathPrefix:p(r[`source-path-prefix`],`source-path-prefix`,`text`),region:p(r[`source-region`],`source-region`,`text`),secret:{accessKeyId:p(r[`source-secret-access-key-id`],`source-secret-access-key-id`,`text`),secretAccessKey:p(r[`source-secret-secret-access-key`],`source-secret-secret-access-key`,`text`),clientEmail:p(r[`source-secret-client-email`],`source-secret-client-email`,`text`),privateKey:p(r[`source-secret-private-key`],`source-secret-private-key`,`text`)},vendor:p(r[`source-vendor`],`source-vendor`,`text`),jurisdiction:p(r[`source-jurisdiction`],`source-jurisdiction`,`text`)},target:{bucket:p(r[`target-bucket`],`target-bucket`,`text`),jurisdiction:p(r[`target-jurisdiction`],`target-jurisdiction`,`text`),secret:{accessKeyId:p(r[`target-secret-access-key-id`],`target-secret-access-key-id`,`text`),secretAccessKey:p(r[`target-secret-secret-access-key`],`target-secret-secret-access-key`,`text`)},vendor:p(r[`target-vendor`],`target-vendor`,`text`)}}):u(r.body)});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.r2.superSlurper.jobs.create({...e,account_id:l})),{successLabel:`Created`});return}let d=f({overwrite:r.overwrite,source:{bucket:p(r[`source-bucket`],`source-bucket`,`text`),endpoint:p(r[`source-endpoint`],`source-endpoint`,`text`),keys:r[`source-keys`],pathPrefix:p(r[`source-path-prefix`],`source-path-prefix`,`text`),region:p(r[`source-region`],`source-region`,`text`),secret:{accessKeyId:p(r[`source-secret-access-key-id`],`source-secret-access-key-id`,`text`),secretAccessKey:p(r[`source-secret-secret-access-key`],`source-secret-secret-access-key`,`text`),clientEmail:p(r[`source-secret-client-email`],`source-secret-client-email`,`text`),privateKey:p(r[`source-secret-private-key`],`source-secret-private-key`,`text`)},vendor:p(r[`source-vendor`],`source-vendor`,`text`),jurisdiction:p(r[`source-jurisdiction`],`source-jurisdiction`,`text`)},target:{bucket:p(r[`target-bucket`],`target-bucket`,`text`),jurisdiction:p(r[`target-jurisdiction`],`target-jurisdiction`,`text`),secret:{accessKeyId:p(r[`target-secret-access-key-id`],`target-secret-access-key-id`,`text`),secretAccessKey:p(r[`target-secret-secret-access-key`],`target-secret-secret-access-key`,`text`)},vendor:p(r[`target-vendor`],`target-vendor`,`text`)}});a(await s(`Creating`,async()=>c.r2.superSlurper.jobs.create({...d,account_id:l})),{successLabel:`Created`})})};function bt(e){return e.usage(`$0 r2 super-slurper jobs delete <job-id>
115
+ Lists all R2 Super Slurper migration jobs for the account with their status.`).option(`limit`,{type:`number`,description:`Limit`}).option(`offset`,{type:`number`,description:`Offset`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const vt={command:`list`,describe:`List jobs`,builder:_t,handler:async r=>c({command:`r2 super-slurper jobs list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={limit:r.limit,offset:r.offset};if(r.dryRun){o({command:`cf r2 super-slurper jobs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/slurper/jobs`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await n();r.accountId=u,a(await s(`Loading`,async()=>l.r2.superSlurper.jobs.list({account_id:u,...c})),{successLabel:`Loaded`})})};function yt(e){return e.usage(`$0 r2 super-slurper jobs logs list
116
116
 
117
- 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 xt={command:`delete <job-id>`,describe:`Delete a job`,builder:bt,handler:async r=>c({command:`r2 super-slurper jobs delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf r2 super-slurper jobs delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/slurper/jobs/${r[`job-id`]==null?`<job-id>`:encodeURIComponent(String(r[`job-id`]))}`,pathParams:{"job-id":String(r[`job-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,!await _({force:!!r.force})){process.stderr.write(`Aborted.
118
- `);return}a(await s(`Deleting`,async()=>c.r2.superSlurper.jobs.delete({account_id:l,job_id:r[`job-id`]})),{successLabel:`Deleted`})})};function St(e){return e.usage(`$0 r2 super-slurper jobs get <job-id>
117
+ Gets log entries for an R2 Super Slurper migration job, showing migration status changes, errors, etc.`).option(`job-id`,{type:`string`,description:`Job ID`,demandOption:!0}).option(`limit`,{type:`number`,description:`Limit`}).option(`offset`,{type:`number`,description:`Offset`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const $={command:`list`,describe:`Get job logs`,builder:yt,handler:async r=>c({command:`r2 super-slurper jobs logs list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={limit:r.limit,offset:r.offset};if(r.dryRun){o({command:`cf r2 super-slurper jobs logs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/slurper/jobs/${r[`job-id`]==null?`<job-id>`:encodeURIComponent(String(r[`job-id`]))}/logs`,pathParams:{"job-id":String(r[`job-id`]??``)},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await n();r.accountId=u,a(await s(`Loading`,async()=>l.r2.superSlurper.jobs.logs.list({account_id:u,job_id:r[`job-id`],...c})),{successLabel:`Loaded`})})},bt={command:`logs`,describe:`Operations for super-slurper.jobs.logs`,builder:e=>e.command($).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function xt(e){return e.usage(`$0 r2 super-slurper jobs pause <job-id>
119
118
 
120
- 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 Ct={command:`get <job-id>`,describe:`Get job details`,builder:St,handler:async r=>c({command:`r2 super-slurper jobs get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf r2 super-slurper jobs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/slurper/jobs/${r[`job-id`]==null?`<job-id>`:encodeURIComponent(String(r[`job-id`]))}`,pathParams:{"job-id":String(r[`job-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();r.accountId=l,a(await s(`Loading`,async()=>c.r2.superSlurper.jobs.get({account_id:l,job_id:r[`job-id`]})),{successLabel:`Loaded`})})};function wt(e){return e.usage(`$0 r2 super-slurper jobs list
119
+ Pauses a running R2 Super Slurper migration job. The job can be resumed later to continue transferring.`).positional(`job-id`,{type:`string`,description:`Job ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const St={command:`pause <job-id>`,describe:`Pause a job`,builder:xt,handler:async r=>c({command:`r2 super-slurper jobs pause`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf r2 super-slurper jobs pause`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/slurper/jobs/${r[`job-id`]==null?`<job-id>`:encodeURIComponent(String(r[`job-id`]))}/pause`,pathParams:{"job-id":String(r[`job-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();r.accountId=l,a(await s(`Updating`,async()=>c.r2.superSlurper.jobs.pause({account_id:l,job_id:r[`job-id`]})),{successLabel:`Updated`})})};function Ct(e){return e.usage(`$0 r2 super-slurper jobs progress <job-id>
121
120
 
122
- 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 Tt={command:`list`,describe:`List jobs`,builder:wt,handler:async r=>c({command:`r2 super-slurper jobs list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={limit:r.limit,offset:r.offset};if(r.dryRun){o({command:`cf r2 super-slurper jobs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/slurper/jobs`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await n();r.accountId=u,a(await s(`Loading`,async()=>l.r2.superSlurper.jobs.list({account_id:u,...c})),{successLabel:`Loaded`})})};function Et(e){return e.usage(`$0 r2 super-slurper jobs logs list
121
+ Retrieves current progress metrics for an R2 Super Slurper migration job`).positional(`job-id`,{type:`string`,description:`Job ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const wt={command:`progress <job-id>`,describe:`Get job progress`,builder:Ct,handler:async r=>c({command:`r2 super-slurper jobs progress`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf r2 super-slurper jobs progress`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/slurper/jobs/${r[`job-id`]==null?`<job-id>`:encodeURIComponent(String(r[`job-id`]))}/progress`,pathParams:{"job-id":String(r[`job-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();r.accountId=l,a(await s(`Loading`,async()=>c.r2.superSlurper.jobs.progress({account_id:l,job_id:r[`job-id`]})),{successLabel:`Loaded`})})};function Tt(e){return e.usage(`$0 r2 super-slurper jobs resume <job-id>
123
122
 
124
- Gets log entries for an R2 Super Slurper migration job, showing migration status changes, errors, etc.`).option(`job-id`,{type:`string`,description:`Job ID`,demandOption:!0}).option(`limit`,{type:`number`,description:`Limit`}).option(`offset`,{type:`number`,description:`Offset`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const $={command:`list`,describe:`Get job logs`,builder:Et,handler:async r=>c({command:`r2 super-slurper jobs logs list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={limit:r.limit,offset:r.offset};if(r.dryRun){o({command:`cf r2 super-slurper jobs logs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/slurper/jobs/${r[`job-id`]==null?`<job-id>`:encodeURIComponent(String(r[`job-id`]))}/logs`,pathParams:{"job-id":String(r[`job-id`]??``)},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await n();r.accountId=u,a(await s(`Loading`,async()=>l.r2.superSlurper.jobs.logs.list({account_id:u,job_id:r[`job-id`],...c})),{successLabel:`Loaded`})})},Dt={command:`logs`,describe:`Operations for super-slurper.jobs.logs`,builder:e=>e.command($).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ot(e){return e.usage(`$0 r2 super-slurper jobs pause <job-id>
123
+ Resumes a paused R2 Super Slurper migration job, continuing the transfer from where it stopped.`).positional(`job-id`,{type:`string`,description:`Job ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Et={command:`resume <job-id>`,describe:`Resume a job`,builder:Tt,handler:async r=>c({command:`r2 super-slurper jobs resume`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf r2 super-slurper jobs resume`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/slurper/jobs/${r[`job-id`]==null?`<job-id>`:encodeURIComponent(String(r[`job-id`]))}/resume`,pathParams:{"job-id":String(r[`job-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();r.accountId=l,a(await s(`Updating`,async()=>c.r2.superSlurper.jobs.resume({account_id:l,job_id:r[`job-id`]})),{successLabel:`Updated`})})},Dt={command:`jobs`,describe:`Operations for super-slurper.jobs`,builder:e=>e.command(ut).command(ct).command(ft).command(mt).command(gt).command(vt).command(St).command(wt).command(Et).command(bt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ot={command:`super-slurper`,describe:`Migrate data from external S3-compatible storage into R2 buckets with resumable transfer jobs`,builder:e=>e.command(ot).command(Dt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function kt(e){return e.usage(`$0 r2 temporary-credentials create
125
124
 
126
- 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 kt={command:`pause <job-id>`,describe:`Pause a job`,builder:Ot,handler:async r=>c({command:`r2 super-slurper jobs pause`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf r2 super-slurper jobs pause`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/slurper/jobs/${r[`job-id`]==null?`<job-id>`:encodeURIComponent(String(r[`job-id`]))}/pause`,pathParams:{"job-id":String(r[`job-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();r.accountId=l,a(await s(`Updating`,async()=>c.r2.superSlurper.jobs.pause({account_id:l,job_id:r[`job-id`]})),{successLabel:`Updated`})})};function At(e){return e.usage(`$0 r2 super-slurper jobs progress <job-id>
127
-
128
- 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 jt={command:`progress <job-id>`,describe:`Get job progress`,builder:At,handler:async r=>c({command:`r2 super-slurper jobs progress`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf r2 super-slurper jobs progress`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/slurper/jobs/${r[`job-id`]==null?`<job-id>`:encodeURIComponent(String(r[`job-id`]))}/progress`,pathParams:{"job-id":String(r[`job-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();r.accountId=l,a(await s(`Loading`,async()=>c.r2.superSlurper.jobs.progress({account_id:l,job_id:r[`job-id`]})),{successLabel:`Loaded`})})};function Mt(e){return e.usage(`$0 r2 super-slurper jobs resume <job-id>
129
-
130
- 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 Nt={command:`resume <job-id>`,describe:`Resume a job`,builder:Mt,handler:async r=>c({command:`r2 super-slurper jobs resume`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf r2 super-slurper jobs resume`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/slurper/jobs/${r[`job-id`]==null?`<job-id>`:encodeURIComponent(String(r[`job-id`]))}/resume`,pathParams:{"job-id":String(r[`job-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();r.accountId=l,a(await s(`Updating`,async()=>c.r2.superSlurper.jobs.resume({account_id:l,job_id:r[`job-id`]})),{successLabel:`Updated`})})},Pt={command:`jobs`,describe:`Operations for super-slurper.jobs`,builder:e=>e.command(_t).command(ht).command(yt).command(xt).command(Ct).command(Tt).command(kt).command(jt).command(Nt).command(Dt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ft={command:`super-slurper`,describe:`Migrate data from external S3-compatible storage into R2 buckets with resumable transfer jobs`,builder:e=>e.command(pt).command(Pt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function It(e){return e.usage(`$0 r2 temporary-credentials create
131
-
132
- Creates temporary access credentials on a bucket that can be optionally scoped to prefixes or objects.`).option(`bucket`,{type:`string`,description:`Name of the R2 bucket.`}).option(`objects`,{type:`string`,array:!0,description:`Optional object paths to scope the credentials to.`}).option(`parent-access-key-id`,{type:`string`,description:`Access key ID of the parent R2 API token. The temporary credentials cannot exceed this token's permissions.`}).option(`permission`,{type:`string`,description:`Permissions allowed on the credentials.`,choices:[`admin-read-write`,`admin-read-only`,`object-read-write`,`object-read-only`]}).option(`prefixes`,{type:`string`,array:!0,description:`Optional prefix paths to scope the credentials to.`}).option(`ttl-seconds`,{type:`number`,description:`Lifetime of the temporary credentials in seconds, up to 604800 seconds (7 days).`,default:900}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Lt={command:`create`,describe:`Create Temporary Access Credentials`,builder:It,handler:async r=>c({command:`r2 temporary-credentials create`,classification:{safeFlags:[`permission`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf r2 temporary-credentials create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/r2/temp-access-credentials`,pathParams:{},bodyKind:`json`,body:r.body===void 0?f({bucket:p(r.bucket,`bucket`,`text`),objects:r.objects,parentAccessKeyId:p(r[`parent-access-key-id`],`parent-access-key-id`,`text`),permission:p(r.permission,`permission`,`text`),prefixes:r.prefixes,ttlSeconds:r[`ttl-seconds`]}):u(r.body)});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.r2.temporaryCredentials.create({...e,account_id:l})),{successLabel:`Created`});return}if(r.bucket===void 0&&(r.bucket=await h(`bucket`,`Name of the R2 bucket.`)),r[`parent-access-key-id`]===void 0&&(r[`parent-access-key-id`]=await h(`parent-access-key-id`,`Access key ID of the parent R2 API token. The temporary credentials cannot exceed this token's permissions.`)),r.permission===void 0&&(r.permission=await g(`permission`,`Permissions allowed on the credentials.`,[`admin-read-write`,`admin-read-only`,`object-read-write`,`object-read-only`])),r[`ttl-seconds`]===void 0)throw Error(`--ttl-seconds is required (or pass --body with this field set).`);let d=f({bucket:p(r.bucket,`bucket`,`text`),objects:r.objects,parentAccessKeyId:p(r[`parent-access-key-id`],`parent-access-key-id`,`text`),permission:p(r.permission,`permission`,`text`),prefixes:r.prefixes,ttlSeconds:r[`ttl-seconds`]});a(await s(`Creating`,async()=>c.r2.temporaryCredentials.create({...d,account_id:l})),{successLabel:`Created`})})},Rt={command:`temporary-credentials`,describe:`Generate short-lived S3-compatible credentials scoped to specific buckets and operations`,builder:e=>e.command(Lt).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(Ze).command(ct).command(Ft).command(Rt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{zt as default};
125
+ Creates temporary access credentials on a bucket that can be optionally scoped to prefixes or objects.`).option(`bucket`,{type:`string`,description:`Name of the R2 bucket.`}).option(`objects`,{type:`string`,array:!0,description:`Optional object paths to scope the credentials to.`}).option(`parent-access-key-id`,{type:`string`,description:`Access key ID of the parent R2 API token. The temporary credentials cannot exceed this token's permissions.`}).option(`permission`,{type:`string`,description:`Permissions allowed on the credentials.`,choices:[`admin-read-write`,`admin-read-only`,`object-read-write`,`object-read-only`]}).option(`prefixes`,{type:`string`,array:!0,description:`Optional prefix paths to scope the credentials to.`}).option(`ttl-seconds`,{type:`number`,description:`Lifetime of the temporary credentials in seconds, up to 604800 seconds (7 days).`,default:900}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const At={command:`create`,describe:`Create Temporary Access Credentials`,builder:kt,handler:async r=>c({command:`r2 temporary-credentials create`,classification:{safeFlags:[`permission`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf r2 temporary-credentials create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/r2/temp-access-credentials`,pathParams:{},bodyKind:`json`,body:r.body===void 0?f({bucket:p(r.bucket,`bucket`,`text`),objects:r.objects,parentAccessKeyId:p(r[`parent-access-key-id`],`parent-access-key-id`,`text`),permission:p(r.permission,`permission`,`text`),prefixes:r.prefixes,ttlSeconds:r[`ttl-seconds`]}):u(r.body)});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.r2.temporaryCredentials.create({...e,account_id:l})),{successLabel:`Created`});return}if(r.bucket===void 0&&(r.bucket=await h(`bucket`,`Name of the R2 bucket.`)),r[`parent-access-key-id`]===void 0&&(r[`parent-access-key-id`]=await h(`parent-access-key-id`,`Access key ID of the parent R2 API token. The temporary credentials cannot exceed this token's permissions.`)),r.permission===void 0&&(r.permission=await g(`permission`,`Permissions allowed on the credentials.`,[`admin-read-write`,`admin-read-only`,`object-read-write`,`object-read-only`])),r[`ttl-seconds`]===void 0)throw Error(`--ttl-seconds is required (or pass --body with this field set).`);let d=f({bucket:p(r.bucket,`bucket`,`text`),objects:r.objects,parentAccessKeyId:p(r[`parent-access-key-id`],`parent-access-key-id`,`text`),permission:p(r.permission,`permission`,`text`),prefixes:r.prefixes,ttlSeconds:r[`ttl-seconds`]});a(await s(`Creating`,async()=>c.r2.temporaryCredentials.create({...d,account_id:l})),{successLabel:`Created`})})},jt={command:`temporary-credentials`,describe:`Generate short-lived S3-compatible credentials scoped to specific buckets and operations`,builder:e=>e.command(At).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Mt={command:`r2`,describe:`S3-compatible object storage with zero egress fees — buckets, lifecycle rules, event notifications, and data migration`,builder:e=>e.command(We).command(tt).command(Ot).command(jt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Mt as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{r as e}from"./auth-gOCL6Pm0.mjs";import{t}from"./output-CvQFJkvi.mjs";import{t as n}from"./dry-run-Bq0JAsbX.mjs";import{t as r}from"./progress-CRjK46r1.mjs";import{t as i}from"./run-huwFFwXd.mjs";import"./telemetry-B4_YhD82.mjs";import{n as a,t as o}from"./body-parser-hh2avzkz.mjs";import{t as s}from"./cli-types-DoVT5q_M.mjs";import{n as c,t as l}from"./raw-fetch-C8SdmQBp.mjs";function ee(e){return e.usage(`$0 radar agent-readiness summary <dimension>
2
+ import{r as e}from"./auth-BjxUTZWb.mjs";import{t}from"./output-CvQFJkvi.mjs";import{t as n}from"./dry-run-Bq0JAsbX.mjs";import{t as r}from"./progress-BnIv4lh5.mjs";import{t as i}from"./run-Duj1fsxa.mjs";import"./telemetry-Bn5lYtiy.mjs";import{n as a,t as o}from"./body-parser-hh2avzkz.mjs";import{t as s}from"./cli-types-DoVT5q_M.mjs";import{n as c,t as l}from"./raw-fetch-CuMHmrn0.mjs";function ee(e){return e.usage(`$0 radar agent-readiness summary <dimension>
3
3
 
4
4
  Returns a summary of AI agent readiness scores across scanned domains, grouped by the specified dimension. Data is sourced from weekly bulk scans. All values are raw domain counts.`).positional(`dimension`,{type:`string`,description:`Specifies the agent readiness data dimension by which to group the results.`,demandOption:!0}).option(`date`,{type:`string`,description:`Filters results by the specified date.`}).option(`domain-category`,{type:`string`,description:`Filters results by domain category.`}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const te={command:`summary <dimension>`,describe:`Get agent readiness summary`,builder:s(ee),handler:async a=>i({command:`radar agent-readiness summary`,classification:{safeFlags:[`format`,`dry-run`]}},a,async()=>{let i={date:a.date,domainCategory:a[`domain-category`],name:a.name,format:a.format};if(a.dryRun){n({command:`cf radar agent-readiness summary`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/agent_readiness/summary/${a.dimension==null?`<dimension>`:encodeURIComponent(String(a.dimension))}`,pathParams:{dimension:String(a.dimension??``)},query:i,bodyKind:`none`});return}let o=await e(a);t(await r(`Loading`,async()=>o.radar.agentReadiness.summary({dimension:a.dimension,...i})),{successLabel:`Loaded`})})},u={command:`agent-readiness`,describe:`Agent readiness summary statistics across the Cloudflare network`,builder:e=>e.command(te).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function d(e){return e.usage(`$0 radar ai bots timeseries-groups <dimension>
5
5
 
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{r as e}from"./sdk-Bmz7t_CD.mjs";import{G as t}from"./dist-DfMipWKR.mjs";import{r as n}from"./local-Cyk8fPvL.mjs";import{n as r}from"./context-CE7QFX-z.mjs";import{n as i}from"./request-headers-jr2VznA9.mjs";import{i as a,t as o}from"./auth-gOCL6Pm0.mjs";async function s(s,c={}){let{method:l=`GET`,local:u=!1}=c,d=t({compliance_region:await r()}),f=`${d.replace(/\/+$/,``)}${s}`,p={...i()};c.headers&&Object.assign(p,c.headers);let m=globalThis.fetch;u?m=n({persistTo:c.persistTo,apiBaseUrl:d}):p.Authorization=`Bearer ${await a()}`;let h,g=c.body;g!=null&&(g instanceof FormData?h=g:Buffer.isBuffer(g)||g instanceof Uint8Array||g instanceof ArrayBuffer?(h=g,p[`Content-Type`]??=c.contentType??`application/octet-stream`):typeof g==`string`?(h=g,c.contentType&&(p[`Content-Type`]??=c.contentType)):(h=JSON.stringify(g),p[`Content-Type`]??=c.contentType??`application/json`));let _=await m(f,{method:l,headers:p,...h===void 0?{}:{body:h},signal:AbortSignal.timeout(o)});if(!_.ok){let t=_.headers.get(`content-type`)??``,n;try{n=t.includes(`application/json`)?await _.json():await _.text()}catch{n=null}throw new e({statusCode:_.status,body:n,rawResponse:{status:_.status,statusText:_.statusText,url:_.url||f,headers:_.headers,redirected:_.redirected,type:_.type}})}let v=await _.arrayBuffer();return Buffer.from(v)}function c(e){process.stdout.write(e)}export{c as n,s as t};
2
+ import{r as e}from"./sdk-DzVznUuv.mjs";import{G as t}from"./dist-BuCJ_55d.mjs";import{r as n}from"./local-CQc36Viv.mjs";import{n as r}from"./context-M2Ho8pi3.mjs";import{n as i}from"./request-headers-DaUqNccK.mjs";import{i as a,t as o}from"./auth-BjxUTZWb.mjs";async function s(s,c={}){let{method:l=`GET`,local:u=!1}=c,d=t({compliance_region:await r()}),f=`${d.replace(/\/+$/,``)}${s}`,p={...i()};c.headers&&Object.assign(p,c.headers);let m=globalThis.fetch;u?m=n({persistTo:c.persistTo,apiBaseUrl:d}):p.Authorization=`Bearer ${await a()}`;let h,g=c.body;g!=null&&(g instanceof FormData?h=g:Buffer.isBuffer(g)||g instanceof Uint8Array||g instanceof ArrayBuffer?(h=g,p[`Content-Type`]??=c.contentType??`application/octet-stream`):typeof g==`string`?(h=g,c.contentType&&(p[`Content-Type`]??=c.contentType)):(h=JSON.stringify(g),p[`Content-Type`]??=c.contentType??`application/json`));let _=await m(f,{method:l,headers:p,...h===void 0?{}:{body:h},signal:AbortSignal.timeout(o)});if(!_.ok){let t=_.headers.get(`content-type`)??``,n;try{n=t.includes(`application/json`)?await _.json():await _.text()}catch{n=null}throw new e({statusCode:_.status,body:n,rawResponse:{status:_.status,statusText:_.statusText,url:_.url||f,headers:_.headers,redirected:_.redirected,type:_.type}})}let v=await _.arrayBuffer();return Buffer.from(v)}function c(e){process.stdout.write(e)}export{c as n,s as t};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-Cyk8fPvL.mjs";import{a as t,t as n}from"./context-CE7QFX-z.mjs";import{r}from"./auth-gOCL6Pm0.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-CRjK46r1.mjs";import{t as s}from"./run-huwFFwXd.mjs";import"./telemetry-B4_YhD82.mjs";import{n as c,t as l}from"./body-parser-hh2avzkz.mjs";import{n as u}from"./input-validation-Dk52b0me.mjs";import{a as d,i as f,n as p}from"./prompt-C_90YsVE.mjs";import{t as m}from"./cli-types-DoVT5q_M.mjs";function h(e){return e.usage(`$0 realtime kit analytics livestreams daily get <app-id>
2
+ import{t as e}from"./local-CQc36Viv.mjs";import{a as t,t as n}from"./context-M2Ho8pi3.mjs";import{r}from"./auth-BjxUTZWb.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-BnIv4lh5.mjs";import{t as s}from"./run-Duj1fsxa.mjs";import"./telemetry-Bn5lYtiy.mjs";import{n as c,t as l}from"./body-parser-hh2avzkz.mjs";import{n as u}from"./input-validation-Dk52b0me.mjs";import{a as d,i as f,n as p}from"./prompt-DjRAo2Up.mjs";import{t as m}from"./cli-types-DoVT5q_M.mjs";function h(e){return e.usage(`$0 realtime kit analytics livestreams daily get <app-id>
3
3
 
4
4
  Returns day-wise livestream analytics for the specified time range.`).positional(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`start-time`,{type:`number`,description:`Specify the start time as a Unix timestamp in seconds to access the livestream analytics.`}).option(`end-time`,{type:`number`,description:`Specify the end time as a Unix timestamp in seconds to access the livestream analytics.`}).option(`filters`,{type:`string`,description:`Optional filters for livestream analytics.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ee={command:`get <app-id>`,describe:`Fetch day-wise analytics data for your livestreams`,builder:h,handler:async c=>s({command:`realtime kit analytics livestreams daily get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={start_time:c[`start-time`],end_time:c[`end-time`],filters:c.filters};if(c.dryRun){a({command:`cf realtime kit analytics livestreams daily get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/realtime/kit/${c[`app-id`]==null?`<app-id>`:encodeURIComponent(String(c[`app-id`]))}/analytics/livestreams/daywise`,pathParams:{"app-id":String(c[`app-id`]??``)},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await n();c.accountId=u,i(await o(`Loading`,async()=>l.realtime.kit.analytics.livestreams.daily.get({account_id:u,app_id:c[`app-id`],...s})),{successLabel:`Loaded`})})},te={command:`daily`,describe:`Daily livestream analytics for RealtimeKit applications`,builder:e=>e.command(ee).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function g(e){return e.usage(`$0 realtime kit analytics livestreams get <app-id>
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{r as e}from"./theme-BIWQFmZ0.mjs";import{n as t,t as n}from"./local-Cyk8fPvL.mjs";import{a as r,t as i}from"./context-CE7QFX-z.mjs";import{a,o,r as s}from"./auth-gOCL6Pm0.mjs";import{t as c}from"./output-CvQFJkvi.mjs";import{t as l}from"./dry-run-Bq0JAsbX.mjs";import{t as u}from"./progress-CRjK46r1.mjs";import{n as d,t as f}from"./run-huwFFwXd.mjs";import"./telemetry-B4_YhD82.mjs";import{i as p,n as m,r as h,t as g}from"./body-parser-hh2avzkz.mjs";import{n as _}from"./input-validation-Dk52b0me.mjs";import{a as v,i as y,n as ee,o as b,r as x}from"./prompt-C_90YsVE.mjs";import{t as S}from"./cli-types-DoVT5q_M.mjs";import{_ as C,a as w,c as T,d as E,g as D,h as O,i as k,m as A,o as j,p as M,r as N,s as te,t as ne,u as re}from"./schema-flags-nL7pHvaE.mjs";import{domainToASCII as ie}from"node:url";import{isDeepStrictEqual as ae}from"node:util";function oe(e){return e.usage("$0 registrar extensions get <extension>\n\nReturns metadata and JSON Schema documents describing the expected input structure for registration and transfer operations on a specific extension (TLD). Supports HTTP conditional GET via `ETag`. Include the `ETag` value from a previous response in an `If-None-Match` header to receive a `304 Not Modified` when the data has not changed.").positional(`extension`,{type:`string`,description:"The extension name (e.g., `com`, `co.uk`).",demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const se={command:`get <extension>`,describe:`Get extension`,builder:oe,handler:async e=>f({command:`registrar extensions get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){l({command:`cf registrar extensions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/registrar/extensions/${e.extension==null?`<extension>`:encodeURIComponent(String(e.extension))}`,pathParams:{extension:String(e.extension??``)},bodyKind:`none`});return}let t=await s(e),a=e.local?n:await i();e.accountId=a,c(await u(`Loading`,async()=>t.registrar.extensions.get({account_id:a,extension:e.extension})),{successLabel:`Loaded`})})};function ce(e){return e.usage("$0 registrar extensions list\n\nReturns metadata and JSON Schema documents describing the expected input structure for registration and transfer operations on each supported extension (TLD). This endpoint uses cursor-based pagination. Results are ordered by extension name by default. To fetch the next page, pass the `cursor` value from the `result_info` object in the response as the `cursor` query parameter in your next request. An empty `cursor` string indicates there are no more pages. Supports HTTP conditional GET via `ETag`. Include the `ETag` value from a previous response in an `If-None-Match` header to receive a `304 Not Modified` when the data has not changed.").option(`name`,{type:`string`,description:"Filter extensions by exact name match.\nFor example, `name=com` returns only the `com` extension."}).option(`cursor`,{type:`string`,description:`Opaque token from a previous response's \`result_info.cursor\`.
2
+ import{r as e}from"./theme-BIWQFmZ0.mjs";import{n as t,t as n}from"./local-CQc36Viv.mjs";import{a as r,t as i}from"./context-M2Ho8pi3.mjs";import{a,o,r as s}from"./auth-BjxUTZWb.mjs";import{t as c}from"./output-CvQFJkvi.mjs";import{t as l}from"./dry-run-Bq0JAsbX.mjs";import{t as u}from"./progress-BnIv4lh5.mjs";import{n as d,t as f}from"./run-Duj1fsxa.mjs";import"./telemetry-Bn5lYtiy.mjs";import{i as p,n as m,r as h,t as g}from"./body-parser-hh2avzkz.mjs";import{n as _}from"./input-validation-Dk52b0me.mjs";import{a as v,i as y,n as ee,o as b,r as x}from"./prompt-DjRAo2Up.mjs";import{t as S}from"./cli-types-DoVT5q_M.mjs";import{_ as C,a as w,c as T,d as E,g as D,h as O,i as k,m as A,o as j,p as M,r as N,s as te,t as ne,u as re}from"./schema-flags-CK4J4XhG.mjs";import{domainToASCII as ie}from"node:url";import{isDeepStrictEqual as ae}from"node:util";function oe(e){return e.usage("$0 registrar extensions get <extension>\n\nReturns metadata and JSON Schema documents describing the expected input structure for registration and transfer operations on a specific extension (TLD). Supports HTTP conditional GET via `ETag`. Include the `ETag` value from a previous response in an `If-None-Match` header to receive a `304 Not Modified` when the data has not changed.").positional(`extension`,{type:`string`,description:"The extension name (e.g., `com`, `co.uk`).",demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const se={command:`get <extension>`,describe:`Get extension`,builder:oe,handler:async e=>f({command:`registrar extensions get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){l({command:`cf registrar extensions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/registrar/extensions/${e.extension==null?`<extension>`:encodeURIComponent(String(e.extension))}`,pathParams:{extension:String(e.extension??``)},bodyKind:`none`});return}let t=await s(e),a=e.local?n:await i();e.accountId=a,c(await u(`Loading`,async()=>t.registrar.extensions.get({account_id:a,extension:e.extension})),{successLabel:`Loaded`})})};function ce(e){return e.usage("$0 registrar extensions list\n\nReturns metadata and JSON Schema documents describing the expected input structure for registration and transfer operations on each supported extension (TLD). This endpoint uses cursor-based pagination. Results are ordered by extension name by default. To fetch the next page, pass the `cursor` value from the `result_info` object in the response as the `cursor` query parameter in your next request. An empty `cursor` string indicates there are no more pages. Supports HTTP conditional GET via `ETag`. Include the `ETag` value from a previous response in an `If-None-Match` header to receive a `304 Not Modified` when the data has not changed.").option(`name`,{type:`string`,description:"Filter extensions by exact name match.\nFor example, `name=com` returns only the `com` extension."}).option(`cursor`,{type:`string`,description:`Opaque token from a previous response's \`result_info.cursor\`.
3
3
  Pass this value to fetch the next page of results. Omit (or
4
4
  pass an empty string) for the first page.`}).option(`per-page`,{type:`number`,description:`Number of items to return per page.`}).option(`direction`,{type:`string`,description:`Sort direction for results. Defaults to ascending order.`,choices:[`asc`,`desc`]}).option(`sort-by`,{type:`string`,description:"Column to sort results by. Defaults to `name` when omitted.",choices:[`name`,`created_at`,`updated_at`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const le={command:`list`,describe:`List extensions`,builder:S(ce),handler:async e=>f({command:`registrar extensions list`,classification:{safeFlags:[`direction`,`sort-by`,`dry-run`]}},e,async()=>{let t={name:e.name,cursor:e.cursor,per_page:e[`per-page`],direction:e.direction,sort_by:e[`sort-by`]};if(e.dryRun){l({command:`cf registrar extensions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/registrar/extensions`,pathParams:{},query:t,bodyKind:`none`});return}let a=await s(e),o=e.local?n:await i();e.accountId=o,c(await u(`Loading`,async()=>a.registrar.extensions.list({account_id:o,...t})),{successLabel:`Loaded`})})},ue={command:`extensions`,describe:`Operations for extensions`,builder:e=>e.command(se).command(le).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};async function P(e,t,n){let r=b(n),i=ie(n.trim().replace(/\.$/,``)).toLowerCase(),a=await u(`Checking availability`,()=>e.registrar.registrations.check({account_id:t,domains:[n]})),o=i===``?[]:a.domains.filter(e=>e.name.toLowerCase()===i),s=o.length===1?o[0]:void 0;if(!s)throw Error(`The availability check returned no result for ${r}, so cf cannot safely register it.`);if(s.registrable!==!0&&s.reason===`domain_premium`)throw Error(`${r} is a premium domain (domain_premium). Premium registration is not supported by this API, so cf will not submit it.`);if(s.registrable!==!0){let e=s.reason===void 0?``:` (${b(s.reason)})`;throw Error(`${r} is not available for registration${e}.`)}if(s.tier===`premium`)throw Error(`${r} is a premium domain. Premium registration is not supported by this API, so cf will not submit it.`);if(s.tier!==`standard`)throw Error(`${r} is not confirmed as a standard domain. This API only supports standard registrations, so cf will not submit it.`);if(!s.pricing)throw Error(`The availability check returned no pricing for ${r}, so cf cannot safely register it.`);return s.pricing}const F=`registrar-extension-schema`;function de(e){let t=e.trim().toLowerCase().replace(/\.$/,``).split(`.`);return t.slice(1).map((e,n)=>t.slice(n+1).join(`.`))}async function fe(e,t,n,r){let i;try{i=r===void 0?await n.registrar.extensions.get({account_id:t,extension:e}):await n.registrar.extensions.get({account_id:t,extension:e},{timeoutInSeconds:r/1e3,maxRetries:0})}catch(e){return{ok:!1,reason:A(e)}}let a=O(i,`registration_schema`);return a?{ok:!0,extension:e,schema:a}:{ok:!1,reason:`the API returned no registration schema for .${e}`}}async function I(e,t,n,r,i){let a=t?[t]:de(e);if(a.length===0)return{ok:!1,reason:`'${e}' has no extension — pass a fully qualified domain name`};let o,s=`not found`;for(let e of a){let t=D(F,[n,e]);if(t)return{ok:!0,extension:e,schema:t};if(!o)try{o=await r()}catch(e){return{ok:!1,reason:A(e)}}let a;if(i!==void 0&&(a=i-Date.now(),a<=0))return{ok:!1,reason:`the request timed out`};let c=await fe(e,n,o,a);if(c.ok)return C(F,[n,e],c.schema),c;if(s=c.reason,!/not found/i.test(c.reason))return c}return{ok:!1,reason:a.length>1?`no registration schema for ${a.map(e=>`.${e}`).join(` or `)} (${s})`:s}}const pe=new Set([`domain_name`,`years`,`auto_renew`,`privacy_mode`]),me={acknowledgements:`Acknowledgements`,contact_extensions:`Registry Details`,contacts:`Contacts`};function L(e,t){return e!==void 0&&Object.hasOwn(e,t)?e[t]:void 0}function he(e){return e.replace(/([a-z0-9])([A-Z])/g,`$1 $2`).split(/[-_\s]+/).filter(Boolean).map(e=>`${e[0]?.toUpperCase()??``}${e.slice(1)}`).join(` `)}function R(e){return typeof e==`boolean`?e?`Yes`:`No`:e===null?`null`:typeof e==`string`||typeof e==`number`?String(e):JSON.stringify(e)??`undefined`}function z(e,t){return e.find(e=>e.path.length===t.length&&e.path.every((e,n)=>e===t[n]))}function ge(e,t,n){if(typeof t==`boolean`&&e.some(e=>e.includes(`acknowledgement`)))return t?`Accepted`:`Declined`;let r=z(n,e),i=R(t),a=L(r?.choiceLabels,i);if(a)return`${a} (${i})`;let o=(r?.schema.oneOf??r?.schema.anyOf)?.find(e=>e.title&&E(e,t).length===0);return o?.title?`${o.title} (${i})`:i}function _e(e,t){return e.map((n,r)=>r===e.length-1&&t?.schema.title?t.schema.title:L(me,n)??he(n)).join(` · `)}function B(e,t,n=[]){let r=[];for(let[i,a]of Object.entries(e)){if(n.length===0&&pe.has(i))continue;let e=[...n,i];if(typeof a==`object`&&a&&!Array.isArray(a)&&Object.keys(a).length>0){r.push(...B(a,t,e));continue}let o=z(t,e);r.push([_e(e,o),ge(e,a,t)])}return r.sort(([e],[t])=>e.localeCompare(t))}function V(e,t,n){if(Object.hasOwn(e,n))return R(e[n]);let r=ve(t,n);return r===void 0?`API default`:`${R(r)} (default)`}function H(e){return e===void 0?[]:[...e.default===void 0?[]:[e.default],...(e.allOf??[]).flatMap(H)]}function U(e,t){return e===void 0?[]:[...H(e.properties?.[t]),...(e.allOf??[]).flatMap(e=>U(e,t))]}function ve(e,t){let n=U(e,t),r=n[0];return n.length>0&&n.every(e=>ae(e,r))?r:void 0}function W(t){let n=t.map(([e,t])=>[b(e),b(t)]),r=Math.min(32,Math.max(...n.map(([e])=>e.length),0));return n.map(([t,n])=>`│ ${e.muted(t.padEnd(r))} ${e.bold(n)}`)}function ye(t){let n=[[`Domain`,t.domain],[`Account`,t.accountId],[`Registration term`,`${t.years} ${t.years===1?`year`:`years`}`],[`Due now`,t.quotedCost],[`Renewal price`,`${t.pricing.currency} ${t.pricing.renewal_cost} per year`],[`Auto-renew`,V(t.body,t.schema,`auto_renew`)],[`Privacy mode`,V(t.body,t.schema,`privacy_mode`)]],r=B(t.body,t.descriptors??[]);return[`│`,`${e.brand(`◇`)} ${e.bold(`Review registration`)}`,`│`,...W(n),...r.length>0?[`│`,`│ ${e.bold(`Registration details`)}`,...W(r)]:[],`│`].join(`
5
5
  `)}const G=[`domain_name`],K=`Fully qualified domain name to register, e.g. example.travel`,q=[`domain-name`,`domainName`,`extension`,`force`,`f`,`prefer`,`contacts`];function be(e){return`/${e.map(e=>e.replace(/~/g,`~0`).replace(/\//g,`~1`)).join(`/`)}`}function xe(e,t,n){return t.some(t=>{if(t.path[0]!==e||t.path.length===1)return!1;let r=t.name.replace(/-([a-z0-9])/g,(e,t)=>t.toUpperCase());return Object.hasOwn(n,t.name)&&n[t.name]!==void 0||Object.hasOwn(n,r)&&n[r]!==void 0})}function Se(e){if(e.choices===void 0)return;let t=(e.schema.enum??(e.schema.oneOf??e.schema.anyOf)?.flatMap(e=>e.const===void 0?e.enum??[]:[e.const]))?.filter(e=>typeof e==`string`||typeof e==`number`||typeof e==`boolean`);return t?.length===e.choices.length?t:void 0}function Ce(e){let t=e.type===`boolean`&&e.schema.const===!0,n=e.schema.description,r=n===void 0?void 0:b(n);return{path:be(e.path),flag:`--${e.name}`,question:te(e),description:r,choices:Se(e)?.map(t=>{let n=String(t);return{value:t,label:b(e.choiceLabels!==void 0&&Object.hasOwn(e.choiceLabels,n)?e.choiceLabels[n]??n:n)}}),requiredValue:e.schema.const,acknowledgementText:t?r:void 0}}function we(e,t,n,r,i){let a=w(n,r);return a.length===0?!1:(c({submitted:!1,reason:`registration_input_required`,message:`Not submitted. Additional registration input is required.`,domainName:e,extension:t,missingFields:a.map(Ce),validationErrors:i}),!0)}function Te(e){let t=/^(\d+)(?:\.(\d+))?$/.exec(e);if(!t)return;let n=t[2]??``;return{units:BigInt(`${t[1]}${n}`),scale:n.length}}function Ee(e,t){let n=Te(e.registration_cost),r=Te(e.renewal_cost);if(!n||!r)return;let i=Math.max(n.scale,r.scale),a=e=>10n**BigInt(e),o=n.units*a(i-n.scale)+r.units*a(i-r.scale)*BigInt(t-1);if(i===0)return o.toString();let s=a(i);return`${o/s}.${(o%s).toString().padStart(i,`0`)}`}function De(e,t){let n=Ee(e,t);if(!n||!/^[A-Z]{3}$/.test(e.currency))throw Error(`The availability check returned invalid pricing, so cf cannot safely confirm this registration.`);return`${e.currency} ${n}`}function J(e,t){return e.flatMap(e=>t.map(t=>[...e,...t]))}function Y(e,t,n,r=!1,i=[]){let a=e.properties?.[t],o=a!==void 0,s=[a===void 0?[]:[a]],c=e.if&&e.then&&N(e.if)&&E(e.if,n).length===0?[e.then]:[];for(let a of[...e.allOf??[],...c]){let e=Y(a,t,n,r,i);e.found&&(o=!0,s=J(s,e.bundles))}for(let a of[e.oneOf,e.anyOf]){if(!a?.length)continue;let e=r&&a.every(N)?a.filter(e=>je(e,t,n,i)):[],c=(e.length>0?e:a).map(e=>Y(e,t,n,r,i));c.some(e=>e.found)&&(o=!0,s=J(s,c.flatMap(e=>e.bundles)))}return{found:o,bundles:s}}function X(e,t){let n=e[t];return[...n===void 0?[]:[n],...(e.allOf??[]).flatMap(e=>X(e,t))]}function Z(e){return e.length===0?{}:e.length===1?e[0]??{}:{allOf:e}}function Oe(e){let t=[...typeof e.minimum==`number`?[e.exclusiveMinimum===!0?Math.floor(e.minimum)+1:Math.ceil(e.minimum)]:[],...typeof e.exclusiveMinimum==`number`?[Math.floor(e.exclusiveMinimum)+1]:[],...(e.allOf??[]).flatMap(e=>{let t=Oe(e);return t===void 0?[]:[t]})];return t.length>0?Math.max(1,...t):void 0}function ke(e){let t=X(e,`const`);if(t.length>0)return t.every(e=>Object.is(e,t[0]))?{found:!0,value:t[0]}:{found:!1};let n=X(e,`default`);if(n.length>0)return n.every(e=>Object.is(e,n[0]))?{found:!0,value:n[0]}:{found:!1};let r=Oe(e);return r===void 0?{found:!1}:{found:!0,value:r}}function Q(e){let{allOf:t,anyOf:n,oneOf:r,...i}=e,a=[Object.keys(i).length===0?[]:[i]];for(let e of t??[])a=J(a,Q(e).map(e=>[e]));for(let e of[r,n])e?.length&&(a=J(a,e.flatMap(e=>Q(e).map(e=>[e]))));return a.map(Z)}function Ae(e){return e.flatMap(e=>Q(e).map(t=>({schema:e,candidate:ke(t)})))}function je(e,t,n,r){let i=E(e,n);return Object.hasOwn(n,t)||i.length===0?i.length===0:r.some(r=>E(e,{...n,[t]:r}).length===0)}function Me(e,t){let n=Object.hasOwn(e,`years`),r=Y(t,`years`,e,!1);if(!r.found)throw Error(`The extension schema returned no registration-term field, so cf cannot safely confirm this registration.`);let i=r.bundles.map(Z),a=Y(t,`years`,e,!0,n?[]:Ae(i).flatMap(({schema:e,candidate:t})=>t.found&&E(e,t.value).length===0?[t.value]:[]));if(!a.found||n&&a.bundles.some(e=>e.length===0))throw Error(`The extension schema returned no registration-term field, so cf cannot safely confirm this registration.`);let o=a.bundles.map(Z),s=o,c,l;if(n)l=e.years;else{let n=Ae(o).filter(({schema:e,candidate:t})=>{if(!t.found)return!0;let[n]=E(e,t.value);return n===void 0?!0:(c??=n,!1)});if(N(t)){let r=n.filter(({candidate:e})=>!e.found),i=n.filter(({candidate:n})=>n.found&&E(t,{...e,years:n.value}).length===0);i.length>0&&(n=[...r,...i])}s=n.map(({schema:e})=>e);let r=n.map(({candidate:e})=>e),[i]=r;l=i?.found===!0&&r.every(e=>e.found&&Object.is(e.value,i.value))?i.value:void 0}if(typeof l!=`number`||!Number.isInteger(l)||l<=0)throw!n&&s.length===0&&c?Error(`The extension schema returned an invalid default registration term: ${c}`):Error(n?`The requested registration term must be a positive whole number of years.`:`The extension schema returned no safe default registration term, so cf cannot safely confirm this registration.`);let u=n?E(o.length===1?o[0]??{}:{anyOf:o},l):s.flatMap(e=>E(e,l));if(u.length>0)throw Error(n?`The requested registration term is invalid: ${u[0]}`:`The extension schema returned an invalid default registration term: ${u[0]}`);return e.years=l,l}let Ne;function $(e){let t=_(e,`domain-name`,`text`);if(t!==void 0&&typeof t!=`string`)throw Error(`--domain-name must be a string`);return t}function Pe(e){return Ne=e,e.positional(`domain-name`,{type:`string`,description:`Fully qualified domain name, e.g. example.travel`}).option(`extension`,{type:`string`,description:`Extension whose registration schema to use (default: derived from the domain)`}).option(`prefer`,{type:`string`,description:"Set the Prefer header, e.g. `respond-async` to skip the synchronous wait"}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip the registration confirmation prompt`,default:!1}).option(`contacts`,{type:`string`,description:`Registrant contacts as inline JSON or @path to a reusable JSON file`}).option(`body`,{type:`string`,description:`Raw JSON request body, or @path to a JSON file`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).strictOptions(!1).help(!1).option(`help`,{type:`boolean`,alias:`h`,description:`Show help, including this extension's input flags`}).epilogue("Input flags depend on the extension: run `cf registrar registrations create <domain> --help`.\ncf rechecks availability and pricing before confirmation. Run `cf registrar registrations check --domains <domain>` to inspect them separately.")}async function Fe(t){Ne?.showHelp(`log`);let n=$(t[`domain-name`]);if(!n)return;let r=b(n);if(t.local){console.log(`\n${e.muted(`Registration fields are unavailable in local mode.`)}`);return}let i=Date.now()+M,a=await o(i);if(!a){console.log(`\n${e.muted(`Set \`CLOUDFLARE_ACCOUNT_ID\` or sign in with \`cf auth login\` to see the registration fields for ${r}.`)}`);return}let c=await I(n,t.extension,a,()=>s(t),i);console.log(c.ok?`\n${j(T(c.schema,{exclude:[G]}),`Registration fields for .${c.extension}`)}`:`\n${e.muted(`Could not load the registration fields for ${r}: ${b(c.reason)}.`)}`)}async function Ie(e,t,n){for(;;){let r=k(e,t,n);if(r.length===0)return!0;for(let e of r){let n=e.description??``,r=te(e);if(e.type===`boolean`&&e.schema.const===!0){let r=b(e.schema.description??n);if(!await x(e.name,r))return!1;t[e.name]=!0}else e.choices?.length?t[e.name]=await y(e.name,r,e.choices,e.choiceLabels):t[e.name]=await v(e.name,r,{validate:t=>re(e,t)})}}}function Le(e){let t=m(e);if(typeof t!=`object`||!t||Array.isArray(t))throw Error(`--body must contain a JSON object`);return t}function Re(e){let t;if(e.startsWith(`@`))t=_(e,`contacts`,`json`);else try{t=JSON.parse(e)}catch{throw Error(`--contacts must contain a JSON object or @path to a JSON file`)}if(typeof t!=`object`||!t||Array.isArray(t))throw Error(`--contacts must contain a JSON object or @path to a JSON file`);return t}var ze=d({command:`create [domain-name]`,describe:"Register a domain. Billable and non-refundable — input fields are extension-specific, see `create <domain> --help`",builder:Pe,handler:async e=>{if(e.help){await Fe(e);return}if(e.local)throw Error(t);let n={};e.prefer!==void 0&&(n.Prefer=String(e.prefer));let o;if(e.body!==void 0){let t=ne([],e,{reserved:q}).errors.some(e=>e.startsWith(`Unknown flag`));if(e.contacts!==void 0||t)throw Error(`--body cannot be combined with registration field flags. Pass one or the other.`);o=Le(e.body)}let d=e.contacts===void 0?void 0:Re(e.contacts),f=$(e[`domain-name`]),p=o?.domain_name;if(p!==void 0&&typeof p!=`string`)throw Error(`--body field domain_name must be a string`);if(f!==void 0&&p!==void 0&&f!==p)throw Error(`The positional domain '${b(f)}' does not match --body domain_name '${b(p)}'`);let m=f??p;if(!m){if(o!==void 0){c({submitted:!1,reason:`registration_input_required`,message:`Not submitted. A domain is required to determine the registration schema.`,missingFields:[{path:`/domain_name`,flag:`--domain-name`,question:K}],validationErrors:["`/domain_name` is required"]});return}m=await v(`domain-name`,K)}let h=b(m);o&&(o.domain_name=m);let g=e.dryRun?await r()??`<account-id>`:await i(),_,y=async()=>(_||=await s(e),_);e.dryRun||await P(await y(),g,m);let x=await I(m,e.extension,g,y);if(!x.ok)throw Error(`Could not load the registration schema for ${h}: ${b(x.reason)}.`);let S=b(x.extension),C=x.schema,w=T(x.schema,{exclude:[G]});if(!o){if(d!==void 0&&xe(`contacts`,w,e))throw Error(`--contacts cannot be combined with --contacts-* fields. Pass one or the other.`);let t={...e},n=d===void 0?void 0:{contacts:d};if(n!==void 0&&delete t.contacts,!await Ie(w,t,n))return;let r=ne(w,t,{reserved:q,baseBody:n});if(r.errors.length>0)throw Error(`${r.errors.join(`