cf 1.0.0-beta.15 → 1.0.0-beta.17

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 (250) hide show
  1. package/dist/_meta/commands.json +3797 -3220
  2. package/dist/_meta/hand-written-commands.json +2 -2
  3. package/dist/_meta/schemas.json +4768 -4250
  4. package/dist/{abuse-reports-CnQBtN1G.mjs → abuse-reports-C4LxDvUM.mjs} +1 -1
  5. package/dist/{access-BzmXSwzj.mjs → access-DnWW2AAT.mjs} +1 -1
  6. package/dist/{account-tags-2qPWbW17.mjs → account-tags-zvHRQZxb.mjs} +1 -1
  7. package/dist/{accounts-B0Byg-AV.mjs → accounts-8UcHNm3S.mjs} +39 -39
  8. package/dist/{acm-DgAu0cnk.mjs → acm-qRM3iy4Z.mjs} +3 -3
  9. package/dist/{addressing-J1oa0ML2.mjs → addressing-CAb8z2Dq.mjs} +14 -14
  10. package/dist/{agent-memory-4KGou-tm.mjs → agent-memory-oIUP4ZV5.mjs} +1 -1
  11. package/dist/{ai-WY7wVQfA.mjs → ai-DnhytGdc.mjs} +1 -1
  12. package/dist/{ai-audit-D38HaEoZ.mjs → ai-audit-B7_5EOcN.mjs} +1 -1
  13. package/dist/{ai-gateway-C0gIipT8.mjs → ai-gateway-b3FFu6UV.mjs} +6 -6
  14. package/dist/{ai-search-ClwnPU-9.mjs → ai-search-CtfW5fzl.mjs} +25 -25
  15. package/dist/{ai-security-BIsvFPYV.mjs → ai-security-KUs94UW-.mjs} +1 -1
  16. package/dist/{alerting-MHhv28oO.mjs → alerting-CCmyEPzN.mjs} +1 -1
  17. package/dist/{analytics-BfBz7bqB.mjs → analytics-BAvBj6qx.mjs} +1 -1
  18. package/dist/{analytics_engine-CXVdBF1n.mjs → analytics-engine-DAJp89gM.mjs} +2 -2
  19. package/dist/{api-security-DUCfcdC1.mjs → api-security-BItVQymb.mjs} +2 -2
  20. package/dist/{argo-CUlzI4v3.mjs → argo-DsJCvfml.mjs} +1 -1
  21. package/dist/{artifacts-BLfWGzBg.mjs → artifacts-DzHXeah6.mjs} +1 -1
  22. package/dist/audit-logs-D9XxsVZm.mjs +4 -0
  23. package/dist/{auth-CGRemu5W.mjs → auth-C530fHKQ.mjs} +1 -1
  24. package/dist/auth-Ccm5viK_.mjs +2 -0
  25. package/dist/{auth-C6u9qIGO.mjs → auth-MNz2D-PD.mjs} +1 -1
  26. package/dist/{auth-token-DkkYg4DP.mjs → auth-token-Cw4c0y89.mjs} +1 -1
  27. package/dist/{autoconfig-B0ESZ8DJ.mjs → autoconfig-9po_tqsS.mjs} +1 -1
  28. package/dist/{basin-catalog-CrKRYJ0b.mjs → basin-catalog-DcMiZV9J.mjs} +1 -1
  29. package/dist/{billing-NxehgXrR.mjs → billing-COgAWTYh.mjs} +7 -7
  30. package/dist/{bot-management-C993iQKL.mjs → bot-management-Dx3lh9Fi.mjs} +1 -1
  31. package/dist/{botnet-feed-CZ4vYk5y.mjs → botnet-feed-C8496Nhl.mjs} +1 -1
  32. package/dist/{brand-protection-ADVgIi0l.mjs → brand-protection-B0p8Sv6s.mjs} +1 -1
  33. package/dist/browser-run-ChXohmNG.mjs +42 -0
  34. package/dist/build-BRJnyeu8.mjs +2 -0
  35. package/dist/{build-sBpqm9ga.mjs → build-i8l2qGVZ.mjs} +1 -1
  36. package/dist/{builds-DqtiTH7p.mjs → builds-DmEFTQTa.mjs} +1 -1
  37. package/dist/{cache-hX5QxmI0.mjs → cache-BUh85NRr.mjs} +1 -1
  38. package/dist/{certificate-authorities-BOcybjc1.mjs → certificate-authorities-BTLdA7EQ.mjs} +1 -1
  39. package/dist/chunk-JP6R7L72-C0kFUelb.mjs +2 -0
  40. package/dist/cli-DJhpXf38.mjs +6 -0
  41. package/dist/{client-certificates-Bez_ArKE.mjs → client-certificates-B3UxH_Au.mjs} +1 -1
  42. package/dist/{client-side-security-CSmA50Bv.mjs → client-side-security-km3-4L_4.mjs} +1 -1
  43. package/dist/{cloud-connector-0Wivqi7S.mjs → cloud-connector-BoKFprDD.mjs} +1 -1
  44. package/dist/{cloudforce-one-J-rU6k1U.mjs → cloudforce-one-DN5N3C3w.mjs} +21 -21
  45. package/dist/{command-BCJN-ZM2.mjs → command-B694oLDo.mjs} +1 -1
  46. package/dist/{command-BG-kLOnS.mjs → command-Bmee6uwe.mjs} +1 -1
  47. package/dist/{command-BKDbbA-L.mjs → command-CAs3SxlI.mjs} +1 -1
  48. package/dist/{command-DIs-Nqtl.mjs → command-CCq-Z2Ua.mjs} +1 -1
  49. package/dist/{command-Bdy69UFU.mjs → command-CbQFbfps.mjs} +1 -1
  50. package/dist/{command-0BOb1pgV.mjs → command-CiApsRql.mjs} +1 -1
  51. package/dist/{command-CKW6UhTh.mjs → command-D1JR8Fb7.mjs} +1 -1
  52. package/dist/{command-DPn5ANHs.mjs → command-DerHAjQL.mjs} +1 -1
  53. package/dist/{command-BIsI-mMX.mjs → command-RC9WM5jq.mjs} +1 -1
  54. package/dist/{command-BWQIKu6I.mjs → command-rx0Kb5pn.mjs} +1 -1
  55. package/dist/{completions-CpNGTlUX.mjs → completions-11latun5.mjs} +1 -1
  56. package/dist/{connector-interrupts-CH-DaLuo.mjs → connector-interrupts-wvQcZsO1.mjs} +1 -1
  57. package/dist/{connector-telemetry-events-X3Fod9nl.mjs → connector-telemetry-events-C0GGCIQk.mjs} +1 -1
  58. package/dist/{connector-telemetry-snapshots-D-WR4npQ.mjs → connector-telemetry-snapshots-ZXzsFgea.mjs} +1 -1
  59. package/dist/{connectors-CORKD31m.mjs → connectors-DXIUG4Zi.mjs} +1 -1
  60. package/dist/{containers-BboUbx3k.mjs → containers-DCH6MFjY.mjs} +5 -5
  61. package/dist/{containers-Di3_Vopq.mjs → containers-WMWKhLkp.mjs} +1 -1
  62. package/dist/{content-scan-DXGREAXa.mjs → content-scan-CRDmR7rD.mjs} +1 -1
  63. package/dist/{context-A6T-NKPI.mjs → context-q-6bMSL-.mjs} +1 -1
  64. package/dist/{cps-1BoOLtTq.mjs → cps-Due0P5IW.mjs} +1 -1
  65. package/dist/csam-scanner-DvLrPw45.mjs +10 -0
  66. package/dist/{ct-alerting-DlH4ILQo.mjs → ct-alerting-BtEGkRJi.mjs} +1 -1
  67. package/dist/{custom-certificates-zJqJZ2Th.mjs → custom-certificates-CMLXTTEc.mjs} +4 -4
  68. package/dist/{custom-csrs-DoLIGqYL.mjs → custom-csrs-BV017SqE.mjs} +3 -3
  69. package/dist/{custom-hostnames-YfV-aoAK.mjs → custom-hostnames-DI_dFaof.mjs} +6 -6
  70. package/dist/{custom-nameservers-BV43gmgt.mjs → custom-nameservers-BLoE8VGG.mjs} +1 -1
  71. package/dist/{custom-pages-CoOU1Cdx.mjs → custom-pages-ubava9Qm.mjs} +6 -6
  72. package/dist/{d1-DujBmzLa.mjs → d1-Dbs8HItA.mjs} +1 -1
  73. package/dist/{dcv-delegation-CPLsVYOl.mjs → dcv-delegation-sGGt6UU_.mjs} +1 -1
  74. package/dist/{deploy-wNujfGUJ.mjs → deploy-5utIiOMN.mjs} +1 -1
  75. package/dist/{deploy-context-tEhwEXnA.mjs → deploy-context-C0iVbWRG.mjs} +1 -1
  76. package/dist/{deploy-input-BqJ7GVZ-.mjs → deploy-input-KK6yyBN_.mjs} +1 -1
  77. package/dist/{dev-EtnMYA7K.mjs → dev-CnoMHxf4.mjs} +1 -1
  78. package/dist/{diagnostics-B3TYPVRi.mjs → diagnostics-C9B07eJY.mjs} +1 -1
  79. package/dist/{dls-CWm1HRF0.mjs → dls-lbM3i4x-.mjs} +7 -7
  80. package/dist/{dns-CjAFU7Z9.mjs → dns-QTMPGYMa.mjs} +5 -5
  81. package/dist/{dns-firewall-BooBP9ap.mjs → dns-firewall-Bfv0S44I.mjs} +1 -1
  82. package/dist/{docs-C5XB7HdG.mjs → docs-bV3hPwQL.mjs} +1 -1
  83. package/dist/{durable-objects-CSrMQDCE.mjs → durable-objects-0JvGTV27.mjs} +1 -1
  84. package/dist/{email-auth-Bp1Mui-n.mjs → email-auth-PzRqG0ex.mjs} +1 -1
  85. package/dist/{email-routing-CVF6SwQt.mjs → email-routing-BgHL0Rbz.mjs} +4 -4
  86. package/dist/{email-security-mYZtazae.mjs → email-security-CSTKIecn.mjs} +1 -1
  87. package/dist/{email-sending-BqaKU_Xu.mjs → email-sending-BSwuAir8.mjs} +14 -14
  88. package/dist/field-extractors-B_lFnwaL.mjs +9 -0
  89. package/dist/{firewall-DgTDsYOt.mjs → firewall-BsZxVitA.mjs} +11 -11
  90. package/dist/{flagship-Db3PxxyZ.mjs → flagship-qBohOZaM.mjs} +1 -1
  91. package/dist/{fraud-BEOQczy8.mjs → fraud-vGNdrSm-.mjs} +1 -1
  92. package/dist/{google-tag-gateway-DjLQ9wo0.mjs → google-tag-gateway-BHdOg4VW.mjs} +1 -1
  93. package/dist/{healthchecks-C3ScnKss.mjs → healthchecks-DAYYLZ6u.mjs} +7 -7
  94. package/dist/{hostnames-DU0k-xO9.mjs → hostnames-CLlaMqHu.mjs} +1 -1
  95. package/dist/{hyperdrive-IpCCLCRd.mjs → hyperdrive-CXTqaIqk.mjs} +3 -3
  96. package/dist/{iam-96CYM8Vw.mjs → iam-Dl_n_Lqq.mjs} +1 -1
  97. package/dist/{images-AB9EgZgT.mjs → images-vMtXk2Rf.mjs} +1 -1
  98. package/dist/index.mjs +1 -1
  99. package/dist/{init-D2nPoW4f.mjs → init-_7djeBVw.mjs} +1 -1
  100. package/dist/{intel-BKb4RLvS.mjs → intel-Bq4GGXv-.mjs} +1 -1
  101. package/dist/{ips-z9APCV_b.mjs → ips-BcvZS46g.mjs} +1 -1
  102. package/dist/{k2-Bv-HiJ29.mjs → k2-DL4hrVTj.mjs} +1 -1
  103. package/dist/{keyless-certificates-ChgSGHq4.mjs → keyless-certificates-0pzjkZb6.mjs} +4 -4
  104. package/dist/{keys-BhngDsDa.mjs → keys-BSV5IXdU.mjs} +1 -1
  105. package/dist/{kv-CB5MQVGP.mjs → kv-BLo9wMgb.mjs} +3 -3
  106. package/dist/{lazy-command-CaZ1kdlW.mjs → lazy-command-CRcT6Dx-.mjs} +1 -1
  107. package/dist/{leaked-credential-checks-Bsi2WpSU.mjs → leaked-credential-checks-Dx4RXMyN.mjs} +3 -3
  108. package/dist/{load-balancers-0gXZNCeI.mjs → load-balancers-CCCWoQXv.mjs} +40 -40
  109. package/dist/{login-CiQGR8ha.mjs → login-DT6Q1UJw.mjs} +1 -1
  110. package/dist/{login-Ik98G4K6.mjs → login-Du_W6b9o.mjs} +1 -1
  111. package/dist/{logo-matches-DmoF5Otu.mjs → logo-matches-C-1J0Oc3.mjs} +1 -1
  112. package/dist/{logos-BL6ohIMH.mjs → logos-BuhvSu_H.mjs} +1 -1
  113. package/dist/{logpush-UVopW68t.mjs → logpush-DgZtF9vG.mjs} +6 -6
  114. package/dist/{logs-BVfxiEiM.mjs → logs-CaKOk-1v.mjs} +1 -1
  115. package/dist/{magic-cloud-networking-B5S3aM6f.mjs → magic-cloud-networking-CKxXYT8r.mjs} +1 -1
  116. package/dist/{magic-network-monitoring-CDSJPP47.mjs → magic-network-monitoring-BykFGQCz.mjs} +1 -1
  117. package/dist/{magic-transit-TcDTKM43.mjs → magic-transit-DYULsrUP.mjs} +1 -1
  118. package/dist/{managed-defense-C88HL0pg.mjs → managed-defense-DIb_uN25.mjs} +5 -5
  119. package/dist/{managed-transforms-Ja41Tahl.mjs → managed-transforms-an3wQ0DW.mjs} +1 -1
  120. package/dist/{matches-BL_Y-9Yq.mjs → matches-DkLSWb5X.mjs} +1 -1
  121. package/dist/{mcp-BWp5Q09R.mjs → mcp-BcV1XqE8.mjs} +1 -1
  122. package/dist/{mesh-lFPLRWhV.mjs → mesh-CSSlZ-0F.mjs} +1 -1
  123. package/dist/{migrate-6e5mJ79R.mjs → migrate-DerOyuv2.mjs} +1 -1
  124. package/dist/{monetization-BIc4Bwo2.mjs → monetization-B-nJ0SyI.mjs} +1 -1
  125. package/dist/{mtls-certificates-CVBw-Jli.mjs → mtls-certificates-ukwDz6Lc.mjs} +1 -1
  126. package/dist/{network-Wig0qbaC.mjs → network-ZzxQ_Dcz.mjs} +1 -1
  127. package/dist/{network-interconnects-C16z1HuQ.mjs → network-interconnects-CI9NXQpe.mjs} +1 -1
  128. package/dist/{o11y-Bhy4qDRm.mjs → o11y-LG6Y9LUZ.mjs} +2 -2
  129. package/dist/{oauth-oWaW7ICv.mjs → oauth-Bx693Af5.mjs} +1 -1
  130. package/dist/{oauth-CfEedDZi.mjs → oauth-CP82E1_0.mjs} +1 -1
  131. package/dist/{oauth-clients-eXjmK5yf.mjs → oauth-clients-BA30rTEl.mjs} +1 -1
  132. package/dist/{oauth-scopes-DZWn50EA.mjs → oauth-scopes-hseWES1v.mjs} +1 -1
  133. package/dist/open-PCXX3ZDZ-5J5IU2MX-CKla-jDt.mjs +4 -0
  134. package/dist/{organization-QdAQTrKa.mjs → organization-DMr_z6n4.mjs} +3 -3
  135. package/dist/{organizations-CgAQYdK5.mjs → organizations-CcgZPmFl.mjs} +1 -1
  136. package/dist/{origin-ca-certificates-BklXqp8X.mjs → origin-ca-certificates-BZxUbB5N.mjs} +1 -1
  137. package/dist/{origin-post-quantum-encryption-Dg16ueT4.mjs → origin-post-quantum-encryption-BhdlaolV.mjs} +1 -1
  138. package/dist/{origin-tls-client-auth-d8bDU5zU.mjs → origin-tls-client-auth-DzbZvtmi.mjs} +6 -6
  139. package/dist/{page-rules-CgMkC6YR.mjs → page-rules-DFfqfllI.mjs} +5 -5
  140. package/dist/{pages-CkBtOOf8.mjs → pages-BkcL5rC4.mjs} +9 -9
  141. package/dist/{pay-per-crawl-CnGXOWyz.mjs → pay-per-crawl-Dulm7Xy5.mjs} +1 -1
  142. package/dist/{pay-per-use-HbfxpATr.mjs → pay-per-use-C_HxhpM4.mjs} +1 -1
  143. package/dist/{pipelines-CnO9CCs0.mjs → pipelines-DUMIVwof.mjs} +1 -1
  144. package/dist/{precursor-Bc55XJdQ.mjs → precursor-DsGbA_YJ.mjs} +1 -1
  145. package/dist/{previews-C7vZrajd.mjs → previews-Cma3-M7K.mjs} +1 -1
  146. package/dist/{progress-D5po7ScB.mjs → progress-DaQ4MzBI.mjs} +1 -1
  147. package/dist/{prompt-BAJpE3jV.mjs → prompt-KWYZvJWM.mjs} +1 -1
  148. package/dist/{queries-BJAH4B74.mjs → queries-DoyhspQf.mjs} +1 -1
  149. package/dist/{queues-D4G8vvwi.mjs → queues-BPxTU2rU.mjs} +4 -4
  150. package/dist/{r2-CJ8rD6Jb.mjs → r2-CQt4S7o7.mjs} +4 -4
  151. package/dist/{radar-DgaxOdcd.mjs → radar-CALpR1vq.mjs} +1 -1
  152. package/dist/{raw-fetch-yY-wX5Xx.mjs → raw-fetch-Cy09TjHc.mjs} +1 -1
  153. package/dist/{realtime-DU09m7L7.mjs → realtime-BiHKBoI4.mjs} +6 -6
  154. package/dist/{registrar-Cj7OfvGs.mjs → registrar-gERQ3b85.mjs} +1 -1
  155. package/dist/{registrar-sandbox-CA0Mua-j.mjs → registrar-sandbox-BttFwYqE.mjs} +1 -1
  156. package/dist/reporting-8aRJD5HX.mjs +14 -0
  157. package/dist/{request-headers-D_eQn93b.mjs → request-headers-CqfJOkpO.mjs} +1 -1
  158. package/dist/{request-tracers-VBD4R3s3.mjs → request-tracers-DcnwQg3K.mjs} +1 -1
  159. package/dist/{resource-sharing-BtUF3psS.mjs → resource-sharing-uVVpMW0w.mjs} +1 -1
  160. package/dist/{resource-tagging--90INP8_.mjs → resource-tagging-SlsUtLsq.mjs} +1 -1
  161. package/dist/{rules-CcwPngVo.mjs → rules-CFOuN3t2.mjs} +10 -10
  162. package/dist/{rulesets-CfdruY82.mjs → rulesets-DkhV2Hny.mjs} +15 -15
  163. package/dist/{rum-RLkdfSL7.mjs → rum-BnMW0Tlb.mjs} +1 -1
  164. package/dist/run-CHNyLZLG.mjs +2 -0
  165. package/dist/{run-DASYqJsY.mjs → run-Clc3P2u7.mjs} +1 -1
  166. package/dist/{schema-flags-CShtn7ya.mjs → schema-flags-b096XMpt.mjs} +1 -1
  167. package/dist/{scim-BZYsTPIL.mjs → scim-tvZm6A-r.mjs} +1 -1
  168. package/dist/{secrets-store-C_-FkSH_.mjs → secrets-store-DuNxSh1_.mjs} +1 -1
  169. package/dist/{security-insights-BVBEaZmD.mjs → security-insights-C17c9ZYZ.mjs} +1 -1
  170. package/dist/{security-txt--IoHrHee.mjs → security-txt-D4pRk7-w.mjs} +1 -1
  171. package/dist/{shared-zNQNv1im.mjs → shared-zePemxHi.mjs} +1 -1
  172. package/dist/{smart-shield-CByC4_60.mjs → smart-shield-2egm1Vaw.mjs} +5 -5
  173. package/dist/{snippets-DB-jiZAV.mjs → snippets-BIcZ6vSW.mjs} +1 -1
  174. package/dist/{spawn-DQttFH05.mjs → spawn-BW2bJmKO.mjs} +1 -1
  175. package/dist/{spectrum-Bs2g1BmK.mjs → spectrum-DjDX0geK.mjs} +9 -9
  176. package/dist/{speed-Bq4evEnJ.mjs → speed-DiPoFJMm.mjs} +1 -1
  177. package/dist/{sql-XGci7hZC.mjs → sql-DLjCt_R3.mjs} +1 -1
  178. package/dist/{src-GiuwAT55.mjs → src-CutrsNl4.mjs} +7 -7
  179. package/dist/{ssl-KJTLW1NR.mjs → ssl-vNzK0c9S.mjs} +5 -5
  180. package/dist/{stream-BotgYspF.mjs → stream-uhn_Zsni.mjs} +8 -8
  181. package/dist/{submit-C5VytaHP.mjs → submit-C3suIDBX.mjs} +1 -1
  182. package/dist/{tags-3Hq-B9qp.mjs → tags-Dy2jG-Dt.mjs} +1 -1
  183. package/dist/telemetry-Bdv5LZZs.mjs +2 -0
  184. package/dist/{telemetry-3FJOXl_C.mjs → telemetry-DYjsavEr.mjs} +1 -1
  185. package/dist/{tenant-BgX5onPc.mjs → tenant-DK88yQM4.mjs} +1 -1
  186. package/dist/{tenant-custom-nameservers-BVG8v1Xo.mjs → tenant-custom-nameservers-BZ1JD1Yf.mjs} +2 -2
  187. package/dist/{tunnels-CThOI3qH.mjs → tunnels-DjbomhCa.mjs} +3 -3
  188. package/dist/{turnstile-BgZaUx-g.mjs → turnstile-DXrbEy2A.mjs} +1 -1
  189. package/dist/{update-check-jb89ih_g.mjs → update-check-BhhtSXVZ.mjs} +1 -1
  190. package/dist/update-check-Dld7rbLd.mjs +2 -0
  191. package/dist/update-check-worker.mjs +1 -1
  192. package/dist/{url-info-DQERN0Xq.mjs → url-info-a0mY4UsC.mjs} +1 -1
  193. package/dist/{url-normalization-Cb1hofqv.mjs → url-normalization-DiwpDIhc.mjs} +1 -1
  194. package/dist/{url-scanner-gHgx1bW7.mjs → url-scanner-D0egjBe5.mjs} +1 -1
  195. package/dist/{user-CdKzIuSi.mjs → user-DDH9lxf5.mjs} +58 -58
  196. package/dist/{values-EwA8Sx0w.mjs → values-Bfr5-bL6.mjs} +1 -1
  197. package/dist/{vectorize-DejgIJIv.mjs → vectorize-DaT3amFV.mjs} +1 -1
  198. package/dist/version-CAuKDZAG.mjs +2 -0
  199. package/dist/{waiting-rooms-BNR1HvAP.mjs → waiting-rooms-BGMpu9gS.mjs} +18 -18
  200. package/dist/{web-assets-iglnzkTV.mjs → web-assets-NqNglLSI.mjs} +1 -1
  201. package/dist/{web3-JBUU6IVt.mjs → web3-UnCUuIfB.mjs} +11 -11
  202. package/dist/{workers-CDp4kLTJ.mjs → workers-DfA9ugmb.mjs} +2 -2
  203. package/dist/{workers-builds-CSb9Dglt.mjs → workers-builds-Cy6fdtm5.mjs} +1 -1
  204. package/dist/{workers-for-platforms-D4srNZvt.mjs → workers-for-platforms-JscCHivQ.mjs} +1 -1
  205. package/dist/{workers-vpc-LPC8TadH.mjs → workers-vpc-FDZQBqOu.mjs} +1 -1
  206. package/dist/{workflows-DN_VqWJC.mjs → workflows-Dq-k81hU.mjs} +1 -1
  207. package/dist/wrangler-migration-R9TQ_4Qd.mjs +946 -0
  208. package/dist/{zaraz-DDErl5yc.mjs → zaraz-Dpr1pLDx.mjs} +1 -1
  209. package/dist/{zero-trust-M88XX3uD.mjs → zero-trust-CZ685QhO.mjs} +27 -27
  210. package/dist/{zone-BsGvedmN.mjs → zone-DcZIUTWt.mjs} +1 -1
  211. package/dist/{zones-l_sRKrVl.mjs → zones-BVdvYUCv.mjs} +3 -3
  212. package/package.json +11 -10
  213. package/dist/alerts-BSON-vFh.mjs +0 -2
  214. package/dist/audit-logs-CsfIm2QS.mjs +0 -4
  215. package/dist/auth-8Sm4uLGM.mjs +0 -2
  216. package/dist/autorag-kNrLiqDX.mjs +0 -2
  217. package/dist/brands-bBJgbbOH.mjs +0 -2
  218. package/dist/browser-extension-C1_fcw7h.mjs +0 -2
  219. package/dist/browser-run-CEptKZYl.mjs +0 -42
  220. package/dist/build-Bm6kGyzo.mjs +0 -2
  221. package/dist/clear-BW9vLgI3.mjs +0 -2
  222. package/dist/cli-R8h3OKZI.mjs +0 -6
  223. package/dist/connector-telemetry-events-latest-BQdOvbWh.mjs +0 -2
  224. package/dist/connector-telemetry-snapshots-latest-CtdN_dGu.mjs +0 -2
  225. package/dist/csamScanner-CHfbfeup.mjs +0 -10
  226. package/dist/domain-info-BkcBcyfF.mjs +0 -2
  227. package/dist/fieldExtractors-CAGZVmYg.mjs +0 -9
  228. package/dist/health-CTaCeVyC.mjs +0 -2
  229. package/dist/internal-BYS7hO8c.mjs +0 -2
  230. package/dist/live-BJE_YWE1.mjs +0 -2
  231. package/dist/r2-data-catalog-BRo-Rx2I.mjs +0 -2
  232. package/dist/rate-limit-analytics-BiRyU0Xd.mjs +0 -2
  233. package/dist/rate-limits-Cr2zpncO.mjs +0 -2
  234. package/dist/ready-B3pLxnjc.mjs +0 -2
  235. package/dist/recent-submissions-JLOvuZq-.mjs +0 -2
  236. package/dist/refute-Dp3VodMn.mjs +0 -2
  237. package/dist/reporting-3kDVF5c8.mjs +0 -14
  238. package/dist/run-CUNhH5CQ.mjs +0 -2
  239. package/dist/scan-logo-3Zr6CDJB.mjs +0 -2
  240. package/dist/scan-page-CxeudOzj.mjs +0 -2
  241. package/dist/search-B_P5ZTQj.mjs +0 -2
  242. package/dist/signed-url-D5RwvrQq.mjs +0 -2
  243. package/dist/submission-info-_t78q2OE.mjs +0 -2
  244. package/dist/telemetry-BhKfwxyh.mjs +0 -2
  245. package/dist/total-queries-CPrKEciQ.mjs +0 -2
  246. package/dist/tracked-domains-CTRItgFT.mjs +0 -2
  247. package/dist/update-check-Yy7Ivq2V.mjs +0 -2
  248. package/dist/verify-5KcvRk-q.mjs +0 -2
  249. package/dist/version-B6MnUIqV.mjs +0 -2
  250. package/dist/wrangler-migration-DxTB5yPT.mjs +0 -2
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-C6u9qIGO.mjs";import{i as n}from"./context-A6T-NKPI.mjs";import{t as r}from"./output-Co4xdFf6.mjs";import{t as i}from"./dry-run-C2KjGX10.mjs";import{t as a}from"./progress-D5po7ScB.mjs";import{t as o}from"./run-DASYqJsY.mjs";import"./telemetry-BhKfwxyh.mjs";import{n as s,r as c,t as l}from"./body-parser-DkHKPkJ7.mjs";import{n as u}from"./input-validation-D7z60HJH.mjs";import{a as d,n as f}from"./prompt-BAJpE3jV.mjs";var p={method:`POST`,path:t=>e`/zones/${t.zone_id}/smart_shield/cache_reserve_clear`};function m(e){return e.usage(`$0 smart-shield cache-reserve-clear clear
2
+ import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-MNz2D-PD.mjs";import{i as n}from"./context-q-6bMSL-.mjs";import{t as r}from"./output-Co4xdFf6.mjs";import{t as i}from"./dry-run-C2KjGX10.mjs";import{t as a}from"./progress-DaQ4MzBI.mjs";import{t as o}from"./run-Clc3P2u7.mjs";import"./telemetry-Bdv5LZZs.mjs";import{n as s,r as c,t as l}from"./body-parser-DkHKPkJ7.mjs";import{n as u}from"./input-validation-D7z60HJH.mjs";import{a as d,n as f}from"./prompt-KWYZvJWM.mjs";var p={method:`POST`,path:t=>e`/zones/${t.zone_id}/smart_shield/cache_reserve_clear`};function m(e){return e.usage(`$0 smart-shield cache-reserve-clear clear
3
3
 
