cf 1.0.0-beta.2 → 1.0.0-beta.3

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 (305) hide show
  1. package/README.md +1 -0
  2. package/dist/_meta/commands.json +28025 -30372
  3. package/dist/_meta/hand-written-commands.json +72 -49
  4. package/dist/_meta/schemas.json +18618 -20269
  5. package/dist/{abuse-reports-JcwSaW-c.mjs → abuse-reports-CWX7WKhe.mjs} +1 -1
  6. package/dist/access-2aKv_Dya.mjs +2 -0
  7. package/dist/{account-CLsfIk5j.mjs → account-CnZO9-bl.mjs} +1 -1
  8. package/dist/{account-tags-BJdDiyDi.mjs → account-tags-ClLZOfTA.mjs} +1 -1
  9. package/dist/{accounts-6eXqIqSW.mjs → accounts-Cbj9aFyY.mjs} +1 -1
  10. package/dist/{acm-ChNLnPqM.mjs → acm-wGJ9cnzE.mjs} +1 -1
  11. package/dist/{addressing-z8ei_TCh.mjs → addressing-YvHX2dAb.mjs} +5 -5
  12. package/dist/{agent-memory-Un0usAVF.mjs → agent-memory-B4N-lmLb.mjs} +1 -1
  13. package/dist/{ai-audit-FR6QuDK_.mjs → ai-audit-CG_DG6N7.mjs} +1 -1
  14. package/dist/ai-gateway-DUttjxrN.mjs +80 -0
  15. package/dist/{ai-Bj8kgDf7.mjs → ai-lziiVEGR.mjs} +1 -1
  16. package/dist/{ai-search-BvMeOKK6.mjs → ai-search-k63uopiK.mjs} +1 -1
  17. package/dist/{ai-security-BHvDKoM1.mjs → ai-security-D10lzYTn.mjs} +1 -1
  18. package/dist/{alerting-DmRZCAjg.mjs → alerting-c4ICS8KO.mjs} +1 -1
  19. package/dist/{analytics-DqidJ4qc.mjs → analytics-CEQ0EVTq.mjs} +1 -1
  20. package/dist/{analytics_engine-I7N0I6yP.mjs → analytics_engine-B9kiAPbY.mjs} +1 -1
  21. package/dist/{api-security-BMNhdDyR.mjs → api-security-6LlxeiOi.mjs} +1 -1
  22. package/dist/{argo-U5TIBcub.mjs → argo-BCcp1ybr.mjs} +1 -1
  23. package/dist/{artifacts-Byw1W73U.mjs → artifacts-PoO3rAvo.mjs} +1 -1
  24. package/dist/{audit-logs-C6zyFeKM.mjs → audit-logs-Vt3NbAA1.mjs} +1 -1
  25. package/dist/{auth-B5p3SIhO.mjs → auth-3bFlHTVl.mjs} +2 -2
  26. package/dist/{auth-CosaKfuk.mjs → auth-BfYtTyXo.mjs} +1 -1
  27. package/dist/{autoconfig-DED3bWob.mjs → autoconfig-DqgOi1kW.mjs} +28 -28
  28. package/dist/{banner-Xk4xBN8U.mjs → banner-ClclgnBn.mjs} +1 -1
  29. package/dist/{billing-BS1raRJt.mjs → billing-DVrpin2a.mjs} +1 -1
  30. package/dist/{bot-management-Cn6xfGzJ.mjs → bot-management-Bw-GZWoT.mjs} +1 -1
  31. package/dist/{botnet-feed-DtWOPNfw.mjs → botnet-feed-ov970cZf.mjs} +1 -1
  32. package/dist/{brand-protection-BcEQ66bT.mjs → brand-protection-C7WOvdx6.mjs} +1 -1
  33. package/dist/{browser-run-RZ7ZPRop.mjs → browser-run-DhnKUXVv.mjs} +1 -1
  34. package/dist/build-CVvo9BvP.mjs +2 -0
  35. package/dist/{build-DG8NfVjJ.mjs → build-vfD1txJe.mjs} +1 -1
  36. package/dist/{builds-AOCMH4CE.mjs → builds-BIqfNXEE.mjs} +1 -1
  37. package/dist/{cache-D_EBxDff.mjs → cache-Dzl3kth1.mjs} +1 -1
  38. package/dist/{certificate-authorities-B6rtjuaT.mjs → certificate-authorities-CQinLiq_.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-ZXrxm369.mjs +6 -0
  43. package/dist/{client-certificates-uBOjGcgo.mjs → client-certificates--vw-4vvy.mjs} +1 -1
  44. package/dist/{client-side-security-Bm7JwGaG.mjs → client-side-security-YCsdeK3e.mjs} +1 -1
  45. package/dist/{cloud-connector-69M2Dx8h.mjs → cloud-connector-CwSi4zZI.mjs} +1 -1
  46. package/dist/{cloudflared-Ba5LySkU.mjs → cloudflared-CH8rOneA.mjs} +1 -1
  47. package/dist/{cloudforce-one-Xn2mlAPv.mjs → cloudforce-one-hEykJeqy.mjs} +1 -1
  48. package/dist/command-Axp5Wfpj.mjs +2 -0
  49. package/dist/command-BH-TMJWp.mjs +2 -0
  50. package/dist/command-C1CwuI4O.mjs +2 -0
  51. package/dist/{command-Cb0pS8T5.mjs → command-CIZDQPmS.mjs} +1 -1
  52. package/dist/{command-DEC5PwJo.mjs → command-CeL8kQCM.mjs} +1 -1
  53. package/dist/command-ChDtawgh.mjs +2 -0
  54. package/dist/{command-DCpX9Cem.mjs → command-D5nZoVE1.mjs} +1 -1
  55. package/dist/command-DBCoI1fN.mjs +2 -0
  56. package/dist/command-DBpr6U4L.mjs +2 -0
  57. package/dist/command-DrQKTf1O.mjs +2 -0
  58. package/dist/{command-Cz_bKDWf.mjs → command-IuYNIUk9.mjs} +1 -1
  59. package/dist/command-L0y09SE5.mjs +2 -0
  60. package/dist/{command-BxQbIQWT.mjs → command-ZSxcR8-J.mjs} +1 -1
  61. package/dist/command-egPOyKbx.mjs +2 -0
  62. package/dist/command-jJKEah9i.mjs +2 -0
  63. package/dist/{completions-DZDltM9V.mjs → completions-DNisLHie.mjs} +26 -26
  64. package/dist/{connector-interrupts-DTy6laab.mjs → connector-interrupts-uIHLde10.mjs} +1 -1
  65. package/dist/{connector-telemetry-events-CJqGGvFJ.mjs → connector-telemetry-events-D2MH0OSs.mjs} +1 -1
  66. package/dist/{connector-telemetry-snapshots-BPxhPhr6.mjs → connector-telemetry-snapshots-CQICQaGf.mjs} +1 -1
  67. package/dist/{connectors-CdfCcZuA.mjs → connectors-BXwvP7SF.mjs} +1 -1
  68. package/dist/{containers-C7z53QcY.mjs → containers-ClK7HGfx.mjs} +88 -90
  69. package/dist/{containers-VMqcxH5a.mjs → containers-DOyOrVV9.mjs} +1 -1
  70. package/dist/{content-scan-BirgZrmr.mjs → content-scan-B71JZ7G6.mjs} +1 -1
  71. package/dist/{context-Dzzbc9RK.mjs → context-5JRcefHh.mjs} +2 -2
  72. package/dist/{cps-DzFm3zKp.mjs → cps-CzNfFv-5.mjs} +1 -1
  73. package/dist/{csamScanner-D2_OO5-1.mjs → csamScanner-BfZcrcjk.mjs} +1 -1
  74. package/dist/{ct-alerting-B7wQkFVl.mjs → ct-alerting-Cm8YLmXE.mjs} +1 -1
  75. package/dist/{custom-certificates-BKcCfbH8.mjs → custom-certificates-DFMRe9_D.mjs} +1 -1
  76. package/dist/{custom-csrs-CXoOxir4.mjs → custom-csrs-B5njuvdd.mjs} +1 -1
  77. package/dist/{custom-hostnames-CNYfnCOd.mjs → custom-hostnames-D06jQfNs.mjs} +1 -1
  78. package/dist/{custom-nameservers-BlLM7a4L.mjs → custom-nameservers-CKwKLqbF.mjs} +1 -1
  79. package/dist/{custom-pages-BcWoypet.mjs → custom-pages-D339_r6I.mjs} +1 -1
  80. package/dist/{d1-CvrHsqYY.mjs → d1-CHXmF-Ga.mjs} +1 -1
  81. package/dist/{dcv-delegation-9_Hl-5v-.mjs → dcv-delegation-BAnTwW8J.mjs} +1 -1
  82. package/dist/delegate.mjs +1 -1
  83. package/dist/{deploy-BlXYtvTd.mjs → deploy-CsQbufsL.mjs} +1 -1
  84. package/dist/{deploy-input-DTXVZ2QJ.mjs → deploy-input-dwBe8pSi.mjs} +1 -1
  85. package/dist/{dev-reqdKM28.mjs → dev-BpvWl6pG.mjs} +1 -1
  86. package/dist/{diagnostics-BxHs1EJB.mjs → diagnostics-BEUAWeLH.mjs} +1 -1
  87. package/dist/{dialog-ClHoC_cG.mjs → dialog-BlUXJKbA.mjs} +1 -1
  88. package/dist/discover-DmIsaE54.mjs +2 -0
  89. package/dist/{dist-CmyJy57B.mjs → dist-CpufWpsP.mjs} +14 -14
  90. package/dist/{dist-Cpb7_h4N.mjs → dist-DW47TUGh.mjs} +1 -1
  91. package/dist/{dist-cGGV-p_F.mjs → dist-DfMipWKR.mjs} +3 -3
  92. package/dist/{dls-D7GXW-N3.mjs → dls-CXS7bPlj.mjs} +1 -1
  93. package/dist/{dns-B0mdWJO5.mjs → dns-Dx7oPdtH.mjs} +1 -1
  94. package/dist/{dns-firewall-BG0bzuL3.mjs → dns-firewall-wcP1fgB-.mjs} +1 -1
  95. package/dist/{dot-prop-IITUZ2XW-BO5KJUwL.mjs → dot-prop-IITUZ2XW-BilKo4kO.mjs} +1 -1
  96. package/dist/dotenv-CcQjGlV0.mjs +4 -0
  97. package/dist/dry-run-Bq0JAsbX.mjs +2 -0
  98. package/dist/{durable-objects-DW0CsJzR.mjs → durable-objects-DmieQflu.mjs} +1 -1
  99. package/dist/{email-auth-Ls-7Yijm.mjs → email-auth-DiO-k5wt.mjs} +1 -1
  100. package/dist/{email-routing-DVaFhg-3.mjs → email-routing-CycPV4UR.mjs} +1 -1
  101. package/dist/{email-security-vnwkqlgp.mjs → email-security-DhtBU1X_.mjs} +1 -1
  102. package/dist/{email-sending-CbMUicJz.mjs → email-sending-BjgiwUht.mjs} +1 -1
  103. package/dist/error-sanitization-Cu-8OKRA.mjs +2 -0
  104. package/dist/{error-sanitization-TV6O0aCD.mjs → error-sanitization-Dc4bLj8k.mjs} +1 -1
  105. package/dist/{fieldExtractors-2EkDoJg8.mjs → fieldExtractors-BOBRZ8gw.mjs} +1 -1
  106. package/dist/{firewall-BK4QYqRe.mjs → firewall-Dc0Xm26N.mjs} +1 -1
  107. package/dist/{flagship--lHQ0H3n.mjs → flagship-BRqR3ioN.mjs} +1 -1
  108. package/dist/{fraud-CaoRrQ8W.mjs → fraud-Czu1ed5n.mjs} +1 -1
  109. package/dist/generate-BAHK895m.mjs +2 -0
  110. package/dist/{generate-CrKNH6ms.mjs → generate-DWW1YPjv.mjs} +1 -1
  111. package/dist/{google-tag-gateway-DDzLPmk5.mjs → google-tag-gateway-DsZA0a1r.mjs} +1 -1
  112. package/dist/gt-DmcMNPX6.mjs +2 -0
  113. package/dist/{healthchecks-Q2uXvt4m.mjs → healthchecks-CFH5bIAG.mjs} +1 -1
  114. package/dist/{hostnames-CsaYnis6.mjs → hostnames-CKDSQsXT.mjs} +1 -1
  115. package/dist/{hyperdrive-DDr6sAkw.mjs → hyperdrive-BLiI7eoy.mjs} +1 -1
  116. package/dist/{iam-CmzocepZ.mjs → iam-B5mdfq5e.mjs} +1 -1
  117. package/dist/{images-Ux0Phsbi.mjs → images-IVRjrB4_.mjs} +1 -1
  118. package/dist/index.mjs +1 -1
  119. package/dist/{init-Nx4RRgfT.mjs → init-C6pA2OKl.mjs} +2 -2
  120. package/dist/{intel-bgS4g7nx.mjs → intel-CvesITo3.mjs} +1 -1
  121. package/dist/interactive-SgAjen2z.mjs +2 -0
  122. package/dist/{ips-BDiolgWF.mjs → ips-DT9GaimG.mjs} +1 -1
  123. package/dist/{keyless-certificates-C_TwTMql.mjs → keyless-certificates-B0Xe5WqA.mjs} +1 -1
  124. package/dist/{keys-Cr8AqQDY.mjs → keys-BfcwaSGe.mjs} +1 -1
  125. package/dist/kv-BAKDr9h1.mjs +15 -0
  126. package/dist/lazy-command-BR3u8SQ2.mjs +2 -0
  127. package/dist/{leaked-credential-checks-De7ph4VA.mjs → leaked-credential-checks-gRpF7J9-.mjs} +1 -1
  128. package/dist/{load-balancers-DXt4ndF4.mjs → load-balancers-CLVWIN9d.mjs} +1 -1
  129. package/dist/local-22UA5g9y.mjs +2 -0
  130. package/dist/{local-OKXweFsd.mjs → local-CxYne8s2.mjs} +1 -1
  131. package/dist/{local-runtime-tTYpniPS.mjs → local-runtime-C_fR3pz4.mjs} +1 -1
  132. package/dist/{login-BurQ63Ws.mjs → login-B2IW-LZC.mjs} +1 -1
  133. package/dist/{login-CmlHvH5k.mjs → login-BKQI53YQ.mjs} +1 -1
  134. package/dist/{logo-matches-CQ60P96J.mjs → logo-matches-CmCWQC_j.mjs} +1 -1
  135. package/dist/{logos-u7UwT8MH.mjs → logos-DoGIvvML.mjs} +1 -1
  136. package/dist/{logpush-IoIe8e80.mjs → logpush-C2fS4mz8.mjs} +1 -1
  137. package/dist/{logs-ih5tyXEE.mjs → logs-DOchrxC9.mjs} +1 -1
  138. package/dist/{magic-cloud-networking-CWNFnjcY.mjs → magic-cloud-networking-BTWKttlB.mjs} +1 -1
  139. package/dist/{magic-network-monitoring-ClfZleF8.mjs → magic-network-monitoring-C_6hCn_f.mjs} +1 -1
  140. package/dist/{magic-transit-D69pkEVW.mjs → magic-transit-B-Rmmg-Z.mjs} +1 -1
  141. package/dist/{managed-defense-BHdmL0vx.mjs → managed-defense-BPSLbGgV.mjs} +1 -1
  142. package/dist/{managed-transforms-DbCR4LUg.mjs → managed-transforms-BqiDVQD6.mjs} +1 -1
  143. package/dist/{matches-Cou6RVkh.mjs → matches-wLc335So.mjs} +1 -1
  144. package/dist/{mcp-CQYfM19s.mjs → mcp-CmQOrkzP.mjs} +1 -1
  145. package/dist/{mesh-CXqaAFS4.mjs → mesh-DRuFq2pw.mjs} +1 -1
  146. package/dist/migrate-DBwOnU6B.mjs +2 -0
  147. package/dist/{mtls-certificates-DNeId8xS.mjs → mtls-certificates-BUcQwJGQ.mjs} +1 -1
  148. package/dist/{network-B7V3JbU7.mjs → network-BuXy0ysq.mjs} +1 -1
  149. package/dist/{network-interconnects-BNon8iUs.mjs → network-interconnects-BzfPaxkW.mjs} +1 -1
  150. package/dist/{oauth-CeXh-ACI.mjs → oauth-BYmfy7l7.mjs} +1 -1
  151. package/dist/{oauth-DM8q-TYg.mjs → oauth-BlFK0DPZ.mjs} +1 -1
  152. package/dist/{oauth-clients-gGmWIWHl.mjs → oauth-clients-CnABE4xT.mjs} +1 -1
  153. package/dist/{oauth-scopes-DSEu331u.mjs → oauth-scopes-BFy1Hw7K.mjs} +1 -1
  154. package/dist/{observability-_VJhfwM1.mjs → observability-B1IkzeE0.mjs} +1 -1
  155. package/dist/{open-PCXX3ZDZ-DobJT1Mj.mjs → open-PCXX3ZDZ-BKRik1gi.mjs} +3 -3
  156. package/dist/{organization-DW4EpwGl.mjs → organization-DeIzTyFr.mjs} +1 -1
  157. package/dist/{organizations-DE1g2wVq.mjs → organizations-dpNO5XaQ.mjs} +1 -1
  158. package/dist/{origin-ca-certificates-D3ULDV__.mjs → origin-ca-certificates-B-1YtC61.mjs} +1 -1
  159. package/dist/{origin-post-quantum-encryption-BLropaz7.mjs → origin-post-quantum-encryption-DdvwucsG.mjs} +1 -1
  160. package/dist/{origin-tls-client-auth-C87TG2i_.mjs → origin-tls-client-auth-CzfpVmTE.mjs} +1 -1
  161. package/dist/{output-CZt-berV.mjs → output-CvQFJkvi.mjs} +1 -1
  162. package/dist/{page-rules-tlb9P-7V.mjs → page-rules--wnIp30C.mjs} +1 -1
  163. package/dist/pages-DvhJZv5S.mjs +60 -0
  164. package/dist/{pay-per-crawl-C50wI-Iz.mjs → pay-per-crawl-lqX3Rwt9.mjs} +1 -1
  165. package/dist/{pay-per-use-DHHIvynU.mjs → pay-per-use-BRKnBlz2.mjs} +1 -1
  166. package/dist/{pipelines-Y2icOwuf.mjs → pipelines-CvePummb.mjs} +1 -1
  167. package/dist/{precursor-DeyurJSC.mjs → precursor-DgotmHQd.mjs} +1 -1
  168. package/dist/previews-Brsuhzmk.mjs +4 -0
  169. package/dist/{progress-C9dWgc3J.mjs → progress-DUeNqM-j.mjs} +1 -1
  170. package/dist/{prompt-Mh69ni1N.mjs → prompt-DV6YTdoa.mjs} +1 -1
  171. package/dist/{queries-DyUJefwL.mjs → queries-CLqy4AM6.mjs} +1 -1
  172. package/dist/{queues-CdNe4tGY.mjs → queues-D0Y4LNP1.mjs} +1 -1
  173. package/dist/r2-D_FuuTGm.mjs +132 -0
  174. package/dist/{r2-data-catalog-D_zDlmVD.mjs → r2-data-catalog-D5Fvpr3C.mjs} +1 -1
  175. package/dist/{radar-CSguicKC.mjs → radar-B6bYFNVn.mjs} +1 -1
  176. package/dist/{raw-fetch-1ygCOcT_.mjs → raw-fetch-Cp3EaTcj.mjs} +1 -1
  177. package/dist/{realtime-CvWs5pi3.mjs → realtime-BTBZoZNW.mjs} +1 -1
  178. package/dist/{registrar-DQUxn0FK.mjs → registrar-CFh4TCkC.mjs} +1 -1
  179. package/dist/{registrar-sandbox-Q7ZEmg2x.mjs → registrar-sandbox-By6ukXxf.mjs} +1 -1
  180. package/dist/{registry-4Sw95M5_.mjs → registry-kYRASukx.mjs} +1 -1
  181. package/dist/{reporting-DJShxeDv.mjs → reporting-Cf3q4cuO.mjs} +1 -1
  182. package/dist/{request-headers-DFBBErJg.mjs → request-headers-jdUlF-_S.mjs} +1 -1
  183. package/dist/{request-tracers-DD8HlG61.mjs → request-tracers-CqNmb-dS.mjs} +1 -1
  184. package/dist/resolve-PZuJ878-.mjs +2 -0
  185. package/dist/{resource-sharing-J46JMWQP.mjs → resource-sharing-vDvq5J5a.mjs} +1 -1
  186. package/dist/{resource-tagging-DLZJLIqy.mjs → resource-tagging-DRCkpRmf.mjs} +1 -1
  187. package/dist/{rules-D068LfBR.mjs → rules-D-IfU82u.mjs} +1 -1
  188. package/dist/{rulesets-Cz6P7Oje.mjs → rulesets-ezJUnXm7.mjs} +1 -1
  189. package/dist/{rum-C6GQC2vI.mjs → rum-G42H7AXu.mjs} +1 -1
  190. package/dist/run-BhfDNWCI.mjs +2 -0
  191. package/dist/run-djd1-6kN.mjs +2 -0
  192. package/dist/{schema-flags-BmY0Nzp0.mjs → schema-flags-yDMur8UR.mjs} +1 -1
  193. package/dist/{schema-VZPw_2CY.mjs → schema-s22s29sJ.mjs} +1 -1
  194. package/dist/{scim-DMTp_Zhc.mjs → scim-DgRlqTtE.mjs} +1 -1
  195. package/dist/{sdk-BuF3fTHr.mjs → sdk-Bx29ZKK3.mjs} +2 -2
  196. package/dist/{secrets-store-C2epk0sQ.mjs → secrets-store-DcNmMGG2.mjs} +1 -1
  197. package/dist/{security-center-DwMdQ02Y.mjs → security-center-CZwVaL7t.mjs} +1 -1
  198. package/dist/{security-txt-CORQfMul.mjs → security-txt-CD0RAEsU.mjs} +1 -1
  199. package/dist/{session-BEXskZi2.mjs → session-CjQFm10R.mjs} +1 -1
  200. package/dist/shared-Cfuwhk19.mjs +2 -0
  201. package/dist/{smart-shield-BZ0xjy_6.mjs → smart-shield-C72SYuAe.mjs} +1 -1
  202. package/dist/{snippets-LSkJGDOc.mjs → snippets-Bl4Rfvdf.mjs} +1 -1
  203. package/dist/spawn-PBhhCQdl.mjs +10 -0
  204. package/dist/{spectrum-zU8_GFTV.mjs → spectrum-BgOMd04u.mjs} +1 -1
  205. package/dist/{speed-4XbFmeYM.mjs → speed-dahwVmv-.mjs} +1 -1
  206. package/dist/src-npcmT3gh.mjs +109 -0
  207. package/dist/{ssl-DiCsMY_a.mjs → ssl-BMZZPgJx.mjs} +1 -1
  208. package/dist/startup-profile-B0UCc9_J.mjs +2 -0
  209. package/dist/{startup-profile-6fCkD04r.mjs → startup-profile-DrV846S5.mjs} +3 -3
  210. package/dist/{state-DiHwKWTy.mjs → state-DhHOAdTo.mjs} +1 -1
  211. package/dist/state-Dyo8DcW7.mjs +2 -0
  212. package/dist/{stream-BG3NUAVE.mjs → stream-CsQ8wMMF.mjs} +1 -1
  213. package/dist/{submit-CKSaSFS1.mjs → submit-DdoTeeRt.mjs} +1 -1
  214. package/dist/{tags-uT9Mi-bX.mjs → tags-BESTUjkv.mjs} +1 -1
  215. package/dist/telemetry-CVjp5qaj.mjs +2 -0
  216. package/dist/telemetry-iBZ-f6og.mjs +2 -0
  217. package/dist/{tenant--UrYFHM0.mjs → tenant-COyp8x56.mjs} +1 -1
  218. package/dist/{tenant-custom-nameservers-8Z4TVJtr.mjs → tenant-custom-nameservers-BdrnvyTk.mjs} +1 -1
  219. package/dist/{tools-DNGD0l7I.mjs → tools-LlzHD_86.mjs} +1 -1
  220. package/dist/{tunnels-5lGSXYpl.mjs → tunnels-CjDCYR0_.mjs} +1 -1
  221. package/dist/{turnstile-CT3AkMPV.mjs → turnstile-crX-kMig.mjs} +1 -1
  222. package/dist/{ui-D1hhIDIs.mjs → ui-BQxRjahW.mjs} +1 -1
  223. package/dist/update-check-BpLdkJeA.mjs +2 -0
  224. package/dist/update-check-CtmTFJ-O.mjs +2 -0
  225. package/dist/update-check-worker.mjs +1 -1
  226. package/dist/{url-info-DvpNcNl8.mjs → url-info-CSU3TaVe.mjs} +1 -1
  227. package/dist/{url-normalization-C9URZnpq.mjs → url-normalization-DKZYH3Tv.mjs} +1 -1
  228. package/dist/{url-scanner-CIwK3wB5.mjs → url-scanner-mtiMlSyE.mjs} +1 -1
  229. package/dist/{user-DGA7cqdf.mjs → user-DuDnsFvs.mjs} +1 -1
  230. package/dist/{values-BzS0b25w.mjs → values-B4gL0UvN.mjs} +1 -1
  231. package/dist/{vectorize-DtDjl2fJ.mjs → vectorize-CEC7tpRJ.mjs} +1 -1
  232. package/dist/version-CPwqVR_p.mjs +2 -0
  233. package/dist/{waiting-rooms-CjTh4F3B.mjs → waiting-rooms-CosskYpi.mjs} +1 -1
  234. package/dist/{web-assets-4l1B5V9b.mjs → web-assets-Do2JEl4p.mjs} +1 -1
  235. package/dist/{web3-C0Z4AJjC.mjs → web3-C3sb4DR8.mjs} +1 -1
  236. package/dist/workers-ByA4Nddg.mjs +36 -0
  237. package/dist/{workers-builds-DYGeoxmX.mjs → workers-builds-CDE-wcw-.mjs} +1 -1
  238. package/dist/{workers-for-platforms-CSw0K8Nl.mjs → workers-for-platforms-CvZI2B1d.mjs} +1 -1
  239. package/dist/{workers-vpc-DJ7Couct.mjs → workers-vpc-WbwBVV_L.mjs} +1 -1
  240. package/dist/{workflows-Dm03QT8U.mjs → workflows-Ch7cNhhq.mjs} +1 -1
  241. package/dist/{zaraz-DJbWUUe3.mjs → zaraz-BO7WT_U7.mjs} +1 -1
  242. package/dist/{zero-trust-DiMY-pN5.mjs → zero-trust-CTKtzxxW.mjs} +431 -281
  243. package/dist/{zone-BWjBv1yy.mjs → zone-DSHj2Vv2.mjs} +1 -1
  244. package/dist/{zones-zGqcQvcY.mjs → zones-CeFb9USG.mjs} +1 -1
  245. package/package.json +1 -1
  246. package/dist/access-B3TvAe5h.mjs +0 -27
  247. package/dist/ai-gateway-DrQhTvKf.mjs +0 -147
  248. package/dist/build-kgS7iKwi.mjs +0 -2
  249. package/dist/cli-Ct980dyx.mjs +0 -3
  250. package/dist/command-B7SzqjQM.mjs +0 -2
  251. package/dist/command-BLHcNQ8m.mjs +0 -2
  252. package/dist/command-C0SMCHZp.mjs +0 -2
  253. package/dist/command-CE8k5TuK.mjs +0 -2
  254. package/dist/command-CPiCDUth.mjs +0 -2
  255. package/dist/command-DHjsstFb.mjs +0 -2
  256. package/dist/command-MTUsmZU5.mjs +0 -2
  257. package/dist/command-Sb9lOxWT.mjs +0 -2
  258. package/dist/command-sQ8yswii.mjs +0 -2
  259. package/dist/config-DcppJ5D2.mjs +0 -2
  260. package/dist/data-security-BxzLSdGk.mjs +0 -71
  261. package/dist/dry-run-BmzTxDtZ.mjs +0 -2
  262. package/dist/error-sanitization-cyGBhW1Z.mjs +0 -2
  263. package/dist/generate-Djb5Af37.mjs +0 -2
  264. package/dist/interactive-B_dcVghB.mjs +0 -2
  265. package/dist/kv-DmAQCqXl.mjs +0 -21
  266. package/dist/lazy-command-B_bwSa2F.mjs +0 -2
  267. package/dist/local-CFd107fr.mjs +0 -2
  268. package/dist/migrate-CXMbQPyC.mjs +0 -2
  269. package/dist/pages-CjPErYik.mjs +0 -60
  270. package/dist/previews-Dj_LcGRd.mjs +0 -4
  271. package/dist/r2-C0W2J4sT.mjs +0 -127
  272. package/dist/resolve-BVxXAYG7.mjs +0 -2
  273. package/dist/run-C_qUgBTs.mjs +0 -2
  274. package/dist/run-DK1d9BJz.mjs +0 -2
  275. package/dist/shared--lvrXmXY.mjs +0 -2
  276. package/dist/spawn-Da3HnlmB.mjs +0 -10
  277. package/dist/src-BLLpnbzC.mjs +0 -109
  278. package/dist/startup-profile-Cw-_akjQ.mjs +0 -2
  279. package/dist/state-CcktNox9.mjs +0 -2
  280. package/dist/telemetry-C0k8vfbq.mjs +0 -2
  281. package/dist/telemetry-Dh-8kdfY.mjs +0 -5
  282. package/dist/telemetry-IrDBqbQW.mjs +0 -2
  283. package/dist/update-check-BYJnL8J8.mjs +0 -2
  284. package/dist/update-check-DFoSm5GT.mjs +0 -2
  285. package/dist/version-B47pK_PZ.mjs +0 -2
  286. package/dist/workers-CNBv6GxE.mjs +0 -36
  287. package/dist/zt-Bt4Q6iM1.mjs +0 -110
  288. /package/dist/{Page-BchtVjAO.mjs → Page-CjJht2qT.mjs} +0 -0
  289. /package/dist/{alerts-DY_7Nknx.mjs → alerts-DqZgVSCT.mjs} +0 -0
  290. /package/dist/{autorag-K396-M2S.mjs → autorag-Cq9k9Ye6.mjs} +0 -0
  291. /package/dist/{body-parser-BpPZBRMr.mjs → body-parser-hh2avzkz.mjs} +0 -0
  292. /package/dist/{brands-Uy0Cmv1w.mjs → brands-DeLbFxSt.mjs} +0 -0
  293. /package/dist/{browser-extension-D_siSsD9.mjs → browser-extension-C1zmKFDG.mjs} +0 -0
  294. /package/dist/{chunk-U6NEESU5-CAnOLcsu.mjs → chunk-U6NEESU5-BhF4rnpx.mjs} +0 -0
  295. /package/dist/{chunk-WMOON6TZ-D3H84qpM.mjs → chunk-WMOON6TZ-D_ToS88f.mjs} +0 -0
  296. /package/dist/{clear-CpcO2ExU.mjs → clear-CRfI7WS7.mjs} +0 -0
  297. /package/dist/{cli-types-B6tm-8uL.mjs → cli-types-DoVT5q_M.mjs} +0 -0
  298. /package/dist/{connector-telemetry-events-latest-oguk5Zyj.mjs → connector-telemetry-events-latest-D8p_dR8s.mjs} +0 -0
  299. /package/dist/{connector-telemetry-snapshots-latest-B6zuxkr0.mjs → connector-telemetry-snapshots-latest-COFmzmlk.mjs} +0 -0
  300. /package/dist/{delegate-CCGgla7X.mjs → delegate-B6LetRpZ.mjs} +0 -0
  301. /package/dist/{input-validation-D3e278L_.mjs → input-validation-Dk52b0me.mjs} +0 -0
  302. /package/dist/{interactive-D80kbTap.mjs → interactive-C-o16XQs.mjs} +0 -0
  303. /package/dist/{lifecycle-Cyc3fmyN.mjs → lifecycle-C7tAC1Mn.mjs} +0 -0
  304. /package/dist/{project-settings-Bf6rReo1.mjs → project-settings-DO6njFg_.mjs} +0 -0
  305. /package/dist/{resolve-qPFfBMrn.mjs → resolve-BCTrtcx7.mjs} +0 -0
@@ -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,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,60 +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,r as u,t as d}from"./body-parser-BpPZBRMr.mjs";import{n as f,t as p}from"./input-validation-D3e278L_.mjs";import{a as m,i as h,n as g}from"./prompt-Mh69ni1N.mjs";import{t as ee}from"./cli-types-B6tm-8uL.mjs";function _(e){return e.usage(`$0 pages projects connect-source <project-name>
3
-
4
- Connect a Git repository source to an existing Pages project.`).positional(`project-name`,{type:`string`,description:`Name of the project.`,demandOption:!0}).option(`config-deployments-enabled`,{type:`boolean`,description:`Whether to enable automatic deployments when pushing to the source repository.
5
- When disabled, no deployments (production or preview) will be triggered automatically.
6
- `}).option(`config-owner`,{type:`string`,description:`The owner of the repository.`}).option(`config-owner-id`,{type:`string`,description:`The owner ID of the repository.`}).option(`config-path-excludes`,{type:`string`,array:!0,description:"A list of paths that should be excluded from triggering a preview deployment. Wildcard syntax (`*`) is supported."}).option(`config-path-includes`,{type:`string`,array:!0,description:"A list of paths that should be watched to trigger a preview deployment. Wildcard syntax (`*`) is supported."}).option(`config-pr-comments-enabled`,{type:`boolean`,description:`Whether to enable PR comments.`}).option(`config-preview-branch-excludes`,{type:`string`,array:!0,description:"A list of branches that should not trigger a preview deployment. Wildcard syntax (`*`) is supported. Must be used with `preview_deployment_setting` set to `custom`."}).option(`config-preview-branch-includes`,{type:`string`,array:!0,description:"A list of branches that should trigger a preview deployment. Wildcard syntax (`*`) is supported. Must be used with `preview_deployment_setting` set to `custom`."}).option(`config-preview-deployment-setting`,{type:`string`,description:`Controls whether commits to preview branches trigger a preview deployment.`,choices:[`all`,`none`,`custom`]}).option(`config-production-branch`,{type:`string`,description:`The production branch of the repository.`}).option(`config-production-deployments-enabled`,{type:`boolean`,description:`Whether to trigger a production deployment on commits to the production branch.`}).option(`config-repo-id`,{type:`string`,description:`The ID of the repository.`}).option(`config-repo-name`,{type:`string`,description:`The name of the repository.`}).option(`type`,{type:`string`,description:`The source control management provider.`,choices:[`github`,`gitlab`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Configs for the project source control.`})}const v={command:`connect-source <project-name>`,describe:`Connect project source`,builder:_,handler:async r=>c({command:`pages projects connect-source`,classification:{safeFlags:[`config-deployments-enabled`,`config-pr-comments-enabled`,`config-preview-deployment-setting`,`config-production-deployments-enabled`,`type`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf pages projects connect-source`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/pages/projects/${r[`project-name`]==null?`<project-name>`:encodeURIComponent(String(r[`project-name`]))}/source`,pathParams:{"project-name":String(r[`project-name`]??``)},bodyKind:`json`,body:r.body===void 0?d({config:{deployments_enabled:r[`config-deployments-enabled`],owner:f(r[`config-owner`],`config-owner`,`text`),owner_id:f(r[`config-owner-id`],`config-owner-id`,`text`),path_excludes:r[`config-path-excludes`],path_includes:r[`config-path-includes`],pr_comments_enabled:r[`config-pr-comments-enabled`],preview_branch_excludes:r[`config-preview-branch-excludes`],preview_branch_includes:r[`config-preview-branch-includes`],preview_deployment_setting:f(r[`config-preview-deployment-setting`],`config-preview-deployment-setting`,`text`),production_branch:f(r[`config-production-branch`],`config-production-branch`,`text`),production_deployments_enabled:r[`config-production-deployments-enabled`],repo_id:f(r[`config-repo-id`],`config-repo-id`,`text`),repo_name:f(r[`config-repo-name`],`config-repo-name`,`text`)},type:f(r.type,`type`,`text`)}):l(r.body)});return}let c=await i(r),u=r.local?e:await n();if(r.accountId=u,r.body){let e=l(r.body);a(await s(`Creating`,async()=>c.pages.projects.connectSource({body:e,account_id:u,project_name:r[`project-name`]})),{successLabel:`Created`});return}if(r[`config-deployments-enabled`]===void 0)throw Error(`--config-deployments-enabled is required (or pass --body with this field set).`);if(r[`config-owner`]===void 0&&(r[`config-owner`]=await m(`config-owner`,`The owner of the repository.`)),r[`config-owner-id`]===void 0&&(r[`config-owner-id`]=await m(`config-owner-id`,`The owner ID of the repository.`)),r[`config-path-excludes`]===void 0)throw Error(`--config-path-excludes is required (or pass --body with this field set).`);if(r[`config-path-includes`]===void 0)throw Error(`--config-path-includes is required (or pass --body with this field set).`);if(r[`config-pr-comments-enabled`]===void 0)throw Error(`--config-pr-comments-enabled is required (or pass --body with this field set).`);if(r[`config-preview-branch-excludes`]===void 0)throw Error(`--config-preview-branch-excludes is required (or pass --body with this field set).`);if(r[`config-preview-branch-includes`]===void 0)throw Error(`--config-preview-branch-includes is required (or pass --body with this field set).`);if(r[`config-preview-deployment-setting`]===void 0&&(r[`config-preview-deployment-setting`]=await h(`config-preview-deployment-setting`,`Controls whether commits to preview branches trigger a preview deployment.`,[`all`,`none`,`custom`])),r[`config-production-branch`]===void 0&&(r[`config-production-branch`]=await m(`config-production-branch`,`The production branch of the repository.`)),r[`config-production-deployments-enabled`]===void 0)throw Error(`--config-production-deployments-enabled is required (or pass --body with this field set).`);r[`config-repo-id`]===void 0&&(r[`config-repo-id`]=await m(`config-repo-id`,`The ID of the repository.`)),r[`config-repo-name`]===void 0&&(r[`config-repo-name`]=await m(`config-repo-name`,`The name of the repository.`)),r.type===void 0&&(r.type=await h(`type`,`The source control management provider.`,[`github`,`gitlab`]));let p=d({config:{deployments_enabled:r[`config-deployments-enabled`],owner:f(r[`config-owner`],`config-owner`,`text`),owner_id:f(r[`config-owner-id`],`config-owner-id`,`text`),path_excludes:r[`config-path-excludes`],path_includes:r[`config-path-includes`],pr_comments_enabled:r[`config-pr-comments-enabled`],preview_branch_excludes:r[`config-preview-branch-excludes`],preview_branch_includes:r[`config-preview-branch-includes`],preview_deployment_setting:f(r[`config-preview-deployment-setting`],`config-preview-deployment-setting`,`text`),production_branch:f(r[`config-production-branch`],`config-production-branch`,`text`),production_deployments_enabled:r[`config-production-deployments-enabled`],repo_id:f(r[`config-repo-id`],`config-repo-id`,`text`),repo_name:f(r[`config-repo-name`],`config-repo-name`,`text`)},type:f(r.type,`type`,`text`)});a(await s(`Creating`,async()=>c.pages.projects.connectSource({body:p,account_id:u,project_name:r[`project-name`]})),{successLabel:`Created`})})};function y(e){return e.usage(`$0 pages projects create
7
-
8
- Create a new project.`).option(`build-config-build-caching`,{type:`boolean`,description:`Enable build caching for the project.`}).option(`build-config-build-command`,{type:`string`,description:`Command used to build project.`}).option(`build-config-destination-dir`,{type:`string`,description:`Output directory of the build.`}).option(`build-config-root-dir`,{type:`string`,description:`Directory to run the command.`}).option(`build-config-web-analytics-tag`,{type:`string`,description:`The classifying tag for analytics.`}).option(`build-config-web-analytics-token`,{type:`string`,description:`The auth token for analytics.`}).option(`deployment-configs-preview-always-use-latest-compatibility-date`,{type:`boolean`,description:`Whether to always use the latest compatibility date for Pages Functions.`}).option(`deployment-configs-preview-build-image-major-version`,{type:`number`,description:`The major version of the build image to use for Pages Functions.`}).option(`deployment-configs-preview-compatibility-date`,{type:`string`,description:`Compatibility date used for Pages Functions.`}).option(`deployment-configs-preview-compatibility-flags`,{type:`string`,array:!0,description:`Compatibility flags used for Pages Functions.`}).option(`deployment-configs-preview-fail-open`,{type:`boolean`,description:`Whether to fail open when the deployment config cannot be applied.`}).option(`deployment-configs-preview-limits-cpu-ms`,{type:`number`,description:`CPU time limit in milliseconds.`}).option(`deployment-configs-preview-placement-mode`,{type:`string`,description:`Placement mode.`}).option(`deployment-configs-preview-usage-model`,{type:`string`,description:`The usage model for Pages Functions.`,choices:[`standard`,`bundled`,`unbound`]}).option(`deployment-configs-preview-wrangler-config-hash`,{type:`string`,description:`Hash of the Wrangler configuration used for the deployment.`}).option(`deployment-configs-production-always-use-latest-compatibility-date`,{type:`boolean`,description:`Whether to always use the latest compatibility date for Pages Functions.`}).option(`deployment-configs-production-build-image-major-version`,{type:`number`,description:`The major version of the build image to use for Pages Functions.`}).option(`deployment-configs-production-compatibility-date`,{type:`string`,description:`Compatibility date used for Pages Functions.`}).option(`deployment-configs-production-compatibility-flags`,{type:`string`,array:!0,description:`Compatibility flags used for Pages Functions.`}).option(`deployment-configs-production-fail-open`,{type:`boolean`,description:`Whether to fail open when the deployment config cannot be applied.`}).option(`deployment-configs-production-limits-cpu-ms`,{type:`number`,description:`CPU time limit in milliseconds.`}).option(`deployment-configs-production-placement-mode`,{type:`string`,description:`Placement mode.`}).option(`deployment-configs-production-usage-model`,{type:`string`,description:`The usage model for Pages Functions.`,choices:[`standard`,`bundled`,`unbound`]}).option(`deployment-configs-production-wrangler-config-hash`,{type:`string`,description:`Hash of the Wrangler configuration used for the deployment.`}).option(`name`,{type:`string`,description:`Name of the project.`}).option(`production-branch`,{type:`string`,description:`Production branch of the project. Used to identify production deployments.`}).option(`source-config-deployments-enabled`,{type:`boolean`,description:`Whether to enable automatic deployments when pushing to the source repository.
9
- When disabled, no deployments (production or preview) will be triggered automatically.
10
- `}).option(`source-config-owner`,{type:`string`,description:`The owner of the repository.`}).option(`source-config-owner-id`,{type:`string`,description:`The owner ID of the repository.`}).option(`source-config-path-excludes`,{type:`string`,array:!0,description:"A list of paths that should be excluded from triggering a preview deployment. Wildcard syntax (`*`) is supported."}).option(`source-config-path-includes`,{type:`string`,array:!0,description:"A list of paths that should be watched to trigger a preview deployment. Wildcard syntax (`*`) is supported."}).option(`source-config-pr-comments-enabled`,{type:`boolean`,description:`Whether to enable PR comments.`}).option(`source-config-preview-branch-excludes`,{type:`string`,array:!0,description:"A list of branches that should not trigger a preview deployment. Wildcard syntax (`*`) is supported. Must be used with `preview_deployment_setting` set to `custom`."}).option(`source-config-preview-branch-includes`,{type:`string`,array:!0,description:"A list of branches that should trigger a preview deployment. Wildcard syntax (`*`) is supported. Must be used with `preview_deployment_setting` set to `custom`."}).option(`source-config-preview-deployment-setting`,{type:`string`,description:`Controls whether commits to preview branches trigger a preview deployment.`,choices:[`all`,`none`,`custom`]}).option(`source-config-production-branch`,{type:`string`,description:`The production branch of the repository.`}).option(`source-config-production-deployments-enabled`,{type:`boolean`,description:`Whether to trigger a production deployment on commits to the production branch.`}).option(`source-config-repo-id`,{type:`string`,description:`The ID of the repository.`}).option(`source-config-repo-name`,{type:`string`,description:`The name of the repository.`}).option(`source-type`,{type:`string`,description:`The source control management provider.`,choices:[`github`,`gitlab`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{if([`deployment-configs-preview-always-use-latest-compatibility-date`,`deployment-configs-preview-build-image-major-version`,`deployment-configs-preview-compatibility-date`,`deployment-configs-preview-compatibility-flags`,`deployment-configs-preview-fail-open`,`deployment-configs-preview-limits-cpu-ms`,`deployment-configs-preview-placement-mode`,`deployment-configs-preview-usage-model`,`deployment-configs-preview-wrangler-config-hash`,`deployment-configs-production-always-use-latest-compatibility-date`,`deployment-configs-production-build-image-major-version`,`deployment-configs-production-compatibility-date`,`deployment-configs-production-compatibility-flags`,`deployment-configs-production-fail-open`,`deployment-configs-production-limits-cpu-ms`,`deployment-configs-production-placement-mode`,`deployment-configs-production-usage-model`,`deployment-configs-production-wrangler-config-hash`].some(t=>e[t]!==void 0)){let t=[`deployment-configs-preview-limits-cpu-ms`,`deployment-configs-preview-placement-mode`,`deployment-configs-production-limits-cpu-ms`,`deployment-configs-production-placement-mode`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --deployment_configs-* flag is set`)}return!0}).check(e=>{if([`source-config-deployments-enabled`,`source-config-owner`,`source-config-owner-id`,`source-config-path-excludes`,`source-config-path-includes`,`source-config-pr-comments-enabled`,`source-config-preview-branch-excludes`,`source-config-preview-branch-includes`,`source-config-preview-deployment-setting`,`source-config-production-branch`,`source-config-production-deployments-enabled`,`source-config-repo-id`,`source-config-repo-name`,`source-type`].some(t=>e[t]!==void 0)){let t=[`source-type`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --source-* flag is set`)}return!0})}const b={command:`create`,describe:`Create project`,builder:y,handler:async r=>c({command:`pages projects create`,classification:{safeFlags:[`build-config-build-caching`,`deployment-configs-preview-always-use-latest-compatibility-date`,`deployment-configs-preview-fail-open`,`deployment-configs-preview-usage-model`,`deployment-configs-production-always-use-latest-compatibility-date`,`deployment-configs-production-fail-open`,`deployment-configs-production-usage-model`,`source-config-deployments-enabled`,`source-config-pr-comments-enabled`,`source-config-preview-deployment-setting`,`source-config-production-deployments-enabled`,`source-type`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf pages projects create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/pages/projects`,pathParams:{},bodyKind:`json`,body:r.body===void 0?d({build_config:{build_caching:r[`build-config-build-caching`],build_command:f(r[`build-config-build-command`],`build-config-build-command`,`text`),destination_dir:f(r[`build-config-destination-dir`],`build-config-destination-dir`,`text`),root_dir:f(r[`build-config-root-dir`],`build-config-root-dir`,`text`),web_analytics_tag:f(r[`build-config-web-analytics-tag`],`build-config-web-analytics-tag`,`text`),web_analytics_token:f(r[`build-config-web-analytics-token`],`build-config-web-analytics-token`,`text`)},deployment_configs:{preview:{always_use_latest_compatibility_date:r[`deployment-configs-preview-always-use-latest-compatibility-date`],build_image_major_version:r[`deployment-configs-preview-build-image-major-version`],compatibility_date:f(r[`deployment-configs-preview-compatibility-date`],`deployment-configs-preview-compatibility-date`,`text`),compatibility_flags:r[`deployment-configs-preview-compatibility-flags`],fail_open:r[`deployment-configs-preview-fail-open`],limits:{cpu_ms:r[`deployment-configs-preview-limits-cpu-ms`]},placement:{mode:f(r[`deployment-configs-preview-placement-mode`],`deployment-configs-preview-placement-mode`,`text`)},usage_model:f(r[`deployment-configs-preview-usage-model`],`deployment-configs-preview-usage-model`,`text`),wrangler_config_hash:f(r[`deployment-configs-preview-wrangler-config-hash`],`deployment-configs-preview-wrangler-config-hash`,`text`)},production:{always_use_latest_compatibility_date:r[`deployment-configs-production-always-use-latest-compatibility-date`],build_image_major_version:r[`deployment-configs-production-build-image-major-version`],compatibility_date:f(r[`deployment-configs-production-compatibility-date`],`deployment-configs-production-compatibility-date`,`text`),compatibility_flags:r[`deployment-configs-production-compatibility-flags`],fail_open:r[`deployment-configs-production-fail-open`],limits:{cpu_ms:r[`deployment-configs-production-limits-cpu-ms`]},placement:{mode:f(r[`deployment-configs-production-placement-mode`],`deployment-configs-production-placement-mode`,`text`)},usage_model:f(r[`deployment-configs-production-usage-model`],`deployment-configs-production-usage-model`,`text`),wrangler_config_hash:f(r[`deployment-configs-production-wrangler-config-hash`],`deployment-configs-production-wrangler-config-hash`,`text`)}},name:f(r.name,`name`,`text`),production_branch:f(r[`production-branch`],`production-branch`,`text`),source:{config:{deployments_enabled:r[`source-config-deployments-enabled`],owner:f(r[`source-config-owner`],`source-config-owner`,`text`),owner_id:f(r[`source-config-owner-id`],`source-config-owner-id`,`text`),path_excludes:r[`source-config-path-excludes`],path_includes:r[`source-config-path-includes`],pr_comments_enabled:r[`source-config-pr-comments-enabled`],preview_branch_excludes:r[`source-config-preview-branch-excludes`],preview_branch_includes:r[`source-config-preview-branch-includes`],preview_deployment_setting:f(r[`source-config-preview-deployment-setting`],`source-config-preview-deployment-setting`,`text`),production_branch:f(r[`source-config-production-branch`],`source-config-production-branch`,`text`),production_deployments_enabled:r[`source-config-production-deployments-enabled`],repo_id:f(r[`source-config-repo-id`],`source-config-repo-id`,`text`),repo_name:f(r[`source-config-repo-name`],`source-config-repo-name`,`text`)},type:f(r[`source-type`],`source-type`,`text`)}}):l(r.body)});return}let c=await i(r),u=r.local?e:await n();if(r.accountId=u,r.body){let e=l(r.body);a(await s(`Creating`,async()=>c.pages.projects.create({...e,account_id:u})),{successLabel:`Created`});return}r.name===void 0&&(r.name=await m(`name`,`Name of the project.`)),r[`production-branch`]===void 0&&(r[`production-branch`]=await m(`production-branch`,`Production branch of the project. Used to identify production deployments.`));let p=d({build_config:{build_caching:r[`build-config-build-caching`],build_command:f(r[`build-config-build-command`],`build-config-build-command`,`text`),destination_dir:f(r[`build-config-destination-dir`],`build-config-destination-dir`,`text`),root_dir:f(r[`build-config-root-dir`],`build-config-root-dir`,`text`),web_analytics_tag:f(r[`build-config-web-analytics-tag`],`build-config-web-analytics-tag`,`text`),web_analytics_token:f(r[`build-config-web-analytics-token`],`build-config-web-analytics-token`,`text`)},deployment_configs:{preview:{always_use_latest_compatibility_date:r[`deployment-configs-preview-always-use-latest-compatibility-date`],build_image_major_version:r[`deployment-configs-preview-build-image-major-version`],compatibility_date:f(r[`deployment-configs-preview-compatibility-date`],`deployment-configs-preview-compatibility-date`,`text`),compatibility_flags:r[`deployment-configs-preview-compatibility-flags`],fail_open:r[`deployment-configs-preview-fail-open`],limits:{cpu_ms:r[`deployment-configs-preview-limits-cpu-ms`]},placement:{mode:f(r[`deployment-configs-preview-placement-mode`],`deployment-configs-preview-placement-mode`,`text`)},usage_model:f(r[`deployment-configs-preview-usage-model`],`deployment-configs-preview-usage-model`,`text`),wrangler_config_hash:f(r[`deployment-configs-preview-wrangler-config-hash`],`deployment-configs-preview-wrangler-config-hash`,`text`)},production:{always_use_latest_compatibility_date:r[`deployment-configs-production-always-use-latest-compatibility-date`],build_image_major_version:r[`deployment-configs-production-build-image-major-version`],compatibility_date:f(r[`deployment-configs-production-compatibility-date`],`deployment-configs-production-compatibility-date`,`text`),compatibility_flags:r[`deployment-configs-production-compatibility-flags`],fail_open:r[`deployment-configs-production-fail-open`],limits:{cpu_ms:r[`deployment-configs-production-limits-cpu-ms`]},placement:{mode:f(r[`deployment-configs-production-placement-mode`],`deployment-configs-production-placement-mode`,`text`)},usage_model:f(r[`deployment-configs-production-usage-model`],`deployment-configs-production-usage-model`,`text`),wrangler_config_hash:f(r[`deployment-configs-production-wrangler-config-hash`],`deployment-configs-production-wrangler-config-hash`,`text`)}},name:f(r.name,`name`,`text`),production_branch:f(r[`production-branch`],`production-branch`,`text`),source:{config:{deployments_enabled:r[`source-config-deployments-enabled`],owner:f(r[`source-config-owner`],`source-config-owner`,`text`),owner_id:f(r[`source-config-owner-id`],`source-config-owner-id`,`text`),path_excludes:r[`source-config-path-excludes`],path_includes:r[`source-config-path-includes`],pr_comments_enabled:r[`source-config-pr-comments-enabled`],preview_branch_excludes:r[`source-config-preview-branch-excludes`],preview_branch_includes:r[`source-config-preview-branch-includes`],preview_deployment_setting:f(r[`source-config-preview-deployment-setting`],`source-config-preview-deployment-setting`,`text`),production_branch:f(r[`source-config-production-branch`],`source-config-production-branch`,`text`),production_deployments_enabled:r[`source-config-production-deployments-enabled`],repo_id:f(r[`source-config-repo-id`],`source-config-repo-id`,`text`),repo_name:f(r[`source-config-repo-name`],`source-config-repo-name`,`text`)},type:f(r[`source-type`],`source-type`,`text`)}});a(await s(`Creating`,async()=>c.pages.projects.create({...p,account_id:u})),{successLabel:`Created`})})};function x(e){return e.usage(`$0 pages projects delete <project-name>
11
-
12
- Delete a project by name.`).positional(`project-name`,{type:`string`,description:`Name of the project.`,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 S={command:`delete <project-name>`,describe:`Delete project`,builder:x,handler:async r=>c({command:`pages projects delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf pages projects delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/pages/projects/${r[`project-name`]==null?`<project-name>`:encodeURIComponent(String(r[`project-name`]))}`,pathParams:{"project-name":String(r[`project-name`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,!await g({force:!!r.force})){process.stderr.write(`Aborted.
13
- `);return}a(await s(`Deleting`,async()=>c.pages.projects.delete({account_id:l,project_name:r[`project-name`]})),{successLabel:`Deleted`})})};function C(e){return e.usage(`$0 pages projects deployments create <project-name>
14
-
15
- Start a new deployment from production. The repository and account must have already been authorized on the Cloudflare Pages dashboard.`).positional(`project-name`,{type:`string`,description:`Name of the project.`,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)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`}).option(`branch`,{type:`string`,description:"The branch to build the new deployment from. The `HEAD` of the branch will be used. If omitted, the production branch will be used by default."}).option(`commit-dirty`,{type:`string`,description:`Boolean string indicating if the working directory has uncommitted changes.`}).option(`commit-hash`,{type:`string`,description:`Git commit SHA associated with this deployment.`}).option(`commit-message`,{type:`string`,description:`Git commit message associated with this deployment.`}).option(`manifest`,{type:`string`,description:`JSON string containing a manifest of files to deploy. Maps file paths to their content hashes. Required for direct upload deployments. Maximum 20,000 entries. `}).option(`pages-build-output-dir`,{type:`string`,description:`The build output directory path.`}).option(`wrangler-config-hash`,{type:`string`,description:`Hash of the Wrangler configuration file used for this deployment.`})}const w={command:`create <project-name>`,describe:`Create deployment`,builder:C,handler:async l=>c({command:`pages projects deployments create`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){o({command:`cf pages projects deployments create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/pages/projects/${l[`project-name`]==null?`<project-name>`:encodeURIComponent(String(l[`project-name`]))}/deployments`,pathParams:{"project-name":String(l[`project-name`]??``)},bodyKind:`multipart`,body:{body:l.body,file:l.file,branch:l.branch,"commit-dirty":l[`commit-dirty`],"commit-hash":l[`commit-hash`],"commit-message":l[`commit-message`],manifest:l.manifest,"pages-build-output-dir":l[`pages-build-output-dir`],"wrangler-config-hash":l[`wrangler-config-hash`]}});return}let c=await i(l),u=l.local?e:await n();if(l.accountId=u,l.file!==void 0||l.body!==void 0||l.branch!==void 0||l[`commit-dirty`]!==void 0||l[`commit-hash`]!==void 0||l[`commit-message`]!==void 0||l.manifest!==void 0||l[`pages-build-output-dir`]!==void 0||l[`wrangler-config-hash`]!==void 0){let e=new FormData;if(l.file){let t=p(l.file);e.append(`_headers`,new Blob([t]),l.file.split(/[\\/]/).filter(Boolean).pop())}else l.body!==void 0&&e.append(`_headers`,l.body);l.branch!==void 0&&e.append(`branch`,String(f(l.branch,`branch`,`text`)??``)),l[`commit-dirty`]!==void 0&&e.append(`commit_dirty`,String(f(l[`commit-dirty`],`commit-dirty`,`text`)??``)),l[`commit-hash`]!==void 0&&e.append(`commit_hash`,String(f(l[`commit-hash`],`commit-hash`,`text`)??``)),l[`commit-message`]!==void 0&&e.append(`commit_message`,String(f(l[`commit-message`],`commit-message`,`text`)??``)),l.manifest!==void 0&&e.append(`manifest`,String(f(l.manifest,`manifest`,`text`)??``)),l[`pages-build-output-dir`]!==void 0&&e.append(`pages_build_output_dir`,String(f(l[`pages-build-output-dir`],`pages-build-output-dir`,`text`)??``)),l[`wrangler-config-hash`]!==void 0&&e.append(`wrangler_config_hash`,String(f(l[`wrangler-config-hash`],`wrangler-config-hash`,`text`)??``)),a(await s(`Creating`,async()=>r(c,`POST`,`/accounts/${u}/pages/projects/${encodeURIComponent(String(l[`project-name`]))}/deployments`,{body:e})),{successLabel:`Created`});return}if(l.body){let e=f(l.body,`body`,`binary`);a(await s(`Creating`,async()=>r(c,`POST`,`/accounts/${u}/pages/projects/${encodeURIComponent(String(l[`project-name`]))}/deployments`,{body:e,headers:{"Content-Type":`multipart/form-data`}})),{successLabel:`Created`});return}a(await s(`Creating`,async()=>c.pages.projects.deployments.create({account_id:u,project_name:l[`project-name`]})),{successLabel:`Created`})})};function T(e){return e.usage(`$0 pages projects deployments delete <deployment-id>
16
-
17
- Delete a deployment.`).positional(`deployment-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`project-name`,{type:`string`,description:`Name of the project.`,demandOption:!0}).option(`force`,{type:`boolean`,description:`Allow deletion of aliased non-production deployments when a normal delete would be rejected.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`delete <deployment-id>`,describe:`Delete deployment`,builder:T,handler:async r=>c({command:`pages projects deployments delete`,classification:{safeFlags:[`force`,`dry-run`]}},r,async()=>{let c={force:r.force};if(r.dryRun){o({command:`cf pages projects deployments delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/pages/projects/${r[`project-name`]==null?`<project-name>`:encodeURIComponent(String(r[`project-name`]))}/deployments/${r[`deployment-id`]==null?`<deployment-id>`:encodeURIComponent(String(r[`deployment-id`]))}`,pathParams:{"deployment-id":String(r[`deployment-id`]??``),"project-name":String(r[`project-name`]??``)},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await n();if(r.accountId=u,!await g({force:!!r.force})){process.stderr.write(`Aborted.
18
- `);return}a(await s(`Deleting`,async()=>l.pages.projects.deployments.delete({account_id:u,project_name:r[`project-name`],deployment_id:r[`deployment-id`],...c})),{successLabel:`Deleted`})})};function D(e){return e.usage(`$0 pages projects deployments get <deployment-id>
19
-
20
- Fetch information about a deployment.`).positional(`deployment-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`project-name`,{type:`string`,description:`Name of the project.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const O={command:`get <deployment-id>`,describe:`Get deployment info`,builder:D,handler:async r=>c({command:`pages projects deployments get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf pages projects deployments get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/pages/projects/${r[`project-name`]==null?`<project-name>`:encodeURIComponent(String(r[`project-name`]))}/deployments/${r[`deployment-id`]==null?`<deployment-id>`:encodeURIComponent(String(r[`deployment-id`]))}`,pathParams:{"deployment-id":String(r[`deployment-id`]??``),"project-name":String(r[`project-name`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();r.accountId=l,a(await s(`Loading`,async()=>c.pages.projects.deployments.get({account_id:l,project_name:r[`project-name`],deployment_id:r[`deployment-id`]})),{successLabel:`Loaded`})})};function k(e){return e.usage(`$0 pages projects deployments history logs get <deployment-id>
21
-
22
- Fetch deployment logs for a project.`).positional(`deployment-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`project-name`,{type:`string`,description:`Name of the project.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const A={command:`get <deployment-id>`,describe:`Get deployment logs`,builder:k,handler:async r=>c({command:`pages projects deployments history logs get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf pages projects deployments history logs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/pages/projects/${r[`project-name`]==null?`<project-name>`:encodeURIComponent(String(r[`project-name`]))}/deployments/${r[`deployment-id`]==null?`<deployment-id>`:encodeURIComponent(String(r[`deployment-id`]))}/history/logs`,pathParams:{"deployment-id":String(r[`deployment-id`]??``),"project-name":String(r[`project-name`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();r.accountId=l,a(await s(`Loading`,async()=>c.pages.projects.deployments.history.logs.get({account_id:l,project_name:r[`project-name`],deployment_id:r[`deployment-id`]})),{successLabel:`Loaded`})})},j={command:`logs`,describe:`Operations for projects.deployments.history.logs`,builder:e=>e.command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},M={command:`history`,describe:`Operations for projects.deployments.history`,builder:e=>e.command(j).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function N(e){return e.usage(`$0 pages projects deployments list
23
-
24
- Fetch a list of project deployments.`).option(`project-name`,{type:`string`,description:`Name of the project.`,demandOption:!0}).option(`env`,{type:`string`,description:`What type of deployments to fetch.`,choices:[`production`,`preview`]}).option(`page`,{type:`number`,description:`Which page of deployments to fetch.`}).option(`per-page`,{type:`number`,description:`How many deployments to return per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const P={command:`list`,describe:`Get deployments`,builder:ee(N),handler:async r=>c({command:`pages projects deployments list`,classification:{safeFlags:[`env`,`dry-run`]}},r,async()=>{let c={env:r.env,page:r.page,per_page:r[`per-page`]};if(r.dryRun){o({command:`cf pages projects deployments list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/pages/projects/${r[`project-name`]==null?`<project-name>`:encodeURIComponent(String(r[`project-name`]))}/deployments`,pathParams:{"project-name":String(r[`project-name`]??``)},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.pages.projects.deployments.list({account_id:u,project_name:r[`project-name`],...c})),{successLabel:`Loaded`})})};function F(e){return e.usage(`$0 pages projects deployments retry <deployment-id>
25
-
26
- Retry a previous deployment.`).positional(`deployment-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`project-name`,{type:`string`,description:`Name of the project.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const I={command:`retry <deployment-id>`,describe:`Retry deployment`,builder:F,handler:async r=>c({command:`pages projects deployments retry`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf pages projects deployments retry`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/pages/projects/${r[`project-name`]==null?`<project-name>`:encodeURIComponent(String(r[`project-name`]))}/deployments/${r[`deployment-id`]==null?`<deployment-id>`:encodeURIComponent(String(r[`deployment-id`]))}/retry`,pathParams:{"deployment-id":String(r[`deployment-id`]??``),"project-name":String(r[`project-name`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();r.accountId=l,a(await s(`Creating`,async()=>c.pages.projects.deployments.retry({account_id:l,project_name:r[`project-name`],deployment_id:r[`deployment-id`]})),{successLabel:`Created`})})};function L(e){return e.usage(`$0 pages projects deployments rollback <deployment-id>
27
-
28
- Rollback the production deployment to a previous deployment. You can only rollback to succesful builds on production.`).positional(`deployment-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`project-name`,{type:`string`,description:`Name of the project.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const R={command:`rollback <deployment-id>`,describe:`Rollback deployment`,builder:L,handler:async r=>c({command:`pages projects deployments rollback`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf pages projects deployments rollback`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/pages/projects/${r[`project-name`]==null?`<project-name>`:encodeURIComponent(String(r[`project-name`]))}/deployments/${r[`deployment-id`]==null?`<deployment-id>`:encodeURIComponent(String(r[`deployment-id`]))}/rollback`,pathParams:{"deployment-id":String(r[`deployment-id`]??``),"project-name":String(r[`project-name`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();r.accountId=l,a(await s(`Creating`,async()=>c.pages.projects.deployments.rollback({account_id:l,project_name:r[`project-name`],deployment_id:r[`deployment-id`]})),{successLabel:`Created`})})};function z(e){return e.usage(`$0 pages projects deployments tails create <deployment-id>
29
-
30
- Start a tail that receives logs and exception data.`).positional(`deployment-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`project-name`,{type:`string`,description:`Name of the project.`,demandOption:!0}).option(`filters`,{type:`string`,description:`Filters to apply to the tail session. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const B={command:`create <deployment-id>`,describe:`Create deployment tail`,builder:z,handler:async r=>c({command:`pages projects deployments tails create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf pages projects deployments tails create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/pages/projects/${r[`project-name`]==null?`<project-name>`:encodeURIComponent(String(r[`project-name`]))}/deployments/${r[`deployment-id`]==null?`<deployment-id>`:encodeURIComponent(String(r[`deployment-id`]))}/tails`,pathParams:{"deployment-id":String(r[`deployment-id`]??``),"project-name":String(r[`project-name`]??``)},bodyKind:`json`,body:r.body===void 0?d({filters:u(r.filters,`filters`)}):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.pages.projects.deployments.tails.create({...e,account_id:f,project_name:r[`project-name`],deployment_id:r[`deployment-id`]})),{successLabel:`Created`});return}let p=d({filters:u(r.filters,`filters`)});a(await s(`Creating`,async()=>c.pages.projects.deployments.tails.create({...p,account_id:f,project_name:r[`project-name`],deployment_id:r[`deployment-id`]})),{successLabel:`Created`})})};function te(e){return e.usage(`$0 pages projects deployments tails delete <tail-id>
31
-
32
- Deletes a tail from a Pages deployment.`).positional(`tail-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`project-name`,{type:`string`,description:`Name of the project.`,demandOption:!0}).option(`deployment-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const V={command:`delete <tail-id>`,describe:`Delete deployment tail`,builder:te,handler:async r=>c({command:`pages projects deployments tails delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf pages projects deployments tails delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/pages/projects/${r[`project-name`]==null?`<project-name>`:encodeURIComponent(String(r[`project-name`]))}/deployments/${r[`deployment-id`]==null?`<deployment-id>`:encodeURIComponent(String(r[`deployment-id`]))}/tails/${r[`tail-id`]==null?`<tail-id>`:encodeURIComponent(String(r[`tail-id`]))}`,pathParams:{"tail-id":String(r[`tail-id`]??``),"deployment-id":String(r[`deployment-id`]??``),"project-name":String(r[`project-name`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,!await g({force:!!r.force})){process.stderr.write(`Aborted.
33
- `);return}a(await s(`Deleting`,async()=>c.pages.projects.deployments.tails.delete({account_id:l,project_name:r[`project-name`],deployment_id:r[`deployment-id`],tail_id:r[`tail-id`]})),{successLabel:`Deleted`})})},H={command:`tails`,describe:`Operations for projects.deployments.tails`,builder:e=>e.command(B).command(V).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},U={command:`deployments`,describe:`Operations for projects.deployments`,builder:e=>e.command(w).command(E).command(O).command(P).command(I).command(R).command(M).command(H).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function W(e){return e.usage(`$0 pages projects disconnect-source <project-name>
34
-
35
- Disconnect the Git repository source from an existing Pages project.`).positional(`project-name`,{type:`string`,description:`Name of the project.`,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 G={command:`disconnect-source <project-name>`,describe:`Disconnect project source`,builder:W,handler:async r=>c({command:`pages projects disconnect-source`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf pages projects disconnect-source`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/pages/projects/${r[`project-name`]==null?`<project-name>`:encodeURIComponent(String(r[`project-name`]))}/source`,pathParams:{"project-name":String(r[`project-name`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,!await g({force:!!r.force})){process.stderr.write(`Aborted.
36
- `);return}a(await s(`Deleting`,async()=>c.pages.projects.disconnectSource({account_id:l,project_name:r[`project-name`]})),{successLabel:`Deleted`})})};function K(e){return e.usage(`$0 pages projects domains create <project-name>
37
-
38
- Add a new domain for the Pages project.`).positional(`project-name`,{type:`string`,description:`Name of the project.`,demandOption:!0}).option(`name`,{type:`string`,description:`The domain name.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const q={command:`create <project-name>`,describe:`Add domain`,builder:K,handler:async r=>c({command:`pages projects domains create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf pages projects domains create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/pages/projects/${r[`project-name`]==null?`<project-name>`:encodeURIComponent(String(r[`project-name`]))}/domains`,pathParams:{"project-name":String(r[`project-name`]??``)},bodyKind:`json`,body:r.body===void 0?d({name:f(r.name,`name`,`text`)}):l(r.body)});return}let c=await i(r),u=r.local?e:await n();if(r.accountId=u,r.body){let e=l(r.body);a(await s(`Creating`,async()=>c.pages.projects.domains.create({...e,account_id:u,project_name:r[`project-name`]})),{successLabel:`Created`});return}r.name===void 0&&(r.name=await m(`name`,`The domain name.`));let p=d({name:f(r.name,`name`,`text`)});a(await s(`Creating`,async()=>c.pages.projects.domains.create({...p,account_id:u,project_name:r[`project-name`]})),{successLabel:`Created`})})};function J(e){return e.usage(`$0 pages projects domains delete <domain-name>
39
-
40
- Delete a Pages project's domain.`).positional(`domain-name`,{type:`string`,description:`The domain name.`,demandOption:!0}).option(`project-name`,{type:`string`,description:`Name of the project.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Y={command:`delete <domain-name>`,describe:`Delete domain`,builder:J,handler:async r=>c({command:`pages projects domains delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf pages projects domains delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/pages/projects/${r[`project-name`]==null?`<project-name>`:encodeURIComponent(String(r[`project-name`]))}/domains/${r[`domain-name`]==null?`<domain-name>`:encodeURIComponent(String(r[`domain-name`]))}`,pathParams:{"domain-name":String(r[`domain-name`]??``),"project-name":String(r[`project-name`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,!await g({force:!!r.force})){process.stderr.write(`Aborted.
41
- `);return}a(await s(`Deleting`,async()=>c.pages.projects.domains.delete({account_id:l,project_name:r[`project-name`],domain_name:r[`domain-name`]})),{successLabel:`Deleted`})})};function X(e){return e.usage(`$0 pages projects domains edit <domain-name>
42
-
43
- Retry the validation status of a single domain.`).positional(`domain-name`,{type:`string`,description:`The domain name.`,demandOption:!0}).option(`project-name`,{type:`string`,description:`Name of the project.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Z={command:`edit <domain-name>`,describe:`Patch domain`,builder:X,handler:async r=>c({command:`pages projects domains edit`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf pages projects domains edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/pages/projects/${r[`project-name`]==null?`<project-name>`:encodeURIComponent(String(r[`project-name`]))}/domains/${r[`domain-name`]==null?`<domain-name>`:encodeURIComponent(String(r[`domain-name`]))}`,pathParams:{"domain-name":String(r[`domain-name`]??``),"project-name":String(r[`project-name`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();r.accountId=l,a(await s(`Updating`,async()=>c.pages.projects.domains.edit({account_id:l,project_name:r[`project-name`],domain_name:r[`domain-name`]})),{successLabel:`Updated`})})};function Q(e){return e.usage(`$0 pages projects domains get <domain-name>
44
-
45
- Fetch a single domain.`).positional(`domain-name`,{type:`string`,description:`The domain name.`,demandOption:!0}).option(`project-name`,{type:`string`,description:`Name of the project.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ne={command:`get <domain-name>`,describe:`Get domain`,builder:Q,handler:async r=>c({command:`pages projects domains get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf pages projects domains get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/pages/projects/${r[`project-name`]==null?`<project-name>`:encodeURIComponent(String(r[`project-name`]))}/domains/${r[`domain-name`]==null?`<domain-name>`:encodeURIComponent(String(r[`domain-name`]))}`,pathParams:{"domain-name":String(r[`domain-name`]??``),"project-name":String(r[`project-name`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();r.accountId=l,a(await s(`Loading`,async()=>c.pages.projects.domains.get({account_id:l,project_name:r[`project-name`],domain_name:r[`domain-name`]})),{successLabel:`Loaded`})})};function re(e){return e.usage(`$0 pages projects domains list
46
-
47
- Fetch a list of all domains associated with a Pages project.`).option(`project-name`,{type:`string`,description:`Name of the project.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ie={command:`list`,describe:`Get domains`,builder:re,handler:async r=>c({command:`pages projects domains list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf pages projects domains list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/pages/projects/${r[`project-name`]==null?`<project-name>`:encodeURIComponent(String(r[`project-name`]))}/domains`,pathParams:{"project-name":String(r[`project-name`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();r.accountId=l,a(await s(`Loading`,async()=>c.pages.projects.domains.list({account_id:l,project_name:r[`project-name`]})),{successLabel:`Loaded`})})},ae={command:`domains`,describe:`Operations for projects.domains`,builder:e=>e.command(q).command(Y).command(Z).command(ne).command(ie).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function oe(e){return e.usage(`$0 pages projects edit <project-name>
48
-
49
- Set new attributes for an existing project. Modify environment variables. To delete an environment variable, set the key to null.`).positional(`project-name`,{type:`string`,description:`Name of the project.`,demandOption:!0}).option(`build-config-build-caching`,{type:`boolean`,description:`Enable build caching for the project.`}).option(`build-config-build-command`,{type:`string`,description:`Command used to build project.`}).option(`build-config-destination-dir`,{type:`string`,description:`Output directory of the build.`}).option(`build-config-root-dir`,{type:`string`,description:`Directory to run the command.`}).option(`build-config-web-analytics-tag`,{type:`string`,description:`The classifying tag for analytics.`}).option(`build-config-web-analytics-token`,{type:`string`,description:`The auth token for analytics.`}).option(`deployment-configs-preview-always-use-latest-compatibility-date`,{type:`boolean`,description:`Whether to always use the latest compatibility date for Pages Functions.`}).option(`deployment-configs-preview-build-image-major-version`,{type:`number`,description:`The major version of the build image to use for Pages Functions.`}).option(`deployment-configs-preview-compatibility-date`,{type:`string`,description:`Compatibility date used for Pages Functions.`}).option(`deployment-configs-preview-compatibility-flags`,{type:`string`,array:!0,description:`Compatibility flags used for Pages Functions.`}).option(`deployment-configs-preview-fail-open`,{type:`boolean`,description:`Whether to fail open when the deployment config cannot be applied.`}).option(`deployment-configs-preview-limits-cpu-ms`,{type:`number`,description:`CPU time limit in milliseconds.`}).option(`deployment-configs-preview-placement-mode`,{type:`string`,description:`Placement mode.`}).option(`deployment-configs-preview-usage-model`,{type:`string`,description:`The usage model for Pages Functions.`,choices:[`standard`,`bundled`,`unbound`]}).option(`deployment-configs-preview-wrangler-config-hash`,{type:`string`,description:`Hash of the Wrangler configuration used for the deployment.`}).option(`deployment-configs-production-always-use-latest-compatibility-date`,{type:`boolean`,description:`Whether to always use the latest compatibility date for Pages Functions.`}).option(`deployment-configs-production-build-image-major-version`,{type:`number`,description:`The major version of the build image to use for Pages Functions.`}).option(`deployment-configs-production-compatibility-date`,{type:`string`,description:`Compatibility date used for Pages Functions.`}).option(`deployment-configs-production-compatibility-flags`,{type:`string`,array:!0,description:`Compatibility flags used for Pages Functions.`}).option(`deployment-configs-production-fail-open`,{type:`boolean`,description:`Whether to fail open when the deployment config cannot be applied.`}).option(`deployment-configs-production-limits-cpu-ms`,{type:`number`,description:`CPU time limit in milliseconds.`}).option(`deployment-configs-production-placement-mode`,{type:`string`,description:`Placement mode.`}).option(`deployment-configs-production-usage-model`,{type:`string`,description:`The usage model for Pages Functions.`,choices:[`standard`,`bundled`,`unbound`]}).option(`deployment-configs-production-wrangler-config-hash`,{type:`string`,description:`Hash of the Wrangler configuration used for the deployment.`}).option(`name`,{type:`string`,description:`Name of the project.`}).option(`production-branch`,{type:`string`,description:`Production branch of the project. Used to identify production deployments.`}).option(`source-config-deployments-enabled`,{type:`boolean`,description:`Whether to enable automatic deployments when pushing to the source repository.
50
- When disabled, no deployments (production or preview) will be triggered automatically.
51
- `}).option(`source-config-owner`,{type:`string`,description:`The owner of the repository.`}).option(`source-config-owner-id`,{type:`string`,description:`The owner ID of the repository.`}).option(`source-config-path-excludes`,{type:`string`,array:!0,description:"A list of paths that should be excluded from triggering a preview deployment. Wildcard syntax (`*`) is supported."}).option(`source-config-path-includes`,{type:`string`,array:!0,description:"A list of paths that should be watched to trigger a preview deployment. Wildcard syntax (`*`) is supported."}).option(`source-config-pr-comments-enabled`,{type:`boolean`,description:`Whether to enable PR comments.`}).option(`source-config-preview-branch-excludes`,{type:`string`,array:!0,description:"A list of branches that should not trigger a preview deployment. Wildcard syntax (`*`) is supported. Must be used with `preview_deployment_setting` set to `custom`."}).option(`source-config-preview-branch-includes`,{type:`string`,array:!0,description:"A list of branches that should trigger a preview deployment. Wildcard syntax (`*`) is supported. Must be used with `preview_deployment_setting` set to `custom`."}).option(`source-config-preview-deployment-setting`,{type:`string`,description:`Controls whether commits to preview branches trigger a preview deployment.`,choices:[`all`,`none`,`custom`]}).option(`source-config-production-branch`,{type:`string`,description:`The production branch of the repository.`}).option(`source-config-production-deployments-enabled`,{type:`boolean`,description:`Whether to trigger a production deployment on commits to the production branch.`}).option(`source-config-repo-id`,{type:`string`,description:`The ID of the repository.`}).option(`source-config-repo-name`,{type:`string`,description:`The name of the repository.`}).option(`source-type`,{type:`string`,description:`The source control management provider.`,choices:[`github`,`gitlab`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{if([`deployment-configs-preview-always-use-latest-compatibility-date`,`deployment-configs-preview-build-image-major-version`,`deployment-configs-preview-compatibility-date`,`deployment-configs-preview-compatibility-flags`,`deployment-configs-preview-fail-open`,`deployment-configs-preview-limits-cpu-ms`,`deployment-configs-preview-placement-mode`,`deployment-configs-preview-usage-model`,`deployment-configs-preview-wrangler-config-hash`,`deployment-configs-production-always-use-latest-compatibility-date`,`deployment-configs-production-build-image-major-version`,`deployment-configs-production-compatibility-date`,`deployment-configs-production-compatibility-flags`,`deployment-configs-production-fail-open`,`deployment-configs-production-limits-cpu-ms`,`deployment-configs-production-placement-mode`,`deployment-configs-production-usage-model`,`deployment-configs-production-wrangler-config-hash`].some(t=>e[t]!==void 0)){let t=[`deployment-configs-preview-limits-cpu-ms`,`deployment-configs-preview-placement-mode`,`deployment-configs-production-limits-cpu-ms`,`deployment-configs-production-placement-mode`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --deployment_configs-* flag is set`)}return!0}).check(e=>{if([`source-config-deployments-enabled`,`source-config-owner`,`source-config-owner-id`,`source-config-path-excludes`,`source-config-path-includes`,`source-config-pr-comments-enabled`,`source-config-preview-branch-excludes`,`source-config-preview-branch-includes`,`source-config-preview-deployment-setting`,`source-config-production-branch`,`source-config-production-deployments-enabled`,`source-config-repo-id`,`source-config-repo-name`,`source-type`].some(t=>e[t]!==void 0)){let t=[`source-type`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --source-* flag is set`)}return!0})}const $={command:`edit <project-name>`,describe:`Update project`,builder:oe,handler:async r=>c({command:`pages projects edit`,classification:{safeFlags:[`build-config-build-caching`,`deployment-configs-preview-always-use-latest-compatibility-date`,`deployment-configs-preview-fail-open`,`deployment-configs-preview-usage-model`,`deployment-configs-production-always-use-latest-compatibility-date`,`deployment-configs-production-fail-open`,`deployment-configs-production-usage-model`,`source-config-deployments-enabled`,`source-config-pr-comments-enabled`,`source-config-preview-deployment-setting`,`source-config-production-deployments-enabled`,`source-type`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf pages projects edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/pages/projects/${r[`project-name`]==null?`<project-name>`:encodeURIComponent(String(r[`project-name`]))}`,pathParams:{"project-name":String(r[`project-name`]??``)},bodyKind:`json`,body:r.body===void 0?d({build_config:{build_caching:r[`build-config-build-caching`],build_command:f(r[`build-config-build-command`],`build-config-build-command`,`text`),destination_dir:f(r[`build-config-destination-dir`],`build-config-destination-dir`,`text`),root_dir:f(r[`build-config-root-dir`],`build-config-root-dir`,`text`),web_analytics_tag:f(r[`build-config-web-analytics-tag`],`build-config-web-analytics-tag`,`text`),web_analytics_token:f(r[`build-config-web-analytics-token`],`build-config-web-analytics-token`,`text`)},deployment_configs:{preview:{always_use_latest_compatibility_date:r[`deployment-configs-preview-always-use-latest-compatibility-date`],build_image_major_version:r[`deployment-configs-preview-build-image-major-version`],compatibility_date:f(r[`deployment-configs-preview-compatibility-date`],`deployment-configs-preview-compatibility-date`,`text`),compatibility_flags:r[`deployment-configs-preview-compatibility-flags`],fail_open:r[`deployment-configs-preview-fail-open`],limits:{cpu_ms:r[`deployment-configs-preview-limits-cpu-ms`]},placement:{mode:f(r[`deployment-configs-preview-placement-mode`],`deployment-configs-preview-placement-mode`,`text`)},usage_model:f(r[`deployment-configs-preview-usage-model`],`deployment-configs-preview-usage-model`,`text`),wrangler_config_hash:f(r[`deployment-configs-preview-wrangler-config-hash`],`deployment-configs-preview-wrangler-config-hash`,`text`)},production:{always_use_latest_compatibility_date:r[`deployment-configs-production-always-use-latest-compatibility-date`],build_image_major_version:r[`deployment-configs-production-build-image-major-version`],compatibility_date:f(r[`deployment-configs-production-compatibility-date`],`deployment-configs-production-compatibility-date`,`text`),compatibility_flags:r[`deployment-configs-production-compatibility-flags`],fail_open:r[`deployment-configs-production-fail-open`],limits:{cpu_ms:r[`deployment-configs-production-limits-cpu-ms`]},placement:{mode:f(r[`deployment-configs-production-placement-mode`],`deployment-configs-production-placement-mode`,`text`)},usage_model:f(r[`deployment-configs-production-usage-model`],`deployment-configs-production-usage-model`,`text`),wrangler_config_hash:f(r[`deployment-configs-production-wrangler-config-hash`],`deployment-configs-production-wrangler-config-hash`,`text`)}},name:f(r.name,`name`,`text`),production_branch:f(r[`production-branch`],`production-branch`,`text`),source:{config:{deployments_enabled:r[`source-config-deployments-enabled`],owner:f(r[`source-config-owner`],`source-config-owner`,`text`),owner_id:f(r[`source-config-owner-id`],`source-config-owner-id`,`text`),path_excludes:r[`source-config-path-excludes`],path_includes:r[`source-config-path-includes`],pr_comments_enabled:r[`source-config-pr-comments-enabled`],preview_branch_excludes:r[`source-config-preview-branch-excludes`],preview_branch_includes:r[`source-config-preview-branch-includes`],preview_deployment_setting:f(r[`source-config-preview-deployment-setting`],`source-config-preview-deployment-setting`,`text`),production_branch:f(r[`source-config-production-branch`],`source-config-production-branch`,`text`),production_deployments_enabled:r[`source-config-production-deployments-enabled`],repo_id:f(r[`source-config-repo-id`],`source-config-repo-id`,`text`),repo_name:f(r[`source-config-repo-name`],`source-config-repo-name`,`text`)},type:f(r[`source-type`],`source-type`,`text`)}}):l(r.body)});return}let c=await i(r),u=r.local?e:await n();if(r.accountId=u,r.body){let e=l(r.body);a(await s(`Updating`,async()=>c.pages.projects.edit({...e,account_id:u,project_name:r[`project-name`]})),{successLabel:`Updated`});return}let p=d({build_config:{build_caching:r[`build-config-build-caching`],build_command:f(r[`build-config-build-command`],`build-config-build-command`,`text`),destination_dir:f(r[`build-config-destination-dir`],`build-config-destination-dir`,`text`),root_dir:f(r[`build-config-root-dir`],`build-config-root-dir`,`text`),web_analytics_tag:f(r[`build-config-web-analytics-tag`],`build-config-web-analytics-tag`,`text`),web_analytics_token:f(r[`build-config-web-analytics-token`],`build-config-web-analytics-token`,`text`)},deployment_configs:{preview:{always_use_latest_compatibility_date:r[`deployment-configs-preview-always-use-latest-compatibility-date`],build_image_major_version:r[`deployment-configs-preview-build-image-major-version`],compatibility_date:f(r[`deployment-configs-preview-compatibility-date`],`deployment-configs-preview-compatibility-date`,`text`),compatibility_flags:r[`deployment-configs-preview-compatibility-flags`],fail_open:r[`deployment-configs-preview-fail-open`],limits:{cpu_ms:r[`deployment-configs-preview-limits-cpu-ms`]},placement:{mode:f(r[`deployment-configs-preview-placement-mode`],`deployment-configs-preview-placement-mode`,`text`)},usage_model:f(r[`deployment-configs-preview-usage-model`],`deployment-configs-preview-usage-model`,`text`),wrangler_config_hash:f(r[`deployment-configs-preview-wrangler-config-hash`],`deployment-configs-preview-wrangler-config-hash`,`text`)},production:{always_use_latest_compatibility_date:r[`deployment-configs-production-always-use-latest-compatibility-date`],build_image_major_version:r[`deployment-configs-production-build-image-major-version`],compatibility_date:f(r[`deployment-configs-production-compatibility-date`],`deployment-configs-production-compatibility-date`,`text`),compatibility_flags:r[`deployment-configs-production-compatibility-flags`],fail_open:r[`deployment-configs-production-fail-open`],limits:{cpu_ms:r[`deployment-configs-production-limits-cpu-ms`]},placement:{mode:f(r[`deployment-configs-production-placement-mode`],`deployment-configs-production-placement-mode`,`text`)},usage_model:f(r[`deployment-configs-production-usage-model`],`deployment-configs-production-usage-model`,`text`),wrangler_config_hash:f(r[`deployment-configs-production-wrangler-config-hash`],`deployment-configs-production-wrangler-config-hash`,`text`)}},name:f(r.name,`name`,`text`),production_branch:f(r[`production-branch`],`production-branch`,`text`),source:{config:{deployments_enabled:r[`source-config-deployments-enabled`],owner:f(r[`source-config-owner`],`source-config-owner`,`text`),owner_id:f(r[`source-config-owner-id`],`source-config-owner-id`,`text`),path_excludes:r[`source-config-path-excludes`],path_includes:r[`source-config-path-includes`],pr_comments_enabled:r[`source-config-pr-comments-enabled`],preview_branch_excludes:r[`source-config-preview-branch-excludes`],preview_branch_includes:r[`source-config-preview-branch-includes`],preview_deployment_setting:f(r[`source-config-preview-deployment-setting`],`source-config-preview-deployment-setting`,`text`),production_branch:f(r[`source-config-production-branch`],`source-config-production-branch`,`text`),production_deployments_enabled:r[`source-config-production-deployments-enabled`],repo_id:f(r[`source-config-repo-id`],`source-config-repo-id`,`text`),repo_name:f(r[`source-config-repo-name`],`source-config-repo-name`,`text`)},type:f(r[`source-type`],`source-type`,`text`)}});a(await s(`Updating`,async()=>c.pages.projects.edit({...p,account_id:u,project_name:r[`project-name`]})),{successLabel:`Updated`})})};function se(e){return e.usage(`$0 pages projects get-upload-token <project-name>
52
-
53
- Get a short-lived JWT for Pages Direct Upload asset operations.`).positional(`project-name`,{type:`string`,description:`Name of the project.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ce={command:`get-upload-token <project-name>`,describe:`Get upload token`,builder:se,handler:async r=>c({command:`pages projects get-upload-token`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf pages projects get-upload-token`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/pages/projects/${r[`project-name`]==null?`<project-name>`:encodeURIComponent(String(r[`project-name`]))}/upload-token`,pathParams:{"project-name":String(r[`project-name`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();r.accountId=l,a(await s(`Loading`,async()=>c.pages.projects.getUploadToken({account_id:l,project_name:r[`project-name`]})),{successLabel:`Loaded`})})};function le(e){return e.usage(`$0 pages projects get <project-name>
54
-
55
- Fetch a project by name.`).positional(`project-name`,{type:`string`,description:`Name of the project.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ue={command:`get <project-name>`,describe:`Get project`,builder:le,handler:async r=>c({command:`pages projects get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf pages projects get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/pages/projects/${r[`project-name`]==null?`<project-name>`:encodeURIComponent(String(r[`project-name`]))}`,pathParams:{"project-name":String(r[`project-name`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();r.accountId=l,a(await s(`Loading`,async()=>c.pages.projects.get({account_id:l,project_name:r[`project-name`]})),{successLabel:`Loaded`})})};function de(e){return e.usage(`$0 pages projects list
56
-
57
- Fetch a list of all user projects.`).option(`page`,{type:`number`,description:`Which page of projects to fetch.`}).option(`per-page`,{type:`number`,description:`How many projects to return per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const fe={command:`list`,describe:`Get projects`,builder:de,handler:async r=>c({command:`pages projects list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={page:r.page,per_page:r[`per-page`]};if(r.dryRun){o({command:`cf pages projects list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/pages/projects`,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.pages.projects.list({account_id:u,...c})),{successLabel:`Loaded`})})};function pe(e){return e.usage(`$0 pages projects purge-build-cache <project-name>
58
-
59
- Purge all cached build artifacts for a Pages project`).positional(`project-name`,{type:`string`,description:`Name of the project.`,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 me={command:`purge-build-cache <project-name>`,describe:`Purge build cache`,builder:pe,handler:async r=>c({command:`pages projects purge-build-cache`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf pages projects purge-build-cache`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/pages/projects/${r[`project-name`]==null?`<project-name>`:encodeURIComponent(String(r[`project-name`]))}/purge_build_cache`,pathParams:{"project-name":String(r[`project-name`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,!await g({force:!!r.force,message:`This operation purges the build cache for a Pages project.`})){process.stderr.write(`Aborted.
60
- `);return}a(await s(`Deleting`,async()=>c.pages.projects.purgeBuildCache({account_id:l,project_name:r[`project-name`]})),{successLabel:`Deleted`})})},he={command:`projects`,describe:`Pages projects, deployments, build logs, and custom domain bindings`,builder:e=>e.command(v).command(b).command(S).command(G).command($).command(ue).command(ce).command(fe).command(me).command(U).command(ae).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ge={command:`pages`,describe:`Full-stack application hosting with Git-integrated builds, preview deployments, and custom domains`,builder:e=>e.command(he).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{ge as default};