cf 1.0.0-beta.27 → 1.0.0-beta.29

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 (370) hide show
  1. package/README.md +10 -3
  2. package/dist/_meta/commands.json +7966 -5034
  3. package/dist/_meta/hand-written-commands.json +40 -10
  4. package/dist/_meta/schemas.json +3153 -3736
  5. package/dist/{abuse-reports-RxXqfDEW.mjs → abuse-reports-DqXYX_6F.mjs} +10 -10
  6. package/dist/{access-BxEprr2f.mjs → access-Cte4yyIz.mjs} +1 -1
  7. package/dist/{accounts-DU2ZNYqP.mjs → accounts-G-x-_cEx.mjs} +58 -57
  8. package/dist/{acm-CBCIKBJ4.mjs → acm-Bg3HqMGG.mjs} +7 -7
  9. package/dist/{addressing-BKxiLRHk.mjs → addressing-BwEofGEm.mjs} +46 -46
  10. package/dist/{agent-memory-DkBpQYUL.mjs → agent-memory-DhwZ2KRw.mjs} +15 -15
  11. package/dist/ai-DWWRIQIt.mjs +30 -0
  12. package/dist/ai-audit-CMEBz6ZP.mjs +6 -0
  13. package/dist/ai-gateway-D2s0isU-.mjs +76 -0
  14. package/dist/ai-search-a0uqr9yJ.mjs +74 -0
  15. package/dist/{ai-security-CvZfP2JC.mjs → ai-security-H_RqjRoL.mjs} +4 -4
  16. package/dist/alerting-Bgp9rE4I.mjs +52 -0
  17. package/dist/analytics-CFYM82FD.mjs +17 -0
  18. package/dist/analytics-engine-BLiEaLxb.mjs +4 -0
  19. package/dist/api-Dnt6lRJG.mjs +3 -0
  20. package/dist/{api-security-BbcvDtff.mjs → api-security-B0YtHglt.mjs} +63 -63
  21. package/dist/argo-BPwbzHY7.mjs +14 -0
  22. package/dist/{artifacts-2R2sxIKO.mjs → artifacts-B6UwC2PH.mjs} +20 -20
  23. package/dist/{audit-logs-LoBB1OO_.mjs → audit-logs-kG97iEnI.mjs} +2 -2
  24. package/dist/auth-Czr8ChBB.mjs +2 -0
  25. package/dist/auth-DA1PHaHi.mjs +2 -0
  26. package/dist/auth-Dwfa4S3h.mjs +7 -0
  27. package/dist/{auth-token-BwpERbnG.mjs → auth-token-CE3Wa5-b.mjs} +1 -1
  28. package/dist/{autoconfig-B2w-woU0.mjs → autoconfig-B4tFR6ua.mjs} +118 -114
  29. package/dist/{basin-catalog-AgOHGiPI.mjs → basin-catalog-DzVEPupy.mjs} +17 -17
  30. package/dist/billing-TERxOuLR.mjs +22 -0
  31. package/dist/{blocks-C8vyXIAT.mjs → blocks-C3Im7AT0.mjs} +1 -1
  32. package/dist/body-parser-HN91kAf0.mjs +2 -0
  33. package/dist/{body-unions-CjpNjwSW.mjs → body-unions-D9OSaf4M.mjs} +1 -1
  34. package/dist/{bot-management-fwxKIbaB.mjs → bot-management-SZw9jTOC.mjs} +4 -4
  35. package/dist/{botnet-feed-DCYB5kYZ.mjs → botnet-feed-DjdAeUtb.mjs} +5 -5
  36. package/dist/brand-protection-BpA7Gmf1.mjs +18 -0
  37. package/dist/browser-run-BvjfMK3f.mjs +40 -0
  38. package/dist/build-CCwo_ydV.mjs +2 -0
  39. package/dist/build-yQOzZg6Z.mjs +2 -0
  40. package/dist/builds-tMa3sbQU.mjs +62 -0
  41. package/dist/cache-b_EPh6Is.mjs +36 -0
  42. package/dist/cf-DmvZ2L51.mjs +18 -0
  43. package/dist/{chunk-DSGVRFIS-DQwKND2c.mjs → chunk-DSGVRFIS-Cj7pO-YQ.mjs} +1 -1
  44. package/dist/chunk-Q5KVZMHK-WOCEMyET.mjs +363 -0
  45. package/dist/cli-Cc7ujzAy.mjs +4 -0
  46. package/dist/{client-side-security-VmZzMy-m.mjs → client-side-security-DVkeCzcC.mjs} +14 -14
  47. package/dist/{cloud-connector-bMlFnqP0.mjs → cloud-connector-MVf4acRR.mjs} +3 -3
  48. package/dist/{cloudflared-Ba4KWdTO.mjs → cloudflared-BOkMl8Gm.mjs} +1 -1
  49. package/dist/cloudforce-one-KrCfQbRx.mjs +318 -0
  50. package/dist/{command-BxZBNPxG.mjs → command-BQbZw4Kx.mjs} +1 -1
  51. package/dist/command-BVct0Dvr.mjs +2 -0
  52. package/dist/{command-BiIVclNA.mjs → command-C4_lMRkw.mjs} +1 -1
  53. package/dist/command-CJ3ldWrA.mjs +2 -0
  54. package/dist/command-CyOdBNur.mjs +2 -0
  55. package/dist/command-D2XkyO1e.mjs +2 -0
  56. package/dist/command-DHODgfFZ.mjs +2 -0
  57. package/dist/command-DIIaZx_f.mjs +2 -0
  58. package/dist/command-DONwHpqZ.mjs +2 -0
  59. package/dist/command-DdYnSf-8.mjs +2 -0
  60. package/dist/command-DqOU7Ql2.mjs +2 -0
  61. package/dist/{command-pMoNdd22.mjs → command-HW7k43qu.mjs} +1 -1
  62. package/dist/command-NqM0lo4a.mjs +2 -0
  63. package/dist/command-bwVDyMv4.mjs +2 -0
  64. package/dist/command-yzqs4m83.mjs +2 -0
  65. package/dist/{completions-DRzBiqpv.mjs → completions-0YKvIyBT.mjs} +2 -2
  66. package/dist/connector-interrupts-CsunbRsr.mjs +6 -0
  67. package/dist/{connector-telemetry-events-BbAOUt9h.mjs → connector-telemetry-events-DmQPD7xC.mjs} +3 -3
  68. package/dist/{connector-telemetry-snapshots-DcpBx7Qx.mjs → connector-telemetry-snapshots-C62iHjC9.mjs} +3 -3
  69. package/dist/{connectors-D1WFLJoE.mjs → connectors-Bg0MU6ZT.mjs} +7 -7
  70. package/dist/containers-BiA_bpPR.mjs +76 -0
  71. package/dist/{content-scan-D1GfPSL0.mjs → content-scan-4SA2nacB.mjs} +6 -6
  72. package/dist/{context-Dp4CXG22.mjs → context-BGm5_wTT.mjs} +1 -1
  73. package/dist/{cps-D4uhzg3k.mjs → cps-WDmD3V5I.mjs} +3 -3
  74. package/dist/create-DmLDMvrj.mjs +2 -0
  75. package/dist/csam-scanner-Rmy-hBEA.mjs +8 -0
  76. package/dist/custom-csrs-D-lvkyRV.mjs +18 -0
  77. package/dist/custom-hostnames-B5BQX5m6.mjs +24 -0
  78. package/dist/custom-nameservers-CZrRjcjx.mjs +12 -0
  79. package/dist/custom-pages-CWwjtfbj.mjs +38 -0
  80. package/dist/d1-N81q-FAr.mjs +50 -0
  81. package/dist/{delegate-B4bKqF7i.mjs → delegate-livNdiwK.mjs} +1 -1
  82. package/dist/delegate.mjs +1 -1
  83. package/dist/deploy-Ok4ncy06.mjs +2 -0
  84. package/dist/deploy-context-B_lLfxt7.mjs +55 -0
  85. package/dist/deploy-input-JZlEJwKB.mjs +2 -0
  86. package/dist/dev-DxbkJkzc.mjs +4 -0
  87. package/dist/{diagnostics-D1CUs2o9.mjs → diagnostics-DlJzpO8b.mjs} +7 -7
  88. package/dist/dialog-CD94-Kzw.mjs +2 -0
  89. package/dist/discover-D9FNaCDK.mjs +2 -0
  90. package/dist/discover-DGsMj9ZN.mjs +2 -0
  91. package/dist/{dist-D5qkmHhC.mjs → dist-BxhwE-W1.mjs} +202 -193
  92. package/dist/{dls-DWBiYzY1.mjs → dls-5OXuxLAB.mjs} +8 -8
  93. package/dist/dns-Burep9O7.mjs +142 -0
  94. package/dist/{dns-firewall-DH9xIT5H.mjs → dns-firewall-hUHaQ0DE.mjs} +8 -8
  95. package/dist/docs-BFVK88kB.mjs +3 -0
  96. package/dist/{dry-run-gy0Hl9xo.mjs → dry-run-qsnRlRk6.mjs} +1 -1
  97. package/dist/{durable-objects-DF0MYpnV.mjs → durable-objects-D6R8S2Dk.mjs} +3 -3
  98. package/dist/email-auth--2KCzZNA.mjs +6 -0
  99. package/dist/email-routing-DzaExfVf.mjs +44 -0
  100. package/dist/{email-security-CnNa1YON.mjs → email-security-DwQJszzy.mjs} +71 -71
  101. package/dist/{email-sending-CpDSw-Eb.mjs → email-sending-mQd2qB-o.mjs} +21 -21
  102. package/dist/{error-sanitization-DG8WSzHe.mjs → error-sanitization-BkgtZ0Vx.mjs} +1 -1
  103. package/dist/error-sanitization-D069tpKk.mjs +2 -0
  104. package/dist/errors-C_bGcR0X.mjs +11 -0
  105. package/dist/field-extractors-MVOizTlB.mjs +8 -0
  106. package/dist/{firewall-CY_oem-d.mjs → firewall-DtSIlkfL.mjs} +19 -19
  107. package/dist/flagship-9E5gwNki.mjs +24 -0
  108. package/dist/{fraud-CSUKLh8X.mjs → fraud-DjqhVJdf.mjs} +3 -3
  109. package/dist/generate-BzOnRBij.mjs +2 -0
  110. package/dist/generate-DfxZtpn9.mjs +2 -0
  111. package/dist/get-3XNn0upb.mjs +2 -0
  112. package/dist/{global-options-DiKj2cQy.mjs → global-options-4pyD17hd.mjs} +1 -1
  113. package/dist/{google-tag-gateway-C2skt6t-.mjs → google-tag-gateway-BM5GmCZa.mjs} +3 -3
  114. package/dist/gt-BV-jij5q.mjs +4 -0
  115. package/dist/healthchecks-CEZ5f3XJ.mjs +20 -0
  116. package/dist/{hyperdrive-FcBbpew4.mjs → hyperdrive-Da8hCcUw.mjs} +12 -12
  117. package/dist/{iam-8T74DNhH.mjs → iam-BK6N7NdQ.mjs} +31 -31
  118. package/dist/{images-C3JUaf6b.mjs → images-3bCWE6Ml.mjs} +33 -33
  119. package/dist/index.mjs +1 -1
  120. package/dist/init-BgCF9K8h.mjs +43 -0
  121. package/dist/intel-BQ58CJLt.mjs +62 -0
  122. package/dist/{interactive-CKHdGvkh.mjs → interactive-JBA3qOUa.mjs} +9 -9
  123. package/dist/{internal-CamuESs0.mjs → internal-CWPz0sBF.mjs} +2 -2
  124. package/dist/{ips-DinCNnWj.mjs → ips-3WYegiVW.mjs} +2 -2
  125. package/dist/k2-Bc_hjmiv.mjs +10 -0
  126. package/dist/kv-DbShBhhg.mjs +12 -0
  127. package/dist/{lazy-command-WB1FOuew.mjs → lazy-command-CbGyEqFK.mjs} +1 -1
  128. package/dist/leaked-credential-checks-DgPefxP9.mjs +16 -0
  129. package/dist/{live-B6AsI_E5.mjs → live-BTtMv1a6.mjs} +2 -2
  130. package/dist/load-balancers-C2hg52WA.mjs +84 -0
  131. package/dist/{local-CgBhtmON.mjs → local-B3zt9PXR.mjs} +1 -1
  132. package/dist/local-DRxctCh9.mjs +2 -0
  133. package/dist/local-runtime-BOnDiMDc.mjs +2 -0
  134. package/dist/{log-BWdaOGOW.mjs → log-Brx-wjJW.mjs} +3 -3
  135. package/dist/log-DBAHla_W.mjs +2 -0
  136. package/dist/login-CK3nn9a5.mjs +2 -0
  137. package/dist/{login-BJHaTERg.mjs → login-DiR-buzS.mjs} +3 -3
  138. package/dist/{logpush-qhlxsioM.mjs → logpush-CitvUX-J.mjs} +22 -22
  139. package/dist/{logs-bI54CJ0w.mjs → logs-CfWHu4Ir.mjs} +14 -16
  140. package/dist/magic-network-monitoring-gU6yzzML.mjs +34 -0
  141. package/dist/{magic-transit-BwDyySHJ.mjs → magic-transit-B3JY9u5o.mjs} +139 -139
  142. package/dist/{managed-defense-CsBBkfeQ.mjs → managed-defense-C_EQ-NYp.mjs} +9 -9
  143. package/dist/managed-transforms-DIGl6JkM.mjs +8 -0
  144. package/dist/{mcp-CyI0sDmL.mjs → mcp-DqhQJVaz.mjs} +15 -15
  145. package/dist/{mesh-Czr0UCP4.mjs → mesh-DXVZBNDC.mjs} +12 -12
  146. package/dist/{migrate-DKDWYrz2.mjs → migrate-CmXyk9vX.mjs} +1 -1
  147. package/dist/{monetization-NUgfDtSy.mjs → monetization-CWg-mySr.mjs} +9 -9
  148. package/dist/{network-interconnects-DuIBe8fK.mjs → network-interconnects-DhfKL5tG.mjs} +17 -19
  149. package/dist/{network-B42zrBic.mjs → network-jtgq5eb4.mjs} +24 -24
  150. package/dist/o11y-eYYs59X9.mjs +88 -0
  151. package/dist/oauth-BgDZMd72.mjs +5 -0
  152. package/dist/{oauth-BLQ1-y3R.mjs → oauth-V37G-PaV.mjs} +1 -1
  153. package/dist/{observability-BxhJQCgZ.mjs → observability-CB72eC4T.mjs} +2 -2
  154. package/dist/ohttp-gateway-K9ToEft8.mjs +8 -0
  155. package/dist/organizations-BllV7l_c.mjs +70 -0
  156. package/dist/output-hFMAotFl.mjs +2 -0
  157. package/dist/package-oNVeacC9.mjs +2 -0
  158. package/dist/page-rules-BVmi-ZFW.mjs +35 -0
  159. package/dist/pages-5spcBpX1.mjs +48 -0
  160. package/dist/pay-per-crawl-BgsdGcBi.mjs +36 -0
  161. package/dist/{pay-per-use-VatiU-Nt.mjs → pay-per-use-CzmI1kEA.mjs} +16 -16
  162. package/dist/pipelines-CbtmLRxt.mjs +40 -0
  163. package/dist/{precursor-D3VH2MXT.mjs → precursor-Dk8YOKf_.mjs} +2 -2
  164. package/dist/previews-Bv1HMMtO.mjs +6 -0
  165. package/dist/progress-DE_G09u2.mjs +2 -0
  166. package/dist/project-settings-D_S-UC8I.mjs +3 -0
  167. package/dist/prompt-D274Im1O.mjs +4 -0
  168. package/dist/queues-DGCYUr4g.mjs +52 -0
  169. package/dist/r2-DtCk-Nfi.mjs +112 -0
  170. package/dist/{radar-CvLtu-Vr.mjs → radar-1CwqOsMZ.mjs} +150 -150
  171. package/dist/raw-fetch-DhlyWQtk.mjs +2 -0
  172. package/dist/{ready-gsGEaWLL.mjs → ready-CcoEA7M7.mjs} +2 -2
  173. package/dist/{realtime-DiCEgFTC.mjs → realtime-DFUxwIG5.mjs} +80 -81
  174. package/dist/registrar-Cl1snz8z.mjs +43 -0
  175. package/dist/registrar-sandbox-Cne9BVCZ.mjs +58 -0
  176. package/dist/{reporting-BiHgnT8L.mjs → reporting-D9FC-Z-3.mjs} +7 -7
  177. package/dist/request-headers-Bopp5lH_.mjs +2 -0
  178. package/dist/request-tracers-CSSB9_aW.mjs +4 -0
  179. package/dist/resource-sharing-D8yuzJm7.mjs +36 -0
  180. package/dist/{rules-CRhe_ca9.mjs → rules-DzmOQ3MB.mjs} +8 -8
  181. package/dist/rulesets-DsTGcgbc.mjs +42 -0
  182. package/dist/{rum-BfnWHW_d.mjs → rum-DrJLI93T.mjs} +14 -14
  183. package/dist/run-C5yPsiO2.mjs +2 -0
  184. package/dist/run-CXWkMU3x.mjs +2 -0
  185. package/dist/schema-CfZOW8Zw.mjs +2 -0
  186. package/dist/{schema-cache-BIo0Gi2H.mjs → schema-cache-CtqAs0PP.mjs} +1 -1
  187. package/dist/schema-flags-DO3kLYBu.mjs +4 -0
  188. package/dist/scim-0OufLKru.mjs +16 -0
  189. package/dist/{secrets-store-DgtzZRze.mjs → secrets-store-BQeLzFxv.mjs} +11 -11
  190. package/dist/{security-insights-SlUGW3F_.mjs → security-insights-D2pj8-O-.mjs} +20 -20
  191. package/dist/{security-txt-C3YS0REz.mjs → security-txt-SKtgW4n-.mjs} +4 -4
  192. package/dist/session-COdP8BXD.mjs +2 -0
  193. package/dist/shared-D_2KLpP3.mjs +2 -0
  194. package/dist/{signed-url-ClLk45_J.mjs → signed-url-CcE2zQ4Y.mjs} +2 -2
  195. package/dist/smart-shield-Dod9Gs6T.mjs +22 -0
  196. package/dist/snippets-DrrdpLnS.mjs +18 -0
  197. package/dist/spawn-DNf-Ge8d.mjs +5 -0
  198. package/dist/{spectrum-Cj0BMtg2.mjs → spectrum-CHBGZbZF.mjs} +11 -11
  199. package/dist/{speed-BrVeZRyX.mjs → speed-vOlHyG3v.mjs} +11 -11
  200. package/dist/sql-BCuLxGSf.mjs +4 -0
  201. package/dist/src-ByCoEqOw.mjs +133 -0
  202. package/dist/{ssl-Bx4LCutF.mjs → ssl-BA_dcVwF.mjs} +60 -62
  203. package/dist/startup-profile-CyQk_f_L.mjs +2 -0
  204. package/dist/{startup-profile-DqaYNT0b.mjs → startup-profile-uh-F0HRS.mjs} +3 -3
  205. package/dist/state-B6r-b_-d.mjs +2 -0
  206. package/dist/{state-BmzOLELo.mjs → state-CTLznbVs.mjs} +1 -1
  207. package/dist/{containers-DINLx5_i.mjs → static-assets-DGDoaJf1.mjs} +216 -210
  208. package/dist/stream-CzlqY8hq.mjs +89 -0
  209. package/dist/{tags-xVzjZxdt.mjs → tags-BLeaslAb.mjs} +8 -8
  210. package/dist/telemetry-COlodX5Z.mjs +2 -0
  211. package/dist/{telemetry-CJ9URio3.mjs → telemetry-DF7A5Bpk.mjs} +1 -1
  212. package/dist/{tenant-custom-nameservers-M7Fxqh2W.mjs → tenant-custom-nameservers-C5rh6jPf.mjs} +4 -4
  213. package/dist/tenants-CRirmhxS.mjs +13 -0
  214. package/dist/{tools-C-vmgYSv.mjs → tools-BRjRgZnj.mjs} +1 -1
  215. package/dist/tunnels-nLfIWPYT.mjs +27 -0
  216. package/dist/{turnstile-B_Ugzgom.mjs → turnstile-CZjXtBCr.mjs} +10 -10
  217. package/dist/ui-dWsVmFCG.mjs +2 -0
  218. package/dist/{update-check-DRr0eRhB.mjs → update-check-CXMdVBhW.mjs} +1 -1
  219. package/dist/{update-check-DHUo4FOJ.mjs → update-check-D_Oky9-u.mjs} +1 -1
  220. package/dist/update-check-worker.mjs +1 -1
  221. package/dist/{url-normalization-CZRQH_pJ.mjs → url-normalization-DTKgJHE8.mjs} +4 -4
  222. package/dist/url-scanner-9XW3zLaU.mjs +16 -0
  223. package/dist/user-Bk1BIqZ5.mjs +103 -0
  224. package/dist/vectorize-CgOfmWYq.mjs +30 -0
  225. package/dist/verify-B9ILCohg.mjs +2 -0
  226. package/dist/verify-BCuWaO-L.mjs +2 -0
  227. package/dist/version-CcuBNjqg.mjs +2 -0
  228. package/dist/waiting-rooms-C3nTKfK9.mjs +52 -0
  229. package/dist/{web-assets-CgQXsp8m.mjs → web-assets-CWU3jrit.mjs} +29 -29
  230. package/dist/web3-CRpQ5sl4.mjs +26 -0
  231. package/dist/workers-BZMvamn0.mjs +39 -0
  232. package/dist/{workers-for-platforms-5RkV9MVp.mjs → workers-for-platforms-C7F2ev-5.mjs} +18 -18
  233. package/dist/{workers-vpc-Bt4OQbwM.mjs → workers-vpc-ztEKvWmq.mjs} +6 -6
  234. package/dist/workflows-Dd88_Nqc.mjs +48 -0
  235. package/dist/{wrangler-migration-BbmGOu8l.mjs → wrangler-migration-BzMTJPdI.mjs} +302 -293
  236. package/dist/zaraz-BFK0p28R.mjs +22 -0
  237. package/dist/zero-trust-Cdjfp0Ie.mjs +1008 -0
  238. package/dist/{zones-DTAcguf6.mjs → zones-DDn5jk6I.mjs} +51 -51
  239. package/package.json +20 -20
  240. package/dist/ai-DqEN_hhg.mjs +0 -30
  241. package/dist/ai-audit-BmzOgt6x.mjs +0 -6
  242. package/dist/ai-gateway-B0uiYVHq.mjs +0 -74
  243. package/dist/ai-search-DbZIxdio.mjs +0 -74
  244. package/dist/alerting-BjGwBxZT.mjs +0 -52
  245. package/dist/analytics-C7kT_H-W.mjs +0 -17
  246. package/dist/analytics-engine-BHpcNSdD.mjs +0 -4
  247. package/dist/api-X3wKppsT.mjs +0 -3
  248. package/dist/argo-D1VONzu-.mjs +0 -14
  249. package/dist/auth-CspwoBlp.mjs +0 -2
  250. package/dist/auth-D499YE2n.mjs +0 -7
  251. package/dist/auth-FK2eLQ02.mjs +0 -2
  252. package/dist/billing-DRNww0iC.mjs +0 -24
  253. package/dist/body-parser-BKcZS9iJ.mjs +0 -2
  254. package/dist/brand-protection-BVICLzBc.mjs +0 -26
  255. package/dist/browser-run-CEk-NIgP.mjs +0 -40
  256. package/dist/build-CRm2TQq8.mjs +0 -2
  257. package/dist/build-DO_GNhRl.mjs +0 -2
  258. package/dist/builds-CoazxuN-.mjs +0 -64
  259. package/dist/cache-jlLJLSu7.mjs +0 -36
  260. package/dist/cf-hP0SOgC6.mjs +0 -18
  261. package/dist/chunk-SOBRPAPT-BKzUiNx_.mjs +0 -363
  262. package/dist/cli-Nqf58-1c.mjs +0 -4
  263. package/dist/cloudforce-one-CCaIBOAo.mjs +0 -318
  264. package/dist/command-BASaTmJc.mjs +0 -2
  265. package/dist/command-Bih1HLr3.mjs +0 -2
  266. package/dist/command-ByYf12-8.mjs +0 -2
  267. package/dist/command-C0qCuw03.mjs +0 -2
  268. package/dist/command-C2FVMd1b.mjs +0 -2
  269. package/dist/command-C4OgtX_x.mjs +0 -2
  270. package/dist/command-C5Kqc5Km.mjs +0 -2
  271. package/dist/command-CFxyp8Uo.mjs +0 -2
  272. package/dist/command-CZAR85ba.mjs +0 -2
  273. package/dist/command-CelQVrZL.mjs +0 -2
  274. package/dist/command-CrAlzysj.mjs +0 -2
  275. package/dist/command-MxFFWqMg.mjs +0 -2
  276. package/dist/connector-interrupts-CrTeSyaM.mjs +0 -6
  277. package/dist/containers-BOBEs1Gk.mjs +0 -75
  278. package/dist/create-BtmuVqVL.mjs +0 -2
  279. package/dist/csam-scanner-DOOUBeBM.mjs +0 -8
  280. package/dist/custom-csrs-DtdFo5YZ.mjs +0 -18
  281. package/dist/custom-hostnames-ccdlELaD.mjs +0 -24
  282. package/dist/custom-nameservers-p3gDjfva.mjs +0 -12
  283. package/dist/custom-pages-DAkKVzgR.mjs +0 -38
  284. package/dist/d1-CDIyRdh4.mjs +0 -52
  285. package/dist/deploy-BaC5Ty7F.mjs +0 -2
  286. package/dist/deploy-context-DTTgNGro.mjs +0 -56
  287. package/dist/deploy-input-mAy06fAI.mjs +0 -2
  288. package/dist/dev-De-HszNT.mjs +0 -4
  289. package/dist/dialog-D5lus4M4.mjs +0 -2
  290. package/dist/discover-6kAmVMPp.mjs +0 -2
  291. package/dist/discover-C06Syc2B.mjs +0 -2
  292. package/dist/dns-wMjf1t6-.mjs +0 -152
  293. package/dist/docs-BA7qslb2.mjs +0 -3
  294. package/dist/email-auth-BShMFXn4.mjs +0 -6
  295. package/dist/email-domains-CDSbVclP.mjs +0 -14
  296. package/dist/email-routing-CBCkbg_F.mjs +0 -44
  297. package/dist/error-sanitization-B025CygB.mjs +0 -2
  298. package/dist/errors-DatLr-iR.mjs +0 -11
  299. package/dist/field-extractors-BwGdMnTr.mjs +0 -8
  300. package/dist/flagship-Bat5EZCk.mjs +0 -24
  301. package/dist/generate-CeeWW3eX.mjs +0 -3
  302. package/dist/generate-D6V4Q58z.mjs +0 -2
  303. package/dist/get-Be821dio.mjs +0 -2
  304. package/dist/gt-BQkaDQDq.mjs +0 -3
  305. package/dist/healthchecks-uC43QKQd.mjs +0 -20
  306. package/dist/init-BEVVz4_P.mjs +0 -43
  307. package/dist/intel-DRy4rHrt.mjs +0 -62
  308. package/dist/k2-wsanPL3y.mjs +0 -10
  309. package/dist/kv-BLSPcEnH.mjs +0 -12
  310. package/dist/leaked-credential-checks-CSZd9hBQ.mjs +0 -16
  311. package/dist/load-balancers-gap5u4b1.mjs +0 -84
  312. package/dist/local-CFsO9Tkg.mjs +0 -2
  313. package/dist/local-runtime-CmlJ20uJ.mjs +0 -2
  314. package/dist/log-DZfik9Jk.mjs +0 -2
  315. package/dist/login-BfuOf-Yi.mjs +0 -2
  316. package/dist/magic-network-monitoring-CX3TaMTu.mjs +0 -34
  317. package/dist/managed-transforms-CUC-uAbW.mjs +0 -8
  318. package/dist/o11y-oEUpMC3O.mjs +0 -86
  319. package/dist/oauth-BmSFLp_s.mjs +0 -4
  320. package/dist/organization-CEnlXwrl.mjs +0 -70
  321. package/dist/organizations-Dt86ToxE.mjs +0 -4
  322. package/dist/origin-post-quantum-encryption-lX-uaJSL.mjs +0 -6
  323. package/dist/output-BJEgbI0G.mjs +0 -2
  324. package/dist/package-CiRJBRHO.mjs +0 -2
  325. package/dist/page-rules-J6LhwR-s.mjs +0 -38
  326. package/dist/pages-BksdnChs.mjs +0 -48
  327. package/dist/pay-per-crawl-BLcbHRoR.mjs +0 -36
  328. package/dist/pipelines-B5AoB3f3.mjs +0 -40
  329. package/dist/previews-DzJ85fsr.mjs +0 -6
  330. package/dist/progress-DLri-rA7.mjs +0 -2
  331. package/dist/project-settings-nBMEx1f-.mjs +0 -3
  332. package/dist/prompt-D0dXwuME.mjs +0 -4
  333. package/dist/queues-BsAck4To.mjs +0 -52
  334. package/dist/r2-BYjdHDEZ.mjs +0 -112
  335. package/dist/raw-fetch-DQeDx1wT.mjs +0 -2
  336. package/dist/registrar-D4wdgWpo.mjs +0 -43
  337. package/dist/registrar-sandbox-B6yopzdG.mjs +0 -58
  338. package/dist/request-headers-CoxHUNcB.mjs +0 -2
  339. package/dist/request-tracers-817HTytF.mjs +0 -4
  340. package/dist/resource-sharing-CW9xxtq5.mjs +0 -36
  341. package/dist/rulesets-CKyc-Xlx.mjs +0 -42
  342. package/dist/run-Ciw_GIrC.mjs +0 -2
  343. package/dist/run-DD45EQTm.mjs +0 -2
  344. package/dist/schema-DuLIZRhA.mjs +0 -2
  345. package/dist/schema-flags-DrqvwQNw.mjs +0 -4
  346. package/dist/scim-C4iRWNYB.mjs +0 -16
  347. package/dist/session-D2yuwO4i.mjs +0 -2
  348. package/dist/shared--uVkAAd7.mjs +0 -2
  349. package/dist/smart-shield-Dn95hqUH.mjs +0 -22
  350. package/dist/snippets-BNUKOajz.mjs +0 -18
  351. package/dist/spawn-DuT4snxu.mjs +0 -5
  352. package/dist/sql-BX1pBqj3.mjs +0 -4
  353. package/dist/src-DPnUfK4c.mjs +0 -131
  354. package/dist/startup-profile-tZNb2HGz.mjs +0 -2
  355. package/dist/state-Uwfrmw5I.mjs +0 -2
  356. package/dist/stream-BRzr6yh0.mjs +0 -89
  357. package/dist/telemetry-Pt5GpCKD.mjs +0 -2
  358. package/dist/tunnels-DQVXKUKA.mjs +0 -27
  359. package/dist/ui-FYultowZ.mjs +0 -2
  360. package/dist/url-scanner-BH4PLy16.mjs +0 -16
  361. package/dist/user-Bn82Qw0Y.mjs +0 -103
  362. package/dist/vectorize-DoVVz_sh.mjs +0 -30
  363. package/dist/version-Zr2oF8mY.mjs +0 -2
  364. package/dist/waiting-rooms-QUW131o3.mjs +0 -52
  365. package/dist/web3-TY9s6Swn.mjs +0 -26
  366. package/dist/workers-B3uJqJKc.mjs +0 -39
  367. package/dist/workers-builds-BgGY0IGk.mjs +0 -14
  368. package/dist/workflows-6m85DdqF.mjs +0 -48
  369. package/dist/zaraz-8WSJ7l0L.mjs +0 -22
  370. package/dist/zero-trust-DK0cqDZv.mjs +0 -1022