4
4
  You can use Cache Reserve Clear to clear your Cache Reserve, but you must first disable Cache Reserve. In most cases, this will be accomplished within 24 hours. You cannot re-enable Cache Reserve while this process is ongoing. Keep in mind that you cannot undo or cancel this operation.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const h={command:`clear`,describe:`Start Cache Reserve Clear`,builder:m,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 f({force:!!e.force,message:`This operation permanently clears Cache Reserve for this zone and cannot be undone.`})){process.stderr.write(`Aborted.
5
5
  `);return}let c=await a(`Deleting`,async()=>o.send(p,{zone_id:s}));r(c,{successLabel:`Deleted`})})};var g={method:`GET`,path:t=>e`/zones/${t.zone_id}/smart_shield/cache_reserve_clear`};function _(e){return e.usage(`$0 smart-shield cache-reserve-clear status
@@ -10,15 +10,15 @@ Retrieve Smart Shield Settings.`).option(`dry-run`,{type:`boolean`,description:`
10
10
 
11
11
  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-method`,{type:`string`,description:`The HTTP method to use for the health check.`,choices:[`GET`,`HEAD`]}).coerce(`http-config-method`,e=>u(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=>u(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 T={command:`create`,describe:`Create Health Check`,builder:w,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?l({address:u(e.address,`address`,`text`),check_regions:e[`check-regions`],consecutive_fails:e[`consecutive-fails`],consecutive_successes:e[`consecutive-successes`],description:u(e.description,`description`,`text`),http_config:{allow_insecure:e[`http-config-allow-insecure`],expected_body:u(e[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:e[`http-config-expected-codes`],follow_redirects:e[`http-config-follow-redirects`],method:e[`http-config-method`],path:u(e[`http-config-path`],`http-config-path`,`text`),port:e[`http-config-port`]},interval:e.interval,name:u(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:u(e.type,`type`,`text`)}):s(e.body)});return}let o=await t(e),c=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=c,e.body){let t=s(e.body),n=await a(`Creating`,async()=>o.send(C,{body:t,zone_id:c}));r(n,{successLabel:`Created`});return}e.address===void 0&&(e.address=await d(`address`,`The hostname or IP address of the origin server to run health checks on.`)),e.name===void 0&&(e.name=await d(`name`,`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`));let f=l({address:u(e.address,`address`,`text`),check_regions:e[`check-regions`],consecutive_fails:e[`consecutive-fails`],consecutive_successes:e[`consecutive-successes`],description:u(e.description,`description`,`text`),http_config:{allow_insecure:e[`http-config-allow-insecure`],expected_body:u(e[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:e[`http-config-expected-codes`],follow_redirects:e[`http-config-follow-redirects`],method:e[`http-config-method`],path:u(e[`http-config-path`],`http-config-path`,`text`),port:e[`http-config-port`]},interval:e.interval,name:u(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:u(e.type,`type`,`text`)}),p=await a(`Creating`,async()=>o.send(C,{body:f,zone_id:c}));r(p,{successLabel:`Created`})})};var E={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/smart_shield/healthchecks/${t.healthcheck_id}`};function D(e){return e.usage(`$0 smart-shield health-checks delete <healthcheck-id>
12
12
 
13
- 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 O={command:`delete <healthcheck-id>`,describe:`Delete Health Check`,builder:D,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:{"healthcheck-id":String(e[`healthcheck-id`]??``),"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 f({force:!!e.force})){process.stderr.write(`Aborted.
13
+ 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 O={command:`delete <healthcheck-id>`,describe:`Delete Health Check`,builder:D,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 f({force:!!e.force})){process.stderr.write(`Aborted.
14
14
  `);return}let c=await a(`Deleting`,async()=>o.send(E,{zone_id:s,healthcheck_id:e[`healthcheck-id`]}));r(c,{successLabel:`Deleted`})})};var k={method:`PATCH`,path:t=>e`/zones/${t.zone_id}/smart_shield/healthchecks/${t.healthcheck_id}`,body:`json`};function A(e){return e.usage(`$0 smart-shield health-checks edit <healthcheck-id>
15
15
 
16
- 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-method`,{type:`string`,description:`The HTTP method to use for the health check.`,choices:[`GET`,`HEAD`]}).coerce(`http-config-method`,e=>u(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=>u(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 j={command:`edit <healthcheck-id>`,describe:`Patch Health Check`,builder:A,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:{"healthcheck-id":String(e[`healthcheck-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({address:u(e.address,`address`,`text`),check_regions:e[`check-regions`],consecutive_fails:e[`consecutive-fails`],consecutive_successes:e[`consecutive-successes`],description:u(e.description,`description`,`text`),http_config:{allow_insecure:e[`http-config-allow-insecure`],expected_body:u(e[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:e[`http-config-expected-codes`],follow_redirects:e[`http-config-follow-redirects`],method:e[`http-config-method`],path:u(e[`http-config-path`],`http-config-path`,`text`),port:e[`http-config-port`]},interval:e.interval,name:u(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:u(e.type,`type`,`text`)}):s(e.body)});return}let o=await t(e),c=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=c,e.body){let t=s(e.body),n=await a(`Updating`,async()=>o.send(k,{body:t,zone_id:c,healthcheck_id:e[`healthcheck-id`]}));r(n,{successLabel:`Updated`});return}e.address===void 0&&(e.address=await d(`address`,`The hostname or IP address of the origin server to run health checks on.`)),e.name===void 0&&(e.name=await d(`name`,`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`));let f=l({address:u(e.address,`address`,`text`),check_regions:e[`check-regions`],consecutive_fails:e[`consecutive-fails`],consecutive_successes:e[`consecutive-successes`],description:u(e.description,`description`,`text`),http_config:{allow_insecure:e[`http-config-allow-insecure`],expected_body:u(e[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:e[`http-config-expected-codes`],follow_redirects:e[`http-config-follow-redirects`],method:e[`http-config-method`],path:u(e[`http-config-path`],`http-config-path`,`text`),port:e[`http-config-port`]},interval:e.interval,name:u(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:u(e.type,`type`,`text`)}),p=await a(`Updating`,async()=>o.send(k,{body:f,zone_id:c,healthcheck_id:e[`healthcheck-id`]}));r(p,{successLabel:`Updated`})})};var M={method:`GET`,path:t=>e`/zones/${t.zone_id}/smart_shield/healthchecks/${t.healthcheck_id}`};function N(e){return e.usage(`$0 smart-shield health-checks get <healthcheck-id>
16
+ 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-method`,{type:`string`,description:`The HTTP method to use for the health check.`,choices:[`GET`,`HEAD`]}).coerce(`http-config-method`,e=>u(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=>u(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 j={command:`edit <healthcheck-id>`,describe:`Patch Health Check`,builder:A,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?l({address:u(e.address,`address`,`text`),check_regions:e[`check-regions`],consecutive_fails:e[`consecutive-fails`],consecutive_successes:e[`consecutive-successes`],description:u(e.description,`description`,`text`),http_config:{allow_insecure:e[`http-config-allow-insecure`],expected_body:u(e[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:e[`http-config-expected-codes`],follow_redirects:e[`http-config-follow-redirects`],method:e[`http-config-method`],path:u(e[`http-config-path`],`http-config-path`,`text`),port:e[`http-config-port`]},interval:e.interval,name:u(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:u(e.type,`type`,`text`)}):s(e.body)});return}let o=await t(e),c=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=c,e.body){let t=s(e.body),n=await a(`Updating`,async()=>o.send(k,{body:t,zone_id:c,healthcheck_id:e[`healthcheck-id`]}));r(n,{successLabel:`Updated`});return}e.address===void 0&&(e.address=await d(`address`,`The hostname or IP address of the origin server to run health checks on.`)),e.name===void 0&&(e.name=await d(`name`,`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`));let f=l({address:u(e.address,`address`,`text`),check_regions:e[`check-regions`],consecutive_fails:e[`consecutive-fails`],consecutive_successes:e[`consecutive-successes`],description:u(e.description,`description`,`text`),http_config:{allow_insecure:e[`http-config-allow-insecure`],expected_body:u(e[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:e[`http-config-expected-codes`],follow_redirects:e[`http-config-follow-redirects`],method:e[`http-config-method`],path:u(e[`http-config-path`],`http-config-path`,`text`),port:e[`http-config-port`]},interval:e.interval,name:u(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:u(e.type,`type`,`text`)}),p=await a(`Updating`,async()=>o.send(k,{body:f,zone_id:c,healthcheck_id:e[`healthcheck-id`]}));r(p,{successLabel:`Updated`})})};var M={method:`GET`,path:t=>e`/zones/${t.zone_id}/smart_shield/healthchecks/${t.healthcheck_id}`};function N(e){return e.usage(`$0 smart-shield health-checks get <healthcheck-id>
17
17
 
18
- 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 P={command:`get <healthcheck-id>`,describe:`Health Check Details`,builder:N,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:{"healthcheck-id":String(e[`healthcheck-id`]??``),"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(M,{zone_id:s,healthcheck_id:e[`healthcheck-id`]}));r(c,{successLabel:`Loaded`})})};var F={method:`GET`,path:t=>e`/zones/${t.zone_id}/smart_shield/healthchecks`,query:[`page`,`per_page`]};function I(e){return e.usage(`$0 smart-shield health-checks list
18
+ 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 P={command:`get <healthcheck-id>`,describe:`Health Check Details`,builder:N,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(M,{zone_id:s,healthcheck_id:e[`healthcheck-id`]}));r(c,{successLabel:`Loaded`})})};var F={method:`GET`,path:t=>e`/zones/${t.zone_id}/smart_shield/healthchecks`,query:[`page`,`per_page`]};function I(e){return e.usage(`$0 smart-shield health-checks list
19
19
 
20
20
  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 L={command:`list`,describe:`List Health Checks`,builder:I,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(F,{zone_id:c,...o}));r(l,{successLabel:`Loaded`})})};var R={method:`PUT`,path:t=>e`/zones/${t.zone_id}/smart_shield/healthchecks/${t.healthcheck_id}`,body:`json`,constants:{success:!0}};function z(e){return e.usage(`$0 smart-shield health-checks update <healthcheck-id>
21
21
 
22
- 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-method`,{type:`string`,description:`The HTTP method to use for the health check.`,choices:[`GET`,`HEAD`]}).coerce(`result-http-config-method`,e=>u(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=>u(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 B={command:`update <healthcheck-id>`,describe:`Update Health Check`,builder:z,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:{"healthcheck-id":String(e[`healthcheck-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({errors:c(e.errors,`errors`),messages:c(e.messages,`messages`),result:{address:u(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:u(e[`result-description`],`result-description`,`text`),http_config:{allow_insecure:e[`result-http-config-allow-insecure`],expected_body:u(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`],method:e[`result-http-config-method`],path:u(e[`result-http-config-path`],`result-http-config-path`,`text`),port:e[`result-http-config-port`]},interval:e[`result-interval`],name:u(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:u(e[`result-type`],`result-type`,`text`)},success:e.success}):s(e.body)});return}let o=await t(e),d=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=d,e.body){let t=s(e.body),n=await a(`Updating`,async()=>o.send(R,{body:t,zone_id:d,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 f=l({errors:c(e.errors,`errors`),messages:c(e.messages,`messages`),result:{address:u(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:u(e[`result-description`],`result-description`,`text`),http_config:{allow_insecure:e[`result-http-config-allow-insecure`],expected_body:u(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`],method:e[`result-http-config-method`],path:u(e[`result-http-config-path`],`result-http-config-path`,`text`),port:e[`result-http-config-port`]},interval:e[`result-interval`],name:u(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:u(e[`result-type`],`result-type`,`text`)},success:e.success}),p=await a(`Updating`,async()=>o.send(R,{body:f,zone_id:d,healthcheck_id:e[`healthcheck-id`]}));r(p,{successLabel:`Updated`})})},V={command:`health-checks`,describe:`Health checks operations`,builder:e=>e.command(T).command(O).command(j).command(P).command(L).command(B).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var H={method:`PATCH`,path:t=>e`/zones/${t.zone_id}/smart_shield`,body:`json`,errors:{500:`InternalServerError`,502:`BadGatewayError`}};function U(e){return e.usage(`$0 smart-shield update
22
+ 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-method`,{type:`string`,description:`The HTTP method to use for the health check.`,choices:[`GET`,`HEAD`]}).coerce(`result-http-config-method`,e=>u(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=>u(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 B={command:`update <healthcheck-id>`,describe:`Update Health Check`,builder:z,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?l({errors:c(e.errors,`errors`),messages:c(e.messages,`messages`),result:{address:u(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:u(e[`result-description`],`result-description`,`text`),http_config:{allow_insecure:e[`result-http-config-allow-insecure`],expected_body:u(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`],method:e[`result-http-config-method`],path:u(e[`result-http-config-path`],`result-http-config-path`,`text`),port:e[`result-http-config-port`]},interval:e[`result-interval`],name:u(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:u(e[`result-type`],`result-type`,`text`)},success:e.success}):s(e.body)});return}let o=await t(e),d=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=d,e.body){let t=s(e.body),n=await a(`Updating`,async()=>o.send(R,{body:t,zone_id:d,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 f=l({errors:c(e.errors,`errors`),messages:c(e.messages,`messages`),result:{address:u(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:u(e[`result-description`],`result-description`,`text`),http_config:{allow_insecure:e[`result-http-config-allow-insecure`],expected_body:u(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`],method:e[`result-http-config-method`],path:u(e[`result-http-config-path`],`result-http-config-path`,`text`),port:e[`result-http-config-port`]},interval:e[`result-interval`],name:u(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:u(e[`result-type`],`result-type`,`text`)},success:e.success}),p=await a(`Updating`,async()=>o.send(R,{body:f,zone_id:d,healthcheck_id:e[`healthcheck-id`]}));r(p,{successLabel:`Updated`})})},V={command:`health-checks`,describe:`Health checks operations`,builder:e=>e.command(T).command(O).command(j).command(P).command(L).command(B).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var H={method:`PATCH`,path:t=>e`/zones/${t.zone_id}/smart_shield`,body:`json`,errors:{500:`InternalServerError`,502:`BadGatewayError`}};function U(e){return e.usage(`$0 smart-shield update
23
23
 
24
24
  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=>u(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=>u(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=>u(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=>u(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 W={command:`update`,describe:`Patch Smart Shield Settings`,builder:U,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?l({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`]}}):s(e.body)});return}let o=await t(e),c=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=c,e.body){let t=s(e.body),n=await a(`Updating`,async()=>o.send(H,{body:t,zone_id:c}));r(n,{successLabel:`Updated`});return}let u=l({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(H,{body:u,zone_id:c}));r(d,{successLabel:`Updated`})})},G={command:`smart-shield`,describe:`Smart Shield settings, health checks, and cache reserve management`,builder:e=>e.command(S).command(W).command(y).command(V).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{G as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{i as t,n}from"./auth-C6u9qIGO.mjs";import{i as r}from"./context-A6T-NKPI.mjs";import{t as i}from"./output-Co4xdFf6.mjs";import{t as a}from"./dry-run-C2KjGX10.mjs";import{t as o}from"./progress-D5po7ScB.mjs";import{t as s}from"./run-DASYqJsY.mjs";import"./telemetry-BhKfwxyh.mjs";import{n as c,r as l,t as u}from"./body-parser-DkHKPkJ7.mjs";import{n as d,t as f}from"./input-validation-D7z60HJH.mjs";import{n as p}from"./prompt-BAJpE3jV.mjs";import{n as m,t as h}from"./raw-fetch-yY-wX5Xx.mjs";function g(e){return e.usage(`$0 snippets content get <snippet-name>
2
+ import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{i as t,n}from"./auth-MNz2D-PD.mjs";import{i as r}from"./context-q-6bMSL-.mjs";import{t as i}from"./output-Co4xdFf6.mjs";import{t as a}from"./dry-run-C2KjGX10.mjs";import{t as o}from"./progress-DaQ4MzBI.mjs";import{t as s}from"./run-Clc3P2u7.mjs";import"./telemetry-Bdv5LZZs.mjs";import{n as c,r as l,t as u}from"./body-parser-DkHKPkJ7.mjs";import{n as d,t as f}from"./input-validation-D7z60HJH.mjs";import{n as p}from"./prompt-KWYZvJWM.mjs";import{n as m,t as h}from"./raw-fetch-Cy09TjHc.mjs";function g(e){return e.usage(`$0 snippets content get <snippet-name>
3
3
 
4
4
  Fetches the content of a snippet belonging to the zone.`).positional(`snippet-name`,{type:`string`,description:`Identify the snippet.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`text`,{type:`boolean`,description:`Decode the response body as UTF-8 text instead of writing raw bytes`,default:!1})}const _={command:`get <snippet-name>`,describe:`Get a zone snippet content`,builder:g,handler:async e=>s({command:`snippets content get`,classification:{safeFlags:[`dry-run`,`text`]}},e,async()=>{if(e.dryRun){a({command:`cf snippets content get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/snippets/${e[`snippet-name`]==null?`<snippet-name>`:encodeURIComponent(String(e[`snippet-name`]))}/content`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"snippet-name":String(e[`snippet-name`]??``)},bodyKind:`none`});return}let t=await n(e);e.zoneId=await r({zone:e.zone},t,{quiet:e.quiet});let i=await o(`Loading`,async()=>h(`/zones/${e.zoneId}/snippets/${encodeURIComponent(String(e[`snippet-name`]))}/content`,{method:`GET`,local:e.local===!0,persistTo:e.persistTo}));m(e.text===!0?i.toString(`utf-8`):i)})},v={command:`content`,describe:`Operations for content`,builder:e=>e.command(_).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var y={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/snippets/${t.snippet_name}`};function b(e){return e.usage(`$0 snippets delete <snippet-name>
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{i as e,n as t}from"./source-mXUcrTVw.mjs";import{r as n}from"./theme-BGHWSKCw.mjs";import{t as r}from"./cli-exit-CstFZ1eJ.mjs";import{a as i}from"./autoconfig-B0ESZ8DJ.mjs";import"./ui-BtIBQeaG.mjs";import{a,i as o,n as s,o as c,r as l,s as u,t as d}from"./gt-3bcLGJ7V.mjs";import{n as f,t as p}from"./discover-P20XeGBF.mjs";import{t as m}from"./registry-CRnk93ur.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=s();t.exports=(e,t,r)=>n(e,t,r)===0})),v=/* @__PURE__ */ t(((e,t)=>{let n=s();t.exports=(e,t,r)=>n(e,t,r)!==0})),y=/* @__PURE__ */ t(((e,t)=>{let n=s();t.exports=(e,t,r)=>n(e,t,r)>=0})),b=/* @__PURE__ */ t(((e,t)=>{let n=s();t.exports=(e,t,r)=>n(e,t,r)<0})),x=/* @__PURE__ */ t(((e,t)=>{let n=s();t.exports=(e,t,r)=>n(e,t,r)<=0})),S=/* @__PURE__ */ t(((e,t)=>{let n=_(),r=v(),i=d(),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(` `),d(`comparator`,t,i),this.options=i,this.loose=!!i.loose,this.parse(t),this.value=this.semver===n?``:this.operator+this.semver.version,d(`comp`,this)}parse(e){let t=this.options.loose?i[s.COMPARATORLOOSE]:i[s.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(d(`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=o(),{safeRe:i,t:s}=a(),c=S(),d=u(),f=l(),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 s)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,a=i?p[h.HYPHENRANGELOOSE]:p[h.HYPHENRANGE];e=e.replace(a,R(this.options.includePrerelease)),d(`hyphen replace`,e),e=e.replace(p[h.COMPARATORTRIM],_),d(`comparator trim`,e),e=e.replace(p[h.TILDETRIM],v),d(`tilde trim`,e),e=e.replace(p[h.CARETTRIM],y),d(`caret trim`,e);let o=e.split(` `).map(e=>D(e,this.options)).join(` `).split(/\s+/).map(e=>L(e,this.options));i&&(o=o.filter(e=>(d(`loose invalid filter`,e,this.options),!!e.match(p[h.COMPARATORLOOSE])))),d(`range list`,o);let c=/* @__PURE__ */ new Map,l=o.map(e=>new s(e,this.options));for(let e of l){if(w(e))return[e];c.set(e.value,e)}c.size>1&&c.has(``)&&c.delete(``);let u=[...c.values()];return r.set(t,u),u}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=o(),s=C(),d=u(),f=l(),{safeRe:p,src:m,t:h,comparatorTrimReplace:_,tildeTrimReplace:v,caretTrimReplace:y}=a(),{FLAG_INCLUDE_PRERELEASE:b,FLAG_LOOSE:x}=c(),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],``),d(`comp`,e,t),e=M(e,t),d(`caret`,e),e=A(e,t),d(`tildes`,e),e=P(e,t),d(`xrange`,e),e=I(e,t),d(`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)=>{d(`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?(d(`replaceTilde pr`,o),s=`>=${n}.${i}.${a}-${o} <${n}.${+i+1}.0-0`):s=`>=${n}.${i}.${a} <${n}.${+i+1}.0-0`,d(`tilde return`,s),s})},M=(e,t)=>e.trim().split(/\s+/).map(e=>N(e,t)).join(` `),N=(e,t)=>{d(`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)=>{d(`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?(d(`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`):(d(`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`),d(`caret return`,s),s})},P=(e,t)=>(d(`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(d(`xRange`,e,n,r,i,a,o,s),k(i,a,o))return e;let c=O(i),l=c||O(a),u=l||O(o),f=u;return r===`=`&&f&&(r=``),s=t.includePrerelease?`-0`:``,c?n=r===`>`||r===`<`?`<0.0.0-0`:`*`:r&&f?(l&&(a=0),o=0,r===`>`?(r=`>=`,l?(i=+i+1,a=0,o=0):(a=+a+1,o=0)):r===`<=`&&(r=`<`,l?i=+i+1:a=+a+1),r===`<`&&(s=`-0`),n=`${r+i}.${a}.${o}${s}`):l?n=`>=${i}.0.0${s} <${+i+1}.0.0-0`:u&&(n=`>=${i}.${a}.0${s} <${i}.${+a+1}.0-0`),d(`xRange return`,n),n})},I=(e,t)=>(d(`replaceStars`,e,t),e.trim().replace(p[h.STAR],``)),L=(e,t)=>(d(`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(d(e[n].semver),e[n].semver!==s.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=p(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){console.error(`\n${n.bold(e.impl.pkg)}@${e.installedVersion??`unknown`} is installed, but it is not compatible with cf's local runtime.\n\n`+k(e)+`Try: ${e.impl.installHint}`)}function k(e){let t=e.impl.versionConstraint?.display??`a compatible version`;return`cf requires ${n.bold(t)} for ${n.bold(`cf dev`)}, ${n.bold(`cf build`)}, ${n.bold(`cf deploy`)}, and ${n.bold(`cf previews deploy`)}.\n`}function A(e){console.error(`
2
+ import{i as e,n as t}from"./source-mXUcrTVw.mjs";import{r as n}from"./theme-BGHWSKCw.mjs";import{t as r}from"./cli-exit-CstFZ1eJ.mjs";import{a as i}from"./autoconfig-9po_tqsS.mjs";import"./ui-BtIBQeaG.mjs";import{a,i as o,n as s,o as c,r as l,s as u,t as d}from"./gt-3bcLGJ7V.mjs";import{n as f,t as p}from"./discover-P20XeGBF.mjs";import{t as m}from"./registry-CRnk93ur.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=s();t.exports=(e,t,r)=>n(e,t,r)===0})),v=/* @__PURE__ */ t(((e,t)=>{let n=s();t.exports=(e,t,r)=>n(e,t,r)!==0})),y=/* @__PURE__ */ t(((e,t)=>{let n=s();t.exports=(e,t,r)=>n(e,t,r)>=0})),b=/* @__PURE__ */ t(((e,t)=>{let n=s();t.exports=(e,t,r)=>n(e,t,r)<0})),x=/* @__PURE__ */ t(((e,t)=>{let n=s();t.exports=(e,t,r)=>n(e,t,r)<=0})),S=/* @__PURE__ */ t(((e,t)=>{let n=_(),r=v(),i=d(),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(` `),d(`comparator`,t,i),this.options=i,this.loose=!!i.loose,this.parse(t),this.value=this.semver===n?``:this.operator+this.semver.version,d(`comp`,this)}parse(e){let t=this.options.loose?i[s.COMPARATORLOOSE]:i[s.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(d(`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=o(),{safeRe:i,t:s}=a(),c=S(),d=u(),f=l(),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 s)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,a=i?p[h.HYPHENRANGELOOSE]:p[h.HYPHENRANGE];e=e.replace(a,R(this.options.includePrerelease)),d(`hyphen replace`,e),e=e.replace(p[h.COMPARATORTRIM],_),d(`comparator trim`,e),e=e.replace(p[h.TILDETRIM],v),d(`tilde trim`,e),e=e.replace(p[h.CARETTRIM],y),d(`caret trim`,e);let o=e.split(` `).map(e=>D(e,this.options)).join(` `).split(/\s+/).map(e=>L(e,this.options));i&&(o=o.filter(e=>(d(`loose invalid filter`,e,this.options),!!e.match(p[h.COMPARATORLOOSE])))),d(`range list`,o);let c=/* @__PURE__ */ new Map,l=o.map(e=>new s(e,this.options));for(let e of l){if(w(e))return[e];c.set(e.value,e)}c.size>1&&c.has(``)&&c.delete(``);let u=[...c.values()];return r.set(t,u),u}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=o(),s=C(),d=u(),f=l(),{safeRe:p,src:m,t:h,comparatorTrimReplace:_,tildeTrimReplace:v,caretTrimReplace:y}=a(),{FLAG_INCLUDE_PRERELEASE:b,FLAG_LOOSE:x}=c(),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],``),d(`comp`,e,t),e=M(e,t),d(`caret`,e),e=A(e,t),d(`tildes`,e),e=P(e,t),d(`xrange`,e),e=I(e,t),d(`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)=>{d(`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?(d(`replaceTilde pr`,o),s=`>=${n}.${i}.${a}-${o} <${n}.${+i+1}.0-0`):s=`>=${n}.${i}.${a} <${n}.${+i+1}.0-0`,d(`tilde return`,s),s})},M=(e,t)=>e.trim().split(/\s+/).map(e=>N(e,t)).join(` `),N=(e,t)=>{d(`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)=>{d(`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?(d(`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`):(d(`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`),d(`caret return`,s),s})},P=(e,t)=>(d(`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(d(`xRange`,e,n,r,i,a,o,s),k(i,a,o))return e;let c=O(i),l=c||O(a),u=l||O(o),f=u;return r===`=`&&f&&(r=``),s=t.includePrerelease?`-0`:``,c?n=r===`>`||r===`<`?`<0.0.0-0`:`*`:r&&f?(l&&(a=0),o=0,r===`>`?(r=`>=`,l?(i=+i+1,a=0,o=0):(a=+a+1,o=0)):r===`<=`&&(r=`<`,l?i=+i+1:a=+a+1),r===`<`&&(s=`-0`),n=`${r+i}.${a}.${o}${s}`):l?n=`>=${i}.0.0${s} <${+i+1}.0.0-0`:u&&(n=`>=${i}.${a}.0${s} <${i}.${+a+1}.0-0`),d(`xRange return`,n),n})},I=(e,t)=>(d(`replaceStars`,e,t),e.trim().replace(p[h.STAR],``)),L=(e,t)=>(d(`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(d(e[n].semver),e[n].semver!==s.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=p(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){console.error(`\n${n.bold(e.impl.pkg)}@${e.installedVersion??`unknown`} is installed, but it is not compatible with cf's local runtime.\n\n`+k(e)+`Try: ${e.impl.installHint}`)}function k(e){let t=e.impl.versionConstraint?.display??`a compatible version`;return`cf requires ${n.bold(t)} for ${n.bold(`cf dev`)}, ${n.bold(`cf build`)}, ${n.bold(`cf deploy`)}, and ${n.bold(`cf previews deploy`)}.\n`}function A(e){console.error(`
3
3
  No Cloudflare dev-server is installed in this project.
4
4
 
5
5
  A project must declare exactly one of the following in its manifest:
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-C6u9qIGO.mjs";import{i as n}from"./context-A6T-NKPI.mjs";import{t as r}from"./output-Co4xdFf6.mjs";import{t as i}from"./dry-run-C2KjGX10.mjs";import{t as a}from"./progress-D5po7ScB.mjs";import{t as o}from"./run-DASYqJsY.mjs";import"./telemetry-BhKfwxyh.mjs";import{n as s,t as c}from"./body-parser-DkHKPkJ7.mjs";import{n as l}from"./input-validation-D7z60HJH.mjs";import{a as u,n as d}from"./prompt-BAJpE3jV.mjs";var f={method:`GET`,path:t=>e`/zones/${t.zone_id}/spectrum/analytics/aggregate/current`,query:[`appID`,`colo_name`]};function p(e){return e.usage(`$0 spectrum analytics aggregates currents get
2
+ import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-MNz2D-PD.mjs";import{i as n}from"./context-q-6bMSL-.mjs";import{t as r}from"./output-Co4xdFf6.mjs";import{t as i}from"./dry-run-C2KjGX10.mjs";import{t as a}from"./progress-DaQ4MzBI.mjs";import{t as o}from"./run-Clc3P2u7.mjs";import"./telemetry-Bdv5LZZs.mjs";import{n as s,t as c}from"./body-parser-DkHKPkJ7.mjs";import{n as l}from"./input-validation-D7z60HJH.mjs";import{a as u,n as d}from"./prompt-KWYZvJWM.mjs";var f={method:`GET`,path:t=>e`/zones/${t.zone_id}/spectrum/analytics/aggregate/current`,query:[`appID`,`colo_name`]};function p(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 m={command:`get`,describe:`Get current aggregated analytics`,builder:p,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(f,{zone_id:c,...o}));r(l,{successLabel:`Loaded`})})},h={command:`currents`,describe:`Operations for analytics.aggregates.currents`,builder:e=>e.command(m).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},g={command:`aggregates`,describe:`Operations for analytics.aggregates`,builder:e=>e.command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var _={method:`GET`,path:t=>e`/zones/${t.zone_id}/spectrum/analytics/events/bytime`,query:[`dimensions`,`sort`,`until`,`metrics`,`filters`,`since`,`time_delta`]};function v(e){return e.usage(`$0 spectrum analytics events bytimes get
5
5
 
@@ -10,7 +10,7 @@ Dimension | Name | Example
10
10
  event | Connection Event | connect, progress, disconnect, originError, clientFiltered
11
11
  appID | Application ID | 40d67c87c6cd4b889a4fd57805225e85
12
12
  coloName | Colo Name | SFO
13
- ipVersion | IP version used by the client | 4, 6.`}).option(`sort`,{type:`string`,description:"The sort order for the result set; sort fields must be included in `metrics` or `dimensions`."}).option(`until`,{type:`string`,description:`End of time interval to query, defaults to current time. Timestamp must be in RFC3339 format and uses UTC unless otherwise specified.`}).option(`metrics`,{type:`string`,description:`One or more metrics to compute. Options are:
13
+ ipVersion | IP version used by the client | 4, 6.`}).option(`sort`,{type:`string`,description:"The sort order for the result set; sort fields must be included in `metrics` or `dimensions`."}).option(`until`,{type:`string`,description:`Until`}).option(`metrics`,{type:`string`,description:`One or more metrics to compute. Options are:
14
14
 
15
15
  Metric | Name | Example | Unit
16
16
  --------------------------|-------------------------------------|--------------------------|--------------------------
@@ -31,7 +31,7 @@ Operator | Name | URL Encoded
31
31
  \\>= | Greater than or equal to | %3E%3D
32
32
  \\<= | Less than or equal to | %3C%3D
33
33
 
34
- Use the above to construct filters.`}).option(`since`,{type:`string`,description:"Start of time interval to query, defaults to `until` - 6 hours. Timestamp must be in RFC3339 format and uses UTC unless otherwise specified."}).option(`time-delta`,{type:`string`,description:`Used to select time series resolution.`,choices:[`year`,`quarter`,`month`,`week`,`day`,`hour`,`dekaminute`,`minute`],demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const y={command:`get`,describe:`Get analytics by time`,builder:v,handler:async e=>o({command:`spectrum analytics events bytimes get`,classification:{safeFlags:[`time-delta`,`dry-run`]}},e,async()=>{let o={dimensions:e.dimensions,sort:e.sort,until:e.until,metrics:e.metrics,filters:e.filters,since:e.since,time_delta:e[`time-delta`]};if(e.dryRun){i({command:`cf spectrum analytics events bytimes get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/spectrum/analytics/events/bytime`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:o,bodyKind:`none`});return}let s=await t(e),c=await n({zone:e.zone},s,{quiet:e.quiet});e.zoneId=c;let l=await a(`Loading`,async()=>s.send(_,{zone_id:c,...o}));r(l,{successLabel:`Loaded`})})},b={command:`bytimes`,describe:`Operations for analytics.events.bytimes`,builder:e=>e.command(y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var x={method:`GET`,path:t=>e`/zones/${t.zone_id}/spectrum/analytics/events/summary`,query:[`dimensions`,`sort`,`until`,`metrics`,`filters`,`since`]};function S(e){return e.usage(`$0 spectrum analytics events summaries get
34
+ Use the above to construct filters.`}).option(`since`,{type:`string`,description:`Since`}).option(`time-delta`,{type:`string`,description:`Used to select time series resolution.`,choices:[`year`,`quarter`,`month`,`week`,`day`,`hour`,`dekaminute`,`minute`],demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const y={command:`get`,describe:`Get analytics by time`,builder:v,handler:async e=>o({command:`spectrum analytics events bytimes get`,classification:{safeFlags:[`time-delta`,`dry-run`]}},e,async()=>{let o={dimensions:e.dimensions,sort:e.sort,until:e.until,metrics:e.metrics,filters:e.filters,since:e.since,time_delta:e[`time-delta`]};if(e.dryRun){i({command:`cf spectrum analytics events bytimes get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/spectrum/analytics/events/bytime`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:o,bodyKind:`none`});return}let s=await t(e),c=await n({zone:e.zone},s,{quiet:e.quiet});e.zoneId=c;let l=await a(`Loading`,async()=>s.send(_,{zone_id:c,...o}));r(l,{successLabel:`Loaded`})})},b={command:`bytimes`,describe:`Operations for analytics.events.bytimes`,builder:e=>e.command(y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var x={method:`GET`,path:t=>e`/zones/${t.zone_id}/spectrum/analytics/events/summary`,query:[`dimensions`,`sort`,`until`,`metrics`,`filters`,`since`]};function S(e){return e.usage(`$0 spectrum analytics events summaries get
35
35
 
36
36
  Retrieves a list of summarised aggregate metrics over a given time period.`).option(`dimensions`,{type:`string`,description:`Can be used to break down the data by given attributes. Options are:
37
37
 
@@ -40,7 +40,7 @@ Dimension | Name | Example
40
40
  event | Connection Event | connect, progress, disconnect, originError, clientFiltered
41
41
  appID | Application ID | 40d67c87c6cd4b889a4fd57805225e85
42
42
  coloName | Colo Name | SFO
43
- ipVersion | IP version used by the client | 4, 6.`}).option(`sort`,{type:`string`,description:"The sort order for the result set; sort fields must be included in `metrics` or `dimensions`."}).option(`until`,{type:`string`,description:`End of time interval to query, defaults to current time. Timestamp must be in RFC3339 format and uses UTC unless otherwise specified.`}).option(`metrics`,{type:`string`,description:`One or more metrics to compute. Options are:
43
+ ipVersion | IP version used by the client | 4, 6.`}).option(`sort`,{type:`string`,description:"The sort order for the result set; sort fields must be included in `metrics` or `dimensions`."}).option(`until`,{type:`string`,description:`Until`}).option(`metrics`,{type:`string`,description:`One or more metrics to compute. Options are:
44
44
 
45
45
  Metric | Name | Example | Unit
46
46
  --------------------------|-------------------------------------|--------------------------|--------------------------
@@ -61,23 +61,23 @@ Operator | Name | URL Encoded
61
61
  \\>= | Greater than or equal to | %3E%3D
62
62
  \\<= | Less than or equal to | %3C%3D
63
63
 
64
- Use the above to construct filters.`}).option(`since`,{type:`string`,description:"Start of time interval to query, defaults to `until` - 6 hours. Timestamp must be in RFC3339 format and uses UTC unless otherwise specified."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const C={command:`get`,describe:`Get analytics summary`,builder:S,handler:async e=>o({command:`spectrum analytics events summaries get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let o={dimensions:e.dimensions,sort:e.sort,until:e.until,metrics:e.metrics,filters:e.filters,since:e.since};if(e.dryRun){i({command:`cf spectrum analytics events summaries get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/spectrum/analytics/events/summary`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:o,bodyKind:`none`});return}let s=await t(e),c=await n({zone:e.zone},s,{quiet:e.quiet});e.zoneId=c;let l=await a(`Loading`,async()=>s.send(x,{zone_id:c,...o}));r(l,{successLabel:`Loaded`})})},w={command:`summaries`,describe:`Operations for analytics.events.summaries`,builder:e=>e.command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},T={command:`events`,describe:`Operations for analytics.events`,builder:e=>e.command(b).command(w).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var E={method:`GET`,path:()=>`/user/spectrum_analytics/zones/report`,query:[`since`,`until`,`cdn_traffic`]};function D(e){return e.usage(`$0 spectrum analytics zones report get
64
+ Use the above to construct filters.`}).option(`since`,{type:`string`,description:`Since`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const C={command:`get`,describe:`Get analytics summary`,builder:S,handler:async e=>o({command:`spectrum analytics events summaries get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let o={dimensions:e.dimensions,sort:e.sort,until:e.until,metrics:e.metrics,filters:e.filters,since:e.since};if(e.dryRun){i({command:`cf spectrum analytics events summaries get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/spectrum/analytics/events/summary`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:o,bodyKind:`none`});return}let s=await t(e),c=await n({zone:e.zone},s,{quiet:e.quiet});e.zoneId=c;let l=await a(`Loading`,async()=>s.send(x,{zone_id:c,...o}));r(l,{successLabel:`Loaded`})})},w={command:`summaries`,describe:`Operations for analytics.events.summaries`,builder:e=>e.command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},T={command:`events`,describe:`Operations for analytics.events`,builder:e=>e.command(b).command(w).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var E={method:`GET`,path:()=>`/user/spectrum_analytics/zones/report`,query:[`since`,`until`,`cdn_traffic`]};function D(e){return e.usage(`$0 spectrum analytics zones report get
65
65
 
66
- Retrieves a list of total bandwidth by zone over a given time period.`).option(`since`,{type:`string`,description:"Start of time interval to query, defaults to `until` - 6 hours. Timestamp must be in RFC3339 format and uses UTC unless otherwise specified."}).option(`until`,{type:`string`,description:`End of time interval to query, defaults to current time. Timestamp must be in RFC3339 format and uses UTC unless otherwise specified.`}).option(`cdn-traffic`,{type:`boolean`,description:`Include CDN traffic in the bandwidth aggregation.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const O={command:`get`,describe:`Get zones bandwidth report`,builder:D,handler:async e=>o({command:`spectrum analytics zones report get`,classification:{safeFlags:[`cdn-traffic`,`dry-run`]}},e,async()=>{let n={since:e.since,until:e.until,cdn_traffic:e[`cdn-traffic`]};if(e.dryRun){i({command:`cf spectrum analytics zones report get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/user/spectrum_analytics/zones/report`,pathParams:{},query:n,bodyKind:`none`});return}let o=await t(e),s=await a(`Loading`,async()=>o.send(E,n));r(s,{successLabel:`Loaded`})})},k={command:`report`,describe:`Operations for analytics.zones.report`,builder:e=>e.command(O).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},A={command:`zones`,describe:`Operations for analytics.zones`,builder:e=>e.command(k).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},j={command:`analytics`,describe:`Real-time and historical connection analytics for Spectrum applications`,builder:e=>e.command(g).command(T).command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var M={method:`POST`,path:t=>e`/zones/${t.zone_id}/spectrum/apps`,body:`json`};function N(e){return e.usage(`$0 spectrum apps create
66
+ Retrieves a list of total bandwidth by zone over a given time period.`).option(`since`,{type:`string`,description:`Since`}).option(`until`,{type:`string`,description:`Until`}).option(`cdn-traffic`,{type:`boolean`,description:`Include CDN traffic in the bandwidth aggregation.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const O={command:`get`,describe:`Get zones bandwidth report`,builder:D,handler:async e=>o({command:`spectrum analytics zones report get`,classification:{safeFlags:[`cdn-traffic`,`dry-run`]}},e,async()=>{let n={since:e.since,until:e.until,cdn_traffic:e[`cdn-traffic`]};if(e.dryRun){i({command:`cf spectrum analytics zones report get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/user/spectrum_analytics/zones/report`,pathParams:{},query:n,bodyKind:`none`});return}let o=await t(e),s=await a(`Loading`,async()=>o.send(E,n));r(s,{successLabel:`Loaded`})})},k={command:`report`,describe:`Operations for analytics.zones.report`,builder:e=>e.command(O).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},A={command:`zones`,describe:`Operations for analytics.zones`,builder:e=>e.command(k).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},j={command:`analytics`,describe:`Real-time and historical connection analytics for Spectrum applications`,builder:e=>e.command(g).command(T).command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var M={method:`POST`,path:t=>e`/zones/${t.zone_id}/spectrum/apps`,body:`json`};function N(e){return e.usage(`$0 spectrum apps create
67
67
 
68
68
  Creates a new Spectrum application from a configuration using a name for the origin.`).option(`argo-smart-routing`,{type:`boolean`,description:`Enables Argo Smart Routing for this application.
69
69
  Notes: Only available for TCP or UDP applications with traffic_type set to "direct".`,default:!1}).option(`dns-name`,{type:`string`,description:`The name of the DNS record associated with the application.`}).option(`dns-type`,{type:`string`,description:`The type of DNS record associated with the application.`,choices:[`CNAME`,`ADDRESS`]}).coerce(`dns-type`,e=>l(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=>l(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=>l(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
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=>l(e,`origin-dns-type`,`text`)).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=>l(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=>l(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=>l(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)`}).conflicts(`edge-ips-connectivity`,[`edge-ips-ips`]).conflicts(`edge-ips-ips`,[`edge-ips-connectivity`])}const P={command:`create`,describe:`Create Spectrum application using a name for the origin`,builder:N,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?c({argo_smart_routing:e[`argo-smart-routing`],dns:{name:l(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:l(e[`origin-dns-name`],`origin-dns-name`,`text`),ttl:e[`origin-dns-ttl`],type:e[`origin-dns-type`]},origin_worker_id:l(e[`origin-worker-id`],`origin-worker-id`,`text`),protocol:l(e.protocol,`protocol`,`text`),proxy_protocol:e[`proxy-protocol`],tls:e.tls,traffic_type:e[`traffic-type`],virtual_network_id:l(e[`virtual-network-id`],`virtual-network-id`,`text`)}):s(e.body)});return}let o=await t(e),d=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=d,e.body){let t=s(e.body),n=await a(`Creating`,async()=>o.send(M,{body:t,zone_id:d}));r(n,{successLabel:`Created`});return}e.protocol===void 0&&(e.protocol=await u(`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 f=c({argo_smart_routing:e[`argo-smart-routing`],dns:{name:l(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:l(e[`origin-dns-name`],`origin-dns-name`,`text`),ttl:e[`origin-dns-ttl`],type:e[`origin-dns-type`]},origin_worker_id:l(e[`origin-worker-id`],`origin-worker-id`,`text`),protocol:l(e.protocol,`protocol`,`text`),proxy_protocol:e[`proxy-protocol`],tls:e.tls,traffic_type:e[`traffic-type`],virtual_network_id:l(e[`virtual-network-id`],`virtual-network-id`,`text`)}),p=await a(`Creating`,async()=>o.send(M,{body:f,zone_id:d}));r(p,{successLabel:`Created`})})};var F={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/spectrum/apps/${t.app_id}`};function I(e){return e.usage(`$0 spectrum apps delete <app-id>
71
71
 
72
- Deletes a previously existing application.`).positional(`app-id`,{type:`string`,description:`App identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const L={command:`delete <app-id>`,describe:`Delete Spectrum application`,builder:I,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:{"app-id":String(e[`app-id`]??``),"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 d({force:!!e.force})){process.stderr.write(`Aborted.
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 L={command:`delete <app-id>`,describe:`Delete Spectrum application`,builder:I,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 d({force:!!e.force})){process.stderr.write(`Aborted.
73
73
  `);return}let c=await a(`Deleting`,async()=>o.send(F,{zone_id:s,app_id:e[`app-id`]}));r(c,{successLabel:`Deleted`})})};var R={method:`GET`,path:t=>e`/zones/${t.zone_id}/spectrum/apps/${t.app_id}`};function z(e){return e.usage(`$0 spectrum apps get <app-id>
74
74
 
75
- Gets the application configuration of a specific application inside a zone.`).positional(`app-id`,{type:`string`,description:`App identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const B={command:`get <app-id>`,describe:`Get Spectrum application configuration`,builder:z,handler:async e=>o({command:`spectrum apps get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf spectrum apps get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/spectrum/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}`,pathParams:{"app-id":String(e[`app-id`]??``),"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(R,{zone_id:s,app_id:e[`app-id`]}));r(c,{successLabel:`Loaded`})})};var V={method:`GET`,path:t=>e`/zones/${t.zone_id}/spectrum/apps`,query:[`page`,`per_page`,`direction`,`order`]};function H(e){return e.usage(`$0 spectrum apps list
75
+ Gets the application configuration of a specific application inside a zone.`).positional(`app-id`,{type:`string`,description:`App identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const B={command:`get <app-id>`,describe:`Get Spectrum application configuration`,builder:z,handler:async e=>o({command:`spectrum apps get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf spectrum apps get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/spectrum/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"app-id":String(e[`app-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(R,{zone_id:s,app_id:e[`app-id`]}));r(c,{successLabel:`Loaded`})})};var V={method:`GET`,path:t=>e`/zones/${t.zone_id}/spectrum/apps`,query:[`page`,`per_page`,`direction`,`order`]};function H(e){return e.usage(`$0 spectrum apps list
76
76
 
77
77
  Retrieves a list of currently existing Spectrum applications inside a zone.`).option(`page`,{type:`number`,description:"Page number of paginated results. This parameter is required in order to use other pagination parameters. If included in the query, `result_info` will be present in the response."}).option(`per-page`,{type:`number`,description:`Sets the maximum number of results per page.`}).option(`direction`,{type:`string`,description:`Sets the direction by which results are ordered.`,choices:[`asc`,`desc`]}).option(`order`,{type:`string`,description:`Application field by which results are ordered.`,choices:[`protocol`,`app_id`,`created_on`,`modified_on`,`dns`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const U={command:`list`,describe:`List Spectrum applications`,builder:H,handler:async e=>o({command:`spectrum apps list`,classification:{safeFlags:[`direction`,`order`,`dry-run`]}},e,async()=>{let o={page:e.page,per_page:e[`per-page`],direction:e.direction,order:e.order};if(e.dryRun){i({command:`cf spectrum apps list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/spectrum/apps`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:o,bodyKind:`none`});return}let s=await t(e),c=await n({zone:e.zone},s,{quiet:e.quiet});e.zoneId=c;let l=await a(`Loading`,async()=>s.send(V,{zone_id:c,...o}));r(l,{successLabel:`Loaded`})})};var W={method:`PUT`,path:t=>e`/zones/${t.zone_id}/spectrum/apps/${t.app_id}`,body:`json`};function G(e){return e.usage(`$0 spectrum apps update <app-id>
78
78
 
79
79
  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.
80
80
  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=>l(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=>l(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=>l(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.
81
- 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=>l(e,`origin-dns-type`,`text`)).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=>l(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=>l(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=>l(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)`}).conflicts(`edge-ips-connectivity`,[`edge-ips-ips`]).conflicts(`edge-ips-ips`,[`edge-ips-connectivity`])}const K={command:`update <app-id>`,describe:`Update Spectrum application configuration using a name for the origin`,builder:G,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:{"app-id":String(e[`app-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?c({argo_smart_routing:e[`argo-smart-routing`],dns:{name:l(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:l(e[`origin-dns-name`],`origin-dns-name`,`text`),ttl:e[`origin-dns-ttl`],type:e[`origin-dns-type`]},origin_worker_id:l(e[`origin-worker-id`],`origin-worker-id`,`text`),protocol:l(e.protocol,`protocol`,`text`),proxy_protocol:e[`proxy-protocol`],tls:e.tls,traffic_type:e[`traffic-type`],virtual_network_id:l(e[`virtual-network-id`],`virtual-network-id`,`text`)}):s(e.body)});return}let o=await t(e),d=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=d,e.body){let t=s(e.body),n=await a(`Updating`,async()=>o.send(W,{body:t,zone_id:d,app_id:e[`app-id`]}));r(n,{successLabel:`Updated`});return}e.protocol===void 0&&(e.protocol=await u(`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 f=c({argo_smart_routing:e[`argo-smart-routing`],dns:{name:l(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:l(e[`origin-dns-name`],`origin-dns-name`,`text`),ttl:e[`origin-dns-ttl`],type:e[`origin-dns-type`]},origin_worker_id:l(e[`origin-worker-id`],`origin-worker-id`,`text`),protocol:l(e.protocol,`protocol`,`text`),proxy_protocol:e[`proxy-protocol`],tls:e.tls,traffic_type:e[`traffic-type`],virtual_network_id:l(e[`virtual-network-id`],`virtual-network-id`,`text`)}),p=await a(`Updating`,async()=>o.send(W,{body:f,zone_id:d,app_id:e[`app-id`]}));r(p,{successLabel:`Updated`})})},q={command:`apps`,describe:`Spectrum application configurations that map protocols and ports to origin servers`,builder:e=>e.command(P).command(L).command(B).command(U).command(K).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var J={method:`GET`,path:t=>e`/zones/${t.zone_id}/spectrum/protocols`};function Y(e){return e.usage(`$0 spectrum protocols list
81
+ 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=>l(e,`origin-dns-type`,`text`)).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=>l(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=>l(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=>l(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)`}).conflicts(`edge-ips-connectivity`,[`edge-ips-ips`]).conflicts(`edge-ips-ips`,[`edge-ips-connectivity`])}const K={command:`update <app-id>`,describe:`Update Spectrum application configuration using a name for the origin`,builder:G,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?c({argo_smart_routing:e[`argo-smart-routing`],dns:{name:l(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:l(e[`origin-dns-name`],`origin-dns-name`,`text`),ttl:e[`origin-dns-ttl`],type:e[`origin-dns-type`]},origin_worker_id:l(e[`origin-worker-id`],`origin-worker-id`,`text`),protocol:l(e.protocol,`protocol`,`text`),proxy_protocol:e[`proxy-protocol`],tls:e.tls,traffic_type:e[`traffic-type`],virtual_network_id:l(e[`virtual-network-id`],`virtual-network-id`,`text`)}):s(e.body)});return}let o=await t(e),d=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=d,e.body){let t=s(e.body),n=await a(`Updating`,async()=>o.send(W,{body:t,zone_id:d,app_id:e[`app-id`]}));r(n,{successLabel:`Updated`});return}e.protocol===void 0&&(e.protocol=await u(`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 f=c({argo_smart_routing:e[`argo-smart-routing`],dns:{name:l(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:l(e[`origin-dns-name`],`origin-dns-name`,`text`),ttl:e[`origin-dns-ttl`],type:e[`origin-dns-type`]},origin_worker_id:l(e[`origin-worker-id`],`origin-worker-id`,`text`),protocol:l(e.protocol,`protocol`,`text`),proxy_protocol:e[`proxy-protocol`],tls:e.tls,traffic_type:e[`traffic-type`],virtual_network_id:l(e[`virtual-network-id`],`virtual-network-id`,`text`)}),p=await a(`Updating`,async()=>o.send(W,{body:f,zone_id:d,app_id:e[`app-id`]}));r(p,{successLabel:`Updated`})})},q={command:`apps`,describe:`Spectrum application configurations that map protocols and ports to origin servers`,builder:e=>e.command(P).command(L).command(B).command(U).command(K).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var J={method:`GET`,path:t=>e`/zones/${t.zone_id}/spectrum/protocols`};function Y(e){return e.usage(`$0 spectrum protocols list
82
82
 
83
83
  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 X={command:`list`,describe:`List Spectrum application protocols`,builder:Y,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(J,{zone_id:s}));r(c,{successLabel:`Loaded`})})},Z={command:`protocols`,describe:`Operations for protocols`,builder:e=>e.command(X).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Q={command:`spectrum`,describe:`Proxy and protect arbitrary TCP/UDP applications through Cloudflare's network with DDoS mitigation`,builder:e=>e.command(j).command(q).command(Z).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Q as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-C6u9qIGO.mjs";import{i as n}from"./context-A6T-NKPI.mjs";import{t as r}from"./output-Co4xdFf6.mjs";import{t as i}from"./dry-run-C2KjGX10.mjs";import{t as a}from"./progress-D5po7ScB.mjs";import{t as o}from"./run-DASYqJsY.mjs";import"./telemetry-BhKfwxyh.mjs";import{n as s}from"./body-parser-DkHKPkJ7.mjs";import{n as c}from"./prompt-BAJpE3jV.mjs";var l={method:`GET`,path:t=>e`/zones/${t.zone_id}/speed_api/availabilities`};function u(e){return e.usage(`$0 speed availabilities list
2
+ import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-MNz2D-PD.mjs";import{i as n}from"./context-q-6bMSL-.mjs";import{t as r}from"./output-Co4xdFf6.mjs";import{t as i}from"./dry-run-C2KjGX10.mjs";import{t as a}from"./progress-DaQ4MzBI.mjs";import{t as o}from"./run-Clc3P2u7.mjs";import"./telemetry-Bdv5LZZs.mjs";import{n as s}from"./body-parser-DkHKPkJ7.mjs";import{n as c}from"./prompt-KWYZvJWM.mjs";var l={method:`GET`,path:t=>e`/zones/${t.zone_id}/speed_api/availabilities`};function u(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 d={command:`list`,describe:`Get quota and availability`,builder:u,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(l,{zone_id:s}));r(c,{successLabel:`Loaded`})})},f={command:`availabilities`,describe:`Check which speed test regions and configurations are available for your zone`,builder:e=>e.command(d).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var p={method:`GET`,path:t=>e`/zones/${t.zone_id}/speed_api/pages`};function m(e){return e.usage(`$0 speed pages list
5
5
 
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import{i as e,n as t}from"./auth-C6u9qIGO.mjs";import{t as n}from"./output-Co4xdFf6.mjs";import{t as r}from"./dry-run-C2KjGX10.mjs";import{t as i}from"./progress-D5po7ScB.mjs";import{t as a}from"./run-DASYqJsY.mjs";import"./telemetry-BhKfwxyh.mjs";import{i as o,n as s,t as c}from"./body-parser-DkHKPkJ7.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-MNz2D-PD.mjs";import{t as n}from"./output-Co4xdFf6.mjs";import{t as r}from"./dry-run-C2KjGX10.mjs";import{t as i}from"./progress-DaQ4MzBI.mjs";import{t as a}from"./run-Clc3P2u7.mjs";import"./telemetry-Bdv5LZZs.mjs";import{i as o,n as s,t as c}from"./body-parser-DkHKPkJ7.mjs";import{n as l,t as u}from"./input-validation-D7z60HJH.mjs";var d={method:`GET`,path:()=>`/analytics/sql/introspection`,query:[`account_tag`,`include_columns`,`include_custom_attributes`,`include_attributes`,`include_wae`,`include_lex`,`dataset_name`],errors:{400:`BadRequestError`,403:`ForbiddenError`,422:`UnprocessableEntityError`,500:`InternalServerError`,503:`ServiceUnavailableError`}};function f(e){return e.usage("$0 sql datasets\n\nReturns the analytics dataset catalogue. By default, the response contains dataset names, titles, categories, descriptions, kinds, and hidden flags. Set `include_columns` to include each dataset's column names, descriptions, data types, and hidden flags. The caller must have Account Analytics Read permission on the account identified by `account_tag`. Dataset names, descriptions, and columns are the same for every authorized account. When `include_custom_attributes` or `include_attributes` is set, the response also includes attribute names and types discovered from that account's own data, which legitimately differs per caller. `attributes` is a replacement for `custom_attributes` that will eventually be removed; until then, set either flag independently to receive the corresponding field. `hidden` marks catalogue entries a client should de-emphasise. It has no effect on access: hidden datasets and columns are returned here and remain fully queryable. The catalogue lists the datasets this deployment is able to describe, which is not a fixed list. Some datasets are described by the service that owns them and are listed only where that service is available, so the same account may see a different catalogue in different environments, and datasets may appear or disappear without a change to this API. Clients should query the catalogue rather than hard-coding it, and should not treat a dataset's absence as proof that it does not exist. Workers Analytics Engine datasets are named by the account that writes them, so they are discovered from that account's own data rather than from a fixed list. They appear as `events.analyticsEngine.<dataset_name>` and differ per account. A dataset is listed for as long as any of its data is retained, so it does not disappear from the catalogue merely because writes have stopped. An account with a very large number of datasets may receive a truncated list. Set `include_wae=false` to omit them. Log Explorer datasets are listed only where the account has them, so they differ per account and are not part of the static catalogue. Set `include_lex=false` to omit them.").option(`account-tag`,{type:`string`,description:`Account whose available analytics datasets are returned.`,demandOption:!0}).option(`include-columns`,{type:`boolean`,description:`Include column metadata for each returned dataset.`}).option(`include-custom-attributes`,{type:`boolean`,description:"Include a capped set of custom attribute names and types observed during the preceding seven days, as `custom_attributes`. Requires a nonempty dataset_name. Deprecated in favor of `include_attributes`."}).option(`include-attributes`,{type:`boolean`,description:"Include a capped set of attribute names and types observed during the preceding seven days, as `attributes`. Requires a nonempty dataset_name. Replaces `include_custom_attributes`, which is deprecated."}).option(`include-wae`,{type:`boolean`,description:"Include Workers Analytics Engine datasets, which are discovered from the account's own data. Set to `false` to return only datasets described from the static catalogue, which avoids that lookup."}).option(`include-lex`,{type:`boolean`,description:"Include Log Explorer datasets, which are listed only where the account has them. Set to `false` to return only datasets described from the static catalogue, which avoids that lookup."}).option(`dataset-name`,{type:`string`,description:"Return only the dataset with this exact name. An empty value is treated as if the parameter had been omitted, and does not filter the catalogue. A name that matches no dataset in this deployment's catalogue is rejected with `422`; a dataset that exists but is not describable here is rejected identically, so the two cases cannot be told apart.\n\nA Workers Analytics Engine dataset is named in full, as `events.analyticsEngine.<dataset_name>`; the namespace on its own returns every such dataset the account has. A `dataset_name` the account does not have is rejected with `422` like any other unknown name."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const p={command:`datasets`,describe:`List available analytics datasets`,builder:f,handler:async e=>a({command:`sql datasets`,classification:{safeFlags:[`include-columns`,`include-custom-attributes`,`include-attributes`,`include-wae`,`include-lex`,`dry-run`]}},e,async()=>{let a={account_tag:e[`account-tag`],include_columns:e[`include-columns`],include_custom_attributes:e[`include-custom-attributes`],include_attributes:e[`include-attributes`],include_wae:e[`include-wae`],include_lex:e[`include-lex`],dataset_name:e[`dataset-name`]};if(e.dryRun){r({command:`cf sql datasets`,method:`GET`,url:`https://api.cloudflare.com/client/v4/analytics/sql/introspection`,pathParams:{},query:a,bodyKind:`none`});return}let o=await t(e),s=await i(`Loading`,async()=>o.send(d,a));n(s,{successLabel:`Loaded`})})};function m(e){return e.usage("$0 sql query <query>\n\nExecutes a SQL query against the analytics datasets available to the caller. Send either raw SQL or a JSON object containing the query and optional positional or named parameters, time range, and account or zone scope. Raw SQL placeholders can also be bound with query parameters named `param_<name>`. A trailing `FORMAT JSON`, `FORMAT JSONEachRow`, `FORMAT TabSeparated`, or `FORMAT TSV` is supported for all datasets. Without FORMAT, each backend retains its existing default JSON response.").positional(`query`,{type:`string`,description:`SQL query to execute. A trailing FORMAT selects JSON, JSONEachRow, TabSeparated, or TSV output on any dataset. `,demandOption:!0}).option(`scope-account`,{type:`string`,description:`Account tag used to authorize and scope the query. Must be a 32-character lowercase hex string.
3
3
  `}).option(`scope-zone`,{type:`string`,description:`Zone tag used to authorize and scope the query. Must be a 32-character lowercase hex string.
4
4
  `}).option(`time-until`,{type:`string`,description:`Inclusive upper bound for the dataset's timestamp column.`}).option(`time-since`,{type:`string`,description:`Inclusive lower bound for the dataset's timestamp column.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`}).conflicts(`scope-account`,[`scope-zone`]).conflicts(`scope-zone`,[`scope-account`]).check(e=>{if([`time-until`,`time-since`].some(t=>e[t]!==void 0)){let t=[`time-since`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --time_range-* flag is set`)}return!0})}const h={command:`query <query>`,describe:`Query analytics datasets`,builder:m,handler:async d=>a({command:`sql query`,classification:{safeFlags:[`dry-run`]}},d,async()=>{if(d.dryRun){r({command:`cf sql query`,method:`POST`,url:`https://api.cloudflare.com/client/v4/analytics/sql`,pathParams:{},bodyKind:d.file===void 0?`json`:`octet-stream`,body:d.file===void 0?d.body===void 0?c({scope:{accountTag:l(d[`scope-account`],`scope-account`,`text`),zoneTag:l(d[`scope-zone`],`scope-zone`,`text`)},time_range:{end:l(d[`time-until`],`time-until`,`text`),start:l(d[`time-since`],`time-since`,`text`)},query:d.query}):s(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=s(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&&o(f,[`scope`,`accountTag`],l(d[`scope-account`],`scope-account`,`text`)),d[`scope-zone`]!==void 0&&o(f,[`scope`,`zoneTag`],l(d[`scope-zone`],`scope-zone`,`text`)),d[`time-until`]!==void 0&&o(f,[`time_range`,`end`],l(d[`time-until`],`time-until`,`text`)),d[`time-since`]!==void 0&&o(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};