cf 1.0.0-beta.7 → 1.0.0-beta.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (213) hide show
  1. package/dist/{abuse-reports-D7Hrm0MV.mjs → abuse-reports-D9LttL99.mjs} +1 -1
  2. package/dist/{access-_upGyV1N.mjs → access-CSUG9fDH.mjs} +1 -1
  3. package/dist/{account-tags-CrijxKW6.mjs → account-tags-BkmuF6bd.mjs} +1 -1
  4. package/dist/{accounts-Db5SMjh2.mjs → accounts-CmqKD3xG.mjs} +1 -1
  5. package/dist/{acm-9cXKVj2C.mjs → acm-D9WirG6Y.mjs} +1 -1
  6. package/dist/{addressing-D_FtdMEM.mjs → addressing-DAdzF3M5.mjs} +1 -1
  7. package/dist/{agent-memory-BygNv4aJ.mjs → agent-memory-CIEk0dD-.mjs} +1 -1
  8. package/dist/{ai-D-55e3UD.mjs → ai-Dq1GOYn7.mjs} +1 -1
  9. package/dist/{ai-audit-DDQ68vrA.mjs → ai-audit-D5XtqDkx.mjs} +1 -1
  10. package/dist/{ai-gateway-sP2B_8Ef.mjs → ai-gateway-D16_7Zbq.mjs} +1 -1
  11. package/dist/{ai-search-DvMUOhub.mjs → ai-search-Ce3p9ccc.mjs} +1 -1
  12. package/dist/{ai-security-BVWVxZmP.mjs → ai-security-BodoNshv.mjs} +1 -1
  13. package/dist/{alerting-DZ9gxuKS.mjs → alerting-DuF0tdhO.mjs} +1 -1
  14. package/dist/{analytics-Y2xckwX1.mjs → analytics-DmnqxoBT.mjs} +1 -1
  15. package/dist/{analytics_engine-A8gMyUty.mjs → analytics_engine-BOYHgzoX.mjs} +1 -1
  16. package/dist/{api-security-CNMyTBs-.mjs → api-security-B3v-EKrg.mjs} +1 -1
  17. package/dist/{argo-Be_3wk6n.mjs → argo-BsSvWev6.mjs} +1 -1
  18. package/dist/{artifacts-B8roQjRg.mjs → artifacts-Dq5t2ZQO.mjs} +1 -1
  19. package/dist/{audit-logs-DgkSAyTu.mjs → audit-logs-DpszUSNO.mjs} +1 -1
  20. package/dist/{auth-CHTMVVW3.mjs → auth-BjxUTZWb.mjs} +2 -2
  21. package/dist/{auth-B74oTm3b.mjs → auth-skaSvH3I.mjs} +1 -1
  22. package/dist/{basin-catalog-85ubk7YB.mjs → basin-catalog-c_Z-KmdC.mjs} +1 -1
  23. package/dist/{billing-Cc6_LzwM.mjs → billing-D8eSkPUk.mjs} +1 -1
  24. package/dist/{bot-management-DSJtyyh_.mjs → bot-management-gPqJF81w.mjs} +1 -1
  25. package/dist/{botnet-feed-BkhLL1Oz.mjs → botnet-feed-B1TeX5OO.mjs} +1 -1
  26. package/dist/{brand-protection-Bldu6Tvz.mjs → brand-protection-jjdTCYeF.mjs} +1 -1
  27. package/dist/{browser-run-B_0Fh5Cg.mjs → browser-run-CkmofJ6D.mjs} +1 -1
  28. package/dist/{build-SxtWgMkQ.mjs → build-B-tN7mO-.mjs} +1 -1
  29. package/dist/build-D5D56lvE.mjs +2 -0
  30. package/dist/{builds-BwP-UvyR.mjs → builds-Ca9hPvgz.mjs} +1 -1
  31. package/dist/{cache-DQDer_pF.mjs → cache-BnRnlPjP.mjs} +1 -1
  32. package/dist/{certificate-authorities-Dfc0QVyT.mjs → certificate-authorities-D2J5rh-m.mjs} +1 -1
  33. package/dist/{cf-Dw3HK_Qy.mjs → cf-Bh_fTFIj.mjs} +1 -1
  34. package/dist/{cli-B0_EbPK6.mjs → cli-xbKU3h28.mjs} +1 -1
  35. package/dist/{client-certificates-BVfmuFsa.mjs → client-certificates-D3mKJGFa.mjs} +1 -1
  36. package/dist/{client-side-security-DiaSjw1y.mjs → client-side-security-DcO8apX2.mjs} +1 -1
  37. package/dist/{cloud-connector-B6iUAIzF.mjs → cloud-connector-CCbT4xFi.mjs} +1 -1
  38. package/dist/{cloudforce-one-B2PweUyv.mjs → cloudforce-one-Cnj0OnZF.mjs} +1 -1
  39. package/dist/{command-CzzAaOGK.mjs → command-B9rrie65.mjs} +1 -1
  40. package/dist/{command-BOktUlKN.mjs → command-BUWmTl5w.mjs} +1 -1
  41. package/dist/{command-Bi0InjEd.mjs → command-BWUoVso3.mjs} +1 -1
  42. package/dist/{command-CNfYJjg7.mjs → command-BvwvCWkB.mjs} +1 -1
  43. package/dist/{command-CnEF-7o0.mjs → command-BxrOxsu9.mjs} +1 -1
  44. package/dist/{command-D1S9Z0gV.mjs → command-CUQF-QFP.mjs} +1 -1
  45. package/dist/{command-BC7oCgWp.mjs → command-CwsA28Vt.mjs} +1 -1
  46. package/dist/{command-WrVIhg73.mjs → command-D5vy9tlg.mjs} +1 -1
  47. package/dist/{command-CrS8Q6U3.mjs → command-DwbJIcAA.mjs} +1 -1
  48. package/dist/{command-DVSwnnMJ.mjs → command-_4j_XD3U.mjs} +1 -1
  49. package/dist/{completions-UDpzduKn.mjs → completions-EHied_ON.mjs} +1 -1
  50. package/dist/{connector-interrupts-47IuSZFG.mjs → connector-interrupts-CyeiC7gw.mjs} +1 -1
  51. package/dist/{connector-telemetry-events-BQb3Hsnt.mjs → connector-telemetry-events-D-cL2RuW.mjs} +1 -1
  52. package/dist/{connector-telemetry-snapshots-CeFJqT4_.mjs → connector-telemetry-snapshots-MrpBZ5fC.mjs} +1 -1
  53. package/dist/{connectors-CF9n8yHv.mjs → connectors-Ds5PWdpP.mjs} +1 -1
  54. package/dist/{containers-DBs5P8vO.mjs → containers-BR6paNcL.mjs} +1 -1
  55. package/dist/{containers-D4pJisp-.mjs → containers-D9masRwv.mjs} +1 -1
  56. package/dist/{content-scan-DLdl9ZpM.mjs → content-scan-eX3wIB8J.mjs} +1 -1
  57. package/dist/{context-C71TA0Yp.mjs → context-M2Ho8pi3.mjs} +1 -1
  58. package/dist/{cps-X4HFj7Qw.mjs → cps-CyviY22M.mjs} +1 -1
  59. package/dist/{csamScanner-tkB73Sgi.mjs → csamScanner-CHF53DZw.mjs} +1 -1
  60. package/dist/{ct-alerting-HDZJVnZS.mjs → ct-alerting-BORxnBtn.mjs} +1 -1
  61. package/dist/{custom-certificates-ClGBR4Oo.mjs → custom-certificates-KsS8xnfG.mjs} +1 -1
  62. package/dist/{custom-csrs-D3b2bNiX.mjs → custom-csrs-BtNQaSVn.mjs} +1 -1
  63. package/dist/{custom-hostnames-CWyObX98.mjs → custom-hostnames-4tLpHtCK.mjs} +1 -1
  64. package/dist/{custom-nameservers-Di8z6ioQ.mjs → custom-nameservers-DYM29vGA.mjs} +1 -1
  65. package/dist/{custom-pages-D2l1rZfJ.mjs → custom-pages-BIwM1IyN.mjs} +1 -1
  66. package/dist/{d1-aDiX5BdB.mjs → d1-Yhj_t0--.mjs} +1 -1
  67. package/dist/{dcv-delegation-D-vyZC0M.mjs → dcv-delegation-DXspPfEr.mjs} +1 -1
  68. package/dist/{deploy-input-DxuYgPps.mjs → deploy-input-DJWWJs3a.mjs} +1 -1
  69. package/dist/{deploy-DBmw0fiq.mjs → deploy-su0BR90P.mjs} +1 -1
  70. package/dist/{dev-SpCmvb4M.mjs → dev-DqgkwmRH.mjs} +1 -1
  71. package/dist/{diagnostics-nRYcfs30.mjs → diagnostics-B6FqDbQY.mjs} +1 -1
  72. package/dist/{dist-Du72beRE.mjs → dist-CxGYQfpW.mjs} +1 -1
  73. package/dist/{dls-CANrS9Ke.mjs → dls-CDvZjyjo.mjs} +1 -1
  74. package/dist/{dns-Vt3Dc_Vu.mjs → dns-DGMcGcBE.mjs} +1 -1
  75. package/dist/{dns-firewall-CVSEaJZY.mjs → dns-firewall-BahlWOJO.mjs} +1 -1
  76. package/dist/{durable-objects-B-e7xqhL.mjs → durable-objects-Cnho3J7w.mjs} +1 -1
  77. package/dist/{email-auth-hUz_5D2H.mjs → email-auth-CkqeIq8V.mjs} +1 -1
  78. package/dist/{email-routing-By5Q7zP0.mjs → email-routing-D_Mw8HSX.mjs} +1 -1
  79. package/dist/{email-security-C9VhlZkz.mjs → email-security-D9yMRsXl.mjs} +1 -1
  80. package/dist/{email-sending-C7cVl025.mjs → email-sending-CQfuE7h6.mjs} +1 -1
  81. package/dist/{fieldExtractors-DMdnj9KA.mjs → fieldExtractors-Bbbegy-c.mjs} +1 -1
  82. package/dist/{firewall-C93JnCsO.mjs → firewall-DtlT_8mG.mjs} +1 -1
  83. package/dist/{flagship-CVZWzLTv.mjs → flagship-BWEdMJSQ.mjs} +1 -1
  84. package/dist/{fraud-DJ3jnp3_.mjs → fraud-mszBJHV6.mjs} +1 -1
  85. package/dist/{google-tag-gateway-DbE_3TkF.mjs → google-tag-gateway-DD8rztUs.mjs} +1 -1
  86. package/dist/{healthchecks-DKWTVerg.mjs → healthchecks-CzCJR3df.mjs} +1 -1
  87. package/dist/{hostnames-VNPfazJd.mjs → hostnames-BTSxAv-T.mjs} +1 -1
  88. package/dist/{hyperdrive-BKtLQf8J.mjs → hyperdrive-Bg1T58qE.mjs} +1 -1
  89. package/dist/{iam-BsZ7ORd5.mjs → iam-cAzxdXI7.mjs} +1 -1
  90. package/dist/{images-Bd3lRkGK.mjs → images-CfHt8v2n.mjs} +1 -1
  91. package/dist/index.mjs +1 -1
  92. package/dist/{init-D9pazuYJ.mjs → init-9TwyFuzD.mjs} +1 -1
  93. package/dist/{intel-ropzhmya.mjs → intel-WWPG0-t7.mjs} +1 -1
  94. package/dist/{ips-85Mq1qXg.mjs → ips-CxSw5R88.mjs} +1 -1
  95. package/dist/{keyless-certificates-CRzCJ82O.mjs → keyless-certificates-Jfsyada7.mjs} +1 -1
  96. package/dist/{keys-CWUCTmsD.mjs → keys-BrDarg28.mjs} +1 -1
  97. package/dist/{kv-BT2uSv-y.mjs → kv-C8eauBSy.mjs} +1 -1
  98. package/dist/{lazy-command-DjCioGYx.mjs → lazy-command-B0914_IJ.mjs} +1 -1
  99. package/dist/{leaked-credential-checks-DjDq1Toq.mjs → leaked-credential-checks-Y9mDSJKn.mjs} +1 -1
  100. package/dist/{load-balancers--4Ouz99G.mjs → load-balancers-DsKJIF_U.mjs} +1 -1
  101. package/dist/local-B5d4OPhA.mjs +2 -0
  102. package/dist/{local-C9i1d0ma.mjs → local-CQc36Viv.mjs} +1 -1
  103. package/dist/{local-runtime-WQyZe3ed.mjs → local-runtime-CifOYlPq.mjs} +1 -1
  104. package/dist/{login-CHjklzf2.mjs → login-DFZ3DEjI.mjs} +1 -1
  105. package/dist/{login-BDFpobb3.mjs → login-DGXSiCII.mjs} +1 -1
  106. package/dist/{logo-matches-DVQfRSCD.mjs → logo-matches-D1vjZF-k.mjs} +1 -1
  107. package/dist/{logos-BUEuiGuz.mjs → logos-CCEIMvE7.mjs} +1 -1
  108. package/dist/{logpush-cKUA9fBU.mjs → logpush-DAx2y5MY.mjs} +1 -1
  109. package/dist/{logs-2OJeMqWG.mjs → logs-D9BsByMt.mjs} +1 -1
  110. package/dist/{magic-cloud-networking-D29ITjYQ.mjs → magic-cloud-networking-C_FsIQoS.mjs} +1 -1
  111. package/dist/{magic-network-monitoring-Bva_tF2u.mjs → magic-network-monitoring-DBo1mI3a.mjs} +1 -1
  112. package/dist/{magic-transit-DG_ZmEzW.mjs → magic-transit-BgRq6ZeA.mjs} +1 -1
  113. package/dist/{managed-defense-xGCISaB_.mjs → managed-defense-BRdCrVVh.mjs} +1 -1
  114. package/dist/{managed-transforms-DDgqNWVJ.mjs → managed-transforms-cmvRuRQ7.mjs} +1 -1
  115. package/dist/{matches-CxWA1zUN.mjs → matches-B0bzP6tB.mjs} +1 -1
  116. package/dist/{mcp-DVoYs5z5.mjs → mcp-CSxoAB-y.mjs} +1 -1
  117. package/dist/{mesh-qenm6AM4.mjs → mesh-C-n2gi4F.mjs} +1 -1
  118. package/dist/{monetization-CUWtxI_y.mjs → monetization-DHFiy5qs.mjs} +1 -1
  119. package/dist/{mtls-certificates-xUIkGtmX.mjs → mtls-certificates-o11WJKM1.mjs} +1 -1
  120. package/dist/{network-Y8kCdzJC.mjs → network-Ck6XHs9j.mjs} +1 -1
  121. package/dist/{network-interconnects-CEvvsGwX.mjs → network-interconnects-CT4a_D5b.mjs} +1 -1
  122. package/dist/{oauth-J2zz9fHk.mjs → oauth-D6EZEBcY.mjs} +1 -1
  123. package/dist/{oauth-vj6qkLCC.mjs → oauth-D9jA6L9a.mjs} +1 -1
  124. package/dist/{oauth-clients-B7qfaBLY.mjs → oauth-clients-DRBvDDNL.mjs} +1 -1
  125. package/dist/{oauth-scopes-D7_xDwvo.mjs → oauth-scopes-eV0VbNV-.mjs} +1 -1
  126. package/dist/{observability-_aI_XF0M.mjs → observability-CBCuWCen.mjs} +1 -1
  127. package/dist/{organization-C41nlZcO.mjs → organization-3y27rtm7.mjs} +1 -1
  128. package/dist/{organizations-D15_q5u6.mjs → organizations-Q9QPbB-p.mjs} +1 -1
  129. package/dist/{origin-ca-certificates-DGSGDaNw.mjs → origin-ca-certificates-CbTgmQ2N.mjs} +1 -1
  130. package/dist/{origin-post-quantum-encryption-C_9NBBkG.mjs → origin-post-quantum-encryption-D5zeAJJ1.mjs} +1 -1
  131. package/dist/{origin-tls-client-auth-Dh9vTi_F.mjs → origin-tls-client-auth-V5hB1Bwu.mjs} +1 -1
  132. package/dist/{page-rules-CWZJaKuz.mjs → page-rules-BYYBcKRU.mjs} +1 -1
  133. package/dist/{pages-CVlGF6mj.mjs → pages-CfinrrWX.mjs} +1 -1
  134. package/dist/{pay-per-crawl-BJ10CSH9.mjs → pay-per-crawl-C-S5WxQT.mjs} +1 -1
  135. package/dist/{pay-per-use-B3eQmzWv.mjs → pay-per-use-B3gl7GQo.mjs} +1 -1
  136. package/dist/{pipelines-VhDz1fDL.mjs → pipelines-lfvTXng7.mjs} +1 -1
  137. package/dist/{precursor-CvYpYouB.mjs → precursor-CNm5rIPl.mjs} +1 -1
  138. package/dist/{previews-CJHqRKPF.mjs → previews-DV7OxoSM.mjs} +1 -1
  139. package/dist/{progress-BlxgG8Ss.mjs → progress-BnIv4lh5.mjs} +1 -1
  140. package/dist/{prompt-ClEoR47s.mjs → prompt-DjRAo2Up.mjs} +1 -1
  141. package/dist/{queries-8m5UOv21.mjs → queries-D0obyA9I.mjs} +1 -1
  142. package/dist/{queues-C8P3RI-3.mjs → queues-G1CS4M1H.mjs} +1 -1
  143. package/dist/{r2-ChQ_GZA7.mjs → r2-BLXUGlGq.mjs} +1 -1
  144. package/dist/{radar-B9PnH7nW.mjs → radar-hGFsVuHs.mjs} +1 -1
  145. package/dist/{raw-fetch-CWRDTVMr.mjs → raw-fetch-CuMHmrn0.mjs} +1 -1
  146. package/dist/{realtime-31GZpgm5.mjs → realtime-CZYwfmjr.mjs} +1 -1
  147. package/dist/{registrar-fBw5wh-I.mjs → registrar-dvv2gU93.mjs} +1 -1
  148. package/dist/{registrar-sandbox-Bcr5l7Js.mjs → registrar-sandbox-Cnqn9BDJ.mjs} +1 -1
  149. package/dist/{registry-rtPfnFht.mjs → registry-DWTPK8_Q.mjs} +1 -1
  150. package/dist/{reporting-BfpNLeGh.mjs → reporting-Bfwnpc7z.mjs} +1 -1
  151. package/dist/{request-headers-DmiSqfLo.mjs → request-headers-DaUqNccK.mjs} +1 -1
  152. package/dist/{request-tracers-DCpDftuC.mjs → request-tracers-CF4_bzqx.mjs} +1 -1
  153. package/dist/{resource-sharing-D-OCBlIj.mjs → resource-sharing-DaY7ISTQ.mjs} +1 -1
  154. package/dist/{resource-tagging-DCn8TwS0.mjs → resource-tagging-D669i7sI.mjs} +1 -1
  155. package/dist/{rules-DHeYlXlI.mjs → rules-C9w-8uyl.mjs} +1 -1
  156. package/dist/{rulesets-BMv5GVEt.mjs → rulesets-yYRTXZ71.mjs} +1 -1
  157. package/dist/{rum-CaTeqDsB.mjs → rum-DPrqqYSC.mjs} +1 -1
  158. package/dist/run-Dkcz54xY.mjs +2 -0
  159. package/dist/{run-l2pCxS-W.mjs → run-Duj1fsxa.mjs} +1 -1
  160. package/dist/{schema-flags-DBujG5kJ.mjs → schema-flags-CK4J4XhG.mjs} +1 -1
  161. package/dist/{scim-DHwWD1nA.mjs → scim-DAZek91U.mjs} +1 -1
  162. package/dist/{secrets-store-DoH9JnqC.mjs → secrets-store-COlaXNll.mjs} +1 -1
  163. package/dist/{security-insights-oqJuf8MY.mjs → security-insights-DF6ffEWO.mjs} +1 -1
  164. package/dist/{security-txt-BY07I5Bx.mjs → security-txt-D1nLEOCZ.mjs} +1 -1
  165. package/dist/{shared-D0PR8DbO.mjs → shared-_YyZp2AY.mjs} +1 -1
  166. package/dist/{smart-shield-g5UHGdCQ.mjs → smart-shield-CKSVq1sT.mjs} +1 -1
  167. package/dist/{snippets-Bgn7ZKJo.mjs → snippets-D5zLR7Nj.mjs} +1 -1
  168. package/dist/{spawn-BSnyZB0W.mjs → spawn-DiZTRMi2.mjs} +1 -1
  169. package/dist/{spectrum-BmLwQKib.mjs → spectrum-L56rh44p.mjs} +1 -1
  170. package/dist/{speed-CesLeufR.mjs → speed-CfufTtTk.mjs} +1 -1
  171. package/dist/{src-wDWeXeJp.mjs → src-BIRFlqDR.mjs} +5 -5
  172. package/dist/{ssl-DrYK9KX-.mjs → ssl-BrDo1vL9.mjs} +1 -1
  173. package/dist/{state-BDkCKOju.mjs → state-BaGRaYow.mjs} +1 -1
  174. package/dist/state-CpXhcMdX.mjs +2 -0
  175. package/dist/{stream-D0sXaEj7.mjs → stream-1BpcnrhV.mjs} +1 -1
  176. package/dist/{submit-CpjZiCN9.mjs → submit-C-ICyQA7.mjs} +1 -1
  177. package/dist/{tags-B17h1YBS.mjs → tags-BA2CG06z.mjs} +1 -1
  178. package/dist/telemetry-Bn5lYtiy.mjs +2 -0
  179. package/dist/{telemetry-D84K-X2j.mjs → telemetry-D14VqvDU.mjs} +1 -1
  180. package/dist/{tenant-S7-Cb54D.mjs → tenant-DZ4dgD2t.mjs} +1 -1
  181. package/dist/{tenant-custom-nameservers-CZ8qgnt_.mjs → tenant-custom-nameservers-YjOHEMtf.mjs} +1 -1
  182. package/dist/{tunnels-DzSFv0qt.mjs → tunnels-l8YE_pie.mjs} +1 -1
  183. package/dist/{turnstile-C5tc9QGH.mjs → turnstile-BQrUOlSx.mjs} +1 -1
  184. package/dist/{update-check-CpGj0g5l.mjs → update-check-BPVQSvnH.mjs} +1 -1
  185. package/dist/update-check-worker.mjs +1 -1
  186. package/dist/update-check-zLVAcGWy.mjs +2 -0
  187. package/dist/{url-info-lY7WbQzK.mjs → url-info-D2l_0t3y.mjs} +1 -1
  188. package/dist/{url-normalization-BHVZ4ULQ.mjs → url-normalization-K8zAzorz.mjs} +1 -1
  189. package/dist/{url-scanner-DRnPOsj9.mjs → url-scanner-Dv7lSDeH.mjs} +1 -1
  190. package/dist/{user-DyT-q94n.mjs → user-DleZBZED.mjs} +1 -1
  191. package/dist/{values-BE3pRW6M.mjs → values-BnpLZYLh.mjs} +1 -1
  192. package/dist/{vectorize-CGl0BOXJ.mjs → vectorize-DyHeuA7K.mjs} +1 -1
  193. package/dist/version-CH8K5y4G.mjs +2 -0
  194. package/dist/{waiting-rooms-DbhiDyp_.mjs → waiting-rooms-CKp_ty0T.mjs} +1 -1
  195. package/dist/{web-assets-noQwig7x.mjs → web-assets-XrKWHvN4.mjs} +1 -1
  196. package/dist/{web3-Dts8-Peq.mjs → web3-Bntbgx_4.mjs} +1 -1
  197. package/dist/{workers-DtZRm0HJ.mjs → workers-DM3cs8PN.mjs} +1 -1
  198. package/dist/{workers-builds-ean9unEX.mjs → workers-builds-02i1psK2.mjs} +1 -1
  199. package/dist/{workers-for-platforms-jdC-4D-X.mjs → workers-for-platforms-B5RlZXZK.mjs} +1 -1
  200. package/dist/{workers-vpc-D2PZCegg.mjs → workers-vpc-kjiAIRuT.mjs} +1 -1
  201. package/dist/{workflows-C9QBOzZz.mjs → workflows-BkuFC47X.mjs} +1 -1
  202. package/dist/{zaraz-DVLkn3fF.mjs → zaraz-BPOqw7RU.mjs} +1 -1
  203. package/dist/{zero-trust-DfwISsW4.mjs → zero-trust-B4sjDfre.mjs} +1 -1
  204. package/dist/{zone-DQV-hfHN.mjs → zone-DkaGQuB6.mjs} +1 -1
  205. package/dist/{zones-By8IT3CV.mjs → zones-DIlihhZN.mjs} +1 -1
  206. package/package.json +2 -2
  207. package/dist/build-VB6btUkb.mjs +0 -2
  208. package/dist/local-j2uOZ8Uq.mjs +0 -2
  209. package/dist/run-BJmOnVJI.mjs +0 -2
  210. package/dist/state-50FyMVTz.mjs +0 -2
  211. package/dist/telemetry-BqtdHwmi.mjs +0 -2
  212. package/dist/update-check-7q-e6UWW.mjs +0 -2
  213. package/dist/version-DOZrLErk.mjs +0 -2
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-C9i1d0ma.mjs";import{a as t,t as n}from"./context-C71TA0Yp.mjs";import{a as r,r as i}from"./auth-CHTMVVW3.mjs";import{t as a}from"./output-CvQFJkvi.mjs";import{t as o}from"./dry-run-Bq0JAsbX.mjs";import{t as s}from"./progress-BlxgG8Ss.mjs";import{t as c}from"./run-l2pCxS-W.mjs";import"./telemetry-BqtdHwmi.mjs";import{i as l,n as u,r as d,t as f}from"./body-parser-hh2avzkz.mjs";import{n as p}from"./input-validation-Dk52b0me.mjs";import{a as m,i as h}from"./prompt-ClEoR47s.mjs";import{t as g}from"./cli-types-DoVT5q_M.mjs";function _(e){return e.usage(`$0 abuse-reports appeals eligibility <report-id>
2
+ import{t as e}from"./local-CQc36Viv.mjs";import{a as t,t as n}from"./context-M2Ho8pi3.mjs";import{a as r,r as i}from"./auth-BjxUTZWb.mjs";import{t as a}from"./output-CvQFJkvi.mjs";import{t as o}from"./dry-run-Bq0JAsbX.mjs";import{t as s}from"./progress-BnIv4lh5.mjs";import{t as c}from"./run-Duj1fsxa.mjs";import"./telemetry-Bn5lYtiy.mjs";import{i as l,n as u,r as d,t as f}from"./body-parser-hh2avzkz.mjs";import{n as p}from"./input-validation-Dk52b0me.mjs";import{a as m,i as h}from"./prompt-DjRAo2Up.mjs";import{t as g}from"./cli-types-DoVT5q_M.mjs";function _(e){return e.usage(`$0 abuse-reports appeals eligibility <report-id>
3
3
 
4
4
  Returns whether the report is currently appealable, along with the signals behind that decision: whether it already has an open appeal, how many appeals have been submitted against it, and whether it has at least one mitigation that an appeal could reverse. Report-level appeals are currently available only for DMCA (copyright) reports. For other report types this operation returns the same \`404 Report not found\` response as a report that does not exist for the account.`).positional(`report-id`,{type:`string`,description:`Abuse Report ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`eligibility <report-id>`,describe:`Check whether a report can be appealed`,builder:_,handler:async r=>c({command:`abuse-reports appeals eligibility`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf abuse-reports appeals eligibility`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/abuse-reports/${r[`report-id`]==null?`<report-id>`:encodeURIComponent(String(r[`report-id`]))}/appeals/eligibility`,pathParams:{"report-id":String(r[`report-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();r.accountId=l,a(await s(`Loading`,async()=>c.abuseReports.appeals.eligibility({account_id:l,report_id:r[`report-id`]})),{successLabel:`Loaded`})})},y={command:`appeals`,describe:`Appeal eligibility for abuse reports`,builder:e=>e.command(v).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function b(e){return e.usage("$0 abuse-reports create <report-type>\n\nSubmit an abuse report of a particular type. Requires the abuse-reports entitlement on the account (Enterprise accounts have it by default; other accounts must request access) and an API token with the `Trust and Safety Write` permission. If the account is not entitled, the request is rejected with an HTTP `401` response (see below).").positional(`report-type`,{type:`string`,description:`The report type to be submitted. Example: abuse_general`,demandOption:!0}).option(`act`,{type:`string`,description:`The act field`,choices:[`abuse_dmca`,`abuse_trademark`,`abuse_general`,`abuse_phishing`,`abuse_children`,`abuse_threat`,`abuse_registrar_whois`,`abuse_ncsei`]}).option(`comments`,{type:`string`,description:`Any additional comments about the infringement not exceeding 2000 characters`}).option(`company`,{type:`string`,description:`Text not exceeding 100 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`}).option(`email`,{type:`string`,description:`A valid email of the abuse reporter. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`}).option(`email2`,{type:`string`,description:"Should match the value provided in `email`"}).option(`name`,{type:`string`,description:`Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`}).option(`reported-country`,{type:`string`,description:`Text containing 2 characters`}).option(`reported-user-agent`,{type:`string`,description:`Text not exceeding 255 characters`}).option(`tele`,{type:`string`,description:`Text not exceeding 20 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`}).option(`title`,{type:`string`,description:`Text not exceeding 255 characters`}).option(`urls`,{type:`string`,description:`A list of valid URLs separated by ‘\\n’ (new line character). The list of the URLs should not exceed 250 URLs. All URLs should have the same hostname. Each URL should be unique. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`}).option(`address1`,{type:`string`,description:`Text not exceeding 100 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`}).option(`agent-name`,{type:`string`,description:`The name of the copyright holder. Text not exceeding 60 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`}).option(`agree`,{type:`number`,description:"Can be `0` for false or `1` for true. Must be value: 1 for DMCA reports"}).option(`city`,{type:`string`,description:`Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`}).option(`country`,{type:`string`,description:`Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).
5
5
  `}).option(`host-notification`,{type:`string`,description:`Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous.
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./lazy-command-DjCioGYx.mjs";var t=e(`curl <url>`,`Run curl against an Access-protected application with its JWT injected by cloudflared.`,()=>import(`./command-CnEF-7o0.mjs`),{command:`access curl`,recordArgs:!1}),n=e(`login <url>`,`Authenticate with an Access application and store its JWT through cloudflared.`,()=>import(`./command-DVSwnnMJ.mjs`),{command:`access login`,recordArgs:!1}),r=e(`ssh-config`,`Print an example SSH configuration for an Access application.`,()=>import(`./command-BC7oCgWp.mjs`),{command:`access ssh-config`,recordArgs:!1}),i=e(`ssh-gen`,`Generate a short-lived certificate for an Access SSH application.`,()=>import(`./command-D1S9Z0gV.mjs`),{command:`access ssh-gen`,recordArgs:!1}),a={...e(`tcp`,`Proxy a TCP connection through Access. The command is also available as ssh, rdp, and smb.`,()=>import(`./command-CNfYJjg7.mjs`),{command:`access tcp`,recordArgs:!1}),aliases:[`ssh`,`rdp`,`smb`]},o=e(`token <url>`,`Print a JWT for authenticating with an Access application.`,()=>import(`./command-WrVIhg73.mjs`),{command:`access token`,recordArgs:!1});const s={command:`access`,describe:`Access protected applications and services`,builder:e=>e.command(t).command(n).command(r).command(i).command(a).command(o).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{s as default};
2
+ import{t as e}from"./lazy-command-B0914_IJ.mjs";var t=e(`curl <url>`,`Run curl against an Access-protected application with its JWT injected by cloudflared.`,()=>import(`./command-BxrOxsu9.mjs`),{command:`access curl`,recordArgs:!1}),n=e(`login <url>`,`Authenticate with an Access application and store its JWT through cloudflared.`,()=>import(`./command-_4j_XD3U.mjs`),{command:`access login`,recordArgs:!1}),r=e(`ssh-config`,`Print an example SSH configuration for an Access application.`,()=>import(`./command-CwsA28Vt.mjs`),{command:`access ssh-config`,recordArgs:!1}),i=e(`ssh-gen`,`Generate a short-lived certificate for an Access SSH application.`,()=>import(`./command-CUQF-QFP.mjs`),{command:`access ssh-gen`,recordArgs:!1}),a={...e(`tcp`,`Proxy a TCP connection through Access. The command is also available as ssh, rdp, and smb.`,()=>import(`./command-BvwvCWkB.mjs`),{command:`access tcp`,recordArgs:!1}),aliases:[`ssh`,`rdp`,`smb`]},o=e(`token <url>`,`Print a JWT for authenticating with an Access application.`,()=>import(`./command-D5vy9tlg.mjs`),{command:`access token`,recordArgs:!1});const s={command:`access`,describe:`Access protected applications and services`,builder:e=>e.command(t).command(n).command(r).command(i).command(a).command(o).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{s as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-C9i1d0ma.mjs";import{a as t,i as n,t as r}from"./context-C71TA0Yp.mjs";import{a as i,r as a}from"./auth-CHTMVVW3.mjs";import{t as o}from"./output-CvQFJkvi.mjs";import{t as s}from"./dry-run-Bq0JAsbX.mjs";import{t as c}from"./progress-BlxgG8Ss.mjs";import{t as l}from"./run-l2pCxS-W.mjs";import"./telemetry-BqtdHwmi.mjs";import{i as u,n as d,t as f}from"./body-parser-hh2avzkz.mjs";import{n as p}from"./input-validation-Dk52b0me.mjs";import{a as m,i as h,n as g}from"./prompt-ClEoR47s.mjs";import{t as _}from"./cli-types-DoVT5q_M.mjs";function v(e){return e.usage(`$0 account-tags delete
2
+ import{t as e}from"./local-CQc36Viv.mjs";import{a as t,i as n,t as r}from"./context-M2Ho8pi3.mjs";import{a as i,r as a}from"./auth-BjxUTZWb.mjs";import{t as o}from"./output-CvQFJkvi.mjs";import{t as s}from"./dry-run-Bq0JAsbX.mjs";import{t as c}from"./progress-BnIv4lh5.mjs";import{t as l}from"./run-Duj1fsxa.mjs";import"./telemetry-Bn5lYtiy.mjs";import{i as u,n as d,t as f}from"./body-parser-hh2avzkz.mjs";import{n as p}from"./input-validation-Dk52b0me.mjs";import{a as m,i as h,n as g}from"./prompt-DjRAo2Up.mjs";import{t as _}from"./cli-types-DoVT5q_M.mjs";function v(e){return e.usage(`$0 account-tags delete
3
3
 
4
4
  Removes all tags from a specific account or zone-level resource.`).option(`if-match`,{type:`string`,description:`ETag value for optimistic concurrency control. When provided, the server will
5
5
  verify the current resource ETag matches before applying the write. Returns
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-C9i1d0ma.mjs";import{a as t,i as n,t as r}from"./context-C71TA0Yp.mjs";import{a as i,r as a}from"./auth-CHTMVVW3.mjs";import{t as o}from"./output-CvQFJkvi.mjs";import{t as s}from"./dry-run-Bq0JAsbX.mjs";import{t as c}from"./progress-BlxgG8Ss.mjs";import{t as l}from"./run-l2pCxS-W.mjs";import"./telemetry-BqtdHwmi.mjs";import{i as u,n as d,r as f,t as p}from"./body-parser-hh2avzkz.mjs";import{n as m}from"./input-validation-Dk52b0me.mjs";import{a as h,i as g,n as _}from"./prompt-ClEoR47s.mjs";import{t as v}from"./cli-types-DoVT5q_M.mjs";import{n as ee,t as te}from"./raw-fetch-CWRDTVMr.mjs";function y(e){return e.usage(`$0 accounts applications create
2
+ import{t as e}from"./local-CQc36Viv.mjs";import{a as t,i as n,t as r}from"./context-M2Ho8pi3.mjs";import{a as i,r as a}from"./auth-BjxUTZWb.mjs";import{t as o}from"./output-CvQFJkvi.mjs";import{t as s}from"./dry-run-Bq0JAsbX.mjs";import{t as c}from"./progress-BnIv4lh5.mjs";import{t as l}from"./run-Duj1fsxa.mjs";import"./telemetry-Bn5lYtiy.mjs";import{i as u,n as d,r as f,t as p}from"./body-parser-hh2avzkz.mjs";import{n as m}from"./input-validation-Dk52b0me.mjs";import{a as h,i as g,n as _}from"./prompt-DjRAo2Up.mjs";import{t as v}from"./cli-types-DoVT5q_M.mjs";import{n as ee,t as te}from"./raw-fetch-CuMHmrn0.mjs";function y(e){return e.usage(`$0 accounts applications create
3
3
 
4
4
  Create a custom application for an account.`).option(`category-id`,{type:`number`,description:`Returns the category ID.`}).option(`hostnames`,{type:`string`,array:!0,description:`Hostnames matched by the application.`}).option(`human-id`,{type:`string`,description:`Returns the human readable ID.`}).option(`ip-subnets`,{type:`string`,array:!0,description:`IP subnets for this application. Custom application create and update requests accept IPv4 prefix lengths /8 through /32 and IPv6 prefix lengths /32 through /128.`}).option(`name`,{type:`string`,description:`Returns the application name.`}).option(`port-protocols`,{type:`string`,array:!0,description:`Port and protocol pairs matched by the application.`}).option(`support-domains`,{type:`string`,array:!0,description:`Support domains matched by the application.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Defines a custom application. At least one hostname or IP subnet is required. Support domains and port/protocol pairs do not satisfy this requirement. `})}const b={command:`create`,describe:`Create application`,builder:y,handler:async n=>l({command:`accounts applications create`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf accounts applications create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/resource-library/applications`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({category_id:n[`category-id`],hostnames:n.hostnames,human_id:m(n[`human-id`],`human-id`,`text`),ip_subnets:n[`ip-subnets`],name:m(n.name,`name`,`text`),port_protocols:n[`port-protocols`],support_domains:n[`support-domains`]}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.accounts.applications.create({body:e,account_id:l})),{successLabel:`Created`});return}if(n[`category-id`]===void 0)throw Error(`--category-id is required (or pass --body with this field set).`);n[`human-id`]===void 0&&(n[`human-id`]=await h(`human-id`,`Returns the human readable ID.`)),n.name===void 0&&(n.name=await h(`name`,`Returns the application name.`));let u=p({category_id:n[`category-id`],hostnames:n.hostnames,human_id:m(n[`human-id`],`human-id`,`text`),ip_subnets:n[`ip-subnets`],name:m(n.name,`name`,`text`),port_protocols:n[`port-protocols`],support_domains:n[`support-domains`]});o(await c(`Creating`,async()=>i.accounts.applications.create({body:u,account_id:l})),{successLabel:`Created`})})};function x(e){return e.usage(`$0 accounts applications delete <id>
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{i as e}from"./context-C71TA0Yp.mjs";import{r as t}from"./auth-CHTMVVW3.mjs";import{t as n}from"./output-CvQFJkvi.mjs";import{t as r}from"./dry-run-Bq0JAsbX.mjs";import{t as i}from"./progress-BlxgG8Ss.mjs";import{t as a}from"./run-l2pCxS-W.mjs";import"./telemetry-BqtdHwmi.mjs";import{n as o,t as s}from"./body-parser-hh2avzkz.mjs";import{n as c}from"./input-validation-Dk52b0me.mjs";import{a as l,n as u}from"./prompt-ClEoR47s.mjs";function d(e){return e.usage(`$0 acm custom-trust-store create
2
+ import{i as e}from"./context-M2Ho8pi3.mjs";import{r as t}from"./auth-BjxUTZWb.mjs";import{t as n}from"./output-CvQFJkvi.mjs";import{t as r}from"./dry-run-Bq0JAsbX.mjs";import{t as i}from"./progress-BnIv4lh5.mjs";import{t as a}from"./run-Duj1fsxa.mjs";import"./telemetry-Bn5lYtiy.mjs";import{n as o,t as s}from"./body-parser-hh2avzkz.mjs";import{n as c}from"./input-validation-Dk52b0me.mjs";import{a as l,n as u}from"./prompt-DjRAo2Up.mjs";function d(e){return e.usage(`$0 acm custom-trust-store create
3
3
 
4
4
  Upload a root CA certificate to the Custom Origin Trust Store for a Zone. Only root CA certificates are accepted.`).option(`certificate`,{type:`string`,description:`The root CA certificate in PEM format. Only root CA certificates are accepted; intermediate and leaf certificates are not supported.`}).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 f={command:`create`,describe:`Upload Custom Origin Trust Store`,builder:d,handler:async u=>a({command:`acm custom-trust-store create`,classification:{safeFlags:[`dry-run`]}},u,async()=>{if(u.dryRun){r({command:`cf acm custom-trust-store create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${u.zone??u.zoneId??`<zone>`}/acm/custom_trust_store`,pathParams:{"zone-id":String(u.zone??u[`zone-id`]??``)},bodyKind:`json`,body:u.body===void 0?s({certificate:c(u.certificate,`certificate`,`text`)}):o(u.body)});return}let a=await t(u),d=await e({zone:u.zone},a,{quiet:u.quiet});if(u.zoneId=d,u.body){let e=o(u.body);n(await i(`Creating`,async()=>a.acm.customTrustStore.create({...e,zone_id:d})),{successLabel:`Created`});return}u.certificate===void 0&&(u.certificate=await l(`certificate`,`The root CA certificate in PEM format. Only root CA certificates are accepted; intermediate and leaf certificates are not supported.`));let f=s({certificate:c(u.certificate,`certificate`,`text`)});n(await i(`Creating`,async()=>a.acm.customTrustStore.create({...f,zone_id:d})),{successLabel:`Created`})})};function p(e){return e.usage(`$0 acm custom-trust-store delete <custom-origin-trust-store-id>
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-C9i1d0ma.mjs";import{a as t,i as n,t as r}from"./context-C71TA0Yp.mjs";import{a as i,r as a}from"./auth-CHTMVVW3.mjs";import{t as o}from"./output-CvQFJkvi.mjs";import{t as s}from"./dry-run-Bq0JAsbX.mjs";import{t as c}from"./progress-BlxgG8Ss.mjs";import{t as l}from"./run-l2pCxS-W.mjs";import"./telemetry-BqtdHwmi.mjs";import{n as u,r as d,t as f}from"./body-parser-hh2avzkz.mjs";import{n as p,t as m}from"./input-validation-Dk52b0me.mjs";import{a as h,n as g}from"./prompt-ClEoR47s.mjs";import{n as ee,t as te}from"./raw-fetch-CWRDTVMr.mjs";function _(e){return e.usage(`$0 addressing address-maps accounts delete <member-account-id>
2
+ import{t as e}from"./local-CQc36Viv.mjs";import{a as t,i as n,t as r}from"./context-M2Ho8pi3.mjs";import{a as i,r as a}from"./auth-BjxUTZWb.mjs";import{t as o}from"./output-CvQFJkvi.mjs";import{t as s}from"./dry-run-Bq0JAsbX.mjs";import{t as c}from"./progress-BnIv4lh5.mjs";import{t as l}from"./run-Duj1fsxa.mjs";import"./telemetry-Bn5lYtiy.mjs";import{n as u,r as d,t as f}from"./body-parser-hh2avzkz.mjs";import{n as p,t as m}from"./input-validation-Dk52b0me.mjs";import{a as h,n as g}from"./prompt-DjRAo2Up.mjs";import{n as ee,t as te}from"./raw-fetch-CuMHmrn0.mjs";function _(e){return e.usage(`$0 addressing address-maps accounts delete <member-account-id>
3
3
 
4
4
  Remove an account as a member of a particular address map.`).positional(`member-account-id`,{type:`string`,description:`Identifier of a Cloudflare account.`,demandOption:!0}).option(`address-map-id`,{type:`string`,description:`Identifier of an Address Map.`,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 v={command:`delete <member-account-id>`,describe:`Remove an account membership from an Address Map`,builder:_,handler:async n=>l({command:`addressing address-maps accounts delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{if(n.dryRun){s({command:`cf addressing address-maps accounts delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/addressing/address_maps/${n[`address-map-id`]==null?`<address-map-id>`:encodeURIComponent(String(n[`address-map-id`]))}/accounts/${n[`member-account-id`]==null?`<member-account-id>`:encodeURIComponent(String(n[`member-account-id`]))}`,pathParams:{"address-map-id":String(n[`address-map-id`]??``),"member-account-id":String(n[`member-account-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,!await g({force:!!n.force})){process.stderr.write(`Aborted.
5
5
  `);return}o(await c(`Deleting`,async()=>i.addressing.addressMaps.accounts.delete({account_id:l,address_map_id:n[`address-map-id`],member_account_id:n[`member-account-id`]})),{successLabel:`Deleted`})})};function y(e){return e.usage(`$0 addressing address-maps accounts update <member-account-id>
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-C9i1d0ma.mjs";import{a as t,t as n}from"./context-C71TA0Yp.mjs";import{r}from"./auth-CHTMVVW3.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-BlxgG8Ss.mjs";import{t as s}from"./run-l2pCxS-W.mjs";import"./telemetry-BqtdHwmi.mjs";import{n as c,r as l,t as u}from"./body-parser-hh2avzkz.mjs";import{n as d}from"./input-validation-Dk52b0me.mjs";import{a as f,n as p}from"./prompt-ClEoR47s.mjs";import{t as m}from"./cli-types-DoVT5q_M.mjs";function h(e){return e.usage(`$0 agent-memory create-namespace
2
+ import{t as e}from"./local-CQc36Viv.mjs";import{a as t,t as n}from"./context-M2Ho8pi3.mjs";import{r}from"./auth-BjxUTZWb.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-BnIv4lh5.mjs";import{t as s}from"./run-Duj1fsxa.mjs";import"./telemetry-Bn5lYtiy.mjs";import{n as c,r as l,t as u}from"./body-parser-hh2avzkz.mjs";import{n as d}from"./input-validation-Dk52b0me.mjs";import{a as f,n as p}from"./prompt-DjRAo2Up.mjs";import{t as m}from"./cli-types-DoVT5q_M.mjs";function h(e){return e.usage(`$0 agent-memory create-namespace
3
3
 
4
4
  Creates a new memory namespace owned by the account.`).option(`name`,{type:`string`,description:`Namespace name.`}).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:`create-namespace`,describe:`Create a namespace`,builder:h,handler:async l=>s({command:`agent-memory create-namespace`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf agent-memory create-namespace`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/agent-memory/namespaces`,pathParams:{},bodyKind:`json`,body:l.body===void 0?u({name:d(l.name,`name`,`text`)}):c(l.body)});return}let s=await r(l),p=l.local?e:await n();if(l.accountId=p,l.body){let e=c(l.body);i(await o(`Creating`,async()=>s.agentMemory.createNamespace({...e,account_id:p})),{successLabel:`Created`});return}l.name===void 0&&(l.name=await f(`name`,`Namespace name.`));let m=u({name:d(l.name,`name`,`text`)});i(await o(`Creating`,async()=>s.agentMemory.createNamespace({...m,account_id:p})),{successLabel:`Created`})})};function _(e){return e.usage(`$0 agent-memory delete-memory <memory-id>
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{r as e}from"./theme-BIWQFmZ0.mjs";import{n as t,t as n}from"./local-C9i1d0ma.mjs";import{a as r,t as i}from"./context-C71TA0Yp.mjs";import{a,o,r as s}from"./auth-CHTMVVW3.mjs";import{t as c}from"./output-CvQFJkvi.mjs";import{t as l}from"./dry-run-Bq0JAsbX.mjs";import{t as u}from"./progress-BlxgG8Ss.mjs";import{n as d,t as f}from"./run-l2pCxS-W.mjs";import"./telemetry-BqtdHwmi.mjs";import{n as p,t as m}from"./body-parser-hh2avzkz.mjs";import{n as h,t as g}from"./input-validation-Dk52b0me.mjs";import{a as _,i as v,n as y}from"./prompt-ClEoR47s.mjs";import{t as b}from"./cli-types-DoVT5q_M.mjs";import{n as x}from"./raw-fetch-CWRDTVMr.mjs";import{_ as S,c as C,d as w,f as T,g as ee,h as E,i as D,l as O,m as k,n as A,o as j,p as M,r as N,s as P,t as F}from"./schema-flags-DBujG5kJ.mjs";const I=`ai-model-schema`;async function L(e,t,n,r){let i=ee(I,[t,e]);if(i)return{ok:!0,schema:i};let a;try{let i=await n();if(r===void 0)a=await i.ai.getModelSchema({account_id:t,model:e});else{let n=r-Date.now();if(n<=0)return{ok:!1,reason:`the request timed out`};a=await i.ai.getModelSchema({account_id:t,model:e},{timeoutInSeconds:n/1e3,maxRetries:0})}}catch(e){return{ok:!1,reason:k(e)}}let o=E(a,`input`);return o?(S(I,[t,e],o),{ok:!0,schema:o}):{ok:!1,reason:`the API returned no input schema`}}const R="Run `cf ai models list` to see the models you can run.",z=[`model-name`,`modelName`];let B;function V(e){return B=e,e.positional(`model-name`,{type:`string`,description:`Model ID, e.g. @cf/meta/llama-3.1-8b-instruct`}).option(`body`,{type:`string`,description:`Raw JSON request body, or @path to a JSON file`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).strictOptions(!1).help(!1).option(`help`,{type:`boolean`,alias:`h`,description:`Show help, including this model's input flags`}).epilogue(`Input flags depend on the model: run \`cf ai run <model> --help\`.\n${R}`)}async function H(n){n.local&&console.log(`${t}\n`),B?.showHelp(`log`);let r=n[`model-name`];if(!r||n.local)return;let i=Date.now()+M,a=await o(i);if(!a){console.log(`\n${e.muted(`Set \`CLOUDFLARE_ACCOUNT_ID\` or sign in with \`cf auth login\` to see the input flags for ${r}.`)}`);return}let c=await L(r,a,()=>s(n),i);console.log(c.ok?`\n${j(C(c.schema),`Input flags for ${r}`)}`:`\n${e.muted(`Could not load the input flags for ${r}: ${c.reason}.`)}`)}var U=d({command:`run [model-name]`,describe:"Run inference on a Workers AI model. Input flags are model-specific — see `cf ai run <model> --help`",builder:V,handler:async e=>{if(e.help){await H(e);return}if(e.local)throw Error(t);let n=e[`model-name`];if(!n)throw Error(`A model is required: cf ai run <model>. ${R}`);let o=e.dryRun?await r()??`<account-id>`:await i(),d;if(e.body!==void 0){if(O(e,z).length>0)throw Error(`--body cannot be combined with model input flags. Pass one or the other.`);d=p(e.body)}else{let t=await L(n,o,()=>s(e));if(!t.ok)throw Error(`Could not load the input schema for ${n}: ${t.reason}.\nPass the request body directly instead: cf ai run ${n} --body '{…}'`);let r=C(t.schema),i=O(e,[...z,...A(r)]);if(i.length>0)throw Error(`${i.map(e=>`Unknown flag --${e}`).join(`
2
+ import{r as e}from"./theme-BIWQFmZ0.mjs";import{n as t,t as n}from"./local-CQc36Viv.mjs";import{a as r,t as i}from"./context-M2Ho8pi3.mjs";import{a,o,r as s}from"./auth-BjxUTZWb.mjs";import{t as c}from"./output-CvQFJkvi.mjs";import{t as l}from"./dry-run-Bq0JAsbX.mjs";import{t as u}from"./progress-BnIv4lh5.mjs";import{n as d,t as f}from"./run-Duj1fsxa.mjs";import"./telemetry-Bn5lYtiy.mjs";import{n as p,t as m}from"./body-parser-hh2avzkz.mjs";import{n as h,t as g}from"./input-validation-Dk52b0me.mjs";import{a as _,i as v,n as y}from"./prompt-DjRAo2Up.mjs";import{t as b}from"./cli-types-DoVT5q_M.mjs";import{n as x}from"./raw-fetch-CuMHmrn0.mjs";import{_ as S,c as C,d as w,f as T,g as ee,h as E,i as D,l as O,m as k,n as A,o as j,p as M,r as N,s as P,t as F}from"./schema-flags-CK4J4XhG.mjs";const I=`ai-model-schema`;async function L(e,t,n,r){let i=ee(I,[t,e]);if(i)return{ok:!0,schema:i};let a;try{let i=await n();if(r===void 0)a=await i.ai.getModelSchema({account_id:t,model:e});else{let n=r-Date.now();if(n<=0)return{ok:!1,reason:`the request timed out`};a=await i.ai.getModelSchema({account_id:t,model:e},{timeoutInSeconds:n/1e3,maxRetries:0})}}catch(e){return{ok:!1,reason:k(e)}}let o=E(a,`input`);return o?(S(I,[t,e],o),{ok:!0,schema:o}):{ok:!1,reason:`the API returned no input schema`}}const R="Run `cf ai models list` to see the models you can run.",z=[`model-name`,`modelName`];let B;function V(e){return B=e,e.positional(`model-name`,{type:`string`,description:`Model ID, e.g. @cf/meta/llama-3.1-8b-instruct`}).option(`body`,{type:`string`,description:`Raw JSON request body, or @path to a JSON file`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).strictOptions(!1).help(!1).option(`help`,{type:`boolean`,alias:`h`,description:`Show help, including this model's input flags`}).epilogue(`Input flags depend on the model: run \`cf ai run <model> --help\`.\n${R}`)}async function H(n){n.local&&console.log(`${t}\n`),B?.showHelp(`log`);let r=n[`model-name`];if(!r||n.local)return;let i=Date.now()+M,a=await o(i);if(!a){console.log(`\n${e.muted(`Set \`CLOUDFLARE_ACCOUNT_ID\` or sign in with \`cf auth login\` to see the input flags for ${r}.`)}`);return}let c=await L(r,a,()=>s(n),i);console.log(c.ok?`\n${j(C(c.schema),`Input flags for ${r}`)}`:`\n${e.muted(`Could not load the input flags for ${r}: ${c.reason}.`)}`)}var U=d({command:`run [model-name]`,describe:"Run inference on a Workers AI model. Input flags are model-specific — see `cf ai run <model> --help`",builder:V,handler:async e=>{if(e.help){await H(e);return}if(e.local)throw Error(t);let n=e[`model-name`];if(!n)throw Error(`A model is required: cf ai run <model>. ${R}`);let o=e.dryRun?await r()??`<account-id>`:await i(),d;if(e.body!==void 0){if(O(e,z).length>0)throw Error(`--body cannot be combined with model input flags. Pass one or the other.`);d=p(e.body)}else{let t=await L(n,o,()=>s(e));if(!t.ok)throw Error(`Could not load the input schema for ${n}: ${t.reason}.\nPass the request body directly instead: cf ai run ${n} --body '{…}'`);let r=C(t.schema),i=O(e,[...z,...A(r)]);if(i.length>0)throw Error(`${i.map(e=>`Unknown flag --${e}`).join(`
3
3
  `)}\n\nRun \`cf ai run ${n} --help\` for this model's input flags.`);let a=new Set;for(;;){let t=D(r,e).find(e=>!a.has(e.name)&&(e.choices!==void 0||e.type===`string`));if(!t)break;a.add(t.name),t.choices?e[t.name]=await v(t.name,P(t),t.choices,t.choiceLabels):e[t.name]=await _(t.name,P(t))}let c=N(t.schema),l=F(r,e,{reserved:z}),u=l.errors.length===0?c?w(t.schema,l.body):T(t.schema,l.body):l.errors;if(u.length>0)throw Error(`${u.join(`
4
4
  `)}\n\nRun \`cf ai run ${n} --help\` for this model's input flags.`);d=l.body}if(e.dryRun){let e={model:n,input:d};l({command:`cf ai run`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${o}/ai/run`,pathParams:{},bodyKind:`json`,body:e});return}let f=await s(e);e.accountId=o;let m=await u(`Running`,async()=>a(f,`POST`,`/accounts/${o}/ai/run`,{body:{model:n,input:d},preserveNonJsonBytes:!0}));if(Buffer.isBuffer(m)){x(m);return}c(m,{successLabel:`Ran`})}},{command:`ai run`,recordArgs:!1});function W(e){return e.usage(`$0 ai authors list
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{i as e}from"./context-C71TA0Yp.mjs";import{a as t,r as n}from"./auth-CHTMVVW3.mjs";import{t as r}from"./output-CvQFJkvi.mjs";import{t as i}from"./dry-run-Bq0JAsbX.mjs";import{t as a}from"./progress-BlxgG8Ss.mjs";import{t as o}from"./run-l2pCxS-W.mjs";import"./telemetry-BqtdHwmi.mjs";import{n as s}from"./body-parser-hh2avzkz.mjs";function c(e){return e.usage(`$0 ai-audit robots bulk-get
2
+ import{i as e}from"./context-M2Ho8pi3.mjs";import{a as t,r as n}from"./auth-BjxUTZWb.mjs";import{t as r}from"./output-CvQFJkvi.mjs";import{t as i}from"./dry-run-Bq0JAsbX.mjs";import{t as a}from"./progress-BnIv4lh5.mjs";import{t as o}from"./run-Duj1fsxa.mjs";import"./telemetry-Bn5lYtiy.mjs";import{n as s}from"./body-parser-hh2avzkz.mjs";function c(e){return e.usage(`$0 ai-audit robots bulk-get
3
3
 
4
4
  Fetches and parses robots.txt files for multiple domains within a zone in a single request. Each domain must belong to the specified zone. Results are keyed by hostname.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Array of domain hostnames to fetch robots.txt for. Each domain must end with the zone name. Maximum 25 domains per request.`})}const l={command:`bulk-get`,describe:`Bulk get robots.txt rules`,builder:c,handler:async c=>o({command:`ai-audit robots bulk-get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){i({command:`cf ai-audit robots bulk-get`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${c.zone??c.zoneId??`<zone>`}/ai-audit/robots/bulk`,pathParams:{"zone-id":String(c.zone??c[`zone-id`]??``)},bodyKind:`json`,body:c.body===void 0?void 0:s(c.body)});return}let o=await n(c);if(c.zoneId=await e({zone:c.zone},o,{quiet:c.quiet}),c.body){let e=s(c.body);if(Array.isArray(e)&&e.length>25){let n=Math.ceil(e.length/25),i=null;for(let r=0;r<e.length;r+=25){let s=e.slice(r,r+25);i=await a(`Loading: batch ${Math.floor(r/25)+1}/${n}`,async()=>t(o,`POST`,`/zones/${c.zoneId}/ai-audit/robots/bulk`,{body:s}))}r(i,{successLabel:`Loaded`});return}r(await a(`Loading`,async()=>t(o,`POST`,`/zones/${c.zoneId}/ai-audit/robots/bulk`,{body:e})),{successLabel:`Loaded`});return}if(c.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function u(e){return e.usage(`$0 ai-audit robots get
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-C9i1d0ma.mjs";import{a as t,t as n}from"./context-C71TA0Yp.mjs";import{a as r,r as i}from"./auth-CHTMVVW3.mjs";import{t as a}from"./output-CvQFJkvi.mjs";import{t as o}from"./dry-run-Bq0JAsbX.mjs";import{t as s}from"./progress-BlxgG8Ss.mjs";import{t as c}from"./run-l2pCxS-W.mjs";import"./telemetry-BqtdHwmi.mjs";import{i as l,n as u,r as d,t as f}from"./body-parser-hh2avzkz.mjs";import{n as p}from"./input-validation-Dk52b0me.mjs";import{a as m,n as h}from"./prompt-ClEoR47s.mjs";import{t as g}from"./cli-types-DoVT5q_M.mjs";function ee(e){return e.usage(`$0 ai-gateway custom-domains create <gateway-id>
2
+ import{t as e}from"./local-CQc36Viv.mjs";import{a as t,t as n}from"./context-M2Ho8pi3.mjs";import{a as r,r as i}from"./auth-BjxUTZWb.mjs";import{t as a}from"./output-CvQFJkvi.mjs";import{t as o}from"./dry-run-Bq0JAsbX.mjs";import{t as s}from"./progress-BnIv4lh5.mjs";import{t as c}from"./run-Duj1fsxa.mjs";import"./telemetry-Bn5lYtiy.mjs";import{i as l,n as u,r as d,t as f}from"./body-parser-hh2avzkz.mjs";import{n as p}from"./input-validation-Dk52b0me.mjs";import{a as m,n as h}from"./prompt-DjRAo2Up.mjs";import{t as g}from"./cli-types-DoVT5q_M.mjs";function ee(e){return e.usage(`$0 ai-gateway custom-domains create <gateway-id>
3
3
 
4
4
  Provisions a Cloudflare-for-SaaS custom hostname and returns the CNAME target to point DNS at.`).positional(`gateway-id`,{type:`string`,description:`Unique identifier of the AI Gateway within the account.`,demandOption:!0}).option(`domain`,{type:`string`,description:"Custom hostname that you own, such as `ai.example.com`."}).option(`min-tls`,{type:`string`,description:`The minTLS field`,choices:[`1.0`,`1.1`,`1.2`,`1.3`]}).option(`zone-id`,{type:`string`,description:`ID of the Cloudflare zone that contains the custom hostname.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const te={command:`create <gateway-id>`,describe:`Create a custom domain for a gateway`,builder:ee,handler:async r=>c({command:`ai-gateway custom-domains create`,classification:{safeFlags:[`min-tls`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf ai-gateway custom-domains create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/ai-gateway/gateways/${r[`gateway-id`]==null?`<gateway-id>`:encodeURIComponent(String(r[`gateway-id`]))}/custom-domains`,pathParams:{"gateway-id":String(r[`gateway-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({domain:p(r.domain,`domain`,`text`),minTLS:p(r[`min-tls`],`min-tls`,`text`),zone_id:p(r[`zone-id`],`zone-id`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.aiGateway.customDomains.create({...e,account_id:l,gateway_id:r[`gateway-id`]})),{successLabel:`Created`});return}r.domain===void 0&&(r.domain=await m(`domain`,"Custom hostname that you own, such as `ai.example.com`.")),r[`zone-id`]===void 0&&(r[`zone-id`]=await m(`zone-id`,`ID of the Cloudflare zone that contains the custom hostname.`));let d=f({domain:p(r.domain,`domain`,`text`),minTLS:p(r[`min-tls`],`min-tls`,`text`),zone_id:p(r[`zone-id`],`zone-id`,`text`)});a(await s(`Creating`,async()=>c.aiGateway.customDomains.create({...d,account_id:l,gateway_id:r[`gateway-id`]})),{successLabel:`Created`})})};function _(e){return e.usage(`$0 ai-gateway custom-domains delete <hostname>
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-C9i1d0ma.mjs";import{a as t,t as n}from"./context-C71TA0Yp.mjs";import{a as r,r as i}from"./auth-CHTMVVW3.mjs";import{t as a}from"./output-CvQFJkvi.mjs";import{t as o}from"./dry-run-Bq0JAsbX.mjs";import{t as s}from"./progress-BlxgG8Ss.mjs";import{t as c}from"./run-l2pCxS-W.mjs";import"./telemetry-BqtdHwmi.mjs";import{n as l,r as u,t as d}from"./body-parser-hh2avzkz.mjs";import{n as f,t as p}from"./input-validation-Dk52b0me.mjs";import{a as m,i as h,n as g}from"./prompt-ClEoR47s.mjs";import{t as _}from"./cli-types-DoVT5q_M.mjs";import{n as ee,t as te}from"./raw-fetch-CWRDTVMr.mjs";function v(e){return e.usage(`$0 ai-search chat-completions <id>
2
+ import{t as e}from"./local-CQc36Viv.mjs";import{a as t,t as n}from"./context-M2Ho8pi3.mjs";import{a as r,r as i}from"./auth-BjxUTZWb.mjs";import{t as a}from"./output-CvQFJkvi.mjs";import{t as o}from"./dry-run-Bq0JAsbX.mjs";import{t as s}from"./progress-BnIv4lh5.mjs";import{t as c}from"./run-Duj1fsxa.mjs";import"./telemetry-Bn5lYtiy.mjs";import{n as l,r as u,t as d}from"./body-parser-hh2avzkz.mjs";import{n as f,t as p}from"./input-validation-Dk52b0me.mjs";import{a as m,i as h,n as g}from"./prompt-DjRAo2Up.mjs";import{t as _}from"./cli-types-DoVT5q_M.mjs";import{n as ee,t as te}from"./raw-fetch-CuMHmrn0.mjs";function v(e){return e.usage(`$0 ai-search chat-completions <id>
3
3
 
4
4
  Performs a chat completion request against an AI Search instance, using indexed content as context for generating responses.`).positional(`id`,{type:`string`,description:`AI Search instance ID.`,demandOption:!0}).option(`name`,{type:`string`,description:`Namespace to use for this operation.`,demandOption:!0}).option(`ai-search-options-cache-cache-threshold`,{type:`string`,description:`The ai_search_options.cache.cache_threshold field`,choices:[`super_strict_match`,`close_enough`,`flexible_friend`,`anything_goes`]}).option(`ai-search-options-cache-enabled`,{type:`boolean`,description:`The ai_search_options.cache.enabled field`}).option(`ai-search-options-query-rewrite-enabled`,{type:`boolean`,description:`The ai_search_options.query_rewrite.enabled field`}).option(`ai-search-options-query-rewrite-model`,{type:`string`,description:`A Workers AI model ID or an AI Gateway model ID compatible with the OpenAI Chat Completions API. An empty string uses the configured or default model.`}).option(`ai-search-options-query-rewrite-rewrite-prompt`,{type:`string`,description:`The ai_search_options.query_rewrite.rewrite_prompt field`}).option(`ai-search-options-reranking-enabled`,{type:`boolean`,description:`The ai_search_options.reranking.enabled field`}).option(`ai-search-options-reranking-match-threshold`,{type:`number`,description:`The ai_search_options.reranking.match_threshold field`}).option(`ai-search-options-reranking-model`,{type:`string`,description:`The ai_search_options.reranking.model field`}).option(`ai-search-options-retrieval-context-expansion`,{type:`number`,description:`The ai_search_options.retrieval.context_expansion field`}).option(`ai-search-options-retrieval-fusion-method`,{type:`string`,description:`The ai_search_options.retrieval.fusion_method field`,choices:[`max`,`rrf`]}).option(`ai-search-options-retrieval-keyword-match-mode`,{type:`string`,description:`Controls which documents are candidates for BM25 scoring. 'and' restricts candidates to documents containing all query terms; 'or' includes any document containing at least one term, ranked by BM25 relevance. When omitted, falls back to the instance-level retrieval_options.keyword_match_mode, then to 'and'.`,choices:[`and`,`or`]}).option(`ai-search-options-retrieval-match-threshold`,{type:`number`,description:`The ai_search_options.retrieval.match_threshold field`}).option(`ai-search-options-retrieval-max-num-results`,{type:`number`,description:`The ai_search_options.retrieval.max_num_results field`}).option(`ai-search-options-retrieval-retrieval-type`,{type:`string`,description:`The ai_search_options.retrieval.retrieval_type field`,choices:[`vector`,`keyword`,`hybrid`]}).option(`ai-search-options-retrieval-return-on-failure`,{type:`boolean`,description:`The ai_search_options.retrieval.return_on_failure field`}).option(`messages`,{type:`string`,description:`The messages field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`model`,{type:`string`,description:`A Workers AI model ID or an AI Gateway model ID compatible with the OpenAI Chat Completions API. An empty string uses the configured or default model.`}).option(`stream`,{type:`boolean`,description:`The stream field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const y={command:`chat-completions <id>`,describe:`Chat Completions`,builder:v,handler:async r=>c({command:`ai-search chat-completions`,classification:{safeFlags:[`ai-search-options-cache-cache-threshold`,`ai-search-options-cache-enabled`,`ai-search-options-query-rewrite-enabled`,`ai-search-options-reranking-enabled`,`ai-search-options-retrieval-fusion-method`,`ai-search-options-retrieval-keyword-match-mode`,`ai-search-options-retrieval-retrieval-type`,`ai-search-options-retrieval-return-on-failure`,`stream`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf ai-search chat-completions`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/ai-search/namespaces/${r.name==null?`<name>`:encodeURIComponent(String(r.name))}/instances/${r.id==null?`<id>`:encodeURIComponent(String(r.id))}/chat/completions`,pathParams:{id:String(r.id??``),name:String(r.name??``)},bodyKind:`json`,body:r.body===void 0?d({ai_search_options:{cache:{cache_threshold:f(r[`ai-search-options-cache-cache-threshold`],`ai-search-options-cache-cache-threshold`,`text`),enabled:r[`ai-search-options-cache-enabled`]},query_rewrite:{enabled:r[`ai-search-options-query-rewrite-enabled`],model:f(r[`ai-search-options-query-rewrite-model`],`ai-search-options-query-rewrite-model`,`text`),rewrite_prompt:f(r[`ai-search-options-query-rewrite-rewrite-prompt`],`ai-search-options-query-rewrite-rewrite-prompt`,`text`)},reranking:{enabled:r[`ai-search-options-reranking-enabled`],match_threshold:r[`ai-search-options-reranking-match-threshold`],model:f(r[`ai-search-options-reranking-model`],`ai-search-options-reranking-model`,`text`)},retrieval:{context_expansion:r[`ai-search-options-retrieval-context-expansion`],fusion_method:f(r[`ai-search-options-retrieval-fusion-method`],`ai-search-options-retrieval-fusion-method`,`text`),keyword_match_mode:f(r[`ai-search-options-retrieval-keyword-match-mode`],`ai-search-options-retrieval-keyword-match-mode`,`text`),match_threshold:r[`ai-search-options-retrieval-match-threshold`],max_num_results:r[`ai-search-options-retrieval-max-num-results`],retrieval_type:f(r[`ai-search-options-retrieval-retrieval-type`],`ai-search-options-retrieval-retrieval-type`,`text`),return_on_failure:r[`ai-search-options-retrieval-return-on-failure`]}},messages:u(r.messages,`messages`),model:f(r.model,`model`,`text`),stream:r.stream}):l(r.body)});return}let c=await i(r),p=r.local?e:await n();if(r.accountId=p,r.body){let e=l(r.body);a(await s(`Creating`,async()=>c.aiSearch.chatCompletions({...e,account_id:p,name:r.name,id:r.id})),{successLabel:`Created`});return}if(r.messages===void 0)throw Error(`--messages is required (or pass --body with this field set).`);let m=d({ai_search_options:{cache:{cache_threshold:f(r[`ai-search-options-cache-cache-threshold`],`ai-search-options-cache-cache-threshold`,`text`),enabled:r[`ai-search-options-cache-enabled`]},query_rewrite:{enabled:r[`ai-search-options-query-rewrite-enabled`],model:f(r[`ai-search-options-query-rewrite-model`],`ai-search-options-query-rewrite-model`,`text`),rewrite_prompt:f(r[`ai-search-options-query-rewrite-rewrite-prompt`],`ai-search-options-query-rewrite-rewrite-prompt`,`text`)},reranking:{enabled:r[`ai-search-options-reranking-enabled`],match_threshold:r[`ai-search-options-reranking-match-threshold`],model:f(r[`ai-search-options-reranking-model`],`ai-search-options-reranking-model`,`text`)},retrieval:{context_expansion:r[`ai-search-options-retrieval-context-expansion`],fusion_method:f(r[`ai-search-options-retrieval-fusion-method`],`ai-search-options-retrieval-fusion-method`,`text`),keyword_match_mode:f(r[`ai-search-options-retrieval-keyword-match-mode`],`ai-search-options-retrieval-keyword-match-mode`,`text`),match_threshold:r[`ai-search-options-retrieval-match-threshold`],max_num_results:r[`ai-search-options-retrieval-max-num-results`],retrieval_type:f(r[`ai-search-options-retrieval-retrieval-type`],`ai-search-options-retrieval-retrieval-type`,`text`),return_on_failure:r[`ai-search-options-retrieval-return-on-failure`]}},messages:u(r.messages,`messages`),model:f(r.model,`model`,`text`),stream:r.stream});a(await s(`Creating`,async()=>c.aiSearch.chatCompletions({...m,account_id:p,name:r.name,id:r.id})),{successLabel:`Created`})})};function b(e){return e.usage(`$0 ai-search create <name> <id>
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{i as e}from"./context-C71TA0Yp.mjs";import{r as t}from"./auth-CHTMVVW3.mjs";import{t as n}from"./output-CvQFJkvi.mjs";import{t as r}from"./dry-run-Bq0JAsbX.mjs";import{t as i}from"./progress-BlxgG8Ss.mjs";import{t as a}from"./run-l2pCxS-W.mjs";import"./telemetry-BqtdHwmi.mjs";import{n as o,r as s,t as c}from"./body-parser-hh2avzkz.mjs";import{n as l}from"./prompt-ClEoR47s.mjs";function u(e){return e.usage(`$0 ai-security custom-topics get
2
+ import{i as e}from"./context-M2Ho8pi3.mjs";import{r as t}from"./auth-BjxUTZWb.mjs";import{t as n}from"./output-CvQFJkvi.mjs";import{t as r}from"./dry-run-Bq0JAsbX.mjs";import{t as i}from"./progress-BnIv4lh5.mjs";import{t as a}from"./run-Duj1fsxa.mjs";import"./telemetry-Bn5lYtiy.mjs";import{n as o,r as s,t as c}from"./body-parser-hh2avzkz.mjs";import{n as l}from"./prompt-DjRAo2Up.mjs";function u(e){return e.usage(`$0 ai-security custom-topics get
3
3
 
4
4
  Get the custom topic categories defined for the zone. While AI Security for Apps is enabled, it scores every incoming prompt against these topics and writes the scores to the \`cf.llm.prompt.custom_topic_categories\` field, keyed by topic label. Topics can be configured while the detection is disabled, but no prompt is scored until you enable it.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const d={command:`get`,describe:`Get the AI Security for Apps custom topics of a zone.`,builder:u,handler:async o=>a({command:`ai-security custom-topics get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf ai-security custom-topics get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/ai-security/custom-topics`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s,n(await i(`Loading`,async()=>a.aiSecurity.customTopics.get({zone_id:s})),{successLabel:`Loaded`})})};function f(e){return e.usage("$0 ai-security custom-topics update\n\nUpdate the custom topic list of the zone, overwriting it entirely with the topics in the request, so include every topic you want to keep. Changes can take up to a minute to propagate. Each entry has a `label`, used to reference the topic in rule expressions and analytics, and a `topic` description, which the classifier scores prompts against while AI Security for Apps is enabled. The following rules apply: - A zone can hold at most 20 topics. - `label` must be 2–20 characters, using only lowercase letters (a–z), digits (0–9), and hyphens. - `topic` must be 2–50 printable ASCII characters. - Labels must be unique within the zone, and so must topic descriptions.").option(`topics`,{type:`string`,description:`Custom topic categories for AI Security for Apps content detection. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const p={command:`update`,describe:`Update the AI Security for Apps custom topics of a zone.`,builder:f,handler:async u=>a({command:`ai-security custom-topics update`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},u,async()=>{if(u.dryRun){r({command:`cf ai-security custom-topics update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${u.zone??u.zoneId??`<zone>`}/ai-security/custom-topics`,pathParams:{"zone-id":String(u.zone??u[`zone-id`]??``)},bodyKind:`json`,body:u.body===void 0?c({topics:s(u.topics,`topics`)}):o(u.body)});return}let a=await t(u),d=await e({zone:u.zone},a,{quiet:u.quiet});if(u.zoneId=d,!await l({force:!!u.force,message:`This operation overwrites the AI Security for Apps custom topics for a zone.`})){process.stderr.write(`Aborted.
5
5
  `);return}if(u.body){let e=o(u.body);n(await i(`Deleting`,async()=>a.aiSecurity.customTopics.update({body:e,zone_id:d})),{successLabel:`Deleted`});return}let f=c({topics:s(u.topics,`topics`)});n(await i(`Deleting`,async()=>a.aiSecurity.customTopics.update({body:f,zone_id:d})),{successLabel:`Deleted`})})},m={command:`custom-topics`,describe:`Organization-specific topic categories used by AI Security for Apps content detection`,builder:e=>e.command(d).command(p).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function h(e){return e.usage(`$0 ai-security get
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-C9i1d0ma.mjs";import{a as t,t as n}from"./context-C71TA0Yp.mjs";import{r}from"./auth-CHTMVVW3.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-BlxgG8Ss.mjs";import{t as s}from"./run-l2pCxS-W.mjs";import"./telemetry-BqtdHwmi.mjs";import{n as c,t as l}from"./body-parser-hh2avzkz.mjs";import{n as u}from"./input-validation-Dk52b0me.mjs";import{a as d,i as f,n as p}from"./prompt-ClEoR47s.mjs";import{n as m,t as h}from"./raw-fetch-CWRDTVMr.mjs";function ee(e){return e.usage(`$0 alerting available-alerts list
2
+ import{t as e}from"./local-CQc36Viv.mjs";import{a as t,t as n}from"./context-M2Ho8pi3.mjs";import{r}from"./auth-BjxUTZWb.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-BnIv4lh5.mjs";import{t as s}from"./run-Duj1fsxa.mjs";import"./telemetry-Bn5lYtiy.mjs";import{n as c,t as l}from"./body-parser-hh2avzkz.mjs";import{n as u}from"./input-validation-Dk52b0me.mjs";import{a as d,i as f,n as p}from"./prompt-DjRAo2Up.mjs";import{n as m,t as h}from"./raw-fetch-CuMHmrn0.mjs";function ee(e){return e.usage(`$0 alerting available-alerts list
3
3
 
4
4
  Gets a list of all alert types for which an account is eligible.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`list`,describe:`Get Alert Types`,builder:ee,handler:async c=>s({command:`alerting available-alerts list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf alerting available-alerts list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/alerting/v3/available_alerts`,pathParams:{},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();c.accountId=l,i(await o(`Loading`,async()=>s.alerting.availableAlerts.list({account_id:l})),{successLabel:`Loaded`})})},_={command:`available-alerts`,describe:`Operations for available-alerts`,builder:e=>e.command(g).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function v(e){return e.usage(`$0 alerting destinations eligible get
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-C9i1d0ma.mjs";import{a as t,i as n,t as r}from"./context-C71TA0Yp.mjs";import{a as i,r as a}from"./auth-CHTMVVW3.mjs";import{t as o}from"./output-CvQFJkvi.mjs";import{t as s}from"./dry-run-Bq0JAsbX.mjs";import{t as c}from"./progress-BlxgG8Ss.mjs";import{t as l}from"./run-l2pCxS-W.mjs";import"./telemetry-BqtdHwmi.mjs";import{i as u,n as d,r as f,t as p}from"./body-parser-hh2avzkz.mjs";import{n as m,t as h}from"./input-validation-Dk52b0me.mjs";import{a as g}from"./prompt-ClEoR47s.mjs";function _(e){return e.usage(`$0 analytics latency colos get
2
+ import{t as e}from"./local-CQc36Viv.mjs";import{a as t,i as n,t as r}from"./context-M2Ho8pi3.mjs";import{a as i,r as a}from"./auth-BjxUTZWb.mjs";import{t as o}from"./output-CvQFJkvi.mjs";import{t as s}from"./dry-run-Bq0JAsbX.mjs";import{t as c}from"./progress-BnIv4lh5.mjs";import{t as l}from"./run-Duj1fsxa.mjs";import"./telemetry-Bn5lYtiy.mjs";import{i as u,n as d,r as f,t as p}from"./body-parser-hh2avzkz.mjs";import{n as m,t as h}from"./input-validation-Dk52b0me.mjs";import{a as g}from"./prompt-DjRAo2Up.mjs";function _(e){return e.usage(`$0 analytics latency colos get
3
3
 
4
4
  Retrieves Argo Smart Routing analytics broken down by geographic points of presence (PoPs). Shows latency improvements and routing efficiency per location.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`get`,describe:`Argo Analytics for a zone at different PoPs`,builder:_,handler:async e=>l({command:`analytics latency colos get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf analytics latency colos get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/analytics/latency/colos`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await a(e),r=await n({zone:e.zone},t,{quiet:e.quiet});e.zoneId=r,o(await c(`Loading`,async()=>t.analytics.latency.colos.get({zone_id:r})),{successLabel:`Loaded`})})},y={command:`colos`,describe:`Operations for latency.colos`,builder:e=>e.command(v).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function b(e){return e.usage(`$0 analytics latency get
5
5
 
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-C9i1d0ma.mjs";import{a as t,t as n}from"./context-C71TA0Yp.mjs";import{a as r,r as i}from"./auth-CHTMVVW3.mjs";import{t as a}from"./output-CvQFJkvi.mjs";import{t as o}from"./dry-run-Bq0JAsbX.mjs";import{t as s}from"./progress-BlxgG8Ss.mjs";import{t as c}from"./run-l2pCxS-W.mjs";import"./telemetry-BqtdHwmi.mjs";import{n as l,t as u}from"./input-validation-Dk52b0me.mjs";function d(e){return e.usage(`$0 analytics_engine sql query
2
+ import{t as e}from"./local-CQc36Viv.mjs";import{a as t,t as n}from"./context-M2Ho8pi3.mjs";import{a as r,r as i}from"./auth-BjxUTZWb.mjs";import{t as a}from"./output-CvQFJkvi.mjs";import{t as o}from"./dry-run-Bq0JAsbX.mjs";import{t as s}from"./progress-BnIv4lh5.mjs";import{t as c}from"./run-Duj1fsxa.mjs";import"./telemetry-Bn5lYtiy.mjs";import{n as l,t as u}from"./input-validation-Dk52b0me.mjs";function d(e){return e.usage(`$0 analytics_engine sql query
3
3
 
4
4
  Executes a SQL query against Workers Analytics Engine data. Pass the SQL query in the request body as plain text. The response uses newline-delimited JSON (NDJSON) by default, or a single JSON object when the query includes a FORMAT JSON clause. Prefer this method for longer queries that may exceed URL length limits.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`})}const f={command:`query`,describe:`Execute an Analytics Engine SQL query via request body`,builder:d,handler:async d=>c({command:`analytics_engine sql query`,classification:{safeFlags:[`dry-run`]}},d,async()=>{if(d.dryRun){o({command:`cf analytics_engine sql query`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/analytics_engine/sql`,pathParams:{},bodyKind:`octet-stream`,body:d.body});return}let c=await i(d),f=d.local?e:await n();if(d.accountId=f,d.file){let e=u(d.file);a(await s(`Loading`,async()=>r(c,`POST`,`/accounts/${f}/analytics_engine/sql`,{body:e,headers:{"Content-Type":`text/plain`}})),{successLabel:`Loaded`});return}if(d.body){let e=l(d.body,`body`,`binary`);a(await s(`Loading`,async()=>r(c,`POST`,`/accounts/${f}/analytics_engine/sql`,{body:e,headers:{"Content-Type":`text/plain`}})),{successLabel:`Loaded`});return}a(await s(`Loading`,async()=>c.analyticsEngine.sql.query({account_id:f})),{successLabel:`Loaded`})})},p={command:`sql`,describe:`Operations for sql`,builder:e=>e.command(f).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},m={command:`analytics_engine`,describe:`analytics_engine`,builder:e=>e.command(p).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{m as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-C9i1d0ma.mjs";import{a as t,i as n,t as r}from"./context-C71TA0Yp.mjs";import{a as i,r as a}from"./auth-CHTMVVW3.mjs";import{t as o}from"./output-CvQFJkvi.mjs";import{t as s}from"./dry-run-Bq0JAsbX.mjs";import{t as c}from"./progress-BlxgG8Ss.mjs";import{t as l}from"./run-l2pCxS-W.mjs";import"./telemetry-BqtdHwmi.mjs";import{n as u,r as d,t as f}from"./body-parser-hh2avzkz.mjs";import{n as p}from"./input-validation-Dk52b0me.mjs";import{a as m,i as h,n as g}from"./prompt-ClEoR47s.mjs";import{t as _}from"./cli-types-DoVT5q_M.mjs";function ee(e){return e.usage(`$0 api-security schema-validation schemas create
2
+ import{t as e}from"./local-CQc36Viv.mjs";import{a as t,i as n,t as r}from"./context-M2Ho8pi3.mjs";import{a as i,r as a}from"./auth-BjxUTZWb.mjs";import{t as o}from"./output-CvQFJkvi.mjs";import{t as s}from"./dry-run-Bq0JAsbX.mjs";import{t as c}from"./progress-BnIv4lh5.mjs";import{t as l}from"./run-Duj1fsxa.mjs";import"./telemetry-Bn5lYtiy.mjs";import{n as u,r as d,t as f}from"./body-parser-hh2avzkz.mjs";import{n as p}from"./input-validation-Dk52b0me.mjs";import{a as m,i as h,n as g}from"./prompt-DjRAo2Up.mjs";import{t as _}from"./cli-types-DoVT5q_M.mjs";function ee(e){return e.usage(`$0 api-security schema-validation schemas create
3
3
 
4
4
  Uploads an OpenAPI schema that defines expected request formats for API operations.`).option(`kind`,{type:`string`,description:`The kind of the schema`,choices:[`openapi_v3`]}).option(`name`,{type:`string`,description:`A human-readable name for the schema`}).option(`source`,{type:`string`,description:`The raw schema, e.g., the OpenAPI schema, either as JSON or YAML`}).option(`validation-enabled`,{type:`boolean`,description:`An indicator if this schema is enabled`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const te={command:`create`,describe:`Upload a schema`,builder:ee,handler:async e=>l({command:`api-security schema-validation schemas create`,classification:{safeFlags:[`kind`,`validation-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf api-security schema-validation schemas create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/schema_validation/schemas`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({kind:p(e.kind,`kind`,`text`),name:p(e.name,`name`,`text`),source:p(e.source,`source`,`text`),validation_enabled:e[`validation-enabled`]}):u(e.body)});return}let t=await a(e),r=await n({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,e.body){let n=u(e.body);o(await c(`Creating`,async()=>t.apiSecurity.schemaValidation.schemas.create({...n,zone_id:r})),{successLabel:`Created`});return}if(e.kind===void 0&&(e.kind=await h(`kind`,`The kind of the schema`,[`openapi_v3`])),e.name===void 0&&(e.name=await m(`name`,`A human-readable name for the schema`)),e.source===void 0&&(e.source=await m(`source`,`The raw schema, e.g., the OpenAPI schema, either as JSON or YAML`)),e[`validation-enabled`]===void 0)throw Error(`--validation-enabled is required (or pass --body with this field set).`);let i=f({kind:p(e.kind,`kind`,`text`),name:p(e.name,`name`,`text`),source:p(e.source,`source`,`text`),validation_enabled:e[`validation-enabled`]});o(await c(`Creating`,async()=>t.apiSecurity.schemaValidation.schemas.create({...i,zone_id:r})),{successLabel:`Created`})})};function v(e){return e.usage(`$0 api-security schema-validation schemas delete <schema-id>
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{i as e}from"./context-C71TA0Yp.mjs";import{r as t}from"./auth-CHTMVVW3.mjs";import{t as n}from"./output-CvQFJkvi.mjs";import{t as r}from"./dry-run-Bq0JAsbX.mjs";import{t as i}from"./progress-BlxgG8Ss.mjs";import{t as a}from"./run-l2pCxS-W.mjs";import"./telemetry-BqtdHwmi.mjs";import{n as o,t as s}from"./body-parser-hh2avzkz.mjs";import{n as c}from"./input-validation-Dk52b0me.mjs";import{i as l}from"./prompt-ClEoR47s.mjs";function u(e){return e.usage(`$0 argo smart-routing edit
2
+ import{i as e}from"./context-M2Ho8pi3.mjs";import{r as t}from"./auth-BjxUTZWb.mjs";import{t as n}from"./output-CvQFJkvi.mjs";import{t as r}from"./dry-run-Bq0JAsbX.mjs";import{t as i}from"./progress-BnIv4lh5.mjs";import{t as a}from"./run-Duj1fsxa.mjs";import"./telemetry-Bn5lYtiy.mjs";import{n as o,t as s}from"./body-parser-hh2avzkz.mjs";import{n as c}from"./input-validation-Dk52b0me.mjs";import{i as l}from"./prompt-DjRAo2Up.mjs";function u(e){return e.usage(`$0 argo smart-routing edit
3
3
 
4
4
  Configures the value of the Argo Smart Routing enablement setting.`).option(`value`,{type:`string`,description:`Specifies the enablement value of Argo Smart Routing.`,choices:[`on`,`off`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Configures the enablement of Argo Smart Routing.`})}const d={command:`edit`,describe:`Patch Argo Smart Routing setting`,builder:u,handler:async u=>a({command:`argo smart-routing edit`,classification:{safeFlags:[`value`,`dry-run`]}},u,async()=>{if(u.dryRun){r({command:`cf argo smart-routing edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${u.zone??u.zoneId??`<zone>`}/argo/smart_routing`,pathParams:{"zone-id":String(u.zone??u[`zone-id`]??``)},bodyKind:`json`,body:u.body===void 0?s({value:c(u.value,`value`,`text`)}):o(u.body)});return}let a=await t(u),d=await e({zone:u.zone},a,{quiet:u.quiet});if(u.zoneId=d,u.body){let e=o(u.body);n(await i(`Updating`,async()=>a.argo.smartRouting.edit({...e,zone_id:d})),{successLabel:`Updated`});return}u.value===void 0&&(u.value=await l(`value`,`Specifies the enablement value of Argo Smart Routing.`,[`on`,`off`]));let f=s({value:c(u.value,`value`,`text`)});n(await i(`Updating`,async()=>a.argo.smartRouting.edit({...f,zone_id:d})),{successLabel:`Updated`})})};function f(e){return e.usage(`$0 argo smart-routing get
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-C9i1d0ma.mjs";import{a as t,t as n}from"./context-C71TA0Yp.mjs";import{r}from"./auth-CHTMVVW3.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-BlxgG8Ss.mjs";import{t as s}from"./run-l2pCxS-W.mjs";import"./telemetry-BqtdHwmi.mjs";import{n as c,t as l}from"./body-parser-hh2avzkz.mjs";import{n as u}from"./input-validation-Dk52b0me.mjs";import{a as d,n as f}from"./prompt-ClEoR47s.mjs";import{t as p}from"./cli-types-DoVT5q_M.mjs";import{n as m,t as h}from"./raw-fetch-CWRDTVMr.mjs";function ee(e){return e.usage(`$0 artifacts namespaces create
2
+ import{t as e}from"./local-CQc36Viv.mjs";import{a as t,t as n}from"./context-M2Ho8pi3.mjs";import{r}from"./auth-BjxUTZWb.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-BnIv4lh5.mjs";import{t as s}from"./run-Duj1fsxa.mjs";import"./telemetry-Bn5lYtiy.mjs";import{n as c,t as l}from"./body-parser-hh2avzkz.mjs";import{n as u}from"./input-validation-Dk52b0me.mjs";import{a as d,n as f}from"./prompt-DjRAo2Up.mjs";import{t as p}from"./cli-types-DoVT5q_M.mjs";import{n as m,t as h}from"./raw-fetch-CuMHmrn0.mjs";function ee(e){return e.usage(`$0 artifacts namespaces create
3
3
 
4
4
  Creates an empty Artifacts namespace for an account.`).option(`jurisdiction`,{type:`string`,description:`The jurisdiction field`,choices:[`unrestricted`,`us`,`eu`,`fedramp`],default:`unrestricted`}).option(`namespace`,{type:`string`,description:`The namespace field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const g={command:`create`,describe:`Create a namespace`,builder:ee,handler:async f=>s({command:`artifacts namespaces create`,classification:{safeFlags:[`jurisdiction`,`dry-run`]}},f,async()=>{if(f.dryRun){a({command:`cf artifacts namespaces create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/artifacts/namespaces`,pathParams:{},bodyKind:`json`,body:f.body===void 0?l({jurisdiction:u(f.jurisdiction,`jurisdiction`,`text`),namespace:u(f.namespace,`namespace`,`text`)}):c(f.body)});return}let s=await r(f),p=f.local?e:await n();if(f.accountId=p,f.body){let e=c(f.body);i(await o(`Creating`,async()=>s.artifacts.namespaces.create({...e,account_id:p})),{successLabel:`Created`});return}f.namespace===void 0&&(f.namespace=await d(`namespace`,`The namespace field`));let m=l({jurisdiction:u(f.jurisdiction,`jurisdiction`,`text`),namespace:u(f.namespace,`namespace`,`text`)});i(await o(`Creating`,async()=>s.artifacts.namespaces.create({...m,account_id:p})),{successLabel:`Created`})})};function _(e){return e.usage(`$0 artifacts namespaces delete <namespace>
5
5
 
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-C9i1d0ma.mjs";import{a as t,t as n}from"./context-C71TA0Yp.mjs";import{r}from"./auth-CHTMVVW3.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-BlxgG8Ss.mjs";import{t as s}from"./run-l2pCxS-W.mjs";import"./telemetry-BqtdHwmi.mjs";import{t as c}from"./cli-types-DoVT5q_M.mjs";function l(e){return e.usage(`$0 audit-logs list
2
+ import{t as e}from"./local-CQc36Viv.mjs";import{a as t,t as n}from"./context-M2Ho8pi3.mjs";import{r}from"./auth-BjxUTZWb.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-BnIv4lh5.mjs";import{t as s}from"./run-Duj1fsxa.mjs";import"./telemetry-Bn5lYtiy.mjs";import{t as c}from"./cli-types-DoVT5q_M.mjs";function l(e){return e.usage(`$0 audit-logs list
3
3
 
4
4
  Gets a list of audit logs for an account. Can be filtered by who made the change, on which zone, and the timeframe of the change.`).option(`id`,{type:`string`,description:`Finds a specific log by its ID.`}).option(`export`,{type:`boolean`,description:`Indicates that this request is an export of logs in CSV format.`}).option(`action-type`,{type:`string`,description:`Filters by the action type.`}).option(`actor-ip`,{type:`string`,description:`Filters by the IP address of the request that made the change by specific IP address or valid CIDR Range.`}).option(`actor-email`,{type:`string`,description:`Filters by the email address of the actor that made the change.`}).option(`since`,{type:`string`,description:"Limits the returned results to logs newer than the specified date. A `full-date` that conforms to RFC3339."}).option(`before`,{type:`string`,description:"Limits the returned results to logs older than the specified date. A `full-date` that conforms to RFC3339."}).option(`zone-name`,{type:`string`,description:`Filters by the name of the zone associated to the change.`}).option(`direction`,{type:`string`,description:`Changes the direction of the chronological sorting.`,choices:[`desc`,`asc`]}).option(`per-page`,{type:`number`,description:`Sets the number of results to return per page.`}).option(`page`,{type:`number`,description:`Defines which page of results to return.`}).option(`hide-user-logs`,{type:`boolean`,description:`Indicates whether or not to hide user level audit logs.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const u={command:`list`,describe:`Get account audit logs`,builder:c(l),handler:async c=>s({command:`audit-logs list`,classification:{safeFlags:[`export`,`direction`,`hide-user-logs`,`dry-run`]}},c,async()=>{let s={id:c.id,export:c.export,"action.type":c[`action-type`],"actor.ip":c[`actor-ip`],"actor.email":c[`actor-email`],since:c.since,before:c.before,"zone.name":c[`zone-name`],direction:c.direction,per_page:c[`per-page`],page:c.page,hide_user_logs:c[`hide-user-logs`]};if(c.dryRun){a({command:`cf audit-logs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/audit_logs`,pathParams:{},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await n();c.accountId=u,i(await o(`Loading`,async()=>l.auditLogs.list({account_id:u,...s})),{successLabel:`Loaded`})})},d={command:`audit-logs`,describe:`audit-logs`,builder:e=>e.command(u).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{d as default};
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
- import{n as e,r as t,t as n}from"./sdk-DzVznUuv.mjs";import{G as r}from"./dist-BuCJ_55d.mjs";import{o as i}from"./chunk-FT2NMTJB-1VFYM1Ro.mjs";import{a,n as o}from"./context-C71TA0Yp.mjs";import{s}from"./oauth-J2zz9fHk.mjs";import{n as c}from"./request-headers-DmiSqfLo.mjs";const l=3e4,u=e.Default;function d(e){return e instanceof FormData||e instanceof Blob||e instanceof ArrayBuffer||ArrayBuffer.isView(e)||e instanceof ReadableStream||e instanceof URLSearchParams}function f(e){return Object.keys(e).some(e=>e.toLowerCase()===`content-type`)}async function p(e){let t=e.headers.get(`content-type`)??``;try{return t.includes(`application/json`)?await e.json():await e.text()}catch{return null}}function m(e,t,n){if(!(n==null||n===``)){if(Array.isArray(n)){for(let r of n)m(e,t,r);return}e.append(t,String(n))}}function h(e){let t=new URLSearchParams;for(let[n,r]of Object.entries(e))m(t,n,r);return t.toString()}function g(e,t,n){let r=new URL(t.endsWith(`/`)?t:`${t}/`),i=new URL(e.startsWith(`/`)?e.slice(1):e,r);if(i.origin!==r.origin)throw Error(`Refusing to send an authenticated request to ${i.origin} (expected ${r.origin})`);let a=h(n??{});return a&&(i.search=a),i.toString()}const _=new WeakMap;async function v(e,n,r,i={}){let a=g(r,_.get(e)??u,i.query),o={...i.headers},s;i.body!==void 0&&(d(i.body)||typeof i.body==`string`&&f(o)?s=i.body:(o[`Content-Type`]??=`application/json`,s=JSON.stringify(i.body)));let c;try{c=await e.fetch(a,{method:n,headers:o,body:s,signal:i.signal},{timeoutInSeconds:i.timeout?i.timeout/1e3:void 0,abortSignal:i.signal})}catch(e){throw i.signal?.aborted?Error(`Request aborted`):e instanceof Error&&e.name===`AbortError`?Error(`Request timed out after ${i.timeout??3e4}ms`):e instanceof Error?Error(`Request failed: ${e.message}`):e}if(!c.ok)throw new t({statusCode:c.status,body:await p(c),rawResponse:{status:c.status,statusText:c.statusText,url:c.url||a,headers:c.headers,redirected:c.redirected,type:c.type}});if(c.status===204)return null;let l=c.headers.get(`content-type`)??``;if(!l.includes(`application/json`)&&i.preserveNonJsonBytes)return Buffer.from(await c.arrayBuffer());let m=await c.text();if(m===``)return null;if(!l.includes(`application/json`))return m;let h=JSON.parse(m);if(h.success===!1)throw new t({message:`API error: ${h.errors?.map(e=>e.message).filter(Boolean).join(`, `)||`unknown error`}`,statusCode:c.status,body:h});return`result`in h?h.result:h}function y(e){let t=e.baseURL??u,r=new n({baseUrl:t,auth:async()=>({headers:{Authorization:`Bearer ${e.apiToken}`}}),headers:e.defaultHeaders,timeoutInSeconds:(e.timeout??3e4)/1e3,maxRetries:0,fetch:e.fetch??globalThis.fetch});return _.set(r,t),r}async function b(){let e=i({allowGlobalAuthKey:!1});if(e&&`apiToken`in e)return e.apiToken;let t=await s();if(t)return t;throw Error(`No authentication token found.
2
+ import{n as e,r as t,t as n}from"./sdk-DzVznUuv.mjs";import{G as r}from"./dist-BuCJ_55d.mjs";import{o as i}from"./chunk-FT2NMTJB-1VFYM1Ro.mjs";import{a,n as o}from"./context-M2Ho8pi3.mjs";import{s}from"./oauth-D6EZEBcY.mjs";import{n as c}from"./request-headers-DaUqNccK.mjs";const l=3e4,u=e.Default;function d(e){return e instanceof FormData||e instanceof Blob||e instanceof ArrayBuffer||ArrayBuffer.isView(e)||e instanceof ReadableStream||e instanceof URLSearchParams}function f(e){return Object.keys(e).some(e=>e.toLowerCase()===`content-type`)}async function p(e){let t=e.headers.get(`content-type`)??``;try{return t.includes(`application/json`)?await e.json():await e.text()}catch{return null}}function m(e,t,n){if(!(n==null||n===``)){if(Array.isArray(n)){for(let r of n)m(e,t,r);return}e.append(t,String(n))}}function h(e){let t=new URLSearchParams;for(let[n,r]of Object.entries(e))m(t,n,r);return t.toString()}function g(e,t,n){let r=new URL(t.endsWith(`/`)?t:`${t}/`),i=new URL(e.startsWith(`/`)?e.slice(1):e,r);if(i.origin!==r.origin)throw Error(`Refusing to send an authenticated request to ${i.origin} (expected ${r.origin})`);let a=h(n??{});return a&&(i.search=a),i.toString()}const _=new WeakMap;async function v(e,n,r,i={}){let a=g(r,_.get(e)??u,i.query),o={...i.headers},s;i.body!==void 0&&(d(i.body)||typeof i.body==`string`&&f(o)?s=i.body:(o[`Content-Type`]??=`application/json`,s=JSON.stringify(i.body)));let c;try{c=await e.fetch(a,{method:n,headers:o,body:s,signal:i.signal},{timeoutInSeconds:i.timeout?i.timeout/1e3:void 0,abortSignal:i.signal})}catch(e){throw i.signal?.aborted?Error(`Request aborted`):e instanceof Error&&e.name===`AbortError`?Error(`Request timed out after ${i.timeout??3e4}ms`):e instanceof Error?Error(`Request failed: ${e.message}`):e}if(!c.ok)throw new t({statusCode:c.status,body:await p(c),rawResponse:{status:c.status,statusText:c.statusText,url:c.url||a,headers:c.headers,redirected:c.redirected,type:c.type}});if(c.status===204)return null;let l=c.headers.get(`content-type`)??``;if(!l.includes(`application/json`)&&i.preserveNonJsonBytes)return Buffer.from(await c.arrayBuffer());let m=await c.text();if(m===``)return null;if(!l.includes(`application/json`))return m;let h=JSON.parse(m);if(h.success===!1)throw new t({message:`API error: ${h.errors?.map(e=>e.message).filter(Boolean).join(`, `)||`unknown error`}`,statusCode:c.status,body:h});return`result`in h?h.result:h}function y(e){let t=e.baseURL??u,r=new n({baseUrl:t,auth:async()=>({headers:{Authorization:`Bearer ${e.apiToken}`}}),headers:e.defaultHeaders,timeoutInSeconds:(e.timeout??3e4)/1e3,maxRetries:0,fetch:e.fetch??globalThis.fetch});return _.set(r,t),r}async function b(){let e=i({allowGlobalAuthKey:!1});if(e&&`apiToken`in e)return e.apiToken;let t=await s();if(t)return t;throw Error(`No authentication token found.
3
3
 
4
4
  Please set one of the following:
5
5
  1. Set the CLOUDFLARE_API_TOKEN environment variable
6
6
  2. Run 'cf auth login' to authenticate via OAuth
7
7
 
8
- For API tokens, visit: https://dash.cloudflare.com/profile/api-tokens`)}async function x(e){let t=await a();if(t)return t;try{let t=await b(),n=r({compliance_region:await o()}),i=e-Date.now();if(i<=0)return;let a=y({apiToken:t,baseURL:n,defaultHeaders:c()}),s={timeoutInSeconds:i/1e3,maxRetries:0},[l,u]=await Promise.allSettled([a.accounts.list({per_page:50},s),a.user.memberships.list({per_page:50},s)]);if(l.status===`rejected`)return;let d=l.value;if((d.result_info?.total_count??d.result.length)>d.result.length)return;let f=d.result;if(u.status===`fulfilled`){let e=u.value.result??[];if((u.value.result_info?.total_count??e.length)>e.length)return;let t=new Set(e.map(e=>e.account?.id).filter(e=>e!==void 0));f=f.filter(e=>t.has(e.id))}return f.length===1?f[0]?.id:void 0}catch{return}}async function S(e){let t=r({compliance_region:await o()});if(e.local){let{createLocalFetch:n}=await import(`./local-j2uOZ8Uq.mjs`);return y({apiToken:`cf-local-mode-no-auth`,baseURL:t,defaultHeaders:c(),fetch:n({persistTo:e.persistTo,apiBaseUrl:t})})}return y({apiToken:await b(),baseURL:t,defaultHeaders:c()})}export{v as a,b as i,y as n,x as o,S as r,l as t};
8
+ For API tokens, visit: https://dash.cloudflare.com/profile/api-tokens`)}async function x(e){let t=await a();if(t)return t;try{let t=await b(),n=r({compliance_region:await o()}),i=e-Date.now();if(i<=0)return;let a=y({apiToken:t,baseURL:n,defaultHeaders:c()}),s={timeoutInSeconds:i/1e3,maxRetries:0},[l,u]=await Promise.allSettled([a.accounts.list({per_page:50},s),a.user.memberships.list({per_page:50},s)]);if(l.status===`rejected`)return;let d=l.value;if((d.result_info?.total_count??d.result.length)>d.result.length)return;let f=d.result;if(u.status===`fulfilled`){let e=u.value.result??[];if((u.value.result_info?.total_count??e.length)>e.length)return;let t=new Set(e.map(e=>e.account?.id).filter(e=>e!==void 0));f=f.filter(e=>t.has(e.id))}return f.length===1?f[0]?.id:void 0}catch{return}}async function S(e){let t=r({compliance_region:await o()});if(e.local){let{createLocalFetch:n}=await import(`./local-B5d4OPhA.mjs`);return y({apiToken:`cf-local-mode-no-auth`,baseURL:t,defaultHeaders:c(),fetch:n({persistTo:e.persistTo,apiBaseUrl:t})})}return y({apiToken:await b(),baseURL:t,defaultHeaders:c()})}export{v as a,b as i,y as n,x as o,S as r,l as t};
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{r as e}from"./theme-BIWQFmZ0.mjs";import{a as t,n,r}from"./banner-ClclgnBn.mjs";import"./ui-BQxRjahW.mjs";import{c as i,d as a,i as o,p as s,r as c,t as l,u}from"./oauth-J2zz9fHk.mjs";import{i as d,n as f}from"./auth-CHTMVVW3.mjs";import{t as p}from"./output-CvQFJkvi.mjs";import{n as m}from"./run-l2pCxS-W.mjs";import"./telemetry-BqtdHwmi.mjs";import{a as h,c as g,i as _,n as v,o as y,r as b,s as x,t as S}from"./login-CHjklzf2.mjs";const C={command:`logout`,describe:`Log out and remove stored credentials`,handler:async a=>{_(a,`logout`,"Run `cf auth delete <name>` to remove a named profile.");let l=c();l!==`default`&&console.log(t(`This directory has profile "${l}" active. \`cf auth logout\` removes the default profile's token, not "${l}".\nTo delete "${l}", run \`cf auth delete ${l}\`.`)),s(`default`);let d=i(),f=!!process.env.CLOUDFLARE_API_TOKEN;if(!d){f?(console.log(r(`No cf OAuth credentials found, but CLOUDFLARE_API_TOKEN environment variable is set.`)),console.log(r(`Unset it with: unset CLOUDFLARE_API_TOKEN`))):(console.log(r(`You are not currently logged in.`)),console.log(n(`Run ${e.code(`cf auth login`)} to authenticate.`)));return}console.log(r(`Logging out...`)),await u(`default`),console.log(`${e.info(`Removed:`)} OAuth tokens from ${e.muted(o())}`),f&&(console.log(``),console.log(t(`CLOUDFLARE_API_TOKEN environment variable is still set.`)),console.log(r(`You will remain authenticated via the env var. Unset it with: unset CLOUDFLARE_API_TOKEN`)))}},w={command:`whoami`,describe:`Show current user and authentication status`,builder:e=>e,handler:async e=>{let t=process.env.CLOUDFLARE_API_TOKEN,n=a(),r;r=t?`CLOUDFLARE_API_TOKEN environment variable`:n?.oauth_token?`OAuth token from ${o()}`:`none`;let i;try{i=await d()}catch{p({authenticated:!1,error:`Not logged in`});return}let s=f({apiToken:i}),c,u=[],[m,h]=await Promise.allSettled([s.user.get(),l()]);if(m.status===`fulfilled`){let e=m.value;e&&`email`in e&&typeof e.email==`string`&&(c=e.email)}else process.env.DEBUG&&console.error(`User lookup error:`,m.reason);h.status===`fulfilled`?u=h.value:process.env.DEBUG&&console.error(`Account lookup error:`,h.reason);let g=m.status===`fulfilled`||h.status===`fulfilled`,_={authenticated:!0,authSource:r,tokenValid:g,...c&&{email:c},accounts:u};n?.oauth_token&&(_.scopes=n.scopes,_.expiresAt=n.expiration_time),p(_)}},T={command:`auth`,describe:`Manage authentication and profiles`,builder:e=>e.command(m(S,{command:`auth login`,classification:v})).command(E(C,`auth logout`)).command(E(w,`auth whoami`)).command(E(h,`auth create`,[`browser`,`device`])).command(E(x,`auth delete`)).command(E(b,`auth activate`)).command(E(y,`auth deactivate`)).command(E(g,`auth list`)).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function E(e,t,n=[],r){return m(e,{command:t,classification:{safeFlags:n,shortFlagAliases:r}})}export{T as default};
2
+ import{r as e}from"./theme-BIWQFmZ0.mjs";import{a as t,n,r}from"./banner-ClclgnBn.mjs";import"./ui-BQxRjahW.mjs";import{c as i,d as a,i as o,p as s,r as c,t as l,u}from"./oauth-D6EZEBcY.mjs";import{i as d,n as f}from"./auth-BjxUTZWb.mjs";import{t as p}from"./output-CvQFJkvi.mjs";import{n as m}from"./run-Duj1fsxa.mjs";import"./telemetry-Bn5lYtiy.mjs";import{a as h,c as g,i as _,n as v,o as y,r as b,s as x,t as S}from"./login-DFZ3DEjI.mjs";const C={command:`logout`,describe:`Log out and remove stored credentials`,handler:async a=>{_(a,`logout`,"Run `cf auth delete <name>` to remove a named profile.");let l=c();l!==`default`&&console.log(t(`This directory has profile "${l}" active. \`cf auth logout\` removes the default profile's token, not "${l}".\nTo delete "${l}", run \`cf auth delete ${l}\`.`)),s(`default`);let d=i(),f=!!process.env.CLOUDFLARE_API_TOKEN;if(!d){f?(console.log(r(`No cf OAuth credentials found, but CLOUDFLARE_API_TOKEN environment variable is set.`)),console.log(r(`Unset it with: unset CLOUDFLARE_API_TOKEN`))):(console.log(r(`You are not currently logged in.`)),console.log(n(`Run ${e.code(`cf auth login`)} to authenticate.`)));return}console.log(r(`Logging out...`)),await u(`default`),console.log(`${e.info(`Removed:`)} OAuth tokens from ${e.muted(o())}`),f&&(console.log(``),console.log(t(`CLOUDFLARE_API_TOKEN environment variable is still set.`)),console.log(r(`You will remain authenticated via the env var. Unset it with: unset CLOUDFLARE_API_TOKEN`)))}},w={command:`whoami`,describe:`Show current user and authentication status`,builder:e=>e,handler:async e=>{let t=process.env.CLOUDFLARE_API_TOKEN,n=a(),r;r=t?`CLOUDFLARE_API_TOKEN environment variable`:n?.oauth_token?`OAuth token from ${o()}`:`none`;let i;try{i=await d()}catch{p({authenticated:!1,error:`Not logged in`});return}let s=f({apiToken:i}),c,u=[],[m,h]=await Promise.allSettled([s.user.get(),l()]);if(m.status===`fulfilled`){let e=m.value;e&&`email`in e&&typeof e.email==`string`&&(c=e.email)}else process.env.DEBUG&&console.error(`User lookup error:`,m.reason);h.status===`fulfilled`?u=h.value:process.env.DEBUG&&console.error(`Account lookup error:`,h.reason);let g=m.status===`fulfilled`||h.status===`fulfilled`,_={authenticated:!0,authSource:r,tokenValid:g,...c&&{email:c},accounts:u};n?.oauth_token&&(_.scopes=n.scopes,_.expiresAt=n.expiration_time),p(_)}},T={command:`auth`,describe:`Manage authentication and profiles`,builder:e=>e.command(m(S,{command:`auth login`,classification:v})).command(E(C,`auth logout`)).command(E(w,`auth whoami`)).command(E(h,`auth create`,[`browser`,`device`])).command(E(x,`auth delete`)).command(E(b,`auth activate`)).command(E(y,`auth deactivate`)).command(E(g,`auth list`)).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function E(e,t,n=[],r){return m(e,{command:t,classification:{safeFlags:n,shortFlagAliases:r}})}export{T as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-C9i1d0ma.mjs";import{a as t,t as n}from"./context-C71TA0Yp.mjs";import{r}from"./auth-CHTMVVW3.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-BlxgG8Ss.mjs";import{t as s}from"./run-l2pCxS-W.mjs";import"./telemetry-BqtdHwmi.mjs";import{n as c,t as l}from"./body-parser-hh2avzkz.mjs";import{n as u}from"./input-validation-Dk52b0me.mjs";import{a as d,n as f}from"./prompt-ClEoR47s.mjs";import{t as p}from"./cli-types-DoVT5q_M.mjs";function m(e){return e.usage(`$0 basin-catalog credentials create <bucket-name>
2
+ import{t as e}from"./local-CQc36Viv.mjs";import{a as t,t as n}from"./context-M2Ho8pi3.mjs";import{r}from"./auth-BjxUTZWb.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-BnIv4lh5.mjs";import{t as s}from"./run-Duj1fsxa.mjs";import"./telemetry-Bn5lYtiy.mjs";import{n as c,t as l}from"./body-parser-hh2avzkz.mjs";import{n as u}from"./input-validation-Dk52b0me.mjs";import{a as d,n as f}from"./prompt-DjRAo2Up.mjs";import{t as p}from"./cli-types-DoVT5q_M.mjs";function m(e){return e.usage(`$0 basin-catalog credentials create <bucket-name>
3
3
 
4
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 h={command:`create <bucket-name>`,describe:`Store catalog credentials`,builder:m,handler:async f=>s({command:`basin-catalog credentials create`,classification:{safeFlags:[`dry-run`]}},f,async()=>{if(f.dryRun){a({command:`cf basin-catalog credentials create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/basin-catalog/${f[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(f[`bucket-name`]))}/credential`,pathParams:{"bucket-name":String(f[`bucket-name`]??``)},bodyKind:`json`,body:f.body===void 0?l({token:u(f.token,`token`,`text`)}):c(f.body)});return}let s=await r(f),p=f.local?e:await n();if(f.accountId=p,f.body){let e=c(f.body);i(await o(`Creating`,async()=>s.basinCatalog.credentials.create({body:e,account_id:p,bucket_name:f[`bucket-name`]})),{successLabel:`Created`});return}f.token===void 0&&(f.token=await d(`token`,`Provides the Cloudflare API token for accessing R2.`));let m=l({token:u(f.token,`token`,`text`)});i(await o(`Creating`,async()=>s.basinCatalog.credentials.create({body:m,account_id:p,bucket_name:f[`bucket-name`]})),{successLabel:`Created`})})};function g(e){return e.usage(`$0 basin-catalog credentials status <bucket-name>
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-C9i1d0ma.mjs";import{a as t,t as n}from"./context-C71TA0Yp.mjs";import{r}from"./auth-CHTMVVW3.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-BlxgG8Ss.mjs";import{t as s}from"./run-l2pCxS-W.mjs";import"./telemetry-BqtdHwmi.mjs";import{n as c,r as l,t as u}from"./body-parser-hh2avzkz.mjs";import{n as d}from"./input-validation-Dk52b0me.mjs";import{n as f}from"./prompt-ClEoR47s.mjs";function p(e){return e.usage(`$0 billing addresses validate
2
+ import{t as e}from"./local-CQc36Viv.mjs";import{a as t,t as n}from"./context-M2Ho8pi3.mjs";import{r}from"./auth-BjxUTZWb.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-BnIv4lh5.mjs";import{t as s}from"./run-Duj1fsxa.mjs";import"./telemetry-Bn5lYtiy.mjs";import{n as c,r as l,t as u}from"./body-parser-hh2avzkz.mjs";import{n as d}from"./input-validation-Dk52b0me.mjs";import{n as f}from"./prompt-DjRAo2Up.mjs";function p(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 m={command:`validate`,describe:`Validate Billing Address`,builder:p,handler:async e=>s({command:`billing addresses validate`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({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?u({address:d(e.address,`address`,`text`),address2:d(e.address2,`address2`,`text`),city:d(e.city,`city`,`text`),country:d(e.country,`country`,`text`),state:d(e.state,`state`,`text`),zipcode:d(e.zipcode,`zipcode`,`text`)}):c(e.body)});return}let t=await r(e);if(e.body){let n=c(e.body);i(await o(`Creating`,async()=>t.billing.addresses.validate({...n})),{successLabel:`Created`});return}let n=u({address:d(e.address,`address`,`text`),address2:d(e.address2,`address2`,`text`),city:d(e.city,`city`,`text`),country:d(e.country,`country`,`text`),state:d(e.state,`state`,`text`),zipcode:d(e.zipcode,`zipcode`,`text`)});i(await o(`Creating`,async()=>t.billing.addresses.validate({...n})),{successLabel:`Created`})})},h={command:`addresses`,describe:`Operations for addresses`,builder:e=>e.command(m).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function g(e){return e.usage(`$0 billing profiles create
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{i as e}from"./context-C71TA0Yp.mjs";import{r as t}from"./auth-CHTMVVW3.mjs";import{t as n}from"./output-CvQFJkvi.mjs";import{t as r}from"./dry-run-Bq0JAsbX.mjs";import{t as i}from"./progress-BlxgG8Ss.mjs";import{t as a}from"./run-l2pCxS-W.mjs";import"./telemetry-BqtdHwmi.mjs";import{n as o,t as s}from"./body-parser-hh2avzkz.mjs";import{n as c}from"./input-validation-Dk52b0me.mjs";import{a as l,i as u}from"./prompt-ClEoR47s.mjs";function d(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(`subtype`,{type:`string`,description:`The subtype field`}).option(`type`,{type:`string`,description:`Type of feedback report.`,choices:[`false_positive`,`false_negative`]}).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 f={command:`create`,describe:`Submit a feedback report`,builder:d,handler:async d=>a({command:`bot-management feedback create`,classification:{safeFlags:[`type`,`dry-run`]}},d,async()=>{if(d.dryRun){r({command:`cf bot-management feedback create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${d.zone??d.zoneId??`<zone>`}/bot_management/feedback`,pathParams:{"zone-id":String(d.zone??d[`zone-id`]??``)},bodyKind:`json`,body:d.body===void 0?s({description:c(d.description,`description`,`text`),expression:c(d.expression,`expression`,`text`),first_request_seen_at:c(d[`first-request-seen-at`],`first-request-seen-at`,`text`),last_request_seen_at:c(d[`last-request-seen-at`],`last-request-seen-at`,`text`),requests:d.requests,subtype:c(d.subtype,`subtype`,`text`),type:c(d.type,`type`,`text`)}):o(d.body)});return}let a=await t(d),f=await e({zone:d.zone},a,{quiet:d.quiet});if(d.zoneId=f,d.body){let e=o(d.body);n(await i(`Creating`,async()=>a.botManagement.feedback.create({body:e,zone_id:f})),{successLabel:`Created`});return}if(d.description===void 0&&(d.description=await l(`description`,`The description field`)),d.expression===void 0&&(d.expression=await l(`expression`,`Wirefilter expression describing the traffic being reported.`)),d[`first-request-seen-at`]===void 0&&(d[`first-request-seen-at`]=await l(`first-request-seen-at`,`The first_request_seen_at field`)),d[`last-request-seen-at`]===void 0&&(d[`last-request-seen-at`]=await l(`last-request-seen-at`,`The last_request_seen_at field`)),d.requests===void 0)throw Error(`--requests is required (or pass --body with this field set).`);d.type===void 0&&(d.type=await u(`type`,`Type of feedback report.`,[`false_positive`,`false_negative`]));let p=s({description:c(d.description,`description`,`text`),expression:c(d.expression,`expression`,`text`),first_request_seen_at:c(d[`first-request-seen-at`],`first-request-seen-at`,`text`),last_request_seen_at:c(d[`last-request-seen-at`],`last-request-seen-at`,`text`),requests:d.requests,subtype:c(d.subtype,`subtype`,`text`),type:c(d.type,`type`,`text`)});n(await i(`Creating`,async()=>a.botManagement.feedback.create({body:p,zone_id:f})),{successLabel:`Created`})})};function p(e){return e.usage(`$0 bot-management feedback list
2
+ import{i as e}from"./context-M2Ho8pi3.mjs";import{r as t}from"./auth-BjxUTZWb.mjs";import{t as n}from"./output-CvQFJkvi.mjs";import{t as r}from"./dry-run-Bq0JAsbX.mjs";import{t as i}from"./progress-BnIv4lh5.mjs";import{t as a}from"./run-Duj1fsxa.mjs";import"./telemetry-Bn5lYtiy.mjs";import{n as o,t as s}from"./body-parser-hh2avzkz.mjs";import{n as c}from"./input-validation-Dk52b0me.mjs";import{a as l,i as u}from"./prompt-DjRAo2Up.mjs";function d(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(`subtype`,{type:`string`,description:`The subtype field`}).option(`type`,{type:`string`,description:`Type of feedback report.`,choices:[`false_positive`,`false_negative`]}).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 f={command:`create`,describe:`Submit a feedback report`,builder:d,handler:async d=>a({command:`bot-management feedback create`,classification:{safeFlags:[`type`,`dry-run`]}},d,async()=>{if(d.dryRun){r({command:`cf bot-management feedback create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${d.zone??d.zoneId??`<zone>`}/bot_management/feedback`,pathParams:{"zone-id":String(d.zone??d[`zone-id`]??``)},bodyKind:`json`,body:d.body===void 0?s({description:c(d.description,`description`,`text`),expression:c(d.expression,`expression`,`text`),first_request_seen_at:c(d[`first-request-seen-at`],`first-request-seen-at`,`text`),last_request_seen_at:c(d[`last-request-seen-at`],`last-request-seen-at`,`text`),requests:d.requests,subtype:c(d.subtype,`subtype`,`text`),type:c(d.type,`type`,`text`)}):o(d.body)});return}let a=await t(d),f=await e({zone:d.zone},a,{quiet:d.quiet});if(d.zoneId=f,d.body){let e=o(d.body);n(await i(`Creating`,async()=>a.botManagement.feedback.create({body:e,zone_id:f})),{successLabel:`Created`});return}if(d.description===void 0&&(d.description=await l(`description`,`The description field`)),d.expression===void 0&&(d.expression=await l(`expression`,`Wirefilter expression describing the traffic being reported.`)),d[`first-request-seen-at`]===void 0&&(d[`first-request-seen-at`]=await l(`first-request-seen-at`,`The first_request_seen_at field`)),d[`last-request-seen-at`]===void 0&&(d[`last-request-seen-at`]=await l(`last-request-seen-at`,`The last_request_seen_at field`)),d.requests===void 0)throw Error(`--requests is required (or pass --body with this field set).`);d.type===void 0&&(d.type=await u(`type`,`Type of feedback report.`,[`false_positive`,`false_negative`]));let p=s({description:c(d.description,`description`,`text`),expression:c(d.expression,`expression`,`text`),first_request_seen_at:c(d[`first-request-seen-at`],`first-request-seen-at`,`text`),last_request_seen_at:c(d[`last-request-seen-at`],`last-request-seen-at`,`text`),requests:d.requests,subtype:c(d.subtype,`subtype`,`text`),type:c(d.type,`type`,`text`)});n(await i(`Creating`,async()=>a.botManagement.feedback.create({body:p,zone_id:f})),{successLabel:`Created`})})};function p(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 m={command:`list`,describe:`List zone feedback reports`,builder:p,handler:async o=>a({command:`bot-management feedback list`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf bot-management feedback list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/bot_management/feedback`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s,n(await i(`Loading`,async()=>a.botManagement.feedback.list({zone_id:s})),{successLabel:`Loaded`})})},h={command:`feedback`,describe:`Operations for feedback`,builder:e=>e.command(f).command(m).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function g(e){return e.usage(`$0 bot-management get
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-C9i1d0ma.mjs";import{a as t,t as n}from"./context-C71TA0Yp.mjs";import{r}from"./auth-CHTMVVW3.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-BlxgG8Ss.mjs";import{t as s}from"./run-l2pCxS-W.mjs";import"./telemetry-BqtdHwmi.mjs";import{n as c}from"./prompt-ClEoR47s.mjs";function l(e){return e.usage(`$0 botnet-feed asn day-report <asn-id>
2
+ import{t as e}from"./local-CQc36Viv.mjs";import{a as t,t as n}from"./context-M2Ho8pi3.mjs";import{r}from"./auth-BjxUTZWb.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-BnIv4lh5.mjs";import{t as s}from"./run-Duj1fsxa.mjs";import"./telemetry-Bn5lYtiy.mjs";import{n as c}from"./prompt-DjRAo2Up.mjs";function l(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 u={command:`day-report <asn-id>`,describe:`Get daily report`,builder:l,handler:async c=>s({command:`botnet-feed asn day-report`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={date:c.date};if(c.dryRun){a({command:`cf botnet-feed asn day-report`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/botnet_feed/asn/${c[`asn-id`]==null?`<asn-id>`:encodeURIComponent(String(c[`asn-id`]))}/day_report`,pathParams:{"asn-id":String(c[`asn-id`]??``)},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await n();c.accountId=u,i(await o(`Loading`,async()=>l.botnetFeed.asn.dayReport({account_id:u,asn_id:c[`asn-id`],...s})),{successLabel:`Loaded`})})};function d(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{t as e}from"./local-C9i1d0ma.mjs";import{a as t,t as n}from"./context-C71TA0Yp.mjs";import{r}from"./auth-CHTMVVW3.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-BlxgG8Ss.mjs";import{t as s}from"./run-l2pCxS-W.mjs";import"./telemetry-BqtdHwmi.mjs";import{n as c,r as l,t as u}from"./body-parser-hh2avzkz.mjs";import{n as d}from"./input-validation-Dk52b0me.mjs";import{a as f,i as p,n as m}from"./prompt-ClEoR47s.mjs";import{t as h}from"./cli-types-DoVT5q_M.mjs";function g(e){return e.usage(`$0 brand-protection logo-matches get
2
+ import{t as e}from"./local-CQc36Viv.mjs";import{a as t,t as n}from"./context-M2Ho8pi3.mjs";import{r}from"./auth-BjxUTZWb.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-BnIv4lh5.mjs";import{t as s}from"./run-Duj1fsxa.mjs";import"./telemetry-Bn5lYtiy.mjs";import{n as c,r as l,t as u}from"./body-parser-hh2avzkz.mjs";import{n as d}from"./input-validation-Dk52b0me.mjs";import{a as f,i as p,n as m}from"./prompt-DjRAo2Up.mjs";import{t as h}from"./cli-types-DoVT5q_M.mjs";function g(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 _={command:`get`,describe:`List logo matches`,builder:h(g),handler:async c=>s({command:`brand-protection logo-matches get`,classification:{safeFlags:[`order-by`,`order`,`dry-run`]}},c,async()=>{let s={offset:c.offset,limit:c.limit,query_id:c[`query-id`],download:c.download,orderBy:c[`order-by`],order:c.order};if(c.dryRun){a({command:`cf brand-protection logo-matches get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/cloudforce-one/v2/brand-protection/logo/matches`,pathParams:{},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await n();c.accountId=u,i(await o(`Loading`,async()=>l.brandProtection.logoMatches.get({account_id:u,...s})),{successLabel:`Loaded`})})},v={command:`logo-matches`,describe:`Operations for logo-matches`,builder:e=>e.command(_).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function y(e){return e.usage(`$0 brand-protection logos create
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-C9i1d0ma.mjs";import{a as t,t as n}from"./context-C71TA0Yp.mjs";import{a as r,r as i}from"./auth-CHTMVVW3.mjs";import{t as a}from"./output-CvQFJkvi.mjs";import{t as o}from"./dry-run-Bq0JAsbX.mjs";import{t as s}from"./progress-BlxgG8Ss.mjs";import{t as c}from"./run-l2pCxS-W.mjs";import"./telemetry-BqtdHwmi.mjs";import{i as l,n as u,r as d,t as f}from"./body-parser-hh2avzkz.mjs";import{n as p}from"./input-validation-Dk52b0me.mjs";import{n as m}from"./prompt-ClEoR47s.mjs";import{t as h}from"./cli-types-DoVT5q_M.mjs";import{n as g,t as _}from"./raw-fetch-CWRDTVMr.mjs";function v(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 ee={command:`create`,describe:`Crawl websites.`,builder:v,handler:async l=>c({command:`browser-run crawl create`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={cacheTTL:l[`cache-ttl`]};if(l.dryRun){o({command:`cf browser-run crawl create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/browser-rendering/crawl`,pathParams:{},query:c,bodyKind:`json`,body:l.body===void 0?void 0:u(l.body)});return}let d=await i(l),f=l.local?e:await n();if(l.accountId=f,l.body){let e=u(l.body);new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),a(await s(`Creating`,async()=>d.browserRun.crawl.create({body:e,account_id:f,...c})),{successLabel:`Created`});return}a(await s(`Creating`,async()=>r(d,`POST`,`/accounts/${f}/browser-rendering/crawl`,{query:c})),{successLabel:`Created`})})};function te(e){return e.usage(`$0 browser-run crawl delete <job-id>
2
+ import{t as e}from"./local-CQc36Viv.mjs";import{a as t,t as n}from"./context-M2Ho8pi3.mjs";import{a as r,r as i}from"./auth-BjxUTZWb.mjs";import{t as a}from"./output-CvQFJkvi.mjs";import{t as o}from"./dry-run-Bq0JAsbX.mjs";import{t as s}from"./progress-BnIv4lh5.mjs";import{t as c}from"./run-Duj1fsxa.mjs";import"./telemetry-Bn5lYtiy.mjs";import{i as l,n as u,r as d,t as f}from"./body-parser-hh2avzkz.mjs";import{n as p}from"./input-validation-Dk52b0me.mjs";import{n as m}from"./prompt-DjRAo2Up.mjs";import{t as h}from"./cli-types-DoVT5q_M.mjs";import{n as g,t as _}from"./raw-fetch-CuMHmrn0.mjs";function v(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 ee={command:`create`,describe:`Crawl websites.`,builder:v,handler:async l=>c({command:`browser-run crawl create`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={cacheTTL:l[`cache-ttl`]};if(l.dryRun){o({command:`cf browser-run crawl create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/browser-rendering/crawl`,pathParams:{},query:c,bodyKind:`json`,body:l.body===void 0?void 0:u(l.body)});return}let d=await i(l),f=l.local?e:await n();if(l.accountId=f,l.body){let e=u(l.body);new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),a(await s(`Creating`,async()=>d.browserRun.crawl.create({body:e,account_id:f,...c})),{successLabel:`Created`});return}a(await s(`Creating`,async()=>r(d,`POST`,`/accounts/${f}/browser-rendering/crawl`,{query:c})),{successLabel:`Created`})})};function te(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 y={command:`delete <job-id>`,describe:`Cancel a crawl job.`,builder:te,handler:async r=>c({command:`browser-run crawl delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf browser-run crawl delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/browser-rendering/crawl/${r[`job-id`]==null?`<job-id>`:encodeURIComponent(String(r[`job-id`]))}`,pathParams:{"job-id":String(r[`job-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,!await m({force:!!r.force})){process.stderr.write(`Aborted.
5
5
  `);return}a(await s(`Deleting`,async()=>c.browserRun.crawl.delete({account_id:l,job_id:r[`job-id`]})),{successLabel:`Deleted`})})};function b(e){return e.usage(`$0 browser-run crawl get <job-id>
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{r as e}from"./theme-BIWQFmZ0.mjs";import{t}from"./cli-exit-Dqoo6Jgb.mjs";import{M as n}from"./dist-BuCJ_55d.mjs";import"./ui-BQxRjahW.mjs";import{n as r}from"./dist-DW47TUGh.mjs";import{i,r as a}from"./autoconfig-DXXV-Xyz.mjs";import{n as o,t as s}from"./spawn-BSnyZB0W.mjs";import c from"node:path";import{readBuildOutput as l}from"@cloudflare/build-output-utils";import{convertToWranglerConfig as u}from"@cloudflare/config";var d=class extends Error{constructor(e){super(e),this.name=`BuildOutputConfigError`}};function f(e,t){if(e!==void 0){if(t===void 0)throw new d(`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 d(`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.`)}}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 d(`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 d(`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,s=u({...i,worker:o,containers:[]});n.manifest?.mainModule&&e.bundleDir&&(s.main=c.join(e.bundleDir,n.manifest.mainModule));let l=c.resolve(`cloudflare.config.ts`),{validationConfig:d,containerReferences:f}=_(s),p=g(d,e.configPath,l);v(p,f);let{containers:m,...h}=p;return{wranglerConfig:h,builtConfig:n}}function g(e,t,r){let{config:i,diagnostics:a}=n(e,t,r,{});if(a.hasErrors())throw new d(a.renderErrors());return a.hasWarnings()&&console.warn(a.renderWarnings()),i}function _(e){let{containers:t,...n}=e,r=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(n,{worker:c,...u}={},d={}){let f=u.output??`stdout`,p=process.cwd(),{details:g,configuration:_}=await a(p,u),v=_?.buildCommand??g?.buildCommand,y={...g?.env,...d.isPreview?{CLOUDFLARE_PREVIEW_BUILD:`true`}:{}};if(v&&n&&!g?.framework?.supportsMode)throw Error(`The detected command \`${v}\` does not currently support \`--mode\`.`);f!==`silent`&&r.message(e.bold(`Build`),{symbol:e.muted(`├`),spacing:0,output:f===`stderr`?process.stderr:void 0});let b=n?[`--mode`,n]:[],S;if(v)S=await i(v,p,{...u,env:y,args:b});else{let e=o(p);f!==`silent`&&r.message(`Delegating to ${x(e)}`,{spacing:0,output:f===`stderr`?process.stderr:void 0}),S=await s(e,`build`,b,{...u,env:y})}if(S.exitCode!==0||S.signal)throw new t(S.exitCode,{signal:S.signal});let{workers:C,rootConfig:w}=await l(p);h(m(C,c),w),f!==`silent`&&r.success(`Build complete`,{spacing:0,output:f===`stderr`?process.stderr:void 0})}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,h as i,b as n,f as o,p as r,d as s,S as t};
2
+ import{r as e}from"./theme-BIWQFmZ0.mjs";import{t}from"./cli-exit-Dqoo6Jgb.mjs";import{M as n}from"./dist-BuCJ_55d.mjs";import"./ui-BQxRjahW.mjs";import{n as r}from"./dist-DW47TUGh.mjs";import{i,r as a}from"./autoconfig-DXXV-Xyz.mjs";import{n as o,t as s}from"./spawn-DiZTRMi2.mjs";import c from"node:path";import{readBuildOutput as l}from"@cloudflare/build-output-utils";import{convertToWranglerConfig as u}from"@cloudflare/config";var d=class extends Error{constructor(e){super(e),this.name=`BuildOutputConfigError`}};function f(e,t){if(e!==void 0){if(t===void 0)throw new d(`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 d(`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.`)}}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 d(`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 d(`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,s=u({...i,worker:o,containers:[]});n.manifest?.mainModule&&e.bundleDir&&(s.main=c.join(e.bundleDir,n.manifest.mainModule));let l=c.resolve(`cloudflare.config.ts`),{validationConfig:d,containerReferences:f}=_(s),p=g(d,e.configPath,l);v(p,f);let{containers:m,...h}=p;return{wranglerConfig:h,builtConfig:n}}function g(e,t,r){let{config:i,diagnostics:a}=n(e,t,r,{});if(a.hasErrors())throw new d(a.renderErrors());return a.hasWarnings()&&console.warn(a.renderWarnings()),i}function _(e){let{containers:t,...n}=e,r=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(n,{worker:c,...u}={},d={}){let f=u.output??`stdout`,p=process.cwd(),{details:g,configuration:_}=await a(p,u),v=_?.buildCommand??g?.buildCommand,y={...g?.env,...d.isPreview?{CLOUDFLARE_PREVIEW_BUILD:`true`}:{}};if(v&&n&&!g?.framework?.supportsMode)throw Error(`The detected command \`${v}\` does not currently support \`--mode\`.`);f!==`silent`&&r.message(e.bold(`Build`),{symbol:e.muted(`├`),spacing:0,output:f===`stderr`?process.stderr:void 0});let b=n?[`--mode`,n]:[],S;if(v)S=await i(v,p,{...u,env:y,args:b});else{let e=o(p);f!==`silent`&&r.message(`Delegating to ${x(e)}`,{spacing:0,output:f===`stderr`?process.stderr:void 0}),S=await s(e,`build`,b,{...u,env:y})}if(S.exitCode!==0||S.signal)throw new t(S.exitCode,{signal:S.signal});let{workers:C,rootConfig:w}=await l(p);h(m(C,c),w),f!==`silent`&&r.success(`Build complete`,{spacing:0,output:f===`stderr`?process.stderr:void 0})}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,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
+ import{n as e,t}from"./build-B-tN7mO-.mjs";export{t as default,e as runBuild};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-C9i1d0ma.mjs";import{a as t,t as n}from"./context-C71TA0Yp.mjs";import{r}from"./auth-CHTMVVW3.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-BlxgG8Ss.mjs";import{t as s}from"./run-l2pCxS-W.mjs";import"./telemetry-BqtdHwmi.mjs";import{n as c,t as l}from"./body-parser-hh2avzkz.mjs";import{n as u}from"./input-validation-Dk52b0me.mjs";import{a as d,i as f,n as p}from"./prompt-ClEoR47s.mjs";import{t as m}from"./cli-types-DoVT5q_M.mjs";function h(e){return e.usage(`$0 builds cancel <build-uuid>
2
+ import{t as e}from"./local-CQc36Viv.mjs";import{a as t,t as n}from"./context-M2Ho8pi3.mjs";import{r}from"./auth-BjxUTZWb.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-BnIv4lh5.mjs";import{t as s}from"./run-Duj1fsxa.mjs";import"./telemetry-Bn5lYtiy.mjs";import{n as c,t as l}from"./body-parser-hh2avzkz.mjs";import{n as u}from"./input-validation-Dk52b0me.mjs";import{a as d,i as f,n as p}from"./prompt-DjRAo2Up.mjs";import{t as m}from"./cli-types-DoVT5q_M.mjs";function h(e){return e.usage(`$0 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:h,handler:async c=>s({command:`builds cancel`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf builds cancel`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/builds/builds/${c[`build-uuid`]==null?`<build-uuid>`:encodeURIComponent(String(c[`build-uuid`]))}/cancel`,pathParams:{"build-uuid":String(c[`build-uuid`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();c.accountId=l,i(await o(`Updating`,async()=>s.builds.cancel({account_id:l,build_uuid:c[`build-uuid`]})),{successLabel:`Updated`})})};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{i as e}from"./context-C71TA0Yp.mjs";import{a as t,r as n}from"./auth-CHTMVVW3.mjs";import{t as r}from"./output-CvQFJkvi.mjs";import{t as i}from"./dry-run-Bq0JAsbX.mjs";import{t as a}from"./progress-BlxgG8Ss.mjs";import{t as o}from"./run-l2pCxS-W.mjs";import"./telemetry-BqtdHwmi.mjs";import{n as s,t as c}from"./body-parser-hh2avzkz.mjs";import{n as l}from"./input-validation-Dk52b0me.mjs";import{a as u,i as d,n as f}from"./prompt-ClEoR47s.mjs";function p(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 ee={command:`invalidate-environment <environment-id>`,describe:`Invalidate Cached Content by Environment`,builder:p,handler:async c=>o({command:`cache invalidate-environment`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){i({command:`cf cache invalidate-environment`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${c.zone??c.zoneId??`<zone>`}/environments/${c[`environment-id`]==null?`<environment-id>`:encodeURIComponent(String(c[`environment-id`]))}/invalidate_cache`,pathParams:{"zone-id":String(c.zone??c[`zone-id`]??``),"environment-id":String(c[`environment-id`]??``)},bodyKind:`json`,body:c.body===void 0?void 0:s(c.body)});return}let o=await n(c),l=await e({zone:c.zone},o,{quiet:c.quiet});if(c.zoneId=l,!await f({force:!!c.force,message:`This operation marks the selected content in the environment's cache as stale.`})){process.stderr.write(`Aborted.
2
+ import{i as e}from"./context-M2Ho8pi3.mjs";import{a as t,r as n}from"./auth-BjxUTZWb.mjs";import{t as r}from"./output-CvQFJkvi.mjs";import{t as i}from"./dry-run-Bq0JAsbX.mjs";import{t as a}from"./progress-BnIv4lh5.mjs";import{t as o}from"./run-Duj1fsxa.mjs";import"./telemetry-Bn5lYtiy.mjs";import{n as s,t as c}from"./body-parser-hh2avzkz.mjs";import{n as l}from"./input-validation-Dk52b0me.mjs";import{a as u,i as d,n as f}from"./prompt-DjRAo2Up.mjs";function p(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 ee={command:`invalidate-environment <environment-id>`,describe:`Invalidate Cached Content by Environment`,builder:p,handler:async c=>o({command:`cache invalidate-environment`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){i({command:`cf cache invalidate-environment`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${c.zone??c.zoneId??`<zone>`}/environments/${c[`environment-id`]==null?`<environment-id>`:encodeURIComponent(String(c[`environment-id`]))}/invalidate_cache`,pathParams:{"zone-id":String(c.zone??c[`zone-id`]??``),"environment-id":String(c[`environment-id`]??``)},bodyKind:`json`,body:c.body===void 0?void 0:s(c.body)});return}let o=await n(c),l=await e({zone:c.zone},o,{quiet:c.quiet});if(c.zoneId=l,!await f({force:!!c.force,message:`This operation marks the selected content in the environment's cache as stale.`})){process.stderr.write(`Aborted.
3
3
  `);return}if(c.body){let e=s(c.body);r(await a(`Deleting`,async()=>o.cache.invalidateEnvironment({body:e,zone_id:l,environment_id:c[`environment-id`]})),{successLabel:`Deleted`});return}r(await a(`Deleting`,async()=>t(o,`POST`,`/zones/${c.zoneId}/environments/${encodeURIComponent(String(c[`environment-id`]))}/invalidate_cache`)),{successLabel:`Deleted`})})};function m(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 h={command:`invalidate`,describe:`Invalidate Cached Content`,builder:m,handler:async c=>o({command:`cache invalidate`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){i({command:`cf cache invalidate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${c.zone??c.zoneId??`<zone>`}/invalidate_cache`,pathParams:{"zone-id":String(c.zone??c[`zone-id`]??``)},bodyKind:`json`,body:c.body===void 0?void 0:s(c.body)});return}let o=await n(c),l=await e({zone:c.zone},o,{quiet:c.quiet});if(c.zoneId=l,!await f({force:!!c.force,message:`This operation marks the selected content in the zone's cache as stale.`})){process.stderr.write(`Aborted.
4
4
  `);return}if(c.body){let e=s(c.body);r(await a(`Deleting`,async()=>o.cache.invalidate({body:e,zone_id:l})),{successLabel:`Deleted`});return}r(await a(`Deleting`,async()=>t(o,`POST`,`/zones/${c.zoneId}/invalidate_cache`)),{successLabel:`Deleted`})})};function g(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 _={command:`bulk-delete`,describe:`Batch delete origin cloud region mappings`,builder:g,handler:async c=>o({command:`cache origin-cloud-regions bulk-delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){i({command:`cf cache origin-cloud-regions bulk-delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${c.zone??c.zoneId??`<zone>`}/origin/cloud_regions/batch`,pathParams:{"zone-id":String(c.zone??c[`zone-id`]??``)},bodyKind:`json`,body:c.body===void 0?void 0:s(c.body)});return}let o=await n(c);if(c.zoneId=await e({zone:c.zone},o,{quiet:c.quiet}),!await f({force:!!c.force,message:`Are you sure you want to delete these Origin Cloud Region configurations?`})){process.stderr.write(`Aborted.
5
5
  `);return}if(c.body){let e=s(c.body);if(Array.isArray(e)&&e.length>100){let n=Math.ceil(e.length/100),i=null;for(let r=0;r<e.length;r+=100){let s=e.slice(r,r+100);i=await a(`Deleting: batch ${Math.floor(r/100)+1}/${n}`,async()=>t(o,`DELETE`,`/zones/${c.zoneId}/origin/cloud_regions/batch`,{body:s}))}r(i,{successLabel:`Deleted`});return}r(await a(`Deleting`,async()=>t(o,`DELETE`,`/zones/${c.zoneId}/origin/cloud_regions/batch`,{body:e})),{successLabel:`Deleted`});return}if(c.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function v(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 y={command:`bulk-update`,describe:`Batch create or replace origin cloud region mappings`,builder:v,handler:async c=>o({command:`cache origin-cloud-regions bulk-update`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){i({command:`cf cache origin-cloud-regions bulk-update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${c.zone??c.zoneId??`<zone>`}/origin/cloud_regions/batch`,pathParams:{"zone-id":String(c.zone??c[`zone-id`]??``)},bodyKind:`json`,body:c.body===void 0?void 0:s(c.body)});return}let o=await n(c);if(c.zoneId=await e({zone:c.zone},o,{quiet:c.quiet}),c.body){let e=s(c.body);if(Array.isArray(e)&&e.length>100){let n=Math.ceil(e.length/100),i=null;for(let r=0;r<e.length;r+=100){let s=e.slice(r,r+100);i=await a(`Updating: batch ${Math.floor(r/100)+1}/${n}`,async()=>t(o,`PUT`,`/zones/${c.zoneId}/origin/cloud_regions/batch`,{body:s}))}r(i,{successLabel:`Updated`});return}r(await a(`Updating`,async()=>t(o,`PUT`,`/zones/${c.zoneId}/origin/cloud_regions/batch`,{body:e})),{successLabel:`Updated`});return}if(c.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function b(e){return e.usage(`$0 cache origin-cloud-regions delete <origin-ip>
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{i as e}from"./context-C71TA0Yp.mjs";import{r as t}from"./auth-CHTMVVW3.mjs";import{t as n}from"./output-CvQFJkvi.mjs";import{t as r}from"./dry-run-Bq0JAsbX.mjs";import{t as i}from"./progress-BlxgG8Ss.mjs";import{t as a}from"./run-l2pCxS-W.mjs";import"./telemetry-BqtdHwmi.mjs";import{n as o,t as s}from"./body-parser-hh2avzkz.mjs";import{n as c}from"./input-validation-Dk52b0me.mjs";function l(e){return e.usage(`$0 certificate-authorities hostname-associations get
2
+ import{i as e}from"./context-M2Ho8pi3.mjs";import{r as t}from"./auth-BjxUTZWb.mjs";import{t as n}from"./output-CvQFJkvi.mjs";import{t as r}from"./dry-run-Bq0JAsbX.mjs";import{t as i}from"./progress-BnIv4lh5.mjs";import{t as a}from"./run-Duj1fsxa.mjs";import"./telemetry-Bn5lYtiy.mjs";import{n as o,t as s}from"./body-parser-hh2avzkz.mjs";import{n as c}from"./input-validation-Dk52b0me.mjs";function l(e){return e.usage(`$0 certificate-authorities hostname-associations get
3
3
 
4
4
  List Hostname Associations.`).option(`mtls-certificate-id`,{type:`string`,description:`The UUID to match against for a certificate that was uploaded to the mTLS Certificate Management endpoint. If no mtls_certificate_id is given, the results will be the hostnames associated to your active Cloudflare Managed CA.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const u={command:`get`,describe:`List Hostname Associations`,builder:l,handler:async o=>a({command:`certificate-authorities hostname-associations get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{let a={mtls_certificate_id:o[`mtls-certificate-id`]};if(o.dryRun){r({command:`cf certificate-authorities hostname-associations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/certificate_authorities/hostname_associations`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},query:a,bodyKind:`none`});return}let s=await t(o),c=await e({zone:o.zone},s,{quiet:o.quiet});o.zoneId=c,n(await i(`Loading`,async()=>s.certificateAuthorities.hostnameAssociations.get({zone_id:c,...a})),{successLabel:`Loaded`})})};function d(e){return e.usage(`$0 certificate-authorities hostname-associations update
5
5