cf 1.0.0-beta.27 → 1.0.0-beta.28

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 (267) hide show
  1. package/dist/_meta/commands.json +5787 -1914
  2. package/dist/_meta/hand-written-commands.json +2 -2
  3. package/dist/_meta/schemas.json +796 -557
  4. package/dist/{abuse-reports-RxXqfDEW.mjs → abuse-reports-D9edOyag.mjs} +5 -5
  5. package/dist/{access-BxEprr2f.mjs → access-CKCCSrrU.mjs} +1 -1
  6. package/dist/{accounts-DU2ZNYqP.mjs → accounts-CNb9U9bK.mjs} +22 -22
  7. package/dist/{acm-CBCIKBJ4.mjs → acm-CdKTAToZ.mjs} +3 -3
  8. package/dist/{addressing-BKxiLRHk.mjs → addressing-eZI_C-b0.mjs} +18 -18
  9. package/dist/{agent-memory-DkBpQYUL.mjs → agent-memory-BBHCEE7h.mjs} +7 -7
  10. package/dist/{ai-DqEN_hhg.mjs → ai-Csl_QNwv.mjs} +7 -7
  11. package/dist/ai-audit-DlqWsQi-.mjs +6 -0
  12. package/dist/{ai-gateway-B0uiYVHq.mjs → ai-gateway-Lj4On37s.mjs} +13 -13
  13. package/dist/{ai-search-DbZIxdio.mjs → ai-search-BxyhS3X7.mjs} +17 -17
  14. package/dist/{ai-security-CvZfP2JC.mjs → ai-security-DvU2iYkY.mjs} +3 -3
  15. package/dist/{alerting-BjGwBxZT.mjs → alerting-r0G2X9y9.mjs} +10 -10
  16. package/dist/{analytics-C7kT_H-W.mjs → analytics-C6bfqm-W.mjs} +7 -7
  17. package/dist/analytics-engine-BlIecoOe.mjs +4 -0
  18. package/dist/api-Dnt6lRJG.mjs +3 -0
  19. package/dist/{api-security-BbcvDtff.mjs → api-security-DZ7GWOqD.mjs} +26 -26
  20. package/dist/argo-Bh0_cj49.mjs +14 -0
  21. package/dist/{artifacts-2R2sxIKO.mjs → artifacts-VZJWVq_6.mjs} +16 -16
  22. package/dist/{audit-logs-LoBB1OO_.mjs → audit-logs-B8cGL4B9.mjs} +1 -1
  23. package/dist/auth-B-h0BHg7.mjs +2 -0
  24. package/dist/auth-B6tswVxH.mjs +2 -0
  25. package/dist/{auth-D499YE2n.mjs → auth-clmqFEWU.mjs} +3 -3
  26. package/dist/{auth-token-BwpERbnG.mjs → auth-token-DW4dJVdj.mjs} +1 -1
  27. package/dist/{autoconfig-B2w-woU0.mjs → autoconfig-C0ynlGHf.mjs} +47 -47
  28. package/dist/{basin-catalog-AgOHGiPI.mjs → basin-catalog-TehR1sKZ.mjs} +11 -11
  29. package/dist/billing-B2KusU6g.mjs +22 -0
  30. package/dist/{blocks-C8vyXIAT.mjs → blocks-BFulF68V.mjs} +1 -1
  31. package/dist/body-parser-DoewLePl.mjs +2 -0
  32. package/dist/{body-unions-CjpNjwSW.mjs → body-unions-DNs981Ia.mjs} +1 -1
  33. package/dist/{bot-management-fwxKIbaB.mjs → bot-management-CXHXgrQC.mjs} +2 -2
  34. package/dist/{botnet-feed-DCYB5kYZ.mjs → botnet-feed-UyK7Rfp6.mjs} +1 -1
  35. package/dist/brand-protection-kv1ba80i.mjs +14 -0
  36. package/dist/browser-run-D-vRoZmf.mjs +40 -0
  37. package/dist/build-BzJGqb2o.mjs +2 -0
  38. package/dist/build-FFxzigo4.mjs +2 -0
  39. package/dist/{builds-CoazxuN-.mjs → builds-BbxINHRP.mjs} +15 -15
  40. package/dist/cache-BacNNtLu.mjs +36 -0
  41. package/dist/{cf-hP0SOgC6.mjs → cf-BQ_LRiut.mjs} +2 -2
  42. package/dist/{chunk-DSGVRFIS-DQwKND2c.mjs → chunk-DSGVRFIS-BaNZNW-M.mjs} +1 -1
  43. package/dist/{chunk-SOBRPAPT-BKzUiNx_.mjs → chunk-SOBRPAPT-QTjnHSNs.mjs} +1 -1
  44. package/dist/{cli-Nqf58-1c.mjs → cli-B7vslRfu.mjs} +1 -1
  45. package/dist/{client-side-security-VmZzMy-m.mjs → client-side-security-bzB9JosR.mjs} +6 -6
  46. package/dist/{cloud-connector-bMlFnqP0.mjs → cloud-connector-BHtf37R5.mjs} +2 -2
  47. package/dist/{cloudflared-Ba4KWdTO.mjs → cloudflared-QDdHMUEY.mjs} +1 -1
  48. package/dist/{cloudforce-one-CCaIBOAo.mjs → cloudforce-one-DWBPQDA3.mjs} +71 -71
  49. package/dist/{command-C4OgtX_x.mjs → command-AVwd7XjE.mjs} +1 -1
  50. package/dist/{command-C5Kqc5Km.mjs → command-B87T_f2f.mjs} +1 -1
  51. package/dist/{command-CelQVrZL.mjs → command-CEHhi3t0.mjs} +1 -1
  52. package/dist/{command-ByYf12-8.mjs → command-CYmQE79n.mjs} +1 -1
  53. package/dist/{command-pMoNdd22.mjs → command-CbxXc5IW.mjs} +1 -1
  54. package/dist/{command-Bih1HLr3.mjs → command-Ce8CVLth.mjs} +1 -1
  55. package/dist/{command-MxFFWqMg.mjs → command-CqDudQZs.mjs} +1 -1
  56. package/dist/{command-BASaTmJc.mjs → command-D4YcwpVp.mjs} +1 -1
  57. package/dist/{command-BxZBNPxG.mjs → command-D895kdlh.mjs} +1 -1
  58. package/dist/{command-CrAlzysj.mjs → command-D9Qyi1B0.mjs} +1 -1
  59. package/dist/{command-BiIVclNA.mjs → command-DeutqL1n.mjs} +1 -1
  60. package/dist/{command-C0qCuw03.mjs → command-Dl9ICrRK.mjs} +1 -1
  61. package/dist/{command-CZAR85ba.mjs → command-DtCSe8Hy.mjs} +1 -1
  62. package/dist/{command-C2FVMd1b.mjs → command-DwzVtmb3.mjs} +1 -1
  63. package/dist/{command-CFxyp8Uo.mjs → command-wtBubtZ4.mjs} +1 -1
  64. package/dist/{completions-DRzBiqpv.mjs → completions-BvdKtzsX.mjs} +1 -1
  65. package/dist/{connector-interrupts-CrTeSyaM.mjs → connector-interrupts-dUPW6Ya_.mjs} +2 -2
  66. package/dist/{connector-telemetry-events-BbAOUt9h.mjs → connector-telemetry-events-DWVCqnhn.mjs} +1 -1
  67. package/dist/{connector-telemetry-snapshots-DcpBx7Qx.mjs → connector-telemetry-snapshots-CeMP3qeI.mjs} +1 -1
  68. package/dist/{connectors-D1WFLJoE.mjs → connectors-DZFGNw3i.mjs} +4 -4
  69. package/dist/containers-B06OGOEB.mjs +380 -0
  70. package/dist/{containers-BOBEs1Gk.mjs → containers-DCzQCo79.mjs} +8 -8
  71. package/dist/{content-scan-D1GfPSL0.mjs → content-scan-XhnNJqXf.mjs} +4 -4
  72. package/dist/{context-Dp4CXG22.mjs → context-BY1Eh_Qe.mjs} +1 -1
  73. package/dist/{cps-D4uhzg3k.mjs → cps-CohlxvuN.mjs} +2 -2
  74. package/dist/create-DmLDMvrj.mjs +2 -0
  75. package/dist/{csam-scanner-DOOUBeBM.mjs → csam-scanner-BV4bHq8v.mjs} +2 -2
  76. package/dist/{custom-csrs-DtdFo5YZ.mjs → custom-csrs-BVdMQjYq.mjs} +2 -2
  77. package/dist/{custom-hostnames-ccdlELaD.mjs → custom-hostnames-r-CxhSa1.mjs} +5 -5
  78. package/dist/{custom-nameservers-p3gDjfva.mjs → custom-nameservers-CapMDyly.mjs} +2 -2
  79. package/dist/{custom-pages-DAkKVzgR.mjs → custom-pages-BVIniWfq.mjs} +5 -5
  80. package/dist/{d1-CDIyRdh4.mjs → d1-nJCOJZb8.mjs} +20 -22
  81. package/dist/{delegate-B4bKqF7i.mjs → delegate-CcL6RoGw.mjs} +1 -1
  82. package/dist/delegate.mjs +1 -1
  83. package/dist/{deploy-BaC5Ty7F.mjs → deploy-DJMnWFNk.mjs} +1 -1
  84. package/dist/{deploy-context-DTTgNGro.mjs → deploy-context-YCW3eqP1.mjs} +15 -15
  85. package/dist/{deploy-input-mAy06fAI.mjs → deploy-input-CQLBXFEB.mjs} +1 -1
  86. package/dist/{dev-De-HszNT.mjs → dev-GsYHvMah.mjs} +1 -1
  87. package/dist/{diagnostics-D1CUs2o9.mjs → diagnostics-C3nqxsAO.mjs} +4 -4
  88. package/dist/{dist-D5qkmHhC.mjs → dist-D-ihn_mV.mjs} +42 -33
  89. package/dist/{dls-DWBiYzY1.mjs → dls-N1x8sAK3.mjs} +3 -3
  90. package/dist/{dns-wMjf1t6-.mjs → dns-DATWP-PF.mjs} +25 -25
  91. package/dist/{dns-firewall-DH9xIT5H.mjs → dns-firewall-n3Y2ui6W.mjs} +4 -4
  92. package/dist/{docs-BA7qslb2.mjs → docs-CRc_WOXh.mjs} +1 -1
  93. package/dist/{dry-run-gy0Hl9xo.mjs → dry-run-kJbjn4kG.mjs} +1 -1
  94. package/dist/{durable-objects-DF0MYpnV.mjs → durable-objects-DHK9w-vO.mjs} +2 -2
  95. package/dist/{email-auth-BShMFXn4.mjs → email-auth-ptdqNSTZ.mjs} +1 -1
  96. package/dist/{email-domains-CDSbVclP.mjs → email-domains-uL22-zRY.mjs} +2 -2
  97. package/dist/{email-routing-CBCkbg_F.mjs → email-routing-CV43rMJC.mjs} +12 -12
  98. package/dist/{email-security-CnNa1YON.mjs → email-security-DK_SJ0yi.mjs} +38 -38
  99. package/dist/{email-sending-CpDSw-Eb.mjs → email-sending-CTQafGec.mjs} +11 -11
  100. package/dist/{error-sanitization-DG8WSzHe.mjs → error-sanitization-BkgtZ0Vx.mjs} +1 -1
  101. package/dist/error-sanitization-D069tpKk.mjs +2 -0
  102. package/dist/{errors-DatLr-iR.mjs → errors-VG1mgwJl.mjs} +1 -1
  103. package/dist/{field-extractors-BwGdMnTr.mjs → field-extractors-jcZ_bAGc.mjs} +2 -2
  104. package/dist/{firewall-CY_oem-d.mjs → firewall-CW-fAI9m.mjs} +12 -12
  105. package/dist/{flagship-Bat5EZCk.mjs → flagship-RiLnDwfJ.mjs} +8 -8
  106. package/dist/{fraud-CSUKLh8X.mjs → fraud-DvfBBTe8.mjs} +2 -2
  107. package/dist/get-3XNn0upb.mjs +2 -0
  108. package/dist/{google-tag-gateway-C2skt6t-.mjs → google-tag-gateway-C5WYsSXv.mjs} +2 -2
  109. package/dist/{healthchecks-uC43QKQd.mjs → healthchecks-BA1fmzTm.mjs} +5 -5
  110. package/dist/{hyperdrive-FcBbpew4.mjs → hyperdrive-Ch6klUp3.mjs} +4 -4
  111. package/dist/{iam-8T74DNhH.mjs → iam-LlGEzRCq.mjs} +14 -14
  112. package/dist/{images-C3JUaf6b.mjs → images-C5WqUXkK.mjs} +11 -11
  113. package/dist/index.mjs +1 -1
  114. package/dist/{init-BEVVz4_P.mjs → init-EVsjBrOz.mjs} +2 -2
  115. package/dist/{intel-DRy4rHrt.mjs → intel-vcWyslaX.mjs} +14 -14
  116. package/dist/{interactive-CKHdGvkh.mjs → interactive-BCDFSPtq.mjs} +1 -1
  117. package/dist/{internal-CamuESs0.mjs → internal-BhV9WjLp.mjs} +1 -1
  118. package/dist/{ips-DinCNnWj.mjs → ips-CqHjVsqd.mjs} +1 -1
  119. package/dist/k2-CZT2Pd5J.mjs +10 -0
  120. package/dist/kv-Ipa7dnvF.mjs +12 -0
  121. package/dist/{lazy-command-WB1FOuew.mjs → lazy-command-DbKVgdGT.mjs} +1 -1
  122. package/dist/{leaked-credential-checks-CSZd9hBQ.mjs → leaked-credential-checks-EzT4TTjO.mjs} +4 -4
  123. package/dist/{live-B6AsI_E5.mjs → live-C9L1bNuE.mjs} +1 -1
  124. package/dist/{load-balancers-gap5u4b1.mjs → load-balancers-Cb3VkSfc.mjs} +21 -21
  125. package/dist/local-D5Vq6ooZ.mjs +2 -0
  126. package/dist/{local-CgBhtmON.mjs → local-DIJ7SIKC.mjs} +1 -1
  127. package/dist/{local-runtime-CmlJ20uJ.mjs → local-runtime-BZjgkacr.mjs} +1 -1
  128. package/dist/{login-BJHaTERg.mjs → login-DG5ebyab.mjs} +1 -1
  129. package/dist/login-DRJugxya.mjs +2 -0
  130. package/dist/{logpush-qhlxsioM.mjs → logpush-C5Gw7F_9.mjs} +16 -16
  131. package/dist/{logs-bI54CJ0w.mjs → logs-y3REfHbb.mjs} +8 -8
  132. package/dist/magic-network-monitoring-BZBGZB6M.mjs +34 -0
  133. package/dist/{magic-transit-BwDyySHJ.mjs → magic-transit-BPV_POf5.mjs} +129 -129
  134. package/dist/{managed-defense-CsBBkfeQ.mjs → managed-defense-BaUBSUcz.mjs} +3 -3
  135. package/dist/{managed-transforms-CUC-uAbW.mjs → managed-transforms-CjkjLzMC.mjs} +2 -2
  136. package/dist/{mcp-CyI0sDmL.mjs → mcp-RPtrISTy.mjs} +6 -6
  137. package/dist/{mesh-Czr0UCP4.mjs → mesh-DZ4QHBPE.mjs} +5 -5
  138. package/dist/{migrate-DKDWYrz2.mjs → migrate-CRIUqGi2.mjs} +1 -1
  139. package/dist/{monetization-NUgfDtSy.mjs → monetization-CVZqM8Xo.mjs} +4 -4
  140. package/dist/{network-B42zrBic.mjs → network-DLt2JUo1.mjs} +15 -15
  141. package/dist/{network-interconnects-DuIBe8fK.mjs → network-interconnects-9nS5jL__.mjs} +10 -10
  142. package/dist/{o11y-oEUpMC3O.mjs → o11y-ySxrnP1Z.mjs} +45 -43
  143. package/dist/{oauth-BmSFLp_s.mjs → oauth-CFVUl-Wv.mjs} +1 -1
  144. package/dist/{oauth-BLQ1-y3R.mjs → oauth-Cidoyxfp.mjs} +1 -1
  145. package/dist/{observability-BxhJQCgZ.mjs → observability-C-KNh__y.mjs} +1 -1
  146. package/dist/ohttp-gateway-B5nCl4s3.mjs +8 -0
  147. package/dist/organizations-DbeeWUL4.mjs +71 -0
  148. package/dist/output-BZQEl3mK.mjs +2 -0
  149. package/dist/package-B7RgwuFR.mjs +2 -0
  150. package/dist/{page-rules-J6LhwR-s.mjs → page-rules-DRw763O1.mjs} +4 -4
  151. package/dist/{pages-BksdnChs.mjs → pages-DfQnxiTk.mjs} +12 -12
  152. package/dist/{pay-per-crawl-BLcbHRoR.mjs → pay-per-crawl-EHYtSKxX.mjs} +13 -13
  153. package/dist/{pay-per-use-VatiU-Nt.mjs → pay-per-use-wdEhl8k4.mjs} +11 -11
  154. package/dist/{pipelines-B5AoB3f3.mjs → pipelines-DbyrI6F4.mjs} +11 -11
  155. package/dist/{precursor-D3VH2MXT.mjs → precursor-Dx8lN4UJ.mjs} +2 -2
  156. package/dist/previews-DEVNSip2.mjs +6 -0
  157. package/dist/{progress-DLri-rA7.mjs → progress-yvPscjYg.mjs} +1 -1
  158. package/dist/{prompt-D0dXwuME.mjs → prompt-CEpZ-lQZ.mjs} +1 -1
  159. package/dist/{queues-BsAck4To.mjs → queues-DgMc7Z6A.mjs} +18 -18
  160. package/dist/{r2-BYjdHDEZ.mjs → r2-BpTVicIq.mjs} +21 -21
  161. package/dist/{radar-CvLtu-Vr.mjs → radar-DW-S1VUh.mjs} +11 -11
  162. package/dist/{raw-fetch-DQeDx1wT.mjs → raw-fetch-Cl5spWC3.mjs} +1 -1
  163. package/dist/{ready-gsGEaWLL.mjs → ready-d0li0X6r.mjs} +1 -1
  164. package/dist/{realtime-DiCEgFTC.mjs → realtime-DMKHLYF4.mjs} +41 -41
  165. package/dist/{registrar-D4wdgWpo.mjs → registrar-D23gfKBi.mjs} +5 -5
  166. package/dist/{registrar-sandbox-B6yopzdG.mjs → registrar-sandbox-lVLB1-mC.mjs} +4 -4
  167. package/dist/{reporting-BiHgnT8L.mjs → reporting-WX8P3Y0k.mjs} +2 -2
  168. package/dist/{request-headers-CoxHUNcB.mjs → request-headers-C0FpeBhz.mjs} +1 -1
  169. package/dist/{request-tracers-817HTytF.mjs → request-tracers-qd7XOAka.mjs} +2 -2
  170. package/dist/resource-sharing-B2ZSt_cA.mjs +36 -0
  171. package/dist/{rules-CRhe_ca9.mjs → rules-CB0QQTB3.mjs} +5 -5
  172. package/dist/{rulesets-CKyc-Xlx.mjs → rulesets-DmqwixUC.mjs} +6 -6
  173. package/dist/{rum-BfnWHW_d.mjs → rum-BZ_24qZU.mjs} +9 -9
  174. package/dist/{run-Ciw_GIrC.mjs → run-BOKI1uWa.mjs} +1 -1
  175. package/dist/run-DBqOjD1P.mjs +2 -0
  176. package/dist/{schema-DuLIZRhA.mjs → schema-Dj9STsWI.mjs} +1 -1
  177. package/dist/{schema-cache-BIo0Gi2H.mjs → schema-cache-5NkOj7Y3.mjs} +1 -1
  178. package/dist/{schema-flags-DrqvwQNw.mjs → schema-flags-CXm9iIv6.mjs} +1 -1
  179. package/dist/{scim-C4iRWNYB.mjs → scim-DchxaJfE.mjs} +8 -8
  180. package/dist/{secrets-store-DgtzZRze.mjs → secrets-store-oAft1cFE.mjs} +5 -5
  181. package/dist/{security-insights-SlUGW3F_.mjs → security-insights-DMm0qg_m.mjs} +15 -15
  182. package/dist/{security-txt-C3YS0REz.mjs → security-txt-CIt0494b.mjs} +2 -2
  183. package/dist/{session-D2yuwO4i.mjs → session-vzNfUhPl.mjs} +1 -1
  184. package/dist/{shared--uVkAAd7.mjs → shared-MK-_lkbn.mjs} +1 -1
  185. package/dist/{signed-url-ClLk45_J.mjs → signed-url-gNangfwc.mjs} +1 -1
  186. package/dist/{smart-shield-Dn95hqUH.mjs → smart-shield-Boy_qbqd.mjs} +6 -6
  187. package/dist/{snippets-BNUKOajz.mjs → snippets-DdoDYXW-.mjs} +3 -3
  188. package/dist/{spawn-DuT4snxu.mjs → spawn-B5F4OIHG.mjs} +1 -1
  189. package/dist/{spectrum-Cj0BMtg2.mjs → spectrum-DLYIHelC.mjs} +3 -3
  190. package/dist/{speed-BrVeZRyX.mjs → speed-DugG9Tm9.mjs} +2 -2
  191. package/dist/{sql-BX1pBqj3.mjs → sql-Bb56llsb.mjs} +2 -2
  192. package/dist/src-BoSDeQ9m.mjs +133 -0
  193. package/dist/{ssl-Bx4LCutF.mjs → ssl-Bg4X3WGk.mjs} +24 -24
  194. package/dist/startup-profile-DQVkZZpb.mjs +2 -0
  195. package/dist/{startup-profile-DqaYNT0b.mjs → startup-profile-DZL2DC44.mjs} +1 -1
  196. package/dist/state-DW3QZtfh.mjs +2 -0
  197. package/dist/{state-BmzOLELo.mjs → state-mr5ux1Nb.mjs} +1 -1
  198. package/dist/{stream-BRzr6yh0.mjs → stream-BuZYDbNR.mjs} +21 -21
  199. package/dist/{tags-xVzjZxdt.mjs → tags-SKz2odE_.mjs} +3 -3
  200. package/dist/{telemetry-CJ9URio3.mjs → telemetry-B4zmCpT0.mjs} +1 -1
  201. package/dist/telemetry-DkDUr4KK.mjs +2 -0
  202. package/dist/{tenant-custom-nameservers-M7Fxqh2W.mjs → tenant-custom-nameservers-BhkhBerL.mjs} +2 -2
  203. package/dist/tenants-DD-GMq0K.mjs +13 -0
  204. package/dist/{tools-C-vmgYSv.mjs → tools-KW_4hvzY.mjs} +1 -1
  205. package/dist/{tunnels-DQVXKUKA.mjs → tunnels-D90ztENM.mjs} +6 -6
  206. package/dist/{turnstile-B_Ugzgom.mjs → turnstile-DhSU_Xar.mjs} +4 -4
  207. package/dist/ui-xjCox-gU.mjs +2 -0
  208. package/dist/{update-check-DHUo4FOJ.mjs → update-check-CRttabfu.mjs} +1 -1
  209. package/dist/{update-check-DRr0eRhB.mjs → update-check-HltjTMDE.mjs} +1 -1
  210. package/dist/update-check-worker.mjs +1 -1
  211. package/dist/{url-normalization-CZRQH_pJ.mjs → url-normalization-K7gkmPvG.mjs} +2 -2
  212. package/dist/{url-scanner-BH4PLy16.mjs → url-scanner-BRdWwka4.mjs} +3 -3
  213. package/dist/{user-Bn82Qw0Y.mjs → user-Cmb1_Wu5.mjs} +50 -50
  214. package/dist/{vectorize-DoVVz_sh.mjs → vectorize-BTBerJME.mjs} +11 -11
  215. package/dist/verify-B9ILCohg.mjs +2 -0
  216. package/dist/verify-BCuWaO-L.mjs +2 -0
  217. package/dist/version-6Bpy6Bgt.mjs +2 -0
  218. package/dist/{waiting-rooms-QUW131o3.mjs → waiting-rooms-LymmKIGr.mjs} +13 -13
  219. package/dist/{web-assets-CgQXsp8m.mjs → web-assets-LHPQsrnY.mjs} +21 -21
  220. package/dist/{web3-TY9s6Swn.mjs → web3-BsOio0Ae.mjs} +12 -12
  221. package/dist/workers-BnLiOjZf.mjs +39 -0
  222. package/dist/{workers-builds-BgGY0IGk.mjs → workers-builds-sKpITeRk.mjs} +4 -4
  223. package/dist/{workers-for-platforms-5RkV9MVp.mjs → workers-for-platforms-BGp6yr6P.mjs} +9 -9
  224. package/dist/{workers-vpc-Bt4OQbwM.mjs → workers-vpc-D8lefWDo.mjs} +3 -3
  225. package/dist/{workflows-6m85DdqF.mjs → workflows-B-ZIG3y7.mjs} +22 -22
  226. package/dist/{wrangler-migration-BbmGOu8l.mjs → wrangler-migration-6E6wT_LZ.mjs} +66 -57
  227. package/dist/{zaraz-8WSJ7l0L.mjs → zaraz-BBKki5WS.mjs} +11 -11
  228. package/dist/{zero-trust-DK0cqDZv.mjs → zero-trust-BZDXM5r6.mjs} +165 -165
  229. package/dist/{zones-DTAcguf6.mjs → zones-B-UV_DGE.mjs} +24 -24
  230. package/package.json +14 -14
  231. package/dist/ai-audit-BmzOgt6x.mjs +0 -6
  232. package/dist/analytics-engine-BHpcNSdD.mjs +0 -4
  233. package/dist/api-X3wKppsT.mjs +0 -3
  234. package/dist/argo-D1VONzu-.mjs +0 -14
  235. package/dist/auth-CspwoBlp.mjs +0 -2
  236. package/dist/auth-FK2eLQ02.mjs +0 -2
  237. package/dist/billing-DRNww0iC.mjs +0 -24
  238. package/dist/body-parser-BKcZS9iJ.mjs +0 -2
  239. package/dist/brand-protection-BVICLzBc.mjs +0 -26
  240. package/dist/browser-run-CEk-NIgP.mjs +0 -40
  241. package/dist/build-CRm2TQq8.mjs +0 -2
  242. package/dist/build-DO_GNhRl.mjs +0 -2
  243. package/dist/cache-jlLJLSu7.mjs +0 -36
  244. package/dist/containers-DINLx5_i.mjs +0 -380
  245. package/dist/create-BtmuVqVL.mjs +0 -2
  246. package/dist/error-sanitization-B025CygB.mjs +0 -2
  247. package/dist/get-Be821dio.mjs +0 -2
  248. package/dist/k2-wsanPL3y.mjs +0 -10
  249. package/dist/kv-BLSPcEnH.mjs +0 -12
  250. package/dist/local-CFsO9Tkg.mjs +0 -2
  251. package/dist/login-BfuOf-Yi.mjs +0 -2
  252. package/dist/magic-network-monitoring-CX3TaMTu.mjs +0 -34
  253. package/dist/organization-CEnlXwrl.mjs +0 -70
  254. package/dist/organizations-Dt86ToxE.mjs +0 -4
  255. package/dist/origin-post-quantum-encryption-lX-uaJSL.mjs +0 -6
  256. package/dist/output-BJEgbI0G.mjs +0 -2
  257. package/dist/package-CiRJBRHO.mjs +0 -2
  258. package/dist/previews-DzJ85fsr.mjs +0 -6
  259. package/dist/resource-sharing-CW9xxtq5.mjs +0 -36
  260. package/dist/run-DD45EQTm.mjs +0 -2
  261. package/dist/src-DPnUfK4c.mjs +0 -131
  262. package/dist/startup-profile-tZNb2HGz.mjs +0 -2
  263. package/dist/state-Uwfrmw5I.mjs +0 -2
  264. package/dist/telemetry-Pt5GpCKD.mjs +0 -2
  265. package/dist/ui-FYultowZ.mjs +0 -2
  266. package/dist/version-Zr2oF8mY.mjs +0 -2
  267. package/dist/workers-B3uJqJKc.mjs +0 -39
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{i as e,r as t}from"./dotenv-DKRemNCH.mjs";import{J as n,K as r,rt as i}from"./dist-D5qkmHhC.mjs";import{t as a}from"./log-BWdaOGOW.mjs";import{_ as o,d as s,f as c,t as l}from"./deploy-context-DTTgNGro.mjs";import{a as u,l as d,r as f,t as p,u as m}from"./containers-DINLx5_i.mjs";import{a as h,i as g,n as _,o as v,r as y,s as b}from"./build-DO_GNhRl.mjs";import{i as x,n as S,t as C}from"./deploy-input-mAy06fAI.mjs";import{readBuildOutput as w}from"@cloudflare/build-output-utils";function T(e){return e.option(`prebuilt`,{type:`boolean`,description:`Deploy existing Build Output Specification files without building`,default:!1}).option(`tag`,{type:`string`,description:`A tag to associate with this Worker Version`,requiresArg:!0}).option(`message`,{type:`string`,description:`A message to associate with this Worker Version`,requiresArg:!0}).option(`secrets-file`,{type:`string`,description:"Path to a file containing secrets to upload with the version (JSON or .env format). Dotenv values expand $VAR and ${VAR} using process environment values and earlier file values; process environment values override file values, including empty values. Only declared file keys are uploaded. Only use trusted dotenv secrets files: they can read and upload any process environment value. Escape literal dollar signs with \\$ or use JSON.",requiresArg:!0}).option(`dry-run`,{describe:`Build a project and run checks without actually uploading the Worker`,type:`boolean`,default:!1}).option(`worker`,y)}async function E(e,n){if(!e.prebuilt){if(await _(e.mode,{worker:e.worker,dryRun:e[`dry-run`]})===`setup-needed`){a.success(`--dry-run: exiting now.`);return}a.message(``)}return t(e,()=>D(e,n))}async function D(t,_){let{workers:y,rootConfig:T,containers:E}=await w(process.cwd());if(T.buildContext.isPreview){let e=[`cf previews deploy`,...t.prebuilt?[`--prebuilt`]:[],...T.buildContext.mode===void 0?[]:[`--mode`,T.buildContext.mode]].join(` `);throw Error(`This build output is for a Preview. Run ${e} instead.`)}b(t.mode,T.buildContext.mode),v(T.accountId,t[`temporary-account`]===!0);let D=h(y,t.worker),O=g(D,T),k=e(O.wranglerConfig),A=C(D,O.builtConfig),j=n(k),{authToken:M,accountId:N}=await f({accountId:T.accountId,complianceRegion:j,dryRun:t[`dry-run`]}),P=l(M);m(P),o({logger:P.logger,fetchResult:P.fetchResult,fetchPagedListResult:P.fetchPagedListResult}),N!==void 0&&E.length>0&&c(N,M,r(k));let F=p(E,k,{accountId:N,containersRollout:t[`containers-rollout`]}),I;if(_.command===`Deploy`){let e=S(D,k,N,t,F);a.section(`Deploy`),{versionId:I}=await u(e,k,A,{deployCommand:`cf deploy`,versionsDeployCommand:`cf workers deployments create --worker <worker-name> --strategy percentage --versions <versions-json>`,d1ListCommand:`cf d1 list`,d1DeleteCommand:`cf d1 delete <database-id>`,queueCreateCommand:e=>`cf queues create --queue-name ${e}`,secretPutCommand:`cf workers secrets update --worker <worker-name> --type secret_text`,workersDevConfigFieldName:`workersDev`,workersDevConfigAssignment:e=>`workersDev: ${e}`,previewUrlsConfigFieldName:`previewUrls`,previewUrlsConfigAssignment:e=>`previewUrls: ${e}`,configFileName:`cloudflare.config.ts`,observabilityTargetPercentageField:`targetInstancePercentage`,observabilityTargetCountField:`targetInstanceCount`,syncWorkersSite:void 0,analyseBundle:void 0})}else{let e=x(D,k,N,t,F);a.section(`Upload`),{versionId:I}=await d(e,k,A,{deployCommand:`cf deploy`,versionsUploadCommand:`cf workers versions create`,versionsDeployCommand:`cf workers deployments create --worker <worker-name> --strategy percentage --versions <versions-json>`,triggersDeployCommand:`cf workers triggers deploy`,d1ListCommand:`cf d1 list`,d1DeleteCommand:`cf d1 delete <database-id>`,queueCreateCommand:e=>`cf queues create --queue-name ${e}`,versionsSecretPutCommand:`wrangler versions secret put`,analyseBundle:void 0})}I===null||t[`dry-run`]||_.command===`Deploy`&&t[`containers-rollout`]===`none`||await s([..._.command===`Deploy`?F.standard.builtImages:[],...F.durableObjects.builtImages],i()),t[`dry-run`]||a.success(`${_.command} complete`)}export{T as n,E as t};
2
+ import{i as e,r as t}from"./dotenv-DKRemNCH.mjs";import{a as n,l as r,r as i,t as a,u as o}from"./containers-B06OGOEB.mjs";import{J as s,K as c,rt as l}from"./dist-D-ihn_mV.mjs";import{t as u}from"./log-BWdaOGOW.mjs";import{_ as d,d as f,f as p,t as m}from"./deploy-context-YCW3eqP1.mjs";import{a as h,i as g,n as _,o as v,r as y,s as b}from"./build-FFxzigo4.mjs";import{i as x,n as S,t as C}from"./deploy-input-CQLBXFEB.mjs";import{readBuildOutput as w}from"@cloudflare/build-output-utils";function T(e){return e.option(`prebuilt`,{type:`boolean`,description:`Deploy existing Build Output Specification files without building`,default:!1}).option(`tag`,{type:`string`,description:`A tag to associate with this Worker Version`,requiresArg:!0}).option(`message`,{type:`string`,description:`A message to associate with this Worker Version`,requiresArg:!0}).option(`secrets-file`,{type:`string`,description:"Path to a file containing secrets to upload with the version (JSON or .env format). Dotenv values expand $VAR and ${VAR} using process environment values and earlier file values; process environment values override file values, including empty values. Only declared file keys are uploaded. Only use trusted dotenv secrets files: they can read and upload any process environment value. Escape literal dollar signs with \\$ or use JSON.",requiresArg:!0}).option(`dry-run`,{describe:`Build a project and run checks without actually uploading the Worker`,type:`boolean`,default:!1}).option(`worker`,y)}async function E(e,n){if(!e.prebuilt){if(await _(e.mode,{worker:e.worker,dryRun:e[`dry-run`]})===`setup-needed`){u.success(`--dry-run: exiting now.`);return}u.message(``)}return t(e,()=>D(e,n))}async function D(t,_){let{workers:y,rootConfig:T,containers:E}=await w(process.cwd());if(T.buildContext.isPreview){let e=[`cf previews deploy`,...t.prebuilt?[`--prebuilt`]:[],...T.buildContext.mode===void 0?[]:[`--mode`,T.buildContext.mode]].join(` `);throw Error(`This build output is for a Preview. Run ${e} instead.`)}b(t.mode,T.buildContext.mode),v(T.accountId,t[`temporary-account`]===!0);let D=h(y,t.worker),O=g(D,T),k=e(O.wranglerConfig),A=C(D,O.builtConfig),j=s(k),{authToken:M,accountId:N}=await i({accountId:T.accountId,complianceRegion:j,dryRun:t[`dry-run`]}),P=m(M);o(P),d({logger:P.logger,fetchResult:P.fetchResult,fetchPagedListResult:P.fetchPagedListResult}),N!==void 0&&E.length>0&&p(N,M,c(k));let F=a(E,k,{accountId:N,containersRollout:t[`containers-rollout`]}),I;if(_.command===`Deploy`){let e=S(D,k,N,t,F);u.section(`Deploy`),{versionId:I}=await n(e,k,A,{deployCommand:`cf deploy`,versionsDeployCommand:`cf workers deployments create --worker <worker-name> --strategy percentage --versions <versions-json>`,d1ListCommand:`cf d1 list`,d1DeleteCommand:`cf d1 delete <database-id>`,queueCreateCommand:e=>`cf queues create --queue-name ${e}`,secretPutCommand:`cf workers secrets update --worker <worker-name> --type secret_text`,workersDevConfigFieldName:`workersDev`,workersDevConfigAssignment:e=>`workersDev: ${e}`,previewUrlsConfigFieldName:`previewUrls`,previewUrlsConfigAssignment:e=>`previewUrls: ${e}`,configFileName:`cloudflare.config.ts`,observabilityTargetPercentageField:`targetInstancePercentage`,observabilityTargetCountField:`targetInstanceCount`,syncWorkersSite:void 0,analyseBundle:void 0})}else{let e=x(D,k,N,t,F);u.section(`Upload`),{versionId:I}=await r(e,k,A,{deployCommand:`cf deploy`,versionsUploadCommand:`cf workers versions create`,versionsDeployCommand:`cf workers deployments create --worker <worker-name> --strategy percentage --versions <versions-json>`,triggersDeployCommand:`cf workers triggers deploy`,d1ListCommand:`cf d1 list`,d1DeleteCommand:`cf d1 delete <database-id>`,queueCreateCommand:e=>`cf queues create --queue-name ${e}`,versionsSecretPutCommand:`wrangler versions secret put`,analyseBundle:void 0})}I===null||t[`dry-run`]||_.command===`Deploy`&&t[`containers-rollout`]===`none`||await f([..._.command===`Deploy`?F.standard.builtImages:[],...F.durableObjects.builtImages],l()),t[`dry-run`]||u.success(`${_.command} complete`)}export{T as n,E as t};
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import{n as e}from"./auth-FK2eLQ02.mjs";import{t}from"./output-BJEgbI0G.mjs";import{t as n}from"./dry-run-gy0Hl9xo.mjs";import{t as r}from"./progress-DLri-rA7.mjs";import{t as i}from"./run-Ciw_GIrC.mjs";import"./telemetry-Pt5GpCKD.mjs";var a={method:`GET`,path:()=>`/signed-url`,response:!1,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function o(e){return e.usage(`$0 signed-url get
2
+ import{n as e}from"./auth-B-h0BHg7.mjs";import{t}from"./output-BZQEl3mK.mjs";import{t as n}from"./dry-run-kJbjn4kG.mjs";import{t as r}from"./progress-yvPscjYg.mjs";import{t as i}from"./run-BOKI1uWa.mjs";import"./telemetry-DkDUr4KK.mjs";var a={method:`GET`,path:()=>`/signed-url`,response:!1,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function o(e){return e.usage(`$0 signed-url get
3
3
 
4
4
  Internal route for testing signed URLs.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const s={command:`get`,describe:`Internal route for testing signed URLs`,builder:o,handler:async o=>i({command:`signed-url get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){n({command:`cf signed-url get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/signed-url`,pathParams:{},bodyKind:`none`});return}let i=await e(o),s=await r(`Loading`,async()=>i.send(a));t(s,{successLabel:`Loaded`})})},c={command:`signed-url`,describe:`signed-url`,builder:e=>e.command(s).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{c as default};
@@ -1,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{a as s,n as c,r as l,t as u}from"./body-parser-BKcZS9iJ.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{a as f,n as p}from"./prompt-D0dXwuME.mjs";var m={method:`POST`,path:t=>e`/zones/${t.zone_id}/smart_shield/cache_reserve_clear`};function h(e){return e.usage(`$0 smart-shield cache-reserve-clear clear
2
+ import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-B-h0BHg7.mjs";import{i as n}from"./context-BY1Eh_Qe.mjs";import{t as r}from"./output-BZQEl3mK.mjs";import{t as i}from"./dry-run-kJbjn4kG.mjs";import{t as a}from"./progress-yvPscjYg.mjs";import{t as o}from"./run-BOKI1uWa.mjs";import"./telemetry-DkDUr4KK.mjs";import{a as s,n as c,r as l,t as u}from"./body-parser-DoewLePl.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{a as f,n as p}from"./prompt-CEpZ-lQZ.mjs";var m={method:`POST`,path:t=>e`/zones/${t.zone_id}/smart_shield/cache_reserve_clear`};function h(e){return e.usage(`$0 smart-shield cache-reserve-clear clear
3
3
 
4
- You can use Cache Reserve Clear to clear your Cache Reserve, but you must first disable Cache Reserve. In most cases, this will be accomplished within 24 hours. You cannot re-enable Cache Reserve while this process is ongoing. Keep in mind that you cannot undo or cancel this operation.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const g={command:`clear`,describe:`Start Cache Reserve Clear`,builder:h,handler:async e=>o({command:`smart-shield cache-reserve-clear clear`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf smart-shield cache-reserve-clear clear`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/smart_shield/cache_reserve_clear`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=s,!await p({force:!!e.force,message:`This operation permanently clears Cache Reserve for this zone and cannot be undone.`}))return;let c=await a(`Deleting`,async()=>o.send(m,{zone_id:s}));r(c,{successLabel:`Deleted`})})};var _={method:`GET`,path:t=>e`/zones/${t.zone_id}/smart_shield/cache_reserve_clear`};function v(e){return e.usage(`$0 smart-shield cache-reserve-clear status
4
+ You can use Cache Reserve Clear to clear your Cache Reserve, but you must first disable Cache Reserve. In most cases, this will be accomplished within 24 hours. You cannot re-enable Cache Reserve while this process is ongoing. Keep in mind that you cannot undo or cancel this operation.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const g={command:`clear`,describe:`Start Cache Reserve Clear`,builder:h,handler:async e=>o({command:`smart-shield cache-reserve-clear clear`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf smart-shield cache-reserve-clear clear`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/smart_shield/cache_reserve_clear`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=s,!await p({force:!!e.force,message:`This operation permanently clears Cache Reserve for this zone and cannot be undone.`}))return;let c=await a(`Processing`,async()=>o.send(m,{zone_id:s}));r(c,{successLabel:`Done`})})};var _={method:`GET`,path:t=>e`/zones/${t.zone_id}/smart_shield/cache_reserve_clear`};function v(e){return e.usage(`$0 smart-shield cache-reserve-clear status
5
5
 
6
6
  You can use Cache Reserve Clear to clear your Cache Reserve, but you must first disable Cache Reserve. In most cases, this will be accomplished within 24 hours. You cannot re-enable Cache Reserve while this process is ongoing. Keep in mind that you cannot undo or cancel this operation.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const y={command:`status`,describe:`Get Cache Reserve Clear`,builder:v,handler:async e=>o({command:`smart-shield cache-reserve-clear status`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf smart-shield cache-reserve-clear status`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/smart_shield/cache_reserve_clear`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(_,{zone_id:s}));r(c,{successLabel:`Loaded`})})},b={command:`cache-reserve-clear`,describe:`Cache Reserve Clear operations`,builder:e=>e.command(g).command(y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var x={method:`GET`,path:t=>e`/zones/${t.zone_id}/smart_shield`,errors:{500:`InternalServerError`,502:`BadGatewayError`}};function S(e){return e.usage(`$0 smart-shield get
7
7
 
8
8
  Retrieve Smart Shield Settings.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const C={command:`get`,describe:`Get Smart Shield Settings`,builder:S,handler:async e=>o({command:`smart-shield get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf smart-shield get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/smart_shield`,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(x,{zone_id:s}));r(c,{successLabel:`Loaded`})})};var w={method:`POST`,path:t=>e`/zones/${t.zone_id}/smart_shield/healthchecks`,body:`json`};function T(e){return e.usage(`$0 smart-shield health-checks create
9
9
 
10
- Create a new health check.`).option(`address`,{type:`string`,description:`The hostname or IP address of the origin server to run health checks on.`}).option(`check-regions`,{type:`string`,array:!0,description:`A list of regions from which to run health checks. Null means Cloudflare will pick a default region.`}).option(`consecutive-fails`,{type:`number`,description:`The number of consecutive fails required from a health check before changing the health to unhealthy.`,default:1}).option(`consecutive-successes`,{type:`number`,description:`The number of consecutive successes required from a health check before changing the health to healthy.`,default:1}).option(`description`,{type:`string`,description:`A human-readable description of the health check.`}).option(`http-config-allow-insecure`,{type:`boolean`,description:`Do not validate the certificate when the health check uses HTTPS.`}).option(`http-config-expected-body`,{type:`string`,description:`A case-insensitive sub-string to look for in the response body. If this string is not found, the origin will be marked as unhealthy.`}).option(`http-config-expected-codes`,{type:`string`,array:!0,description:`The expected HTTP response codes (e.g. "200") or code ranges (e.g. "2xx" for all codes starting with 2) of the health check.`}).option(`http-config-follow-redirects`,{type:`boolean`,description:`Follow redirects if the origin returns a 3xx status code.`}).option(`http-config-header`,{type:`string`,description:`The HTTP request headers to send in the health check. It is recommended you set a Host header by default. The User-Agent header cannot be overridden. Provide as a JSON object or @path/to/file.json.`}).option(`http-config-method`,{type:`string`,description:`The HTTP method to use for the health check.`,choices:[`GET`,`HEAD`]}).coerce(`http-config-method`,e=>d(e,`http-config-method`,`text`)).option(`http-config-path`,{type:`string`,description:`The endpoint path to health check against.`}).option(`http-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80 if type is HTTP or 443 if type is HTTPS.`}).option(`interval`,{type:`number`,description:`The interval between each health check. Shorter intervals may give quicker notifications if the origin status changes, but will increase load on the origin as we check from multiple locations.`,default:60}).option(`name`,{type:`string`,description:`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`}).option(`retries`,{type:`number`,description:`The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.`,default:2}).option(`suspended`,{type:`boolean`,description:`If suspended, no health checks are sent to the origin.`,default:!1}).option(`tcp-config-method`,{type:`string`,description:`The TCP connection method to use for the health check.`,choices:[`connection_established`]}).coerce(`tcp-config-method`,e=>d(e,`tcp-config-method`,`text`)).option(`tcp-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80.`}).option(`timeout`,{type:`number`,description:`The timeout (in seconds) before marking the health check as failed.`,default:5}).option(`type`,{type:`string`,description:`The protocol to use for the health check. Currently supported protocols are 'HTTP', 'HTTPS' and 'TCP'.`,default:`HTTP`}).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 E={command:`create`,describe:`Create Health Check`,builder:T,handler:async e=>o({command:`smart-shield health-checks create`,classification:{safeFlags:[`http-config-allow-insecure`,`http-config-follow-redirects`,`http-config-method`,`suspended`,`tcp-config-method`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf smart-shield health-checks create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/smart_shield/healthchecks`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?u({address:d(e.address,`address`,`text`),check_regions:e[`check-regions`],consecutive_fails:e[`consecutive-fails`],consecutive_successes:e[`consecutive-successes`],description:d(e.description,`description`,`text`),http_config:{allow_insecure:e[`http-config-allow-insecure`],expected_body:d(e[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:e[`http-config-expected-codes`],follow_redirects:e[`http-config-follow-redirects`],header:l(e[`http-config-header`],`http-config-header`),method:e[`http-config-method`],path:d(e[`http-config-path`],`http-config-path`,`text`),port:e[`http-config-port`]},interval:e.interval,name:d(e.name,`name`,`text`),retries:e.retries,suspended:e.suspended,tcp_config:{method:e[`tcp-config-method`],port:e[`tcp-config-port`]},timeout:e.timeout,type:d(e.type,`type`,`text`)},[[`http_config`,`header`]]):c(e.body)});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=s,e.body){let t=c(e.body),n=await a(`Creating`,async()=>o.send(w,{body:t,zone_id:s}));r(n,{successLabel:`Created`});return}e.address===void 0&&(e.address=await f(`address`,`The hostname or IP address of the origin server to run health checks on.`)),e.name===void 0&&(e.name=await f(`name`,`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`));let p=u({address:d(e.address,`address`,`text`),check_regions:e[`check-regions`],consecutive_fails:e[`consecutive-fails`],consecutive_successes:e[`consecutive-successes`],description:d(e.description,`description`,`text`),http_config:{allow_insecure:e[`http-config-allow-insecure`],expected_body:d(e[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:e[`http-config-expected-codes`],follow_redirects:e[`http-config-follow-redirects`],header:l(e[`http-config-header`],`http-config-header`),method:e[`http-config-method`],path:d(e[`http-config-path`],`http-config-path`,`text`),port:e[`http-config-port`]},interval:e.interval,name:d(e.name,`name`,`text`),retries:e.retries,suspended:e.suspended,tcp_config:{method:e[`tcp-config-method`],port:e[`tcp-config-port`]},timeout:e.timeout,type:d(e.type,`type`,`text`)},[[`http_config`,`header`]]),m=await a(`Creating`,async()=>o.send(w,{body:p,zone_id:s}));r(m,{successLabel:`Created`})})};var D={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/smart_shield/healthchecks/${t.healthcheck_id}`};function O(e){return e.usage(`$0 smart-shield health-checks delete <healthcheck-id>
10
+ Create a new health check.`).option(`address`,{type:`string`,description:`The hostname or IP address of the origin server to run health checks on.`}).option(`check-regions`,{type:`string`,array:!0,description:`A list of regions from which to run health checks. Null means Cloudflare will pick a default region.`}).option(`consecutive-fails`,{type:`number`,description:`The number of consecutive fails required from a health check before changing the health to unhealthy.`,default:1}).option(`consecutive-successes`,{type:`number`,description:`The number of consecutive successes required from a health check before changing the health to healthy.`,default:1}).option(`description`,{type:`string`,description:`A human-readable description of the health check.`}).option(`http-config-allow-insecure`,{type:`boolean`,description:`Do not validate the certificate when the health check uses HTTPS.`}).option(`http-config-expected-body`,{type:`string`,description:`A case-insensitive sub-string to look for in the response body. If this string is not found, the origin will be marked as unhealthy.`}).option(`http-config-expected-codes`,{type:`string`,array:!0,description:`The expected HTTP response codes (e.g. "200") or code ranges (e.g. "2xx" for all codes starting with 2) of the health check.`}).option(`http-config-follow-redirects`,{type:`boolean`,description:`Follow redirects if the origin returns a 3xx status code.`}).option(`http-config-header`,{type:`string`,description:`The HTTP request headers to send in the health check. It is recommended you set a Host header by default. The User-Agent header cannot be overridden. Provide as a JSON object or @path/to/file.json.`}).option(`http-config-method`,{type:`string`,description:`The HTTP method to use for the health check.`,choices:[`GET`,`HEAD`]}).coerce(`http-config-method`,e=>d(e,`http-config-method`,`text`)).option(`http-config-path`,{type:`string`,description:`The endpoint path to health check against.`}).option(`http-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80 if type is HTTP or 443 if type is HTTPS.`}).option(`interval`,{type:`number`,description:`The interval between each health check. Shorter intervals may give quicker notifications if the origin status changes, but will increase load on the origin as we check from multiple locations.`,default:60}).option(`name`,{type:`string`,description:`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`}).option(`retries`,{type:`number`,description:`The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.`,default:2}).option(`suspended`,{type:`boolean`,description:`If suspended, no health checks are sent to the origin.`,default:!1}).option(`tcp-config-method`,{type:`string`,description:`The TCP connection method to use for the health check.`,choices:[`connection_established`]}).coerce(`tcp-config-method`,e=>d(e,`tcp-config-method`,`text`)).option(`tcp-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80.`}).option(`timeout`,{type:`number`,description:`The timeout (in seconds) before marking the health check as failed.`,default:5}).option(`type`,{type:`string`,description:`The protocol to use for the health check. Currently supported protocols are 'HTTP', 'HTTPS' and 'TCP'.`,default:`HTTP`}).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 E={command:`create`,describe:`Create Health Check`,builder:T,handler:async e=>o({command:`smart-shield health-checks create`,classification:{safeFlags:[`http-config-allow-insecure`,`http-config-follow-redirects`,`http-config-method`,`suspended`,`tcp-config-method`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf smart-shield health-checks create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/smart_shield/healthchecks`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?u({address:d(e.address,`address`,`text`),check_regions:e[`check-regions`],consecutive_fails:e[`consecutive-fails`],consecutive_successes:e[`consecutive-successes`],description:d(e.description,`description`,`text`),http_config:{allow_insecure:e[`http-config-allow-insecure`],expected_body:d(e[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:e[`http-config-expected-codes`],follow_redirects:e[`http-config-follow-redirects`],header:l(e[`http-config-header`],`http-config-header`),method:e[`http-config-method`],path:d(e[`http-config-path`],`http-config-path`,`text`),port:e[`http-config-port`]},interval:e.interval,name:d(e.name,`name`,`text`),retries:e.retries,suspended:e.suspended,tcp_config:{method:e[`tcp-config-method`],port:e[`tcp-config-port`]},timeout:e.timeout,type:d(e.type,`type`,`text`)},[[`http_config`,`header`]]):c(e.body)});return}let o=e.body===void 0?void 0:c(e.body),s=await t(e),p=await n({zone:e.zone},s,{quiet:e.quiet});if(e.zoneId=p,e.body!==void 0){let e=o,t=await a(`Creating`,async()=>s.send(w,{body:e,zone_id:p}));r(t,{successLabel:`Created`});return}e.address===void 0&&(e.address=await f(`address`,`The hostname or IP address of the origin server to run health checks on.`)),e.name===void 0&&(e.name=await f(`name`,`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`));let m=u({address:d(e.address,`address`,`text`),check_regions:e[`check-regions`],consecutive_fails:e[`consecutive-fails`],consecutive_successes:e[`consecutive-successes`],description:d(e.description,`description`,`text`),http_config:{allow_insecure:e[`http-config-allow-insecure`],expected_body:d(e[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:e[`http-config-expected-codes`],follow_redirects:e[`http-config-follow-redirects`],header:l(e[`http-config-header`],`http-config-header`),method:e[`http-config-method`],path:d(e[`http-config-path`],`http-config-path`,`text`),port:e[`http-config-port`]},interval:e.interval,name:d(e.name,`name`,`text`),retries:e.retries,suspended:e.suspended,tcp_config:{method:e[`tcp-config-method`],port:e[`tcp-config-port`]},timeout:e.timeout,type:d(e.type,`type`,`text`)},[[`http_config`,`header`]]),h=await a(`Creating`,async()=>s.send(w,{body:m,zone_id:p}));r(h,{successLabel:`Created`})})};var D={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/smart_shield/healthchecks/${t.healthcheck_id}`};function O(e){return e.usage(`$0 smart-shield health-checks delete <healthcheck-id>
11
11
 
12
12
  Delete a health check.`).positional(`healthcheck-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const k={command:`delete <healthcheck-id>`,describe:`Delete Health Check`,builder:O,handler:async e=>o({command:`smart-shield health-checks delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf smart-shield health-checks delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/smart_shield/healthchecks/${e[`healthcheck-id`]==null?`<healthcheck-id>`:encodeURIComponent(String(e[`healthcheck-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"healthcheck-id":String(e[`healthcheck-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=s,!await p({force:!!e.force}))return;let c=await a(`Deleting`,async()=>o.send(D,{zone_id:s,healthcheck_id:e[`healthcheck-id`]}));r(c,{successLabel:`Deleted`})})};var A={method:`PATCH`,path:t=>e`/zones/${t.zone_id}/smart_shield/healthchecks/${t.healthcheck_id}`,body:`json`};function j(e){return e.usage(`$0 smart-shield health-checks edit <healthcheck-id>
13
13
 
14
- Patch a configured health check.`).positional(`healthcheck-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`address`,{type:`string`,description:`The hostname or IP address of the origin server to run health checks on.`}).option(`check-regions`,{type:`string`,array:!0,description:`A list of regions from which to run health checks. Null means Cloudflare will pick a default region.`}).option(`consecutive-fails`,{type:`number`,description:`The number of consecutive fails required from a health check before changing the health to unhealthy.`}).option(`consecutive-successes`,{type:`number`,description:`The number of consecutive successes required from a health check before changing the health to healthy.`}).option(`description`,{type:`string`,description:`A human-readable description of the health check.`}).option(`http-config-allow-insecure`,{type:`boolean`,description:`Do not validate the certificate when the health check uses HTTPS.`}).option(`http-config-expected-body`,{type:`string`,description:`A case-insensitive sub-string to look for in the response body. If this string is not found, the origin will be marked as unhealthy.`}).option(`http-config-expected-codes`,{type:`string`,array:!0,description:`The expected HTTP response codes (e.g. "200") or code ranges (e.g. "2xx" for all codes starting with 2) of the health check.`}).option(`http-config-follow-redirects`,{type:`boolean`,description:`Follow redirects if the origin returns a 3xx status code.`}).option(`http-config-header`,{type:`string`,description:`The HTTP request headers to send in the health check. It is recommended you set a Host header by default. The User-Agent header cannot be overridden. Provide as a JSON object or @path/to/file.json.`}).option(`http-config-method`,{type:`string`,description:`The HTTP method to use for the health check.`,choices:[`GET`,`HEAD`]}).coerce(`http-config-method`,e=>d(e,`http-config-method`,`text`)).option(`http-config-path`,{type:`string`,description:`The endpoint path to health check against.`}).option(`http-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80 if type is HTTP or 443 if type is HTTPS.`}).option(`interval`,{type:`number`,description:`The interval between each health check. Shorter intervals may give quicker notifications if the origin status changes, but will increase load on the origin as we check from multiple locations.`}).option(`name`,{type:`string`,description:`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`}).option(`retries`,{type:`number`,description:`The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.`}).option(`suspended`,{type:`boolean`,description:`If suspended, no health checks are sent to the origin.`}).option(`tcp-config-method`,{type:`string`,description:`The TCP connection method to use for the health check.`,choices:[`connection_established`]}).coerce(`tcp-config-method`,e=>d(e,`tcp-config-method`,`text`)).option(`tcp-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80.`}).option(`timeout`,{type:`number`,description:`The timeout (in seconds) before marking the health check as failed.`}).option(`type`,{type:`string`,description:`The protocol to use for the health check. Currently supported protocols are 'HTTP', 'HTTPS' and 'TCP'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const M={command:`edit <healthcheck-id>`,describe:`Patch Health Check`,builder:j,handler:async e=>o({command:`smart-shield health-checks edit`,classification:{safeFlags:[`http-config-allow-insecure`,`http-config-follow-redirects`,`http-config-method`,`suspended`,`tcp-config-method`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf smart-shield health-checks edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/smart_shield/healthchecks/${e[`healthcheck-id`]==null?`<healthcheck-id>`:encodeURIComponent(String(e[`healthcheck-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"healthcheck-id":String(e[`healthcheck-id`]??``)},bodyKind:`json`,body:e.body===void 0?u({address:d(e.address,`address`,`text`),check_regions:e[`check-regions`],consecutive_fails:e[`consecutive-fails`],consecutive_successes:e[`consecutive-successes`],description:d(e.description,`description`,`text`),http_config:{allow_insecure:e[`http-config-allow-insecure`],expected_body:d(e[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:e[`http-config-expected-codes`],follow_redirects:e[`http-config-follow-redirects`],header:l(e[`http-config-header`],`http-config-header`),method:e[`http-config-method`],path:d(e[`http-config-path`],`http-config-path`,`text`),port:e[`http-config-port`]},interval:e.interval,name:d(e.name,`name`,`text`),retries:e.retries,suspended:e.suspended,tcp_config:{method:e[`tcp-config-method`],port:e[`tcp-config-port`]},timeout:e.timeout,type:d(e.type,`type`,`text`)},[[`http_config`,`header`]]):c(e.body)});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=s,e.body){let t=c(e.body),n=await a(`Updating`,async()=>o.send(A,{body:t,zone_id:s,healthcheck_id:e[`healthcheck-id`]}));r(n,{successLabel:`Updated`});return}e.address===void 0&&(e.address=await f(`address`,`The hostname or IP address of the origin server to run health checks on.`)),e.name===void 0&&(e.name=await f(`name`,`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`));let p=u({address:d(e.address,`address`,`text`),check_regions:e[`check-regions`],consecutive_fails:e[`consecutive-fails`],consecutive_successes:e[`consecutive-successes`],description:d(e.description,`description`,`text`),http_config:{allow_insecure:e[`http-config-allow-insecure`],expected_body:d(e[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:e[`http-config-expected-codes`],follow_redirects:e[`http-config-follow-redirects`],header:l(e[`http-config-header`],`http-config-header`),method:e[`http-config-method`],path:d(e[`http-config-path`],`http-config-path`,`text`),port:e[`http-config-port`]},interval:e.interval,name:d(e.name,`name`,`text`),retries:e.retries,suspended:e.suspended,tcp_config:{method:e[`tcp-config-method`],port:e[`tcp-config-port`]},timeout:e.timeout,type:d(e.type,`type`,`text`)},[[`http_config`,`header`]]),m=await a(`Updating`,async()=>o.send(A,{body:p,zone_id:s,healthcheck_id:e[`healthcheck-id`]}));r(m,{successLabel:`Updated`})})};var N={method:`GET`,path:t=>e`/zones/${t.zone_id}/smart_shield/healthchecks/${t.healthcheck_id}`};function P(e){return e.usage(`$0 smart-shield health-checks get <healthcheck-id>
14
+ Patch a configured health check.`).positional(`healthcheck-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`address`,{type:`string`,description:`The hostname or IP address of the origin server to run health checks on.`}).option(`check-regions`,{type:`string`,array:!0,description:`A list of regions from which to run health checks. Null means Cloudflare will pick a default region.`}).option(`consecutive-fails`,{type:`number`,description:`The number of consecutive fails required from a health check before changing the health to unhealthy.`}).option(`consecutive-successes`,{type:`number`,description:`The number of consecutive successes required from a health check before changing the health to healthy.`}).option(`description`,{type:`string`,description:`A human-readable description of the health check.`}).option(`http-config-allow-insecure`,{type:`boolean`,description:`Do not validate the certificate when the health check uses HTTPS.`}).option(`http-config-expected-body`,{type:`string`,description:`A case-insensitive sub-string to look for in the response body. If this string is not found, the origin will be marked as unhealthy.`}).option(`http-config-expected-codes`,{type:`string`,array:!0,description:`The expected HTTP response codes (e.g. "200") or code ranges (e.g. "2xx" for all codes starting with 2) of the health check.`}).option(`http-config-follow-redirects`,{type:`boolean`,description:`Follow redirects if the origin returns a 3xx status code.`}).option(`http-config-header`,{type:`string`,description:`The HTTP request headers to send in the health check. It is recommended you set a Host header by default. The User-Agent header cannot be overridden. Provide as a JSON object or @path/to/file.json.`}).option(`http-config-method`,{type:`string`,description:`The HTTP method to use for the health check.`,choices:[`GET`,`HEAD`]}).coerce(`http-config-method`,e=>d(e,`http-config-method`,`text`)).option(`http-config-path`,{type:`string`,description:`The endpoint path to health check against.`}).option(`http-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80 if type is HTTP or 443 if type is HTTPS.`}).option(`interval`,{type:`number`,description:`The interval between each health check. Shorter intervals may give quicker notifications if the origin status changes, but will increase load on the origin as we check from multiple locations.`}).option(`name`,{type:`string`,description:`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`}).option(`retries`,{type:`number`,description:`The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.`}).option(`suspended`,{type:`boolean`,description:`If suspended, no health checks are sent to the origin.`}).option(`tcp-config-method`,{type:`string`,description:`The TCP connection method to use for the health check.`,choices:[`connection_established`]}).coerce(`tcp-config-method`,e=>d(e,`tcp-config-method`,`text`)).option(`tcp-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80.`}).option(`timeout`,{type:`number`,description:`The timeout (in seconds) before marking the health check as failed.`}).option(`type`,{type:`string`,description:`The protocol to use for the health check. Currently supported protocols are 'HTTP', 'HTTPS' and 'TCP'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const M={command:`edit <healthcheck-id>`,describe:`Patch Health Check`,builder:j,handler:async e=>o({command:`smart-shield health-checks edit`,classification:{safeFlags:[`http-config-allow-insecure`,`http-config-follow-redirects`,`http-config-method`,`suspended`,`tcp-config-method`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf smart-shield health-checks edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/smart_shield/healthchecks/${e[`healthcheck-id`]==null?`<healthcheck-id>`:encodeURIComponent(String(e[`healthcheck-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"healthcheck-id":String(e[`healthcheck-id`]??``)},bodyKind:`json`,body:e.body===void 0?u({address:d(e.address,`address`,`text`),check_regions:e[`check-regions`],consecutive_fails:e[`consecutive-fails`],consecutive_successes:e[`consecutive-successes`],description:d(e.description,`description`,`text`),http_config:{allow_insecure:e[`http-config-allow-insecure`],expected_body:d(e[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:e[`http-config-expected-codes`],follow_redirects:e[`http-config-follow-redirects`],header:l(e[`http-config-header`],`http-config-header`),method:e[`http-config-method`],path:d(e[`http-config-path`],`http-config-path`,`text`),port:e[`http-config-port`]},interval:e.interval,name:d(e.name,`name`,`text`),retries:e.retries,suspended:e.suspended,tcp_config:{method:e[`tcp-config-method`],port:e[`tcp-config-port`]},timeout:e.timeout,type:d(e.type,`type`,`text`)},[[`http_config`,`header`]]):c(e.body)});return}let o=e.body===void 0?void 0:c(e.body),s=await t(e),p=await n({zone:e.zone},s,{quiet:e.quiet});if(e.zoneId=p,e.body!==void 0){let t=o,n=await a(`Updating`,async()=>s.send(A,{body:t,zone_id:p,healthcheck_id:e[`healthcheck-id`]}));r(n,{successLabel:`Updated`});return}e.address===void 0&&(e.address=await f(`address`,`The hostname or IP address of the origin server to run health checks on.`)),e.name===void 0&&(e.name=await f(`name`,`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`));let m=u({address:d(e.address,`address`,`text`),check_regions:e[`check-regions`],consecutive_fails:e[`consecutive-fails`],consecutive_successes:e[`consecutive-successes`],description:d(e.description,`description`,`text`),http_config:{allow_insecure:e[`http-config-allow-insecure`],expected_body:d(e[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:e[`http-config-expected-codes`],follow_redirects:e[`http-config-follow-redirects`],header:l(e[`http-config-header`],`http-config-header`),method:e[`http-config-method`],path:d(e[`http-config-path`],`http-config-path`,`text`),port:e[`http-config-port`]},interval:e.interval,name:d(e.name,`name`,`text`),retries:e.retries,suspended:e.suspended,tcp_config:{method:e[`tcp-config-method`],port:e[`tcp-config-port`]},timeout:e.timeout,type:d(e.type,`type`,`text`)},[[`http_config`,`header`]]),h=await a(`Updating`,async()=>s.send(A,{body:m,zone_id:p,healthcheck_id:e[`healthcheck-id`]}));r(h,{successLabel:`Updated`})})};var N={method:`GET`,path:t=>e`/zones/${t.zone_id}/smart_shield/healthchecks/${t.healthcheck_id}`};function P(e){return e.usage(`$0 smart-shield health-checks get <healthcheck-id>
15
15
 
16
16
  Fetch a single configured health check.`).positional(`healthcheck-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const F={command:`get <healthcheck-id>`,describe:`Health Check Details`,builder:P,handler:async e=>o({command:`smart-shield health-checks get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf smart-shield health-checks get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/smart_shield/healthchecks/${e[`healthcheck-id`]==null?`<healthcheck-id>`:encodeURIComponent(String(e[`healthcheck-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"healthcheck-id":String(e[`healthcheck-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(N,{zone_id:s,healthcheck_id:e[`healthcheck-id`]}));r(c,{successLabel:`Loaded`})})};var I={method:`GET`,path:t=>e`/zones/${t.zone_id}/smart_shield/healthchecks`,query:[`page`,`per_page`]};function L(e){return e.usage(`$0 smart-shield health-checks list
17
17
 
18
18
  List configured health checks.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results per page. Must be a multiple of 5.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const R={command:`list`,describe:`List Health Checks`,builder:L,handler:async e=>o({command:`smart-shield health-checks list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let o={page:e.page,per_page:e[`per-page`]};if(e.dryRun){i({command:`cf smart-shield health-checks list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/smart_shield/healthchecks`,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(I,{zone_id:c,...o}));r(l,{successLabel:`Loaded`})})};var z={method:`PUT`,path:t=>e`/zones/${t.zone_id}/smart_shield/healthchecks/${t.healthcheck_id}`,body:`json`,constants:{success:!0}};function B(e){return e.usage(`$0 smart-shield health-checks update <healthcheck-id>
19
19
 
20
- Update a configured health check.`).positional(`healthcheck-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`errors`,{type:`string`,description:`The errors field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`messages`,{type:`string`,description:`The messages field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`result-address`,{type:`string`,description:`The hostname or IP address of the origin server to run health checks on.`}).option(`result-check-regions`,{type:`string`,array:!0,description:`A list of regions from which to run health checks. Null means Cloudflare will pick a default region.`}).option(`result-consecutive-fails`,{type:`number`,description:`The number of consecutive fails required from a health check before changing the health to unhealthy.`}).option(`result-consecutive-successes`,{type:`number`,description:`The number of consecutive successes required from a health check before changing the health to healthy.`}).option(`result-description`,{type:`string`,description:`A human-readable description of the health check.`}).option(`result-http-config-allow-insecure`,{type:`boolean`,description:`Do not validate the certificate when the health check uses HTTPS.`}).option(`result-http-config-expected-body`,{type:`string`,description:`A case-insensitive sub-string to look for in the response body. If this string is not found, the origin will be marked as unhealthy.`}).option(`result-http-config-expected-codes`,{type:`string`,array:!0,description:`The expected HTTP response codes (e.g. "200") or code ranges (e.g. "2xx" for all codes starting with 2) of the health check.`}).option(`result-http-config-follow-redirects`,{type:`boolean`,description:`Follow redirects if the origin returns a 3xx status code.`}).option(`result-http-config-header`,{type:`string`,description:`The HTTP request headers to send in the health check. It is recommended you set a Host header by default. The User-Agent header cannot be overridden. Provide as a JSON object or @path/to/file.json.`}).option(`result-http-config-method`,{type:`string`,description:`The HTTP method to use for the health check.`,choices:[`GET`,`HEAD`]}).coerce(`result-http-config-method`,e=>d(e,`result-http-config-method`,`text`)).option(`result-http-config-path`,{type:`string`,description:`The endpoint path to health check against.`}).option(`result-http-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80 if type is HTTP or 443 if type is HTTPS.`}).option(`result-interval`,{type:`number`,description:`The interval between each health check. Shorter intervals may give quicker notifications if the origin status changes, but will increase load on the origin as we check from multiple locations.`}).option(`result-name`,{type:`string`,description:`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`}).option(`result-retries`,{type:`number`,description:`The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.`}).option(`result-suspended`,{type:`boolean`,description:`If suspended, no health checks are sent to the origin.`}).option(`result-tcp-config-method`,{type:`string`,description:`The TCP connection method to use for the health check.`,choices:[`connection_established`]}).coerce(`result-tcp-config-method`,e=>d(e,`result-tcp-config-method`,`text`)).option(`result-tcp-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80.`}).option(`result-timeout`,{type:`number`,description:`The timeout (in seconds) before marking the health check as failed.`}).option(`result-type`,{type:`string`,description:`The protocol to use for the health check. Currently supported protocols are 'HTTP', 'HTTPS' and 'TCP'.`}).option(`success`,{type:`boolean`,description:`Whether the API call was successful.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const V={command:`update <healthcheck-id>`,describe:`Update Health Check`,builder:B,handler:async e=>o({command:`smart-shield health-checks update`,classification:{safeFlags:[`result-http-config-allow-insecure`,`result-http-config-follow-redirects`,`result-http-config-method`,`result-suspended`,`result-tcp-config-method`,`success`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf smart-shield health-checks update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/smart_shield/healthchecks/${e[`healthcheck-id`]==null?`<healthcheck-id>`:encodeURIComponent(String(e[`healthcheck-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"healthcheck-id":String(e[`healthcheck-id`]??``)},bodyKind:`json`,body:e.body===void 0?u({errors:s(e.errors,`errors`),messages:s(e.messages,`messages`),result:{address:d(e[`result-address`],`result-address`,`text`),check_regions:e[`result-check-regions`],consecutive_fails:e[`result-consecutive-fails`],consecutive_successes:e[`result-consecutive-successes`],description:d(e[`result-description`],`result-description`,`text`),http_config:{allow_insecure:e[`result-http-config-allow-insecure`],expected_body:d(e[`result-http-config-expected-body`],`result-http-config-expected-body`,`text`),expected_codes:e[`result-http-config-expected-codes`],follow_redirects:e[`result-http-config-follow-redirects`],header:l(e[`result-http-config-header`],`result-http-config-header`),method:e[`result-http-config-method`],path:d(e[`result-http-config-path`],`result-http-config-path`,`text`),port:e[`result-http-config-port`]},interval:e[`result-interval`],name:d(e[`result-name`],`result-name`,`text`),retries:e[`result-retries`],suspended:e[`result-suspended`],tcp_config:{method:e[`result-tcp-config-method`],port:e[`result-tcp-config-port`]},timeout:e[`result-timeout`],type:d(e[`result-type`],`result-type`,`text`)},success:e.success},[[`result`,`http_config`,`header`]]):c(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=c(e.body),n=await a(`Updating`,async()=>o.send(z,{body:t,zone_id:f,healthcheck_id:e[`healthcheck-id`]}));r(n,{successLabel:`Updated`});return}if(e.errors===void 0)throw Error(`--errors is required (or pass --body with this field set).`);if(e.messages===void 0)throw Error(`--messages is required (or pass --body with this field set).`);if(e.success===void 0)throw Error(`--success is required (or pass --body with this field set).`);let p=u({errors:s(e.errors,`errors`),messages:s(e.messages,`messages`),result:{address:d(e[`result-address`],`result-address`,`text`),check_regions:e[`result-check-regions`],consecutive_fails:e[`result-consecutive-fails`],consecutive_successes:e[`result-consecutive-successes`],description:d(e[`result-description`],`result-description`,`text`),http_config:{allow_insecure:e[`result-http-config-allow-insecure`],expected_body:d(e[`result-http-config-expected-body`],`result-http-config-expected-body`,`text`),expected_codes:e[`result-http-config-expected-codes`],follow_redirects:e[`result-http-config-follow-redirects`],header:l(e[`result-http-config-header`],`result-http-config-header`),method:e[`result-http-config-method`],path:d(e[`result-http-config-path`],`result-http-config-path`,`text`),port:e[`result-http-config-port`]},interval:e[`result-interval`],name:d(e[`result-name`],`result-name`,`text`),retries:e[`result-retries`],suspended:e[`result-suspended`],tcp_config:{method:e[`result-tcp-config-method`],port:e[`result-tcp-config-port`]},timeout:e[`result-timeout`],type:d(e[`result-type`],`result-type`,`text`)},success:e.success},[[`result`,`http_config`,`header`]]),m=await a(`Updating`,async()=>o.send(z,{body:p,zone_id:f,healthcheck_id:e[`healthcheck-id`]}));r(m,{successLabel:`Updated`})})},H={command:`health-checks`,describe:`Health checks operations`,builder:e=>e.command(E).command(k).command(M).command(F).command(R).command(V).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var U={method:`PATCH`,path:t=>e`/zones/${t.zone_id}/smart_shield`,body:`json`,errors:{500:`InternalServerError`,502:`BadGatewayError`}};function W(e){return e.usage(`$0 smart-shield update
20
+ Update a configured health check.`).positional(`healthcheck-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`errors`,{type:`string`,description:`The errors field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`messages`,{type:`string`,description:`The messages field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`result-address`,{type:`string`,description:`The hostname or IP address of the origin server to run health checks on.`}).option(`result-check-regions`,{type:`string`,array:!0,description:`A list of regions from which to run health checks. Null means Cloudflare will pick a default region.`}).option(`result-consecutive-fails`,{type:`number`,description:`The number of consecutive fails required from a health check before changing the health to unhealthy.`}).option(`result-consecutive-successes`,{type:`number`,description:`The number of consecutive successes required from a health check before changing the health to healthy.`}).option(`result-description`,{type:`string`,description:`A human-readable description of the health check.`}).option(`result-http-config-allow-insecure`,{type:`boolean`,description:`Do not validate the certificate when the health check uses HTTPS.`}).option(`result-http-config-expected-body`,{type:`string`,description:`A case-insensitive sub-string to look for in the response body. If this string is not found, the origin will be marked as unhealthy.`}).option(`result-http-config-expected-codes`,{type:`string`,array:!0,description:`The expected HTTP response codes (e.g. "200") or code ranges (e.g. "2xx" for all codes starting with 2) of the health check.`}).option(`result-http-config-follow-redirects`,{type:`boolean`,description:`Follow redirects if the origin returns a 3xx status code.`}).option(`result-http-config-header`,{type:`string`,description:`The HTTP request headers to send in the health check. It is recommended you set a Host header by default. The User-Agent header cannot be overridden. Provide as a JSON object or @path/to/file.json.`}).option(`result-http-config-method`,{type:`string`,description:`The HTTP method to use for the health check.`,choices:[`GET`,`HEAD`]}).coerce(`result-http-config-method`,e=>d(e,`result-http-config-method`,`text`)).option(`result-http-config-path`,{type:`string`,description:`The endpoint path to health check against.`}).option(`result-http-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80 if type is HTTP or 443 if type is HTTPS.`}).option(`result-interval`,{type:`number`,description:`The interval between each health check. Shorter intervals may give quicker notifications if the origin status changes, but will increase load on the origin as we check from multiple locations.`}).option(`result-name`,{type:`string`,description:`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`}).option(`result-retries`,{type:`number`,description:`The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.`}).option(`result-suspended`,{type:`boolean`,description:`If suspended, no health checks are sent to the origin.`}).option(`result-tcp-config-method`,{type:`string`,description:`The TCP connection method to use for the health check.`,choices:[`connection_established`]}).coerce(`result-tcp-config-method`,e=>d(e,`result-tcp-config-method`,`text`)).option(`result-tcp-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80.`}).option(`result-timeout`,{type:`number`,description:`The timeout (in seconds) before marking the health check as failed.`}).option(`result-type`,{type:`string`,description:`The protocol to use for the health check. Currently supported protocols are 'HTTP', 'HTTPS' and 'TCP'.`}).option(`success`,{type:`boolean`,description:`Whether the API call was successful.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const V={command:`update <healthcheck-id>`,describe:`Update Health Check`,builder:B,handler:async e=>o({command:`smart-shield health-checks update`,classification:{safeFlags:[`result-http-config-allow-insecure`,`result-http-config-follow-redirects`,`result-http-config-method`,`result-suspended`,`result-tcp-config-method`,`success`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf smart-shield health-checks update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/smart_shield/healthchecks/${e[`healthcheck-id`]==null?`<healthcheck-id>`:encodeURIComponent(String(e[`healthcheck-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"healthcheck-id":String(e[`healthcheck-id`]??``)},bodyKind:`json`,body:e.body===void 0?u({errors:s(e.errors,`errors`),messages:s(e.messages,`messages`),result:{address:d(e[`result-address`],`result-address`,`text`),check_regions:e[`result-check-regions`],consecutive_fails:e[`result-consecutive-fails`],consecutive_successes:e[`result-consecutive-successes`],description:d(e[`result-description`],`result-description`,`text`),http_config:{allow_insecure:e[`result-http-config-allow-insecure`],expected_body:d(e[`result-http-config-expected-body`],`result-http-config-expected-body`,`text`),expected_codes:e[`result-http-config-expected-codes`],follow_redirects:e[`result-http-config-follow-redirects`],header:l(e[`result-http-config-header`],`result-http-config-header`),method:e[`result-http-config-method`],path:d(e[`result-http-config-path`],`result-http-config-path`,`text`),port:e[`result-http-config-port`]},interval:e[`result-interval`],name:d(e[`result-name`],`result-name`,`text`),retries:e[`result-retries`],suspended:e[`result-suspended`],tcp_config:{method:e[`result-tcp-config-method`],port:e[`result-tcp-config-port`]},timeout:e[`result-timeout`],type:d(e[`result-type`],`result-type`,`text`)},success:e.success},[[`result`,`http_config`,`header`]]):c(e.body)});return}let o=e.body===void 0?void 0:c(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(z,{body:t,zone_id:p,healthcheck_id:e[`healthcheck-id`]}));r(n,{successLabel:`Updated`});return}if(e.errors===void 0)throw Error(`--errors is required (or pass --body with this field set).`);if(e.messages===void 0)throw Error(`--messages is required (or pass --body with this field set).`);if(e.success===void 0)throw Error(`--success is required (or pass --body with this field set).`);let m=u({errors:s(e.errors,`errors`),messages:s(e.messages,`messages`),result:{address:d(e[`result-address`],`result-address`,`text`),check_regions:e[`result-check-regions`],consecutive_fails:e[`result-consecutive-fails`],consecutive_successes:e[`result-consecutive-successes`],description:d(e[`result-description`],`result-description`,`text`),http_config:{allow_insecure:e[`result-http-config-allow-insecure`],expected_body:d(e[`result-http-config-expected-body`],`result-http-config-expected-body`,`text`),expected_codes:e[`result-http-config-expected-codes`],follow_redirects:e[`result-http-config-follow-redirects`],header:l(e[`result-http-config-header`],`result-http-config-header`),method:e[`result-http-config-method`],path:d(e[`result-http-config-path`],`result-http-config-path`,`text`),port:e[`result-http-config-port`]},interval:e[`result-interval`],name:d(e[`result-name`],`result-name`,`text`),retries:e[`result-retries`],suspended:e[`result-suspended`],tcp_config:{method:e[`result-tcp-config-method`],port:e[`result-tcp-config-port`]},timeout:e[`result-timeout`],type:d(e[`result-type`],`result-type`,`text`)},success:e.success},[[`result`,`http_config`,`header`]]),h=await a(`Updating`,async()=>f.send(z,{body:m,zone_id:p,healthcheck_id:e[`healthcheck-id`]}));r(h,{successLabel:`Updated`})})},H={command:`health-checks`,describe:`Health checks operations`,builder:e=>e.command(E).command(k).command(M).command(F).command(R).command(V).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var U={method:`PATCH`,path:t=>e`/zones/${t.zone_id}/smart_shield`,body:`json`,errors:{500:`InternalServerError`,502:`BadGatewayError`}};function W(e){return e.usage(`$0 smart-shield update
21
21
 
22
- Set Smart Shield Settings.`).option(`cache-reserve-value`,{type:`string`,description:`Specifies the enablement value of Cache Reserve.`,choices:[`on`,`off`]}).coerce(`cache-reserve-value`,e=>d(e,`cache-reserve-value`,`text`)).option(`regional-tiered-cache-value`,{type:`string`,description:`Specifies the enablement value of Regional Tiered Cache.`,choices:[`on`,`off`]}).coerce(`regional-tiered-cache-value`,e=>d(e,`regional-tiered-cache-value`,`text`)).option(`smart-routing-value`,{type:`string`,description:`Specifies the enablement value of Smart Routing.`,choices:[`on`,`off`]}).coerce(`smart-routing-value`,e=>d(e,`smart-routing-value`,`text`)).option(`smart-tiered-cache-value`,{type:`string`,description:`Specifies the enablement value of Smart Tiered Cache.`,choices:[`on`,`off`]}).coerce(`smart-tiered-cache-value`,e=>d(e,`smart-tiered-cache-value`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The patch body for Smart Shield.`})}const G={command:`update`,describe:`Patch Smart Shield Settings`,builder:W,handler:async e=>o({command:`smart-shield update`,classification:{safeFlags:[`cache-reserve-value`,`regional-tiered-cache-value`,`smart-routing-value`,`smart-tiered-cache-value`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf smart-shield update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/smart_shield`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?u({cache_reserve:{value:e[`cache-reserve-value`]},regional_tiered_cache:{value:e[`regional-tiered-cache-value`]},smart_routing:{value:e[`smart-routing-value`]},smart_tiered_cache:{value:e[`smart-tiered-cache-value`]}}):c(e.body)});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=s,e.body){let t=c(e.body),n=await a(`Updating`,async()=>o.send(U,{body:t,zone_id:s}));r(n,{successLabel:`Updated`});return}let l=u({cache_reserve:{value:e[`cache-reserve-value`]},regional_tiered_cache:{value:e[`regional-tiered-cache-value`]},smart_routing:{value:e[`smart-routing-value`]},smart_tiered_cache:{value:e[`smart-tiered-cache-value`]}}),d=await a(`Updating`,async()=>o.send(U,{body:l,zone_id:s}));r(d,{successLabel:`Updated`})})},K={command:`smart-shield`,describe:`Smart Shield settings, health checks, and cache reserve management`,builder:e=>e.command(C).command(G).command(b).command(H).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{K as default};
22
+ Set Smart Shield Settings.`).option(`cache-reserve-value`,{type:`string`,description:`Specifies the enablement value of Cache Reserve.`,choices:[`on`,`off`]}).coerce(`cache-reserve-value`,e=>d(e,`cache-reserve-value`,`text`)).option(`regional-tiered-cache-value`,{type:`string`,description:`Specifies the enablement value of Regional Tiered Cache.`,choices:[`on`,`off`]}).coerce(`regional-tiered-cache-value`,e=>d(e,`regional-tiered-cache-value`,`text`)).option(`smart-routing-value`,{type:`string`,description:`Specifies the enablement value of Smart Routing.`,choices:[`on`,`off`]}).coerce(`smart-routing-value`,e=>d(e,`smart-routing-value`,`text`)).option(`smart-tiered-cache-value`,{type:`string`,description:`Specifies the enablement value of Smart Tiered Cache.`,choices:[`on`,`off`]}).coerce(`smart-tiered-cache-value`,e=>d(e,`smart-tiered-cache-value`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The patch body for Smart Shield.`})}const G={command:`update`,describe:`Patch Smart Shield Settings`,builder:W,handler:async e=>o({command:`smart-shield update`,classification:{safeFlags:[`cache-reserve-value`,`regional-tiered-cache-value`,`smart-routing-value`,`smart-tiered-cache-value`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf smart-shield update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/smart_shield`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?u({cache_reserve:{value:e[`cache-reserve-value`]},regional_tiered_cache:{value:e[`regional-tiered-cache-value`]},smart_routing:{value:e[`smart-routing-value`]},smart_tiered_cache:{value:e[`smart-tiered-cache-value`]}}):c(e.body)});return}let o=e.body===void 0?void 0:c(e.body),s=await t(e),l=await n({zone:e.zone},s,{quiet:e.quiet});if(e.zoneId=l,e.body!==void 0){let e=o,t=await a(`Updating`,async()=>s.send(U,{body:e,zone_id:l}));r(t,{successLabel:`Updated`});return}let d=u({cache_reserve:{value:e[`cache-reserve-value`]},regional_tiered_cache:{value:e[`regional-tiered-cache-value`]},smart_routing:{value:e[`smart-routing-value`]},smart_tiered_cache:{value:e[`smart-tiered-cache-value`]}}),f=await a(`Updating`,async()=>s.send(U,{body:d,zone_id:l}));r(f,{successLabel:`Updated`})})},K={command:`smart-shield`,describe:`Smart Shield settings, health checks, and cache reserve management`,builder:e=>e.command(C).command(G).command(b).command(H).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{K as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{i as t,n}from"./auth-FK2eLQ02.mjs";import{i as r}from"./context-Dp4CXG22.mjs";import{t as i}from"./output-BJEgbI0G.mjs";import{t as a}from"./dry-run-gy0Hl9xo.mjs";import{t as o}from"./progress-DLri-rA7.mjs";import{t as s}from"./run-Ciw_GIrC.mjs";import"./telemetry-Pt5GpCKD.mjs";import{a as c,n as l,t as u}from"./body-parser-BKcZS9iJ.mjs";import{n as d,t as f}from"./input-validation-D7z60HJH.mjs";import{n as p}from"./prompt-D0dXwuME.mjs";import{n as m,t as h}from"./raw-fetch-DQeDx1wT.mjs";function g(e){return e.usage(`$0 snippets content get <snippet-name>
2
+ import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{i as t,n}from"./auth-B-h0BHg7.mjs";import{i as r}from"./context-BY1Eh_Qe.mjs";import{t as i}from"./output-BZQEl3mK.mjs";import{t as a}from"./dry-run-kJbjn4kG.mjs";import{t as o}from"./progress-yvPscjYg.mjs";import{t as s}from"./run-BOKI1uWa.mjs";import"./telemetry-DkDUr4KK.mjs";import{a as c,n as l,t as u}from"./body-parser-DoewLePl.mjs";import{n as d,t as f}from"./input-validation-D7z60HJH.mjs";import{n as p}from"./prompt-CEpZ-lQZ.mjs";import{n as m,t as h}from"./raw-fetch-Cl5spWC3.mjs";function g(e){return e.usage(`$0 snippets content get <snippet-name>
3
3
 
4
4
  Fetches the content of a snippet belonging to the zone.`).positional(`snippet-name`,{type:`string`,description:`Identify the snippet.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`text`,{type:`boolean`,description:`Decode the response body as UTF-8 text instead of writing raw bytes`,default:!1})}const _={command:`get <snippet-name>`,describe:`Get a zone snippet content`,builder:g,handler:async e=>s({command:`snippets content get`,classification:{safeFlags:[`dry-run`,`text`]}},e,async()=>{if(e.dryRun){a({command:`cf snippets content get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/snippets/${e[`snippet-name`]==null?`<snippet-name>`:encodeURIComponent(String(e[`snippet-name`]))}/content`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"snippet-name":String(e[`snippet-name`]??``)},bodyKind:`none`});return}let t=await n(e);e.zoneId=await r({zone:e.zone},t,{quiet:e.quiet});let i=await o(`Loading`,async()=>h(`/zones/${e.zoneId}/snippets/${encodeURIComponent(String(e[`snippet-name`]))}/content`,{method:`GET`,local:e.local===!0,persistTo:e.persistTo}));m(e.text===!0?i.toString(`utf-8`):i)})},v={command:`content`,describe:`Operations for content`,builder:e=>e.command(_).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var y={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/snippets/${t.snippet_name}`};function b(e){return e.usage(`$0 snippets delete <snippet-name>
5
5
 
@@ -13,6 +13,6 @@ Deletes all snippet rules belonging to the zone.`).option(`dry-run`,{type:`boole
13
13
 
14
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=>s({command:`snippets rules list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({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 t=await n(e),s=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=s;let c=await o(`Loading`,async()=>t.send(j,{zone_id:s}));i(c,{successLabel:`Loaded`})})};var P={method:`PUT`,path:t=>e`/zones/${t.zone_id}/snippets/snippet_rules`,body:`json`};function F(e){return e.usage(`$0 snippets rules update
15
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.`}).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=>s({command:`snippets rules update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({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?u({rules:c(e.rules,`rules`)}):l(e.body)});return}let t=await n(e),s=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=s,e.body){let n=l(e.body),r=await o(`Updating`,async()=>t.send(P,{body:n,zone_id:s}));i(r,{successLabel:`Updated`});return}if(e.rules===void 0)throw Error(`--rules is required (or pass --body with this field set).`);let d=u({rules:c(e.rules,`rules`)}),f=await o(`Updating`,async()=>t.send(P,{body:d,zone_id:s}));i(f,{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>
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.`}).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=>s({command:`snippets rules update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({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?u({rules:c(e.rules,`rules`)}):l(e.body)});return}let t=e.body===void 0?void 0:l(e.body),s=await n(e),d=await r({zone:e.zone},s,{quiet:e.quiet});if(e.zoneId=d,e.body!==void 0){let e=t,n=await o(`Updating`,async()=>s.send(P,{body:e,zone_id:d}));i(n,{successLabel:`Updated`});return}if(e.rules===void 0)throw Error(`--rules is required (or pass --body with this field set).`);let f=u({rules:c(e.rules,`rules`)}),p=await o(`Updating`,async()=>s.send(P,{body:f,zone_id:d}));i(p,{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
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 e=>s({command:`snippets update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf snippets update`,method:`PUT`,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:`multipart`,body:{body:e.body,file:e.file,metadata:e.metadata}});return}let s=await n(e);if(e.zoneId=await r({zone:e.zone},s,{quiet:e.quiet}),e.file!==void 0||e.body!==void 0||e.metadata!==void 0){let n=new FormData;if(e.file){let t=f(e.file);n.append(`file`,new Blob([t]),e.file.split(/[\\/]/).filter(Boolean).pop())}else e.body!==void 0&&n.append(`file`,e.body);if(e.metadata!==void 0){let t=typeof e.metadata==`string`?d(e.metadata,`metadata`,`text`):e.metadata;n.append(`metadata`,typeof t==`string`?t:JSON.stringify(t))}let r=await o(`Updating`,async()=>t(s,`PUT`,`/zones/${e.zoneId}/snippets/${encodeURIComponent(String(e[`snippet-name`]))}`,{body:n}));i(r,{successLabel:`Updated`})}else if(e.body){let n=d(e.body,`body`,`binary`),r=await o(`Updating`,async()=>t(s,`PUT`,`/zones/${e.zoneId}/snippets/${encodeURIComponent(String(e[`snippet-name`]))}`,{body:n,headers:{"Content-Type":`multipart/form-data`}}));i(r,{successLabel:`Updated`})}else if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},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};
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 e=>s({command:`snippets update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf snippets update`,method:`PUT`,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:`multipart`,body:{body:e.body,file:e.file,metadata:e.metadata}});return}if(e.body===void 0&&e.file===void 0&&e.metadata===void 0)throw Error(`--body or --file is required for this command. Pass --body '<value>' or --file path/to/file.`);let s=await n(e);if(e.zoneId=await r({zone:e.zone},s,{quiet:e.quiet}),e.file!==void 0||e.body!==void 0||e.metadata!==void 0){let n=new FormData;if(e.file!==void 0){let t=f(e.file);n.append(`file`,new Blob([t]),e.file.split(/[\\/]/).filter(Boolean).pop())}else e.body!==void 0&&n.append(`file`,e.body);if(e.metadata!==void 0){let t=typeof e.metadata==`string`?d(e.metadata,`metadata`,`text`):e.metadata;n.append(`metadata`,typeof t==`string`?t:JSON.stringify(t))}let r=await o(`Updating`,async()=>t(s,`PUT`,`/zones/${e.zoneId}/snippets/${encodeURIComponent(String(e[`snippet-name`]))}`,{body:n}));i(r,{successLabel:`Updated`})}else if(e.body!==void 0){let n=d(e.body,`body`,`binary`),r=await o(`Updating`,async()=>t(s,`PUT`,`/zones/${e.zoneId}/snippets/${encodeURIComponent(String(e[`snippet-name`]))}`,{body:n,headers:{"Content-Type":`multipart/form-data`}}));i(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};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{r as e,t}from"./rolldown-runtime-BNtqjh-B.mjs";import{r as n}from"./theme-BGHWSKCw.mjs";import{t as r}from"./cli-exit-CstFZ1eJ.mjs";import{a as i}from"./autoconfig-B2w-woU0.mjs";import{t as a}from"./blocks-C8vyXIAT.mjs";import"./ui-FYultowZ.mjs";import{a as o,i as s,n as c,o as l,r as u,s as d,t as f}from"./gt-BQkaDQDq.mjs";import"./log-BWdaOGOW.mjs";import{n as p,t as m}from"./discover-C06Syc2B.mjs";import{constants as h}from"node:os";var g=/* @__PURE__ */ t(((e,t)=>{t.exports=class{constructor(){this.max=1e3,this.map=/* @__PURE__ */ new Map}get(e){let t=this.map.get(e);if(t!==void 0)return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&t!==void 0){if(this.map.size>=this.max){let e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}}})),_=/* @__PURE__ */ t(((e,t)=>{let n=c();t.exports=(e,t,r)=>n(e,t,r)===0})),v=/* @__PURE__ */ t(((e,t)=>{let n=c();t.exports=(e,t,r)=>n(e,t,r)!==0})),y=/* @__PURE__ */ t(((e,t)=>{let n=c();t.exports=(e,t,r)=>n(e,t,r)>=0})),b=/* @__PURE__ */ t(((e,t)=>{let n=c();t.exports=(e,t,r)=>n(e,t,r)<0})),x=/* @__PURE__ */ t(((e,t)=>{let n=c();t.exports=(e,t,r)=>n(e,t,r)<=0})),S=/* @__PURE__ */ t(((e,t)=>{let n=_(),r=v(),i=f(),a=y(),o=b(),s=x();t.exports=(e,t,c,l)=>{switch(t){case`===`:return typeof e==`object`&&(e=e.version),typeof c==`object`&&(c=c.version),e===c;case`!==`:return typeof e==`object`&&(e=e.version),typeof c==`object`&&(c=c.version),e!==c;case``:case`=`:case`==`:return n(e,c,l);case`!=`:return r(e,c,l);case`>`:return i(e,c,l);case`>=`:return a(e,c,l);case`<`:return o(e,c,l);case`<=`:return s(e,c,l);default:throw TypeError(`Invalid operator: ${t}`)}}})),C=/* @__PURE__ */ t(((e,t)=>{let n=Symbol(`SemVer ANY`);t.exports=class e{static get ANY(){return n}constructor(t,i){if(i=r(i),t instanceof e){if(t.loose===!!i.loose)return t;t=t.value}t=t.trim().split(/\s+/).join(` `),l(`comparator`,t,i),this.options=i,this.loose=!!i.loose,this.parse(t),this.value=this.semver===n?``:this.operator+this.semver.version,l(`comp`,this)}parse(e){let t=this.options.loose?i[a.COMPARATORLOOSE]:i[a.COMPARATOR],r=e.match(t);if(!r)throw TypeError(`Invalid comparator: ${e}`);this.operator=r[1]===void 0?``:r[1],this.operator===`=`&&(this.operator=``),this.semver=r[2]?new f(r[2],this.options.loose):n}toString(){return this.value}test(e){if(l(`Comparator.test`,e,this.options.loose),this.semver===n||e===n)return!0;if(typeof e==`string`)try{e=new f(e,this.options)}catch{return!1}return c(e,this.operator,this.semver,this.options)}intersects(t,n){if(!(t instanceof e))throw TypeError(`a Comparator is required`);return this.operator===``?this.value===``||new p(t.value,n).test(this.value):t.operator===``?t.value===``||new p(this.value,n).test(t.semver):(n=r(n),n.includePrerelease&&(this.value===`<0.0.0-0`||t.value===`<0.0.0-0`)||!n.includePrerelease&&(this.value.startsWith(`<0.0.0`)||t.value.startsWith(`<0.0.0`))?!1:!!(this.operator.startsWith(`>`)&&t.operator.startsWith(`>`)||this.operator.startsWith(`<`)&&t.operator.startsWith(`<`)||this.semver.version===t.semver.version&&this.operator.includes(`=`)&&t.operator.includes(`=`)||c(this.semver,`<`,t.semver,n)&&this.operator.startsWith(`>`)&&t.operator.startsWith(`<`)||c(this.semver,`>`,t.semver,n)&&this.operator.startsWith(`<`)&&t.operator.startsWith(`>`)))}};let r=s(),{safeRe:i,t:a}=o(),c=S(),l=d(),f=u(),p=w()})),w=/* @__PURE__ */ t(((e,t)=>{let n=/\s+/g;t.exports=class e{constructor(t,r){if(r=i(r),t instanceof e)return t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease?t:new e(t.raw,r);if(t instanceof a)return this.raw=t.value,this.set=[[t]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=t.trim().replace(n,` `),this.set=this.raw.split(`||`).map(e=>this.parseRange(e.trim())).filter(e=>e.length),!this.set.length)throw TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let e=this.set[0];if(this.set=this.set.filter(e=>!w(e[0])),this.set.length===0)this.set=[e];else if(this.set.length>1){for(let e of this.set)if(e.length===1&&T(e[0])){this.set=[e];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted=``;for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+=`||`);let t=this.set[e];for(let e=0;e<t.length;e++)e>0&&(this.formatted+=` `),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){e=e.replace(S,``);let t=((this.options.includePrerelease&&b)|(this.options.loose&&x))+`:`+e,n=r.get(t);if(n)return n;let i=this.options.loose,o=i?p[h.HYPHENRANGELOOSE]:p[h.HYPHENRANGE];e=e.replace(o,R(this.options.includePrerelease)),c(`hyphen replace`,e),e=e.replace(p[h.COMPARATORTRIM],_),c(`comparator trim`,e),e=e.replace(p[h.TILDETRIM],v),c(`tilde trim`,e),e=e.replace(p[h.CARETTRIM],y),c(`caret trim`,e);let s=e.split(` `).map(e=>D(e,this.options)).join(` `).split(/\s+/).map(e=>L(e,this.options));i&&(s=s.filter(e=>(c(`loose invalid filter`,e,this.options),!!e.match(p[h.COMPARATORLOOSE])))),c(`range list`,s);let l=/* @__PURE__ */ new Map,u=s.map(e=>new a(e,this.options));for(let e of u){if(w(e))return[e];l.set(e.value,e)}l.size>1&&l.has(``)&&l.delete(``);let d=[...l.values()];return r.set(t,d),d}intersects(t,n){if(!(t instanceof e))throw TypeError(`a Range is required`);return this.set.some(e=>E(e,n)&&t.set.some(t=>E(t,n)&&e.every(e=>t.every(t=>e.intersects(t,n)))))}test(e){if(!e)return!1;if(typeof e==`string`)try{e=new f(e,this.options)}catch{return!1}for(let t=0;t<this.set.length;t++)if(z(this.set[t],e,this.options))return!0;return!1}};let r=new(g()),i=s(),a=C(),c=d(),f=u(),{safeRe:p,src:m,t:h,comparatorTrimReplace:_,tildeTrimReplace:v,caretTrimReplace:y}=o(),{FLAG_INCLUDE_PRERELEASE:b,FLAG_LOOSE:x}=l(),S=new RegExp(m[h.BUILD],`g`),w=e=>e.value===`<0.0.0-0`,T=e=>e.value===``,E=(e,t)=>{let n=!0,r=e.slice(),i=r.pop();for(;n&&r.length;)n=r.every(e=>i.intersects(e,t)),i=r.pop();return n},D=(e,t)=>(e=e.replace(p[h.BUILD],``),c(`comp`,e,t),e=M(e,t),c(`caret`,e),e=A(e,t),c(`tildes`,e),e=P(e,t),c(`xrange`,e),e=I(e,t),c(`stars`,e),e),O=e=>!e||e.toLowerCase()===`x`||e===`*`,k=(e,t,n)=>O(e)&&!O(t)||O(t)&&n&&!O(n),A=(e,t)=>e.trim().split(/\s+/).map(e=>j(e,t)).join(` `),j=(e,t)=>{let n=t.loose?p[h.TILDELOOSE]:p[h.TILDE],r=t.includePrerelease?`-0`:``;return e.replace(n,(t,n,i,a,o)=>{c(`tilde`,e,t,n,i,a,o);let s;return O(n)?s=``:O(i)?s=`>=${n}.0.0${r} <${+n+1}.0.0-0`:O(a)?s=`>=${n}.${i}.0${r} <${n}.${+i+1}.0-0`:o?(c(`replaceTilde pr`,o),s=`>=${n}.${i}.${a}-${o} <${n}.${+i+1}.0-0`):s=`>=${n}.${i}.${a} <${n}.${+i+1}.0-0`,c(`tilde return`,s),s})},M=(e,t)=>e.trim().split(/\s+/).map(e=>N(e,t)).join(` `),N=(e,t)=>{c(`caret`,e,t);let n=t.loose?p[h.CARETLOOSE]:p[h.CARET],r=t.includePrerelease?`-0`:``;return e.replace(n,(t,n,i,a,o)=>{c(`caret`,e,t,n,i,a,o);let s;return O(n)?s=``:O(i)?s=`>=${n}.0.0${r} <${+n+1}.0.0-0`:O(a)?s=n===`0`?`>=${n}.${i}.0${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.0${r} <${+n+1}.0.0-0`:o?(c(`replaceCaret pr`,o),s=n===`0`?i===`0`?`>=${n}.${i}.${a}-${o} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}-${o} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a}-${o} <${+n+1}.0.0-0`):(c(`no pr`),s=n===`0`?i===`0`?`>=${n}.${i}.${a} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a} <${+n+1}.0.0-0`),c(`caret return`,s),s})},P=(e,t)=>(c(`replaceXRanges`,e,t),e.split(/\s+/).map(e=>F(e,t)).join(` `)),F=(e,t)=>{e=e.trim();let n=t.loose?p[h.XRANGELOOSE]:p[h.XRANGE];return e.replace(n,(n,r,i,a,o,s)=>{if(c(`xRange`,e,n,r,i,a,o,s),k(i,a,o))return e;let l=O(i),u=l||O(a),d=u||O(o),f=d;return r===`=`&&f&&(r=``),s=t.includePrerelease?`-0`:``,l?n=r===`>`||r===`<`?`<0.0.0-0`:`*`:r&&f?(u&&(a=0),o=0,r===`>`?(r=`>=`,u?(i=+i+1,a=0,o=0):(a=+a+1,o=0)):r===`<=`&&(r=`<`,u?i=+i+1:a=+a+1),r===`<`&&(s=`-0`),n=`${r+i}.${a}.${o}${s}`):u?n=`>=${i}.0.0${s} <${+i+1}.0.0-0`:d&&(n=`>=${i}.${a}.0${s} <${i}.${+a+1}.0-0`),c(`xRange return`,n),n})},I=(e,t)=>(c(`replaceStars`,e,t),e.trim().replace(p[h.STAR],``)),L=(e,t)=>(c(`replaceGTE0`,e,t),e.trim().replace(p[t.includePrerelease?h.GTE0PRE:h.GTE0],``)),R=e=>(t,n,r,i,a,o,s,c,l,u,d,f)=>(n=O(r)?``:O(i)?`>=${r}.0.0${e?`-0`:``}`:O(a)?`>=${r}.${i}.0${e?`-0`:``}`:o?`>=${n}`:`>=${n}${e?`-0`:``}`,c=O(l)?``:O(u)?`<${+l+1}.0.0-0`:O(d)?`<${l}.${+u+1}.0-0`:f?`<=${l}.${u}.${d}-${f}`:e?`<${l}.${u}.${+d+1}-0`:`<=${c}`,`${n} ${c}`.trim()),z=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(c(e[n].semver),e[n].semver!==a.ANY&&e[n].semver.prerelease.length>0){let r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0}})),T=/* @__PURE__ */ e((/* @__PURE__ */ t(((e,t)=>{let n=w();t.exports=(e,t,r)=>{try{t=new n(t,r)}catch{return!1}return t.test(e)}})))(),1);function E(e){let t=m(e);if(t.length===0)throw A(e),new r(1);if(t.length>1)throw j(t),new r(1);let[n]=t;if(!n)throw new r(1);if(!n.binary)throw M(n),new r(1);if(n.impl.versionConstraint!==void 0&&!D(n.installedVersion,n.impl.versionConstraint.range))throw O(n),new r(1);return n}function D(e,t){return e!==void 0&&(0,T.default)(e,t,{includePrerelease:!0})}function O(e){N(`${e.impl.pkg}@${e.installedVersion??`unknown`} is installed, but it is not compatible with cf's local runtime.`,k(e),e.impl)}function k(e){return`cf requires ${e.impl.versionConstraint?.display??`a compatible version`} for cf dev, cf build, cf deploy, and cf previews deploy.`}function A(e){console.error(a(`No Cloudflare dev server is installed in ${e}.`,`Checked package.json, pyproject.toml and Cargo.toml.`)),console.error(`
2
+ import{r as e,t}from"./rolldown-runtime-BNtqjh-B.mjs";import{r as n}from"./theme-BGHWSKCw.mjs";import{t as r}from"./cli-exit-CstFZ1eJ.mjs";import{a as i}from"./autoconfig-C0ynlGHf.mjs";import{t as a}from"./blocks-BFulF68V.mjs";import"./ui-xjCox-gU.mjs";import{a as o,i as s,n as c,o as l,r as u,s as d,t as f}from"./gt-BQkaDQDq.mjs";import"./log-BWdaOGOW.mjs";import{n as p,t as m}from"./discover-C06Syc2B.mjs";import{constants as h}from"node:os";var g=/* @__PURE__ */ t(((e,t)=>{t.exports=class{constructor(){this.max=1e3,this.map=/* @__PURE__ */ new Map}get(e){let t=this.map.get(e);if(t!==void 0)return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&t!==void 0){if(this.map.size>=this.max){let e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}}})),_=/* @__PURE__ */ t(((e,t)=>{let n=c();t.exports=(e,t,r)=>n(e,t,r)===0})),v=/* @__PURE__ */ t(((e,t)=>{let n=c();t.exports=(e,t,r)=>n(e,t,r)!==0})),y=/* @__PURE__ */ t(((e,t)=>{let n=c();t.exports=(e,t,r)=>n(e,t,r)>=0})),b=/* @__PURE__ */ t(((e,t)=>{let n=c();t.exports=(e,t,r)=>n(e,t,r)<0})),x=/* @__PURE__ */ t(((e,t)=>{let n=c();t.exports=(e,t,r)=>n(e,t,r)<=0})),S=/* @__PURE__ */ t(((e,t)=>{let n=_(),r=v(),i=f(),a=y(),o=b(),s=x();t.exports=(e,t,c,l)=>{switch(t){case`===`:return typeof e==`object`&&(e=e.version),typeof c==`object`&&(c=c.version),e===c;case`!==`:return typeof e==`object`&&(e=e.version),typeof c==`object`&&(c=c.version),e!==c;case``:case`=`:case`==`:return n(e,c,l);case`!=`:return r(e,c,l);case`>`:return i(e,c,l);case`>=`:return a(e,c,l);case`<`:return o(e,c,l);case`<=`:return s(e,c,l);default:throw TypeError(`Invalid operator: ${t}`)}}})),C=/* @__PURE__ */ t(((e,t)=>{let n=Symbol(`SemVer ANY`);t.exports=class e{static get ANY(){return n}constructor(t,i){if(i=r(i),t instanceof e){if(t.loose===!!i.loose)return t;t=t.value}t=t.trim().split(/\s+/).join(` `),l(`comparator`,t,i),this.options=i,this.loose=!!i.loose,this.parse(t),this.value=this.semver===n?``:this.operator+this.semver.version,l(`comp`,this)}parse(e){let t=this.options.loose?i[a.COMPARATORLOOSE]:i[a.COMPARATOR],r=e.match(t);if(!r)throw TypeError(`Invalid comparator: ${e}`);this.operator=r[1]===void 0?``:r[1],this.operator===`=`&&(this.operator=``),this.semver=r[2]?new f(r[2],this.options.loose):n}toString(){return this.value}test(e){if(l(`Comparator.test`,e,this.options.loose),this.semver===n||e===n)return!0;if(typeof e==`string`)try{e=new f(e,this.options)}catch{return!1}return c(e,this.operator,this.semver,this.options)}intersects(t,n){if(!(t instanceof e))throw TypeError(`a Comparator is required`);return this.operator===``?this.value===``||new p(t.value,n).test(this.value):t.operator===``?t.value===``||new p(this.value,n).test(t.semver):(n=r(n),n.includePrerelease&&(this.value===`<0.0.0-0`||t.value===`<0.0.0-0`)||!n.includePrerelease&&(this.value.startsWith(`<0.0.0`)||t.value.startsWith(`<0.0.0`))?!1:!!(this.operator.startsWith(`>`)&&t.operator.startsWith(`>`)||this.operator.startsWith(`<`)&&t.operator.startsWith(`<`)||this.semver.version===t.semver.version&&this.operator.includes(`=`)&&t.operator.includes(`=`)||c(this.semver,`<`,t.semver,n)&&this.operator.startsWith(`>`)&&t.operator.startsWith(`<`)||c(this.semver,`>`,t.semver,n)&&this.operator.startsWith(`<`)&&t.operator.startsWith(`>`)))}};let r=s(),{safeRe:i,t:a}=o(),c=S(),l=d(),f=u(),p=w()})),w=/* @__PURE__ */ t(((e,t)=>{let n=/\s+/g;t.exports=class e{constructor(t,r){if(r=i(r),t instanceof e)return t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease?t:new e(t.raw,r);if(t instanceof a)return this.raw=t.value,this.set=[[t]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=t.trim().replace(n,` `),this.set=this.raw.split(`||`).map(e=>this.parseRange(e.trim())).filter(e=>e.length),!this.set.length)throw TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let e=this.set[0];if(this.set=this.set.filter(e=>!w(e[0])),this.set.length===0)this.set=[e];else if(this.set.length>1){for(let e of this.set)if(e.length===1&&T(e[0])){this.set=[e];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted=``;for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+=`||`);let t=this.set[e];for(let e=0;e<t.length;e++)e>0&&(this.formatted+=` `),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){e=e.replace(S,``);let t=((this.options.includePrerelease&&b)|(this.options.loose&&x))+`:`+e,n=r.get(t);if(n)return n;let i=this.options.loose,o=i?p[h.HYPHENRANGELOOSE]:p[h.HYPHENRANGE];e=e.replace(o,R(this.options.includePrerelease)),c(`hyphen replace`,e),e=e.replace(p[h.COMPARATORTRIM],_),c(`comparator trim`,e),e=e.replace(p[h.TILDETRIM],v),c(`tilde trim`,e),e=e.replace(p[h.CARETTRIM],y),c(`caret trim`,e);let s=e.split(` `).map(e=>D(e,this.options)).join(` `).split(/\s+/).map(e=>L(e,this.options));i&&(s=s.filter(e=>(c(`loose invalid filter`,e,this.options),!!e.match(p[h.COMPARATORLOOSE])))),c(`range list`,s);let l=/* @__PURE__ */ new Map,u=s.map(e=>new a(e,this.options));for(let e of u){if(w(e))return[e];l.set(e.value,e)}l.size>1&&l.has(``)&&l.delete(``);let d=[...l.values()];return r.set(t,d),d}intersects(t,n){if(!(t instanceof e))throw TypeError(`a Range is required`);return this.set.some(e=>E(e,n)&&t.set.some(t=>E(t,n)&&e.every(e=>t.every(t=>e.intersects(t,n)))))}test(e){if(!e)return!1;if(typeof e==`string`)try{e=new f(e,this.options)}catch{return!1}for(let t=0;t<this.set.length;t++)if(z(this.set[t],e,this.options))return!0;return!1}};let r=new(g()),i=s(),a=C(),c=d(),f=u(),{safeRe:p,src:m,t:h,comparatorTrimReplace:_,tildeTrimReplace:v,caretTrimReplace:y}=o(),{FLAG_INCLUDE_PRERELEASE:b,FLAG_LOOSE:x}=l(),S=new RegExp(m[h.BUILD],`g`),w=e=>e.value===`<0.0.0-0`,T=e=>e.value===``,E=(e,t)=>{let n=!0,r=e.slice(),i=r.pop();for(;n&&r.length;)n=r.every(e=>i.intersects(e,t)),i=r.pop();return n},D=(e,t)=>(e=e.replace(p[h.BUILD],``),c(`comp`,e,t),e=M(e,t),c(`caret`,e),e=A(e,t),c(`tildes`,e),e=P(e,t),c(`xrange`,e),e=I(e,t),c(`stars`,e),e),O=e=>!e||e.toLowerCase()===`x`||e===`*`,k=(e,t,n)=>O(e)&&!O(t)||O(t)&&n&&!O(n),A=(e,t)=>e.trim().split(/\s+/).map(e=>j(e,t)).join(` `),j=(e,t)=>{let n=t.loose?p[h.TILDELOOSE]:p[h.TILDE],r=t.includePrerelease?`-0`:``;return e.replace(n,(t,n,i,a,o)=>{c(`tilde`,e,t,n,i,a,o);let s;return O(n)?s=``:O(i)?s=`>=${n}.0.0${r} <${+n+1}.0.0-0`:O(a)?s=`>=${n}.${i}.0${r} <${n}.${+i+1}.0-0`:o?(c(`replaceTilde pr`,o),s=`>=${n}.${i}.${a}-${o} <${n}.${+i+1}.0-0`):s=`>=${n}.${i}.${a} <${n}.${+i+1}.0-0`,c(`tilde return`,s),s})},M=(e,t)=>e.trim().split(/\s+/).map(e=>N(e,t)).join(` `),N=(e,t)=>{c(`caret`,e,t);let n=t.loose?p[h.CARETLOOSE]:p[h.CARET],r=t.includePrerelease?`-0`:``;return e.replace(n,(t,n,i,a,o)=>{c(`caret`,e,t,n,i,a,o);let s;return O(n)?s=``:O(i)?s=`>=${n}.0.0${r} <${+n+1}.0.0-0`:O(a)?s=n===`0`?`>=${n}.${i}.0${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.0${r} <${+n+1}.0.0-0`:o?(c(`replaceCaret pr`,o),s=n===`0`?i===`0`?`>=${n}.${i}.${a}-${o} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}-${o} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a}-${o} <${+n+1}.0.0-0`):(c(`no pr`),s=n===`0`?i===`0`?`>=${n}.${i}.${a} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a} <${+n+1}.0.0-0`),c(`caret return`,s),s})},P=(e,t)=>(c(`replaceXRanges`,e,t),e.split(/\s+/).map(e=>F(e,t)).join(` `)),F=(e,t)=>{e=e.trim();let n=t.loose?p[h.XRANGELOOSE]:p[h.XRANGE];return e.replace(n,(n,r,i,a,o,s)=>{if(c(`xRange`,e,n,r,i,a,o,s),k(i,a,o))return e;let l=O(i),u=l||O(a),d=u||O(o),f=d;return r===`=`&&f&&(r=``),s=t.includePrerelease?`-0`:``,l?n=r===`>`||r===`<`?`<0.0.0-0`:`*`:r&&f?(u&&(a=0),o=0,r===`>`?(r=`>=`,u?(i=+i+1,a=0,o=0):(a=+a+1,o=0)):r===`<=`&&(r=`<`,u?i=+i+1:a=+a+1),r===`<`&&(s=`-0`),n=`${r+i}.${a}.${o}${s}`):u?n=`>=${i}.0.0${s} <${+i+1}.0.0-0`:d&&(n=`>=${i}.${a}.0${s} <${i}.${+a+1}.0-0`),c(`xRange return`,n),n})},I=(e,t)=>(c(`replaceStars`,e,t),e.trim().replace(p[h.STAR],``)),L=(e,t)=>(c(`replaceGTE0`,e,t),e.trim().replace(p[t.includePrerelease?h.GTE0PRE:h.GTE0],``)),R=e=>(t,n,r,i,a,o,s,c,l,u,d,f)=>(n=O(r)?``:O(i)?`>=${r}.0.0${e?`-0`:``}`:O(a)?`>=${r}.${i}.0${e?`-0`:``}`:o?`>=${n}`:`>=${n}${e?`-0`:``}`,c=O(l)?``:O(u)?`<${+l+1}.0.0-0`:O(d)?`<${l}.${+u+1}.0-0`:f?`<=${l}.${u}.${d}-${f}`:e?`<${l}.${u}.${+d+1}-0`:`<=${c}`,`${n} ${c}`.trim()),z=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(c(e[n].semver),e[n].semver!==a.ANY&&e[n].semver.prerelease.length>0){let r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0}})),T=/* @__PURE__ */ e((/* @__PURE__ */ t(((e,t)=>{let n=w();t.exports=(e,t,r)=>{try{t=new n(t,r)}catch{return!1}return t.test(e)}})))(),1);function E(e){let t=m(e);if(t.length===0)throw A(e),new r(1);if(t.length>1)throw j(t),new r(1);let[n]=t;if(!n)throw new r(1);if(!n.binary)throw M(n),new r(1);if(n.impl.versionConstraint!==void 0&&!D(n.installedVersion,n.impl.versionConstraint.range))throw O(n),new r(1);return n}function D(e,t){return e!==void 0&&(0,T.default)(e,t,{includePrerelease:!0})}function O(e){N(`${e.impl.pkg}@${e.installedVersion??`unknown`} is installed, but it is not compatible with cf's local runtime.`,k(e),e.impl)}function k(e){return`cf requires ${e.impl.versionConstraint?.display??`a compatible version`} for cf dev, cf build, cf deploy, and cf previews deploy.`}function A(e){console.error(a(`No Cloudflare dev server is installed in ${e}.`,`Checked package.json, pyproject.toml and Cargo.toml.`)),console.error(`
3
3
  Install one of these:`);for(let e of p)console.error(`\n${n.bold(e.pkg)} ${n.muted(e.description)}`),P(e)}function j(e){console.error(a(`Multiple Cloudflare dev-server implementations are configured.`,[...e.map(e=>`${e.impl.pkg} (${e.manifestPath})`),``,`A project can only use one dev-server. Remove all but one from your project's manifest and try again.`].join(`
4
4
  `)))}function M(e){e.installed&&e.impl.versionConstraint?N(`${e.impl.pkg} is declared in ${e.manifestPath}, but this installation does not include the cf delegate.`,k(e),e.impl):N(`${e.impl.pkg} is declared in ${e.manifestPath} but is not installed.`,void 0,e.impl)}function N(e,t,n){console.error(a(e,t)),console.error(`
5
5
  Try:`),P(n)}function P(e){for(let t of e.installCommands)console.error(`${` `.repeat(3)}${n.code(t)}`)}function F(e,t=process.platform){return t!==`win32`||e!==`SIGINT`}function I(e,t,n){let r=t??n??void 0;return{exitCode:e??(r?128+(h.signals[r]??1):1),...r?{signal:r}:{}}}async function L(e,t,n,r={}){let a=r.output??`stderr`,o=e.binary;if(!o){let t=e.impl.installCommands.map(e=>`\`${e}\``);throw Error(`Cannot spawn ${e.impl.pkg}: binary not found.\nTry: ${new Intl.ListFormat(`en`,{type:`disjunction`}).format(t)}`)}let{command:s,prefixArgs:c}=z(o),l=i(s,[...c,t,...n],{nodePath:!1,nodeOptions:{stdio:[`inherit`,a===`inherit`?`inherit`:a===`silent`?`ignore`:process.stderr,`inherit`],env:R(r.env)}}),u,d=e=>{u??=e,F(e)&&l.kill(e)},f=()=>d(`SIGINT`),p=()=>d(`SIGTERM`);process.on(`SIGINT`,f),process.on(`SIGTERM`,p);try{return I((await l).exitCode??null,l.process?.signalCode??null,u)}finally{process.off(`SIGINT`,f),process.off(`SIGTERM`,p)}}function R(e={}){return{...B(process.env,`--no-deprecation`),...e,CLOUDFLARE_CF_AUTH:`true`}}function z(e){return e.startsWith(`uv:`)?{command:`uv`,prefixArgs:[`run`,`--no-sync`,e.slice(3)]}:{command:e,prefixArgs:[]}}function B(e,t){let n=e.NODE_OPTIONS??``;return n.split(/\s+/).includes(t)?e:{...e,NODE_OPTIONS:n?`${n} ${t}`:t}}export{E as n,L as t};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-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-B-h0BHg7.mjs";import{i as n}from"./context-BY1Eh_Qe.mjs";import{t as r}from"./output-BZQEl3mK.mjs";import{t as i}from"./dry-run-kJbjn4kG.mjs";import{t as a}from"./progress-yvPscjYg.mjs";import{t as o}from"./run-BOKI1uWa.mjs";import"./telemetry-DkDUr4KK.mjs";import{n as s,o as c,t as l}from"./body-parser-DoewLePl.mjs";import{n as u}from"./input-validation-D7z60HJH.mjs";import{a as d,n as f}from"./prompt-CEpZ-lQZ.mjs";var p={method:`GET`,path:t=>e`/zones/${t.zone_id}/spectrum/analytics/aggregate/current`,query:[`appID`,`colo_name`]};function m(e){return e.usage(`$0 spectrum analytics aggregates currents get
3
3
 
4
4
  Retrieves analytics aggregated from the last minute of usage on Spectrum applications underneath a given zone.`).option(`app-id`,{type:`string`,description:`Comma-delimited list of Spectrum Application Id(s). If provided, the response will be limited to Spectrum Application Id(s) that match.`}).option(`colo-name`,{type:`string`,description:`Co-location identifier.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const h={command:`get`,describe:`Get current aggregated analytics`,builder:m,handler:async e=>o({command:`spectrum analytics aggregates currents get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let o={appID:e[`app-id`],colo_name:e[`colo-name`]};if(e.dryRun){i({command:`cf spectrum analytics aggregates currents get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/spectrum/analytics/aggregate/current`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:o,bodyKind:`none`});return}let s=await t(e),c=await n({zone:e.zone},s,{quiet:e.quiet});e.zoneId=c;let l=await a(`Loading`,async()=>s.send(p,{zone_id:c,...o}));r(l,{successLabel:`Loaded`})})},g={command:`currents`,describe:`Operations for analytics.aggregates.currents`,builder:e=>e.command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},_={command:`aggregates`,describe:`Operations for analytics.aggregates`,builder:e=>e.command(g).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var v={method:`GET`,path:t=>e`/zones/${t.zone_id}/spectrum/analytics/events/bytime`,query:[`dimensions`,`sort`,`until`,`metrics`,`filters`,`since`,`time_delta`]};function y(e){return e.usage(`$0 spectrum analytics events bytimes get
5
5
 
@@ -67,7 +67,7 @@ Retrieves a list of total bandwidth by zone over a given time period.`).option(`
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){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=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}));r(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}));r(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
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>
73
73
 
@@ -77,6 +77,6 @@ Retrieves a list of currently existing Spectrum applications inside a zone.`).op
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){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=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`]}));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 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`]}));r(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
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};
@@ -1,11 +1,11 @@
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-B-h0BHg7.mjs";import{i as n}from"./context-BY1Eh_Qe.mjs";import{t as r}from"./output-BZQEl3mK.mjs";import{t as i}from"./dry-run-kJbjn4kG.mjs";import{t as a}from"./progress-yvPscjYg.mjs";import{t as o}from"./run-BOKI1uWa.mjs";import"./telemetry-DkDUr4KK.mjs";import{n as s,t as c}from"./body-parser-DoewLePl.mjs";import{n as l}from"./input-validation-D7z60HJH.mjs";import{n as u}from"./prompt-CEpZ-lQZ.mjs";var d={method:`GET`,path:t=>e`/zones/${t.zone_id}/speed_api/availabilities`};function f(e){return e.usage(`$0 speed availabilities list
3
3
 
4
4
  Retrieves quota for all plans, as well as the current zone quota.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const p={command:`list`,describe:`Get quota and availability`,builder:f,handler:async e=>o({command:`speed availabilities list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf speed availabilities list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/speed_api/availabilities`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(d,{zone_id:s}));r(c,{successLabel:`Loaded`})})},m={command:`availabilities`,describe:`Check which speed test regions and configurations are available for your zone`,builder:e=>e.command(p).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var h={method:`GET`,path:t=>e`/zones/${t.zone_id}/speed_api/pages`};function g(e){return e.usage(`$0 speed pages list
5
5
 
6
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>
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){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=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}));r(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}));r(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
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>
11
11
 
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import{i as e,n as t}from"./auth-FK2eLQ02.mjs";import{t as n}from"./output-BJEgbI0G.mjs";import{t as r}from"./dry-run-gy0Hl9xo.mjs";import{t as i}from"./progress-DLri-rA7.mjs";import{t as a}from"./run-Ciw_GIrC.mjs";import"./telemetry-Pt5GpCKD.mjs";import{n as o,s,t as c}from"./body-parser-BKcZS9iJ.mjs";import{n as l,t as u}from"./input-validation-D7z60HJH.mjs";var d={method:`GET`,path:()=>`/analytics/sql/introspection`,query:[`account_tag`,`include_columns`,`include_custom_attributes`,`include_attributes`,`include_wae`,`include_lex`,`dataset_name`],errors:{400:`BadRequestError`,403:`ForbiddenError`,422:`UnprocessableEntityError`,500:`InternalServerError`,503:`ServiceUnavailableError`}};function f(e){return e.usage("$0 sql datasets\n\nReturns the analytics dataset catalogue. By default, the response contains dataset names, titles, categories, descriptions, kinds, and hidden flags. Set `include_columns` to include each dataset's column names, descriptions, data types, and hidden flags. The caller must have Account Analytics Read permission on the account identified by `account_tag`. Dataset names, descriptions, and columns are the same for every authorized account. When `include_custom_attributes` or `include_attributes` is set, the response also includes attribute names and types discovered from that account's own data, which legitimately differs per caller. `attributes` is a replacement for `custom_attributes` that will eventually be removed; until then, set either flag independently to receive the corresponding field. `hidden` marks catalogue entries a client should de-emphasise. It has no effect on access: hidden datasets and columns are returned here and remain fully queryable. The catalogue lists the datasets this deployment is able to describe, which is not a fixed list. Some datasets are described by the service that owns them and are listed only where that service is available, so the same account may see a different catalogue in different environments, and datasets may appear or disappear without a change to this API. Clients should query the catalogue rather than hard-coding it, and should not treat a dataset's absence as proof that it does not exist. Workers Analytics Engine datasets are named by the account that writes them, so they are discovered from that account's own data rather than from a fixed list. They appear as `events.analyticsEngine.<dataset_name>` and differ per account. A dataset is listed for as long as any of its data is retained, so it does not disappear from the catalogue merely because writes have stopped. An account with a very large number of datasets may receive a truncated list. Set `include_wae=false` to omit them. Log Explorer datasets are listed only where the account has them, so they differ per account and are not part of the static catalogue. Set `include_lex=false` to omit them.").option(`account-tag`,{type:`string`,description:`Account whose available analytics datasets are returned.`,demandOption:!0}).option(`include-columns`,{type:`boolean`,description:`Include column metadata for each returned dataset.`}).option(`include-custom-attributes`,{type:`boolean`,description:"Include a capped set of custom attribute names and types observed during the preceding seven days, as `custom_attributes`. Requires a nonempty dataset_name. Deprecated in favor of `include_attributes`."}).option(`include-attributes`,{type:`boolean`,description:"Include a capped set of attribute names and types observed during the preceding seven days, as `attributes`. Requires a nonempty dataset_name. Replaces `include_custom_attributes`, which is deprecated."}).option(`include-wae`,{type:`boolean`,description:"Include Workers Analytics Engine datasets, which are discovered from the account's own data. Set to `false` to return only datasets described from the static catalogue, which avoids that lookup."}).option(`include-lex`,{type:`boolean`,description:"Include Log Explorer datasets, which are listed only where the account has them. Set to `false` to return only datasets described from the static catalogue, which avoids that lookup."}).option(`dataset-name`,{type:`string`,description:"Return only the dataset with this exact name. An empty value is treated as if the parameter had been omitted, and does not filter the catalogue. A name that matches no dataset in this deployment's catalogue is rejected with `422`; a dataset that exists but is not describable here is rejected identically, so the two cases cannot be told apart.\n\nA Workers Analytics Engine dataset is named in full, as `events.analyticsEngine.<dataset_name>`; the namespace on its own returns every such dataset the account has. A `dataset_name` the account does not have is rejected with `422` like any other unknown name."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const p={command:`datasets`,describe:`List available analytics datasets`,builder:f,handler:async e=>a({command:`sql datasets`,classification:{safeFlags:[`include-columns`,`include-custom-attributes`,`include-attributes`,`include-wae`,`include-lex`,`dry-run`]}},e,async()=>{let a={account_tag:e[`account-tag`],include_columns:e[`include-columns`],include_custom_attributes:e[`include-custom-attributes`],include_attributes:e[`include-attributes`],include_wae:e[`include-wae`],include_lex:e[`include-lex`],dataset_name:e[`dataset-name`]};if(e.dryRun){r({command:`cf sql datasets`,method:`GET`,url:`https://api.cloudflare.com/client/v4/analytics/sql/introspection`,pathParams:{},query:a,bodyKind:`none`});return}let o=await t(e),s=await i(`Loading`,async()=>o.send(d,a));n(s,{successLabel:`Loaded`})})};function m(e){return e.usage("$0 sql query <query>\n\nExecutes a SQL query against the analytics datasets available to the caller. Send either raw SQL or a JSON object containing the query and optional positional or named parameters, time range, and account or zone scope. Raw SQL placeholders can also be bound with query parameters named `param_<name>`. A trailing `FORMAT JSON`, `FORMAT JSONEachRow`, `FORMAT TabSeparated`, or `FORMAT TSV` is supported for all datasets. Without FORMAT, each backend retains its existing default JSON response.").positional(`query`,{type:`string`,description:`SQL query to execute. A trailing FORMAT selects JSON, JSONEachRow, TabSeparated, or TSV output on any dataset. `,demandOption:!0}).option(`scope-account`,{type:`string`,description:`Account tag used to authorize and scope the query. Must be a 32-character lowercase hex string.
2
+ import{i as e,n as t}from"./auth-B-h0BHg7.mjs";import{t as n}from"./output-BZQEl3mK.mjs";import{t as r}from"./dry-run-kJbjn4kG.mjs";import{t as i}from"./progress-yvPscjYg.mjs";import{t as a}from"./run-BOKI1uWa.mjs";import"./telemetry-DkDUr4KK.mjs";import{n as o,s,t as c}from"./body-parser-DoewLePl.mjs";import{n as l,t as u}from"./input-validation-D7z60HJH.mjs";var d={method:`GET`,path:()=>`/analytics/sql/introspection`,query:[`account_tag`,`include_columns`,`include_custom_attributes`,`include_attributes`,`include_wae`,`include_lex`,`dataset_name`],errors:{400:`BadRequestError`,403:`ForbiddenError`,422:`UnprocessableEntityError`,500:`InternalServerError`,503:`ServiceUnavailableError`}};function f(e){return e.usage("$0 sql datasets\n\nReturns the analytics dataset catalogue. By default, the response contains dataset names, titles, categories, descriptions, kinds, and hidden flags. Set `include_columns` to include each dataset's column names, descriptions, data types, and hidden flags. The caller must have Account Analytics Read permission on the account identified by `account_tag`. Dataset names, descriptions, and columns are the same for every authorized account. When `include_custom_attributes` or `include_attributes` is set, the response also includes attribute names and types discovered from that account's own data, which legitimately differs per caller. `attributes` is a replacement for `custom_attributes` that will eventually be removed; until then, set either flag independently to receive the corresponding field. `hidden` marks catalogue entries a client should de-emphasise. It has no effect on access: hidden datasets and columns are returned here and remain fully queryable. The catalogue lists the datasets this deployment is able to describe, which is not a fixed list. Some datasets are described by the service that owns them and are listed only where that service is available, so the same account may see a different catalogue in different environments, and datasets may appear or disappear without a change to this API. Clients should query the catalogue rather than hard-coding it, and should not treat a dataset's absence as proof that it does not exist. Workers Analytics Engine datasets are named by the account that writes them, so they are discovered from that account's own data rather than from a fixed list. They appear as `events.analyticsEngine.<dataset_name>` and differ per account. A dataset is listed for as long as any of its data is retained, so it does not disappear from the catalogue merely because writes have stopped. An account with a very large number of datasets may receive a truncated list. Set `include_wae=false` to omit them. Log Explorer datasets are listed only where the account has them, so they differ per account and are not part of the static catalogue. Set `include_lex=false` to omit them.").option(`account-tag`,{type:`string`,description:`Account whose available analytics datasets are returned.`,demandOption:!0}).option(`include-columns`,{type:`boolean`,description:`Include column metadata for each returned dataset.`}).option(`include-custom-attributes`,{type:`boolean`,description:"Include a capped set of custom attribute names and types observed during the preceding seven days, as `custom_attributes`. Requires a nonempty dataset_name. Deprecated in favor of `include_attributes`."}).option(`include-attributes`,{type:`boolean`,description:"Include a capped set of attribute names and types observed during the preceding seven days, as `attributes`. Requires a nonempty dataset_name. Replaces `include_custom_attributes`, which is deprecated."}).option(`include-wae`,{type:`boolean`,description:"Include Workers Analytics Engine datasets, which are discovered from the account's own data. Set to `false` to return only datasets described from the static catalogue, which avoids that lookup."}).option(`include-lex`,{type:`boolean`,description:"Include Log Explorer datasets, which are listed only where the account has them. Set to `false` to return only datasets described from the static catalogue, which avoids that lookup."}).option(`dataset-name`,{type:`string`,description:"Return only the dataset with this exact name. An empty value is treated as if the parameter had been omitted, and does not filter the catalogue. A name that matches no dataset in this deployment's catalogue is rejected with `422`; a dataset that exists but is not describable here is rejected identically, so the two cases cannot be told apart.\n\nA Workers Analytics Engine dataset is named in full, as `events.analyticsEngine.<dataset_name>`; the namespace on its own returns every such dataset the account has. A `dataset_name` the account does not have is rejected with `422` like any other unknown name."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const p={command:`datasets`,describe:`List available analytics datasets`,builder:f,handler:async e=>a({command:`sql datasets`,classification:{safeFlags:[`include-columns`,`include-custom-attributes`,`include-attributes`,`include-wae`,`include-lex`,`dry-run`]}},e,async()=>{let a={account_tag:e[`account-tag`],include_columns:e[`include-columns`],include_custom_attributes:e[`include-custom-attributes`],include_attributes:e[`include-attributes`],include_wae:e[`include-wae`],include_lex:e[`include-lex`],dataset_name:e[`dataset-name`]};if(e.dryRun){r({command:`cf sql datasets`,method:`GET`,url:`https://api.cloudflare.com/client/v4/analytics/sql/introspection`,pathParams:{},query:a,bodyKind:`none`});return}let o=await t(e),s=await i(`Loading`,async()=>o.send(d,a));n(s,{successLabel:`Loaded`})})};function m(e){return e.usage("$0 sql query <query>\n\nExecutes a SQL query against the analytics datasets available to the caller. Send either raw SQL or a JSON object containing the query and optional positional or named parameters, time range, and account or zone scope. Raw SQL placeholders can also be bound with query parameters named `param_<name>`. A trailing `FORMAT JSON`, `FORMAT JSONEachRow`, `FORMAT TabSeparated`, or `FORMAT TSV` is supported for all datasets. Without FORMAT, each backend retains its existing default JSON response.").positional(`query`,{type:`string`,description:`SQL query to execute. A trailing FORMAT selects JSON, JSONEachRow, TabSeparated, or TSV output on any dataset. `,demandOption:!0}).option(`scope-account`,{type:`string`,description:`Account tag used to authorize and scope the query. Must be a 32-character lowercase hex string.
3
3
  `}).option(`scope-zone`,{type:`string`,description:`Zone tag used to authorize and scope the query. Must be a 32-character lowercase hex string.
4
- `}).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 h={command:`query <query>`,describe:`Query analytics datasets`,builder:m,handler:async d=>a({command:`sql query`,classification:{safeFlags:[`dry-run`]}},d,async()=>{if(d.dryRun){r({command:`cf sql query`,method:`POST`,url:`https://api.cloudflare.com/client/v4/analytics/sql`,pathParams:{},bodyKind:d.file===void 0?`json`:`octet-stream`,body:d.file===void 0?d.body===void 0?c({scope:{accountTag:l(d[`scope-account`],`scope-account`,`text`),zoneTag:l(d[`scope-zone`],`scope-zone`,`text`)},time_range:{end:l(d[`time-until`],`time-until`,`text`),start:l(d[`time-since`],`time-since`,`text`)},query:d.query}):o(d.body):{file:d.file}});return}let a=await t(d);if(d.file){let t=u(d.file),r=await i(`Loading`,async()=>e(a,`POST`,`/analytics/sql`,{body:t,headers:{"Content-Type":`text/plain`}}));n(r,{successLabel:`Loaded`});return}if(d.body){let t=o(d.body),r=await i(`Loading`,async()=>e(a,`POST`,`/analytics/sql`,{body:t}));n(r,{successLabel:`Loaded`});return}let f={};d[`scope-account`]!==void 0&&s(f,[`scope`,`accountTag`],l(d[`scope-account`],`scope-account`,`text`)),d[`scope-zone`]!==void 0&&s(f,[`scope`,`zoneTag`],l(d[`scope-zone`],`scope-zone`,`text`)),d[`time-until`]!==void 0&&s(f,[`time_range`,`end`],l(d[`time-until`],`time-until`,`text`)),d[`time-since`]!==void 0&&s(f,[`time_range`,`start`],l(d[`time-since`],`time-since`,`text`)),d.query!==void 0&&(f.query=d.query);let p=await i(`Loading`,async()=>e(a,`POST`,`/analytics/sql`,{body:f}));n(p,{successLabel:`Loaded`})})},g={command:`sql`,describe:`sql`,builder:e=>e.command(p).command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{g as default};
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 h={command:`query <query>`,describe:`Query analytics datasets`,builder:m,handler:async d=>a({command:`sql query`,classification:{safeFlags:[`dry-run`]}},d,async()=>{if(d.dryRun){r({command:`cf sql query`,method:`POST`,url:`https://api.cloudflare.com/client/v4/analytics/sql`,pathParams:{},bodyKind:d.file===void 0?`json`:`octet-stream`,body:d.file===void 0?d.body===void 0?c({scope:{accountTag:l(d[`scope-account`],`scope-account`,`text`),zoneTag:l(d[`scope-zone`],`scope-zone`,`text`)},time_range:{end:l(d[`time-until`],`time-until`,`text`),start:l(d[`time-since`],`time-since`,`text`)},query:d.query}):o(d.body):{file:d.file}});return}let a=d.file===void 0?d.body===void 0?void 0:o(d.body):void 0,f=await t(d);if(d.file!==void 0){let t=u(d.file),r=await i(`Loading`,async()=>e(f,`POST`,`/analytics/sql`,{body:t,headers:{"Content-Type":`text/plain`}}));n(r,{successLabel:`Loaded`});return}if(d.body!==void 0){let t=a,r=await i(`Loading`,async()=>e(f,`POST`,`/analytics/sql`,{body:t}));n(r,{successLabel:`Loaded`});return}let p={};d[`scope-account`]!==void 0&&s(p,[`scope`,`accountTag`],l(d[`scope-account`],`scope-account`,`text`)),d[`scope-zone`]!==void 0&&s(p,[`scope`,`zoneTag`],l(d[`scope-zone`],`scope-zone`,`text`)),d[`time-until`]!==void 0&&s(p,[`time_range`,`end`],l(d[`time-until`],`time-until`,`text`)),d[`time-since`]!==void 0&&s(p,[`time_range`,`start`],l(d[`time-since`],`time-since`,`text`)),d.query!==void 0&&(p.query=d.query);let m=await i(`Loading`,async()=>e(f,`POST`,`/analytics/sql`,{body:p}));n(m,{successLabel:`Loaded`})})},g={command:`sql`,describe:`sql`,builder:e=>e.command(p).command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{g as default};