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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (238) hide show
  1. package/dist/_meta/commands.json +478 -141
  2. package/dist/_meta/hand-written-commands.json +44 -0
  3. package/dist/_meta/schemas.json +254 -2
  4. package/dist/{abuse-reports-CTOO4FJ4.mjs → abuse-reports-BIS9MZn7.mjs} +3 -3
  5. package/dist/{access-DFGLlXpy.mjs → access-__sFDSFL.mjs} +1 -1
  6. package/dist/{accounts-C-wpV8Az.mjs → accounts-CmggwRjh.mjs} +36 -34
  7. package/dist/{acm-thIt17mv.mjs → acm-AAhRZUAU.mjs} +1 -1
  8. package/dist/{addressing-D7VI7-Oi.mjs → addressing-DVeJNPZc.mjs} +1 -1
  9. package/dist/{agent-memory-duLTH8pl.mjs → agent-memory-DQhWO6sc.mjs} +1 -1
  10. package/dist/{ai-ctIjDCq0.mjs → ai-CULO9sno.mjs} +3 -3
  11. package/dist/{ai-audit-CjhuS21p.mjs → ai-audit-udn4HF34.mjs} +1 -1
  12. package/dist/{ai-gateway-B1TIw7wl.mjs → ai-gateway-Bm2MMdec.mjs} +3 -3
  13. package/dist/{ai-search-DUQBnOWH.mjs → ai-search-GRN_gXgU.mjs} +1 -1
  14. package/dist/{ai-security-bdABwEIR.mjs → ai-security-DXy9ht-9.mjs} +2 -2
  15. package/dist/{alerting-I_KErGZy.mjs → alerting-CssnaN2i.mjs} +1 -1
  16. package/dist/{analytics-DGxcDAWu.mjs → analytics-BVo7Ax0w.mjs} +1 -1
  17. package/dist/{analytics-engine-DNNokw1O.mjs → analytics-engine-BBd0Bydx.mjs} +1 -1
  18. package/dist/{api-security-CsPrJ-Xw.mjs → api-security-C-D9OKtH.mjs} +3 -3
  19. package/dist/{argo-BhNmRYk5.mjs → argo-DSziwzvA.mjs} +1 -1
  20. package/dist/{artifacts-DRo8KadB.mjs → artifacts-nVMgn4dn.mjs} +1 -1
  21. package/dist/{audit-logs-CzxDyTbx.mjs → audit-logs-DIZ5oA_y.mjs} +1 -1
  22. package/dist/auth-Bls_1yRW.mjs +2 -0
  23. package/dist/{auth-pbuzyz4C.mjs → auth-CB9wjyad.mjs} +1 -1
  24. package/dist/auth-JsvLULHA.mjs +7 -0
  25. package/dist/{auth-token-BcIV7k1B.mjs → auth-token-BAgw7kYP.mjs} +1 -1
  26. package/dist/{autoconfig-CXcy-e1R.mjs → autoconfig-CajkMb3B.mjs} +19 -11
  27. package/dist/{basin-catalog-DoTn8zvi.mjs → basin-catalog-BRvGeKm3.mjs} +9 -9
  28. package/dist/{billing-CMbLzZV0.mjs → billing-BhPoqyKC.mjs} +1 -1
  29. package/dist/{blocks-DmOx-xEv.mjs → blocks-D2tE8dp2.mjs} +1 -1
  30. package/dist/{bot-management-CJs5WwAW.mjs → bot-management-BfjX5DuH.mjs} +1 -1
  31. package/dist/{botnet-feed-DeF7P5lI.mjs → botnet-feed-VOL5P4s3.mjs} +1 -1
  32. package/dist/{brand-protection-dx_B8OWa.mjs → brand-protection-CSVHQ9Pt.mjs} +2 -2
  33. package/dist/{browser-run-fRn9ItYu.mjs → browser-run-cxOd2cZE.mjs} +1 -1
  34. package/dist/{build-CCepbVuJ.mjs → build-BfkzV5_c.mjs} +1 -1
  35. package/dist/build-DCdLWwOg.mjs +2 -0
  36. package/dist/{builds-5YhQ_zIm.mjs → builds-y5BQCJ81.mjs} +1 -1
  37. package/dist/{cache-WQyxt7O5.mjs → cache-Bvr988Hj.mjs} +1 -1
  38. package/dist/cf-DgLg6Hop.mjs +18 -0
  39. package/dist/{chunk-3PJ54H4K-C8sxQzhB.mjs → chunk-3PJ54H4K-CbRAWQWI.mjs} +1 -1
  40. package/dist/{chunk-DSGVRFIS-CP2xC0bc.mjs → chunk-DSGVRFIS-Dq2PrGsi.mjs} +1 -1
  41. package/dist/{cli-CgkhNdjb.mjs → cli-BTxJfFus.mjs} +1 -1
  42. package/dist/{client-side-security-COuAb7BM.mjs → client-side-security-CFmO0uz9.mjs} +1 -1
  43. package/dist/{cloud-connector-D1gjX0Dx.mjs → cloud-connector-CtwPdFBa.mjs} +1 -1
  44. package/dist/{cloudflared-FEg1GxHT.mjs → cloudflared-DPkNN1Qv.mjs} +1 -1
  45. package/dist/{cloudforce-one-BmXgL6kB.mjs → cloudforce-one-DHrMaxnU.mjs} +58 -58
  46. package/dist/{command-BfoLlrr1.mjs → command-6_Ms3TZv.mjs} +1 -1
  47. package/dist/{command-DrdxR1tJ.mjs → command-BWyx7dNO.mjs} +1 -1
  48. package/dist/{command-qhfkede5.mjs → command-BXCk1OsI.mjs} +1 -1
  49. package/dist/{command-WyIFe__L.mjs → command-CCDzJjIB.mjs} +1 -1
  50. package/dist/{command-BG9JYUHo.mjs → command-CDYTsmxe.mjs} +1 -1
  51. package/dist/{command-Dsi4sM8D.mjs → command-CXwKBbj9.mjs} +1 -1
  52. package/dist/{command-8hWrCCy6.mjs → command-ClneauMx.mjs} +1 -1
  53. package/dist/{command-BJFKdqVc.mjs → command-CmK8-DJ9.mjs} +1 -1
  54. package/dist/{command-BaIY4UuC.mjs → command-Ct3tf-P5.mjs} +1 -1
  55. package/dist/{command-hh8rEbH4.mjs → command-DPOjEs1B.mjs} +1 -1
  56. package/dist/{command-D3E7d8E7.mjs → command-DqWBPiew.mjs} +1 -1
  57. package/dist/{command-BXPssGfS.mjs → command-YFWLEK8W.mjs} +1 -1
  58. package/dist/{command-CA6yIa17.mjs → command-ckixJeTm.mjs} +1 -1
  59. package/dist/{command-B_Fxpr5v.mjs → command-lJJ7sEZe.mjs} +1 -1
  60. package/dist/{completions-BshG3sAO.mjs → completions-B1rYgw_a.mjs} +1 -1
  61. package/dist/{connector-interrupts-pNU4QmsW.mjs → connector-interrupts-DecTdK6X.mjs} +1 -1
  62. package/dist/{connector-telemetry-events-BpRPtTdD.mjs → connector-telemetry-events-wePxPACj.mjs} +1 -1
  63. package/dist/{connector-telemetry-snapshots-pNfynA2r.mjs → connector-telemetry-snapshots-D8sXR1qx.mjs} +1 -1
  64. package/dist/{connectors-CiWTAGHh.mjs → connectors-C-6RQ_Q1.mjs} +1 -1
  65. package/dist/{containers-IBtaInTL.mjs → containers-C_byVTZF.mjs} +193 -193
  66. package/dist/{containers-Dvq0NjQg.mjs → containers-D65Gpj9Q.mjs} +2 -2
  67. package/dist/{content-scan-B69hOyhb.mjs → content-scan-DbIDQ-Yu.mjs} +1 -1
  68. package/dist/{context-BryBS1zQ.mjs → context-DCon1tRZ.mjs} +1 -1
  69. package/dist/{cps-DLgWaZMT.mjs → cps-DGLmzCzp.mjs} +1 -1
  70. package/dist/{csam-scanner-D1928b81.mjs → csam-scanner-R7Ih-Dnw.mjs} +1 -1
  71. package/dist/{custom-csrs-DrxWBjmx.mjs → custom-csrs-D0RnVoJ7.mjs} +1 -1
  72. package/dist/{custom-hostnames-BP1pxK1F.mjs → custom-hostnames-BFWR-tR_.mjs} +1 -1
  73. package/dist/{custom-nameservers-5DJLY479.mjs → custom-nameservers-Dn_9Ssti.mjs} +1 -1
  74. package/dist/{custom-pages-CNAsOY9a.mjs → custom-pages-HqIQcb77.mjs} +1 -1
  75. package/dist/{d1-Dge80Qgq.mjs → d1-CopIY9RT.mjs} +2 -2
  76. package/dist/{delegate-CBKb0nov.mjs → delegate-CTj0dYET.mjs} +1 -1
  77. package/dist/delegate.mjs +1 -1
  78. package/dist/{deploy-CR5b7uhB.mjs → deploy-BVTA83rN.mjs} +1 -1
  79. package/dist/{deploy-context-D51tgJGI.mjs → deploy-context-CO8ZSRwx.mjs} +1 -1
  80. package/dist/{deploy-input-em95cFc7.mjs → deploy-input-PhKRxa_2.mjs} +1 -1
  81. package/dist/{dev-BczBHbpj.mjs → dev-CM5GLHNn.mjs} +1 -1
  82. package/dist/{diagnostics-BKKinCge.mjs → diagnostics-DPjl0aCm.mjs} +1 -1
  83. package/dist/{dist-D5YYi2LO.mjs → dist-ataVE8ob.mjs} +3 -3
  84. package/dist/{dls-DU4HnxED.mjs → dls-BLTIVlbh.mjs} +1 -1
  85. package/dist/{dns-BzdH3geY.mjs → dns-DkqVq-nB.mjs} +60 -58
  86. package/dist/{dns-firewall-puq_86Wd.mjs → dns-firewall-D1bb1byu.mjs} +1 -1
  87. package/dist/{docs-AWb7X2VX.mjs → docs-tOv_OllI.mjs} +1 -1
  88. package/dist/{durable-objects-Dg6XPcsB.mjs → durable-objects-OJhns_to.mjs} +1 -1
  89. package/dist/{email-auth-DXR0NU9R.mjs → email-auth-BbsIBNlu.mjs} +1 -1
  90. package/dist/{email-domains-B00mAtjT.mjs → email-domains-pWZi1M4q.mjs} +1 -1
  91. package/dist/{email-routing-Cm19q9hA.mjs → email-routing-DnitWE1A.mjs} +1 -1
  92. package/dist/{email-security-CFKcS-DM.mjs → email-security-DiWtb7cx.mjs} +2 -2
  93. package/dist/{email-sending-B3xSoKcC.mjs → email-sending-DuDjXykw.mjs} +1 -1
  94. package/dist/{errors-CIQDUrWg.mjs → errors-CCFmptqJ.mjs} +1 -1
  95. package/dist/{field-extractors-Csz8QknP.mjs → field-extractors-DNNnkBZH.mjs} +1 -1
  96. package/dist/{firewall-C8FW0Nb2.mjs → firewall-C7eZRNVF.mjs} +22 -16
  97. package/dist/{flagship-v-bGZ_U-.mjs → flagship-BczjsrJ5.mjs} +1 -1
  98. package/dist/{fraud-VvfL2I5a.mjs → fraud-wE0UM2SM.mjs} +1 -1
  99. package/dist/{google-tag-gateway-DF6fS2MQ.mjs → google-tag-gateway-6mvtxcJK.mjs} +1 -1
  100. package/dist/{healthchecks-D3p3E4WL.mjs → healthchecks-aIB3DebS.mjs} +1 -1
  101. package/dist/{hyperdrive-DopYL1dK.mjs → hyperdrive-DHRP8SJS.mjs} +1 -1
  102. package/dist/{iam-cIfyshlf.mjs → iam-6t7-ScrS.mjs} +1 -1
  103. package/dist/{images-BR5fP_6r.mjs → images-CLgvxd0t.mjs} +1 -1
  104. package/dist/index.mjs +1 -1
  105. package/dist/{init-JXRQoqGP.mjs → init-B_DBTMXU.mjs} +1 -1
  106. package/dist/{intel-BvNrrM7V.mjs → intel-jnoIVlYG.mjs} +2 -2
  107. package/dist/{interactive-DOWEcR6_.mjs → interactive-1g0dnrA8.mjs} +1 -1
  108. package/dist/{internal-DcnAVlpA.mjs → internal-Ba3b-Z8J.mjs} +1 -1
  109. package/dist/{ips-BUEIuhhw.mjs → ips-CQ4gFfex.mjs} +1 -1
  110. package/dist/{k2-Dm4LvAhL.mjs → k2-Bsm6rzNX.mjs} +1 -1
  111. package/dist/{kv-7oD-JIak.mjs → kv-DQfnNE-w.mjs} +1 -1
  112. package/dist/{lazy-command-CD1nuS38.mjs → lazy-command-DjGzxiUT.mjs} +1 -1
  113. package/dist/{leaked-credential-checks-B6s8hUYU.mjs → leaked-credential-checks-CaqjG3Oz.mjs} +1 -1
  114. package/dist/list-4MfEFwJN.mjs +2 -0
  115. package/dist/list-ByCv9-Fl.mjs +2 -0
  116. package/dist/{live-CHP4AXSN.mjs → live-BfobGv8W.mjs} +1 -1
  117. package/dist/{load-balancers-B_yvINGW.mjs → load-balancers-BzSCp2Uh.mjs} +1 -1
  118. package/dist/{local-CIeKNHSz.mjs → local-BNmz58v4.mjs} +1 -1
  119. package/dist/local-ChR3YIMU.mjs +2 -0
  120. package/dist/{local-runtime-DOSBgJlo.mjs → local-runtime-DvH92pV8.mjs} +1 -1
  121. package/dist/{login-h8vuvNN3.mjs → login-B9wYab6S.mjs} +2 -2
  122. package/dist/login-ierSCYE6.mjs +2 -0
  123. package/dist/{logpush-B70rNMOP.mjs → logpush-DgfiSd1b.mjs} +2 -2
  124. package/dist/{logs-DqmqCNqQ.mjs → logs-Dan7xU-k.mjs} +1 -1
  125. package/dist/{magic-cloud-networking-CurtlBvl.mjs → magic-cloud-networking-DP8fWC4a.mjs} +3 -3
  126. package/dist/{magic-network-monitoring-OzpX7MfI.mjs → magic-network-monitoring-TAjt04vN.mjs} +1 -1
  127. package/dist/{magic-transit-Ca_CROhr.mjs → magic-transit-BSuLHnQ5.mjs} +1 -1
  128. package/dist/{managed-defense-BRxv0mgy.mjs → managed-defense-CTnIZLg4.mjs} +1 -1
  129. package/dist/{managed-transforms-C7YLIPdN.mjs → managed-transforms-BETvesjp.mjs} +1 -1
  130. package/dist/{mcp-B_StIx94.mjs → mcp-DhjMGaKc.mjs} +1 -1
  131. package/dist/{mesh-YW-p6Tkx.mjs → mesh-jxLLG3t4.mjs} +1 -1
  132. package/dist/{migrate-CrBgU7Xm.mjs → migrate-Bkhk38nJ.mjs} +1 -1
  133. package/dist/{monetization-rMP8HK_4.mjs → monetization-BqDgHlPv.mjs} +1 -1
  134. package/dist/{network-D9Do7C-u.mjs → network-D6BRpgOv.mjs} +2 -2
  135. package/dist/{network-interconnects-DYMhB3TR.mjs → network-interconnects-tP41GbnL.mjs} +1 -1
  136. package/dist/{o11y-HT9_9NUF.mjs → o11y-h4cIC_1T.mjs} +1 -1
  137. package/dist/{oauth-D6uh5ZdS.mjs → oauth-CuM12iNb.mjs} +1 -1
  138. package/dist/{oauth-clients-B_BJco0Z.mjs → oauth-clients-B0voUiXM.mjs} +1 -1
  139. package/dist/{oauth-DetIFT59.mjs → oauth-nDH3nTCa.mjs} +2 -2
  140. package/dist/oauth-scopes-Bhns1ZHW.mjs +4 -0
  141. package/dist/{organization-DhxMPdqU.mjs → organization-Cy55HoRR.mjs} +4 -4
  142. package/dist/organizations-7Q3d9vcW.mjs +4 -0
  143. package/dist/{origin-post-quantum-encryption-CPZQGLmW.mjs → origin-post-quantum-encryption-XBMPCdSL.mjs} +1 -1
  144. package/dist/package-DK3JX4I3.mjs +2 -0
  145. package/dist/{page-rules-0nDfdFWr.mjs → page-rules-BlT5xlhH.mjs} +1 -1
  146. package/dist/{pages-Br-w5HLL.mjs → pages-CIbL62L2.mjs} +2 -2
  147. package/dist/{pay-per-crawl-Di6UpJoo.mjs → pay-per-crawl-BzsBqo_m.mjs} +1 -1
  148. package/dist/{pay-per-use-Bm7Nxf6s.mjs → pay-per-use-DtejLYJ8.mjs} +1 -1
  149. package/dist/{pipelines-BRVI3bV9.mjs → pipelines-LjLb8jq6.mjs} +1 -1
  150. package/dist/{precursor-DyrQWdO5.mjs → precursor-BKp5_Ag4.mjs} +1 -1
  151. package/dist/{previews-rpfwcJzi.mjs → previews-zRYO9uO9.mjs} +1 -1
  152. package/dist/{progress-C_yVLVcl.mjs → progress-_Jux05O5.mjs} +1 -1
  153. package/dist/{prompt-kxvGZ6nF.mjs → prompt-SNVLBS1b.mjs} +1 -1
  154. package/dist/{queues-BGV3aC26.mjs → queues-Ci4rGGC4.mjs} +1 -1
  155. package/dist/{r2-CWMqr3JJ.mjs → r2-qm2hgS43.mjs} +1 -1
  156. package/dist/radar-C_ydbJe_.mjs +300 -0
  157. package/dist/{raw-fetch-C_hWBr7n.mjs → raw-fetch-D3ydyJYW.mjs} +1 -1
  158. package/dist/{ready-BXz5amSL.mjs → ready-hk-_B8z3.mjs} +1 -1
  159. package/dist/{realtime-9jG5GaNK.mjs → realtime-BAvjYmYw.mjs} +2 -2
  160. package/dist/{registrar-C-2I1SJh.mjs → registrar-DD7WZaP2.mjs} +10 -10
  161. package/dist/{registrar-sandbox-D9ldxGPo.mjs → registrar-sandbox-DbxloH5s.mjs} +2 -2
  162. package/dist/{reporting-Bk3dc6Gi.mjs → reporting-CRVg3J1C.mjs} +1 -1
  163. package/dist/{request-headers-B5Rjq7Ic.mjs → request-headers-Cn01EsbI.mjs} +1 -1
  164. package/dist/{request-tracers-H-iRAUdG.mjs → request-tracers-BWs0rdFS.mjs} +1 -1
  165. package/dist/{resource-sharing-A6ITunsT.mjs → resource-sharing-yipIkdbd.mjs} +2 -2
  166. package/dist/{rules-BntvQdnS.mjs → rules-CCtaBLiN.mjs} +1 -1
  167. package/dist/{rulesets-DKz_iYU_.mjs → rulesets-DBEvCNDS.mjs} +1 -1
  168. package/dist/{rum-D9zpcNqT.mjs → rum-gDOKylu_.mjs} +1 -1
  169. package/dist/{run-BlSXngtI.mjs → run-Br8sYjNF.mjs} +1 -1
  170. package/dist/run-LOgTLpob.mjs +2 -0
  171. package/dist/schema-cache-Cb64Nqbt.mjs +3 -0
  172. package/dist/schema-flags-BcbbCWR5.mjs +4 -0
  173. package/dist/{scim-DVhxKKpH.mjs → scim-CM8Xah56.mjs} +1 -1
  174. package/dist/{secrets-store-3mxJrDWJ.mjs → secrets-store-BEnXiYCC.mjs} +2 -2
  175. package/dist/{security-insights-BDLWuG0E.mjs → security-insights-Be5GvdBA.mjs} +5 -5
  176. package/dist/{security-txt-COzdrpdW.mjs → security-txt-BF0PWAEW.mjs} +1 -1
  177. package/dist/{session-X3xaW70I.mjs → session-B7vOqdZU.mjs} +1 -1
  178. package/dist/{shared-foRpbmSV.mjs → shared-CBMFY1VY.mjs} +1 -1
  179. package/dist/{signed-url-Dgi1p-Qi.mjs → signed-url-VDDQlllt.mjs} +1 -1
  180. package/dist/{smart-shield-DSDA5bZt.mjs → smart-shield-DQku_wYi.mjs} +1 -1
  181. package/dist/{snippets-myowgDLd.mjs → snippets-B3FCEMuh.mjs} +1 -1
  182. package/dist/{spawn-C8D5pzxJ.mjs → spawn-9sE67p7c.mjs} +1 -1
  183. package/dist/{spectrum-CB-NzbZ7.mjs → spectrum-nLirlVue.mjs} +5 -5
  184. package/dist/{speed-UqKG1WDl.mjs → speed-C1hCyMPy.mjs} +1 -1
  185. package/dist/{sql-BzikdIje.mjs → sql-DVQOKThL.mjs} +1 -1
  186. package/dist/{src-B9agxHh8.mjs → src-Bh2gHpI7.mjs} +5 -5
  187. package/dist/{ssl-BmWWsUX6.mjs → ssl-CYDRgr24.mjs} +2 -2
  188. package/dist/{startup-profile-B7yHR_YB.mjs → startup-profile-BLvw_Wmc.mjs} +1 -1
  189. package/dist/startup-profile-ByxSdhEl.mjs +2 -0
  190. package/dist/{state-DNuVv5i-.mjs → state-B8n0QU04.mjs} +1 -1
  191. package/dist/state-BTOzaT5L.mjs +2 -0
  192. package/dist/{stream-G87TzC9e.mjs → stream-DHyejrI6.mjs} +1 -1
  193. package/dist/{tags-Ctl4fLux.mjs → tags-DOL6dKQE.mjs} +2 -2
  194. package/dist/{telemetry-CA0_i9-l.mjs → telemetry-DJ8-Q2pU.mjs} +1 -1
  195. package/dist/telemetry-kjElc1zT.mjs +2 -0
  196. package/dist/{tenant-t5yPFQOx.mjs → tenant-2EdATz2Y.mjs} +1 -1
  197. package/dist/{tenant-custom-nameservers-B2ehXfQK.mjs → tenant-custom-nameservers-DhEpJNST.mjs} +1 -1
  198. package/dist/{tunnels-DL_VgV0P.mjs → tunnels-CMAmH4Vh.mjs} +3 -3
  199. package/dist/{turnstile-CEjw5vn6.mjs → turnstile-DTJjDMFp.mjs} +1 -1
  200. package/dist/ui-7zujR-O7.mjs +2 -0
  201. package/dist/{update-check-LF-JcHRF.mjs → update-check-BkCdHK-3.mjs} +1 -1
  202. package/dist/{update-check-2Mn4Z1ln.mjs → update-check-DDGKWkmi.mjs} +1 -1
  203. package/dist/update-check-worker.mjs +1 -1
  204. package/dist/{url-normalization-BL_BkGvP.mjs → url-normalization-BbWOra1u.mjs} +1 -1
  205. package/dist/{url-scanner-CVzV9Syq.mjs → url-scanner-Bj-eS_3C.mjs} +2 -2
  206. package/dist/{user-YnQSmPNR.mjs → user-CMzTHHVX.mjs} +1 -1
  207. package/dist/{vectorize-C5ZwKQzI.mjs → vectorize-D4H7_KPs.mjs} +1 -1
  208. package/dist/version-DIIJ2ixL.mjs +2 -0
  209. package/dist/{waiting-rooms-D9V1Fm16.mjs → waiting-rooms-CqMbVu9s.mjs} +1 -1
  210. package/dist/{web-assets-yzPkWgLy.mjs → web-assets-BgfzyF8t.mjs} +5 -5
  211. package/dist/{web3-DbWNUhP4.mjs → web3-ByCe47FI.mjs} +1 -1
  212. package/dist/{workers-r9Aj68v1.mjs → workers-BiLsPkYD.mjs} +2 -2
  213. package/dist/{workers-builds-DgIDPDhj.mjs → workers-builds-2N71_8MZ.mjs} +1 -1
  214. package/dist/{workers-for-platforms-CoPp1ez5.mjs → workers-for-platforms-BMN4QXgT.mjs} +1 -1
  215. package/dist/{workers-vpc-Cvjg15bk.mjs → workers-vpc-3o7dMg7-.mjs} +1 -1
  216. package/dist/{workflows-D4SIo58Q.mjs → workflows-COiyqt-B.mjs} +1 -1
  217. package/dist/{wrangler-migration-D2HwxIG5.mjs → wrangler-migration-CqSg8IDj.mjs} +5 -5
  218. package/dist/{zaraz-CkqpiZBH.mjs → zaraz-DjwhCH8A.mjs} +2 -2
  219. package/dist/{zero-trust-CEY-lohP.mjs → zero-trust-BmpuDOmH.mjs} +64 -58
  220. package/dist/{zones-BWieAez1.mjs → zones-XYQiz5kF.mjs} +2 -2
  221. package/package.json +12 -12
  222. package/dist/auth-B2V5gsm4.mjs +0 -2
  223. package/dist/auth-CyF_s5ic.mjs +0 -2
  224. package/dist/build-CgpCJjPA.mjs +0 -2
  225. package/dist/cf-CInFH4Ng.mjs +0 -18
  226. package/dist/local-CTaqb1nl.mjs +0 -2
  227. package/dist/login-pt6gTX3x.mjs +0 -2
  228. package/dist/oauth-scopes-Cub2pl0Z.mjs +0 -4
  229. package/dist/organizations-DIduPB74.mjs +0 -4
  230. package/dist/package-Bf2u3-yO.mjs +0 -2
  231. package/dist/radar-D8x_TUAi.mjs +0 -300
  232. package/dist/run-DB1-Sj9a.mjs +0 -2
  233. package/dist/schema-flags-CoTAkrz8.mjs +0 -5
  234. package/dist/startup-profile-zt6cFnBn.mjs +0 -2
  235. package/dist/state-C5mQ9At8.mjs +0 -2
  236. package/dist/telemetry-jl3s2-bN.mjs +0 -2
  237. package/dist/ui-Dt1-eURh.mjs +0 -2
  238. package/dist/version-Bz705iJe.mjs +0 -2
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CIeKNHSz.mjs";import{i as n,n as r}from"./auth-pbuzyz4C.mjs";import{a as i,t as a}from"./context-BryBS1zQ.mjs";import{t as o}from"./output-BJEgbI0G.mjs";import{t as s}from"./dry-run-gy0Hl9xo.mjs";import{t as c}from"./progress-C_yVLVcl.mjs";import{t as l}from"./run-BlSXngtI.mjs";import"./telemetry-jl3s2-bN.mjs";import{a as u,n as d,r as f,s as p,t as m}from"./body-parser-BKcZS9iJ.mjs";import{n as h}from"./input-validation-D7z60HJH.mjs";import{a as g,i as _,n as v}from"./prompt-kxvGZ6nF.mjs";import{n as ee,t as te}from"./raw-fetch-C_hWBr7n.mjs";var ne={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_dns_protection/configs/dns_protection/rules`};function re(e){return e.usage(`$0 magic-transit advanced-dns-protection configs dns protection rules bulk-delete
2
+ import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-BNmz58v4.mjs";import{i as n,n as r}from"./auth-CB9wjyad.mjs";import{a as i,t as a}from"./context-DCon1tRZ.mjs";import{t as o}from"./output-BJEgbI0G.mjs";import{t as s}from"./dry-run-gy0Hl9xo.mjs";import{t as c}from"./progress-_Jux05O5.mjs";import{t as l}from"./run-Br8sYjNF.mjs";import"./telemetry-kjElc1zT.mjs";import{a as u,n as d,r as f,s as p,t as m}from"./body-parser-BKcZS9iJ.mjs";import{n as h}from"./input-validation-D7z60HJH.mjs";import{a as g,i as _,n as v}from"./prompt-SNVLBS1b.mjs";import{n as ee,t as te}from"./raw-fetch-D3ydyJYW.mjs";var ne={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_dns_protection/configs/dns_protection/rules`};function re(e){return e.usage(`$0 magic-transit advanced-dns-protection configs dns protection rules bulk-delete
3
3
 
