cf 1.0.0-beta.3 → 1.0.0-beta.5

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 (235) hide show
  1. package/dist/_meta/commands.json +118 -0
  2. package/dist/_meta/schemas.json +77 -0
  3. package/dist/{abuse-reports-CWX7WKhe.mjs → abuse-reports-DoqL_52r.mjs} +1 -1
  4. package/dist/{access-2aKv_Dya.mjs → access-DRlrq_cq.mjs} +1 -1
  5. package/dist/{account-CnZO9-bl.mjs → account-DfC3gRTf.mjs} +1 -1
  6. package/dist/{account-tags-ClLZOfTA.mjs → account-tags-DMCYk5rR.mjs} +1 -1
  7. package/dist/{accounts-Cbj9aFyY.mjs → accounts-BlVDzIWc.mjs} +1 -1
  8. package/dist/{acm-wGJ9cnzE.mjs → acm-CCc33e4l.mjs} +1 -1
  9. package/dist/{addressing-YvHX2dAb.mjs → addressing-BA-5A3jQ.mjs} +1 -1
  10. package/dist/{agent-memory-B4N-lmLb.mjs → agent-memory-Csgs8W5u.mjs} +1 -1
  11. package/dist/{ai-lziiVEGR.mjs → ai-BN_pzw7p.mjs} +1 -1
  12. package/dist/{ai-audit-CG_DG6N7.mjs → ai-audit-Dbln3Ai6.mjs} +1 -1
  13. package/dist/{ai-gateway-DUttjxrN.mjs → ai-gateway-BhASWwdp.mjs} +1 -1
  14. package/dist/{ai-search-k63uopiK.mjs → ai-search-DvA8g4xr.mjs} +1 -1
  15. package/dist/{ai-security-D10lzYTn.mjs → ai-security-nualpneg.mjs} +1 -1
  16. package/dist/{alerting-c4ICS8KO.mjs → alerting-HUbVuQMl.mjs} +1 -1
  17. package/dist/{analytics-CEQ0EVTq.mjs → analytics-ClKN9YnQ.mjs} +2 -2
  18. package/dist/{analytics_engine-B9kiAPbY.mjs → analytics_engine-DP_O5HIq.mjs} +1 -1
  19. package/dist/{api-security-6LlxeiOi.mjs → api-security-Ce_9nFH9.mjs} +1 -1
  20. package/dist/{argo-BCcp1ybr.mjs → argo-CLLBrtiV.mjs} +1 -1
  21. package/dist/{artifacts-PoO3rAvo.mjs → artifacts-CIxZX3VM.mjs} +1 -1
  22. package/dist/{audit-logs-Vt3NbAA1.mjs → audit-logs-DjzIj9T4.mjs} +1 -1
  23. package/dist/{auth-3bFlHTVl.mjs → auth-B_Utev-x.mjs} +2 -2
  24. package/dist/{auth-BfYtTyXo.mjs → auth-CgPQplnD.mjs} +1 -1
  25. package/dist/{autoconfig-DqgOi1kW.mjs → autoconfig-BunaOShS.mjs} +77 -77
  26. package/dist/{billing-DVrpin2a.mjs → billing-tHlHhEVf.mjs} +1 -1
  27. package/dist/{bot-management-Bw-GZWoT.mjs → bot-management-ChV-gaXh.mjs} +1 -1
  28. package/dist/{botnet-feed-ov970cZf.mjs → botnet-feed-DQWBOEqC.mjs} +1 -1
  29. package/dist/{brand-protection-C7WOvdx6.mjs → brand-protection-B3afeuOj.mjs} +1 -1
  30. package/dist/{browser-run-DhnKUXVv.mjs → browser-run-eQMomr1x.mjs} +1 -1
  31. package/dist/build-DFa0ngeO.mjs +2 -0
  32. package/dist/build-VUz0URCV.mjs +2 -0
  33. package/dist/{builds-BIqfNXEE.mjs → builds-wTOvlp0S.mjs} +1 -1
  34. package/dist/{cache-Dzl3kth1.mjs → cache-s4HK0we7.mjs} +1 -1
  35. package/dist/{certificate-authorities-CQinLiq_.mjs → certificate-authorities-CaPUfYzA.mjs} +1 -1
  36. package/dist/{cli-ZXrxm369.mjs → cli-CT-QJu7q.mjs} +1 -1
  37. package/dist/{client-certificates--vw-4vvy.mjs → client-certificates-BfNDnT8H.mjs} +1 -1
  38. package/dist/{client-side-security-YCsdeK3e.mjs → client-side-security-BV7iORbb.mjs} +1 -1
  39. package/dist/{cloud-connector-CwSi4zZI.mjs → cloud-connector-CGT8ezvv.mjs} +1 -1
  40. package/dist/{cloudforce-one-hEykJeqy.mjs → cloudforce-one-BDhbXtA_.mjs} +1 -1
  41. package/dist/{command-CIZDQPmS.mjs → command-BgBsFEYv.mjs} +1 -1
  42. package/dist/{command-CeL8kQCM.mjs → command-C3Qhz4kU.mjs} +1 -1
  43. package/dist/{command-ChDtawgh.mjs → command-C8gLcKlB.mjs} +1 -1
  44. package/dist/{command-C1CwuI4O.mjs → command-C_l69o2b.mjs} +1 -1
  45. package/dist/{command-DBCoI1fN.mjs → command-Cox9Wh1i.mjs} +1 -1
  46. package/dist/{command-D5nZoVE1.mjs → command-DH67hNLj.mjs} +1 -1
  47. package/dist/command-DJF4wdrM.mjs +2 -0
  48. package/dist/{command-DrQKTf1O.mjs → command-DQcG8PK-.mjs} +1 -1
  49. package/dist/{command-IuYNIUk9.mjs → command-DjNcY4cf.mjs} +1 -1
  50. package/dist/{command-BH-TMJWp.mjs → command-DpEQ07Xe.mjs} +1 -1
  51. package/dist/{command-jJKEah9i.mjs → command-G_VL3Jf8.mjs} +1 -1
  52. package/dist/{command-L0y09SE5.mjs → command-SgtzgQrs.mjs} +1 -1
  53. package/dist/{command-egPOyKbx.mjs → command-lYaHS62l.mjs} +1 -1
  54. package/dist/{command-Axp5Wfpj.mjs → command-ozwmaY7n.mjs} +1 -1
  55. package/dist/{completions-DNisLHie.mjs → completions-VR53Fiec.mjs} +1 -1
  56. package/dist/{connector-interrupts-uIHLde10.mjs → connector-interrupts-hfttjm-b.mjs} +1 -1
  57. package/dist/{connector-telemetry-events-D2MH0OSs.mjs → connector-telemetry-events-5nVvivYA.mjs} +1 -1
  58. package/dist/{connector-telemetry-snapshots-CQICQaGf.mjs → connector-telemetry-snapshots-DKk_7VQa.mjs} +1 -1
  59. package/dist/{connectors-BXwvP7SF.mjs → connectors-CvX4Z3cg.mjs} +1 -1
  60. package/dist/{containers-DOyOrVV9.mjs → containers-BQxj87na.mjs} +1 -1
  61. package/dist/{containers-ClK7HGfx.mjs → containers-BU9RquYh.mjs} +1 -1
  62. package/dist/{content-scan-B71JZ7G6.mjs → content-scan-hWh-aGbO.mjs} +1 -1
  63. package/dist/{context-5JRcefHh.mjs → context-CPVzoKbN.mjs} +1 -1
  64. package/dist/{cps-CzNfFv-5.mjs → cps-o8QQFfnF.mjs} +1 -1
  65. package/dist/{csamScanner-BfZcrcjk.mjs → csamScanner-DHod3Hak.mjs} +1 -1
  66. package/dist/{ct-alerting-Cm8YLmXE.mjs → ct-alerting-D-_YsE1x.mjs} +1 -1
  67. package/dist/{custom-certificates-DFMRe9_D.mjs → custom-certificates-UnaVRb3W.mjs} +1 -1
  68. package/dist/{custom-csrs-B5njuvdd.mjs → custom-csrs-BCJ7LOUe.mjs} +1 -1
  69. package/dist/{custom-hostnames-D06jQfNs.mjs → custom-hostnames-DOluVIfa.mjs} +1 -1
  70. package/dist/{custom-nameservers-CKwKLqbF.mjs → custom-nameservers-CvIucaA2.mjs} +1 -1
  71. package/dist/{custom-pages-D339_r6I.mjs → custom-pages-DzrXSeCR.mjs} +1 -1
  72. package/dist/{d1-CHXmF-Ga.mjs → d1-BCg7BhWi.mjs} +1 -1
  73. package/dist/{dcv-delegation-BAnTwW8J.mjs → dcv-delegation-9bMHPSoc.mjs} +1 -1
  74. package/dist/{deploy-CsQbufsL.mjs → deploy-BT_EVz0K.mjs} +1 -1
  75. package/dist/{deploy-input-dwBe8pSi.mjs → deploy-input-YW632ysz.mjs} +1 -1
  76. package/dist/dev-jRnP9IIJ.mjs +4 -0
  77. package/dist/{diagnostics-BEUAWeLH.mjs → diagnostics-BIe-XR-P.mjs} +1 -1
  78. package/dist/discover-DgHRf-qo.mjs +2 -0
  79. package/dist/{dist-CpufWpsP.mjs → dist-COohnEBL.mjs} +1 -1
  80. package/dist/{dls-CXS7bPlj.mjs → dls-BuKO5QWL.mjs} +1 -1
  81. package/dist/{dns-Dx7oPdtH.mjs → dns-DzVN-WA4.mjs} +1 -1
  82. package/dist/{dns-firewall-wcP1fgB-.mjs → dns-firewall-Dx_XvWKJ.mjs} +1 -1
  83. package/dist/{durable-objects-DmieQflu.mjs → durable-objects-DnU6OsEb.mjs} +1 -1
  84. package/dist/{email-auth-DiO-k5wt.mjs → email-auth-DqIyzEcR.mjs} +1 -1
  85. package/dist/{email-routing-CycPV4UR.mjs → email-routing-8rhAmzOY.mjs} +1 -1
  86. package/dist/{email-security-DhtBU1X_.mjs → email-security-BRq5J31C.mjs} +1 -1
  87. package/dist/{email-sending-BjgiwUht.mjs → email-sending-Bsfk4Jia.mjs} +1 -1
  88. package/dist/{fieldExtractors-BOBRZ8gw.mjs → fieldExtractors-COaK02vB.mjs} +1 -1
  89. package/dist/{firewall-Dc0Xm26N.mjs → firewall-Dar706zc.mjs} +1 -1
  90. package/dist/{flagship-BRqR3ioN.mjs → flagship-CTchDpyw.mjs} +1 -1
  91. package/dist/{fraud-Czu1ed5n.mjs → fraud-H-mdJfRU.mjs} +1 -1
  92. package/dist/generate-qMU-2MgC.mjs +2 -0
  93. package/dist/{google-tag-gateway-DsZA0a1r.mjs → google-tag-gateway-zqXS_12f.mjs} +1 -1
  94. package/dist/{healthchecks-CFH5bIAG.mjs → healthchecks-x889sT8g.mjs} +1 -1
  95. package/dist/{hostnames-CKDSQsXT.mjs → hostnames-DqB5I-_U.mjs} +1 -1
  96. package/dist/{hyperdrive-BLiI7eoy.mjs → hyperdrive-sR7Mwif9.mjs} +1 -1
  97. package/dist/{iam-B5mdfq5e.mjs → iam-CKt7U41p.mjs} +1 -1
  98. package/dist/{images-IVRjrB4_.mjs → images-CakdBcMc.mjs} +1 -1
  99. package/dist/index.mjs +1 -1
  100. package/dist/{init-C6pA2OKl.mjs → init-CVyWV_Ow.mjs} +2 -2
  101. package/dist/{intel-CvesITo3.mjs → intel-Dcv1vMsK.mjs} +1 -1
  102. package/dist/{ips-DT9GaimG.mjs → ips-Ce9_k1Vh.mjs} +1 -1
  103. package/dist/{keyless-certificates-B0Xe5WqA.mjs → keyless-certificates-Cf_6sc7K.mjs} +1 -1
  104. package/dist/{keys-BfcwaSGe.mjs → keys-DW2A43fL.mjs} +1 -1
  105. package/dist/{kv-BAKDr9h1.mjs → kv-BKBWXf8s.mjs} +1 -1
  106. package/dist/{lazy-command-BR3u8SQ2.mjs → lazy-command-BOjQB_U7.mjs} +1 -1
  107. package/dist/{leaked-credential-checks-gRpF7J9-.mjs → leaked-credential-checks-D-gwxxaF.mjs} +1 -1
  108. package/dist/{load-balancers-CLVWIN9d.mjs → load-balancers-DHUVei95.mjs} +1 -1
  109. package/dist/{local-CxYne8s2.mjs → local-B3OyWKkW.mjs} +1 -1
  110. package/dist/local-qOpZjDed.mjs +2 -0
  111. package/dist/{local-runtime-C_fR3pz4.mjs → local-runtime-Co5vVDlI.mjs} +1 -1
  112. package/dist/{login-B2IW-LZC.mjs → login-CptngugC.mjs} +1 -1
  113. package/dist/{login-BKQI53YQ.mjs → login-D37fy09s.mjs} +1 -1
  114. package/dist/{logo-matches-CmCWQC_j.mjs → logo-matches-D1aNSBnZ.mjs} +1 -1
  115. package/dist/{logos-DoGIvvML.mjs → logos-SyEjq15s.mjs} +1 -1
  116. package/dist/{logpush-C2fS4mz8.mjs → logpush-l9tVWnua.mjs} +1 -1
  117. package/dist/{logs-DOchrxC9.mjs → logs-EW0Pq-gf.mjs} +1 -1
  118. package/dist/{magic-cloud-networking-BTWKttlB.mjs → magic-cloud-networking-CN2Qd2Lx.mjs} +1 -1
  119. package/dist/{magic-network-monitoring-C_6hCn_f.mjs → magic-network-monitoring-8jxG-tPc.mjs} +1 -1
  120. package/dist/{magic-transit-B-Rmmg-Z.mjs → magic-transit-DLhIQz2l.mjs} +1 -1
  121. package/dist/{managed-defense-BPSLbGgV.mjs → managed-defense-CgKdTd9J.mjs} +1 -1
  122. package/dist/{managed-transforms-BqiDVQD6.mjs → managed-transforms-BASi4j_s.mjs} +1 -1
  123. package/dist/{matches-wLc335So.mjs → matches-BCV6x948.mjs} +1 -1
  124. package/dist/{mcp-CmQOrkzP.mjs → mcp-DQODvLQm.mjs} +1 -1
  125. package/dist/{mesh-DRuFq2pw.mjs → mesh-S_yYh-w3.mjs} +1 -1
  126. package/dist/migrate-B4kBnkpV.mjs +2 -0
  127. package/dist/{mtls-certificates-BUcQwJGQ.mjs → mtls-certificates-XJXK21J_.mjs} +1 -1
  128. package/dist/{network-BuXy0ysq.mjs → network-DA81Mcdh.mjs} +1 -1
  129. package/dist/{network-interconnects-BzfPaxkW.mjs → network-interconnects-OttR92s7.mjs} +1 -1
  130. package/dist/oauth-CKeW8CqE.mjs +9 -0
  131. package/dist/{oauth-BlFK0DPZ.mjs → oauth-ChXrM0q9.mjs} +1 -1
  132. package/dist/{oauth-clients-CnABE4xT.mjs → oauth-clients-Ba-YZsxB.mjs} +1 -1
  133. package/dist/{oauth-scopes-BFy1Hw7K.mjs → oauth-scopes-XqOk2zCQ.mjs} +1 -1
  134. package/dist/{observability-B1IkzeE0.mjs → observability-BdIbZ1D8.mjs} +1 -1
  135. package/dist/{organization-DeIzTyFr.mjs → organization-DnQ2_txo.mjs} +1 -1
  136. package/dist/{organizations-dpNO5XaQ.mjs → organizations-BkI0IhEg.mjs} +1 -1
  137. package/dist/{origin-ca-certificates-B-1YtC61.mjs → origin-ca-certificates-Br91H1EG.mjs} +1 -1
  138. package/dist/{origin-post-quantum-encryption-DdvwucsG.mjs → origin-post-quantum-encryption-BcpK8DaG.mjs} +1 -1
  139. package/dist/{origin-tls-client-auth-CzfpVmTE.mjs → origin-tls-client-auth-CYK6YnzK.mjs} +1 -1
  140. package/dist/{page-rules--wnIp30C.mjs → page-rules-DpOcNsJr.mjs} +1 -1
  141. package/dist/{pages-DvhJZv5S.mjs → pages-Cw4DM-1N.mjs} +1 -1
  142. package/dist/{pay-per-crawl-lqX3Rwt9.mjs → pay-per-crawl-BORpCGxC.mjs} +1 -1
  143. package/dist/{pay-per-use-BRKnBlz2.mjs → pay-per-use-CZw-KHEz.mjs} +1 -1
  144. package/dist/{pipelines-CvePummb.mjs → pipelines-DDDyJ6Oe.mjs} +1 -1
  145. package/dist/{precursor-DgotmHQd.mjs → precursor-DrH1i64o.mjs} +1 -1
  146. package/dist/previews-CiYBBKj8.mjs +4 -0
  147. package/dist/{progress-DUeNqM-j.mjs → progress-DS2fwfNP.mjs} +1 -1
  148. package/dist/{prompt-DV6YTdoa.mjs → prompt-doX80PCd.mjs} +1 -1
  149. package/dist/{queries-CLqy4AM6.mjs → queries-CD6h6iEP.mjs} +1 -1
  150. package/dist/{queues-D0Y4LNP1.mjs → queues-3TpjE349.mjs} +1 -1
  151. package/dist/{r2-D_FuuTGm.mjs → r2-CV_hSFkM.mjs} +1 -1
  152. package/dist/{r2-data-catalog-D5Fvpr3C.mjs → r2-data-catalog-D_YHTMFG.mjs} +1 -1
  153. package/dist/{radar-B6bYFNVn.mjs → radar-6-4_LoQ1.mjs} +1 -1
  154. package/dist/{raw-fetch-Cp3EaTcj.mjs → raw-fetch-_Z55VEDY.mjs} +1 -1
  155. package/dist/{realtime-BTBZoZNW.mjs → realtime-B5ce977I.mjs} +1 -1
  156. package/dist/{registrar-CFh4TCkC.mjs → registrar-CF-3h2dN.mjs} +1 -1
  157. package/dist/{registrar-sandbox-By6ukXxf.mjs → registrar-sandbox-BDRZbyAV.mjs} +1 -1
  158. package/dist/{reporting-Cf3q4cuO.mjs → reporting-CiS-RBNJ.mjs} +1 -1
  159. package/dist/{request-headers-jdUlF-_S.mjs → request-headers-DPbWytRv.mjs} +1 -1
  160. package/dist/{request-tracers-CqNmb-dS.mjs → request-tracers-Drcpv8ha.mjs} +1 -1
  161. package/dist/{resource-sharing-vDvq5J5a.mjs → resource-sharing-BI3CoOjl.mjs} +1 -1
  162. package/dist/{resource-tagging-DRCkpRmf.mjs → resource-tagging-D4i_-E0W.mjs} +1 -1
  163. package/dist/{rules-D-IfU82u.mjs → rules-C4I4CLoq.mjs} +1 -1
  164. package/dist/{rulesets-ezJUnXm7.mjs → rulesets-c2efesdy.mjs} +1 -1
  165. package/dist/{rum-G42H7AXu.mjs → rum-DT58nW8a.mjs} +1 -1
  166. package/dist/{run-BhfDNWCI.mjs → run-CJ-6owN3.mjs} +1 -1
  167. package/dist/run-D0esoYSn.mjs +2 -0
  168. package/dist/{schema-flags-yDMur8UR.mjs → schema-flags-DDW79Tda.mjs} +1 -1
  169. package/dist/{scim-DgRlqTtE.mjs → scim-PfJWMuRu.mjs} +1 -1
  170. package/dist/{secrets-store-DcNmMGG2.mjs → secrets-store-7jrgww1J.mjs} +1 -1
  171. package/dist/{security-center-CZwVaL7t.mjs → security-center-BhUM_Flh.mjs} +1 -1
  172. package/dist/{security-txt-CD0RAEsU.mjs → security-txt-ButEG3qy.mjs} +1 -1
  173. package/dist/shared-JNtE--kh.mjs +2 -0
  174. package/dist/{smart-shield-C72SYuAe.mjs → smart-shield-DgbYuUFC.mjs} +1 -1
  175. package/dist/{snippets-Bl4Rfvdf.mjs → snippets-De-xVTIb.mjs} +1 -1
  176. package/dist/{spawn-PBhhCQdl.mjs → spawn-IM_tQldH.mjs} +1 -1
  177. package/dist/{spectrum-BgOMd04u.mjs → spectrum-DcknX0jS.mjs} +1 -1
  178. package/dist/{speed-dahwVmv-.mjs → speed-Cn_p-ieT.mjs} +1 -1
  179. package/dist/{src-npcmT3gh.mjs → src-BYjublVL.mjs} +5 -5
  180. package/dist/{ssl-BMZZPgJx.mjs → ssl-Bkn4ke9Q.mjs} +1 -1
  181. package/dist/{stream-CsQ8wMMF.mjs → stream-Cx78uNm_.mjs} +1 -1
  182. package/dist/{submit-DdoTeeRt.mjs → submit-Gu34n1a6.mjs} +1 -1
  183. package/dist/{tags-BESTUjkv.mjs → tags-BQqO7TLX.mjs} +1 -1
  184. package/dist/telemetry-D2UwfCd1.mjs +2 -0
  185. package/dist/{telemetry-CVjp5qaj.mjs → telemetry-Qc-g_0fL.mjs} +1 -1
  186. package/dist/{tenant-COyp8x56.mjs → tenant-Dr0hGlhU.mjs} +1 -1
  187. package/dist/{tenant-custom-nameservers-BdrnvyTk.mjs → tenant-custom-nameservers-B5Nf5hLr.mjs} +1 -1
  188. package/dist/{tunnels-CjDCYR0_.mjs → tunnels-ndJtol-f.mjs} +1 -1
  189. package/dist/{turnstile-crX-kMig.mjs → turnstile-Cd65N6jD.mjs} +1 -1
  190. package/dist/{update-check-BpLdkJeA.mjs → update-check-AraGlAQf.mjs} +1 -1
  191. package/dist/update-check-D5-zqJoN.mjs +2 -0
  192. package/dist/update-check-worker.mjs +1 -1
  193. package/dist/{url-info-CSU3TaVe.mjs → url-info-CQKJ5A-x.mjs} +1 -1
  194. package/dist/{url-normalization-DKZYH3Tv.mjs → url-normalization-BPXZwYu0.mjs} +1 -1
  195. package/dist/{url-scanner-mtiMlSyE.mjs → url-scanner-Bq43LJ98.mjs} +1 -1
  196. package/dist/{user-DuDnsFvs.mjs → user-D4InwQxA.mjs} +1 -1
  197. package/dist/{values-B4gL0UvN.mjs → values-C3YLablc.mjs} +1 -1
  198. package/dist/{vectorize-CEC7tpRJ.mjs → vectorize-CYt0qXQ5.mjs} +1 -1
  199. package/dist/version-DyZwKU6l.mjs +2 -0
  200. package/dist/{waiting-rooms-CosskYpi.mjs → waiting-rooms-B3ksWao9.mjs} +1 -1
  201. package/dist/{web-assets-Do2JEl4p.mjs → web-assets-DNiElHgV.mjs} +1 -1
  202. package/dist/{web3-C3sb4DR8.mjs → web3-DfMKMDix.mjs} +1 -1
  203. package/dist/workers-C8uiRedD.mjs +40 -0
  204. package/dist/{workers-builds-CDE-wcw-.mjs → workers-builds-DbEy311-.mjs} +1 -1
  205. package/dist/{workers-for-platforms-CvZI2B1d.mjs → workers-for-platforms-BjvcY5A1.mjs} +1 -1
  206. package/dist/{workers-vpc-WbwBVV_L.mjs → workers-vpc-BEnB6e_3.mjs} +1 -1
  207. package/dist/{workflows-Ch7cNhhq.mjs → workflows-CX3Zer8w.mjs} +1 -1
  208. package/dist/wrangler-migration-BDkh1_IV.mjs +2 -0
  209. package/dist/{zaraz-BO7WT_U7.mjs → zaraz-DR1KbYY-.mjs} +1 -1
  210. package/dist/{zero-trust-CTKtzxxW.mjs → zero-trust-CLoXVq1e.mjs} +4 -4
  211. package/dist/{zone-DSHj2Vv2.mjs → zone-B9qejq6W.mjs} +1 -1
  212. package/dist/{zones-CeFb9USG.mjs → zones-BxU08wO0.mjs} +1 -1
  213. package/package.json +3 -3
  214. package/dist/build-CVvo9BvP.mjs +0 -2
  215. package/dist/build-vfD1txJe.mjs +0 -2
  216. package/dist/command-ZSxcR8-J.mjs +0 -2
  217. package/dist/dev-BpvWl6pG.mjs +0 -4
  218. package/dist/generate-BAHK895m.mjs +0 -2
  219. package/dist/local-22UA5g9y.mjs +0 -2
  220. package/dist/migrate-DBwOnU6B.mjs +0 -2
  221. package/dist/oauth-BYmfy7l7.mjs +0 -9
  222. package/dist/previews-Brsuhzmk.mjs +0 -4
  223. package/dist/run-djd1-6kN.mjs +0 -2
  224. package/dist/shared-Cfuwhk19.mjs +0 -2
  225. package/dist/telemetry-iBZ-f6og.mjs +0 -2
  226. package/dist/update-check-CtmTFJ-O.mjs +0 -2
  227. package/dist/version-CPwqVR_p.mjs +0 -2
  228. package/dist/workers-ByA4Nddg.mjs +0 -36
  229. /package/dist/{cloudflared-CH8rOneA.mjs → cloudflared-91JvyShh.mjs} +0 -0
  230. /package/dist/{command-DBpr6U4L.mjs → command-C72KLHMc.mjs} +0 -0
  231. /package/dist/{discover-DmIsaE54.mjs → discover-VRFBjse7.mjs} +0 -0
  232. /package/dist/{generate-DWW1YPjv.mjs → generate-iV6OVNin.mjs} +0 -0
  233. /package/dist/{registry-kYRASukx.mjs → registry-DBMUTYqf.mjs} +0 -0
  234. /package/dist/{schema-s22s29sJ.mjs → schema-CueLBLXC.mjs} +0 -0
  235. /package/dist/{tools-LlzHD_86.mjs → tools-BJbI_f35.mjs} +0 -0
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-CxYne8s2.mjs";import{a as t,i as n,t as r}from"./context-5JRcefHh.mjs";import{a as i,r as a}from"./auth-3bFlHTVl.mjs";import{t as o}from"./output-CvQFJkvi.mjs";import{t as s}from"./dry-run-Bq0JAsbX.mjs";import{t as c}from"./progress-DUeNqM-j.mjs";import{t as l}from"./run-BhfDNWCI.mjs";import"./telemetry-iBZ-f6og.mjs";import{n 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,n as h}from"./prompt-DV6YTdoa.mjs";import{t as g}from"./cli-types-DoVT5q_M.mjs";import{n as ee,t as te}from"./raw-fetch-Cp3EaTcj.mjs";function _(e){return e.usage(`$0 intel asn get <asn>
2
+ import{t as e}from"./local-B3OyWKkW.mjs";import{a as t,i as n,t as r}from"./context-CPVzoKbN.mjs";import{a as i,r as a}from"./auth-B_Utev-x.mjs";import{t as o}from"./output-CvQFJkvi.mjs";import{t as s}from"./dry-run-Bq0JAsbX.mjs";import{t as c}from"./progress-DS2fwfNP.mjs";import{t as l}from"./run-CJ-6owN3.mjs";import"./telemetry-D2UwfCd1.mjs";import{n 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,n as h}from"./prompt-doX80PCd.mjs";import{t as g}from"./cli-types-DoVT5q_M.mjs";import{n as ee,t as te}from"./raw-fetch-_Z55VEDY.mjs";function _(e){return e.usage(`$0 intel asn get <asn>
3
3
 
4
4
  Gets an overview of the Autonomous System Number (ASN) and a list of subnets for it.`).positional(`asn`,{type:`string`,description:`Asn`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`get <asn>`,describe:`Get ASN Overview.`,builder:_,handler:async n=>l({command:`intel asn get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf intel asn get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/intel/asn/${n.asn==null?`<asn>`:encodeURIComponent(String(n.asn))}`,pathParams:{asn:String(n.asn??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.intel.asn.get({account_id:l,asn:n.asn})),{successLabel:`Loaded`})})};function y(e){return e.usage(`$0 intel asn subnets get <asn>
5
5
 
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import{r as e}from"./auth-3bFlHTVl.mjs";import{t}from"./output-CvQFJkvi.mjs";import{t as n}from"./dry-run-Bq0JAsbX.mjs";import{t as r}from"./progress-DUeNqM-j.mjs";import{t as i}from"./run-BhfDNWCI.mjs";import"./telemetry-iBZ-f6og.mjs";function a(e){return e.usage(`$0 ips list
2
+ import{r as e}from"./auth-B_Utev-x.mjs";import{t}from"./output-CvQFJkvi.mjs";import{t as n}from"./dry-run-Bq0JAsbX.mjs";import{t as r}from"./progress-DS2fwfNP.mjs";import{t as i}from"./run-CJ-6owN3.mjs";import"./telemetry-D2UwfCd1.mjs";function a(e){return e.usage(`$0 ips list
3
3
 
4
4
  Get IPs used on the Cloudflare/JD Cloud network, see https://www.cloudflare.com/ips for Cloudflare IPs or https://developers.cloudflare.com/china-network/reference/infrastructure/ for JD Cloud IPs.`).option(`networks`,{type:`string`,description:"Specified as `jdcloud` to list IPs used by JD Cloud data centers."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const o={command:`list`,describe:`Cloudflare/JD Cloud IP Details`,builder:a,handler:async a=>i({command:`ips list`,classification:{safeFlags:[`dry-run`]}},a,async()=>{let i={networks:a.networks};if(a.dryRun){n({command:`cf ips list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/ips`,pathParams:{},query:i,bodyKind:`none`});return}let o=await e(a);t(await r(`Loading`,async()=>o.ips.list(i)),{successLabel:`Loaded`})})},s={command:`ips`,describe:`ips`,builder:e=>e.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{i as e}from"./context-5JRcefHh.mjs";import{r as t}from"./auth-3bFlHTVl.mjs";import{t as n}from"./output-CvQFJkvi.mjs";import{t as r}from"./dry-run-Bq0JAsbX.mjs";import{t as i}from"./progress-DUeNqM-j.mjs";import{t as a}from"./run-BhfDNWCI.mjs";import"./telemetry-iBZ-f6og.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-DV6YTdoa.mjs";function d(e){return e.usage(`$0 keyless-certificates create
2
+ import{i as e}from"./context-CPVzoKbN.mjs";import{r as t}from"./auth-B_Utev-x.mjs";import{t as n}from"./output-CvQFJkvi.mjs";import{t as r}from"./dry-run-Bq0JAsbX.mjs";import{t as i}from"./progress-DS2fwfNP.mjs";import{t as a}from"./run-CJ-6owN3.mjs";import"./telemetry-D2UwfCd1.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-doX80PCd.mjs";function d(e){return e.usage(`$0 keyless-certificates create
3
3
 
4
4
  Creates a Keyless SSL configuration that allows SSL/TLS termination without exposing private keys to Cloudflare. Keys remain on your infrastructure.`).option(`bundle-method`,{type:`string`,description:`A ubiquitous bundle has the highest probability of being verified everywhere, even by clients using outdated or unusual trust stores. An optimal bundle uses the shortest chain and newest intermediates. And the force bundle verifies the chain, but does not otherwise modify it.`,choices:[`ubiquitous`,`optimal`,`force`],default:`ubiquitous`}).option(`certificate`,{type:`string`,description:`The zone's SSL certificate or SSL certificate and intermediate(s).`}).option(`host`,{type:`string`,description:`The keyless SSL name.`}).option(`name`,{type:`string`,description:`The keyless SSL name.`}).option(`port`,{type:`number`,description:`The keyless SSL port used to communicate between Cloudflare and the client's Keyless SSL server.`,default:24008}).option(`tunnel-private-ip`,{type:`string`,description:`Private IP of the Key Server Host.`}).option(`tunnel-vnet-id`,{type:`string`,description:`Cloudflare Tunnel Virtual Network ID.`}).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)`}).check(e=>{if([`tunnel-private-ip`,`tunnel-vnet-id`].some(t=>e[t]!==void 0)){let t=[`tunnel-private-ip`,`tunnel-vnet-id`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --tunnel-* flag is set`)}return!0})}const f={command:`create`,describe:`Create Keyless SSL Configuration`,builder:d,handler:async u=>a({command:`keyless-certificates create`,classification:{safeFlags:[`bundle-method`,`dry-run`]}},u,async()=>{if(u.dryRun){r({command:`cf keyless-certificates create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${u.zone??u.zoneId??`<zone>`}/keyless_certificates`,pathParams:{"zone-id":String(u.zone??u[`zone-id`]??``)},bodyKind:`json`,body:u.body===void 0?s({bundle_method:c(u[`bundle-method`],`bundle-method`,`text`),certificate:c(u.certificate,`certificate`,`text`),host:c(u.host,`host`,`text`),name:c(u.name,`name`,`text`),port:u.port,tunnel:{private_ip:c(u[`tunnel-private-ip`],`tunnel-private-ip`,`text`),vnet_id:c(u[`tunnel-vnet-id`],`tunnel-vnet-id`,`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.keylessCertificates.create({...e,zone_id:d})),{successLabel:`Created`});return}if(u.certificate===void 0&&(u.certificate=await l(`certificate`,`The zone's SSL certificate or SSL certificate and intermediate(s).`)),u.host===void 0&&(u.host=await l(`host`,`The keyless SSL name.`)),u.port===void 0)throw Error(`--port is required (or pass --body with this field set).`);let f=s({bundle_method:c(u[`bundle-method`],`bundle-method`,`text`),certificate:c(u.certificate,`certificate`,`text`),host:c(u.host,`host`,`text`),name:c(u.name,`name`,`text`),port:u.port,tunnel:{private_ip:c(u[`tunnel-private-ip`],`tunnel-private-ip`,`text`),vnet_id:c(u[`tunnel-vnet-id`],`tunnel-vnet-id`,`text`)}});n(await i(`Creating`,async()=>a.keylessCertificates.create({...f,zone_id:d})),{successLabel:`Created`})})};function p(e){return e.usage(`$0 keyless-certificates delete <keyless-certificate-id>
5
5
 
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-CxYne8s2.mjs";import{a as t,t as n}from"./context-5JRcefHh.mjs";import{r}from"./auth-3bFlHTVl.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-DUeNqM-j.mjs";import{t as s}from"./run-BhfDNWCI.mjs";import"./telemetry-iBZ-f6og.mjs";function c(e){return e.usage(`$0 keys list
2
+ import{t as e}from"./local-B3OyWKkW.mjs";import{a as t,t as n}from"./context-CPVzoKbN.mjs";import{r}from"./auth-B_Utev-x.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-DS2fwfNP.mjs";import{t as s}from"./run-CJ-6owN3.mjs";import"./telemetry-D2UwfCd1.mjs";function c(e){return e.usage(`$0 keys list
3
3
 
4
4
  Lists all distinct tag keys used across resources in an account.`).option(`cursor`,{type:`string`,description:`Cursor for pagination.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const l={command:`list`,describe:`List tag keys`,builder:c,handler:async c=>s({command:`keys list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={cursor:c.cursor};if(c.dryRun){a({command:`cf keys list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/tags/keys`,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.keys.list({account_id:u,...s})),{successLabel:`Loaded`})})},u={command:`keys`,describe:`keys`,builder:e=>e.command(l).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{u as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-CxYne8s2.mjs";import{a as t,t as n}from"./context-5JRcefHh.mjs";import{a as r,r as i}from"./auth-3bFlHTVl.mjs";import{t as a}from"./output-CvQFJkvi.mjs";import{t as o}from"./dry-run-Bq0JAsbX.mjs";import{t as s}from"./progress-DUeNqM-j.mjs";import{t as c}from"./run-BhfDNWCI.mjs";import"./telemetry-iBZ-f6og.mjs";import{n as l,t as u}from"./body-parser-hh2avzkz.mjs";import{n as d,t as f}from"./input-validation-Dk52b0me.mjs";import{a as p,n as m}from"./prompt-DV6YTdoa.mjs";import{t as h}from"./cli-types-DoVT5q_M.mjs";import{n as g,t as _}from"./raw-fetch-Cp3EaTcj.mjs";function v(e){return e.usage(`$0 kv bulk delete <namespace-id>
2
+ import{t as e}from"./local-B3OyWKkW.mjs";import{a as t,t as n}from"./context-CPVzoKbN.mjs";import{a as r,r as i}from"./auth-B_Utev-x.mjs";import{t as a}from"./output-CvQFJkvi.mjs";import{t as o}from"./dry-run-Bq0JAsbX.mjs";import{t as s}from"./progress-DS2fwfNP.mjs";import{t as c}from"./run-CJ-6owN3.mjs";import"./telemetry-D2UwfCd1.mjs";import{n as l,t as u}from"./body-parser-hh2avzkz.mjs";import{n as d,t as f}from"./input-validation-Dk52b0me.mjs";import{a as p,n as m}from"./prompt-doX80PCd.mjs";import{t as h}from"./cli-types-DoVT5q_M.mjs";import{n as g,t as _}from"./raw-fetch-_Z55VEDY.mjs";function v(e){return e.usage(`$0 kv bulk delete <namespace-id>
3
3
 
4
4
  Deletes up to 10,000 key-value pairs from the specified Workers KV namespace. Send a JSON array of the key names to delete. The result reports the number of successful deletions and any keys that failed and should be retried.`).positional(`namespace-id`,{type:`string`,description:`ID of the Workers KV namespace.`,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 y={command:`delete <namespace-id>`,describe:`Delete multiple key-value pairs`,builder:v,handler:async u=>c({command:`kv bulk delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},u,async()=>{if(u.dryRun){o({command:`cf kv bulk delete`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/storage/kv/namespaces/${u[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(u[`namespace-id`]))}/bulk/delete`,pathParams:{"namespace-id":String(u[`namespace-id`]??``)},bodyKind:`json`,body:u.body===void 0?void 0:l(u.body)});return}let c=await i(u),d=u.local?e:await n();if(u.accountId=d,!await m({force:!!u.force,message:`This operation deletes the specified keys and their values from the Workers KV namespace.`})){process.stderr.write(`Aborted.
5
5
  `);return}if(u.body){let e=l(u.body);if(Array.isArray(e)&&e.length>1e4){let t=Math.ceil(e.length/1e4),n=null;for(let i=0;i<e.length;i+=1e4){let a=e.slice(i,i+1e4);n=await s(`Deleting: batch ${Math.floor(i/1e4)+1}/${t}`,async()=>r(c,`POST`,`/accounts/${d}/storage/kv/namespaces/${encodeURIComponent(String(u[`namespace-id`]))}/bulk/delete`,{body:a}))}a(n,{successLabel:`Deleted`});return}a(await s(`Deleting`,async()=>r(c,`POST`,`/accounts/${d}/storage/kv/namespaces/${encodeURIComponent(String(u[`namespace-id`]))}/bulk/delete`,{body:e})),{successLabel:`Deleted`});return}if(u.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 kv bulk get <namespace-id>\n\nRetrieves the text-based values of up to 100 keys from the specified Workers KV namespace. The result maps each requested key to its value. Set `type` to `json` to parse JSON values instead of returning strings, and set `withMetadata` to `true` to include metadata with each value. Binary values are not supported by this operation.").positional(`namespace-id`,{type:`string`,description:`ID of the Workers KV namespace.`,demandOption:!0}).option(`keys`,{type:`string`,array:!0,description:`Array of keys to retrieve (maximum of 100).`}).option(`type`,{type:`string`,description:"Return values as strings with `text`, or parse stored JSON values with `json`.",choices:[`text`,`json`],default:`text`}).option(`with-metadata`,{type:`boolean`,description:`Whether to include metadata in the response.`,default:!1}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const x={command:`get <namespace-id>`,describe:`Get multiple key-value pairs`,builder:b,handler:async r=>c({command:`kv bulk get`,classification:{safeFlags:[`type`,`with-metadata`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf kv bulk get`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/storage/kv/namespaces/${r[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(r[`namespace-id`]))}/bulk/get`,pathParams:{"namespace-id":String(r[`namespace-id`]??``)},bodyKind:`json`,body:r.body===void 0?u({keys:r.keys,type:d(r.type,`type`,`text`),withMetadata:r[`with-metadata`]}):l(r.body)});return}let c=await i(r),f=r.local?e:await n();if(r.accountId=f,r.body){let e=l(r.body);a(await s(`Creating`,async()=>c.kv.bulk.get({...e,account_id:f,namespace_id:r[`namespace-id`]})),{successLabel:`Created`});return}if(r.keys===void 0)throw Error(`--keys is required (or pass --body with this field set).`);let p=u({keys:r.keys,type:d(r.type,`type`,`text`),withMetadata:r[`with-metadata`]});a(await s(`Creating`,async()=>c.kv.bulk.get({...p,account_id:f,namespace_id:r[`namespace-id`]})),{successLabel:`Created`})})};function S(e){return e.usage("$0 kv bulk put <namespace-id>\n\nWrites up to 10,000 key-value pairs to the specified Workers KV namespace from a JSON array, with optional metadata and expiration settings for each pair. Existing values and expirations are overwritten. If neither `expiration` nor `expiration_ttl` is specified, the key-value pair will not expire. If both are set, `expiration_ttl` takes precedence. The entire request must be 100 megabytes or less. The result reports the number of successful writes and any keys that failed and should be retried.").positional(`namespace-id`,{type:`string`,description:`ID of the Workers KV namespace.`,demandOption:!0}).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 C={command:`put <namespace-id>`,describe:`Write multiple key-value pairs`,builder:S,handler:async u=>c({command:`kv bulk put`,classification:{safeFlags:[`dry-run`]}},u,async()=>{if(u.dryRun){o({command:`cf kv bulk put`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/storage/kv/namespaces/${u[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(u[`namespace-id`]))}/bulk`,pathParams:{"namespace-id":String(u[`namespace-id`]??``)},bodyKind:`json`,body:u.body===void 0?void 0:l(u.body)});return}let c=await i(u),d=u.local?e:await n();if(u.accountId=d,u.body){let e=l(u.body);if(Array.isArray(e)&&e.length>1e4){let t=Math.ceil(e.length/1e4),n=null;for(let i=0;i<e.length;i+=1e4){let a=e.slice(i,i+1e4);n=await s(`Updating: batch ${Math.floor(i/1e4)+1}/${t}`,async()=>r(c,`PUT`,`/accounts/${d}/storage/kv/namespaces/${encodeURIComponent(String(u[`namespace-id`]))}/bulk`,{body:a}))}a(n,{successLabel:`Updated`});return}a(await s(`Updating`,async()=>r(c,`PUT`,`/accounts/${d}/storage/kv/namespaces/${encodeURIComponent(String(u[`namespace-id`]))}/bulk`,{body:e})),{successLabel:`Updated`});return}if(u.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},w={command:`bulk`,describe:`Operations for bulk`,builder:e=>e.command(y).command(x).command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function T(e){return e.usage("$0 kv keys delete <key-name>\n\nDeletes the specified key and its value from the Workers KV namespace. Use URL-encoding for special characters (for example, `:`, `!`, `%`) in the key name when constructing the request URL.").positional(`key-name`,{type:`string`,description:`A key's name. The name may be at most 512 bytes. All printable, non-whitespace characters are valid. Use percent-encoding to define key names as part of a URL.`,demandOption:!0}).option(`namespace-id`,{type:`string`,description:`ID of the Workers KV namespace.`,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 E={command:`delete <key-name>`,describe:`Delete a key-value pair`,builder:T,handler:async r=>c({command:`kv keys delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf kv keys delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/storage/kv/namespaces/${r[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(r[`namespace-id`]))}/values/${r[`key-name`]==null?`<key-name>`:encodeURIComponent(String(r[`key-name`]))}`,pathParams:{"key-name":String(r[`key-name`]??``),"namespace-id":String(r[`namespace-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,!await m({force:!!r.force,message:`This operation deletes the selected key-value pair from the Workers KV namespace.`})){process.stderr.write(`Aborted.
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- function e(e,t,n,r){return{command:e,describe:t,builder:async e=>{let t=(await n()).default.builder;return typeof t==`function`?t(e):e},handler:async e=>{let t=await n();if(r===null){await t.default.handler(e);return}let{runWithTelemetry:i}=await import(`./run-djd1-6kN.mjs`);await i(r,e,()=>t.default.handler(e))}}}export{e as t};
2
+ function e(e,t,n,r){return{command:e,describe:t,builder:async e=>{let t=(await n()).default.builder;return typeof t==`function`?t(e):e},handler:async e=>{let t=await n();if(r===null){await t.default.handler(e);return}let{runWithTelemetry:i}=await import(`./run-D0esoYSn.mjs`);await i(r,e,()=>t.default.handler(e))}}}export{e as t};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{i as e}from"./context-5JRcefHh.mjs";import{r as t}from"./auth-3bFlHTVl.mjs";import{t as n}from"./output-CvQFJkvi.mjs";import{t as r}from"./dry-run-Bq0JAsbX.mjs";import{t as i}from"./progress-DUeNqM-j.mjs";import{t as a}from"./run-BhfDNWCI.mjs";import"./telemetry-iBZ-f6og.mjs";import{n as o,t as s}from"./body-parser-hh2avzkz.mjs";import{n as c}from"./input-validation-Dk52b0me.mjs";import{n as l}from"./prompt-DV6YTdoa.mjs";function u(e){return e.usage(`$0 leaked-credential-checks detections create
2
+ import{i as e}from"./context-CPVzoKbN.mjs";import{r as t}from"./auth-B_Utev-x.mjs";import{t as n}from"./output-CvQFJkvi.mjs";import{t as r}from"./dry-run-Bq0JAsbX.mjs";import{t as i}from"./progress-DS2fwfNP.mjs";import{t as a}from"./run-CJ-6owN3.mjs";import"./telemetry-D2UwfCd1.mjs";import{n as o,t as s}from"./body-parser-hh2avzkz.mjs";import{n as c}from"./input-validation-Dk52b0me.mjs";import{n as l}from"./prompt-doX80PCd.mjs";function u(e){return e.usage(`$0 leaked-credential-checks detections create
3
3
 
4
4
  Create a detection location for credentials that the default scan locations do not cover, using Rules language expressions such as \`lookup_json_string(http.request.body.raw, "user")\`. Only the username expression is required, and Leaked Credential Checks must be enabled on the zone.`).option(`password`,{type:`string`,description:`Defines ehe ruleset expression to use in matching the password in a request.`}).option(`username`,{type:`string`,description:`Defines the ruleset expression to use in matching the username in a request.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Defines a custom set of username/password expressions to match Leaked Credential Checks on.`})}const d={command:`create`,describe:`Create a custom detection location for a zone.`,builder:u,handler:async l=>a({command:`leaked-credential-checks detections create`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){r({command:`cf leaked-credential-checks detections create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${l.zone??l.zoneId??`<zone>`}/leaked-credential-checks/detections`,pathParams:{"zone-id":String(l.zone??l[`zone-id`]??``)},bodyKind:`json`,body:l.body===void 0?s({password:c(l.password,`password`,`text`),username:c(l.username,`username`,`text`)}):o(l.body)});return}let a=await t(l),u=await e({zone:l.zone},a,{quiet:l.quiet});if(l.zoneId=u,l.body){let e=o(l.body);n(await i(`Creating`,async()=>a.leakedCredentialChecks.detections.create({body:e,zone_id:u})),{successLabel:`Created`});return}let d=s({password:c(l.password,`password`,`text`),username:c(l.username,`username`,`text`)});n(await i(`Creating`,async()=>a.leakedCredentialChecks.detections.create({body:d,zone_id:u})),{successLabel:`Created`})})};function f(e){return e.usage(`$0 leaked-credential-checks detections delete <detection-id>
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-CxYne8s2.mjs";import{a as t,i as n,t as r}from"./context-5JRcefHh.mjs";import{r as i}from"./auth-3bFlHTVl.mjs";import{t as a}from"./output-CvQFJkvi.mjs";import{t as o}from"./dry-run-Bq0JAsbX.mjs";import{t as s}from"./progress-DUeNqM-j.mjs";import{t as c}from"./run-BhfDNWCI.mjs";import"./telemetry-iBZ-f6og.mjs";import{n as l,r as u,t as d}from"./body-parser-hh2avzkz.mjs";import{n as f}from"./input-validation-Dk52b0me.mjs";import{a as p,n as m}from"./prompt-DV6YTdoa.mjs";import{t as h}from"./cli-types-DoVT5q_M.mjs";function g(e){return e.usage(`$0 load-balancers account create
2
+ import{t as e}from"./local-B3OyWKkW.mjs";import{a as t,i as n,t as r}from"./context-CPVzoKbN.mjs";import{r as i}from"./auth-B_Utev-x.mjs";import{t as a}from"./output-CvQFJkvi.mjs";import{t as o}from"./dry-run-Bq0JAsbX.mjs";import{t as s}from"./progress-DS2fwfNP.mjs";import{t as c}from"./run-CJ-6owN3.mjs";import"./telemetry-D2UwfCd1.mjs";import{n as l,r as u,t as d}from"./body-parser-hh2avzkz.mjs";import{n as f}from"./input-validation-Dk52b0me.mjs";import{a as p,n as m}from"./prompt-doX80PCd.mjs";import{t as h}from"./cli-types-DoVT5q_M.mjs";function g(e){return e.usage(`$0 load-balancers account create
3
3
 
4
4
  Create a new account or zone-scoped load balancer.`).option(`adaptive-routing-failover-across-pools`,{type:`boolean`,description:"Extends zero-downtime failover of requests to healthy origins from alternate pools, when no healthy alternate exists in the same pool, according to the failover order defined by traffic and origin steering. When set false (the default) zero-downtime failover will only occur between origins within the same pool. See `session_affinity_attributes` for control over when sessions are broken or reassigned."}).option(`default-pools`,{type:`string`,array:!0,description:`A list of pool IDs ordered by their failover priority. Pools defined here are used by default, or when region_pools are not configured for a given region.`}).option(`description`,{type:`string`,description:`Object description.`}).option(`enabled`,{type:`boolean`,description:`Whether to enable (the default) this load balancer.`,default:!0}).option(`fallback-pool`,{type:`string`,description:`The pool ID to use when all other pools are detected as unhealthy.`}).option(`location-strategy-mode`,{type:`string`,description:'Determines the authoritative location when ECS is not preferred, does not exist in the request, or its GeoIP lookup is unsuccessful.\n- `"pop"`: Use the Cloudflare PoP location.\n- `"resolver_ip"`: Use the DNS resolver GeoIP location. If the GeoIP lookup is unsuccessful, use the Cloudflare PoP location.',choices:[`pop`,`resolver_ip`]}).option(`location-strategy-prefer-ecs`,{type:`string`,description:'Whether the EDNS Client Subnet (ECS) GeoIP should be preferred as the authoritative location.\n- `"always"`: Always prefer ECS.\n- `"never"`: Never prefer ECS.\n- `"proximity"`: Prefer ECS only when `steering_policy="proximity"`.\n- `"geo"`: Prefer ECS only when `steering_policy="geo"`.',choices:[`always`,`never`,`proximity`,`geo`]}).option(`name`,{type:`string`,description:`The DNS hostname to associate with your Load Balancer. If this hostname already exists as a DNS record in Cloudflare's DNS, the Load Balancer will take precedence and the DNS record will not be used.`}).option(`networks`,{type:`string`,array:!0,description:`List of networks where Load Balancer or Pool is enabled.`}).option(`proxied`,{type:`boolean`,description:`Whether the hostname should be gray clouded (false) or orange clouded (true).`,default:!1}).option(`random-steering-default-weight`,{type:`number`,description:`The default weight for pools in the load balancer that are not specified in the pool_weights map.`}).option(`rules`,{type:`string`,description:`BETA Field Not General Access: A list of rules for this load balancer to execute. Provide as a JSON array of objects or @path/to/file.json.`}).option(`session-affinity`,{type:`string`,description:'Specifies the type of session affinity the load balancer should use unless specified as `"none"`. The supported types are: - `"cookie"`: On the first request to a proxied load balancer, a cookie is generated, encoding information of which origin the request will be forwarded to. Subsequent requests, by the same client to the same load balancer, will be sent to the origin server the cookie encodes, for the duration of the cookie and as long as the origin server remains healthy. If the cookie has expired or the origin server is unhealthy, then a new origin server is calculated and used. - `"ip_cookie"`: Behaves the same as `"cookie"` except the initial origin selection is stable and based on the client\'s ip address. - `"header"`: On the first request to a proxied load balancer, a session key based on the configured HTTP headers (see `session_affinity_attributes.headers`) is generated, encoding the request headers used for storing in the load balancer session state which origin the request will be forwarded to. Subsequent requests to the load balancer with the same headers will be sent to the same origin server, for the duration of the session and as long as the origin server remains healthy. If the session has been idle for the duration of `session_affinity_ttl` seconds or the origin server is unhealthy, then a new origin server is calculated and used. See `headers` in `session_affinity_attributes` for additional required configuration.',choices:[`none`,`cookie`,`ip_cookie`,`header`],default:`none`}).option(`session-affinity-attributes-drain-duration`,{type:`number`,description:`Configures the drain duration in seconds. This field is only used when session affinity is enabled on the load balancer.`}).option(`session-affinity-attributes-headers`,{type:`string`,array:!0,description:'Configures the names of HTTP headers to base session affinity on when header `session_affinity` is enabled. At least one HTTP header name must be provided. To specify the exact cookies to be used, include an item in the following format: `"cookie:<cookie-name-1>,<cookie-name-2>"` (example) where everything after the colon is a comma-separated list of cookie names. Providing only `"cookie"` will result in all cookies being used. The default max number of HTTP header names that can be provided depends on your plan: 5 for Enterprise, 1 for all other plans.'}).option(`session-affinity-attributes-require-all-headers`,{type:`boolean`,description:'When header `session_affinity` is enabled, this option can be used to specify how HTTP headers on load balancing requests will be used. The supported values are: - `"true"`: Load balancing requests must contain *all* of the HTTP headers specified by the `headers` session affinity attribute, otherwise sessions aren\'t created. - `"false"`: Load balancing requests must contain *at least one* of the HTTP headers specified by the `headers` session affinity attribute, otherwise sessions aren\'t created.'}).option(`session-affinity-attributes-samesite`,{type:`string`,description:`Configures the SameSite attribute on session affinity cookie. Value "Auto" will be translated to "Lax" or "None" depending if Always Use HTTPS is enabled. Note: when using value "None", the secure attribute can not be set to "Never".`,choices:[`Auto`,`Lax`,`None`,`Strict`]}).option(`session-affinity-attributes-secure`,{type:`string`,description:`Configures the Secure attribute on session affinity cookie. Value "Always" indicates the Secure attribute will be set in the Set-Cookie header, "Never" indicates the Secure attribute will not be set, and "Auto" will set the Secure attribute depending if Always Use HTTPS is enabled.`,choices:[`Auto`,`Always`,`Never`]}).option(`session-affinity-attributes-zero-downtime-failover`,{type:`string`,description:'Configures the zero-downtime failover between origins within a pool when session affinity is enabled. This feature is currently incompatible with Argo, Tiered Cache, and Bandwidth Alliance. The supported values are: - `"none"`: No failover takes place for sessions pinned to the origin (default). - `"temporary"`: Traffic will be sent to another other healthy origin until the originally pinned origin is available; note that this can potentially result in heavy origin flapping. - `"sticky"`: The session affinity cookie is updated and subsequent requests are sent to the new origin. Note: Zero-downtime failover with sticky sessions is currently not supported for session affinity by header.',choices:[`none`,`temporary`,`sticky`]}).option(`session-affinity-ttl`,{type:`number`,description:'Time, in seconds, until a client\'s session expires after being created. Once the expiry time has been reached, subsequent requests may get sent to a different origin server. The accepted ranges per `session_affinity` policy are: - `"cookie"` / `"ip_cookie"`: The current default of 23 hours will be used unless explicitly set. The accepted range of values is between [1800, 604800]. - `"header"`: The current default of 1800 seconds will be used unless explicitly set. The accepted range of values is between [30, 3600]. Note: With session affinity by header, sessions only expire after they haven\'t been used for the number of seconds specified.'}).option(`steering-policy`,{type:`string`,description:'Steering Policy for this load balancer.\n- `"off"`: Use `default_pools`.\n- `"geo"`: Use `region_pools`/`country_pools`/`pop_pools`. For non-proxied requests, the country for `country_pools` is determined by `location_strategy`.\n- `"random"`: Select a pool randomly.\n- `"dynamic_latency"`: Use round trip time to select the closest pool in default_pools (requires pool health checks).\n- `"proximity"`: Use the pools\' latitude and longitude to select the closest pool using the Cloudflare PoP location for proxied requests or the location determined by `location_strategy` for non-proxied requests.\n- `"least_outstanding_requests"`: Select a pool by taking into consideration `random_steering` weights, as well as each pool\'s number of outstanding requests. Pools with more pending requests are weighted proportionately less relative to others.\n- `"least_connections"`: Select a pool by taking into consideration `random_steering` weights, as well as each pool\'s number of open connections. Pools with more open connections are weighted proportionately less relative to others. Supported for HTTP/1 and HTTP/2 connections.\n- `""`: Will map to `"geo"` if you use `region_pools`/`country_pools`/`pop_pools` otherwise `"off"`.',choices:[`off`,`geo`,`random`,`dynamic_latency`,`proximity`,`least_outstanding_requests`,`least_connections`],default:``}).option(`ttl`,{type:`number`,description:`Time to live (TTL) of the DNS entry for the IP address returned by this load balancer. This only applies to gray-clouded (unproxied) load balancers.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const _={command:`create`,describe:`Create account or zone Load Balancer`,builder:g,handler:async m=>c({command:`load-balancers account create`,classification:{safeFlags:[`adaptive-routing-failover-across-pools`,`enabled`,`location-strategy-mode`,`location-strategy-prefer-ecs`,`proxied`,`session-affinity`,`session-affinity-attributes-require-all-headers`,`session-affinity-attributes-samesite`,`session-affinity-attributes-secure`,`session-affinity-attributes-zero-downtime-failover`,`steering-policy`,`dry-run`]}},m,async()=>{if(m.dryRun){let e=m.zone===void 0?await t():void 0,n=m.zone===void 0?`accounts`:`zones`,r=m.zone??e??`<account-id>`;o({command:`cf load-balancers account create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/load_balancers`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},bodyKind:`json`,body:m.body===void 0?d({adaptive_routing:{failover_across_pools:m[`adaptive-routing-failover-across-pools`]},default_pools:m[`default-pools`],description:f(m.description,`description`,`text`),enabled:m.enabled,fallback_pool:f(m[`fallback-pool`],`fallback-pool`,`text`),location_strategy:{mode:f(m[`location-strategy-mode`],`location-strategy-mode`,`text`),prefer_ecs:f(m[`location-strategy-prefer-ecs`],`location-strategy-prefer-ecs`,`text`)},name:f(m.name,`name`,`text`),networks:m.networks,proxied:m.proxied,random_steering:{default_weight:m[`random-steering-default-weight`]},rules:u(m.rules,`rules`),session_affinity:f(m[`session-affinity`],`session-affinity`,`text`),session_affinity_attributes:{drain_duration:m[`session-affinity-attributes-drain-duration`],headers:m[`session-affinity-attributes-headers`],require_all_headers:m[`session-affinity-attributes-require-all-headers`],samesite:f(m[`session-affinity-attributes-samesite`],`session-affinity-attributes-samesite`,`text`),secure:f(m[`session-affinity-attributes-secure`],`session-affinity-attributes-secure`,`text`),zero_downtime_failover:f(m[`session-affinity-attributes-zero-downtime-failover`],`session-affinity-attributes-zero-downtime-failover`,`text`)},session_affinity_ttl:m[`session-affinity-ttl`],steering_policy:f(m[`steering-policy`],`steering-policy`,`text`),ttl:m.ttl}):l(m.body)});return}let c=await i(m),h=m.zone===void 0?`accounts`:`zones`,g=h===`zones`?await n({zone:m.zone},c,{quiet:m.quiet}):m.local?e:await r();if(h===`zones`?m.zoneId=g:m.accountId=g,m.body){let e=l(m.body);a(await s(`Creating`,async()=>c.loadBalancers.account.create({...e,account_or_zone:h,account_or_zone_id:g})),{successLabel:`Created`});return}if(m[`default-pools`]===void 0)throw Error(`--default-pools is required (or pass --body with this field set).`);m[`fallback-pool`]===void 0&&(m[`fallback-pool`]=await p(`fallback-pool`,`The pool ID to use when all other pools are detected as unhealthy.`)),m.name===void 0&&(m.name=await p(`name`,`The DNS hostname to associate with your Load Balancer. If this hostname already exists as a DNS record in Cloudflare's DNS, the Load Balancer will take precedence and the DNS record will not be used.`));let _=d({adaptive_routing:{failover_across_pools:m[`adaptive-routing-failover-across-pools`]},default_pools:m[`default-pools`],description:f(m.description,`description`,`text`),enabled:m.enabled,fallback_pool:f(m[`fallback-pool`],`fallback-pool`,`text`),location_strategy:{mode:f(m[`location-strategy-mode`],`location-strategy-mode`,`text`),prefer_ecs:f(m[`location-strategy-prefer-ecs`],`location-strategy-prefer-ecs`,`text`)},name:f(m.name,`name`,`text`),networks:m.networks,proxied:m.proxied,random_steering:{default_weight:m[`random-steering-default-weight`]},rules:u(m.rules,`rules`),session_affinity:f(m[`session-affinity`],`session-affinity`,`text`),session_affinity_attributes:{drain_duration:m[`session-affinity-attributes-drain-duration`],headers:m[`session-affinity-attributes-headers`],require_all_headers:m[`session-affinity-attributes-require-all-headers`],samesite:f(m[`session-affinity-attributes-samesite`],`session-affinity-attributes-samesite`,`text`),secure:f(m[`session-affinity-attributes-secure`],`session-affinity-attributes-secure`,`text`),zero_downtime_failover:f(m[`session-affinity-attributes-zero-downtime-failover`],`session-affinity-attributes-zero-downtime-failover`,`text`)},session_affinity_ttl:m[`session-affinity-ttl`],steering_policy:f(m[`steering-policy`],`steering-policy`,`text`),ttl:m.ttl});a(await s(`Creating`,async()=>c.loadBalancers.account.create({..._,account_or_zone:h,account_or_zone_id:g})),{successLabel:`Created`})})};function ee(e){return e.usage(`$0 load-balancers account delete <load-balancer-id>
5
5
 
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- const e=`This command has no local equivalent. Re-run without --local to use the Cloudflare API.`;let t;async function n(){let e=t;t=void 0,await e?.()}function r(e={}){return async function(n,r){let{dispatchLocal:i,disposeLocalSession:a}=await import(`./local-runtime-C_fR3pz4.mjs`);return t=a,i(new Request(n,r),e.persistTo,e.apiBaseUrl)}}const i=`local`;export{n as i,e as n,r,i as t};
2
+ const e=`This command has no local equivalent. Re-run without --local to use the Cloudflare API.`;let t;async function n(){let e=t;t=void 0,await e?.()}function r(e={}){return async function(n,r){let{dispatchLocal:i,disposeLocalSession:a}=await import(`./local-runtime-Co5vVDlI.mjs`);return t=a,i(new Request(n,r),e.persistTo,e.apiBaseUrl)}}const i=`local`;export{n as i,e as n,r,i as t};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{r as e}from"./local-B3OyWKkW.mjs";export{e as createLocalFetch};
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{n as e}from"./local-CxYne8s2.mjs";import{i as t}from"./cf-O3gEaXYZ.mjs";import{n}from"./registry-kYRASukx.mjs";import{mkdtempSync as r,rmSync as i,statSync as a}from"node:fs";import{join as o,resolve as s}from"node:path";import{tmpdir as c}from"node:os";import{randomUUID as l}from"node:crypto";import{Miniflare as u}from"miniflare";const d=/^\/accounts\/[^/]+/;function f(e){let n=e!==void 0&&e!==``?o(s(process.cwd(),e),`v3`):o(t(),`state`,`v3`);try{if(!a(n).isDirectory())throw Error(`Local persistence path must be a directory: ${n}`)}catch(e){let t=e.code;if(t===`ENOENT`)return n;throw t===`ENOTDIR`?Error(`Local persistence path must be a directory: ${n}`):e}return n}let p;function m(e){let t=n(),a=r(o(c(),`cf-local-isolated-${process.pid}-`));try{return{mf:new u({unsafeLocalExplorer:!0,cf:!1,resourcePersistencePath:e,unsafeEnableSharedStorage:!0,isolatedResourcePersistencePath:a,unsafeDevRegistryPath:t,workers:[{config:{name:`cf-local-${l()}`,compatibilityDate:`2026-08-15`,manifest:{mainModule:`cf-local.mjs`,modules:{"cf-local.mjs":{type:`esm`,contents:`export default { fetch() { return new Response(null, { status: 404 }); } };`}}}}}]}),isolatedPersistRoot:a}}catch(e){throw i(a,{recursive:!0,force:!0}),e}}async function h(t,n,r){let i=new URL(t.url),a=new URL(r??`https://api.cloudflare.com/client/v4`).pathname.replace(/\/+$/,``),o=`http://localhost/cdn-cgi/local/explorer/api${i.pathname.slice(a.length).replace(d,``)||`/`}${i.search}`,s=new Headers(t.headers);s.delete(`Authorization`),s.set(`Host`,`localhost`);let c;try{c=p??=m(f(n))}catch(e){return g(500,`Could not start the local runtime: ${_(e)}`)}let l;try{let e={method:t.method,headers:[...s],redirect:`manual`,signal:t.signal};t.body!==null&&(e.body=t.body,e.duplex=`half`),l=await c.mf.dispatchFetch(o,e)}catch(e){return g(500,`The local runtime failed to answer: ${_(e)}`)}if(l.status===404&&l.headers.get(`content-type`)?.includes(`json`)!==!0){await l.body?.cancel();let n=new URL(o).pathname.replace(/^.*\/explorer\/api/,``);return g(404,`${e} The local explorer API does not implement ${t.method} ${n}.`)}return l}function g(e,t){return new Response(JSON.stringify({success:!1,errors:[{message:t}],messages:[],result:null}),{status:e,headers:{"content-type":`application/json`}})}function _(e){return e instanceof Error?e.message:String(e)}async function v(){let e=p;if(p=void 0,e!==void 0)try{let{mf:t,isolatedPersistRoot:n}=e;await t.dispose().finally(()=>i(n,{recursive:!0,force:!0}))}catch{}}export{h as dispatchLocal,v as disposeLocalSession};
2
+ import{n as e}from"./local-B3OyWKkW.mjs";import{i as t}from"./cf-O3gEaXYZ.mjs";import{n}from"./registry-DBMUTYqf.mjs";import{mkdtempSync as r,rmSync as i,statSync as a}from"node:fs";import{join as o,resolve as s}from"node:path";import{tmpdir as c}from"node:os";import{randomUUID as l}from"node:crypto";import{Miniflare as u}from"miniflare";const d=/^\/accounts\/[^/]+/;function f(e){let n=e!==void 0&&e!==``?o(s(process.cwd(),e),`v3`):o(t(),`state`,`v3`);try{if(!a(n).isDirectory())throw Error(`Local persistence path must be a directory: ${n}`)}catch(e){let t=e.code;if(t===`ENOENT`)return n;throw t===`ENOTDIR`?Error(`Local persistence path must be a directory: ${n}`):e}return n}let p;function m(e){let t=n(),a=r(o(c(),`cf-local-isolated-${process.pid}-`));try{return{mf:new u({unsafeLocalExplorer:!0,cf:!1,resourcePersistencePath:e,unsafeEnableSharedStorage:!0,isolatedResourcePersistencePath:a,unsafeDevRegistryPath:t,workers:[{config:{name:`cf-local-${l()}`,compatibilityDate:`2026-08-15`,manifest:{mainModule:`cf-local.mjs`,modules:{"cf-local.mjs":{type:`esm`,contents:`export default { fetch() { return new Response(null, { status: 404 }); } };`}}}}}]}),isolatedPersistRoot:a}}catch(e){throw i(a,{recursive:!0,force:!0}),e}}async function h(t,n,r){let i=new URL(t.url),a=new URL(r??`https://api.cloudflare.com/client/v4`).pathname.replace(/\/+$/,``),o=`http://localhost/cdn-cgi/local/explorer/api${i.pathname.slice(a.length).replace(d,``)||`/`}${i.search}`,s=new Headers(t.headers);s.delete(`Authorization`),s.set(`Host`,`localhost`);let c;try{c=p??=m(f(n))}catch(e){return g(500,`Could not start the local runtime: ${_(e)}`)}let l;try{let e={method:t.method,headers:[...s],redirect:`manual`,signal:t.signal};t.body!==null&&(e.body=t.body,e.duplex=`half`),l=await c.mf.dispatchFetch(o,e)}catch(e){return g(500,`The local runtime failed to answer: ${_(e)}`)}if(l.status===404&&l.headers.get(`content-type`)?.includes(`json`)!==!0){await l.body?.cancel();let n=new URL(o).pathname.replace(/^.*\/explorer\/api/,``);return g(404,`${e} The local explorer API does not implement ${t.method} ${n}.`)}return l}function g(e,t){return new Response(JSON.stringify({success:!1,errors:[{message:t}],messages:[],result:null}),{status:e,headers:{"content-type":`application/json`}})}function _(e){return e instanceof Error?e.message:String(e)}async function v(){let e=p;if(p=void 0,e!==void 0)try{let{mf:t,isolatedPersistRoot:n}=e;await t.dispose().finally(()=>i(n,{recursive:!0,force:!0}))}catch{}}export{h as dispatchLocal,v as disposeLocalSession};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{r as e}from"./theme-BIWQFmZ0.mjs";import{m as t,o as n}from"./chunk-RV27PEH3-Cws_30ln.mjs";import{a as r,n as i,r as a}from"./banner-ClclgnBn.mjs";import"./ui-BQxRjahW.mjs";import{c as o,d as s,i as c,l,o as u,p as d,r as f,s as p,u as m}from"./oauth-BYmfy7l7.mjs";import"./auth-3bFlHTVl.mjs";import{t as h}from"./output-CvQFJkvi.mjs";import g from"node:path";function _(e,t,n){if(!e.profile)return;let r=n?` ${n}`:``;throw Error(`The --profile flag cannot be used with \`cf auth ${t}\`.${r}`)}function v(){if(n({allowGlobalAuthKey:!1})!==void 0)throw Error(`Cannot manage auth profiles while CLOUDFLARE_API_TOKEN is set. Unset CLOUDFLARE_API_TOKEN and try again.`)}const y={command:`create <name>`,describe:`Create or re-authenticate a named auth profile`,builder:e=>e.positional(`name`,{type:`string`,description:`Name for the auth profile`,demandOption:!0}).option(`browser`,{type:`boolean`,description:`Open the authorization link in a browser (use --no-browser to print it instead)`,default:!0}).option(`device`,{type:`boolean`,description:`Use OAuth device authorization (use --no-device for the localhost callback flow)`,default:!0}).option(`scopes`,{type:`string`,array:!0,description:`The set of OAuth scopes to request`}),handler:async n=>{_(n,`create`,"Pass the profile name as the command argument: `cf auth create <name>`."),v(),t(n.name);let r=u().configs.exists(n.name);await l({browser:n.browser,device:n.device,scopes:n.scopes,profile:n.name}),console.log(a(r?`Profile "${n.name}" re-authenticated.`:`Profile "${n.name}" created.`)),console.log(i(`Run ${e.code(`cf auth activate ${n.name}`)} to use this profile in a directory.`))}},b={command:`delete <name>`,describe:`Delete a named auth profile`,builder:e=>e.positional(`name`,{type:`string`,description:`Name of the auth profile to delete`,demandOption:!0}),handler:async n=>{_(n,`delete`),v(),t(n.name);let r=u();if(!r.configs.exists(n.name))throw Error(`Profile "${n.name}" does not exist.`);let o=r.bindings.removeAllBindingsForProfile(n.name);if(o.length>0){console.log(a(`Removed directory bindings:`));for(let e of o)console.log(` ${e}`)}await m(n.name),r.configs.delete(n.name),console.log(a(`Profile "${n.name}" deleted.`));let s=r.bindings.getProfileForDirectory(process.cwd());s?console.log(a(`Active profile for this directory: ${s}.`)):r.configs.exists(`default`)?console.log(a(`This directory now uses the default profile.`)):console.log(i(`No active profile for this directory. Run ${e.code(`cf auth login`)} to set up the default profile, or ${e.code(`cf auth create <name>`)} to create a named profile.`))}},x={command:`activate <name> [dir]`,describe:`Bind a named auth profile to a directory`,builder:e=>e.positional(`name`,{type:`string`,description:`Name of the auth profile to activate`,demandOption:!0}).positional(`dir`,{type:`string`,description:`Directory to bind the profile to (defaults to current directory)`}),handler:e=>{_(e,`activate`,"Pass the profile name as the command argument: `cf auth activate <name>`."),v(),t(e.name);let n=u();if(!n.configs.exists(e.name))throw Error(`Profile "${e.name}" does not exist. Run \`cf auth create ${e.name}\` first.`);let r=e.dir??process.cwd();n.bindings.activate(e.name,r),console.log(a(`Profile "${e.name}" activated for "${g.resolve(r)}".`))}},S={command:`deactivate [dir]`,describe:`Remove the auth profile binding from a directory`,builder:e=>e.positional(`dir`,{type:`string`,description:`Directory to unbind (defaults to current directory). Must be the exact directory the profile was bound to.`}),handler:t=>{_(t,`deactivate`),v();let n=u(),r=t.dir??process.cwd(),{removedProfile:o,newResolution:s}=n.bindings.deactivate(r);console.log(a(`Profile "${o}" deactivated from "${g.resolve(r)}".`)),s.profile===void 0?console.log(i(`Run ${e.code(`cf auth login`)} to set up the default profile, or ${e.code(`cf auth create <name>`)} to create a named profile.`)):s.profile===`default`?console.log(a(`This directory now uses the default profile.`)):console.log(a(`Now using: ${s.profile} (${s.source}).`))}},C={command:`list`,describe:`List all auth profiles`,handler:e=>{_(e,`list`);let t=u(),n=t.bindings.read(),r={};for(let[e,t]of Object.entries(n))(r[t]??=[]).push(e);h(t.configs.list().map(e=>({name:e,boundDirectories:r[e]??[]})))}},w={safeFlags:[`force`,`browser`,`device`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}},T={command:`login`,describe:`Authenticate with Cloudflare`,builder:e=>e.option(`force`,{type:`boolean`,alias:`f`,description:`Force re-authentication even if already logged in`,default:!1}).option(`browser`,{type:`boolean`,description:`Open the authorization link in a browser (use --no-browser to print it instead)`,default:!0}).option(`device`,{type:`boolean`,description:`Use OAuth device authorization (use --no-device for the localhost callback flow)`,default:!0}).option(`scopes`,{type:`string`,array:!0,description:`The set of OAuth scopes to request`}),handler:async t=>{_(t,`login`,"Run `cf auth create <name>` to authenticate a named profile.");let n=f();if(n!==`default`&&console.log(r(`This directory has profile "${n}" active. \`cf auth login\` updates the default profile, not "${n}".\nTo re-authenticate "${n}", run \`cf auth create ${n}\`.`)),d(`default`),!t.force&&o()){if(await p()){let t=s();console.log(a(`You are already logged in.`)),console.log(`${e.info(`Config file:`)} ${e.muted(c())}`),t?.expiration_time&&console.log(`${e.info(`Token expires:`)} ${new Date(t.expiration_time).toLocaleString()}`),console.log(i(`Run ${e.code(`cf auth login --force`)} to re-authenticate, or ${e.code(`cf auth logout`)} to log out.`));return}console.log(r(`Existing tokens are invalid or expired. Starting fresh login...
2
+ import{r as e}from"./theme-BIWQFmZ0.mjs";import{m as t,o as n}from"./chunk-RV27PEH3-Cws_30ln.mjs";import{a as r,n as i,r as a}from"./banner-ClclgnBn.mjs";import"./ui-BQxRjahW.mjs";import{c as o,d as s,i as c,l,o as u,p as d,r as f,s as p,u as m}from"./oauth-CKeW8CqE.mjs";import"./auth-B_Utev-x.mjs";import{t as h}from"./output-CvQFJkvi.mjs";import g from"node:path";function _(e,t,n){if(!e.profile)return;let r=n?` ${n}`:``;throw Error(`The --profile flag cannot be used with \`cf auth ${t}\`.${r}`)}function v(){if(n({allowGlobalAuthKey:!1})!==void 0)throw Error(`Cannot manage auth profiles while CLOUDFLARE_API_TOKEN is set. Unset CLOUDFLARE_API_TOKEN and try again.`)}const y={command:`create <name>`,describe:`Create or re-authenticate a named auth profile`,builder:e=>e.positional(`name`,{type:`string`,description:`Name for the auth profile`,demandOption:!0}).option(`browser`,{type:`boolean`,description:`Open the authorization link in a browser (use --no-browser to print it instead)`,default:!0}).option(`device`,{type:`boolean`,description:`Use OAuth device authorization (use --no-device for the localhost callback flow)`,default:!0}).option(`scopes`,{type:`string`,array:!0,description:`The set of OAuth scopes to request`}),handler:async n=>{_(n,`create`,"Pass the profile name as the command argument: `cf auth create <name>`."),v(),t(n.name);let r=u().configs.exists(n.name);await l({browser:n.browser,device:n.device,scopes:n.scopes,profile:n.name}),console.log(a(r?`Profile "${n.name}" re-authenticated.`:`Profile "${n.name}" created.`)),console.log(i(`Run ${e.code(`cf auth activate ${n.name}`)} to use this profile in a directory.`))}},b={command:`delete <name>`,describe:`Delete a named auth profile`,builder:e=>e.positional(`name`,{type:`string`,description:`Name of the auth profile to delete`,demandOption:!0}),handler:async n=>{_(n,`delete`),v(),t(n.name);let r=u();if(!r.configs.exists(n.name))throw Error(`Profile "${n.name}" does not exist.`);let o=r.bindings.removeAllBindingsForProfile(n.name);if(o.length>0){console.log(a(`Removed directory bindings:`));for(let e of o)console.log(` ${e}`)}await m(n.name),r.configs.delete(n.name),console.log(a(`Profile "${n.name}" deleted.`));let s=r.bindings.getProfileForDirectory(process.cwd());s?console.log(a(`Active profile for this directory: ${s}.`)):r.configs.exists(`default`)?console.log(a(`This directory now uses the default profile.`)):console.log(i(`No active profile for this directory. Run ${e.code(`cf auth login`)} to set up the default profile, or ${e.code(`cf auth create <name>`)} to create a named profile.`))}},x={command:`activate <name> [dir]`,describe:`Bind a named auth profile to a directory`,builder:e=>e.positional(`name`,{type:`string`,description:`Name of the auth profile to activate`,demandOption:!0}).positional(`dir`,{type:`string`,description:`Directory to bind the profile to (defaults to current directory)`}),handler:e=>{_(e,`activate`,"Pass the profile name as the command argument: `cf auth activate <name>`."),v(),t(e.name);let n=u();if(!n.configs.exists(e.name))throw Error(`Profile "${e.name}" does not exist. Run \`cf auth create ${e.name}\` first.`);let r=e.dir??process.cwd();n.bindings.activate(e.name,r),console.log(a(`Profile "${e.name}" activated for "${g.resolve(r)}".`))}},S={command:`deactivate [dir]`,describe:`Remove the auth profile binding from a directory`,builder:e=>e.positional(`dir`,{type:`string`,description:`Directory to unbind (defaults to current directory). Must be the exact directory the profile was bound to.`}),handler:t=>{_(t,`deactivate`),v();let n=u(),r=t.dir??process.cwd(),{removedProfile:o,newResolution:s}=n.bindings.deactivate(r);console.log(a(`Profile "${o}" deactivated from "${g.resolve(r)}".`)),s.profile===void 0?console.log(i(`Run ${e.code(`cf auth login`)} to set up the default profile, or ${e.code(`cf auth create <name>`)} to create a named profile.`)):s.profile===`default`?console.log(a(`This directory now uses the default profile.`)):console.log(a(`Now using: ${s.profile} (${s.source}).`))}},C={command:`list`,describe:`List all auth profiles`,handler:e=>{_(e,`list`);let t=u(),n=t.bindings.read(),r={};for(let[e,t]of Object.entries(n))(r[t]??=[]).push(e);h(t.configs.list().map(e=>({name:e,boundDirectories:r[e]??[]})))}},w={safeFlags:[`force`,`browser`,`device`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}},T={command:`login`,describe:`Authenticate with Cloudflare`,builder:e=>e.option(`force`,{type:`boolean`,alias:`f`,description:`Force re-authentication even if already logged in`,default:!1}).option(`browser`,{type:`boolean`,description:`Open the authorization link in a browser (use --no-browser to print it instead)`,default:!0}).option(`device`,{type:`boolean`,description:`Use OAuth device authorization (use --no-device for the localhost callback flow)`,default:!0}).option(`scopes`,{type:`string`,array:!0,description:`The set of OAuth scopes to request`}),handler:async t=>{_(t,`login`,"Run `cf auth create <name>` to authenticate a named profile.");let n=f();if(n!==`default`&&console.log(r(`This directory has profile "${n}" active. \`cf auth login\` updates the default profile, not "${n}".\nTo re-authenticate "${n}", run \`cf auth create ${n}\`.`)),d(`default`),!t.force&&o()){if(await p()){let t=s();console.log(a(`You are already logged in.`)),console.log(`${e.info(`Config file:`)} ${e.muted(c())}`),t?.expiration_time&&console.log(`${e.info(`Token expires:`)} ${new Date(t.expiration_time).toLocaleString()}`),console.log(i(`Run ${e.code(`cf auth login --force`)} to re-authenticate, or ${e.code(`cf auth logout`)} to log out.`));return}console.log(r(`Existing tokens are invalid or expired. Starting fresh login...
3
3
  `))}else t.force&&o()&&console.log(a(`Re-authenticating...
4
4
  `));if(console.log(a(`Starting OAuth login flow...
5
5
  `)),!await l({browser:t.browser,device:t.device,scopes:t.scopes,profile:`default`})){console.log(r(`CLOUDFLARE_API_TOKEN is set and takes precedence. Unset it to log in via OAuth.`));return}let u=s();console.log(`${e.info(`Config file:`)} ${e.muted(c())}`),u?.scopes&&(u.scopes.length>5?(console.log(`${e.info(`Scopes:`)} ${u.scopes.length} selected`),console.log(i(`Run ${e.code(`cf auth whoami`)} to see the full list.`))):console.log(`${e.info(`Scopes:`)} ${u.scopes.join(`, `)}`)),u?.expiration_time&&console.log(`${e.info(`Token expires:`)} ${new Date(u.expiration_time).toLocaleString()}`)}};export{y as a,C as c,_ as i,w as n,S as o,x as r,b as s,T as t};
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{r as e}from"./theme-BIWQFmZ0.mjs";import{r as t}from"./banner-ClclgnBn.mjs";import"./ui-BQxRjahW.mjs";import{n}from"./run-BhfDNWCI.mjs";import"./telemetry-iBZ-f6og.mjs";import{n as r,t as i}from"./login-B2IW-LZC.mjs";var a=n({...i,describe:!1,handler:async n=>{n.quiet||console.error(t(`${e.code(`cf login`)} is an alias for ${e.code(`cf auth login`)}. Authentication commands are under ${e.code(`cf auth`)}.`)),await i.handler(n)}},{command:`login`,classification:r});export{a as default};
2
+ import{r as e}from"./theme-BIWQFmZ0.mjs";import{r as t}from"./banner-ClclgnBn.mjs";import"./ui-BQxRjahW.mjs";import{n}from"./run-CJ-6owN3.mjs";import"./telemetry-D2UwfCd1.mjs";import{n as r,t as i}from"./login-CptngugC.mjs";var a=n({...i,describe:!1,handler:async n=>{n.quiet||console.error(t(`${e.code(`cf login`)} is an alias for ${e.code(`cf auth login`)}. Authentication commands are under ${e.code(`cf auth`)}.`)),await i.handler(n)}},{command:`login`,classification:r});export{a as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-CxYne8s2.mjs";import{a as t,t as n}from"./context-5JRcefHh.mjs";import{r}from"./auth-3bFlHTVl.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-DUeNqM-j.mjs";import{t as s}from"./run-BhfDNWCI.mjs";import"./telemetry-iBZ-f6og.mjs";function c(e){return e.usage(`$0 logo-matches download get
2
+ import{t as e}from"./local-B3OyWKkW.mjs";import{a as t,t as n}from"./context-CPVzoKbN.mjs";import{r}from"./auth-B_Utev-x.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-DS2fwfNP.mjs";import{t as s}from"./run-CJ-6owN3.mjs";import"./telemetry-D2UwfCd1.mjs";function c(e){return e.usage(`$0 logo-matches download get
3
3
 
4
4
  Return matches as CSV for logo queries based on ID`).option(`logo-id`,{type:`string`,description:`Logo ID`}).option(`offset`,{type:`string`,description:`Offset`}).option(`limit`,{type:`string`,description:`Limit`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const l={command:`get`,describe:`Download matches for logo queries by ID`,builder:c,handler:async c=>s({command:`logo-matches download get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={logo_id:c[`logo-id`],offset:c.offset,limit:c.limit};if(c.dryRun){a({command:`cf logo-matches download get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/brand-protection/logo-matches/download`,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.logoMatches.download.get({account_id:u,...s})),{successLabel:`Loaded`})})},u={command:`download`,describe:`Operations for download`,builder:e=>e.command(l).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function d(e){return e.usage(`$0 logo-matches get
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-CxYne8s2.mjs";import{a as t,t as n}from"./context-5JRcefHh.mjs";import{a as r,r as i}from"./auth-3bFlHTVl.mjs";import{t as a}from"./output-CvQFJkvi.mjs";import{t as o}from"./dry-run-Bq0JAsbX.mjs";import{t as s}from"./progress-DUeNqM-j.mjs";import{t as c}from"./run-BhfDNWCI.mjs";import"./telemetry-iBZ-f6og.mjs";import{n as l,t as u}from"./input-validation-Dk52b0me.mjs";import{n as d}from"./prompt-DV6YTdoa.mjs";function f(e){return e.usage(`$0 logos create
2
+ import{t as e}from"./local-B3OyWKkW.mjs";import{a as t,t as n}from"./context-CPVzoKbN.mjs";import{a as r,r as i}from"./auth-B_Utev-x.mjs";import{t as a}from"./output-CvQFJkvi.mjs";import{t as o}from"./dry-run-Bq0JAsbX.mjs";import{t as s}from"./progress-DS2fwfNP.mjs";import{t as c}from"./run-CJ-6owN3.mjs";import"./telemetry-D2UwfCd1.mjs";import{n as l,t as u}from"./input-validation-Dk52b0me.mjs";import{n as d}from"./prompt-doX80PCd.mjs";function f(e){return e.usage(`$0 logos create
3
3
 
4
4
  Return new saved logo queries created from image files`).option(`tag`,{type:`string`,description:`Tag`}).option(`match-type`,{type:`string`,description:`Match type`}).option(`threshold`,{type:`number`,description:`Threshold`}).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 p={command:`create`,describe:`Create new saved logo queries from image files`,builder:f,handler:async d=>c({command:`logos create`,classification:{safeFlags:[`dry-run`]}},d,async()=>{let c={tag:d.tag,match_type:d[`match-type`],threshold:d.threshold};if(d.dryRun){o({command:`cf logos create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/brand-protection/logos`,pathParams:{},query:c,bodyKind:`octet-stream`,body:d.body});return}let f=await i(d),p=d.local?e:await n();if(d.accountId=p,d.file){let e=u(d.file);a(await s(`Creating`,async()=>r(f,`POST`,`/accounts/${p}/brand-protection/logos`,{body:e,headers:{"Content-Type":`application/x-www-form-urlencoded`}})),{successLabel:`Created`});return}if(d.body){let e=l(d.body,`body`,`binary`),t=new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();a(await s(`Creating`,async()=>r(f,`POST`,`/accounts/${p}/brand-protection/logos${t?`?`+t:``}`,{body:e,headers:{"Content-Type":`application/x-www-form-urlencoded`}})),{successLabel:`Created`});return}if(d.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function m(e){return e.usage(`$0 logos delete <logo-id>
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-CxYne8s2.mjs";import{a as t,i as n,t as r}from"./context-5JRcefHh.mjs";import{r as i}from"./auth-3bFlHTVl.mjs";import{t as a}from"./output-CvQFJkvi.mjs";import{t as o}from"./dry-run-Bq0JAsbX.mjs";import{t as s}from"./progress-DUeNqM-j.mjs";import{t as c}from"./run-BhfDNWCI.mjs";import"./telemetry-iBZ-f6og.mjs";import{n 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-DV6YTdoa.mjs";function m(e){return e.usage(`$0 logpush account-datasets fields get <dataset-id>
2
+ import{t as e}from"./local-B3OyWKkW.mjs";import{a as t,i as n,t as r}from"./context-CPVzoKbN.mjs";import{r as i}from"./auth-B_Utev-x.mjs";import{t as a}from"./output-CvQFJkvi.mjs";import{t as o}from"./dry-run-Bq0JAsbX.mjs";import{t as s}from"./progress-DS2fwfNP.mjs";import{t as c}from"./run-CJ-6owN3.mjs";import"./telemetry-D2UwfCd1.mjs";import{n 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-doX80PCd.mjs";function m(e){return e.usage(`$0 logpush account-datasets fields get <dataset-id>
3
3
 
4
4
  Lists all fields available for a dataset. The response result is. an object with key-value pairs, where keys are field names, and values are descriptions.`).positional(`dataset-id`,{type:`string`,description:`Name of the dataset. A list of supported datasets can be found on the [Developer Docs](https://developers.cloudflare.com/logs/reference/log-fields/).`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const h={command:`get <dataset-id>`,describe:`List fields`,builder:m,handler:async l=>c({command:`logpush account-datasets fields get`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=l.zone===void 0?await t():void 0,n=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf logpush account-datasets fields get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/logpush/datasets/${l[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(l[`dataset-id`]))}/fields`,pathParams:{"account-or-zone":String(n),"dataset-id":String(l[`dataset-id`]??``),"account-or-zone-id":String(r)},bodyKind:`none`});return}let c=await i(l),u=l.zone===void 0?`accounts`:`zones`,d=u===`zones`?await n({zone:l.zone},c,{quiet:l.quiet}):l.local?e:await r();u===`zones`?l.zoneId=d:l.accountId=d,a(await s(`Loading`,async()=>c.logpush.accountDatasets.fields.get({account_or_zone:u,account_or_zone_id:d,dataset_id:l[`dataset-id`]})),{successLabel:`Loaded`})})},g={command:`fields`,describe:`Operations for account-datasets.fields`,builder:e=>e.command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ee(e){return e.usage(`$0 logpush account-datasets jobs get <dataset-id>
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-CxYne8s2.mjs";import{a as t,i as n,t as r}from"./context-5JRcefHh.mjs";import{a as i,r as a}from"./auth-3bFlHTVl.mjs";import{t as o}from"./output-CvQFJkvi.mjs";import{t as s}from"./dry-run-Bq0JAsbX.mjs";import{t as c}from"./progress-DUeNqM-j.mjs";import{t as l}from"./run-BhfDNWCI.mjs";import"./telemetry-iBZ-f6og.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-DV6YTdoa.mjs";import{t as _}from"./cli-types-DoVT5q_M.mjs";function v(e){return e.usage(`$0 logs control cmb config create
2
+ import{t as e}from"./local-B3OyWKkW.mjs";import{a as t,i as n,t as r}from"./context-CPVzoKbN.mjs";import{a as i,r as a}from"./auth-B_Utev-x.mjs";import{t as o}from"./output-CvQFJkvi.mjs";import{t as s}from"./dry-run-Bq0JAsbX.mjs";import{t as c}from"./progress-DS2fwfNP.mjs";import{t as l}from"./run-CJ-6owN3.mjs";import"./telemetry-D2UwfCd1.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-doX80PCd.mjs";import{t as _}from"./cli-types-DoVT5q_M.mjs";function v(e){return e.usage(`$0 logs control cmb config create
3
3
 
4
4
  Updates CMB config.`).option(`allow-out-of-region-access`,{type:`boolean`,description:`Allow out of region access`}).option(`regions`,{type:`string`,description:`Name of the region.`}).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:`create`,describe:`Update CMB config`,builder:v,handler:async n=>l({command:`logs control cmb config create`,classification:{safeFlags:[`allow-out-of-region-access`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf logs control cmb config create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/logs/control/cmb/config`,pathParams:{},bodyKind:`json`,body:n.body===void 0?f({allow_out_of_region_access:n[`allow-out-of-region-access`],regions:p(n.regions,`regions`,`text`)}):u(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=u(n.body);o(await c(`Creating`,async()=>i.logs.control.cmb.config.create({body:e,account_id:l})),{successLabel:`Created`});return}let d=f({allow_out_of_region_access:n[`allow-out-of-region-access`],regions:p(n.regions,`regions`,`text`)});o(await c(`Creating`,async()=>i.logs.control.cmb.config.create({body:d,account_id:l})),{successLabel:`Created`})})};function b(e){return e.usage(`$0 logs control cmb config delete
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-CxYne8s2.mjs";import{a as t,t as n}from"./context-5JRcefHh.mjs";import{a as r,r as i}from"./auth-3bFlHTVl.mjs";import{t as a}from"./output-CvQFJkvi.mjs";import{t as o}from"./dry-run-Bq0JAsbX.mjs";import{t as s}from"./progress-DUeNqM-j.mjs";import{t as c}from"./run-BhfDNWCI.mjs";import"./telemetry-iBZ-f6og.mjs";import{i as l,n as u,t as d}from"./body-parser-hh2avzkz.mjs";import{n as f}from"./input-validation-Dk52b0me.mjs";import{a as p,i as m,n as h}from"./prompt-DV6YTdoa.mjs";import{t as g}from"./cli-types-DoVT5q_M.mjs";import{n as _,t as v}from"./raw-fetch-Cp3EaTcj.mjs";function ee(e){return e.usage(`$0 magic-cloud-networking catalog-syncs create
2
+ import{t as e}from"./local-B3OyWKkW.mjs";import{a as t,t as n}from"./context-CPVzoKbN.mjs";import{a as r,r as i}from"./auth-B_Utev-x.mjs";import{t as a}from"./output-CvQFJkvi.mjs";import{t as o}from"./dry-run-Bq0JAsbX.mjs";import{t as s}from"./progress-DS2fwfNP.mjs";import{t as c}from"./run-CJ-6owN3.mjs";import"./telemetry-D2UwfCd1.mjs";import{i as l,n as u,t as d}from"./body-parser-hh2avzkz.mjs";import{n as f}from"./input-validation-Dk52b0me.mjs";import{a as p,i as m,n as h}from"./prompt-doX80PCd.mjs";import{t as g}from"./cli-types-DoVT5q_M.mjs";import{n as _,t as v}from"./raw-fetch-_Z55VEDY.mjs";function ee(e){return e.usage(`$0 magic-cloud-networking catalog-syncs create
3
3
 
4
4
  Create a new Catalog Sync (Closed Beta).`).option(`forwarded`,{type:`string`,description:`The forwarded header`}).option(`description`,{type:`string`,description:`The description field`}).option(`destination-type`,{type:`string`,description:`The destination_type field`,choices:[`NONE`,`ZERO_TRUST_LIST`]}).option(`name`,{type:`string`,description:`The name field`}).option(`policy`,{type:`string`,description:`The policy field`}).option(`update-mode`,{type:`string`,description:`The update_mode field`,choices:[`AUTO`,`MANUAL`]}).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:`Create Catalog Sync`,builder:ee,handler:async h=>c({command:`magic-cloud-networking catalog-syncs create`,classification:{safeFlags:[`destination-type`,`update-mode`,`dry-run`]}},h,async()=>{let c={};if(h.forwarded!==void 0&&(c.forwarded=String(h.forwarded)),h.dryRun){o({command:`cf magic-cloud-networking catalog-syncs create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/cloud/catalog-syncs`,pathParams:{},bodyKind:`json`,body:h.body===void 0?d({description:f(h.description,`description`,`text`),destination_type:f(h[`destination-type`],`destination-type`,`text`),name:f(h.name,`name`,`text`),policy:f(h.policy,`policy`,`text`),update_mode:f(h[`update-mode`],`update-mode`,`text`)}):u(h.body)});return}let g=await i(h),_=h.local?e:await n();if(h.accountId=_,h.body){let e=u(h.body);a(await s(`Creating`,async()=>r(g,`POST`,`/accounts/${_}/magic/cloud/catalog-syncs`,{body:e,headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Created`});return}h[`destination-type`]===void 0&&(h[`destination-type`]=await m(`destination-type`,`The destination_type field`,[`NONE`,`ZERO_TRUST_LIST`])),h.name===void 0&&(h.name=await p(`name`,`The name field`)),h[`update-mode`]===void 0&&(h[`update-mode`]=await m(`update-mode`,`The update_mode field`,[`AUTO`,`MANUAL`]));let v={};h.description!==void 0&&l(v,[`description`],f(h.description,`description`,`text`)),h[`destination-type`]!==void 0&&l(v,[`destination_type`],f(h[`destination-type`],`destination-type`,`text`)),h.name!==void 0&&l(v,[`name`],f(h.name,`name`,`text`)),h.policy!==void 0&&l(v,[`policy`],f(h.policy,`policy`,`text`)),h[`update-mode`]!==void 0&&l(v,[`update_mode`],f(h[`update-mode`],`update-mode`,`text`)),a(await s(`Creating`,async()=>r(g,`POST`,`/accounts/${_}/magic/cloud/catalog-syncs`,{body:Object.keys(v).length>0?v:void 0,headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Created`})})};function y(e){return e.usage(`$0 magic-cloud-networking catalog-syncs delete <sync-id>
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-CxYne8s2.mjs";import{a as t,t as n}from"./context-5JRcefHh.mjs";import{a as r,r as i}from"./auth-3bFlHTVl.mjs";import{t as a}from"./output-CvQFJkvi.mjs";import{t as o}from"./dry-run-Bq0JAsbX.mjs";import{t as s}from"./progress-DUeNqM-j.mjs";import{t as c}from"./run-BhfDNWCI.mjs";import"./telemetry-iBZ-f6og.mjs";import{n as l,r as u,t as d}from"./body-parser-hh2avzkz.mjs";import{n as f}from"./input-validation-Dk52b0me.mjs";import{a as p,i as m,n as h}from"./prompt-DV6YTdoa.mjs";function g(e){return e.usage(`$0 magic-network-monitoring configs create
2
+ import{t as e}from"./local-B3OyWKkW.mjs";import{a as t,t as n}from"./context-CPVzoKbN.mjs";import{a as r,r as i}from"./auth-B_Utev-x.mjs";import{t as a}from"./output-CvQFJkvi.mjs";import{t as o}from"./dry-run-Bq0JAsbX.mjs";import{t as s}from"./progress-DS2fwfNP.mjs";import{t as c}from"./run-CJ-6owN3.mjs";import"./telemetry-D2UwfCd1.mjs";import{n as l,r as u,t as d}from"./body-parser-hh2avzkz.mjs";import{n as f}from"./input-validation-Dk52b0me.mjs";import{a as p,i as m,n as h}from"./prompt-doX80PCd.mjs";function g(e){return e.usage(`$0 magic-network-monitoring configs create
3
3
 
4
4
  Create a new network monitoring configuration.`).option(`default-sampling`,{type:`number`,description:`Fallback sampling rate of flow messages being sent in packets per second. This should match the packet sampling rate configured on the router.`,default:1}).option(`name`,{type:`string`,description:`The account name.`}).option(`router-ips`,{type:`string`,array:!0,description:`The router_ips field`}).option(`warp-devices`,{type:`string`,description:`The warp_devices field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const _={command:`create`,describe:`Create account configuration`,builder:g,handler:async r=>c({command:`magic-network-monitoring configs create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-network-monitoring configs create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/mnm/config`,pathParams:{},bodyKind:`json`,body:r.body===void 0?d({default_sampling:r[`default-sampling`],name:f(r.name,`name`,`text`),router_ips:r[`router-ips`],warp_devices:u(r[`warp-devices`],`warp-devices`)}):l(r.body)});return}let c=await i(r),m=r.local?e:await n();if(r.accountId=m,r.body){let e=l(r.body);a(await s(`Creating`,async()=>c.magicNetworkMonitoring.configs.create({...e,account_id:m})),{successLabel:`Created`});return}if(r[`default-sampling`]===void 0)throw Error(`--default-sampling is required (or pass --body with this field set).`);r.name===void 0&&(r.name=await p(`name`,`The account name.`));let h=d({default_sampling:r[`default-sampling`],name:f(r.name,`name`,`text`),router_ips:r[`router-ips`],warp_devices:u(r[`warp-devices`],`warp-devices`)});a(await s(`Creating`,async()=>c.magicNetworkMonitoring.configs.create({...h,account_id:m})),{successLabel:`Created`})})};function v(e){return e.usage(`$0 magic-network-monitoring configs delete
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-CxYne8s2.mjs";import{a as t,t as n}from"./context-5JRcefHh.mjs";import{a as r,r as i}from"./auth-3bFlHTVl.mjs";import{t as a}from"./output-CvQFJkvi.mjs";import{t as o}from"./dry-run-Bq0JAsbX.mjs";import{t as s}from"./progress-DUeNqM-j.mjs";import{t as c}from"./run-BhfDNWCI.mjs";import"./telemetry-iBZ-f6og.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,n as g}from"./prompt-DV6YTdoa.mjs";import{n as _,t as ee}from"./raw-fetch-Cp3EaTcj.mjs";function te(e){return e.usage(`$0 magic-transit advanced-dns-protection configs dns protection rules create
2
+ import{t as e}from"./local-B3OyWKkW.mjs";import{a as t,t as n}from"./context-CPVzoKbN.mjs";import{a as r,r as i}from"./auth-B_Utev-x.mjs";import{t as a}from"./output-CvQFJkvi.mjs";import{t as o}from"./dry-run-Bq0JAsbX.mjs";import{t as s}from"./progress-DS2fwfNP.mjs";import{t as c}from"./run-CJ-6owN3.mjs";import"./telemetry-D2UwfCd1.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,n as g}from"./prompt-doX80PCd.mjs";import{n as _,t as ee}from"./raw-fetch-_Z55VEDY.mjs";function te(e){return e.usage(`$0 magic-transit advanced-dns-protection configs dns protection rules create
3
3
 
4
4
  Create a DNS Protection rule for an account.`).option(`block-any-queries`,{type:`boolean`,description:`Whether to block DNS ANY queries. Optional. Defaults to true.`}).option(`burst-sensitivity`,{type:`string`,description:`The burst sensitivity. Must be one of 'low', 'medium', 'high'.`}).option(`name`,{type:`string`,description:`The name of the DNS Protection rule. Value is relative to the 'scope' setting. For 'global' scope, name should be 'global'. For either the 'region' or 'datacenter' scope, name should be the actual name of the region or datacenter, e.g., 'wnam' or 'lax'.`}).option(`profile-sensitivity`,{type:`string`,description:`The profile sensitivity. Recommended setting is 'low'. Must be one of 'low', 'medium', 'high', or 'very_high'.`}).option(`rate-sensitivity`,{type:`string`,description:`The rate sensitivity. Must be one of 'low', 'medium', 'high'.`}).option(`scope`,{type:`string`,description:`The scope for the DNS Protection rule. Must be one of 'global', 'region', or 'datacenter'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The new DNS Protection rule to add.`})}const v={command:`create`,describe:`Create DNS Protection rule.`,builder:te,handler:async r=>c({command:`magic-transit advanced-dns-protection configs dns protection rules create`,classification:{safeFlags:[`block-any-queries`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit advanced-dns-protection configs dns protection rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/advanced_dns_protection/configs/dns_protection/rules`,pathParams:{},bodyKind:`json`,body:r.body===void 0?f({block_any_queries:r[`block-any-queries`],burst_sensitivity:p(r[`burst-sensitivity`],`burst-sensitivity`,`text`),name:p(r.name,`name`,`text`),profile_sensitivity:p(r[`profile-sensitivity`],`profile-sensitivity`,`text`),rate_sensitivity:p(r[`rate-sensitivity`],`rate-sensitivity`,`text`),scope:p(r.scope,`scope`,`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.magicTransit.advancedDnsProtection.configs.dns.protection.rules.create({...e,account_id:l})),{successLabel:`Created`});return}r[`burst-sensitivity`]===void 0&&(r[`burst-sensitivity`]=await m(`burst-sensitivity`,`The burst sensitivity. Must be one of 'low', 'medium', 'high'.`)),r.name===void 0&&(r.name=await m(`name`,`The name of the DNS Protection rule. Value is relative to the 'scope' setting. For 'global' scope, name should be 'global'. For either the 'region' or 'datacenter' scope, name should be the actual name of the region or datacenter, e.g., 'wnam' or 'lax'.`)),r[`profile-sensitivity`]===void 0&&(r[`profile-sensitivity`]=await m(`profile-sensitivity`,`The profile sensitivity. Recommended setting is 'low'. Must be one of 'low', 'medium', 'high', or 'very_high'.`)),r[`rate-sensitivity`]===void 0&&(r[`rate-sensitivity`]=await m(`rate-sensitivity`,`The rate sensitivity. Must be one of 'low', 'medium', 'high'.`)),r.scope===void 0&&(r.scope=await m(`scope`,`The scope for the DNS Protection rule. Must be one of 'global', 'region', or 'datacenter'.`));let d=f({block_any_queries:r[`block-any-queries`],burst_sensitivity:p(r[`burst-sensitivity`],`burst-sensitivity`,`text`),name:p(r.name,`name`,`text`),profile_sensitivity:p(r[`profile-sensitivity`],`profile-sensitivity`,`text`),rate_sensitivity:p(r[`rate-sensitivity`],`rate-sensitivity`,`text`),scope:p(r.scope,`scope`,`text`)});a(await s(`Creating`,async()=>c.magicTransit.advancedDnsProtection.configs.dns.protection.rules.create({...d,account_id:l})),{successLabel:`Created`})})};function y(e){return e.usage(`$0 magic-transit advanced-dns-protection configs dns protection rules delete for account
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-CxYne8s2.mjs";import{a as t,t as n}from"./context-5JRcefHh.mjs";import{a as r,r as i}from"./auth-3bFlHTVl.mjs";import{t as a}from"./output-CvQFJkvi.mjs";import{t as o}from"./dry-run-Bq0JAsbX.mjs";import{t as s}from"./progress-DUeNqM-j.mjs";import{t as c}from"./run-BhfDNWCI.mjs";import"./telemetry-iBZ-f6og.mjs";import{i as l,n as u,t as d}from"./body-parser-hh2avzkz.mjs";import{n as f}from"./input-validation-Dk52b0me.mjs";import{a as p}from"./prompt-DV6YTdoa.mjs";import{t as m}from"./cli-types-DoVT5q_M.mjs";function h(e){return e.usage(`$0 managed-defense vulnerability-discovery reports get <scan-id>
2
+ import{t as e}from"./local-B3OyWKkW.mjs";import{a as t,t as n}from"./context-CPVzoKbN.mjs";import{a as r,r as i}from"./auth-B_Utev-x.mjs";import{t as a}from"./output-CvQFJkvi.mjs";import{t as o}from"./dry-run-Bq0JAsbX.mjs";import{t as s}from"./progress-DS2fwfNP.mjs";import{t as c}from"./run-CJ-6owN3.mjs";import"./telemetry-D2UwfCd1.mjs";import{i as l,n as u,t as d}from"./body-parser-hh2avzkz.mjs";import{n as f}from"./input-validation-Dk52b0me.mjs";import{a as p}from"./prompt-doX80PCd.mjs";import{t as m}from"./cli-types-DoVT5q_M.mjs";function h(e){return e.usage(`$0 managed-defense vulnerability-discovery reports get <scan-id>
3
3
 
4
4
  Gets the repository projection of the active operator-reviewed scan report. \`scan_id\` is the customer scan's stable request ID.`).positional(`scan-id`,{type:`string`,description:`Scan ID`,demandOption:!0}).option(`repo-id`,{type:`string`,description:`Repo ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`get <scan-id>`,describe:`Get reviewed vulnerability report`,builder:h,handler:async r=>c({command:`managed-defense vulnerability-discovery reports get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf managed-defense vulnerability-discovery reports get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/managed-defense/vulnerability-discovery/repos/${r[`repo-id`]==null?`<repo-id>`:encodeURIComponent(String(r[`repo-id`]))}/scans/${r[`scan-id`]==null?`<scan-id>`:encodeURIComponent(String(r[`scan-id`]))}/report`,pathParams:{"repo-id":String(r[`repo-id`]??``),"scan-id":String(r[`scan-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();r.accountId=l,a(await s(`Loading`,async()=>c.managedDefense.vulnerabilityDiscovery.reports.get({account_id:l,repo_id:r[`repo-id`],scan_id:r[`scan-id`]})),{successLabel:`Loaded`})})},_={command:`reports`,describe:`Operations for vulnerability-discovery.reports`,builder:e=>e.command(g).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function v(e){return e.usage(`$0 managed-defense vulnerability-discovery repositories create
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{i as e}from"./context-5JRcefHh.mjs";import{r as t}from"./auth-3bFlHTVl.mjs";import{t as n}from"./output-CvQFJkvi.mjs";import{t as r}from"./dry-run-Bq0JAsbX.mjs";import{t as i}from"./progress-DUeNqM-j.mjs";import{t as a}from"./run-BhfDNWCI.mjs";import"./telemetry-iBZ-f6og.mjs";import{n as o,r as s,t as c}from"./body-parser-hh2avzkz.mjs";import{n as l}from"./prompt-DV6YTdoa.mjs";function u(e){return e.usage(`$0 managed-transforms delete
2
+ import{i as e}from"./context-CPVzoKbN.mjs";import{r as t}from"./auth-B_Utev-x.mjs";import{t as n}from"./output-CvQFJkvi.mjs";import{t as r}from"./dry-run-Bq0JAsbX.mjs";import{t as i}from"./progress-DS2fwfNP.mjs";import{t as a}from"./run-CJ-6owN3.mjs";import"./telemetry-D2UwfCd1.mjs";import{n as o,r as s,t as c}from"./body-parser-hh2avzkz.mjs";import{n as l}from"./prompt-doX80PCd.mjs";function u(e){return e.usage(`$0 managed-transforms delete
3
3
 
4
4
  Disables all Managed Transforms.`).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 d={command:`delete`,describe:`Delete Managed Transforms`,builder:u,handler:async o=>a({command:`managed-transforms delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},o,async()=>{if(o.dryRun){r({command:`cf managed-transforms delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/managed_headers`,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});if(o.zoneId=s,!await l({force:!!o.force})){process.stderr.write(`Aborted.
5
5
  `);return}n(await i(`Deleting`,async()=>a.managedTransforms.delete({zone_id:s})),{successLabel:`Deleted`})})};function f(e){return e.usage(`$0 managed-transforms list
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-CxYne8s2.mjs";import{a as t,t as n}from"./context-5JRcefHh.mjs";import{r}from"./auth-3bFlHTVl.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-DUeNqM-j.mjs";import{t as s}from"./run-BhfDNWCI.mjs";import"./telemetry-iBZ-f6og.mjs";function c(e){return e.usage(`$0 matches download get
2
+ import{t as e}from"./local-B3OyWKkW.mjs";import{a as t,t as n}from"./context-CPVzoKbN.mjs";import{r}from"./auth-B_Utev-x.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-DS2fwfNP.mjs";import{t as s}from"./run-CJ-6owN3.mjs";import"./telemetry-D2UwfCd1.mjs";function c(e){return e.usage(`$0 matches download get
3
3
 
4
4
  Return matches as CSV for string queries based on ID`).option(`id`,{type:`string`,description:`ID`}).option(`offset`,{type:`number`,description:`Offset`}).option(`limit`,{type:`number`,description:`Limit`}).option(`include-domain-id`,{type:`boolean`,description:`Include domain ID`}).option(`include-dismissed`,{type:`boolean`,description:`Include dismissed`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const l={command:`get`,describe:`Download matches for string queries by ID`,builder:c,handler:async c=>s({command:`matches download get`,classification:{safeFlags:[`include-domain-id`,`include-dismissed`,`dry-run`]}},c,async()=>{let s={id:c.id,offset:c.offset,limit:c.limit,include_domain_id:c[`include-domain-id`],include_dismissed:c[`include-dismissed`]};if(c.dryRun){a({command:`cf matches download get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/brand-protection/matches/download`,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.matches.download.get({account_id:u,...s})),{successLabel:`Loaded`})})},u={command:`download`,describe:`Operations for download`,builder:e=>e.command(l).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function d(e){return e.usage(`$0 matches get
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-CxYne8s2.mjs";import{a as t,t as n}from"./context-5JRcefHh.mjs";import{r}from"./auth-3bFlHTVl.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-DUeNqM-j.mjs";import{t as s}from"./run-BhfDNWCI.mjs";import"./telemetry-iBZ-f6og.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-DV6YTdoa.mjs";import{t as h}from"./cli-types-DoVT5q_M.mjs";function g(e){return e.usage(`$0 mcp portals account-tool-call-analytics
2
+ import{t as e}from"./local-B3OyWKkW.mjs";import{a as t,t as n}from"./context-CPVzoKbN.mjs";import{r}from"./auth-B_Utev-x.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-DS2fwfNP.mjs";import{t as s}from"./run-CJ-6owN3.mjs";import"./telemetry-D2UwfCd1.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-doX80PCd.mjs";import{t as h}from"./cli-types-DoVT5q_M.mjs";function g(e){return e.usage(`$0 mcp portals account-tool-call-analytics
3
3
 
4
4
  Returns daily or monthly tool-call counts across the account.`).option(`granularity`,{type:`string`,description:`Granularity`,choices:[`daily`,`monthly`]}).option(`aggregate`,{type:`string`,description:`Aggregate`,choices:[`true`,`false`]}).option(`tz`,{type:`string`,description:`Tz`}).option(`days`,{type:`number`,description:`Daily trailing-window size; defaults to 7 and is ignored for monthly`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _={command:`account-tool-call-analytics`,describe:`Account-global MCP tool-call timeseries`,builder:h(g),handler:async c=>s({command:`mcp portals account-tool-call-analytics`,classification:{safeFlags:[`granularity`,`aggregate`,`dry-run`]}},c,async()=>{let s={granularity:c.granularity,aggregate:c.aggregate,tz:c.tz,days:c.days};if(c.dryRun){a({command:`cf mcp portals account-tool-call-analytics`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/access/ai-controls/mcp/analytics/tool-calls/timeseries`,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.mcp.portals.accountToolCallAnalytics({account_id:u,...s})),{successLabel:`Loaded`})})};function v(e){return e.usage(`$0 mcp portals create
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-CxYne8s2.mjs";import{a as t,t as n}from"./context-5JRcefHh.mjs";import{r}from"./auth-3bFlHTVl.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-DUeNqM-j.mjs";import{t as s}from"./run-BhfDNWCI.mjs";import"./telemetry-iBZ-f6og.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-DV6YTdoa.mjs";import{t as m}from"./cli-types-DoVT5q_M.mjs";function h(e){return e.usage(`$0 mesh nodes configurations get <tunnel-id>
2
+ import{t as e}from"./local-B3OyWKkW.mjs";import{a as t,t as n}from"./context-CPVzoKbN.mjs";import{r}from"./auth-B_Utev-x.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-DS2fwfNP.mjs";import{t as s}from"./run-CJ-6owN3.mjs";import"./telemetry-D2UwfCd1.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-doX80PCd.mjs";import{t as m}from"./cli-types-DoVT5q_M.mjs";function h(e){return e.usage(`$0 mesh nodes configurations get <tunnel-id>
3
3
 
4
4
  Gets the high-availability configuration for a WARP Connector tunnel.`).positional(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`get <tunnel-id>`,describe:`Get WARP Connector HA configuration`,builder:h,handler:async c=>s({command:`mesh nodes configurations get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf mesh nodes configurations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/warp_connector/${c[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(c[`tunnel-id`]))}/configurations`,pathParams:{"tunnel-id":String(c[`tunnel-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();c.accountId=l,i(await o(`Loading`,async()=>s.mesh.nodes.configurations.get({account_id:l,tunnel_id:c[`tunnel-id`]})),{successLabel:`Loaded`})})};function _(e){return e.usage(`$0 mesh nodes configurations update <tunnel-id>
5
5
 
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{r as e}from"./theme-BIWQFmZ0.mjs";import"./ui-BQxRjahW.mjs";import{i as t,r as n,t as r}from"./wrangler-migration-BDkh1_IV.mjs";function i(e){return e.positional(`path`,{type:`string`,description:`Path to a Wrangler configuration file`}).option(`bundler`,{choices:[`vite`,`wrangler`],description:`Bundler to use in the migrated project (defaults to vite when @cloudflare/vite-plugin is declared, otherwise wrangler)`}).option(`dry-run`,{type:`boolean`,default:!1,description:`Show the files that would change without writing them`}).option(`force`,{type:`boolean`,default:!1,description:`Run even if the Git worktree is not clean`}).option(`install`,{type:`boolean`,default:!0,description:`Install cf as a project dependency (use --no-install to skip)`})}function a(t){console.log(e.muted(t===`vite`?`Using the Vite bundler because @cloudflare/vite-plugin is declared. Pass --bundler wrangler to override.`:`Using the Wrangler bundler because @cloudflare/vite-plugin is not declared. Pass --bundler vite to override.`))}const o={command:`migrate [path]`,describe:`Migrate a Wrangler project to cf`,builder:i,handler:async e=>{let i=await n(e.path),o=e.bundler??await r(i);e.bundler===void 0&&a(o),await t(i,{bundler:o,dryRun:e[`dry-run`],force:e.force,installDependencies:e.install})}};export{o as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-CxYne8s2.mjs";import{a as t,t as n}from"./context-5JRcefHh.mjs";import{r}from"./auth-3bFlHTVl.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-DUeNqM-j.mjs";import{t as s}from"./run-BhfDNWCI.mjs";import"./telemetry-iBZ-f6og.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-DV6YTdoa.mjs";import{t as p}from"./cli-types-DoVT5q_M.mjs";function m(e){return e.usage(`$0 mtls-certificates associations get <mtls-certificate-id>
2
+ import{t as e}from"./local-B3OyWKkW.mjs";import{a as t,t as n}from"./context-CPVzoKbN.mjs";import{r}from"./auth-B_Utev-x.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-DS2fwfNP.mjs";import{t as s}from"./run-CJ-6owN3.mjs";import"./telemetry-D2UwfCd1.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-doX80PCd.mjs";import{t as p}from"./cli-types-DoVT5q_M.mjs";function m(e){return e.usage(`$0 mtls-certificates associations get <mtls-certificate-id>
3
3
 
4
4
  Lists all active associations between the certificate and Cloudflare services.`).positional(`mtls-certificate-id`,{type:`string`,description:`Certificate identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const h={command:`get <mtls-certificate-id>`,describe:`List mTLS certificate associations`,builder:m,handler:async c=>s({command:`mtls-certificates associations get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf mtls-certificates associations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/mtls_certificates/${c[`mtls-certificate-id`]==null?`<mtls-certificate-id>`:encodeURIComponent(String(c[`mtls-certificate-id`]))}/associations`,pathParams:{"mtls-certificate-id":String(c[`mtls-certificate-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();c.accountId=l,i(await o(`Loading`,async()=>s.mtlsCertificates.associations.get({account_id:l,mtls_certificate_id:c[`mtls-certificate-id`]})),{successLabel:`Loaded`})})},g={command:`associations`,describe:`Operations for associations`,builder:e=>e.command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function _(e){return e.usage(`$0 mtls-certificates create
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-CxYne8s2.mjs";import{a as t,t as n}from"./context-5JRcefHh.mjs";import{r}from"./auth-3bFlHTVl.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-DUeNqM-j.mjs";import{t as s}from"./run-BhfDNWCI.mjs";import"./telemetry-iBZ-f6og.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-DV6YTdoa.mjs";import{t as p}from"./cli-types-DoVT5q_M.mjs";function m(e){return e.usage(`$0 network routes cidr create
2
+ import{t as e}from"./local-B3OyWKkW.mjs";import{a as t,t as n}from"./context-CPVzoKbN.mjs";import{r}from"./auth-B_Utev-x.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-DS2fwfNP.mjs";import{t as s}from"./run-CJ-6owN3.mjs";import"./telemetry-D2UwfCd1.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-doX80PCd.mjs";import{t as p}from"./cli-types-DoVT5q_M.mjs";function m(e){return e.usage(`$0 network routes cidr create
3
3
 
4
4
  Routes a private network through a Cloudflare Tunnel.`).option(`comment`,{type:`string`,description:`Optional remark describing the route.`,default:``}).option(`network`,{type:`string`,description:`The private IPv4 or IPv6 range connected by the route, in CIDR notation.`}).option(`virtual-network-id`,{type:`string`,description:`UUID of the virtual network.`}).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:`Create a tunnel route`,builder:m,handler:async f=>s({command:`network routes cidr create`,classification:{safeFlags:[`dry-run`]}},f,async()=>{if(f.dryRun){a({command:`cf network routes cidr create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/teamnet/routes`,pathParams:{},bodyKind:`json`,body:f.body===void 0?l({comment:u(f.comment,`comment`,`text`),network:u(f.network,`network`,`text`),virtual_network_id:u(f[`virtual-network-id`],`virtual-network-id`,`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.network.routes.cidr.create({...e,account_id:p})),{successLabel:`Created`});return}f.network===void 0&&(f.network=await d(`network`,`The private IPv4 or IPv6 range connected by the route, in CIDR notation.`));let m=l({comment:u(f.comment,`comment`,`text`),network:u(f.network,`network`,`text`),virtual_network_id:u(f[`virtual-network-id`],`virtual-network-id`,`text`)});i(await o(`Creating`,async()=>s.network.routes.cidr.create({...m,account_id:p})),{successLabel:`Created`})})};function h(e){return e.usage(`$0 network routes cidr delete <route-id>
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-CxYne8s2.mjs";import{a as t,t as n}from"./context-5JRcefHh.mjs";import{r}from"./auth-3bFlHTVl.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-DUeNqM-j.mjs";import{t as s}from"./run-BhfDNWCI.mjs";import"./telemetry-iBZ-f6og.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-DV6YTdoa.mjs";function p(e){return e.usage(`$0 network-interconnects cnis create
2
+ import{t as e}from"./local-B3OyWKkW.mjs";import{a as t,t as n}from"./context-CPVzoKbN.mjs";import{r}from"./auth-B_Utev-x.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-DS2fwfNP.mjs";import{t as s}from"./run-CJ-6owN3.mjs";import"./telemetry-D2UwfCd1.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-doX80PCd.mjs";function p(e){return e.usage(`$0 network-interconnects cnis create
3
3
 
4
4
  Creates a new Cloud Network Interconnect (CNI) for private network connectivity between Cloudflare and your infrastructure. CNIs enable dedicated, high-performance network links.`).option(`account`,{type:`string`,description:`Customer account tag`}).option(`bgp-customer-asn`,{type:`number`,description:`ASN used on the customer end of the BGP session`}).option(`bgp-extra-prefixes`,{type:`string`,array:!0,description:`Extra set of static prefixes to advertise to the customer's end of the session`}).option(`bgp-md5-key`,{type:`string`,description:`MD5 key to use for session authentication.
5
5
 
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env node
2
+ import{t as e}from"./cli-exit-Dqoo6Jgb.mjs";import{n as t,t as n}from"./version-DyZwKU6l.mjs";import{t as r}from"./session-CjQFm10R.mjs";import{a as i,n as a,t as o}from"./cf-O3gEaXYZ.mjs";import{n as s}from"./context-CPVzoKbN.mjs";import{M as c,n as l}from"./interactive-C-o16XQs.mjs";import{i as u,o as d}from"./dist-DW47TUGh.mjs";const f={debug:(...e)=>{process.env.DEBUG&&console.error(...e)},info:(...e)=>console.error(...e),log:(...e)=>console.error(...e),warn:(...e)=>console.error(...e),error:(...e)=>console.error(...e)};var p=class extends Error{};async function m(n){if(l())throw new p;r(t);let i=await d({message:n});if(c(i)||typeof i!=`string`)throw new e(130,{cancelled:!0});return i}async function h(n,i){if(l())throw new p;r(t);let a=await u({message:n,options:i.choices.map(({title:e,value:t})=>({label:e,value:t}))});if(c(a)||typeof a!=`string`)throw new e(130,{cancelled:!0});return f.log(`To have cf automatically use this account for future commands in this project, you can update your \`cloudflare.config.ts\`:
3
+
4
+ import { defineConfig } from "cf/config";
5
+
6
+ export default defineConfig({
7
+ accountId: "${a}",
8
+ });
9
+ `),a}const g=o({logger:f,userAgent:n,prompt:m,select:h,isNoDefaultValueProvidedError:e=>e instanceof p});async function _(e,t){return g.getOrSelectAccountId({account_id:e,compliance_region:t?.complianceRegion??await s(t)})}function v(){return g.getActiveAccountId({})}async function y(){return g.fetchAllAccounts({compliance_region:await s()},{throwOnEmpty:!1})}async function b(e){if(e?.scopes&&!i(e.scopes))throw Error(`One or more of the requested scopes are not valid cf OAuth scopes.`);return g.login({compliance_region:await s()},{browser:e?.browser??!0,device:e?.device??!0,...e?.scopes&&{scopes:e.scopes},...e?.profile&&{profile:e.profile}})}function x(e){return g.logout(e)}function S(e){g.setProfile(e)}function C(){return g.getActiveProfile()}function w(){return a({logger:f})}function T(e,t=process.cwd()){let n=w().resolve({profile:e,cwd:t});return S(n),n}function E(){return g.getOAuthTokenFromLocalState()}function D(){return g.readAuthCredentials()?.oauth_token!==void 0}function O(){return g.readAuthCredentials()}function k(){return g.getCredentialStore().path()}export{_ as a,D as c,O as d,T as f,k as i,b as l,v as n,w as o,S as p,C as r,E as s,y as t,x as u};
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{a as e,f as t,n}from"./oauth-BYmfy7l7.mjs";export{n as getActiveAccountId,e as getOrSelectAccountId,t as resolveProfile};
2
+ import{a as e,f as t,n}from"./oauth-CKeW8CqE.mjs";export{n as getActiveAccountId,e as getOrSelectAccountId,t as resolveProfile};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-CxYne8s2.mjs";import{a as t,t as n}from"./context-5JRcefHh.mjs";import{r}from"./auth-3bFlHTVl.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-DUeNqM-j.mjs";import{t as s}from"./run-BhfDNWCI.mjs";import"./telemetry-iBZ-f6og.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-DV6YTdoa.mjs";function m(e){return e.usage(`$0 oauth-clients create
2
+ import{t as e}from"./local-B3OyWKkW.mjs";import{a as t,t as n}from"./context-CPVzoKbN.mjs";import{r}from"./auth-B_Utev-x.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-DS2fwfNP.mjs";import{t as s}from"./run-CJ-6owN3.mjs";import"./telemetry-D2UwfCd1.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-doX80PCd.mjs";function m(e){return e.usage(`$0 oauth-clients create
3
3
 
4
4
  Create a new OAuth client for an account.`).option(`allowed-cors-origins`,{type:`string`,array:!0,description:`Array of allowed CORS origins.`}).option(`client-name`,{type:`string`,description:`Human-readable name of the OAuth client.`}).option(`client-uri`,{type:`string`,description:`URL of the home page of the client.`}).option(`grant-types`,{type:`string`,array:!0,description:"Array of OAuth grant types the client is allowed to use. `authorization_code` is required; `refresh_token` may be included optionally."}).option(`logo-uri`,{type:`string`,description:`URL of the client's logo.`}).option(`optional-scopes`,{type:`string`,array:!0,description:"Scopes that the authorizing user may decline during consent. Each value must also appear in `scopes`. The scopes `openid`, `offline`, and `offline_access` cannot be optional."}).option(`policy-uri`,{type:`string`,description:`URL that points to a privacy policy document.`}).option(`post-logout-redirect-uris`,{type:`string`,array:!0,description:`Array of allowed post-logout redirect URIs.`}).option(`redirect-uris`,{type:`string`,array:!0,description:`Array of allowed redirect URIs for the client.`}).option(`response-types`,{type:`string`,array:!0,description:`Array of OAuth response types the client is allowed to use.`}).option(`scopes`,{type:`string`,array:!0,description:"Array of OAuth scopes the client is allowed to request. Colon-delimited scopes are not accepted. Dot-delimited scopes are validated against available OAuth API scopes; simple identity scopes are allowed. Protocol scopes `offline_access` and `openid` are added or removed automatically based on `grant_types` and `response_types`."}).option(`token-endpoint-auth-method`,{type:`string`,description:`The authentication method the client uses at the token endpoint.`,choices:[`none`,`client_secret_basic`,`client_secret_post`]}).option(`tos-uri`,{type:`string`,description:`URL that points to a terms of service document.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const h={command:`create`,describe:`Create OAuth Client`,builder:m,handler:async p=>s({command:`oauth-clients create`,classification:{safeFlags:[`token-endpoint-auth-method`,`dry-run`]}},p,async()=>{if(p.dryRun){a({command:`cf oauth-clients create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/oauth_clients`,pathParams:{},bodyKind:`json`,body:p.body===void 0?l({allowed_cors_origins:p[`allowed-cors-origins`],client_name:u(p[`client-name`],`client-name`,`text`),client_uri:u(p[`client-uri`],`client-uri`,`text`),grant_types:p[`grant-types`],logo_uri:u(p[`logo-uri`],`logo-uri`,`text`),optional_scopes:p[`optional-scopes`],policy_uri:u(p[`policy-uri`],`policy-uri`,`text`),post_logout_redirect_uris:p[`post-logout-redirect-uris`],redirect_uris:p[`redirect-uris`],response_types:p[`response-types`],scopes:p.scopes,token_endpoint_auth_method:u(p[`token-endpoint-auth-method`],`token-endpoint-auth-method`,`text`),tos_uri:u(p[`tos-uri`],`tos-uri`,`text`)}):c(p.body)});return}let s=await r(p),m=p.local?e:await n();if(p.accountId=m,p.body){let e=c(p.body);i(await o(`Creating`,async()=>s.oauthClients.create({...e,account_id:m})),{successLabel:`Created`});return}if(p[`client-name`]===void 0&&(p[`client-name`]=await d(`client-name`,`Human-readable name of the OAuth client.`)),p[`grant-types`]===void 0)throw Error(`--grant-types is required (or pass --body with this field set).`);if(p[`redirect-uris`]===void 0)throw Error(`--redirect-uris is required (or pass --body with this field set).`);if(p[`response-types`]===void 0)throw Error(`--response-types is required (or pass --body with this field set).`);if(p.scopes===void 0)throw Error(`--scopes is required (or pass --body with this field set).`);p[`token-endpoint-auth-method`]===void 0&&(p[`token-endpoint-auth-method`]=await f(`token-endpoint-auth-method`,`The authentication method the client uses at the token endpoint.`,[`none`,`client_secret_basic`,`client_secret_post`]));let h=l({allowed_cors_origins:p[`allowed-cors-origins`],client_name:u(p[`client-name`],`client-name`,`text`),client_uri:u(p[`client-uri`],`client-uri`,`text`),grant_types:p[`grant-types`],logo_uri:u(p[`logo-uri`],`logo-uri`,`text`),optional_scopes:p[`optional-scopes`],policy_uri:u(p[`policy-uri`],`policy-uri`,`text`),post_logout_redirect_uris:p[`post-logout-redirect-uris`],redirect_uris:p[`redirect-uris`],response_types:p[`response-types`],scopes:p.scopes,token_endpoint_auth_method:u(p[`token-endpoint-auth-method`],`token-endpoint-auth-method`,`text`),tos_uri:u(p[`tos-uri`],`tos-uri`,`text`)});i(await o(`Creating`,async()=>s.oauthClients.create({...h,account_id:m})),{successLabel:`Created`})})};function g(e){return e.usage(`$0 oauth-clients delete-rotated-secret <oauth-client-id>
5
5
 
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import{r as e}from"./auth-3bFlHTVl.mjs";import{t}from"./output-CvQFJkvi.mjs";import{t as n}from"./dry-run-Bq0JAsbX.mjs";import{t as r}from"./progress-DUeNqM-j.mjs";import{t as i}from"./run-BhfDNWCI.mjs";import"./telemetry-iBZ-f6og.mjs";function a(e){return e.usage(`$0 oauth-scopes list
2
+ import{r as e}from"./auth-B_Utev-x.mjs";import{t}from"./output-CvQFJkvi.mjs";import{t as n}from"./dry-run-Bq0JAsbX.mjs";import{t as r}from"./progress-DS2fwfNP.mjs";import{t as i}from"./run-CJ-6owN3.mjs";import"./telemetry-D2UwfCd1.mjs";function a(e){return e.usage(`$0 oauth-scopes list
3
3
 
4
4
  List all available OAuth scopes. This endpoint requires authentication but has no authorization role requirements.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const o={command:`list`,describe:`List OAuth Scopes`,builder:a,handler:async a=>i({command:`oauth-scopes list`,classification:{safeFlags:[`dry-run`]}},a,async()=>{if(a.dryRun){n({command:`cf oauth-scopes list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/oauth/scopes`,pathParams:{},bodyKind:`none`});return}let i=await e(a);t(await r(`Loading`,async()=>i.oauthScopes.list()),{successLabel:`Loaded`})})},s={command:`oauth-scopes`,describe:`oauth-scopes`,builder:e=>e.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-CxYne8s2.mjs";import{a as t,i as n,t as r}from"./context-5JRcefHh.mjs";import{r as i}from"./auth-3bFlHTVl.mjs";import{t as a}from"./output-CvQFJkvi.mjs";import{t as o}from"./dry-run-Bq0JAsbX.mjs";import{t as s}from"./progress-DUeNqM-j.mjs";import{t as c}from"./run-BhfDNWCI.mjs";import"./telemetry-iBZ-f6og.mjs";import{n as l,r as u,t as d}from"./body-parser-hh2avzkz.mjs";import{n as f}from"./input-validation-Dk52b0me.mjs";import{a as p,i as m,n as h}from"./prompt-DV6YTdoa.mjs";import{t as g}from"./cli-types-DoVT5q_M.mjs";function ee(e){return e.usage(`$0 observability destinations create
2
+ import{t as e}from"./local-B3OyWKkW.mjs";import{a as t,i as n,t as r}from"./context-CPVzoKbN.mjs";import{r as i}from"./auth-B_Utev-x.mjs";import{t as a}from"./output-CvQFJkvi.mjs";import{t as o}from"./dry-run-Bq0JAsbX.mjs";import{t as s}from"./progress-DS2fwfNP.mjs";import{t as c}from"./run-CJ-6owN3.mjs";import"./telemetry-D2UwfCd1.mjs";import{n as l,r as u,t as d}from"./body-parser-hh2avzkz.mjs";import{n as f}from"./input-validation-Dk52b0me.mjs";import{a as p,i as m,n as h}from"./prompt-doX80PCd.mjs";import{t as g}from"./cli-types-DoVT5q_M.mjs";function ee(e){return e.usage(`$0 observability destinations create
3
3
 
4
4
  Create a new Workers Observability Telemetry Destination.`).option(`configuration-type`,{type:`string`,description:`The configuration.type field`,choices:[`logpush`]}).option(`configuration-url`,{type:`string`,description:`The configuration.url field`}).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`name`,{type:`string`,description:`The name field`}).option(`skip-preflight-check`,{type:`boolean`,description:`The skipPreflightCheck 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 te={command:`create`,describe:`Create Destination`,builder:ee,handler:async n=>c({command:`observability destinations create`,classification:{safeFlags:[`configuration-type`,`enabled`,`skip-preflight-check`,`dry-run`]}},n,async()=>{if(n.dryRun){o({command:`cf observability destinations create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/workers/observability/destinations`,pathParams:{},bodyKind:`json`,body:n.body===void 0?d({configuration:{type:f(n[`configuration-type`],`configuration-type`,`text`),url:f(n[`configuration-url`],`configuration-url`,`text`)},enabled:n.enabled,name:f(n.name,`name`,`text`),skipPreflightCheck:n[`skip-preflight-check`]}):l(n.body)});return}let c=await i(n),u=n.local?e:await r();if(n.accountId=u,n.body){let e=l(n.body);a(await s(`Creating`,async()=>c.observability.destinations.create({...e,account_id:u})),{successLabel:`Created`});return}if(n[`configuration-type`]===void 0&&(n[`configuration-type`]=await m(`configuration-type`,`The configuration.type field`,[`logpush`])),n[`configuration-url`]===void 0&&(n[`configuration-url`]=await p(`configuration-url`,`The configuration.url field`)),n.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);n.name===void 0&&(n.name=await p(`name`,`The name field`));let h=d({configuration:{type:f(n[`configuration-type`],`configuration-type`,`text`),url:f(n[`configuration-url`],`configuration-url`,`text`)},enabled:n.enabled,name:f(n.name,`name`,`text`),skipPreflightCheck:n[`skip-preflight-check`]});a(await s(`Creating`,async()=>c.observability.destinations.create({...h,account_id:u})),{successLabel:`Created`})})};function _(e){return e.usage(`$0 observability destinations delete <slug>
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{r as e}from"./auth-3bFlHTVl.mjs";import{t}from"./output-CvQFJkvi.mjs";import{t as n}from"./dry-run-Bq0JAsbX.mjs";import{t as r}from"./progress-DUeNqM-j.mjs";import{t as i}from"./run-BhfDNWCI.mjs";import"./telemetry-iBZ-f6og.mjs";import{n as a,r 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,n as d}from"./prompt-DV6YTdoa.mjs";import{t as f}from"./cli-types-DoVT5q_M.mjs";function p(e){return e.usage(`$0 organization account list
2
+ import{r as e}from"./auth-B_Utev-x.mjs";import{t}from"./output-CvQFJkvi.mjs";import{t as n}from"./dry-run-Bq0JAsbX.mjs";import{t as r}from"./progress-DS2fwfNP.mjs";import{t as i}from"./run-CJ-6owN3.mjs";import"./telemetry-D2UwfCd1.mjs";import{n as a,r 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,n as d}from"./prompt-doX80PCd.mjs";import{t as f}from"./cli-types-DoVT5q_M.mjs";function p(e){return e.usage(`$0 organization account list
3
3
 
4
4
  Retrieve a list of accounts that belong to a specific organization. (Currently in Public Beta - see https://developers.cloudflare.com/fundamentals/organizations/)`).option(`organization-id`,{type:`string`,description:`The ID of the organization to retrieve a list of accounts for.`,demandOption:!0}).option(`account-pubname`,{type:`string`,description:`(case-insensitive) Filter the list of accounts to where the account_pubname is equal to
5
5
  a particular string.`}).option(`account-pubname-starts-with`,{type:`string`,description:`(case-insensitive) Filter the list of accounts to where the account_pubname starts with