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,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,s as p,t as m}from"./body-parser-BKcZS9iJ.mjs";import{n as h}from"./input-validation-D7z60HJH.mjs";import{a as g,n as _}from"./prompt-kxvGZ6nF.mjs";var v={method:`POST`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/rulesets`,query:[`dry_run`],body:`json`};function y(e){return e.usage(`$0 rulesets create
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,s as p,t as m}from"./body-parser-BKcZS9iJ.mjs";import{n as h}from"./input-validation-D7z60HJH.mjs";import{a as g,n as _}from"./prompt-SNVLBS1b.mjs";var v={method:`POST`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/rulesets`,query:[`dry_run`],body:`json`};function y(e){return e.usage(`$0 rulesets create
3
3
 
4
4
  Creates a ruleset.`).option(`validate-only`,{type:`boolean`,description:"Validates the request without persisting changes when set to `true`. Responses that normally return 200 return `result: null`; endpoints that normally return 204 continue to return 204."}).option(`description`,{type:`string`,description:`An informative description of the ruleset.`,default:``}).option(`id`,{type:`string`,description:`The unique ID of the ruleset.`}).option(`name`,{type:`string`,description:`The human-readable name of the ruleset.`}).option(`kind`,{type:`string`,description:`The kind of the ruleset.`,choices:[`managed`,`custom`,`root`,`zone`]}).coerce(`kind`,e=>h(e,`kind`,`text`)).option(`phase`,{type:`string`,description:`The phase of the ruleset.`,choices:[`ddos_l4`,`ddos_l7`,`http_config_settings`,`http_custom_errors`,`http_log_custom_fields`,`http_ratelimit`,`http_request_cache_settings`,`http_request_dynamic_redirect`,`http_request_firewall_custom`,`http_request_firewall_managed`,`http_request_late_transform`,`http_request_origin`,`http_request_redirect`,`http_request_sanitize`,`http_request_sbfm`,`http_request_transform`,`http_response_cache_settings`,`http_response_compression`,`http_response_firewall_custom`,`http_response_firewall_managed`,`http_response_headers_transform`,`magic_transit`,`magic_transit_ids_managed`,`magic_transit_managed`,`magic_transit_ratelimit`]}).coerce(`phase`,e=>h(e,`phase`,`text`)).option(`rules`,{type:`string`,description:`The list of rules in the ruleset. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const b={command:`create`,describe:`Create an account or zone ruleset`,builder:y,handler:async e=>u({command:`rulesets create`,classification:{safeFlags:[`validate-only`,`kind`,`phase`,`dry-run`]}},e,async()=>{let n={dry_run:e[`validate-only`]};if(e.dryRun){let t=e.zone===void 0?await i():void 0,r=e.zone===void 0?`accounts`:`zones`,a=e.zone??t??`<account-id>`;c({command:`cf rulesets create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${r}/${a}/rulesets`,pathParams:{"account-or-zone":String(r),"account-or-zone-id":String(a)},query:n,bodyKind:`json`,body:e.body===void 0?m({description:h(e.description,`description`,`text`),id:h(e.id,`id`,`text`),name:h(e.name,`name`,`text`),kind:e.kind,phase:e.phase,rules:d(e.rules,`rules`)}):f(e.body)});return}let u=await r(e),p=e.zone===void 0?`accounts`:`zones`,_=p===`zones`?await a({zone:e.zone},u,{quiet:e.quiet}):e.local?t:await o();if(p===`zones`?e.zoneId=_:e.accountId=_,e.body){let t=f(e.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let r=await l(`Creating`,async()=>u.send(v,{body:t,account_or_zone:p,account_or_zone_id:_,...n}));s(r,{successLabel:`Created`});return}e.id===void 0&&(e.id=await g(`id`,`The unique ID of the ruleset.`));let y=m({description:h(e.description,`description`,`text`),id:h(e.id,`id`,`text`),name:h(e.name,`name`,`text`),kind:e.kind,phase:e.phase,rules:d(e.rules,`rules`)});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let b=await l(`Creating`,async()=>u.send(v,{body:y,account_or_zone:p,account_or_zone_id:_,...n}));s(b,{successLabel:`Created`})})};function x(e){return e.usage(`$0 rulesets delete <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{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{n as p}from"./prompt-kxvGZ6nF.mjs";var m={method:`POST`,path:t=>e`/accounts/${t.account_id}/rum/v2/${t.ruleset_id}/rules`,body:`json`};function h(e){return e.usage(`$0 rum rules bulk-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{n as p}from"./prompt-SNVLBS1b.mjs";var m={method:`POST`,path:t=>e`/accounts/${t.account_id}/rum/v2/${t.ruleset_id}/rules`,body:`json`};function h(e){return e.usage(`$0 rum rules bulk-create
3
3
 
4
4
  Modifies one or more rules in a Web Analytics ruleset with a single request.`).option(`ruleset-id`,{type:`string`,description:`The Web Analytics ruleset identifier.`,demandOption:!0}).option(`delete-rules`,{type:`string`,array:!0,description:`A list of rule identifiers to delete.`}).option(`rules`,{type:`string`,description:`A list of rules to create or update. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const g={command:`bulk-create`,describe:`Update Web Analytics rules`,builder:h,handler:async e=>c({command:`rum rules bulk-create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf rum rules bulk-create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/rum/v2/${e[`ruleset-id`]==null?`<ruleset-id>`:encodeURIComponent(String(e[`ruleset-id`]))}/rules`,pathParams:{"ruleset-id":String(e[`ruleset-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({delete_rules:e[`delete-rules`],rules:l(e.rules,`rules`)}):u(e.body)});return}let c=await n(e),f=e.local?t:await i();if(e.accountId=f,e.body){let t=u(e.body),n=await s(`Creating`,async()=>c.send(m,{body:t,account_id:f,ruleset_id:e[`ruleset-id`]}));a(n,{successLabel:`Created`});return}let p=d({delete_rules:e[`delete-rules`],rules:l(e.rules,`rules`)}),h=await s(`Creating`,async()=>c.send(m,{body:p,account_id:f,ruleset_id:e[`ruleset-id`]}));a(h,{successLabel:`Created`})})};var _={method:`POST`,path:t=>e`/accounts/${t.account_id}/rum/v2/${t.ruleset_id}/rule`,body:`json`};function v(e){return e.usage(`$0 rum rules create <ruleset-id>
5
5
 
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./agent-context-Dtyy4aKL.mjs";import{t}from"./cli-exit-CstFZ1eJ.mjs";import{$ as n}from"./dist-D5YYi2LO.mjs";import{n as r}from"./version-Bz705iJe.mjs";import{n as i,t as a}from"./delegate-CBKb0nov.mjs";import{i as o,r as s}from"./lifecycle-oud60haK.mjs";import{t as c}from"./interactive-wQM7Blhm.mjs";import{n as l}from"./interactive-DOWEcR6_.mjs";import{t as u}from"./request-headers-B5Rjq7Ic.mjs";import{n as d,t as f}from"./state-DNuVv5i-.mjs";import{t as p}from"./error-sanitization-ahuAGEjT.mjs";import{r as m}from"./sanitization-DkVWMHkc.mjs";import h from"node:os";import{createHash as g,randomUUID as _}from"node:crypto";const v=/* @__PURE__ */ new Date(`2026-01-01T00:00:00.000Z`),y=`CF_SEND_TELEMETRY`,b=`WRANGLER_SEND_METRICS`,x=/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;function S(e){if(e===void 0)return;let t=e.trim().toLowerCase();if(t===`true`||t===`1`)return!0;if(t===`false`||t===`0`)return!1}function C(){let e=S(process.env[y]);if(e!==void 0)return{enabled:e,source:`env`};let t=S(process.env[b]);if(t!==void 0)return{enabled:t,source:`wrangler-env`}}function w(){return C()?.enabled}function T(){let e=f();if(typeof e.deviceId==`string`&&x.test(e.deviceId))return e.deviceId;let t=_();return d({deviceId:t}),t}function E(){return f().deviceId===void 0}function D(){if(n())return{enabled:!1,source:`do-not-track`};let e=C();if(e!==void 0)return e;let t=f().telemetry?.preference;return t?.enabled===!1?{enabled:!1,source:`config`}:t?.enabled===!0&&typeof t.date==`string`&&new Date(t.date)>=v?{enabled:!0,source:`config`}:{enabled:!0,source:`default`}}function O(e){switch(e){case`do-not-track`:return`DO_NOT_TRACK`;case`env`:return y;case`wrangler-env`:return b;default:return}}function k(e){d({telemetry:{preference:{enabled:e,date:(/* @__PURE__ */ new Date()).toISOString()}}})}function A(){return f().telemetry?.bannerLastShown}function j(e){d({telemetry:{bannerLastShown:e}})}const M=/^\d{1,5}\.\d{1,5}\.\d{1,5}(?:-[0-9A-Za-z.-]{1,40})?(?:\+[0-9A-Za-z.-]{1,40})?$/;function N(){switch(process.platform){case`win32`:return`Windows`;case`darwin`:return`Mac OS`;case`linux`:return`Linux`;default:return`Others: ${process.platform}`}}function P(){return h.version()}function F(){return process.arch}function I(){return Number.parseInt(process.versions.node.split(`.`)[0]??`0`,10)}function L(){let e=process.env.npm_config_user_agent??``;return e.startsWith(`pnpm`)?`pnpm`:e.startsWith(`yarn`)?`yarn`:e.startsWith(`bun`)?`bun`:e.startsWith(`npm`)?`npm`:`unknown`}function R(e=process.env,t=process.ppid){if(!e.CF_DELEGATION)return!1;let n=e[a];return n===void 0||n===String(t)}function z(e=process.env,t=process.ppid){if(!e.CF_DELEGATION_PID||!R(e,t))return;let n=e[i];if(!(typeof n!=`string`||n.length>64||!M.test(n)))return n}function B(e,t,n){return g(`sha256`).update(`cf-agent-session-v1\0`).update(e).update(`\0`).update(t).update(`\0`).update(n).digest(`hex`).slice(0,32)}function V(){return typeof PACKAGE_PRERELEASE_LABEL==`string`?PACKAGE_PRERELEASE_LABEL:void 0}let H;function U(){if(H)return H;let[t,n,i]=r.split(`.`).map(e=>{let t=Number.parseInt(e,10);return Number.isNaN(t)?0:t}),a=Date.now(),s=0,d=E(),{enabled:f}=D(),p=e(),m=p.harness?.id??null,h=p.matches.find(e=>e.sessionId),g=R(),_=z();function v(){let e=V(),o=T();return{product:`cf`,cliVersion:r,cliMajor:t??0,cliMinor:n??0,cliPatch:i??0,...e?{prereleaseLabel:e}:{},osPlatform:N(),osVersion:P(),arch:F(),nodeVersion:I(),packageManager:L(),deviceId:o,amplitude_session_id:a,amplitude_event_id:s++,...h?.sessionId?{agentSessionKey:B(o,h.harness.id,h.sessionId)}:{},isFirstUsage:d,isCI:c,isInteractive:l(),cliMode:u(),agent:m,delegated:g,..._?{globalCliVersion:_}:{}}}function y(e,t){let n={deviceId:t.deviceId,event:e,timestamp:Date.now(),properties:t};if(process.env.DEBUG&&console.error(`Telemetry ${f?`sending`:`would send`}: ${JSON.stringify(n)}`),f)return fetch(`https://sparrow.cloudflare.com/api/v1/event`,{method:`POST`,signal:AbortSignal.timeout(1e3),headers:{Accept:`*/*`,"Content-Type":`application/json`,"Sparrow-Source-Key":`50598e014ed44c739ec8074fdc16057c`},mode:`cors`,keepalive:!0,body:JSON.stringify(n)}).then(()=>void 0).catch(e=>{process.env.DEBUG&&console.error(`Telemetry failed to send:`,e instanceof Error?e.message:String(e))})}return H={enabled:f,sendCommandEvent(e,t){if(f)try{o(y(e,{...v(),...t}))}catch(e){process.env.DEBUG&&console.error(`Telemetry failed to prepare:`,e)}},sendAdhocEvent(e,t={}){if(f)try{o(y(e,{...v(),...t}))}catch(e){process.env.DEBUG&&console.error(`Telemetry failed to prepare:`,e)}}},H}const W=/* @__PURE__ */ new Set([`SIGINT`,`SIGTERM`]),G=1024;function K(e){if(e instanceof t)return e.cancelled||e.signal&&W.has(e.signal)?`cancelled`:e.code===0?`success`:`error`}async function q(e,t,n){let r;try{r=U()}catch{return n()}if(s(),e.sendMetrics===!1||!r.enabled)return n();let i={...e.recordArgs===!1?{sanitizedArgs:{},argsUsed:[],argsCombination:``}:m(t,process.argv.slice(2),e.classification),command:e.command};r.sendCommandEvent(`cf command started`,i);let a=e.searchQuery===void 0?{}:{searchQuery:e.searchQuery.slice(0,G),...e.searchQuery.length>G?{searchQueryTruncated:!0}:{}},o=Date.now();try{let e=await n();return r.sendCommandEvent(`cf command finished`,{...i,...a,outcome:`success`,durationMs:Date.now()-o}),e}catch(e){let t=K(e)??`error`;throw r.sendCommandEvent(`cf command finished`,{...i,...a,outcome:t,durationMs:Date.now()-o,...t===`error`?p(e):{}}),e}}function J(e,t){return{...e,handler:n=>q(t,n,()=>e.handler(n))}}export{v as a,w as c,D as d,j as f,y as i,O as l,J as n,A as o,k as p,U as r,T as s,q as t,E as u};
2
+ import{t as e}from"./agent-context-Dtyy4aKL.mjs";import{t}from"./cli-exit-CstFZ1eJ.mjs";import{$ as n}from"./dist-ataVE8ob.mjs";import{n as r}from"./version-DIIJ2ixL.mjs";import{n as i,t as a}from"./delegate-CTj0dYET.mjs";import{i as o,r as s}from"./lifecycle-oud60haK.mjs";import{t as c}from"./interactive-wQM7Blhm.mjs";import{n as l}from"./interactive-1g0dnrA8.mjs";import{t as u}from"./request-headers-Cn01EsbI.mjs";import{n as d,t as f}from"./state-B8n0QU04.mjs";import{t as p}from"./error-sanitization-ahuAGEjT.mjs";import{r as m}from"./sanitization-DkVWMHkc.mjs";import h from"node:os";import{createHash as g,randomUUID as _}from"node:crypto";const v=/* @__PURE__ */ new Date(`2026-01-01T00:00:00.000Z`),y=`CF_SEND_TELEMETRY`,b=`WRANGLER_SEND_METRICS`,x=/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;function S(e){if(e===void 0)return;let t=e.trim().toLowerCase();if(t===`true`||t===`1`)return!0;if(t===`false`||t===`0`)return!1}function C(){let e=S(process.env[y]);if(e!==void 0)return{enabled:e,source:`env`};let t=S(process.env[b]);if(t!==void 0)return{enabled:t,source:`wrangler-env`}}function w(){return C()?.enabled}function T(){let e=f();if(typeof e.deviceId==`string`&&x.test(e.deviceId))return e.deviceId;let t=_();return d({deviceId:t}),t}function E(){return f().deviceId===void 0}function D(){if(n())return{enabled:!1,source:`do-not-track`};let e=C();if(e!==void 0)return e;let t=f().telemetry?.preference;return t?.enabled===!1?{enabled:!1,source:`config`}:t?.enabled===!0&&typeof t.date==`string`&&new Date(t.date)>=v?{enabled:!0,source:`config`}:{enabled:!0,source:`default`}}function O(e){switch(e){case`do-not-track`:return`DO_NOT_TRACK`;case`env`:return y;case`wrangler-env`:return b;default:return}}function k(e){d({telemetry:{preference:{enabled:e,date:(/* @__PURE__ */ new Date()).toISOString()}}})}function A(){return f().telemetry?.bannerLastShown}function j(e){d({telemetry:{bannerLastShown:e}})}const M=/^\d{1,5}\.\d{1,5}\.\d{1,5}(?:-[0-9A-Za-z.-]{1,40})?(?:\+[0-9A-Za-z.-]{1,40})?$/;function N(){switch(process.platform){case`win32`:return`Windows`;case`darwin`:return`Mac OS`;case`linux`:return`Linux`;default:return`Others: ${process.platform}`}}function P(){return h.version()}function F(){return process.arch}function I(){return Number.parseInt(process.versions.node.split(`.`)[0]??`0`,10)}function L(){let e=process.env.npm_config_user_agent??``;return e.startsWith(`pnpm`)?`pnpm`:e.startsWith(`yarn`)?`yarn`:e.startsWith(`bun`)?`bun`:e.startsWith(`npm`)?`npm`:`unknown`}function R(e=process.env,t=process.ppid){if(!e.CF_DELEGATION)return!1;let n=e[a];return n===void 0||n===String(t)}function z(e=process.env,t=process.ppid){if(!e.CF_DELEGATION_PID||!R(e,t))return;let n=e[i];if(!(typeof n!=`string`||n.length>64||!M.test(n)))return n}function B(e,t,n){return g(`sha256`).update(`cf-agent-session-v1\0`).update(e).update(`\0`).update(t).update(`\0`).update(n).digest(`hex`).slice(0,32)}function V(){return typeof PACKAGE_PRERELEASE_LABEL==`string`?PACKAGE_PRERELEASE_LABEL:void 0}let H;function U(){if(H)return H;let[t,n,i]=r.split(`.`).map(e=>{let t=Number.parseInt(e,10);return Number.isNaN(t)?0:t}),a=Date.now(),s=0,d=E(),{enabled:f}=D(),p=e(),m=p.harness?.id??null,h=p.matches.find(e=>e.sessionId),g=R(),_=z();function v(){let e=V(),o=T();return{product:`cf`,cliVersion:r,cliMajor:t??0,cliMinor:n??0,cliPatch:i??0,...e?{prereleaseLabel:e}:{},osPlatform:N(),osVersion:P(),arch:F(),nodeVersion:I(),packageManager:L(),deviceId:o,amplitude_session_id:a,amplitude_event_id:s++,...h?.sessionId?{agentSessionKey:B(o,h.harness.id,h.sessionId)}:{},isFirstUsage:d,isCI:c,isInteractive:l(),cliMode:u(),agent:m,delegated:g,..._?{globalCliVersion:_}:{}}}function y(e,t){let n={deviceId:t.deviceId,event:e,timestamp:Date.now(),properties:t};if(process.env.DEBUG&&console.error(`Telemetry ${f?`sending`:`would send`}: ${JSON.stringify(n)}`),f)return fetch(`https://sparrow.cloudflare.com/api/v1/event`,{method:`POST`,signal:AbortSignal.timeout(1e3),headers:{Accept:`*/*`,"Content-Type":`application/json`,"Sparrow-Source-Key":`50598e014ed44c739ec8074fdc16057c`},mode:`cors`,keepalive:!0,body:JSON.stringify(n)}).then(()=>void 0).catch(e=>{process.env.DEBUG&&console.error(`Telemetry failed to send:`,e instanceof Error?e.message:String(e))})}return H={enabled:f,sendCommandEvent(e,t){if(f)try{o(y(e,{...v(),...t}))}catch(e){process.env.DEBUG&&console.error(`Telemetry failed to prepare:`,e)}},sendAdhocEvent(e,t={}){if(f)try{o(y(e,{...v(),...t}))}catch(e){process.env.DEBUG&&console.error(`Telemetry failed to prepare:`,e)}}},H}const W=/* @__PURE__ */ new Set([`SIGINT`,`SIGTERM`]),G=1024;function K(e){if(e instanceof t)return e.cancelled||e.signal&&W.has(e.signal)?`cancelled`:e.code===0?`success`:`error`}async function q(e,t,n){let r;try{r=U()}catch{return n()}if(s(),e.sendMetrics===!1||!r.enabled)return n();let i={...e.recordArgs===!1?{sanitizedArgs:{},argsUsed:[],argsCombination:``}:m(t,process.argv.slice(2),e.classification),command:e.command};r.sendCommandEvent(`cf command started`,i);let a=e.searchQuery===void 0?{}:{searchQuery:e.searchQuery.slice(0,G),...e.searchQuery.length>G?{searchQueryTruncated:!0}:{}},o=Date.now();try{let e=await n();return r.sendCommandEvent(`cf command finished`,{...i,...a,outcome:`success`,durationMs:Date.now()-o}),e}catch(e){let t=K(e)??`error`;throw r.sendCommandEvent(`cf command finished`,{...i,...a,outcome:t,durationMs:Date.now()-o,...t===`error`?p(e):{}}),e}}function J(e,t){return{...e,handler:n=>q(t,n,()=>e.handler(n))}}export{v as a,w as c,D as d,j as f,y as i,O as l,J as n,A as o,k as p,U as r,T as s,q as t,E as u};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export{t as runWithTelemetry}from"./run-Br8sYjNF.mjs";
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ import{n as e}from"./version-DIIJ2ixL.mjs";import{a as t}from"./cf-DgLg6Hop.mjs";import{mkdirSync as n,readFileSync as r,writeFileSync as i}from"node:fs";import{dirname as a,join as o}from"node:path";import{createHash as s}from"node:crypto";function c(n,r){let i=s(`sha256`).update([e,...r].join(` `)).digest(`hex`).slice(0,32);return o(t(),`cache`,n,`${i}.json`)}function l(e,t,n,i){try{let a=JSON.parse(r(c(e,t),`utf-8`));return typeof a?.fetchedAt==`number`&&Date.now()-a.fetchedAt<=n?i(a.value):void 0}catch{return}}function u(e,t,r){try{let o=c(e,t);n(a(o),{recursive:!0}),i(o,JSON.stringify({fetchedAt:Date.now(),value:r}),`utf-8`)}catch{}}const d=5e3;function f(e,t=/* @__PURE__ */ new WeakSet){if(typeof e!=`object`||!e||Array.isArray(e)||t.has(e))return!1;t.add(e);let n=e,r=/* @__PURE__ */ new Set([`array`,`boolean`,`integer`,`null`,`number`,`object`,`string`]),i=Array.isArray(n.type)?n.type:[n.type];if(n.type!==void 0&&(i.length===0||!i.every(e=>typeof e==`string`&&r.has(e)))||n.description!==void 0&&typeof n.description!=`string`||n.title!==void 0&&typeof n.title!=`string`||n.required!==void 0&&(!Array.isArray(n.required)||!n.required.every(e=>typeof e==`string`))||n.enum!==void 0&&!Array.isArray(n.enum)||n.oneOf!==void 0&&(!Array.isArray(n.oneOf)||n.oneOf.length===0||!n.oneOf.every(e=>f(e,t)))||n.anyOf!==void 0&&(!Array.isArray(n.anyOf)||n.anyOf.length===0||!n.anyOf.every(e=>f(e,t)))||n.allOf!==void 0&&(!Array.isArray(n.allOf)||n.allOf.length===0||!n.allOf.every(e=>f(e,t)))||n.if!==void 0&&!f(n.if,t)||n.then!==void 0&&!f(n.then,t)||n.additionalProperties!==void 0&&typeof n.additionalProperties!=`boolean`&&!f(n.additionalProperties,t)||n.uniqueItems!==void 0&&typeof n.uniqueItems!=`boolean`||[`minLength`,`maxLength`,`minimum`,`maximum`,`multipleOf`,`minItems`,`maxItems`,`minProperties`,`maxProperties`].some(e=>n[e]!==void 0&&(typeof n[e]!=`number`||!Number.isFinite(n[e])))||[`exclusiveMinimum`,`exclusiveMaximum`].some(e=>n[e]!==void 0&&typeof n[e]!=`boolean`&&(typeof n[e]!=`number`||!Number.isFinite(n[e])))||n.items!==void 0&&!(Array.isArray(n.items)?n.items:[n.items]).every(e=>f(e,t))||n.properties!==void 0&&(n.properties===null||typeof n.properties!=`object`||Array.isArray(n.properties)||!Object.values(n.properties).every(e=>f(e,t))))return!1;if(n.pattern!==void 0){if(typeof n.pattern!=`string`)return!1;try{new RegExp(n.pattern)}catch{return!1}}return!0}function p(e,t){if(typeof e!=`object`||!e)return;let n=e[t]??e;if(typeof n!=`object`||!n||!f(n))return;let r=n;return r.properties??r.oneOf??r.anyOf??r.allOf?r:void 0}function m(e,t){return l(e,t,36e5,e=>f(e)?e:void 0)}function h(e,t,n){u(e,t,n)}function g(e){if(typeof e!=`object`||!e)return`the request failed`;let t=e.statusCode;if(t===404)return`not found, or this account can't access it`;if(t===401)return"credentials were rejected; update `CLOUDFLARE_API_TOKEN` or run `cf auth login`";if(t===403)return`these credentials can't read it — check your API token permissions`;let n=e.message;if(!n)return`the request failed`;let r=(n.split(`
3
+ `)[0]??``).replace(/\.$/,``);return/^"?timeout"?$/i.test(r)?`the request timed out`:r}export{h as a,m as i,g as n,l as o,p as r,u as s,d as t};
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env node
2
+ import{r as e}from"./theme-BGHWSKCw.mjs";import{s as t}from"./body-parser-BKcZS9iJ.mjs";import{n}from"./input-validation-D7z60HJH.mjs";import{o as r}from"./prompt-SNVLBS1b.mjs";import{isDeepStrictEqual as i}from"node:util";const a=/* @__PURE__ */ new Set(/* @__PURE__ */ `$comment.$defs.$id.$schema.additionalProperties.allOf.anyOf.const.default.definitions.deprecated.description.discriminator.enum.example.examples.exclusiveMaximum.exclusiveMinimum.externalDocs.if.items.maxItems.maxLength.maxProperties.maximum.minItems.minLength.minProperties.minimum.multipleOf.oneOf.pattern.properties.readOnly.required.then.title.type.uniqueItems.writeOnly.xml`.split(`.`));function o(e){let t=e.additionalProperties!==void 0&&typeof e.additionalProperties==`object`?[e.additionalProperties]:[],n=e.items===void 0?[]:Array.isArray(e.items)?e.items:[e.items];return[...Object.values(e.properties??{}),...t,...n,...e.oneOf??[],...e.anyOf??[],...e.allOf??[],...e.if?[e.if]:[],...e.then?[e.then]:[]]}function s(e,t){if(t.has(e))return!1;t.add(e);let n=e;return n.nullable===!0||n[`x-nullable`]===!0?!1:Object.keys(n).every(e=>a.has(e)||e.startsWith(`x-`))&&o(e).every(e=>s(e,t))}function c(e){return s(e,/* @__PURE__ */ new WeakSet)}function l(e){return e.replace(/([a-z0-9])([A-Z])/g,`$1 $2`).split(/[-_\s]+/).filter(Boolean).map(e=>`${e[0]?.toUpperCase()??``}${e.slice(1)}`).join(` `)}function u(e){let t=e.path.at(-1)??e.name,n=r(e.schema.title?.trim()||l(t)),i=e.description?r(e.description.trim()):void 0;return!i||i.toLocaleLowerCase()===n.toLocaleLowerCase()?n:`${n} — ${i}`}function d(e){return e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).replace(/_/g,`-`).toLowerCase()}const f=/* @__PURE__ */ new Set([`__proto__`,`constructor`,`prototype`]);function p(e){return e.every(e=>!f.has(e))}function m(e,t){return e!==void 0&&Object.hasOwn(e,t)?e[t]:void 0}function h(e){return e.replace(/-([a-z0-9])/g,(e,t)=>t.toUpperCase())}function g(e){return e.type===void 0&&e.properties===void 0&&e.enum===void 0&&e.const===void 0&&e.oneOf===void 0&&e.anyOf===void 0}function _(e){if(e===null)return`json`;if(Array.isArray(e))return`array`;switch(typeof e){case`boolean`:return`boolean`;case`number`:return`number`;case`object`:return`object`;default:return`string`}}function v(e){let t=y(e);if(t.length>1){let e=new Set(t.map(v));return e.size===2&&e.has(`string`)&&e.has(`array`)?`string-or-array`:e.has(void 0)?void 0:e.size===1?[...e][0]??`json`:`json`}if(t[0]!==e)return v(t[0]??{});if(Array.isArray(e.type)&&e.type.includes(`object`)&&e.type.some(e=>e!==`object`))return`json`;let n=Array.isArray(e.type)?e.type.find(e=>e!==`null`):e.type;if(n===`null`||Array.isArray(e.type)&&e.type.length===1&&e.type[0]===`null`)return`json`;if(n===void 0){let t=e.const===void 0?e.enum:[e.const];if(t?.length){let e=new Set(t.map(_));return e.size===1?[...e][0]??`json`:`json`}}if(n===void 0&&e.properties)return`object`;if(n===void 0&&g(e))return`json`;switch(n){case`number`:case`integer`:return`number`;case`boolean`:return`boolean`;case`array`:return`array`;case`object`:return`object`;default:return`string`}}function y(e){let t=e.oneOf??e.anyOf;return t?.length?t:[e]}function b(e,t){if(e===void 0)return t;if(t===void 0)return e;let n=new Set(Array.isArray(e)?e:[e]),r=new Set(Array.isArray(t)?t:[t]),i=(e,t)=>e.has(t)||t===`integer`&&e.has(`number`),a=[`array`,`boolean`,`integer`,`null`,`number`,`object`,`string`].filter(e=>i(n,e)&&i(r,e));return a.includes(`number`)&&a.splice(a.indexOf(`integer`),1),a.length===1?a[0]:a.length>1?a:void 0}function x(e,t){return e===void 0?t:t===void 0?e:e.filter(e=>t.some(t=>i(e,t)))}function S(e,t){let n=t.flatMap(t=>[...t[e]===void 0?[]:[t[e]],...(t.allOf??[]).flatMap(t=>C(e,t))]),r=n[0];return n.length>0&&n.every(e=>i(e,r))?r:void 0}function C(e,t){return[...t[e]===void 0?[]:[t[e]],...(t.allOf??[]).flatMap(t=>C(e,t))]}function ee(e,t){return{type:b(e.type,t.type),title:e.title??t.title,description:e.description??t.description,enum:x(e.enum,t.enum),const:S(`const`,[e,t]),default:S(`default`,[e,t]),oneOf:e.oneOf===void 0?t.oneOf:t.oneOf===void 0?e.oneOf:void 0,anyOf:e.anyOf===void 0?t.anyOf:t.anyOf===void 0?e.anyOf:void 0,allOf:[e,t]}}function w(e){if(!e.allOf?.length)return e;let t=new Map(Object.entries(e.properties??{})),n=new Set(e.required??[]),r=e.type,i=e.title,a=e.description,o=e.enum;for(let s of e.allOf){let e=w(s);r=b(r,e.type),i??=e.title,a??=e.description,o=x(o,e.enum);for(let t of e.required??[])n.add(t);for(let[n,r]of Object.entries(e.properties??{})){let e=t.get(n);t.set(n,e===void 0?r:ee(e,r))}}return{...e,type:r,title:i,description:a,enum:o,const:S(`const`,[e]),default:S(`default`,[e]),properties:t.size>0?Object.fromEntries(t):e.properties,required:n.size>0?[...n]:e.required}}function T(e){return{...e,oneOf:void 0,anyOf:void 0}}function E(e){return(e.allOf??[]).flatMap(e=>[e,...E(e)])}function D(e){return[e,...E(e)].flatMap(e=>[...e.oneOf?.length?[e.oneOf]:[],...e.anyOf?.length?[e.anyOf]:[]])}function O(e){return Object.keys(w(T(e)).properties??{}).length>0||D(e).some(e=>e.some(O))}function k(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function A(e){let t=w(e),n=t.type===void 0?void 0:Array.isArray(t.type)?t.type:[t.type];return n?.length&&n.every(e=>e===`object`)?!0:n!==void 0&&!n.includes(`object`)?!1:t.const===void 0?t.enum?.length&&t.enum.every(e=>k(e))||D(e).some(e=>e.every(A))?!0:e.allOf?.some(A)??!1:k(t.const)}function j(e){let t=e.oneOf??e.anyOf;if(!t?.length)return;let n=[];for(let e of t){let t=e.const===void 0?e.enum?.every(e=>typeof e==`string`||typeof e==`number`||typeof e==`boolean`)?e.enum:void 0:[e.const];if(!t?.length||!t.every(e=>typeof e==`string`||typeof e==`number`||typeof e==`boolean`))return;for(let i of t)n.push({value:i,label:t.length===1&&e.title?r(e.title):void 0})}return n}function te(e){let t=e.enum?.every(e=>typeof e==`string`||typeof e==`number`||typeof e==`boolean`)?e.enum:void 0;return t?.length?t.map(e=>({value:e})):j(e)}function M(e){let t=e.oneOf??e.anyOf;if(!t?.length)return;let n=[];for(let e of t){let t=e.const===void 0?e.enum?.every(e=>typeof e==`string`||typeof e==`number`||typeof e==`boolean`)?e.enum:void 0:[e.const];if(t?.length&&t.every(e=>typeof e==`string`||typeof e==`number`||typeof e==`boolean`))for(let i of t){let t=W(i),a=e.title?r(e.title):void 0;n.push(a?`${t} (${a})`:t)}else if(e.pattern&&v(e)===`string`){let t=r(e.pattern),i=e.title?r(e.title):void 0;n.push(i?`${t} (${i})`:t)}else return}return n.length>0?n:void 0}function N(e,t,n,r,i){if(!p(e))return;let a=i??v(t);if(a===void 0)return;let o=a===`json`?void 0:te(t),s=o?.map(({value:e})=>String(e)),c=Object.fromEntries((o??[]).filter(({value:e,label:t})=>t&&t!==String(e)).map(({value:e,label:t})=>[String(e),t])),l=e.map(d).join(`-`);if(![`mode`,`temporary-account`,`event-code`].includes(l))return{name:l,path:e,type:a,required:n,requiredWhen:r,description:t.description?.split(`
3
+ `)[0]??t.title,choices:s?.length?s:void 0,choiceLabels:Object.keys(c).length>0?c:void 0,schema:t}}function ne(e,t){return e===t?e:[.../* @__PURE__ */ new Set([e,t])].every(e=>e===`string`||e===`array`||e===`string-or-array`)?`string-or-array`:`json`}function re(e,t){let n=ne(e.type,t.type),r=e.schema.description??t.schema.description,a=n===`json`||n===`string-or-array`?{description:r}:{type:n===`number`?`number`:n,description:r};return{...e,type:n,required:e.required&&t.required,requiredWhen:F(e.requiredWhen,t.requiredWhen)?e.requiredWhen:void 0,choices:void 0,choiceLabels:void 0,schema:a,requiredIf:i(e.requiredIf,t.requiredIf)?e.requiredIf:void 0,requiredContainer:e.requiredContainer&&t.requiredContainer?!0:void 0}}function P(e,t={}){let n=new Set((t.exclude??[]).map(e=>e.join(`.`))),r=/* @__PURE__ */ new Map,a=/* @__PURE__ */ new Set,o=(e,t,n)=>{let i=r.get(e);n?a.has(e)||r.set(e,i===void 0?t:re(i,t)):(a.add(e),r.set(e,t))},s=(e,t,s)=>{for(let c of[e,...E(e)]){let l=c.if,u=c.then?w(c.then):void 0,d=u?.required;if(!l||!d?.length)continue;let f=Object.keys(l),h=l.type===void 0?void 0:Array.isArray(l.type)?l.type:[l.type];if(f.some(e=>![`$comment`,`description`,`properties`,`required`,`title`,`type`].includes(e))||h!==void 0&&!h.includes(`object`))continue;let g=new Set(l.required??[]),_=l.properties??{};if(Object.keys(_).some(e=>!g.has(e)))continue;let v=[],y=!0;for(let e of g){if(!p([...t,e])){y=!1;break}let n=m(_,e),r;if(n){if(Object.keys(n).some(e=>![`$comment`,`const`,`default`,`description`,`enum`,`examples`,`title`,`type`].includes(e))){y=!1;break}if(r=n.enum,n.const!==void 0&&(r=(r??[n.const]).filter(e=>i(e,n.const))),n.type!==void 0){if(r===void 0){y=!1;break}let e=Array.isArray(n.type)?n.type:[n.type];r=r.filter(t=>e.some(e=>J(e,t)))}}v.push({path:[...t,e],values:r})}if(y&&v.length!==0)for(let c of d){let l=[...t,c].join(`.`);if(n.has(l))continue;let d={predicates:v},f=r.get(l),p=s&&m(e.properties,c)===void 0&&!a.has(l);if(!f||p){let e=m(u?.properties,c),n=e===void 0?void 0:N([...t,c],w(e),!1);n&&(o(l,n,s),f=r.get(l))}!s&&f&&!f.requiredIf?.some(e=>i(e,d))&&(f.requiredIf=[...f.requiredIf??[],d])}}},c=(e,t,i,a=!1)=>{let l=w(T(e));if(l.properties){let e=new Set(l.required??[]);for(let[s,u]of Object.entries(l.properties)){let l=[...t,s],d=l.join(`.`);if(!p(l)||n.has(d))continue;let f=w(u),m=O(u),h=m&&A(u),g=!a&&e.has(s),_=g&&i===void 0,v=g&&i!==void 0?i:void 0;if(h){c(u,l,g?i:l,a);let e=[...r.values()].some(e=>e.required===_&&F(e.requiredWhen,v)&&e.path.length>l.length&&l.every((t,n)=>e.path[n]===t));if(g&&!e){let e=N(l,u,_,v);e&&o(d,{...e,requiredContainer:!0},a)}continue}let y=N(l,f,_,v,m?`json`:void 0);y&&o(d,y,a)}}for(let n of D(e))for(let e of n)c(e,t,i,!0);for(let n of[e,...E(e)])n.if&&n.then&&c(n.then,t,i,!0);s(l,t,a)};return c(e,[]),[...r.values()].sort((e,t)=>e.required===t.required?e.name.localeCompare(t.name):e.required?-1:1)}function F(e,t){return e===t||e!==void 0&&t!==void 0&&e.length===t.length&&e.every((e,n)=>e===t[n])}function ie(t,n){if(t.length===0)return`${e.brand(r(n))}\n (no input fields)`;let i=process.stdout.columns??80,a=t.map(e=>`--${r(e.name)}`),o=Math.min(Math.max(...a.map(e=>e.length))+2,42),s=t.map((e,t)=>{let n=[`[${e.type}]`];e.required?n.push(`[required]`):e.requiredWhen&&n.push(`[required with --${r(e.requiredWhen.map(d).join(`-`))}-*]`),e.requiredIf&&n.push(`[conditionally required]`),e.choices&&n.push(`[choices: ${e.choices.map(t=>{let n=r(t),i=e.choiceLabels&&Object.hasOwn(e.choiceLabels,t)?e.choiceLabels[t]:void 0;return i?`${r(i)} (${n})`:n}).join(`, `)}]`),e.schema.const!==void 0&&n.push(`[must be: ${r(JSON.stringify(e.schema.const)??`undefined`)}]`),e.schema.default!==void 0&&n.push(`[default: ${r(JSON.stringify(e.schema.default)??`undefined`)}]`);let s=n.join(` `),c=Math.max(i-o-4,20)-s.length-1,l=e.description===void 0?void 0:r(e.description),u=l===void 0||c<12?``:l.length>c?`${l.slice(0,c-1)}…`:l,f=a[t]??``;return` ${f.length<o?f.padEnd(o):`${f} `}${[u,s].filter(Boolean).join(` `)}`});return[e.brand(r(n)),...s].join(`
4
+ `)}const ae=`_ $0 -- body dry-run dryRun event-code eventCode help h local m mode persist-to persistTo profile quiet q temporary-account temporaryAccount version v zone z`.split(` `);function I(e,t){let n=Object.hasOwn(t,e.name)?t[e.name]:void 0,r=h(e.name);return n===void 0&&Object.hasOwn(t,r)?t[r]:n}function oe(e,t,n){return e.filter(r=>{let i=n!==void 0&&R(n,r.path).found;return z(r,e,t,n)&&I(r,t)===void 0&&!i&&!B(r.path,e,t)&&!(r.requiredContainer&&V(r,e,t))})}function L(e,t){let n=e=>R(t,e);return e.filter(e=>se(e,n)&&!n(e.path).found)}function R(e,t){let n=e;for(let e of t){if(typeof n!=`object`||!n||Array.isArray(n)||!Object.hasOwn(n,e))return{found:!1};n=n[e]}return{found:!0,value:n}}function se(e,t){return e.required||e.requiredWhen!==void 0&&t(e.requiredWhen).found||(e.requiredIf?.some(({predicates:e})=>e.every(({path:e,values:n})=>{let r=t(e);return r.found&&(n===void 0||n.some(e=>i(r.value,e)))}))??!1)}function z(e,t,n,r){return e.required||e.requiredWhen!==void 0&&(B(e.requiredWhen,t,n)||r!==void 0&&R(r,e.requiredWhen).found)||(e.requiredIf?.some(({predicates:e})=>e.every(({path:e,values:a})=>{let o=ce(e,t,n),s=o.found||r===void 0?o:R(r,e),c=!o.found||o.descriptor===void 0||!F(o.descriptor.path,e)?s.value:G(o.descriptor,s.value,[]);return s.found&&(a===void 0||a.some(e=>i(c,e)))}))??!1)}function ce(e,t,n){for(let r of t){let t=I(r,n);if(t===void 0||r.path.length>e.length||!r.path.every((t,n)=>e[n]===t))continue;let i=t;if(typeof i==`string`&&r.path.length<e.length)try{i=JSON.parse(i)}catch{continue}for(let t of e.slice(r.path.length)){if(typeof i!=`object`||!i||Array.isArray(i)||!Object.hasOwn(i,t)){i=void 0;break}i=i[t]}if(i!==void 0)return{found:!0,value:i,descriptor:r}}return{found:!1}}function B(e,t,n){return t.some(t=>{let r=I(t,n);if(r===void 0)return!1;if(t.path.length>=e.length)return e.every((e,n)=>t.path[n]===e);if(!t.path.every((t,n)=>e[n]===t))return!1;let i=r;if(typeof i==`string`)try{i=JSON.parse(i)}catch{return!1}for(let n of e.slice(t.path.length)){if(typeof i!=`object`||!i||Array.isArray(i)||!Object.hasOwn(i,n))return!1;i=i[n]}return!0})}function V(e,t,n){return t.some(t=>t!==e&&t.path.length>e.path.length&&e.path.every((e,n)=>t.path[n]===e)&&I(t,n)!==void 0)}function H(e){return e.flatMap(e=>[e.name,h(e.name)])}function U(e){if(typeof e==`string`)return e;try{return JSON.stringify(e)??`undefined`}catch{return`unprintable value`}}function W(e){return r(U(e))}function G(e,t,i){let a=n=>{i.push(`--${r(e.name)} expects ${n} (got '${W(t)}')`)};switch(e.type){case`number`:{let n=typeof t==`number`?t:Number(U(t)),r=Array.isArray(e.schema.type)?e.schema.type:[e.schema.type];return Number.isFinite(n)?r.includes(`integer`)&&!r.includes(`number`)&&!Number.isInteger(n)?a(`an integer`):n:a(`a finite number`)}case`boolean`:return typeof t==`boolean`?t:t===`true`||t!==`false`&&a(`a boolean`);case`array`:case`object`:{let n=t;if(typeof t==`string`)try{n=JSON.parse(t)}catch{return a(`a JSON ${e.type}`)}return(e.type===`array`?Array.isArray(n):typeof n==`object`&&n&&!Array.isArray(n))?n:a(`a JSON ${e.type}`)}case`json`:{let r=Array.isArray(e.schema.type)?e.schema.type:[e.schema.type];if(r.length===1&&r[0]===`null`)return t===null||t===`null`?null:a(`null`);if(typeof t!=`string`)return t;try{return JSON.parse(t)}catch{return n(t,e.name,`json`)}}case`string-or-array`:if(typeof t!=`string`)return Array.isArray(t)?t:a(`a string or JSON array`);try{let e=JSON.parse(t);if(Array.isArray(e))return e}catch{}return n(t,e.name,`text`);default:{let r=Array.isArray(t)?t[t.length-1]:t;return typeof r==`boolean`?a(`a string`):typeof r==`string`?n(r,e.name,`text`):U(r)}}}function K(e){return Array.from(e).length}function q(e,t,n){let a=r(e.name),{const:o,pattern:s,minLength:c,maxLength:l,minimum:u,maximum:d,exclusiveMinimum:f,exclusiveMaximum:p}=e.schema;if(o!==void 0&&!i(t,o)){n.push(`--${a} must be ${r(JSON.stringify(o)??`undefined`)}`);return}let m=e.schema.enum??j(e.schema)?.map(e=>e.value);if(m!==void 0&&!m.some(e=>i(t,e)))n.push(`--${a} must be one of: ${m.map(W).join(`, `)}`);else{if(typeof t==`string`){let e=K(t);s!==void 0&&!new RegExp(s).test(t)&&n.push(`--${a} does not match the required format (${r(s)})`),c!==void 0&&e<c&&n.push(`--${a} must be at least ${c} characters`),l!==void 0&&e>l&&n.push(`--${a} must be at most ${l} characters`)}typeof t==`number`&&(u!==void 0&&(f===!0?t<=u:t<u)&&n.push(f===!0?`--${a} must be greater than ${u}`:`--${a} must be at least ${u}`),d!==void 0&&(p===!0?t>=d:t>d)&&n.push(p===!0?`--${a} must be less than ${d}`:`--${a} must be at most ${d}`),typeof f==`number`&&t<=f&&n.push(`--${a} must be greater than ${f}`),typeof p==`number`&&t>=p&&n.push(`--${a} must be less than ${p}`))}}function le(e,t){let n=[],i=G(e,t,n);if(i===void 0||(q(e,i,n),n.length>0))return n[0];let a=Z(e.schema,i);return a.length>0?`--${r(e.name)} ${a[0]?.replace(/^the request body /,``)}`:void 0}function J(e,t){switch(e){case`null`:return t===null;case`array`:return Array.isArray(t);case`object`:return typeof t==`object`&&!!t&&!Array.isArray(t);case`integer`:return typeof t==`number`&&Number.isInteger(t);default:return typeof t===e}}function ue(e){return e.map(e=>e===`integer`?`an integer`:`a${/^[aeiou]/.test(e)?`n`:``} ${e}`).join(` or `)}function Y(e){return e.length===0?`the request body`:`\`/${e.map(e=>r(e).replace(/~/g,`~0`).replace(/\//g,`~1`)).join(`/`)}\``}function X(e,t,n){let a=[],o=Y(n),s=e.type===void 0?[]:Array.isArray(e.type)?e.type:[e.type];if(s.length>0&&!s.some(e=>J(e,t)))return[`${o} must be ${ue(s)}`];if(e.const!==void 0&&!i(t,e.const))return[`${o} must be ${r(JSON.stringify(e.const)??`undefined`)}`];if(e.enum&&!e.enum.some(e=>i(t,e)))return[`${o} must be one of: ${e.enum.map(W).join(`, `)}`];if(e.oneOf?.length&&e.oneOf.filter(e=>X(e,t,n).length===0).length!==1){let t=M(e);return[t?`${o} must be one of: ${t.join(`, `)}`:`${o} must match exactly one allowed shape`]}if(e.anyOf?.length&&!e.anyOf.some(e=>X(e,t,n).length===0)){let t=M(e);return[t?`${o} must be one of: ${t.join(`, `)}`:`${o} must match an allowed shape`]}for(let r of e.allOf??[])a.push(...X(r,t,n));if(e.if&&X(e.if,t,n).length===0&&e.then&&a.push(...X(e.then,t,n)),typeof t==`string`){let n=K(t);e.pattern!==void 0&&!new RegExp(e.pattern).test(t)&&a.push(`${o} does not match the required format (${r(e.pattern)})`),e.minLength!==void 0&&n<e.minLength&&a.push(`${o} must be at least ${e.minLength} characters`),e.maxLength!==void 0&&n>e.maxLength&&a.push(`${o} must be at most ${e.maxLength} characters`)}if(typeof t==`number`&&(e.minimum!==void 0&&(e.exclusiveMinimum===!0?t<=e.minimum:t<e.minimum)&&a.push(e.exclusiveMinimum===!0?`${o} must be greater than ${e.minimum}`:`${o} must be at least ${e.minimum}`),e.maximum!==void 0&&(e.exclusiveMaximum===!0?t>=e.maximum:t>e.maximum)&&a.push(e.exclusiveMaximum===!0?`${o} must be less than ${e.maximum}`:`${o} must be at most ${e.maximum}`),typeof e.exclusiveMinimum==`number`&&t<=e.exclusiveMinimum&&a.push(`${o} must be greater than ${e.exclusiveMinimum}`),typeof e.exclusiveMaximum==`number`&&t>=e.exclusiveMaximum&&a.push(`${o} must be less than ${e.exclusiveMaximum}`),e.multipleOf!==void 0&&Math.abs(t/e.multipleOf-Math.round(t/e.multipleOf))>2**-52*10&&a.push(`${o} must be a multiple of ${e.multipleOf}`)),Array.isArray(t)){if(e.minItems!==void 0&&t.length<e.minItems&&a.push(`${o} must contain at least ${e.minItems} items`),e.maxItems!==void 0&&t.length>e.maxItems&&a.push(`${o} must contain at most ${e.maxItems} items`),e.uniqueItems&&t.some((e,n)=>t.slice(0,n).some(t=>i(e,t)))&&a.push(`${o} must contain unique items`),e.items&&!Array.isArray(e.items))for(let[r,i]of t.entries())a.push(...X(e.items,i,[...n,String(r)]));else if(Array.isArray(e.items))for(let[r,i]of e.items.entries())r<t.length&&a.push(...X(i,t[r],[...n,String(r)]))}if(typeof t==`object`&&t&&!Array.isArray(t)){let r=t,i=e.properties??{};for(let t of e.required??[])Object.hasOwn(r,t)||a.push(`${Y([...n,t])} is required`);for(let[t,o]of Object.entries(r)){let r=Object.hasOwn(i,t)?i[t]:void 0;r?a.push(...X(r,o,[...n,t])):e.additionalProperties===!1?a.push(`${Y([...n,t])} is not allowed`):e.additionalProperties&&typeof e.additionalProperties==`object`&&a.push(...X(e.additionalProperties,o,[...n,t]))}let s=Object.keys(r).length;e.minProperties!==void 0&&s<e.minProperties&&a.push(`${o} must contain at least ${e.minProperties} properties`),e.maxProperties!==void 0&&s>e.maxProperties&&a.push(`${o} must contain at most ${e.maxProperties} properties`)}return a}function Z(e,t){return[...new Set(X(e,t,[]))]}const de=[`const`,`enum`,`exclusiveMaximum`,`exclusiveMinimum`,`maxItems`,`maxLength`,`maxProperties`,`maximum`,`minItems`,`minLength`,`minProperties`,`minimum`,`multipleOf`,`pattern`,`required`,`title`,`type`,`uniqueItems`];function Q(e){let t=e,n=Object.keys(t);if(t.nullable===!0||t[`x-nullable`]===!0||n.some(e=>[`$dynamicRef`,`$recursiveRef`,`$ref`].includes(e)))return{schema:{},exact:!1};let r={},i=n.every(e=>a.has(e)||e.startsWith(`x-`));for(let t of de){let n=e[t];n!==void 0&&Object.assign(r,{[t]:n})}if(e.properties!==void 0){let t=Object.entries(e.properties).map(([e,t])=>{let n=Q(t);return i&&=n.exact,[e,n.schema]});r.properties=Object.fromEntries(t)}if(e.additionalProperties!==void 0&&!Object.hasOwn(t,`patternProperties`)){if(typeof e.additionalProperties==`boolean`)r.additionalProperties=e.additionalProperties;else{let t=Q(e.additionalProperties);r.additionalProperties=t.schema,i&&=t.exact}}if(e.items!==void 0&&!Object.hasOwn(t,`prefixItems`)){if(Array.isArray(e.items))r.items=e.items.map(e=>{let t=Q(e);return i&&=t.exact,t.schema});else{let t=Q(e.items);r.items=t.schema,i&&=t.exact}}let o=(e.allOf??[]).map(e=>{let t=Q(e);return i&&=t.exact,t.schema});if(e.anyOf?.length&&(r.anyOf=e.anyOf.map(e=>{let t=Q(e);return i&&=t.exact,t.schema})),e.oneOf?.length){let t=e.oneOf.map(Q),n=t.every(e=>e.exact);i&&=n,n?r.oneOf=t.map(e=>e.schema):o.push({anyOf:t.map(e=>e.schema)})}if(e.if&&e.then){let t=Q(e.if),n=Q(e.then);i&&=t.exact&&n.exact,t.exact&&o.push({if:t.schema,then:n.schema})}return o.length>0&&(r.allOf=o),{schema:r,exact:i}}function fe(e,t){return Z(Q(e).schema,t)}function pe(e,t,n){let r=e;for(let e of t.slice(0,-1)){let t=r[e];(typeof t!=`object`||!t||Array.isArray(t))&&(r[e]={}),r=r[e]}let i=t.at(-1);i!==void 0&&(r[i]=n)}function $(e,t=[]){let n=/* @__PURE__ */ new Set([...ae,...t]),r=/* @__PURE__ */ new Map;for(let t of Object.keys(e))!n.has(t)&&!r.has(d(t))&&r.set(d(t),t);return[...r.values()].sort()}function me(e,n,i={}){let a=[],o=i.baseBody!==void 0,s=i.baseBody===void 0?{}:structuredClone(i.baseBody),c=e.filter(({path:e})=>p(e)),l=[...i.reserved??[],...H(c)];for(let e of c){let i=I(e,n);if(i===void 0){!o&&z(e,c,n)&&!B(e.path,c,n)&&!(e.requiredContainer&&V(e,c,n))&&a.push(`--${r(e.name)} is required`);continue}let l=G(e,i,a);l!==void 0&&(q(e,l,a),o?pe(s,e.path,l):t(s,e.path,l))}if(o)for(let e of L(c,s))I(e,n)===void 0&&a.push(`--${r(e.name)} is required`);for(let e of $(n,l))a.push(`Unknown flag --${r(e)}`);return{body:s,errors:a}}export{L as a,P as c,Z as d,fe as f,oe as i,$ as l,H as n,ie as o,c as r,u as s,me as t,le as u};
@@ -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{n as u,t as d}from"./input-validation-D7z60HJH.mjs";import{n as f}from"./prompt-kxvGZ6nF.mjs";function ee(e){return e.usage("$0 scim groups create\n\nCreates a new SCIM Group (user group) for the account. The `displayName` must not be empty and must not begin with `CF` (reserved for system groups).").option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`})}const p={command:`create`,describe:`Create SCIM Group`,builder:ee,handler:async e=>l({command:`scim groups create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf scim groups create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/scim/v2/Groups`,pathParams:{},bodyKind:`octet-stream`,body:e.body});return}let l=await r(e),f=e.local?t:await a();if(e.accountId=f,e.file){let t=d(e.file),r=await c(`Creating`,async()=>n(l,`POST`,`/accounts/${f}/scim/v2/Groups`,{body:t,headers:{"Content-Type":`application/scim+json`}}));o(r,{successLabel:`Created`})}else if(e.body){let t=u(e.body,`body`,`binary`),r=await c(`Creating`,async()=>n(l,`POST`,`/accounts/${f}/scim/v2/Groups`,{body:t,headers:{"Content-Type":`application/scim+json`}}));o(r,{successLabel:`Created`})}else if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};var m={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/scim/v2/Groups/${t.group_id}`,response:!1};function h(e){return e.usage(`$0 scim groups delete <group-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{n as u,t as d}from"./input-validation-D7z60HJH.mjs";import{n as f}from"./prompt-SNVLBS1b.mjs";function ee(e){return e.usage("$0 scim groups create\n\nCreates a new SCIM Group (user group) for the account. The `displayName` must not be empty and must not begin with `CF` (reserved for system groups).").option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`})}const p={command:`create`,describe:`Create SCIM Group`,builder:ee,handler:async e=>l({command:`scim groups create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf scim groups create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/scim/v2/Groups`,pathParams:{},bodyKind:`octet-stream`,body:e.body});return}let l=await r(e),f=e.local?t:await a();if(e.accountId=f,e.file){let t=d(e.file),r=await c(`Creating`,async()=>n(l,`POST`,`/accounts/${f}/scim/v2/Groups`,{body:t,headers:{"Content-Type":`application/scim+json`}}));o(r,{successLabel:`Created`})}else if(e.body){let t=u(e.body,`body`,`binary`),r=await c(`Creating`,async()=>n(l,`POST`,`/accounts/${f}/scim/v2/Groups`,{body:t,headers:{"Content-Type":`application/scim+json`}}));o(r,{successLabel:`Created`})}else if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};var m={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/scim/v2/Groups/${t.group_id}`,response:!1};function h(e){return e.usage(`$0 scim groups delete <group-id>
3
3
 
4
4
  Deletes a SCIM Group (custom user groups only). System groups backed by Cloudflare permission groups cannot be deleted via SCIM. Returns 204 No Content on success.`).positional(`group-id`,{type:`string`,description:"The group identifier for a SCIM Group resource. For system groups this is prefixed `cloudflare-v1-<permissionGroupTag>`; for custom user groups this is a UUID-style tag.",demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const g={command:`delete <group-id>`,describe:`Delete SCIM Group`,builder:h,handler:async e=>l({command:`scim groups delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf scim groups delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/scim/v2/Groups/${e[`group-id`]==null?`<group-id>`:encodeURIComponent(String(e[`group-id`]))}`,pathParams:{"group-id":String(e[`group-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await f({force:!!e.force,message:`Are you sure? This action cannot be undone.`}))return;let u=await c(`Deleting`,async()=>n.send(m,{account_id:l,group_id:e[`group-id`]}));o(u,{successLabel:`Deleted`})})};function _(e){return e.usage("$0 scim groups edit <group-id>\n\nPartially updates a SCIM Group via PATCH operations (RFC 7644 Section 3.5.2). Supports add, remove, and replace operations on `members`, `displayName`, and `externalId`. For system groups (prefixed `cloudflare-v1-`), only member management operations are supported.").positional(`group-id`,{type:`string`,description:"The group identifier for a SCIM Group resource. For system groups this is prefixed `cloudflare-v1-<permissionGroupTag>`; for custom user groups this is a UUID-style tag.",demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`})}const v={command:`edit <group-id>`,describe:`Patch SCIM Group`,builder:_,handler:async e=>l({command:`scim groups edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf scim groups edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/scim/v2/Groups/${e[`group-id`]==null?`<group-id>`:encodeURIComponent(String(e[`group-id`]))}`,pathParams:{"group-id":String(e[`group-id`]??``)},bodyKind:`octet-stream`,body:e.body});return}let l=await r(e),f=e.local?t:await a();if(e.accountId=f,e.file){let t=d(e.file),r=await c(`Updating`,async()=>n(l,`PATCH`,`/accounts/${f}/scim/v2/Groups/${encodeURIComponent(String(e[`group-id`]))}`,{body:t,headers:{"Content-Type":`application/scim+json`}}));o(r,{successLabel:`Updated`})}else if(e.body){let t=u(e.body,`body`,`binary`),r=await c(`Updating`,async()=>n(l,`PATCH`,`/accounts/${f}/scim/v2/Groups/${encodeURIComponent(String(e[`group-id`]))}`,{body:t,headers:{"Content-Type":`application/scim+json`}}));o(r,{successLabel:`Updated`})}else if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};var y={method:`GET`,path:t=>e`/accounts/${t.account_id}/scim/v2/Groups/${t.group_id}`};function b(e){return e.usage(`$0 scim groups get <group-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{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:`GET`,path:t=>e`/accounts/${t.account_id}/secrets_store/quota`};function h(e){return e.usage(`$0 secrets-store quota get
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:`GET`,path:t=>e`/accounts/${t.account_id}/secrets_store/quota`};function h(e){return e.usage(`$0 secrets-store quota get
3
3
 
4
4
  Lists the number of secrets used in the account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`get`,describe:`View secret usage`,builder:h,handler:async e=>c({command:`secrets-store quota get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await r();o({command:`cf secrets-store quota get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/secrets_store/quota`,pathParams:{},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(m,{account_id:l}));a(u,{successLabel:`Loaded`})})},_={command:`quota`,describe:`Account quota limits for secrets stores, secrets count, and storage capacity`,builder:e=>e.command(g).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var v={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/secrets_store/stores/${t.store_id}/secrets`,body:`json`};function y(e){return e.usage(`$0 secrets-store secrets bulk-delete
5
5
 
@@ -15,7 +15,7 @@ Updates a single secret.`).positional(`secret-id`,{type:`string`,description:`Se
15
15
 
16
16
  Returns details of a single secret.`).positional(`secret-id`,{type:`string`,description:`Secret identifier.`,demandOption:!0}).option(`store-id`,{type:`string`,description:`Store identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const F={command:`get <secret-id>`,describe:`Get a secret by ID`,builder:P,handler:async e=>c({command:`secrets-store secrets get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf secrets-store secrets get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/secrets_store/stores/${e[`store-id`]==null?`<store-id>`:encodeURIComponent(String(e[`store-id`]))}/secrets/${e[`secret-id`]==null?`<secret-id>`:encodeURIComponent(String(e[`secret-id`]))}`,pathParams:{"store-id":String(e[`store-id`]??``),"secret-id":String(e[`secret-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(N,{account_id:l,store_id:e[`store-id`],secret_id:e[`secret-id`]}));a(u,{successLabel:`Loaded`})})};var I={method:`GET`,path:t=>e`/accounts/${t.account_id}/secrets_store/stores/${t.store_id}/secrets`,query:[`direction`,`page`,`per_page`,`search`,`order`,`scopes`],joined:[`scopes`]};function L(e){return e.usage(`$0 secrets-store secrets list
17
17
 
18
- Lists all store secrets.`).option(`store-id`,{type:`string`,description:`Store identifier.`,demandOption:!0}).option(`direction`,{type:`string`,description:`Direction to sort objects.`,choices:[`asc`,`desc`]}).option(`page`,{type:`number`,description:`Page number.`}).option(`per-page`,{type:`number`,description:`Number of objects to return per page.`}).option(`search`,{type:`string`,description:`Search secrets using a filter string, filtering across name and comment.`}).option(`order`,{type:`string`,description:`Order secrets by values in the given field.`,choices:[`name`,`comment`,`created`,`modified`,`status`]}).option(`scopes`,{type:`string`,description:`Only secrets with the given scopes will be returned.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const R={command:`list`,describe:`List store secrets`,builder:L,handler:async e=>c({command:`secrets-store secrets list`,classification:{safeFlags:[`direction`,`order`,`dry-run`]}},e,async()=>{let c={direction:e.direction,page:e.page,per_page:e[`per-page`],search:e.search,order:e.order,scopes:e.scopes};if(e.dryRun){let t=await r();o({command:`cf secrets-store secrets list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/secrets_store/stores/${e[`store-id`]==null?`<store-id>`:encodeURIComponent(String(e[`store-id`]))}/secrets`,pathParams:{"store-id":String(e[`store-id`]??``)},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(I,{account_id:u,store_id:e[`store-id`],...c}));a(d,{successLabel:`Loaded`})})},z={command:`secrets`,describe:`Encrypted key-value secrets within a store. Pass --store-id to scope.`,builder:e=>e.command(b).command(C).command(E).command(k).command(M).command(F).command(R).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var B={method:`GET`,path:t=>e`/accounts/${t.account_id}/secrets_store/stores/${t.store_id}`};function V(e){return e.usage(`$0 secrets-store stores get <store-id>
18
+ Lists all store secrets.`).option(`store-id`,{type:`string`,description:`Store identifier.`,demandOption:!0}).option(`direction`,{type:`string`,description:`Direction to sort objects.`,choices:[`asc`,`desc`]}).option(`page`,{type:`number`,description:`Page number.`}).option(`per-page`,{type:`number`,description:`Number of objects to return per page.`}).option(`search`,{type:`string`,description:`Search secrets using a filter string, filtering across name and comment.`}).option(`order`,{type:`string`,description:`Order secrets by values in the given field.`,choices:[`name`,`comment`,`created`,`modified`,`status`]}).option(`scopes`,{type:`string`,array:!0,description:`Only secrets with the given scopes will be returned.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const R={command:`list`,describe:`List store secrets`,builder:L,handler:async e=>c({command:`secrets-store secrets list`,classification:{safeFlags:[`direction`,`order`,`dry-run`]}},e,async()=>{let c={direction:e.direction,page:e.page,per_page:e[`per-page`],search:e.search,order:e.order,scopes:e.scopes};if(e.dryRun){let t=await r();o({command:`cf secrets-store secrets list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/secrets_store/stores/${e[`store-id`]==null?`<store-id>`:encodeURIComponent(String(e[`store-id`]))}/secrets`,pathParams:{"store-id":String(e[`store-id`]??``)},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(I,{account_id:u,store_id:e[`store-id`],...c}));a(d,{successLabel:`Loaded`})})},z={command:`secrets`,describe:`Encrypted key-value secrets within a store. Pass --store-id to scope.`,builder:e=>e.command(b).command(C).command(E).command(k).command(M).command(F).command(R).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var B={method:`GET`,path:t=>e`/accounts/${t.account_id}/secrets_store/stores/${t.store_id}`};function V(e){return e.usage(`$0 secrets-store stores get <store-id>
19
19
 
20
20
  Returns details of a single store.`).positional(`store-id`,{type:`string`,description:`Store identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const H={command:`get <store-id>`,describe:`Get a store by ID`,builder:V,handler:async e=>c({command:`secrets-store stores get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf secrets-store stores get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/secrets_store/stores/${e[`store-id`]==null?`<store-id>`:encodeURIComponent(String(e[`store-id`]))}`,pathParams:{"store-id":String(e[`store-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(B,{account_id:l,store_id:e[`store-id`]}));a(u,{successLabel:`Loaded`})})};var U={method:`GET`,path:t=>e`/accounts/${t.account_id}/secrets_store/stores`,query:[`direction`,`page`,`per_page`,`order`]};function W(e){return e.usage(`$0 secrets-store stores list
21
21
 
@@ -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{n as u,t as d}from"./body-parser-BKcZS9iJ.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{n as p,t as m}from"./raw-fetch-C_hWBr7n.mjs";var h={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/security-center/insights/${t.issue_id}/audit-log`,query:[`per_page`,`cursor`,`field_changed`,`changed_by`,`since`,`before`,`order`]};function g(e){return e.usage(`$0 security-insights audit-logs get <issue-id>
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{n as u,t as d}from"./body-parser-BKcZS9iJ.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{n as p,t as m}from"./raw-fetch-D3ydyJYW.mjs";var h={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/security-center/insights/${t.issue_id}/audit-log`,query:[`per_page`,`cursor`,`field_changed`,`changed_by`,`since`,`before`,`order`]};function g(e){return e.usage(`$0 security-insights audit-logs get <issue-id>
3
3
 
4
4
  Lists audit log entries for a specific Security Center insight, showing changes to its status and classification over time.`).positional(`issue-id`,{type:`string`,description:`Issue ID`,demandOption:!0}).option(`per-page`,{type:`number`,description:`Number of results per page.`}).option(`cursor`,{type:`string`,description:`Opaque cursor for pagination. Use the cursor value from result_info of the previous response.`}).option(`field-changed`,{type:`string`,description:`Filter by the field that was changed.`,choices:[`status`,`user_classification`]}).option(`changed-by`,{type:`string`,description:`Filter by the actor that made the change.`}).option(`since`,{type:`string`,description:`Filter entries changed at or after this timestamp (RFC 3339).`}).option(`before`,{type:`string`,description:`Filter entries changed before this timestamp (RFC 3339).`}).option(`order`,{type:`string`,description:`Sort order for results. Use 'asc' for oldest first or 'desc' for newest first.`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ee={command:`get <issue-id>`,describe:`Retrieves Issue Audit Log`,builder:g,handler:async e=>l({command:`security-insights audit-logs get`,classification:{safeFlags:[`field-changed`,`order`,`dry-run`]}},e,async()=>{let l={per_page:e[`per-page`],cursor:e.cursor,field_changed:e[`field-changed`],changed_by:e[`changed-by`],since:e.since,before:e.before,order:e.order};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 security-insights audit-logs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/security-center/insights/${e[`issue-id`]==null?`<issue-id>`:encodeURIComponent(String(e[`issue-id`]))}/audit-log`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i),"issue-id":String(e[`issue-id`]??``)},query:l,bodyKind:`none`});return}let u=await n(e),d=e.zone===void 0?`accounts`:`zones`,f=d===`zones`?await i({zone:e.zone},u,{quiet:e.quiet}):e.local?t:await a();d===`zones`?e.zoneId=f:e.accountId=f;let p=await c(`Loading`,async()=>u.send(h,{account_or_zone:d,account_or_zone_id:f,issue_id:e[`issue-id`],...l}));o(p,{successLabel:`Loaded`})})};var _={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/security-center/insights/audit-log`,query:[`per_page`,`cursor`,`field_changed`,`changed_by`,`since`,`before`,`order`]};function te(e){return e.usage(`$0 security-insights audit-logs list
5
5
 
@@ -9,17 +9,17 @@ Updates the user classification for a Security Center insight. Valid values are
9
9
 
10
10
  Returns the full context payload for an insight. This endpoint is used for insights with large payloads that are not included inline in the list response.`).positional(`issue-id`,{type:`string`,description:`Issue ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const C={command:`get <issue-id>`,describe:`Retrieves Security Center Insight Context`,builder:S,handler:async e=>l({command:`security-insights context get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf security-insights context get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/security-center/insights/${e[`issue-id`]==null?`<issue-id>`:encodeURIComponent(String(e[`issue-id`]))}/context`,pathParams:{"issue-id":String(e[`issue-id`]??``)},bodyKind:`none`});return}let i=await n(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>i.send(x,{account_id:l,issue_id:e[`issue-id`]}));o(u,{successLabel:`Loaded`})})},w={command:`context`,describe:`Operations for context`,builder:e=>e.command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var T={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/security-center/insights/class`,query:[`dismissed`,`issue_class`,`issue_type`,`product`,`source`,`severity`,`subject`,`issue_class~neq`,`issue_type~neq`,`product~neq`,`severity~neq`,`subject~neq`]};function E(e){return e.usage(`$0 security-insights count by-class
11
11
 
12
- Retrieves Security Center insight counts aggregated by classification class.`).option(`dismissed`,{type:`boolean`,description:`Dismissed`}).option(`issue-class`,{type:`string`,description:`Issue class`}).option(`issue-type`,{type:`string`,description:`Issue type`}).option(`product`,{type:`string`,description:`Product`}).option(`source`,{type:`string`,description:`Source`}).option(`severity`,{type:`string`,description:`Severity`}).option(`subject`,{type:`string`,description:`Subject`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const D={command:`by-class`,describe:`Retrieves Security Center Insight Counts by Class`,builder:E,handler:async e=>l({command:`security-insights count by-class`,classification:{safeFlags:[`dismissed`,`dry-run`]}},e,async()=>{let l={dismissed:e.dismissed,issue_class:e[`issue-class`],issue_type:e[`issue-type`],product:e.product,source:e.source,severity:e.severity,subject:e.subject};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 security-insights count by-class`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/security-center/insights/class`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i)},query:l,bodyKind:`none`});return}let u=await n(e),d=e.zone===void 0?`accounts`:`zones`,f=d===`zones`?await i({zone:e.zone},u,{quiet:e.quiet}):e.local?t:await a();d===`zones`?e.zoneId=f:e.accountId=f;let p=await c(`Loading`,async()=>u.send(T,{account_or_zone:d,account_or_zone_id:f,...l}));o(p,{successLabel:`Loaded`})})};var O={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/security-center/insights/partner-count`,query:[`source`]};function k(e){return e.usage(`$0 security-insights count by-partner
12
+ Retrieves Security Center insight counts aggregated by classification class.`).option(`dismissed`,{type:`boolean`,description:`Dismissed`}).option(`issue-class`,{type:`string`,array:!0,description:`Issue class`}).option(`issue-type`,{type:`string`,array:!0,description:`Issue type`}).option(`product`,{type:`string`,array:!0,description:`Product`}).option(`source`,{type:`string`,array:!0,description:`Source`}).option(`severity`,{type:`string`,array:!0,description:`Severity`}).option(`subject`,{type:`string`,array:!0,description:`Subject`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const D={command:`by-class`,describe:`Retrieves Security Center Insight Counts by Class`,builder:E,handler:async e=>l({command:`security-insights count by-class`,classification:{safeFlags:[`dismissed`,`dry-run`]}},e,async()=>{let l={dismissed:e.dismissed,issue_class:e[`issue-class`],issue_type:e[`issue-type`],product:e.product,source:e.source,severity:e.severity,subject:e.subject};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 security-insights count by-class`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/security-center/insights/class`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i)},query:l,bodyKind:`none`});return}let u=await n(e),d=e.zone===void 0?`accounts`:`zones`,f=d===`zones`?await i({zone:e.zone},u,{quiet:e.quiet}):e.local?t:await a();d===`zones`?e.zoneId=f:e.accountId=f;let p=await c(`Loading`,async()=>u.send(T,{account_or_zone:d,account_or_zone_id:f,...l}));o(p,{successLabel:`Loaded`})})};var O={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/security-center/insights/partner-count`,query:[`source`]};function k(e){return e.usage(`$0 security-insights count by-partner
13
13
 
14
14
  Retrieves the uncapped count of active, non-dismissed, unclassified RiskRecon insights for the account or zone.`).option(`source`,{type:`string`,description:`Source`,choices:[`riskrecon`],demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const A={command:`by-partner`,describe:`Retrieves a Partner Security Center Insight Count`,builder:k,handler:async e=>l({command:`security-insights count by-partner`,classification:{safeFlags:[`source`,`dry-run`]}},e,async()=>{let l={source:e.source};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 security-insights count by-partner`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/security-center/insights/partner-count`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i)},query:l,bodyKind:`none`});return}let u=await n(e),d=e.zone===void 0?`accounts`:`zones`,f=d===`zones`?await i({zone:e.zone},u,{quiet:e.quiet}):e.local?t:await a();d===`zones`?e.zoneId=f:e.accountId=f;let p=await c(`Loading`,async()=>u.send(O,{account_or_zone:d,account_or_zone_id:f,...l}));o(p,{successLabel:`Loaded`})})};var j={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/security-center/insights/severity`,query:[`dismissed`,`issue_class`,`issue_type`,`product`,`source`,`severity`,`subject`,`issue_class~neq`,`issue_type~neq`,`product~neq`,`severity~neq`,`subject~neq`]};function M(e){return e.usage(`$0 security-insights count by-severity
15
15
 
16
- Retrieves Security Center insight counts aggregated by severity level (critical, high, medium, low).`).option(`dismissed`,{type:`boolean`,description:`Dismissed`}).option(`issue-class`,{type:`string`,description:`Issue class`}).option(`issue-type`,{type:`string`,description:`Issue type`}).option(`product`,{type:`string`,description:`Product`}).option(`source`,{type:`string`,description:`Source`}).option(`severity`,{type:`string`,description:`Severity`}).option(`subject`,{type:`string`,description:`Subject`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const N={command:`by-severity`,describe:`Retrieves Security Center Insight Counts by Severity`,builder:M,handler:async e=>l({command:`security-insights count by-severity`,classification:{safeFlags:[`dismissed`,`dry-run`]}},e,async()=>{let l={dismissed:e.dismissed,issue_class:e[`issue-class`],issue_type:e[`issue-type`],product:e.product,source:e.source,severity:e.severity,subject:e.subject};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 security-insights count by-severity`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/security-center/insights/severity`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i)},query:l,bodyKind:`none`});return}let u=await n(e),d=e.zone===void 0?`accounts`:`zones`,f=d===`zones`?await i({zone:e.zone},u,{quiet:e.quiet}):e.local?t:await a();d===`zones`?e.zoneId=f:e.accountId=f;let p=await c(`Loading`,async()=>u.send(j,{account_or_zone:d,account_or_zone_id:f,...l}));o(p,{successLabel:`Loaded`})})};var P={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/security-center/insights/type`,query:[`dismissed`,`issue_class`,`issue_type`,`product`,`source`,`severity`,`subject`,`issue_class~neq`,`issue_type~neq`,`product~neq`,`severity~neq`,`subject~neq`]};function F(e){return e.usage(`$0 security-insights count by-type
16
+ Retrieves Security Center insight counts aggregated by severity level (critical, high, medium, low).`).option(`dismissed`,{type:`boolean`,description:`Dismissed`}).option(`issue-class`,{type:`string`,array:!0,description:`Issue class`}).option(`issue-type`,{type:`string`,array:!0,description:`Issue type`}).option(`product`,{type:`string`,array:!0,description:`Product`}).option(`source`,{type:`string`,array:!0,description:`Source`}).option(`severity`,{type:`string`,array:!0,description:`Severity`}).option(`subject`,{type:`string`,array:!0,description:`Subject`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const N={command:`by-severity`,describe:`Retrieves Security Center Insight Counts by Severity`,builder:M,handler:async e=>l({command:`security-insights count by-severity`,classification:{safeFlags:[`dismissed`,`dry-run`]}},e,async()=>{let l={dismissed:e.dismissed,issue_class:e[`issue-class`],issue_type:e[`issue-type`],product:e.product,source:e.source,severity:e.severity,subject:e.subject};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 security-insights count by-severity`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/security-center/insights/severity`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i)},query:l,bodyKind:`none`});return}let u=await n(e),d=e.zone===void 0?`accounts`:`zones`,f=d===`zones`?await i({zone:e.zone},u,{quiet:e.quiet}):e.local?t:await a();d===`zones`?e.zoneId=f:e.accountId=f;let p=await c(`Loading`,async()=>u.send(j,{account_or_zone:d,account_or_zone_id:f,...l}));o(p,{successLabel:`Loaded`})})};var P={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/security-center/insights/type`,query:[`dismissed`,`issue_class`,`issue_type`,`product`,`source`,`severity`,`subject`,`issue_class~neq`,`issue_type~neq`,`product~neq`,`severity~neq`,`subject~neq`]};function F(e){return e.usage(`$0 security-insights count by-type
17
17
 
18
- Retrieves Security Center insight counts aggregated by insight type.`).option(`dismissed`,{type:`boolean`,description:`Dismissed`}).option(`issue-class`,{type:`string`,description:`Issue class`}).option(`issue-type`,{type:`string`,description:`Issue type`}).option(`product`,{type:`string`,description:`Product`}).option(`source`,{type:`string`,description:`Source`}).option(`severity`,{type:`string`,description:`Severity`}).option(`subject`,{type:`string`,description:`Subject`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const I={command:`by-type`,describe:`Retrieves Security Center Insight Counts by Type`,builder:F,handler:async e=>l({command:`security-insights count by-type`,classification:{safeFlags:[`dismissed`,`dry-run`]}},e,async()=>{let l={dismissed:e.dismissed,issue_class:e[`issue-class`],issue_type:e[`issue-type`],product:e.product,source:e.source,severity:e.severity,subject:e.subject};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 security-insights count by-type`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/security-center/insights/type`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i)},query:l,bodyKind:`none`});return}let u=await n(e),d=e.zone===void 0?`accounts`:`zones`,f=d===`zones`?await i({zone:e.zone},u,{quiet:e.quiet}):e.local?t:await a();d===`zones`?e.zoneId=f:e.accountId=f;let p=await c(`Loading`,async()=>u.send(P,{account_or_zone:d,account_or_zone_id:f,...l}));o(p,{successLabel:`Loaded`})})},L={command:`count`,describe:`Operations for count`,builder:e=>e.command(D).command(A).command(N).command(I).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var R={method:`PUT`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/security-center/insights/${t.issue_id}/dismiss`,body:`json`};function z(e){return e.usage(`$0 security-insights dismiss <issue-id>
18
+ Retrieves Security Center insight counts aggregated by insight type.`).option(`dismissed`,{type:`boolean`,description:`Dismissed`}).option(`issue-class`,{type:`string`,array:!0,description:`Issue class`}).option(`issue-type`,{type:`string`,array:!0,description:`Issue type`}).option(`product`,{type:`string`,array:!0,description:`Product`}).option(`source`,{type:`string`,array:!0,description:`Source`}).option(`severity`,{type:`string`,array:!0,description:`Severity`}).option(`subject`,{type:`string`,array:!0,description:`Subject`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const I={command:`by-type`,describe:`Retrieves Security Center Insight Counts by Type`,builder:F,handler:async e=>l({command:`security-insights count by-type`,classification:{safeFlags:[`dismissed`,`dry-run`]}},e,async()=>{let l={dismissed:e.dismissed,issue_class:e[`issue-class`],issue_type:e[`issue-type`],product:e.product,source:e.source,severity:e.severity,subject:e.subject};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 security-insights count by-type`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/security-center/insights/type`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i)},query:l,bodyKind:`none`});return}let u=await n(e),d=e.zone===void 0?`accounts`:`zones`,f=d===`zones`?await i({zone:e.zone},u,{quiet:e.quiet}):e.local?t:await a();d===`zones`?e.zoneId=f:e.accountId=f;let p=await c(`Loading`,async()=>u.send(P,{account_or_zone:d,account_or_zone_id:f,...l}));o(p,{successLabel:`Loaded`})})},L={command:`count`,describe:`Operations for count`,builder:e=>e.command(D).command(A).command(N).command(I).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var R={method:`PUT`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/security-center/insights/${t.issue_id}/dismiss`,body:`json`};function z(e){return e.usage(`$0 security-insights dismiss <issue-id>
19
19
 
20
20
  Archives a Security Center insight for an account or zone, removing it from the active insights list while preserving historical data.`).positional(`issue-id`,{type:`string`,description:`Issue ID`,demandOption:!0}).option(`dismiss`,{type:`boolean`,description:`The dismiss 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 B={command:`dismiss <issue-id>`,describe:`Archives Security Center Insight`,builder:z,handler:async e=>l({command:`security-insights dismiss`,classification:{safeFlags:[`dismiss`,`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 security-insights dismiss`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/security-center/insights/${e[`issue-id`]==null?`<issue-id>`:encodeURIComponent(String(e[`issue-id`]))}/dismiss`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i),"issue-id":String(e[`issue-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({dismiss:e.dismiss}):u(e.body)});return}let l=await n(e),f=e.zone===void 0?`accounts`:`zones`,p=f===`zones`?await i({zone:e.zone},l,{quiet:e.quiet}):e.local?t:await a();if(f===`zones`?e.zoneId=p:e.accountId=p,e.body){let t=u(e.body),n=await c(`Updating`,async()=>l.send(R,{body:t,account_or_zone:f,account_or_zone_id:p,issue_id:e[`issue-id`]}));o(n,{successLabel:`Updated`});return}let m=d({dismiss:e.dismiss}),h=await c(`Updating`,async()=>l.send(R,{body:m,account_or_zone:f,account_or_zone_id:p,issue_id:e[`issue-id`]}));o(h,{successLabel:`Updated`})})};var V={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/security-center/insights`,query:[`dismissed`,`issue_class`,`issue_type`,`product`,`source`,`severity`,`subject`,`issue_class~neq`,`issue_type~neq`,`product~neq`,`severity~neq`,`subject~neq`,`page`,`per_page`]};function H(e){return e.usage(`$0 security-insights list
21
21
 
22
- Lists all Security Center insights for the account or zone, showing security findings and recommendations.`).option(`dismissed`,{type:`boolean`,description:`Dismissed`}).option(`issue-class`,{type:`string`,description:`Issue class`}).option(`issue-type`,{type:`string`,description:`Issue type`}).option(`product`,{type:`string`,description:`Product`}).option(`source`,{type:`string`,description:`Source`}).option(`severity`,{type:`string`,description:`Severity`}).option(`subject`,{type:`string`,description:`Subject`}).option(`page`,{type:`number`,description:`Specifies the current page within paginated list of results.`}).option(`per-page`,{type:`number`,description:`Sets the number of results per page of results.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const U={command:`list`,describe:`Retrieves Security Center Insights`,builder:H,handler:async e=>l({command:`security-insights list`,classification:{safeFlags:[`dismissed`,`dry-run`]}},e,async()=>{let l={dismissed:e.dismissed,issue_class:e[`issue-class`],issue_type:e[`issue-type`],product:e.product,source:e.source,severity:e.severity,subject:e.subject,page:e.page,per_page:e[`per-page`]};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 security-insights list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/security-center/insights`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i)},query:l,bodyKind:`none`});return}let u=await n(e),d=e.zone===void 0?`accounts`:`zones`,f=d===`zones`?await i({zone:e.zone},u,{quiet:e.quiet}):e.local?t:await a();d===`zones`?e.zoneId=f:e.accountId=f;let p=await c(`Loading`,async()=>u.send(V,{account_or_zone:d,account_or_zone_id:f,...l}));o(p,{successLabel:`Loaded`})})};var W={method:`GET`,path:t=>e`/accounts/${t.account_id}/security-center/partners/${t.partner}/settings`};function G(e){return e.usage(`$0 security-insights partners settings get <partner>
22
+ Lists all Security Center insights for the account or zone, showing security findings and recommendations.`).option(`dismissed`,{type:`boolean`,description:`Dismissed`}).option(`issue-class`,{type:`string`,array:!0,description:`Issue class`}).option(`issue-type`,{type:`string`,array:!0,description:`Issue type`}).option(`product`,{type:`string`,array:!0,description:`Product`}).option(`source`,{type:`string`,array:!0,description:`Source`}).option(`severity`,{type:`string`,array:!0,description:`Severity`}).option(`subject`,{type:`string`,array:!0,description:`Subject`}).option(`page`,{type:`number`,description:`Specifies the current page within paginated list of results.`}).option(`per-page`,{type:`number`,description:`Sets the number of results per page of results.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const U={command:`list`,describe:`Retrieves Security Center Insights`,builder:H,handler:async e=>l({command:`security-insights list`,classification:{safeFlags:[`dismissed`,`dry-run`]}},e,async()=>{let l={dismissed:e.dismissed,issue_class:e[`issue-class`],issue_type:e[`issue-type`],product:e.product,source:e.source,severity:e.severity,subject:e.subject,page:e.page,per_page:e[`per-page`]};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 security-insights list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/security-center/insights`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i)},query:l,bodyKind:`none`});return}let u=await n(e),d=e.zone===void 0?`accounts`:`zones`,f=d===`zones`?await i({zone:e.zone},u,{quiet:e.quiet}):e.local?t:await a();d===`zones`?e.zoneId=f:e.accountId=f;let p=await c(`Loading`,async()=>u.send(V,{account_or_zone:d,account_or_zone_id:f,...l}));o(p,{successLabel:`Loaded`})})};var W={method:`GET`,path:t=>e`/accounts/${t.account_id}/security-center/partners/${t.partner}/settings`};function G(e){return e.usage(`$0 security-insights partners settings get <partner>
23
23
 
24
24
  Returns whether the account has enabled the selected partner integration and, if enabled, whether the account has been matched with the partner. An integration that has not been configured is returned as disabled.`).positional(`partner`,{type:`string`,description:`The partner integration identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const K={command:`get <partner>`,describe:`Retrieves Partner Integration Settings`,builder:G,handler:async e=>l({command:`security-insights partners settings get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf security-insights partners settings get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/security-center/partners/${e.partner==null?`<partner>`:encodeURIComponent(String(e.partner))}/settings`,pathParams:{partner:String(e.partner??``)},bodyKind:`none`});return}let i=await n(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>i.send(W,{account_id:l,partner:e.partner}));o(u,{successLabel:`Loaded`})})};var q={method:`POST`,path:t=>e`/accounts/${t.account_id}/security-center/partners/${t.partner}/settings`,body:`json`};function J(e){return e.usage(`$0 security-insights partners settings update <partner>
25
25
 
@@ -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{n as u}from"./prompt-kxvGZ6nF.mjs";var d={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/security-center/securitytxt`};function f(e){return e.usage(`$0 security-txt 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{n as s,t as c}from"./body-parser-BKcZS9iJ.mjs";import{n as l}from"./input-validation-D7z60HJH.mjs";import{n as u}from"./prompt-SNVLBS1b.mjs";var d={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/security-center/securitytxt`};function f(e){return e.usage(`$0 security-txt delete
3
3
 
4
4
  Removes the security.txt file configuration for a zone. The /.well-known/security.txt endpoint will no longer be served.`).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:`Deletes security.txt`,builder:f,handler:async e=>o({command:`security-txt delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf security-txt delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/security-center/securitytxt`,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}/security-center/securitytxt`};function h(e){return e.usage(`$0 security-txt get
5
5
 
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{r as e}from"./theme-BGHWSKCw.mjs";import{c as t}from"./chunk-3PJ54H4K-C8sxQzhB.mjs";import{r as n}from"./blocks-DmOx-xEv.mjs";let r=!1,i=!1,a=!1;function o(e,t={}){r||i||(t.quiet||!process.stderr.isTTY?i=!0:(process.stderr.write(`${n(e,t.update)}\n`),r=!0))}function s(n){!r||i||a||n==="default"||t({allowGlobalAuthKey:!1})!==void 0||(process.stderr.write(`${e.muted(`Active profile:`)} ${e.info(n)}\n`),a=!0)}export{s as n,o as t};
2
+ import{r as e}from"./theme-BGHWSKCw.mjs";import{c as t}from"./chunk-3PJ54H4K-CbRAWQWI.mjs";import{r as n}from"./blocks-D2tE8dp2.mjs";let r=!1,i=!1,a=!1;function o(e,t={}){r||i||(t.quiet||!process.stderr.isTTY?i=!0:(process.stderr.write(`${n(e,t.update)}\n`),r=!0))}function s(n){!r||i||a||n==="default"||t({allowGlobalAuthKey:!1})!==void 0||(process.stderr.write(`${e.muted(`Active profile:`)} ${e.info(n)}\n`),a=!0)}export{s as n,o as t};
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{i as e,r as t}from"./dotenv-qsoPELMm.mjs";import{J as n,K as r,rt as i}from"./dist-D5YYi2LO.mjs";import{t as a}from"./log-BWdaOGOW.mjs";import{_ as o,d as s,f as c,t as l}from"./deploy-context-D51tgJGI.mjs";import{a as u,l as d,r as f,t as p,u as m}from"./containers-IBtaInTL.mjs";import{a as h,i as g,n as _,o as v,r as y,s as b}from"./build-CCepbVuJ.mjs";import{i as x,n as S,t as C}from"./deploy-input-em95cFc7.mjs";import{readBuildOutput as w}from"@cloudflare/build-output-utils";function T(e){return e.option(`prebuilt`,{type:`boolean`,description:`Deploy existing Build Output Specification files without building`,default:!1}).option(`tag`,{type:`string`,description:`A tag to associate with this Worker Version`,requiresArg:!0}).option(`message`,{type:`string`,description:`A message to associate with this Worker Version`,requiresArg:!0}).option(`secrets-file`,{type:`string`,description:"Path to a file containing secrets to upload with the version (JSON or .env format). Dotenv values expand $VAR and ${VAR} using process environment values and earlier file values; process environment values override file values, including empty values. Only declared file keys are uploaded. Only use trusted dotenv secrets files: they can read and upload any process environment value. Escape literal dollar signs with \\$ or use JSON.",requiresArg:!0}).option(`dry-run`,{describe:`Build a project and run checks without actually uploading the Worker`,type:`boolean`,default:!1}).option(`worker`,y)}async function E(e,n){if(!e.prebuilt){if(await _(e.mode,{worker:e.worker,dryRun:e[`dry-run`]})===`setup-needed`){a.success(`--dry-run: exiting now.`);return}a.message(``)}return t(e,()=>D(e,n))}async function D(t,_){let{workers:y,rootConfig:T,containers:E}=await w(process.cwd());if(T.buildContext.isPreview){let e=[`cf previews deploy`,...t.prebuilt?[`--prebuilt`]:[],...T.buildContext.mode===void 0?[]:[`--mode`,T.buildContext.mode]].join(` `);throw Error(`This build output is for a Preview. Run ${e} instead.`)}b(t.mode,T.buildContext.mode),v(T.accountId,t[`temporary-account`]===!0);let D=h(y,t.worker),O=g(D,T),k=e(O.wranglerConfig),A=C(D,O.builtConfig),j=n(k),{authToken:M,accountId:N}=await f({accountId:T.accountId,complianceRegion:j,dryRun:t[`dry-run`]}),P=l(M);m(P),o({logger:P.logger,fetchResult:P.fetchResult,fetchPagedListResult:P.fetchPagedListResult}),N!==void 0&&E.length>0&&c(N,M,r(k));let F=p(E,k,{accountId:N,containersRollout:t[`containers-rollout`]}),I;if(_.command===`Deploy`){let e=S(D,k,N,t,F);a.section(`Deploy`),{versionId:I}=await u(e,k,A,{deployCommand:`cf deploy`,versionsDeployCommand:`cf workers deployments create --worker <worker-name> --strategy percentage --versions <versions-json>`,d1ListCommand:`cf d1 list`,d1DeleteCommand:`cf d1 delete <database-id>`,queueCreateCommand:e=>`cf queues create --queue-name ${e}`,secretPutCommand:`cf workers secrets update --worker <worker-name> --type secret_text`,workersDevConfigFieldName:`workersDev`,workersDevConfigAssignment:e=>`workersDev: ${e}`,previewUrlsConfigFieldName:`previewUrls`,previewUrlsConfigAssignment:e=>`previewUrls: ${e}`,configFileName:`cloudflare.config.ts`,observabilityTargetPercentageField:`targetInstancePercentage`,observabilityTargetCountField:`targetInstanceCount`,syncWorkersSite:void 0,analyseBundle:void 0})}else{let e=x(D,k,N,t,F);a.section(`Upload`),{versionId:I}=await d(e,k,A,{deployCommand:`cf deploy`,versionsUploadCommand:`cf workers versions create`,versionsDeployCommand:`cf workers deployments create --worker <worker-name> --strategy percentage --versions <versions-json>`,triggersDeployCommand:`cf workers triggers deploy`,d1ListCommand:`cf d1 list`,d1DeleteCommand:`cf d1 delete <database-id>`,queueCreateCommand:e=>`cf queues create --queue-name ${e}`,versionsSecretPutCommand:`wrangler versions secret put`,analyseBundle:void 0})}I===null||t[`dry-run`]||_.command===`Deploy`&&t[`containers-rollout`]===`none`||await s([..._.command===`Deploy`?F.standard.builtImages:[],...F.durableObjects.builtImages],i()),t[`dry-run`]||a.success(`${_.command} complete`)}export{T as n,E as t};
2
+ import{i as e,r as t}from"./dotenv-qsoPELMm.mjs";import{J as n,K as r,rt as i}from"./dist-ataVE8ob.mjs";import{t as a}from"./log-BWdaOGOW.mjs";import{_ as o,d as s,f as c,t as l}from"./deploy-context-CO8ZSRwx.mjs";import{a as u,l as d,r as f,t as p,u as m}from"./containers-C_byVTZF.mjs";import{a as h,i as g,n as _,o as v,r as y,s as b}from"./build-BfkzV5_c.mjs";import{i as x,n as S,t as C}from"./deploy-input-PhKRxa_2.mjs";import{readBuildOutput as w}from"@cloudflare/build-output-utils";function T(e){return e.option(`prebuilt`,{type:`boolean`,description:`Deploy existing Build Output Specification files without building`,default:!1}).option(`tag`,{type:`string`,description:`A tag to associate with this Worker Version`,requiresArg:!0}).option(`message`,{type:`string`,description:`A message to associate with this Worker Version`,requiresArg:!0}).option(`secrets-file`,{type:`string`,description:"Path to a file containing secrets to upload with the version (JSON or .env format). Dotenv values expand $VAR and ${VAR} using process environment values and earlier file values; process environment values override file values, including empty values. Only declared file keys are uploaded. Only use trusted dotenv secrets files: they can read and upload any process environment value. Escape literal dollar signs with \\$ or use JSON.",requiresArg:!0}).option(`dry-run`,{describe:`Build a project and run checks without actually uploading the Worker`,type:`boolean`,default:!1}).option(`worker`,y)}async function E(e,n){if(!e.prebuilt){if(await _(e.mode,{worker:e.worker,dryRun:e[`dry-run`]})===`setup-needed`){a.success(`--dry-run: exiting now.`);return}a.message(``)}return t(e,()=>D(e,n))}async function D(t,_){let{workers:y,rootConfig:T,containers:E}=await w(process.cwd());if(T.buildContext.isPreview){let e=[`cf previews deploy`,...t.prebuilt?[`--prebuilt`]:[],...T.buildContext.mode===void 0?[]:[`--mode`,T.buildContext.mode]].join(` `);throw Error(`This build output is for a Preview. Run ${e} instead.`)}b(t.mode,T.buildContext.mode),v(T.accountId,t[`temporary-account`]===!0);let D=h(y,t.worker),O=g(D,T),k=e(O.wranglerConfig),A=C(D,O.builtConfig),j=n(k),{authToken:M,accountId:N}=await f({accountId:T.accountId,complianceRegion:j,dryRun:t[`dry-run`]}),P=l(M);m(P),o({logger:P.logger,fetchResult:P.fetchResult,fetchPagedListResult:P.fetchPagedListResult}),N!==void 0&&E.length>0&&c(N,M,r(k));let F=p(E,k,{accountId:N,containersRollout:t[`containers-rollout`]}),I;if(_.command===`Deploy`){let e=S(D,k,N,t,F);a.section(`Deploy`),{versionId:I}=await u(e,k,A,{deployCommand:`cf deploy`,versionsDeployCommand:`cf workers deployments create --worker <worker-name> --strategy percentage --versions <versions-json>`,d1ListCommand:`cf d1 list`,d1DeleteCommand:`cf d1 delete <database-id>`,queueCreateCommand:e=>`cf queues create --queue-name ${e}`,secretPutCommand:`cf workers secrets update --worker <worker-name> --type secret_text`,workersDevConfigFieldName:`workersDev`,workersDevConfigAssignment:e=>`workersDev: ${e}`,previewUrlsConfigFieldName:`previewUrls`,previewUrlsConfigAssignment:e=>`previewUrls: ${e}`,configFileName:`cloudflare.config.ts`,observabilityTargetPercentageField:`targetInstancePercentage`,observabilityTargetCountField:`targetInstanceCount`,syncWorkersSite:void 0,analyseBundle:void 0})}else{let e=x(D,k,N,t,F);a.section(`Upload`),{versionId:I}=await d(e,k,A,{deployCommand:`cf deploy`,versionsUploadCommand:`cf workers versions create`,versionsDeployCommand:`cf workers deployments create --worker <worker-name> --strategy percentage --versions <versions-json>`,triggersDeployCommand:`cf workers triggers deploy`,d1ListCommand:`cf d1 list`,d1DeleteCommand:`cf d1 delete <database-id>`,queueCreateCommand:e=>`cf queues create --queue-name ${e}`,versionsSecretPutCommand:`wrangler versions secret put`,analyseBundle:void 0})}I===null||t[`dry-run`]||_.command===`Deploy`&&t[`containers-rollout`]===`none`||await s([..._.command===`Deploy`?F.standard.builtImages:[],...F.durableObjects.builtImages],i()),t[`dry-run`]||a.success(`${_.command} complete`)}export{T as n,E as t};
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import{n as e}from"./auth-pbuzyz4C.mjs";import{t}from"./output-BJEgbI0G.mjs";import{t as n}from"./dry-run-gy0Hl9xo.mjs";import{t as r}from"./progress-C_yVLVcl.mjs";import{t as i}from"./run-BlSXngtI.mjs";import"./telemetry-jl3s2-bN.mjs";var a={method:`GET`,path:()=>`/signed-url`,response:!1,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function o(e){return e.usage(`$0 signed-url get
2
+ import{n as e}from"./auth-CB9wjyad.mjs";import{t}from"./output-BJEgbI0G.mjs";import{t as n}from"./dry-run-gy0Hl9xo.mjs";import{t as r}from"./progress-_Jux05O5.mjs";import{t as i}from"./run-Br8sYjNF.mjs";import"./telemetry-kjElc1zT.mjs";var a={method:`GET`,path:()=>`/signed-url`,response:!1,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function o(e){return e.usage(`$0 signed-url get
3
3
 
4
4
  Internal route for testing signed URLs.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const s={command:`get`,describe:`Internal route for testing signed URLs`,builder:o,handler:async o=>i({command:`signed-url get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){n({command:`cf signed-url get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/signed-url`,pathParams:{},bodyKind:`none`});return}let i=await e(o),s=await r(`Loading`,async()=>i.send(a));t(s,{successLabel:`Loaded`})})},c={command:`signed-url`,describe:`signed-url`,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{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,r 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`/zones/${t.zone_id}/smart_shield/cache_reserve_clear`};function h(e){return e.usage(`$0 smart-shield cache-reserve-clear clear
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,r 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`/zones/${t.zone_id}/smart_shield/cache_reserve_clear`};function h(e){return e.usage(`$0 smart-shield cache-reserve-clear clear
3
3
 
4
4
  You can use Cache Reserve Clear to clear your Cache Reserve, but you must first disable Cache Reserve. In most cases, this will be accomplished within 24 hours. You cannot re-enable Cache Reserve while this process is ongoing. Keep in mind that you cannot undo or cancel this operation.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const g={command:`clear`,describe:`Start Cache Reserve Clear`,builder:h,handler:async e=>o({command:`smart-shield cache-reserve-clear clear`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf smart-shield cache-reserve-clear clear`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/smart_shield/cache_reserve_clear`,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 p({force:!!e.force,message:`This operation permanently clears Cache Reserve for this zone and cannot be undone.`}))return;let c=await a(`Deleting`,async()=>o.send(m,{zone_id:s}));r(c,{successLabel:`Deleted`})})};var _={method:`GET`,path:t=>e`/zones/${t.zone_id}/smart_shield/cache_reserve_clear`};function v(e){return e.usage(`$0 smart-shield cache-reserve-clear status
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{i as t,n}from"./auth-pbuzyz4C.mjs";import{i as r}from"./context-BryBS1zQ.mjs";import{t as i}from"./output-BJEgbI0G.mjs";import{t as a}from"./dry-run-gy0Hl9xo.mjs";import{t as o}from"./progress-C_yVLVcl.mjs";import{t as s}from"./run-BlSXngtI.mjs";import"./telemetry-jl3s2-bN.mjs";import{a as c,n as l,t as u}from"./body-parser-BKcZS9iJ.mjs";import{n as d,t as f}from"./input-validation-D7z60HJH.mjs";import{n as p}from"./prompt-kxvGZ6nF.mjs";import{n as m,t as h}from"./raw-fetch-C_hWBr7n.mjs";function g(e){return e.usage(`$0 snippets content get <snippet-name>
2
+ import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{i as t,n}from"./auth-CB9wjyad.mjs";import{i as r}from"./context-DCon1tRZ.mjs";import{t as i}from"./output-BJEgbI0G.mjs";import{t as a}from"./dry-run-gy0Hl9xo.mjs";import{t as o}from"./progress-_Jux05O5.mjs";import{t as s}from"./run-Br8sYjNF.mjs";import"./telemetry-kjElc1zT.mjs";import{a as c,n as l,t as u}from"./body-parser-BKcZS9iJ.mjs";import{n as d,t as f}from"./input-validation-D7z60HJH.mjs";import{n as p}from"./prompt-SNVLBS1b.mjs";import{n as m,t as h}from"./raw-fetch-D3ydyJYW.mjs";function g(e){return e.usage(`$0 snippets content get <snippet-name>
3
3
 
4
4
  Fetches the content of a snippet belonging to the zone.`).positional(`snippet-name`,{type:`string`,description:`Identify the snippet.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`text`,{type:`boolean`,description:`Decode the response body as UTF-8 text instead of writing raw bytes`,default:!1})}const _={command:`get <snippet-name>`,describe:`Get a zone snippet content`,builder:g,handler:async e=>s({command:`snippets content get`,classification:{safeFlags:[`dry-run`,`text`]}},e,async()=>{if(e.dryRun){a({command:`cf snippets content get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/snippets/${e[`snippet-name`]==null?`<snippet-name>`:encodeURIComponent(String(e[`snippet-name`]))}/content`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"snippet-name":String(e[`snippet-name`]??``)},bodyKind:`none`});return}let t=await n(e);e.zoneId=await r({zone:e.zone},t,{quiet:e.quiet});let i=await o(`Loading`,async()=>h(`/zones/${e.zoneId}/snippets/${encodeURIComponent(String(e[`snippet-name`]))}/content`,{method:`GET`,local:e.local===!0,persistTo:e.persistTo}));m(e.text===!0?i.toString(`utf-8`):i)})},v={command:`content`,describe:`Operations for content`,builder:e=>e.command(_).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var y={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/snippets/${t.snippet_name}`};function b(e){return e.usage(`$0 snippets delete <snippet-name>
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{r as e,t}from"./rolldown-runtime-BNtqjh-B.mjs";import{r as n}from"./theme-BGHWSKCw.mjs";import{t as r}from"./cli-exit-CstFZ1eJ.mjs";import{a as i}from"./autoconfig-CXcy-e1R.mjs";import{t as a}from"./blocks-DmOx-xEv.mjs";import"./ui-Dt1-eURh.mjs";import{a as o,i as s,n as c,o as l,r as u,s as d,t as f}from"./gt-BQkaDQDq.mjs";import"./log-BWdaOGOW.mjs";import{n as p,t as m}from"./discover-C06Syc2B.mjs";import{constants as h}from"node:os";var g=/* @__PURE__ */ t(((e,t)=>{t.exports=class{constructor(){this.max=1e3,this.map=/* @__PURE__ */ new Map}get(e){let t=this.map.get(e);if(t!==void 0)return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&t!==void 0){if(this.map.size>=this.max){let e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}}})),_=/* @__PURE__ */ t(((e,t)=>{let n=c();t.exports=(e,t,r)=>n(e,t,r)===0})),v=/* @__PURE__ */ t(((e,t)=>{let n=c();t.exports=(e,t,r)=>n(e,t,r)!==0})),y=/* @__PURE__ */ t(((e,t)=>{let n=c();t.exports=(e,t,r)=>n(e,t,r)>=0})),b=/* @__PURE__ */ t(((e,t)=>{let n=c();t.exports=(e,t,r)=>n(e,t,r)<0})),x=/* @__PURE__ */ t(((e,t)=>{let n=c();t.exports=(e,t,r)=>n(e,t,r)<=0})),S=/* @__PURE__ */ t(((e,t)=>{let n=_(),r=v(),i=f(),a=y(),o=b(),s=x();t.exports=(e,t,c,l)=>{switch(t){case`===`:return typeof e==`object`&&(e=e.version),typeof c==`object`&&(c=c.version),e===c;case`!==`:return typeof e==`object`&&(e=e.version),typeof c==`object`&&(c=c.version),e!==c;case``:case`=`:case`==`:return n(e,c,l);case`!=`:return r(e,c,l);case`>`:return i(e,c,l);case`>=`:return a(e,c,l);case`<`:return o(e,c,l);case`<=`:return s(e,c,l);default:throw TypeError(`Invalid operator: ${t}`)}}})),C=/* @__PURE__ */ t(((e,t)=>{let n=Symbol(`SemVer ANY`);t.exports=class e{static get ANY(){return n}constructor(t,i){if(i=r(i),t instanceof e){if(t.loose===!!i.loose)return t;t=t.value}t=t.trim().split(/\s+/).join(` `),l(`comparator`,t,i),this.options=i,this.loose=!!i.loose,this.parse(t),this.value=this.semver===n?``:this.operator+this.semver.version,l(`comp`,this)}parse(e){let t=this.options.loose?i[a.COMPARATORLOOSE]:i[a.COMPARATOR],r=e.match(t);if(!r)throw TypeError(`Invalid comparator: ${e}`);this.operator=r[1]===void 0?``:r[1],this.operator===`=`&&(this.operator=``),this.semver=r[2]?new f(r[2],this.options.loose):n}toString(){return this.value}test(e){if(l(`Comparator.test`,e,this.options.loose),this.semver===n||e===n)return!0;if(typeof e==`string`)try{e=new f(e,this.options)}catch{return!1}return c(e,this.operator,this.semver,this.options)}intersects(t,n){if(!(t instanceof e))throw TypeError(`a Comparator is required`);return this.operator===``?this.value===``||new p(t.value,n).test(this.value):t.operator===``?t.value===``||new p(this.value,n).test(t.semver):(n=r(n),n.includePrerelease&&(this.value===`<0.0.0-0`||t.value===`<0.0.0-0`)||!n.includePrerelease&&(this.value.startsWith(`<0.0.0`)||t.value.startsWith(`<0.0.0`))?!1:!!(this.operator.startsWith(`>`)&&t.operator.startsWith(`>`)||this.operator.startsWith(`<`)&&t.operator.startsWith(`<`)||this.semver.version===t.semver.version&&this.operator.includes(`=`)&&t.operator.includes(`=`)||c(this.semver,`<`,t.semver,n)&&this.operator.startsWith(`>`)&&t.operator.startsWith(`<`)||c(this.semver,`>`,t.semver,n)&&this.operator.startsWith(`<`)&&t.operator.startsWith(`>`)))}};let r=s(),{safeRe:i,t:a}=o(),c=S(),l=d(),f=u(),p=w()})),w=/* @__PURE__ */ t(((e,t)=>{let n=/\s+/g;t.exports=class e{constructor(t,r){if(r=i(r),t instanceof e)return t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease?t:new e(t.raw,r);if(t instanceof a)return this.raw=t.value,this.set=[[t]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=t.trim().replace(n,` `),this.set=this.raw.split(`||`).map(e=>this.parseRange(e.trim())).filter(e=>e.length),!this.set.length)throw TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let e=this.set[0];if(this.set=this.set.filter(e=>!w(e[0])),this.set.length===0)this.set=[e];else if(this.set.length>1){for(let e of this.set)if(e.length===1&&T(e[0])){this.set=[e];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted=``;for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+=`||`);let t=this.set[e];for(let e=0;e<t.length;e++)e>0&&(this.formatted+=` `),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){e=e.replace(S,``);let t=((this.options.includePrerelease&&b)|(this.options.loose&&x))+`:`+e,n=r.get(t);if(n)return n;let i=this.options.loose,o=i?p[h.HYPHENRANGELOOSE]:p[h.HYPHENRANGE];e=e.replace(o,R(this.options.includePrerelease)),c(`hyphen replace`,e),e=e.replace(p[h.COMPARATORTRIM],_),c(`comparator trim`,e),e=e.replace(p[h.TILDETRIM],v),c(`tilde trim`,e),e=e.replace(p[h.CARETTRIM],y),c(`caret trim`,e);let s=e.split(` `).map(e=>D(e,this.options)).join(` `).split(/\s+/).map(e=>L(e,this.options));i&&(s=s.filter(e=>(c(`loose invalid filter`,e,this.options),!!e.match(p[h.COMPARATORLOOSE])))),c(`range list`,s);let l=/* @__PURE__ */ new Map,u=s.map(e=>new a(e,this.options));for(let e of u){if(w(e))return[e];l.set(e.value,e)}l.size>1&&l.has(``)&&l.delete(``);let d=[...l.values()];return r.set(t,d),d}intersects(t,n){if(!(t instanceof e))throw TypeError(`a Range is required`);return this.set.some(e=>E(e,n)&&t.set.some(t=>E(t,n)&&e.every(e=>t.every(t=>e.intersects(t,n)))))}test(e){if(!e)return!1;if(typeof e==`string`)try{e=new f(e,this.options)}catch{return!1}for(let t=0;t<this.set.length;t++)if(z(this.set[t],e,this.options))return!0;return!1}};let r=new(g()),i=s(),a=C(),c=d(),f=u(),{safeRe:p,src:m,t:h,comparatorTrimReplace:_,tildeTrimReplace:v,caretTrimReplace:y}=o(),{FLAG_INCLUDE_PRERELEASE:b,FLAG_LOOSE:x}=l(),S=new RegExp(m[h.BUILD],`g`),w=e=>e.value===`<0.0.0-0`,T=e=>e.value===``,E=(e,t)=>{let n=!0,r=e.slice(),i=r.pop();for(;n&&r.length;)n=r.every(e=>i.intersects(e,t)),i=r.pop();return n},D=(e,t)=>(e=e.replace(p[h.BUILD],``),c(`comp`,e,t),e=M(e,t),c(`caret`,e),e=A(e,t),c(`tildes`,e),e=P(e,t),c(`xrange`,e),e=I(e,t),c(`stars`,e),e),O=e=>!e||e.toLowerCase()===`x`||e===`*`,k=(e,t,n)=>O(e)&&!O(t)||O(t)&&n&&!O(n),A=(e,t)=>e.trim().split(/\s+/).map(e=>j(e,t)).join(` `),j=(e,t)=>{let n=t.loose?p[h.TILDELOOSE]:p[h.TILDE],r=t.includePrerelease?`-0`:``;return e.replace(n,(t,n,i,a,o)=>{c(`tilde`,e,t,n,i,a,o);let s;return O(n)?s=``:O(i)?s=`>=${n}.0.0${r} <${+n+1}.0.0-0`:O(a)?s=`>=${n}.${i}.0${r} <${n}.${+i+1}.0-0`:o?(c(`replaceTilde pr`,o),s=`>=${n}.${i}.${a}-${o} <${n}.${+i+1}.0-0`):s=`>=${n}.${i}.${a} <${n}.${+i+1}.0-0`,c(`tilde return`,s),s})},M=(e,t)=>e.trim().split(/\s+/).map(e=>N(e,t)).join(` `),N=(e,t)=>{c(`caret`,e,t);let n=t.loose?p[h.CARETLOOSE]:p[h.CARET],r=t.includePrerelease?`-0`:``;return e.replace(n,(t,n,i,a,o)=>{c(`caret`,e,t,n,i,a,o);let s;return O(n)?s=``:O(i)?s=`>=${n}.0.0${r} <${+n+1}.0.0-0`:O(a)?s=n===`0`?`>=${n}.${i}.0${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.0${r} <${+n+1}.0.0-0`:o?(c(`replaceCaret pr`,o),s=n===`0`?i===`0`?`>=${n}.${i}.${a}-${o} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}-${o} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a}-${o} <${+n+1}.0.0-0`):(c(`no pr`),s=n===`0`?i===`0`?`>=${n}.${i}.${a} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a} <${+n+1}.0.0-0`),c(`caret return`,s),s})},P=(e,t)=>(c(`replaceXRanges`,e,t),e.split(/\s+/).map(e=>F(e,t)).join(` `)),F=(e,t)=>{e=e.trim();let n=t.loose?p[h.XRANGELOOSE]:p[h.XRANGE];return e.replace(n,(n,r,i,a,o,s)=>{if(c(`xRange`,e,n,r,i,a,o,s),k(i,a,o))return e;let l=O(i),u=l||O(a),d=u||O(o),f=d;return r===`=`&&f&&(r=``),s=t.includePrerelease?`-0`:``,l?n=r===`>`||r===`<`?`<0.0.0-0`:`*`:r&&f?(u&&(a=0),o=0,r===`>`?(r=`>=`,u?(i=+i+1,a=0,o=0):(a=+a+1,o=0)):r===`<=`&&(r=`<`,u?i=+i+1:a=+a+1),r===`<`&&(s=`-0`),n=`${r+i}.${a}.${o}${s}`):u?n=`>=${i}.0.0${s} <${+i+1}.0.0-0`:d&&(n=`>=${i}.${a}.0${s} <${i}.${+a+1}.0-0`),c(`xRange return`,n),n})},I=(e,t)=>(c(`replaceStars`,e,t),e.trim().replace(p[h.STAR],``)),L=(e,t)=>(c(`replaceGTE0`,e,t),e.trim().replace(p[t.includePrerelease?h.GTE0PRE:h.GTE0],``)),R=e=>(t,n,r,i,a,o,s,c,l,u,d,f)=>(n=O(r)?``:O(i)?`>=${r}.0.0${e?`-0`:``}`:O(a)?`>=${r}.${i}.0${e?`-0`:``}`:o?`>=${n}`:`>=${n}${e?`-0`:``}`,c=O(l)?``:O(u)?`<${+l+1}.0.0-0`:O(d)?`<${l}.${+u+1}.0-0`:f?`<=${l}.${u}.${d}-${f}`:e?`<${l}.${u}.${+d+1}-0`:`<=${c}`,`${n} ${c}`.trim()),z=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(c(e[n].semver),e[n].semver!==a.ANY&&e[n].semver.prerelease.length>0){let r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0}})),T=/* @__PURE__ */ e((/* @__PURE__ */ t(((e,t)=>{let n=w();t.exports=(e,t,r)=>{try{t=new n(t,r)}catch{return!1}return t.test(e)}})))(),1);function E(e){let t=m(e);if(t.length===0)throw A(e),new r(1);if(t.length>1)throw j(t),new r(1);let[n]=t;if(!n)throw new r(1);if(!n.binary)throw M(n),new r(1);if(n.impl.versionConstraint!==void 0&&!D(n.installedVersion,n.impl.versionConstraint.range))throw O(n),new r(1);return n}function D(e,t){return e!==void 0&&(0,T.default)(e,t,{includePrerelease:!0})}function O(e){N(`${e.impl.pkg}@${e.installedVersion??`unknown`} is installed, but it is not compatible with cf's local runtime.`,k(e),e.impl)}function k(e){return`cf requires ${e.impl.versionConstraint?.display??`a compatible version`} for cf dev, cf build, cf deploy, and cf previews deploy.`}function A(e){console.error(a(`No Cloudflare dev server is installed in ${e}.`,`Checked package.json, pyproject.toml and Cargo.toml.`)),console.error(`
2
+ import{r as e,t}from"./rolldown-runtime-BNtqjh-B.mjs";import{r as n}from"./theme-BGHWSKCw.mjs";import{t as r}from"./cli-exit-CstFZ1eJ.mjs";import{a as i}from"./autoconfig-CajkMb3B.mjs";import{t as a}from"./blocks-D2tE8dp2.mjs";import"./ui-7zujR-O7.mjs";import{a as o,i as s,n as c,o as l,r as u,s as d,t as f}from"./gt-BQkaDQDq.mjs";import"./log-BWdaOGOW.mjs";import{n as p,t as m}from"./discover-C06Syc2B.mjs";import{constants as h}from"node:os";var g=/* @__PURE__ */ t(((e,t)=>{t.exports=class{constructor(){this.max=1e3,this.map=/* @__PURE__ */ new Map}get(e){let t=this.map.get(e);if(t!==void 0)return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&t!==void 0){if(this.map.size>=this.max){let e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}}})),_=/* @__PURE__ */ t(((e,t)=>{let n=c();t.exports=(e,t,r)=>n(e,t,r)===0})),v=/* @__PURE__ */ t(((e,t)=>{let n=c();t.exports=(e,t,r)=>n(e,t,r)!==0})),y=/* @__PURE__ */ t(((e,t)=>{let n=c();t.exports=(e,t,r)=>n(e,t,r)>=0})),b=/* @__PURE__ */ t(((e,t)=>{let n=c();t.exports=(e,t,r)=>n(e,t,r)<0})),x=/* @__PURE__ */ t(((e,t)=>{let n=c();t.exports=(e,t,r)=>n(e,t,r)<=0})),S=/* @__PURE__ */ t(((e,t)=>{let n=_(),r=v(),i=f(),a=y(),o=b(),s=x();t.exports=(e,t,c,l)=>{switch(t){case`===`:return typeof e==`object`&&(e=e.version),typeof c==`object`&&(c=c.version),e===c;case`!==`:return typeof e==`object`&&(e=e.version),typeof c==`object`&&(c=c.version),e!==c;case``:case`=`:case`==`:return n(e,c,l);case`!=`:return r(e,c,l);case`>`:return i(e,c,l);case`>=`:return a(e,c,l);case`<`:return o(e,c,l);case`<=`:return s(e,c,l);default:throw TypeError(`Invalid operator: ${t}`)}}})),C=/* @__PURE__ */ t(((e,t)=>{let n=Symbol(`SemVer ANY`);t.exports=class e{static get ANY(){return n}constructor(t,i){if(i=r(i),t instanceof e){if(t.loose===!!i.loose)return t;t=t.value}t=t.trim().split(/\s+/).join(` `),l(`comparator`,t,i),this.options=i,this.loose=!!i.loose,this.parse(t),this.value=this.semver===n?``:this.operator+this.semver.version,l(`comp`,this)}parse(e){let t=this.options.loose?i[a.COMPARATORLOOSE]:i[a.COMPARATOR],r=e.match(t);if(!r)throw TypeError(`Invalid comparator: ${e}`);this.operator=r[1]===void 0?``:r[1],this.operator===`=`&&(this.operator=``),this.semver=r[2]?new f(r[2],this.options.loose):n}toString(){return this.value}test(e){if(l(`Comparator.test`,e,this.options.loose),this.semver===n||e===n)return!0;if(typeof e==`string`)try{e=new f(e,this.options)}catch{return!1}return c(e,this.operator,this.semver,this.options)}intersects(t,n){if(!(t instanceof e))throw TypeError(`a Comparator is required`);return this.operator===``?this.value===``||new p(t.value,n).test(this.value):t.operator===``?t.value===``||new p(this.value,n).test(t.semver):(n=r(n),n.includePrerelease&&(this.value===`<0.0.0-0`||t.value===`<0.0.0-0`)||!n.includePrerelease&&(this.value.startsWith(`<0.0.0`)||t.value.startsWith(`<0.0.0`))?!1:!!(this.operator.startsWith(`>`)&&t.operator.startsWith(`>`)||this.operator.startsWith(`<`)&&t.operator.startsWith(`<`)||this.semver.version===t.semver.version&&this.operator.includes(`=`)&&t.operator.includes(`=`)||c(this.semver,`<`,t.semver,n)&&this.operator.startsWith(`>`)&&t.operator.startsWith(`<`)||c(this.semver,`>`,t.semver,n)&&this.operator.startsWith(`<`)&&t.operator.startsWith(`>`)))}};let r=s(),{safeRe:i,t:a}=o(),c=S(),l=d(),f=u(),p=w()})),w=/* @__PURE__ */ t(((e,t)=>{let n=/\s+/g;t.exports=class e{constructor(t,r){if(r=i(r),t instanceof e)return t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease?t:new e(t.raw,r);if(t instanceof a)return this.raw=t.value,this.set=[[t]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=t.trim().replace(n,` `),this.set=this.raw.split(`||`).map(e=>this.parseRange(e.trim())).filter(e=>e.length),!this.set.length)throw TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let e=this.set[0];if(this.set=this.set.filter(e=>!w(e[0])),this.set.length===0)this.set=[e];else if(this.set.length>1){for(let e of this.set)if(e.length===1&&T(e[0])){this.set=[e];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted=``;for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+=`||`);let t=this.set[e];for(let e=0;e<t.length;e++)e>0&&(this.formatted+=` `),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){e=e.replace(S,``);let t=((this.options.includePrerelease&&b)|(this.options.loose&&x))+`:`+e,n=r.get(t);if(n)return n;let i=this.options.loose,o=i?p[h.HYPHENRANGELOOSE]:p[h.HYPHENRANGE];e=e.replace(o,R(this.options.includePrerelease)),c(`hyphen replace`,e),e=e.replace(p[h.COMPARATORTRIM],_),c(`comparator trim`,e),e=e.replace(p[h.TILDETRIM],v),c(`tilde trim`,e),e=e.replace(p[h.CARETTRIM],y),c(`caret trim`,e);let s=e.split(` `).map(e=>D(e,this.options)).join(` `).split(/\s+/).map(e=>L(e,this.options));i&&(s=s.filter(e=>(c(`loose invalid filter`,e,this.options),!!e.match(p[h.COMPARATORLOOSE])))),c(`range list`,s);let l=/* @__PURE__ */ new Map,u=s.map(e=>new a(e,this.options));for(let e of u){if(w(e))return[e];l.set(e.value,e)}l.size>1&&l.has(``)&&l.delete(``);let d=[...l.values()];return r.set(t,d),d}intersects(t,n){if(!(t instanceof e))throw TypeError(`a Range is required`);return this.set.some(e=>E(e,n)&&t.set.some(t=>E(t,n)&&e.every(e=>t.every(t=>e.intersects(t,n)))))}test(e){if(!e)return!1;if(typeof e==`string`)try{e=new f(e,this.options)}catch{return!1}for(let t=0;t<this.set.length;t++)if(z(this.set[t],e,this.options))return!0;return!1}};let r=new(g()),i=s(),a=C(),c=d(),f=u(),{safeRe:p,src:m,t:h,comparatorTrimReplace:_,tildeTrimReplace:v,caretTrimReplace:y}=o(),{FLAG_INCLUDE_PRERELEASE:b,FLAG_LOOSE:x}=l(),S=new RegExp(m[h.BUILD],`g`),w=e=>e.value===`<0.0.0-0`,T=e=>e.value===``,E=(e,t)=>{let n=!0,r=e.slice(),i=r.pop();for(;n&&r.length;)n=r.every(e=>i.intersects(e,t)),i=r.pop();return n},D=(e,t)=>(e=e.replace(p[h.BUILD],``),c(`comp`,e,t),e=M(e,t),c(`caret`,e),e=A(e,t),c(`tildes`,e),e=P(e,t),c(`xrange`,e),e=I(e,t),c(`stars`,e),e),O=e=>!e||e.toLowerCase()===`x`||e===`*`,k=(e,t,n)=>O(e)&&!O(t)||O(t)&&n&&!O(n),A=(e,t)=>e.trim().split(/\s+/).map(e=>j(e,t)).join(` `),j=(e,t)=>{let n=t.loose?p[h.TILDELOOSE]:p[h.TILDE],r=t.includePrerelease?`-0`:``;return e.replace(n,(t,n,i,a,o)=>{c(`tilde`,e,t,n,i,a,o);let s;return O(n)?s=``:O(i)?s=`>=${n}.0.0${r} <${+n+1}.0.0-0`:O(a)?s=`>=${n}.${i}.0${r} <${n}.${+i+1}.0-0`:o?(c(`replaceTilde pr`,o),s=`>=${n}.${i}.${a}-${o} <${n}.${+i+1}.0-0`):s=`>=${n}.${i}.${a} <${n}.${+i+1}.0-0`,c(`tilde return`,s),s})},M=(e,t)=>e.trim().split(/\s+/).map(e=>N(e,t)).join(` `),N=(e,t)=>{c(`caret`,e,t);let n=t.loose?p[h.CARETLOOSE]:p[h.CARET],r=t.includePrerelease?`-0`:``;return e.replace(n,(t,n,i,a,o)=>{c(`caret`,e,t,n,i,a,o);let s;return O(n)?s=``:O(i)?s=`>=${n}.0.0${r} <${+n+1}.0.0-0`:O(a)?s=n===`0`?`>=${n}.${i}.0${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.0${r} <${+n+1}.0.0-0`:o?(c(`replaceCaret pr`,o),s=n===`0`?i===`0`?`>=${n}.${i}.${a}-${o} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}-${o} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a}-${o} <${+n+1}.0.0-0`):(c(`no pr`),s=n===`0`?i===`0`?`>=${n}.${i}.${a} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a} <${+n+1}.0.0-0`),c(`caret return`,s),s})},P=(e,t)=>(c(`replaceXRanges`,e,t),e.split(/\s+/).map(e=>F(e,t)).join(` `)),F=(e,t)=>{e=e.trim();let n=t.loose?p[h.XRANGELOOSE]:p[h.XRANGE];return e.replace(n,(n,r,i,a,o,s)=>{if(c(`xRange`,e,n,r,i,a,o,s),k(i,a,o))return e;let l=O(i),u=l||O(a),d=u||O(o),f=d;return r===`=`&&f&&(r=``),s=t.includePrerelease?`-0`:``,l?n=r===`>`||r===`<`?`<0.0.0-0`:`*`:r&&f?(u&&(a=0),o=0,r===`>`?(r=`>=`,u?(i=+i+1,a=0,o=0):(a=+a+1,o=0)):r===`<=`&&(r=`<`,u?i=+i+1:a=+a+1),r===`<`&&(s=`-0`),n=`${r+i}.${a}.${o}${s}`):u?n=`>=${i}.0.0${s} <${+i+1}.0.0-0`:d&&(n=`>=${i}.${a}.0${s} <${i}.${+a+1}.0-0`),c(`xRange return`,n),n})},I=(e,t)=>(c(`replaceStars`,e,t),e.trim().replace(p[h.STAR],``)),L=(e,t)=>(c(`replaceGTE0`,e,t),e.trim().replace(p[t.includePrerelease?h.GTE0PRE:h.GTE0],``)),R=e=>(t,n,r,i,a,o,s,c,l,u,d,f)=>(n=O(r)?``:O(i)?`>=${r}.0.0${e?`-0`:``}`:O(a)?`>=${r}.${i}.0${e?`-0`:``}`:o?`>=${n}`:`>=${n}${e?`-0`:``}`,c=O(l)?``:O(u)?`<${+l+1}.0.0-0`:O(d)?`<${l}.${+u+1}.0-0`:f?`<=${l}.${u}.${d}-${f}`:e?`<${l}.${u}.${+d+1}-0`:`<=${c}`,`${n} ${c}`.trim()),z=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(c(e[n].semver),e[n].semver!==a.ANY&&e[n].semver.prerelease.length>0){let r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0}})),T=/* @__PURE__ */ e((/* @__PURE__ */ t(((e,t)=>{let n=w();t.exports=(e,t,r)=>{try{t=new n(t,r)}catch{return!1}return t.test(e)}})))(),1);function E(e){let t=m(e);if(t.length===0)throw A(e),new r(1);if(t.length>1)throw j(t),new r(1);let[n]=t;if(!n)throw new r(1);if(!n.binary)throw M(n),new r(1);if(n.impl.versionConstraint!==void 0&&!D(n.installedVersion,n.impl.versionConstraint.range))throw O(n),new r(1);return n}function D(e,t){return e!==void 0&&(0,T.default)(e,t,{includePrerelease:!0})}function O(e){N(`${e.impl.pkg}@${e.installedVersion??`unknown`} is installed, but it is not compatible with cf's local runtime.`,k(e),e.impl)}function k(e){return`cf requires ${e.impl.versionConstraint?.display??`a compatible version`} for cf dev, cf build, cf deploy, and cf previews deploy.`}function A(e){console.error(a(`No Cloudflare dev server is installed in ${e}.`,`Checked package.json, pyproject.toml and Cargo.toml.`)),console.error(`
3
3
  Install one of these:`);for(let e of p)console.error(`\n${n.bold(e.pkg)} ${n.muted(e.description)}`),P(e)}function j(e){console.error(a(`Multiple Cloudflare dev-server implementations are configured.`,[...e.map(e=>`${e.impl.pkg} (${e.manifestPath})`),``,`A project can only use one dev-server. Remove all but one from your project's manifest and try again.`].join(`
4
4
  `)))}function M(e){e.installed&&e.impl.versionConstraint?N(`${e.impl.pkg} is declared in ${e.manifestPath}, but this installation does not include the cf delegate.`,k(e),e.impl):N(`${e.impl.pkg} is declared in ${e.manifestPath} but is not installed.`,void 0,e.impl)}function N(e,t,n){console.error(a(e,t)),console.error(`
5
5
  Try:`),P(n)}function P(e){for(let t of e.installCommands)console.error(`${` `.repeat(3)}${n.code(t)}`)}function F(e,t=process.platform){return t!==`win32`||e!==`SIGINT`}function I(e,t,n){let r=t??n??void 0;return{exitCode:e??(r?128+(h.signals[r]??1):1),...r?{signal:r}:{}}}async function L(e,t,n,r={}){let a=r.output??`stderr`,o=e.binary;if(!o){let t=e.impl.installCommands.map(e=>`\`${e}\``);throw Error(`Cannot spawn ${e.impl.pkg}: binary not found.\nTry: ${new Intl.ListFormat(`en`,{type:`disjunction`}).format(t)}`)}let{command:s,prefixArgs:c}=z(o),l=i(s,[...c,t,...n],{nodePath:!1,nodeOptions:{stdio:[`inherit`,a===`inherit`?`inherit`:a===`silent`?`ignore`:process.stderr,`inherit`],env:R(r.env)}}),u,d=e=>{u??=e,F(e)&&l.kill(e)},f=()=>d(`SIGINT`),p=()=>d(`SIGTERM`);process.on(`SIGINT`,f),process.on(`SIGTERM`,p);try{return I((await l).exitCode??null,l.process?.signalCode??null,u)}finally{process.off(`SIGINT`,f),process.off(`SIGTERM`,p)}}function R(e={}){return{...B(process.env,`--no-deprecation`),...e,CLOUDFLARE_CF_AUTH:`true`}}function z(e){return e.startsWith(`uv:`)?{command:`uv`,prefixArgs:[`run`,`--no-sync`,e.slice(3)]}:{command:e,prefixArgs:[]}}function B(e,t){let n=e.NODE_OPTIONS??``;return n.split(/\s+/).includes(t)?e:{...e,NODE_OPTIONS:n?`${n} ${t}`:t}}export{E as n,L as t};
@@ -1,16 +1,16 @@
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,o as c,t as l}from"./body-parser-BKcZS9iJ.mjs";import{n as u}from"./input-validation-D7z60HJH.mjs";import{a as d,n as f}from"./prompt-kxvGZ6nF.mjs";var p={method:`GET`,path:t=>e`/zones/${t.zone_id}/spectrum/analytics/aggregate/current`,query:[`appID`,`colo_name`]};function m(e){return e.usage(`$0 spectrum analytics aggregates currents 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,o as c,t as l}from"./body-parser-BKcZS9iJ.mjs";import{n as u}from"./input-validation-D7z60HJH.mjs";import{a as d,n as f}from"./prompt-SNVLBS1b.mjs";var p={method:`GET`,path:t=>e`/zones/${t.zone_id}/spectrum/analytics/aggregate/current`,query:[`appID`,`colo_name`]};function m(e){return e.usage(`$0 spectrum analytics aggregates currents get
3
3
 
4
4
  Retrieves analytics aggregated from the last minute of usage on Spectrum applications underneath a given zone.`).option(`app-id`,{type:`string`,description:`Comma-delimited list of Spectrum Application Id(s). If provided, the response will be limited to Spectrum Application Id(s) that match.`}).option(`colo-name`,{type:`string`,description:`Co-location identifier.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const h={command:`get`,describe:`Get current aggregated analytics`,builder:m,handler:async e=>o({command:`spectrum analytics aggregates currents get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let o={appID:e[`app-id`],colo_name:e[`colo-name`]};if(e.dryRun){i({command:`cf spectrum analytics aggregates currents get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/spectrum/analytics/aggregate/current`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:o,bodyKind:`none`});return}let s=await t(e),c=await n({zone:e.zone},s,{quiet:e.quiet});e.zoneId=c;let l=await a(`Loading`,async()=>s.send(p,{zone_id:c,...o}));r(l,{successLabel:`Loaded`})})},g={command:`currents`,describe:`Operations for analytics.aggregates.currents`,builder:e=>e.command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},_={command:`aggregates`,describe:`Operations for analytics.aggregates`,builder:e=>e.command(g).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var v={method:`GET`,path:t=>e`/zones/${t.zone_id}/spectrum/analytics/events/bytime`,query:[`dimensions`,`sort`,`until`,`metrics`,`filters`,`since`,`time_delta`]};function y(e){return e.usage(`$0 spectrum analytics events bytimes get
5
5
 
6
- Retrieves a list of aggregate metrics grouped by time interval.`).option(`dimensions`,{type:`string`,description:`Can be used to break down the data by given attributes. Options are:
6
+ Retrieves a list of aggregate metrics grouped by time interval.`).option(`dimensions`,{type:`string`,array:!0,description:`Can be used to break down the data by given attributes. Options are:
7
7
 
8
8
  Dimension | Name | Example
9
9
  --------------------------|---------------------------------|--------------------------
10
10
  event | Connection Event | connect, progress, disconnect, originError, clientFiltered
11
11
  appID | Application ID | 40d67c87c6cd4b889a4fd57805225e85
12
12
  coloName | Colo Name | SFO
13
- ipVersion | IP version used by the client | 4, 6.`}).option(`sort`,{type:`string`,description:"The sort order for the result set; sort fields must be included in `metrics` or `dimensions`."}).option(`until`,{type:`string`,description:`Until`}).option(`metrics`,{type:`string`,description:`One or more metrics to compute. Options are:
13
+ ipVersion | IP version used by the client | 4, 6.`}).option(`sort`,{type:`string`,array:!0,description:"The sort order for the result set; sort fields must be included in `metrics` or `dimensions`."}).option(`until`,{type:`string`,description:`Until`}).option(`metrics`,{type:`string`,array:!0,description:`One or more metrics to compute. Options are:
14
14
 
15
15
  Metric | Name | Example | Unit
16
16
  --------------------------|-------------------------------------|--------------------------|--------------------------
@@ -33,14 +33,14 @@ Operator | Name | URL Encoded
33
33
 
34
34
  Use the above to construct filters.`}).option(`since`,{type:`string`,description:`Since`}).option(`time-delta`,{type:`string`,description:`Used to select time series resolution.`,choices:[`year`,`quarter`,`month`,`week`,`day`,`hour`,`dekaminute`,`minute`],demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const b={command:`get`,describe:`Get analytics by time`,builder:y,handler:async e=>o({command:`spectrum analytics events bytimes get`,classification:{safeFlags:[`time-delta`,`dry-run`]}},e,async()=>{let o={dimensions:e.dimensions,sort:e.sort,until:e.until,metrics:e.metrics,filters:e.filters,since:e.since,time_delta:e[`time-delta`]};if(e.dryRun){i({command:`cf spectrum analytics events bytimes get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/spectrum/analytics/events/bytime`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:o,bodyKind:`none`});return}let s=await t(e),c=await n({zone:e.zone},s,{quiet:e.quiet});e.zoneId=c;let l=await a(`Loading`,async()=>s.send(v,{zone_id:c,...o}));r(l,{successLabel:`Loaded`})})},x={command:`bytimes`,describe:`Operations for analytics.events.bytimes`,builder:e=>e.command(b).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var S={method:`GET`,path:t=>e`/zones/${t.zone_id}/spectrum/analytics/events/summary`,query:[`dimensions`,`sort`,`until`,`metrics`,`filters`,`since`]};function C(e){return e.usage(`$0 spectrum analytics events summaries get
35
35
 
36
- Retrieves a list of summarised aggregate metrics over a given time period.`).option(`dimensions`,{type:`string`,description:`Can be used to break down the data by given attributes. Options are:
36
+ Retrieves a list of summarised aggregate metrics over a given time period.`).option(`dimensions`,{type:`string`,array:!0,description:`Can be used to break down the data by given attributes. Options are:
37
37
 
38
38
  Dimension | Name | Example
39
39
  --------------------------|---------------------------------|--------------------------
40
40
  event | Connection Event | connect, progress, disconnect, originError, clientFiltered
41
41
  appID | Application ID | 40d67c87c6cd4b889a4fd57805225e85
42
42
  coloName | Colo Name | SFO
43
- ipVersion | IP version used by the client | 4, 6.`}).option(`sort`,{type:`string`,description:"The sort order for the result set; sort fields must be included in `metrics` or `dimensions`."}).option(`until`,{type:`string`,description:`Until`}).option(`metrics`,{type:`string`,description:`One or more metrics to compute. Options are:
43
+ ipVersion | IP version used by the client | 4, 6.`}).option(`sort`,{type:`string`,array:!0,description:"The sort order for the result set; sort fields must be included in `metrics` or `dimensions`."}).option(`until`,{type:`string`,description:`Until`}).option(`metrics`,{type:`string`,array:!0,description:`One or more metrics to compute. Options are:
44
44
 
45
45
  Metric | Name | Example | Unit
46
46
  --------------------------|-------------------------------------|--------------------------|--------------------------
@@ -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{n as u}from"./prompt-kxvGZ6nF.mjs";var d={method:`GET`,path:t=>e`/zones/${t.zone_id}/speed_api/availabilities`};function f(e){return e.usage(`$0 speed availabilities list
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{n as u}from"./prompt-SNVLBS1b.mjs";var d={method:`GET`,path:t=>e`/zones/${t.zone_id}/speed_api/availabilities`};function f(e){return e.usage(`$0 speed availabilities list
3
3
 
4
4
  Retrieves quota for all plans, as well as the current zone quota.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const p={command:`list`,describe:`Get quota and availability`,builder:f,handler:async e=>o({command:`speed availabilities list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf speed availabilities list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/speed_api/availabilities`,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`})})},m={command:`availabilities`,describe:`Check which speed test regions and configurations are available for your zone`,builder:e=>e.command(p).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var h={method:`GET`,path:t=>e`/zones/${t.zone_id}/speed_api/pages`};function g(e){return e.usage(`$0 speed pages list
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{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{n as o,s,t as c}from"./body-parser-BKcZS9iJ.mjs";import{n as l,t as u}from"./input-validation-D7z60HJH.mjs";var d={method:`GET`,path:()=>`/analytics/sql/introspection`,query:[`account_tag`,`include_columns`,`include_custom_attributes`,`include_attributes`,`include_wae`,`include_lex`,`dataset_name`],errors:{400:`BadRequestError`,403:`ForbiddenError`,422:`UnprocessableEntityError`,500:`InternalServerError`,503:`ServiceUnavailableError`}};function f(e){return e.usage("$0 sql datasets\n\nReturns the analytics dataset catalogue. By default, the response contains dataset names, titles, categories, descriptions, kinds, and hidden flags. Set `include_columns` to include each dataset's column names, descriptions, data types, and hidden flags. The caller must have Account Analytics Read permission on the account identified by `account_tag`. Dataset names, descriptions, and columns are the same for every authorized account. When `include_custom_attributes` or `include_attributes` is set, the response also includes attribute names and types discovered from that account's own data, which legitimately differs per caller. `attributes` is a replacement for `custom_attributes` that will eventually be removed; until then, set either flag independently to receive the corresponding field. `hidden` marks catalogue entries a client should de-emphasise. It has no effect on access: hidden datasets and columns are returned here and remain fully queryable. The catalogue lists the datasets this deployment is able to describe, which is not a fixed list. Some datasets are described by the service that owns them and are listed only where that service is available, so the same account may see a different catalogue in different environments, and datasets may appear or disappear without a change to this API. Clients should query the catalogue rather than hard-coding it, and should not treat a dataset's absence as proof that it does not exist. Workers Analytics Engine datasets are named by the account that writes them, so they are discovered from that account's own data rather than from a fixed list. They appear as `events.analyticsEngine.<dataset_name>` and differ per account. A dataset is listed for as long as any of its data is retained, so it does not disappear from the catalogue merely because writes have stopped. An account with a very large number of datasets may receive a truncated list. Set `include_wae=false` to omit them. Log Explorer datasets are listed only where the account has them, so they differ per account and are not part of the static catalogue. Set `include_lex=false` to omit them.").option(`account-tag`,{type:`string`,description:`Account whose available analytics datasets are returned.`,demandOption:!0}).option(`include-columns`,{type:`boolean`,description:`Include column metadata for each returned dataset.`}).option(`include-custom-attributes`,{type:`boolean`,description:"Include a capped set of custom attribute names and types observed during the preceding seven days, as `custom_attributes`. Requires a nonempty dataset_name. Deprecated in favor of `include_attributes`."}).option(`include-attributes`,{type:`boolean`,description:"Include a capped set of attribute names and types observed during the preceding seven days, as `attributes`. Requires a nonempty dataset_name. Replaces `include_custom_attributes`, which is deprecated."}).option(`include-wae`,{type:`boolean`,description:"Include Workers Analytics Engine datasets, which are discovered from the account's own data. Set to `false` to return only datasets described from the static catalogue, which avoids that lookup."}).option(`include-lex`,{type:`boolean`,description:"Include Log Explorer datasets, which are listed only where the account has them. Set to `false` to return only datasets described from the static catalogue, which avoids that lookup."}).option(`dataset-name`,{type:`string`,description:"Return only the dataset with this exact name. An empty value is treated as if the parameter had been omitted, and does not filter the catalogue. A name that matches no dataset in this deployment's catalogue is rejected with `422`; a dataset that exists but is not describable here is rejected identically, so the two cases cannot be told apart.\n\nA Workers Analytics Engine dataset is named in full, as `events.analyticsEngine.<dataset_name>`; the namespace on its own returns every such dataset the account has. A `dataset_name` the account does not have is rejected with `422` like any other unknown name."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const p={command:`datasets`,describe:`List available analytics datasets`,builder:f,handler:async e=>a({command:`sql datasets`,classification:{safeFlags:[`include-columns`,`include-custom-attributes`,`include-attributes`,`include-wae`,`include-lex`,`dry-run`]}},e,async()=>{let a={account_tag:e[`account-tag`],include_columns:e[`include-columns`],include_custom_attributes:e[`include-custom-attributes`],include_attributes:e[`include-attributes`],include_wae:e[`include-wae`],include_lex:e[`include-lex`],dataset_name:e[`dataset-name`]};if(e.dryRun){r({command:`cf sql datasets`,method:`GET`,url:`https://api.cloudflare.com/client/v4/analytics/sql/introspection`,pathParams:{},query:a,bodyKind:`none`});return}let o=await t(e),s=await i(`Loading`,async()=>o.send(d,a));n(s,{successLabel:`Loaded`})})};function m(e){return e.usage("$0 sql query <query>\n\nExecutes a SQL query against the analytics datasets available to the caller. Send either raw SQL or a JSON object containing the query and optional positional or named parameters, time range, and account or zone scope. Raw SQL placeholders can also be bound with query parameters named `param_<name>`. A trailing `FORMAT JSON`, `FORMAT JSONEachRow`, `FORMAT TabSeparated`, or `FORMAT TSV` is supported for all datasets. Without FORMAT, each backend retains its existing default JSON response.").positional(`query`,{type:`string`,description:`SQL query to execute. A trailing FORMAT selects JSON, JSONEachRow, TabSeparated, or TSV output on any dataset. `,demandOption:!0}).option(`scope-account`,{type:`string`,description:`Account tag used to authorize and scope the query. Must be a 32-character lowercase hex string.
2
+ import{i as e,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{n as o,s,t as c}from"./body-parser-BKcZS9iJ.mjs";import{n as l,t as u}from"./input-validation-D7z60HJH.mjs";var d={method:`GET`,path:()=>`/analytics/sql/introspection`,query:[`account_tag`,`include_columns`,`include_custom_attributes`,`include_attributes`,`include_wae`,`include_lex`,`dataset_name`],errors:{400:`BadRequestError`,403:`ForbiddenError`,422:`UnprocessableEntityError`,500:`InternalServerError`,503:`ServiceUnavailableError`}};function f(e){return e.usage("$0 sql datasets\n\nReturns the analytics dataset catalogue. By default, the response contains dataset names, titles, categories, descriptions, kinds, and hidden flags. Set `include_columns` to include each dataset's column names, descriptions, data types, and hidden flags. The caller must have Account Analytics Read permission on the account identified by `account_tag`. Dataset names, descriptions, and columns are the same for every authorized account. When `include_custom_attributes` or `include_attributes` is set, the response also includes attribute names and types discovered from that account's own data, which legitimately differs per caller. `attributes` is a replacement for `custom_attributes` that will eventually be removed; until then, set either flag independently to receive the corresponding field. `hidden` marks catalogue entries a client should de-emphasise. It has no effect on access: hidden datasets and columns are returned here and remain fully queryable. The catalogue lists the datasets this deployment is able to describe, which is not a fixed list. Some datasets are described by the service that owns them and are listed only where that service is available, so the same account may see a different catalogue in different environments, and datasets may appear or disappear without a change to this API. Clients should query the catalogue rather than hard-coding it, and should not treat a dataset's absence as proof that it does not exist. Workers Analytics Engine datasets are named by the account that writes them, so they are discovered from that account's own data rather than from a fixed list. They appear as `events.analyticsEngine.<dataset_name>` and differ per account. A dataset is listed for as long as any of its data is retained, so it does not disappear from the catalogue merely because writes have stopped. An account with a very large number of datasets may receive a truncated list. Set `include_wae=false` to omit them. Log Explorer datasets are listed only where the account has them, so they differ per account and are not part of the static catalogue. Set `include_lex=false` to omit them.").option(`account-tag`,{type:`string`,description:`Account whose available analytics datasets are returned.`,demandOption:!0}).option(`include-columns`,{type:`boolean`,description:`Include column metadata for each returned dataset.`}).option(`include-custom-attributes`,{type:`boolean`,description:"Include a capped set of custom attribute names and types observed during the preceding seven days, as `custom_attributes`. Requires a nonempty dataset_name. Deprecated in favor of `include_attributes`."}).option(`include-attributes`,{type:`boolean`,description:"Include a capped set of attribute names and types observed during the preceding seven days, as `attributes`. Requires a nonempty dataset_name. Replaces `include_custom_attributes`, which is deprecated."}).option(`include-wae`,{type:`boolean`,description:"Include Workers Analytics Engine datasets, which are discovered from the account's own data. Set to `false` to return only datasets described from the static catalogue, which avoids that lookup."}).option(`include-lex`,{type:`boolean`,description:"Include Log Explorer datasets, which are listed only where the account has them. Set to `false` to return only datasets described from the static catalogue, which avoids that lookup."}).option(`dataset-name`,{type:`string`,description:"Return only the dataset with this exact name. An empty value is treated as if the parameter had been omitted, and does not filter the catalogue. A name that matches no dataset in this deployment's catalogue is rejected with `422`; a dataset that exists but is not describable here is rejected identically, so the two cases cannot be told apart.\n\nA Workers Analytics Engine dataset is named in full, as `events.analyticsEngine.<dataset_name>`; the namespace on its own returns every such dataset the account has. A `dataset_name` the account does not have is rejected with `422` like any other unknown name."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const p={command:`datasets`,describe:`List available analytics datasets`,builder:f,handler:async e=>a({command:`sql datasets`,classification:{safeFlags:[`include-columns`,`include-custom-attributes`,`include-attributes`,`include-wae`,`include-lex`,`dry-run`]}},e,async()=>{let a={account_tag:e[`account-tag`],include_columns:e[`include-columns`],include_custom_attributes:e[`include-custom-attributes`],include_attributes:e[`include-attributes`],include_wae:e[`include-wae`],include_lex:e[`include-lex`],dataset_name:e[`dataset-name`]};if(e.dryRun){r({command:`cf sql datasets`,method:`GET`,url:`https://api.cloudflare.com/client/v4/analytics/sql/introspection`,pathParams:{},query:a,bodyKind:`none`});return}let o=await t(e),s=await i(`Loading`,async()=>o.send(d,a));n(s,{successLabel:`Loaded`})})};function m(e){return e.usage("$0 sql query <query>\n\nExecutes a SQL query against the analytics datasets available to the caller. Send either raw SQL or a JSON object containing the query and optional positional or named parameters, time range, and account or zone scope. Raw SQL placeholders can also be bound with query parameters named `param_<name>`. A trailing `FORMAT JSON`, `FORMAT JSONEachRow`, `FORMAT TabSeparated`, or `FORMAT TSV` is supported for all datasets. Without FORMAT, each backend retains its existing default JSON response.").positional(`query`,{type:`string`,description:`SQL query to execute. A trailing FORMAT selects JSON, JSONEachRow, TabSeparated, or TSV output on any dataset. `,demandOption:!0}).option(`scope-account`,{type:`string`,description:`Account tag used to authorize and scope the query. Must be a 32-character lowercase hex string.
3
3
  `}).option(`scope-zone`,{type:`string`,description:`Zone tag used to authorize and scope the query. Must be a 32-character lowercase hex string.
4
4
  `}).option(`time-until`,{type:`string`,description:`Inclusive upper bound for the dataset's timestamp column.`}).option(`time-since`,{type:`string`,description:`Inclusive lower bound for the dataset's timestamp column.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`}).conflicts(`scope-account`,[`scope-zone`]).conflicts(`scope-zone`,[`scope-account`]).check(e=>{if([`time-until`,`time-since`].some(t=>e[t]!==void 0)){let t=[`time-since`].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 --time_range-* flag is set`)}return!0})}const h={command:`query <query>`,describe:`Query analytics datasets`,builder:m,handler:async d=>a({command:`sql query`,classification:{safeFlags:[`dry-run`]}},d,async()=>{if(d.dryRun){r({command:`cf sql query`,method:`POST`,url:`https://api.cloudflare.com/client/v4/analytics/sql`,pathParams:{},bodyKind:d.file===void 0?`json`:`octet-stream`,body:d.file===void 0?d.body===void 0?c({scope:{accountTag:l(d[`scope-account`],`scope-account`,`text`),zoneTag:l(d[`scope-zone`],`scope-zone`,`text`)},time_range:{end:l(d[`time-until`],`time-until`,`text`),start:l(d[`time-since`],`time-since`,`text`)},query:d.query}):o(d.body):{file:d.file}});return}let a=await t(d);if(d.file){let t=u(d.file),r=await i(`Loading`,async()=>e(a,`POST`,`/analytics/sql`,{body:t,headers:{"Content-Type":`text/plain`}}));n(r,{successLabel:`Loaded`});return}if(d.body){let t=o(d.body),r=await i(`Loading`,async()=>e(a,`POST`,`/analytics/sql`,{body:t}));n(r,{successLabel:`Loaded`});return}let f={};d[`scope-account`]!==void 0&&s(f,[`scope`,`accountTag`],l(d[`scope-account`],`scope-account`,`text`)),d[`scope-zone`]!==void 0&&s(f,[`scope`,`zoneTag`],l(d[`scope-zone`],`scope-zone`,`text`)),d[`time-until`]!==void 0&&s(f,[`time_range`,`end`],l(d[`time-until`],`time-until`,`text`)),d[`time-since`]!==void 0&&s(f,[`time_range`,`start`],l(d[`time-since`],`time-since`,`text`)),d.query!==void 0&&(f.query=d.query);let p=await i(`Loading`,async()=>e(a,`POST`,`/analytics/sql`,{body:f}));n(p,{successLabel:`Loaded`})})},g={command:`sql`,describe:`sql`,builder:e=>e.command(p).command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{g as default};