4
4
  Delete all DNS Protection rules for an account.`).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:`bulk-delete`,describe:`Delete all DNS Protection rules.`,builder:re,handler:async e=>l({command:`magic-transit advanced-dns-protection configs dns protection rules bulk-delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf magic-transit advanced-dns-protection configs dns protection rules bulk-delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_dns_protection/configs/dns_protection/rules`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force}))return;let u=await c(`Deleting`,async()=>n.send(ne,{account_id:l}));o(u,{successLabel:`Deleted`})})};var y={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/advanced_dns_protection/configs/dns_protection/rules`,body:`json`};function ae(e){return e.usage(`$0 magic-transit advanced-dns-protection configs dns protection rules create
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CIeKNHSz.mjs";import{i as n,n as r}from"./auth-pbuzyz4C.mjs";import{a as i,t as a}from"./context-BryBS1zQ.mjs";import{t as o}from"./output-BJEgbI0G.mjs";import{t as s}from"./dry-run-gy0Hl9xo.mjs";import{t as c}from"./progress-C_yVLVcl.mjs";import{t as l}from"./run-BlSXngtI.mjs";import"./telemetry-jl3s2-bN.mjs";import{a as u,n as d,s as f,t as p}from"./body-parser-BKcZS9iJ.mjs";import{n as m}from"./input-validation-D7z60HJH.mjs";import{a as h}from"./prompt-kxvGZ6nF.mjs";var g={method:`GET`,path:t=>e`/accounts/${t.account_id}/managed-defense/vulnerability-discovery/repos/${t.repo_id}/scans/${t.scan_id}/report`,errors:{404:`NotFoundError`,409:`ConflictError`,410:`GoneError`}};function _(e){return e.usage(`$0 managed-defense vulnerability-discovery reports get <scan-id>
2
+ import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-BNmz58v4.mjs";import{i as n,n as r}from"./auth-CB9wjyad.mjs";import{a as i,t as a}from"./context-DCon1tRZ.mjs";import{t as o}from"./output-BJEgbI0G.mjs";import{t as s}from"./dry-run-gy0Hl9xo.mjs";import{t as c}from"./progress-_Jux05O5.mjs";import{t as l}from"./run-Br8sYjNF.mjs";import"./telemetry-kjElc1zT.mjs";import{a as u,n as d,s as f,t as p}from"./body-parser-BKcZS9iJ.mjs";import{n as m}from"./input-validation-D7z60HJH.mjs";import{a as h}from"./prompt-SNVLBS1b.mjs";var g={method:`GET`,path:t=>e`/accounts/${t.account_id}/managed-defense/vulnerability-discovery/repos/${t.repo_id}/scans/${t.scan_id}/report`,errors:{404:`NotFoundError`,409:`ConflictError`,410:`GoneError`}};function _(e){return e.usage(`$0 managed-defense vulnerability-discovery reports get <scan-id>
3
3
 
4
4
  Gets the repository projection of the active operator-reviewed scan report. \`scan_id\` is the customer scan's stable request ID.`).positional(`scan-id`,{type:`string`,description:`Scan ID`,demandOption:!0}).option(`repo-id`,{type:`string`,description:`Repo ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`get <scan-id>`,describe:`Get reviewed vulnerability report`,builder:_,handler:async e=>l({command:`managed-defense vulnerability-discovery reports get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf managed-defense vulnerability-discovery reports get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/managed-defense/vulnerability-discovery/repos/${e[`repo-id`]==null?`<repo-id>`:encodeURIComponent(String(e[`repo-id`]))}/scans/${e[`scan-id`]==null?`<scan-id>`:encodeURIComponent(String(e[`scan-id`]))}/report`,pathParams:{"repo-id":String(e[`repo-id`]??``),"scan-id":String(e[`scan-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(g,{account_id:l,repo_id:e[`repo-id`],scan_id:e[`scan-id`]}));o(u,{successLabel:`Loaded`})})},y={command:`reports`,describe:`Operations for vulnerability-discovery.reports`,builder:e=>e.command(v).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var b={method:`POST`,path:t=>e`/accounts/${t.account_id}/managed-defense/vulnerability-discovery/repos/${t.repo_id}/token`,errors:{404:`NotFoundError`}};function x(e){return e.usage(`$0 managed-defense vulnerability-discovery repositories create-token <repo-id>
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-pbuzyz4C.mjs";import{i as n}from"./context-BryBS1zQ.mjs";import{t as r}from"./output-BJEgbI0G.mjs";import{t as i}from"./dry-run-gy0Hl9xo.mjs";import{t as a}from"./progress-C_yVLVcl.mjs";import{t as o}from"./run-BlSXngtI.mjs";import"./telemetry-jl3s2-bN.mjs";import{a as s,n as c,t as l}from"./body-parser-BKcZS9iJ.mjs";import{n as u}from"./prompt-kxvGZ6nF.mjs";var d={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/managed_headers`,response:!1};function f(e){return e.usage(`$0 managed-transforms delete
2
+ import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-CB9wjyad.mjs";import{i as n}from"./context-DCon1tRZ.mjs";import{t as r}from"./output-BJEgbI0G.mjs";import{t as i}from"./dry-run-gy0Hl9xo.mjs";import{t as a}from"./progress-_Jux05O5.mjs";import{t as o}from"./run-Br8sYjNF.mjs";import"./telemetry-kjElc1zT.mjs";import{a as s,n as c,t as l}from"./body-parser-BKcZS9iJ.mjs";import{n as u}from"./prompt-SNVLBS1b.mjs";var d={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/managed_headers`,response:!1};function f(e){return e.usage(`$0 managed-transforms delete
3
3
 
4
4
  Disables all Managed Transforms.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const p={command:`delete`,describe:`Delete Managed Transforms`,builder:f,handler:async e=>o({command:`managed-transforms delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf managed-transforms delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/managed_headers`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=s,!await u({force:!!e.force}))return;let c=await a(`Deleting`,async()=>o.send(d,{zone_id:s}));r(c,{successLabel:`Deleted`})})};var m={method:`GET`,path:t=>e`/zones/${t.zone_id}/managed_headers`};function h(e){return e.usage(`$0 managed-transforms list
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CIeKNHSz.mjs";import{n}from"./auth-pbuzyz4C.mjs";import{a as r,t as i}from"./context-BryBS1zQ.mjs";import{t as a}from"./output-BJEgbI0G.mjs";import{t as o}from"./dry-run-gy0Hl9xo.mjs";import{t as s}from"./progress-C_yVLVcl.mjs";import{t as c}from"./run-BlSXngtI.mjs";import"./telemetry-jl3s2-bN.mjs";import{a as l,n as u,t as d}from"./body-parser-BKcZS9iJ.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{a as p,i as m,n as h}from"./prompt-kxvGZ6nF.mjs";var g={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/ai-controls/mcp/analytics/tool-calls/timeseries`,query:[`granularity`,`aggregate`,`tz`,`days`,`response_status`],errors:{400:`BadRequestError`}};function _(e){return e.usage(`$0 mcp portals account-tool-call-analytics
2
+ import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-BNmz58v4.mjs";import{n}from"./auth-CB9wjyad.mjs";import{a as r,t as i}from"./context-DCon1tRZ.mjs";import{t as a}from"./output-BJEgbI0G.mjs";import{t as o}from"./dry-run-gy0Hl9xo.mjs";import{t as s}from"./progress-_Jux05O5.mjs";import{t as c}from"./run-Br8sYjNF.mjs";import"./telemetry-kjElc1zT.mjs";import{a as l,n as u,t as d}from"./body-parser-BKcZS9iJ.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{a as p,i as m,n as h}from"./prompt-SNVLBS1b.mjs";var g={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/ai-controls/mcp/analytics/tool-calls/timeseries`,query:[`granularity`,`aggregate`,`tz`,`days`,`response_status`],errors:{400:`BadRequestError`}};function _(e){return e.usage(`$0 mcp portals account-tool-call-analytics
3
3
 
4
4
  Returns daily or monthly tool-call counts across the account.`).option(`granularity`,{type:`string`,description:`Granularity`,choices:[`daily`,`monthly`]}).option(`aggregate`,{type:`string`,description:`Aggregate`,choices:[`true`,`false`]}).option(`tz`,{type:`string`,description:`Tz`}).option(`days`,{type:`number`,description:`Daily trailing-window size; defaults to 7 and is ignored for monthly`}).option(`response-status`,{type:`string`,description:`Response status to count; 'all' counts every status`,choices:[`success`,`error`,`cached`,`all`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`account-tool-call-analytics`,describe:`Account-global MCP tool-call timeseries`,builder:_,handler:async e=>c({command:`mcp portals account-tool-call-analytics`,classification:{safeFlags:[`granularity`,`aggregate`,`response-status`,`dry-run`]}},e,async()=>{let c={granularity:e.granularity,aggregate:e.aggregate,tz:e.tz,days:e.days,response_status:e[`response-status`]};if(e.dryRun){let e=await r();o({command:`cf mcp portals account-tool-call-analytics`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/access/ai-controls/mcp/analytics/tool-calls/timeseries`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(g,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})};var y={method:`POST`,path:t=>e`/accounts/${t.account_id}/access/ai-controls/mcp/portals`,body:`json`,errors:{400:`BadRequestError`}};function b(e){return e.usage(`$0 mcp portals create
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CIeKNHSz.mjs";import{i as n,n as r}from"./auth-pbuzyz4C.mjs";import{a as i,t as a}from"./context-BryBS1zQ.mjs";import{t as o}from"./output-BJEgbI0G.mjs";import{t as s}from"./dry-run-gy0Hl9xo.mjs";import{t as c}from"./progress-C_yVLVcl.mjs";import{t as l}from"./run-BlSXngtI.mjs";import"./telemetry-jl3s2-bN.mjs";import{a as u,n as d,s as f,t as p}from"./body-parser-BKcZS9iJ.mjs";import{n as m}from"./input-validation-D7z60HJH.mjs";import{a as h,i as g,n as _}from"./prompt-kxvGZ6nF.mjs";var v={method:`GET`,path:t=>e`/accounts/${t.account_id}/warp_connector/${t.tunnel_id}/configurations`};function y(e){return e.usage(`$0 mesh nodes configurations get <tunnel-id>
2
+ import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-BNmz58v4.mjs";import{i as n,n as r}from"./auth-CB9wjyad.mjs";import{a as i,t as a}from"./context-DCon1tRZ.mjs";import{t as o}from"./output-BJEgbI0G.mjs";import{t as s}from"./dry-run-gy0Hl9xo.mjs";import{t as c}from"./progress-_Jux05O5.mjs";import{t as l}from"./run-Br8sYjNF.mjs";import"./telemetry-kjElc1zT.mjs";import{a as u,n as d,s as f,t as p}from"./body-parser-BKcZS9iJ.mjs";import{n as m}from"./input-validation-D7z60HJH.mjs";import{a as h,i as g,n as _}from"./prompt-SNVLBS1b.mjs";var v={method:`GET`,path:t=>e`/accounts/${t.account_id}/warp_connector/${t.tunnel_id}/configurations`};function y(e){return e.usage(`$0 mesh nodes configurations get <tunnel-id>
3
3
 
4
4
  Gets the high-availability configuration for a Mesh node.`).positional(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const b={command:`get <tunnel-id>`,describe:`Get Mesh node HA configuration`,builder:y,handler:async e=>l({command:`mesh nodes configurations get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf mesh nodes configurations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/warp_connector/${e[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(e[`tunnel-id`]))}/configurations`,pathParams:{"tunnel-id":String(e[`tunnel-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(v,{account_id:l,tunnel_id:e[`tunnel-id`]}));o(u,{successLabel:`Loaded`})})};var x={method:`PUT`,path:t=>e`/accounts/${t.account_id}/warp_connector/${t.tunnel_id}/configurations`,body:`json`};function S(e){return e.usage(`$0 mesh nodes configurations update <tunnel-id>
5
5
 
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{r as e}from"./theme-BGHWSKCw.mjs";import"./ui-Dt1-eURh.mjs";import{i as t,r as n,t as r}from"./wrangler-migration-D2HwxIG5.mjs";function i(e){return e.positional(`path`,{type:`string`,description:`Path to a Wrangler configuration file`}).option(`bundler`,{choices:[`vite`,`wrangler`],description:`Bundler to use in the migrated project (defaults to vite when @cloudflare/vite-plugin is declared, otherwise wrangler)`}).option(`dry-run`,{type:`boolean`,default:!1,description:`Show the files that would change without writing them`}).option(`force`,{type:`boolean`,default:!1,description:`Run even if the Git worktree is not clean`}).option(`install`,{type:`boolean`,default:!0,description:`Install cf as a project dependency (use --no-install to skip)`})}function a(t){console.error(e.muted(t===`vite`?`Using the Vite bundler because @cloudflare/vite-plugin is declared. Pass --bundler wrangler to override.`:`Using the Wrangler bundler because @cloudflare/vite-plugin is not declared. Pass --bundler vite to override.`))}const o={command:`migrate [path]`,describe:`Migrate a Wrangler project to cf`,builder:i,handler:async e=>{let i=await n(e.path),o=e.bundler??await r(i);e.bundler===void 0&&a(o),await t(i,{bundler:o,dryRun:e[`dry-run`],force:e.force,installDependencies:e.install})}};export{o as default};
2
+ import{r as e}from"./theme-BGHWSKCw.mjs";import"./ui-7zujR-O7.mjs";import{i as t,r as n,t as r}from"./wrangler-migration-CqSg8IDj.mjs";function i(e){return e.positional(`path`,{type:`string`,description:`Path to a Wrangler configuration file`}).option(`bundler`,{choices:[`vite`,`wrangler`],description:`Bundler to use in the migrated project (defaults to vite when @cloudflare/vite-plugin is declared, otherwise wrangler)`}).option(`dry-run`,{type:`boolean`,default:!1,description:`Show the files that would change without writing them`}).option(`force`,{type:`boolean`,default:!1,description:`Run even if the Git worktree is not clean`}).option(`install`,{type:`boolean`,default:!0,description:`Install cf as a project dependency (use --no-install to skip)`})}function a(t){console.error(e.muted(t===`vite`?`Using the Vite bundler because @cloudflare/vite-plugin is declared. Pass --bundler wrangler to override.`:`Using the Wrangler bundler because @cloudflare/vite-plugin is not declared. Pass --bundler vite to override.`))}const o={command:`migrate [path]`,describe:`Migrate a Wrangler project to cf`,builder:i,handler:async e=>{let i=await n(e.path),o=e.bundler??await r(i);e.bundler===void 0&&a(o),await t(i,{bundler:o,dryRun:e[`dry-run`],force:e.force,installDependencies:e.install})}};export{o as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CIeKNHSz.mjs";import{n}from"./auth-pbuzyz4C.mjs";import{a as r,i,t as a}from"./context-BryBS1zQ.mjs";import{t as o}from"./output-BJEgbI0G.mjs";import{t as s}from"./dry-run-gy0Hl9xo.mjs";import{t as c}from"./progress-C_yVLVcl.mjs";import{t as l}from"./run-BlSXngtI.mjs";import"./telemetry-jl3s2-bN.mjs";import{a as u,n as d,t as f}from"./body-parser-BKcZS9iJ.mjs";import{n as p}from"./input-validation-D7z60HJH.mjs";import{n as m}from"./prompt-kxvGZ6nF.mjs";var h={method:`POST`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/monetization`,body:`json`,constants:{acceptedTermsOfService:!0}};function g(e){return e.usage(`$0 monetization account-eligibility check
2
+ import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-BNmz58v4.mjs";import{n}from"./auth-CB9wjyad.mjs";import{a as r,i,t as a}from"./context-DCon1tRZ.mjs";import{t as o}from"./output-BJEgbI0G.mjs";import{t as s}from"./dry-run-gy0Hl9xo.mjs";import{t as c}from"./progress-_Jux05O5.mjs";import{t as l}from"./run-Br8sYjNF.mjs";import"./telemetry-kjElc1zT.mjs";import{a as u,n as d,t as f}from"./body-parser-BKcZS9iJ.mjs";import{n as p}from"./input-validation-D7z60HJH.mjs";import{n as m}from"./prompt-SNVLBS1b.mjs";var h={method:`POST`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/monetization`,body:`json`,constants:{acceptedTermsOfService:!0}};function g(e){return e.usage(`$0 monetization account-eligibility check
3
3
 
4
4
  Checks the account or zone for Monetization Gateway eligibility and returns its pending, approved, or rejected decision.`).option(`accepted-terms-of-service`,{type:`boolean`,description:`Confirms acceptance of the Monetization Gateway terms of service.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const _={command:`check`,describe:`Check account or zone monetization eligibility`,builder:g,handler:async e=>l({command:`monetization account-eligibility check`,classification:{safeFlags:[`accepted-terms-of-service`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await r():void 0,n=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;s({command:`cf monetization account-eligibility check`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/monetization`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i)},bodyKind:`json`,body:e.body===void 0?f({acceptedTermsOfService:e[`accepted-terms-of-service`]}):d(e.body)});return}let l=await n(e),u=e.zone===void 0?`accounts`:`zones`,p=u===`zones`?await i({zone:e.zone},l,{quiet:e.quiet}):e.local?t:await a();if(u===`zones`?e.zoneId=p:e.accountId=p,e.body){let t=d(e.body),n=await c(`Creating`,async()=>l.send(h,{body:t,account_or_zone:u,account_or_zone_id:p}));o(n,{successLabel:`Created`});return}if(e[`accepted-terms-of-service`]===void 0)throw Error(`--accepted-terms-of-service is required (or pass --body with this field set).`);let m=f({acceptedTermsOfService:e[`accepted-terms-of-service`]}),g=await c(`Creating`,async()=>l.send(h,{body:m,account_or_zone:u,account_or_zone_id:p}));o(g,{successLabel:`Created`})})};var v={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/monetization`,errors:{404:`NotFoundError`}};function y(e){return e.usage(`$0 monetization account-eligibility get
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CIeKNHSz.mjs";import{n}from"./auth-pbuzyz4C.mjs";import{a as r,t as i}from"./context-BryBS1zQ.mjs";import{t as a}from"./output-BJEgbI0G.mjs";import{t as o}from"./dry-run-gy0Hl9xo.mjs";import{t as s}from"./progress-C_yVLVcl.mjs";import{t as c}from"./run-BlSXngtI.mjs";import"./telemetry-jl3s2-bN.mjs";import{n as l,t as u}from"./body-parser-BKcZS9iJ.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{a as f,n as p}from"./prompt-kxvGZ6nF.mjs";var m={method:`POST`,path:t=>e`/accounts/${t.account_id}/teamnet/routes`,body:`json`};function h(e){return e.usage(`$0 network routes cidr create
2
+ import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-BNmz58v4.mjs";import{n}from"./auth-CB9wjyad.mjs";import{a as r,t as i}from"./context-DCon1tRZ.mjs";import{t as a}from"./output-BJEgbI0G.mjs";import{t as o}from"./dry-run-gy0Hl9xo.mjs";import{t as s}from"./progress-_Jux05O5.mjs";import{t as c}from"./run-Br8sYjNF.mjs";import"./telemetry-kjElc1zT.mjs";import{n as l,t as u}from"./body-parser-BKcZS9iJ.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{a as f,n as p}from"./prompt-SNVLBS1b.mjs";var m={method:`POST`,path:t=>e`/accounts/${t.account_id}/teamnet/routes`,body:`json`};function h(e){return e.usage(`$0 network routes cidr create
3
3
 
4
4
  Routes a private network through a Cloudflare Tunnel.`).option(`comment`,{type:`string`,description:`Optional remark describing the route.`,default:``}).option(`network`,{type:`string`,description:`The private IPv4 or IPv6 range connected by the route, in CIDR notation.`}).option(`virtual-network-id`,{type:`string`,description:`UUID of the virtual network.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const g={command:`create`,describe:`Create a tunnel route`,builder:h,handler:async e=>c({command:`network routes cidr create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf network routes cidr create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/teamnet/routes`,pathParams:{},bodyKind:`json`,body:e.body===void 0?u({comment:d(e.comment,`comment`,`text`),network:d(e.network,`network`,`text`),virtual_network_id:d(e[`virtual-network-id`],`virtual-network-id`,`text`)}):l(e.body)});return}let c=await n(e),p=e.local?t:await i();if(e.accountId=p,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(m,{body:t,account_id:p}));a(n,{successLabel:`Created`});return}e.network===void 0&&(e.network=await f(`network`,`The private IPv4 or IPv6 range connected by the route, in CIDR notation.`));let h=u({comment:d(e.comment,`comment`,`text`),network:d(e.network,`network`,`text`),virtual_network_id:d(e[`virtual-network-id`],`virtual-network-id`,`text`)}),g=await s(`Creating`,async()=>c.send(m,{body:h,account_id:p}));a(g,{successLabel:`Created`})})};var _={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/teamnet/routes/${t.route_id}`};function v(e){return e.usage(`$0 network routes cidr delete <route-id>
5
5
 
@@ -9,7 +9,7 @@ Updates an existing private network route in an account. The fields that are mea
9
9
 
10
10
  Get a private network route in an account.`).positional(`route-id`,{type:`string`,description:`UUID of the route.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ie={command:`get <route-id>`,describe:`Get tunnel route`,builder:re,handler:async e=>c({command:`network routes cidr get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf network routes cidr get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/teamnet/routes/${e[`route-id`]==null?`<route-id>`:encodeURIComponent(String(e[`route-id`]))}`,pathParams:{"route-id":String(e[`route-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(ne,{account_id:l,route_id:e[`route-id`]}));a(u,{successLabel:`Loaded`})})};var ae={method:`GET`,path:t=>e`/accounts/${t.account_id}/teamnet/routes`,query:[`comment`,`is_deleted`,`network_subset`,`network_superset`,`existed_at`,`tunnel_id`,`route_id`,`tun_types`,`virtual_network_id`,`per_page`,`page`]};function oe(e){return e.usage(`$0 network routes cidr list
11
11
 
12
- Lists and filters private network routes in an account.`).option(`comment`,{type:`string`,description:`Optional remark describing the route.`}).option(`is-deleted`,{type:`boolean`,description:"If `true`, only include deleted routes. If `false`, exclude deleted routes. If empty, all routes will be included."}).option(`network-subset`,{type:`string`,description:`If set, only list routes that are contained within this IP range.`}).option(`network-superset`,{type:`string`,description:`If set, only list routes that contain this IP range.`}).option(`existed-at`,{type:`string`,description:`If provided, include only resources that were created (and not deleted) before this time. URL encoded.`}).option(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`}).option(`route-id`,{type:`string`,description:`UUID of the route.`}).option(`tun-types`,{type:`string`,description:`The types of tunnels to filter by, separated by commas.`}).option(`virtual-network-id`,{type:`string`,description:`UUID of the virtual network.`}).option(`per-page`,{type:`number`,description:`Number of results to display.`}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const x={command:`list`,describe:`List tunnel routes`,builder:oe,handler:async e=>c({command:`network routes cidr list`,classification:{safeFlags:[`is-deleted`,`dry-run`]}},e,async()=>{let c={comment:e.comment,is_deleted:e[`is-deleted`],network_subset:e[`network-subset`],network_superset:e[`network-superset`],existed_at:e[`existed-at`],tunnel_id:e[`tunnel-id`],route_id:e[`route-id`],tun_types:e[`tun-types`],virtual_network_id:e[`virtual-network-id`],per_page:e[`per-page`],page:e.page};if(e.dryRun){let e=await r();o({command:`cf network routes cidr list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/teamnet/routes`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(ae,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})},S={command:`cidr`,describe:`Operations for routes.cidr`,builder:e=>e.command(g).command(y).command(te).command(ie).command(x).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var C={method:`POST`,path:t=>e`/accounts/${t.account_id}/zerotrust/routes/hostname`,body:`json`};function w(e){return e.usage(`$0 network routes hostname create
12
+ Lists and filters private network routes in an account.`).option(`comment`,{type:`string`,description:`Optional remark describing the route.`}).option(`is-deleted`,{type:`boolean`,description:"If `true`, only include deleted routes. If `false`, exclude deleted routes. If empty, all routes will be included."}).option(`network-subset`,{type:`string`,description:`If set, only list routes that are contained within this IP range.`}).option(`network-superset`,{type:`string`,description:`If set, only list routes that contain this IP range.`}).option(`existed-at`,{type:`string`,description:`If provided, include only resources that were created (and not deleted) before this time. URL encoded.`}).option(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`}).option(`route-id`,{type:`string`,description:`UUID of the route.`}).option(`tun-types`,{type:`string`,array:!0,description:`The types of tunnels to filter by, separated by commas.`}).option(`virtual-network-id`,{type:`string`,description:`UUID of the virtual network.`}).option(`per-page`,{type:`number`,description:`Number of results to display.`}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const x={command:`list`,describe:`List tunnel routes`,builder:oe,handler:async e=>c({command:`network routes cidr list`,classification:{safeFlags:[`is-deleted`,`dry-run`]}},e,async()=>{let c={comment:e.comment,is_deleted:e[`is-deleted`],network_subset:e[`network-subset`],network_superset:e[`network-superset`],existed_at:e[`existed-at`],tunnel_id:e[`tunnel-id`],route_id:e[`route-id`],tun_types:e[`tun-types`],virtual_network_id:e[`virtual-network-id`],per_page:e[`per-page`],page:e.page};if(e.dryRun){let e=await r();o({command:`cf network routes cidr list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/teamnet/routes`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(ae,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})},S={command:`cidr`,describe:`Operations for routes.cidr`,builder:e=>e.command(g).command(y).command(te).command(ie).command(x).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var C={method:`POST`,path:t=>e`/accounts/${t.account_id}/zerotrust/routes/hostname`,body:`json`};function w(e){return e.usage(`$0 network routes hostname create
13
13
 
14
14
  Create a hostname route.`).option(`comment`,{type:`string`,description:`An optional description of the hostname route.`}).option(`hostname`,{type:`string`,description:`The hostname of the route.`}).option(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`}).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 T={command:`create`,describe:`Create hostname route`,builder:w,handler:async e=>c({command:`network routes hostname create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf network routes hostname create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/zerotrust/routes/hostname`,pathParams:{},bodyKind:`json`,body:e.body===void 0?u({comment:d(e.comment,`comment`,`text`),hostname:d(e.hostname,`hostname`,`text`),tunnel_id:d(e[`tunnel-id`],`tunnel-id`,`text`)}):l(e.body)});return}let c=await n(e),f=e.local?t:await i();if(e.accountId=f,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(C,{body:t,account_id:f}));a(n,{successLabel:`Created`});return}let p=u({comment:d(e.comment,`comment`,`text`),hostname:d(e.hostname,`hostname`,`text`),tunnel_id:d(e[`tunnel-id`],`tunnel-id`,`text`)}),m=await s(`Creating`,async()=>c.send(C,{body:p,account_id:f}));a(m,{successLabel:`Created`})})};var E={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/zerotrust/routes/hostname/${t.hostname_route_id}`};function D(e){return e.usage(`$0 network routes hostname delete <hostname-route-id>
15
15
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CIeKNHSz.mjs";import{n}from"./auth-pbuzyz4C.mjs";import{a as r,t as i}from"./context-BryBS1zQ.mjs";import{t as a}from"./output-BJEgbI0G.mjs";import{t as o}from"./dry-run-gy0Hl9xo.mjs";import{t as s}from"./progress-C_yVLVcl.mjs";import{t as c}from"./run-BlSXngtI.mjs";import"./telemetry-jl3s2-bN.mjs";import{n as l,t as u}from"./body-parser-BKcZS9iJ.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{a as f,n as p}from"./prompt-kxvGZ6nF.mjs";var m={method:`POST`,path:t=>e`/accounts/${t.account_id}/cni/cnis`,body:`json`,errors:{400:`BadRequestError`,409:`ConflictError`,500:`InternalServerError`}};function h(e){return e.usage(`$0 network-interconnects cnis create
2
+ import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-BNmz58v4.mjs";import{n}from"./auth-CB9wjyad.mjs";import{a as r,t as i}from"./context-DCon1tRZ.mjs";import{t as a}from"./output-BJEgbI0G.mjs";import{t as o}from"./dry-run-gy0Hl9xo.mjs";import{t as s}from"./progress-_Jux05O5.mjs";import{t as c}from"./run-Br8sYjNF.mjs";import"./telemetry-kjElc1zT.mjs";import{n as l,t as u}from"./body-parser-BKcZS9iJ.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{a as f,n as p}from"./prompt-SNVLBS1b.mjs";var m={method:`POST`,path:t=>e`/accounts/${t.account_id}/cni/cnis`,body:`json`,errors:{400:`BadRequestError`,409:`ConflictError`,500:`InternalServerError`}};function h(e){return e.usage(`$0 network-interconnects cnis create
3
3
 
4
4
  Creates a new Cloud Network Interconnect (CNI) for private network connectivity between Cloudflare and your infrastructure. CNIs enable dedicated, high-performance network links.`).option(`account`,{type:`string`,description:`Customer account tag`}).option(`bgp-customer-asn`,{type:`number`,description:`ASN used on the customer end of the BGP session`}).option(`bgp-extra-prefixes`,{type:`string`,array:!0,description:`Extra set of static prefixes to advertise to the customer's end of the session
5
5
  Prefixes containing host bits will be normalized to contain network bits only.
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CIeKNHSz.mjs";import{n}from"./auth-pbuzyz4C.mjs";import{a as r,i,t as a}from"./context-BryBS1zQ.mjs";import{t as o}from"./output-BJEgbI0G.mjs";import{t as s}from"./dry-run-gy0Hl9xo.mjs";import{t as c}from"./progress-C_yVLVcl.mjs";import{t as l}from"./run-BlSXngtI.mjs";import"./telemetry-jl3s2-bN.mjs";import{a as u,n as d,r as f,t as p}from"./body-parser-BKcZS9iJ.mjs";import{n as m}from"./input-validation-D7z60HJH.mjs";import{a as h,i as g,n as _}from"./prompt-kxvGZ6nF.mjs";var ee={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/observability/agents/sessions`,query:[`service`,`agent`,`from`,`to`,`cursor`,`per_page`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,429:`TooManyRequestsError`,500:`InternalServerError`,504:`GatewayTimeoutError`}};function te(e){return e.usage(`$0 o11y agents sessions list
2
+ import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-BNmz58v4.mjs";import{n}from"./auth-CB9wjyad.mjs";import{a as r,i,t as a}from"./context-DCon1tRZ.mjs";import{t as o}from"./output-BJEgbI0G.mjs";import{t as s}from"./dry-run-gy0Hl9xo.mjs";import{t as c}from"./progress-_Jux05O5.mjs";import{t as l}from"./run-Br8sYjNF.mjs";import"./telemetry-kjElc1zT.mjs";import{a as u,n as d,r as f,t as p}from"./body-parser-BKcZS9iJ.mjs";import{n as m}from"./input-validation-D7z60HJH.mjs";import{a as h,i as g,n as _}from"./prompt-SNVLBS1b.mjs";var ee={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/observability/agents/sessions`,query:[`service`,`agent`,`from`,`to`,`cursor`,`per_page`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,429:`TooManyRequestsError`,500:`InternalServerError`,504:`GatewayTimeoutError`}};function te(e){return e.usage(`$0 o11y agents sessions list
3
3
 
4
4
  Lists sessions in which the specified agent participated, ordered by most recent activity. A session is identified by gen_ai.conversation.id and includes authorized activity from every agent in that conversation during the requested time range. Agent invocation and chat spans without a conversation ID are attributed only when their trace is associated with exactly one observed conversation.`).option(`service`,{type:`string`,description:`Worker service name associated with the participating agent.`,demandOption:!0}).option(`agent`,{type:`string`,description:`Agent name reported in gen_ai.agent.name. The request is limited to conversations in which this service and agent participated.`,demandOption:!0}).option(`from`,{type:`number`,description:`Start of the requested time range, as Unix epoch milliseconds. Values earlier than the 7-day retention boundary are clamped.`,demandOption:!0}).option(`to`,{type:`number`,description:`End of the requested time range, as Unix epoch milliseconds. Must be later than from.`,demandOption:!0}).option(`cursor`,{type:`string`,description:`Opaque cursor from result_info.cursors.after in the previous response.`}).option(`per-page`,{type:`number`,description:`Maximum number of items to return. Defaults to 20 and cannot exceed 100.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`list`,describe:`List Agent sessions`,builder:te,handler:async e=>l({command:`o11y agents sessions list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let i={service:e.service,agent:e.agent,from:e.from,to:e.to,cursor:e.cursor,per_page:e[`per-page`]};if(e.dryRun){let e=await r();s({command:`cf o11y agents sessions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workers/observability/agents/sessions`,pathParams:{},query:i,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(ee,{account_id:u,...i}));o(d,{successLabel:`Loaded`})})};var y={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/observability/agents/sessions/${t.conversationId}/runs`,query:[`service`,`agent`,`from`,`to`,`cursor`,`per_page`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,429:`TooManyRequestsError`,500:`InternalServerError`,504:`GatewayTimeoutError`}};function b(e){return e.usage(`$0 o11y agents sessions runs <conversationId>
5
5
 
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- export{n as getActiveAccountId,a as getOrSelectAccountId,l as isTemporaryAccountRequested,p as requireTemporaryAccount,m as resolveProfile,_ as setTemporaryAccountRequested}from"./oauth-DetIFT59.mjs";
2
+ export{n as getActiveAccountId,a as getOrSelectAccountId,l as isTemporaryAccountRequested,p as requireTemporaryAccount,m as resolveProfile,_ as setTemporaryAccountRequested}from"./oauth-nDH3nTCa.mjs";
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CIeKNHSz.mjs";import{n}from"./auth-pbuzyz4C.mjs";import{a as r,t as i}from"./context-BryBS1zQ.mjs";import{t as a}from"./output-BJEgbI0G.mjs";import{t as o}from"./dry-run-gy0Hl9xo.mjs";import{t as s}from"./progress-C_yVLVcl.mjs";import{t as c}from"./run-BlSXngtI.mjs";import"./telemetry-jl3s2-bN.mjs";import{n as l,t as u}from"./body-parser-BKcZS9iJ.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{a as f,i as p,n as m}from"./prompt-kxvGZ6nF.mjs";var h={method:`POST`,path:t=>e`/accounts/${t.account_id}/oauth_clients`,body:`json`};function g(e){return e.usage(`$0 oauth-clients create
2
+ import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-BNmz58v4.mjs";import{n}from"./auth-CB9wjyad.mjs";import{a as r,t as i}from"./context-DCon1tRZ.mjs";import{t as a}from"./output-BJEgbI0G.mjs";import{t as o}from"./dry-run-gy0Hl9xo.mjs";import{t as s}from"./progress-_Jux05O5.mjs";import{t as c}from"./run-Br8sYjNF.mjs";import"./telemetry-kjElc1zT.mjs";import{n as l,t as u}from"./body-parser-BKcZS9iJ.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{a as f,i as p,n as m}from"./prompt-SNVLBS1b.mjs";var h={method:`POST`,path:t=>e`/accounts/${t.account_id}/oauth_clients`,body:`json`};function g(e){return e.usage(`$0 oauth-clients create
3
3
 
4
4
  Create a new OAuth client for an account.`).option(`allowed-cors-origins`,{type:`string`,array:!0,description:`Array of allowed CORS origins.`}).option(`client-name`,{type:`string`,description:`Human-readable name of the OAuth client.`}).option(`client-uri`,{type:`string`,description:`URL of the home page of the client.`}).option(`grant-types`,{type:`string`,array:!0,description:"Array of OAuth grant types the client is allowed to use. `authorization_code` is required; `refresh_token` may be included optionally."}).option(`logo-uri`,{type:`string`,description:`URL of the client's logo.`}).option(`optional-scopes`,{type:`string`,array:!0,description:"Scopes that the authorizing user may decline during consent. Each value must also appear in `scopes`. The scopes `openid`, `offline`, and `offline_access` cannot be optional."}).option(`policy-uri`,{type:`string`,description:`URL that points to a privacy policy document.`}).option(`post-logout-redirect-uris`,{type:`string`,array:!0,description:`Array of allowed post-logout redirect URIs.`}).option(`redirect-uris`,{type:`string`,array:!0,description:`Array of allowed redirect URIs for the client.`}).option(`response-types`,{type:`string`,array:!0,description:`Array of OAuth response types the client is allowed to use.`}).option(`scopes`,{type:`string`,array:!0,description:"Array of OAuth scopes the client is allowed to request. Colon-delimited scopes are not accepted. Dot-delimited scopes are validated against available OAuth API scopes; simple identity scopes are allowed. Protocol scopes `offline_access` and `openid` are added or removed automatically based on `grant_types` and `response_types`."}).option(`token-endpoint-auth-method`,{type:`string`,description:`The authentication method the client uses at the token endpoint.`,choices:[`none`,`client_secret_basic`,`client_secret_post`]}).coerce(`token-endpoint-auth-method`,e=>d(e,`token-endpoint-auth-method`,`text`)).option(`tos-uri`,{type:`string`,description:`URL that points to a terms of service document.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const _={command:`create`,describe:`Create OAuth Client`,builder:g,handler:async e=>c({command:`oauth-clients create`,classification:{safeFlags:[`token-endpoint-auth-method`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf oauth-clients create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/oauth_clients`,pathParams:{},bodyKind:`json`,body:e.body===void 0?u({allowed_cors_origins:e[`allowed-cors-origins`],client_name:d(e[`client-name`],`client-name`,`text`),client_uri:d(e[`client-uri`],`client-uri`,`text`),grant_types:e[`grant-types`],logo_uri:d(e[`logo-uri`],`logo-uri`,`text`),optional_scopes:e[`optional-scopes`],policy_uri:d(e[`policy-uri`],`policy-uri`,`text`),post_logout_redirect_uris:e[`post-logout-redirect-uris`],redirect_uris:e[`redirect-uris`],response_types:e[`response-types`],scopes:e.scopes,token_endpoint_auth_method:e[`token-endpoint-auth-method`],tos_uri:d(e[`tos-uri`],`tos-uri`,`text`)}):l(e.body)});return}let c=await n(e),m=e.local?t:await i();if(e.accountId=m,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(h,{body:t,account_id:m}));a(n,{successLabel:`Created`});return}if(e[`client-name`]===void 0&&(e[`client-name`]=await f(`client-name`,`Human-readable name of the OAuth client.`)),e[`grant-types`]===void 0)throw Error(`--grant-types is required (or pass --body with this field set).`);if(e[`redirect-uris`]===void 0)throw Error(`--redirect-uris is required (or pass --body with this field set).`);if(e[`response-types`]===void 0)throw Error(`--response-types is required (or pass --body with this field set).`);if(e.scopes===void 0)throw Error(`--scopes is required (or pass --body with this field set).`);e[`token-endpoint-auth-method`]===void 0&&(e[`token-endpoint-auth-method`]=await p(`token-endpoint-auth-method`,`The authentication method the client uses at the token endpoint.`,[`none`,`client_secret_basic`,`client_secret_post`]));let g=u({allowed_cors_origins:e[`allowed-cors-origins`],client_name:d(e[`client-name`],`client-name`,`text`),client_uri:d(e[`client-uri`],`client-uri`,`text`),grant_types:e[`grant-types`],logo_uri:d(e[`logo-uri`],`logo-uri`,`text`),optional_scopes:e[`optional-scopes`],policy_uri:d(e[`policy-uri`],`policy-uri`,`text`),post_logout_redirect_uris:e[`post-logout-redirect-uris`],redirect_uris:e[`redirect-uris`],response_types:e[`response-types`],scopes:e.scopes,token_endpoint_auth_method:e[`token-endpoint-auth-method`],tos_uri:d(e[`tos-uri`],`tos-uri`,`text`)}),_=await s(`Creating`,async()=>c.send(h,{body:g,account_id:m}));a(_,{successLabel:`Created`})})};var v={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/oauth_clients/${t.oauth_client_id}/rotate_secret`};function y(e){return e.usage(`$0 oauth-clients delete-rotated-secret <oauth-client-id>
5
5
 
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import{r as e}from"./theme-BGHWSKCw.mjs";import{t}from"./args-BAOHroBC.mjs";import{t as n}from"./cli-exit-CstFZ1eJ.mjs";import{n as r,t as i}from"./version-Bz705iJe.mjs";import{n as a}from"./blocks-DmOx-xEv.mjs";import{t as o}from"./session-X3xaW70I.mjs";import{t as s}from"./errors-CIQDUrWg.mjs";import{n as c,t as l}from"./project-settings-nBMEx1f-.mjs";import{a as u,n as d,o as f,t as p}from"./cf-CInFH4Ng.mjs";import{c as m,i as h,l as g,o as _}from"./log-BWdaOGOW.mjs";import{n as v}from"./context-BryBS1zQ.mjs";import{n as y}from"./interactive-wQM7Blhm.mjs";import{i as b}from"./dialog-D5lus4M4.mjs";import{relative as x}from"node:path";function S(t,n={}){let{cwd:r=process.cwd(),output:i=process.stderr}=n,o=n.columns??(i.columns||80),s=c(r),u=s?x(r,s):l,d=s?`To make this the project's default account, add accountId to ${u}:`:`To make this the project's default account, create ${u}:`,f=/* @__PURE__ */ new Set([`accountId`,u]),p=a(d,Math.max(20,o-3)).map(t=>t.split(` `).map(t=>{let n=t.replace(/:$/,``);return f.has(n)?`${e.code(n)}${t.slice(n.length)}`:t}).join(` `));h.info(p.join(`
2
+ import{r as e}from"./theme-BGHWSKCw.mjs";import{t}from"./args-BAOHroBC.mjs";import{t as n}from"./cli-exit-CstFZ1eJ.mjs";import{n as r,t as i}from"./version-DIIJ2ixL.mjs";import{n as a}from"./blocks-D2tE8dp2.mjs";import{t as o}from"./session-B7vOqdZU.mjs";import{t as s}from"./errors-CCFmptqJ.mjs";import{n as c,t as l}from"./project-settings-nBMEx1f-.mjs";import{n as u,o as d,r as f,s as p}from"./cf-DgLg6Hop.mjs";import{c as m,i as h,l as g,o as _}from"./log-BWdaOGOW.mjs";import{n as v}from"./context-DCon1tRZ.mjs";import{n as y}from"./interactive-wQM7Blhm.mjs";import{i as b}from"./dialog-D5lus4M4.mjs";import{relative as x}from"node:path";function S(t,n={}){let{cwd:r=process.cwd(),output:i=process.stderr}=n,o=n.columns??(i.columns||80),s=c(r),u=s?x(r,s):l,d=s?`To make this the project's default account, add accountId to ${u}:`:`To make this the project's default account, create ${u}:`,f=/* @__PURE__ */ new Set([`accountId`,u]),p=a(d,Math.max(20,o-3)).map(t=>t.split(` `).map(t=>{let n=t.replace(/:$/,``);return f.has(n)?`${e.code(n)}${t.slice(n.length)}`:t}).join(` `));h.info(p.join(`
3
3
  `),{output:i});let m=`accountId: ${e.jsonString(JSON.stringify(t))},`,g=s?[m]:[`import { defineConfig } from "cf/config";`,``,`export default defineConfig({`,` ${m}`,`});`],_=` `.repeat(3);i.write(`\n${g.map(e=>e&&_+e).join(`
4
- `)}\n\n`)}const C={debug:(...e)=>{process.env.DEBUG&&console.error(...e)},info:(...e)=>console.error(...e),log:(...e)=>console.error(...e),warn:(...e)=>console.error(...e),error:(...e)=>console.error(...e)};var w=class extends Error{};async function T(e){if(y())throw new w;o(r);let t=await m({message:b(e),output:process.stderr});if(g(t)||typeof t!=`string`)throw new n(130,{cancelled:!0});return t}async function E(e,i){if(y())throw new w;o(r);let a=await _({message:e,output:process.stderr,options:i.choices.map(({title:e,value:t})=>({label:e,value:t}))});if(g(a)||typeof a!=`string`)throw new n(130,{cancelled:!0});return t()||S(a),a}const D=p({logger:C,userAgent:i,prompt:T,select:E,isNoDefaultValueProvidedError:e=>e instanceof w});let O=!1;function k(e,t){O=e,D.setTemporaryAllowed(e,t)}function A(){return O}async function j(e){if(!A())throw Error(`Temporary accounts require --temporary-account.`);try{let t=await D.requireAuth({compliance_region:e?.complianceRegion??await v(e)}),{apiToken:n}=D.requireApiToken();return{accountId:t,apiToken:n}}catch(e){throw e instanceof Error&&(e.message=e.message.replaceAll(/--temporary(?!-account)/g,`--temporary-account`)),e}}async function M(e,t){try{return await D.getOrSelectAccountId({account_id:e,compliance_region:t?.complianceRegion??await v(t)})}catch(e){throw e instanceof Error&&!(`reason`in e)&&`telemetryMessage`in e&&e.telemetryMessage===`cfetch auth login required`&&y()&&D.getAPIToken()===void 0?new s(e.message,{cause:e}):e}}function N(){return D.getActiveAccountId({})}async function P(){return D.fetchAllAccounts({compliance_region:await v()},{throwOnEmpty:!1})}async function F(e){if(e?.scopes&&!f(e.scopes))throw Error(`One or more of the requested scopes are not valid cf OAuth scopes.`);return D.login({compliance_region:await v()},{browser:e?.browser??!0,device:e?.device??!0,...e?.scopes&&{scopes:e.scopes},...e?.profile&&{profile:e.profile}})}function I(e){return D.logout(e)}function L(e){D.setProfile(e)}function R(e){u(e,{logger:C,getCredentialStore:()=>D.getCredentialStore()})}function z(){return D.getActiveProfile()}function B(){return d({logger:C})}function V(e,t=process.cwd()){let n=B().resolve({profile:e,cwd:t});return L(n),n}function H(){return D.getOAuthTokenFromLocalState()}function U(){return D.readAuthCredentials()?.oauth_token!==void 0}function W(){return D.readAuthCredentials()}function G(){return D.getCredentialStore().path()}export{k as _,M as a,U as c,I as d,W as f,L as g,R as h,G as i,A as l,V as m,N as n,B as o,j as p,z as r,H as s,P as t,F as u};
4
+ `)}\n\n`)}const C={debug:(...e)=>{process.env.DEBUG&&console.error(...e)},info:(...e)=>console.error(...e),log:(...e)=>console.error(...e),warn:(...e)=>console.error(...e),error:(...e)=>console.error(...e)};var w=class extends Error{};async function T(e){if(y())throw new w;o(r);let t=await m({message:b(e),output:process.stderr});if(g(t)||typeof t!=`string`)throw new n(130,{cancelled:!0});return t}async function E(e,i){if(y())throw new w;o(r);let a=await _({message:e,output:process.stderr,options:i.choices.map(({title:e,value:t})=>({label:e,value:t}))});if(g(a)||typeof a!=`string`)throw new n(130,{cancelled:!0});return t()||S(a),a}const D=u({logger:C,userAgent:i,prompt:T,select:E,isNoDefaultValueProvidedError:e=>e instanceof w});let O=!1;function k(e,t){O=e,D.setTemporaryAllowed(e,t)}function A(){return O}async function j(e){if(!A())throw Error(`Temporary accounts require --temporary-account.`);try{let t=await D.requireAuth({compliance_region:e?.complianceRegion??await v(e)}),{apiToken:n}=D.requireApiToken();return{accountId:t,apiToken:n}}catch(e){throw e instanceof Error&&(e.message=e.message.replaceAll(/--temporary(?!-account)/g,`--temporary-account`)),e}}async function M(e,t){try{return await D.getOrSelectAccountId({account_id:e,compliance_region:t?.complianceRegion??await v(t)})}catch(e){throw e instanceof Error&&!(`reason`in e)&&`telemetryMessage`in e&&e.telemetryMessage===`cfetch auth login required`&&y()&&D.getAPIToken()===void 0?new s(e.message,{cause:e}):e}}function N(){return D.getActiveAccountId({})}async function P(){return D.fetchAllAccounts({compliance_region:await v()},{throwOnEmpty:!1})}async function F(e){if(e?.scopes&&!p(e.scopes))throw Error(`One or more of the requested scopes are not valid cf OAuth scopes.`);return D.login({compliance_region:await v()},{browser:e?.browser??!0,device:e?.device??!0,...e?.scopes&&{scopes:e.scopes},...e?.profile&&{profile:e.profile}})}function I(e){return D.logout(e)}function L(e){D.setProfile(e)}function R(e){d(e,{logger:C,getCredentialStore:()=>D.getCredentialStore()})}function z(){return D.getActiveProfile()}function B(){return f({logger:C})}function V(e,t=process.cwd()){let n=B().resolve({profile:e,cwd:t});return L(n),n}function H(){return D.getOAuthTokenFromLocalState()}function U(){return D.readAuthCredentials()?.oauth_token!==void 0}function W(){return D.readAuthCredentials()}function G(){return D.getCredentialStore().path()}export{k as _,M as a,U as c,I as d,W as f,L as g,R as h,G as i,A as l,V as m,N as n,B as o,j as p,z as r,H as s,P as t,F as u};
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env node
2
+ import{t as e}from"./list-ByCv9-Fl.mjs";import{n as t}from"./auth-CB9wjyad.mjs";import{t as n}from"./output-BJEgbI0G.mjs";import{t as r}from"./dry-run-gy0Hl9xo.mjs";import{t as i}from"./progress-_Jux05O5.mjs";import{t as a}from"./run-Br8sYjNF.mjs";import"./telemetry-kjElc1zT.mjs";function o(e){return e.usage(`$0 oauth-scopes list
3
+
4
+ List all available OAuth scopes. This endpoint requires authentication but has no authorization role requirements.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const s={command:`list`,describe:`List OAuth Scopes`,builder:o,handler:async o=>a({command:`oauth-scopes list`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf oauth-scopes list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/oauth/scopes`,pathParams:{},bodyKind:`none`});return}let a=await t(o),s=await i(`Loading`,async()=>a.send(e));n(s,{successLabel:`Loaded`})})},c={command:`oauth-scopes`,describe:`oauth-scopes`,builder:e=>e.command(s).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{c as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-pbuzyz4C.mjs";import{t as n}from"./output-BJEgbI0G.mjs";import{t as r}from"./dry-run-gy0Hl9xo.mjs";import{t as i}from"./progress-C_yVLVcl.mjs";import{t as a}from"./run-BlSXngtI.mjs";import"./telemetry-jl3s2-bN.mjs";import{a as o,n as s,t as c}from"./body-parser-BKcZS9iJ.mjs";import{n as l}from"./input-validation-D7z60HJH.mjs";import{a as u,i as d,n as f}from"./prompt-kxvGZ6nF.mjs";var p={method:`GET`,path:t=>e`/organizations/${t.organization_id}/accounts`,query:[`account_pubname`,`account_pubname.startsWith`,`account_pubname.endsWith`,`account_pubname.contains`,`name`,`name.startsWith`,`name.endsWith`,`name.contains`,`order_by`,`direction`,`include_tags`,`include_total`,`page_token`,`page_size`],joined:[`account_pubname`,`account_pubname.startsWith`,`account_pubname.endsWith`,`account_pubname.contains`,`name`,`name.startsWith`,`name.endsWith`,`name.contains`,`order_by`,`direction`,`include_tags`,`include_total`,`page_token`,`page_size`]};function m(e){return e.usage(`$0 organization account list
2
+ import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-CB9wjyad.mjs";import{t as n}from"./output-BJEgbI0G.mjs";import{t as r}from"./dry-run-gy0Hl9xo.mjs";import{t as i}from"./progress-_Jux05O5.mjs";import{t as a}from"./run-Br8sYjNF.mjs";import"./telemetry-kjElc1zT.mjs";import{a as o,n as s,t as c}from"./body-parser-BKcZS9iJ.mjs";import{n as l}from"./input-validation-D7z60HJH.mjs";import{a as u,i as d,n as f}from"./prompt-SNVLBS1b.mjs";var p={method:`GET`,path:t=>e`/organizations/${t.organization_id}/accounts`,query:[`account_pubname`,`account_pubname.startsWith`,`account_pubname.endsWith`,`account_pubname.contains`,`name`,`name.startsWith`,`name.endsWith`,`name.contains`,`order_by`,`direction`,`include_tags`,`include_total`,`page_token`,`page_size`],joined:[`account_pubname`,`account_pubname.startsWith`,`account_pubname.endsWith`,`account_pubname.contains`,`name`,`name.startsWith`,`name.endsWith`,`name.contains`,`order_by`,`direction`,`include_tags`,`include_total`,`page_token`,`page_size`]};function m(e){return e.usage(`$0 organization account list
3
3
 
4
4
  Retrieve the accounts immediately attached to a specific organization. Accounts attached to sub-organizations are not included.`).option(`organization-id`,{type:`string`,description:`The ID of the organization to retrieve a list of accounts for.`,demandOption:!0}).option(`account-pubname`,{type:`string`,description:`(case-insensitive) Filter the list of accounts to where the account_pubname is equal to
5
5
  a particular string.`}).option(`account-pubname-starts-with`,{type:`string`,description:`(case-insensitive) Filter the list of accounts to where the account_pubname starts with
@@ -27,7 +27,7 @@ Retrieve the details of a certain organization.`).positional(`organization-id`,{
27
27
 
28
28
  Accept or reject an invitation to a specific organization. The credential must belong to the invited user. No additional API token permission is required.`).positional(`member-code`,{type:`string`,description:`The invitation code to accept or reject.`,demandOption:!0}).option(`organization-id`,{type:`string`,description:`The ID of the organization associated with the invitation.`,demandOption:!0}).option(`status`,{type:`string`,description:`The status field`,choices:[`accept`,`reject`]}).coerce(`status`,e=>l(e,`status`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:"The invitation action. Use `accept` to join the organization or `reject` to decline the invitation."})}const E={command:`update <member-code>`,describe:`Handle organization invite`,builder:T,handler:async e=>a({command:`organization invite update`,classification:{safeFlags:[`status`,`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf organization invite update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/organizations/${e[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(e[`organization-id`]))}/invites/${e[`member-code`]==null?`<member-code>`:encodeURIComponent(String(e[`member-code`]))}`,pathParams:{"organization-id":String(e[`organization-id`]??``),"member-code":String(e[`member-code`]??``)},bodyKind:`json`,body:e.body===void 0?c({status:e.status}):s(e.body)});return}let a=await t(e);if(e.body){let t=s(e.body),r=await i(`Updating`,async()=>a.send(w,{body:t,organization_id:e[`organization-id`],member_code:e[`member-code`]}));n(r,{successLabel:`Updated`});return}e.status===void 0&&(e.status=await d(`status`,`The status field`,[`accept`,`reject`]));let o=c({status:e.status}),l=await i(`Updating`,async()=>a.send(w,{body:o,organization_id:e[`organization-id`],member_code:e[`member-code`]}));n(l,{successLabel:`Updated`})})},D={command:`invite`,describe:`Operations for invite`,builder:e=>e.command(E).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var O={method:`GET`,path:()=>`/organizations`,query:[`id`,`name`,`name.startsWith`,`name.endsWith`,`name.contains`,`containing.account`,`containing.user`,`containing.organization`,`parent.id`,`page_token`,`page_size`],joined:[`id`,`name`,`name.startsWith`,`name.endsWith`,`name.contains`,`containing.account`,`containing.user`,`containing.organization`,`parent.id`,`page_token`,`page_size`]};function k(e){return e.usage(`$0 organization list
29
29
 
30
- Retrieve a list of organizations a particular user has access to.`).option(`id`,{type:`string`,description:`Only return organizations with the specified IDs (ex. id=foo&id=bar). Send multiple elements
30
+ Retrieve a list of organizations a particular user has access to.`).option(`id`,{type:`string`,array:!0,description:`Only return organizations with the specified IDs (ex. id=foo&id=bar). Send multiple elements
31
31
  by repeating the query value.`}).option(`name`,{type:`string`,description:`(case-sensitive) Filter the list of organizations to where the name is equal to a
32
32
  particular string.`}).option(`name-starts-with`,{type:`string`,description:`(case-insensitive) Filter the list of organizations to where the name starts with a
33
33
  particular string.`}).option(`name-ends-with`,{type:`string`,description:`(case-insensitive) Filter the list of organizations to where the name ends with a particular
@@ -58,7 +58,7 @@ Delete a membership to a particular Organization.`).positional(`member-id`,{type
58
58
 
59
59
  Retrieve a single membership from an Organization.`).positional(`member-id`,{type:`string`,description:`Organization Member ID`,demandOption:!0}).option(`organization-id`,{type:`string`,description:`Organization ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const H={command:`get <member-id>`,describe:`Get organization member`,builder:V,handler:async e=>a({command:`organization member get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf organization member get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/organizations/${e[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(e[`organization-id`]))}/members/${e[`member-id`]==null?`<member-id>`:encodeURIComponent(String(e[`member-id`]))}`,pathParams:{"organization-id":String(e[`organization-id`]??``),"member-id":String(e[`member-id`]??``)},bodyKind:`none`});return}let a=await t(e),o=await i(`Loading`,async()=>a.send(B,{organization_id:e[`organization-id`],member_id:e[`member-id`]}));n(o,{successLabel:`Loaded`})})};var U={method:`GET`,path:t=>e`/organizations/${t.organization_id}/members`,query:[`status`,`user.email`,`user.email.contains`,`user.email.startsWith`,`user.email.endsWith`,`page_token`,`page_size`],joined:[`user.email`,`user.email.contains`,`user.email.startsWith`,`user.email.endsWith`,`page_token`,`page_size`]};function W(e){return e.usage(`$0 organization member list
60
60
 
61
- List memberships for an Organization.`).option(`organization-id`,{type:`string`,description:`Organization ID`,demandOption:!0}).option(`status`,{type:`string`,description:`Filter the list of memberships by membership status.`}).option(`user-email`,{type:`string`,description:`Filter the list of memberships for a specific email.`}).option(`user-email-contains`,{type:`string`,description:`Filter the list of memberships for a specific email that contains a substring.`}).option(`user-email-starts-with`,{type:`string`,description:`Filter the list of memberships for a specific email that starts with a substring.`}).option(`user-email-ends-with`,{type:`string`,description:`Filter the list of memberships for a specific email that ends with a substring.`}).option(`page-token`,{type:`string`,description:`An opaque token returned from the last list response that when
61
+ List memberships for an Organization.`).option(`organization-id`,{type:`string`,description:`Organization ID`,demandOption:!0}).option(`status`,{type:`string`,array:!0,description:`Filter the list of memberships by membership status.`}).option(`user-email`,{type:`string`,description:`Filter the list of memberships for a specific email.`}).option(`user-email-contains`,{type:`string`,description:`Filter the list of memberships for a specific email that contains a substring.`}).option(`user-email-starts-with`,{type:`string`,description:`Filter the list of memberships for a specific email that starts with a substring.`}).option(`user-email-ends-with`,{type:`string`,description:`Filter the list of memberships for a specific email that ends with a substring.`}).option(`page-token`,{type:`string`,description:`An opaque token returned from the last list response that when
62
62
  provided will retrieve the next page.
63
63
 
64
64
  Parameters used to filter the retrieved list must remain in subsequent
@@ -68,6 +68,6 @@ Get an organizations profile if it exists.`).positional(`organization-id`,{type:
68
68
 
69
69
  Modify organization profile.`).positional(`organization-id`,{type:`string`,description:`Organization ID`,demandOption:!0}).option(`business-address`,{type:`string`,description:`The business_address field`}).option(`business-email`,{type:`string`,description:`The business_email field`}).option(`business-name`,{type:`string`,description:`The business_name field`}).option(`business-phone`,{type:`string`,description:`The business_phone field`}).option(`external-metadata`,{type:`string`,description:`The external_metadata field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const re={command:`update <organization-id>`,describe:`Modify organization profile.`,builder:Z,handler:async e=>a({command:`organization profile update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf organization profile update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/organizations/${e[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(e[`organization-id`]))}/profile`,pathParams:{"organization-id":String(e[`organization-id`]??``)},bodyKind:`json`,body:e.body===void 0?c({business_address:l(e[`business-address`],`business-address`,`text`),business_email:l(e[`business-email`],`business-email`,`text`),business_name:l(e[`business-name`],`business-name`,`text`),business_phone:l(e[`business-phone`],`business-phone`,`text`),external_metadata:l(e[`external-metadata`],`external-metadata`,`text`)}):s(e.body)});return}let a=await t(e);if(e.body){let t=s(e.body),r=await i(`Updating`,async()=>a.send(X,{body:t,organization_id:e[`organization-id`]}));n(r,{successLabel:`Updated`});return}e[`business-address`]===void 0&&(e[`business-address`]=await u(`business-address`,`The business_address field`)),e[`business-email`]===void 0&&(e[`business-email`]=await u(`business-email`,`The business_email field`)),e[`business-name`]===void 0&&(e[`business-name`]=await u(`business-name`,`The business_name field`)),e[`business-phone`]===void 0&&(e[`business-phone`]=await u(`business-phone`,`The business_phone field`)),e[`external-metadata`]===void 0&&(e[`external-metadata`]=await u(`external-metadata`,`The external_metadata field`));let o=c({business_address:l(e[`business-address`],`business-address`,`text`),business_email:l(e[`business-email`],`business-email`,`text`),business_name:l(e[`business-name`],`business-name`,`text`),business_phone:l(e[`business-phone`],`business-phone`,`text`),external_metadata:l(e[`external-metadata`],`external-metadata`,`text`)}),d=await i(`Updating`,async()=>a.send(X,{body:o,organization_id:e[`organization-id`]}));n(d,{successLabel:`Updated`})})},ie={command:`profile`,describe:`Operations for profile`,builder:e=>e.command(Y).command(re).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ae={method:`GET`,path:t=>e`/organizations/${t.organization_id}/shares`,query:[`status`,`kind`,`target_type`,`resource_types`,`order`,`direction`,`page`,`per_page`]};function oe(e){return e.usage(`$0 organization share list
70
70
 
71
- Lists all organization shares.`).option(`organization-id`,{type:`string`,description:`Organization identifier.`,demandOption:!0}).option(`status`,{type:`string`,description:`Filter shares by status.`,choices:[`active`,`deleting`,`deleted`]}).option(`kind`,{type:`string`,description:`Filter shares by kind.`,choices:[`sent`,`received`]}).option(`target-type`,{type:`string`,description:`Filter shares by target_type.`,choices:[`account`,`organization`]}).option(`resource-types`,{type:`string`,description:`Filter share resources by resource_types.`}).option(`order`,{type:`string`,description:`Order shares by values in the given field.`,choices:[`name`,`created`]}).option(`direction`,{type:`string`,description:`Direction to sort objects.`,choices:[`asc`,`desc`]}).option(`page`,{type:`number`,description:"Page number. Defaults to `1` when `per_page` is supplied without\n`page`. May be omitted entirely along with `per_page` to receive a\nnon-paginated response."}).option(`per-page`,{type:`number`,description:"Number of objects to return per page. Defaults to `20` when `page` is supplied without `per_page`. May be omitted entirely along with `page` to receive a non-paginated response."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const se={command:`list`,describe:`List organization shares`,builder:oe,handler:async e=>a({command:`organization share list`,classification:{safeFlags:[`status`,`kind`,`target-type`,`order`,`direction`,`dry-run`]}},e,async()=>{let a={status:e.status,kind:e.kind,target_type:e[`target-type`],resource_types:e[`resource-types`],order:e.order,direction:e.direction,page:e.page,per_page:e[`per-page`]};if(e.dryRun){r({command:`cf organization share list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/organizations/${e[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(e[`organization-id`]))}/shares`,pathParams:{"organization-id":String(e[`organization-id`]??``)},query:a,bodyKind:`none`});return}let o=await t(e),s=await i(`Loading`,async()=>o.send(ae,{organization_id:e[`organization-id`],...a}));n(s,{successLabel:`Loaded`})})},Q={command:`share`,describe:`Operations for share`,builder:e=>e.command(se).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var $={method:`PUT`,path:t=>e`/organizations/${t.organization_id}`,body:`json`};function ce(e){return e.usage(`$0 organization update <organization-id>
71
+ Lists all organization shares.`).option(`organization-id`,{type:`string`,description:`Organization identifier.`,demandOption:!0}).option(`status`,{type:`string`,description:`Filter shares by status.`,choices:[`active`,`deleting`,`deleted`]}).option(`kind`,{type:`string`,description:`Filter shares by kind.`,choices:[`sent`,`received`]}).option(`target-type`,{type:`string`,description:`Filter shares by target_type.`,choices:[`account`,`organization`]}).option(`resource-types`,{type:`string`,array:!0,description:`Filter share resources by resource_types.`}).option(`order`,{type:`string`,description:`Order shares by values in the given field.`,choices:[`name`,`created`]}).option(`direction`,{type:`string`,description:`Direction to sort objects.`,choices:[`asc`,`desc`]}).option(`page`,{type:`number`,description:"Page number. Defaults to `1` when `per_page` is supplied without\n`page`. May be omitted entirely along with `per_page` to receive a\nnon-paginated response."}).option(`per-page`,{type:`number`,description:"Number of objects to return per page. Defaults to `20` when `page` is supplied without `per_page`. May be omitted entirely along with `page` to receive a non-paginated response."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const se={command:`list`,describe:`List organization shares`,builder:oe,handler:async e=>a({command:`organization share list`,classification:{safeFlags:[`status`,`kind`,`target-type`,`order`,`direction`,`dry-run`]}},e,async()=>{let a={status:e.status,kind:e.kind,target_type:e[`target-type`],resource_types:e[`resource-types`],order:e.order,direction:e.direction,page:e.page,per_page:e[`per-page`]};if(e.dryRun){r({command:`cf organization share list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/organizations/${e[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(e[`organization-id`]))}/shares`,pathParams:{"organization-id":String(e[`organization-id`]??``)},query:a,bodyKind:`none`});return}let o=await t(e),s=await i(`Loading`,async()=>o.send(ae,{organization_id:e[`organization-id`],...a}));n(s,{successLabel:`Loaded`})})},Q={command:`share`,describe:`Operations for share`,builder:e=>e.command(se).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var $={method:`PUT`,path:t=>e`/organizations/${t.organization_id}`,body:`json`};function ce(e){return e.usage(`$0 organization update <organization-id>
72
72
 
73
73
  Update an organization's name.`).positional(`organization-id`,{type:`string`,description:`The ID of the organization to modify.`,demandOption:!0}).option(`name`,{type:`string`,description:`The name field`}).option(`parent-id`,{type:`string`,description:`Organization ID`}).option(`profile-business-address`,{type:`string`,description:`The profile.business_address field`}).option(`profile-business-email`,{type:`string`,description:`The profile.business_email field`}).option(`profile-business-name`,{type:`string`,description:`The profile.business_name field`}).option(`profile-business-phone`,{type:`string`,description:`The profile.business_phone field`}).option(`profile-external-metadata`,{type:`string`,description:`The profile.external_metadata field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The new details of the organization. Only accepts updates to "name" currently.`}).check(e=>{if([`parent-id`].some(t=>e[t]!==void 0)){let t=[`parent-id`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --parent-* flag is set`)}return!0}).check(e=>{if([`profile-business-address`,`profile-business-email`,`profile-business-name`,`profile-business-phone`,`profile-external-metadata`].some(t=>e[t]!==void 0)){let t=[`profile-business-address`,`profile-business-email`,`profile-business-name`,`profile-business-phone`,`profile-external-metadata`].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 --profile-* flag is set`)}return!0})}const le={command:`update <organization-id>`,describe:`Update organization`,builder:ce,handler:async e=>a({command:`organization update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf organization update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/organizations/${e[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(e[`organization-id`]))}`,pathParams:{"organization-id":String(e[`organization-id`]??``)},bodyKind:`json`,body:e.body===void 0?c({name:l(e.name,`name`,`text`),parent:{id:l(e[`parent-id`],`parent-id`,`text`)},profile:{business_address:l(e[`profile-business-address`],`profile-business-address`,`text`),business_email:l(e[`profile-business-email`],`profile-business-email`,`text`),business_name:l(e[`profile-business-name`],`profile-business-name`,`text`),business_phone:l(e[`profile-business-phone`],`profile-business-phone`,`text`),external_metadata:l(e[`profile-external-metadata`],`profile-external-metadata`,`text`)}}):s(e.body)});return}let a=await t(e);if(e.body){let t=s(e.body),r=await i(`Updating`,async()=>a.send($,{body:t,organization_id:e[`organization-id`]}));n(r,{successLabel:`Updated`});return}e.name===void 0&&(e.name=await u(`name`,`The name field`));let o=c({name:l(e.name,`name`,`text`),parent:{id:l(e[`parent-id`],`parent-id`,`text`)},profile:{business_address:l(e[`profile-business-address`],`profile-business-address`,`text`),business_email:l(e[`profile-business-email`],`profile-business-email`,`text`),business_name:l(e[`profile-business-name`],`profile-business-name`,`text`),business_phone:l(e[`profile-business-phone`],`profile-business-phone`,`text`),external_metadata:l(e[`profile-external-metadata`],`profile-external-metadata`,`text`)}}),d=await i(`Updating`,async()=>a.send($,{body:o,organization_id:e[`organization-id`]}));n(d,{successLabel:`Updated`})})},ue={command:`organization`,describe:`organization`,builder:e=>e.command(te).command(b).command(C).command(A).command(le).command(g).command(D).command(K).command(ie).command(Q).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{ue as default};
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env node
2
+ import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-CB9wjyad.mjs";import{t as n}from"./output-BJEgbI0G.mjs";import{t as r}from"./dry-run-gy0Hl9xo.mjs";import{t as i}from"./progress-_Jux05O5.mjs";import{t as a}from"./run-Br8sYjNF.mjs";import"./telemetry-kjElc1zT.mjs";var o={method:`GET`,path:t=>e`/organizations/${t.organization_id}/billable/usage`,query:[`from`,`to`]};function s(e){return e.usage("$0 organizations billing usage get <organization-id>\n\nReturns cost and usage data for all accounts within an organization, aligned with the [FinOps FOCUS v1.3](https://focus.finops.org/focus-specification/v1-3/) Cost and Usage dataset specification. Each record represents one billable metric for one account on one day. This includes all metered usage, including usage that falls within free-tier allowances and may result in zero cost. The response includes usage for every account belonging to the specified organization. **Note:** This endpoint serves `usage` records only; cost and pricing fields are absent from responses. Rated costs are available per account via `POST /accounts/{account_id}/billable/usage` with `Metric: cost`. When `from` and `to` are omitted, defaults to the start of the current month through today. The maximum date range is 31 days. An organization with no accounts, or an organization ID that does not exist, returns a successful response with an empty result set rather than an error.").positional(`organization-id`,{type:`string`,description:`Identifies the Cloudflare organization.`,demandOption:!0}).option(`from`,{type:`string`,description:"Start date for the usage query (ISO 8601). Required if `to` is set. When omitted along with `to`, defaults to the start of the current month. Filters by charge period (when consumption happened), not billing period. The maximum date range is 31 days."}).option(`to`,{type:`string`,description:"End date for the usage query (ISO 8601). Required if `from` is set. When omitted along with `from`, defaults to today. Filters by charge period (when consumption happened), not billing period. The maximum date range is 31 days."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const c={command:`get <organization-id>`,describe:`Get Organization Usage (Version 2, Alpha, Restricted)`,builder:s,handler:async e=>a({command:`organizations billing usage get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let a={from:e.from,to:e.to};if(e.dryRun){r({command:`cf organizations billing usage get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/organizations/${e[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(e[`organization-id`]))}/billable/usage`,pathParams:{"organization-id":String(e[`organization-id`]??``)},query:a,bodyKind:`none`});return}let s=await t(e),c=await i(`Loading`,async()=>s.send(o,{organization_id:e[`organization-id`],...a}));n(c,{successLabel:`Loaded`})})},l={command:`usage`,describe:`Operations for billing.usage`,builder:e=>e.command(c).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},u={command:`billing`,describe:`Operations for billing`,builder:e=>e.command(l).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var d={method:`GET`,path:t=>e`/organizations/${t.organization_id}/logs/audit`,query:/* @__PURE__ */ `action_result,action_type,actor_context,actor_email,actor_id,actor_ip_address,actor_token_id,actor_token_name,actor_type,id,raw_cf_ray_id,raw_method,raw_status_code,raw_uri,resource_id,resource_product,resource_type,resource_scope,action_result.not,action_type.not,actor_context.not,actor_email.not,actor_id.not,actor_ip_address.not,actor_token_id.not,actor_token_name.not,actor_type.not,id.not,raw_cf_ray_id.not,raw_method.not,raw_status_code.not,raw_uri.not,resource_id.not,resource_product.not,resource_type.not,resource_scope.not,since,before,direction,limit,cursor`.split(`,`)};function f(e){return e.usage(`$0 organizations logs audit get <organization-id>
3
+
4
+ Gets a list of audit logs for an organization.`).positional(`organization-id`,{type:`string`,description:`The unique id that identifies the organization.`,demandOption:!0}).option(`action-result`,{type:`string`,array:!0,description:`Filters by whether the action was successful or not.`}).option(`action-type`,{type:`string`,array:!0,description:`Filters by the action type.`}).option(`actor-context`,{type:`string`,array:!0,description:"Filters by the actor context.\n- `api`: The action was performed through the API. The specific credential type was not recorded.\n- `api_key`: The action was authenticated with a Cloudflare Global API Key.\n- `api_token`: The action was authenticated with an API token.\n- `dash`: The action was performed through the Cloudflare dashboard.\n- `oauth`: The action was authenticated with an OAuth token.\n- `origin_ca_key`: The action was authenticated with an Origin CA key."}).option(`actor-email`,{type:`string`,array:!0,description:`Filters by the actor's email address.`}).option(`actor-id`,{type:`string`,array:!0,description:`Filters by the actor's user ID.`}).option(`actor-ip-address`,{type:`string`,array:!0,description:`The IP address where the action was initiated.`}).option(`actor-token-id`,{type:`string`,array:!0,description:`Filters by the API token ID when the actor context is an api_token or oauth.`}).option(`actor-token-name`,{type:`string`,array:!0,description:`Filters by the API token name when the actor context is an api_token or oauth.`}).option(`actor-type`,{type:`string`,array:!0,description:`Filters by the actor type.`}).option(`id`,{type:`string`,array:!0,description:`Finds a specific log by its ID.`}).option(`raw-cf-ray-id`,{type:`string`,array:!0,description:`Filters by the response CF Ray ID.`}).option(`raw-method`,{type:`string`,array:!0,description:`The HTTP method for the API call.`}).option(`raw-status-code`,{type:`string`,array:!0,description:`The response status code that was returned.`}).option(`raw-uri`,{type:`string`,array:!0,description:`Filters by the request URI.`}).option(`resource-id`,{type:`string`,array:!0,description:`Filters by the resource ID.`}).option(`resource-product`,{type:`string`,array:!0,description:`Filters audit logs by the Cloudflare product associated with the changed resource.`}).option(`resource-type`,{type:`string`,array:!0,description:`Filters audit logs based on the unique type of resource changed by the action.`}).option(`resource-scope`,{type:`string`,array:!0,description:`Filters by the resource scope, specifying whether the resource is associated with an organization.`}).option(`action-result-not`,{type:`string`,array:!0,description:`Filters out audit logs by whether the action was successful or not.`}).option(`action-type-not`,{type:`string`,array:!0,description:`Filters out audit logs by the action type.`}).option(`actor-context-not`,{type:`string`,array:!0,description:"Filters out audit logs by the actor context.\n- `api`: The action was performed through the API. The specific credential type was not recorded.\n- `api_key`: The action was authenticated with a Cloudflare Global API Key.\n- `api_token`: The action was authenticated with an API token.\n- `dash`: The action was performed through the Cloudflare dashboard.\n- `oauth`: The action was authenticated with an OAuth token.\n- `origin_ca_key`: The action was authenticated with an Origin CA key."}).option(`actor-email-not`,{type:`string`,array:!0,description:`Filters out audit logs by the actor's email address.`}).option(`actor-id-not`,{type:`string`,array:!0,description:`Filters out audit logs by the actor's user ID.`}).option(`actor-ip-address-not`,{type:`string`,array:!0,description:`Filters out audit logs IP address where the action was initiated.`}).option(`actor-token-id-not`,{type:`string`,array:!0,description:`Filters out audit logs by the API token ID when the actor context is an api_token or oauth.`}).option(`actor-token-name-not`,{type:`string`,array:!0,description:`Filters out audit logs by the API token name when the actor context is an api_token or oauth.`}).option(`actor-type-not`,{type:`string`,array:!0,description:`Filters out audit logs by the actor type.`}).option(`id-not`,{type:`string`,array:!0,description:`Filters out audit logs by their IDs.`}).option(`raw-cf-ray-id-not`,{type:`string`,array:!0,description:`Filters out audit logs by the response CF Ray ID.`}).option(`raw-method-not`,{type:`string`,array:!0,description:`Filters out audit logs by the HTTP method for the API call.`}).option(`raw-status-code-not`,{type:`string`,array:!0,description:`Filters out audit logs by the response status code that was returned.`}).option(`raw-uri-not`,{type:`string`,array:!0,description:`Filters out audit logs by the request URI.`}).option(`resource-id-not`,{type:`string`,array:!0,description:`Filters out audit logs by the resource ID.`}).option(`resource-product-not`,{type:`string`,array:!0,description:`Filters out audit logs by the Cloudflare product associated with the changed resource.`}).option(`resource-type-not`,{type:`string`,array:!0,description:`Filters out audit logs based on the unique type of resource changed by the action.`}).option(`resource-scope-not`,{type:`string`,array:!0,description:`Filters out audit logs by the resource scope, specifying whether the resource is associated with an organization.`}).option(`since`,{type:`string`,description:`Limits the returned results to logs newer than the specified date. This can be a date string 2019-04-30 (interpreted in UTC) or an absolute timestamp that conforms to RFC3339.`,demandOption:!0}).option(`before`,{type:`string`,description:`Limits the returned results to logs older than the specified date. This can be a date string 2019-04-30 (interpreted in UTC) or an absolute timestamp that conforms to RFC3339.`,demandOption:!0}).option(`direction`,{type:`string`,description:`Sets sorting order.`,choices:[`desc`,`asc`]}).option(`limit`,{type:`number`,description:`The number limits the objects to return. The cursor attribute may be used to iterate over the next batch of objects if there are more than the limit.`}).option(`cursor`,{type:`string`,description:`The cursor is an opaque token used to paginate through large sets of records. It indicates the position from which to continue when requesting the next set of records. A valid cursor value can be obtained from the cursor object in the result_info structure of a previous response.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const p={command:`get <organization-id>`,describe:`Get organization audit logs (Version 2)`,builder:f,handler:async e=>a({command:`organizations logs audit get`,classification:{safeFlags:[`direction`,`dry-run`]}},e,async()=>{let a={action_result:e[`action-result`],action_type:e[`action-type`],actor_context:e[`actor-context`],actor_email:e[`actor-email`],actor_id:e[`actor-id`],actor_ip_address:e[`actor-ip-address`],actor_token_id:e[`actor-token-id`],actor_token_name:e[`actor-token-name`],actor_type:e[`actor-type`],id:e.id,raw_cf_ray_id:e[`raw-cf-ray-id`],raw_method:e[`raw-method`],raw_status_code:e[`raw-status-code`],raw_uri:e[`raw-uri`],resource_id:e[`resource-id`],resource_product:e[`resource-product`],resource_type:e[`resource-type`],resource_scope:e[`resource-scope`],"action_result.not":e[`action-result-not`],"action_type.not":e[`action-type-not`],"actor_context.not":e[`actor-context-not`],"actor_email.not":e[`actor-email-not`],"actor_id.not":e[`actor-id-not`],"actor_ip_address.not":e[`actor-ip-address-not`],"actor_token_id.not":e[`actor-token-id-not`],"actor_token_name.not":e[`actor-token-name-not`],"actor_type.not":e[`actor-type-not`],"id.not":e[`id-not`],"raw_cf_ray_id.not":e[`raw-cf-ray-id-not`],"raw_method.not":e[`raw-method-not`],"raw_status_code.not":e[`raw-status-code-not`],"raw_uri.not":e[`raw-uri-not`],"resource_id.not":e[`resource-id-not`],"resource_product.not":e[`resource-product-not`],"resource_type.not":e[`resource-type-not`],"resource_scope.not":e[`resource-scope-not`],since:e.since,before:e.before,direction:e.direction,limit:e.limit,cursor:e.cursor};if(e.dryRun){r({command:`cf organizations logs audit get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/organizations/${e[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(e[`organization-id`]))}/logs/audit`,pathParams:{"organization-id":String(e[`organization-id`]??``)},query:a,bodyKind:`none`});return}let o=await t(e),s=await i(`Loading`,async()=>o.send(d,{organization_id:e[`organization-id`],...a}));n(s,{successLabel:`Loaded`})})};var m={method:`GET`,path:t=>e`/organizations/${t.organization_id}/logs/audit/${t.id}/history`,query:[`action_time`,`since`,`before`,`direction`,`limit`,`cursor`],errors:{404:`NotFoundError`}};function h(e){return e.usage("$0 organizations logs audit history <id>\n\nReturns the chronological change history for the resource identified by the given organization-scoped audit log entry. The endpoint first locates the source audit log entry by `id` (using `action_time` to narrow the lookup window), derives identifying filters from that entry, and then returns matching audit logs within the `since`/`before` window. The `result_info.history_status` field indicates the quality of the resource identification used: - `exact`: Resource was identified by the resource URI. - `approximate`: Resource was identified without the resource URI. - `unavailable`: The source audit log entry did not contain enough information to identify the resource; an empty result is returned.").positional(`id`,{type:`string`,description:`The ID of the audit log to fetch resource history for.`,demandOption:!0}).option(`organization-id`,{type:`string`,description:`The unique ID that identifies the organization.`,demandOption:!0}).option(`action-time`,{type:`string`,description:"RFC3339 timestamp of the source audit log entry's action time. Used to narrow the source-entry lookup window. Provide the `action.time` value from the audit log identified by `id`.",demandOption:!0}).option(`since`,{type:`string`,description:`Limits the returned results to logs newer than the specified date. This can be a date string 2019-04-30 (interpreted in UTC) or an absolute timestamp that conforms to RFC3339.`,demandOption:!0}).option(`before`,{type:`string`,description:`Limits the returned results to logs older than the specified date. This can be a date string 2019-04-30 (interpreted in UTC) or an absolute timestamp that conforms to RFC3339.`,demandOption:!0}).option(`direction`,{type:`string`,description:`Sets sorting order.`,choices:[`desc`,`asc`]}).option(`limit`,{type:`number`,description:`The number limits the objects to return. The cursor attribute may be used to iterate over the next batch of objects if there are more than the limit.`}).option(`cursor`,{type:`string`,description:`The cursor is an opaque token used to paginate through large sets of records. It indicates the position from which to continue when requesting the next set of records. A valid cursor value can be obtained from the cursor object in the result_info structure of a previous response.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`history <id>`,describe:`Get resource change history from an organization audit log entry (Version 2)`,builder:h,handler:async e=>a({command:`organizations logs audit history`,classification:{safeFlags:[`direction`,`dry-run`]}},e,async()=>{let a={action_time:e[`action-time`],since:e.since,before:e.before,direction:e.direction,limit:e.limit,cursor:e.cursor};if(e.dryRun){r({command:`cf organizations logs audit history`,method:`GET`,url:`https://api.cloudflare.com/client/v4/organizations/${e[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(e[`organization-id`]))}/logs/audit/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}/history`,pathParams:{"organization-id":String(e[`organization-id`]??``),id:String(e.id??``)},query:a,bodyKind:`none`});return}let o=await t(e),s=await i(`Loading`,async()=>o.send(m,{organization_id:e[`organization-id`],id:e.id,...a}));n(s,{successLabel:`Loaded`})})},_={command:`audit`,describe:`Operations for logs.audit`,builder:e=>e.command(p).command(g).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},v={command:`logs`,describe:`Operations for logs`,builder:e=>e.command(_).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},y={command:`organizations`,describe:`Multi-user organizations that group accounts, members, and shared settings under a single entity`,builder:e=>e.command(u).command(v).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{y as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-pbuzyz4C.mjs";import{i as n}from"./context-BryBS1zQ.mjs";import{t as r}from"./output-BJEgbI0G.mjs";import{t as i}from"./dry-run-gy0Hl9xo.mjs";import{t as a}from"./progress-C_yVLVcl.mjs";import{t as o}from"./run-BlSXngtI.mjs";import"./telemetry-jl3s2-bN.mjs";import{n as s,t as c}from"./body-parser-BKcZS9iJ.mjs";import{n as l}from"./input-validation-D7z60HJH.mjs";import{i as u}from"./prompt-kxvGZ6nF.mjs";var d={method:`GET`,path:t=>e`/zones/${t.zone_id}/cache/origin_post_quantum_encryption`};function f(e){return e.usage(`$0 origin-post-quantum-encryption get
2
+ import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-CB9wjyad.mjs";import{i as n}from"./context-DCon1tRZ.mjs";import{t as r}from"./output-BJEgbI0G.mjs";import{t as i}from"./dry-run-gy0Hl9xo.mjs";import{t as a}from"./progress-_Jux05O5.mjs";import{t as o}from"./run-Br8sYjNF.mjs";import"./telemetry-kjElc1zT.mjs";import{n as s,t as c}from"./body-parser-BKcZS9iJ.mjs";import{n as l}from"./input-validation-D7z60HJH.mjs";import{i as u}from"./prompt-SNVLBS1b.mjs";var d={method:`GET`,path:t=>e`/zones/${t.zone_id}/cache/origin_post_quantum_encryption`};function f(e){return e.usage(`$0 origin-post-quantum-encryption get
3
3
 
4
4
  Instructs Cloudflare to use Post-Quantum (PQ) key agreement algorithms when connecting to your origin. Preferred instructs Cloudflare to opportunistically send a Post-Quantum keyshare in the first message to the origin (for fastest connections when the origin supports and prefers PQ), supported means that PQ algorithms are advertised but only used when requested by the origin, and off means that PQ algorithms are not advertised.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const p={command:`get`,describe:`Get Origin Post-Quantum Encryption setting`,builder:f,handler:async e=>o({command:`origin-post-quantum-encryption get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf origin-post-quantum-encryption get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/cache/origin_post_quantum_encryption`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(d,{zone_id:s}));r(c,{successLabel:`Loaded`})})};var m={method:`PUT`,path:t=>e`/zones/${t.zone_id}/cache/origin_post_quantum_encryption`,body:`json`};function h(e){return e.usage(`$0 origin-post-quantum-encryption update
5
5
 
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ var e=`1.0.0-beta.25`;export{e as t};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-pbuzyz4C.mjs";import{i as n}from"./context-BryBS1zQ.mjs";import{t as r}from"./output-BJEgbI0G.mjs";import{t as i}from"./dry-run-gy0Hl9xo.mjs";import{t as a}from"./progress-C_yVLVcl.mjs";import{t as o}from"./run-BlSXngtI.mjs";import"./telemetry-jl3s2-bN.mjs";import{a as s,n as c,t as l}from"./body-parser-BKcZS9iJ.mjs";import{n as u}from"./input-validation-D7z60HJH.mjs";import{n as d}from"./prompt-kxvGZ6nF.mjs";var f={method:`POST`,path:t=>e`/zones/${t.zone_id}/pagerules`,body:`json`};function p(e){return e.usage(`$0 page-rules create
2
+ import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-CB9wjyad.mjs";import{i as n}from"./context-DCon1tRZ.mjs";import{t as r}from"./output-BJEgbI0G.mjs";import{t as i}from"./dry-run-gy0Hl9xo.mjs";import{t as a}from"./progress-_Jux05O5.mjs";import{t as o}from"./run-Br8sYjNF.mjs";import"./telemetry-kjElc1zT.mjs";import{a as s,n as c,t as l}from"./body-parser-BKcZS9iJ.mjs";import{n as u}from"./input-validation-D7z60HJH.mjs";import{n as d}from"./prompt-SNVLBS1b.mjs";var f={method:`POST`,path:t=>e`/zones/${t.zone_id}/pagerules`,body:`json`};function p(e){return e.usage(`$0 page-rules create
3
3
 
4
4
  Creates a new Page Rule.`).option(`actions`,{type:`string`,description:`The set of actions to perform if the targets of this rule match the
5
5
  request. Actions can redirect to another URL or override settings, but
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./lazy-command-CD1nuS38.mjs";import"./api-X3wKppsT.mjs";import{t}from"./path-DRw6Y-nd.mjs";import{t as n}from"./hand-written-dry-run-B82fRl2N.mjs";import{t as r}from"./local-CIeKNHSz.mjs";import{i,n as a}from"./auth-pbuzyz4C.mjs";import{a as o,t as s}from"./context-BryBS1zQ.mjs";import{t as c}from"./output-BJEgbI0G.mjs";import{t as l}from"./dry-run-gy0Hl9xo.mjs";import{t as u}from"./progress-C_yVLVcl.mjs";import{t as d}from"./run-BlSXngtI.mjs";import"./telemetry-jl3s2-bN.mjs";import{n as f,r as p,t as m}from"./body-parser-BKcZS9iJ.mjs";import{n as h,t as ee}from"./input-validation-D7z60HJH.mjs";import{a as g,i as _,n as v}from"./prompt-kxvGZ6nF.mjs";var y={method:`POST`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}/purge_build_cache`};function te(e){return e.usage(`$0 pages build-cache purge <project-name>
2
+ import{t as e}from"./lazy-command-DjGzxiUT.mjs";import"./api-X3wKppsT.mjs";import{t}from"./path-DRw6Y-nd.mjs";import{t as n}from"./hand-written-dry-run-B82fRl2N.mjs";import{t as r}from"./local-BNmz58v4.mjs";import{i,n as a}from"./auth-CB9wjyad.mjs";import{a as o,t as s}from"./context-DCon1tRZ.mjs";import{t as c}from"./output-BJEgbI0G.mjs";import{t as l}from"./dry-run-gy0Hl9xo.mjs";import{t as u}from"./progress-_Jux05O5.mjs";import{t as d}from"./run-Br8sYjNF.mjs";import"./telemetry-kjElc1zT.mjs";import{n as f,r as p,t as m}from"./body-parser-BKcZS9iJ.mjs";import{n as h,t as ee}from"./input-validation-D7z60HJH.mjs";import{a as g,i as _,n as v}from"./prompt-SNVLBS1b.mjs";var y={method:`POST`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}/purge_build_cache`};function te(e){return e.usage(`$0 pages build-cache purge <project-name>
3
3
 
4
4
  Remove cached build artifacts so subsequent builds run without the project's existing build cache.`).positional(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,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 ne={command:`purge <project-name>`,describe:`Purge the Pages build cache`,builder:te,handler:async e=>d({command:`pages build-cache purge`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await o();l({command:`cf pages build-cache purge`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/purge_build_cache`,pathParams:{"project-name":String(e[`project-name`]??``)},bodyKind:`none`});return}let t=await a(e),n=e.local?r:await s();if(e.accountId=n,!await v({force:!!e.force,message:`This operation purges the build cache for a Pages project.`}))return;let i=await u(`Deleting`,async()=>t.send(y,{account_id:n,project_name:e[`project-name`]}));c(i,{successLabel:`Deleted`})})},re={command:`build-cache`,describe:`Operations for build-cache`,builder:e=>e.command(ne).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var b={method:`POST`,path:e=>t`/accounts/${e.account_id}/pages/projects`,body:`json`};function x(e){return e.usage(`$0 pages create
5
5
 
@@ -45,4 +45,4 @@ Connect a GitHub or GitLab repository to a Cloudflare Pages project to enable Gi
45
45
  When disabled, no deployments (production or preview) will be triggered automatically.
46
46
  `}).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`]}).coerce(`source-config-preview-deployment-setting`,e=>h(e,`source-config-preview-deployment-setting`,`text`)).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(`type`,{type:`string`,description:`The source control management provider.`,choices:[`github`,`gitlab`]}).coerce(`type`,e=>h(e,`type`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Repository and deployment settings for connecting a Git repository to a Pages project.`})}const Oe={command:`connect <project-name>`,describe:`Connect a Git repository`,builder:$,handler:async e=>d({command:`pages source connect`,classification:{safeFlags:[`source-config-deployments-enabled`,`source-config-pr-comments-enabled`,`source-config-preview-deployment-setting`,`source-config-production-deployments-enabled`,`type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();l({command:`cf pages source connect`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/source`,pathParams:{"project-name":String(e[`project-name`]??``)},bodyKind:`json`,body:e.body===void 0?m({config:{deployments_enabled:e[`source-config-deployments-enabled`],owner:h(e[`source-config-owner`],`source-config-owner`,`text`),owner_id:h(e[`source-config-owner-id`],`source-config-owner-id`,`text`),path_excludes:e[`source-config-path-excludes`],path_includes:e[`source-config-path-includes`],pr_comments_enabled:e[`source-config-pr-comments-enabled`],preview_branch_excludes:e[`source-config-preview-branch-excludes`],preview_branch_includes:e[`source-config-preview-branch-includes`],preview_deployment_setting:e[`source-config-preview-deployment-setting`],production_branch:h(e[`source-config-production-branch`],`source-config-production-branch`,`text`),production_deployments_enabled:e[`source-config-production-deployments-enabled`],repo_id:h(e[`source-config-repo-id`],`source-config-repo-id`,`text`),repo_name:h(e[`source-config-repo-name`],`source-config-repo-name`,`text`)},type:e.type}):f(e.body)});return}let t=await a(e),n=e.local?r:await s();if(e.accountId=n,e.body){let r=f(e.body),i=await u(`Creating`,async()=>t.send(Q,{body:r,account_id:n,project_name:e[`project-name`]}));c(i,{successLabel:`Created`});return}if(e[`source-config-deployments-enabled`]===void 0)throw Error(`--source-config-deployments-enabled is required (or pass --body with this field set).`);if(e[`source-config-owner`]===void 0&&(e[`source-config-owner`]=await g(`source-config-owner`,`The owner of the repository.`)),e[`source-config-owner-id`]===void 0&&(e[`source-config-owner-id`]=await g(`source-config-owner-id`,`The owner ID of the repository.`)),e[`source-config-path-excludes`]===void 0)throw Error(`--source-config-path-excludes is required (or pass --body with this field set).`);if(e[`source-config-path-includes`]===void 0)throw Error(`--source-config-path-includes is required (or pass --body with this field set).`);if(e[`source-config-pr-comments-enabled`]===void 0)throw Error(`--source-config-pr-comments-enabled is required (or pass --body with this field set).`);if(e[`source-config-preview-branch-excludes`]===void 0)throw Error(`--source-config-preview-branch-excludes is required (or pass --body with this field set).`);if(e[`source-config-preview-branch-includes`]===void 0)throw Error(`--source-config-preview-branch-includes is required (or pass --body with this field set).`);if(e[`source-config-preview-deployment-setting`]===void 0&&(e[`source-config-preview-deployment-setting`]=await _(`source-config-preview-deployment-setting`,`Controls whether commits to preview branches trigger a preview deployment.`,[`all`,`none`,`custom`])),e[`source-config-production-branch`]===void 0&&(e[`source-config-production-branch`]=await g(`source-config-production-branch`,`The production branch of the repository.`)),e[`source-config-production-deployments-enabled`]===void 0)throw Error(`--source-config-production-deployments-enabled is required (or pass --body with this field set).`);e[`source-config-repo-id`]===void 0&&(e[`source-config-repo-id`]=await g(`source-config-repo-id`,`The ID of the repository.`)),e[`source-config-repo-name`]===void 0&&(e[`source-config-repo-name`]=await g(`source-config-repo-name`,`The name of the repository.`)),e.type===void 0&&(e.type=await _(`type`,`The source control management provider.`,[`github`,`gitlab`]));let i=m({config:{deployments_enabled:e[`source-config-deployments-enabled`],owner:h(e[`source-config-owner`],`source-config-owner`,`text`),owner_id:h(e[`source-config-owner-id`],`source-config-owner-id`,`text`),path_excludes:e[`source-config-path-excludes`],path_includes:e[`source-config-path-includes`],pr_comments_enabled:e[`source-config-pr-comments-enabled`],preview_branch_excludes:e[`source-config-preview-branch-excludes`],preview_branch_includes:e[`source-config-preview-branch-includes`],preview_deployment_setting:e[`source-config-preview-deployment-setting`],production_branch:h(e[`source-config-production-branch`],`source-config-production-branch`,`text`),production_deployments_enabled:e[`source-config-production-deployments-enabled`],repo_id:h(e[`source-config-repo-id`],`source-config-repo-id`,`text`),repo_name:h(e[`source-config-repo-name`],`source-config-repo-name`,`text`)},type:e.type}),d=await u(`Creating`,async()=>t.send(Q,{body:i,account_id:n,project_name:e[`project-name`]}));c(d,{successLabel:`Created`})})};var ke={method:`DELETE`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}/source`};function Ae(e){return e.usage(`$0 pages source disconnect <project-name>
47
47
 
48
- Disconnect the Git repository from a Cloudflare Pages project to stop Git-based deployments.`).positional(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,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 je={command:`disconnect <project-name>`,describe:`Disconnect a Git repository`,builder:Ae,handler:async e=>d({command:`pages source disconnect`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await o();l({command:`cf pages source disconnect`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/source`,pathParams:{"project-name":String(e[`project-name`]??``)},bodyKind:`none`});return}let t=await a(e),n=e.local?r:await s();if(e.accountId=n,!await v({force:!!e.force}))return;let i=await u(`Deleting`,async()=>t.send(ke,{account_id:n,project_name:e[`project-name`]}));c(i,{successLabel:`Deleted`})})},Me={command:`source`,describe:`Operations for source`,builder:e=>e.command(Oe).command(je).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ne=e(`deploy [directory]`,`Deploy a directory of static assets as a Pages deployment`,()=>import(`./command-D3E7d8E7.mjs`),{command:`pages deploy`,recordArgs:!1});const Pe={command:`pages`,describe:`Full-stack application hosting with Git-integrated builds, preview deployments, and custom domains`,builder:e=>e.command(S).command(T).command(n(Ne,`preview`)).command(xe).command(we).command(De).command(re).command(Y).command(ye).command(Me).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Pe as default};
48
+ Disconnect the Git repository from a Cloudflare Pages project to stop Git-based deployments.`).positional(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,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 je={command:`disconnect <project-name>`,describe:`Disconnect a Git repository`,builder:Ae,handler:async e=>d({command:`pages source disconnect`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await o();l({command:`cf pages source disconnect`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/source`,pathParams:{"project-name":String(e[`project-name`]??``)},bodyKind:`none`});return}let t=await a(e),n=e.local?r:await s();if(e.accountId=n,!await v({force:!!e.force}))return;let i=await u(`Deleting`,async()=>t.send(ke,{account_id:n,project_name:e[`project-name`]}));c(i,{successLabel:`Deleted`})})},Me={command:`source`,describe:`Operations for source`,builder:e=>e.command(Oe).command(je).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ne=e(`deploy [directory]`,`Deploy a directory of static assets as a Pages deployment`,()=>import(`./command-DqWBPiew.mjs`),{command:`pages deploy`,recordArgs:!1});const Pe={command:`pages`,describe:`Full-stack application hosting with Git-integrated builds, preview deployments, and custom domains`,builder:e=>e.command(S).command(T).command(n(Ne,`preview`)).command(xe).command(we).command(De).command(re).command(Y).command(ye).command(Me).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Pe as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CIeKNHSz.mjs";import{n}from"./auth-pbuzyz4C.mjs";import{a as r,i,t as a}from"./context-BryBS1zQ.mjs";import{t as o}from"./output-BJEgbI0G.mjs";import{t as s}from"./dry-run-gy0Hl9xo.mjs";import{t as c}from"./progress-C_yVLVcl.mjs";import{t as l}from"./run-BlSXngtI.mjs";import"./telemetry-jl3s2-bN.mjs";import{a as u,n as d,r as f,t as p}from"./body-parser-BKcZS9iJ.mjs";import{n as m}from"./prompt-kxvGZ6nF.mjs";var h={method:`POST`,path:t=>e`/zones/${t.zone_id}/pay-per-crawl/configuration`,body:`json`,errors:{400:`BadRequestError`}};function ee(e){return e.usage(`$0 pay-per-crawl config create
2
+ import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-BNmz58v4.mjs";import{n}from"./auth-CB9wjyad.mjs";import{a as r,i,t as a}from"./context-DCon1tRZ.mjs";import{t as o}from"./output-BJEgbI0G.mjs";import{t as s}from"./dry-run-gy0Hl9xo.mjs";import{t as c}from"./progress-_Jux05O5.mjs";import{t as l}from"./run-Br8sYjNF.mjs";import"./telemetry-kjElc1zT.mjs";import{a as u,n as d,r as f,t as p}from"./body-parser-BKcZS9iJ.mjs";import{n as m}from"./prompt-SNVLBS1b.mjs";var h={method:`POST`,path:t=>e`/zones/${t.zone_id}/pay-per-crawl/configuration`,body:`json`,errors:{400:`BadRequestError`}};function ee(e){return e.usage(`$0 pay-per-crawl config create
3
3
 
4
4
  Creates the pay-per-crawl config for a zone.`).option(`bot-overrides`,{type:`string`,description:`The bot_overrides field. Provide as a JSON object or @path/to/file.json.`}).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`price-usd-microcents`,{type:`number`,description:`Price in microcents 1 USD = 100,000,000 microcents. Must be 0 or a multiple of 100,000 $0.001. Range: $0.001–$9,999.999.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Data for fully replacing a pay-per-crawl zone configuration`})}const g={command:`create`,describe:`Creates pay-per-crawl config for a zone`,builder:ee,handler:async e=>l({command:`pay-per-crawl config create`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf pay-per-crawl config create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/pay-per-crawl/configuration`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({bot_overrides:f(e[`bot-overrides`],`bot-overrides`,!0),enabled:e.enabled,price_usd_microcents:e[`price-usd-microcents`]},[[`bot_overrides`]]):d(e.body,[{path:[`bot_overrides`],flag:`bot-overrides`}])});return}let t=await n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,e.body){let n=d(e.body,[{path:[`bot_overrides`],flag:`bot-overrides`}]),i=await c(`Creating`,async()=>t.send(h,{body:n,zone_id:r}));o(i,{successLabel:`Created`});return}if(e[`bot-overrides`]===void 0)throw Error(`--bot-overrides is required (or pass --body with this field set).`);if(e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);if(e[`price-usd-microcents`]===void 0)throw Error(`--price-usd-microcents is required (or pass --body with this field set).`);let a=p({bot_overrides:f(e[`bot-overrides`],`bot-overrides`,!0),enabled:e.enabled,price_usd_microcents:e[`price-usd-microcents`]},[[`bot_overrides`]]),l=await c(`Creating`,async()=>t.send(h,{body:a,zone_id:r}));o(l,{successLabel:`Created`})})};var _={method:`PATCH`,path:t=>e`/zones/${t.zone_id}/pay-per-crawl/configuration`,body:`json`,errors:{400:`BadRequestError`}};function te(e){return e.usage(`$0 pay-per-crawl config edit
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CIeKNHSz.mjs";import{i as n,n as r}from"./auth-pbuzyz4C.mjs";import{a as i,i as a,t as o}from"./context-BryBS1zQ.mjs";import{t as s}from"./output-BJEgbI0G.mjs";import{t as c}from"./dry-run-gy0Hl9xo.mjs";import{t as l}from"./progress-C_yVLVcl.mjs";import{t as u}from"./run-BlSXngtI.mjs";import"./telemetry-jl3s2-bN.mjs";import{a as d,n as f,t as p}from"./body-parser-BKcZS9iJ.mjs";import{n as m,t as h}from"./input-validation-D7z60HJH.mjs";import{a as g,i as _,n as v}from"./prompt-kxvGZ6nF.mjs";var y={method:`GET`,path:t=>e`/accounts/${t.account_id}/pay-per-use/enabled-domains`,query:[`cursor`,`per_page`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,500:`InternalServerError`}};function ee(e){return e.usage(`$0 pay-per-use enabled-domains list
2
+ import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-BNmz58v4.mjs";import{i as n,n as r}from"./auth-CB9wjyad.mjs";import{a as i,i as a,t as o}from"./context-DCon1tRZ.mjs";import{t as s}from"./output-BJEgbI0G.mjs";import{t as c}from"./dry-run-gy0Hl9xo.mjs";import{t as l}from"./progress-_Jux05O5.mjs";import{t as u}from"./run-Br8sYjNF.mjs";import"./telemetry-kjElc1zT.mjs";import{a as d,n as f,t as p}from"./body-parser-BKcZS9iJ.mjs";import{n as m,t as h}from"./input-validation-D7z60HJH.mjs";import{a as g,i as _,n as v}from"./prompt-SNVLBS1b.mjs";var y={method:`GET`,path:t=>e`/accounts/${t.account_id}/pay-per-use/enabled-domains`,query:[`cursor`,`per_page`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,500:`InternalServerError`}};function ee(e){return e.usage(`$0 pay-per-use enabled-domains list
3
3
 
4
4
  Returns publisher domains associated with the requesting Pay Per Use operator through an accepted price agreement. License expiration is the earlier non-null boundary from the price agreement and publisher zone lifecycles. A future expiration remains active and is exposed to the operator. After expiration, the license remains listed as expired for one calendar month before it is omitted; an active agreement for the same domain takes precedence. The requesting account must be an active Pay Per Use operator.`).option(`cursor`,{type:`string`,description:`Opaque, account-bound cursor returned by the previous page. Cursors expire after one hour; restart pagination without a cursor after receiving a 400 response for an expired cursor.`}).option(`per-page`,{type:`number`,description:`Maximum number of domains to return`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const te={command:`list`,describe:`List enabled Pay Per Use domains`,builder:ee,handler:async e=>u({command:`pay-per-use enabled-domains list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={cursor:e.cursor,per_page:e[`per-page`]};if(e.dryRun){let e=await i();c({command:`cf pay-per-use enabled-domains list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-use/enabled-domains`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(y,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})},ne={command:`enabled-domains`,describe:`Operations for enabled-domains`,builder:e=>e.command(te).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var b={method:`GET`,path:t=>e`/accounts/${t.account_id}/pay-per-use/operator/configuration`,errors:{403:`ForbiddenError`,404:`NotFoundError`}};function x(e){return e.usage(`$0 pay-per-use operator get-configuration
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CIeKNHSz.mjs";import{n}from"./auth-pbuzyz4C.mjs";import{a as r,t as i}from"./context-BryBS1zQ.mjs";import{t as a}from"./output-BJEgbI0G.mjs";import{t as o}from"./dry-run-gy0Hl9xo.mjs";import{t as s}from"./progress-C_yVLVcl.mjs";import{t as c}from"./run-BlSXngtI.mjs";import"./telemetry-jl3s2-bN.mjs";import{a as l,n as u,t as d}from"./body-parser-BKcZS9iJ.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{a as p,i as m,n as h}from"./prompt-kxvGZ6nF.mjs";var g={method:`POST`,path:t=>e`/accounts/${t.account_id}/pipelines/v1/pipelines`,body:`json`};function _(e){return e.usage(`$0 pipelines create
2
+ import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-BNmz58v4.mjs";import{n}from"./auth-CB9wjyad.mjs";import{a as r,t as i}from"./context-DCon1tRZ.mjs";import{t as a}from"./output-BJEgbI0G.mjs";import{t as o}from"./dry-run-gy0Hl9xo.mjs";import{t as s}from"./progress-_Jux05O5.mjs";import{t as c}from"./run-Br8sYjNF.mjs";import"./telemetry-kjElc1zT.mjs";import{a as l,n as u,t as d}from"./body-parser-BKcZS9iJ.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{a as p,i as m,n as h}from"./prompt-SNVLBS1b.mjs";var g={method:`POST`,path:t=>e`/accounts/${t.account_id}/pipelines/v1/pipelines`,body:`json`};function _(e){return e.usage(`$0 pipelines create
3
3
 
4
4
  Create a new Pipeline.`).option(`name`,{type:`string`,description:`Specifies the name of the Pipeline.`}).option(`sql`,{type:`string`,description:`Specifies SQL for the Pipeline processing flow.`}).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 v={command:`create`,describe:`Create Pipeline`,builder:_,handler:async e=>c({command:`pipelines create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf pipelines create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pipelines/v1/pipelines`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({name:f(e.name,`name`,`text`),sql:f(e.sql,`sql`,`text`)}):u(e.body)});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,e.body){let t=u(e.body),n=await s(`Creating`,async()=>c.send(g,{body:t,account_id:l}));a(n,{successLabel:`Created`});return}e.name===void 0&&(e.name=await p(`name`,`Specifies the name of the Pipeline.`)),e.sql===void 0&&(e.sql=await p(`sql`,`Specifies SQL for the Pipeline processing flow.`));let m=d({name:f(e.name,`name`,`text`),sql:f(e.sql,`sql`,`text`)}),h=await s(`Creating`,async()=>c.send(g,{body:m,account_id:l}));a(h,{successLabel:`Created`})})};var y={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/pipelines/v1/pipelines/${t.pipeline_id}`};function b(e){return e.usage(`$0 pipelines delete <pipeline-id>
5
5
 
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import{i as e,n as t}from"./auth-pbuzyz4C.mjs";import{i as n}from"./context-BryBS1zQ.mjs";import{t as r}from"./output-BJEgbI0G.mjs";import{t as i}from"./dry-run-gy0Hl9xo.mjs";import{t as a}from"./progress-C_yVLVcl.mjs";import{t as o}from"./run-BlSXngtI.mjs";import"./telemetry-jl3s2-bN.mjs";import{a as s,n as c,s as l,t as u}from"./body-parser-BKcZS9iJ.mjs";function d(e){return e.usage("$0 precursor get\n\nRetrieve a zone's Precursor configuration: the detection `mode`, whether to `show_interstitial`, and the ordered list of `rules`.").option(`cloudflare-version`,{type:`string`,description:`Selects the split Precursor API schema.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const f={command:`get`,describe:`Get Zone Precursor Config`,builder:d,handler:async s=>o({command:`precursor get`,classification:{safeFlags:[`dry-run`]}},s,async()=>{let o={};if(s[`cloudflare-version`]!==void 0&&(o[`Cloudflare-Version`]=String(s[`cloudflare-version`])),s.dryRun){i({command:`cf precursor get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/precursor`,pathParams:{"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`none`});return}let c=await t(s);s.zoneId=await n({zone:s.zone},c,{quiet:s.quiet});let l=await a(`Loading`,async()=>e(c,`GET`,`/zones/${s.zoneId}/precursor`,{headers:Object.keys(o).length>0?o:void 0}));r(l,{successLabel:`Loaded`})})};function p(e){return e.usage("$0 precursor update\n\nUpdates the Precursor configuration for a zone. `mode` controls whether Precursor detection is off, monitoring, or armed. `show_interstitial` controls the zone-level response when armed. `rules` is the ordered list of overrides for matching requests. This is a partial update: only the fields present in the request body are changed. - Sending an empty array (`[]`) clears all rules. - At least one of `mode`, `show_interstitial`, or `rules` must be present; an empty body (`{}`) is rejected with `400`. - Rule `id` is read-only (assigned by Cloudflare) and ignored on input. - Rule `show_interstitial` is required and controls the response for requests that match that rule. - Rule `expression` is limited to 4000 characters. The limit applies to each rule individually, not to the combined size of all rules.").option(`cloudflare-version`,{type:`string`,description:`Selects the split Precursor API schema.`,demandOption:!0}).option(`rules`,{type:`string`,description:`The ordered list of Precursor rules for the zone. Provide as a JSON array of objects or @path/to/file.json.`}).option(`show-interstitial`,{type:`boolean`,description:`Whether Precursor shows an interstitial when it takes action on a
2
+ import{i as e,n as t}from"./auth-CB9wjyad.mjs";import{i as n}from"./context-DCon1tRZ.mjs";import{t as r}from"./output-BJEgbI0G.mjs";import{t as i}from"./dry-run-gy0Hl9xo.mjs";import{t as a}from"./progress-_Jux05O5.mjs";import{t as o}from"./run-Br8sYjNF.mjs";import"./telemetry-kjElc1zT.mjs";import{a as s,n as c,s as l,t as u}from"./body-parser-BKcZS9iJ.mjs";function d(e){return e.usage("$0 precursor get\n\nRetrieve a zone's Precursor configuration: the detection `mode`, whether to `show_interstitial`, and the ordered list of `rules`.").option(`cloudflare-version`,{type:`string`,description:`Selects the split Precursor API schema.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const f={command:`get`,describe:`Get Zone Precursor Config`,builder:d,handler:async s=>o({command:`precursor get`,classification:{safeFlags:[`dry-run`]}},s,async()=>{let o={};if(s[`cloudflare-version`]!==void 0&&(o[`Cloudflare-Version`]=String(s[`cloudflare-version`])),s.dryRun){i({command:`cf precursor get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/precursor`,pathParams:{"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`none`});return}let c=await t(s);s.zoneId=await n({zone:s.zone},c,{quiet:s.quiet});let l=await a(`Loading`,async()=>e(c,`GET`,`/zones/${s.zoneId}/precursor`,{headers:Object.keys(o).length>0?o:void 0}));r(l,{successLabel:`Loaded`})})};function p(e){return e.usage("$0 precursor update\n\nUpdates the Precursor configuration for a zone. `mode` controls whether Precursor detection is off, monitoring, or armed. `show_interstitial` controls the zone-level response when armed. `rules` is the ordered list of overrides for matching requests. This is a partial update: only the fields present in the request body are changed. - Sending an empty array (`[]`) clears all rules. - At least one of `mode`, `show_interstitial`, or `rules` must be present; an empty body (`{}`) is rejected with `400`. - Rule `id` is read-only (assigned by Cloudflare) and ignored on input. - Rule `show_interstitial` is required and controls the response for requests that match that rule. - Rule `expression` is limited to 4000 characters. The limit applies to each rule individually, not to the combined size of all rules.").option(`cloudflare-version`,{type:`string`,description:`Selects the split Precursor API schema.`,demandOption:!0}).option(`rules`,{type:`string`,description:`The ordered list of Precursor rules for the zone. Provide as a JSON array of objects or @path/to/file.json.`}).option(`show-interstitial`,{type:`boolean`,description:`Whether Precursor shows an interstitial when it takes action on a
3
3
  request.
4
4
  `}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const m={command:`update`,describe:`Update Zone Precursor Config`,builder:p,handler:async d=>o({command:`precursor update`,classification:{safeFlags:[`show-interstitial`,`dry-run`]}},d,async()=>{let o={};if(d[`cloudflare-version`]!==void 0&&(o[`Cloudflare-Version`]=String(d[`cloudflare-version`])),d.dryRun){i({command:`cf precursor update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${d.zone??d.zoneId??`<zone>`}/precursor`,pathParams:{"zone-id":String(d.zone??d[`zone-id`]??``)},bodyKind:`json`,body:d.body===void 0?u({rules:s(d.rules,`rules`),show_interstitial:d[`show-interstitial`],cloudflare_version:d[`cloudflare-version`]}):c(d.body)});return}let f=await t(d);if(d.zoneId=await n({zone:d.zone},f,{quiet:d.quiet}),d.body){let t=c(d.body),n=await a(`Updating`,async()=>e(f,`PUT`,`/zones/${d.zoneId}/precursor`,{body:t,headers:Object.keys(o).length>0?o:void 0}));r(n,{successLabel:`Updated`});return}let p={};d.rules!==void 0&&l(p,[`rules`],s(d.rules,`rules`)),d[`show-interstitial`]!==void 0&&l(p,[`show_interstitial`],d[`show-interstitial`]),d[`cloudflare-version`]!==void 0&&(p.cloudflare_version=d[`cloudflare-version`]);let m=await a(`Updating`,async()=>e(f,`PUT`,`/zones/${d.zoneId}/precursor`,{body:p,headers:Object.keys(o).length>0?o:void 0}));r(m,{successLabel:`Updated`})})},h={command:`precursor`,describe:`Precursor settings for a zone`,builder:e=>e.command(f).command(m).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{h as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{r as e}from"./dotenv-qsoPELMm.mjs";import{J as t,K as n,rt as r,z as i}from"./dist-D5YYi2LO.mjs";import{t as a}from"./hand-written-dry-run-B82fRl2N.mjs";import{t as o}from"./local-CIeKNHSz.mjs";import{i as s,n as c}from"./auth-pbuzyz4C.mjs";import{a as l,t as u}from"./context-BryBS1zQ.mjs";import{d,s as f}from"./interactive-DOWEcR6_.mjs";import{C as p,_ as m,d as h,f as g,l as _,r as v,t as y,x as b,y as x}from"./deploy-context-D51tgJGI.mjs";import{t as S}from"./output-BJEgbI0G.mjs";import{t as C}from"./dry-run-gy0Hl9xo.mjs";import{t as w}from"./progress-C_yVLVcl.mjs";import{n as T,t as E}from"./run-BlSXngtI.mjs";import"./telemetry-jl3s2-bN.mjs";import{n as D}from"./prompt-kxvGZ6nF.mjs";import{i as O,n as k,o as A,r as j,s as M,t as N,u as P}from"./containers-IBtaInTL.mjs";import{a as F,c as I,i as ee,n as L,o as R,r as z,s as B}from"./build-CCepbVuJ.mjs";import{t as V}from"./deploy-input-em95cFc7.mjs";import{readBuildOutput as H}from"@cloudflare/build-output-utils";function U(e){return e.usage(`$0 previews delete <name>
2
+ import{r as e}from"./dotenv-qsoPELMm.mjs";import{J as t,K as n,rt as r,z as i}from"./dist-ataVE8ob.mjs";import{t as a}from"./hand-written-dry-run-B82fRl2N.mjs";import{t as o}from"./local-BNmz58v4.mjs";import{i as s,n as c}from"./auth-CB9wjyad.mjs";import{a as l,t as u}from"./context-DCon1tRZ.mjs";import{d,s as f}from"./interactive-1g0dnrA8.mjs";import{C as p,_ as m,d as h,f as g,l as _,r as v,t as y,x as b,y as x}from"./deploy-context-CO8ZSRwx.mjs";import{t as S}from"./output-BJEgbI0G.mjs";import{t as C}from"./dry-run-gy0Hl9xo.mjs";import{t as w}from"./progress-_Jux05O5.mjs";import{n as T,t as E}from"./run-Br8sYjNF.mjs";import"./telemetry-kjElc1zT.mjs";import{n as D}from"./prompt-SNVLBS1b.mjs";import{i as O,n as k,o as A,r as j,s as M,t as N,u as P}from"./containers-C_byVTZF.mjs";import{a as F,c as I,i as ee,n as L,o as R,r as z,s as B}from"./build-BfkzV5_c.mjs";import{t as V}from"./deploy-input-PhKRxa_2.mjs";import{readBuildOutput as H}from"@cloudflare/build-output-utils";function U(e){return e.usage(`$0 previews delete <name>
3
3
 
4
4
  Delete a Preview.`).positional(`name`,{type:`string`,description:`Identifier for the Preview, which can be ID, slug, or URL-encoded name.`,demandOption:!0}).option(`worker`,{type:`string`,description:`Identifier for the Worker, which can be ID or name.`,demandOption:!0}).option(`delete-with-references`,{type:`boolean`,description:`If true, delete the Preview even when other Workers still reference it. Service bindings in those Workers may be left broken. Durable Object namespaces implemented by the deleted Preview are deleted even if other Workers reference them.`}).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 W={command:`delete <name>`,describe:`Delete Preview`,builder:U,handler:async e=>E({command:`previews delete`,classification:{safeFlags:[`delete-with-references`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let t={force:e[`delete-with-references`]};if(e.dryRun){let n=await l();C({command:`cf previews delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${n??`<account-id>`}/workers/workers/${e.worker==null?`<worker>`:encodeURIComponent(String(e.worker))}/previews/${e.name==null?`<name>`:encodeURIComponent(String(e.name))}`,pathParams:{worker:String(e.worker??``),name:String(e.name??``)},query:t,bodyKind:`none`});return}let n=await c(e),r=e.local?o:await u();if(e.accountId=r,!await D({force:!!e.force,message:`This operation permanently deletes the Preview.`}))return;let i=await w(`Deleting`,async()=>s(n,`DELETE`,`/accounts/${r}/workers/workers/${encodeURIComponent(String(e.worker))}/previews/${encodeURIComponent(String(e.name))}`,{query:t}));S(i,{successLabel:`Deleted`})})};function G(e){return{getNormalizedContainerOptions:async t=>e.standard.normalized.map(e=>({...e,name:t.containers?.find(({class_name:t})=>t===e.class_name)?.name??e.name})),deployPreviewContainers:async(t,n,i,a,o)=>K(o.quiet,async()=>{let s=/* @__PURE__ */ new Map;for(let e of Object.values(i.env??{}))e.type===`durable_object_namespace`&&e.class_name&&e.namespace_id&&e.script_name===void 0&&s.set(e.class_name,e.namespace_id);let c;for(let r of n){let n=s.get(r.class_name);if(n||=(c??=await x(t,a),c.find(e=>e.class===r.class_name&&e.preview?.id===i.preview_id)?.id),!n)throw Error(`Could not find a Preview Durable Object namespace for Container class "${r.class_name}".`);let l=await q(r,e,i.id,a,t,o.localImageReferences?.get(r.class_name));await _({imageRef:l,durable_object_namespace_id:n,configFileName:`cloudflare.config.ts`,observabilityTargetPercentageField:`targetInstancePercentage`,observabilityTargetCountField:`targetInstanceCount`},r,t,a)}await h(e.standard.builtImages.filter(({container:e})=>!o.localImageReferences?.has(e.class_name)),r())})}}async function K(e,t){if(!e)return t();let n=f();d(`error`);try{return await t()}finally{d(n)}}async function q(e,t,n,i,a,o){if(o!==void 0)return p({pathToDocker:r(),sourceTag:o,targetTag:o,accountId:i,complianceConfig:a,containerConfig:`dockerfile`in e?e:void 0,cleanupSourceTag:!1});let s=t.standard.builtImages.find(({container:t})=>t.class_name===e.class_name);if(s)return b(s,n,r(),i,a);if(`image_uri`in e)return{newTag:e.image_uri};throw Error(`Container "${e.name}" has no Build Output image to deploy.`)}function J(e){return e.positional(`preview-name`,{type:`string`,description:`Preview name. Defaults to the current CI or Git branch; required if no branch is available.`}).option(`prebuilt`,{type:`boolean`,description:`Use existing Preview Build Output Specification files without building`,default:!1}).option(`worker`,z)}function Y(e){return{type:`preview`,version:1,preview_id:e.preview.id,preview_name:e.preview.name,preview_slug:e.preview.slug,preview_urls:e.preview.urls,deployment_id:e.deployment.id,deployment_urls:e.deployment.urls}}async function X(t){let n=t[`preview-name`],r=n??A();if(!r||!n&&r===`HEAD`)throw Error(`We couldn't determine a Preview name from CI or Git. The name is optional when a branch is available. Otherwise, run:
5
5
 
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./theme-BGHWSKCw.mjs";import{t}from"./args-BAOHroBC.mjs";import{n}from"./version-Bz705iJe.mjs";import{t as r}from"./session-X3xaW70I.mjs";import{s as i}from"./log-BWdaOGOW.mjs";import{n as a}from"./interactive-wQM7Blhm.mjs";const o={Hidden:0,Normal:1,Error:2,Indeterminate:3,Warning:4},s=new class{cleanupRegistered=!1;get isDisabled(){return process.env.CF_NO_OSC_PROGRESS===`1`||process.env.CF_QUIET===`1`||t()}get isSupported(){if(this.isDisabled||!process.stderr.isTTY)return!1;if(process.env.CF_FORCE_OSC_PROGRESS===`1`)return!0;let e=process.env.TERM_PROGRAM?.toLowerCase()??``;return!!(e.includes(`ghostty`)||e.includes(`iterm`)||e.includes(`wezterm`)||process.env.WT_SESSION||process.env.ConEmuANSI===`ON`)}setIndeterminate(){this.isSupported&&(this.ensureCleanup(),this.write(o.Indeterminate))}clear(){this.isSupported&&process.stderr.write(`\x1b]9;4;${o.Hidden};0\x07`)}ensureCleanup(){this.cleanupRegistered||(this.cleanupRegistered=!0,process.on(`exit`,()=>{this.clear()}))}write(e){this.isSupported&&process.stderr.write(`\x1b]9;4;${e};0\x07`)}},c=[`⠋`,`⠙`,`⠹`,`⠸`,`⠼`,`⠴`,`⠦`,`⠧`,`⠇`,`⠏`];function l(){return!(!e(process.env,process.stderr.isTTY===!0)||a()||process.env.CF_QUIET===`1`)}async function u(e,t){if(!l())return t();r(n);let a=i({frames:[...c],indicator:`timer`,delay:80,output:process.stderr});s.setIndeterminate(),a.start(e);let o=e=>process.exit(e===`SIGTERM`?143:130),u=e=>{e===0&&(process.exitCode=130)};process.on(`SIGINT`,o),process.on(`SIGTERM`,o),process.on(`exit`,u);try{let n=await t();return s.clear(),a.stop(e),n}catch(t){throw s.clear(),a.error(e),t}finally{process.off(`SIGINT`,o),process.off(`SIGTERM`,o),process.off(`exit`,u)}}export{u as t};
2
+ import{t as e}from"./theme-BGHWSKCw.mjs";import{t}from"./args-BAOHroBC.mjs";import{n}from"./version-DIIJ2ixL.mjs";import{t as r}from"./session-B7vOqdZU.mjs";import{s as i}from"./log-BWdaOGOW.mjs";import{n as a}from"./interactive-wQM7Blhm.mjs";const o={Hidden:0,Normal:1,Error:2,Indeterminate:3,Warning:4},s=new class{cleanupRegistered=!1;get isDisabled(){return process.env.CF_NO_OSC_PROGRESS===`1`||process.env.CF_QUIET===`1`||t()}get isSupported(){if(this.isDisabled||!process.stderr.isTTY)return!1;if(process.env.CF_FORCE_OSC_PROGRESS===`1`)return!0;let e=process.env.TERM_PROGRAM?.toLowerCase()??``;return!!(e.includes(`ghostty`)||e.includes(`iterm`)||e.includes(`wezterm`)||process.env.WT_SESSION||process.env.ConEmuANSI===`ON`)}setIndeterminate(){this.isSupported&&(this.ensureCleanup(),this.write(o.Indeterminate))}clear(){this.isSupported&&process.stderr.write(`\x1b]9;4;${o.Hidden};0\x07`)}ensureCleanup(){this.cleanupRegistered||(this.cleanupRegistered=!0,process.on(`exit`,()=>{this.clear()}))}write(e){this.isSupported&&process.stderr.write(`\x1b]9;4;${e};0\x07`)}},c=[`⠋`,`⠙`,`⠹`,`⠸`,`⠼`,`⠴`,`⠦`,`⠧`,`⠇`,`⠏`];function l(){return!(!e(process.env,process.stderr.isTTY===!0)||a()||process.env.CF_QUIET===`1`)}async function u(e,t){if(!l())return t();r(n);let a=i({frames:[...c],indicator:`timer`,delay:80,output:process.stderr});s.setIndeterminate(),a.start(e);let o=e=>process.exit(e===`SIGTERM`?143:130),u=e=>{e===0&&(process.exitCode=130)};process.on(`SIGINT`,o),process.on(`SIGTERM`,o),process.on(`exit`,u);try{let n=await t();return s.clear(),a.stop(e),n}catch(t){throw s.clear(),a.error(e),t}finally{process.off(`SIGINT`,o),process.off(`SIGTERM`,o),process.off(`exit`,u)}}export{u as t};
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import{r as e}from"./theme-BGHWSKCw.mjs";import{t}from"./cli-exit-CstFZ1eJ.mjs";import{n}from"./version-Bz705iJe.mjs";import{t as r}from"./session-X3xaW70I.mjs";import{a as i,c as a,l as o,n as s,o as c,r as l}from"./log-BWdaOGOW.mjs";import{n as u}from"./interactive-wQM7Blhm.mjs";import{i as d}from"./dialog-D5lus4M4.mjs";function f(e){return e.replace(/[\p{Cc}\p{Cf}\p{Zl}\p{Zp}]/gu,` `)}function p(){r(n)}async function m(){let e=[];for await(let t of process.stdin)e.push(Buffer.from(t));let t=Buffer.concat(e).toString(`utf-8`);return t.endsWith(`
2
+ import{r as e}from"./theme-BGHWSKCw.mjs";import{t}from"./cli-exit-CstFZ1eJ.mjs";import{n}from"./version-DIIJ2ixL.mjs";import{t as r}from"./session-B7vOqdZU.mjs";import{a as i,c as a,l as o,n as s,o as c,r as l}from"./log-BWdaOGOW.mjs";import{n as u}from"./interactive-wQM7Blhm.mjs";import{i as d}from"./dialog-D5lus4M4.mjs";function f(e){return e.replace(/[\p{Cc}\p{Cf}\p{Zl}\p{Zp}]/gu,` `)}function p(){r(n)}async function m(){let e=[];for await(let t of process.stdin)e.push(Buffer.from(t));let t=Buffer.concat(e).toString(`utf-8`);return t.endsWith(`
3
3
  `)?t.slice(0,-1):t}async function h(e,n,r){let s=r?.kind??`text`;if(u()){if(s===`secret`){let t=await m();if(t.length>0)return t;throw Error(`--${e} is required. Pipe the value via stdin, pass --${e} <value>, or run interactively.`)}throw Error(`--${e} is required. Pass --${e} <value> or run interactively.`)}let c=`Enter value for --${e}`,l=d(n||r?.question||c),f=e=>e&&e.length>0?r?.validate?.(e):`Value cannot be empty`;p();let h=s===`secret`?await i({message:l,mask:`•`,validate:f,output:process.stderr}):await a({message:l,validate:f,output:process.stderr});if(o(h)||typeof h!=`string`)throw new t(130,{cancelled:!0});return h}async function g(e,n,r,i={}){let a=f(e),s=r.map(f);if(u())throw Error(`--${a} is required (one of: ${s.join(`, `)}). Pass --${a} <value> or run interactively.`);let l=`Select value for --${a}`,d=f(n||l);p();let m=await c({message:d,output:process.stderr,options:r.map(e=>({value:e,label:f((Object.hasOwn(i,e)?i[e]:void 0)??e)}))});if(o(m)||typeof m!=`string`)throw new t(130,{cancelled:!0});return m}async function _(e,n){if(u())throw Error(`--${e} is required and must be true. Pass --${e} or run interactively.`);p();let r=await l({message:n||`Confirm --${e}`,initialValue:!1,output:process.stderr});if(o(r))throw new t(130,{cancelled:!0});return r===!0}async function v(e,{defaultValue:n=!0,fallbackValue:r=!0}={}){if(u())return process.stderr.write(`? ${e}\n Using fallback value in non-interactive context: ${r?`yes`:`no`}\n`),r;p();let i=await l({message:e,initialValue:n,output:process.stderr});if(o(i))throw new t(130,{cancelled:!0});return i===!0}async function y(n={}){if(n.force===!0)return!0;let r=n.message?`${n.message} Continue?`:`This permanently deletes the resource. Continue?`;if(u())throw process.stderr.write(`${e.warning(`?`)} ${r}\n ${e.muted(`(non-interactive; pass --force to confirm)`)}\nAborted.
4
4
  `),new t(1);p();let i=await l({message:r,initialValue:!1,output:process.stderr});if(o(i))throw new t(130,{cancelled:!0});return i===!0||(s(`Aborted.`,{output:process.stderr}),!1)}export{h as a,g as i,y as n,f as o,_ as r,v as t};