cf 1.0.0-beta.2 → 1.0.0-beta.4

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 (311) hide show
  1. package/README.md +1 -0
  2. package/dist/_meta/commands.json +28143 -30372
  3. package/dist/_meta/hand-written-commands.json +72 -49
  4. package/dist/_meta/schemas.json +18731 -20305
  5. package/dist/{abuse-reports-JcwSaW-c.mjs → abuse-reports-L4L7sC0F.mjs} +1 -1
  6. package/dist/access-DUQisFsH.mjs +2 -0
  7. package/dist/{account-CLsfIk5j.mjs → account-J7N4Ukse.mjs} +1 -1
  8. package/dist/{account-tags-BJdDiyDi.mjs → account-tags-DMmTopgx.mjs} +1 -1
  9. package/dist/{accounts-6eXqIqSW.mjs → accounts-DbZdpH5e.mjs} +1 -1
  10. package/dist/{acm-ChNLnPqM.mjs → acm-BtXPdUqH.mjs} +1 -1
  11. package/dist/{addressing-z8ei_TCh.mjs → addressing-Bc_ZSmrK.mjs} +5 -5
  12. package/dist/{agent-memory-Un0usAVF.mjs → agent-memory-CEUI1wKI.mjs} +1 -1
  13. package/dist/{ai-Bj8kgDf7.mjs → ai-CFHaVQcc.mjs} +1 -1
  14. package/dist/{ai-audit-FR6QuDK_.mjs → ai-audit-guygqmOl.mjs} +1 -1
  15. package/dist/ai-gateway-BcKOL4WQ.mjs +80 -0
  16. package/dist/{ai-search-BvMeOKK6.mjs → ai-search-DJvNkX2o.mjs} +1 -1
  17. package/dist/{ai-security-BHvDKoM1.mjs → ai-security-CVaHbGzn.mjs} +1 -1
  18. package/dist/{alerting-DmRZCAjg.mjs → alerting-wy4IuGs7.mjs} +1 -1
  19. package/dist/{analytics-DqidJ4qc.mjs → analytics-Do4VMrPX.mjs} +2 -2
  20. package/dist/{analytics_engine-I7N0I6yP.mjs → analytics_engine-Cv7IF8ex.mjs} +1 -1
  21. package/dist/{api-security-BMNhdDyR.mjs → api-security-fuzV322d.mjs} +1 -1
  22. package/dist/{argo-U5TIBcub.mjs → argo-BBf-Jw0O.mjs} +1 -1
  23. package/dist/{artifacts-Byw1W73U.mjs → artifacts-B7_OhBxW.mjs} +1 -1
  24. package/dist/{audit-logs-C6zyFeKM.mjs → audit-logs-DyARgcxN.mjs} +1 -1
  25. package/dist/{auth-B5p3SIhO.mjs → auth-BYFcxn1F.mjs} +2 -2
  26. package/dist/{auth-CosaKfuk.mjs → auth-CiOv7s9F.mjs} +1 -1
  27. package/dist/{autoconfig-DED3bWob.mjs → autoconfig-DbL_FL5k.mjs} +74 -74
  28. package/dist/{banner-Xk4xBN8U.mjs → banner-ClclgnBn.mjs} +1 -1
  29. package/dist/{billing-BS1raRJt.mjs → billing-07_VIO4X.mjs} +1 -1
  30. package/dist/{bot-management-Cn6xfGzJ.mjs → bot-management-CmkPUu2I.mjs} +1 -1
  31. package/dist/{botnet-feed-DtWOPNfw.mjs → botnet-feed-Bn5pE_rx.mjs} +1 -1
  32. package/dist/{brand-protection-BcEQ66bT.mjs → brand-protection-CWDqPOXe.mjs} +1 -1
  33. package/dist/{browser-run-RZ7ZPRop.mjs → browser-run-CfEIfpnQ.mjs} +1 -1
  34. package/dist/build-BmLpTw4w.mjs +2 -0
  35. package/dist/build-DEbkHHVh.mjs +2 -0
  36. package/dist/{builds-AOCMH4CE.mjs → builds-mgouQLUs.mjs} +1 -1
  37. package/dist/{cache-D_EBxDff.mjs → cache-DXLofz5T.mjs} +1 -1
  38. package/dist/{certificate-authorities-B6rtjuaT.mjs → certificate-authorities-BfW-rEpf.mjs} +1 -1
  39. package/dist/{cf--3tGe71B.mjs → cf-O3gEaXYZ.mjs} +11 -11
  40. package/dist/{chunk-M77HNR46-BqG3fjQz.mjs → chunk-M77HNR46-DPbhuhiy.mjs} +1 -1
  41. package/dist/{chunk-RV27PEH3-C8_6bMgi.mjs → chunk-RV27PEH3-Cws_30ln.mjs} +30 -30
  42. package/dist/cli-Dgk9bd8j.mjs +6 -0
  43. package/dist/{client-certificates-uBOjGcgo.mjs → client-certificates-By2A46a2.mjs} +1 -1
  44. package/dist/{client-side-security-Bm7JwGaG.mjs → client-side-security-Bo6ZwJOS.mjs} +1 -1
  45. package/dist/{cloud-connector-69M2Dx8h.mjs → cloud-connector-DYb_3u-M.mjs} +1 -1
  46. package/dist/{cloudflared-Ba5LySkU.mjs → cloudflared-91JvyShh.mjs} +1 -1
  47. package/dist/{cloudforce-one-Xn2mlAPv.mjs → cloudforce-one-D8l0I5PL.mjs} +1 -1
  48. package/dist/command-BPfW-yE4.mjs +2 -0
  49. package/dist/{command-Cb0pS8T5.mjs → command-BgBsFEYv.mjs} +1 -1
  50. package/dist/{command-DEC5PwJo.mjs → command-C3Qhz4kU.mjs} +1 -1
  51. package/dist/command-C72KLHMc.mjs +2 -0
  52. package/dist/command-C7cOrHdI.mjs +2 -0
  53. package/dist/command-CGD1oByJ.mjs +2 -0
  54. package/dist/command-CJR1CUK_.mjs +2 -0
  55. package/dist/command-C_lQtSPg.mjs +2 -0
  56. package/dist/{command-DCpX9Cem.mjs → command-DH67hNLj.mjs} +1 -1
  57. package/dist/command-DJJN9xaA.mjs +2 -0
  58. package/dist/command-DRlUj6lW.mjs +2 -0
  59. package/dist/command-DYeBZ5mA.mjs +2 -0
  60. package/dist/command-DaAGN9uP.mjs +2 -0
  61. package/dist/{command-Cz_bKDWf.mjs → command-DjNcY4cf.mjs} +1 -1
  62. package/dist/command-gSmdvn_d.mjs +2 -0
  63. package/dist/{completions-DZDltM9V.mjs → completions-DUDx3DwX.mjs} +26 -26
  64. package/dist/{connector-interrupts-DTy6laab.mjs → connector-interrupts-DIMvaZhN.mjs} +1 -1
  65. package/dist/{connector-telemetry-events-CJqGGvFJ.mjs → connector-telemetry-events-TWQvm-cj.mjs} +1 -1
  66. package/dist/{connector-telemetry-snapshots-BPxhPhr6.mjs → connector-telemetry-snapshots-Dyoe-_R3.mjs} +1 -1
  67. package/dist/{connectors-CdfCcZuA.mjs → connectors-D7ZFg3hB.mjs} +1 -1
  68. package/dist/{containers-VMqcxH5a.mjs → containers-Bu3tLjU1.mjs} +1 -1
  69. package/dist/{containers-C7z53QcY.mjs → containers-CduXjFBJ.mjs} +88 -90
  70. package/dist/{content-scan-BirgZrmr.mjs → content-scan-CVBD6mUI.mjs} +1 -1
  71. package/dist/{context-Dzzbc9RK.mjs → context-BsGrhAqB.mjs} +2 -2
  72. package/dist/{cps-DzFm3zKp.mjs → cps-CgiRKmTe.mjs} +1 -1
  73. package/dist/{csamScanner-D2_OO5-1.mjs → csamScanner-BlXIOFFe.mjs} +1 -1
  74. package/dist/{ct-alerting-B7wQkFVl.mjs → ct-alerting-CJZK0uSQ.mjs} +1 -1
  75. package/dist/{custom-certificates-BKcCfbH8.mjs → custom-certificates-DFaj_czg.mjs} +1 -1
  76. package/dist/{custom-csrs-CXoOxir4.mjs → custom-csrs-BnFQpjOo.mjs} +1 -1
  77. package/dist/{custom-hostnames-CNYfnCOd.mjs → custom-hostnames-DSnE6xOT.mjs} +1 -1
  78. package/dist/{custom-nameservers-BlLM7a4L.mjs → custom-nameservers-CdQOt_qU.mjs} +1 -1
  79. package/dist/{custom-pages-BcWoypet.mjs → custom-pages-TWGlS6Ms.mjs} +1 -1
  80. package/dist/{d1-CvrHsqYY.mjs → d1-Cbqx2kAz.mjs} +1 -1
  81. package/dist/{dcv-delegation-9_Hl-5v-.mjs → dcv-delegation-DM3oGGio.mjs} +1 -1
  82. package/dist/delegate.mjs +1 -1
  83. package/dist/{deploy-BlXYtvTd.mjs → deploy-BZUWZ888.mjs} +1 -1
  84. package/dist/{deploy-input-DTXVZ2QJ.mjs → deploy-input-ChEbf2Kp.mjs} +1 -1
  85. package/dist/dev-OsbQIdD8.mjs +4 -0
  86. package/dist/{diagnostics-BxHs1EJB.mjs → diagnostics-8bbleTmW.mjs} +1 -1
  87. package/dist/{dialog-ClHoC_cG.mjs → dialog-BlUXJKbA.mjs} +1 -1
  88. package/dist/discover-DgHRf-qo.mjs +2 -0
  89. package/dist/discover-VRFBjse7.mjs +2 -0
  90. package/dist/{dist-CmyJy57B.mjs → dist-DTN-pqSs.mjs} +14 -14
  91. package/dist/{dist-Cpb7_h4N.mjs → dist-DW47TUGh.mjs} +1 -1
  92. package/dist/{dist-cGGV-p_F.mjs → dist-DfMipWKR.mjs} +3 -3
  93. package/dist/{dls-D7GXW-N3.mjs → dls-TzQpry2j.mjs} +1 -1
  94. package/dist/{dns-B0mdWJO5.mjs → dns-Bzv4YLeg.mjs} +1 -1
  95. package/dist/{dns-firewall-BG0bzuL3.mjs → dns-firewall-BjWwOmDR.mjs} +1 -1
  96. package/dist/{dot-prop-IITUZ2XW-BO5KJUwL.mjs → dot-prop-IITUZ2XW-BilKo4kO.mjs} +1 -1
  97. package/dist/dotenv-CcQjGlV0.mjs +4 -0
  98. package/dist/dry-run-Bq0JAsbX.mjs +2 -0
  99. package/dist/{durable-objects-DW0CsJzR.mjs → durable-objects-CRhSGkpc.mjs} +1 -1
  100. package/dist/{email-auth-Ls-7Yijm.mjs → email-auth-Bth4_FHy.mjs} +1 -1
  101. package/dist/{email-routing-DVaFhg-3.mjs → email-routing-CkTh4F5j.mjs} +1 -1
  102. package/dist/{email-security-vnwkqlgp.mjs → email-security-C-2jADxE.mjs} +1 -1
  103. package/dist/{email-sending-CbMUicJz.mjs → email-sending-B_sd4ouE.mjs} +1 -1
  104. package/dist/error-sanitization-Cu-8OKRA.mjs +2 -0
  105. package/dist/{error-sanitization-TV6O0aCD.mjs → error-sanitization-Dc4bLj8k.mjs} +1 -1
  106. package/dist/{fieldExtractors-2EkDoJg8.mjs → fieldExtractors-z92V55-Y.mjs} +1 -1
  107. package/dist/{firewall-BK4QYqRe.mjs → firewall-0yKpxdjj.mjs} +1 -1
  108. package/dist/{flagship--lHQ0H3n.mjs → flagship-IRVq23te.mjs} +1 -1
  109. package/dist/{fraud-CaoRrQ8W.mjs → fraud-BpJ_aoIE.mjs} +1 -1
  110. package/dist/{generate-CrKNH6ms.mjs → generate-iV6OVNin.mjs} +1 -1
  111. package/dist/generate-qMU-2MgC.mjs +2 -0
  112. package/dist/{google-tag-gateway-DDzLPmk5.mjs → google-tag-gateway-DA_7SCC3.mjs} +1 -1
  113. package/dist/gt-DmcMNPX6.mjs +2 -0
  114. package/dist/{healthchecks-Q2uXvt4m.mjs → healthchecks-C-GthoQz.mjs} +1 -1
  115. package/dist/{hostnames-CsaYnis6.mjs → hostnames-CH6utzVv.mjs} +1 -1
  116. package/dist/{hyperdrive-DDr6sAkw.mjs → hyperdrive-_rIC33bB.mjs} +1 -1
  117. package/dist/{iam-CmzocepZ.mjs → iam-sseKl99z.mjs} +1 -1
  118. package/dist/{images-Ux0Phsbi.mjs → images-CvIOwtg0.mjs} +1 -1
  119. package/dist/index.mjs +1 -1
  120. package/dist/{init-Nx4RRgfT.mjs → init-DEIhItNF.mjs} +2 -2
  121. package/dist/{intel-bgS4g7nx.mjs → intel-Da84oZMO.mjs} +1 -1
  122. package/dist/interactive-SgAjen2z.mjs +2 -0
  123. package/dist/{ips-BDiolgWF.mjs → ips-zTTd_3jg.mjs} +1 -1
  124. package/dist/{keyless-certificates-C_TwTMql.mjs → keyless-certificates-BGOUKdJc.mjs} +1 -1
  125. package/dist/{keys-Cr8AqQDY.mjs → keys-CDnrfmiS.mjs} +1 -1
  126. package/dist/kv-C5jR7vjM.mjs +15 -0
  127. package/dist/lazy-command-DZtpMsVB.mjs +2 -0
  128. package/dist/{leaked-credential-checks-De7ph4VA.mjs → leaked-credential-checks-B7WSzVG3.mjs} +1 -1
  129. package/dist/{load-balancers-DXt4ndF4.mjs → load-balancers-DG9wMQUM.mjs} +1 -1
  130. package/dist/{local-OKXweFsd.mjs → local-B3OyWKkW.mjs} +1 -1
  131. package/dist/local-qOpZjDed.mjs +2 -0
  132. package/dist/{local-runtime-tTYpniPS.mjs → local-runtime-Co5vVDlI.mjs} +1 -1
  133. package/dist/{login-BurQ63Ws.mjs → login-k3QLVysD.mjs} +1 -1
  134. package/dist/{login-CmlHvH5k.mjs → login-rJanUgdL.mjs} +1 -1
  135. package/dist/{logo-matches-CQ60P96J.mjs → logo-matches-5nijgkg7.mjs} +1 -1
  136. package/dist/{logos-u7UwT8MH.mjs → logos-BRRqg8_2.mjs} +1 -1
  137. package/dist/{logpush-IoIe8e80.mjs → logpush-Br7H8sRD.mjs} +1 -1
  138. package/dist/{logs-ih5tyXEE.mjs → logs-CBU44LT8.mjs} +1 -1
  139. package/dist/{magic-cloud-networking-CWNFnjcY.mjs → magic-cloud-networking-Bu7O7wKz.mjs} +1 -1
  140. package/dist/{magic-network-monitoring-ClfZleF8.mjs → magic-network-monitoring-Bnc--4Jr.mjs} +1 -1
  141. package/dist/{magic-transit-D69pkEVW.mjs → magic-transit-Dxr86HKN.mjs} +1 -1
  142. package/dist/{managed-defense-BHdmL0vx.mjs → managed-defense-Bm_jKFTN.mjs} +1 -1
  143. package/dist/{managed-transforms-DbCR4LUg.mjs → managed-transforms-D5mvHv_N.mjs} +1 -1
  144. package/dist/{matches-Cou6RVkh.mjs → matches-Dhc1eSWw.mjs} +1 -1
  145. package/dist/{mcp-CQYfM19s.mjs → mcp-B-PBoBl5.mjs} +1 -1
  146. package/dist/{mesh-CXqaAFS4.mjs → mesh-CW8B4naI.mjs} +1 -1
  147. package/dist/migrate-B4kBnkpV.mjs +2 -0
  148. package/dist/{mtls-certificates-DNeId8xS.mjs → mtls-certificates-swvfPqA2.mjs} +1 -1
  149. package/dist/{network-interconnects-BNon8iUs.mjs → network-interconnects-CjXYZC4g.mjs} +1 -1
  150. package/dist/{network-B7V3JbU7.mjs → network-iwRBn0i7.mjs} +1 -1
  151. package/dist/{oauth-DM8q-TYg.mjs → oauth-CrTr-mRe.mjs} +1 -1
  152. package/dist/oauth-DJW_HyaL.mjs +9 -0
  153. package/dist/{oauth-clients-gGmWIWHl.mjs → oauth-clients-DGUJzFFu.mjs} +1 -1
  154. package/dist/{oauth-scopes-DSEu331u.mjs → oauth-scopes-Bl0YUOHt.mjs} +1 -1
  155. package/dist/{observability-_VJhfwM1.mjs → observability-DRHiMrLy.mjs} +1 -1
  156. package/dist/{open-PCXX3ZDZ-DobJT1Mj.mjs → open-PCXX3ZDZ-BKRik1gi.mjs} +3 -3
  157. package/dist/{organization-DW4EpwGl.mjs → organization-BoMJzks7.mjs} +1 -1
  158. package/dist/{organizations-DE1g2wVq.mjs → organizations-UGtCHzSq.mjs} +1 -1
  159. package/dist/{origin-ca-certificates-D3ULDV__.mjs → origin-ca-certificates-CdByaOCe.mjs} +1 -1
  160. package/dist/{origin-post-quantum-encryption-BLropaz7.mjs → origin-post-quantum-encryption-GjmifGkF.mjs} +1 -1
  161. package/dist/{origin-tls-client-auth-C87TG2i_.mjs → origin-tls-client-auth-CCIqSj_C.mjs} +1 -1
  162. package/dist/{output-CZt-berV.mjs → output-CvQFJkvi.mjs} +1 -1
  163. package/dist/{page-rules-tlb9P-7V.mjs → page-rules-Btn-r3QF.mjs} +1 -1
  164. package/dist/pages-iil93G96.mjs +60 -0
  165. package/dist/{pay-per-crawl-C50wI-Iz.mjs → pay-per-crawl-DcAZuk9T.mjs} +1 -1
  166. package/dist/{pay-per-use-DHHIvynU.mjs → pay-per-use-z0Iwy9rN.mjs} +1 -1
  167. package/dist/{pipelines-Y2icOwuf.mjs → pipelines-YRPwntqo.mjs} +1 -1
  168. package/dist/{precursor-DeyurJSC.mjs → precursor-Bcww14RH.mjs} +1 -1
  169. package/dist/previews-BBn-IiQu.mjs +4 -0
  170. package/dist/{progress-C9dWgc3J.mjs → progress-5nsUpQL6.mjs} +1 -1
  171. package/dist/{prompt-Mh69ni1N.mjs → prompt-Ba_bys2F.mjs} +1 -1
  172. package/dist/{queries-DyUJefwL.mjs → queries-lxdncISw.mjs} +1 -1
  173. package/dist/{queues-CdNe4tGY.mjs → queues-Egb0KXYK.mjs} +1 -1
  174. package/dist/r2-BD4NOkR7.mjs +132 -0
  175. package/dist/{r2-data-catalog-D_zDlmVD.mjs → r2-data-catalog-CI-oHtKe.mjs} +1 -1
  176. package/dist/{radar-CSguicKC.mjs → radar-B4dtfeBP.mjs} +1 -1
  177. package/dist/{raw-fetch-1ygCOcT_.mjs → raw-fetch-AX_Gz3c3.mjs} +1 -1
  178. package/dist/{realtime-CvWs5pi3.mjs → realtime-CtLXkW8l.mjs} +1 -1
  179. package/dist/{registrar-DQUxn0FK.mjs → registrar-I9XClUOe.mjs} +1 -1
  180. package/dist/{registrar-sandbox-Q7ZEmg2x.mjs → registrar-sandbox-DAqK58QS.mjs} +1 -1
  181. package/dist/{registry-4Sw95M5_.mjs → registry-DBMUTYqf.mjs} +1 -1
  182. package/dist/{reporting-DJShxeDv.mjs → reporting-BYsEUCIE.mjs} +1 -1
  183. package/dist/{request-headers-DFBBErJg.mjs → request-headers-sc4CaZX0.mjs} +1 -1
  184. package/dist/{request-tracers-DD8HlG61.mjs → request-tracers-DXr9Dr2z.mjs} +1 -1
  185. package/dist/resolve-PZuJ878-.mjs +2 -0
  186. package/dist/{resource-sharing-J46JMWQP.mjs → resource-sharing-DgbnNgCQ.mjs} +1 -1
  187. package/dist/{resource-tagging-DLZJLIqy.mjs → resource-tagging-CjPU8PpX.mjs} +1 -1
  188. package/dist/{rules-D068LfBR.mjs → rules-BrshTdy1.mjs} +1 -1
  189. package/dist/{rulesets-Cz6P7Oje.mjs → rulesets-BZulblVp.mjs} +1 -1
  190. package/dist/{rum-C6GQC2vI.mjs → rum-B4IRlWgy.mjs} +1 -1
  191. package/dist/run-BQGVl3vg.mjs +2 -0
  192. package/dist/run-UHTbUldP.mjs +2 -0
  193. package/dist/{schema-VZPw_2CY.mjs → schema-CueLBLXC.mjs} +1 -1
  194. package/dist/{schema-flags-BmY0Nzp0.mjs → schema-flags-C4KmiKur.mjs} +1 -1
  195. package/dist/{scim-DMTp_Zhc.mjs → scim-BL2TVEZM.mjs} +1 -1
  196. package/dist/{sdk-BuF3fTHr.mjs → sdk-Bx29ZKK3.mjs} +2 -2
  197. package/dist/{secrets-store-C2epk0sQ.mjs → secrets-store-BcyhU7Kj.mjs} +1 -1
  198. package/dist/{security-center-DwMdQ02Y.mjs → security-center-D1LSkhL_.mjs} +1 -1
  199. package/dist/{security-txt-CORQfMul.mjs → security-txt-BGIj4nU3.mjs} +1 -1
  200. package/dist/{session-BEXskZi2.mjs → session-CjQFm10R.mjs} +1 -1
  201. package/dist/shared-jqlTaG5K.mjs +2 -0
  202. package/dist/{smart-shield-BZ0xjy_6.mjs → smart-shield-C8mGSzyE.mjs} +1 -1
  203. package/dist/{snippets-LSkJGDOc.mjs → snippets-BmHMaKEZ.mjs} +1 -1
  204. package/dist/spawn-IM_tQldH.mjs +10 -0
  205. package/dist/{spectrum-zU8_GFTV.mjs → spectrum-CrGKTMx-.mjs} +1 -1
  206. package/dist/{speed-4XbFmeYM.mjs → speed-yyPLwj5X.mjs} +1 -1
  207. package/dist/src-DFnlH5Tg.mjs +109 -0
  208. package/dist/{ssl-DiCsMY_a.mjs → ssl-DZ6G7pP_.mjs} +1 -1
  209. package/dist/startup-profile-B0UCc9_J.mjs +2 -0
  210. package/dist/{startup-profile-6fCkD04r.mjs → startup-profile-DrV846S5.mjs} +3 -3
  211. package/dist/{state-DiHwKWTy.mjs → state-DhHOAdTo.mjs} +1 -1
  212. package/dist/state-Dyo8DcW7.mjs +2 -0
  213. package/dist/{stream-BG3NUAVE.mjs → stream-hoBmKs9X.mjs} +1 -1
  214. package/dist/{submit-CKSaSFS1.mjs → submit-Lfebq3yj.mjs} +1 -1
  215. package/dist/{tags-uT9Mi-bX.mjs → tags-CnHv__u_.mjs} +1 -1
  216. package/dist/telemetry-C3hmM9Q9.mjs +2 -0
  217. package/dist/telemetry-DbAo3nvk.mjs +2 -0
  218. package/dist/{tenant--UrYFHM0.mjs → tenant-7CL844dh.mjs} +1 -1
  219. package/dist/{tenant-custom-nameservers-8Z4TVJtr.mjs → tenant-custom-nameservers-CZL9_D8w.mjs} +1 -1
  220. package/dist/{tools-DNGD0l7I.mjs → tools-BJbI_f35.mjs} +1 -1
  221. package/dist/{tunnels-5lGSXYpl.mjs → tunnels-DuO8F5_h.mjs} +1 -1
  222. package/dist/{turnstile-CT3AkMPV.mjs → turnstile-B-6k-bKa.mjs} +1 -1
  223. package/dist/{ui-D1hhIDIs.mjs → ui-BQxRjahW.mjs} +1 -1
  224. package/dist/update-check-BDMPumcv.mjs +2 -0
  225. package/dist/update-check-g9Jcn6YJ.mjs +2 -0
  226. package/dist/update-check-worker.mjs +1 -1
  227. package/dist/{url-info-DvpNcNl8.mjs → url-info-C6-jj9nl.mjs} +1 -1
  228. package/dist/{url-normalization-C9URZnpq.mjs → url-normalization-BRSTQe20.mjs} +1 -1
  229. package/dist/{url-scanner-CIwK3wB5.mjs → url-scanner-DER5YAdW.mjs} +1 -1
  230. package/dist/{user-DGA7cqdf.mjs → user-foSeF-0m.mjs} +1 -1
  231. package/dist/{values-BzS0b25w.mjs → values-DgBNckq9.mjs} +1 -1
  232. package/dist/{vectorize-DtDjl2fJ.mjs → vectorize-9AZMN3fN.mjs} +1 -1
  233. package/dist/version-DLvRzH-I.mjs +2 -0
  234. package/dist/{waiting-rooms-CjTh4F3B.mjs → waiting-rooms-CUc0Xqp0.mjs} +1 -1
  235. package/dist/{web-assets-4l1B5V9b.mjs → web-assets-D5LUB5UO.mjs} +1 -1
  236. package/dist/{web3-C0Z4AJjC.mjs → web3-BvOpojFR.mjs} +1 -1
  237. package/dist/workers-Cko7OnFE.mjs +40 -0
  238. package/dist/{workers-builds-DYGeoxmX.mjs → workers-builds-BFqiT0GR.mjs} +1 -1
  239. package/dist/{workers-for-platforms-CSw0K8Nl.mjs → workers-for-platforms-EVE01qsM.mjs} +1 -1
  240. package/dist/{workers-vpc-DJ7Couct.mjs → workers-vpc-9xBzFjiF.mjs} +1 -1
  241. package/dist/{workflows-Dm03QT8U.mjs → workflows-BS0EGixd.mjs} +1 -1
  242. package/dist/wrangler-migration-BDkh1_IV.mjs +2 -0
  243. package/dist/{zaraz-DJbWUUe3.mjs → zaraz-DBccJ-ZM.mjs} +1 -1
  244. package/dist/{zero-trust-DiMY-pN5.mjs → zero-trust-DGagti-V.mjs} +431 -281
  245. package/dist/{zone-BWjBv1yy.mjs → zone-B4OniptR.mjs} +1 -1
  246. package/dist/{zones-zGqcQvcY.mjs → zones-DYuGVoTH.mjs} +1 -1
  247. package/package.json +1 -1
  248. package/dist/access-B3TvAe5h.mjs +0 -27
  249. package/dist/ai-gateway-DrQhTvKf.mjs +0 -147
  250. package/dist/build-DG8NfVjJ.mjs +0 -2
  251. package/dist/build-kgS7iKwi.mjs +0 -2
  252. package/dist/cli-Ct980dyx.mjs +0 -3
  253. package/dist/command-B7SzqjQM.mjs +0 -2
  254. package/dist/command-BLHcNQ8m.mjs +0 -2
  255. package/dist/command-BxQbIQWT.mjs +0 -2
  256. package/dist/command-C0SMCHZp.mjs +0 -2
  257. package/dist/command-CE8k5TuK.mjs +0 -2
  258. package/dist/command-CPiCDUth.mjs +0 -2
  259. package/dist/command-DHjsstFb.mjs +0 -2
  260. package/dist/command-MTUsmZU5.mjs +0 -2
  261. package/dist/command-Sb9lOxWT.mjs +0 -2
  262. package/dist/command-sQ8yswii.mjs +0 -2
  263. package/dist/config-DcppJ5D2.mjs +0 -2
  264. package/dist/data-security-BxzLSdGk.mjs +0 -71
  265. package/dist/dev-reqdKM28.mjs +0 -4
  266. package/dist/dry-run-BmzTxDtZ.mjs +0 -2
  267. package/dist/error-sanitization-cyGBhW1Z.mjs +0 -2
  268. package/dist/generate-Djb5Af37.mjs +0 -2
  269. package/dist/interactive-B_dcVghB.mjs +0 -2
  270. package/dist/kv-DmAQCqXl.mjs +0 -21
  271. package/dist/lazy-command-B_bwSa2F.mjs +0 -2
  272. package/dist/local-CFd107fr.mjs +0 -2
  273. package/dist/migrate-CXMbQPyC.mjs +0 -2
  274. package/dist/oauth-CeXh-ACI.mjs +0 -9
  275. package/dist/pages-CjPErYik.mjs +0 -60
  276. package/dist/previews-Dj_LcGRd.mjs +0 -4
  277. package/dist/r2-C0W2J4sT.mjs +0 -127
  278. package/dist/resolve-BVxXAYG7.mjs +0 -2
  279. package/dist/run-C_qUgBTs.mjs +0 -2
  280. package/dist/run-DK1d9BJz.mjs +0 -2
  281. package/dist/shared--lvrXmXY.mjs +0 -2
  282. package/dist/spawn-Da3HnlmB.mjs +0 -10
  283. package/dist/src-BLLpnbzC.mjs +0 -109
  284. package/dist/startup-profile-Cw-_akjQ.mjs +0 -2
  285. package/dist/state-CcktNox9.mjs +0 -2
  286. package/dist/telemetry-C0k8vfbq.mjs +0 -2
  287. package/dist/telemetry-Dh-8kdfY.mjs +0 -5
  288. package/dist/telemetry-IrDBqbQW.mjs +0 -2
  289. package/dist/update-check-BYJnL8J8.mjs +0 -2
  290. package/dist/update-check-DFoSm5GT.mjs +0 -2
  291. package/dist/version-B47pK_PZ.mjs +0 -2
  292. package/dist/workers-CNBv6GxE.mjs +0 -36
  293. package/dist/zt-Bt4Q6iM1.mjs +0 -110
  294. /package/dist/{Page-BchtVjAO.mjs → Page-CjJht2qT.mjs} +0 -0
  295. /package/dist/{alerts-DY_7Nknx.mjs → alerts-DqZgVSCT.mjs} +0 -0
  296. /package/dist/{autorag-K396-M2S.mjs → autorag-Cq9k9Ye6.mjs} +0 -0
  297. /package/dist/{body-parser-BpPZBRMr.mjs → body-parser-hh2avzkz.mjs} +0 -0
  298. /package/dist/{brands-Uy0Cmv1w.mjs → brands-DeLbFxSt.mjs} +0 -0
  299. /package/dist/{browser-extension-D_siSsD9.mjs → browser-extension-C1zmKFDG.mjs} +0 -0
  300. /package/dist/{chunk-U6NEESU5-CAnOLcsu.mjs → chunk-U6NEESU5-BhF4rnpx.mjs} +0 -0
  301. /package/dist/{chunk-WMOON6TZ-D3H84qpM.mjs → chunk-WMOON6TZ-D_ToS88f.mjs} +0 -0
  302. /package/dist/{clear-CpcO2ExU.mjs → clear-CRfI7WS7.mjs} +0 -0
  303. /package/dist/{cli-types-B6tm-8uL.mjs → cli-types-DoVT5q_M.mjs} +0 -0
  304. /package/dist/{connector-telemetry-events-latest-oguk5Zyj.mjs → connector-telemetry-events-latest-D8p_dR8s.mjs} +0 -0
  305. /package/dist/{connector-telemetry-snapshots-latest-B6zuxkr0.mjs → connector-telemetry-snapshots-latest-COFmzmlk.mjs} +0 -0
  306. /package/dist/{delegate-CCGgla7X.mjs → delegate-B6LetRpZ.mjs} +0 -0
  307. /package/dist/{input-validation-D3e278L_.mjs → input-validation-Dk52b0me.mjs} +0 -0
  308. /package/dist/{interactive-D80kbTap.mjs → interactive-C-o16XQs.mjs} +0 -0
  309. /package/dist/{lifecycle-Cyc3fmyN.mjs → lifecycle-C7tAC1Mn.mjs} +0 -0
  310. /package/dist/{project-settings-Bf6rReo1.mjs → project-settings-DO6njFg_.mjs} +0 -0
  311. /package/dist/{resolve-qPFfBMrn.mjs → resolve-BCTrtcx7.mjs} +0 -0
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- import{t as e}from"./cli-exit-Dqoo6Jgb.mjs";import{r as t}from"./resolve-qPFfBMrn.mjs";import{t as n}from"./context-Dzzbc9RK.mjs";import{r}from"./auth-B5p3SIhO.mjs";import{t as i}from"./progress-C9dWgc3J.mjs";import{n as a,t as o}from"./cloudflared-Ba5LySkU.mjs";const s=1e3;async function c(e,n,r){if(t(r))return r;let i=0,a;for(let t=1;;t++){let o=await e.tunnel.list({account_id:n,name:r,is_deleted:!1,page:t,per_page:s}),c=o.result??[];for(let e of c)e.name===r&&(i++,a=e.id);let l=o.result_info?.per_page||s;if(c.length<l)break}if(i===0)throw Error(`"${r}" is neither the ID nor the name of any tunnel. Run \`cf tunnels list\` to see available tunnels.`);if(i>1)throw Error(`Found multiple tunnels named "${r}". Pass the tunnel UUID instead.`);if(!a)throw Error(`Tunnel "${r}" was found but has no ID. Pass the tunnel UUID instead.`);return a}async function l(e,t,n){let r=await e.tunnels.token.get({account_id:t,tunnel_id:n});if(typeof r!=`string`||r.length===0)throw Error(`The API returned an empty token for tunnel ${n}.`);return r}function u(e){return e.positional(`tunnel`,{type:`string`,description:`Tunnel name or UUID; required unless --token is provided`}).option(`token`,{type:`string`,description:`Tunnel token supplied directly to cloudflared`}).option(`log-level`,{type:`string`,choices:o,default:`info`,description:`cloudflared log level`})}const d={command:`run [tunnel]`,describe:`Run a named Cloudflare Tunnel using the cf-managed cloudflared binary.`,builder:u,handler:async t=>{if(t.local)throw Error(`--local is not supported by cf tunnels run.`);let o=t.token,s=t.tunnel;if(!o){if(!s)throw Error(`Either a tunnel name/UUID or --token must be provided.`);let e=await r(t),a=await n();o=await i(`Fetching tunnel token`,async()=>l(e,a,await c(e,a,s)))}let u=[`tunnel`,`--loglevel`,t[`log-level`]];throw u.push(`run`),new e(await a(u,{env:{TUNNEL_TOKEN:o}}))}};export{d as default};
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- import{t as e}from"./cli-exit-Dqoo6Jgb.mjs";import{n as t}from"./context-Dzzbc9RK.mjs";import{n}from"./cloudflared-Ba5LySkU.mjs";const r={command:`ssh-gen`,describe:`Generate a short-lived certificate for an Access SSH application.`,builder:e=>e.option(`hostname`,{type:`string`,description:`Hostname of the Access application`,demandOption:!0}),handler:async r=>{if(r.local)throw Error(`--local is not supported by cf access ssh-gen.`);let i=[`access`];throw await t()===`fedramp_high`&&i.push(`--fedramp`),i.push(`ssh-gen`,`--hostname`,r.hostname),new e(await n(i))}};export{r as default};
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- import{t as e}from"./cli-exit-Dqoo6Jgb.mjs";import{t}from"./context-Dzzbc9RK.mjs";import{r as n}from"./auth-B5p3SIhO.mjs";import{t as r}from"./progress-C9dWgc3J.mjs";import{n as i}from"./cloudflared-Ba5LySkU.mjs";const a=[`cloudflared`,`http`,`tcp`,`udp`],o=[`debug`,`info`,`warn`,`error`],s=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function c(e,t){if(!s.test(e))throw Error(`${t} must be a valid UUID.`);return e}const l={command:`tail [tunnel-id]`,describe:`Stream logs from a remote cloudflared instance.`,builder:e=>e.positional(`tunnel-id`,{type:`string`,coerce:e=>c(e,`Tunnel ID`),description:`Tunnel UUID to stream logs from`}).option(`connector-id`,{type:`string`,coerce:e=>c(e,`--connector-id`),description:`Target a specific cloudflared connector`}).option(`event`,{type:`string`,choices:a,array:!0,description:`Filter by event type (may be repeated)`}).option(`level`,{type:`string`,choices:o,description:`Filter by log level`}).option(`sample`,{type:`number`,coerce:e=>{if(!Number.isFinite(e)||e<=0||e>1)throw Error(`--sample must be greater than 0.0 and no greater than 1.0.`);return e},description:`Sample log events by fraction greater than 0.0 and no greater than 1.0`}),handler:async a=>{if(a.local)throw Error(`--local is not supported by cf tunnels tail.`);let o=process.env.TUNNEL_MANAGEMENT_TOKEN;if(o!==void 0&&!o.trim())throw Error(`TUNNEL_MANAGEMENT_TOKEN must not be empty.`);if(o&&a[`tunnel-id`])throw Error(`Specify either a tunnel ID or TUNNEL_MANAGEMENT_TOKEN, not both.`);let s=o;if(!s){let e=a[`tunnel-id`];if(!e)throw Error(`Either a tunnel ID or TUNNEL_MANAGEMENT_TOKEN must be provided.`);let i=await n(a),o=await t();s=await r(`Fetching tunnel management token`,async()=>i.tunnels.managementToken.create({account_id:o,tunnel_id:e,resources:[`logs`]}))}let c=[`tail`,`--output`,`json`];if(a[`connector-id`]&&c.push(`--connector-id`,a[`connector-id`]),a.event)for(let e of a.event)c.push(`--event`,e);throw a.level&&c.push(`--level`,a.level),a.sample!==void 0&&c.push(`--sample`,String(a.sample)),a[`tunnel-id`]&&c.push(a[`tunnel-id`]),new e(await i(c,{env:{TUNNEL_MANAGEMENT_TOKEN:s}}))}};export{l as default};
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- import{t as e}from"./cli-exit-Dqoo6Jgb.mjs";import{n as t}from"./context-Dzzbc9RK.mjs";import{n}from"./run-DK1d9BJz.mjs";import"./telemetry-C0k8vfbq.mjs";import{n as r}from"./cloudflared-Ba5LySkU.mjs";var i=n({command:`curl <url>`,describe:`Run curl against an Access-protected application with its JWT injected by cloudflared.`,builder:e=>e.parserConfiguration({"populate--":!0,"parse-positional-numbers":!1,"short-option-groups":!1}).option(`allow-request`,{alias:`ar`,type:`boolean`,description:`Continue the request when no Access token is available`}).positional(`url`,{type:`string`,description:`URL of the Access application`,demandOption:!0}),handler:async n=>{if(n.local)throw Error(`--local is not supported by cf access curl.`);let i=[`access`];throw await t()===`fedramp_high`&&i.push(`--fedramp`),i.push(`curl`),n[`allow-request`]&&i.push(`--allow-request`),i.push(n.url,...(n[`--`]??[]).map(String)),new e(await r(i))}},{command:`access curl`,recordArgs:!1});export{i as default};
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- import{n as e,t}from"./state-DiHwKWTy.mjs";import{randomUUID as n}from"node:crypto";const r=new Date(`2026-01-01T00:00:00.000Z`),i=`CF_SEND_TELEMETRY`,a=/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;function o(){let e=process.env[i];if(e===void 0)return;let t=e.trim().toLowerCase();if(t===`true`||t===`1`)return!0;if(t===`false`||t===`0`)return!1}function s(){let r=t();if(typeof r.deviceId==`string`&&a.test(r.deviceId))return r.deviceId;let i=n();return e({deviceId:i}),i}function c(){return t().deviceId===void 0}function l(){let e=o();if(e!==void 0)return{enabled:e,source:`env`};let n=t().telemetry?.preference;return n?.enabled===!1?{enabled:!1,source:`config`}:n?.enabled===!0?{enabled:!0,source:typeof n.date==`string`&&new Date(n.date)>=r?`config`:`default`}:{enabled:!0,source:`default`}}function u(t){e({telemetry:{preference:{enabled:t,date:new Date().toISOString()}}})}function d(){return t().telemetry?.bannerLastShown}function f(t){e({telemetry:{bannerLastShown:t}})}export{o as a,f as c,s as i,u as l,r as n,c as o,d as r,l as s,i as t};
@@ -1,71 +0,0 @@
1
- #!/usr/bin/env node
2
- import{t as e}from"./local-OKXweFsd.mjs";import{a as t,t as n}from"./context-Dzzbc9RK.mjs";import{r}from"./auth-B5p3SIhO.mjs";import{t as i}from"./output-CZt-berV.mjs";import{t as a}from"./dry-run-BmzTxDtZ.mjs";import{t as o}from"./progress-C9dWgc3J.mjs";import{t as s}from"./run-DK1d9BJz.mjs";import"./telemetry-C0k8vfbq.mjs";import{n as c,r as l,t as u}from"./body-parser-BpPZBRMr.mjs";import{n as d}from"./input-validation-D3e278L_.mjs";import{a as f,i as p,n as m}from"./prompt-Mh69ni1N.mjs";import{t as h}from"./cli-types-B6tm-8uL.mjs";function g(e){return e.usage(`$0 data-security posture archive-finding-instance <finding-id>
3
-
4
- Archive one or more finding instances.`).positional(`finding-id`,{type:`string`,description:`A base64-encoded ID identifying this Finding.`,demandOption:!0}).option(`check-instances`,{type:`string`,array:!0,description:`A list of finding instance IDs to pass along.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for bulk actions on finding instances.`})}const ee={command:`archive-finding-instance <finding-id>`,describe:`Archive a finding`,builder:g,handler:async l=>s({command:`data-security posture archive-finding-instance`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf data-security posture archive-finding-instance`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/data-security/posture/findings/${l[`finding-id`]==null?`<finding-id>`:encodeURIComponent(String(l[`finding-id`]))}/instances/archive`,pathParams:{"finding-id":String(l[`finding-id`]??``)},bodyKind:`json`,body:l.body===void 0?u({check_instances:l[`check-instances`]}):c(l.body)});return}let s=await r(l),d=l.local?e:await n();if(l.accountId=d,l.body){let e=c(l.body);i(await o(`Creating`,async()=>s.dataSecurity.posture.archiveFindingInstance({body:e,account_id:d,finding_id:l[`finding-id`]})),{successLabel:`Created`});return}if(l[`check-instances`]===void 0)throw Error(`--check-instances is required (or pass --body with this field set).`);let f=u({check_instances:l[`check-instances`]});i(await o(`Creating`,async()=>s.dataSecurity.posture.archiveFindingInstance({body:f,account_id:d,finding_id:l[`finding-id`]})),{successLabel:`Created`})})};function te(e){return e.usage(`$0 data-security posture change-finding-severity <finding-id>
5
-
6
- Update the severity of a Finding. This will update the \`severity_override\` field on the Finding payload with the new severity value.`).positional(`finding-id`,{type:`string`,description:`A base64-encoded ID identifying this Finding.`,demandOption:!0}).option(`new-severity`,{type:`number`,description:`The numeric severity value to apply to the finding.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for updating a finding's severity.`})}const _={command:`change-finding-severity <finding-id>`,describe:`Update the severity for a finding`,builder:te,handler:async l=>s({command:`data-security posture change-finding-severity`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf data-security posture change-finding-severity`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/data-security/posture/findings/${l[`finding-id`]==null?`<finding-id>`:encodeURIComponent(String(l[`finding-id`]))}/tune_finding_severity`,pathParams:{"finding-id":String(l[`finding-id`]??``)},bodyKind:`json`,body:l.body===void 0?u({new_severity:l[`new-severity`]}):c(l.body)});return}let s=await r(l),d=l.local?e:await n();if(l.accountId=d,l.body){let e=c(l.body);i(await o(`Creating`,async()=>s.dataSecurity.posture.changeFindingSeverity({...e,account_id:d,finding_id:l[`finding-id`]})),{successLabel:`Created`});return}if(l[`new-severity`]===void 0)throw Error(`--new-severity is required (or pass --body with this field set).`);let f=u({new_severity:l[`new-severity`]});i(await o(`Creating`,async()=>s.dataSecurity.posture.changeFindingSeverity({...f,account_id:d,finding_id:l[`finding-id`]})),{successLabel:`Created`})})};function v(e){return e.usage(`$0 data-security posture content export create
7
-
8
- Creates a CSV export for content and accepts optional filters in the payload.`).option(`dlp-profile-id`,{type:`string`,array:!0,description:`Filter by DLP profile IDs.`}).option(`dlp-profile-information`,{type:`string`,description:`DLP profile metadata for the export. Provide as a JSON array of objects or @path/to/file.json.`}).option(`integration-id`,{type:`string`,array:!0,description:`Filter by integration IDs.`}).option(`max-affliction-date`,{type:`string`,description:`Filter to view content flagged on or before this date.`}).option(`min-affliction-date`,{type:`string`,description:`Filter to view content flagged on or after this date.`}).option(`orders`,{type:`string`,description:`Ordering specifications for the export. Provide as a JSON array of objects or @path/to/file.json.`}).option(`search`,{type:`string`,description:`Search term to filter content.`}).option(`vendors`,{type:`string`,array:!0,description:`Filter by vendor types.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for creating content exports.`})}const y={command:`create`,describe:`Create a content export`,builder:v,handler:async f=>s({command:`data-security posture content export create`,classification:{safeFlags:[`dry-run`]}},f,async()=>{if(f.dryRun){a({command:`cf data-security posture content export create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/data-security/posture/content/export`,pathParams:{},bodyKind:`json`,body:f.body===void 0?u({dlp_profile_id:f[`dlp-profile-id`],dlp_profile_information:l(f[`dlp-profile-information`],`dlp-profile-information`),integration_id:f[`integration-id`],max_affliction_date:d(f[`max-affliction-date`],`max-affliction-date`,`text`),min_affliction_date:d(f[`min-affliction-date`],`min-affliction-date`,`text`),orders:l(f.orders,`orders`),search:d(f.search,`search`,`text`),vendors:f.vendors}):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.dataSecurity.posture.content.export.create({...e,account_id:p})),{successLabel:`Created`});return}if(f[`dlp-profile-information`]===void 0)throw Error(`--dlp-profile-information is required (or pass --body with this field set).`);let m=u({dlp_profile_id:f[`dlp-profile-id`],dlp_profile_information:l(f[`dlp-profile-information`],`dlp-profile-information`),integration_id:f[`integration-id`],max_affliction_date:d(f[`max-affliction-date`],`max-affliction-date`,`text`),min_affliction_date:d(f[`min-affliction-date`],`min-affliction-date`,`text`),orders:l(f.orders,`orders`),search:d(f.search,`search`,`text`),vendors:f.vendors});i(await o(`Creating`,async()=>s.dataSecurity.posture.content.export.create({...m,account_id:p})),{successLabel:`Created`})})},b={command:`export`,describe:`Operations for posture.content.export`,builder:e=>e.command(y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function x(e){return e.usage(`$0 data-security posture content list
9
-
10
- List DLP content findings`).option(`direction`,{type:`string`,description:`Direction to order results.`,choices:[`asc`,`desc`]}).option(`dlp-profile-id`,{type:`string`,description:`Filter by an DLP profile ID`}).option(`integration-id`,{type:`string`,description:`Filter by an integration ID`}).option(`max-affliction-date`,{type:`string`,description:`Filter to view findings that occurred on or before the affliction date. Can be a date-time in ISO 8601 format or an epoch timestamp.`}).option(`min-affliction-date`,{type:`string`,description:`Filter to view findings that occurred on or after the affliction date. Can be a date-time in ISO 8601 format or an epoch timestamp.`}).option(`order`,{type:`string`,description:`Which field to use when ordering content assets.`,choices:[`asset_name`,`dlp_profile_count`,`integration_name`,`latest_affliction_date`]}).option(`page`,{type:`number`,description:`A page number within the paginated result set.`}).option(`per-page`,{type:`number`,description:`Number of results to return per page.`}).option(`search`,{type:`string`,description:`A search term.`}).option(`vendor`,{type:`string`,description:`Filter by vendor`,choices:[`ANTHROPIC`,`AWS`,`BITBUCKET`,`BOX`,`CONFLUENCE`,`DROPBOX`,`GITHUB`,`GOOGLE_CLOUD_PLATFORM`,`GOOGLE_WORKSPACE`,`JIRA`,`MICROSOFT`,`MICROSOFT_INTERNAL`,`OPENAI`,`SALESFORCE`,`SERVICENOW`,`SLACK`,`ZOOM`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const S={command:`list`,describe:`List DLP content findings`,builder:h(x),handler:async c=>s({command:`data-security posture content list`,classification:{safeFlags:[`direction`,`order`,`vendor`,`dry-run`]}},c,async()=>{let s={direction:c.direction,dlp_profile_id:c[`dlp-profile-id`],integration_id:c[`integration-id`],max_affliction_date:c[`max-affliction-date`],min_affliction_date:c[`min-affliction-date`],order:c.order,page:c.page,per_page:c[`per-page`],search:c.search,vendor:c.vendor};if(c.dryRun){a({command:`cf data-security posture content list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/data-security/posture/content`,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.dataSecurity.posture.content.list({account_id:u,...s})),{successLabel:`Loaded`})})},C={command:`content`,describe:`Operations for posture.content`,builder:e=>e.command(S).command(b).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function w(e){return e.usage(`$0 data-security posture create-finding-export-csv
11
-
12
- Creates a CSV export for findings and accepts optional filters in the payload.`).option(`ignored`,{type:`boolean`,description:`Filter for only the ignored findings. Set to false to only see active items.`}).option(`integration-id`,{type:`string`,array:!0,description:`Filter by multiple integration IDs.`}).option(`max-affliction-date`,{type:`string`,description:`Filter to view findings that occurred on or before the affliction date. Can be a date-time in ISO 8601 format or an epoch timestamp.`}).option(`min-affliction-date`,{type:`string`,description:`Filter to view findings that occurred on or after the affliction date. Can be a date-time in ISO 8601 format or an epoch timestamp.`}).option(`orders`,{type:`string`,description:`Which fields to use when ordering the findings. Provide as a JSON array of objects or @path/to/file.json.`}).option(`search`,{type:`string`,description:`A search term.`}).option(`severities`,{type:`string`,array:!0,description:`Filter by severity levels.`}).option(`vendors`,{type:`string`,array:!0,description:`Filter by vendor types.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Filter specification for findings export jobs.`})}const T={command:`create-finding-export-csv`,describe:`Create new findings export request`,builder:w,handler:async f=>s({command:`data-security posture create-finding-export-csv`,classification:{safeFlags:[`ignored`,`dry-run`]}},f,async()=>{if(f.dryRun){a({command:`cf data-security posture create-finding-export-csv`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/data-security/posture/findings/export`,pathParams:{},bodyKind:`json`,body:f.body===void 0?u({ignored:f.ignored,integration_id:f[`integration-id`],max_affliction_date:d(f[`max-affliction-date`],`max-affliction-date`,`text`),min_affliction_date:d(f[`min-affliction-date`],`min-affliction-date`,`text`),orders:l(f.orders,`orders`),search:d(f.search,`search`,`text`),severities:f.severities,vendors:f.vendors}):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.dataSecurity.posture.createFindingExportCsv({...e,account_id:p})),{successLabel:`Created`});return}let m=u({ignored:f.ignored,integration_id:f[`integration-id`],max_affliction_date:d(f[`max-affliction-date`],`max-affliction-date`,`text`),min_affliction_date:d(f[`min-affliction-date`],`min-affliction-date`,`text`),orders:l(f.orders,`orders`),search:d(f.search,`search`,`text`),severities:f.severities,vendors:f.vendors});i(await o(`Creating`,async()=>s.dataSecurity.posture.createFindingExportCsv({...m,account_id:p})),{successLabel:`Created`})})};function E(e){return e.usage("$0 data-security posture create-finding-instances-export-csv <storage-namespace-id>\n\nCreates a CSV export for Finding instances and accepts optional filters in the payload. The `storage_namespace_id` path parameter is derived from the finding ID by base64-decoding it (which yields `integration_id:finding_type_id`) and replacing the colon with a hyphen.").positional(`storage-namespace-id`,{type:`string`,description:"A storage namespace identifier for the finding, used to scope finding instance exports. Constructed by base64-decoding the finding ID (which encodes `integration_id:finding_type_id`) and replacing the colon separator with a hyphen. For example, a finding ID that decodes to `00000000-0000-0000-0000-000000000001:00000000-0000-0000-0000-000000000002` becomes `00000000-0000-0000-0000-000000000001-00000000-0000-0000-0000-000000000002`.",demandOption:!0}).option(`archived`,{type:`boolean`,description:`Filter for archived status.`}).option(`max-affliction-date`,{type:`string`,description:`Filter to view findings that occurred on or before the affliction date. Can be a date-time in ISO 8601 format or an epoch timestamp.`}).option(`min-affliction-date`,{type:`string`,description:`Filter to view findings that occurred on or after the affliction date. Can be a date-time in ISO 8601 format or an epoch timestamp.`}).option(`orders`,{type:`string`,description:`Ordering specifications for the export. Provide as a JSON array of objects or @path/to/file.json.`}).option(`search`,{type:`string`,description:`A search term.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Filter specification for finding instance exports.`})}const D={command:`create-finding-instances-export-csv <storage-namespace-id>`,describe:`Create a finding instances export`,builder:E,handler:async f=>s({command:`data-security posture create-finding-instances-export-csv`,classification:{safeFlags:[`archived`,`dry-run`]}},f,async()=>{if(f.dryRun){a({command:`cf data-security posture create-finding-instances-export-csv`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/data-security/posture/findings/${f[`storage-namespace-id`]==null?`<storage-namespace-id>`:encodeURIComponent(String(f[`storage-namespace-id`]))}/instances/export`,pathParams:{"storage-namespace-id":String(f[`storage-namespace-id`]??``)},bodyKind:`json`,body:f.body===void 0?u({archived:f.archived,max_affliction_date:d(f[`max-affliction-date`],`max-affliction-date`,`text`),min_affliction_date:d(f[`min-affliction-date`],`min-affliction-date`,`text`),orders:l(f.orders,`orders`),search:d(f.search,`search`,`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.dataSecurity.posture.createFindingInstancesExportCsv({...e,account_id:p,storage_namespace_id:f[`storage-namespace-id`]})),{successLabel:`Created`});return}let m=u({archived:f.archived,max_affliction_date:d(f[`max-affliction-date`],`max-affliction-date`,`text`),min_affliction_date:d(f[`min-affliction-date`],`min-affliction-date`,`text`),orders:l(f.orders,`orders`),search:d(f.search,`search`,`text`)});i(await o(`Creating`,async()=>s.dataSecurity.posture.createFindingInstancesExportCsv({...m,account_id:p,storage_namespace_id:f[`storage-namespace-id`]})),{successLabel:`Created`})})};function O(e){return e.usage(`$0 data-security posture create-remediation-jobs-export-csv
13
-
14
- Creates a CSV export for remediation jobs and accepts optional filters in the payload.`).option(`integration-id`,{type:`string`,array:!0,description:`Filter by multiple integration IDs.`}).option(`max-updated-at`,{type:`string`,description:`Filter to view remediation jobs updated on or before this datetime. Can be a date-time in ISO 8601 format or an epoch timestamp.`}).option(`min-updated-at`,{type:`string`,description:`Filter to view remediation jobs updated on or after this datetime. Can be a date-time in ISO 8601 format or an epoch timestamp.`}).option(`orders`,{type:`string`,description:`Ordering specifications for the export. Provide as a JSON array of objects or @path/to/file.json.`}).option(`search`,{type:`string`,description:`A search term.`}).option(`status`,{type:`string`,array:!0,description:`Filter by remediation job status.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Filter specification for remediation jobs export.`})}const k={command:`create-remediation-jobs-export-csv`,describe:`Create a remediation jobs export`,builder:O,handler:async f=>s({command:`data-security posture create-remediation-jobs-export-csv`,classification:{safeFlags:[`dry-run`]}},f,async()=>{if(f.dryRun){a({command:`cf data-security posture create-remediation-jobs-export-csv`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/data-security/posture/remediations/jobs/export`,pathParams:{},bodyKind:`json`,body:f.body===void 0?u({integration_id:f[`integration-id`],max_updated_at:d(f[`max-updated-at`],`max-updated-at`,`text`),min_updated_at:d(f[`min-updated-at`],`min-updated-at`,`text`),orders:l(f.orders,`orders`),search:d(f.search,`search`,`text`),status:f.status}):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.dataSecurity.posture.createRemediationJobsExportCsv({...e,account_id:p})),{successLabel:`Created`});return}let m=u({integration_id:f[`integration-id`],max_updated_at:d(f[`max-updated-at`],`max-updated-at`,`text`),min_updated_at:d(f[`min-updated-at`],`min-updated-at`,`text`),orders:l(f.orders,`orders`),search:d(f.search,`search`,`text`),status:f.status});i(await o(`Creating`,async()=>s.dataSecurity.posture.createRemediationJobsExportCsv({...m,account_id:p})),{successLabel:`Created`})})};function A(e){return e.usage(`$0 data-security posture create-remediation-jobs
15
-
16
- Create one or more remediation jobs tied to a specific Cloudflare Account.`).option(`finding-instance-ids`,{type:`string`,array:!0,description:`UUIDs identifying Finding Instances.`}).option(`remediation-type-id`,{type:`string`,description:`A UUID identifying this Remediation Type.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for creating remediation jobs.`})}const j={command:`create-remediation-jobs`,describe:`Creates remediation jobs`,builder:A,handler:async l=>s({command:`data-security posture create-remediation-jobs`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf data-security posture create-remediation-jobs`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/data-security/posture/remediations/jobs`,pathParams:{},bodyKind:`json`,body:l.body===void 0?u({finding_instance_ids:l[`finding-instance-ids`],remediation_type_id:d(l[`remediation-type-id`],`remediation-type-id`,`text`)}):c(l.body)});return}let s=await r(l),p=l.local?e:await n();if(l.accountId=p,l.body){let e=c(l.body);i(await o(`Creating`,async()=>s.dataSecurity.posture.createRemediationJobs({...e,account_id:p})),{successLabel:`Created`});return}if(l[`finding-instance-ids`]===void 0)throw Error(`--finding-instance-ids is required (or pass --body with this field set).`);l[`remediation-type-id`]===void 0&&(l[`remediation-type-id`]=await f(`remediation-type-id`,`A UUID identifying this Remediation Type.`));let m=u({finding_instance_ids:l[`finding-instance-ids`],remediation_type_id:d(l[`remediation-type-id`],`remediation-type-id`,`text`)});i(await o(`Creating`,async()=>s.dataSecurity.posture.createRemediationJobs({...m,account_id:p})),{successLabel:`Created`})})};function M(e){return e.usage(`$0 data-security posture create-webhook-jobs
17
-
18
- Creates webhook jobs to send a finding instance to one or more configured webhooks.`).option(`finding-instance-ids`,{type:`string`,array:!0,description:`Array of finding instance IDs to send to the webhooks.`}).option(`webhook-ids`,{type:`string`,array:!0,description:`Array of webhook IDs to trigger jobs for.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for creating up to 100 webhook jobs. The number of jobs is the product of webhook_ids and finding_instance_ids.`})}const N={command:`create-webhook-jobs`,describe:`Create webhook jobs`,builder:M,handler:async l=>s({command:`data-security posture create-webhook-jobs`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf data-security posture create-webhook-jobs`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/data-security/posture/webhooks/jobs`,pathParams:{},bodyKind:`json`,body:l.body===void 0?u({finding_instance_ids:l[`finding-instance-ids`],webhook_ids:l[`webhook-ids`]}):c(l.body)});return}let s=await r(l),d=l.local?e:await n();if(l.accountId=d,l.body){let e=c(l.body);i(await o(`Creating`,async()=>s.dataSecurity.posture.createWebhookJobs({...e,account_id:d})),{successLabel:`Created`});return}if(l[`finding-instance-ids`]===void 0)throw Error(`--finding-instance-ids is required (or pass --body with this field set).`);if(l[`webhook-ids`]===void 0)throw Error(`--webhook-ids is required (or pass --body with this field set).`);let f=u({finding_instance_ids:l[`finding-instance-ids`],webhook_ids:l[`webhook-ids`]});i(await o(`Creating`,async()=>s.dataSecurity.posture.createWebhookJobs({...f,account_id:d})),{successLabel:`Created`})})};function P(e){return e.usage(`$0 data-security posture create-webhook
19
-
20
- Creates a new webhook configuration for sending finding notifications to external endpoints.`).option(`authentication-type`,{type:`string`,description:`Type of authentication used for the webhook.`,choices:[`Basic Auth`,`None`,`Bearer Auth`,`Static Headers`,`HMAC-Signing`]}).option(`destination-url`,{type:`string`,description:`Target URL for the webhook configuration. Where resulting data will be sent.`}).option(`headers`,{type:`string`,description:`List of custom headers to include in webhook requests. Provide as a JSON array of objects or @path/to/file.json.`}).option(`label`,{type:`string`,description:`Account-specified display label for the webhook configuration.`}).option(`signing-secret`,{type:`string`,description:`Secret key used for HMAC signing when authentication_type is "HMAC-Signing".`}).option(`status`,{type:`string`,description:`Status of the webhook configuration. Defaults to enabled when omitted.`,choices:[`enabled`,`disabled`],default:`enabled`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for creating a new webhook configuration.`})}const F={command:`create-webhook`,describe:`Create a new webhook configuration`,builder:P,handler:async m=>s({command:`data-security posture create-webhook`,classification:{safeFlags:[`authentication-type`,`status`,`dry-run`]}},m,async()=>{if(m.dryRun){a({command:`cf data-security posture create-webhook`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/data-security/posture/webhooks`,pathParams:{},bodyKind:`json`,body:m.body===void 0?u({authentication_type:d(m[`authentication-type`],`authentication-type`,`text`),destination_url:d(m[`destination-url`],`destination-url`,`text`),headers:l(m.headers,`headers`),label:d(m.label,`label`,`text`),signing_secret:d(m[`signing-secret`],`signing-secret`,`text`),status:d(m.status,`status`,`text`)}):c(m.body)});return}let s=await r(m),h=m.local?e:await n();if(m.accountId=h,m.body){let e=c(m.body);i(await o(`Creating`,async()=>s.dataSecurity.posture.createWebhook({...e,account_id:h})),{successLabel:`Created`});return}m[`authentication-type`]===void 0&&(m[`authentication-type`]=await p(`authentication-type`,`Type of authentication used for the webhook.`,[`Basic Auth`,`None`,`Bearer Auth`,`Static Headers`,`HMAC-Signing`])),m[`destination-url`]===void 0&&(m[`destination-url`]=await f(`destination-url`,`Target URL for the webhook configuration. Where resulting data will be sent.`)),m.label===void 0&&(m.label=await f(`label`,`Account-specified display label for the webhook configuration.`));let g=u({authentication_type:d(m[`authentication-type`],`authentication-type`,`text`),destination_url:d(m[`destination-url`],`destination-url`,`text`),headers:l(m.headers,`headers`),label:d(m.label,`label`,`text`),signing_secret:d(m[`signing-secret`],`signing-secret`,`text`),status:d(m.status,`status`,`text`)});i(await o(`Creating`,async()=>s.dataSecurity.posture.createWebhook({...g,account_id:h})),{successLabel:`Created`})})};function I(e){return e.usage(`$0 data-security posture evaluate-existing-webhook <webhook-id>
21
-
22
- Sends a test webhook event using an existing webhook configuration. This allows customers to verify their webhook endpoint is still reachable and properly configured after creating the webhook resource. The test payload includes: - event_type: "webhook.test" - timestamp: Current UTC timestamp - message: Test message indicating this is from Cloudflare CASB - data: Object with test: true`).positional(`webhook-id`,{type:`string`,description:`A UUID identifying the webhook configuration.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const L={command:`evaluate-existing-webhook <webhook-id>`,describe:`Test an existing webhook configuration`,builder:I,handler:async c=>s({command:`data-security posture evaluate-existing-webhook`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf data-security posture evaluate-existing-webhook`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/data-security/posture/webhooks/${c[`webhook-id`]==null?`<webhook-id>`:encodeURIComponent(String(c[`webhook-id`]))}/evaluate`,pathParams:{"webhook-id":String(c[`webhook-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();c.accountId=l,i(await o(`Creating`,async()=>s.dataSecurity.posture.evaluateExistingWebhook({account_id:l,webhook_id:c[`webhook-id`]})),{successLabel:`Created`})})};function R(e){return e.usage(`$0 data-security posture evaluate-new-webhook
23
-
24
- Sends a test webhook event to the specified destination URL to verify the webhook endpoint is reachable and properly configured. This allows customers to validate their webhook configuration before creating the actual webhook resource. The test payload includes: - event_type: "webhook.test" - timestamp: Current UTC timestamp - message: Test message indicating this is from Cloudflare CASB - data: Object with test: true`).option(`authentication-type`,{type:`string`,description:`Type of authentication to use for the test webhook request.`,choices:[`Basic Auth`,`None`,`Bearer Auth`,`Static Headers`,`HMAC-Signing`]}).option(`destination-url`,{type:`string`,description:`Target URL to send the test webhook event to.`}).option(`headers`,{type:`string`,description:`List of custom headers to include in the test webhook request. Provide as a JSON array of objects or @path/to/file.json.`}).option(`signing-secret`,{type:`string`,description:`Secret key used for HMAC signing when authentication_type is "HMAC-Signing".`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for testing a webhook configuration before creating it.`})}const z={command:`evaluate-new-webhook`,describe:`Test a webhook configuration before creating it`,builder:R,handler:async m=>s({command:`data-security posture evaluate-new-webhook`,classification:{safeFlags:[`authentication-type`,`dry-run`]}},m,async()=>{if(m.dryRun){a({command:`cf data-security posture evaluate-new-webhook`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/data-security/posture/webhooks/evaluate`,pathParams:{},bodyKind:`json`,body:m.body===void 0?u({authentication_type:d(m[`authentication-type`],`authentication-type`,`text`),destination_url:d(m[`destination-url`],`destination-url`,`text`),headers:l(m.headers,`headers`),signing_secret:d(m[`signing-secret`],`signing-secret`,`text`)}):c(m.body)});return}let s=await r(m),h=m.local?e:await n();if(m.accountId=h,m.body){let e=c(m.body);i(await o(`Creating`,async()=>s.dataSecurity.posture.evaluateNewWebhook({...e,account_id:h})),{successLabel:`Created`});return}m[`authentication-type`]===void 0&&(m[`authentication-type`]=await p(`authentication-type`,`Type of authentication to use for the test webhook request.`,[`Basic Auth`,`None`,`Bearer Auth`,`Static Headers`,`HMAC-Signing`])),m[`destination-url`]===void 0&&(m[`destination-url`]=await f(`destination-url`,`Target URL to send the test webhook event to.`));let g=u({authentication_type:d(m[`authentication-type`],`authentication-type`,`text`),destination_url:d(m[`destination-url`],`destination-url`,`text`),headers:l(m.headers,`headers`),signing_secret:d(m[`signing-secret`],`signing-secret`,`text`)});i(await o(`Creating`,async()=>s.dataSecurity.posture.evaluateNewWebhook({...g,account_id:h})),{successLabel:`Created`})})};function B(e){return e.usage(`$0 data-security posture exports list
25
-
26
- List all export jobs for a given requestor's organization`).option(`page`,{type:`number`,description:`A page number within the paginated result set.`}).option(`per-page`,{type:`number`,description:`Number of results to return per page.`}).option(`status`,{type:`string`,description:`Filter on export job's status`,choices:[`Pending`,`Success`,`Failure`,`Rescheduled`,`In-Progress`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const V={command:`list`,describe:`List all export jobs`,builder:h(B),handler:async c=>s({command:`data-security posture exports list`,classification:{safeFlags:[`status`,`dry-run`]}},c,async()=>{let s={page:c.page,per_page:c[`per-page`],status:c.status};if(c.dryRun){a({command:`cf data-security posture exports list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/data-security/posture/exports`,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.dataSecurity.posture.exports.list({account_id:u,...s})),{successLabel:`Loaded`})})},H={command:`exports`,describe:`Operations for posture.exports`,builder:e=>e.command(V).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function U(e){return e.usage(`$0 data-security posture get-export-job <id>
27
-
28
- Retrieves a single export job by its unique identifier`).positional(`id`,{type:`string`,description:`Unique identifier for the export job`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const W={command:`get-export-job <id>`,describe:`Get a single export job`,builder:U,handler:async c=>s({command:`data-security posture get-export-job`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf data-security posture get-export-job`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/data-security/posture/exports/${c.id==null?`<id>`:encodeURIComponent(String(c.id))}`,pathParams:{id:String(c.id??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();c.accountId=l,i(await o(`Loading`,async()=>s.dataSecurity.posture.getExportJob({account_id:l,id:c.id})),{successLabel:`Loaded`})})};function G(e){return e.usage(`$0 data-security posture get-finding-instance <instance-id>
29
-
30
- Gets a security Finding instance by id.`).positional(`instance-id`,{type:`string`,description:`A uuid ID identifying this Finding instance.`,demandOption:!0}).option(`finding-id`,{type:`string`,description:`A base64-encoded ID identifying this Finding.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const K={command:`get-finding-instance <instance-id>`,describe:`Get a finding instance using an instance ID`,builder:G,handler:async c=>s({command:`data-security posture get-finding-instance`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf data-security posture get-finding-instance`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/data-security/posture/findings/${c[`finding-id`]==null?`<finding-id>`:encodeURIComponent(String(c[`finding-id`]))}/instances/${c[`instance-id`]==null?`<instance-id>`:encodeURIComponent(String(c[`instance-id`]))}`,pathParams:{"finding-id":String(c[`finding-id`]??``),"instance-id":String(c[`instance-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();c.accountId=l,i(await o(`Loading`,async()=>s.dataSecurity.posture.getFindingInstance({account_id:l,finding_id:c[`finding-id`],instance_id:c[`instance-id`]})),{successLabel:`Loaded`})})};function q(e){return e.usage(`$0 data-security posture get-finding-type <finding-type-id>
31
-
32
- Retrieve a specific finding type by its unique identifier.`).positional(`finding-type-id`,{type:`string`,description:`A UUID string identifying the finding type.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const J={command:`get-finding-type <finding-type-id>`,describe:`Get finding by ID`,builder:q,handler:async c=>s({command:`data-security posture get-finding-type`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf data-security posture get-finding-type`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/data-security/posture/finding_types/${c[`finding-type-id`]==null?`<finding-type-id>`:encodeURIComponent(String(c[`finding-type-id`]))}`,pathParams:{"finding-type-id":String(c[`finding-type-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();c.accountId=l,i(await o(`Loading`,async()=>s.dataSecurity.posture.getFindingType({account_id:l,finding_type_id:c[`finding-type-id`]})),{successLabel:`Loaded`})})};function Y(e){return e.usage(`$0 data-security posture get-finding <finding-id>
33
-
34
- Gets a security Finding that has been identified as being problematic.`).positional(`finding-id`,{type:`string`,description:`A base64-encoded ID identifying this Finding.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const X={command:`get-finding <finding-id>`,describe:`Get a finding type`,builder:Y,handler:async c=>s({command:`data-security posture get-finding`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf data-security posture get-finding`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/data-security/posture/findings/${c[`finding-id`]==null?`<finding-id>`:encodeURIComponent(String(c[`finding-id`]))}`,pathParams:{"finding-id":String(c[`finding-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();c.accountId=l,i(await o(`Loading`,async()=>s.dataSecurity.posture.getFinding({account_id:l,finding_id:c[`finding-id`]})),{successLabel:`Loaded`})})};function Z(e){return e.usage("$0 data-security posture get-remediation-types-for-finding-type <finding-type-id>\n\nList all remediation types for a given finding type. This endpoint supports both cursor and offset pagination. Note that `cursor` and `page` are mutually exclusive.").positional(`finding-type-id`,{type:`string`,description:`A UUID string identifying the finding type.`,demandOption:!0}).option(`integration-id`,{type:`string`,description:`Filter by an integration ID`}).option(`cursor`,{type:`string`,description:`A cursor for pagination.`}).option(`page`,{type:`number`,description:`A page number within the paginated result set.`}).option(`per-page`,{type:`number`,description:`Number of results to return per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Q={command:`get-remediation-types-for-finding-type <finding-type-id>`,describe:`List remediation types for a finding type`,builder:Z,handler:async c=>s({command:`data-security posture get-remediation-types-for-finding-type`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={integration_id:c[`integration-id`],cursor:c.cursor,page:c.page,per_page:c[`per-page`]};if(c.dryRun){a({command:`cf data-security posture get-remediation-types-for-finding-type`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/data-security/posture/finding_types/${c[`finding-type-id`]==null?`<finding-type-id>`:encodeURIComponent(String(c[`finding-type-id`]))}/remediation_types`,pathParams:{"finding-type-id":String(c[`finding-type-id`]??``)},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await n();c.accountId=u,i(await o(`Loading`,async()=>l.dataSecurity.posture.getRemediationTypesForFindingType({account_id:u,finding_type_id:c[`finding-type-id`],...s})),{successLabel:`Loaded`})})};function ne(e){return e.usage(`$0 data-security posture get-webhook-config-by-id <webhook-id>
35
-
36
- Retrieves a specific webhook configuration by its unique identifier.`).positional(`webhook-id`,{type:`string`,description:`A UUID identifying the webhook configuration.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const re={command:`get-webhook-config-by-id <webhook-id>`,describe:`Get webhook configuration by ID`,builder:ne,handler:async c=>s({command:`data-security posture get-webhook-config-by-id`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf data-security posture get-webhook-config-by-id`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/data-security/posture/webhooks/${c[`webhook-id`]==null?`<webhook-id>`:encodeURIComponent(String(c[`webhook-id`]))}`,pathParams:{"webhook-id":String(c[`webhook-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();c.accountId=l,i(await o(`Loading`,async()=>s.dataSecurity.posture.getWebhookConfigById({account_id:l,webhook_id:c[`webhook-id`]})),{successLabel:`Loaded`})})};function ie(e){return e.usage(`$0 data-security posture ignore-finding
37
-
38
- Given a list of findings, mark as ignored. Does nothing if Finding is already ignored.`).option(`checks`,{type:`string`,array:!0,description:`A list of finding IDs to pass along.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for bulk actions on findings.`})}const ae={command:`ignore-finding`,describe:`Mark a finding as ignored`,builder:ie,handler:async l=>s({command:`data-security posture ignore-finding`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf data-security posture ignore-finding`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/data-security/posture/findings/ignore`,pathParams:{},bodyKind:`json`,body:l.body===void 0?u({checks:l.checks}):c(l.body)});return}let s=await r(l),d=l.local?e:await n();if(l.accountId=d,l.body){let e=c(l.body);i(await o(`Creating`,async()=>s.dataSecurity.posture.ignoreFinding({body:e,account_id:d})),{successLabel:`Created`});return}if(l.checks===void 0)throw Error(`--checks is required (or pass --body with this field set).`);let f=u({checks:l.checks});i(await o(`Creating`,async()=>s.dataSecurity.posture.ignoreFinding({body:f,account_id:d})),{successLabel:`Created`})})};function oe(e){return e.usage(`$0 data-security posture list-finding-instances <finding-id>
39
-
40
- Lists all security finding instances for a given security finding.`).positional(`finding-id`,{type:`string`,description:`A base64-encoded ID identifying this Finding.`,demandOption:!0}).option(`archived`,{type:`boolean`,description:`Archived`}).option(`cursor`,{type:`string`,description:"A cursor for pagination. Obtained from the `result_info.cursor` field of a previous response."}).option(`direction`,{type:`string`,description:`Direction to order results.`,choices:[`asc`,`desc`]}).option(`max-affliction-date`,{type:`string`,description:`Filter to view findings that occurred on or before the affliction date. Can be a date-time in ISO 8601 format or an epoch timestamp.`}).option(`min-affliction-date`,{type:`string`,description:`Filter to view findings that occurred on or after the affliction date. Can be a date-time in ISO 8601 format or an epoch timestamp.`}).option(`order`,{type:`string`,description:`Which field to use when ordering the Finding's instances.
41
- When ordering by 'remediation.status', only the most recent non-stale remediation job is considered. Stale jobs (created before the instance's affliction_date) are treated as having no status for ordering purposes.`,choices:[`affliction_date`,`asset.name`,`remediation.status`]}).option(`page`,{type:`number`,description:`A page number within the paginated result set.`}).option(`per-page`,{type:`number`,description:`Number of results to return per page.`}).option(`search`,{type:`string`,description:`A search term.`}).option(`remediation-statuses`,{type:`string`,description:`Filter finding instances by most recent remediation job status. Supports multiple comma-separated values.
42
- Use 'none' to filter instances with no remediation jobs or instances where the most recent job is stale.
43
- Note: Stale jobs (created before the instance's affliction_date) are ignored for filtering purposes, but are still included in the 'remediations' array with stale=true.`}).option(`finding-instance-ids`,{type:`string`,description:`Filter finding instances by an array of finding instance IDs. Supports multiple comma-separated values.`}).option(`asset-ids`,{type:`string`,description:`Filter finding instances by an array of asset IDs. Supports multiple comma-separated values.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const se={command:`list-finding-instances <finding-id>`,describe:`List instances of a finding`,builder:h(oe),handler:async c=>s({command:`data-security posture list-finding-instances`,classification:{safeFlags:[`archived`,`direction`,`order`,`dry-run`]}},c,async()=>{let s={archived:c.archived,cursor:c.cursor,direction:c.direction,max_affliction_date:c[`max-affliction-date`],min_affliction_date:c[`min-affliction-date`],order:c.order,page:c.page,per_page:c[`per-page`],search:c.search,remediation_statuses:c[`remediation-statuses`],finding_instance_ids:c[`finding-instance-ids`],asset_ids:c[`asset-ids`]};if(c.dryRun){a({command:`cf data-security posture list-finding-instances`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/data-security/posture/findings/${c[`finding-id`]==null?`<finding-id>`:encodeURIComponent(String(c[`finding-id`]))}/instances`,pathParams:{"finding-id":String(c[`finding-id`]??``)},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await n();c.accountId=u,i(await o(`Loading`,async()=>l.dataSecurity.posture.listFindingInstances({account_id:u,finding_id:c[`finding-id`],...s})),{successLabel:`Loaded`})})};function ce(e){return e.usage(`$0 data-security posture list-finding-types
44
-
45
- List all available finding types with pagination support.`).option(`page`,{type:`number`,description:`A page number within the paginated result set.`}).option(`per-page`,{type:`number`,description:`Number of results to return per page.`}).option(`vendors`,{type:`string`,description:`Filter finding types by vendor. Supports multiple comma-separated values. Each value may be either the vendor enum (GOOGLE_WORKSPACE) or the friendly name returned by the read routes (Google Workspace).`}).option(`search`,{type:`string`,description:`Filter finding types by name or ID (case-insensitive substring match).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const le={command:`list-finding-types`,describe:`List all finding types`,builder:h(ce),handler:async c=>s({command:`data-security posture list-finding-types`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={page:c.page,per_page:c[`per-page`],vendors:c.vendors,search:c.search};if(c.dryRun){a({command:`cf data-security posture list-finding-types`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/data-security/posture/finding_types`,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.dataSecurity.posture.listFindingTypes({account_id:u,...s})),{successLabel:`Loaded`})})};function ue(e){return e.usage(`$0 data-security posture list-findings
46
-
47
- List all security findings that have been identified as being problematic. This will return a list of findings regardless if they have been ignored or not.`).option(`cursor`,{type:`string`,description:"A cursor for pagination. Obtained from the `result_info.cursor` field of a previous response."}).option(`direction`,{type:`string`,description:`Direction to order results.`,choices:[`asc`,`desc`]}).option(`ignored`,{type:`boolean`,description:`Filter for only the ignored findings. Set to false to only see "active" items`}).option(`integration-id`,{type:`string`,description:`Filter by an integration ID`}).option(`max-affliction-date`,{type:`string`,description:`Filter to view findings that occurred on or before the affliction date. Can be a date-time in ISO 8601 format or an epoch timestamp.`}).option(`min-affliction-date`,{type:`string`,description:`Filter to view findings that occurred on or after the affliction date. Can be a date-time in ISO 8601 format or an epoch timestamp.`}).option(`observation`,{type:`string`,description:`Filter by observation type of the finding`,choices:[`Activity`,`Insight`,`Issue`]}).option(`order`,{type:`string`,description:`Which field to use when ordering the findings.`,choices:[`finding.name`,`instance_count`,`integration.name`,`latest_affliction_date`,`severity`]}).option(`page`,{type:`number`,description:`A page number within the paginated result set.`}).option(`per-page`,{type:`number`,description:`Number of results to return per page.`}).option(`product`,{type:`string`,description:`Filter by product category of the finding`,choices:[`Cloud`,`Saas`]}).option(`search`,{type:`string`,description:`A search term.`}).option(`severity`,{type:`string`,description:`Filter by severity`,choices:[`Critical`,`High`,`Medium`,`Low`]}).option(`type`,{type:`string`,description:`Filter by type of the finding`,choices:[`Content`,`Posture`]}).option(`vendor`,{type:`string`,description:`Filter by vendor`,choices:[`ANTHROPIC`,`AWS`,`BITBUCKET`,`BOX`,`CONFLUENCE`,`DROPBOX`,`GITHUB`,`GOOGLE_CLOUD_PLATFORM`,`GOOGLE_WORKSPACE`,`JIRA`,`MICROSOFT`,`MICROSOFT_INTERNAL`,`OPENAI`,`SALESFORCE`,`SERVICENOW`,`SLACK`,`ZOOM`]}).option(`finding-type-ids`,{type:`string`,description:`A comma separated list of UUIDs identifying the finding type(s).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const de={command:`list-findings`,describe:`List posture findings`,builder:h(ue),handler:async c=>s({command:`data-security posture list-findings`,classification:{safeFlags:[`direction`,`ignored`,`observation`,`order`,`product`,`severity`,`type`,`vendor`,`dry-run`]}},c,async()=>{let s={cursor:c.cursor,direction:c.direction,ignored:c.ignored,integration_id:c[`integration-id`],max_affliction_date:c[`max-affliction-date`],min_affliction_date:c[`min-affliction-date`],observation:c.observation,order:c.order,page:c.page,per_page:c[`per-page`],product:c.product,search:c.search,severity:c.severity,type:c.type,vendor:c.vendor,finding_type_ids:c[`finding-type-ids`]};if(c.dryRun){a({command:`cf data-security posture list-findings`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/data-security/posture/findings`,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.dataSecurity.posture.listFindings({account_id:u,...s})),{successLabel:`Loaded`})})};function fe(e){return e.usage("$0 data-security posture list-remediation-jobs\n\nList all remediation jobs tied to a specific Cloudflare Account. Note that `cursor` and `page` are mutually exclusive.").option(`cursor`,{type:`string`,description:`A cursor for pagination.`}).option(`page`,{type:`number`,description:`A page number within the paginated result set.`}).option(`per-page`,{type:`number`,description:`Number of results to return per page.`}).option(`search`,{type:`string`,description:`A search term.`}).option(`min-updated-at`,{type:`string`,description:`Filter to view remediations updated on or after the min updated datetime. Can be a date-time in ISO 8601 format or an epoch timestamp.`}).option(`max-updated-at`,{type:`string`,description:`Filter to view remediations updated on or before the max updated datetime. Can be a date-time in ISO 8601 format or an epoch timestamp.`}).option(`status`,{type:`string`,description:`Filter to view remediations with the given status.`,choices:[`pending`,`processing`,`completed`,`failed`,`validating`]}).option(`triggered-by-actor`,{type:`string`,description:`Filter remediations by what kind of actor triggered them. Supports multiple comma-separated values.`}).option(`integration-id`,{type:`string`,description:`Filter by an integration ID`}).option(`order`,{type:`string`,description:`An optional param to sort the results by the given field.`,choices:[`created_at`,`affliction_date`,`integration_name`,`status`,`last_updated_at`,`asset_name`,`finding_type_name`]}).option(`direction`,{type:`string`,description:`Direction to order results.`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const pe={command:`list-remediation-jobs`,describe:`List remediation jobs`,builder:h(fe),handler:async c=>s({command:`data-security posture list-remediation-jobs`,classification:{safeFlags:[`status`,`order`,`direction`,`dry-run`]}},c,async()=>{let s={cursor:c.cursor,page:c.page,per_page:c[`per-page`],search:c.search,min_updated_at:c[`min-updated-at`],max_updated_at:c[`max-updated-at`],status:c.status,triggered_by_actor:c[`triggered-by-actor`],integration_id:c[`integration-id`],order:c.order,direction:c.direction};if(c.dryRun){a({command:`cf data-security posture list-remediation-jobs`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/data-security/posture/remediations/jobs`,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.dataSecurity.posture.listRemediationJobs({account_id:u,...s})),{successLabel:`Loaded`})})};function me(e){return e.usage(`$0 data-security posture list-webhooks
48
-
49
- Retrieves all webhook configurations for the authenticated account. Returns an array of webhook configurations that can be used to send finding notifications.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const he={command:`list-webhooks`,describe:`List webhook configurations`,builder:me,handler:async c=>s({command:`data-security posture list-webhooks`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf data-security posture list-webhooks`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/data-security/posture/webhooks`,pathParams:{},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();c.accountId=l,i(await o(`Loading`,async()=>s.dataSecurity.posture.listWebhooks({account_id:l})),{successLabel:`Loaded`})})};function ge(e){return e.usage(`$0 data-security posture policies create
50
-
51
- Creates a new policy configuration that defines automated actions to be executed when security findings are detected. A policy can include multiple remediation and/or webhook actions that will be triggered automatically.`).option(`applies-to-all-integrations`,{type:`boolean`,description:`When true, the policy applies to all integrations for the account. When false, integration_ids must be provided.`}).option(`description`,{type:`string`,description:`Optional description of what this policy does.`}).option(`display-name`,{type:`string`,description:`Display name for the policy configuration.`}).option(`enabled`,{type:`boolean`,description:`Boolean specifying if the policy is enabled or disabled.`}).option(`finding-type-id`,{type:`string`,description:`The finding type this policy is associated with. All remediation actions must match this finding type.`}).option(`integration-ids`,{type:`string`,array:!0,description:`The integrations this policy applies to. Required when applies_to_all_integrations is false.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for creating a new policy configuration.`})}const _e={command:`create`,describe:`Create a new policy configuration`,builder:ge,handler:async l=>s({command:`data-security posture policies create`,classification:{safeFlags:[`applies-to-all-integrations`,`enabled`,`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf data-security posture policies create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/data-security/posture/policies`,pathParams:{},bodyKind:`json`,body:l.body===void 0?u({applies_to_all_integrations:l[`applies-to-all-integrations`],description:d(l.description,`description`,`text`),display_name:d(l[`display-name`],`display-name`,`text`),enabled:l.enabled,finding_type_id:d(l[`finding-type-id`],`finding-type-id`,`text`),integration_ids:l[`integration-ids`]}):c(l.body)});return}let s=await r(l),p=l.local?e:await n();if(l.accountId=p,l.body){let e=c(l.body);i(await o(`Creating`,async()=>s.dataSecurity.posture.policies.create({...e,account_id:p})),{successLabel:`Created`});return}if(l[`applies-to-all-integrations`]===void 0)throw Error(`--applies-to-all-integrations is required (or pass --body with this field set).`);if(l[`display-name`]===void 0&&(l[`display-name`]=await f(`display-name`,`Display name for the policy configuration.`)),l.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);l[`finding-type-id`]===void 0&&(l[`finding-type-id`]=await f(`finding-type-id`,`The finding type this policy is associated with. All remediation actions must match this finding type.`));let m=u({applies_to_all_integrations:l[`applies-to-all-integrations`],description:d(l.description,`description`,`text`),display_name:d(l[`display-name`],`display-name`,`text`),enabled:l.enabled,finding_type_id:d(l[`finding-type-id`],`finding-type-id`,`text`),integration_ids:l[`integration-ids`]});i(await o(`Creating`,async()=>s.dataSecurity.posture.policies.create({...m,account_id:p})),{successLabel:`Created`})})};function ve(e){return e.usage(`$0 data-security posture policies delete <policy-id>
52
-
53
- Deletes a policy configuration.`).positional(`policy-id`,{type:`string`,description:`A UUID identifying the policy.`,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 ye={command:`delete <policy-id>`,describe:`Delete a policy configuration`,builder:ve,handler:async c=>s({command:`data-security posture policies delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf data-security posture policies delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/data-security/posture/policies/${c[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(c[`policy-id`]))}`,pathParams:{"policy-id":String(c[`policy-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();if(c.accountId=l,!await m({force:!!c.force})){process.stderr.write(`Aborted.
54
- `);return}i(await o(`Deleting`,async()=>s.dataSecurity.posture.policies.delete({account_id:l,policy_id:c[`policy-id`]})),{successLabel:`Deleted`})})};function be(e){return e.usage(`$0 data-security posture policies get <policy-id>
55
-
56
- Retrieves the details of a specific policy configuration, including its associated remediation and webhook actions.`).positional(`policy-id`,{type:`string`,description:`The UUID of the policy configuration to retrieve.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const xe={command:`get <policy-id>`,describe:`Get a policy configuration by ID`,builder:be,handler:async c=>s({command:`data-security posture policies get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf data-security posture policies get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/data-security/posture/policies/${c[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(c[`policy-id`]))}`,pathParams:{"policy-id":String(c[`policy-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();c.accountId=l,i(await o(`Loading`,async()=>s.dataSecurity.posture.policies.get({account_id:l,policy_id:c[`policy-id`]})),{successLabel:`Loaded`})})};function Se(e){return e.usage(`$0 data-security posture policies list
57
-
58
- Returns a list of integration-scoped policy configurations for the given account. This endpoint supports cursor based pagination. By default, results are returned in sorted order based on created_at.`).option(`cursor`,{type:`string`,description:"Cursor for pagination. Obtained from the `result_info.cursor` field of a previous response."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ce={command:`list`,describe:`List policy configurations`,builder:Se,handler:async c=>s({command:`data-security posture policies list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={cursor:c.cursor};if(c.dryRun){a({command:`cf data-security posture policies list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/data-security/posture/policies`,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.dataSecurity.posture.policies.list({account_id:u,...s})),{successLabel:`Loaded`})})};function we(e){return e.usage("$0 data-security posture policies logs list\n\nReturns a list of policy invocation logs for the given account, sourced from ClickHouse via Ready Analytics. Each entry represents one execution of a policy against a finding instance, including the actions (remediation jobs and webhooks) it dispatched. Results are scoped to the requesting account's CASB integrations. The `integration_id` query parameter, when supplied, is intersected against the account's integration allowlist; values outside the allowlist are silently dropped. Pagination is offset-based. The response does not include a total row count; clients should treat a result with fewer than `per_page` entries as the end of the list.").option(`since`,{type:`string`,description:"Lower bound on the log entry timestamp. Accepts ISO 8601 / RFC3339 or epoch seconds. Defaults to 7 days before `until`. The window between `since` and `until` cannot exceed 180 days."}).option(`until`,{type:`string`,description:"Upper bound on the log entry timestamp. Accepts ISO 8601 / RFC3339 or epoch seconds. Defaults to the current time. Must be greater than or equal to `since`."}).option(`integration-id`,{type:`string`,description:`Comma-separated list of CASB integration IDs to filter by. At most 100 values, each at most 128 characters. Values outside the account's tenancy allowlist are silently ignored. When omitted, results are scoped to the full allowlist.`}).option(`policy-name`,{type:`string`,description:`Comma-separated list of policy display names to filter by. At most 100 values, each at most 255 characters.`}).option(`page`,{type:`number`,description:`A page number within the paginated result set.`}).option(`per-page`,{type:`number`,description:`Number of results to return per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Te={command:`list`,describe:`List policy invocation logs`,builder:we,handler:async c=>s({command:`data-security posture policies logs list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={since:c.since,until:c.until,integration_id:c[`integration-id`],policy_name:c[`policy-name`],page:c.page,per_page:c[`per-page`]};if(c.dryRun){a({command:`cf data-security posture policies logs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/data-security/posture/policies/logs`,pathParams:{},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await n();c.accountId=u,i(await o(`Loading`,async()=>l.dataSecurity.posture.policies.logs.list({account_id:u,...s})),{successLabel:`Loaded`})})},Ee={command:`logs`,describe:`Operations for posture.policies.logs`,builder:e=>e.command(Te).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function De(e){return e.usage(`$0 data-security posture policies update <policy-id>
59
-
60
- Updates an existing policy configuration and replaces its actions.`).positional(`policy-id`,{type:`string`,description:`Policy configuration ID`,demandOption:!0}).option(`applies-to-all-integrations`,{type:`boolean`,description:`When true, the policy applies to all integrations for the account. When false, integration_ids must be provided.`}).option(`description`,{type:`string`,description:`Optional description of what this policy does.`}).option(`display-name`,{type:`string`,description:`Display name for the policy configuration.`}).option(`enabled`,{type:`boolean`,description:`Boolean specifying if the policy is enabled or disabled.`}).option(`integration-ids`,{type:`string`,array:!0,description:`The integrations this policy applies to. Required when applies_to_all_integrations is false.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for updating an existing policy configuration.`})}const Oe={command:`update <policy-id>`,describe:`Update a policy configuration`,builder:De,handler:async l=>s({command:`data-security posture policies update`,classification:{safeFlags:[`applies-to-all-integrations`,`enabled`,`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf data-security posture policies update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/data-security/posture/policies/${l[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(l[`policy-id`]))}`,pathParams:{"policy-id":String(l[`policy-id`]??``)},bodyKind:`json`,body:l.body===void 0?u({applies_to_all_integrations:l[`applies-to-all-integrations`],description:d(l.description,`description`,`text`),display_name:d(l[`display-name`],`display-name`,`text`),enabled:l.enabled,integration_ids:l[`integration-ids`]}):c(l.body)});return}let s=await r(l),p=l.local?e:await n();if(l.accountId=p,l.body){let e=c(l.body);i(await o(`Updating`,async()=>s.dataSecurity.posture.policies.update({...e,account_id:p,policy_id:l[`policy-id`]})),{successLabel:`Updated`});return}if(l[`applies-to-all-integrations`]===void 0)throw Error(`--applies-to-all-integrations is required (or pass --body with this field set).`);if(l[`display-name`]===void 0&&(l[`display-name`]=await f(`display-name`,`Display name for the policy configuration.`)),l.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);let m=u({applies_to_all_integrations:l[`applies-to-all-integrations`],description:d(l.description,`description`,`text`),display_name:d(l[`display-name`],`display-name`,`text`),enabled:l.enabled,integration_ids:l[`integration-ids`]});i(await o(`Updating`,async()=>s.dataSecurity.posture.policies.update({...m,account_id:p,policy_id:l[`policy-id`]})),{successLabel:`Updated`})})},ke={command:`policies`,describe:`Operations for posture.policies`,builder:e=>e.command(_e).command(ye).command(xe).command(Ce).command(Oe).command(Ee).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ae(e){return e.usage(`$0 data-security posture reset-finding-severity <finding-id>
61
-
62
- If a Finding's severity has been changed, reset it back to default value. Does nothing if no override exists.`).positional(`finding-id`,{type:`string`,description:`A base64-encoded ID identifying this Finding.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const je={command:`reset-finding-severity <finding-id>`,describe:`Reset severity for a finding back to the default`,builder:Ae,handler:async c=>s({command:`data-security posture reset-finding-severity`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf data-security posture reset-finding-severity`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/data-security/posture/findings/${c[`finding-id`]==null?`<finding-id>`:encodeURIComponent(String(c[`finding-id`]))}/reset_finding_severity`,pathParams:{"finding-id":String(c[`finding-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();c.accountId=l,i(await o(`Creating`,async()=>s.dataSecurity.posture.resetFindingSeverity({account_id:l,finding_id:c[`finding-id`]})),{successLabel:`Created`})})};function Me(e){return e.usage(`$0 data-security posture unarchive-finding-instance <finding-id>
63
-
64
- Remove the archive marking from one or more finding instances.`).positional(`finding-id`,{type:`string`,description:`A base64-encoded ID identifying this Finding.`,demandOption:!0}).option(`check-instances`,{type:`string`,array:!0,description:`A list of finding instance IDs to pass along.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for bulk actions on finding instances.`})}const Ne={command:`unarchive-finding-instance <finding-id>`,describe:`Remove the archive marking from a finding instance`,builder:Me,handler:async l=>s({command:`data-security posture unarchive-finding-instance`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf data-security posture unarchive-finding-instance`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/data-security/posture/findings/${l[`finding-id`]==null?`<finding-id>`:encodeURIComponent(String(l[`finding-id`]))}/instances/unarchive`,pathParams:{"finding-id":String(l[`finding-id`]??``)},bodyKind:`json`,body:l.body===void 0?u({check_instances:l[`check-instances`]}):c(l.body)});return}let s=await r(l),d=l.local?e:await n();if(l.accountId=d,l.body){let e=c(l.body);i(await o(`Creating`,async()=>s.dataSecurity.posture.unarchiveFindingInstance({body:e,account_id:d,finding_id:l[`finding-id`]})),{successLabel:`Created`});return}if(l[`check-instances`]===void 0)throw Error(`--check-instances is required (or pass --body with this field set).`);let f=u({check_instances:l[`check-instances`]});i(await o(`Creating`,async()=>s.dataSecurity.posture.unarchiveFindingInstance({body:f,account_id:d,finding_id:l[`finding-id`]})),{successLabel:`Created`})})};function Pe(e){return e.usage(`$0 data-security posture unignore-finding
65
-
66
- Ability to un-ignore a Finding if it's previously been ignored. Does nothing if the Finding is not ignored.`).option(`checks`,{type:`string`,array:!0,description:`A list of finding IDs to pass along.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for bulk actions on findings.`})}const $={command:`unignore-finding`,describe:`Remove ignore marker from a finding`,builder:Pe,handler:async l=>s({command:`data-security posture unignore-finding`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf data-security posture unignore-finding`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/data-security/posture/findings/unignore`,pathParams:{},bodyKind:`json`,body:l.body===void 0?u({checks:l.checks}):c(l.body)});return}let s=await r(l),d=l.local?e:await n();if(l.accountId=d,l.body){let e=c(l.body);i(await o(`Creating`,async()=>s.dataSecurity.posture.unignoreFinding({body:e,account_id:d})),{successLabel:`Created`});return}if(l.checks===void 0)throw Error(`--checks is required (or pass --body with this field set).`);let f=u({checks:l.checks});i(await o(`Creating`,async()=>s.dataSecurity.posture.unignoreFinding({body:f,account_id:d})),{successLabel:`Created`})})};function Fe(e){return e.usage(`$0 data-security posture webhooks delete <webhook-id>
67
-
68
- Soft deletes a webhook configuration by its unique identifier. The webhook will be marked as deleted and will no longer be available for use.`).positional(`webhook-id`,{type:`string`,description:`A UUID identifying the webhook configuration.`,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 Ie={command:`delete <webhook-id>`,describe:`Delete a webhook configuration`,builder:Fe,handler:async c=>s({command:`data-security posture webhooks delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf data-security posture webhooks delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/data-security/posture/webhooks/${c[`webhook-id`]==null?`<webhook-id>`:encodeURIComponent(String(c[`webhook-id`]))}`,pathParams:{"webhook-id":String(c[`webhook-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();if(c.accountId=l,!await m({force:!!c.force})){process.stderr.write(`Aborted.
69
- `);return}i(await o(`Deleting`,async()=>s.dataSecurity.posture.webhooks.delete({account_id:l,webhook_id:c[`webhook-id`]})),{successLabel:`Deleted`})})};function Le(e){return e.usage(`$0 data-security posture webhooks update <webhook-id>
70
-
71
- Updates an existing webhook configuration with new settings.`).positional(`webhook-id`,{type:`string`,description:`A UUID identifying the webhook configuration.`,demandOption:!0}).option(`authentication-type`,{type:`string`,description:`Type of authentication used for the webhook.`,choices:[`Basic Auth`,`None`,`Bearer Auth`,`Static Headers`,`HMAC-Signing`]}).option(`destination-url`,{type:`string`,description:`Target URL for the webhook configuration. Where resulting data will be sent.`}).option(`headers`,{type:`string`,description:`List of custom headers to include in webhook requests. Provide as a JSON array of objects or @path/to/file.json.`}).option(`label`,{type:`string`,description:`Account-specified display label for the webhook configuration.`}).option(`signing-secret`,{type:`string`,description:`Secret key used for HMAC signing when authentication_type is "HMAC-Signing".`}).option(`status`,{type:`string`,description:`Status of the webhook configuration.`,choices:[`enabled`,`disabled`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for updating an existing webhook configuration.`})}const Re={command:`update <webhook-id>`,describe:`Update an existing webhook configuration`,builder:Le,handler:async m=>s({command:`data-security posture webhooks update`,classification:{safeFlags:[`authentication-type`,`status`,`dry-run`]}},m,async()=>{if(m.dryRun){a({command:`cf data-security posture webhooks update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/data-security/posture/webhooks/${m[`webhook-id`]==null?`<webhook-id>`:encodeURIComponent(String(m[`webhook-id`]))}`,pathParams:{"webhook-id":String(m[`webhook-id`]??``)},bodyKind:`json`,body:m.body===void 0?u({authentication_type:d(m[`authentication-type`],`authentication-type`,`text`),destination_url:d(m[`destination-url`],`destination-url`,`text`),headers:l(m.headers,`headers`),label:d(m.label,`label`,`text`),signing_secret:d(m[`signing-secret`],`signing-secret`,`text`),status:d(m.status,`status`,`text`)}):c(m.body)});return}let s=await r(m),h=m.local?e:await n();if(m.accountId=h,m.body){let e=c(m.body);i(await o(`Updating`,async()=>s.dataSecurity.posture.webhooks.update({...e,account_id:h,webhook_id:m[`webhook-id`]})),{successLabel:`Updated`});return}m[`authentication-type`]===void 0&&(m[`authentication-type`]=await p(`authentication-type`,`Type of authentication used for the webhook.`,[`Basic Auth`,`None`,`Bearer Auth`,`Static Headers`,`HMAC-Signing`])),m[`destination-url`]===void 0&&(m[`destination-url`]=await f(`destination-url`,`Target URL for the webhook configuration. Where resulting data will be sent.`)),m.label===void 0&&(m.label=await f(`label`,`Account-specified display label for the webhook configuration.`)),m.status===void 0&&(m.status=await p(`status`,`Status of the webhook configuration.`,[`enabled`,`disabled`]));let g=u({authentication_type:d(m[`authentication-type`],`authentication-type`,`text`),destination_url:d(m[`destination-url`],`destination-url`,`text`),headers:l(m.headers,`headers`),label:d(m.label,`label`,`text`),signing_secret:d(m[`signing-secret`],`signing-secret`,`text`),status:d(m.status,`status`,`text`)});i(await o(`Updating`,async()=>s.dataSecurity.posture.webhooks.update({...g,account_id:h,webhook_id:m[`webhook-id`]})),{successLabel:`Updated`})})},ze={command:`webhooks`,describe:`Operations for posture.webhooks`,builder:e=>e.command(Ie).command(Re).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Be={command:`posture`,describe:`Operations for posture`,builder:e=>e.command(ee).command(_).command(T).command(D).command(j).command(k).command(F).command(N).command(L).command(z).command(W).command(X).command(K).command(J).command(Q).command(re).command(ae).command(se).command(le).command(de).command(pe).command(he).command(je).command(Ne).command($).command(C).command(H).command(ke).command(ze).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ve={command:`data-security`,describe:`data-security`,builder:e=>e.command(Be).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Ve as default};
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env node
2
- import{r as e}from"./theme-BIWQFmZ0.mjs";import{t}from"./cli-exit-Dqoo6Jgb.mjs";import"./ui-D1hhIDIs.mjs";import{n,r,t as i}from"./autoconfig-DED3bWob.mjs";import{n as a,t as o}from"./spawn-Da3HnlmB.mjs";import{t as s}from"./registry-4Sw95M5_.mjs";const c={command:`dev [implArgs..]`,describe:`Run the project's Cloudflare dev server`,builder:t=>t.positional(`implArgs`,{type:`string`,array:!0,describe:`Arguments forwarded to the dev-server implementation`}).parserConfiguration({"unknown-options-as-args":!0,"camel-case-expansion":!1}).epilogue(`cf dev starts the appropriate development server for your project. It runs your framework's dev command when available, falling back to an installed Cloudflare dev server.
3
-
4
- Only ${e.brand(`--mode`)} is forwarded to supported framework development servers. Other arguments are forwarded only to Cloudflare dev-server implementations.`),handler:async e=>{let c=process.cwd(),l=await i(c);l&&!l.configured&&await n(l);let u=(e.implArgs??[]).map(String),d=e.mode?[`--mode`,e.mode]:[];if(l?.devCommand){if(u.length>0)throw Error(`Arguments cannot currently be forwarded to the detected dev command \`${l.devCommand}\`. Run that command directly with the required arguments.`);if(e.mode&&!l.framework?.supportsMode)throw Error(`The detected command \`${l.devCommand}\` does not currently support \`--mode\`.`);let n=await r(l.devCommand,c,{env:{...l.env,...s()},args:d});throw new t(n.exitCode,{signal:n.signal})}let f=await o(a(c),`dev`,[...d,...u]);throw new t(f.exitCode,{signal:f.signal})}};export{c as default};
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- import{t as e}from"./output-CZt-berV.mjs";function t(t){e(t)}export{t};
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- import{t as e}from"./error-sanitization-TV6O0aCD.mjs";export{e as sanitizeError};
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- import{n as e}from"./generate-CrKNH6ms.mjs";export{e as generateWorkerTypes};
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- import{t as e}from"./interactive-D80kbTap.mjs";export{e as isCI};
@@ -1,21 +0,0 @@
1
- #!/usr/bin/env node
2
- import{t as e}from"./local-OKXweFsd.mjs";import{a as t,t as n}from"./context-Dzzbc9RK.mjs";import{a as r,r as i}from"./auth-B5p3SIhO.mjs";import{t as a}from"./output-CZt-berV.mjs";import{t as o}from"./dry-run-BmzTxDtZ.mjs";import{t as s}from"./progress-C9dWgc3J.mjs";import{t as c}from"./run-DK1d9BJz.mjs";import"./telemetry-C0k8vfbq.mjs";import{n as l,t as u}from"./body-parser-BpPZBRMr.mjs";import{n as d,t as f}from"./input-validation-D3e278L_.mjs";import{a as p,n as m}from"./prompt-Mh69ni1N.mjs";import{t as h}from"./cli-types-B6tm-8uL.mjs";import{n as g,t as _}from"./raw-fetch-1ygCOcT_.mjs";function v(e){return e.usage(`$0 kv bulk delete <namespace-id>
3
-
4
- Remove multiple KV pairs from the namespace. Body should be an array of up to 10,000 keys to be removed.`).positional(`namespace-id`,{type:`string`,description:`Namespace identifier tag.`,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 from the namespace.`})){process.stderr.write(`Aborted.
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>
6
-
7
- Retrieve up to 100 KV pairs from the namespace. Keys must contain text-based values. JSON values can optionally be parsed instead of being returned as a string value. Metadata can be included if \`withMetadata\` is true.`).positional(`namespace-id`,{type:`string`,description:`Namespace identifier tag.`,demandOption:!0}).option(`keys`,{type:`string`,array:!0,description:`Array of keys to retrieve (maximum of 100).`}).option(`type`,{type:`string`,description:`Whether to parse JSON values in the response.`,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 update <namespace-id>\n\nWrite multiple keys and values at once. Body should be an array of up to 10,000 key-value pairs to be stored, along with optional expiration information. Existing values and expirations will be overwritten. If neither `expiration` nor `expiration_ttl` is specified, the key-value pair will never expire. If both are set, `expiration_ttl` is used and `expiration` is ignored. The entire request size must be 100 megabytes or less.").positional(`namespace-id`,{type:`string`,description:`Namespace identifier tag.`,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:`update <namespace-id>`,describe:`Write multiple key-value pairs`,builder:S,handler:async u=>c({command:`kv bulk update`,classification:{safeFlags:[`dry-run`]}},u,async()=>{if(u.dryRun){o({command:`cf kv bulk update`,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\nRemove a KV pair from the namespace. Use URL-encoding to use special characters (for example, `:`, `!`, `%`) in the key name.").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:`Namespace identifier tag.`,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 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})){process.stderr.write(`Aborted.
8
- `);return}a(await s(`Deleting`,async()=>c.kv.keys.delete({account_id:l,namespace_id:r[`namespace-id`],key_name:r[`key-name`]})),{successLabel:`Deleted`})})};function D(e){return e.usage("$0 kv keys get <key-name>\n\nReturns the value associated with the given key in the given namespace. Use URL-encoding to use special characters (for example, `:`, `!`, `%`) in the key name. If the KV-pair is set to expire at some point, the expiration time as measured in seconds since the UNIX epoch will be returned in the `expiration` response header.").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:`Namespace identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`text`,{type:`boolean`,description:`Decode the response body as UTF-8 text instead of writing raw bytes`,default:!1})}const O={command:`get <key-name>`,describe:`Read key-value pair`,builder:D,handler:async r=>c({command:`kv keys get`,classification:{safeFlags:[`dry-run`,`text`]}},r,async()=>{if(r.dryRun){o({command:`cf kv keys get`,method:`GET`,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}await i(r);let a=r.local?e:await n();r.accountId=a;let c=await s(`Loading`,async()=>_(`/accounts/${a}/storage/kv/namespaces/${encodeURIComponent(String(r[`namespace-id`]))}/values/${encodeURIComponent(String(r[`key-name`]))}`,{method:`GET`,local:r.local===!0,persistTo:r.persistTo}));g(r.text===!0?c.toString(`utf-8`):c)})};function k(e){return e.usage(`$0 kv keys list
9
-
10
- Lists a namespace's keys.`).option(`namespace-id`,{type:`string`,description:`Namespace identifier tag.`,demandOption:!0}).option(`limit`,{type:`number`,description:`Limits the number of keys returned in the response. The cursor attribute may be used to iterate over the next batch of keys if there are more than the limit.`}).option(`prefix`,{type:`string`,description:`Filters returned keys by a name prefix. Exact matches and any key names that begin with the prefix will be returned.`}).option(`cursor`,{type:`string`,description:"Opaque token indicating the position from which to continue when requesting the next set of records if the amount of list results was limited by the limit parameter. A valid value for the cursor can be obtained from the `cursors` object in the `result_info` structure."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const A={command:`list`,describe:`List a Namespace's Keys`,builder:k,handler:async r=>c({command:`kv keys list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={limit:r.limit,prefix:r.prefix,cursor:r.cursor};if(r.dryRun){o({command:`cf kv keys list`,method:`GET`,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`]))}/keys`,pathParams:{"namespace-id":String(r[`namespace-id`]??``)},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await n();r.accountId=u,a(await s(`Loading`,async()=>l.kv.keys.list({account_id:u,namespace_id:r[`namespace-id`],...c})),{successLabel:`Loaded`})})};function j(e){return e.usage("$0 kv keys update <key-name>\n\nWrite a value identified by a key. Use URL-encoding to use special characters (for example, `:`, `!`, `%`) in the key name. Body should be the value to be stored. If JSON metadata to be associated with the key/value pair is needed, use `multipart/form-data` content type for your PUT request (see dropdown below in `REQUEST BODY SCHEMA`). Existing values, expirations, and metadata will be overwritten. If neither `expiration` nor `expiration_ttl` is specified, the key-value pair will never expire. If both are set, `expiration_ttl` is used and `expiration` is ignored.").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:`Namespace identifier tag.`,demandOption:!0}).option(`expiration`,{type:`number`,description:`Expires the key at a certain time, measured in number of seconds since the UNIX epoch.`}).option(`expiration-ttl`,{type:`number`,description:`Expires the key after a number of seconds. Must be at least 60.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`A byte sequence to be stored, up to 25 MiB in length.`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`}).option(`metadata`,{type:`string`,description:`The metadata`})}const M={command:`update <key-name>`,describe:`Write key-value pair with optional metadata`,builder:j,handler:async l=>c({command:`kv keys update`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={expiration:l.expiration,expiration_ttl:l[`expiration-ttl`]};if(l.dryRun){o({command:`cf kv keys update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/storage/kv/namespaces/${l[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(l[`namespace-id`]))}/values/${l[`key-name`]==null?`<key-name>`:encodeURIComponent(String(l[`key-name`]))}`,pathParams:{"key-name":String(l[`key-name`]??``),"namespace-id":String(l[`namespace-id`]??``)},query:c,bodyKind:l.metadata===void 0?`octet-stream`:`multipart`,body:l.metadata===void 0?l.body:{body:l.body,file:l.file,metadata:l.metadata}});return}let u=await i(l),p=l.local?e:await n();if(l.accountId=p,l.metadata!==void 0){let e=new FormData;if(l.file){let t=f(l.file);e.append(`value`,new Blob([t]),l.file.split(/[\\/]/).filter(Boolean).pop())}else l.body!==void 0&&e.append(`value`,l.body);l.metadata!==void 0&&e.append(`metadata`,String(d(l.metadata,`metadata`,`text`)??``)),a(await s(`Updating`,async()=>r(u,`PUT`,`/accounts/${p}/storage/kv/namespaces/${encodeURIComponent(String(l[`namespace-id`]))}/values/${encodeURIComponent(String(l[`key-name`]))}`,{body:e})),{successLabel:`Updated`});return}if(l.file){let e=f(l.file);a(await s(`Updating`,async()=>r(u,`PUT`,`/accounts/${p}/storage/kv/namespaces/${encodeURIComponent(String(l[`namespace-id`]))}/values/${encodeURIComponent(String(l[`key-name`]))}`,{body:e,headers:{"Content-Type":`application/octet-stream`}})),{successLabel:`Updated`});return}if(l.body){let e=d(l.body,`body`,`binary`),t=new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();a(await s(`Updating`,async()=>r(u,`PUT`,`/accounts/${p}/storage/kv/namespaces/${encodeURIComponent(String(l[`namespace-id`]))}/values/${encodeURIComponent(String(l[`key-name`]))}${t?`?`+t:``}`,{body:e,headers:{"Content-Type":`application/octet-stream`}})),{successLabel:`Updated`});return}if(l.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},N={command:`keys`,describe:`Operations for keys`,builder:e=>e.command(E).command(O).command(A).command(M).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function P(e){return e.usage("$0 kv metadata get <key-name>\n\nReturns the metadata associated with the given key in the given namespace. Use URL-encoding to use special characters (for example, `:`, `!`, `%`) in the key name.").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:`Namespace identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const F={command:`get <key-name>`,describe:`Read the metadata for a key`,builder:P,handler:async r=>c({command:`kv metadata get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf kv metadata get`,method:`GET`,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`]))}/metadata/${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();r.accountId=l,a(await s(`Loading`,async()=>c.kv.metadata.get({account_id:l,namespace_id:r[`namespace-id`],key_name:r[`key-name`]})),{successLabel:`Loaded`})})},I={command:`metadata`,describe:`Operations for metadata`,builder:e=>e.command(F).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function L(e){return e.usage(`$0 kv namespaces create
11
-
12
- Creates a namespace under the given title. A \`400\` is returned if the account already owns a namespace with this title. A namespace must be explicitly deleted to be replaced.`).option(`jurisdiction`,{type:`string`,description:`Specify the jurisdiction to restrict the KV namespace to durably store data within. Can only be set at namespace creation time.`,choices:[`eu`,`fedramp`,`us`]}).option(`title`,{type:`string`,description:`A human-readable string name for a Namespace.`}).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 R={command:`create`,describe:`Create a Namespace`,builder:L,handler:async r=>c({command:`kv namespaces create`,classification:{safeFlags:[`jurisdiction`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf kv namespaces create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/storage/kv/namespaces`,pathParams:{},bodyKind:`json`,body:r.body===void 0?u({jurisdiction:d(r.jurisdiction,`jurisdiction`,`text`),title:d(r.title,`title`,`text`)}):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.namespaces.create({...e,account_id:f})),{successLabel:`Created`});return}r.title===void 0&&(r.title=await p(`title`,`A human-readable string name for a Namespace.`));let m=u({jurisdiction:d(r.jurisdiction,`jurisdiction`,`text`),title:d(r.title,`title`,`text`)});a(await s(`Creating`,async()=>c.kv.namespaces.create({...m,account_id:f})),{successLabel:`Created`})})};function z(e){return e.usage(`$0 kv namespaces delete <namespace-id>
13
-
14
- Deletes the namespace corresponding to the given ID.`).positional(`namespace-id`,{type:`string`,description:`Namespace identifier tag.`,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 B={command:`delete <namespace-id>`,describe:`Remove a Namespace`,builder:z,handler:async r=>c({command:`kv namespaces delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf kv namespaces 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`]))}`,pathParams:{"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})){process.stderr.write(`Aborted.
15
- `);return}a(await s(`Deleting`,async()=>c.kv.namespaces.delete({account_id:l,namespace_id:r[`namespace-id`]})),{successLabel:`Deleted`})})};function V(e){return e.usage(`$0 kv namespaces get <namespace-id>
16
-
17
- Get the namespace corresponding to the given ID.`).positional(`namespace-id`,{type:`string`,description:`Namespace identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const H={command:`get <namespace-id>`,describe:`Get a Namespace`,builder:V,handler:async r=>c({command:`kv namespaces get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf kv namespaces get`,method:`GET`,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`]))}`,pathParams:{"namespace-id":String(r[`namespace-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();r.accountId=l,a(await s(`Loading`,async()=>c.kv.namespaces.get({account_id:l,namespace_id:r[`namespace-id`]})),{successLabel:`Loaded`})})};function U(e){return e.usage(`$0 kv namespaces list
18
-
19
- Returns the namespaces owned by an account.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results per page.`}).option(`order`,{type:`string`,description:`Field to order results by.`,choices:[`id`,`title`]}).option(`direction`,{type:`string`,description:`Direction to order namespaces.`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const W={command:`list`,describe:`List Namespaces`,builder:h(U),handler:async r=>c({command:`kv namespaces list`,classification:{safeFlags:[`order`,`direction`,`dry-run`]}},r,async()=>{let c={page:r.page,per_page:r[`per-page`],order:r.order,direction:r.direction};if(r.dryRun){o({command:`cf kv namespaces list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/storage/kv/namespaces`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await n();r.accountId=u,a(await s(`Loading`,async()=>l.kv.namespaces.list({account_id:u,...c})),{successLabel:`Loaded`})})};function G(e){return e.usage(`$0 kv namespaces update <namespace-id>
20
-
21
- Modifies a namespace's title.`).positional(`namespace-id`,{type:`string`,description:`Namespace identifier tag.`,demandOption:!0}).option(`title`,{type:`string`,description:`A human-readable string name for a Namespace.`}).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 K={command:`update <namespace-id>`,describe:`Rename a Namespace`,builder:G,handler:async r=>c({command:`kv namespaces update`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf kv namespaces update`,method:`PUT`,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`]))}`,pathParams:{"namespace-id":String(r[`namespace-id`]??``)},bodyKind:`json`,body:r.body===void 0?u({title:d(r.title,`title`,`text`)}):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(`Updating`,async()=>c.kv.namespaces.update({...e,account_id:f,namespace_id:r[`namespace-id`]})),{successLabel:`Updated`});return}r.title===void 0&&(r.title=await p(`title`,`A human-readable string name for a Namespace.`));let m=u({title:d(r.title,`title`,`text`)});a(await s(`Updating`,async()=>c.kv.namespaces.update({...m,account_id:f,namespace_id:r[`namespace-id`]})),{successLabel:`Updated`})})},q={command:`namespaces`,describe:`Operations for namespaces`,builder:e=>e.command(R).command(B).command(H).command(W).command(K).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},J={command:`kv`,describe:`kv`,builder:e=>e.command(w).command(N).command(I).command(q).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{J as default};
@@ -1,2 +0,0 @@
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){await t.default.handler(e);return}let{runWithTelemetry:i}=await import(`./run-C_qUgBTs.mjs`);await i(r,e,()=>t.default.handler(e))}}}export{e as t};
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- import{r as e}from"./local-OKXweFsd.mjs";export{e as createLocalFetch};
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- import"./src-BLLpnbzC.mjs";import{r as e}from"./theme-BIWQFmZ0.mjs";import{t}from"./cli-exit-Dqoo6Jgb.mjs";import{a as n,i as r}from"./banner-Xk4xBN8U.mjs";import"./ui-D1hhIDIs.mjs";import i from"node:path";import{stat as a}from"node:fs/promises";import{migrateWranglerToCf as o}from"@cloudflare/codemods";const s=[`wrangler.json`,`wrangler.jsonc`,`wrangler.toml`];function c(e){return e.positional(`path`,{type:`string`,description:`Path to a Wrangler configuration file`}).option(`bundler`,{choices:[`vite`,`wrangler`],default:`vite`,description:`Bundler to use in the migrated project`}).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)`})}async function l(e){try{return(await a(e)).isFile()}catch(e){if(e instanceof Error&&`code`in e&&e.code===`ENOENT`)return!1;throw e}}async function u(e){let t=process.cwd();if(e!==void 0)return i.resolve(t,e);let n=s.map(e=>i.join(t,e)),r=(await Promise.all(n.map(async e=>({candidate:e,exists:await l(e)})))).filter(({exists:e})=>e).map(({candidate:e})=>e),[a]=r;if(r.length===1&&a!==void 0)return a;throw r.length===0?Error(`No Wrangler config found in ${t}. Pass its path to cf migrate.`):Error(`Multiple Wrangler configs found in ${t}. Pass the exact path to cf migrate.`)}function d(t){if(t.length!==0){console.log(`\n${e.bold(`Follow-up work:`)}`);for(let[n,r]of t.entries()){let i=n===t.length-1,a=i?`└─`:`├─`,o=r.blocking?e.error(`[required]`):e.info(`[info]`),s=r.sourcePath?`${e.code(r.sourcePath)}: `:``;console.log(`${e.muted(a)} ${o} ${s}${r.message}`),r.docsUrl&&console.log(`${e.muted(`${i?` `:`│`} └─`)} ${e.muted(r.docsUrl)}`)}}}function f(t,a,o){if(t.changedFiles.length>0){console.log(e.bold(`${a?`Would update`:`Updated`} ${t.changedFiles.length} file(s):`));for(let[n,r]of t.changedFiles.entries()){let a=n===t.changedFiles.length-1?`└─`:`├─`,s=i.relative(process.cwd(),i.resolve(o,r));console.log(`${e.muted(a)} ${e.code(s)}`)}}if(d(t.followUps),t.status===`needs-intervention`){console.log(`\n${n(`Migration requires follow-up work.`)}`);return}console.log(`\n${r(`Migration${a?` preview`:``} complete.`)}`)}const p={command:`migrate [path]`,describe:`Migrate a Wrangler project to cf`,builder:c,handler:async e=>{let n=await u(e.path),r=await o(n,{bundler:e.bundler,dryRun:e[`dry-run`],force:e.force,installDependencies:e.install});if(f(r,e[`dry-run`],i.dirname(n)),r.status===`needs-intervention`)throw new t(1)}};export{p as default};
@@ -1,9 +0,0 @@
1
- #!/usr/bin/env node
2
- import{t as e}from"./cli-exit-Dqoo6Jgb.mjs";import{n as t,t as n}from"./version-B47pK_PZ.mjs";import{t as r}from"./session-BEXskZi2.mjs";import{a as i,n as a,t as o}from"./cf--3tGe71B.mjs";import{n as s}from"./context-Dzzbc9RK.mjs";import{M as c,n as l}from"./interactive-D80kbTap.mjs";import{i as u,o as d}from"./dist-Cpb7_h4N.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: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};