cf 1.0.0-beta.24 → 1.0.0-beta.25

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 (238) hide show
  1. package/dist/_meta/commands.json +478 -141
  2. package/dist/_meta/hand-written-commands.json +44 -0
  3. package/dist/_meta/schemas.json +254 -2
  4. package/dist/{abuse-reports-CTOO4FJ4.mjs → abuse-reports-BIS9MZn7.mjs} +3 -3
  5. package/dist/{access-DFGLlXpy.mjs → access-__sFDSFL.mjs} +1 -1
  6. package/dist/{accounts-C-wpV8Az.mjs → accounts-CmggwRjh.mjs} +36 -34
  7. package/dist/{acm-thIt17mv.mjs → acm-AAhRZUAU.mjs} +1 -1
  8. package/dist/{addressing-D7VI7-Oi.mjs → addressing-DVeJNPZc.mjs} +1 -1
  9. package/dist/{agent-memory-duLTH8pl.mjs → agent-memory-DQhWO6sc.mjs} +1 -1
  10. package/dist/{ai-ctIjDCq0.mjs → ai-CULO9sno.mjs} +3 -3
  11. package/dist/{ai-audit-CjhuS21p.mjs → ai-audit-udn4HF34.mjs} +1 -1
  12. package/dist/{ai-gateway-B1TIw7wl.mjs → ai-gateway-Bm2MMdec.mjs} +3 -3
  13. package/dist/{ai-search-DUQBnOWH.mjs → ai-search-GRN_gXgU.mjs} +1 -1
  14. package/dist/{ai-security-bdABwEIR.mjs → ai-security-DXy9ht-9.mjs} +2 -2
  15. package/dist/{alerting-I_KErGZy.mjs → alerting-CssnaN2i.mjs} +1 -1
  16. package/dist/{analytics-DGxcDAWu.mjs → analytics-BVo7Ax0w.mjs} +1 -1
  17. package/dist/{analytics-engine-DNNokw1O.mjs → analytics-engine-BBd0Bydx.mjs} +1 -1
  18. package/dist/{api-security-CsPrJ-Xw.mjs → api-security-C-D9OKtH.mjs} +3 -3
  19. package/dist/{argo-BhNmRYk5.mjs → argo-DSziwzvA.mjs} +1 -1
  20. package/dist/{artifacts-DRo8KadB.mjs → artifacts-nVMgn4dn.mjs} +1 -1
  21. package/dist/{audit-logs-CzxDyTbx.mjs → audit-logs-DIZ5oA_y.mjs} +1 -1
  22. package/dist/auth-Bls_1yRW.mjs +2 -0
  23. package/dist/{auth-pbuzyz4C.mjs → auth-CB9wjyad.mjs} +1 -1
  24. package/dist/auth-JsvLULHA.mjs +7 -0
  25. package/dist/{auth-token-BcIV7k1B.mjs → auth-token-BAgw7kYP.mjs} +1 -1
  26. package/dist/{autoconfig-CXcy-e1R.mjs → autoconfig-CajkMb3B.mjs} +19 -11
  27. package/dist/{basin-catalog-DoTn8zvi.mjs → basin-catalog-BRvGeKm3.mjs} +9 -9
  28. package/dist/{billing-CMbLzZV0.mjs → billing-BhPoqyKC.mjs} +1 -1
  29. package/dist/{blocks-DmOx-xEv.mjs → blocks-D2tE8dp2.mjs} +1 -1
  30. package/dist/{bot-management-CJs5WwAW.mjs → bot-management-BfjX5DuH.mjs} +1 -1
  31. package/dist/{botnet-feed-DeF7P5lI.mjs → botnet-feed-VOL5P4s3.mjs} +1 -1
  32. package/dist/{brand-protection-dx_B8OWa.mjs → brand-protection-CSVHQ9Pt.mjs} +2 -2
  33. package/dist/{browser-run-fRn9ItYu.mjs → browser-run-cxOd2cZE.mjs} +1 -1
  34. package/dist/{build-CCepbVuJ.mjs → build-BfkzV5_c.mjs} +1 -1
  35. package/dist/build-DCdLWwOg.mjs +2 -0
  36. package/dist/{builds-5YhQ_zIm.mjs → builds-y5BQCJ81.mjs} +1 -1
  37. package/dist/{cache-WQyxt7O5.mjs → cache-Bvr988Hj.mjs} +1 -1
  38. package/dist/cf-DgLg6Hop.mjs +18 -0
  39. package/dist/{chunk-3PJ54H4K-C8sxQzhB.mjs → chunk-3PJ54H4K-CbRAWQWI.mjs} +1 -1
  40. package/dist/{chunk-DSGVRFIS-CP2xC0bc.mjs → chunk-DSGVRFIS-Dq2PrGsi.mjs} +1 -1
  41. package/dist/{cli-CgkhNdjb.mjs → cli-BTxJfFus.mjs} +1 -1
  42. package/dist/{client-side-security-COuAb7BM.mjs → client-side-security-CFmO0uz9.mjs} +1 -1
  43. package/dist/{cloud-connector-D1gjX0Dx.mjs → cloud-connector-CtwPdFBa.mjs} +1 -1
  44. package/dist/{cloudflared-FEg1GxHT.mjs → cloudflared-DPkNN1Qv.mjs} +1 -1
  45. package/dist/{cloudforce-one-BmXgL6kB.mjs → cloudforce-one-DHrMaxnU.mjs} +58 -58
  46. package/dist/{command-BfoLlrr1.mjs → command-6_Ms3TZv.mjs} +1 -1
  47. package/dist/{command-DrdxR1tJ.mjs → command-BWyx7dNO.mjs} +1 -1
  48. package/dist/{command-qhfkede5.mjs → command-BXCk1OsI.mjs} +1 -1
  49. package/dist/{command-WyIFe__L.mjs → command-CCDzJjIB.mjs} +1 -1
  50. package/dist/{command-BG9JYUHo.mjs → command-CDYTsmxe.mjs} +1 -1
  51. package/dist/{command-Dsi4sM8D.mjs → command-CXwKBbj9.mjs} +1 -1
  52. package/dist/{command-8hWrCCy6.mjs → command-ClneauMx.mjs} +1 -1
  53. package/dist/{command-BJFKdqVc.mjs → command-CmK8-DJ9.mjs} +1 -1
  54. package/dist/{command-BaIY4UuC.mjs → command-Ct3tf-P5.mjs} +1 -1
  55. package/dist/{command-hh8rEbH4.mjs → command-DPOjEs1B.mjs} +1 -1
  56. package/dist/{command-D3E7d8E7.mjs → command-DqWBPiew.mjs} +1 -1
  57. package/dist/{command-BXPssGfS.mjs → command-YFWLEK8W.mjs} +1 -1
  58. package/dist/{command-CA6yIa17.mjs → command-ckixJeTm.mjs} +1 -1
  59. package/dist/{command-B_Fxpr5v.mjs → command-lJJ7sEZe.mjs} +1 -1
  60. package/dist/{completions-BshG3sAO.mjs → completions-B1rYgw_a.mjs} +1 -1
  61. package/dist/{connector-interrupts-pNU4QmsW.mjs → connector-interrupts-DecTdK6X.mjs} +1 -1
  62. package/dist/{connector-telemetry-events-BpRPtTdD.mjs → connector-telemetry-events-wePxPACj.mjs} +1 -1
  63. package/dist/{connector-telemetry-snapshots-pNfynA2r.mjs → connector-telemetry-snapshots-D8sXR1qx.mjs} +1 -1
  64. package/dist/{connectors-CiWTAGHh.mjs → connectors-C-6RQ_Q1.mjs} +1 -1
  65. package/dist/{containers-IBtaInTL.mjs → containers-C_byVTZF.mjs} +193 -193
  66. package/dist/{containers-Dvq0NjQg.mjs → containers-D65Gpj9Q.mjs} +2 -2
  67. package/dist/{content-scan-B69hOyhb.mjs → content-scan-DbIDQ-Yu.mjs} +1 -1
  68. package/dist/{context-BryBS1zQ.mjs → context-DCon1tRZ.mjs} +1 -1
  69. package/dist/{cps-DLgWaZMT.mjs → cps-DGLmzCzp.mjs} +1 -1
  70. package/dist/{csam-scanner-D1928b81.mjs → csam-scanner-R7Ih-Dnw.mjs} +1 -1
  71. package/dist/{custom-csrs-DrxWBjmx.mjs → custom-csrs-D0RnVoJ7.mjs} +1 -1
  72. package/dist/{custom-hostnames-BP1pxK1F.mjs → custom-hostnames-BFWR-tR_.mjs} +1 -1
  73. package/dist/{custom-nameservers-5DJLY479.mjs → custom-nameservers-Dn_9Ssti.mjs} +1 -1
  74. package/dist/{custom-pages-CNAsOY9a.mjs → custom-pages-HqIQcb77.mjs} +1 -1
  75. package/dist/{d1-Dge80Qgq.mjs → d1-CopIY9RT.mjs} +2 -2
  76. package/dist/{delegate-CBKb0nov.mjs → delegate-CTj0dYET.mjs} +1 -1
  77. package/dist/delegate.mjs +1 -1
  78. package/dist/{deploy-CR5b7uhB.mjs → deploy-BVTA83rN.mjs} +1 -1
  79. package/dist/{deploy-context-D51tgJGI.mjs → deploy-context-CO8ZSRwx.mjs} +1 -1
  80. package/dist/{deploy-input-em95cFc7.mjs → deploy-input-PhKRxa_2.mjs} +1 -1
  81. package/dist/{dev-BczBHbpj.mjs → dev-CM5GLHNn.mjs} +1 -1
  82. package/dist/{diagnostics-BKKinCge.mjs → diagnostics-DPjl0aCm.mjs} +1 -1
  83. package/dist/{dist-D5YYi2LO.mjs → dist-ataVE8ob.mjs} +3 -3
  84. package/dist/{dls-DU4HnxED.mjs → dls-BLTIVlbh.mjs} +1 -1
  85. package/dist/{dns-BzdH3geY.mjs → dns-DkqVq-nB.mjs} +60 -58
  86. package/dist/{dns-firewall-puq_86Wd.mjs → dns-firewall-D1bb1byu.mjs} +1 -1
  87. package/dist/{docs-AWb7X2VX.mjs → docs-tOv_OllI.mjs} +1 -1
  88. package/dist/{durable-objects-Dg6XPcsB.mjs → durable-objects-OJhns_to.mjs} +1 -1
  89. package/dist/{email-auth-DXR0NU9R.mjs → email-auth-BbsIBNlu.mjs} +1 -1
  90. package/dist/{email-domains-B00mAtjT.mjs → email-domains-pWZi1M4q.mjs} +1 -1
  91. package/dist/{email-routing-Cm19q9hA.mjs → email-routing-DnitWE1A.mjs} +1 -1
  92. package/dist/{email-security-CFKcS-DM.mjs → email-security-DiWtb7cx.mjs} +2 -2
  93. package/dist/{email-sending-B3xSoKcC.mjs → email-sending-DuDjXykw.mjs} +1 -1
  94. package/dist/{errors-CIQDUrWg.mjs → errors-CCFmptqJ.mjs} +1 -1
  95. package/dist/{field-extractors-Csz8QknP.mjs → field-extractors-DNNnkBZH.mjs} +1 -1
  96. package/dist/{firewall-C8FW0Nb2.mjs → firewall-C7eZRNVF.mjs} +22 -16
  97. package/dist/{flagship-v-bGZ_U-.mjs → flagship-BczjsrJ5.mjs} +1 -1
  98. package/dist/{fraud-VvfL2I5a.mjs → fraud-wE0UM2SM.mjs} +1 -1
  99. package/dist/{google-tag-gateway-DF6fS2MQ.mjs → google-tag-gateway-6mvtxcJK.mjs} +1 -1
  100. package/dist/{healthchecks-D3p3E4WL.mjs → healthchecks-aIB3DebS.mjs} +1 -1
  101. package/dist/{hyperdrive-DopYL1dK.mjs → hyperdrive-DHRP8SJS.mjs} +1 -1
  102. package/dist/{iam-cIfyshlf.mjs → iam-6t7-ScrS.mjs} +1 -1
  103. package/dist/{images-BR5fP_6r.mjs → images-CLgvxd0t.mjs} +1 -1
  104. package/dist/index.mjs +1 -1
  105. package/dist/{init-JXRQoqGP.mjs → init-B_DBTMXU.mjs} +1 -1
  106. package/dist/{intel-BvNrrM7V.mjs → intel-jnoIVlYG.mjs} +2 -2
  107. package/dist/{interactive-DOWEcR6_.mjs → interactive-1g0dnrA8.mjs} +1 -1
  108. package/dist/{internal-DcnAVlpA.mjs → internal-Ba3b-Z8J.mjs} +1 -1
  109. package/dist/{ips-BUEIuhhw.mjs → ips-CQ4gFfex.mjs} +1 -1
  110. package/dist/{k2-Dm4LvAhL.mjs → k2-Bsm6rzNX.mjs} +1 -1
  111. package/dist/{kv-7oD-JIak.mjs → kv-DQfnNE-w.mjs} +1 -1
  112. package/dist/{lazy-command-CD1nuS38.mjs → lazy-command-DjGzxiUT.mjs} +1 -1
  113. package/dist/{leaked-credential-checks-B6s8hUYU.mjs → leaked-credential-checks-CaqjG3Oz.mjs} +1 -1
  114. package/dist/list-4MfEFwJN.mjs +2 -0
  115. package/dist/list-ByCv9-Fl.mjs +2 -0
  116. package/dist/{live-CHP4AXSN.mjs → live-BfobGv8W.mjs} +1 -1
  117. package/dist/{load-balancers-B_yvINGW.mjs → load-balancers-BzSCp2Uh.mjs} +1 -1
  118. package/dist/{local-CIeKNHSz.mjs → local-BNmz58v4.mjs} +1 -1
  119. package/dist/local-ChR3YIMU.mjs +2 -0
  120. package/dist/{local-runtime-DOSBgJlo.mjs → local-runtime-DvH92pV8.mjs} +1 -1
  121. package/dist/{login-h8vuvNN3.mjs → login-B9wYab6S.mjs} +2 -2
  122. package/dist/login-ierSCYE6.mjs +2 -0
  123. package/dist/{logpush-B70rNMOP.mjs → logpush-DgfiSd1b.mjs} +2 -2
  124. package/dist/{logs-DqmqCNqQ.mjs → logs-Dan7xU-k.mjs} +1 -1
  125. package/dist/{magic-cloud-networking-CurtlBvl.mjs → magic-cloud-networking-DP8fWC4a.mjs} +3 -3
  126. package/dist/{magic-network-monitoring-OzpX7MfI.mjs → magic-network-monitoring-TAjt04vN.mjs} +1 -1
  127. package/dist/{magic-transit-Ca_CROhr.mjs → magic-transit-BSuLHnQ5.mjs} +1 -1
  128. package/dist/{managed-defense-BRxv0mgy.mjs → managed-defense-CTnIZLg4.mjs} +1 -1
  129. package/dist/{managed-transforms-C7YLIPdN.mjs → managed-transforms-BETvesjp.mjs} +1 -1
  130. package/dist/{mcp-B_StIx94.mjs → mcp-DhjMGaKc.mjs} +1 -1
  131. package/dist/{mesh-YW-p6Tkx.mjs → mesh-jxLLG3t4.mjs} +1 -1
  132. package/dist/{migrate-CrBgU7Xm.mjs → migrate-Bkhk38nJ.mjs} +1 -1
  133. package/dist/{monetization-rMP8HK_4.mjs → monetization-BqDgHlPv.mjs} +1 -1
  134. package/dist/{network-D9Do7C-u.mjs → network-D6BRpgOv.mjs} +2 -2
  135. package/dist/{network-interconnects-DYMhB3TR.mjs → network-interconnects-tP41GbnL.mjs} +1 -1
  136. package/dist/{o11y-HT9_9NUF.mjs → o11y-h4cIC_1T.mjs} +1 -1
  137. package/dist/{oauth-D6uh5ZdS.mjs → oauth-CuM12iNb.mjs} +1 -1
  138. package/dist/{oauth-clients-B_BJco0Z.mjs → oauth-clients-B0voUiXM.mjs} +1 -1
  139. package/dist/{oauth-DetIFT59.mjs → oauth-nDH3nTCa.mjs} +2 -2
  140. package/dist/oauth-scopes-Bhns1ZHW.mjs +4 -0
  141. package/dist/{organization-DhxMPdqU.mjs → organization-Cy55HoRR.mjs} +4 -4
  142. package/dist/organizations-7Q3d9vcW.mjs +4 -0
  143. package/dist/{origin-post-quantum-encryption-CPZQGLmW.mjs → origin-post-quantum-encryption-XBMPCdSL.mjs} +1 -1
  144. package/dist/package-DK3JX4I3.mjs +2 -0
  145. package/dist/{page-rules-0nDfdFWr.mjs → page-rules-BlT5xlhH.mjs} +1 -1
  146. package/dist/{pages-Br-w5HLL.mjs → pages-CIbL62L2.mjs} +2 -2
  147. package/dist/{pay-per-crawl-Di6UpJoo.mjs → pay-per-crawl-BzsBqo_m.mjs} +1 -1
  148. package/dist/{pay-per-use-Bm7Nxf6s.mjs → pay-per-use-DtejLYJ8.mjs} +1 -1
  149. package/dist/{pipelines-BRVI3bV9.mjs → pipelines-LjLb8jq6.mjs} +1 -1
  150. package/dist/{precursor-DyrQWdO5.mjs → precursor-BKp5_Ag4.mjs} +1 -1
  151. package/dist/{previews-rpfwcJzi.mjs → previews-zRYO9uO9.mjs} +1 -1
  152. package/dist/{progress-C_yVLVcl.mjs → progress-_Jux05O5.mjs} +1 -1
  153. package/dist/{prompt-kxvGZ6nF.mjs → prompt-SNVLBS1b.mjs} +1 -1
  154. package/dist/{queues-BGV3aC26.mjs → queues-Ci4rGGC4.mjs} +1 -1
  155. package/dist/{r2-CWMqr3JJ.mjs → r2-qm2hgS43.mjs} +1 -1
  156. package/dist/radar-C_ydbJe_.mjs +300 -0
  157. package/dist/{raw-fetch-C_hWBr7n.mjs → raw-fetch-D3ydyJYW.mjs} +1 -1
  158. package/dist/{ready-BXz5amSL.mjs → ready-hk-_B8z3.mjs} +1 -1
  159. package/dist/{realtime-9jG5GaNK.mjs → realtime-BAvjYmYw.mjs} +2 -2
  160. package/dist/{registrar-C-2I1SJh.mjs → registrar-DD7WZaP2.mjs} +10 -10
  161. package/dist/{registrar-sandbox-D9ldxGPo.mjs → registrar-sandbox-DbxloH5s.mjs} +2 -2
  162. package/dist/{reporting-Bk3dc6Gi.mjs → reporting-CRVg3J1C.mjs} +1 -1
  163. package/dist/{request-headers-B5Rjq7Ic.mjs → request-headers-Cn01EsbI.mjs} +1 -1
  164. package/dist/{request-tracers-H-iRAUdG.mjs → request-tracers-BWs0rdFS.mjs} +1 -1
  165. package/dist/{resource-sharing-A6ITunsT.mjs → resource-sharing-yipIkdbd.mjs} +2 -2
  166. package/dist/{rules-BntvQdnS.mjs → rules-CCtaBLiN.mjs} +1 -1
  167. package/dist/{rulesets-DKz_iYU_.mjs → rulesets-DBEvCNDS.mjs} +1 -1
  168. package/dist/{rum-D9zpcNqT.mjs → rum-gDOKylu_.mjs} +1 -1
  169. package/dist/{run-BlSXngtI.mjs → run-Br8sYjNF.mjs} +1 -1
  170. package/dist/run-LOgTLpob.mjs +2 -0
  171. package/dist/schema-cache-Cb64Nqbt.mjs +3 -0
  172. package/dist/schema-flags-BcbbCWR5.mjs +4 -0
  173. package/dist/{scim-DVhxKKpH.mjs → scim-CM8Xah56.mjs} +1 -1
  174. package/dist/{secrets-store-3mxJrDWJ.mjs → secrets-store-BEnXiYCC.mjs} +2 -2
  175. package/dist/{security-insights-BDLWuG0E.mjs → security-insights-Be5GvdBA.mjs} +5 -5
  176. package/dist/{security-txt-COzdrpdW.mjs → security-txt-BF0PWAEW.mjs} +1 -1
  177. package/dist/{session-X3xaW70I.mjs → session-B7vOqdZU.mjs} +1 -1
  178. package/dist/{shared-foRpbmSV.mjs → shared-CBMFY1VY.mjs} +1 -1
  179. package/dist/{signed-url-Dgi1p-Qi.mjs → signed-url-VDDQlllt.mjs} +1 -1
  180. package/dist/{smart-shield-DSDA5bZt.mjs → smart-shield-DQku_wYi.mjs} +1 -1
  181. package/dist/{snippets-myowgDLd.mjs → snippets-B3FCEMuh.mjs} +1 -1
  182. package/dist/{spawn-C8D5pzxJ.mjs → spawn-9sE67p7c.mjs} +1 -1
  183. package/dist/{spectrum-CB-NzbZ7.mjs → spectrum-nLirlVue.mjs} +5 -5
  184. package/dist/{speed-UqKG1WDl.mjs → speed-C1hCyMPy.mjs} +1 -1
  185. package/dist/{sql-BzikdIje.mjs → sql-DVQOKThL.mjs} +1 -1
  186. package/dist/{src-B9agxHh8.mjs → src-Bh2gHpI7.mjs} +5 -5
  187. package/dist/{ssl-BmWWsUX6.mjs → ssl-CYDRgr24.mjs} +2 -2
  188. package/dist/{startup-profile-B7yHR_YB.mjs → startup-profile-BLvw_Wmc.mjs} +1 -1
  189. package/dist/startup-profile-ByxSdhEl.mjs +2 -0
  190. package/dist/{state-DNuVv5i-.mjs → state-B8n0QU04.mjs} +1 -1
  191. package/dist/state-BTOzaT5L.mjs +2 -0
  192. package/dist/{stream-G87TzC9e.mjs → stream-DHyejrI6.mjs} +1 -1
  193. package/dist/{tags-Ctl4fLux.mjs → tags-DOL6dKQE.mjs} +2 -2
  194. package/dist/{telemetry-CA0_i9-l.mjs → telemetry-DJ8-Q2pU.mjs} +1 -1
  195. package/dist/telemetry-kjElc1zT.mjs +2 -0
  196. package/dist/{tenant-t5yPFQOx.mjs → tenant-2EdATz2Y.mjs} +1 -1
  197. package/dist/{tenant-custom-nameservers-B2ehXfQK.mjs → tenant-custom-nameservers-DhEpJNST.mjs} +1 -1
  198. package/dist/{tunnels-DL_VgV0P.mjs → tunnels-CMAmH4Vh.mjs} +3 -3
  199. package/dist/{turnstile-CEjw5vn6.mjs → turnstile-DTJjDMFp.mjs} +1 -1
  200. package/dist/ui-7zujR-O7.mjs +2 -0
  201. package/dist/{update-check-LF-JcHRF.mjs → update-check-BkCdHK-3.mjs} +1 -1
  202. package/dist/{update-check-2Mn4Z1ln.mjs → update-check-DDGKWkmi.mjs} +1 -1
  203. package/dist/update-check-worker.mjs +1 -1
  204. package/dist/{url-normalization-BL_BkGvP.mjs → url-normalization-BbWOra1u.mjs} +1 -1
  205. package/dist/{url-scanner-CVzV9Syq.mjs → url-scanner-Bj-eS_3C.mjs} +2 -2
  206. package/dist/{user-YnQSmPNR.mjs → user-CMzTHHVX.mjs} +1 -1
  207. package/dist/{vectorize-C5ZwKQzI.mjs → vectorize-D4H7_KPs.mjs} +1 -1
  208. package/dist/version-DIIJ2ixL.mjs +2 -0
  209. package/dist/{waiting-rooms-D9V1Fm16.mjs → waiting-rooms-CqMbVu9s.mjs} +1 -1
  210. package/dist/{web-assets-yzPkWgLy.mjs → web-assets-BgfzyF8t.mjs} +5 -5
  211. package/dist/{web3-DbWNUhP4.mjs → web3-ByCe47FI.mjs} +1 -1
  212. package/dist/{workers-r9Aj68v1.mjs → workers-BiLsPkYD.mjs} +2 -2
  213. package/dist/{workers-builds-DgIDPDhj.mjs → workers-builds-2N71_8MZ.mjs} +1 -1
  214. package/dist/{workers-for-platforms-CoPp1ez5.mjs → workers-for-platforms-BMN4QXgT.mjs} +1 -1
  215. package/dist/{workers-vpc-Cvjg15bk.mjs → workers-vpc-3o7dMg7-.mjs} +1 -1
  216. package/dist/{workflows-D4SIo58Q.mjs → workflows-COiyqt-B.mjs} +1 -1
  217. package/dist/{wrangler-migration-D2HwxIG5.mjs → wrangler-migration-CqSg8IDj.mjs} +5 -5
  218. package/dist/{zaraz-CkqpiZBH.mjs → zaraz-DjwhCH8A.mjs} +2 -2
  219. package/dist/{zero-trust-CEY-lohP.mjs → zero-trust-BmpuDOmH.mjs} +64 -58
  220. package/dist/{zones-BWieAez1.mjs → zones-XYQiz5kF.mjs} +2 -2
  221. package/package.json +12 -12
  222. package/dist/auth-B2V5gsm4.mjs +0 -2
  223. package/dist/auth-CyF_s5ic.mjs +0 -2
  224. package/dist/build-CgpCJjPA.mjs +0 -2
  225. package/dist/cf-CInFH4Ng.mjs +0 -18
  226. package/dist/local-CTaqb1nl.mjs +0 -2
  227. package/dist/login-pt6gTX3x.mjs +0 -2
  228. package/dist/oauth-scopes-Cub2pl0Z.mjs +0 -4
  229. package/dist/organizations-DIduPB74.mjs +0 -4
  230. package/dist/package-Bf2u3-yO.mjs +0 -2
  231. package/dist/radar-D8x_TUAi.mjs +0 -300
  232. package/dist/run-DB1-Sj9a.mjs +0 -2
  233. package/dist/schema-flags-CoTAkrz8.mjs +0 -5
  234. package/dist/startup-profile-zt6cFnBn.mjs +0 -2
  235. package/dist/state-C5mQ9At8.mjs +0 -2
  236. package/dist/telemetry-jl3s2-bN.mjs +0 -2
  237. package/dist/ui-Dt1-eURh.mjs +0 -2
  238. package/dist/version-Bz705iJe.mjs +0 -2