@@ -0,0 +1,18 @@
1
+ #!/usr/bin/env node
2
+ import{i as e,n as t}from"./auth-DA1PHaHi.mjs";import{t as n}from"./path-DRw6Y-nd.mjs";import{t as r}from"./dry-run-qsnRlRk6.mjs";import{i}from"./context-BGm5_wTT.mjs";import{t as a}from"./progress-DE_G09u2.mjs";import{n as o,t as s}from"./raw-fetch-DhlyWQtk.mjs";import"./telemetry-COlodX5Z.mjs";import{t as c}from"./run-CXWkMU3x.mjs";import"./api-Dnt6lRJG.mjs";import{t as l}from"./output-hFMAotFl.mjs";import{n as u}from"./prompt-D274Im1O.mjs";import{o as d,r as f,t as p}from"./body-parser-HN91kAf0.mjs";import{n as m,t as h}from"./input-validation-D7z60HJH.mjs";function g(e){return e.usage(`$0 snippets content get <snippet-name>
3
+
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=>c({command:`snippets content get`,classification:{safeFlags:[`dry-run`,`text`]}},e,async()=>{if(e.dryRun){r({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 n=await t(e);e.zoneId=await i({zone:e.zone},n,{quiet:e.quiet});let c=await a(`Loading`,async()=>s(`/zones/${e.zoneId}/snippets/${encodeURIComponent(String(e[`snippet-name`]))}/content`,{method:`GET`,local:e.local===!0,persistTo:e.persistTo}));o(e.text===!0?c.toString(`utf-8`):c)})},v={command:`content`,describe:`Operations for content`,builder:e=>e.command(_).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var y={method:`DELETE`,path:e=>n`/zones/${e.zone_id}/snippets/${e.snippet_name}`};function b(e){return e.usage(`$0 snippets delete <snippet-name>
5
+
6
+ Deletes a snippet belonging to the zone. Returns a 4XX response if the zone or snippet no longer exists.`).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(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const x={command:`delete <snippet-name>`,describe:`Delete a zone snippet`,builder:b,handler:async e=>c({command:`snippets delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){r({command:`cf snippets delete`,method:`DELETE`,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`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"snippet-name":String(e[`snippet-name`]??``)},bodyKind:`none`});return}let n=await t(e),o=await i({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=o,!await u({force:!!e.force}))return;let s=await a(`Deleting`,async()=>n.send(y,{zone_id:o,snippet_name:e[`snippet-name`]}));l(s,{successLabel:`Deleted`})})};var S={method:`GET`,path:e=>n`/zones/${e.zone_id}/snippets/${e.snippet_name}`};function C(e){return e.usage(`$0 snippets get <snippet-name>
7
+
8
+ Fetches 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})}const w={command:`get <snippet-name>`,describe:`Get a zone snippet`,builder:C,handler:async e=>c({command:`snippets get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf snippets 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`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"snippet-name":String(e[`snippet-name`]??``)},bodyKind:`none`});return}let n=await t(e),o=await i({zone:e.zone},n,{quiet:e.quiet});e.zoneId=o;let s=await a(`Loading`,async()=>n.send(S,{zone_id:o,snippet_name:e[`snippet-name`]}));l(s,{successLabel:`Loaded`})})};var T={method:`GET`,path:e=>n`/zones/${e.zone_id}/snippets`,query:[`page`,`per_page`]};function E(e){return e.usage(`$0 snippets list
9
+
10
+ Fetches all snippets belonging to the zone.`).option(`page`,{type:`number`,description:`Specifies the current page number.`}).option(`per-page`,{type:`number`,description:`Specifies how many results to return per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const D={command:`list`,describe:`List zone snippets`,builder:E,handler:async e=>c({command:`snippets list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={page:e.page,per_page:e[`per-page`]};if(e.dryRun){r({command:`cf snippets list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/snippets`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:n,bodyKind:`none`});return}let o=await t(e),s=await i({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(T,{zone_id:s,...n}));l(c,{successLabel:`Loaded`})})};var O={method:`DELETE`,path:e=>n`/zones/${e.zone_id}/snippets/snippet_rules`};function k(e){return e.usage(`$0 snippets rules delete
11
+
12
+ Deletes all snippet rules belonging to the zone.`).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 A={command:`delete`,describe:`Delete zone snippet rules`,builder:k,handler:async e=>c({command:`snippets rules delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){r({command:`cf snippets rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/snippets/snippet_rules`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let n=await t(e),o=await i({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=o,!await u({force:!!e.force}))return;let s=await a(`Deleting`,async()=>n.send(O,{zone_id:o}));l(s,{successLabel:`Deleted`})})};var j={method:`GET`,path:e=>n`/zones/${e.zone_id}/snippets/snippet_rules`};function M(e){return e.usage(`$0 snippets rules list
13
+
14
+ Fetches all snippet rules belonging to the zone.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const N={command:`list`,describe:`List zone snippet rules`,builder:M,handler:async e=>c({command:`snippets rules list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf snippets rules list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/snippets/snippet_rules`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let n=await t(e),o=await i({zone:e.zone},n,{quiet:e.quiet});e.zoneId=o;let s=await a(`Loading`,async()=>n.send(j,{zone_id:o}));l(s,{successLabel:`Loaded`})})};var P={method:`PUT`,path:e=>n`/zones/${e.zone_id}/snippets/snippet_rules`,body:`json`};function F(e){return e.usage(`$0 snippets rules update
15
+
16
+ Updates all snippet rules belonging to the zone.`).option(`rules`,{type:`string`,description:`Lists snippet rules. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"expression": string, "snippet_name": string, "description"?: string, "enabled"?: boolean}]. ? marks optional keys.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Define a snippet rules object.`})}const I={command:`update`,describe:`Update zone snippet rules`,builder:F,handler:async e=>c({command:`snippets rules update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf snippets rules update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/snippets/snippet_rules`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({rules:d(e.rules,`rules`)}):f(e.body)});return}let n=e.body===void 0?void 0:f(e.body),o=await t(e),s=await i({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=s,e.body!==void 0){let e=n,t=await a(`Updating`,async()=>o.send(P,{body:e,zone_id:s}));l(t,{successLabel:`Updated`});return}if(e.rules===void 0)throw Error(`--rules is required (or pass --body with this field set).`);let c=p({rules:d(e.rules,`rules`)}),u=await a(`Updating`,async()=>o.send(P,{body:c,zone_id:s}));l(u,{successLabel:`Updated`})})},L={command:`rules`,describe:`Operations for rules`,builder:e=>e.command(A).command(N).command(I).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function R(e){return e.usage(`$0 snippets update <snippet-name>
17
+
18
+ Creates or updates 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(`body`,{type:`string`,description:`Define a snippet object.`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`}).option(`metadata`,{type:`string`,description:`Provide metadata about the snippet.`})}const z={command:`update <snippet-name>`,describe:`Update a zone snippet`,builder:R,handler:async n=>c({command:`snippets update`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){r({command:`cf snippets update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${n.zone??n.zoneId??`<zone>`}/snippets/${n[`snippet-name`]==null?`<snippet-name>`:encodeURIComponent(String(n[`snippet-name`]))}`,pathParams:{"zone-id":String(n.zone??n[`zone-id`]??``),"snippet-name":String(n[`snippet-name`]??``)},bodyKind:`multipart`,body:{body:n.body,file:n.file,metadata:n.metadata}});return}if(n.body===void 0&&n.file===void 0&&n.metadata===void 0)throw Error(`--body or --file is required for this command. Pass --body '<value>' or --file path/to/file.`);let o=await t(n);if(n.zoneId=await i({zone:n.zone},o,{quiet:n.quiet}),n.file!==void 0||n.body!==void 0||n.metadata!==void 0){let t=new FormData;if(n.file!==void 0){let e=h(n.file);t.append(`file`,new Blob([e]),n.file.split(/[\\/]/).filter(Boolean).pop())}else n.body!==void 0&&t.append(`file`,n.body);if(n.metadata!==void 0){let e=typeof n.metadata==`string`?m(n.metadata,`metadata`,`text`):n.metadata;t.append(`metadata`,typeof e==`string`?e:JSON.stringify(e))}let r=await a(`Updating`,async()=>e(o,`PUT`,`/zones/${n.zoneId}/snippets/${encodeURIComponent(String(n[`snippet-name`]))}`,{body:t}));l(r,{successLabel:`Updated`})}else if(n.body!==void 0){let t=m(n.body,`body`,`binary`),r=await a(`Updating`,async()=>e(o,`PUT`,`/zones/${n.zoneId}/snippets/${encodeURIComponent(String(n[`snippet-name`]))}`,{body:t,headers:{"Content-Type":`multipart/form-data`}}));l(r,{successLabel:`Updated`})}})},B={command:`snippets`,describe:`snippets`,builder:e=>e.command(x).command(w).command(D).command(z).command(v).command(L).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{B as default};
@@ -0,0 +1,5 @@
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-B4tFR6ua.mjs";import{t as a}from"./blocks-C3Im7AT0.mjs";import"./ui-dWsVmFCG.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-BV-jij5q.mjs";import"./log-Brx-wjJW.mjs";import{n as p,t as m}from"./discover-DGsMj9ZN.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=T()})),w=/* @__PURE__ */ t(((e,t)=>{let{MAX_LENGTH:n,MAX_SAFE_BUILD_LENGTH:r,WHITESPACE_CHARACTERS:i}=l(),a=/* @__PURE__ */ new Uint8Array(65536);for(let e of i)a[e.charCodeAt(0)]=1;let o=e=>e!==void 0&&a[e.charCodeAt(0)]===1,s=e=>e===`v`||e===`=`||o(e),c=e=>e!==void 0&&e>=`0`&&e<=`9`,u=e=>e!==void 0&&(e>=`a`&&e<=`z`||e>=`A`&&e<=`Z`),d=e=>c(e)||u(e)||e===`-`,f=e=>c(e)||e===`x`||e===`X`||e===`*`,p=(e,t,n,r)=>{if(!c(e[t]))return t;if(t>=r.start&&t<r.end)return Math.min(t+n,r.end);if(t>=r.previousStart&&t<r.previousEnd)return Math.min(t+n,r.previousEnd);let i=t+1;for(;c(e[i]);)i++;return r.previousStart=r.start,r.previousEnd=r.end,r.start=t,r.end=i,Math.min(t+n,i)},m=(e,t,r,i)=>!r&&e[t]===`0`?t+1:p(e,t,r?n:n+1,i),h=(e,t,i,a)=>{let o=p(e,t,n,a);if(u(e[o])||e[o]===`-`){let t=o+1,n=t+r;for(;t<n&&d(e[t]);)t++;return t}return m(e,t,i,a)},g=(e,t,n,r)=>{let i=e[t]===`-`;if(!n&&!i)return t;let a=t+ +!!i,o=h(e,a,n,r);if(o===a){if(!n||!i)return t;o=h(e,t,n,r)}for(;e[o]===`.`;){let t=h(e,o+1,n,r);if(t===o+1)break;o=t}return o},_=(e,t)=>{let n=t;for(;n-t<r&&d(e[n]);)n++;return n},v=(e,t)=>{if(e[t]!==`+`)return t;let n=_(e,t+1);if(n===t+1)return t;for(;e[n]===`.`;){let t=_(e,n+1);if(t===n+1)break;n=t}return n},y=(e,t,n)=>{let r=t;for(let i=0;i<3;i++){let a=m(e,r,!0,n);if(a===r)return t;if(r=a,i<2){if(e[r]!==`.`)return t;r++}}let i=g(e,r,!0,n);return v(e,i)},b=(e,t,n)=>c(e[t])?m(e,t,!1,n):f(e[t])?t+1:t,x=(e,t,n)=>{let r=b(e,t,n);for(let t=0;t<2;t++){if(e[r]!==`.`)return r;let t=b(e,r+1,n);if(t===r+1)return r;r=t}let i=g(e,r,!1,n);return v(e,i)},S=(e,t,n)=>{let r=y(e,t,n);return r===t?x(e,t,n):r},C=(e,t)=>{let n=t;return o(e[n])&&n++,(e[n]===`<`||e[n]===`>`)&&n++,e[n]===`=`&&n++,o(e[n])?n:-1};t.exports=e=>{let t=``,n=0,r=0,i={start:-1,end:-1,previousStart:-1,previousEnd:-1};for(;r<e.length;){let a=r;if(e[r]===`<`||e[r]===`>`)r++;else if(!s(e[r])&&!f(e[r])){r++;continue}for(;r<e.length&&s(e[r]);)r++;if(!f(e[r]))continue;let o=C(e,a);o!==-1&&(t+=e.slice(n,o),n=o+1),r=S(e,r,i)}return t+e.slice(n)}})),T=/* @__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=>!T(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&&E(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?m[_.HYPHENRANGELOOSE]:m[_.HYPHENRANGE];e=e.replace(o,z(this.options.includePrerelease)),c(`hyphen replace`,e),e=p(e),c(`comparator trim`,e),e=e.replace(m[_.TILDETRIM],v),c(`tilde trim`,e),e=e.replace(m[_.CARETTRIM],y),c(`caret trim`,e);let s=e.split(` `).map(e=>O(e,this.options)).join(` `).split(/\s+/).map(e=>R(e,this.options));i&&(s=s.filter(e=>(c(`loose invalid filter`,e,this.options),!!e.match(m[_.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(T(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=>D(e,n)&&t.set.some(t=>D(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(B(this.set[t],e,this.options))return!0;return!1}};let r=new(g()),i=s(),a=C(),c=d(),f=u(),p=w(),{safeRe:m,src:h,t:_,tildeTrimReplace:v,caretTrimReplace:y}=o(),{FLAG_INCLUDE_PRERELEASE:b,FLAG_LOOSE:x}=l(),S=new RegExp(h[_.BUILD],`g`),T=e=>e.value===`<0.0.0-0`,E=e=>e.value===``,D=(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},O=(e,t)=>(e=e.replace(m[_.BUILD],``),c(`comp`,e,t),e=N(e,t),c(`caret`,e),e=j(e,t),c(`tildes`,e),e=F(e,t),c(`xrange`,e),e=L(e,t),c(`stars`,e),e),k=e=>!e||e.toLowerCase()===`x`||e===`*`,A=(e,t,n)=>k(e)&&!k(t)||k(t)&&n&&!k(n),j=(e,t)=>e.trim().split(/\s+/).map(e=>M(e,t)).join(` `),M=(e,t)=>{let n=t.loose?m[_.TILDELOOSE]:m[_.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 k(n)?s=``:k(i)?s=`>=${n}.0.0${r} <${+n+1}.0.0-0`:k(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})},N=(e,t)=>e.trim().split(/\s+/).map(e=>P(e,t)).join(` `),P=(e,t)=>{c(`caret`,e,t);let n=t.loose?m[_.CARETLOOSE]:m[_.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 k(n)?s=``:k(i)?s=`>=${n}.0.0${r} <${+n+1}.0.0-0`:k(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})},F=(e,t)=>(c(`replaceXRanges`,e,t),e.split(/\s+/).map(e=>I(e,t)).join(` `)),I=(e,t)=>{e=e.trim();let n=t.loose?m[_.XRANGELOOSE]:m[_.XRANGE];return e.replace(n,(n,r,i,a,o,s)=>{if(c(`xRange`,e,n,r,i,a,o,s),A(i,a,o))return e;let l=k(i),u=l||k(a),d=u||k(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})},L=(e,t)=>(c(`replaceStars`,e,t),e.trim().replace(m[_.STAR],``)),R=(e,t)=>(c(`replaceGTE0`,e,t),e.trim().replace(m[t.includePrerelease?_.GTE0PRE:_.GTE0],``)),z=e=>(t,n,r,i,a,o,s,c,l,u,d,f)=>(n=k(r)?``:k(i)?`>=${r}.0.0${e?`-0`:``}`:k(a)?`>=${r}.${i}.0${e?`-0`:``}`:o?`>=${n}`:`>=${n}${e?`-0`:``}`,c=k(l)?``:k(u)?`<${+l+1}.0.0-0`:k(d)?`<${l}.${+u+1}.0-0`:f?`<=${l}.${u}.${d}-${f}`:e?`<${l}.${u}.${+d+1}-0`:`<=${c}`,`${n} ${c}`.trim()),B=(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}})),E=/* @__PURE__ */ e((/* @__PURE__ */ t(((e,t)=>{let n=T();t.exports=(e,t,r)=>{try{t=new n(t,r)}catch{return!1}return t.test(e)}})))(),1);function D(e){let t=m(e);if(t.length===0)throw j(e),new r(1);if(t.length>1)throw M(t),new r(1);let[n]=t;if(!n)throw new r(1);if(!n.binary)throw N(n),new r(1);if(n.impl.versionConstraint!==void 0&&!O(n.installedVersion,n.impl.versionConstraint.range))throw k(n),new r(1);return n}function O(e,t){return e!==void 0&&(0,E.default)(e,t,{includePrerelease:!0})}function k(e){P(`${e.impl.pkg}@${e.installedVersion??`unknown`} is installed, but it is not compatible with cf's local runtime.`,A(e),e.impl)}function A(e){return`cf requires ${e.impl.versionConstraint?.display??`a compatible version`} for cf dev, cf build, cf deploy, and cf previews deploy.`}function j(e){console.error(a(`No Cloudflare dev server is installed in ${e}.`,`Checked package.json, pyproject.toml and Cargo.toml.`)),console.error(`
3
+ Install one of these:`);for(let e of p)console.error(`\n${n.bold(e.pkg)} ${n.muted(e.description)}`),F(e)}function M(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
+ `)))}function N(e){e.installed&&e.impl.versionConstraint?P(`${e.impl.pkg} is declared in ${e.manifestPath}, but this installation does not include the cf delegate.`,A(e),e.impl):P(`${e.impl.pkg} is declared in ${e.manifestPath} but is not installed.`,void 0,e.impl)}function P(e,t,n){console.error(a(e,t)),console.error(`
5
+ Try:`),F(n)}function F(e){for(let t of e.installCommands)console.error(`${` `.repeat(3)}${n.code(t)}`)}function I(e,t=process.platform){return t!==`win32`||e!==`SIGINT`}function L(e,t,n){let r=t??n??void 0;return{exitCode:e??(r?128+(h.signals[r]??1):1),...r?{signal:r}:{}}}async function R(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}=B(o),l=i(s,[...c,t,...n],{nodePath:!1,nodeOptions:{stdio:[`inherit`,a===`inherit`?`inherit`:a===`silent`?`ignore`:process.stderr,`inherit`],env:z(r.env)}}),u,d=e=>{u??=e,I(e)&&l.kill(e)},f=()=>d(`SIGINT`),p=()=>d(`SIGTERM`);process.on(`SIGINT`,f),process.on(`SIGTERM`,p);try{return L((await l).exitCode??null,l.process?.signalCode??null,u)}finally{process.off(`SIGINT`,f),process.off(`SIGTERM`,p)}}function z(e={}){return{...V(process.env,`--no-deprecation`),...e,CLOUDFLARE_CF_AUTH:`true`}}function B(e){return e.startsWith(`uv:`)?{command:`uv`,prefixArgs:[`run`,`--no-sync`,e.slice(3)]}:{command:e,prefixArgs:[]}}function V(e,t){let n=e.NODE_OPTIONS??``;return n.split(/\s+/).includes(t)?e:{...e,NODE_OPTIONS:n?`${n} ${t}`:t}}export{D as n,R as t};
@@ -1,7 +1,7 @@
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-FK2eLQ02.mjs";import{i as n}from"./context-Dp4CXG22.mjs";import{t as r}from"./output-BJEgbI0G.mjs";import{t as i}from"./dry-run-gy0Hl9xo.mjs";import{t as a}from"./progress-DLri-rA7.mjs";import{t as o}from"./run-Ciw_GIrC.mjs";import"./telemetry-Pt5GpCKD.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-D0dXwuME.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-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-DA1PHaHi.mjs";import{i as n}from"./context-BGm5_wTT.mjs";import{t as r}from"./dry-run-qsnRlRk6.mjs";import{t as i}from"./output-hFMAotFl.mjs";import{t as a}from"./progress-DE_G09u2.mjs";import{t as o}from"./run-CXWkMU3x.mjs";import"./telemetry-COlodX5Z.mjs";import{r as s,s as c,t as l}from"./body-parser-HN91kAf0.mjs";import{n as u}from"./input-validation-D7z60HJH.mjs";import{a as d,n as f}from"./prompt-D274Im1O.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
- 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
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){r({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}));i(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
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
 
@@ -31,7 +31,7 @@ Operator | Name | URL Encoded
31
31
  \\>= | Greater than or equal to | %3E%3D
32
32
  \\<= | Less than or equal to | %3C%3D
33
33
 
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
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){r({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}));i(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
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
 
@@ -61,22 +61,22 @@ Operator | Name | URL Encoded
61
61
  \\>= | Greater than or equal to | %3E%3D
62
62
  \\<= | Less than or equal to | %3C%3D
63
63
 
64
- Use the above to construct filters.`}).option(`since`,{type:`string`,description:`Since`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const w={command:`get`,describe:`Get analytics summary`,builder:C,handler:async e=>o({command:`spectrum analytics events summaries get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let o={dimensions:e.dimensions,sort:e.sort,until:e.until,metrics:e.metrics,filters:e.filters,since:e.since};if(e.dryRun){i({command:`cf spectrum analytics events summaries get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/spectrum/analytics/events/summary`,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(S,{zone_id:c,...o}));r(l,{successLabel:`Loaded`})})},T={command:`summaries`,describe:`Operations for analytics.events.summaries`,builder:e=>e.command(w).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},E={command:`events`,describe:`Operations for analytics.events`,builder:e=>e.command(x).command(T).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var D={method:`GET`,path:()=>`/user/spectrum_analytics/zones/report`,query:[`since`,`until`,`cdn_traffic`]};function O(e){return e.usage(`$0 spectrum analytics zones report get
64
+ Use the above to construct filters.`}).option(`since`,{type:`string`,description:`Since`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const w={command:`get`,describe:`Get analytics summary`,builder:C,handler:async e=>o({command:`spectrum analytics events summaries get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let o={dimensions:e.dimensions,sort:e.sort,until:e.until,metrics:e.metrics,filters:e.filters,since:e.since};if(e.dryRun){r({command:`cf spectrum analytics events summaries get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/spectrum/analytics/events/summary`,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(S,{zone_id:c,...o}));i(l,{successLabel:`Loaded`})})},T={command:`summaries`,describe:`Operations for analytics.events.summaries`,builder:e=>e.command(w).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},E={command:`events`,describe:`Operations for analytics.events`,builder:e=>e.command(x).command(T).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var D={method:`GET`,path:()=>`/user/spectrum_analytics/zones/report`,query:[`since`,`until`,`cdn_traffic`]};function O(e){return e.usage(`$0 spectrum analytics zones report get
65
65
 
66
- Retrieves a list of total bandwidth by zone over a given time period.`).option(`since`,{type:`string`,description:`Since`}).option(`until`,{type:`string`,description:`Until`}).option(`cdn-traffic`,{type:`boolean`,description:`Include CDN traffic in the bandwidth aggregation.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`get`,describe:`Get zones bandwidth report`,builder:O,handler:async e=>o({command:`spectrum analytics zones report get`,classification:{safeFlags:[`cdn-traffic`,`dry-run`]}},e,async()=>{let n={since:e.since,until:e.until,cdn_traffic:e[`cdn-traffic`]};if(e.dryRun){i({command:`cf spectrum analytics zones report get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/user/spectrum_analytics/zones/report`,pathParams:{},query:n,bodyKind:`none`});return}let o=await t(e),s=await a(`Loading`,async()=>o.send(D,n));r(s,{successLabel:`Loaded`})})},A={command:`report`,describe:`Operations for analytics.zones.report`,builder:e=>e.command(k).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},j={command:`zones`,describe:`Operations for analytics.zones`,builder:e=>e.command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},M={command:`analytics`,describe:`Real-time and historical connection analytics for Spectrum applications`,builder:e=>e.command(_).command(E).command(j).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var N={method:`POST`,path:t=>e`/zones/${t.zone_id}/spectrum/apps`,body:`json`};function P(e){return e.usage(`$0 spectrum apps create
66
+ Retrieves a list of total bandwidth by zone over a given time period.`).option(`since`,{type:`string`,description:`Since`}).option(`until`,{type:`string`,description:`Until`}).option(`cdn-traffic`,{type:`boolean`,description:`Include CDN traffic in the bandwidth aggregation.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`get`,describe:`Get zones bandwidth report`,builder:O,handler:async e=>o({command:`spectrum analytics zones report get`,classification:{safeFlags:[`cdn-traffic`,`dry-run`]}},e,async()=>{let n={since:e.since,until:e.until,cdn_traffic:e[`cdn-traffic`]};if(e.dryRun){r({command:`cf spectrum analytics zones report get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/user/spectrum_analytics/zones/report`,pathParams:{},query:n,bodyKind:`none`});return}let o=await t(e),s=await a(`Loading`,async()=>o.send(D,n));i(s,{successLabel:`Loaded`})})},A={command:`report`,describe:`Operations for analytics.zones.report`,builder:e=>e.command(k).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},j={command:`zones`,describe:`Operations for analytics.zones`,builder:e=>e.command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},M={command:`analytics`,describe:`Real-time and historical connection analytics for Spectrum applications`,builder:e=>e.command(_).command(E).command(j).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var N={method:`POST`,path:t=>e`/zones/${t.zone_id}/spectrum/apps`,body:`json`};function P(e){return e.usage(`$0 spectrum apps create
67
67
 
68
68
  Creates a new Spectrum application from a configuration using a name for the origin.`).option(`argo-smart-routing`,{type:`boolean`,description:`Enables Argo Smart Routing for this application.
69
69
  Notes: Only available for TCP or UDP applications with traffic_type set to "direct".`,default:!1}).option(`dns-name`,{type:`string`,description:`The name of the DNS record associated with the application.`}).option(`dns-type`,{type:`string`,description:`The type of DNS record associated with the application.`,choices:[`CNAME`,`ADDRESS`]}).coerce(`dns-type`,e=>u(e,`dns-type`,`text`)).option(`edge-ips-connectivity`,{type:`string`,description:`The IP versions supported for inbound connections on Spectrum anycast IPs.`,choices:[`all`,`ipv4`,`ipv6`]}).coerce(`edge-ips-connectivity`,e=>u(e,`edge-ips-connectivity`,`text`)).option(`edge-ips-type`,{type:`string`,description:`The type of edge IP configuration specified. Dynamically allocated edge IPs use Spectrum anycast IPs in accordance with the connectivity you specify. Only valid with CNAME DNS names.`,choices:[`dynamic`,`static`]}).coerce(`edge-ips-type`,e=>u(e,`edge-ips-type`,`text`)).option(`edge-ips-ips`,{type:`string`,array:!0,description:`The array of customer owned IPs we broadcast via anycast for this hostname and application.`}).option(`ip-firewall`,{type:`boolean`,description:`Enables IP Access Rules for this application.
70
- Notes: Only available for TCP applications.`,default:!1}).option(`origin-direct`,{type:`string`,array:!0,description:`List of origin IP addresses. Array may contain multiple IP addresses for load balancing.`}).option(`origin-dns-name`,{type:`string`,description:`The name of the DNS record associated with the origin.`}).option(`origin-dns-ttl`,{type:`number`,description:`The TTL of our resolution of your DNS record in seconds.`}).option(`origin-dns-type`,{type:`string`,description:`The type of DNS record associated with the origin. "" is used to specify a combination of A/AAAA records.`,choices:[`A`,`AAAA`,`SRV`]}).coerce(`origin-dns-type`,e=>u(e,`origin-dns-type`,`text`)).option(`origin-port`,{type:`string`,description:'The destination port at the origin. Only specified in conjunction with origin_dns. May use an integer to specify a single origin port, for example `1000`, or a string to specify a range of origin ports, for example `"1000-2000"`.\nNotes: If specifying a port range, the number of ports in the range must match the number of ports specified in the "protocol" field. Accepts a JSON scalar or plain string, or @path/to/file.'}).option(`origin-worker-id`,{type:`string`,description:`Optional Worker script tag (worker ID) to use as the application's origin. Only supported for TCP applications with traffic_type "worker"; mutually exclusive with origin_direct, origin_dns, origin_port, proxy_protocol, and argo_smart_routing. tls may only be "off" or "flexible".`}).option(`protocol`,{type:`string`,description:'The port configuration at Cloudflare\'s edge. May specify a single port, for example `"tcp/1000"`, or a range of ports, for example `"tcp/1000-2000"`.'}).option(`proxy-protocol`,{type:`string`,description:`Enables Proxy Protocol to the origin. Refer to [Enable Proxy protocol](https://developers.cloudflare.com/spectrum/getting-started/proxy-protocol/) for implementation details on PROXY Protocol V1, PROXY Protocol V2, and Simple Proxy Protocol.`,choices:[`off`,`v1`,`v2`,`simple`],default:`off`}).coerce(`proxy-protocol`,e=>u(e,`proxy-protocol`,`text`)).option(`tls`,{type:`string`,description:`The type of TLS termination associated with the application.`,choices:[`off`,`flexible`,`full`,`strict`],default:`off`}).coerce(`tls`,e=>u(e,`tls`,`text`)).option(`traffic-type`,{type:`string`,description:'Determines how data travels from the edge to your origin. When set to "direct", Spectrum will send traffic directly to your origin, and the application\'s type is derived from the `protocol`. When set to "http" or "https", Spectrum will apply Cloudflare\'s HTTP/HTTPS features as it sends traffic to your origin, and the application type matches this property exactly. When set to "worker", traffic is sent to the Worker specified by `origin_worker_id`.',choices:[`direct`,`http`,`https`,`worker`],default:`direct`}).coerce(`traffic-type`,e=>u(e,`traffic-type`,`text`)).option(`virtual-network-id`,{type:`string`,description:`Optional UUID of a virtual network for routing origin traffic through tunnel virtual networks.`}).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)`}).implies(`argo-smart-routing`,[`traffic-type`]).implies(`edge-ips-connectivity`,[`traffic-type`]).implies(`edge-ips-type`,[`traffic-type`]).implies(`edge-ips-ips`,[`traffic-type`]).implies(`ip-firewall`,[`traffic-type`]).implies(`origin-dns-name`,[`traffic-type`]).implies(`origin-dns-ttl`,[`traffic-type`]).implies(`origin-dns-type`,[`traffic-type`]).implies(`origin-port`,[`traffic-type`]).implies(`origin-worker-id`,[`traffic-type`]).implies(`proxy-protocol`,[`traffic-type`]).implies(`tls`,[`traffic-type`]).implies(`virtual-network-id`,[`traffic-type`])}const F={command:`create`,describe:`Create Spectrum application using a name for the origin`,builder:P,handler:async e=>o({command:`spectrum apps create`,classification:{safeFlags:[`argo-smart-routing`,`dns-type`,`edge-ips-connectivity`,`edge-ips-type`,`ip-firewall`,`origin-dns-type`,`proxy-protocol`,`tls`,`traffic-type`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf spectrum apps create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/spectrum/apps`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({argo_smart_routing:e[`argo-smart-routing`],dns:{name:u(e[`dns-name`],`dns-name`,`text`),type:e[`dns-type`]},edge_ips:{connectivity:e[`edge-ips-connectivity`],type:e[`edge-ips-type`],ips:e[`edge-ips-ips`]},ip_firewall:e[`ip-firewall`],origin_direct:e[`origin-direct`],origin_dns:{name:u(e[`origin-dns-name`],`origin-dns-name`,`text`),ttl:e[`origin-dns-ttl`],type:e[`origin-dns-type`]},origin_port:c(e[`origin-port`],`origin-port`),origin_worker_id:u(e[`origin-worker-id`],`origin-worker-id`,`text`),protocol:u(e.protocol,`protocol`,`text`),proxy_protocol:e[`proxy-protocol`],tls:e.tls,traffic_type:e[`traffic-type`],virtual_network_id:u(e[`virtual-network-id`],`virtual-network-id`,`text`)}):s(e.body)});return}let o=await t(e),f=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=f,e.body){let t=s(e.body),n=await a(`Creating`,async()=>o.send(N,{body:t,zone_id:f}));r(n,{successLabel:`Created`});return}e.protocol===void 0&&(e.protocol=await d(`protocol`,'The port configuration at Cloudflare\'s edge. May specify a single port, for example `"tcp/1000"`, or a range of ports, for example `"tcp/1000-2000"`.'));let p=l({argo_smart_routing:e[`argo-smart-routing`],dns:{name:u(e[`dns-name`],`dns-name`,`text`),type:e[`dns-type`]},edge_ips:{connectivity:e[`edge-ips-connectivity`],type:e[`edge-ips-type`],ips:e[`edge-ips-ips`]},ip_firewall:e[`ip-firewall`],origin_direct:e[`origin-direct`],origin_dns:{name:u(e[`origin-dns-name`],`origin-dns-name`,`text`),ttl:e[`origin-dns-ttl`],type:e[`origin-dns-type`]},origin_port:c(e[`origin-port`],`origin-port`),origin_worker_id:u(e[`origin-worker-id`],`origin-worker-id`,`text`),protocol:u(e.protocol,`protocol`,`text`),proxy_protocol:e[`proxy-protocol`],tls:e.tls,traffic_type:e[`traffic-type`],virtual_network_id:u(e[`virtual-network-id`],`virtual-network-id`,`text`)}),m=await a(`Creating`,async()=>o.send(N,{body:p,zone_id:f}));r(m,{successLabel:`Created`})})};var I={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/spectrum/apps/${t.app_id}`};function L(e){return e.usage(`$0 spectrum apps delete <app-id>
70
+ Notes: Only available for TCP applications.`,default:!1}).option(`origin-direct`,{type:`string`,array:!0,description:`List of origin IP addresses. Array may contain multiple IP addresses for load balancing.`}).option(`origin-dns-name`,{type:`string`,description:`The name of the DNS record associated with the origin.`}).option(`origin-dns-ttl`,{type:`number`,description:`The TTL of our resolution of your DNS record in seconds.`}).option(`origin-dns-type`,{type:`string`,description:`The type of DNS record associated with the origin. "" is used to specify a combination of A/AAAA records.`,choices:[`A`,`AAAA`,`SRV`]}).coerce(`origin-dns-type`,e=>u(e,`origin-dns-type`,`text`)).option(`origin-port`,{type:`string`,description:'The destination port at the origin. Only specified in conjunction with origin_dns. May use an integer to specify a single origin port, for example `1000`, or a string to specify a range of origin ports, for example `"1000-2000"`.\nNotes: If specifying a port range, the number of ports in the range must match the number of ports specified in the "protocol" field. Accepts a JSON scalar or plain string, or @path/to/file.'}).option(`origin-worker-id`,{type:`string`,description:`Optional Worker script tag (worker ID) to use as the application's origin. Only supported for TCP applications with traffic_type "worker"; mutually exclusive with origin_direct, origin_dns, origin_port, proxy_protocol, and argo_smart_routing. tls may only be "off" or "flexible".`}).option(`protocol`,{type:`string`,description:'The port configuration at Cloudflare\'s edge. May specify a single port, for example `"tcp/1000"`, or a range of ports, for example `"tcp/1000-2000"`.'}).option(`proxy-protocol`,{type:`string`,description:`Enables Proxy Protocol to the origin. Refer to [Enable Proxy protocol](https://developers.cloudflare.com/spectrum/getting-started/proxy-protocol/) for implementation details on PROXY Protocol V1, PROXY Protocol V2, and Simple Proxy Protocol.`,choices:[`off`,`v1`,`v2`,`simple`],default:`off`}).coerce(`proxy-protocol`,e=>u(e,`proxy-protocol`,`text`)).option(`tls`,{type:`string`,description:`The type of TLS termination associated with the application.`,choices:[`off`,`flexible`,`full`,`strict`],default:`off`}).coerce(`tls`,e=>u(e,`tls`,`text`)).option(`traffic-type`,{type:`string`,description:'Determines how data travels from the edge to your origin. When set to "direct", Spectrum will send traffic directly to your origin, and the application\'s type is derived from the `protocol`. When set to "http" or "https", Spectrum will apply Cloudflare\'s HTTP/HTTPS features as it sends traffic to your origin, and the application type matches this property exactly. When set to "worker", traffic is sent to the Worker specified by `origin_worker_id`.',choices:[`direct`,`http`,`https`,`worker`],default:`direct`}).coerce(`traffic-type`,e=>u(e,`traffic-type`,`text`)).option(`virtual-network-id`,{type:`string`,description:`Optional UUID of a virtual network for routing origin traffic through tunnel virtual networks.`}).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)`}).implies(`argo-smart-routing`,[`traffic-type`]).implies(`edge-ips-connectivity`,[`traffic-type`]).implies(`edge-ips-type`,[`traffic-type`]).implies(`edge-ips-ips`,[`traffic-type`]).implies(`ip-firewall`,[`traffic-type`]).implies(`origin-dns-name`,[`traffic-type`]).implies(`origin-dns-ttl`,[`traffic-type`]).implies(`origin-dns-type`,[`traffic-type`]).implies(`origin-port`,[`traffic-type`]).implies(`origin-worker-id`,[`traffic-type`]).implies(`proxy-protocol`,[`traffic-type`]).implies(`tls`,[`traffic-type`]).implies(`virtual-network-id`,[`traffic-type`])}const F={command:`create`,describe:`Create Spectrum application using a name for the origin`,builder:P,handler:async e=>o({command:`spectrum apps create`,classification:{safeFlags:[`argo-smart-routing`,`dns-type`,`edge-ips-connectivity`,`edge-ips-type`,`ip-firewall`,`origin-dns-type`,`proxy-protocol`,`tls`,`traffic-type`,`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf spectrum apps create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/spectrum/apps`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({argo_smart_routing:e[`argo-smart-routing`],dns:{name:u(e[`dns-name`],`dns-name`,`text`),type:e[`dns-type`]},edge_ips:{connectivity:e[`edge-ips-connectivity`],type:e[`edge-ips-type`],ips:e[`edge-ips-ips`]},ip_firewall:e[`ip-firewall`],origin_direct:e[`origin-direct`],origin_dns:{name:u(e[`origin-dns-name`],`origin-dns-name`,`text`),ttl:e[`origin-dns-ttl`],type:e[`origin-dns-type`]},origin_port:c(e[`origin-port`],`origin-port`),origin_worker_id:u(e[`origin-worker-id`],`origin-worker-id`,`text`),protocol:u(e.protocol,`protocol`,`text`),proxy_protocol:e[`proxy-protocol`],tls:e.tls,traffic_type:e[`traffic-type`],virtual_network_id:u(e[`virtual-network-id`],`virtual-network-id`,`text`)}):s(e.body)});return}let o=e.body===void 0?void 0:s(e.body),f=await t(e),p=await n({zone:e.zone},f,{quiet:e.quiet});if(e.zoneId=p,e.body!==void 0){let e=o,t=await a(`Creating`,async()=>f.send(N,{body:e,zone_id:p}));i(t,{successLabel:`Created`});return}e.protocol===void 0&&(e.protocol=await d(`protocol`,'The port configuration at Cloudflare\'s edge. May specify a single port, for example `"tcp/1000"`, or a range of ports, for example `"tcp/1000-2000"`.'));let m=l({argo_smart_routing:e[`argo-smart-routing`],dns:{name:u(e[`dns-name`],`dns-name`,`text`),type:e[`dns-type`]},edge_ips:{connectivity:e[`edge-ips-connectivity`],type:e[`edge-ips-type`],ips:e[`edge-ips-ips`]},ip_firewall:e[`ip-firewall`],origin_direct:e[`origin-direct`],origin_dns:{name:u(e[`origin-dns-name`],`origin-dns-name`,`text`),ttl:e[`origin-dns-ttl`],type:e[`origin-dns-type`]},origin_port:c(e[`origin-port`],`origin-port`),origin_worker_id:u(e[`origin-worker-id`],`origin-worker-id`,`text`),protocol:u(e.protocol,`protocol`,`text`),proxy_protocol:e[`proxy-protocol`],tls:e.tls,traffic_type:e[`traffic-type`],virtual_network_id:u(e[`virtual-network-id`],`virtual-network-id`,`text`)}),h=await a(`Creating`,async()=>f.send(N,{body:m,zone_id:p}));i(h,{successLabel:`Created`})})};var I={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/spectrum/apps/${t.app_id}`};function L(e){return e.usage(`$0 spectrum apps delete <app-id>
71
71
 
72
- Deletes a previously existing application.`).positional(`app-id`,{type:`string`,description:`App identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const R={command:`delete <app-id>`,describe:`Delete Spectrum application`,builder:L,handler:async e=>o({command:`spectrum apps delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf spectrum apps delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/spectrum/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"app-id":String(e[`app-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=s,!await f({force:!!e.force}))return;let c=await a(`Deleting`,async()=>o.send(I,{zone_id:s,app_id:e[`app-id`]}));r(c,{successLabel:`Deleted`})})};var z={method:`GET`,path:t=>e`/zones/${t.zone_id}/spectrum/apps/${t.app_id}`};function B(e){return e.usage(`$0 spectrum apps get <app-id>
72
+ Deletes a previously existing application.`).positional(`app-id`,{type:`string`,description:`App identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const R={command:`delete <app-id>`,describe:`Delete Spectrum application`,builder:L,handler:async e=>o({command:`spectrum apps delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){r({command:`cf spectrum apps delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/spectrum/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"app-id":String(e[`app-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=s,!await f({force:!!e.force}))return;let c=await a(`Deleting`,async()=>o.send(I,{zone_id:s,app_id:e[`app-id`]}));i(c,{successLabel:`Deleted`})})};var z={method:`GET`,path:t=>e`/zones/${t.zone_id}/spectrum/apps/${t.app_id}`};function B(e){return e.usage(`$0 spectrum apps get <app-id>
73
73
 
74
- Gets the application configuration of a specific application inside a zone.`).positional(`app-id`,{type:`string`,description:`App identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const V={command:`get <app-id>`,describe:`Get Spectrum application configuration`,builder:B,handler:async e=>o({command:`spectrum apps get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf spectrum apps get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/spectrum/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"app-id":String(e[`app-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(z,{zone_id:s,app_id:e[`app-id`]}));r(c,{successLabel:`Loaded`})})};var H={method:`GET`,path:t=>e`/zones/${t.zone_id}/spectrum/apps`,query:[`page`,`per_page`,`direction`,`order`]};function U(e){return e.usage(`$0 spectrum apps list
74
+ Gets the application configuration of a specific application inside a zone.`).positional(`app-id`,{type:`string`,description:`App identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const V={command:`get <app-id>`,describe:`Get Spectrum application configuration`,builder:B,handler:async e=>o({command:`spectrum apps get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf spectrum apps get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/spectrum/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"app-id":String(e[`app-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(z,{zone_id:s,app_id:e[`app-id`]}));i(c,{successLabel:`Loaded`})})};var H={method:`GET`,path:t=>e`/zones/${t.zone_id}/spectrum/apps`,query:[`page`,`per_page`,`direction`,`order`]};function U(e){return e.usage(`$0 spectrum apps list
75
75
 
76
- Retrieves a list of currently existing Spectrum applications inside a zone.`).option(`page`,{type:`number`,description:"Page number of paginated results. This parameter is required in order to use other pagination parameters. If included in the query, `result_info` will be present in the response."}).option(`per-page`,{type:`number`,description:`Sets the maximum number of results per page.`}).option(`direction`,{type:`string`,description:`Sets the direction by which results are ordered.`,choices:[`asc`,`desc`]}).option(`order`,{type:`string`,description:`Application field by which results are ordered.`,choices:[`protocol`,`app_id`,`created_on`,`modified_on`,`dns`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const W={command:`list`,describe:`List Spectrum applications`,builder:U,handler:async e=>o({command:`spectrum apps list`,classification:{safeFlags:[`direction`,`order`,`dry-run`]}},e,async()=>{let o={page:e.page,per_page:e[`per-page`],direction:e.direction,order:e.order};if(e.dryRun){i({command:`cf spectrum apps list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/spectrum/apps`,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(H,{zone_id:c,...o}));r(l,{successLabel:`Loaded`})})};var G={method:`PUT`,path:t=>e`/zones/${t.zone_id}/spectrum/apps/${t.app_id}`,body:`json`};function K(e){return e.usage(`$0 spectrum apps update <app-id>
76
+ Retrieves a list of currently existing Spectrum applications inside a zone.`).option(`page`,{type:`number`,description:"Page number of paginated results. This parameter is required in order to use other pagination parameters. If included in the query, `result_info` will be present in the response."}).option(`per-page`,{type:`number`,description:`Sets the maximum number of results per page.`}).option(`direction`,{type:`string`,description:`Sets the direction by which results are ordered.`,choices:[`asc`,`desc`]}).option(`order`,{type:`string`,description:`Application field by which results are ordered.`,choices:[`protocol`,`app_id`,`created_on`,`modified_on`,`dns`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const W={command:`list`,describe:`List Spectrum applications`,builder:U,handler:async e=>o({command:`spectrum apps list`,classification:{safeFlags:[`direction`,`order`,`dry-run`]}},e,async()=>{let o={page:e.page,per_page:e[`per-page`],direction:e.direction,order:e.order};if(e.dryRun){r({command:`cf spectrum apps list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/spectrum/apps`,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(H,{zone_id:c,...o}));i(l,{successLabel:`Loaded`})})};var G={method:`PUT`,path:t=>e`/zones/${t.zone_id}/spectrum/apps/${t.app_id}`,body:`json`};function K(e){return e.usage(`$0 spectrum apps update <app-id>
77
77
 
78
78
  Updates a previously existing application's configuration that uses a name for the origin.`).positional(`app-id`,{type:`string`,description:`App identifier.`,demandOption:!0}).option(`argo-smart-routing`,{type:`boolean`,description:`Enables Argo Smart Routing for this application.
79
79
  Notes: Only available for TCP or UDP applications with traffic_type set to "direct".`}).option(`dns-name`,{type:`string`,description:`The name of the DNS record associated with the application.`}).option(`dns-type`,{type:`string`,description:`The type of DNS record associated with the application.`,choices:[`CNAME`,`ADDRESS`]}).coerce(`dns-type`,e=>u(e,`dns-type`,`text`)).option(`edge-ips-connectivity`,{type:`string`,description:`The IP versions supported for inbound connections on Spectrum anycast IPs.`,choices:[`all`,`ipv4`,`ipv6`]}).coerce(`edge-ips-connectivity`,e=>u(e,`edge-ips-connectivity`,`text`)).option(`edge-ips-type`,{type:`string`,description:`The type of edge IP configuration specified. Dynamically allocated edge IPs use Spectrum anycast IPs in accordance with the connectivity you specify. Only valid with CNAME DNS names.`,choices:[`dynamic`,`static`]}).coerce(`edge-ips-type`,e=>u(e,`edge-ips-type`,`text`)).option(`edge-ips-ips`,{type:`string`,array:!0,description:`The array of customer owned IPs we broadcast via anycast for this hostname and application.`}).option(`ip-firewall`,{type:`boolean`,description:`Enables IP Access Rules for this application.
80
- Notes: Only available for TCP applications.`}).option(`origin-direct`,{type:`string`,array:!0,description:`List of origin IP addresses. Array may contain multiple IP addresses for load balancing.`}).option(`origin-dns-name`,{type:`string`,description:`The name of the DNS record associated with the origin.`}).option(`origin-dns-ttl`,{type:`number`,description:`The TTL of our resolution of your DNS record in seconds.`}).option(`origin-dns-type`,{type:`string`,description:`The type of DNS record associated with the origin. "" is used to specify a combination of A/AAAA records.`,choices:[`A`,`AAAA`,`SRV`]}).coerce(`origin-dns-type`,e=>u(e,`origin-dns-type`,`text`)).option(`origin-port`,{type:`string`,description:'The destination port at the origin. Only specified in conjunction with origin_dns. May use an integer to specify a single origin port, for example `1000`, or a string to specify a range of origin ports, for example `"1000-2000"`.\nNotes: If specifying a port range, the number of ports in the range must match the number of ports specified in the "protocol" field. Accepts a JSON scalar or plain string, or @path/to/file.'}).option(`origin-worker-id`,{type:`string`,description:`Optional Worker script tag (worker ID) to use as the application's origin. Only supported for TCP applications with traffic_type "worker"; mutually exclusive with origin_direct, origin_dns, origin_port, proxy_protocol, and argo_smart_routing. tls may only be "off" or "flexible".`}).option(`protocol`,{type:`string`,description:'The port configuration at Cloudflare\'s edge. May specify a single port, for example `"tcp/1000"`, or a range of ports, for example `"tcp/1000-2000"`.'}).option(`proxy-protocol`,{type:`string`,description:`Enables Proxy Protocol to the origin. Refer to [Enable Proxy protocol](https://developers.cloudflare.com/spectrum/getting-started/proxy-protocol/) for implementation details on PROXY Protocol V1, PROXY Protocol V2, and Simple Proxy Protocol.`,choices:[`off`,`v1`,`v2`,`simple`]}).coerce(`proxy-protocol`,e=>u(e,`proxy-protocol`,`text`)).option(`tls`,{type:`string`,description:`The type of TLS termination associated with the application.`,choices:[`off`,`flexible`,`full`,`strict`]}).coerce(`tls`,e=>u(e,`tls`,`text`)).option(`traffic-type`,{type:`string`,description:'Determines how data travels from the edge to your origin. When set to "direct", Spectrum will send traffic directly to your origin, and the application\'s type is derived from the `protocol`. When set to "http" or "https", Spectrum will apply Cloudflare\'s HTTP/HTTPS features as it sends traffic to your origin, and the application type matches this property exactly. When set to "worker", traffic is sent to the Worker specified by `origin_worker_id`.',choices:[`direct`,`http`,`https`,`worker`]}).coerce(`traffic-type`,e=>u(e,`traffic-type`,`text`)).option(`virtual-network-id`,{type:`string`,description:`Optional UUID of a virtual network for routing origin traffic through tunnel virtual networks.`}).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)`}).implies(`argo-smart-routing`,[`traffic-type`]).implies(`edge-ips-connectivity`,[`traffic-type`]).implies(`edge-ips-type`,[`traffic-type`]).implies(`edge-ips-ips`,[`traffic-type`]).implies(`ip-firewall`,[`traffic-type`]).implies(`origin-dns-name`,[`traffic-type`]).implies(`origin-dns-ttl`,[`traffic-type`]).implies(`origin-dns-type`,[`traffic-type`]).implies(`origin-port`,[`traffic-type`]).implies(`origin-worker-id`,[`traffic-type`]).implies(`proxy-protocol`,[`traffic-type`]).implies(`tls`,[`traffic-type`]).implies(`virtual-network-id`,[`traffic-type`])}const q={command:`update <app-id>`,describe:`Update Spectrum application configuration using a name for the origin`,builder:K,handler:async e=>o({command:`spectrum apps update`,classification:{safeFlags:[`argo-smart-routing`,`dns-type`,`edge-ips-connectivity`,`edge-ips-type`,`ip-firewall`,`origin-dns-type`,`proxy-protocol`,`tls`,`traffic-type`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf spectrum apps update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/spectrum/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"app-id":String(e[`app-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({argo_smart_routing:e[`argo-smart-routing`],dns:{name:u(e[`dns-name`],`dns-name`,`text`),type:e[`dns-type`]},edge_ips:{connectivity:e[`edge-ips-connectivity`],type:e[`edge-ips-type`],ips:e[`edge-ips-ips`]},ip_firewall:e[`ip-firewall`],origin_direct:e[`origin-direct`],origin_dns:{name:u(e[`origin-dns-name`],`origin-dns-name`,`text`),ttl:e[`origin-dns-ttl`],type:e[`origin-dns-type`]},origin_port:c(e[`origin-port`],`origin-port`),origin_worker_id:u(e[`origin-worker-id`],`origin-worker-id`,`text`),protocol:u(e.protocol,`protocol`,`text`),proxy_protocol:e[`proxy-protocol`],tls:e.tls,traffic_type:e[`traffic-type`],virtual_network_id:u(e[`virtual-network-id`],`virtual-network-id`,`text`)}):s(e.body)});return}let o=await t(e),f=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=f,e.body){let t=s(e.body),n=await a(`Updating`,async()=>o.send(G,{body:t,zone_id:f,app_id:e[`app-id`]}));r(n,{successLabel:`Updated`});return}e.protocol===void 0&&(e.protocol=await d(`protocol`,'The port configuration at Cloudflare\'s edge. May specify a single port, for example `"tcp/1000"`, or a range of ports, for example `"tcp/1000-2000"`.'));let p=l({argo_smart_routing:e[`argo-smart-routing`],dns:{name:u(e[`dns-name`],`dns-name`,`text`),type:e[`dns-type`]},edge_ips:{connectivity:e[`edge-ips-connectivity`],type:e[`edge-ips-type`],ips:e[`edge-ips-ips`]},ip_firewall:e[`ip-firewall`],origin_direct:e[`origin-direct`],origin_dns:{name:u(e[`origin-dns-name`],`origin-dns-name`,`text`),ttl:e[`origin-dns-ttl`],type:e[`origin-dns-type`]},origin_port:c(e[`origin-port`],`origin-port`),origin_worker_id:u(e[`origin-worker-id`],`origin-worker-id`,`text`),protocol:u(e.protocol,`protocol`,`text`),proxy_protocol:e[`proxy-protocol`],tls:e.tls,traffic_type:e[`traffic-type`],virtual_network_id:u(e[`virtual-network-id`],`virtual-network-id`,`text`)}),m=await a(`Updating`,async()=>o.send(G,{body:p,zone_id:f,app_id:e[`app-id`]}));r(m,{successLabel:`Updated`})})},J={command:`apps`,describe:`Spectrum application configurations that map protocols and ports to origin servers`,builder:e=>e.command(F).command(R).command(V).command(W).command(q).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Y={method:`GET`,path:t=>e`/zones/${t.zone_id}/spectrum/protocols`};function X(e){return e.usage(`$0 spectrum protocols list
80
+ Notes: Only available for TCP applications.`}).option(`origin-direct`,{type:`string`,array:!0,description:`List of origin IP addresses. Array may contain multiple IP addresses for load balancing.`}).option(`origin-dns-name`,{type:`string`,description:`The name of the DNS record associated with the origin.`}).option(`origin-dns-ttl`,{type:`number`,description:`The TTL of our resolution of your DNS record in seconds.`}).option(`origin-dns-type`,{type:`string`,description:`The type of DNS record associated with the origin. "" is used to specify a combination of A/AAAA records.`,choices:[`A`,`AAAA`,`SRV`]}).coerce(`origin-dns-type`,e=>u(e,`origin-dns-type`,`text`)).option(`origin-port`,{type:`string`,description:'The destination port at the origin. Only specified in conjunction with origin_dns. May use an integer to specify a single origin port, for example `1000`, or a string to specify a range of origin ports, for example `"1000-2000"`.\nNotes: If specifying a port range, the number of ports in the range must match the number of ports specified in the "protocol" field. Accepts a JSON scalar or plain string, or @path/to/file.'}).option(`origin-worker-id`,{type:`string`,description:`Optional Worker script tag (worker ID) to use as the application's origin. Only supported for TCP applications with traffic_type "worker"; mutually exclusive with origin_direct, origin_dns, origin_port, proxy_protocol, and argo_smart_routing. tls may only be "off" or "flexible".`}).option(`protocol`,{type:`string`,description:'The port configuration at Cloudflare\'s edge. May specify a single port, for example `"tcp/1000"`, or a range of ports, for example `"tcp/1000-2000"`.'}).option(`proxy-protocol`,{type:`string`,description:`Enables Proxy Protocol to the origin. Refer to [Enable Proxy protocol](https://developers.cloudflare.com/spectrum/getting-started/proxy-protocol/) for implementation details on PROXY Protocol V1, PROXY Protocol V2, and Simple Proxy Protocol.`,choices:[`off`,`v1`,`v2`,`simple`]}).coerce(`proxy-protocol`,e=>u(e,`proxy-protocol`,`text`)).option(`tls`,{type:`string`,description:`The type of TLS termination associated with the application.`,choices:[`off`,`flexible`,`full`,`strict`]}).coerce(`tls`,e=>u(e,`tls`,`text`)).option(`traffic-type`,{type:`string`,description:'Determines how data travels from the edge to your origin. When set to "direct", Spectrum will send traffic directly to your origin, and the application\'s type is derived from the `protocol`. When set to "http" or "https", Spectrum will apply Cloudflare\'s HTTP/HTTPS features as it sends traffic to your origin, and the application type matches this property exactly. When set to "worker", traffic is sent to the Worker specified by `origin_worker_id`.',choices:[`direct`,`http`,`https`,`worker`]}).coerce(`traffic-type`,e=>u(e,`traffic-type`,`text`)).option(`virtual-network-id`,{type:`string`,description:`Optional UUID of a virtual network for routing origin traffic through tunnel virtual networks.`}).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)`}).implies(`argo-smart-routing`,[`traffic-type`]).implies(`edge-ips-connectivity`,[`traffic-type`]).implies(`edge-ips-type`,[`traffic-type`]).implies(`edge-ips-ips`,[`traffic-type`]).implies(`ip-firewall`,[`traffic-type`]).implies(`origin-dns-name`,[`traffic-type`]).implies(`origin-dns-ttl`,[`traffic-type`]).implies(`origin-dns-type`,[`traffic-type`]).implies(`origin-port`,[`traffic-type`]).implies(`origin-worker-id`,[`traffic-type`]).implies(`proxy-protocol`,[`traffic-type`]).implies(`tls`,[`traffic-type`]).implies(`virtual-network-id`,[`traffic-type`])}const q={command:`update <app-id>`,describe:`Update Spectrum application configuration using a name for the origin`,builder:K,handler:async e=>o({command:`spectrum apps update`,classification:{safeFlags:[`argo-smart-routing`,`dns-type`,`edge-ips-connectivity`,`edge-ips-type`,`ip-firewall`,`origin-dns-type`,`proxy-protocol`,`tls`,`traffic-type`,`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf spectrum apps update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/spectrum/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"app-id":String(e[`app-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({argo_smart_routing:e[`argo-smart-routing`],dns:{name:u(e[`dns-name`],`dns-name`,`text`),type:e[`dns-type`]},edge_ips:{connectivity:e[`edge-ips-connectivity`],type:e[`edge-ips-type`],ips:e[`edge-ips-ips`]},ip_firewall:e[`ip-firewall`],origin_direct:e[`origin-direct`],origin_dns:{name:u(e[`origin-dns-name`],`origin-dns-name`,`text`),ttl:e[`origin-dns-ttl`],type:e[`origin-dns-type`]},origin_port:c(e[`origin-port`],`origin-port`),origin_worker_id:u(e[`origin-worker-id`],`origin-worker-id`,`text`),protocol:u(e.protocol,`protocol`,`text`),proxy_protocol:e[`proxy-protocol`],tls:e.tls,traffic_type:e[`traffic-type`],virtual_network_id:u(e[`virtual-network-id`],`virtual-network-id`,`text`)}):s(e.body)});return}let o=e.body===void 0?void 0:s(e.body),f=await t(e),p=await n({zone:e.zone},f,{quiet:e.quiet});if(e.zoneId=p,e.body!==void 0){let t=o,n=await a(`Updating`,async()=>f.send(G,{body:t,zone_id:p,app_id:e[`app-id`]}));i(n,{successLabel:`Updated`});return}e.protocol===void 0&&(e.protocol=await d(`protocol`,'The port configuration at Cloudflare\'s edge. May specify a single port, for example `"tcp/1000"`, or a range of ports, for example `"tcp/1000-2000"`.'));let m=l({argo_smart_routing:e[`argo-smart-routing`],dns:{name:u(e[`dns-name`],`dns-name`,`text`),type:e[`dns-type`]},edge_ips:{connectivity:e[`edge-ips-connectivity`],type:e[`edge-ips-type`],ips:e[`edge-ips-ips`]},ip_firewall:e[`ip-firewall`],origin_direct:e[`origin-direct`],origin_dns:{name:u(e[`origin-dns-name`],`origin-dns-name`,`text`),ttl:e[`origin-dns-ttl`],type:e[`origin-dns-type`]},origin_port:c(e[`origin-port`],`origin-port`),origin_worker_id:u(e[`origin-worker-id`],`origin-worker-id`,`text`),protocol:u(e.protocol,`protocol`,`text`),proxy_protocol:e[`proxy-protocol`],tls:e.tls,traffic_type:e[`traffic-type`],virtual_network_id:u(e[`virtual-network-id`],`virtual-network-id`,`text`)}),h=await a(`Updating`,async()=>f.send(G,{body:m,zone_id:p,app_id:e[`app-id`]}));i(h,{successLabel:`Updated`})})},J={command:`apps`,describe:`Spectrum application configurations that map protocols and ports to origin servers`,builder:e=>e.command(F).command(R).command(V).command(W).command(q).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Y={method:`GET`,path:t=>e`/zones/${t.zone_id}/spectrum/protocols`};function X(e){return e.usage(`$0 spectrum protocols list
81
81
 
82
- Retrieves a list of Spectrum application protocols available for a zone.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Z={command:`list`,describe:`List Spectrum application protocols`,builder:X,handler:async e=>o({command:`spectrum protocols list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf spectrum protocols list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/spectrum/protocols`,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(Y,{zone_id:s}));r(c,{successLabel:`Loaded`})})},Q={command:`protocols`,describe:`Operations for protocols`,builder:e=>e.command(Z).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},$={command:`spectrum`,describe:`Proxy and protect arbitrary TCP/UDP applications through Cloudflare's network with DDoS mitigation`,builder:e=>e.command(M).command(J).command(Q).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{$ as default};
82
+ Retrieves a list of Spectrum application protocols available for a zone.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Z={command:`list`,describe:`List Spectrum application protocols`,builder:X,handler:async e=>o({command:`spectrum protocols list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf spectrum protocols list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/spectrum/protocols`,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(Y,{zone_id:s}));i(c,{successLabel:`Loaded`})})},Q={command:`protocols`,describe:`Operations for protocols`,builder:e=>e.command(Z).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},$={command:`spectrum`,describe:`Proxy and protect arbitrary TCP/UDP applications through Cloudflare's network with DDoS mitigation`,builder:e=>e.command(M).command(J).command(Q).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{$ as default};
@@ -1,22 +1,22 @@
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-FK2eLQ02.mjs";import{i as n}from"./context-Dp4CXG22.mjs";import{t as r}from"./output-BJEgbI0G.mjs";import{t as i}from"./dry-run-gy0Hl9xo.mjs";import{t as a}from"./progress-DLri-rA7.mjs";import{t as o}from"./run-Ciw_GIrC.mjs";import"./telemetry-Pt5GpCKD.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-D0dXwuME.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-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-DA1PHaHi.mjs";import{i as n}from"./context-BGm5_wTT.mjs";import{t as r}from"./dry-run-qsnRlRk6.mjs";import{t as i}from"./output-hFMAotFl.mjs";import{t as a}from"./progress-DE_G09u2.mjs";import{t as o}from"./run-CXWkMU3x.mjs";import"./telemetry-COlodX5Z.mjs";import{r as s,t as c}from"./body-parser-HN91kAf0.mjs";import{n as l}from"./input-validation-D7z60HJH.mjs";import{n as u}from"./prompt-D274Im1O.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
- 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
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){r({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}));i(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
 
6
- Lists all webpages which have been tested.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _={command:`list`,describe:`List tested webpages`,builder:g,handler:async e=>o({command:`speed pages list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf speed pages list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/speed_api/pages`,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(h,{zone_id:s}));r(c,{successLabel:`Loaded`})})};var v={method:`POST`,path:t=>e`/zones/${t.zone_id}/speed_api/pages/${t.url}/tests`,body:`json`};function y(e){return e.usage(`$0 speed pages tests create <url>
6
+ Lists all webpages which have been tested.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _={command:`list`,describe:`List tested webpages`,builder:g,handler:async e=>o({command:`speed pages list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf speed pages list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/speed_api/pages`,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(h,{zone_id:s}));i(c,{successLabel:`Loaded`})})};var v={method:`POST`,path:t=>e`/zones/${t.zone_id}/speed_api/pages/${t.url}/tests`,body:`json`};function y(e){return e.usage(`$0 speed pages tests create <url>
7
7
 
8
- Starts a test for a specific webpage, in a specific region.`).positional(`url`,{type:`string`,description:`A URL.`,demandOption:!0}).option(`region`,{type:`string`,description:`A test region.`,choices:[`asia-east1`,`asia-northeast1`,`asia-northeast2`,`asia-south1`,`asia-southeast1`,`australia-southeast1`,`europe-north1`,`europe-southwest1`,`europe-west1`,`europe-west2`,`europe-west3`,`europe-west4`,`europe-west8`,`europe-west9`,`me-west1`,`southamerica-east1`,`us-central1`,`us-east1`,`us-east4`,`us-south1`,`us-west1`]}).coerce(`region`,e=>l(e,`region`,`text`)).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 <url>`,describe:`Start page test`,builder:y,handler:async e=>o({command:`speed pages tests create`,classification:{safeFlags:[`region`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf speed pages tests create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/speed_api/pages/${e.url==null?`<url>`:encodeURIComponent(String(e.url))}/tests`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),url:String(e.url??``)},bodyKind:`json`,body:e.body===void 0?c({region:e.region}):s(e.body)});return}let o=await t(e),l=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=l,e.body){let t=s(e.body),n=await a(`Creating`,async()=>o.send(v,{body:t,zone_id:l,url:e.url}));r(n,{successLabel:`Created`});return}let u=c({region:e.region}),d=await a(`Creating`,async()=>o.send(v,{body:u,zone_id:l,url:e.url}));r(d,{successLabel:`Created`})})};var x={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/speed_api/pages/${t.url}/tests`,query:[`region`]};function S(e){return e.usage(`$0 speed pages tests delete <url>
8
+ Starts a test for a specific webpage, in a specific region.`).positional(`url`,{type:`string`,description:`A URL.`,demandOption:!0}).option(`region`,{type:`string`,description:`A test region.`,choices:[`asia-east1`,`asia-northeast1`,`asia-northeast2`,`asia-south1`,`asia-southeast1`,`australia-southeast1`,`europe-north1`,`europe-southwest1`,`europe-west1`,`europe-west2`,`europe-west3`,`europe-west4`,`europe-west8`,`europe-west9`,`me-west1`,`southamerica-east1`,`us-central1`,`us-east1`,`us-east4`,`us-south1`,`us-west1`]}).coerce(`region`,e=>l(e,`region`,`text`)).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 <url>`,describe:`Start page test`,builder:y,handler:async e=>o({command:`speed pages tests create`,classification:{safeFlags:[`region`,`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf speed pages tests create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/speed_api/pages/${e.url==null?`<url>`:encodeURIComponent(String(e.url))}/tests`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),url:String(e.url??``)},bodyKind:`json`,body:e.body===void 0?c({region:e.region}):s(e.body)});return}let o=e.body===void 0?void 0:s(e.body),l=await t(e),u=await n({zone:e.zone},l,{quiet:e.quiet});if(e.zoneId=u,e.body!==void 0){let t=o,n=await a(`Creating`,async()=>l.send(v,{body:t,zone_id:u,url:e.url}));i(n,{successLabel:`Created`});return}let d=c({region:e.region}),f=await a(`Creating`,async()=>l.send(v,{body:d,zone_id:u,url:e.url}));i(f,{successLabel:`Created`})})};var x={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/speed_api/pages/${t.url}/tests`,query:[`region`]};function S(e){return e.usage(`$0 speed pages tests delete <url>
9
9
 
10
- Deletes all tests for a specific webpage from a specific region. Deleted tests are still counted as part of the quota.`).positional(`url`,{type:`string`,description:`A URL.`,demandOption:!0}).option(`region`,{type:`string`,description:`A test region.`,choices:[`asia-east1`,`asia-northeast1`,`asia-northeast2`,`asia-south1`,`asia-southeast1`,`australia-southeast1`,`europe-north1`,`europe-southwest1`,`europe-west1`,`europe-west2`,`europe-west3`,`europe-west4`,`europe-west8`,`europe-west9`,`me-west1`,`southamerica-east1`,`us-central1`,`us-east1`,`us-east4`,`us-south1`,`us-west1`]}).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 C={command:`delete <url>`,describe:`Delete all page tests`,builder:S,handler:async e=>o({command:`speed pages tests delete`,classification:{safeFlags:[`region`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let o={region:e.region};if(e.dryRun){i({command:`cf speed pages tests delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/speed_api/pages/${e.url==null?`<url>`:encodeURIComponent(String(e.url))}/tests`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),url:String(e.url??``)},query:o,bodyKind:`none`});return}let s=await t(e),c=await n({zone:e.zone},s,{quiet:e.quiet});if(e.zoneId=c,!await u({force:!!e.force}))return;let l=await a(`Deleting`,async()=>s.send(x,{zone_id:c,url:e.url,...o}));r(l,{successLabel:`Deleted`})})};var w={method:`GET`,path:t=>e`/zones/${t.zone_id}/speed_api/pages/${t.url}/tests/${t.test_id}`};function T(e){return e.usage(`$0 speed pages tests get <test-id>
10
+ Deletes all tests for a specific webpage from a specific region. Deleted tests are still counted as part of the quota.`).positional(`url`,{type:`string`,description:`A URL.`,demandOption:!0}).option(`region`,{type:`string`,description:`A test region.`,choices:[`asia-east1`,`asia-northeast1`,`asia-northeast2`,`asia-south1`,`asia-southeast1`,`australia-southeast1`,`europe-north1`,`europe-southwest1`,`europe-west1`,`europe-west2`,`europe-west3`,`europe-west4`,`europe-west8`,`europe-west9`,`me-west1`,`southamerica-east1`,`us-central1`,`us-east1`,`us-east4`,`us-south1`,`us-west1`]}).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 C={command:`delete <url>`,describe:`Delete all page tests`,builder:S,handler:async e=>o({command:`speed pages tests delete`,classification:{safeFlags:[`region`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let o={region:e.region};if(e.dryRun){r({command:`cf speed pages tests delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/speed_api/pages/${e.url==null?`<url>`:encodeURIComponent(String(e.url))}/tests`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),url:String(e.url??``)},query:o,bodyKind:`none`});return}let s=await t(e),c=await n({zone:e.zone},s,{quiet:e.quiet});if(e.zoneId=c,!await u({force:!!e.force}))return;let l=await a(`Deleting`,async()=>s.send(x,{zone_id:c,url:e.url,...o}));i(l,{successLabel:`Deleted`})})};var w={method:`GET`,path:t=>e`/zones/${t.zone_id}/speed_api/pages/${t.url}/tests/${t.test_id}`};function T(e){return e.usage(`$0 speed pages tests get <test-id>
11
11
 
12
- Retrieves the result of a specific test.`).positional(`test-id`,{type:`string`,description:`Test ID`,demandOption:!0}).option(`url`,{type:`string`,description:`A URL.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`get <test-id>`,describe:`Get a page test result`,builder:T,handler:async e=>o({command:`speed pages tests get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf speed pages tests get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/speed_api/pages/${e.url==null?`<url>`:encodeURIComponent(String(e.url))}/tests/${e[`test-id`]==null?`<test-id>`:encodeURIComponent(String(e[`test-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),url:String(e.url??``),"test-id":String(e[`test-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(w,{zone_id:s,url:e.url,test_id:e[`test-id`]}));r(c,{successLabel:`Loaded`})})};var D={method:`GET`,path:t=>e`/zones/${t.zone_id}/speed_api/pages/${t.url}/tests`,query:[`page`,`per_page`,`region`]};function O(e){return e.usage(`$0 speed pages tests list
12
+ Retrieves the result of a specific test.`).positional(`test-id`,{type:`string`,description:`Test ID`,demandOption:!0}).option(`url`,{type:`string`,description:`A URL.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`get <test-id>`,describe:`Get a page test result`,builder:T,handler:async e=>o({command:`speed pages tests get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf speed pages tests get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/speed_api/pages/${e.url==null?`<url>`:encodeURIComponent(String(e.url))}/tests/${e[`test-id`]==null?`<test-id>`:encodeURIComponent(String(e[`test-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),url:String(e.url??``),"test-id":String(e[`test-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(w,{zone_id:s,url:e.url,test_id:e[`test-id`]}));i(c,{successLabel:`Loaded`})})};var D={method:`GET`,path:t=>e`/zones/${t.zone_id}/speed_api/pages/${t.url}/tests`,query:[`page`,`per_page`,`region`]};function O(e){return e.usage(`$0 speed pages tests list
13
13
 
14
- Test history (list of tests) for a specific webpage.`).option(`url`,{type:`string`,description:`A URL.`,demandOption:!0}).option(`page`,{type:`number`,description:`Page`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`region`,{type:`string`,description:`A test region.`,choices:[`asia-east1`,`asia-northeast1`,`asia-northeast2`,`asia-south1`,`asia-southeast1`,`australia-southeast1`,`europe-north1`,`europe-southwest1`,`europe-west1`,`europe-west2`,`europe-west3`,`europe-west4`,`europe-west8`,`europe-west9`,`me-west1`,`southamerica-east1`,`us-central1`,`us-east1`,`us-east4`,`us-south1`,`us-west1`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`list`,describe:`List page test history`,builder:O,handler:async e=>o({command:`speed pages tests list`,classification:{safeFlags:[`region`,`dry-run`]}},e,async()=>{let o={page:e.page,per_page:e[`per-page`],region:e.region};if(e.dryRun){i({command:`cf speed pages tests list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/speed_api/pages/${e.url==null?`<url>`:encodeURIComponent(String(e.url))}/tests`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),url:String(e.url??``)},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(D,{zone_id:c,url:e.url,...o}));r(l,{successLabel:`Loaded`})})},A={command:`tests`,describe:`Operations for pages.tests`,builder:e=>e.command(b).command(C).command(E).command(k).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var j={method:`GET`,path:t=>e`/zones/${t.zone_id}/speed_api/pages/${t.url}/trend`,query:[`region`,`deviceType`,`start`,`end`,`tz`,`metrics`]};function M(e){return e.usage(`$0 speed pages trend <url>
14
+ Test history (list of tests) for a specific webpage.`).option(`url`,{type:`string`,description:`A URL.`,demandOption:!0}).option(`page`,{type:`number`,description:`Page`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`region`,{type:`string`,description:`A test region.`,choices:[`asia-east1`,`asia-northeast1`,`asia-northeast2`,`asia-south1`,`asia-southeast1`,`australia-southeast1`,`europe-north1`,`europe-southwest1`,`europe-west1`,`europe-west2`,`europe-west3`,`europe-west4`,`europe-west8`,`europe-west9`,`me-west1`,`southamerica-east1`,`us-central1`,`us-east1`,`us-east4`,`us-south1`,`us-west1`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`list`,describe:`List page test history`,builder:O,handler:async e=>o({command:`speed pages tests list`,classification:{safeFlags:[`region`,`dry-run`]}},e,async()=>{let o={page:e.page,per_page:e[`per-page`],region:e.region};if(e.dryRun){r({command:`cf speed pages tests list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/speed_api/pages/${e.url==null?`<url>`:encodeURIComponent(String(e.url))}/tests`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),url:String(e.url??``)},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(D,{zone_id:c,url:e.url,...o}));i(l,{successLabel:`Loaded`})})},A={command:`tests`,describe:`Operations for pages.tests`,builder:e=>e.command(b).command(C).command(E).command(k).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var j={method:`GET`,path:t=>e`/zones/${t.zone_id}/speed_api/pages/${t.url}/trend`,query:[`region`,`deviceType`,`start`,`end`,`tz`,`metrics`]};function M(e){return e.usage(`$0 speed pages trend <url>
15
15
 
16
- Lists the core web vital metrics trend over time for a specific page.`).positional(`url`,{type:`string`,description:`A URL.`,demandOption:!0}).option(`region`,{type:`string`,description:`A test region.`,choices:[`asia-east1`,`asia-northeast1`,`asia-northeast2`,`asia-south1`,`asia-southeast1`,`australia-southeast1`,`europe-north1`,`europe-southwest1`,`europe-west1`,`europe-west2`,`europe-west3`,`europe-west4`,`europe-west8`,`europe-west9`,`me-west1`,`southamerica-east1`,`us-central1`,`us-east1`,`us-east4`,`us-south1`,`us-west1`],demandOption:!0}).option(`device-type`,{type:`string`,description:`The type of device.`,choices:[`DESKTOP`,`MOBILE`],demandOption:!0}).option(`start`,{type:`string`,description:`Start`,demandOption:!0}).option(`end`,{type:`string`,description:`End`}).option(`tz`,{type:`string`,description:`The timezone of the start and end timestamps.`,demandOption:!0}).option(`metrics`,{type:`string`,description:`A comma-separated list of metrics to include in the results.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const N={command:`trend <url>`,describe:`List core web vital metrics trend`,builder:M,handler:async e=>o({command:`speed pages trend`,classification:{safeFlags:[`region`,`device-type`,`dry-run`]}},e,async()=>{let o={region:e.region,deviceType:e[`device-type`],start:e.start,end:e.end,tz:e.tz,metrics:e.metrics};if(e.dryRun){i({command:`cf speed pages trend`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/speed_api/pages/${e.url==null?`<url>`:encodeURIComponent(String(e.url))}/trend`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),url:String(e.url??``)},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(j,{zone_id:c,url:e.url,...o}));r(l,{successLabel:`Loaded`})})},P={command:`pages`,describe:`Tested pages with their performance history, trends, and individual test results`,builder:e=>e.command(_).command(N).command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var F={method:`POST`,path:t=>e`/zones/${t.zone_id}/speed_api/schedule/${t.url}`,query:[`region`,`frequency`]};function I(e){return e.usage(`$0 speed schedule create <url>
16
+ Lists the core web vital metrics trend over time for a specific page.`).positional(`url`,{type:`string`,description:`A URL.`,demandOption:!0}).option(`region`,{type:`string`,description:`A test region.`,choices:[`asia-east1`,`asia-northeast1`,`asia-northeast2`,`asia-south1`,`asia-southeast1`,`australia-southeast1`,`europe-north1`,`europe-southwest1`,`europe-west1`,`europe-west2`,`europe-west3`,`europe-west4`,`europe-west8`,`europe-west9`,`me-west1`,`southamerica-east1`,`us-central1`,`us-east1`,`us-east4`,`us-south1`,`us-west1`],demandOption:!0}).option(`device-type`,{type:`string`,description:`The type of device.`,choices:[`DESKTOP`,`MOBILE`],demandOption:!0}).option(`start`,{type:`string`,description:`Start`,demandOption:!0}).option(`end`,{type:`string`,description:`End`}).option(`tz`,{type:`string`,description:`The timezone of the start and end timestamps.`,demandOption:!0}).option(`metrics`,{type:`string`,description:`A comma-separated list of metrics to include in the results.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const N={command:`trend <url>`,describe:`List core web vital metrics trend`,builder:M,handler:async e=>o({command:`speed pages trend`,classification:{safeFlags:[`region`,`device-type`,`dry-run`]}},e,async()=>{let o={region:e.region,deviceType:e[`device-type`],start:e.start,end:e.end,tz:e.tz,metrics:e.metrics};if(e.dryRun){r({command:`cf speed pages trend`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/speed_api/pages/${e.url==null?`<url>`:encodeURIComponent(String(e.url))}/trend`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),url:String(e.url??``)},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(j,{zone_id:c,url:e.url,...o}));i(l,{successLabel:`Loaded`})})},P={command:`pages`,describe:`Tested pages with their performance history, trends, and individual test results`,builder:e=>e.command(_).command(N).command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var F={method:`POST`,path:t=>e`/zones/${t.zone_id}/speed_api/schedule/${t.url}`,query:[`region`,`frequency`]};function I(e){return e.usage(`$0 speed schedule create <url>
17
17
 
18
- Creates a scheduled test for a page.`).positional(`url`,{type:`string`,description:`A URL.`,demandOption:!0}).option(`region`,{type:`string`,description:`A test region.`,choices:[`asia-east1`,`asia-northeast1`,`asia-northeast2`,`asia-south1`,`asia-southeast1`,`australia-southeast1`,`europe-north1`,`europe-southwest1`,`europe-west1`,`europe-west2`,`europe-west3`,`europe-west4`,`europe-west8`,`europe-west9`,`me-west1`,`southamerica-east1`,`us-central1`,`us-east1`,`us-east4`,`us-south1`,`us-west1`]}).option(`frequency`,{type:`string`,description:`The frequency of the scheduled test. Defaults to WEEKLY for free plans, DAILY for paid plans.`,choices:[`DAILY`,`WEEKLY`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const L={command:`create <url>`,describe:`Create scheduled page test`,builder:I,handler:async e=>o({command:`speed schedule create`,classification:{safeFlags:[`region`,`frequency`,`dry-run`]}},e,async()=>{let o={region:e.region,frequency:e.frequency};if(e.dryRun){i({command:`cf speed schedule create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/speed_api/schedule/${e.url==null?`<url>`:encodeURIComponent(String(e.url))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),url:String(e.url??``)},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(`Creating`,async()=>s.send(F,{zone_id:c,url:e.url,...o}));r(l,{successLabel:`Created`})})};var R={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/speed_api/schedule/${t.url}`,query:[`region`]};function z(e){return e.usage(`$0 speed schedule delete <url>
18
+ Creates a scheduled test for a page.`).positional(`url`,{type:`string`,description:`A URL.`,demandOption:!0}).option(`region`,{type:`string`,description:`A test region.`,choices:[`asia-east1`,`asia-northeast1`,`asia-northeast2`,`asia-south1`,`asia-southeast1`,`australia-southeast1`,`europe-north1`,`europe-southwest1`,`europe-west1`,`europe-west2`,`europe-west3`,`europe-west4`,`europe-west8`,`europe-west9`,`me-west1`,`southamerica-east1`,`us-central1`,`us-east1`,`us-east4`,`us-south1`,`us-west1`]}).option(`frequency`,{type:`string`,description:`The frequency of the scheduled test. Defaults to WEEKLY for free plans, DAILY for paid plans.`,choices:[`DAILY`,`WEEKLY`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const L={command:`create <url>`,describe:`Create scheduled page test`,builder:I,handler:async e=>o({command:`speed schedule create`,classification:{safeFlags:[`region`,`frequency`,`dry-run`]}},e,async()=>{let o={region:e.region,frequency:e.frequency};if(e.dryRun){r({command:`cf speed schedule create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/speed_api/schedule/${e.url==null?`<url>`:encodeURIComponent(String(e.url))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),url:String(e.url??``)},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(`Creating`,async()=>s.send(F,{zone_id:c,url:e.url,...o}));i(l,{successLabel:`Created`})})};var R={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/speed_api/schedule/${t.url}`,query:[`region`]};function z(e){return e.usage(`$0 speed schedule delete <url>
19
19
 
20
- Deletes a scheduled test for a page.`).positional(`url`,{type:`string`,description:`A URL.`,demandOption:!0}).option(`region`,{type:`string`,description:`A test region.`,choices:[`asia-east1`,`asia-northeast1`,`asia-northeast2`,`asia-south1`,`asia-southeast1`,`australia-southeast1`,`europe-north1`,`europe-southwest1`,`europe-west1`,`europe-west2`,`europe-west3`,`europe-west4`,`europe-west8`,`europe-west9`,`me-west1`,`southamerica-east1`,`us-central1`,`us-east1`,`us-east4`,`us-south1`,`us-west1`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const B={command:`delete <url>`,describe:`Delete scheduled page test`,builder:z,handler:async e=>o({command:`speed schedule delete`,classification:{safeFlags:[`region`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let o={region:e.region};if(e.dryRun){i({command:`cf speed schedule delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/speed_api/schedule/${e.url==null?`<url>`:encodeURIComponent(String(e.url))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),url:String(e.url??``)},query:o,bodyKind:`none`});return}let s=await t(e),c=await n({zone:e.zone},s,{quiet:e.quiet});if(e.zoneId=c,!await u({force:!!e.force}))return;let l=await a(`Deleting`,async()=>s.send(R,{zone_id:c,url:e.url,...o}));r(l,{successLabel:`Deleted`})})};var V={method:`GET`,path:t=>e`/zones/${t.zone_id}/speed_api/schedule/${t.url}`,query:[`region`]};function H(e){return e.usage(`$0 speed schedule get <url>
20
+ Deletes a scheduled test for a page.`).positional(`url`,{type:`string`,description:`A URL.`,demandOption:!0}).option(`region`,{type:`string`,description:`A test region.`,choices:[`asia-east1`,`asia-northeast1`,`asia-northeast2`,`asia-south1`,`asia-southeast1`,`australia-southeast1`,`europe-north1`,`europe-southwest1`,`europe-west1`,`europe-west2`,`europe-west3`,`europe-west4`,`europe-west8`,`europe-west9`,`me-west1`,`southamerica-east1`,`us-central1`,`us-east1`,`us-east4`,`us-south1`,`us-west1`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const B={command:`delete <url>`,describe:`Delete scheduled page test`,builder:z,handler:async e=>o({command:`speed schedule delete`,classification:{safeFlags:[`region`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let o={region:e.region};if(e.dryRun){r({command:`cf speed schedule delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/speed_api/schedule/${e.url==null?`<url>`:encodeURIComponent(String(e.url))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),url:String(e.url??``)},query:o,bodyKind:`none`});return}let s=await t(e),c=await n({zone:e.zone},s,{quiet:e.quiet});if(e.zoneId=c,!await u({force:!!e.force}))return;let l=await a(`Deleting`,async()=>s.send(R,{zone_id:c,url:e.url,...o}));i(l,{successLabel:`Deleted`})})};var V={method:`GET`,path:t=>e`/zones/${t.zone_id}/speed_api/schedule/${t.url}`,query:[`region`]};function H(e){return e.usage(`$0 speed schedule get <url>
21
21
 
22
- Retrieves the test schedule for a page in a specific region.`).positional(`url`,{type:`string`,description:`A URL.`,demandOption:!0}).option(`region`,{type:`string`,description:`A test region.`,choices:[`asia-east1`,`asia-northeast1`,`asia-northeast2`,`asia-south1`,`asia-southeast1`,`australia-southeast1`,`europe-north1`,`europe-southwest1`,`europe-west1`,`europe-west2`,`europe-west3`,`europe-west4`,`europe-west8`,`europe-west9`,`me-west1`,`southamerica-east1`,`us-central1`,`us-east1`,`us-east4`,`us-south1`,`us-west1`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const U={command:`get <url>`,describe:`Get a page test schedule`,builder:H,handler:async e=>o({command:`speed schedule get`,classification:{safeFlags:[`region`,`dry-run`]}},e,async()=>{let o={region:e.region};if(e.dryRun){i({command:`cf speed schedule get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/speed_api/schedule/${e.url==null?`<url>`:encodeURIComponent(String(e.url))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),url:String(e.url??``)},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,url:e.url,...o}));r(l,{successLabel:`Loaded`})})},W={command:`schedule`,describe:`Scheduled recurring speed tests that automatically run at regular intervals`,builder:e=>e.command(L).command(B).command(U).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},G={command:`speed`,describe:`Observatory speed tests — run Lighthouse audits, track performance trends, and schedule recurring tests`,builder:e=>e.command(m).command(P).command(W).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{G as default};
22
+ Retrieves the test schedule for a page in a specific region.`).positional(`url`,{type:`string`,description:`A URL.`,demandOption:!0}).option(`region`,{type:`string`,description:`A test region.`,choices:[`asia-east1`,`asia-northeast1`,`asia-northeast2`,`asia-south1`,`asia-southeast1`,`australia-southeast1`,`europe-north1`,`europe-southwest1`,`europe-west1`,`europe-west2`,`europe-west3`,`europe-west4`,`europe-west8`,`europe-west9`,`me-west1`,`southamerica-east1`,`us-central1`,`us-east1`,`us-east4`,`us-south1`,`us-west1`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const U={command:`get <url>`,describe:`Get a page test schedule`,builder:H,handler:async e=>o({command:`speed schedule get`,classification:{safeFlags:[`region`,`dry-run`]}},e,async()=>{let o={region:e.region};if(e.dryRun){r({command:`cf speed schedule get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/speed_api/schedule/${e.url==null?`<url>`:encodeURIComponent(String(e.url))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),url:String(e.url??``)},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,url:e.url,...o}));i(l,{successLabel:`Loaded`})})},W={command:`schedule`,describe:`Scheduled recurring speed tests that automatically run at regular intervals`,builder:e=>e.command(L).command(B).command(U).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},G={command:`speed`,describe:`Observatory speed tests — run Lighthouse audits, track performance trends, and schedule recurring tests`,builder:e=>e.command(m).command(P).command(W).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{G as default};
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env node
2
+ import{i as e,n as t}from"./auth-DA1PHaHi.mjs";import{t as n}from"./dry-run-qsnRlRk6.mjs";import{t as r}from"./output-hFMAotFl.mjs";import{t as i}from"./progress-DE_G09u2.mjs";import{t as a}from"./run-CXWkMU3x.mjs";import"./telemetry-COlodX5Z.mjs";import{c as o,n as s,r as c,t as l}from"./body-parser-HN91kAf0.mjs";import{n as u,t as d}from"./input-validation-D7z60HJH.mjs";var f={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 p(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 m={command:`datasets`,describe:`List available analytics datasets`,builder:p,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){n({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(f,a));r(s,{successLabel:`Loaded`})})};function h(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
+ `}).option(`scope-zone`,{type:`string`,description:`Zone tag used to authorize and scope the query. Must be a 32-character lowercase hex string.
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=>{let t=[`time-until`,`time-since`].some(t=>e[t]!==void 0);if(!e.body&&t){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 g={command:`query <query>`,describe:`Query analytics datasets`,builder:h,handler:async f=>a({command:`sql query`,classification:{safeFlags:[`dry-run`]}},f,async()=>{if(f.dryRun){n({command:`cf sql query`,method:`POST`,url:`https://api.cloudflare.com/client/v4/analytics/sql`,pathParams:{},bodyKind:f.file===void 0?`json`:`octet-stream`,body:f.file===void 0?f.body===void 0?l({scope:{accountTag:u(f[`scope-account`],`scope-account`,`text`),zoneTag:u(f[`scope-zone`],`scope-zone`,`text`)},time_range:{end:u(f[`time-until`],`time-until`,`text`),start:u(f[`time-since`],`time-since`,`text`)},query:f.query}):s(c(f.body),[{name:`query`,field:`query`,value:f.query}]):{file:f.file}});return}let a=f.file===void 0?f.body===void 0?void 0:s(c(f.body),[{name:`query`,field:`query`,value:f.query}]):void 0,p=await t(f);if(f.file!==void 0){let t=d(f.file),n=await i(`Loading`,async()=>e(p,`POST`,`/analytics/sql`,{body:t,headers:{"Content-Type":`text/plain`}}));r(n,{successLabel:`Loaded`});return}if(f.body!==void 0){let t=a,n=await i(`Loading`,async()=>e(p,`POST`,`/analytics/sql`,{body:t}));r(n,{successLabel:`Loaded`});return}let m={};f[`scope-account`]!==void 0&&o(m,[`scope`,`accountTag`],u(f[`scope-account`],`scope-account`,`text`)),f[`scope-zone`]!==void 0&&o(m,[`scope`,`zoneTag`],u(f[`scope-zone`],`scope-zone`,`text`)),f[`time-until`]!==void 0&&o(m,[`time_range`,`end`],u(f[`time-until`],`time-until`,`text`)),f[`time-since`]!==void 0&&o(m,[`time_range`,`start`],u(f[`time-since`],`time-since`,`text`)),f.query!==void 0&&(m.query=f.query);let h=await i(`Loading`,async()=>e(p,`POST`,`/analytics/sql`,{body:m}));r(h,{successLabel:`Loaded`})})},_={command:`sql`,describe:`sql`,builder:e=>e.command(m).command(g).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{_ as default};