@@ -1,15 +1,15 @@
1
1
  #!/usr/bin/env node
2
- import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CIeKNHSz.mjs";import{n}from"./auth-pbuzyz4C.mjs";import{a as r,t as i}from"./context-BryBS1zQ.mjs";import{t as a}from"./output-BJEgbI0G.mjs";import{t as o}from"./dry-run-gy0Hl9xo.mjs";import{t as s}from"./progress-C_yVLVcl.mjs";import{t as c}from"./run-BlSXngtI.mjs";import"./telemetry-jl3s2-bN.mjs";import{n as l,t as u}from"./body-parser-BKcZS9iJ.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{a as f,n as p}from"./prompt-kxvGZ6nF.mjs";var m={method:`POST`,path:t=>e`/accounts/${t.account_id}/basin-catalog/${t.bucket_name}/credential`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function h(e){return e.usage(`$0 basin-catalog credentials create <bucket-name>
2
+ import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-BNmz58v4.mjs";import{n}from"./auth-CB9wjyad.mjs";import{a as r,t as i}from"./context-DCon1tRZ.mjs";import{t as a}from"./output-BJEgbI0G.mjs";import{t as o}from"./dry-run-gy0Hl9xo.mjs";import{t as s}from"./progress-_Jux05O5.mjs";import{t as c}from"./run-Br8sYjNF.mjs";import"./telemetry-kjElc1zT.mjs";import{n as l,t as u}from"./body-parser-BKcZS9iJ.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{a as f,n as p}from"./prompt-SNVLBS1b.mjs";var m={method:`POST`,path:t=>e`/accounts/${t.account_id}/basin-catalog/${t.bucket_name}/credential`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function h(e){return e.usage(`$0 basin-catalog credentials create <bucket-name>
3
3
 
4
- Store authentication credentials for a catalog. These credentials are used to authenticate with R2 storage when performing catalog operations.`).positional(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`token`,{type:`string`,description:`Provides the Cloudflare API token for accessing R2.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Contains request to store catalog credentials.`})}const g={command:`create <bucket-name>`,describe:`Store catalog credentials`,builder:h,handler:async e=>c({command:`basin-catalog credentials create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf basin-catalog credentials create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/basin-catalog/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/credential`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},bodyKind:`json`,body:e.body===void 0?u({token:d(e.token,`token`,`text`)}):l(e.body)});return}let c=await n(e),p=e.local?t:await i();if(e.accountId=p,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(m,{body:t,account_id:p,bucket_name:e[`bucket-name`]}));a(n,{successLabel:`Created`});return}e.token===void 0&&(e.token=await f(`token`,`Provides the Cloudflare API token for accessing R2.`));let h=u({token:d(e.token,`token`,`text`)}),g=await s(`Creating`,async()=>c.send(m,{body:h,account_id:p,bucket_name:e[`bucket-name`]}));a(g,{successLabel:`Created`})})};var _={method:`GET`,path:t=>e`/accounts/${t.account_id}/basin-catalog/${t.bucket_name}/credential/status`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function ee(e){return e.usage(`$0 basin-catalog credentials status <bucket-name>
4
+ Store authentication credentials for a catalog. These credentials are used to authenticate with R2 storage when performing catalog operations.`).positional(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`token`,{type:`string`,description:`Provides the Cloudflare API token for accessing R2.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Contains request to store catalog credentials.`})}const g={command:`create <bucket-name>`,describe:`Store catalog credentials`,builder:h,handler:async e=>c({command:`basin-catalog credentials create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf basin-catalog credentials create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/basin-catalog/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/credential`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},bodyKind:`json`,body:e.body===void 0?u({token:d(e.token,`token`,`text`)}):l(e.body),sensitiveBodyPaths:[[`token`]]});return}let c=await n(e),p=e.local?t:await i();if(e.accountId=p,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(m,{body:t,account_id:p,bucket_name:e[`bucket-name`]}));a(n,{successLabel:`Created`});return}e.token===void 0&&(e.token=await f(`token`,`Provides the Cloudflare API token for accessing R2.`,{kind:`secret`}));let h=u({token:d(e.token,`token`,`text`)}),g=await s(`Creating`,async()=>c.send(m,{body:h,account_id:p,bucket_name:e[`bucket-name`]}));a(g,{successLabel:`Created`})})};var _={method:`GET`,path:t=>e`/accounts/${t.account_id}/basin-catalog/${t.bucket_name}/credential/status`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function v(e){return e.usage(`$0 basin-catalog credentials status <bucket-name>
5
5
 
6
- Check whether the configured catalog credentials are valid, invalid, or absent by probing authentication against the catalog.`).positional(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const te={command:`status <bucket-name>`,describe:`Get Basin Catalog credential status`,builder:ee,handler:async e=>c({command:`basin-catalog credentials status`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf basin-catalog credentials status`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/basin-catalog/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/credential/status`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(_,{account_id:l,bucket_name:e[`bucket-name`]}));a(u,{successLabel:`Loaded`})})},ne={command:`credentials`,describe:`Catalog access credentials for external query engines (Spark, Trino, etc.)`,builder:e=>e.command(g).command(te).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var v={method:`POST`,path:t=>e`/accounts/${t.account_id}/basin-catalog/${t.bucket_name}/delete`,query:[`force`],response:!1,errors:{400:`BadRequestError`,401:`UnauthorizedError`,404:`NotFoundError`,409:`ConflictError`,500:`InternalServerError`}};function y(e){return e.usage(`$0 basin-catalog delete <bucket-name>
6
+ Check whether the configured catalog credentials are valid, invalid, or absent by probing authentication against the catalog.`).positional(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ee={command:`status <bucket-name>`,describe:`Get Basin Catalog credential status`,builder:v,handler:async e=>c({command:`basin-catalog credentials status`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf basin-catalog credentials status`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/basin-catalog/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/credential/status`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(_,{account_id:l,bucket_name:e[`bucket-name`]}));a(u,{successLabel:`Loaded`})})},te={command:`credentials`,describe:`Catalog access credentials for external query engines (Spark, Trino, etc.)`,builder:e=>e.command(g).command(ee).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ne={method:`POST`,path:t=>e`/accounts/${t.account_id}/basin-catalog/${t.bucket_name}/delete`,query:[`force`],response:!1,errors:{400:`BadRequestError`,401:`UnauthorizedError`,404:`NotFoundError`,409:`ConflictError`,500:`InternalServerError`}};function y(e){return e.usage(`$0 basin-catalog delete <bucket-name>
7
7
 
8
- Removes the catalog from the control plane without deleting R2 bucket objects. Set force=true to remove catalog namespaces, tables, views, and maintenance metadata. Force deletion is limited to a configured catalog object count.`).positional(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`cascade`,{type:`boolean`,description:`Remove child metadata before deleting the catalog.`}).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 b={command:`delete <bucket-name>`,describe:`Delete Basin Catalog metadata`,builder:y,handler:async e=>c({command:`basin-catalog delete`,classification:{safeFlags:[`cascade`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let c={force:e.cascade};if(e.dryRun){let t=await r();o({command:`cf basin-catalog delete`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/basin-catalog/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/delete`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();if(e.accountId=u,!await p({force:!!e.force,message:`This removes catalog metadata. R2 bucket objects are retained.`}))return;let d=await s(`Deleting`,async()=>l.send(v,{account_id:u,bucket_name:e[`bucket-name`],...c}));a(d,{successLabel:`Deleted`})})};var x={method:`POST`,path:t=>e`/accounts/${t.account_id}/basin-catalog/${t.bucket_name}/disable`,response:!1,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function S(e){return e.usage(`$0 basin-catalog disable <bucket-name>
8
+ Removes the catalog from the control plane without deleting R2 bucket objects. Set force=true to remove catalog namespaces, tables, views, and maintenance metadata. Force deletion is limited to a configured catalog object count.`).positional(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`cascade`,{type:`boolean`,description:`Remove child metadata before deleting the catalog.`}).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 b={command:`delete <bucket-name>`,describe:`Delete Basin Catalog metadata`,builder:y,handler:async e=>c({command:`basin-catalog delete`,classification:{safeFlags:[`cascade`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let c={force:e.cascade};if(e.dryRun){let t=await r();o({command:`cf basin-catalog delete`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/basin-catalog/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/delete`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();if(e.accountId=u,!await p({force:!!e.force,message:`This removes catalog metadata. R2 bucket objects are retained.`}))return;let d=await s(`Deleting`,async()=>l.send(ne,{account_id:u,bucket_name:e[`bucket-name`],...c}));a(d,{successLabel:`Deleted`})})};var x={method:`POST`,path:t=>e`/accounts/${t.account_id}/basin-catalog/${t.bucket_name}/disable`,response:!1,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function S(e){return e.usage(`$0 basin-catalog disable <bucket-name>
9
9
 
10
- Disable an R2 bucket as a catalog. This operation deactivates the catalog but preserves existing metadata and data files. The catalog can be re-enabled later.`).positional(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name to disable as catalog.`,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 C={command:`disable <bucket-name>`,describe:`Disable Basin Catalog`,builder:S,handler:async e=>c({command:`basin-catalog disable`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf basin-catalog disable`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/basin-catalog/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/disable`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await p({force:!!e.force,message:`This operation turns off the data catalog for the bucket. Existing namespace or table state remains, but writes stop.`}))return;let u=await s(`Deleting`,async()=>c.send(x,{account_id:l,bucket_name:e[`bucket-name`]}));a(u,{successLabel:`Deleted`})})};var w={method:`POST`,path:t=>e`/accounts/${t.account_id}/basin-catalog/${t.bucket_name}/enable`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,500:`InternalServerError`}};function T(e){return e.usage(`$0 basin-catalog enable <bucket-name>
10
+ Disable an R2 bucket as a catalog. This operation deactivates the catalog but preserves existing metadata and data files. The catalog can be re-enabled later.`).positional(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name to disable as catalog.`,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 C={command:`disable <bucket-name>`,describe:`Disable Basin Catalog`,builder:S,handler:async e=>c({command:`basin-catalog disable`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf basin-catalog disable`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/basin-catalog/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/disable`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await p({force:!!e.force,message:`This operation turns off the data catalog for the bucket. Existing namespace or table state remains, but writes stop.`}))return;let u=await s(`Deleting`,async()=>c.send(x,{account_id:l,bucket_name:e[`bucket-name`]}));a(u,{successLabel:`Deleted`})})};var w={method:`POST`,path:t=>e`/accounts/${t.account_id}/basin-catalog/${t.bucket_name}/enable`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,500:`InternalServerError`}};function T(e){return e.usage(`$0 basin-catalog enable <bucket-name>
11
11
 
12
- Enable an R2 bucket as an Apache Iceberg catalog. This operation creates the necessary catalog infrastructure and activates the bucket for storing Iceberg metadata and data files.`).positional(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name to enable as catalog.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`enable <bucket-name>`,describe:`Enable R2 bucket as a catalog`,builder:T,handler:async e=>c({command:`basin-catalog enable`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf basin-catalog enable`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/basin-catalog/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/enable`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Creating`,async()=>c.send(w,{account_id:l,bucket_name:e[`bucket-name`]}));a(u,{successLabel:`Created`})})};var D={method:`GET`,path:t=>e`/accounts/${t.account_id}/basin-catalog/${t.bucket_name}`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function O(e){return e.usage(`$0 basin-catalog get <bucket-name>
12
+ Enable an R2 bucket as an Apache Iceberg catalog. This operation creates the necessary catalog infrastructure and activates the bucket for storing Iceberg metadata and data files.`).positional(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name to enable as catalog.`,demandOption:!0}).option(`credential-token`,{type:`string`,description:`Provides the Cloudflare API token for accessing R2.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:"Contains the optional request to enable a catalog. Send an empty body to keep the defaults. If you include `credential`, the service checks that the token can access the bucket, then stores it as the catalog's maintenance credential, like the store credentials operation. "}).check(e=>{if([`credential-token`].some(t=>e[t]!==void 0)){let t=[`credential-token`].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 --credential-* flag is set`)}return!0})}const E={command:`enable <bucket-name>`,describe:`Enable R2 bucket as a catalog`,builder:T,handler:async e=>c({command:`basin-catalog enable`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf basin-catalog enable`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/basin-catalog/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/enable`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},bodyKind:`json`,body:e.body===void 0?u({credential:{token:d(e[`credential-token`],`credential-token`,`text`)}}):l(e.body),sensitiveBodyPaths:[[`credential`,`token`]]});return}let c=await n(e),f=e.local?t:await i();if(e.accountId=f,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(w,{body:t,account_id:f,bucket_name:e[`bucket-name`]}));a(n,{successLabel:`Created`});return}let p=u({credential:{token:d(e[`credential-token`],`credential-token`,`text`)}}),m=await s(`Creating`,async()=>c.send(w,{body:p,account_id:f,bucket_name:e[`bucket-name`]}));a(m,{successLabel:`Created`})})};var D={method:`GET`,path:t=>e`/accounts/${t.account_id}/basin-catalog/${t.bucket_name}`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function O(e){return e.usage(`$0 basin-catalog get <bucket-name>
13
13
 
14
14
  Retrieve detailed information about a specific Basin Catalog by bucket name. Returns catalog status, maintenance configuration, and credential status.`).positional(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`get <bucket-name>`,describe:`Get Basin Catalog details`,builder:O,handler:async e=>c({command:`basin-catalog get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf basin-catalog get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/basin-catalog/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(D,{account_id:l,bucket_name:e[`bucket-name`]}));a(u,{successLabel:`Loaded`})})};var A={method:`GET`,path:t=>e`/accounts/${t.account_id}/basin-catalog`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,500:`InternalServerError`}};function j(e){return e.usage(`$0 basin-catalog list
15
15
 
@@ -17,7 +17,7 @@ Returns a list of R2 buckets that have been enabled as Apache Iceberg catalogs f
17
17
 
18
18
  Retrieve the maintenance configuration for a specific catalog, including compaction settings and credential status.`).positional(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const F={command:`get <bucket-name>`,describe:`Get catalog maintenance configuration`,builder:P,handler:async e=>c({command:`basin-catalog maintenance-configs get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf basin-catalog maintenance-configs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/basin-catalog/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/maintenance-configs`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(N,{account_id:l,bucket_name:e[`bucket-name`]}));a(u,{successLabel:`Loaded`})})};var I={method:`POST`,path:t=>e`/accounts/${t.account_id}/basin-catalog/${t.bucket_name}/maintenance-configs`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function L(e){return e.usage(`$0 basin-catalog maintenance-configs update <bucket-name>
19
19
 
20
- Update the maintenance configuration for a catalog. This allows you to enable or disable compaction and adjust target file sizes for optimization.`).positional(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`compaction-state`,{type:`string`,description:`Specifies the state of maintenance operations.`,choices:[`enabled`,`disabled`]}).coerce(`compaction-state`,e=>d(e,`compaction-state`,`text`)).option(`compaction-target-size-mb`,{type:`string`,description:`Sets the target file size for compaction in megabytes. Defaults to "128".`,choices:[`64`,`128`,`256`,`512`]}).coerce(`compaction-target-size-mb`,e=>d(e,`compaction-target-size-mb`,`text`)).option(`snapshot-expiration-max-snapshot-age`,{type:`string`,description:`Updates the maximum age for snapshots optionally.`}).option(`snapshot-expiration-min-snapshots-to-keep`,{type:`number`,description:`Updates the minimum number of snapshots to retain optionally.`}).option(`snapshot-expiration-state`,{type:`string`,description:`Specifies the state of maintenance operations.`,choices:[`enabled`,`disabled`]}).coerce(`snapshot-expiration-state`,e=>d(e,`snapshot-expiration-state`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Contains request to update catalog maintenance configuration.`})}const R={command:`update <bucket-name>`,describe:`Update catalog maintenance configuration`,builder:L,handler:async e=>c({command:`basin-catalog maintenance-configs update`,classification:{safeFlags:[`compaction-state`,`compaction-target-size-mb`,`snapshot-expiration-state`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf basin-catalog maintenance-configs update`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/basin-catalog/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/maintenance-configs`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},bodyKind:`json`,body:e.body===void 0?u({compaction:{state:e[`compaction-state`],target_size_mb:e[`compaction-target-size-mb`]},snapshot_expiration:{max_snapshot_age:d(e[`snapshot-expiration-max-snapshot-age`],`snapshot-expiration-max-snapshot-age`,`text`),min_snapshots_to_keep:e[`snapshot-expiration-min-snapshots-to-keep`],state:e[`snapshot-expiration-state`]}}):l(e.body)});return}let c=await n(e),f=e.local?t:await i();if(e.accountId=f,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(I,{body:t,account_id:f,bucket_name:e[`bucket-name`]}));a(n,{successLabel:`Created`});return}let p=u({compaction:{state:e[`compaction-state`],target_size_mb:e[`compaction-target-size-mb`]},snapshot_expiration:{max_snapshot_age:d(e[`snapshot-expiration-max-snapshot-age`],`snapshot-expiration-max-snapshot-age`,`text`),min_snapshots_to_keep:e[`snapshot-expiration-min-snapshots-to-keep`],state:e[`snapshot-expiration-state`]}}),m=await s(`Creating`,async()=>c.send(I,{body:p,account_id:f,bucket_name:e[`bucket-name`]}));a(m,{successLabel:`Created`})})},z={command:`maintenance-configs`,describe:`Table maintenance settings — compaction schedules and snapshot expiration policies`,builder:e=>e.command(F).command(R).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var B={method:`GET`,path:t=>e`/accounts/${t.account_id}/basin-catalog/${t.bucket_name}/namespaces`,query:[`page_token`,`page_size`,`parent`,`return_uuids`,`return_details`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function V(e){return e.usage(`$0 basin-catalog namespaces list
20
+ Update the maintenance configuration for a catalog. This allows you to enable or disable compaction and adjust target file sizes for optimization.`).positional(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`compaction-state`,{type:`string`,description:`Specifies the state of maintenance operations.`,choices:[`enabled`,`disabled`]}).coerce(`compaction-state`,e=>d(e,`compaction-state`,`text`)).option(`compaction-target-size-mb`,{type:`string`,description:`Sets the target file size for compaction in megabytes. Defaults to "128".`,choices:[`64`,`128`,`256`,`512`]}).coerce(`compaction-target-size-mb`,e=>d(e,`compaction-target-size-mb`,`text`)).option(`snapshot-expiration-max-snapshot-age`,{type:`string`,description:`Updates the maximum age for snapshots optionally.`}).option(`snapshot-expiration-min-snapshots-to-keep`,{type:`number`,description:`Updates the minimum number of snapshots to retain optionally.`}).option(`snapshot-expiration-state`,{type:`string`,description:`Specifies the state of maintenance operations.`,choices:[`enabled`,`disabled`]}).coerce(`snapshot-expiration-state`,e=>d(e,`snapshot-expiration-state`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Contains request to update catalog maintenance configuration.`})}const R={command:`update <bucket-name>`,describe:`Update catalog maintenance configuration`,builder:L,handler:async e=>c({command:`basin-catalog maintenance-configs update`,classification:{safeFlags:[`compaction-state`,`compaction-target-size-mb`,`snapshot-expiration-state`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf basin-catalog maintenance-configs update`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/basin-catalog/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/maintenance-configs`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},bodyKind:`json`,body:e.body===void 0?u({compaction:{state:e[`compaction-state`],target_size_mb:e[`compaction-target-size-mb`]},snapshot_expiration:{max_snapshot_age:d(e[`snapshot-expiration-max-snapshot-age`],`snapshot-expiration-max-snapshot-age`,`text`),min_snapshots_to_keep:e[`snapshot-expiration-min-snapshots-to-keep`],state:e[`snapshot-expiration-state`]}}):l(e.body)});return}let c=await n(e),f=e.local?t:await i();if(e.accountId=f,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(I,{body:t,account_id:f,bucket_name:e[`bucket-name`]}));a(n,{successLabel:`Created`});return}let p=u({compaction:{state:e[`compaction-state`],target_size_mb:e[`compaction-target-size-mb`]},snapshot_expiration:{max_snapshot_age:d(e[`snapshot-expiration-max-snapshot-age`],`snapshot-expiration-max-snapshot-age`,`text`),min_snapshots_to_keep:e[`snapshot-expiration-min-snapshots-to-keep`],state:e[`snapshot-expiration-state`]}}),m=await s(`Creating`,async()=>c.send(I,{body:p,account_id:f,bucket_name:e[`bucket-name`]}));a(m,{successLabel:`Created`})})},re={command:`maintenance-configs`,describe:`Table maintenance settings — compaction schedules and snapshot expiration policies`,builder:e=>e.command(F).command(R).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var z={method:`GET`,path:t=>e`/accounts/${t.account_id}/basin-catalog/${t.bucket_name}/namespaces`,query:[`page_token`,`page_size`,`parent`,`return_uuids`,`return_details`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function B(e){return e.usage(`$0 basin-catalog namespaces list
21
21
 
22
22
  Returns a list of namespaces in the specified Basin Catalog. Supports hierarchical filtering and pagination for efficient traversal of large namespace hierarchies.`).option(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`page-token`,{type:`string`,description:`Opaque pagination token from a previous response.
23
23
  Use this to fetch the next page of results.`}).option(`page-size`,{type:`number`,description:`Maximum number of namespaces to return per page.
@@ -25,7 +25,7 @@ Defaults to 100, maximum 1000.`}).option(`parent`,{type:`string`,description:`Pa
25
25
  For nested namespaces, use %1F as separator (e.g., "bronze%1Fanalytics").
26
26
  Omit this parameter to list top-level namespaces.`}).option(`return-uuids`,{type:`boolean`,description:`Whether to include namespace UUIDs in the response.
27
27
  Set to true to receive the namespace_uuids array.`}).option(`return-details`,{type:`boolean`,description:`Whether to include additional metadata (timestamps).
28
- When true, response includes created_at and updated_at arrays.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const re={command:`list`,describe:`List namespaces in catalog`,builder:V,handler:async e=>c({command:`basin-catalog namespaces list`,classification:{safeFlags:[`return-uuids`,`return-details`,`dry-run`]}},e,async()=>{let c={page_token:e[`page-token`],page_size:e[`page-size`],parent:e.parent,return_uuids:e[`return-uuids`],return_details:e[`return-details`]};if(e.dryRun){let t=await r();o({command:`cf basin-catalog namespaces list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/basin-catalog/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/namespaces`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(B,{account_id:u,bucket_name:e[`bucket-name`],...c}));a(d,{successLabel:`Loaded`})})};var H={method:`GET`,path:t=>e`/accounts/${t.account_id}/basin-catalog/${t.bucket_name}/namespaces/${t.namespace}/tables/${t.table_name}`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function U(e){return e.usage("$0 basin-catalog namespaces tables get <table-name>\n\nReturns full Apache Iceberg metadata for a single table: schema, partition specs, sort orders, properties, and recent snapshot history. Designed for catalog introspection UIs that need per-table details without holding R2 credentials. The `metadata.snapshots`, `metadata.snapshot-log`, and `metadata.metadata-log` arrays are pruned to the most recent 10 entries by `timestamp-ms`. Use `total_snapshots` and `returned_snapshots` to surface the truncation to end users.").positional(`table-name`,{type:`string`,description:`The table name within the given namespace.`,demandOption:!0}).option(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`namespace`,{type:`string`,description:`The namespace identifier.
28
+ When true, response includes created_at and updated_at arrays.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const V={command:`list`,describe:`List namespaces in catalog`,builder:B,handler:async e=>c({command:`basin-catalog namespaces list`,classification:{safeFlags:[`return-uuids`,`return-details`,`dry-run`]}},e,async()=>{let c={page_token:e[`page-token`],page_size:e[`page-size`],parent:e.parent,return_uuids:e[`return-uuids`],return_details:e[`return-details`]};if(e.dryRun){let t=await r();o({command:`cf basin-catalog namespaces list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/basin-catalog/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/namespaces`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(z,{account_id:u,bucket_name:e[`bucket-name`],...c}));a(d,{successLabel:`Loaded`})})};var H={method:`GET`,path:t=>e`/accounts/${t.account_id}/basin-catalog/${t.bucket_name}/namespaces/${t.namespace}/tables/${t.table_name}`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function U(e){return e.usage("$0 basin-catalog namespaces tables get <table-name>\n\nReturns full Apache Iceberg metadata for a single table: schema, partition specs, sort orders, properties, and recent snapshot history. Designed for catalog introspection UIs that need per-table details without holding R2 credentials. The `metadata.snapshots`, `metadata.snapshot-log`, and `metadata.metadata-log` arrays are pruned to the most recent 10 entries by `timestamp-ms`. Use `total_snapshots` and `returned_snapshots` to surface the truncation to end users.").positional(`table-name`,{type:`string`,description:`The table name within the given namespace.`,demandOption:!0}).option(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`namespace`,{type:`string`,description:`The namespace identifier.
29
29
  For nested namespaces, use %1F as separator (e.g., "bronze%1Fanalytics").`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const W={command:`get <table-name>`,describe:`Get table details`,builder:U,handler:async e=>c({command:`basin-catalog namespaces tables get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf basin-catalog namespaces tables get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/basin-catalog/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/namespaces/${e.namespace==null?`<namespace>`:encodeURIComponent(String(e.namespace))}/tables/${e[`table-name`]==null?`<table-name>`:encodeURIComponent(String(e[`table-name`]))}`,pathParams:{"bucket-name":String(e[`bucket-name`]??``),namespace:String(e.namespace??``),"table-name":String(e[`table-name`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(H,{account_id:l,bucket_name:e[`bucket-name`],namespace:e.namespace,table_name:e[`table-name`]}));a(u,{successLabel:`Loaded`})})};var G={method:`GET`,path:t=>e`/accounts/${t.account_id}/basin-catalog/${t.bucket_name}/namespaces/${t.namespace}/tables`,query:[`page_token`,`page_size`,`return_uuids`,`return_details`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function K(e){return e.usage(`$0 basin-catalog namespaces tables list
30
30
 
31
31
  Returns a list of tables in the specified namespace within a Basin Catalog. Supports pagination for efficient traversal of large table collections.`).option(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`namespace`,{type:`string`,description:`The namespace identifier.
@@ -41,4 +41,4 @@ Queue maintenance for normal polling. This request does not start a run.`).posit
41
41
 
42
42
  Update the maintenance configuration for a specific table. This allows you to enable or disable compaction and adjust target file sizes for optimization.`).positional(`table-name`,{type:`string`,description:`The table name.`,demandOption:!0}).option(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`namespace`,{type:`string`,description:`The namespace identifier (use %1F as separator for nested namespaces).`,demandOption:!0}).option(`compaction-state`,{type:`string`,description:`Specifies the state of maintenance operations.`,choices:[`enabled`,`disabled`]}).coerce(`compaction-state`,e=>d(e,`compaction-state`,`text`)).option(`compaction-target-size-mb`,{type:`string`,description:`Sets the target file size for compaction in megabytes. Defaults to "128".`,choices:[`64`,`128`,`256`,`512`]}).coerce(`compaction-target-size-mb`,e=>d(e,`compaction-target-size-mb`,`text`)).option(`snapshot-expiration-max-snapshot-age`,{type:`string`,description:`Updates the maximum age for snapshots optionally.`}).option(`snapshot-expiration-min-snapshots-to-keep`,{type:`number`,description:`Updates the minimum number of snapshots to retain optionally.`}).option(`snapshot-expiration-state`,{type:`string`,description:`Specifies the state of maintenance operations.`,choices:[`enabled`,`disabled`]}).coerce(`snapshot-expiration-state`,e=>d(e,`snapshot-expiration-state`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Contains request to update table maintenance configuration.`})}const $={command:`update <table-name>`,describe:`Update table maintenance configuration`,builder:oe,handler:async e=>c({command:`basin-catalog namespaces tables maintenance-configs update`,classification:{safeFlags:[`compaction-state`,`compaction-target-size-mb`,`snapshot-expiration-state`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf basin-catalog namespaces tables maintenance-configs update`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/basin-catalog/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/namespaces/${e.namespace==null?`<namespace>`:encodeURIComponent(String(e.namespace))}/tables/${e[`table-name`]==null?`<table-name>`:encodeURIComponent(String(e[`table-name`]))}/maintenance-configs`,pathParams:{"bucket-name":String(e[`bucket-name`]??``),namespace:String(e.namespace??``),"table-name":String(e[`table-name`]??``)},bodyKind:`json`,body:e.body===void 0?u({compaction:{state:e[`compaction-state`],target_size_mb:e[`compaction-target-size-mb`]},snapshot_expiration:{max_snapshot_age:d(e[`snapshot-expiration-max-snapshot-age`],`snapshot-expiration-max-snapshot-age`,`text`),min_snapshots_to_keep:e[`snapshot-expiration-min-snapshots-to-keep`],state:e[`snapshot-expiration-state`]}}):l(e.body)});return}let c=await n(e),f=e.local?t:await i();if(e.accountId=f,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(Q,{body:t,account_id:f,bucket_name:e[`bucket-name`],namespace:e.namespace,table_name:e[`table-name`]}));a(n,{successLabel:`Created`});return}let p=u({compaction:{state:e[`compaction-state`],target_size_mb:e[`compaction-target-size-mb`]},snapshot_expiration:{max_snapshot_age:d(e[`snapshot-expiration-max-snapshot-age`],`snapshot-expiration-max-snapshot-age`,`text`),min_snapshots_to_keep:e[`snapshot-expiration-min-snapshots-to-keep`],state:e[`snapshot-expiration-state`]}}),m=await s(`Creating`,async()=>c.send(Q,{body:p,account_id:f,bucket_name:e[`bucket-name`],namespace:e.namespace,table_name:e[`table-name`]}));a(m,{successLabel:`Created`})})},se={command:`maintenance-configs`,describe:`Table-level maintenance configurations and operations`,builder:e=>e.command(X).command(ae).command($).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ce={method:`GET`,path:t=>e`/accounts/${t.account_id}/basin-catalog/${t.bucket_name}/namespaces/${t.namespace}/tables/${t.table_name}/maintenance-runs`,query:[`page_size`,`page_token`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`}};function le(e){return e.usage(`$0 basin-catalog namespaces tables maintenance-runs list
43
43
 
44
- Retrieves recent table maintenance runs for the current table.`).option(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`namespace`,{type:`string`,description:`Namespace`,demandOption:!0}).option(`table-name`,{type:`string`,description:`Table name`,demandOption:!0}).option(`page-size`,{type:`number`,description:`Page size`}).option(`page-token`,{type:`string`,description:`Page token`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ue={command:`list`,describe:`List table maintenance runs`,builder:le,handler:async e=>c({command:`basin-catalog namespaces tables maintenance-runs list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let c={page_size:e[`page-size`],page_token:e[`page-token`]};if(e.dryRun){let t=await r();o({command:`cf basin-catalog namespaces tables maintenance-runs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/basin-catalog/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/namespaces/${e.namespace==null?`<namespace>`:encodeURIComponent(String(e.namespace))}/tables/${e[`table-name`]==null?`<table-name>`:encodeURIComponent(String(e[`table-name`]))}/maintenance-runs`,pathParams:{"bucket-name":String(e[`bucket-name`]??``),namespace:String(e.namespace??``),"table-name":String(e[`table-name`]??``)},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(ce,{account_id:u,bucket_name:e[`bucket-name`],namespace:e.namespace,table_name:e[`table-name`],...c}));a(d,{successLabel:`Loaded`})})},de={command:`maintenance-runs`,describe:`History of maintenance runs performed on tables`,builder:e=>e.command(ue).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},fe={command:`tables`,describe:`Tables within catalog namespaces`,builder:e=>e.command(W).command(q).command(se).command(de).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},pe={command:`namespaces`,describe:`Logical namespaces that group related tables within the data catalog`,builder:e=>e.command(re).command(fe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},me={command:`basin-catalog`,describe:`Iceberg-compatible data catalog for R2 — organize objects into tables and namespaces for SQL query engines`,builder:e=>e.command(b).command(C).command(E).command(k).command(M).command(ne).command(z).command(pe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{me as default};
44
+ Retrieves recent table maintenance runs for the current table.`).option(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`namespace`,{type:`string`,description:`Namespace`,demandOption:!0}).option(`table-name`,{type:`string`,description:`Table name`,demandOption:!0}).option(`page-size`,{type:`number`,description:`Page size`}).option(`page-token`,{type:`string`,description:`Page token`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ue={command:`list`,describe:`List table maintenance runs`,builder:le,handler:async e=>c({command:`basin-catalog namespaces tables maintenance-runs list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let c={page_size:e[`page-size`],page_token:e[`page-token`]};if(e.dryRun){let t=await r();o({command:`cf basin-catalog namespaces tables maintenance-runs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/basin-catalog/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/namespaces/${e.namespace==null?`<namespace>`:encodeURIComponent(String(e.namespace))}/tables/${e[`table-name`]==null?`<table-name>`:encodeURIComponent(String(e[`table-name`]))}/maintenance-runs`,pathParams:{"bucket-name":String(e[`bucket-name`]??``),namespace:String(e.namespace??``),"table-name":String(e[`table-name`]??``)},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(ce,{account_id:u,bucket_name:e[`bucket-name`],namespace:e.namespace,table_name:e[`table-name`],...c}));a(d,{successLabel:`Loaded`})})},de={command:`maintenance-runs`,describe:`History of maintenance runs performed on tables`,builder:e=>e.command(ue).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},fe={command:`tables`,describe:`Tables within catalog namespaces`,builder:e=>e.command(W).command(q).command(se).command(de).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},pe={command:`namespaces`,describe:`Logical namespaces that group related tables within the data catalog`,builder:e=>e.command(V).command(fe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},me={command:`basin-catalog`,describe:`Iceberg-compatible data catalog for R2 — organize objects into tables and namespaces for SQL query engines`,builder:e=>e.command(b).command(C).command(E).command(k).command(M).command(te).command(re).command(pe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{me as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CIeKNHSz.mjs";import{n}from"./auth-pbuzyz4C.mjs";import{a as r,t as i}from"./context-BryBS1zQ.mjs";import{t as a}from"./output-BJEgbI0G.mjs";import{t as o}from"./dry-run-gy0Hl9xo.mjs";import{t as s}from"./progress-C_yVLVcl.mjs";import{t as c}from"./run-BlSXngtI.mjs";import"./telemetry-jl3s2-bN.mjs";import{a as l,n as u,t as d}from"./body-parser-BKcZS9iJ.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{n as p}from"./prompt-kxvGZ6nF.mjs";var m={method:`POST`,path:()=>`/billing/address-validation`,body:`json`};function h(e){return e.usage(`$0 billing addresses validate
2
+ import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-BNmz58v4.mjs";import{n}from"./auth-CB9wjyad.mjs";import{a as r,t as i}from"./context-DCon1tRZ.mjs";import{t as a}from"./output-BJEgbI0G.mjs";import{t as o}from"./dry-run-gy0Hl9xo.mjs";import{t as s}from"./progress-_Jux05O5.mjs";import{t as c}from"./run-Br8sYjNF.mjs";import"./telemetry-kjElc1zT.mjs";import{a as l,n as u,t as d}from"./body-parser-BKcZS9iJ.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{n as p}from"./prompt-SNVLBS1b.mjs";var m={method:`POST`,path:()=>`/billing/address-validation`,body:`json`};function h(e){return e.usage(`$0 billing addresses validate
3
3
 
4
4
  Validates a billing address and returns validated address suggestions. Authentication is not enforced to support pre-signup address validation flows, so credentials are accepted but not required.`).option(`address`,{type:`string`,description:`Address line 1.`}).option(`address2`,{type:`string`,description:`Address line 2.`}).option(`city`,{type:`string`,description:`City.`}).option(`country`,{type:`string`,description:`Country code.`}).option(`state`,{type:`string`,description:`State or province.`}).option(`zipcode`,{type:`string`,description:`Postal or zip code.`}).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 g={command:`validate`,describe:`Validate Billing Address`,builder:h,handler:async e=>c({command:`billing addresses validate`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf billing addresses validate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/billing/address-validation`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({address:f(e.address,`address`,`text`),address2:f(e.address2,`address2`,`text`),city:f(e.city,`city`,`text`),country:f(e.country,`country`,`text`),state:f(e.state,`state`,`text`),zipcode:f(e.zipcode,`zipcode`,`text`)}):u(e.body)});return}let t=await n(e);if(e.body){let n=u(e.body),r=await s(`Validating`,async()=>t.send(m,{body:n}));a(r,{successLabel:`Validated`});return}let r=d({address:f(e.address,`address`,`text`),address2:f(e.address2,`address2`,`text`),city:f(e.city,`city`,`text`),country:f(e.country,`country`,`text`),state:f(e.state,`state`,`text`),zipcode:f(e.zipcode,`zipcode`,`text`)}),i=await s(`Validating`,async()=>t.send(m,{body:r}));a(i,{successLabel:`Validated`})})},_={command:`addresses`,describe:`Operations for addresses`,builder:e=>e.command(g).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var v={method:`POST`,path:t=>e`/accounts/${t.account_id}/billing/profile/payment-method`};function y(e){return e.usage(`$0 billing profiles create-payment-intent
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{n as e,r as t}from"./theme-BGHWSKCw.mjs";import"./delegate-CBKb0nov.mjs";import{stripVTControlCharacters as n}from"node:util";function r(n){return`${t.success(e.success)} ${n}`}function i(n){return`${t.warning(e.warning)} ${n}`}function a(n){return`${t.muted(e.arrow)} ${t.muted(n)}`}function o(e,r){let a=process.env.CF_DELEGATION?` ${t.muted(`·`)} ${t.muted(`local version`)}`:``,o=r?` ${t.muted(`·`)} ${t.warning(`update available: v${r.latestVersion}`)}`:``,s=`🍊☁️ ${t.brand(t.bold(`cf`))} ${t.muted(`·`)} ${t.muted(`v${e}`)}${a}${o}`,c=n(s).length,l=`─`.repeat(c);return`${s}\n${t.brand(l)}${r?.isMajor?`\n${i(`A new major version of cf is available. Updating is recommended.`)}`:``}`}const s={bar:`│`,top:`┌`,bottom:`└`};function c(e,n,r){let i=r?.title??`Error`,a=t.error(s.bar),o=t.error(s.top),c=t.error(s.bottom),u=Math.max(20,(process.stderr.columns||80)-2),d=[];if(d.push(``),d.push(`${o} ${t.error(t.bold(i))}`),r?.rawMessage)for(let t of e.split(`
2
+ import{n as e,r as t}from"./theme-BGHWSKCw.mjs";import"./delegate-CTj0dYET.mjs";import{stripVTControlCharacters as n}from"node:util";function r(n){return`${t.success(e.success)} ${n}`}function i(n){return`${t.warning(e.warning)} ${n}`}function a(n){return`${t.muted(e.arrow)} ${t.muted(n)}`}function o(e,r){let a=process.env.CF_DELEGATION?` ${t.muted(`·`)} ${t.muted(`local version`)}`:``,o=r?` ${t.muted(`·`)} ${t.warning(`update available: v${r.latestVersion}`)}`:``,s=`🍊☁️ ${t.brand(t.bold(`cf`))} ${t.muted(`·`)} ${t.muted(`v${e}`)}${a}${o}`,c=n(s).length,l=`─`.repeat(c);return`${s}\n${t.brand(l)}${r?.isMajor?`\n${i(`A new major version of cf is available. Updating is recommended.`)}`:``}`}const s={bar:`│`,top:`┌`,bottom:`└`};function c(e,n,r){let i=r?.title??`Error`,a=t.error(s.bar),o=t.error(s.top),c=t.error(s.bottom),u=Math.max(20,(process.stderr.columns||80)-2),d=[];if(d.push(``),d.push(`${o} ${t.error(t.bold(i))}`),r?.rawMessage)for(let t of e.split(`
3
3
  `))d.push(t.length>0?`${a} ${t}`:a);else for(let n of l(e,u))d.push(n.length>0?`${a} ${t.error(t.bold(n))}`:a);if(n){d.push(a);for(let e of l(n,u))d.push(e.length>0?`${a} ${t.muted(e)}`:a)}return d.push(c),d.join(`
4
4
  `)}function l(e,t){let n=[];for(let r of e.split(`
5
5
  `)){if(r.length<=t){n.push(r);continue}let e=r.split(/\s+/),i=``;for(let r of e)i?i.length+1+r.length<=t?i+=` `+r:(n.push(i),i=r):i=r;i&&n.push(i)}return n}export{r as a,a as i,l as n,i as o,o as r,c as t};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-pbuzyz4C.mjs";import{i as n}from"./context-BryBS1zQ.mjs";import{t as r}from"./output-BJEgbI0G.mjs";import{t as i}from"./dry-run-gy0Hl9xo.mjs";import{t as a}from"./progress-C_yVLVcl.mjs";import{t as o}from"./run-BlSXngtI.mjs";import"./telemetry-jl3s2-bN.mjs";import{n as s,r as c,t as l}from"./body-parser-BKcZS9iJ.mjs";import{n as u}from"./input-validation-D7z60HJH.mjs";import{a as d,i as f}from"./prompt-kxvGZ6nF.mjs";var p={method:`POST`,path:t=>e`/zones/${t.zone_id}/bot_management/feedback`,body:`json`,response:!1};function m(e){return e.usage("$0 bot-management feedback create\n\nSubmit a feedback report for the specified zone. Use `type` to indicate whether the report is a false positive (good traffic flagged as bot) or a false negative (bot traffic missed). Furthermore, you can also use `expression` as a wirefilter to identify the affected traffic sample. See more accepted API fields and expression types at https://developers.cloudflare.com/bots/concepts/feedback-loop/#api-fields and https://developers.cloudflare.com/bots/concepts/feedback-loop/#expression-fields, respectively.").option(`description`,{type:`string`,description:`The description field`}).option(`expression`,{type:`string`,description:`Wirefilter expression describing the traffic being reported.`}).option(`first-request-seen-at`,{type:`string`,description:`The first_request_seen_at field`}).option(`last-request-seen-at`,{type:`string`,description:`The last_request_seen_at field`}).option(`requests`,{type:`number`,description:`The requests field`}).option(`requests-by-attribute`,{type:`string`,description:`Top attributes contributing to the feedback sample. Keys include topASNs, topCountries, topHosts, topIPs, topJA3Hashes, topJA4s, topPaths, topUserAgents. Provide as a JSON object or @path/to/file.json.`}).option(`requests-by-score`,{type:`string`,description:"Map of bot scores (1-99) to request counts. Sum must equal `requests`. Provide as a JSON object or @path/to/file.json."}).option(`requests-by-score-src`,{type:`string`,description:"Map of score source to request counts. Sum must equal `requests`. Provide as a JSON object or @path/to/file.json."}).option(`subtype`,{type:`string`,description:`The subtype field`}).option(`type`,{type:`string`,description:`Type of feedback report.`,choices:[`false_positive`,`false_negative`]}).coerce(`type`,e=>u(e,`type`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const h={command:`create`,describe:`Submit a feedback report`,builder:m,handler:async e=>o({command:`bot-management feedback create`,classification:{safeFlags:[`type`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf bot-management feedback create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/bot_management/feedback`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({description:u(e.description,`description`,`text`),expression:u(e.expression,`expression`,`text`),first_request_seen_at:u(e[`first-request-seen-at`],`first-request-seen-at`,`text`),last_request_seen_at:u(e[`last-request-seen-at`],`last-request-seen-at`,`text`),requests:e.requests,requests_by_attribute:c(e[`requests-by-attribute`],`requests-by-attribute`,!0),requests_by_score:c(e[`requests-by-score`],`requests-by-score`,!0),requests_by_score_src:c(e[`requests-by-score-src`],`requests-by-score-src`,!0),subtype:u(e.subtype,`subtype`,`text`),type:e.type},[[`requests_by_attribute`],[`requests_by_score`],[`requests_by_score_src`]]):s(e.body,[{path:[`requests_by_attribute`],flag:`requests-by-attribute`},{path:[`requests_by_score`],flag:`requests-by-score`},{path:[`requests_by_score_src`],flag:`requests-by-score-src`}])});return}let o=await t(e),m=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=m,e.body){let t=s(e.body,[{path:[`requests_by_attribute`],flag:`requests-by-attribute`},{path:[`requests_by_score`],flag:`requests-by-score`},{path:[`requests_by_score_src`],flag:`requests-by-score-src`}]),n=await a(`Creating`,async()=>o.send(p,{body:t,zone_id:m}));r(n,{successLabel:`Created`});return}if(e.description===void 0&&(e.description=await d(`description`,`The description field`)),e.expression===void 0&&(e.expression=await d(`expression`,`Wirefilter expression describing the traffic being reported.`)),e[`first-request-seen-at`]===void 0&&(e[`first-request-seen-at`]=await d(`first-request-seen-at`,`The first_request_seen_at field`)),e[`last-request-seen-at`]===void 0&&(e[`last-request-seen-at`]=await d(`last-request-seen-at`,`The last_request_seen_at field`)),e.requests===void 0)throw Error(`--requests is required (or pass --body with this field set).`);if(e[`requests-by-attribute`]===void 0)throw Error(`--requests-by-attribute is required (or pass --body with this field set).`);if(e[`requests-by-score`]===void 0)throw Error(`--requests-by-score is required (or pass --body with this field set).`);if(e[`requests-by-score-src`]===void 0)throw Error(`--requests-by-score-src is required (or pass --body with this field set).`);e.type===void 0&&(e.type=await f(`type`,`Type of feedback report.`,[`false_positive`,`false_negative`]));let h=l({description:u(e.description,`description`,`text`),expression:u(e.expression,`expression`,`text`),first_request_seen_at:u(e[`first-request-seen-at`],`first-request-seen-at`,`text`),last_request_seen_at:u(e[`last-request-seen-at`],`last-request-seen-at`,`text`),requests:e.requests,requests_by_attribute:c(e[`requests-by-attribute`],`requests-by-attribute`,!0),requests_by_score:c(e[`requests-by-score`],`requests-by-score`,!0),requests_by_score_src:c(e[`requests-by-score-src`],`requests-by-score-src`,!0),subtype:u(e.subtype,`subtype`,`text`),type:e.type},[[`requests_by_attribute`],[`requests_by_score`],[`requests_by_score_src`]]),g=await a(`Creating`,async()=>o.send(p,{body:h,zone_id:m}));r(g,{successLabel:`Created`})})};var g={method:`GET`,path:t=>e`/zones/${t.zone_id}/bot_management/feedback`};function _(e){return e.usage(`$0 bot-management feedback list
2
+ import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-CB9wjyad.mjs";import{i as n}from"./context-DCon1tRZ.mjs";import{t as r}from"./output-BJEgbI0G.mjs";import{t as i}from"./dry-run-gy0Hl9xo.mjs";import{t as a}from"./progress-_Jux05O5.mjs";import{t as o}from"./run-Br8sYjNF.mjs";import"./telemetry-kjElc1zT.mjs";import{n as s,r as c,t as l}from"./body-parser-BKcZS9iJ.mjs";import{n as u}from"./input-validation-D7z60HJH.mjs";import{a as d,i as f}from"./prompt-SNVLBS1b.mjs";var p={method:`POST`,path:t=>e`/zones/${t.zone_id}/bot_management/feedback`,body:`json`,response:!1};function m(e){return e.usage("$0 bot-management feedback create\n\nSubmit a feedback report for the specified zone. Use `type` to indicate whether the report is a false positive (good traffic flagged as bot) or a false negative (bot traffic missed). Furthermore, you can also use `expression` as a wirefilter to identify the affected traffic sample. See more accepted API fields and expression types at https://developers.cloudflare.com/bots/concepts/feedback-loop/#api-fields and https://developers.cloudflare.com/bots/concepts/feedback-loop/#expression-fields, respectively.").option(`description`,{type:`string`,description:`The description field`}).option(`expression`,{type:`string`,description:`Wirefilter expression describing the traffic being reported.`}).option(`first-request-seen-at`,{type:`string`,description:`The first_request_seen_at field`}).option(`last-request-seen-at`,{type:`string`,description:`The last_request_seen_at field`}).option(`requests`,{type:`number`,description:`The requests field`}).option(`requests-by-attribute`,{type:`string`,description:`Top attributes contributing to the feedback sample. Keys include topASNs, topCountries, topHosts, topIPs, topJA3Hashes, topJA4s, topPaths, topUserAgents. Provide as a JSON object or @path/to/file.json.`}).option(`requests-by-score`,{type:`string`,description:"Map of bot scores (1-99) to request counts. Sum must equal `requests`. Provide as a JSON object or @path/to/file.json."}).option(`requests-by-score-src`,{type:`string`,description:"Map of score source to request counts. Sum must equal `requests`. Provide as a JSON object or @path/to/file.json."}).option(`subtype`,{type:`string`,description:`The subtype field`}).option(`type`,{type:`string`,description:`Type of feedback report.`,choices:[`false_positive`,`false_negative`]}).coerce(`type`,e=>u(e,`type`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const h={command:`create`,describe:`Submit a feedback report`,builder:m,handler:async e=>o({command:`bot-management feedback create`,classification:{safeFlags:[`type`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf bot-management feedback create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/bot_management/feedback`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({description:u(e.description,`description`,`text`),expression:u(e.expression,`expression`,`text`),first_request_seen_at:u(e[`first-request-seen-at`],`first-request-seen-at`,`text`),last_request_seen_at:u(e[`last-request-seen-at`],`last-request-seen-at`,`text`),requests:e.requests,requests_by_attribute:c(e[`requests-by-attribute`],`requests-by-attribute`,!0),requests_by_score:c(e[`requests-by-score`],`requests-by-score`,!0),requests_by_score_src:c(e[`requests-by-score-src`],`requests-by-score-src`,!0),subtype:u(e.subtype,`subtype`,`text`),type:e.type},[[`requests_by_attribute`],[`requests_by_score`],[`requests_by_score_src`]]):s(e.body,[{path:[`requests_by_attribute`],flag:`requests-by-attribute`},{path:[`requests_by_score`],flag:`requests-by-score`},{path:[`requests_by_score_src`],flag:`requests-by-score-src`}])});return}let o=await t(e),m=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=m,e.body){let t=s(e.body,[{path:[`requests_by_attribute`],flag:`requests-by-attribute`},{path:[`requests_by_score`],flag:`requests-by-score`},{path:[`requests_by_score_src`],flag:`requests-by-score-src`}]),n=await a(`Creating`,async()=>o.send(p,{body:t,zone_id:m}));r(n,{successLabel:`Created`});return}if(e.description===void 0&&(e.description=await d(`description`,`The description field`)),e.expression===void 0&&(e.expression=await d(`expression`,`Wirefilter expression describing the traffic being reported.`)),e[`first-request-seen-at`]===void 0&&(e[`first-request-seen-at`]=await d(`first-request-seen-at`,`The first_request_seen_at field`)),e[`last-request-seen-at`]===void 0&&(e[`last-request-seen-at`]=await d(`last-request-seen-at`,`The last_request_seen_at field`)),e.requests===void 0)throw Error(`--requests is required (or pass --body with this field set).`);if(e[`requests-by-attribute`]===void 0)throw Error(`--requests-by-attribute is required (or pass --body with this field set).`);if(e[`requests-by-score`]===void 0)throw Error(`--requests-by-score is required (or pass --body with this field set).`);if(e[`requests-by-score-src`]===void 0)throw Error(`--requests-by-score-src is required (or pass --body with this field set).`);e.type===void 0&&(e.type=await f(`type`,`Type of feedback report.`,[`false_positive`,`false_negative`]));let h=l({description:u(e.description,`description`,`text`),expression:u(e.expression,`expression`,`text`),first_request_seen_at:u(e[`first-request-seen-at`],`first-request-seen-at`,`text`),last_request_seen_at:u(e[`last-request-seen-at`],`last-request-seen-at`,`text`),requests:e.requests,requests_by_attribute:c(e[`requests-by-attribute`],`requests-by-attribute`,!0),requests_by_score:c(e[`requests-by-score`],`requests-by-score`,!0),requests_by_score_src:c(e[`requests-by-score-src`],`requests-by-score-src`,!0),subtype:u(e.subtype,`subtype`,`text`),type:e.type},[[`requests_by_attribute`],[`requests_by_score`],[`requests_by_score_src`]]),g=await a(`Creating`,async()=>o.send(p,{body:h,zone_id:m}));r(g,{successLabel:`Created`})})};var g={method:`GET`,path:t=>e`/zones/${t.zone_id}/bot_management/feedback`};function _(e){return e.usage(`$0 bot-management feedback list
3
3
 
4
4
  Returns all feedback reports previously submitted for the specified zone. Feedback reports help improve detection by sharing samples of traffic that were misclassified as bots or humans.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`list`,describe:`List zone feedback reports`,builder:_,handler:async e=>o({command:`bot-management feedback list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf bot-management feedback list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/bot_management/feedback`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(g,{zone_id:s}));r(c,{successLabel:`Loaded`})})},y={command:`feedback`,describe:`Operations for feedback`,builder:e=>e.command(h).command(v).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var b={method:`GET`,path:t=>e`/zones/${t.zone_id}/bot_management`};function x(e){return e.usage(`$0 bot-management get
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CIeKNHSz.mjs";import{n}from"./auth-pbuzyz4C.mjs";import{a as r,t as i}from"./context-BryBS1zQ.mjs";import{t as a}from"./output-BJEgbI0G.mjs";import{t as o}from"./dry-run-gy0Hl9xo.mjs";import{t as s}from"./progress-C_yVLVcl.mjs";import{t as c}from"./run-BlSXngtI.mjs";import"./telemetry-jl3s2-bN.mjs";import{n as l}from"./prompt-kxvGZ6nF.mjs";var u={method:`GET`,path:t=>e`/accounts/${t.account_id}/botnet_feed/asn/${t.asn_id}/day_report`,query:[`date`]};function d(e){return e.usage(`$0 botnet-feed asn day-report <asn-id>
2
+ import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-BNmz58v4.mjs";import{n}from"./auth-CB9wjyad.mjs";import{a as r,t as i}from"./context-DCon1tRZ.mjs";import{t as a}from"./output-BJEgbI0G.mjs";import{t as o}from"./dry-run-gy0Hl9xo.mjs";import{t as s}from"./progress-_Jux05O5.mjs";import{t as c}from"./run-Br8sYjNF.mjs";import"./telemetry-kjElc1zT.mjs";import{n as l}from"./prompt-SNVLBS1b.mjs";var u={method:`GET`,path:t=>e`/accounts/${t.account_id}/botnet_feed/asn/${t.asn_id}/day_report`,query:[`date`]};function d(e){return e.usage(`$0 botnet-feed asn day-report <asn-id>
3
3
 
4
4
  Gets all the data the botnet tracking database has for a given ASN registered to user account for given date. If no date is given, it will return results for the previous day.`).positional(`asn-id`,{type:`string`,description:`Asn ID`,demandOption:!0}).option(`date`,{type:`string`,description:`Date`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const f={command:`day-report <asn-id>`,describe:`Get daily report`,builder:d,handler:async e=>c({command:`botnet-feed asn day-report`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let c={date:e.date};if(e.dryRun){let t=await r();o({command:`cf botnet-feed asn day-report`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/botnet_feed/asn/${e[`asn-id`]==null?`<asn-id>`:encodeURIComponent(String(e[`asn-id`]))}/day_report`,pathParams:{"asn-id":String(e[`asn-id`]??``)},query:c,bodyKind:`none`});return}let l=await n(e),d=e.local?t:await i();e.accountId=d;let f=await s(`Loading`,async()=>l.send(u,{account_id:d,asn_id:e[`asn-id`],...c}));a(f,{successLabel:`Loaded`})})};var p={method:`GET`,path:t=>e`/accounts/${t.account_id}/botnet_feed/asn/${t.asn_id}/full_report`};function m(e){return e.usage(`$0 botnet-feed asn full-report <asn-id>
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CIeKNHSz.mjs";import{n}from"./auth-pbuzyz4C.mjs";import{a as r,t as i}from"./context-BryBS1zQ.mjs";import{t as a}from"./output-BJEgbI0G.mjs";import{t as o}from"./dry-run-gy0Hl9xo.mjs";import{t as s}from"./progress-C_yVLVcl.mjs";import{t as c}from"./run-BlSXngtI.mjs";import"./telemetry-jl3s2-bN.mjs";import{a as l,n as u,t as d}from"./body-parser-BKcZS9iJ.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{a as p,i as m,n as h}from"./prompt-kxvGZ6nF.mjs";var g={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/brand-protection/logo/matches`,query:[`offset`,`limit`,`query_id`,`download`,`orderBy`,`order`]};function _(e){return e.usage(`$0 brand-protection logo-matches get
2
+ import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-BNmz58v4.mjs";import{n}from"./auth-CB9wjyad.mjs";import{a as r,t as i}from"./context-DCon1tRZ.mjs";import{t as a}from"./output-BJEgbI0G.mjs";import{t as o}from"./dry-run-gy0Hl9xo.mjs";import{t as s}from"./progress-_Jux05O5.mjs";import{t as c}from"./run-Br8sYjNF.mjs";import"./telemetry-kjElc1zT.mjs";import{a as l,n as u,t as d}from"./body-parser-BKcZS9iJ.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{a as p,i as m,n as h}from"./prompt-SNVLBS1b.mjs";var g={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/brand-protection/logo/matches`,query:[`offset`,`limit`,`query_id`,`download`,`orderBy`,`order`]};function _(e){return e.usage(`$0 brand-protection logo-matches get
3
3
 
4
4
  Get paginated list of logo matches for a specific brand protection logo query`).option(`offset`,{type:`string`,description:`Offset`}).option(`limit`,{type:`string`,description:`Limit`}).option(`query-id`,{type:`string`,description:`Query ID`,demandOption:!0}).option(`download`,{type:`string`,description:`Download`}).option(`order-by`,{type:`string`,description:`Column to sort by. Options: 'matchedAt', 'domain', 'similarityScore', or 'registrar'`,choices:[`matchedAt`,`domain`,`similarityScore`,`registrar`]}).option(`order`,{type:`string`,description:`Sort order. Options: 'asc' (ascending) or 'desc' (descending)`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`get`,describe:`List logo matches`,builder:_,handler:async e=>c({command:`brand-protection logo-matches get`,classification:{safeFlags:[`order-by`,`order`,`dry-run`]}},e,async()=>{let c={offset:e.offset,limit:e.limit,query_id:e[`query-id`],download:e.download,orderBy:e[`order-by`],order:e.order};if(e.dryRun){let e=await r();o({command:`cf brand-protection logo-matches get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/brand-protection/logo/matches`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(g,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})},y={command:`logo-matches`,describe:`Operations for logo-matches`,builder:e=>e.command(v).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var b={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/brand-protection/logo/queries`,body:`json`};function x(e){return e.usage(`$0 brand-protection logos create
5
5
 
@@ -11,7 +11,7 @@ Get all saved brand protection logo queries for an account. Optionally specify i
11
11
 
12
12
  Dismiss or undismiss multiple matches in a single request. Accepts either the new format (matches: [{query_id, domain_id}]) for per-query control, or the legacy format (match_ids: [number]) which dismisses for all queries sharing each match's hash. Returns per-item success/error results.`).option(`action`,{type:`string`,description:`The action field`,choices:[`dismiss`,`undismiss`]}).coerce(`action`,e=>f(e,`action`,`text`)).option(`match-ids`,{type:`string`,array:!0,description:`The match_ids field`}).option(`matches`,{type:`string`,description:`The matches field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const M={command:`bulk-dismiss`,describe:`Bulk dismiss or undismiss matches`,builder:j,handler:async e=>c({command:`brand-protection matches bulk-dismiss`,classification:{safeFlags:[`action`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf brand-protection matches bulk-dismiss`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/brand-protection/domain/matches/bulk-dismiss`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({action:e.action,match_ids:e[`match-ids`],matches:l(e.matches,`matches`)}):u(e.body)});return}let c=await n(e),f=e.local?t:await i();if(e.accountId=f,e.body){let t=u(e.body),n=await s(`Creating`,async()=>c.send(A,{body:t,account_id:f}));a(n,{successLabel:`Created`});return}e.action===void 0&&(e.action=await m(`action`,`The action field`,[`dismiss`,`undismiss`]));let p=d({action:e.action,match_ids:e[`match-ids`],matches:l(e.matches,`matches`)}),h=await s(`Creating`,async()=>c.send(A,{body:p,account_id:f}));a(h,{successLabel:`Created`})})};var N={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/brand-protection/domain/matches`,query:[`offset`,`limit`,`query_id`,`include_domain_id`,`include_dismissed`,`domain_search`,`orderBy`,`order`]};function P(e){return e.usage(`$0 brand-protection matches get
13
13
 
14
- Get paginated list of domain matches for one or more brand protection queries. When multiple query_ids are provided (comma-separated), matches are deduplicated across queries and each match includes a match_details array with per-match query metadata and individual dismissed state.`).option(`offset`,{type:`string`,description:`Offset`}).option(`limit`,{type:`string`,description:`Limit`}).option(`query-id`,{type:`string`,description:`Query ID or comma-separated list of Query IDs. When multiple IDs are provided, matches are deduplicated across queries and each match includes a match_details array with per-match query metadata and dismissed state.`,demandOption:!0}).option(`include-domain-id`,{type:`string`,description:`Include domain ID`}).option(`include-dismissed`,{type:`string`,description:`Include dismissed`}).option(`domain-search`,{type:`string`,description:`Filter matches by domain name (substring match)`}).option(`order-by`,{type:`string`,description:`Column to sort by. Options: 'domain', 'first_seen', or 'registrar'`,choices:[`domain`,`first_seen`,`registrar`]}).option(`order`,{type:`string`,description:`Sort order. Options: 'asc' (ascending) or 'desc' (descending)`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const F={command:`get`,describe:`List saved query matches`,builder:P,handler:async e=>c({command:`brand-protection matches get`,classification:{safeFlags:[`order-by`,`order`,`dry-run`]}},e,async()=>{let c={offset:e.offset,limit:e.limit,query_id:e[`query-id`],include_domain_id:e[`include-domain-id`],include_dismissed:e[`include-dismissed`],domain_search:e[`domain-search`],orderBy:e[`order-by`],order:e.order};if(e.dryRun){let e=await r();o({command:`cf brand-protection matches get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/brand-protection/domain/matches`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(N,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})},I={command:`matches`,describe:`Operations for matches`,builder:e=>e.command(M).command(F).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var L={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/brand-protection/queries/${t.query_id}/matches/${t.domain_id}/dismiss`};function ee(e){return e.usage(`$0 brand-protection queries dismiss <domain-id>
14
+ Get paginated list of domain matches for one or more brand protection queries. When multiple query_ids are provided (comma-separated), matches are deduplicated across queries and each match includes a match_details array with per-match query metadata and individual dismissed state.`).option(`offset`,{type:`string`,description:`Offset`}).option(`limit`,{type:`string`,description:`Limit`}).option(`query-id`,{type:`string`,array:!0,description:`Query ID or comma-separated list of Query IDs. When multiple IDs are provided, matches are deduplicated across queries and each match includes a match_details array with per-match query metadata and dismissed state.`,demandOption:!0}).option(`include-domain-id`,{type:`string`,description:`Include domain ID`}).option(`include-dismissed`,{type:`string`,description:`Include dismissed`}).option(`domain-search`,{type:`string`,description:`Filter matches by domain name (substring match)`}).option(`order-by`,{type:`string`,description:`Column to sort by. Options: 'domain', 'first_seen', or 'registrar'`,choices:[`domain`,`first_seen`,`registrar`]}).option(`order`,{type:`string`,description:`Sort order. Options: 'asc' (ascending) or 'desc' (descending)`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const F={command:`get`,describe:`List saved query matches`,builder:P,handler:async e=>c({command:`brand-protection matches get`,classification:{safeFlags:[`order-by`,`order`,`dry-run`]}},e,async()=>{let c={offset:e.offset,limit:e.limit,query_id:e[`query-id`],include_domain_id:e[`include-domain-id`],include_dismissed:e[`include-dismissed`],domain_search:e[`domain-search`],orderBy:e[`order-by`],order:e.order};if(e.dryRun){let e=await r();o({command:`cf brand-protection matches get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/brand-protection/domain/matches`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(N,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})},I={command:`matches`,describe:`Operations for matches`,builder:e=>e.command(M).command(F).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var L={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/brand-protection/queries/${t.query_id}/matches/${t.domain_id}/dismiss`};function ee(e){return e.usage(`$0 brand-protection queries dismiss <domain-id>
15
15
 
16
16
  Mark a specific domain as dismissed for a given query. Dismissals are per-query — dismissing a domain in one query does not affect other queries.`).positional(`domain-id`,{type:`string`,description:`Domain ID`,demandOption:!0}).option(`query-id`,{type:`string`,description:`Query ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const R={command:`dismiss <domain-id>`,describe:`Dismiss a match`,builder:ee,handler:async e=>c({command:`brand-protection queries dismiss`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf brand-protection queries dismiss`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/brand-protection/queries/${e[`query-id`]==null?`<query-id>`:encodeURIComponent(String(e[`query-id`]))}/matches/${e[`domain-id`]==null?`<domain-id>`:encodeURIComponent(String(e[`domain-id`]))}/dismiss`,pathParams:{"query-id":String(e[`query-id`]??``),"domain-id":String(e[`domain-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Creating`,async()=>c.send(L,{account_id:l,query_id:e[`query-id`],domain_id:e[`domain-id`]}));a(u,{successLabel:`Created`})})};var z={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/brand-protection/domain/queries`,query:[`id`,`page`,`per_page`]};function B(e){return e.usage(`$0 brand-protection queries get
17
17
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CIeKNHSz.mjs";import{i as n,n as r}from"./auth-pbuzyz4C.mjs";import{a as i,t as a}from"./context-BryBS1zQ.mjs";import{t as o}from"./output-BJEgbI0G.mjs";import{t as s}from"./dry-run-gy0Hl9xo.mjs";import{t as c}from"./progress-C_yVLVcl.mjs";import{t as l}from"./run-BlSXngtI.mjs";import"./telemetry-jl3s2-bN.mjs";import{a as u,n as d,o as f,r as p,s as m,t as h}from"./body-parser-BKcZS9iJ.mjs";import{n as g}from"./input-validation-D7z60HJH.mjs";import{n as _}from"./prompt-kxvGZ6nF.mjs";import{n as v,t as y}from"./raw-fetch-C_hWBr7n.mjs";var b={method:`POST`,path:t=>e`/accounts/${t.account_id}/browser-rendering/crawl`,query:[`cacheTTL`],body:`json`,errors:{400:`BadRequestError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function ee(e){return e.usage("$0 browser-run crawl create\n\nStarts a crawl job for the provided URL and its children. Check available options like `gotoOptions` and `waitFor*` to control page load behaviour.").option(`cache-ttl`,{type:`number`,description:`Cache TTL default is 5s. Set to 0 to disable.`}).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 x={command:`create`,describe:`Crawl websites.`,builder:ee,handler:async e=>l({command:`browser-run crawl create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={cacheTTL:e[`cache-ttl`]};if(e.dryRun){let t=await i();s({command:`cf browser-run crawl create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/browser-rendering/crawl`,pathParams:{},query:l,bodyKind:`json`,body:e.body===void 0?void 0:d(e.body)});return}let u=await r(e),f=e.local?t:await a();if(e.accountId=f,e.body){let t=d(e.body);new URLSearchParams(Object.entries(l).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let n=await c(`Creating`,async()=>u.send(b,{body:t,account_id:f,...l}));o(n,{successLabel:`Created`});return}let p=await c(`Creating`,async()=>n(u,`POST`,`/accounts/${f}/browser-rendering/crawl`,{query:l}));o(p,{successLabel:`Created`})})};var te={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/browser-rendering/crawl/${t.job_id}`,errors:{400:`BadRequestError`,404:`NotFoundError`,500:`InternalServerError`}};function ne(e){return e.usage(`$0 browser-run crawl delete <job-id>
2
+ import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-BNmz58v4.mjs";import{i as n,n as r}from"./auth-CB9wjyad.mjs";import{a as i,t as a}from"./context-DCon1tRZ.mjs";import{t as o}from"./output-BJEgbI0G.mjs";import{t as s}from"./dry-run-gy0Hl9xo.mjs";import{t as c}from"./progress-_Jux05O5.mjs";import{t as l}from"./run-Br8sYjNF.mjs";import"./telemetry-kjElc1zT.mjs";import{a as u,n as d,o as f,r as p,s as m,t as h}from"./body-parser-BKcZS9iJ.mjs";import{n as g}from"./input-validation-D7z60HJH.mjs";import{n as _}from"./prompt-SNVLBS1b.mjs";import{n as v,t as y}from"./raw-fetch-D3ydyJYW.mjs";var b={method:`POST`,path:t=>e`/accounts/${t.account_id}/browser-rendering/crawl`,query:[`cacheTTL`],body:`json`,errors:{400:`BadRequestError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function ee(e){return e.usage("$0 browser-run crawl create\n\nStarts a crawl job for the provided URL and its children. Check available options like `gotoOptions` and `waitFor*` to control page load behaviour.").option(`cache-ttl`,{type:`number`,description:`Cache TTL default is 5s. Set to 0 to disable.`}).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 x={command:`create`,describe:`Crawl websites.`,builder:ee,handler:async e=>l({command:`browser-run crawl create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={cacheTTL:e[`cache-ttl`]};if(e.dryRun){let t=await i();s({command:`cf browser-run crawl create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/browser-rendering/crawl`,pathParams:{},query:l,bodyKind:`json`,body:e.body===void 0?void 0:d(e.body)});return}let u=await r(e),f=e.local?t:await a();if(e.accountId=f,e.body){let t=d(e.body);new URLSearchParams(Object.entries(l).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let n=await c(`Creating`,async()=>u.send(b,{body:t,account_id:f,...l}));o(n,{successLabel:`Created`});return}let p=await c(`Creating`,async()=>n(u,`POST`,`/accounts/${f}/browser-rendering/crawl`,{query:l}));o(p,{successLabel:`Created`})})};var te={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/browser-rendering/crawl/${t.job_id}`,errors:{400:`BadRequestError`,404:`NotFoundError`,500:`InternalServerError`}};function ne(e){return e.usage(`$0 browser-run crawl delete <job-id>
3
3
 
4
4
  Cancels an ongoing crawl job by setting its status to cancelled and stopping all queued URLs.`).positional(`job-id`,{type:`string`,description:`The ID of the crawl job to cancel.`,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 re={command:`delete <job-id>`,describe:`Cancel a crawl job.`,builder:ne,handler:async e=>l({command:`browser-run crawl delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf browser-run crawl delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/browser-rendering/crawl/${e[`job-id`]==null?`<job-id>`:encodeURIComponent(String(e[`job-id`]))}`,pathParams:{"job-id":String(e[`job-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await _({force:!!e.force}))return;let u=await c(`Deleting`,async()=>n.send(te,{account_id:l,job_id:e[`job-id`]}));o(u,{successLabel:`Deleted`})})};var ie={method:`GET`,path:t=>e`/accounts/${t.account_id}/browser-rendering/crawl/${t.job_id}`,query:[`cacheTTL`,`status`,`cursor`,`limit`],errors:{400:`BadRequestError`,500:`InternalServerError`}};function ae(e){return e.usage(`$0 browser-run crawl get <job-id>
5
5
 
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./cli-exit-CstFZ1eJ.mjs";import{M as t}from"./dist-D5YYi2LO.mjs";import{i as n,r}from"./autoconfig-CXcy-e1R.mjs";import{t as i}from"./log-BWdaOGOW.mjs";import{n as a,t as o}from"./spawn-C8D5pzxJ.mjs";import s from"node:path";import{readBuildOutput as c}from"@cloudflare/build-output-utils";import{convertToWranglerConfig as l}from"@cloudflare/config";var u=class extends Error{constructor(e){super(e),this.name=`BuildOutputConfigError`}};function d(e,t){if(e!==void 0){if(t===void 0)throw new u(`The Build Output does not record which mode it was created with, but this command requested mode "${e}". Rebuild with "--mode ${e}" before deploying.`);if(t!==e)throw new u(`The Build Output was created with mode "${t}", but this command requested mode "${e}". To use the existing Build Output, rerun with "--mode ${t}". To deploy in ${e} mode, rebuild with "--mode ${e}" before deploying.`)}}function f(e,t){if(e!==void 0&&t)throw new u(`Temporary accounts can't be used when a specific account ID ("${e}") is set in your config file. Remove \`--temporary-account\` to use that account, or remove \`accountId\` from your config file and rebuild to use a temporary account.`)}const p={type:`string`,description:`Name of the Worker in the Build Output to use (defaults to the default Worker)`,requiresArg:!0,coerce:e=>{if(Array.isArray(e))throw Error(`--worker can only be specified once.`);return e}};function m(e,t){if(t===void 0)return e.default;let n=Object.values(e).filter(e=>e.config.name===t);if(n.length>1)throw new u(`The Build Output contains more than one Worker named "${t}".`);if(n[0]!==void 0)return n[0];let{default:r,...i}=e;throw new u(`The Build Output has no Worker named "${t}". Available Workers: ${[`${r.config.name} (default)`,...Object.values(i).map(e=>e.config.name).sort()].join(`, `)}.`)}function h(e,t){let n=e.config,{buildContext:r,...i}=t,{manifest:a,...o}=n,c=l({...i,worker:o,containers:[]});n.manifest?.mainModule&&e.bundleDir&&(c.main=s.join(e.bundleDir,n.manifest.mainModule));let u=s.resolve(`cloudflare.config.ts`),{validationConfig:d,containerReferences:f}=_(c),p=g(d,e.configPath,u);v(p,f);let{containers:m,...h}=p;return{wranglerConfig:h,builtConfig:n}}function g(e,n,r){let{config:i,diagnostics:a}=t(e,n,r,{});if(a.hasErrors())throw new u(a.renderErrors());return a.hasWarnings()&&console.warn(a.renderWarnings()),i}function _(e){let{containers:t,...n}=e,r=/* @__PURE__ */ new Map;return n.exports!==void 0&&(n.exports=Object.fromEntries(Object.entries(n.exports).map(([e,t])=>{if(!(`container`in t)||typeof t.container!=`string`)return[e,t];r.set(e,t.container);let{container:n,...i}=t;return[e,i]}))),{validationConfig:n,containerReferences:r}}function v(e,t){e.exports!==void 0&&t.size!==0&&(e.exports=Object.fromEntries(Object.entries(e.exports).map(([e,n])=>{let r=t.get(e);return[e,r===void 0?n:{...n,container:r}]})))}function y(e){return e}async function b(t,{worker:s,dryRun:l=!1,...u}={},d={}){let f=u.output??`stderr`,p=process.cwd(),{details:g,configuration:_,setupNeeded:v}=await r(p,{...u,dryRun:l});if(v)return`setup-needed`;let y=_?.buildCommand??g?.buildCommand,b={...g?.env,...d.isPreview?{CLOUDFLARE_PREVIEW_BUILD:`true`}:{}};if(y&&t&&!g?.framework?.supportsMode)throw Error(`The detected command \`${y}\` does not currently support \`--mode\`.`);f!==`silent`&&i.section(`Build`);let S=t?[`--mode`,t]:[],C;if(y)C=await n(y,p,{...u,env:b,args:S});else{let e=a(p);f!==`silent`&&i.message(`Delegating to ${x(e)}`),C=await o(e,`build`,S,{...u,env:b})}if(C.exitCode!==0||C.signal)throw new e(C.exitCode,{signal:C.signal});let{workers:w,rootConfig:T}=await c(p);return h(m(w,s),T),f!==`silent`&&i.success(`Build complete`),`built`}function x(e){switch(e.impl.pkg){case`@cloudflare/vite-plugin`:return`Vite`;case`wrangler`:return`Wrangler`;case`cloudflare-py-dev-server`:return`the Python dev server`;case`cloudflare-rs-dev-server`:return`the Rust dev server`;default:return e.impl.pkg}}const S={command:`build`,describe:`Build a project for Cloudflare`,builder:y,handler:async e=>{await b(e.mode)}};export{m as a,u as c,h as i,b as n,f as o,p as r,d as s,S as t};
2
+ import{t as e}from"./cli-exit-CstFZ1eJ.mjs";import{M as t}from"./dist-ataVE8ob.mjs";import{i as n,r}from"./autoconfig-CajkMb3B.mjs";import{t as i}from"./log-BWdaOGOW.mjs";import{n as a,t as o}from"./spawn-9sE67p7c.mjs";import s from"node:path";import{readBuildOutput as c}from"@cloudflare/build-output-utils";import{convertToWranglerConfig as l}from"@cloudflare/config";var u=class extends Error{constructor(e){super(e),this.name=`BuildOutputConfigError`}};function d(e,t){if(e!==void 0){if(t===void 0)throw new u(`The Build Output does not record which mode it was created with, but this command requested mode "${e}". Rebuild with "--mode ${e}" before deploying.`);if(t!==e)throw new u(`The Build Output was created with mode "${t}", but this command requested mode "${e}". To use the existing Build Output, rerun with "--mode ${t}". To deploy in ${e} mode, rebuild with "--mode ${e}" before deploying.`)}}function f(e,t){if(e!==void 0&&t)throw new u(`Temporary accounts can't be used when a specific account ID ("${e}") is set in your config file. Remove \`--temporary-account\` to use that account, or remove \`accountId\` from your config file and rebuild to use a temporary account.`)}const p={type:`string`,description:`Name of the Worker in the Build Output to use (defaults to the default Worker)`,requiresArg:!0,coerce:e=>{if(Array.isArray(e))throw Error(`--worker can only be specified once.`);return e}};function m(e,t){if(t===void 0)return e.default;let n=Object.values(e).filter(e=>e.config.name===t);if(n.length>1)throw new u(`The Build Output contains more than one Worker named "${t}".`);if(n[0]!==void 0)return n[0];let{default:r,...i}=e;throw new u(`The Build Output has no Worker named "${t}". Available Workers: ${[`${r.config.name} (default)`,...Object.values(i).map(e=>e.config.name).sort()].join(`, `)}.`)}function h(e,t){let n=e.config,{buildContext:r,...i}=t,{manifest:a,...o}=n,c=l({...i,worker:o,containers:[]});n.manifest?.mainModule&&e.bundleDir&&(c.main=s.join(e.bundleDir,n.manifest.mainModule));let u=s.resolve(`cloudflare.config.ts`),{validationConfig:d,containerReferences:f}=_(c),p=g(d,e.configPath,u);v(p,f);let{containers:m,...h}=p;return{wranglerConfig:h,builtConfig:n}}function g(e,n,r){let{config:i,diagnostics:a}=t(e,n,r,{});if(a.hasErrors())throw new u(a.renderErrors());return a.hasWarnings()&&console.warn(a.renderWarnings()),i}function _(e){let{containers:t,...n}=e,r=/* @__PURE__ */ new Map;return n.exports!==void 0&&(n.exports=Object.fromEntries(Object.entries(n.exports).map(([e,t])=>{if(!(`container`in t)||typeof t.container!=`string`)return[e,t];r.set(e,t.container);let{container:n,...i}=t;return[e,i]}))),{validationConfig:n,containerReferences:r}}function v(e,t){e.exports!==void 0&&t.size!==0&&(e.exports=Object.fromEntries(Object.entries(e.exports).map(([e,n])=>{let r=t.get(e);return[e,r===void 0?n:{...n,container:r}]})))}function y(e){return e}async function b(t,{worker:s,dryRun:l=!1,...u}={},d={}){let f=u.output??`stderr`,p=process.cwd(),{details:g,configuration:_,setupNeeded:v}=await r(p,{...u,dryRun:l});if(v)return`setup-needed`;let y=_?.buildCommand??g?.buildCommand,b={...g?.env,...d.isPreview?{CLOUDFLARE_PREVIEW_BUILD:`true`}:{}};if(y&&t&&!g?.framework?.supportsMode)throw Error(`The detected command \`${y}\` does not currently support \`--mode\`.`);f!==`silent`&&i.section(`Build`);let S=t?[`--mode`,t]:[],C;if(y)C=await n(y,p,{...u,env:b,args:S});else{let e=a(p);f!==`silent`&&i.message(`Delegating to ${x(e)}`),C=await o(e,`build`,S,{...u,env:b})}if(C.exitCode!==0||C.signal)throw new e(C.exitCode,{signal:C.signal});let{workers:w,rootConfig:T}=await c(p);return h(m(w,s),T),f!==`silent`&&i.success(`Build complete`),`built`}function x(e){switch(e.impl.pkg){case`@cloudflare/vite-plugin`:return`Vite`;case`wrangler`:return`Wrangler`;case`cloudflare-py-dev-server`:return`the Python dev server`;case`cloudflare-rs-dev-server`:return`the Rust dev server`;default:return e.impl.pkg}}const S={command:`build`,describe:`Build a project for Cloudflare`,builder:y,handler:async e=>{await b(e.mode)}};export{m as a,u as c,h as i,b as n,f as o,p as r,d as s,S as t};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export{t as default,n as runBuild}from"./build-BfkzV5_c.mjs";
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CIeKNHSz.mjs";import{n}from"./auth-pbuzyz4C.mjs";import{a as r,t as i}from"./context-BryBS1zQ.mjs";import{t as a}from"./output-BJEgbI0G.mjs";import{t as o}from"./dry-run-gy0Hl9xo.mjs";import{t as s}from"./progress-C_yVLVcl.mjs";import{t as c}from"./run-BlSXngtI.mjs";import"./telemetry-jl3s2-bN.mjs";import{a as l,n as u,r as d,t as f}from"./body-parser-BKcZS9iJ.mjs";import{n as p}from"./input-validation-D7z60HJH.mjs";import{a as m,i as h,n as g}from"./prompt-kxvGZ6nF.mjs";var _={method:`PUT`,path:t=>e`/accounts/${t.account_id}/builds/builds/${t.build_uuid}/cancel`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function v(e){return e.usage(`$0 builds cancel <build-uuid>
2
+ import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-BNmz58v4.mjs";import{n}from"./auth-CB9wjyad.mjs";import{a as r,t as i}from"./context-DCon1tRZ.mjs";import{t as a}from"./output-BJEgbI0G.mjs";import{t as o}from"./dry-run-gy0Hl9xo.mjs";import{t as s}from"./progress-_Jux05O5.mjs";import{t as c}from"./run-Br8sYjNF.mjs";import"./telemetry-kjElc1zT.mjs";import{a as l,n as u,r as d,t as f}from"./body-parser-BKcZS9iJ.mjs";import{n as p}from"./input-validation-D7z60HJH.mjs";import{a as m,i as h,n as g}from"./prompt-SNVLBS1b.mjs";var _={method:`PUT`,path:t=>e`/accounts/${t.account_id}/builds/builds/${t.build_uuid}/cancel`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function v(e){return e.usage(`$0 builds cancel <build-uuid>
3
3
 
4
4
  Cancel a queued or running build.`).positional(`build-uuid`,{type:`string`,description:`Build UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ee={command:`cancel <build-uuid>`,describe:`Cancel a Workers build`,builder:v,handler:async e=>c({command:`builds cancel`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds cancel`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/builds/${e[`build-uuid`]==null?`<build-uuid>`:encodeURIComponent(String(e[`build-uuid`]))}/cancel`,pathParams:{"build-uuid":String(e[`build-uuid`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Updating`,async()=>c.send(_,{account_id:l,build_uuid:e[`build-uuid`]}));a(u,{successLabel:`Updated`})})};var y={method:`POST`,path:t=>e`/accounts/${t.account_id}/builds/triggers/${t.trigger_uuid}/builds`,body:`json`,errors:{401:`UnauthorizedError`}};function te(e){return e.usage(`$0 builds create <trigger-uuid>
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{i as t,n}from"./auth-pbuzyz4C.mjs";import{i as r}from"./context-BryBS1zQ.mjs";import{t as i}from"./output-BJEgbI0G.mjs";import{t as a}from"./dry-run-gy0Hl9xo.mjs";import{t as o}from"./progress-C_yVLVcl.mjs";import{t as s}from"./run-BlSXngtI.mjs";import"./telemetry-jl3s2-bN.mjs";import{n as c,t as l}from"./body-parser-BKcZS9iJ.mjs";import{n as u}from"./input-validation-D7z60HJH.mjs";import{a as d,i as f,n as p}from"./prompt-kxvGZ6nF.mjs";var m={method:`POST`,path:t=>e`/zones/${t.zone_id}/environments/${t.environment_id}/invalidate_cache`,body:`json`};function h(e){return e.usage("$0 cache invalidate-environment <environment-id>\n\nMarks cached content as stale for one environment of the zone. Content cached for the zone's other environments, including production, is not affected. Otherwise this works like `POST /zones/{zone_id}/invalidate_cache`: the next request for invalidated content makes Cloudflare revalidate it with your origin, and the request body takes the same fields. Environments are part of [Version Management](https://developers.cloudflare.com/version-management/). To delete the content instead, use `POST /zones/{zone_id}/environments/{environment_id}/purge_cache`. Invalidating by URL (`files`) does not work for environments that select requests by IP address, country, ASN, or threat score, and fails with error `1136`. Use `tags`, `hosts`, `prefixes`, or `purge_everything` for those environments. ### Availability and limits Rate limits and the number of items you can send in one request depend on your plan. See [Purge cache: availability and limits](https://developers.cloudflare.com/cache/how-to/purge-cache/#availability-and-limits).").positional(`environment-id`,{type:`string`,description:`The environment ID, from Version Management.`,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}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const g={command:`invalidate-environment <environment-id>`,describe:`Invalidate Cached Content by Environment`,builder:h,handler:async e=>s({command:`cache invalidate-environment`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){a({command:`cf cache invalidate-environment`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/environments/${e[`environment-id`]==null?`<environment-id>`:encodeURIComponent(String(e[`environment-id`]))}/invalidate_cache`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"environment-id":String(e[`environment-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:c(e.body)});return}let s=await n(e),l=await r({zone:e.zone},s,{quiet:e.quiet});if(e.zoneId=l,!await p({force:!!e.force,message:`This operation marks the selected content in the environment's cache as stale.`}))return;if(e.body){let t=c(e.body),n=await o(`Deleting`,async()=>s.send(m,{body:t,zone_id:l,environment_id:e[`environment-id`]}));i(n,{successLabel:`Deleted`});return}let u=await o(`Deleting`,async()=>t(s,`POST`,`/zones/${e.zoneId}/environments/${encodeURIComponent(String(e[`environment-id`]))}/invalidate_cache`));i(u,{successLabel:`Deleted`})})};var ee={method:`POST`,path:t=>e`/zones/${t.zone_id}/invalidate_cache`,body:`json`};function te(e){return e.usage("$0 cache invalidate\n\nMarks cached content as stale in every Cloudflare data center and cache tier, including Cache Reserve. The content stays in cache. The next request for it makes Cloudflare revalidate it with your origin, using the `ETag` and `Last-Modified` values it was cached with: - If your origin answers `304 Not Modified`, Cloudflare serves the cached copy without downloading it again, and `CF-Cache-Status` is `REVALIDATED`. - If your origin sends a full response, Cloudflare serves and caches the new content, and `CF-Cache-Status` is `EXPIRED`. With Tiered Cache, each tier revalidates with the tier above it, so a visitor can see `EXPIRED` even when your origin answered `304`. Until content is revalidated, your `stale-while-revalidate` and `stale-if-error` directives still apply, counted from the time you invalidated it. For example, if your origin fails during revalidation, Cloudflare can keep serving the stale copy for the `stale-if-error` window. ### Invalidate or purge? - **Invalidate** when content may not have changed, for example after a deploy. Unchanged content costs your origin a `304` instead of a full response. That saving needs an origin that sends `ETag` or `Last-Modified` and answers conditional requests. Otherwise, every revalidation downloads the full response. - **Purge**, with `POST /zones/{zone_id}/purge_cache`, when content must not be served again, for example content you removed for legal or security reasons. Invalidating takes the same request bodies as purging, needs the same permission, and counts against the same rate limits. After a broad invalidation, such as `purge_everything`, expect more conditional requests to your origin while visitors request the invalidated content again. ### Choose what to invalidate Send one of these fields in the request body: - `files`: specific URLs. If your cache key includes request headers, send each URL with the header values it was cached with. - `tags`: all content whose `Cache-Tag` response header contains one of the tags. - `hosts`: all content cached for the hostnames. - `prefixes`: all content whose URL starts with one of the prefixes. - `purge_everything`: all cached content in the zone. ### Check the result A `200` response with `success: true` means Cloudflare accepted the request. To check, request an invalidated URL and confirm that the `CF-Cache-Status` response header is `REVALIDATED` or `EXPIRED`. ### Availability and limits Rate limits and the number of items you can send in one request depend on your plan. See [Purge cache: availability and limits](https://developers.cloudflare.com/cache/how-to/purge-cache/#availability-and-limits).").option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ne={command:`invalidate`,describe:`Invalidate Cached Content`,builder:te,handler:async e=>s({command:`cache invalidate`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){a({command:`cf cache invalidate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/invalidate_cache`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:c(e.body)});return}let s=await n(e),l=await r({zone:e.zone},s,{quiet:e.quiet});if(e.zoneId=l,!await p({force:!!e.force,message:`This operation marks the selected content in the zone's cache as stale.`}))return;if(e.body){let t=c(e.body),n=await o(`Deleting`,async()=>s.send(ee,{body:t,zone_id:l}));i(n,{successLabel:`Deleted`});return}let u=await o(`Deleting`,async()=>t(s,`POST`,`/zones/${e.zoneId}/invalidate_cache`));i(u,{successLabel:`Deleted`})})};function re(e){return e.usage("$0 cache origin-cloud-regions bulk delete\n\nRemoves up to 100 IP-to-cloud-region mappings in a single request. Each IP is validated independently — successfully deleted items are returned in the `succeeded` array and IPs that could not be found or are invalid are returned in the `failed` array.").option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ie={command:`delete`,describe:`Batch delete origin cloud region mappings`,builder:re,handler:async e=>s({command:`cache origin-cloud-regions bulk delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){a({command:`cf cache origin-cloud-regions bulk delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/origin/cloud_regions/batch`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:c(e.body)});return}let s=await n(e);if(e.zoneId=await r({zone:e.zone},s,{quiet:e.quiet}),await p({force:!!e.force,message:`Are you sure you want to delete these Origin Cloud Region configurations?`})){if(e.body){let n=c(e.body);if(Array.isArray(n)&&n.length>100){let r=Math.ceil(n.length/100),a=null;for(let i=0;i<n.length;i+=100){let c=n.slice(i,i+100),l=Math.floor(i/100)+1;a=await o(`Deleting: batch ${l}/${r}`,async()=>t(s,`DELETE`,`/zones/${e.zoneId}/origin/cloud_regions/batch`,{body:c}))}i(a,{successLabel:`Deleted`});return}let r=await o(`Deleting`,async()=>t(s,`DELETE`,`/zones/${e.zoneId}/origin/cloud_regions/batch`,{body:n}));i(r,{successLabel:`Deleted`})}else if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)}})};function ae(e){return e.usage("$0 cache origin-cloud-regions bulk update\n\nUpserts up to 100 IP-to-cloud-region mappings in a single request. Items in the request body are created or replaced; mappings not included in the request body are preserved unchanged (this is a merge operation, not a full collection replacement). Each item is validated independently — valid items are applied and invalid items are returned in the `failed` array. The vendor and region for every item are validated against the list from `GET /zones/{zone_id}/origin/cloud_regions/supported_regions`.").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 _={command:`update`,describe:`Batch create or replace origin cloud region mappings`,builder:ae,handler:async e=>s({command:`cache origin-cloud-regions bulk update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf cache origin-cloud-regions bulk update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/origin/cloud_regions/batch`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:c(e.body)});return}let s=await n(e);if(e.zoneId=await r({zone:e.zone},s,{quiet:e.quiet}),e.body){let n=c(e.body);if(Array.isArray(n)&&n.length>100){let r=Math.ceil(n.length/100),a=null;for(let i=0;i<n.length;i+=100){let c=n.slice(i,i+100),l=Math.floor(i/100)+1;a=await o(`Updating: batch ${l}/${r}`,async()=>t(s,`PUT`,`/zones/${e.zoneId}/origin/cloud_regions/batch`,{body:c}))}i(a,{successLabel:`Updated`});return}let r=await o(`Updating`,async()=>t(s,`PUT`,`/zones/${e.zoneId}/origin/cloud_regions/batch`,{body:n}));i(r,{successLabel:`Updated`})}else if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},v={command:`bulk`,describe:`Operations for origin-cloud-regions.bulk`,builder:e=>e.command(ie).command(_).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var y={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/origin/cloud_regions/${t.origin_ip}`};function b(e){return e.usage(`$0 cache origin-cloud-regions delete <origin-ip>
2
+ import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{i as t,n}from"./auth-CB9wjyad.mjs";import{i as r}from"./context-DCon1tRZ.mjs";import{t as i}from"./output-BJEgbI0G.mjs";import{t as a}from"./dry-run-gy0Hl9xo.mjs";import{t as o}from"./progress-_Jux05O5.mjs";import{t as s}from"./run-Br8sYjNF.mjs";import"./telemetry-kjElc1zT.mjs";import{n as c,t as l}from"./body-parser-BKcZS9iJ.mjs";import{n as u}from"./input-validation-D7z60HJH.mjs";import{a as d,i as f,n as p}from"./prompt-SNVLBS1b.mjs";var m={method:`POST`,path:t=>e`/zones/${t.zone_id}/environments/${t.environment_id}/invalidate_cache`,body:`json`};function h(e){return e.usage("$0 cache invalidate-environment <environment-id>\n\nMarks cached content as stale for one environment of the zone. Content cached for the zone's other environments, including production, is not affected. Otherwise this works like `POST /zones/{zone_id}/invalidate_cache`: the next request for invalidated content makes Cloudflare revalidate it with your origin, and the request body takes the same fields. Environments are part of [Version Management](https://developers.cloudflare.com/version-management/). To delete the content instead, use `POST /zones/{zone_id}/environments/{environment_id}/purge_cache`. Invalidating by URL (`files`) does not work for environments that select requests by IP address, country, ASN, or threat score, and fails with error `1136`. Use `tags`, `hosts`, `prefixes`, or `purge_everything` for those environments. ### Availability and limits Rate limits and the number of items you can send in one request depend on your plan. See [Purge cache: availability and limits](https://developers.cloudflare.com/cache/how-to/purge-cache/#availability-and-limits).").positional(`environment-id`,{type:`string`,description:`The environment ID, from Version Management.`,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}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const g={command:`invalidate-environment <environment-id>`,describe:`Invalidate Cached Content by Environment`,builder:h,handler:async e=>s({command:`cache invalidate-environment`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){a({command:`cf cache invalidate-environment`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/environments/${e[`environment-id`]==null?`<environment-id>`:encodeURIComponent(String(e[`environment-id`]))}/invalidate_cache`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"environment-id":String(e[`environment-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:c(e.body)});return}let s=await n(e),l=await r({zone:e.zone},s,{quiet:e.quiet});if(e.zoneId=l,!await p({force:!!e.force,message:`This operation marks the selected content in the environment's cache as stale.`}))return;if(e.body){let t=c(e.body),n=await o(`Deleting`,async()=>s.send(m,{body:t,zone_id:l,environment_id:e[`environment-id`]}));i(n,{successLabel:`Deleted`});return}let u=await o(`Deleting`,async()=>t(s,`POST`,`/zones/${e.zoneId}/environments/${encodeURIComponent(String(e[`environment-id`]))}/invalidate_cache`));i(u,{successLabel:`Deleted`})})};var ee={method:`POST`,path:t=>e`/zones/${t.zone_id}/invalidate_cache`,body:`json`};function te(e){return e.usage("$0 cache invalidate\n\nMarks cached content as stale in every Cloudflare data center and cache tier, including Cache Reserve. The content stays in cache. The next request for it makes Cloudflare revalidate it with your origin, using the `ETag` and `Last-Modified` values it was cached with: - If your origin answers `304 Not Modified`, Cloudflare serves the cached copy without downloading it again, and `CF-Cache-Status` is `REVALIDATED`. - If your origin sends a full response, Cloudflare serves and caches the new content, and `CF-Cache-Status` is `EXPIRED`. With Tiered Cache, each tier revalidates with the tier above it, so a visitor can see `EXPIRED` even when your origin answered `304`. Until content is revalidated, your `stale-while-revalidate` and `stale-if-error` directives still apply, counted from the time you invalidated it. For example, if your origin fails during revalidation, Cloudflare can keep serving the stale copy for the `stale-if-error` window. ### Invalidate or purge? - **Invalidate** when content may not have changed, for example after a deploy. Unchanged content costs your origin a `304` instead of a full response. That saving needs an origin that sends `ETag` or `Last-Modified` and answers conditional requests. Otherwise, every revalidation downloads the full response. - **Purge**, with `POST /zones/{zone_id}/purge_cache`, when content must not be served again, for example content you removed for legal or security reasons. Invalidating takes the same request bodies as purging, needs the same permission, and counts against the same rate limits. After a broad invalidation, such as `purge_everything`, expect more conditional requests to your origin while visitors request the invalidated content again. ### Choose what to invalidate Send one of these fields in the request body: - `files`: specific URLs. If your cache key includes request headers, send each URL with the header values it was cached with. - `tags`: all content whose `Cache-Tag` response header contains one of the tags. - `hosts`: all content cached for the hostnames. - `prefixes`: all content whose URL starts with one of the prefixes. - `purge_everything`: all cached content in the zone. ### Check the result A `200` response with `success: true` means Cloudflare accepted the request. To check, request an invalidated URL and confirm that the `CF-Cache-Status` response header is `REVALIDATED` or `EXPIRED`. ### Availability and limits Rate limits and the number of items you can send in one request depend on your plan. See [Purge cache: availability and limits](https://developers.cloudflare.com/cache/how-to/purge-cache/#availability-and-limits).").option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ne={command:`invalidate`,describe:`Invalidate Cached Content`,builder:te,handler:async e=>s({command:`cache invalidate`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){a({command:`cf cache invalidate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/invalidate_cache`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:c(e.body)});return}let s=await n(e),l=await r({zone:e.zone},s,{quiet:e.quiet});if(e.zoneId=l,!await p({force:!!e.force,message:`This operation marks the selected content in the zone's cache as stale.`}))return;if(e.body){let t=c(e.body),n=await o(`Deleting`,async()=>s.send(ee,{body:t,zone_id:l}));i(n,{successLabel:`Deleted`});return}let u=await o(`Deleting`,async()=>t(s,`POST`,`/zones/${e.zoneId}/invalidate_cache`));i(u,{successLabel:`Deleted`})})};function re(e){return e.usage("$0 cache origin-cloud-regions bulk delete\n\nRemoves up to 100 IP-to-cloud-region mappings in a single request. Each IP is validated independently — successfully deleted items are returned in the `succeeded` array and IPs that could not be found or are invalid are returned in the `failed` array.").option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ie={command:`delete`,describe:`Batch delete origin cloud region mappings`,builder:re,handler:async e=>s({command:`cache origin-cloud-regions bulk delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){a({command:`cf cache origin-cloud-regions bulk delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/origin/cloud_regions/batch`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:c(e.body)});return}let s=await n(e);if(e.zoneId=await r({zone:e.zone},s,{quiet:e.quiet}),await p({force:!!e.force,message:`Are you sure you want to delete these Origin Cloud Region configurations?`})){if(e.body){let n=c(e.body);if(Array.isArray(n)&&n.length>100){let r=Math.ceil(n.length/100),a=null;for(let i=0;i<n.length;i+=100){let c=n.slice(i,i+100),l=Math.floor(i/100)+1;a=await o(`Deleting: batch ${l}/${r}`,async()=>t(s,`DELETE`,`/zones/${e.zoneId}/origin/cloud_regions/batch`,{body:c}))}i(a,{successLabel:`Deleted`});return}let r=await o(`Deleting`,async()=>t(s,`DELETE`,`/zones/${e.zoneId}/origin/cloud_regions/batch`,{body:n}));i(r,{successLabel:`Deleted`})}else if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)}})};function ae(e){return e.usage("$0 cache origin-cloud-regions bulk update\n\nUpserts up to 100 IP-to-cloud-region mappings in a single request. Items in the request body are created or replaced; mappings not included in the request body are preserved unchanged (this is a merge operation, not a full collection replacement). Each item is validated independently — valid items are applied and invalid items are returned in the `failed` array. The vendor and region for every item are validated against the list from `GET /zones/{zone_id}/origin/cloud_regions/supported_regions`.").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 _={command:`update`,describe:`Batch create or replace origin cloud region mappings`,builder:ae,handler:async e=>s({command:`cache origin-cloud-regions bulk update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf cache origin-cloud-regions bulk update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/origin/cloud_regions/batch`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:c(e.body)});return}let s=await n(e);if(e.zoneId=await r({zone:e.zone},s,{quiet:e.quiet}),e.body){let n=c(e.body);if(Array.isArray(n)&&n.length>100){let r=Math.ceil(n.length/100),a=null;for(let i=0;i<n.length;i+=100){let c=n.slice(i,i+100),l=Math.floor(i/100)+1;a=await o(`Updating: batch ${l}/${r}`,async()=>t(s,`PUT`,`/zones/${e.zoneId}/origin/cloud_regions/batch`,{body:c}))}i(a,{successLabel:`Updated`});return}let r=await o(`Updating`,async()=>t(s,`PUT`,`/zones/${e.zoneId}/origin/cloud_regions/batch`,{body:n}));i(r,{successLabel:`Updated`})}else if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},v={command:`bulk`,describe:`Operations for origin-cloud-regions.bulk`,builder:e=>e.command(ie).command(_).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var y={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/origin/cloud_regions/${t.origin_ip}`};function b(e){return e.usage(`$0 cache origin-cloud-regions delete <origin-ip>
3
3
 
4
4
  Removes the cloud region mapping for a single origin IP address. The IP path parameter is normalized before lookup. Returns the deleted IP on success. Returns 404 if no mapping exists for the specified IP. When the last mapping for the zone is removed the underlying rule record is also deleted.`).positional(`origin-ip`,{type:`string`,description:`Origin IP address whose mapping should be deleted.`,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 x={command:`delete <origin-ip>`,describe:`Delete an origin cloud region mapping`,builder:b,handler:async e=>s({command:`cache origin-cloud-regions delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){a({command:`cf cache origin-cloud-regions delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/origin/cloud_regions/${e[`origin-ip`]==null?`<origin-ip>`:encodeURIComponent(String(e[`origin-ip`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"origin-ip":String(e[`origin-ip`]??``)},bodyKind:`none`});return}let t=await n(e),s=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=s,!await p({force:!!e.force,message:`Are you sure you want to delete this Origin Cloud Region configuration?`}))return;let c=await o(`Deleting`,async()=>t.send(y,{zone_id:s,origin_ip:e[`origin-ip`]}));i(c,{successLabel:`Deleted`})})};var S={method:`GET`,path:t=>e`/zones/${t.zone_id}/origin/cloud_regions/${t.origin_ip}`};function C(e){return e.usage(`$0 cache origin-cloud-regions get <origin-ip>
5
5
 
@@ -0,0 +1,18 @@
1
+ #!/usr/bin/env node
2
+ import{D as e,E as t,J as n,L as r,N as i,d as a,et as o,h as s,it as c,k as l,q as u}from"./dist-ataVE8ob.mjs";import{N as d,O as f}from"./chunk-2HLTAS5V-B92NbX1j.mjs";import{_ as p,a as m,c as ee,d as h,f as g,g as te,h as ne,i as re,l as ie,m as ae,o as _,p as v,r as oe,s as y,t as se,u as b}from"./chunk-3PJ54H4K-CbRAWQWI.mjs";import{createRequire as x}from"node:module";import{chmodSync as S,existsSync as C,mkdirSync as w,readFileSync as T,readdirSync as E,rmSync as D,writeFileSync as O}from"node:fs";import k from"node:path";import{URLSearchParams as ce}from"node:url";x(import.meta.url||(typeof __filename==`string`?__filename:`/`));function A(e){function t(){return k.resolve(e(),`preferences.json`)}p(t,`getUserPreferencesPath`);function n(){try{let e=T(t(),`utf8`),n=JSON.parse(e);return typeof n==`object`&&n?n:{}}catch{return{}}}p(n,`readUserPreferences`);function r(e){let r={...n(),...e},i=t();w(k.dirname(i),{recursive:!0}),O(i,JSON.stringify(r,null,` `),{encoding:`utf-8`})}return p(r,`updateUserPreferences`),{readUserPreferences:n,updateUserPreferences:r}}p(A,`createPreferences`);var j=6e4,M=525600,N=43200,P=1440,F=Symbol.for(`constructDateFrom`);function I(e,t){return typeof e==`function`?e(t):e&&typeof e==`object`&&F in e?e[F](t):e instanceof Date?new e.constructor(t):new Date(t)}p(I,`constructFrom`);function L(e,t){return I(t||e,e)}p(L,`toDate`);var R={};function z(){return R}p(z,`getDefaultOptions`);function B(e){let t=L(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-n}p(B,`getTimezoneOffsetInMilliseconds`);function V(e,...t){let n=I.bind(null,e||t.find(e=>typeof e==`object`));return t.map(n)}p(V,`normalizeDates`);function H(e,t){let n=+L(e)-L(t);return n<0?-1:n>0?1:n}p(H,`compareAsc`);function U(e){return I(e,Date.now())}p(U,`constructNow`);function le(e){return t=>{let n=(e?Math[e]:Math.trunc)(t);return n===0?0:n}}p(le,`getRoundingMethod`);var ue={lessThanXSeconds:{one:`less than a second`,other:`less than {{count}} seconds`},xSeconds:{one:`1 second`,other:`{{count}} seconds`},halfAMinute:`half a minute`,lessThanXMinutes:{one:`less than a minute`,other:`less than {{count}} minutes`},xMinutes:{one:`1 minute`,other:`{{count}} minutes`},aboutXHours:{one:`about 1 hour`,other:`about {{count}} hours`},xHours:{one:`1 hour`,other:`{{count}} hours`},xDays:{one:`1 day`,other:`{{count}} days`},aboutXWeeks:{one:`about 1 week`,other:`about {{count}} weeks`},xWeeks:{one:`1 week`,other:`{{count}} weeks`},aboutXMonths:{one:`about 1 month`,other:`about {{count}} months`},xMonths:{one:`1 month`,other:`{{count}} months`},aboutXYears:{one:`about 1 year`,other:`about {{count}} years`},xYears:{one:`1 year`,other:`{{count}} years`},overXYears:{one:`over 1 year`,other:`over {{count}} years`},almostXYears:{one:`almost 1 year`,other:`almost {{count}} years`}},de=/* @__PURE__ */ p((e,t,n)=>{let r,i=ue[e];return r=typeof i==`string`?i:t===1?i.one:i.other.replace(`{{count}}`,t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?`in `+r:r+` ago`:r},`formatDistance`);function W(e){return(t={})=>{let n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}p(W,`buildFormatLongFn`);var fe={date:W({formats:{full:`EEEE, MMMM do, y`,long:`MMMM do, y`,medium:`MMM d, y`,short:`MM/dd/yyyy`},defaultWidth:`full`}),time:W({formats:{full:`h:mm:ss a zzzz`,long:`h:mm:ss a z`,medium:`h:mm:ss a`,short:`h:mm a`},defaultWidth:`full`}),dateTime:W({formats:{full:`{{date}} 'at' {{time}}`,long:`{{date}} 'at' {{time}}`,medium:`{{date}}, {{time}}`,short:`{{date}}, {{time}}`},defaultWidth:`full`})},pe={lastWeek:`'last' eeee 'at' p`,yesterday:`'yesterday at' p`,today:`'today at' p`,tomorrow:`'tomorrow at' p`,nextWeek:`eeee 'at' p`,other:`P`},me=/* @__PURE__ */ p((e,t,n,r)=>pe[e],`formatRelative`);function G(e){return(t,n)=>{let r=n?.context?String(n.context):`standalone`,i;if(r===`formatting`&&e.formattingValues){let t=e.defaultFormattingWidth||e.defaultWidth,r=n?.width?String(n.width):t;i=e.formattingValues[r]||e.formattingValues[t]}else{let t=e.defaultWidth,r=n?.width?String(n.width):e.defaultWidth;i=e.values[r]||e.values[t]}let a=e.argumentCallback?e.argumentCallback(t):t;return i[a]}}p(G,`buildLocalizeFn`);var he={ordinalNumber:/* @__PURE__ */ p((e,t)=>{let n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+`st`;case 2:return n+`nd`;case 3:return n+`rd`}return n+`th`},`ordinalNumber`),era:G({values:{narrow:[`B`,`A`],abbreviated:[`BC`,`AD`],wide:[`Before Christ`,`Anno Domini`]},defaultWidth:`wide`}),quarter:G({values:{narrow:[`1`,`2`,`3`,`4`],abbreviated:[`Q1`,`Q2`,`Q3`,`Q4`],wide:[`1st quarter`,`2nd quarter`,`3rd quarter`,`4th quarter`]},defaultWidth:`wide`,argumentCallback:/* @__PURE__ */ p(e=>e-1,`argumentCallback`)}),month:G({values:{narrow:[`J`,`F`,`M`,`A`,`M`,`J`,`J`,`A`,`S`,`O`,`N`,`D`],abbreviated:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],wide:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`]},defaultWidth:`wide`}),day:G({values:{narrow:[`S`,`M`,`T`,`W`,`T`,`F`,`S`],short:[`Su`,`Mo`,`Tu`,`We`,`Th`,`Fr`,`Sa`],abbreviated:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],wide:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`]},defaultWidth:`wide`}),dayPeriod:G({values:{narrow:{am:`a`,pm:`p`,midnight:`mi`,noon:`n`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},abbreviated:{am:`AM`,pm:`PM`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`}},defaultWidth:`wide`,formattingValues:{narrow:{am:`a`,pm:`p`,midnight:`mi`,noon:`n`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`},abbreviated:{am:`AM`,pm:`PM`,midnight:`midnight`,noon:`noon`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`midnight`,noon:`noon`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`}},defaultFormattingWidth:`wide`})};function K(e){return(t,n={})=>{let r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;let o=a[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(s)?_e(s,e=>e.test(o)):ge(s,e=>e.test(o)),l;l=e.valueCallback?e.valueCallback(c):c,l=n.valueCallback?n.valueCallback(l):l;let u=t.slice(o.length);return{value:l,rest:u}}}p(K,`buildMatchFn`);function ge(e,t){for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}p(ge,`findKey`);function _e(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}p(_e,`findIndex`);function ve(e){return(t,n={})=>{let r=t.match(e.matchPattern);if(!r)return null;let i=r[0],a=t.match(e.parsePattern);if(!a)return null;let o=e.valueCallback?e.valueCallback(a[0]):a[0];o=n.valueCallback?n.valueCallback(o):o;let s=t.slice(i.length);return{value:o,rest:s}}}p(ve,`buildMatchPatternFn`);var ye={code:`en-US`,formatDistance:de,formatLong:fe,formatRelative:me,localize:he,match:{ordinalNumber:ve({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:/* @__PURE__ */ p(e=>parseInt(e,10),`valueCallback`)}),era:K({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:`any`}),quarter:K({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:`any`,valueCallback:/* @__PURE__ */ p(e=>e+1,`valueCallback`)}),month:K({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:`any`}),day:K({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:`any`}),dayPeriod:K({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:`any`,parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:`any`})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function be(e,t,n){let r=z(),i=n?.locale??r.locale??ye,a=H(e,t);if(isNaN(a))throw RangeError(`Invalid time value`);let o=Object.assign({},n,{addSuffix:n?.addSuffix,comparison:a}),[s,c]=V(n?.in,...a>0?[t,e]:[e,t]),l=le(n?.roundingMethod??`round`),u=c.getTime()-s.getTime(),d=u/j,f=(u-(B(c)-B(s)))/j,p=n?.unit,m;if(m=p||(d<1?`second`:d<60?`minute`:d<P?`hour`:f<N?`day`:f<M?`month`:`year`),m===`second`){let e=l(u/1e3);return i.formatDistance(`xSeconds`,e,o)}if(m===`minute`){let e=l(d);return i.formatDistance(`xMinutes`,e,o)}if(m===`hour`){let e=l(d/60);return i.formatDistance(`xHours`,e,o)}if(m===`day`){let e=l(f/P);return i.formatDistance(`xDays`,e,o)}if(m===`month`){let e=l(f/N);return e===12&&p!==`month`?i.formatDistance(`xYears`,1,o):i.formatDistance(`xMonths`,e,o)}{let e=l(f/M);return i.formatDistance(`xYears`,e,o)}}p(be,`formatDistanceStrict`);function xe(e,t){return be(e,U(e),t)}p(xe,`formatDistanceToNowStrict`);function q(e,t){return{read:/* @__PURE__ */ p(()=>{let n=t();if(!C(n))return;let r=f(n);try{return g(e,r)}catch{return}},`read`),write(n){let r=t();w(k.dirname(r),{recursive:!0}),O(r,ae(e,n),{encoding:`utf-8`,mode:384}),S(r,384)},clear(){let e=t(),n=C(e);return D(e,{force:!0}),n},path:t}}p(q,`createFileStorage`);function Se(e){let{temporaryAccountLogger:t,prompt:n}=e;return/* @__PURE__ */ p(async function(e,r){if(l())return t.log(r),!0;let i=await n(e);return typeof i==`string`&&i.trim().toLowerCase()===`yes`},`ensureTemporaryTermsAccepted`)}p(Se,`createTemporaryTermsPrompt`);var Ce=[9106,1e4];function J(e){return e?.code}p(J,`getErrorCode`);function we(e){let t=J(e);return t!==void 0&&Ce.includes(t)}p(we,`isMembershipsInaccessible`);function Te(e){return{"no-credentials-non-interactive":`Could not authenticate because no credentials were found and the environment is non-interactive. Set a CLOUDFLARE_API_TOKEN environment variable or run \`${e}\` in an interactive terminal first.`,"no-credentials-login-failed":`No credentials were found and the login attempt was unsuccessful. Run \`${e}\` to try again.`,"token-expired-non-interactive":`Your auth token has expired and could not be refreshed, and the environment is non-interactive. Run \`${e}\` in an interactive terminal or set a CLOUDFLARE_API_TOKEN.`,"token-expired-login-failed":`Your auth token has expired and could not be refreshed, and the login attempt was unsuccessful. Run \`${e}\` to try again.`,"token-refresh-unreachable":`Your auth token has expired and could not be refreshed because the Cloudflare auth server could not be reached. This is usually a network problem (connectivity, proxy, or IPv6), not an invalid login: your stored credentials were left unchanged. Check your connection and try again.`}}p(Te,`notLoggedInErrorBodies`);function Ee(e,t,n){let r=new Date(t.claim.expiresAt);e.log(_`
3
+ Temporary account ready:
4
+ Account: ${t.account.name} (${n?`reused`:`created`})
5
+ Claim within: ${xe(r)}
6
+ Claim URL: ${t.claim.url}
7
+ `)}p(Ee,`logTemporaryPreviewAccount`);function De(o,c){let{logger:u}=c,f=c.temporaryAccountLogger??u,m=o.cliName,h=o.temporaryAccountFlag??`--temporary-account`,g=Te(o.commands.login),te=`
8
+ Run \`${o.commands.whoami}\` to check your current authentication status.`,ae=A(o.getConfigPath),_=a(u,o.cacheNamespace?{namespace:o.cacheNamespace}:void 0),v=oe({serviceName:o.keyringServiceName,getConfigPath:o.getConfigPath,isKeyringEnabled:/* @__PURE__ */ p(()=>ae.readUserPreferences().keyring_enabled===!0,`isKeyringEnabled`),logger:u,isNonInteractiveOrCI:l,loginCommand:o.commands.login,format:o.fileFormat}),y=o.allowGlobalAuthKey??!0,b=re({logger:u,isNonInteractiveOrCI:l,openInBrowser:/* @__PURE__ */ p(e=>i(e,u),`openInBrowser`),hasEnvCredentials:/* @__PURE__ */ p(()=>ee({allowGlobalAuthKey:y})!==void 0,`hasEnvCredentials`),purgeOnLoginOrLogout:_.purgeConfigCaches,clientId:o.clientId,consent:o.consent,cliDisplayName:o.displayName,deviceLoginCommand:o.commands.deviceLogin,redirectUri:o.redirectUri,storageFactory:v.storageFactory,allowGlobalAuthKey:y,temporary:{storage:q(o.fileFormat,o.getTemporaryAccountConfigPath),cliDisplayName:o.displayName,logoutCommand:o.commands.logout,temporaryAccountFlag:h,prompt:Se({temporaryAccountLogger:f,prompt:c.prompt}),temporaryAccountLogger:f}});function x(e){b.setProfile(e)}p(x,`setProfile`);function S(){return b.getActiveProfile()}p(S,`getActiveProfile`);function C(){return v.getActiveStore(b.getActiveProfile())}p(C,`getCredentialStore`);function w(e,t){b.setTemporaryAllowed(e,t)}p(w,`setTemporaryAllowed`);function T(){return b.getAPIToken()}p(T,`getAPIToken`);function E(){return b.requireApiToken()}p(E,`requireApiToken`);function D(e,t){return{complianceConfig:e,scopes:t?.scopes??o.getDefaultScopeKeys(),browser:t?.browser??!0,callbackHost:t?.callbackHost,callbackPort:t?.callbackPort,profile:t?.profile,device:t?.device??o.useDeviceFlowByDefault??!1}}p(D,`withLoginDefaults`);async function O(e,t){return b.login(D(e,t))}p(O,`login`);async function k(e){return b.logout(e)}p(k,`logout`);async function j(e,t){return b.getActiveTemporaryAccount()?{loggedIn:!0}:b.loginOrRefreshIfRequired(D(e,t))}p(j,`loginOrRefreshIfRequired`);async function M(){return b.getOAuthTokenFromLocalState()}p(M,`getOAuthTokenFromLocalState`);function N(){return b.getScopes()}p(N,`getScopes`);function P(){return v.storageFactory(S()).read()}p(P,`readAuthCredentials`);function F(e){v.storageFactory(S()).write(e)}p(F,`writeAuthCredentials`);function I(){let e=b.getActiveProfile();return e==="default"?`${o.accountCachePrefix}.json`:`${o.accountCachePrefix}-${e}.json`}p(I,`getAccountCacheFileName`);function L(e){_.saveToConfigCache(I(),{account:e})}p(L,`saveAccountToCache`);function R(){return _.getConfigCache(I()).account}p(R,`getAccountFromCache`);async function z(e,n,i){let a=[],o=!0,l=1,d;for(;o;){d=new ce(d),d.set(`page`,String(l));let{response:f,status:p}=await s(e,n,{},c.userAgent,u,d,void 0,i);f.success?(a.push(...f.result),t(f.result_info)?l+=1:o=!1):r(n,f,p)}return a}p(z,`fetchAccountsPaged`);async function B(e,t={}){let{throwOnEmpty:n=!0}=t,r=await j(e);if(!r.loggedIn)throw new se(`Not logged in. ${g[r.reason]}${te}`,r.reason,`cfetch auth login required`);let i=E(),[a,s]=await Promise.allSettled([z(e,`/accounts`,i),z(e,`/memberships`,i)]);if(a.status===`rejected`)throw a.reason;if(s.status===`rejected`){if(we(s.reason)){if(a.status===`fulfilled`&&a.value.length>0)return a.value;throw J(s.reason)===9106?new d(`Failed to automatically retrieve account IDs for the logged in user.
9
+ You may have incorrect permissions on your API token, or an environment variable such as CLOUDFLARE_API_TOKEN, CLOUDFLARE_API_KEY, or CLOUDFLARE_EMAIL may be set to an invalid value.
10
+ Check your environment and unset or correct any Cloudflare credential variables, or run \`${o.commands.login}\` to re-authenticate.
11
+ You can also skip this account check by adding an \`account_id\` in your ${o.getConfigFileLabel()} file, or by setting the value of CLOUDFLARE_ACCOUNT_ID`,{telemetryMessage:`user account fetch permission denied`}):new d(`Failed to automatically retrieve account IDs for the logged in user.
12
+ You may have incorrect permissions on your API token, or your authentication may have expired. Try running \`${o.commands.login}\` to re-authenticate. You can also skip this account check by adding an \`account_id\` in your ${o.getConfigFileLabel()} file, or by setting the value of CLOUDFLARE_ACCOUNT_ID`,{telemetryMessage:`user account fetch permission denied`})}throw s.reason}let c=new Set(s.value.map(e=>e.account.id)),l=a.value.filter(e=>c.has(e.id));if(l.length===0&&n)throw new d(`Failed to automatically retrieve account IDs for the logged in user.
13
+ In a non-interactive environment, it is mandatory to specify an account ID, either by assigning its value to CLOUDFLARE_ACCOUNT_ID, or as \`account_id\` in your ${o.getConfigFileLabel()} file.
14
+ Alternatively, try running \`${o.commands.login}\` to re-authenticate.`,{telemetryMessage:`user account fetch empty`});return l}p(B,`fetchAllAccounts`);function V(e){let t=b.getActiveTemporaryAccount();return t?t.account.id:e.account_id?ne(e.account_id,`set as \`account_id\` in your ${o.getConfigFileLabel()} file`):ie()||R()?.id}p(V,`getActiveAccountId`);async function H(t){let n=V(t);if(n)return n;let r=await B(t);if(r.length===1)return L({id:r[0].id,name:r[0].name}),r[0].id;try{let e=await c.select(`Select an account`,{choices:r.map(e=>({title:e.name,value:e.id}))}),t=r.find(t=>t.id===e);if(!t)throw Error(`Selected account not found in accounts list`);return L({id:t.id,name:t.name}),e}catch(t){if(c.isNoDefaultValueProvidedError(t)){let t=e();throw new d(`More than one account available but unable to select one in non-interactive mode.
15
+ Please set the appropriate \`account_id\` in your ${o.getConfigFileLabel()} file or assign it to the \`CLOUDFLARE_ACCOUNT_ID\` environment variable.
16
+ Available accounts are (\`<name>\`: \`<account_id>\`):
17
+ ${r.map(e=>` \`${t?`(redacted)`:e.name}\`: \`${e.id}\``).join(`
18
+ `)}`,{telemetryMessage:`user account selection unavailable`})}throw t}}p(H,`getOrSelectAccountId`);async function U(e){if(b.isTemporaryAllowed()){if(n(e)!==`public`)throw new d(`Temporary accounts aren't available when the compliance region is not set to public.`,{telemetryMessage:`user temporary account unavailable in compliance region`});let t=b.getActiveTemporaryAccount();if(t)return t.account.id;if(T())throw new d(`You're already authenticated with Cloudflare, so \`${h}\` can't be used. Temporary preview accounts are only for unauthenticated use. Either remove \`${h}\` to use your existing account, or log out (and unset CLOUDFLARE_API_TOKEN) first.`,{telemetryMessage:`user temporary account already authenticated`});let{account:r,cached:i}=await b.activateTemporaryAccount();return Ee(f,r,i),r.account.id}let t=await j(e);if(!t.loggedIn)throw t.reason===`no-credentials-non-interactive`||t.reason===`token-expired-non-interactive`?new d(`In a non-interactive environment, it's necessary to set a CLOUDFLARE_API_TOKEN environment variable for ${m} to work. Please go to https://developers.cloudflare.com/fundamentals/api/get-started/create-token/ for instructions on how to create an api token, and assign its value to CLOUDFLARE_API_TOKEN.`,{telemetryMessage:`user auth missing api token non interactive`}):t.reason===`token-refresh-unreachable`?new d(g[t.reason],{telemetryMessage:`user auth token refresh unreachable`}):new d(`Did not login, quitting...`,{telemetryMessage:`user login cancelled`});let r=await H(e);if(!r)throw new d(`No account id found, quitting...`,{telemetryMessage:`user auth missing account id`});return r}return p(U,`requireAuth`),{setProfile:x,getActiveProfile:S,getCredentialStore:C,setTemporaryAllowed:w,getAPIToken:T,requireApiToken:E,login:O,logout:k,loginOrRefreshIfRequired:j,getOAuthTokenFromLocalState:M,getScopes:N,readAuthCredentials:P,writeAuthCredentials:F,getActiveAccountId:V,getOrSelectAccountId:H,getAccountFromCache:R,fetchAllAccounts:B,requireAuth:U}}p(De,`createCloudflareAuth`);var Oe=`profiles/directory-bindings.json`,ke=`.enc`;function Y(e){let{logger:t,getConfigPath:n,keyringServiceName:r,format:i}=e,a=`.${i}`;function o(e){return y(n(),e,i)}p(o,`plaintextPath`);function s(e){return h(n(),e)}p(s,`encryptedPath`);function c(){return k.dirname(o(`default`))}p(c,`getProfileConfigDirectory`);let l={exists(e){return C(o(e))||C(s(e))},list(){let e=c();if(!C(e))return[];let t=/* @__PURE__ */ new Set;for(let n of E(e))n.endsWith(a)?t.add(n.slice(0,-a.length)):n.endsWith(ke)&&t.add(n.slice(0,-ke.length));return[...t]},delete(e){let{backendAvailable:a,encryptedFileExisted:s}=v({serviceName:r,configPath:n(),profile:e,format:i});q(i,()=>o(e)).clear(),s&&!a&&t.warn(`Removed the credential files for profile "${e}", but the keyring backend was not reachable on this host so its keyring entry could not be cleared. Clear it manually if it persists.`)}};function u(){return k.join(n(),Oe)}return p(u,`getDirectoryBindingsPath`),m({configs:l,bindings:{read(){try{let e=T(u(),`utf-8`);return JSON.parse(e)}catch{return{}}},write(e){let t=u();w(k.dirname(t),{recursive:!0}),O(t,JSON.stringify(e,null,` `),`utf-8`)}}})}p(Y,`createCloudflareProfileStore`);function Ae(e){let{loginCommand:t,createProfileCommand:n,keyringServiceName:r,getConfigPath:i,format:a,preferences:o}=e,{readUserPreferences:s,updateUserPreferences:c}=o;function l(e){return e??`default`}p(l,`describeProfile`);function u(e){let t=[];C(h(i()))&&t.push(void 0);let n=Y({logger:e,getConfigPath:i,keyringServiceName:r,format:a});for(let e of n.configs.list()){try{te(e)}catch{continue}C(h(i(),e))&&t.push(e)}return t}p(u,`listEncryptedProfiles`);function d(e){let o=u(e);if(o.length===0)return;let s=[],c=[];for(let t of o)try{let{backendAvailable:e}=v({serviceName:r,configPath:i(),profile:t,format:a});s.push(l(t)),e||c.push(l(t))}catch(n){e.warn(`Failed to remove encrypted credentials for profile "${l(t)}": ${n instanceof Error?n.message:String(n)}. You may need to clear them manually.`)}if(s.length>0){let r=n?`Re-authenticate with \`${t}\` (default profile) or \`${n} <name>\` (named profiles).`:`Re-authenticate with \`${t}\`.`;e.log(`Removed encrypted credentials for ${s.map(e=>`"${e}"`).join(`, `)}. ${r}`)}c.length>0&&e.warn(`The keyring backend was not reachable on this host, so the keyring entry for ${c.map(e=>`"${e}"`).join(`, `)} could not be cleared. Clear it manually if it persists.`)}p(d,`scrubAllEncryptedProfiles`);function f(e,t){let{logger:n,getCredentialStore:r}=t,i=s().keyring_enabled===!0,a=b();if(a!==void 0&&a!==e&&n.warn(`CLOUDFLARE_AUTH_USE_KEYRING=${a} overrides ${e?`enabling`:`disabling`} keyring storage for this command.`),!e&&a!==!0&&d(n),c({keyring_enabled:e}),e&&a!==!1)try{r().kind!==`encrypted-file`&&(c({keyring_enabled:i}),n.warn(`Keyring storage isn't available on this host (see warning above), so it was not enabled. Try again once the keyring backend is reachable.`))}catch(e){throw c({keyring_enabled:i}),e}return{enabled:s().keyring_enabled===!0}}return p(f,`setKeyringPreference`),{setKeyringPreference:f}}p(Ae,`createKeyringPreference`);function je(e){let{getConfigPath:t,format:n}=e;function r(e){return y(t(),e,n)}p(r,`getAuthConfigFilePath`);function i(e){return h(t(),e)}p(i,`getEncryptedAuthConfigFilePath`);function a(e){return q(n,()=>r(e))}p(a,`defaultAuthConfigStorage`);function o(e,t){a(t).write(e)}p(o,`writeAuthConfigFile`);function s(e){return a(e).read()}return p(s,`readAuthConfigFile`),{getAuthConfigFilePath:r,getEncryptedAuthConfigFilePath:i,defaultAuthConfigStorage:a,readAuthConfigFile:s,writeAuthConfigFile:o}}p(je,`createAuthConfigFileHelpers`),x(import.meta.url||(typeof __filename==`string`?__filename:`/`));var X=`cloudflare`,Me=`cf`,Ne=`cf`,Pe=`http://localhost:8877/oauth/callback`,Fe={granted:{url:`https://welcome.developers.workers.dev/cf-oauth-consent-granted`},denied:{url:`https://welcome.developers.workers.dev/cf-oauth-consent-denied`,error:"Error: Consent denied. You must grant consent to cf in order to login.\nIf you don't want to do this consider passing an API token via the `CLOUDFLARE_API_TOKEN` environment variable"}},Ie=c({variableName:`CLOUDFLARE_CLIENT_ID`,defaultValue:/* @__PURE__ */ p(()=>`cbca97e7-c331-4cdd-8fd8-e25a451b98bf`,`defaultValue`)});function Z(){return o({appName:`cloudflare`,leadingDot:!1,useLegacyHomeDir:!1})}p(Z,`getCfConfigPath`);var Le=/* @__PURE__ */ `access:read,access:write,account:read,account_api_tokens:create,agw:read,agw:run,agw:write,ai:read,ai:write,ai-search:read,ai-search:run,ai-search:write,aiaudit:read,aiaudit:write,aig:read,aig:write,auditlogs:read,billing:read,billing:write,browser:read,browser:write,cfone:read,cfone:write,cloudchamber:write,connectivity:admin,connectivity:bind,connectivity:read,constellation:write,containers:write,d1:write,dex:read,dex:write,dns_analytics:read,dns_records:edit,dns_records:read,dns_settings:read,email_routing:read,email_routing:write,email_sending:read,email_sending:write,firstpartytags:write,hyperdrive-planetscale:setup,images:read,images:write,lb:edit,lb:read,logpush:read,logpush:write,mcp_portals:read,mcp_portals:write,notebook-examples:read,notebook-managed:read,notification:read,notification:write,oauth_account_ssl_and_certificates_write,offline,openid,pages:read,pages:write,pipelines:read,pipelines:setup,pipelines:write,query_cache:write,queues:write,r2_catalog:write,radar:read,rag:read,rag:write,registrar:read,registrar:write,secrets_store:read,secrets_store:write,sso-connector:read,sso-connector:write,ssl_certs:write,teams:pii,teams:read,teams:secure_location,teams:write,url_scanner:read,url_scanner:write,user:read,vectorize:write,workers:read,workers:write,workers_builds:read,workers_builds:write,workers_deployments:read,workers_kv:write,workers_observability:read,workers_observability:write,workers_observability_telemetry:write,workers_routes:write,workers_scripts:write,workers_tail:read,zone:read,account-analytics.read,account-ssl-and-certificates.write,ssl-and-certificates.read,ssl-and-certificates.write,registrar-domains.read,registrar-domains.admin,logs.read,logs.write,websearch.run,snippets.read,snippets.write,access-acct.read,access-acct.revoke,access-acct.write,access-app.read,access-app.revoke,access-app.write,access-audit-log.read,access-certificate.read,access-certificate.write,access-custom-page.read,access-custom-page.write,access-device-posture.read,access-device-posture.write,access-group.read,access-group.write,access-idp.read,access-idp.write,access-key.read,access-key.write,access-org.read,access-org.revoke,access-org.write,access-policy-test.read,access-policy-test.write,access-policy.read,access-policy.write,access-population.read,access-population.write,access-saml-certificate.read,access-saml-certificate.write,access-scim-log.read,access-seats.write,access-service-token.read,access-service-token.write,access-ssh-auditing.read,access-ssh-auditing.write,access-tag.read,access-tag.write,access-users.read,access-users.write,access.read,access.revoke,access.write,account-api-gateway.read,account-api-gateway.write,account-custom-asset.read,account-custom-asset.write,account-custom-error-rules.read,account-custom-error-rules.write,account-custom-pages.read,account-custom-pages.write,account-disable-esc.read,account-disable-esc.write,account-dns-settings.read,account-dns-settings.write,account-firewall-access-rules.read,account-firewall-access-rules.write,account-logs.read,account-logs.write,account-rule-lists.read,account-rule-lists.write,account-rulesets.read,account-rulesets.write,account-security-center-insights.read,account-security-center-insights.write,account-settings.read,account-settings.write,account-ssl-and-certificates.read,account-waf.read,account-waf.write,account-waiting-rooms.read,address-maps.read,address-maps.write,agent-memory.write,agw.read,agw.run,agw.write,ai-search.index,ai-search.metadata_read,ai-search.read,ai-search.run,ai-search.write,ai.read,ai.write,aiaudit.read,aiaudit.write,aig.metadata_read,aig.read,aig.run,aig.write,analytics.read,api-gateway.read,api-gateway.write,apps.write,argotunnel.read,argotunnel.write,artifacts.read,artifacts.write,bot-management-feedback.read,bot-management-feedback.write,bot-management.read,bot-management.write,browser-rendering.read,browser-rendering.write,cache-settings.read,cache-settings.write,cache.purge,calls.read,calls.write,casb.read,casb.write,cf-agents.read,cf-agents.write,challenge-widgets.read,challenge-widgets.write,chinanetwork-steering.read,chinanetwork-steering.write,cloud-connector.read,cloud-connector.write,cloud-email-security.read,cloud-email-security.write,cloudchamber.read,cloudchamber.write,cloudforce-one.read,cloudforce-one.write,config-settings.read,config-settings.write,connectivity-directory.admin,connectivity-directory.bind,connectivity-directory.read,constellation.read,constellation.write,containers.read,containers.write,custom-errors.read,custom-errors.write,custom-pages.read,custom-pages.write,d1.metadata_read,d1.read,d1.write,ddos-botnet-feed.read,ddos-botnet-feed.write,ddos-protection.read,ddos-protection.write,dls.read,dls.write,dns-firewall.read,dns-firewall.write,dns-view.read,dns-view.write,dns.read,dns.write,domain-page-shield.read,domain-page.shield,dynamic-redirect.read,dynamic-redirect.write,email-routing-account-rule.read,email-routing-address.read,email-routing-address.write,email-routing-rule.read,email-routing-rule.write,email-routing-suppression.read,email-routing-suppression.write,email-security-dmarcreports.read,email-security-dmarcreports.write,email-sending.read,email-sending.write,fbm.admin,fbm.read,fbm.write,field-extractor.read,field-extractor.write,firewall-for-ai.read,firewall-for-ai.write,firewall-services.read,firewall-services.write,flagship.evaluate,flagship.read,flagship.write,fraud-detection-pii.read,fraud-detection.read,fraud-detection.write,fraud-events.write,fraud-feedback.read,fraud-feedback.write,healthcheck.read,healthcheck.write,http-applications.read,http-applications.write,http-ddos-managed-ruleset.read,http-ddos-managed-ruleset.write,images.metadata_read,images.read,images.write,integration.write,intel.read,intel.write,iot.read,iot.write,ip-prefix-bgp-on-demand.read,ip-prefix-bgp-on-demand.write,ip-prefix.read,ip-prefix.write,k2.consume,k2.produce,k2.read,k2.write,l4-ddos-managed-ruleset.read,l4-ddos-managed-ruleset.write,load-balancers-account.read,load-balancers-account.write,load-balancers.read,load-balancers.write,load-balancing-monitors-and-pools.read,load-balancing-monitors-and-pools.write,magic-firewall.read,magic-firewall.write,magic-transit.read,magic-transit.write,magic-wan.read,magic-wan.write,managed-headers.read,managed-headers.write,mass-url-redirects.read,mass-url-redirects.write,mcp-portals.read,mcp-portals.write,memberships.read,memberships.write,messaging.edit,messaging.metadata_read,messaging.read,moq.read,moq.write,notifications.read,notifications.write,origin.read,origin.write,page-rules.read,page-rules.write,page-shield.read,page.read,page.shield,page.write,pages.metadata_read,payments-gateway.read,payments-gateway.write,pcaps-api.read,pcaps-api.write,pipelines.read,pipelines.send,pipelines.write,precursor.read,precursor.write,pubsub.read,pubsub.write,query-cache.read,query-cache.write,queues.metadata_read,queues.read,queues.write,r2-catalog-sql.read,r2-catalog.read,r2-catalog.write,radar.read,rag.read,rag.run,rag.write,realtime.admin,realtime.read,realtime.write,registrar-sandbox-domains.admin,registrar-sandbox-domains.read,reports-application-security-report.read,request-tracer.read,resource-library.read,resource-library.write,resource-sharing.read,response-compression.read,response-compression.write,sanitize.read,sanitize.write,secrets-store.read,secrets-store.write,select-configuration.read,select-configuration.write,stream.metadata_read,stream.read,stream.write,tag.read,tag.write,teams-cds-compute-account.read,teams-cds-compute-account.write,teams-connector-cloudflared.monitoring,teams-connector-cloudflared.read,teams-connector-cloudflared.write,teams-connector-warp.read,teams-connector-warp.write,teams-connectors.read,teams-connectors.write,teams-dex.read,teams-dex.write,teams-networks.read,teams-networks.write,teams-pii.read,teams-resilience.read,teams-resilience.write,teams-secure.location,teams.read,teams.report,teams.write,transform-rules.read,transform-rules.write,trust-and-safety.read,trust-and-safety.write,url-scanner.read,url-scanner.write,user-details.read,user-details.write,vectorize.read,vectorize.write,waiting-rooms.read,waiting-rooms.write,web3-hostnames.read,web3-hostnames.write,websearch.metadata_read,websearch.read,websearch.write,workers-ci.read,workers-ci.write,workers-kv-storage.metadata_read,workers-kv-storage.read,workers-kv-storage.write,workers-observability-telemetry.write,workers-observability.read,workers-observability.write,workers-r2-bucket-item.read,workers-r2-bucket-item.write,workers-r2.metadata_read,workers-r2.read,workers-r2.write,workers-routes.read,workers-routes.write,workers-scripts.bind,workers-scripts.read,workers-scripts.write,workers-tail.read,workers_ai.metadata_read,zaraz.edit,zaraz.read,zaraz.write,zone-access.read,zone-access.revoke,zone-access.write,zone-custom-asset.read,zone-custom-asset.write,zone-disable-esc.read,zone-disable-esc.write,zone-dns-settings.read,zone-dns-settings.write,zone-observability.read,zone-observability.write,zone-security-center-insights.read,zone-security-center-insights.write,zone-settings.read,zone-settings.write,zone-transform-rules.read,zone-transform-rules.write,zone-versioning.read,zone-versioning.write,zone-waf.read,zone-waf.write,zone.read,zone.write`.split(`,`),Re=[`billing:read`,`billing:write`,`email_routing:read`,`email_sending:read`,`notebook-managed:read`,`oauth_account_ssl_and_certificates_write`],ze=[`hyperdrive-planetscale:setup`],Be=new Set(Re),Ve=Le.filter(e=>!Be.has(e)),He=new Set(ze),Q=Ve.filter(e=>!He.has(e));function Ue(e){Q=e}p(Ue,`setLoginScopeKeys`);var We=new Set(Ve);function Ge(e){return e.every(e=>We.has(e))}p(Ge,`validateScopeKeys`);function Ke(){let e=u();return e===`production`?`cloudflare-temporary-account.json`:`cloudflare-temporary-account.${e}.json`}p(Ke,`getTemporaryAccountConfigFile`);function qe(){return k.join(Z(),Ke())}p(qe,`getCfTemporaryAccountConfigPath`);function Je(e){return q(`json`,e)}p(Je,`createJsonFileStorage`);var{getAuthConfigFilePath:Ye,getEncryptedAuthConfigFilePath:Xe,defaultAuthConfigStorage:Ze,readAuthConfigFile:Qe,writeAuthConfigFile:$e}=je({getConfigPath:Z,format:`json`}),$={cliName:Me,displayName:Ne,temporaryAccountFlag:`--temporary-account`,commands:{login:`cf auth login`,logout:`cf auth logout`,whoami:`cf auth whoami`,createProfile:`cf auth create`,deviceLogin:`cf auth login`},keyringServiceName:X,clientId:Ie,consent:Fe,redirectUri:Pe,useDeviceFlowByDefault:!0,allowGlobalAuthKey:!1,getConfigPath:Z,getTemporaryAccountConfigPath:qe,fileFormat:`json`,accountCachePrefix:`cloudflare-account`,cacheNamespace:`cloudflare`,getConfigFileLabel:/* @__PURE__ */ p(()=>`cf config`,`getConfigFileLabel`),getDefaultScopeKeys:/* @__PURE__ */ p(()=>Q,`getDefaultScopeKeys`)},et=A(Z),{readUserPreferences:tt,updateUserPreferences:nt}=et;function rt(e){return De($,e)}p(rt,`createCfAuth`);function it(e){return Y({logger:e.logger,getConfigPath:Z,keyringServiceName:X,format:`json`})}p(it,`createCfProfileStore`);var at=Ae({loginCommand:$.commands.login,createProfileCommand:$.commands.createProfile,keyringServiceName:X,getConfigPath:Z,format:`json`,preferences:et});function ot(e,t){return at.setKeyringPreference(e,t)}p(ot,`setKeyringPreference`);export{Z as a,Je as i,rt as n,ot as o,it as r,Ge as s,Q as t};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{B as e,H as t,J as n,K as r,it as i,k as a,nt as o,q as s}from"./dist-D5YYi2LO.mjs";import{E as c,M as l,N as u,O as d}from"./chunk-2HLTAS5V-B92NbX1j.mjs";import{createRequire as f}from"node:module";import{chmodSync as p,existsSync as m,mkdirSync as h,rmSync as g,writeFileSync as _}from"node:fs";import v from"node:path";import ee from"node:url";import y from"node:assert";import{TextEncoder as te}from"node:util";import ne from"node:http";import{createCipheriv as re,createDecipheriv as ie,createHash as b,randomBytes as x,webcrypto as S}from"node:crypto";import{spawn as ae,spawnSync as C}from"node:child_process";f(import.meta.url||(typeof __filename==`string`?__filename:`/`));var oe=Object.defineProperty,w=(e,t)=>oe(e,`name`,{value:t,configurable:!0}),T=e();f(import.meta.url||(typeof __filename==`string`?__filename:`/`));var se=!1;function E(e){let{configOverride:t,warningLogger:n,storage:r}=e,{oauth_token:i,refresh_token:a,expiration_time:o,scopes:s,api_token:c}=t??r.read()??{};return i?{accessToken:{value:i,expiry:o??`2000-01-01:00:00:00+00:00`},refreshToken:{value:a??``},scopes:s}:c?(!se&&n&&(se=!0,n.warn(`It looks like you have used Wrangler v1's \`config\` command to login with an API token
2
+ import{B as e,H as t,J as n,K as r,it as i,k as a,nt as o,q as s}from"./dist-ataVE8ob.mjs";import{E as c,M as l,N as u,O as d}from"./chunk-2HLTAS5V-B92NbX1j.mjs";import{createRequire as f}from"node:module";import{chmodSync as p,existsSync as m,mkdirSync as h,rmSync as g,writeFileSync as _}from"node:fs";import v from"node:path";import ee from"node:url";import y from"node:assert";import{TextEncoder as te}from"node:util";import ne from"node:http";import{createCipheriv as re,createDecipheriv as ie,createHash as b,randomBytes as x,webcrypto as S}from"node:crypto";import{spawn as ae,spawnSync as C}from"node:child_process";f(import.meta.url||(typeof __filename==`string`?__filename:`/`));var oe=Object.defineProperty,w=(e,t)=>oe(e,`name`,{value:t,configurable:!0}),T=e();f(import.meta.url||(typeof __filename==`string`?__filename:`/`));var se=!1;function E(e){let{configOverride:t,warningLogger:n,storage:r}=e,{oauth_token:i,refresh_token:a,expiration_time:o,scopes:s,api_token:c}=t??r.read()??{};return i?{accessToken:{value:i,expiry:o??`2000-01-01:00:00:00+00:00`},refreshToken:{value:a??``},scopes:s}:c?(!se&&n&&(se=!0,n.warn(`It looks like you have used Wrangler v1's \`config\` command to login with an API token
3
3
  from ${t===void 0?r.path():`in-memory config`}.
4
4
  This is no longer supported in the current version of Wrangler.
5
5
  If you wish to authenticate via an API token then please set the \`CLOUDFLARE_API_TOKEN\` environment variable.`)),{deprecatedApiToken:c}):{}}w(E,`readStoredAuthState`);var ce=i({variableName:`CLOUDFLARE_API_TOKEN`,deprecatedName:`CF_API_TOKEN`}),le=i({variableName:`CLOUDFLARE_API_KEY`,deprecatedName:`CF_API_KEY`}),ue=i({variableName:`CLOUDFLARE_EMAIL`,deprecatedName:`CF_EMAIL`});function de(e){if(e?.allowGlobalAuthKey??!0){let e=le(),t=ue();if(e&&t)return{authKey:e,authEmail:t}}let t=ce();if(t)return{apiToken:t}}w(de,`getAuthFromEnv`);function fe(e){let t=de(e);if(t)return t;let n=E({storage:e.storage,warningLogger:e.warningLogger});if(n.deprecatedApiToken)return{apiToken:n.deprecatedApiToken};if(n.accessToken?.value)return{apiToken:n.accessToken.value}}w(fe,`getAPIToken`);function pe(e){let t=fe(e);if(!t)throw new u(`No API token found.`,{telemetryMessage:`user auth missing api token`});return t}w(pe,`requireApiToken`);var me=/^[A-Za-z0-9_-]+$/;function he(e,t){if(!me.test(e))throw new u(`Invalid account ID "${e}" ${t}. Account IDs may only contain alphanumeric characters, hyphens, and underscores.`,{telemetryMessage:`user account id invalid characters`});return e}w(he,`validateAccountId`);var D=i({variableName:`WRANGLER_AUTH_DOMAIN`,defaultValue:/* @__PURE__ */ w(()=>s()===`staging`?`dash.staging.cloudflare.com`:`dash.cloudflare.com`,`defaultValue`)}),ge=i({variableName:`WRANGLER_AUTH_URL`,defaultValue:/* @__PURE__ */ w(()=>`https://${D()}/oauth2/auth`,`defaultValue`)}),_e=i({variableName:`WRANGLER_TOKEN_URL`,defaultValue:/* @__PURE__ */ w(()=>`https://${D()}/oauth2/token`,`defaultValue`)}),ve=i({variableName:`WRANGLER_REVOKE_URL`,defaultValue:/* @__PURE__ */ w(()=>`https://${D()}/oauth2/revoke`,`defaultValue`)}),ye=i({variableName:`CLOUDFLARE_ACCOUNT_ID`,deprecatedName:`CF_ACCOUNT_ID`});function be(){let e=ye();if(e)return he(e,"set in the `CLOUDFLARE_ACCOUNT_ID` environment variable")}w(be,`getCloudflareAccountIdFromEnv`);var xe=`/oauth2/device/auth`;function Se(){return`https://${D()}${xe}`}w(Se,`getDeviceAuthUrl`);var Ce=i({variableName:`CLOUDFLARE_ACCESS_CLIENT_ID`}),we=i({variableName:`CLOUDFLARE_ACCESS_CLIENT_SECRET`}),Te=i({variableName:`WRANGLER_CF_AUTHORIZATION_TOKEN`}),Ee=o({variableName:`CLOUDFLARE_AUTH_USE_KEYRING`}),O={},k=/* @__PURE__ */ new Map;function De(e,t){let n=new URL(`https://${e}`);return t&&n.searchParams.set(`cf_workers_preview_token`,t),n.toString()}w(De,`buildProbeUrl`);function Oe(){for(let e of Object.keys(O))delete O[e];k.clear()}w(Oe,`clearAccessCaches`);async function ke(e,t,n){t.debug(`Checking if domain has Access enabled:`,e);let r=JSON.stringify([e,!!n]);if(k.has(r))return t.debug(`Using cached Access switch for:`,e,k.get(r)),k.get(r)??!1;t.debug(`Access switch not cached for:`,e);try{let i=new AbortController,a=setTimeout(()=>{i.abort()},1e3),o=await(0,T.fetch)(De(e,n),{redirect:`manual`,signal:i.signal});clearTimeout(a);let s=!!(o.status===302&&o.headers.get(`location`)?.includes(`cloudflareaccess.com`));return(s||!n)&&(t.debug(`Caching access switch for:`,e),k.set(r,s)),s}catch{return t.debug(`Access probe failed for:`,e),!1}}w(ke,`domainUsesAccess`);async function Ae(e,t){let n=t.logger,r=Ce(),i=we();if(r&&i)return n.debug(`Using Access Service Token headers for domain:`,e),{"CF-Access-Client-Id":r,"CF-Access-Client-Secret":i};if((r!==void 0||i!==void 0)&&n.warn(`Both CLOUDFLARE_ACCESS_CLIENT_ID and CLOUDFLARE_ACCESS_CLIENT_SECRET must be set to use Access Service Token authentication. Only ${r===void 0?`CLOUDFLARE_ACCESS_CLIENT_SECRET`:`CLOUDFLARE_ACCESS_CLIENT_ID`} was found.`),!await ke(e,n,t.previewToken))return{};if(n.debug(`Getting Access headers for domain:`,e),O[e])return n.debug(`Using cached Access headers for domain:`,e),O[e];if((t.isNonInteractiveOrCI??a)())throw new u(`The domain "${e}" is behind Cloudflare Access, but no Access Service Token credentials were found and the current environment is non-interactive.