cf 1.0.0-beta.11 → 1.0.0-beta.13

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 (448) hide show
  1. package/bin/cf +1 -1
  2. package/dist/_meta/commands.json +3119 -2067
  3. package/dist/_meta/hand-written-commands.json +14 -1
  4. package/dist/_meta/schemas.json +1856 -1132
  5. package/dist/abuse-reports-BjU1s8cf.mjs +24 -0
  6. package/dist/{access-DuHs0Mii.mjs → access-C_G2MZnA.mjs} +1 -1
  7. package/dist/account-tags-CaXDDeZ4.mjs +15 -0
  8. package/dist/accounts-BALwxDQY.mjs +131 -0
  9. package/dist/{acm-BgSr3Ig4.mjs → acm-CP9EaXQN.mjs} +7 -7
  10. package/dist/addressing-DRlaxqrI.mjs +93 -0
  11. package/dist/agent-context-DFEgYjEQ.mjs +2 -0
  12. package/dist/agent-memory-vGhlfZBx.mjs +34 -0
  13. package/dist/ai-CJtbWfB9.mjs +31 -0
  14. package/dist/{ai-audit-Bn_BfMFS.mjs → ai-audit-C0BJNqZZ.mjs} +3 -3
  15. package/dist/ai-gateway-BQtv3U3x.mjs +80 -0
  16. package/dist/ai-search-DGU1Y5By.mjs +79 -0
  17. package/dist/ai-security-CFTaYk_X.mjs +10 -0
  18. package/dist/alerting-1hun27JC.mjs +56 -0
  19. package/dist/analytics-DXUSjvzT.mjs +17 -0
  20. package/dist/analytics_engine-CQsnL09C.mjs +4 -0
  21. package/dist/ansi-styles-kSC6bEIq.mjs +2 -0
  22. package/dist/{api-security-gB1FHrHq.mjs → api-security-BXhrfR6-.mjs} +57 -57
  23. package/dist/argo-LPUCTnee.mjs +14 -0
  24. package/dist/artifacts-Dt6easua.mjs +43 -0
  25. package/dist/{audit-logs-CpPUjMUP.mjs → audit-logs-CVznAM2Z.mjs} +2 -2
  26. package/dist/auth-CGLsxbc6.mjs +2 -0
  27. package/dist/auth-CrmVwfpJ.mjs +2 -0
  28. package/dist/{auth-7Fk7PVIC.mjs → auth-eQr-kQCH.mjs} +1 -1
  29. package/dist/{auth-token-DeG33BMQ.mjs → auth-token-pNQrX_9O.mjs} +1 -1
  30. package/dist/autoconfig-sD7Frryg.mjs +532 -0
  31. package/dist/{banner-Xk4xBN8U.mjs → banner-D03JEqRs.mjs} +1 -1
  32. package/dist/basin-catalog-ZQICw-zF.mjs +46 -0
  33. package/dist/billing-Dy1-dV_B.mjs +23 -0
  34. package/dist/bot-management-DTgPwL7O.mjs +9 -0
  35. package/dist/botnet-feed-xb98Cj3Y.mjs +11 -0
  36. package/dist/brand-protection-Ck3okE2k.mjs +27 -0
  37. package/dist/browser-run-DJGJSzFX.mjs +42 -0
  38. package/dist/build-B1L6xrgC.mjs +2 -0
  39. package/dist/build-HmSXqjGn.mjs +2 -0
  40. package/dist/builds-CYxcZtkG.mjs +71 -0
  41. package/dist/cache-D9tSfovH.mjs +45 -0
  42. package/dist/{certificate-authorities-NUQzCDK8.mjs → certificate-authorities-CpiveTFC.mjs} +3 -3
  43. package/dist/cf-BxsXrVeh.mjs +18 -0
  44. package/dist/chunk-DSGVRFIS-C1_SEtRK.mjs +2 -0
  45. package/dist/chunk-NDZDTP46-Bjx_wtJe.mjs +361 -0
  46. package/dist/chunk-TAK63GWY-DdMktrgc.mjs +319 -0
  47. package/dist/chunk-U6NEESU5-DqqRCaWH.mjs +2 -0
  48. package/dist/chunk-WMOON6TZ-C0dmPHpM.mjs +2 -0
  49. package/dist/{cli-aChy8ou_.mjs → cli-DeJc9U8z.mjs} +1 -1
  50. package/dist/cli-exit-CstFZ1eJ.mjs +2 -0
  51. package/dist/{client-certificates-qgLpBn8t.mjs → client-certificates-CF6YZyvP.mjs} +6 -6
  52. package/dist/{client-side-security-DZO6Xw14.mjs → client-side-security-BLoe9kS5.mjs} +14 -14
  53. package/dist/{cloud-connector-C7vGDCzX.mjs → cloud-connector-DXRUHsjt.mjs} +3 -3
  54. package/dist/cloudflared--1Ws1RJy.mjs +2 -0
  55. package/dist/cloudforce-one-CBLxXi6v.mjs +447 -0
  56. package/dist/{command-07vhr56i.mjs → command-83uVfXh9.mjs} +1 -1
  57. package/dist/{command-Cdx___59.mjs → command-BDe67N_n.mjs} +1 -1
  58. package/dist/command-BlIb6RR2.mjs +2 -0
  59. package/dist/{command-dAYWrB5y.mjs → command-Bpzp8Mz2.mjs} +1 -1
  60. package/dist/{command-eM48o0J6.mjs → command-BvfKhMl7.mjs} +1 -1
  61. package/dist/command-CG6RvZs0.mjs +2 -0
  62. package/dist/{command-D0MKPucK.mjs → command-CcuLC6CJ.mjs} +1 -1
  63. package/dist/{command-Ds5OVat3.mjs → command-Cu7dcaHT.mjs} +1 -1
  64. package/dist/{command-BsmF3J_l.mjs → command-D3fyhdy-.mjs} +1 -1
  65. package/dist/{command-Dv6YavZa.mjs → command-DUhX8Dcr.mjs} +1 -1
  66. package/dist/{command-maDJWJgu.mjs → command-Dh7RmjFu.mjs} +1 -1
  67. package/dist/{command-C2pNxAeL.mjs → command-DwXiDOeH.mjs} +1 -1
  68. package/dist/{command-CrtDkZNs.mjs → command-UiHLJ8Ji.mjs} +1 -1
  69. package/dist/command-_rqD0hXF.mjs +2 -0
  70. package/dist/{command-B6TpINoN.mjs → command-oNVwyjGB.mjs} +1 -1
  71. package/dist/{completions-D0280hul.mjs → completions-D06AO7A8.mjs} +12 -12
  72. package/dist/connector-interrupts-DelTmNyw.mjs +6 -0
  73. package/dist/connector-telemetry-events-BwxR3G8d.mjs +6 -0
  74. package/dist/connector-telemetry-snapshots-Bqq-hrpJ.mjs +6 -0
  75. package/dist/connectors-D-m3rEpk.mjs +15 -0
  76. package/dist/containers-CVNfEjJs.mjs +78 -0
  77. package/dist/containers-DeoZyeQe.mjs +375 -0
  78. package/dist/{content-scan-BCtWBCqd.mjs → content-scan-W0BNzbQp.mjs} +7 -7
  79. package/dist/{context-CquYYyS3.mjs → context-q7UaYK69.mjs} +2 -2
  80. package/dist/{cps-C8BbnbuD.mjs → cps-BZ6hqRb5.mjs} +3 -3
  81. package/dist/{csamScanner-CsJ9H2fA.mjs → csamScanner-Bo1t3CLh.mjs} +3 -3
  82. package/dist/ct-alerting-E03faC7p.mjs +5 -0
  83. package/dist/{custom-certificates-CA8HqolM.mjs → custom-certificates-CUySSPzi.mjs} +7 -7
  84. package/dist/{custom-csrs-D0P2vWJE.mjs → custom-csrs-gNpWkJPQ.mjs} +5 -5
  85. package/dist/{custom-hostnames-CzYMChbh.mjs → custom-hostnames-abGBAbx7.mjs} +12 -12
  86. package/dist/{custom-nameservers-Cet3oF56.mjs → custom-nameservers-BgNXol1P.mjs} +5 -5
  87. package/dist/{custom-pages-DUkHIaTP.mjs → custom-pages-DMKX3aoD.mjs} +10 -10
  88. package/dist/d1-CE08YqYk.mjs +93 -0
  89. package/dist/{dcv-delegation-BkdRVEAH.mjs → dcv-delegation-B5YUEWu0.mjs} +2 -2
  90. package/dist/delegate.mjs +1 -1
  91. package/dist/deploy-CWNm1-5v.mjs +2 -0
  92. package/dist/deploy-context-Dr6bxNcB.mjs +56 -0
  93. package/dist/deploy-input-Cc0_2QlW.mjs +2 -0
  94. package/dist/{dev-BHkVwAea.mjs → dev-ZA8itQE7.mjs} +2 -2
  95. package/dist/diagnostics-UMbG6m4n.mjs +15 -0
  96. package/dist/dialog-D4Y9ocuF.mjs +2 -0
  97. package/dist/discover-DIDEGKo3.mjs +2 -0
  98. package/dist/discover-P20XeGBF.mjs +2 -0
  99. package/dist/dist-BHEmAAHr.mjs +487 -0
  100. package/dist/dist-uRuGmkMB.mjs +60 -0
  101. package/dist/dls-DIl16mLp.mjs +17 -0
  102. package/dist/{dns-BLNa0GrP.mjs → dns-QUpgljRG.mjs} +63 -63
  103. package/dist/{dns-firewall-ChCvC5rT.mjs → dns-firewall-BZwJXHLj.mjs} +9 -9
  104. package/dist/dot-prop-IITUZ2XW-BnPfnQkb.mjs +2 -0
  105. package/dist/dotenv-DpXaxfho.mjs +4 -0
  106. package/dist/dry-run-DRj2_uV3.mjs +2 -0
  107. package/dist/durable-objects-BCj4ykpU.mjs +6 -0
  108. package/dist/{email-auth-C28s03aI.mjs → email-auth-DlHIYhCk.mjs} +3 -3
  109. package/dist/{email-routing-Ci-xjXIN.mjs → email-routing-UKVS4DYy.mjs} +22 -22
  110. package/dist/email-security-CZjfRIg0.mjs +158 -0
  111. package/dist/{email-sending-kTVAlVKO.mjs → email-sending-Dquc880C.mjs} +22 -22
  112. package/dist/error-sanitization-DE_zSrXw.mjs +2 -0
  113. package/dist/error-sanitization-DOCQ9Ykh.mjs +2 -0
  114. package/dist/fieldExtractors-BbwDRquU.mjs +9 -0
  115. package/dist/{firewall-BND3qSY2.mjs → firewall--mTfDnCJ.mjs} +17 -17
  116. package/dist/flagship-cfoSwwM9.mjs +28 -0
  117. package/dist/{fraud-DgyYv_CC.mjs → fraud-Dcsq3EYK.mjs} +3 -3
  118. package/dist/{generate-VxmGG8BF.mjs → generate-CeeWW3eX.mjs} +1 -1
  119. package/dist/generate-D80-1GnZ.mjs +2 -0
  120. package/dist/{google-tag-gateway-v3p7murv.mjs → google-tag-gateway-DPKSkZQi.mjs} +3 -3
  121. package/dist/gt-3bcLGJ7V.mjs +3 -0
  122. package/dist/{healthchecks-CByb4qYA.mjs → healthchecks-D78hIIBC.mjs} +10 -10
  123. package/dist/{hostnames-3CqeMF5g.mjs → hostnames-sF999-6H.mjs} +5 -5
  124. package/dist/{hyperdrive-CmyYTE-K.mjs → hyperdrive-qWACKfA4.mjs} +10 -10
  125. package/dist/iam-Bvg_PayW.mjs +52 -0
  126. package/dist/images-DI_lEZ4L.mjs +71 -0
  127. package/dist/index.mjs +1 -1
  128. package/dist/init-1w_mcgk3.mjs +43 -0
  129. package/dist/intel-BxElBUMP.mjs +76 -0
  130. package/dist/interactive-BW9T1D1q.mjs +48 -0
  131. package/dist/interactive-DGUWZ2Gk.mjs +2 -0
  132. package/dist/{ips-WWvPwSBc.mjs → ips-DWoaKxi7.mjs} +2 -2
  133. package/dist/k2-tFjaftl-.mjs +11 -0
  134. package/dist/{keyless-certificates-DqILy3t9.mjs → keyless-certificates-BrvxHU4J.mjs} +6 -6
  135. package/dist/keys-DcwTYKRf.mjs +4 -0
  136. package/dist/kv-htXS-7uP.mjs +15 -0
  137. package/dist/{lazy-command--5YpWUVY.mjs → lazy-command-BDiIwpss.mjs} +1 -1
  138. package/dist/{leaked-credential-checks-C0U1oYM5.mjs → leaked-credential-checks-bvGrLOmQ.mjs} +8 -8
  139. package/dist/lifecycle-oud60haK.mjs +2 -0
  140. package/dist/{load-balancers-BJKI9lm7.mjs → load-balancers-BNTUt4yG.mjs} +40 -40
  141. package/dist/local-DlDumOSC.mjs +2 -0
  142. package/dist/{local-rYpzEQb-.mjs → local-DlT72Xpn.mjs} +1 -1
  143. package/dist/{local-runtime-DZTTIe6x.mjs → local-runtime-CokO6qaX.mjs} +1 -1
  144. package/dist/{login-bnylLTit.mjs → login-BGF_I_LT.mjs} +1 -1
  145. package/dist/login-Ccw-mYwT.mjs +2 -0
  146. package/dist/logo-matches-tE8LTKgg.mjs +6 -0
  147. package/dist/logos-Bj845Mcw.mjs +7 -0
  148. package/dist/logpush-Cs8JdvKi.mjs +46 -0
  149. package/dist/{logs-c3b3USyS.mjs → logs-C92XZvNu.mjs} +11 -11
  150. package/dist/magic-cloud-networking-hNp5MMw-.mjs +71 -0
  151. package/dist/magic-network-monitoring-68GuWAnv.mjs +36 -0
  152. package/dist/magic-transit-DNd7gu4j.mjs +383 -0
  153. package/dist/managed-defense-B_wCAuFD.mjs +18 -0
  154. package/dist/{managed-transforms-DcYAvqTe.mjs → managed-transforms-DZdxHPOh.mjs} +4 -4
  155. package/dist/{matches-hnU16rSJ.mjs → matches-B65CkflD.mjs} +3 -3
  156. package/dist/mcp-DrJW5ayK.mjs +32 -0
  157. package/dist/mesh-DfVzYTn1.mjs +26 -0
  158. package/dist/metadata-Df5kCWJv.mjs +2 -0
  159. package/dist/{migrate-BNvUWrjy.mjs → migrate-CZNq63Uj.mjs} +1 -1
  160. package/dist/{monetization-Dsqj9DCA.mjs → monetization-BGaI8CMO.mjs} +9 -9
  161. package/dist/mtls-certificates-BsU2emDD.mjs +13 -0
  162. package/dist/network-BEMD8P0U.mjs +50 -0
  163. package/dist/network-interconnects-DMu_fcbo.mjs +68 -0
  164. package/dist/o11y-C1a4gDGF.mjs +93 -0
  165. package/dist/{oauth-CeZ3d_dB.mjs → oauth-Bj5Ne1o8.mjs} +1 -1
  166. package/dist/oauth-clients-p4Etdqy_.mjs +16 -0
  167. package/dist/{oauth-w0fWmrwU.mjs → oauth-mspHHU5U.mjs} +1 -1
  168. package/dist/{oauth-scopes-CxpRD6d7.mjs → oauth-scopes-B2IabFza.mjs} +2 -2
  169. package/dist/open-PCXX3ZDZ-D55O2jpQ.mjs +4 -0
  170. package/dist/{organization-DNieJ1xJ.mjs → organization-CdXt7AVZ.mjs} +16 -16
  171. package/dist/{organizations-BIXPmTy5.mjs → organizations-5S6xEp7T.mjs} +2 -2
  172. package/dist/{origin-ca-certificates-dVJvSIH8.mjs → origin-ca-certificates-_VJAoK1D.mjs} +5 -5
  173. package/dist/{origin-post-quantum-encryption-CO6tDW1t.mjs → origin-post-quantum-encryption-GcldDsT2.mjs} +3 -3
  174. package/dist/{origin-tls-client-auth-DeTY8aN2.mjs → origin-tls-client-auth-DZHld9fA.mjs} +14 -14
  175. package/dist/output-BOe-3AQG.mjs +2 -0
  176. package/dist/{page-rules-DA552Ra4.mjs → page-rules-o1tAMMsD.mjs} +7 -7
  177. package/dist/pages-CmiOhjSl.mjs +54 -0
  178. package/dist/pay-per-crawl-BsnOxGYU.mjs +38 -0
  179. package/dist/pay-per-use-BXWMCSyE.mjs +33 -0
  180. package/dist/pipelines-DWLQC0F6.mjs +44 -0
  181. package/dist/precursor-B6DjBib6.mjs +4 -0
  182. package/dist/previews-dUKEBGSM.mjs +4 -0
  183. package/dist/process-2wmDCy17.mjs +2 -0
  184. package/dist/{progress-TLUEIYE6.mjs → progress-BtkTVcHI.mjs} +1 -1
  185. package/dist/prompt-RlgRrmbm.mjs +3 -0
  186. package/dist/queries-yLwoJRHV.mjs +9 -0
  187. package/dist/queues-CnJRaE1o.mjs +57 -0
  188. package/dist/r2-CuC6-zQX.mjs +128 -0
  189. package/dist/{radar-Bez6k9Dw.mjs → radar-DrQLcbkq.mjs} +150 -150
  190. package/dist/{raw-fetch-DNxNCoeP.mjs → raw-fetch-B4NvWuZD.mjs} +1 -1
  191. package/dist/realtime-CjsnzHxD.mjs +172 -0
  192. package/dist/registrar-BgOsxTnX.mjs +43 -0
  193. package/dist/registrar-sandbox-3ikBD9fB.mjs +56 -0
  194. package/dist/{registry-CsSLAAOE.mjs → registry-CHowrQsZ.mjs} +1 -1
  195. package/dist/reporting-hE127s5r.mjs +14 -0
  196. package/dist/request-headers-DiJeDAn1.mjs +2 -0
  197. package/dist/request-tracers-BCwLxmPN.mjs +4 -0
  198. package/dist/resolve-CaTBV-c6.mjs +2 -0
  199. package/dist/resolve-DCGSzUDQ.mjs +2 -0
  200. package/dist/resource-sharing-2qvWUuMa.mjs +40 -0
  201. package/dist/resource-tagging-Dwx7iL3v.mjs +4 -0
  202. package/dist/rules-DxVQ6jIg.mjs +18 -0
  203. package/dist/rulesets-Cdh8YjI9.mjs +37 -0
  204. package/dist/rum-a4CMq4Qu.mjs +30 -0
  205. package/dist/run-BvHwWWUX.mjs +2 -0
  206. package/dist/run-CkbrPJPx.mjs +2 -0
  207. package/dist/schema-elj12WOx.mjs +2 -0
  208. package/dist/schema-flags-BzoBGPWk.mjs +5 -0
  209. package/dist/scim-B8XlXl8v.mjs +18 -0
  210. package/dist/secrets-store-Cqhedh_i.mjs +24 -0
  211. package/dist/{security-insights-DVAqroY5.mjs → security-insights-le2-DteL.mjs} +20 -20
  212. package/dist/{security-txt-rfrrdiZV.mjs → security-txt-cCArWXur.mjs} +4 -4
  213. package/dist/{session-B6mFkaVZ.mjs → session-C1BhT1ZJ.mjs} +1 -1
  214. package/dist/shared-BPjcpXuA.mjs +2 -0
  215. package/dist/{smart-shield-_HA814Im.mjs → smart-shield-Csyh8hwB.mjs} +11 -11
  216. package/dist/{snippets-mRelEw0p.mjs → snippets-DUWx25q6.mjs} +8 -8
  217. package/dist/source-mXUcrTVw.mjs +6 -0
  218. package/dist/spawn-IysxuTNW.mjs +10 -0
  219. package/dist/{spectrum-BwtOiaDw.mjs → spectrum-Da3UYSOR.mjs} +11 -11
  220. package/dist/{speed-DmqsZtiJ.mjs → speed-NxlMnB2e.mjs} +11 -11
  221. package/dist/sql-CNdHAlQ8.mjs +4 -0
  222. package/dist/src-JfLDUxFr.mjs +125 -0
  223. package/dist/{ssl-DCvfveJB.mjs → ssl-BtaX2WEJ.mjs} +16 -16
  224. package/dist/startup-profile-B2l0ChVu.mjs +2 -0
  225. package/dist/startup-profile-CdJWgNjd.mjs +29 -0
  226. package/dist/{state-BPwdiNO_.mjs → state-BDSvdSdP.mjs} +1 -1
  227. package/dist/state-JB4_BU1o.mjs +2 -0
  228. package/dist/stream-C1Ijjzn4.mjs +102 -0
  229. package/dist/submit-MdkuU_Pt.mjs +4 -0
  230. package/dist/{tags-Djw0e-4j.mjs → tags-CA1xMM96.mjs} +2 -2
  231. package/dist/telemetry-BsYO3nxG.mjs +2 -0
  232. package/dist/{telemetry-DrFNujdx.mjs → telemetry-Cm39QJ-M.mjs} +1 -1
  233. package/dist/{tenant-tc1wb_ym.mjs → tenant-BB6Oszcl.mjs} +5 -5
  234. package/dist/{tenant-custom-nameservers-XCbXryBZ.mjs → tenant-custom-nameservers-BsbgYAEo.mjs} +4 -4
  235. package/dist/{theme-BIWQFmZ0.mjs → theme-CQ_TYifs.mjs} +2 -2
  236. package/dist/{tools-CB4NleeJ.mjs → tools-CSc5DmFi.mjs} +1 -1
  237. package/dist/tunnels-CRFtyHWz.mjs +29 -0
  238. package/dist/turnstile-DBXWo_Xe.mjs +33 -0
  239. package/dist/{ui-D1hhIDIs.mjs → ui-YmjF66Ct.mjs} +1 -1
  240. package/dist/update-check-C2oVEbXx.mjs +2 -0
  241. package/dist/update-check-CMXSdres.mjs +2 -0
  242. package/dist/update-check-worker.mjs +1 -1
  243. package/dist/url-info-t-XAs0Mk.mjs +4 -0
  244. package/dist/{url-normalization-Dbypc9wz.mjs → url-normalization-Cs4F8e0a.mjs} +4 -4
  245. package/dist/url-scanner-CBIoDbTx.mjs +16 -0
  246. package/dist/{user-3uwLMH78.mjs → user-CevdOMoa.mjs} +52 -52
  247. package/dist/values-CjNlkbIh.mjs +4 -0
  248. package/dist/vectorize-9d9tPmg5.mjs +32 -0
  249. package/dist/version-BdVUXLnK.mjs +2 -0
  250. package/dist/waiting-rooms--5WmrWb3.mjs +53 -0
  251. package/dist/{web-assets-BfEprX1S.mjs → web-assets-BHot_MU8.mjs} +30 -30
  252. package/dist/{web3-DNbp5sZw.mjs → web3-CYfWAF6b.mjs} +13 -13
  253. package/dist/workers-S17M0n3h.mjs +40 -0
  254. package/dist/workers-builds-Dw7ho3So.mjs +14 -0
  255. package/dist/workers-for-platforms-A3yjyLh3.mjs +40 -0
  256. package/dist/{workers-vpc-LVfayM2-.mjs → workers-vpc-BZ2xXtC3.mjs} +7 -7
  257. package/dist/workflows-BgGrVpSR.mjs +43 -0
  258. package/dist/{wrangler-migration-B0mKHqGd.mjs → wrangler-migration-C6FKHER1.mjs} +1 -1
  259. package/dist/{zaraz-BY60ZUQ4.mjs → zaraz-BsD2dMI3.mjs} +11 -11
  260. package/dist/zero-trust-CA3iGQbG.mjs +837 -0
  261. package/dist/{zone-BVDW2UGd.mjs → zone-D2M4EZD0.mjs} +2 -2
  262. package/dist/{zones-CcZL0YQp.mjs → zones-BoOC_JzC.mjs} +43 -43
  263. package/package.json +33 -35
  264. package/dist/abuse-reports-DX5xgeka.mjs +0 -24
  265. package/dist/account-tags-CiKwgOWd.mjs +0 -15
  266. package/dist/accounts-DfXSHrkF.mjs +0 -138
  267. package/dist/addressing-B70NFnrX.mjs +0 -93
  268. package/dist/agent-context-GRiQ4zRU.mjs +0 -2
  269. package/dist/agent-memory-DJRquHeq.mjs +0 -34
  270. package/dist/ai-CP2oIS-I.mjs +0 -29
  271. package/dist/ai-gateway-CrrEtzUP.mjs +0 -82
  272. package/dist/ai-search-C4YWVTCa.mjs +0 -79
  273. package/dist/ai-security-Bt_fG65f.mjs +0 -10
  274. package/dist/alerting-CRr88fVR.mjs +0 -56
  275. package/dist/analytics-XqS9OP5B.mjs +0 -20
  276. package/dist/analytics_engine-CzmYem4f.mjs +0 -4
  277. package/dist/ansi-styles-eKEZXVwN.mjs +0 -2
  278. package/dist/argo-wFCAsYx7.mjs +0 -10
  279. package/dist/artifacts-qFjlNRqb.mjs +0 -43
  280. package/dist/auth-BmJ946bE.mjs +0 -2
  281. package/dist/auth-Br-t8vL_.mjs +0 -2
  282. package/dist/autoconfig-D-copdZG.mjs +0 -511
  283. package/dist/basin-catalog-CshcpsAH.mjs +0 -46
  284. package/dist/billing-B-xNxxiP.mjs +0 -23
  285. package/dist/bot-management-DhafeA2J.mjs +0 -9
  286. package/dist/botnet-feed-D6uCLE_D.mjs +0 -11
  287. package/dist/brand-protection-c3WiHbYn.mjs +0 -27
  288. package/dist/browser-run-D9_cwaSD.mjs +0 -46
  289. package/dist/build-9ihDp-Gy.mjs +0 -2
  290. package/dist/build-DrG6TqMw.mjs +0 -2
  291. package/dist/builds-Dl8if-2k.mjs +0 -71
  292. package/dist/cache-CIZokBjd.mjs +0 -45
  293. package/dist/cf-DfQfIu3q.mjs +0 -18
  294. package/dist/chunk-FT2NMTJB-BFqlGcem.mjs +0 -97
  295. package/dist/chunk-KKDV4JPS-B_t8sDTz.mjs +0 -2
  296. package/dist/chunk-U6NEESU5-BhF4rnpx.mjs +0 -2
  297. package/dist/chunk-WMOON6TZ-B8xCqjB1.mjs +0 -2
  298. package/dist/cli-exit-Dqoo6Jgb.mjs +0 -2
  299. package/dist/cloudflared-CEfZhSQH.mjs +0 -2
  300. package/dist/cloudforce-one-CE7y5UkF.mjs +0 -447
  301. package/dist/command-BWC9CbE7.mjs +0 -2
  302. package/dist/command-C65Ed0o9.mjs +0 -2
  303. package/dist/command-DHdWKtqx.mjs +0 -2
  304. package/dist/connector-interrupts-CVjFhU-C.mjs +0 -6
  305. package/dist/connector-telemetry-events-Bu3LKP6T.mjs +0 -6
  306. package/dist/connector-telemetry-snapshots-BbDTIc06.mjs +0 -6
  307. package/dist/connectors-DGtx-rPI.mjs +0 -15
  308. package/dist/containers-CzNbBrYE.mjs +0 -239
  309. package/dist/containers-DEFrbNgO.mjs +0 -78
  310. package/dist/ct-alerting-CYsQZO2H.mjs +0 -5
  311. package/dist/d1-B2duXfH2.mjs +0 -41
  312. package/dist/deploy-BdWBEbLj.mjs +0 -2
  313. package/dist/deploy-input-LmLfj6kI.mjs +0 -2
  314. package/dist/diagnostics-9Wj5UWBL.mjs +0 -15
  315. package/dist/dialog-Dpi-UVbz.mjs +0 -2
  316. package/dist/discover-BYkHr5Ja.mjs +0 -2
  317. package/dist/discover-t6E9lpf3.mjs +0 -2
  318. package/dist/dist-Cpb7_h4N.mjs +0 -57
  319. package/dist/dist-D1iG7guo.mjs +0 -366
  320. package/dist/dist-zep5OXGt.mjs +0 -48
  321. package/dist/dls-Caya7FZc.mjs +0 -17
  322. package/dist/dot-prop-IITUZ2XW-BsZYdILY.mjs +0 -2
  323. package/dist/dotenv-CcQjGlV0.mjs +0 -4
  324. package/dist/dry-run-p9Q7nMZ5.mjs +0 -2
  325. package/dist/durable-objects-DuRbdp7N.mjs +0 -6
  326. package/dist/email-security-DPU6xvI9.mjs +0 -158
  327. package/dist/error-sanitization-BbEw--0B.mjs +0 -2
  328. package/dist/error-sanitization-p5rmb53x.mjs +0 -2
  329. package/dist/fieldExtractors-ceaXu4zD.mjs +0 -9
  330. package/dist/flagship-DfxbNzgx.mjs +0 -28
  331. package/dist/generate-9P8Q_RiO.mjs +0 -2
  332. package/dist/gt-KlYHH-UC.mjs +0 -2
  333. package/dist/iam-CV_M681j.mjs +0 -52
  334. package/dist/images-DaLPjskW.mjs +0 -71
  335. package/dist/init-CBKifk5L.mjs +0 -39
  336. package/dist/intel-MpftjuPB.mjs +0 -76
  337. package/dist/interactive-D80kbTap.mjs +0 -32
  338. package/dist/interactive-mJQ_IrGd.mjs +0 -2
  339. package/dist/k2-D0QYUFqT.mjs +0 -13
  340. package/dist/keys-DhX4AcqF.mjs +0 -4
  341. package/dist/kv-DLUfUL0_.mjs +0 -15
  342. package/dist/lifecycle-Cyc3fmyN.mjs +0 -2
  343. package/dist/local-DkYQiSQQ.mjs +0 -2
  344. package/dist/login-CnE2Ii_F.mjs +0 -2
  345. package/dist/logo-matches-DFZybI0C.mjs +0 -6
  346. package/dist/logos-Da2YtqSN.mjs +0 -7
  347. package/dist/logpush-Q7WIEHS1.mjs +0 -46
  348. package/dist/magic-cloud-networking-BoyDmFq3.mjs +0 -71
  349. package/dist/magic-network-monitoring-BkUbpMUp.mjs +0 -36
  350. package/dist/magic-transit-4-THD45G.mjs +0 -383
  351. package/dist/managed-defense-CTMqSp6z.mjs +0 -18
  352. package/dist/mcp-kZX4irfN.mjs +0 -32
  353. package/dist/mesh-Dxzvvso6.mjs +0 -26
  354. package/dist/metadata-C33s4rc-.mjs +0 -2
  355. package/dist/mtls-certificates-BSbMwIna.mjs +0 -13
  356. package/dist/network-interconnects-osO_vAPu.mjs +0 -73
  357. package/dist/network-mEnXTEiG.mjs +0 -50
  358. package/dist/oauth-clients-CWPHi-Yn.mjs +0 -16
  359. package/dist/observability-BxL2RqWZ.mjs +0 -80
  360. package/dist/open-PCXX3ZDZ-C7gpxSsl.mjs +0 -4
  361. package/dist/output-ClYel9WX.mjs +0 -2
  362. package/dist/pages-B0x7tidm.mjs +0 -54
  363. package/dist/pay-per-crawl-DoTg9VP7.mjs +0 -65
  364. package/dist/pay-per-use-yRO2QBfe.mjs +0 -6
  365. package/dist/pipelines-CQxrm9ao.mjs +0 -44
  366. package/dist/precursor-FiGYDRV9.mjs +0 -4
  367. package/dist/previews-BthBa50j.mjs +0 -4
  368. package/dist/prompt-Ck_1PCHm.mjs +0 -3
  369. package/dist/queries-C0RRdol7.mjs +0 -9
  370. package/dist/queues-sLgvjsRP.mjs +0 -57
  371. package/dist/r2-C2PllL6i.mjs +0 -125
  372. package/dist/realtime-D-HSXznX.mjs +0 -172
  373. package/dist/registrar-DwHrG9QR.mjs +0 -43
  374. package/dist/registrar-sandbox-jNukmzQP.mjs +0 -56
  375. package/dist/reporting-DolhAb10.mjs +0 -14
  376. package/dist/request-headers-Lhj314mk.mjs +0 -2
  377. package/dist/request-tracers-w72hKc33.mjs +0 -4
  378. package/dist/resolve-CGKqk7q8.mjs +0 -2
  379. package/dist/resolve-Djf2xgBx.mjs +0 -2
  380. package/dist/resource-sharing-DTrSkqI4.mjs +0 -40
  381. package/dist/resource-tagging-aURR4fIJ.mjs +0 -4
  382. package/dist/rules-C8a7cV-W.mjs +0 -18
  383. package/dist/rulesets-RJ6yBefy.mjs +0 -37
  384. package/dist/rum-Bk1dPW4p.mjs +0 -30
  385. package/dist/run-BJOAPmsz.mjs +0 -2
  386. package/dist/run-iFM5TxtQ.mjs +0 -2
  387. package/dist/schema-flags-PagOq-G2.mjs +0 -5
  388. package/dist/schema-v7mOxMdx.mjs +0 -2
  389. package/dist/scim-C0FmjkkV.mjs +0 -18
  390. package/dist/secrets-store-cG_5RMzK.mjs +0 -24
  391. package/dist/shared-BqsWoApw.mjs +0 -2
  392. package/dist/source-38bULAR8.mjs +0 -6
  393. package/dist/spawn-BzPhcLJI.mjs +0 -10
  394. package/dist/src--KDGqL5N.mjs +0 -109
  395. package/dist/startup-profile-BCe9k9sR.mjs +0 -17
  396. package/dist/startup-profile-WrwRyMwH.mjs +0 -2
  397. package/dist/state-a1tTOGjm.mjs +0 -2
  398. package/dist/stream-aroClJeD.mjs +0 -102
  399. package/dist/submit-BBKhoKT8.mjs +0 -4
  400. package/dist/telemetry-DoBQOGRk.mjs +0 -2
  401. package/dist/tunnels-C2FTswb6.mjs +0 -29
  402. package/dist/turnstile-BV4Mdd-j.mjs +0 -33
  403. package/dist/update-check-CFt6cMOi.mjs +0 -2
  404. package/dist/update-check-Dtj9fzNe.mjs +0 -2
  405. package/dist/url-info-CeegsDK7.mjs +0 -4
  406. package/dist/url-scanner-BFXMrpJF.mjs +0 -16
  407. package/dist/values-BTncDc3U.mjs +0 -4
  408. package/dist/vectorize-CtMAtx8r.mjs +0 -32
  409. package/dist/version-oN1bmOgM.mjs +0 -2
  410. package/dist/waiting-rooms-1xDvjF13.mjs +0 -53
  411. package/dist/workers-DK_JgS4Y.mjs +0 -38
  412. package/dist/workers-builds-CdhwmmsQ.mjs +0 -14
  413. package/dist/workers-for-platforms-CP6IqxrK.mjs +0 -42
  414. package/dist/workflows-CA5K8FFb.mjs +0 -43
  415. package/dist/zero-trust-CQNohO7_.mjs +0 -821
  416. /package/dist/{Page-DAgOEX17.mjs → Page-BShsqCXr.mjs} +0 -0
  417. /package/dist/{alerts-D3iKtzoN.mjs → alerts-BSON-vFh.mjs} +0 -0
  418. /package/dist/{args-CXgkQKK7.mjs → args-CfbYkeXd.mjs} +0 -0
  419. /package/dist/{autorag-pvRfDwne.mjs → autorag-kNrLiqDX.mjs} +0 -0
  420. /package/dist/{body-parser-NjzJZMOV.mjs → body-parser-DkHKPkJ7.mjs} +0 -0
  421. /package/dist/{brands-DP5Ndir1.mjs → brands-bBJgbbOH.mjs} +0 -0
  422. /package/dist/{browser-extension-Dee2Y1qn.mjs → browser-extension-C1_fcw7h.mjs} +0 -0
  423. /package/dist/{clear-qLKPlJqb.mjs → clear-BW9vLgI3.mjs} +0 -0
  424. /package/dist/{cli-types-_Kmwfpnp.mjs → cli-types-9oYmRTHJ.mjs} +0 -0
  425. /package/dist/{connector-telemetry-events-latest-_aCmWeZx.mjs → connector-telemetry-events-latest-BQdOvbWh.mjs} +0 -0
  426. /package/dist/{connector-telemetry-snapshots-latest-CffEplpV.mjs → connector-telemetry-snapshots-latest-CtdN_dGu.mjs} +0 -0
  427. /package/dist/{delegate-CCGgla7X.mjs → delegate-Tgfxa-MZ.mjs} +0 -0
  428. /package/dist/{domain-info-BQh9XapD.mjs → domain-info-BkcBcyfF.mjs} +0 -0
  429. /package/dist/{errors-cuuW88wR.mjs → errors-_sob7Ihu.mjs} +0 -0
  430. /package/dist/{health--10IShMi.mjs → health-CTaCeVyC.mjs} +0 -0
  431. /package/dist/{input-validation-0CeePPHp.mjs → input-validation-D7z60HJH.mjs} +0 -0
  432. /package/dist/{internal-BUs583vv.mjs → internal-BYS7hO8c.mjs} +0 -0
  433. /package/dist/{live-VCSxA0N9.mjs → live-BJE_YWE1.mjs} +0 -0
  434. /package/dist/{project-settings-Bf6rReo1.mjs → project-settings-nBMEx1f-.mjs} +0 -0
  435. /package/dist/{r2-data-catalog-Bg7zq1IB.mjs → r2-data-catalog-BRo-Rx2I.mjs} +0 -0
  436. /package/dist/{rate-limit-analytics-D3q0mGv2.mjs → rate-limit-analytics-BiRyU0Xd.mjs} +0 -0
  437. /package/dist/{rate-limits-BIxlBuMn.mjs → rate-limits-Cr2zpncO.mjs} +0 -0
  438. /package/dist/{ready-CAgelFmC.mjs → ready-B3pLxnjc.mjs} +0 -0
  439. /package/dist/{recent-submissions-B3TOjNmk.mjs → recent-submissions-JLOvuZq-.mjs} +0 -0
  440. /package/dist/{refute-BZNkFpBB.mjs → refute-Dp3VodMn.mjs} +0 -0
  441. /package/dist/{scan-logo-StecHiaf.mjs → scan-logo-3Zr6CDJB.mjs} +0 -0
  442. /package/dist/{scan-page-B4adr-vD.mjs → scan-page-CxeudOzj.mjs} +0 -0
  443. /package/dist/{search-Devngw4M.mjs → search-B_P5ZTQj.mjs} +0 -0
  444. /package/dist/{signed-url-ChR5eXXd.mjs → signed-url-D5RwvrQq.mjs} +0 -0
  445. /package/dist/{submission-info-BGb81HZN.mjs → submission-info-_t78q2OE.mjs} +0 -0
  446. /package/dist/{total-queries-_wa6KxEl.mjs → total-queries-CPrKEciQ.mjs} +0 -0
  447. /package/dist/{tracked-domains-BesKGqfI.mjs → tracked-domains-CTRItgFT.mjs} +0 -0
  448. /package/dist/{verify-CYM5GlPu.mjs → verify-5KcvRk-q.mjs} +0 -0
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
- import{n as e}from"./auth-Br-t8vL_.mjs";import{i as t}from"./context-CquYYyS3.mjs";import{t as n}from"./output-ClYel9WX.mjs";import{t as r}from"./dry-run-p9Q7nMZ5.mjs";import{t as i}from"./progress-TLUEIYE6.mjs";import{t as a}from"./run-iFM5TxtQ.mjs";import"./telemetry-DoBQOGRk.mjs";import{n as o,t as s}from"./body-parser-NjzJZMOV.mjs";import{n as c}from"./input-validation-0CeePPHp.mjs";import{a as l}from"./prompt-Ck_1PCHm.mjs";function u(e){return e.usage(`$0 google-tag-gateway config get
2
+ import{n as e}from"./auth-CGLsxbc6.mjs";import{i as t}from"./context-q7UaYK69.mjs";import{t as n}from"./output-BOe-3AQG.mjs";import{t as r}from"./dry-run-DRj2_uV3.mjs";import{t as i}from"./progress-BtkTVcHI.mjs";import{t as a}from"./run-BvHwWWUX.mjs";import"./telemetry-BsYO3nxG.mjs";import{n as o,t as s}from"./body-parser-DkHKPkJ7.mjs";import{n as c}from"./input-validation-D7z60HJH.mjs";import{a as l}from"./prompt-RlgRrmbm.mjs";function u(e){return e.usage(`$0 google-tag-gateway config get
3
3
 
4
- Gets the Google Tag Gateway configuration for a zone.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const d={command:`get`,describe:`Get Google Tag Gateway configuration`,builder:u,handler:async o=>a({command:`google-tag-gateway config get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf google-tag-gateway config get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/settings/google-tag-gateway/config`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await e(o),s=await t({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s,n(await i(`Loading`,async()=>a.googleTagGateway.config.get({zone_id:s})),{successLabel:`Loaded`})})};function f(e){return e.usage(`$0 google-tag-gateway config update
4
+ Gets the Google Tag Gateway configuration for a zone.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const d={command:`get`,describe:`Get Google Tag Gateway configuration`,builder:u,handler:async o=>a({command:`google-tag-gateway config get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf google-tag-gateway config get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/settings/google-tag-gateway/config`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await e(o),s=await t({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s;let c=await i(`Loading`,async()=>a.googleTagGateway.config.get({zone_id:s}));n(c,{successLabel:`Loaded`})})};function f(e){return e.usage(`$0 google-tag-gateway config update
5
5
 
6
- Updates the Google Tag Gateway configuration for a zone.`).option(`enabled`,{type:`boolean`,description:`Enables or disables Google Tag Gateway for this zone.`}).option(`endpoint`,{type:`string`,description:`Specifies the endpoint path for proxying Google Tag Manager requests. Use an absolute path starting with '/', with no nested paths and alphanumeric characters only (e.g. /metrics).`}).option(`hide-original-ip`,{type:`boolean`,description:`Hides the original client IP address from Google when enabled.`}).option(`measurement-id`,{type:`string`,description:`Specify the Google Tag Manager container or measurement ID (e.g. GTM-XXXXXXX or G-XXXXXXXXXX).`}).option(`set-up-tag`,{type:`boolean`,description:`Set up the associated Google Tag on the zone automatically when enabled.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Google Tag Gateway configuration for a zone.`})}const p={command:`update`,describe:`Update Google Tag Gateway configuration`,builder:f,handler:async u=>a({command:`google-tag-gateway config update`,classification:{safeFlags:[`enabled`,`hide-original-ip`,`set-up-tag`,`dry-run`]}},u,async()=>{if(u.dryRun){r({command:`cf google-tag-gateway config update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${u.zone??u.zoneId??`<zone>`}/settings/google-tag-gateway/config`,pathParams:{"zone-id":String(u.zone??u[`zone-id`]??``)},bodyKind:`json`,body:u.body===void 0?s({enabled:u.enabled,endpoint:c(u.endpoint,`endpoint`,`text`),hideOriginalIp:u[`hide-original-ip`],measurementId:c(u[`measurement-id`],`measurement-id`,`text`),setUpTag:u[`set-up-tag`]}):o(u.body)});return}let a=await e(u),d=await t({zone:u.zone},a,{quiet:u.quiet});if(u.zoneId=d,u.body){let e=o(u.body);n(await i(`Updating`,async()=>a.googleTagGateway.config.update({body:e,zone_id:d})),{successLabel:`Updated`});return}if(u.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);if(u.endpoint===void 0&&(u.endpoint=await l(`endpoint`,`Specifies the endpoint path for proxying Google Tag Manager requests. Use an absolute path starting with '/', with no nested paths and alphanumeric characters only (e.g. /metrics).`)),u[`hide-original-ip`]===void 0)throw Error(`--hide-original-ip is required (or pass --body with this field set).`);u[`measurement-id`]===void 0&&(u[`measurement-id`]=await l(`measurement-id`,`Specify the Google Tag Manager container or measurement ID (e.g. GTM-XXXXXXX or G-XXXXXXXXXX).`));let f=s({enabled:u.enabled,endpoint:c(u.endpoint,`endpoint`,`text`),hideOriginalIp:u[`hide-original-ip`],measurementId:c(u[`measurement-id`],`measurement-id`,`text`),setUpTag:u[`set-up-tag`]});n(await i(`Updating`,async()=>a.googleTagGateway.config.update({body:f,zone_id:d})),{successLabel:`Updated`})})},m={command:`config`,describe:`Google Tag Gateway config operations`,builder:e=>e.command(d).command(p).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},h={command:`google-tag-gateway`,describe:`Google Tag Gateway operations`,builder:e=>e.command(m).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{h as default};
6
+ Updates the Google Tag Gateway configuration for a zone.`).option(`enabled`,{type:`boolean`,description:`Enables or disables Google Tag Gateway for this zone.`}).option(`endpoint`,{type:`string`,description:`Specifies the endpoint path for proxying Google Tag Manager requests. Use an absolute path starting with '/', with no nested paths and alphanumeric characters only (e.g. /metrics).`}).option(`hide-original-ip`,{type:`boolean`,description:`Hides the original client IP address from Google when enabled.`}).option(`measurement-id`,{type:`string`,description:`Specify the Google Tag Manager container or measurement ID (e.g. GTM-XXXXXXX or G-XXXXXXXXXX).`}).option(`set-up-tag`,{type:`boolean`,description:`Set up the associated Google Tag on the zone automatically when enabled.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Google Tag Gateway configuration for a zone.`})}const p={command:`update`,describe:`Update Google Tag Gateway configuration`,builder:f,handler:async u=>a({command:`google-tag-gateway config update`,classification:{safeFlags:[`enabled`,`hide-original-ip`,`set-up-tag`,`dry-run`]}},u,async()=>{if(u.dryRun){r({command:`cf google-tag-gateway config update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${u.zone??u.zoneId??`<zone>`}/settings/google-tag-gateway/config`,pathParams:{"zone-id":String(u.zone??u[`zone-id`]??``)},bodyKind:`json`,body:u.body===void 0?s({enabled:u.enabled,endpoint:c(u.endpoint,`endpoint`,`text`),hideOriginalIp:u[`hide-original-ip`],measurementId:c(u[`measurement-id`],`measurement-id`,`text`),setUpTag:u[`set-up-tag`]}):o(u.body)});return}let a=await e(u),d=await t({zone:u.zone},a,{quiet:u.quiet});if(u.zoneId=d,u.body){let e=o(u.body),t=await i(`Updating`,async()=>a.googleTagGateway.config.update({body:e,zone_id:d}));n(t,{successLabel:`Updated`});return}if(u.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);if(u.endpoint===void 0&&(u.endpoint=await l(`endpoint`,`Specifies the endpoint path for proxying Google Tag Manager requests. Use an absolute path starting with '/', with no nested paths and alphanumeric characters only (e.g. /metrics).`)),u[`hide-original-ip`]===void 0)throw Error(`--hide-original-ip is required (or pass --body with this field set).`);u[`measurement-id`]===void 0&&(u[`measurement-id`]=await l(`measurement-id`,`Specify the Google Tag Manager container or measurement ID (e.g. GTM-XXXXXXX or G-XXXXXXXXXX).`));let f=s({enabled:u.enabled,endpoint:c(u.endpoint,`endpoint`,`text`),hideOriginalIp:u[`hide-original-ip`],measurementId:c(u[`measurement-id`],`measurement-id`,`text`),setUpTag:u[`set-up-tag`]}),p=await i(`Updating`,async()=>a.googleTagGateway.config.update({body:f,zone_id:d}));n(p,{successLabel:`Updated`})})},m={command:`config`,describe:`Google Tag Gateway config operations`,builder:e=>e.command(d).command(p).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},h={command:`google-tag-gateway`,describe:`Google Tag Gateway operations`,builder:e=>e.command(m).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{h as default};
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ import{n as e}from"./source-mXUcrTVw.mjs";var t=/* @__PURE__ */ e(((e,t)=>{t.exports=typeof process==`object`&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error(`SEMVER`,...e):()=>{}})),n=/* @__PURE__ */ e(((e,t)=>{t.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:2**53-1||
3
+ /* istanbul ignore next */9007199254740991,RELEASE_TYPES:[`major`,`premajor`,`minor`,`preminor`,`patch`,`prepatch`,`prerelease`],SEMVER_SPEC_VERSION:`2.0.0`,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}})),r=/* @__PURE__ */ e(((e,r)=>{let{MAX_SAFE_COMPONENT_LENGTH:i,MAX_SAFE_BUILD_LENGTH:a,MAX_LENGTH:o}=n(),s=t();e=r.exports={};let c=e.re=[],l=e.safeRe=[],u=e.src=[],d=e.safeSrc=[],f=e.t={},p=0,m=`[a-zA-Z0-9-]`,h=[[`\\s`,1],[`\\d`,o],[m,a]],g=e=>{for(let[t,n]of h)e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return e},_=(e,t,n)=>{let r=g(t),i=p++;s(e,i,t),f[e]=i,u[i]=t,d[i]=r,c[i]=new RegExp(t,n?`g`:void 0),l[i]=new RegExp(r,n?`g`:void 0)};_(`NUMERICIDENTIFIER`,`0|[1-9]\\d*`),_(`NUMERICIDENTIFIERLOOSE`,`\\d+`),_(`NONNUMERICIDENTIFIER`,`\\d*[a-zA-Z-]${m}*`),_(`MAINVERSION`,`(${u[f.NUMERICIDENTIFIER]})\\.(${u[f.NUMERICIDENTIFIER]})\\.(${u[f.NUMERICIDENTIFIER]})`),_(`MAINVERSIONLOOSE`,`(${u[f.NUMERICIDENTIFIERLOOSE]})\\.(${u[f.NUMERICIDENTIFIERLOOSE]})\\.(${u[f.NUMERICIDENTIFIERLOOSE]})`),_(`PRERELEASEIDENTIFIER`,`(?:${u[f.NONNUMERICIDENTIFIER]}|${u[f.NUMERICIDENTIFIER]})`),_(`PRERELEASEIDENTIFIERLOOSE`,`(?:${u[f.NONNUMERICIDENTIFIER]}|${u[f.NUMERICIDENTIFIERLOOSE]})`),_(`PRERELEASE`,`(?:-(${u[f.PRERELEASEIDENTIFIER]}(?:\\.${u[f.PRERELEASEIDENTIFIER]})*))`),_(`PRERELEASELOOSE`,`(?:-?(${u[f.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${u[f.PRERELEASEIDENTIFIERLOOSE]})*))`),_(`BUILDIDENTIFIER`,`${m}+`),_(`BUILD`,`(?:\\+(${u[f.BUILDIDENTIFIER]}(?:\\.${u[f.BUILDIDENTIFIER]})*))`),_(`FULLPLAIN`,`v?${u[f.MAINVERSION]}${u[f.PRERELEASE]}?${u[f.BUILD]}?`),_(`FULL`,`^${u[f.FULLPLAIN]}$`),_(`LOOSEPLAIN`,`[v=\\s]*${u[f.MAINVERSIONLOOSE]}${u[f.PRERELEASELOOSE]}?${u[f.BUILD]}?`),_(`LOOSE`,`^${u[f.LOOSEPLAIN]}$`),_(`GTLT`,`((?:<|>)?=?)`),_(`XRANGEIDENTIFIERLOOSE`,`${u[f.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),_(`XRANGEIDENTIFIER`,`${u[f.NUMERICIDENTIFIER]}|x|X|\\*`),_(`XRANGEPLAIN`,`[v=\\s]*(${u[f.XRANGEIDENTIFIER]})(?:\\.(${u[f.XRANGEIDENTIFIER]})(?:\\.(${u[f.XRANGEIDENTIFIER]})(?:${u[f.PRERELEASE]})?${u[f.BUILD]}?)?)?`),_(`XRANGEPLAINLOOSE`,`[v=\\s]*(${u[f.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[f.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[f.XRANGEIDENTIFIERLOOSE]})(?:${u[f.PRERELEASELOOSE]})?${u[f.BUILD]}?)?)?`),_(`XRANGE`,`^${u[f.GTLT]}\\s*${u[f.XRANGEPLAIN]}$`),_(`XRANGELOOSE`,`^${u[f.GTLT]}\\s*${u[f.XRANGEPLAINLOOSE]}$`),_(`COERCEPLAIN`,`(^|[^\\d])(\\d{1,${i}})(?:\\.(\\d{1,${i}}))?(?:\\.(\\d{1,${i}}))?`),_(`COERCE`,`${u[f.COERCEPLAIN]}(?:$|[^\\d])`),_(`COERCEFULL`,u[f.COERCEPLAIN]+`(?:${u[f.PRERELEASE]})?(?:${u[f.BUILD]})?(?:$|[^\\d])`),_(`COERCERTL`,u[f.COERCE],!0),_(`COERCERTLFULL`,u[f.COERCEFULL],!0),_(`LONETILDE`,`(?:~>?)`),_(`TILDETRIM`,`(\\s*)${u[f.LONETILDE]}\\s+`,!0),e.tildeTrimReplace=`$1~`,_(`TILDE`,`^${u[f.LONETILDE]}${u[f.XRANGEPLAIN]}$`),_(`TILDELOOSE`,`^${u[f.LONETILDE]}${u[f.XRANGEPLAINLOOSE]}$`),_(`LONECARET`,`(?:\\^)`),_(`CARETTRIM`,`(\\s*)${u[f.LONECARET]}\\s+`,!0),e.caretTrimReplace=`$1^`,_(`CARET`,`^${u[f.LONECARET]}${u[f.XRANGEPLAIN]}$`),_(`CARETLOOSE`,`^${u[f.LONECARET]}${u[f.XRANGEPLAINLOOSE]}$`),_(`COMPARATORLOOSE`,`^${u[f.GTLT]}\\s*(${u[f.LOOSEPLAIN]})$|^$`),_(`COMPARATOR`,`^${u[f.GTLT]}\\s*(${u[f.FULLPLAIN]})$|^$`),_(`COMPARATORTRIM`,`(\\s*)${u[f.GTLT]}\\s*(${u[f.LOOSEPLAIN]}|${u[f.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace=`$1$2$3`,_(`HYPHENRANGE`,`^\\s*(${u[f.XRANGEPLAIN]})\\s+-\\s+(${u[f.XRANGEPLAIN]})\\s*$`),_(`HYPHENRANGELOOSE`,`^\\s*(${u[f.XRANGEPLAINLOOSE]})\\s+-\\s+(${u[f.XRANGEPLAINLOOSE]})\\s*$`),_(`STAR`,`(<|>)?=?\\s*\\*`),_(`GTE0`,`^\\s*>=\\s*0\\.0\\.0\\s*$`),_(`GTE0PRE`,`^\\s*>=\\s*0\\.0\\.0-0\\s*$`)})),i=/* @__PURE__ */ e(((e,t)=>{let n=Object.freeze({loose:!0}),r=Object.freeze({});t.exports=e=>e?typeof e==`object`?e:n:r})),a=/* @__PURE__ */ e(((e,t)=>{let n=/^[0-9]+$/,r=(e,t)=>{if(typeof e==`number`&&typeof t==`number`)return e===t?0:e<t?-1:1;let r=n.test(e),i=n.test(t);return r&&i&&(e=+e,t=+t),e===t?0:r&&!i?-1:i&&!r?1:e<t?-1:1};t.exports={compareIdentifiers:r,rcompareIdentifiers:(e,t)=>r(t,e)}})),o=/* @__PURE__ */ e(((e,o)=>{let s=t(),{MAX_LENGTH:c,MAX_SAFE_INTEGER:l}=n(),{safeRe:u,t:d}=r(),f=i(),{compareIdentifiers:p}=a(),m=(e,t)=>{let n=t.split(`.`);if(n.length>e.length)return!1;for(let t=0;t<n.length;t++)if(p(e[t],n[t])!==0)return!1;return!0};o.exports=class e{constructor(t,n){if(n=f(n),t instanceof e){if(t.loose===!!n.loose&&t.includePrerelease===!!n.includePrerelease)return t;t=t.version}else if(typeof t!=`string`)throw TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>c)throw TypeError(`version is longer than ${c} characters`);s(`SemVer`,t,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;let r=t.trim().match(n.loose?u[d.LOOSE]:u[d.FULL]);if(!r)throw TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>l||this.major<0)throw TypeError(`Invalid major version`);if(this.minor>l||this.minor<0)throw TypeError(`Invalid minor version`);if(this.patch>l||this.patch<0)throw TypeError(`Invalid patch version`);this.prerelease=r[4]?r[4].split(`.`).map(e=>{if(/^[0-9]+$/.test(e)){let t=+e;if(t>=0&&t<l)return t}return e}):[],this.build=r[5]?r[5].split(`.`):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(`.`)}`),this.version}toString(){return this.version}compare(t){if(s(`SemVer.compare`,this.version,this.options,t),!(t instanceof e)){if(typeof t==`string`&&t===this.version)return 0;t=new e(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof e||(t=new e(t,this.options)),this.major<t.major?-1:this.major>t.major?1:this.minor<t.minor?-1:this.minor>t.minor?1:this.patch<t.patch?-1:+(this.patch>t.patch)}comparePre(t){if(t instanceof e||(t=new e(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let n=0;do{let e=this.prerelease[n],r=t.prerelease[n];if(s(`prerelease compare`,n,e,r),e===void 0&&r===void 0)return 0;if(r===void 0)return 1;if(e===void 0)return-1;if(e!==r)return p(e,r)}while(++n)}compareBuild(t){t instanceof e||(t=new e(t,this.options));let n=0;do{let e=this.build[n],r=t.build[n];if(s(`build compare`,n,e,r),e===void 0&&r===void 0)return 0;if(r===void 0)return 1;if(e===void 0)return-1;if(e!==r)return p(e,r)}while(++n)}inc(e,t,n){if(e.startsWith(`pre`)){if(!t&&n===!1)throw Error(`invalid increment argument: identifier is empty`);if(t){let e=`-${t}`.match(this.options.loose?u[d.PRERELEASELOOSE]:u[d.PRERELEASE]);if(!e||e[1]!==t)throw Error(`invalid identifier: ${t}`)}}switch(e){case`premajor`:this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc(`pre`,t,n);break;case`preminor`:this.prerelease.length=0,this.patch=0,this.minor++,this.inc(`pre`,t,n);break;case`prepatch`:this.prerelease.length=0,this.inc(`patch`,t,n),this.inc(`pre`,t,n);break;case`prerelease`:this.prerelease.length===0&&this.inc(`patch`,t,n),this.inc(`pre`,t,n);break;case`release`:if(this.prerelease.length===0)throw Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case`major`:(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case`minor`:(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case`patch`:this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case`pre`:{let e=+!!Number(n);if(this.prerelease.length===0)this.prerelease=[e];else{let r=this.prerelease.length;for(;--r>=0;)typeof this.prerelease[r]==`number`&&(this.prerelease[r]++,r=-2);if(r===-1){if(t===this.prerelease.join(`.`)&&n===!1)throw Error(`invalid increment argument: identifier already exists`);this.prerelease.push(e)}}if(t){let r=[t,e];if(n===!1&&(r=[t]),m(this.prerelease,t)){let e=this.prerelease[t.split(`.`).length];isNaN(e)&&(this.prerelease=r)}else this.prerelease=r}break}default:throw Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(`.`)}`),this}}})),s=/* @__PURE__ */ e(((e,t)=>{let n=o();t.exports=(e,t,r)=>new n(e,r).compare(new n(t,r))})),c=/* @__PURE__ */ e(((e,t)=>{let n=s();t.exports=(e,t,r)=>n(e,t,r)>0}));export{r as a,i,s as n,n as o,o as r,t as s,c as t};
@@ -1,22 +1,22 @@
1
1
  #!/usr/bin/env node
2
- import{n as e}from"./auth-Br-t8vL_.mjs";import{i as t}from"./context-CquYYyS3.mjs";import{t as n}from"./output-ClYel9WX.mjs";import{t as r}from"./dry-run-p9Q7nMZ5.mjs";import{t as i}from"./progress-TLUEIYE6.mjs";import{t as a}from"./run-iFM5TxtQ.mjs";import"./telemetry-DoBQOGRk.mjs";import{n as o,t as s}from"./body-parser-NjzJZMOV.mjs";import{n as c}from"./input-validation-0CeePPHp.mjs";import{a as l,n as u}from"./prompt-Ck_1PCHm.mjs";function d(e){return e.usage(`$0 healthchecks create
2
+ import{n as e}from"./auth-CGLsxbc6.mjs";import{i as t}from"./context-q7UaYK69.mjs";import{t as n}from"./output-BOe-3AQG.mjs";import{t as r}from"./dry-run-DRj2_uV3.mjs";import{t as i}from"./progress-BtkTVcHI.mjs";import{t as a}from"./run-BvHwWWUX.mjs";import"./telemetry-BsYO3nxG.mjs";import{n as o,t as s}from"./body-parser-DkHKPkJ7.mjs";import{n as c}from"./input-validation-D7z60HJH.mjs";import{a as l,n as u}from"./prompt-RlgRrmbm.mjs";function d(e){return e.usage(`$0 healthchecks create
3
3
 
4
- 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`]}).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`]}).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 f={command:`create`,describe:`Create Health Check`,builder:d,handler:async u=>a({command:`healthchecks create`,classification:{safeFlags:[`http-config-allow-insecure`,`http-config-follow-redirects`,`http-config-method`,`suspended`,`tcp-config-method`,`dry-run`]}},u,async()=>{if(u.dryRun){r({command:`cf healthchecks create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${u.zone??u.zoneId??`<zone>`}/healthchecks`,pathParams:{"zone-id":String(u.zone??u[`zone-id`]??``)},bodyKind:`json`,body:u.body===void 0?s({address:c(u.address,`address`,`text`),check_regions:u[`check-regions`],consecutive_fails:u[`consecutive-fails`],consecutive_successes:u[`consecutive-successes`],description:c(u.description,`description`,`text`),http_config:{allow_insecure:u[`http-config-allow-insecure`],expected_body:c(u[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:u[`http-config-expected-codes`],follow_redirects:u[`http-config-follow-redirects`],method:c(u[`http-config-method`],`http-config-method`,`text`),path:c(u[`http-config-path`],`http-config-path`,`text`),port:u[`http-config-port`]},interval:u.interval,name:c(u.name,`name`,`text`),retries:u.retries,suspended:u.suspended,tcp_config:{method:c(u[`tcp-config-method`],`tcp-config-method`,`text`),port:u[`tcp-config-port`]},timeout:u.timeout,type:c(u.type,`type`,`text`)}):o(u.body)});return}let a=await e(u),d=await t({zone:u.zone},a,{quiet:u.quiet});if(u.zoneId=d,u.body){let e=o(u.body);n(await i(`Creating`,async()=>a.healthchecks.create({body:e,zone_id:d})),{successLabel:`Created`});return}u.address===void 0&&(u.address=await l(`address`,`The hostname or IP address of the origin server to run health checks on.`)),u.name===void 0&&(u.name=await l(`name`,`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`));let f=s({address:c(u.address,`address`,`text`),check_regions:u[`check-regions`],consecutive_fails:u[`consecutive-fails`],consecutive_successes:u[`consecutive-successes`],description:c(u.description,`description`,`text`),http_config:{allow_insecure:u[`http-config-allow-insecure`],expected_body:c(u[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:u[`http-config-expected-codes`],follow_redirects:u[`http-config-follow-redirects`],method:c(u[`http-config-method`],`http-config-method`,`text`),path:c(u[`http-config-path`],`http-config-path`,`text`),port:u[`http-config-port`]},interval:u.interval,name:c(u.name,`name`,`text`),retries:u.retries,suspended:u.suspended,tcp_config:{method:c(u[`tcp-config-method`],`tcp-config-method`,`text`),port:u[`tcp-config-port`]},timeout:u.timeout,type:c(u.type,`type`,`text`)});n(await i(`Creating`,async()=>a.healthchecks.create({body:f,zone_id:d})),{successLabel:`Created`})})};function p(e){return e.usage(`$0 healthchecks delete <healthcheck-id>
4
+ 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`]}).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`]}).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 f={command:`create`,describe:`Create Health Check`,builder:d,handler:async u=>a({command:`healthchecks create`,classification:{safeFlags:[`http-config-allow-insecure`,`http-config-follow-redirects`,`http-config-method`,`suspended`,`tcp-config-method`,`dry-run`]}},u,async()=>{if(u.dryRun){r({command:`cf healthchecks create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${u.zone??u.zoneId??`<zone>`}/healthchecks`,pathParams:{"zone-id":String(u.zone??u[`zone-id`]??``)},bodyKind:`json`,body:u.body===void 0?s({address:c(u.address,`address`,`text`),check_regions:u[`check-regions`],consecutive_fails:u[`consecutive-fails`],consecutive_successes:u[`consecutive-successes`],description:c(u.description,`description`,`text`),http_config:{allow_insecure:u[`http-config-allow-insecure`],expected_body:c(u[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:u[`http-config-expected-codes`],follow_redirects:u[`http-config-follow-redirects`],method:c(u[`http-config-method`],`http-config-method`,`text`),path:c(u[`http-config-path`],`http-config-path`,`text`),port:u[`http-config-port`]},interval:u.interval,name:c(u.name,`name`,`text`),retries:u.retries,suspended:u.suspended,tcp_config:{method:c(u[`tcp-config-method`],`tcp-config-method`,`text`),port:u[`tcp-config-port`]},timeout:u.timeout,type:c(u.type,`type`,`text`)}):o(u.body)});return}let a=await e(u),d=await t({zone:u.zone},a,{quiet:u.quiet});if(u.zoneId=d,u.body){let e=o(u.body),t=await i(`Creating`,async()=>a.healthchecks.create({body:e,zone_id:d}));n(t,{successLabel:`Created`});return}u.address===void 0&&(u.address=await l(`address`,`The hostname or IP address of the origin server to run health checks on.`)),u.name===void 0&&(u.name=await l(`name`,`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`));let f=s({address:c(u.address,`address`,`text`),check_regions:u[`check-regions`],consecutive_fails:u[`consecutive-fails`],consecutive_successes:u[`consecutive-successes`],description:c(u.description,`description`,`text`),http_config:{allow_insecure:u[`http-config-allow-insecure`],expected_body:c(u[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:u[`http-config-expected-codes`],follow_redirects:u[`http-config-follow-redirects`],method:c(u[`http-config-method`],`http-config-method`,`text`),path:c(u[`http-config-path`],`http-config-path`,`text`),port:u[`http-config-port`]},interval:u.interval,name:c(u.name,`name`,`text`),retries:u.retries,suspended:u.suspended,tcp_config:{method:c(u[`tcp-config-method`],`tcp-config-method`,`text`),port:u[`tcp-config-port`]},timeout:u.timeout,type:c(u.type,`type`,`text`)}),p=await i(`Creating`,async()=>a.healthchecks.create({body:f,zone_id:d}));n(p,{successLabel:`Created`})})};function p(e){return e.usage(`$0 healthchecks delete <healthcheck-id>
5
5
 
6
6
  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 m={command:`delete <healthcheck-id>`,describe:`Delete Health Check`,builder:p,handler:async o=>a({command:`healthchecks delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},o,async()=>{if(o.dryRun){r({command:`cf healthchecks delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/healthchecks/${o[`healthcheck-id`]==null?`<healthcheck-id>`:encodeURIComponent(String(o[`healthcheck-id`]))}`,pathParams:{"healthcheck-id":String(o[`healthcheck-id`]??``),"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await e(o),s=await t({zone:o.zone},a,{quiet:o.quiet});if(o.zoneId=s,!await u({force:!!o.force})){process.stderr.write(`Aborted.
7
- `);return}n(await i(`Deleting`,async()=>a.healthchecks.delete({zone_id:s,healthcheck_id:o[`healthcheck-id`]})),{successLabel:`Deleted`})})};function h(e){return e.usage(`$0 healthchecks edit <healthcheck-id>
7
+ `);return}let c=await i(`Deleting`,async()=>a.healthchecks.delete({zone_id:s,healthcheck_id:o[`healthcheck-id`]}));n(c,{successLabel:`Deleted`})})};function h(e){return e.usage(`$0 healthchecks edit <healthcheck-id>
8
8
 
9
- 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`]}).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`]}).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 g={command:`edit <healthcheck-id>`,describe:`Patch Health Check`,builder:h,handler:async u=>a({command:`healthchecks edit`,classification:{safeFlags:[`http-config-allow-insecure`,`http-config-follow-redirects`,`http-config-method`,`suspended`,`tcp-config-method`,`dry-run`]}},u,async()=>{if(u.dryRun){r({command:`cf healthchecks edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${u.zone??u.zoneId??`<zone>`}/healthchecks/${u[`healthcheck-id`]==null?`<healthcheck-id>`:encodeURIComponent(String(u[`healthcheck-id`]))}`,pathParams:{"healthcheck-id":String(u[`healthcheck-id`]??``),"zone-id":String(u.zone??u[`zone-id`]??``)},bodyKind:`json`,body:u.body===void 0?s({address:c(u.address,`address`,`text`),check_regions:u[`check-regions`],consecutive_fails:u[`consecutive-fails`],consecutive_successes:u[`consecutive-successes`],description:c(u.description,`description`,`text`),http_config:{allow_insecure:u[`http-config-allow-insecure`],expected_body:c(u[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:u[`http-config-expected-codes`],follow_redirects:u[`http-config-follow-redirects`],method:c(u[`http-config-method`],`http-config-method`,`text`),path:c(u[`http-config-path`],`http-config-path`,`text`),port:u[`http-config-port`]},interval:u.interval,name:c(u.name,`name`,`text`),retries:u.retries,suspended:u.suspended,tcp_config:{method:c(u[`tcp-config-method`],`tcp-config-method`,`text`),port:u[`tcp-config-port`]},timeout:u.timeout,type:c(u.type,`type`,`text`)}):o(u.body)});return}let a=await e(u),d=await t({zone:u.zone},a,{quiet:u.quiet});if(u.zoneId=d,u.body){let e=o(u.body);n(await i(`Updating`,async()=>a.healthchecks.edit({body:e,zone_id:d,healthcheck_id:u[`healthcheck-id`]})),{successLabel:`Updated`});return}u.address===void 0&&(u.address=await l(`address`,`The hostname or IP address of the origin server to run health checks on.`)),u.name===void 0&&(u.name=await l(`name`,`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`));let f=s({address:c(u.address,`address`,`text`),check_regions:u[`check-regions`],consecutive_fails:u[`consecutive-fails`],consecutive_successes:u[`consecutive-successes`],description:c(u.description,`description`,`text`),http_config:{allow_insecure:u[`http-config-allow-insecure`],expected_body:c(u[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:u[`http-config-expected-codes`],follow_redirects:u[`http-config-follow-redirects`],method:c(u[`http-config-method`],`http-config-method`,`text`),path:c(u[`http-config-path`],`http-config-path`,`text`),port:u[`http-config-port`]},interval:u.interval,name:c(u.name,`name`,`text`),retries:u.retries,suspended:u.suspended,tcp_config:{method:c(u[`tcp-config-method`],`tcp-config-method`,`text`),port:u[`tcp-config-port`]},timeout:u.timeout,type:c(u.type,`type`,`text`)});n(await i(`Updating`,async()=>a.healthchecks.edit({body:f,zone_id:d,healthcheck_id:u[`healthcheck-id`]})),{successLabel:`Updated`})})};function _(e){return e.usage(`$0 healthchecks get <healthcheck-id>
9
+ 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`]}).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`]}).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 g={command:`edit <healthcheck-id>`,describe:`Patch Health Check`,builder:h,handler:async u=>a({command:`healthchecks edit`,classification:{safeFlags:[`http-config-allow-insecure`,`http-config-follow-redirects`,`http-config-method`,`suspended`,`tcp-config-method`,`dry-run`]}},u,async()=>{if(u.dryRun){r({command:`cf healthchecks edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${u.zone??u.zoneId??`<zone>`}/healthchecks/${u[`healthcheck-id`]==null?`<healthcheck-id>`:encodeURIComponent(String(u[`healthcheck-id`]))}`,pathParams:{"healthcheck-id":String(u[`healthcheck-id`]??``),"zone-id":String(u.zone??u[`zone-id`]??``)},bodyKind:`json`,body:u.body===void 0?s({address:c(u.address,`address`,`text`),check_regions:u[`check-regions`],consecutive_fails:u[`consecutive-fails`],consecutive_successes:u[`consecutive-successes`],description:c(u.description,`description`,`text`),http_config:{allow_insecure:u[`http-config-allow-insecure`],expected_body:c(u[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:u[`http-config-expected-codes`],follow_redirects:u[`http-config-follow-redirects`],method:c(u[`http-config-method`],`http-config-method`,`text`),path:c(u[`http-config-path`],`http-config-path`,`text`),port:u[`http-config-port`]},interval:u.interval,name:c(u.name,`name`,`text`),retries:u.retries,suspended:u.suspended,tcp_config:{method:c(u[`tcp-config-method`],`tcp-config-method`,`text`),port:u[`tcp-config-port`]},timeout:u.timeout,type:c(u.type,`type`,`text`)}):o(u.body)});return}let a=await e(u),d=await t({zone:u.zone},a,{quiet:u.quiet});if(u.zoneId=d,u.body){let e=o(u.body),t=await i(`Updating`,async()=>a.healthchecks.edit({body:e,zone_id:d,healthcheck_id:u[`healthcheck-id`]}));n(t,{successLabel:`Updated`});return}u.address===void 0&&(u.address=await l(`address`,`The hostname or IP address of the origin server to run health checks on.`)),u.name===void 0&&(u.name=await l(`name`,`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`));let f=s({address:c(u.address,`address`,`text`),check_regions:u[`check-regions`],consecutive_fails:u[`consecutive-fails`],consecutive_successes:u[`consecutive-successes`],description:c(u.description,`description`,`text`),http_config:{allow_insecure:u[`http-config-allow-insecure`],expected_body:c(u[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:u[`http-config-expected-codes`],follow_redirects:u[`http-config-follow-redirects`],method:c(u[`http-config-method`],`http-config-method`,`text`),path:c(u[`http-config-path`],`http-config-path`,`text`),port:u[`http-config-port`]},interval:u.interval,name:c(u.name,`name`,`text`),retries:u.retries,suspended:u.suspended,tcp_config:{method:c(u[`tcp-config-method`],`tcp-config-method`,`text`),port:u[`tcp-config-port`]},timeout:u.timeout,type:c(u.type,`type`,`text`)}),p=await i(`Updating`,async()=>a.healthchecks.edit({body:f,zone_id:d,healthcheck_id:u[`healthcheck-id`]}));n(p,{successLabel:`Updated`})})};function _(e){return e.usage(`$0 healthchecks get <healthcheck-id>
10
10
 
11
- 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 v={command:`get <healthcheck-id>`,describe:`Health Check Details`,builder:_,handler:async o=>a({command:`healthchecks get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf healthchecks get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/healthchecks/${o[`healthcheck-id`]==null?`<healthcheck-id>`:encodeURIComponent(String(o[`healthcheck-id`]))}`,pathParams:{"healthcheck-id":String(o[`healthcheck-id`]??``),"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await e(o),s=await t({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s,n(await i(`Loading`,async()=>a.healthchecks.get({zone_id:s,healthcheck_id:o[`healthcheck-id`]})),{successLabel:`Loaded`})})};function y(e){return e.usage(`$0 healthchecks list
11
+ 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 v={command:`get <healthcheck-id>`,describe:`Health Check Details`,builder:_,handler:async o=>a({command:`healthchecks get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf healthchecks get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/healthchecks/${o[`healthcheck-id`]==null?`<healthcheck-id>`:encodeURIComponent(String(o[`healthcheck-id`]))}`,pathParams:{"healthcheck-id":String(o[`healthcheck-id`]??``),"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await e(o),s=await t({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s;let c=await i(`Loading`,async()=>a.healthchecks.get({zone_id:s,healthcheck_id:o[`healthcheck-id`]}));n(c,{successLabel:`Loaded`})})};function y(e){return e.usage(`$0 healthchecks list
12
12
 
13
- 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 b={command:`list`,describe:`List Health Checks`,builder:y,handler:async o=>a({command:`healthchecks list`,classification:{safeFlags:[`dry-run`]}},o,async()=>{let a={page:o.page,per_page:o[`per-page`]};if(o.dryRun){r({command:`cf healthchecks list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/healthchecks`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},query:a,bodyKind:`none`});return}let s=await e(o),c=await t({zone:o.zone},s,{quiet:o.quiet});o.zoneId=c,n(await i(`Loading`,async()=>s.healthchecks.list({zone_id:c,...a})),{successLabel:`Loaded`})})};function x(e){return e.usage(`$0 healthchecks previews create
13
+ 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 b={command:`list`,describe:`List Health Checks`,builder:y,handler:async o=>a({command:`healthchecks list`,classification:{safeFlags:[`dry-run`]}},o,async()=>{let a={page:o.page,per_page:o[`per-page`]};if(o.dryRun){r({command:`cf healthchecks list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/healthchecks`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},query:a,bodyKind:`none`});return}let s=await e(o),c=await t({zone:o.zone},s,{quiet:o.quiet});o.zoneId=c;let l=await i(`Loading`,async()=>s.healthchecks.list({zone_id:c,...a}));n(l,{successLabel:`Loaded`})})};function x(e){return e.usage(`$0 healthchecks previews create
14
14
 
15
- Create a new preview 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`]}).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`]}).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 S={command:`create`,describe:`Create Preview Health Check`,builder:x,handler:async u=>a({command:`healthchecks previews create`,classification:{safeFlags:[`http-config-allow-insecure`,`http-config-follow-redirects`,`http-config-method`,`suspended`,`tcp-config-method`,`dry-run`]}},u,async()=>{if(u.dryRun){r({command:`cf healthchecks previews create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${u.zone??u.zoneId??`<zone>`}/healthchecks/preview`,pathParams:{"zone-id":String(u.zone??u[`zone-id`]??``)},bodyKind:`json`,body:u.body===void 0?s({address:c(u.address,`address`,`text`),check_regions:u[`check-regions`],consecutive_fails:u[`consecutive-fails`],consecutive_successes:u[`consecutive-successes`],description:c(u.description,`description`,`text`),http_config:{allow_insecure:u[`http-config-allow-insecure`],expected_body:c(u[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:u[`http-config-expected-codes`],follow_redirects:u[`http-config-follow-redirects`],method:c(u[`http-config-method`],`http-config-method`,`text`),path:c(u[`http-config-path`],`http-config-path`,`text`),port:u[`http-config-port`]},interval:u.interval,name:c(u.name,`name`,`text`),retries:u.retries,suspended:u.suspended,tcp_config:{method:c(u[`tcp-config-method`],`tcp-config-method`,`text`),port:u[`tcp-config-port`]},timeout:u.timeout,type:c(u.type,`type`,`text`)}):o(u.body)});return}let a=await e(u),d=await t({zone:u.zone},a,{quiet:u.quiet});if(u.zoneId=d,u.body){let e=o(u.body);n(await i(`Creating`,async()=>a.healthchecks.previews.create({body:e,zone_id:d})),{successLabel:`Created`});return}u.address===void 0&&(u.address=await l(`address`,`The hostname or IP address of the origin server to run health checks on.`)),u.name===void 0&&(u.name=await l(`name`,`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`));let f=s({address:c(u.address,`address`,`text`),check_regions:u[`check-regions`],consecutive_fails:u[`consecutive-fails`],consecutive_successes:u[`consecutive-successes`],description:c(u.description,`description`,`text`),http_config:{allow_insecure:u[`http-config-allow-insecure`],expected_body:c(u[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:u[`http-config-expected-codes`],follow_redirects:u[`http-config-follow-redirects`],method:c(u[`http-config-method`],`http-config-method`,`text`),path:c(u[`http-config-path`],`http-config-path`,`text`),port:u[`http-config-port`]},interval:u.interval,name:c(u.name,`name`,`text`),retries:u.retries,suspended:u.suspended,tcp_config:{method:c(u[`tcp-config-method`],`tcp-config-method`,`text`),port:u[`tcp-config-port`]},timeout:u.timeout,type:c(u.type,`type`,`text`)});n(await i(`Creating`,async()=>a.healthchecks.previews.create({body:f,zone_id:d})),{successLabel:`Created`})})};function C(e){return e.usage(`$0 healthchecks previews delete <healthcheck-id>
15
+ Create a new preview 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`]}).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`]}).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 S={command:`create`,describe:`Create Preview Health Check`,builder:x,handler:async u=>a({command:`healthchecks previews create`,classification:{safeFlags:[`http-config-allow-insecure`,`http-config-follow-redirects`,`http-config-method`,`suspended`,`tcp-config-method`,`dry-run`]}},u,async()=>{if(u.dryRun){r({command:`cf healthchecks previews create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${u.zone??u.zoneId??`<zone>`}/healthchecks/preview`,pathParams:{"zone-id":String(u.zone??u[`zone-id`]??``)},bodyKind:`json`,body:u.body===void 0?s({address:c(u.address,`address`,`text`),check_regions:u[`check-regions`],consecutive_fails:u[`consecutive-fails`],consecutive_successes:u[`consecutive-successes`],description:c(u.description,`description`,`text`),http_config:{allow_insecure:u[`http-config-allow-insecure`],expected_body:c(u[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:u[`http-config-expected-codes`],follow_redirects:u[`http-config-follow-redirects`],method:c(u[`http-config-method`],`http-config-method`,`text`),path:c(u[`http-config-path`],`http-config-path`,`text`),port:u[`http-config-port`]},interval:u.interval,name:c(u.name,`name`,`text`),retries:u.retries,suspended:u.suspended,tcp_config:{method:c(u[`tcp-config-method`],`tcp-config-method`,`text`),port:u[`tcp-config-port`]},timeout:u.timeout,type:c(u.type,`type`,`text`)}):o(u.body)});return}let a=await e(u),d=await t({zone:u.zone},a,{quiet:u.quiet});if(u.zoneId=d,u.body){let e=o(u.body),t=await i(`Creating`,async()=>a.healthchecks.previews.create({body:e,zone_id:d}));n(t,{successLabel:`Created`});return}u.address===void 0&&(u.address=await l(`address`,`The hostname or IP address of the origin server to run health checks on.`)),u.name===void 0&&(u.name=await l(`name`,`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`));let f=s({address:c(u.address,`address`,`text`),check_regions:u[`check-regions`],consecutive_fails:u[`consecutive-fails`],consecutive_successes:u[`consecutive-successes`],description:c(u.description,`description`,`text`),http_config:{allow_insecure:u[`http-config-allow-insecure`],expected_body:c(u[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:u[`http-config-expected-codes`],follow_redirects:u[`http-config-follow-redirects`],method:c(u[`http-config-method`],`http-config-method`,`text`),path:c(u[`http-config-path`],`http-config-path`,`text`),port:u[`http-config-port`]},interval:u.interval,name:c(u.name,`name`,`text`),retries:u.retries,suspended:u.suspended,tcp_config:{method:c(u[`tcp-config-method`],`tcp-config-method`,`text`),port:u[`tcp-config-port`]},timeout:u.timeout,type:c(u.type,`type`,`text`)}),p=await i(`Creating`,async()=>a.healthchecks.previews.create({body:f,zone_id:d}));n(p,{successLabel:`Created`})})};function C(e){return e.usage(`$0 healthchecks previews delete <healthcheck-id>
16
16
 
17
17
  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 w={command:`delete <healthcheck-id>`,describe:`Delete Preview Health Check`,builder:C,handler:async o=>a({command:`healthchecks previews delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},o,async()=>{if(o.dryRun){r({command:`cf healthchecks previews delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/healthchecks/preview/${o[`healthcheck-id`]==null?`<healthcheck-id>`:encodeURIComponent(String(o[`healthcheck-id`]))}`,pathParams:{"healthcheck-id":String(o[`healthcheck-id`]??``),"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await e(o),s=await t({zone:o.zone},a,{quiet:o.quiet});if(o.zoneId=s,!await u({force:!!o.force})){process.stderr.write(`Aborted.
18
- `);return}n(await i(`Deleting`,async()=>a.healthchecks.previews.delete({zone_id:s,healthcheck_id:o[`healthcheck-id`]})),{successLabel:`Deleted`})})};function T(e){return e.usage(`$0 healthchecks previews get <healthcheck-id>
18
+ `);return}let c=await i(`Deleting`,async()=>a.healthchecks.previews.delete({zone_id:s,healthcheck_id:o[`healthcheck-id`]}));n(c,{successLabel:`Deleted`})})};function T(e){return e.usage(`$0 healthchecks previews get <healthcheck-id>
19
19
 
20
- Fetch a single configured health check preview.`).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 E={command:`get <healthcheck-id>`,describe:`Health Check Preview Details`,builder:T,handler:async o=>a({command:`healthchecks previews get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf healthchecks previews get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/healthchecks/preview/${o[`healthcheck-id`]==null?`<healthcheck-id>`:encodeURIComponent(String(o[`healthcheck-id`]))}`,pathParams:{"healthcheck-id":String(o[`healthcheck-id`]??``),"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await e(o),s=await t({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s,n(await i(`Loading`,async()=>a.healthchecks.previews.get({zone_id:s,healthcheck_id:o[`healthcheck-id`]})),{successLabel:`Loaded`})})},D={command:`previews`,describe:`Test a health check configuration before deploying it to production`,builder:e=>e.command(S).command(w).command(E).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function O(e){return e.usage(`$0 healthchecks update <healthcheck-id>
20
+ Fetch a single configured health check preview.`).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 E={command:`get <healthcheck-id>`,describe:`Health Check Preview Details`,builder:T,handler:async o=>a({command:`healthchecks previews get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf healthchecks previews get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/healthchecks/preview/${o[`healthcheck-id`]==null?`<healthcheck-id>`:encodeURIComponent(String(o[`healthcheck-id`]))}`,pathParams:{"healthcheck-id":String(o[`healthcheck-id`]??``),"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await e(o),s=await t({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s;let c=await i(`Loading`,async()=>a.healthchecks.previews.get({zone_id:s,healthcheck_id:o[`healthcheck-id`]}));n(c,{successLabel:`Loaded`})})},D={command:`previews`,describe:`Test a health check configuration before deploying it to production`,builder:e=>e.command(S).command(w).command(E).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function O(e){return e.usage(`$0 healthchecks update <healthcheck-id>
21
21
 
22
- Update 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`]}).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`]}).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 k={command:`update <healthcheck-id>`,describe:`Update Health Check`,builder:O,handler:async u=>a({command:`healthchecks update`,classification:{safeFlags:[`http-config-allow-insecure`,`http-config-follow-redirects`,`http-config-method`,`suspended`,`tcp-config-method`,`dry-run`]}},u,async()=>{if(u.dryRun){r({command:`cf healthchecks update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${u.zone??u.zoneId??`<zone>`}/healthchecks/${u[`healthcheck-id`]==null?`<healthcheck-id>`:encodeURIComponent(String(u[`healthcheck-id`]))}`,pathParams:{"healthcheck-id":String(u[`healthcheck-id`]??``),"zone-id":String(u.zone??u[`zone-id`]??``)},bodyKind:`json`,body:u.body===void 0?s({address:c(u.address,`address`,`text`),check_regions:u[`check-regions`],consecutive_fails:u[`consecutive-fails`],consecutive_successes:u[`consecutive-successes`],description:c(u.description,`description`,`text`),http_config:{allow_insecure:u[`http-config-allow-insecure`],expected_body:c(u[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:u[`http-config-expected-codes`],follow_redirects:u[`http-config-follow-redirects`],method:c(u[`http-config-method`],`http-config-method`,`text`),path:c(u[`http-config-path`],`http-config-path`,`text`),port:u[`http-config-port`]},interval:u.interval,name:c(u.name,`name`,`text`),retries:u.retries,suspended:u.suspended,tcp_config:{method:c(u[`tcp-config-method`],`tcp-config-method`,`text`),port:u[`tcp-config-port`]},timeout:u.timeout,type:c(u.type,`type`,`text`)}):o(u.body)});return}let a=await e(u),d=await t({zone:u.zone},a,{quiet:u.quiet});if(u.zoneId=d,u.body){let e=o(u.body);n(await i(`Updating`,async()=>a.healthchecks.update({body:e,zone_id:d,healthcheck_id:u[`healthcheck-id`]})),{successLabel:`Updated`});return}u.address===void 0&&(u.address=await l(`address`,`The hostname or IP address of the origin server to run health checks on.`)),u.name===void 0&&(u.name=await l(`name`,`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`));let f=s({address:c(u.address,`address`,`text`),check_regions:u[`check-regions`],consecutive_fails:u[`consecutive-fails`],consecutive_successes:u[`consecutive-successes`],description:c(u.description,`description`,`text`),http_config:{allow_insecure:u[`http-config-allow-insecure`],expected_body:c(u[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:u[`http-config-expected-codes`],follow_redirects:u[`http-config-follow-redirects`],method:c(u[`http-config-method`],`http-config-method`,`text`),path:c(u[`http-config-path`],`http-config-path`,`text`),port:u[`http-config-port`]},interval:u.interval,name:c(u.name,`name`,`text`),retries:u.retries,suspended:u.suspended,tcp_config:{method:c(u[`tcp-config-method`],`tcp-config-method`,`text`),port:u[`tcp-config-port`]},timeout:u.timeout,type:c(u.type,`type`,`text`)});n(await i(`Updating`,async()=>a.healthchecks.update({body:f,zone_id:d,healthcheck_id:u[`healthcheck-id`]})),{successLabel:`Updated`})})},A={command:`healthchecks`,describe:`Standalone health checks that monitor origin server availability from Cloudflare's edge`,builder:e=>e.command(f).command(m).command(g).command(v).command(b).command(k).command(D).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{A as default};
22
+ Update 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`]}).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`]}).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 k={command:`update <healthcheck-id>`,describe:`Update Health Check`,builder:O,handler:async u=>a({command:`healthchecks update`,classification:{safeFlags:[`http-config-allow-insecure`,`http-config-follow-redirects`,`http-config-method`,`suspended`,`tcp-config-method`,`dry-run`]}},u,async()=>{if(u.dryRun){r({command:`cf healthchecks update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${u.zone??u.zoneId??`<zone>`}/healthchecks/${u[`healthcheck-id`]==null?`<healthcheck-id>`:encodeURIComponent(String(u[`healthcheck-id`]))}`,pathParams:{"healthcheck-id":String(u[`healthcheck-id`]??``),"zone-id":String(u.zone??u[`zone-id`]??``)},bodyKind:`json`,body:u.body===void 0?s({address:c(u.address,`address`,`text`),check_regions:u[`check-regions`],consecutive_fails:u[`consecutive-fails`],consecutive_successes:u[`consecutive-successes`],description:c(u.description,`description`,`text`),http_config:{allow_insecure:u[`http-config-allow-insecure`],expected_body:c(u[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:u[`http-config-expected-codes`],follow_redirects:u[`http-config-follow-redirects`],method:c(u[`http-config-method`],`http-config-method`,`text`),path:c(u[`http-config-path`],`http-config-path`,`text`),port:u[`http-config-port`]},interval:u.interval,name:c(u.name,`name`,`text`),retries:u.retries,suspended:u.suspended,tcp_config:{method:c(u[`tcp-config-method`],`tcp-config-method`,`text`),port:u[`tcp-config-port`]},timeout:u.timeout,type:c(u.type,`type`,`text`)}):o(u.body)});return}let a=await e(u),d=await t({zone:u.zone},a,{quiet:u.quiet});if(u.zoneId=d,u.body){let e=o(u.body),t=await i(`Updating`,async()=>a.healthchecks.update({body:e,zone_id:d,healthcheck_id:u[`healthcheck-id`]}));n(t,{successLabel:`Updated`});return}u.address===void 0&&(u.address=await l(`address`,`The hostname or IP address of the origin server to run health checks on.`)),u.name===void 0&&(u.name=await l(`name`,`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`));let f=s({address:c(u.address,`address`,`text`),check_regions:u[`check-regions`],consecutive_fails:u[`consecutive-fails`],consecutive_successes:u[`consecutive-successes`],description:c(u.description,`description`,`text`),http_config:{allow_insecure:u[`http-config-allow-insecure`],expected_body:c(u[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:u[`http-config-expected-codes`],follow_redirects:u[`http-config-follow-redirects`],method:c(u[`http-config-method`],`http-config-method`,`text`),path:c(u[`http-config-path`],`http-config-path`,`text`),port:u[`http-config-port`]},interval:u.interval,name:c(u.name,`name`,`text`),retries:u.retries,suspended:u.suspended,tcp_config:{method:c(u[`tcp-config-method`],`tcp-config-method`,`text`),port:u[`tcp-config-port`]},timeout:u.timeout,type:c(u.type,`type`,`text`)}),p=await i(`Updating`,async()=>a.healthchecks.update({body:f,zone_id:d,healthcheck_id:u[`healthcheck-id`]}));n(p,{successLabel:`Updated`})})},A={command:`healthchecks`,describe:`Standalone health checks that monitor origin server availability from Cloudflare's edge`,builder:e=>e.command(f).command(m).command(g).command(v).command(b).command(k).command(D).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{A as default};
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env node
2
- import{i as e,n as t}from"./auth-Br-t8vL_.mjs";import{i as n}from"./context-CquYYyS3.mjs";import{t as r}from"./output-ClYel9WX.mjs";import{t as i}from"./dry-run-p9Q7nMZ5.mjs";import{t as a}from"./progress-TLUEIYE6.mjs";import{t as o}from"./run-iFM5TxtQ.mjs";import"./telemetry-DoBQOGRk.mjs";import{n as s}from"./body-parser-NjzJZMOV.mjs";import{n as c}from"./prompt-Ck_1PCHm.mjs";function l(e){return e.usage(`$0 hostnames settings tls-single get <hostname>
2
+ import{i as e,n as t}from"./auth-CGLsxbc6.mjs";import{i as n}from"./context-q7UaYK69.mjs";import{t as r}from"./output-BOe-3AQG.mjs";import{t as i}from"./dry-run-DRj2_uV3.mjs";import{t as a}from"./progress-BtkTVcHI.mjs";import{t as o}from"./run-BvHwWWUX.mjs";import"./telemetry-BsYO3nxG.mjs";import{n as s}from"./body-parser-DkHKPkJ7.mjs";import{n as c}from"./prompt-RlgRrmbm.mjs";function l(e){return e.usage(`$0 hostnames settings tls-single get <hostname>
3
3
 
4
- Get the requested TLS setting for the hostname.`).positional(`hostname`,{type:`string`,description:`The hostname for which the tls settings are set.`,demandOption:!0}).option(`setting-id`,{type:`string`,description:'The TLS Setting name.\nThe value type depends on the setting:\n- `ciphers`: value is an array of cipher suite strings (e.g., `["ECDHE-RSA-AES128-GCM-SHA256", "AES128-GCM-SHA256"]`).\n- `min_tls_version`: value is a TLS version string (`"1.0"`, `"1.1"`, `"1.2"`, or `"1.3"`).\n- `http2`: value is `"on"` or `"off"`.',demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const u={command:`get <hostname>`,describe:`Get TLS setting for hostname`,builder:l,handler:async e=>o({command:`hostnames settings tls-single get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf hostnames settings tls-single get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/hostnames/settings/${e[`setting-id`]==null?`<setting-id>`:encodeURIComponent(String(e[`setting-id`]))}/${e.hostname==null?`<hostname>`:encodeURIComponent(String(e.hostname))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"setting-id":String(e[`setting-id`]??``),hostname:String(e.hostname??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s,r(await a(`Loading`,async()=>o.hostnames.settings.tlsSingle.get({zone_id:s,setting_id:e[`setting-id`],hostname:e.hostname})),{successLabel:`Loaded`})})},d={command:`tls-single`,describe:`Operations for settings.tls-single`,builder:e=>e.command(u).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function f(e){return e.usage(`$0 hostnames settings tls delete <hostname>
4
+ Get the requested TLS setting for the hostname.`).positional(`hostname`,{type:`string`,description:`The hostname for which the tls settings are set.`,demandOption:!0}).option(`setting-id`,{type:`string`,description:'The TLS Setting name.\nThe value type depends on the setting:\n- `ciphers`: value is an array of cipher suite strings (e.g., `["ECDHE-RSA-AES128-GCM-SHA256", "AES128-GCM-SHA256"]`).\n- `min_tls_version`: value is a TLS version string (`"1.0"`, `"1.1"`, `"1.2"`, or `"1.3"`).\n- `http2`: value is `"on"` or `"off"`.',demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const u={command:`get <hostname>`,describe:`Get TLS setting for hostname`,builder:l,handler:async e=>o({command:`hostnames settings tls-single get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf hostnames settings tls-single get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/hostnames/settings/${e[`setting-id`]==null?`<setting-id>`:encodeURIComponent(String(e[`setting-id`]))}/${e.hostname==null?`<hostname>`:encodeURIComponent(String(e.hostname))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"setting-id":String(e[`setting-id`]??``),hostname:String(e.hostname??``)},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.hostnames.settings.tlsSingle.get({zone_id:s,setting_id:e[`setting-id`],hostname:e.hostname}));r(c,{successLabel:`Loaded`})})},d={command:`tls-single`,describe:`Operations for settings.tls-single`,builder:e=>e.command(u).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function f(e){return e.usage(`$0 hostnames settings tls delete <hostname>
5
5
 
6
6
  Delete the tls setting value for the hostname.`).positional(`hostname`,{type:`string`,description:`The hostname for which the tls settings are set.`,demandOption:!0}).option(`setting-id`,{type:`string`,description:'The TLS Setting name.\nThe value type depends on the setting:\n- `ciphers`: value is an array of cipher suite strings (e.g., `["ECDHE-RSA-AES128-GCM-SHA256", "AES128-GCM-SHA256"]`).\n- `min_tls_version`: value is a TLS version string (`"1.0"`, `"1.1"`, `"1.2"`, or `"1.3"`).\n- `http2`: value is `"on"` or `"off"`.',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 p={command:`delete <hostname>`,describe:`Delete TLS setting for hostname`,builder:f,handler:async e=>o({command:`hostnames settings tls delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf hostnames settings tls delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/hostnames/settings/${e[`setting-id`]==null?`<setting-id>`:encodeURIComponent(String(e[`setting-id`]))}/${e.hostname==null?`<hostname>`:encodeURIComponent(String(e.hostname))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"setting-id":String(e[`setting-id`]??``),hostname:String(e.hostname??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=s,!await c({force:!!e.force})){process.stderr.write(`Aborted.
7
- `);return}r(await a(`Deleting`,async()=>o.hostnames.settings.tls.delete({zone_id:s,setting_id:e[`setting-id`],hostname:e.hostname})),{successLabel:`Deleted`})})};function m(e){return e.usage(`$0 hostnames settings tls get <setting-id>
7
+ `);return}let l=await a(`Deleting`,async()=>o.hostnames.settings.tls.delete({zone_id:s,setting_id:e[`setting-id`],hostname:e.hostname}));r(l,{successLabel:`Deleted`})})};function m(e){return e.usage(`$0 hostnames settings tls get <setting-id>
8
8
 
9
- List the requested TLS setting for the hostnames under this zone.`).positional(`setting-id`,{type:`string`,description:'The TLS Setting name. The value type depends on the setting: - `ciphers`: value is an array of cipher suite strings (e.g., `["ECDHE-RSA-AES128-GCM-SHA256", "AES128-GCM-SHA256"]`). - `min_tls_version`: value is a TLS version string (`"1.0"`, `"1.1"`, `"1.2"`, or `"1.3"`). - `http2`: value is `"on"` or `"off"`.',demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const h={command:`get <setting-id>`,describe:`List TLS setting for hostnames`,builder:m,handler:async e=>o({command:`hostnames settings tls get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf hostnames settings tls get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/hostnames/settings/${e[`setting-id`]==null?`<setting-id>`:encodeURIComponent(String(e[`setting-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"setting-id":String(e[`setting-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s,r(await a(`Loading`,async()=>o.hostnames.settings.tls.get({zone_id:s,setting_id:e[`setting-id`]})),{successLabel:`Loaded`})})};function g(e){return e.usage(`$0 hostnames settings tls update <hostname>
9
+ List the requested TLS setting for the hostnames under this zone.`).positional(`setting-id`,{type:`string`,description:'The TLS Setting name. The value type depends on the setting: - `ciphers`: value is an array of cipher suite strings (e.g., `["ECDHE-RSA-AES128-GCM-SHA256", "AES128-GCM-SHA256"]`). - `min_tls_version`: value is a TLS version string (`"1.0"`, `"1.1"`, `"1.2"`, or `"1.3"`). - `http2`: value is `"on"` or `"off"`.',demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const h={command:`get <setting-id>`,describe:`List TLS setting for hostnames`,builder:m,handler:async e=>o({command:`hostnames settings tls get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf hostnames settings tls get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/hostnames/settings/${e[`setting-id`]==null?`<setting-id>`:encodeURIComponent(String(e[`setting-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"setting-id":String(e[`setting-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.hostnames.settings.tls.get({zone_id:s,setting_id:e[`setting-id`]}));r(c,{successLabel:`Loaded`})})};function g(e){return e.usage(`$0 hostnames settings tls update <hostname>
10
10
 
11
- Update the tls setting value for the hostname.`).positional(`hostname`,{type:`string`,description:`The hostname for which the tls settings are set.`,demandOption:!0}).option(`setting-id`,{type:`string`,description:'The TLS Setting name.\nThe value type depends on the setting:\n- `ciphers`: value is an array of cipher suite strings (e.g., `["ECDHE-RSA-AES128-GCM-SHA256", "AES128-GCM-SHA256"]`).\n- `min_tls_version`: value is a TLS version string (`"1.0"`, `"1.1"`, `"1.2"`, or `"1.3"`).\n- `http2`: value is `"on"` or `"off"`.',demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const _={command:`update <hostname>`,describe:`Edit TLS setting for hostname`,builder:g,handler:async c=>o({command:`hostnames settings tls update`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){i({command:`cf hostnames settings tls update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${c.zone??c.zoneId??`<zone>`}/hostnames/settings/${c[`setting-id`]==null?`<setting-id>`:encodeURIComponent(String(c[`setting-id`]))}/${c.hostname==null?`<hostname>`:encodeURIComponent(String(c.hostname))}`,pathParams:{"zone-id":String(c.zone??c[`zone-id`]??``),"setting-id":String(c[`setting-id`]??``),hostname:String(c.hostname??``)},bodyKind:`json`,body:c.body===void 0?void 0:s(c.body)});return}let o=await t(c),l=await n({zone:c.zone},o,{quiet:c.quiet});if(c.zoneId=l,c.body){let e=s(c.body);r(await a(`Updating`,async()=>o.hostnames.settings.tls.update({...e,zone_id:l,setting_id:c[`setting-id`],hostname:c.hostname})),{successLabel:`Updated`});return}r(await a(`Updating`,async()=>e(o,`PUT`,`/zones/${c.zoneId}/hostnames/settings/${encodeURIComponent(String(c[`setting-id`]))}/${encodeURIComponent(String(c.hostname))}`)),{successLabel:`Updated`})})},v={command:`tls`,describe:`Operations for settings.tls`,builder:e=>e.command(p).command(h).command(_).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},y={command:`settings`,describe:`Operations for settings`,builder:e=>e.command(v).command(d).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},b={command:`hostnames`,describe:`hostnames`,builder:e=>e.command(y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{b as default};
11
+ Update the tls setting value for the hostname.`).positional(`hostname`,{type:`string`,description:`The hostname for which the tls settings are set.`,demandOption:!0}).option(`setting-id`,{type:`string`,description:'The TLS Setting name.\nThe value type depends on the setting:\n- `ciphers`: value is an array of cipher suite strings (e.g., `["ECDHE-RSA-AES128-GCM-SHA256", "AES128-GCM-SHA256"]`).\n- `min_tls_version`: value is a TLS version string (`"1.0"`, `"1.1"`, `"1.2"`, or `"1.3"`).\n- `http2`: value is `"on"` or `"off"`.',demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const _={command:`update <hostname>`,describe:`Edit TLS setting for hostname`,builder:g,handler:async c=>o({command:`hostnames settings tls update`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){i({command:`cf hostnames settings tls update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${c.zone??c.zoneId??`<zone>`}/hostnames/settings/${c[`setting-id`]==null?`<setting-id>`:encodeURIComponent(String(c[`setting-id`]))}/${c.hostname==null?`<hostname>`:encodeURIComponent(String(c.hostname))}`,pathParams:{"zone-id":String(c.zone??c[`zone-id`]??``),"setting-id":String(c[`setting-id`]??``),hostname:String(c.hostname??``)},bodyKind:`json`,body:c.body===void 0?void 0:s(c.body)});return}let o=await t(c),l=await n({zone:c.zone},o,{quiet:c.quiet});if(c.zoneId=l,c.body){let e=s(c.body),t=await a(`Updating`,async()=>o.hostnames.settings.tls.update({...e,zone_id:l,setting_id:c[`setting-id`],hostname:c.hostname}));r(t,{successLabel:`Updated`});return}let u=await a(`Updating`,async()=>e(o,`PUT`,`/zones/${c.zoneId}/hostnames/settings/${encodeURIComponent(String(c[`setting-id`]))}/${encodeURIComponent(String(c.hostname))}`));r(u,{successLabel:`Updated`})})},v={command:`tls`,describe:`Operations for settings.tls`,builder:e=>e.command(p).command(h).command(_).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},y={command:`settings`,describe:`Operations for settings`,builder:e=>e.command(v).command(d).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},b={command:`hostnames`,describe:`hostnames`,builder:e=>e.command(y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{b as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-rYpzEQb-.mjs";import{n as t}from"./auth-Br-t8vL_.mjs";import{a as n,t as r}from"./context-CquYYyS3.mjs";import{t as i}from"./output-ClYel9WX.mjs";import{t as a}from"./dry-run-p9Q7nMZ5.mjs";import{t as o}from"./progress-TLUEIYE6.mjs";import{t as s}from"./run-iFM5TxtQ.mjs";import"./telemetry-DoBQOGRk.mjs";import{n as c,t as l}from"./body-parser-NjzJZMOV.mjs";import{n as u}from"./input-validation-0CeePPHp.mjs";import{a as d,i as f,n as p}from"./prompt-Ck_1PCHm.mjs";function m(e){return e.usage(`$0 hyperdrive create
2
+ import{t as e}from"./local-DlT72Xpn.mjs";import{n as t}from"./auth-CGLsxbc6.mjs";import{a as n,t as r}from"./context-q7UaYK69.mjs";import{t as i}from"./output-BOe-3AQG.mjs";import{t as a}from"./dry-run-DRj2_uV3.mjs";import{t as o}from"./progress-BtkTVcHI.mjs";import{t as s}from"./run-BvHwWWUX.mjs";import"./telemetry-BsYO3nxG.mjs";import{n as c,t as l}from"./body-parser-DkHKPkJ7.mjs";import{n as u}from"./input-validation-D7z60HJH.mjs";import{a as d,i as f,n as p}from"./prompt-RlgRrmbm.mjs";function m(e){return e.usage(`$0 hyperdrive create
3
3
 
4
4
  Creates and returns a new Hyperdrive configuration. For a PlanetScale integration, the Cloudflare account must already be linked to PlanetScale in the Hyperdrive dashboard.`).option(`mtls-ca-certificate-id`,{type:`string`,description:`Define CA certificate ID obtained after uploading CA cert.`}).option(`mtls-certificate-id`,{type:`string`,description:`Define mTLS certificate ID obtained after uploading client cert.`}).option(`mtls-sslmode`,{type:`string`,description:"PostgreSQL accepts `require`, `verify-ca`, and `verify-full`. MySQL accepts `REQUIRED`, `VERIFY_CA`, and `VERIFY_IDENTITY`. The verify modes require a CA certificate; the require modes cannot be used with a CA certificate.",choices:[`require`,`verify-ca`,`verify-full`,`REQUIRED`,`VERIFY_CA`,`VERIFY_IDENTITY`]}).option(`name`,{type:`string`,description:`The name of the Hyperdrive configuration. Used to identify the configuration in the Cloudflare dashboard and API.`}).option(`origin-connection-limit`,{type:`number`,description:`The (soft) maximum number of connections the Hyperdrive is allowed to make to the origin database.
5
5
 
@@ -7,16 +7,16 @@ Maximum allowed: 20 for free tier accounts, 100 for paid tier accounts.
7
7
  If not specified, defaults to 20 for free tier and 60 for paid tier.
8
8
  Certain Cloudflare-managed origins may be permitted a higher limit.
9
9
  Contact Cloudflare if you need a higher limit.
10
- `}).option(`integration-custom-database-name`,{type:`string`,description:"The database name to use when connecting. Defaults to `postgres` for PostgreSQL and `mysql` for MySQL."}).option(`integration-database-branch-name`,{type:`string`,description:`The name of the PlanetScale database branch.`}).option(`integration-database-name`,{type:`string`,description:`The name of the PlanetScale database.`}).option(`integration-organization-name`,{type:`string`,description:`The name of the PlanetScale organization.`}).option(`integration-provider`,{type:`string`,description:`The database integration provider used by this operation.`,choices:[`planetscale`]}).option(`integration-scheme`,{type:`string`,description:`Specifies the URL scheme used to connect to your origin database.`,choices:[`postgres`,`postgresql`,`mysql`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`A request to create a Hyperdrive configuration using exactly one of caller-supplied origin credentials or a managed integration.`})}const h={command:`create`,describe:`Create Hyperdrive`,builder:m,handler:async f=>s({command:`hyperdrive create`,classification:{safeFlags:[`mtls-sslmode`,`integration-provider`,`integration-scheme`,`dry-run`]}},f,async()=>{if(f.dryRun){a({command:`cf hyperdrive create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/hyperdrive/configs`,pathParams:{},bodyKind:`json`,body:f.body===void 0?l({mtls:{ca_certificate_id:u(f[`mtls-ca-certificate-id`],`mtls-ca-certificate-id`,`text`),mtls_certificate_id:u(f[`mtls-certificate-id`],`mtls-certificate-id`,`text`),sslmode:u(f[`mtls-sslmode`],`mtls-sslmode`,`text`)},name:u(f.name,`name`,`text`),origin_connection_limit:f[`origin-connection-limit`],integration:{custom_database_name:u(f[`integration-custom-database-name`],`integration-custom-database-name`,`text`),database_branch_name:u(f[`integration-database-branch-name`],`integration-database-branch-name`,`text`),database_name:u(f[`integration-database-name`],`integration-database-name`,`text`),organization_name:u(f[`integration-organization-name`],`integration-organization-name`,`text`),provider:u(f[`integration-provider`],`integration-provider`,`text`),scheme:u(f[`integration-scheme`],`integration-scheme`,`text`)}}):c(f.body)});return}let s=await t(f),p=f.local?e:await r();if(f.accountId=p,f.body){let e=c(f.body);i(await o(`Creating`,async()=>s.hyperdrive.create({body:e,account_id:p})),{successLabel:`Created`});return}f.name===void 0&&(f.name=await d(`name`,`The name of the Hyperdrive configuration. Used to identify the configuration in the Cloudflare dashboard and API.`));let m=l({mtls:{ca_certificate_id:u(f[`mtls-ca-certificate-id`],`mtls-ca-certificate-id`,`text`),mtls_certificate_id:u(f[`mtls-certificate-id`],`mtls-certificate-id`,`text`),sslmode:u(f[`mtls-sslmode`],`mtls-sslmode`,`text`)},name:u(f.name,`name`,`text`),origin_connection_limit:f[`origin-connection-limit`],integration:{custom_database_name:u(f[`integration-custom-database-name`],`integration-custom-database-name`,`text`),database_branch_name:u(f[`integration-database-branch-name`],`integration-database-branch-name`,`text`),database_name:u(f[`integration-database-name`],`integration-database-name`,`text`),organization_name:u(f[`integration-organization-name`],`integration-organization-name`,`text`),provider:u(f[`integration-provider`],`integration-provider`,`text`),scheme:u(f[`integration-scheme`],`integration-scheme`,`text`)}});i(await o(`Creating`,async()=>s.hyperdrive.create({body:m,account_id:p})),{successLabel:`Created`})})};function g(e){return e.usage(`$0 hyperdrive delete <hyperdrive-id>
10
+ `}).option(`integration-custom-database-name`,{type:`string`,description:"The database name to use when connecting. Defaults to `postgres` for PostgreSQL and `mysql` for MySQL."}).option(`integration-database-branch-name`,{type:`string`,description:`The name of the PlanetScale database branch.`}).option(`integration-database-name`,{type:`string`,description:`The name of the PlanetScale database.`}).option(`integration-organization-name`,{type:`string`,description:`The name of the PlanetScale organization.`}).option(`integration-provider`,{type:`string`,description:`The database integration provider used by this operation.`,choices:[`planetscale`]}).option(`integration-scheme`,{type:`string`,description:`Specifies the URL scheme used to connect to your origin database.`,choices:[`postgres`,`postgresql`,`mysql`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`A request to create a Hyperdrive configuration using exactly one of caller-supplied origin credentials or a managed integration.`})}const h={command:`create`,describe:`Create Hyperdrive`,builder:m,handler:async f=>s({command:`hyperdrive create`,classification:{safeFlags:[`mtls-sslmode`,`integration-provider`,`integration-scheme`,`dry-run`]}},f,async()=>{if(f.dryRun){let e=await n();a({command:`cf hyperdrive create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/hyperdrive/configs`,pathParams:{},bodyKind:`json`,body:f.body===void 0?l({mtls:{ca_certificate_id:u(f[`mtls-ca-certificate-id`],`mtls-ca-certificate-id`,`text`),mtls_certificate_id:u(f[`mtls-certificate-id`],`mtls-certificate-id`,`text`),sslmode:u(f[`mtls-sslmode`],`mtls-sslmode`,`text`)},name:u(f.name,`name`,`text`),origin_connection_limit:f[`origin-connection-limit`],integration:{custom_database_name:u(f[`integration-custom-database-name`],`integration-custom-database-name`,`text`),database_branch_name:u(f[`integration-database-branch-name`],`integration-database-branch-name`,`text`),database_name:u(f[`integration-database-name`],`integration-database-name`,`text`),organization_name:u(f[`integration-organization-name`],`integration-organization-name`,`text`),provider:u(f[`integration-provider`],`integration-provider`,`text`),scheme:u(f[`integration-scheme`],`integration-scheme`,`text`)}}):c(f.body)});return}let s=await t(f),p=f.local?e:await r();if(f.accountId=p,f.body){let e=c(f.body),t=await o(`Creating`,async()=>s.hyperdrive.create({body:e,account_id:p}));i(t,{successLabel:`Created`});return}f.name===void 0&&(f.name=await d(`name`,`The name of the Hyperdrive configuration. Used to identify the configuration in the Cloudflare dashboard and API.`));let m=l({mtls:{ca_certificate_id:u(f[`mtls-ca-certificate-id`],`mtls-ca-certificate-id`,`text`),mtls_certificate_id:u(f[`mtls-certificate-id`],`mtls-certificate-id`,`text`),sslmode:u(f[`mtls-sslmode`],`mtls-sslmode`,`text`)},name:u(f.name,`name`,`text`),origin_connection_limit:f[`origin-connection-limit`],integration:{custom_database_name:u(f[`integration-custom-database-name`],`integration-custom-database-name`,`text`),database_branch_name:u(f[`integration-database-branch-name`],`integration-database-branch-name`,`text`),database_name:u(f[`integration-database-name`],`integration-database-name`,`text`),organization_name:u(f[`integration-organization-name`],`integration-organization-name`,`text`),provider:u(f[`integration-provider`],`integration-provider`,`text`),scheme:u(f[`integration-scheme`],`integration-scheme`,`text`)}}),h=await o(`Creating`,async()=>s.hyperdrive.create({body:m,account_id:p}));i(h,{successLabel:`Created`})})};function g(e){return e.usage(`$0 hyperdrive delete <hyperdrive-id>
11
11
 
12
- Deletes the specified Hyperdrive.`).positional(`hyperdrive-id`,{type:`string`,description:`The unique identifier of the Hyperdrive configuration.`,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 _={command:`delete <hyperdrive-id>`,describe:`Delete Hyperdrive`,builder:g,handler:async c=>s({command:`hyperdrive delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf hyperdrive delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/hyperdrive/configs/${c[`hyperdrive-id`]==null?`<hyperdrive-id>`:encodeURIComponent(String(c[`hyperdrive-id`]))}`,pathParams:{"hyperdrive-id":String(c[`hyperdrive-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();if(c.accountId=l,!await p({force:!!c.force,message:`This operation deletes an existing Hyperdrive configuration.`})){process.stderr.write(`Aborted.
13
- `);return}i(await o(`Deleting`,async()=>s.hyperdrive.delete({account_id:l,hyperdrive_id:c[`hyperdrive-id`]})),{successLabel:`Deleted`})})};function v(e){return e.usage(`$0 hyperdrive get <hyperdrive-id>
12
+ Deletes the specified Hyperdrive.`).positional(`hyperdrive-id`,{type:`string`,description:`The unique identifier of the Hyperdrive configuration.`,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 _={command:`delete <hyperdrive-id>`,describe:`Delete Hyperdrive`,builder:g,handler:async c=>s({command:`hyperdrive delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf hyperdrive delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/hyperdrive/configs/${c[`hyperdrive-id`]==null?`<hyperdrive-id>`:encodeURIComponent(String(c[`hyperdrive-id`]))}`,pathParams:{"hyperdrive-id":String(c[`hyperdrive-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();if(c.accountId=l,!await p({force:!!c.force,message:`This operation deletes an existing Hyperdrive configuration.`})){process.stderr.write(`Aborted.
13
+ `);return}let u=await o(`Deleting`,async()=>s.hyperdrive.delete({account_id:l,hyperdrive_id:c[`hyperdrive-id`]}));i(u,{successLabel:`Deleted`})})};function v(e){return e.usage(`$0 hyperdrive get <hyperdrive-id>
14
14
 
15
- Returns the specified Hyperdrive configuration.`).positional(`hyperdrive-id`,{type:`string`,description:`The unique identifier of the Hyperdrive configuration.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const y={command:`get <hyperdrive-id>`,describe:`Get Hyperdrive`,builder:v,handler:async c=>s({command:`hyperdrive get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf hyperdrive get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/hyperdrive/configs/${c[`hyperdrive-id`]==null?`<hyperdrive-id>`:encodeURIComponent(String(c[`hyperdrive-id`]))}`,pathParams:{"hyperdrive-id":String(c[`hyperdrive-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l,i(await o(`Loading`,async()=>s.hyperdrive.get({account_id:l,hyperdrive_id:c[`hyperdrive-id`]})),{successLabel:`Loaded`})})};function b(e){return e.usage(`$0 hyperdrive integration planetscale signature
15
+ Returns the specified Hyperdrive configuration.`).positional(`hyperdrive-id`,{type:`string`,description:`The unique identifier of the Hyperdrive configuration.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const y={command:`get <hyperdrive-id>`,describe:`Get Hyperdrive`,builder:v,handler:async c=>s({command:`hyperdrive get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf hyperdrive get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/hyperdrive/configs/${c[`hyperdrive-id`]==null?`<hyperdrive-id>`:encodeURIComponent(String(c[`hyperdrive-id`]))}`,pathParams:{"hyperdrive-id":String(c[`hyperdrive-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Loading`,async()=>s.hyperdrive.get({account_id:l,hyperdrive_id:c[`hyperdrive-id`]}));i(u,{successLabel:`Loaded`})})};function b(e){return e.usage(`$0 hyperdrive integration planetscale signature
16
16
 
17
- Returns a short-lived signed authorization for creating a database that is billed through Cloudflare. The caller passes these values to the integration partner's own CLI, which verifies the signature before creating the database. Requires the account to be entitled to Cloudflare-billed databases for the integration.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const x={command:`signature`,describe:`Create Database Signature`,builder:b,handler:async c=>s({command:`hyperdrive integration planetscale signature`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf hyperdrive integration planetscale signature`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/hyperdrive/integrationsOperations/planetScale/createDatabaseSignature`,pathParams:{},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l,i(await o(`Creating`,async()=>s.hyperdrive.createDatabaseSignature({account_id:l})),{successLabel:`Created`})})},S={command:`planetscale`,describe:`Operations for integration.planetscale`,builder:e=>e.command(x).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},C={command:`integration`,describe:`Operations for integration`,builder:e=>e.command(S).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function w(e){return e.usage(`$0 hyperdrive list
17
+ Returns a short-lived signed authorization for creating a database that is billed through Cloudflare. The caller passes these values to the integration partner's own CLI, which verifies the signature before creating the database. Requires the account to be entitled to Cloudflare-billed databases for the integration.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const x={command:`signature`,describe:`Create Database Signature`,builder:b,handler:async c=>s({command:`hyperdrive integration planetscale signature`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf hyperdrive integration planetscale signature`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/hyperdrive/integrationsOperations/planetScale/createDatabaseSignature`,pathParams:{},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Creating`,async()=>s.hyperdrive.createDatabaseSignature({account_id:l}));i(u,{successLabel:`Created`})})},S={command:`planetscale`,describe:`Operations for integration.planetscale`,builder:e=>e.command(x).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},C={command:`integration`,describe:`Operations for integration`,builder:e=>e.command(S).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function w(e){return e.usage(`$0 hyperdrive list
18
18
 
19
- Returns a list of Hyperdrives.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const T={command:`list`,describe:`List Hyperdrives`,builder:w,handler:async c=>s({command:`hyperdrive list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={page:c.page,per_page:c[`per-page`]};if(c.dryRun){a({command:`cf hyperdrive list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/hyperdrive/configs`,pathParams:{},query:s,bodyKind:`none`});return}let l=await t(c),u=c.local?e:await r();c.accountId=u,i(await o(`Loading`,async()=>l.hyperdrive.list({account_id:u,...s})),{successLabel:`Loaded`})})};function E(e){return e.usage(`$0 hyperdrive replace <hyperdrive-id>
19
+ Returns a list of Hyperdrives.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const T={command:`list`,describe:`List Hyperdrives`,builder:w,handler:async c=>s({command:`hyperdrive list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={page:c.page,per_page:c[`per-page`]};if(c.dryRun){let e=await n();a({command:`cf hyperdrive list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/hyperdrive/configs`,pathParams:{},query:s,bodyKind:`none`});return}let l=await t(c),u=c.local?e:await r();c.accountId=u;let d=await o(`Loading`,async()=>l.hyperdrive.list({account_id:u,...s}));i(d,{successLabel:`Loaded`})})};function E(e){return e.usage(`$0 hyperdrive replace <hyperdrive-id>
20
20
 
21
21
  Replaces and returns the specified Hyperdrive configuration. The request must include the name and complete origin connection details. Omitted caching settings are reset to their defaults, while omitted mTLS settings and origin connection limits are preserved. Use the update operation to modify only selected fields.`).positional(`hyperdrive-id`,{type:`string`,description:`The unique identifier of the Hyperdrive configuration.`,demandOption:!0}).option(`caching-disabled`,{type:`boolean`,description:`Set to true to disable caching of SQL responses. Default is false.`}).option(`caching-max-age`,{type:`number`,description:`Specify the maximum duration (in seconds) items should persist in the cache. Defaults to 60 seconds if not specified.`}).option(`caching-stale-while-revalidate`,{type:`number`,description:`Specify the number of seconds the cache may serve a stale response. Defaults to 15 seconds if not specified.`}).option(`mtls-ca-certificate-id`,{type:`string`,description:`Define CA certificate ID obtained after uploading CA cert.`}).option(`mtls-certificate-id`,{type:`string`,description:`Define mTLS certificate ID obtained after uploading client cert.`}).option(`mtls-sslmode`,{type:`string`,description:"PostgreSQL accepts `require`, `verify-ca`, and `verify-full`. MySQL accepts `REQUIRED`, `VERIFY_CA`, and `VERIFY_IDENTITY`. The verify modes require a CA certificate; the require modes cannot be used with a CA certificate.",choices:[`require`,`verify-ca`,`verify-full`,`REQUIRED`,`VERIFY_CA`,`VERIFY_IDENTITY`]}).option(`name`,{type:`string`,description:`The name of the Hyperdrive configuration. Used to identify the configuration in the Cloudflare dashboard and API.`}).option(`origin-database`,{type:`string`,description:`Set the name of your origin database.`}).option(`origin-password`,{type:`string`,description:`Set the password needed to access your origin database. The API never returns this write-only value.`}).option(`origin-scheme`,{type:`string`,description:`Specifies the URL scheme used to connect to your origin database.`,choices:[`postgres`,`postgresql`,`mysql`]}).option(`origin-user`,{type:`string`,description:`Set the user of your origin database.`}).option(`origin-host`,{type:`string`,description:`Defines the publicly reachable hostname or IP of your origin database. Private, loopback, and link-local IP addresses are not allowed.`}).option(`origin-port`,{type:`number`,description:`Defines the port of your origin database. Defaults to 5432 for PostgreSQL or 3306 for MySQL if not specified.`}).option(`origin-access-client-id`,{type:`string`,description:`Defines the Client ID of the Access token to use when connecting to the origin database.`}).option(`origin-access-client-secret`,{type:`string`,description:`Defines the Client Secret of the Access Token to use when connecting to the origin database. The API never returns this write-only value.`}).option(`origin-service-id`,{type:`string`,description:`The identifier of the Workers VPC Service to connect through. Hyperdrive will egress through the specified VPC Service to reach the origin database.`}).option(`origin-connection-limit`,{type:`number`,description:`The (soft) maximum number of connections the Hyperdrive is allowed to make to the origin database.
22
22
 
@@ -24,9 +24,9 @@ Maximum allowed: 20 for free tier accounts, 100 for paid tier accounts.
24
24
  If not specified, defaults to 20 for free tier and 60 for paid tier.
25
25
  Certain Cloudflare-managed origins may be permitted a higher limit.
26
26
  Contact Cloudflare if you need a higher limit.
27
- `}).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(`origin-host`,[`origin-service-id`]).conflicts(`origin-port`,[`origin-access-client-id`,`origin-access-client-secret`,`origin-service-id`]).implies(`origin-port`,[`origin-host`]).conflicts(`origin-access-client-id`,[`origin-port`,`origin-service-id`]).implies(`origin-access-client-id`,[`origin-host`,`origin-access-client-secret`]).conflicts(`origin-access-client-secret`,[`origin-port`,`origin-service-id`]).implies(`origin-access-client-secret`,[`origin-host`,`origin-access-client-id`]).conflicts(`origin-service-id`,[`origin-host`,`origin-port`,`origin-access-client-id`,`origin-access-client-secret`])}const D={command:`replace <hyperdrive-id>`,describe:`Replace Hyperdrive`,builder:E,handler:async p=>s({command:`hyperdrive replace`,classification:{safeFlags:[`caching-disabled`,`mtls-sslmode`,`origin-scheme`,`dry-run`]}},p,async()=>{if(p.dryRun){a({command:`cf hyperdrive replace`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/hyperdrive/configs/${p[`hyperdrive-id`]==null?`<hyperdrive-id>`:encodeURIComponent(String(p[`hyperdrive-id`]))}`,pathParams:{"hyperdrive-id":String(p[`hyperdrive-id`]??``)},bodyKind:`json`,body:p.body===void 0?l({caching:{disabled:p[`caching-disabled`],max_age:p[`caching-max-age`],stale_while_revalidate:p[`caching-stale-while-revalidate`]},mtls:{ca_certificate_id:u(p[`mtls-ca-certificate-id`],`mtls-ca-certificate-id`,`text`),mtls_certificate_id:u(p[`mtls-certificate-id`],`mtls-certificate-id`,`text`),sslmode:u(p[`mtls-sslmode`],`mtls-sslmode`,`text`)},name:u(p.name,`name`,`text`),origin:{database:u(p[`origin-database`],`origin-database`,`text`),password:u(p[`origin-password`],`origin-password`,`text`),scheme:u(p[`origin-scheme`],`origin-scheme`,`text`),user:u(p[`origin-user`],`origin-user`,`text`),host:u(p[`origin-host`],`origin-host`,`text`),port:p[`origin-port`],access_client_id:u(p[`origin-access-client-id`],`origin-access-client-id`,`text`),access_client_secret:u(p[`origin-access-client-secret`],`origin-access-client-secret`,`text`),service_id:u(p[`origin-service-id`],`origin-service-id`,`text`)},origin_connection_limit:p[`origin-connection-limit`]}):c(p.body)});return}let s=await t(p),m=p.local?e:await r();if(p.accountId=m,p.body){let e=c(p.body);i(await o(`Updating`,async()=>s.hyperdrive.replace({...e,account_id:m,hyperdrive_id:p[`hyperdrive-id`]})),{successLabel:`Updated`});return}p.name===void 0&&(p.name=await d(`name`,`The name of the Hyperdrive configuration. Used to identify the configuration in the Cloudflare dashboard and API.`)),p[`origin-database`]===void 0&&(p[`origin-database`]=await d(`origin-database`,`Set the name of your origin database.`)),p[`origin-password`]===void 0&&(p[`origin-password`]=await d(`origin-password`,`Set the password needed to access your origin database. The API never returns this write-only value.`,{kind:`secret`})),p[`origin-scheme`]===void 0&&(p[`origin-scheme`]=await f(`origin-scheme`,`Specifies the URL scheme used to connect to your origin database.`,[`postgres`,`postgresql`,`mysql`])),p[`origin-user`]===void 0&&(p[`origin-user`]=await d(`origin-user`,`Set the user of your origin database.`));let h=l({caching:{disabled:p[`caching-disabled`],max_age:p[`caching-max-age`],stale_while_revalidate:p[`caching-stale-while-revalidate`]},mtls:{ca_certificate_id:u(p[`mtls-ca-certificate-id`],`mtls-ca-certificate-id`,`text`),mtls_certificate_id:u(p[`mtls-certificate-id`],`mtls-certificate-id`,`text`),sslmode:u(p[`mtls-sslmode`],`mtls-sslmode`,`text`)},name:u(p.name,`name`,`text`),origin:{database:u(p[`origin-database`],`origin-database`,`text`),password:u(p[`origin-password`],`origin-password`,`text`),scheme:u(p[`origin-scheme`],`origin-scheme`,`text`),user:u(p[`origin-user`],`origin-user`,`text`),host:u(p[`origin-host`],`origin-host`,`text`),port:p[`origin-port`],access_client_id:u(p[`origin-access-client-id`],`origin-access-client-id`,`text`),access_client_secret:u(p[`origin-access-client-secret`],`origin-access-client-secret`,`text`),service_id:u(p[`origin-service-id`],`origin-service-id`,`text`)},origin_connection_limit:p[`origin-connection-limit`]});i(await o(`Updating`,async()=>s.hyperdrive.replace({...h,account_id:m,hyperdrive_id:p[`hyperdrive-id`]})),{successLabel:`Updated`})})};function O(e){return e.usage(`$0 hyperdrive restart <hyperdrive-id>
27
+ `}).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(`origin-host`,[`origin-service-id`]).conflicts(`origin-port`,[`origin-access-client-id`,`origin-access-client-secret`,`origin-service-id`]).implies(`origin-port`,[`origin-host`]).conflicts(`origin-access-client-id`,[`origin-port`,`origin-service-id`]).implies(`origin-access-client-id`,[`origin-host`,`origin-access-client-secret`]).conflicts(`origin-access-client-secret`,[`origin-port`,`origin-service-id`]).implies(`origin-access-client-secret`,[`origin-host`,`origin-access-client-id`]).conflicts(`origin-service-id`,[`origin-host`,`origin-port`,`origin-access-client-id`,`origin-access-client-secret`])}const D={command:`replace <hyperdrive-id>`,describe:`Replace Hyperdrive`,builder:E,handler:async p=>s({command:`hyperdrive replace`,classification:{safeFlags:[`caching-disabled`,`mtls-sslmode`,`origin-scheme`,`dry-run`]}},p,async()=>{if(p.dryRun){let e=await n();a({command:`cf hyperdrive replace`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/hyperdrive/configs/${p[`hyperdrive-id`]==null?`<hyperdrive-id>`:encodeURIComponent(String(p[`hyperdrive-id`]))}`,pathParams:{"hyperdrive-id":String(p[`hyperdrive-id`]??``)},bodyKind:`json`,body:p.body===void 0?l({caching:{disabled:p[`caching-disabled`],max_age:p[`caching-max-age`],stale_while_revalidate:p[`caching-stale-while-revalidate`]},mtls:{ca_certificate_id:u(p[`mtls-ca-certificate-id`],`mtls-ca-certificate-id`,`text`),mtls_certificate_id:u(p[`mtls-certificate-id`],`mtls-certificate-id`,`text`),sslmode:u(p[`mtls-sslmode`],`mtls-sslmode`,`text`)},name:u(p.name,`name`,`text`),origin:{database:u(p[`origin-database`],`origin-database`,`text`),password:u(p[`origin-password`],`origin-password`,`text`),scheme:u(p[`origin-scheme`],`origin-scheme`,`text`),user:u(p[`origin-user`],`origin-user`,`text`),host:u(p[`origin-host`],`origin-host`,`text`),port:p[`origin-port`],access_client_id:u(p[`origin-access-client-id`],`origin-access-client-id`,`text`),access_client_secret:u(p[`origin-access-client-secret`],`origin-access-client-secret`,`text`),service_id:u(p[`origin-service-id`],`origin-service-id`,`text`)},origin_connection_limit:p[`origin-connection-limit`]}):c(p.body),sensitiveBodyPaths:[[`origin`,`password`],[`origin`,`access_client_secret`]]});return}let s=await t(p),m=p.local?e:await r();if(p.accountId=m,p.body){let e=c(p.body),t=await o(`Updating`,async()=>s.hyperdrive.replace({...e,account_id:m,hyperdrive_id:p[`hyperdrive-id`]}));i(t,{successLabel:`Updated`});return}p.name===void 0&&(p.name=await d(`name`,`The name of the Hyperdrive configuration. Used to identify the configuration in the Cloudflare dashboard and API.`)),p[`origin-database`]===void 0&&(p[`origin-database`]=await d(`origin-database`,`Set the name of your origin database.`)),p[`origin-password`]===void 0&&(p[`origin-password`]=await d(`origin-password`,`Set the password needed to access your origin database. The API never returns this write-only value.`,{kind:`secret`})),p[`origin-scheme`]===void 0&&(p[`origin-scheme`]=await f(`origin-scheme`,`Specifies the URL scheme used to connect to your origin database.`,[`postgres`,`postgresql`,`mysql`])),p[`origin-user`]===void 0&&(p[`origin-user`]=await d(`origin-user`,`Set the user of your origin database.`));let h=l({caching:{disabled:p[`caching-disabled`],max_age:p[`caching-max-age`],stale_while_revalidate:p[`caching-stale-while-revalidate`]},mtls:{ca_certificate_id:u(p[`mtls-ca-certificate-id`],`mtls-ca-certificate-id`,`text`),mtls_certificate_id:u(p[`mtls-certificate-id`],`mtls-certificate-id`,`text`),sslmode:u(p[`mtls-sslmode`],`mtls-sslmode`,`text`)},name:u(p.name,`name`,`text`),origin:{database:u(p[`origin-database`],`origin-database`,`text`),password:u(p[`origin-password`],`origin-password`,`text`),scheme:u(p[`origin-scheme`],`origin-scheme`,`text`),user:u(p[`origin-user`],`origin-user`,`text`),host:u(p[`origin-host`],`origin-host`,`text`),port:p[`origin-port`],access_client_id:u(p[`origin-access-client-id`],`origin-access-client-id`,`text`),access_client_secret:u(p[`origin-access-client-secret`],`origin-access-client-secret`,`text`),service_id:u(p[`origin-service-id`],`origin-service-id`,`text`)},origin_connection_limit:p[`origin-connection-limit`]}),g=await o(`Updating`,async()=>s.hyperdrive.replace({...h,account_id:m,hyperdrive_id:p[`hyperdrive-id`]}));i(g,{successLabel:`Updated`})})};function O(e){return e.usage(`$0 hyperdrive restart <hyperdrive-id>
28
28
 
29
- Restarts the connection pool for the specified Hyperdrive configuration without changing its configuration. Existing connections are drained and a new pool is established at the edge.`).positional(`hyperdrive-id`,{type:`string`,description:`The unique identifier of the Hyperdrive configuration.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`restart <hyperdrive-id>`,describe:`Restart Hyperdrive`,builder:O,handler:async c=>s({command:`hyperdrive restart`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf hyperdrive restart`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/hyperdrive/configs/${c[`hyperdrive-id`]==null?`<hyperdrive-id>`:encodeURIComponent(String(c[`hyperdrive-id`]))}/restart`,pathParams:{"hyperdrive-id":String(c[`hyperdrive-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l,i(await o(`Creating`,async()=>s.hyperdrive.restart({account_id:l,hyperdrive_id:c[`hyperdrive-id`]})),{successLabel:`Created`})})};function A(e){return e.usage(`$0 hyperdrive update <hyperdrive-id>
29
+ Restarts the connection pool for the specified Hyperdrive configuration without changing its configuration. Existing connections are drained and a new pool is established at the edge.`).positional(`hyperdrive-id`,{type:`string`,description:`The unique identifier of the Hyperdrive configuration.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`restart <hyperdrive-id>`,describe:`Restart Hyperdrive`,builder:O,handler:async c=>s({command:`hyperdrive restart`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf hyperdrive restart`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/hyperdrive/configs/${c[`hyperdrive-id`]==null?`<hyperdrive-id>`:encodeURIComponent(String(c[`hyperdrive-id`]))}/restart`,pathParams:{"hyperdrive-id":String(c[`hyperdrive-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Creating`,async()=>s.hyperdrive.restart({account_id:l,hyperdrive_id:c[`hyperdrive-id`]}));i(u,{successLabel:`Created`})})};function A(e){return e.usage(`$0 hyperdrive update <hyperdrive-id>
30
30
 
31
31
  Updates and returns the specified fields of the Hyperdrive configuration. Custom caching settings are not kept if caching is disabled.`).positional(`hyperdrive-id`,{type:`string`,description:`The unique identifier of the Hyperdrive configuration.`,demandOption:!0}).option(`caching-disabled`,{type:`boolean`,description:`Set to true to disable caching of SQL responses. Default is false.`}).option(`caching-max-age`,{type:`number`,description:`Specify the maximum duration (in seconds) items should persist in the cache. Defaults to 60 seconds if not specified.`}).option(`caching-stale-while-revalidate`,{type:`number`,description:`Specify the number of seconds the cache may serve a stale response. Defaults to 15 seconds if not specified.`}).option(`mtls-ca-certificate-id`,{type:`string`,description:`Define CA certificate ID obtained after uploading CA cert.`}).option(`mtls-certificate-id`,{type:`string`,description:`Define mTLS certificate ID obtained after uploading client cert.`}).option(`mtls-sslmode`,{type:`string`,description:"PostgreSQL accepts `require`, `verify-ca`, and `verify-full`. MySQL accepts `REQUIRED`, `VERIFY_CA`, and `VERIFY_IDENTITY`. The verify modes require a CA certificate; the require modes cannot be used with a CA certificate.",choices:[`require`,`verify-ca`,`verify-full`,`REQUIRED`,`VERIFY_CA`,`VERIFY_IDENTITY`]}).option(`name`,{type:`string`,description:`The name of the Hyperdrive configuration. Used to identify the configuration in the Cloudflare dashboard and API. An empty value leaves the name unchanged.`}).option(`origin-connection-limit`,{type:`number`,description:`The (soft) maximum number of connections the Hyperdrive is allowed to make to the origin database.
32
32
 
@@ -34,4 +34,4 @@ Maximum allowed: 20 for free tier accounts, 100 for paid tier accounts.
34
34
  If not specified, defaults to 20 for free tier and 60 for paid tier.
35
35
  Certain Cloudflare-managed origins may be permitted a higher limit.
36
36
  Contact Cloudflare if you need a higher limit.
37
- `}).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:`update <hyperdrive-id>`,describe:`Update Hyperdrive`,builder:A,handler:async d=>s({command:`hyperdrive update`,classification:{safeFlags:[`caching-disabled`,`mtls-sslmode`,`dry-run`]}},d,async()=>{if(d.dryRun){a({command:`cf hyperdrive update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/hyperdrive/configs/${d[`hyperdrive-id`]==null?`<hyperdrive-id>`:encodeURIComponent(String(d[`hyperdrive-id`]))}`,pathParams:{"hyperdrive-id":String(d[`hyperdrive-id`]??``)},bodyKind:`json`,body:d.body===void 0?l({caching:{disabled:d[`caching-disabled`],max_age:d[`caching-max-age`],stale_while_revalidate:d[`caching-stale-while-revalidate`]},mtls:{ca_certificate_id:u(d[`mtls-ca-certificate-id`],`mtls-ca-certificate-id`,`text`),mtls_certificate_id:u(d[`mtls-certificate-id`],`mtls-certificate-id`,`text`),sslmode:u(d[`mtls-sslmode`],`mtls-sslmode`,`text`)},name:u(d.name,`name`,`text`),origin_connection_limit:d[`origin-connection-limit`]}):c(d.body)});return}let s=await t(d),f=d.local?e:await r();if(d.accountId=f,d.body){let e=c(d.body);i(await o(`Updating`,async()=>s.hyperdrive.update({...e,account_id:f,hyperdrive_id:d[`hyperdrive-id`]})),{successLabel:`Updated`});return}let p=l({caching:{disabled:d[`caching-disabled`],max_age:d[`caching-max-age`],stale_while_revalidate:d[`caching-stale-while-revalidate`]},mtls:{ca_certificate_id:u(d[`mtls-ca-certificate-id`],`mtls-ca-certificate-id`,`text`),mtls_certificate_id:u(d[`mtls-certificate-id`],`mtls-certificate-id`,`text`),sslmode:u(d[`mtls-sslmode`],`mtls-sslmode`,`text`)},name:u(d.name,`name`,`text`),origin_connection_limit:d[`origin-connection-limit`]});i(await o(`Updating`,async()=>s.hyperdrive.update({...p,account_id:f,hyperdrive_id:d[`hyperdrive-id`]})),{successLabel:`Updated`})})},M={command:`hyperdrive`,describe:`Accelerate access to existing databases by caching queries and pooling connections at the edge`,builder:e=>e.command(h).command(_).command(y).command(T).command(D).command(k).command(j).command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{M as default};
37
+ `}).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:`update <hyperdrive-id>`,describe:`Update Hyperdrive`,builder:A,handler:async d=>s({command:`hyperdrive update`,classification:{safeFlags:[`caching-disabled`,`mtls-sslmode`,`dry-run`]}},d,async()=>{if(d.dryRun){let e=await n();a({command:`cf hyperdrive update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/hyperdrive/configs/${d[`hyperdrive-id`]==null?`<hyperdrive-id>`:encodeURIComponent(String(d[`hyperdrive-id`]))}`,pathParams:{"hyperdrive-id":String(d[`hyperdrive-id`]??``)},bodyKind:`json`,body:d.body===void 0?l({caching:{disabled:d[`caching-disabled`],max_age:d[`caching-max-age`],stale_while_revalidate:d[`caching-stale-while-revalidate`]},mtls:{ca_certificate_id:u(d[`mtls-ca-certificate-id`],`mtls-ca-certificate-id`,`text`),mtls_certificate_id:u(d[`mtls-certificate-id`],`mtls-certificate-id`,`text`),sslmode:u(d[`mtls-sslmode`],`mtls-sslmode`,`text`)},name:u(d.name,`name`,`text`),origin_connection_limit:d[`origin-connection-limit`]}):c(d.body)});return}let s=await t(d),f=d.local?e:await r();if(d.accountId=f,d.body){let e=c(d.body),t=await o(`Updating`,async()=>s.hyperdrive.update({...e,account_id:f,hyperdrive_id:d[`hyperdrive-id`]}));i(t,{successLabel:`Updated`});return}let p=l({caching:{disabled:d[`caching-disabled`],max_age:d[`caching-max-age`],stale_while_revalidate:d[`caching-stale-while-revalidate`]},mtls:{ca_certificate_id:u(d[`mtls-ca-certificate-id`],`mtls-ca-certificate-id`,`text`),mtls_certificate_id:u(d[`mtls-certificate-id`],`mtls-certificate-id`,`text`),sslmode:u(d[`mtls-sslmode`],`mtls-sslmode`,`text`)},name:u(d.name,`name`,`text`),origin_connection_limit:d[`origin-connection-limit`]}),m=await o(`Updating`,async()=>s.hyperdrive.update({...p,account_id:f,hyperdrive_id:d[`hyperdrive-id`]}));i(m,{successLabel:`Updated`})})},M={command:`hyperdrive`,describe:`Accelerate access to existing databases by caching queries and pooling connections at the edge`,builder:e=>e.command(h).command(_).command(y).command(T).command(D).command(k).command(j).command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{M as default};
@@ -0,0 +1,52 @@
1
+ #!/usr/bin/env node
2
+ import{t as e}from"./local-DlT72Xpn.mjs";import{n as t}from"./auth-CGLsxbc6.mjs";import{a as n,t as r}from"./context-q7UaYK69.mjs";import{t as i}from"./output-BOe-3AQG.mjs";import{t as a}from"./dry-run-DRj2_uV3.mjs";import{t as o}from"./progress-BtkTVcHI.mjs";import{t as s}from"./run-BvHwWWUX.mjs";import"./telemetry-BsYO3nxG.mjs";import{n as c,r as l,t as u}from"./body-parser-DkHKPkJ7.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{a as f,n as p}from"./prompt-RlgRrmbm.mjs";import{t as m}from"./cli-types-9oYmRTHJ.mjs";function h(e){return e.usage(`$0 iam permission-groups get <permission-group-id>
3
+
4
+ Get information about a specific permission group in an account.`).positional(`permission-group-id`,{type:`string`,description:`Permission Group identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`get <permission-group-id>`,describe:`Permission Group Details`,builder:h,handler:async c=>s({command:`iam permission-groups get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf iam permission-groups get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/iam/permission_groups/${c[`permission-group-id`]==null?`<permission-group-id>`:encodeURIComponent(String(c[`permission-group-id`]))}`,pathParams:{"permission-group-id":String(c[`permission-group-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Loading`,async()=>s.iam.permissionGroups.get({account_id:l,permission_group_id:c[`permission-group-id`]}));i(u,{successLabel:`Loaded`})})};function ee(e){return e.usage(`$0 iam permission-groups list
5
+
6
+ List all the permissions groups for an account.`).option(`id`,{type:`string`,description:`ID of the permission group to be fetched.`}).option(`name`,{type:`string`,description:`Name of the permission group to be fetched.`}).option(`label`,{type:`string`,description:`Label of the permission group to be fetched.`}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _={command:`list`,describe:`List Account Permission Groups`,builder:ee,handler:async c=>s({command:`iam permission-groups list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={id:c.id,name:c.name,label:c.label,page:c.page,per_page:c[`per-page`]};if(c.dryRun){let e=await n();a({command:`cf iam permission-groups list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/iam/permission_groups`,pathParams:{},query:s,bodyKind:`none`});return}let l=await t(c),u=c.local?e:await r();c.accountId=u;let d=await o(`Loading`,async()=>l.iam.permissionGroups.list({account_id:u,...s}));i(d,{successLabel:`Loaded`})})},v={command:`permission-groups`,describe:`View the permission groups that can be assigned to API tokens and policies`,builder:e=>e.command(g).command(_).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function y(e){return e.usage(`$0 iam resource-groups create
7
+
8
+ Create a new Resource Group under the specified account.`).option(`name`,{type:`string`,description:`Name of the resource group`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const b={command:`create`,describe:`Create Resource Group`,builder:y,handler:async l=>s({command:`iam resource-groups create`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=await n();a({command:`cf iam resource-groups create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/iam/resource_groups`,pathParams:{},bodyKind:`json`,body:l.body===void 0?u({name:d(l.name,`name`,`text`)}):c(l.body)});return}let s=await t(l),p=l.local?e:await r();if(l.accountId=p,l.body){let e=c(l.body),t=await o(`Creating`,async()=>s.iam.resourceGroups.create({...e,account_id:p}));i(t,{successLabel:`Created`});return}l.name===void 0&&(l.name=await f(`name`,`Name of the resource group`));let m=u({name:d(l.name,`name`,`text`)}),h=await o(`Creating`,async()=>s.iam.resourceGroups.create({...m,account_id:p}));i(h,{successLabel:`Created`})})};function x(e){return e.usage(`$0 iam resource-groups delete <resource-group-id>
9
+
10
+ Remove a resource group from an account.`).positional(`resource-group-id`,{type:`string`,description:`Resource Group identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const S={command:`delete <resource-group-id>`,describe:`Remove Resource Group`,builder:x,handler:async c=>s({command:`iam resource-groups delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf iam resource-groups delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/iam/resource_groups/${c[`resource-group-id`]==null?`<resource-group-id>`:encodeURIComponent(String(c[`resource-group-id`]))}`,pathParams:{"resource-group-id":String(c[`resource-group-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();if(c.accountId=l,!await p({force:!!c.force,message:`Are you sure? This action cannot be undone.`})){process.stderr.write(`Aborted.
11
+ `);return}let u=await o(`Deleting`,async()=>s.iam.resourceGroups.delete({account_id:l,resource_group_id:c[`resource-group-id`]}));i(u,{successLabel:`Deleted`})})};function C(e){return e.usage(`$0 iam resource-groups get <resource-group-id>
12
+
13
+ Get information about a specific resource group in an account.`).positional(`resource-group-id`,{type:`string`,description:`Resource Group identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const w={command:`get <resource-group-id>`,describe:`Resource Group Details`,builder:C,handler:async c=>s({command:`iam resource-groups get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf iam resource-groups get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/iam/resource_groups/${c[`resource-group-id`]==null?`<resource-group-id>`:encodeURIComponent(String(c[`resource-group-id`]))}`,pathParams:{"resource-group-id":String(c[`resource-group-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Loading`,async()=>s.iam.resourceGroups.get({account_id:l,resource_group_id:c[`resource-group-id`]}));i(u,{successLabel:`Loaded`})})};function T(e){return e.usage(`$0 iam resource-groups list
14
+
15
+ List all the resource groups for an account.`).option(`id`,{type:`string`,description:`ID of the resource group to be fetched.`}).option(`name`,{type:`string`,description:`Name of the resource group to be fetched.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`list`,describe:`List Resource Groups`,builder:T,handler:async c=>s({command:`iam resource-groups list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={id:c.id,name:c.name};if(c.dryRun){let e=await n();a({command:`cf iam resource-groups list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/iam/resource_groups`,pathParams:{},query:s,bodyKind:`none`});return}let l=await t(c),u=c.local?e:await r();c.accountId=u;let d=await o(`Loading`,async()=>l.iam.resourceGroups.list({account_id:u,...s}));i(d,{successLabel:`Loaded`})})};function D(e){return e.usage(`$0 iam resource-groups update <resource-group-id>
16
+
17
+ Modify an existing resource group.`).positional(`resource-group-id`,{type:`string`,description:`Resource Group identifier tag.`,demandOption:!0}).option(`name`,{type:`string`,description:`Name of the resource group`}).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 O={command:`update <resource-group-id>`,describe:`Update Resource Group`,builder:D,handler:async l=>s({command:`iam resource-groups update`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=await n();a({command:`cf iam resource-groups update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/iam/resource_groups/${l[`resource-group-id`]==null?`<resource-group-id>`:encodeURIComponent(String(l[`resource-group-id`]))}`,pathParams:{"resource-group-id":String(l[`resource-group-id`]??``)},bodyKind:`json`,body:l.body===void 0?u({name:d(l.name,`name`,`text`)}):c(l.body)});return}let s=await t(l),f=l.local?e:await r();if(l.accountId=f,l.body){let e=c(l.body),t=await o(`Updating`,async()=>s.iam.resourceGroups.update({...e,account_id:f,resource_group_id:l[`resource-group-id`]}));i(t,{successLabel:`Updated`});return}let p=u({name:d(l.name,`name`,`text`)}),m=await o(`Updating`,async()=>s.iam.resourceGroups.update({...p,account_id:f,resource_group_id:l[`resource-group-id`]}));i(m,{successLabel:`Updated`})})},k={command:`resource-groups`,describe:`Define scopes that limit which account resources a policy or token can access`,builder:e=>e.command(b).command(S).command(w).command(E).command(O).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function A(e){return e.usage(`$0 iam sso begin-verification <sso-connector-id>
18
+
19
+ Validates the user has added the DNS TXT record required for validating ownership of the domain they are trying to set up a connector for.`).positional(`sso-connector-id`,{type:`string`,description:`SSO Connector identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const j={command:`begin-verification <sso-connector-id>`,describe:`Begin SSO connector verification`,builder:A,handler:async c=>s({command:`iam sso begin-verification`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf iam sso begin-verification`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/sso_connectors/${c[`sso-connector-id`]==null?`<sso-connector-id>`:encodeURIComponent(String(c[`sso-connector-id`]))}/begin_verification`,pathParams:{"sso-connector-id":String(c[`sso-connector-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Creating`,async()=>s.iam.sso.beginVerification({account_id:l,sso_connector_id:c[`sso-connector-id`]}));i(u,{successLabel:`Created`})})};function M(e){return e.usage(`$0 iam sso create
20
+
21
+ Creates a new SSO connector for logging into Cloudflare through an identity provider.`).option(`begin-verification`,{type:`boolean`,description:`Begin the verification process after creation`,default:!0}).option(`email-domain`,{type:`string`,description:`Email domain of the new SSO connector`}).option(`use-fedramp-language`,{type:`boolean`,description:`Controls the display of FedRAMP language to the user during SSO login`,default:!1}).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 N={command:`create`,describe:`Initialize new SSO connector`,builder:M,handler:async l=>s({command:`iam sso create`,classification:{safeFlags:[`begin-verification`,`use-fedramp-language`,`dry-run`]}},l,async()=>{if(l.dryRun){let e=await n();a({command:`cf iam sso create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/sso_connectors`,pathParams:{},bodyKind:`json`,body:l.body===void 0?u({begin_verification:l[`begin-verification`],email_domain:d(l[`email-domain`],`email-domain`,`text`),use_fedramp_language:l[`use-fedramp-language`]}):c(l.body)});return}let s=await t(l),p=l.local?e:await r();if(l.accountId=p,l.body){let e=c(l.body),t=await o(`Creating`,async()=>s.iam.sso.create({...e,account_id:p}));i(t,{successLabel:`Created`});return}l[`email-domain`]===void 0&&(l[`email-domain`]=await f(`email-domain`,`Email domain of the new SSO connector`));let m=u({begin_verification:l[`begin-verification`],email_domain:d(l[`email-domain`],`email-domain`,`text`),use_fedramp_language:l[`use-fedramp-language`]}),h=await o(`Creating`,async()=>s.iam.sso.create({...m,account_id:p}));i(h,{successLabel:`Created`})})};function P(e){return e.usage(`$0 iam sso delete <sso-connector-id>
22
+
23
+ Deletes an SSO connector from the account.`).positional(`sso-connector-id`,{type:`string`,description:`SSO Connector identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const F={command:`delete <sso-connector-id>`,describe:`Delete SSO connector`,builder:P,handler:async c=>s({command:`iam sso delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf iam sso delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/sso_connectors/${c[`sso-connector-id`]==null?`<sso-connector-id>`:encodeURIComponent(String(c[`sso-connector-id`]))}`,pathParams:{"sso-connector-id":String(c[`sso-connector-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();if(c.accountId=l,!await p({force:!!c.force,message:`Are you sure? This action cannot be undone.`})){process.stderr.write(`Aborted.
24
+ `);return}let u=await o(`Deleting`,async()=>s.iam.sso.delete({account_id:l,sso_connector_id:c[`sso-connector-id`]}));i(u,{successLabel:`Deleted`})})};function I(e){return e.usage(`$0 iam sso get <sso-connector-id>
25
+
26
+ Retrieves details for a specific SSO connector.`).positional(`sso-connector-id`,{type:`string`,description:`SSO Connector identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const L={command:`get <sso-connector-id>`,describe:`Get single SSO connector`,builder:I,handler:async c=>s({command:`iam sso get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf iam sso get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/sso_connectors/${c[`sso-connector-id`]==null?`<sso-connector-id>`:encodeURIComponent(String(c[`sso-connector-id`]))}`,pathParams:{"sso-connector-id":String(c[`sso-connector-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Loading`,async()=>s.iam.sso.get({account_id:l,sso_connector_id:c[`sso-connector-id`]}));i(u,{successLabel:`Loaded`})})};function R(e){return e.usage(`$0 iam sso list
27
+
28
+ Lists all SSO connectors configured for the account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const z={command:`list`,describe:`Get all SSO connectors`,builder:R,handler:async c=>s({command:`iam sso list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf iam sso list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/sso_connectors`,pathParams:{},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Loading`,async()=>s.iam.sso.list({account_id:l}));i(u,{successLabel:`Loaded`})})};function B(e){return e.usage(`$0 iam sso update <sso-connector-id>
29
+
30
+ Updates the state or configuration of an SSO connector.`).positional(`sso-connector-id`,{type:`string`,description:`SSO Connector identifier tag.`,demandOption:!0}).option(`enabled`,{type:`boolean`,description:`SSO Connector enabled state`}).option(`use-fedramp-language`,{type:`boolean`,description:`Controls the display of FedRAMP language to the user during SSO login`}).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 te={command:`update <sso-connector-id>`,describe:`Update SSO connector state`,builder:B,handler:async l=>s({command:`iam sso update`,classification:{safeFlags:[`enabled`,`use-fedramp-language`,`dry-run`]}},l,async()=>{if(l.dryRun){let e=await n();a({command:`cf iam sso update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/sso_connectors/${l[`sso-connector-id`]==null?`<sso-connector-id>`:encodeURIComponent(String(l[`sso-connector-id`]))}`,pathParams:{"sso-connector-id":String(l[`sso-connector-id`]??``)},bodyKind:`json`,body:l.body===void 0?u({enabled:l.enabled,use_fedramp_language:l[`use-fedramp-language`]}):c(l.body)});return}let s=await t(l),d=l.local?e:await r();if(l.accountId=d,l.body){let e=c(l.body),t=await o(`Updating`,async()=>s.iam.sso.update({...e,account_id:d,sso_connector_id:l[`sso-connector-id`]}));i(t,{successLabel:`Updated`});return}let f=u({enabled:l.enabled,use_fedramp_language:l[`use-fedramp-language`]}),p=await o(`Updating`,async()=>s.iam.sso.update({...f,account_id:d,sso_connector_id:l[`sso-connector-id`]}));i(p,{successLabel:`Updated`})})},V={command:`sso`,describe:`Configure single sign-on connectors to authenticate account members through an external identity provider`,builder:e=>e.command(j).command(N).command(F).command(L).command(z).command(te).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function H(e){return e.usage(`$0 iam user-groups create
31
+
32
+ Create a new user group under the specified account.`).option(`name`,{type:`string`,description:`Name of the User group.`}).option(`policies`,{type:`string`,description:`Policies attached to the User group. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const U={command:`create`,describe:`Create User Group`,builder:H,handler:async p=>s({command:`iam user-groups create`,classification:{safeFlags:[`dry-run`]}},p,async()=>{if(p.dryRun){let e=await n();a({command:`cf iam user-groups create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/iam/user_groups`,pathParams:{},bodyKind:`json`,body:p.body===void 0?u({name:d(p.name,`name`,`text`),policies:l(p.policies,`policies`)}):c(p.body)});return}let s=await t(p),m=p.local?e:await r();if(p.accountId=m,p.body){let e=c(p.body),t=await o(`Creating`,async()=>s.iam.userGroups.create({...e,account_id:m}));i(t,{successLabel:`Created`});return}p.name===void 0&&(p.name=await f(`name`,`Name of the User group.`));let h=u({name:d(p.name,`name`,`text`),policies:l(p.policies,`policies`)}),g=await o(`Creating`,async()=>s.iam.userGroups.create({...h,account_id:m}));i(g,{successLabel:`Created`})})};function W(e){return e.usage(`$0 iam user-groups delete <user-group-id>
33
+
34
+ Remove a user group from an account.`).positional(`user-group-id`,{type:`string`,description:`User Group identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const G={command:`delete <user-group-id>`,describe:`Remove User Group`,builder:W,handler:async c=>s({command:`iam user-groups delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf iam user-groups delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/iam/user_groups/${c[`user-group-id`]==null?`<user-group-id>`:encodeURIComponent(String(c[`user-group-id`]))}`,pathParams:{"user-group-id":String(c[`user-group-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();if(c.accountId=l,!await p({force:!!c.force,message:`Are you sure? This action cannot be undone.`})){process.stderr.write(`Aborted.
35
+ `);return}let u=await o(`Deleting`,async()=>s.iam.userGroups.delete({account_id:l,user_group_id:c[`user-group-id`]}));i(u,{successLabel:`Deleted`})})};function K(e){return e.usage(`$0 iam user-groups get <user-group-id>
36
+
37
+ Get information about a specific user group in an account.`).positional(`user-group-id`,{type:`string`,description:`User Group identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const q={command:`get <user-group-id>`,describe:`User Group Details`,builder:K,handler:async c=>s({command:`iam user-groups get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf iam user-groups get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/iam/user_groups/${c[`user-group-id`]==null?`<user-group-id>`:encodeURIComponent(String(c[`user-group-id`]))}`,pathParams:{"user-group-id":String(c[`user-group-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Loading`,async()=>s.iam.userGroups.get({account_id:l,user_group_id:c[`user-group-id`]}));i(u,{successLabel:`Loaded`})})};function J(e){return e.usage(`$0 iam user-groups list
38
+
39
+ List all the user groups for an account.`).option(`id`,{type:`string`,description:`ID of the user group to be fetched.`}).option(`name`,{type:`string`,description:`Name of the user group to be fetched.`}).option(`fuzzy-name`,{type:`string`,description:`A string used for searching for user groups containing that substring.`}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results per page.`}).option(`direction`,{type:`string`,description:`The sort order of returned user groups by name (ascending or descending).`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Y={command:`list`,describe:`List User Groups`,builder:m(J),handler:async c=>s({command:`iam user-groups list`,classification:{safeFlags:[`direction`,`dry-run`]}},c,async()=>{let s={id:c.id,name:c.name,fuzzyName:c[`fuzzy-name`],page:c.page,per_page:c[`per-page`],direction:c.direction};if(c.dryRun){let e=await n();a({command:`cf iam user-groups list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/iam/user_groups`,pathParams:{},query:s,bodyKind:`none`});return}let l=await t(c),u=c.local?e:await r();c.accountId=u;let d=await o(`Loading`,async()=>l.iam.userGroups.list({account_id:u,...s}));i(d,{successLabel:`Loaded`})})};function X(e){return e.usage(`$0 iam user-groups members create <user-group-id>
40
+
41
+ Add members to a User Group.`).positional(`user-group-id`,{type:`string`,description:`User Group identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Z={command:`create <user-group-id>`,describe:`Add User Group Members`,builder:X,handler:async l=>s({command:`iam user-groups members create`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=await n();a({command:`cf iam user-groups members create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/iam/user_groups/${l[`user-group-id`]==null?`<user-group-id>`:encodeURIComponent(String(l[`user-group-id`]))}/members`,pathParams:{"user-group-id":String(l[`user-group-id`]??``)},bodyKind:`json`,body:l.body===void 0?void 0:c(l.body)});return}let s=await t(l),u=l.local?e:await r();if(l.accountId=u,l.body){let e=c(l.body),t=await o(`Creating`,async()=>s.iam.userGroups.members.create({body:e,account_id:u,user_group_id:l[`user-group-id`]}));i(t,{successLabel:`Created`});return}if(l.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function Q(e){return e.usage(`$0 iam user-groups members delete <member-id>
42
+
43
+ Remove a member from User Group`).positional(`member-id`,{type:`string`,description:`The identifier of an existing account Member.`,demandOption:!0}).option(`user-group-id`,{type:`string`,description:`User Group identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ne={command:`delete <member-id>`,describe:`Remove User Group Member`,builder:Q,handler:async c=>s({command:`iam user-groups members delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf iam user-groups members delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/iam/user_groups/${c[`user-group-id`]==null?`<user-group-id>`:encodeURIComponent(String(c[`user-group-id`]))}/members/${c[`member-id`]==null?`<member-id>`:encodeURIComponent(String(c[`member-id`]))}`,pathParams:{"user-group-id":String(c[`user-group-id`]??``),"member-id":String(c[`member-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();if(c.accountId=l,!await p({force:!!c.force,message:`Are you sure? This action cannot be undone.`})){process.stderr.write(`Aborted.
44
+ `);return}let u=await o(`Deleting`,async()=>s.iam.userGroups.members.delete({account_id:l,user_group_id:c[`user-group-id`],member_id:c[`member-id`]}));i(u,{successLabel:`Deleted`})})};function re(e){return e.usage(`$0 iam user-groups members get <member-id>
45
+
46
+ Get details of a specific member in a user group.`).positional(`member-id`,{type:`string`,description:`The identifier of an existing account Member.`,demandOption:!0}).option(`user-group-id`,{type:`string`,description:`User Group identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ie={command:`get <member-id>`,describe:`Get User Group Member`,builder:re,handler:async c=>s({command:`iam user-groups members get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf iam user-groups members get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/iam/user_groups/${c[`user-group-id`]==null?`<user-group-id>`:encodeURIComponent(String(c[`user-group-id`]))}/members/${c[`member-id`]==null?`<member-id>`:encodeURIComponent(String(c[`member-id`]))}`,pathParams:{"user-group-id":String(c[`user-group-id`]??``),"member-id":String(c[`member-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Loading`,async()=>s.iam.userGroups.members.get({account_id:l,user_group_id:c[`user-group-id`],member_id:c[`member-id`]}));i(u,{successLabel:`Loaded`})})};function ae(e){return e.usage(`$0 iam user-groups members list
47
+
48
+ List all the members attached to a user group.`).option(`user-group-id`,{type:`string`,description:`User Group identifier tag.`,demandOption:!0}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results per page.`}).option(`fuzzy-email`,{type:`string`,description:`A string used for filtering members by partial email match.`}).option(`direction`,{type:`string`,description:`The sort order of returned user group members by email.`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const oe={command:`list`,describe:`List User Group Members`,builder:m(ae),handler:async c=>s({command:`iam user-groups members list`,classification:{safeFlags:[`direction`,`dry-run`]}},c,async()=>{let s={page:c.page,per_page:c[`per-page`],fuzzyEmail:c[`fuzzy-email`],direction:c.direction};if(c.dryRun){let e=await n();a({command:`cf iam user-groups members list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/iam/user_groups/${c[`user-group-id`]==null?`<user-group-id>`:encodeURIComponent(String(c[`user-group-id`]))}/members`,pathParams:{"user-group-id":String(c[`user-group-id`]??``)},query:s,bodyKind:`none`});return}let l=await t(c),u=c.local?e:await r();c.accountId=u;let d=await o(`Loading`,async()=>l.iam.userGroups.members.list({account_id:u,user_group_id:c[`user-group-id`],...s}));i(d,{successLabel:`Loaded`})})};function $(e){return e.usage(`$0 iam user-groups members update <user-group-id>
49
+
50
+ Replace the set of members attached to a User Group.`).positional(`user-group-id`,{type:`string`,description:`User Group identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Set/Replace members to a user group.`})}const se={command:`update <user-group-id>`,describe:`Update User Group Members`,builder:$,handler:async l=>s({command:`iam user-groups members update`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=await n();a({command:`cf iam user-groups members update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/iam/user_groups/${l[`user-group-id`]==null?`<user-group-id>`:encodeURIComponent(String(l[`user-group-id`]))}/members`,pathParams:{"user-group-id":String(l[`user-group-id`]??``)},bodyKind:`json`,body:l.body===void 0?void 0:c(l.body)});return}let s=await t(l),u=l.local?e:await r();if(l.accountId=u,l.body){let e=c(l.body),t=await o(`Updating`,async()=>s.iam.userGroups.members.update({body:e,account_id:u,user_group_id:l[`user-group-id`]}));i(t,{successLabel:`Updated`});return}if(l.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},ce={command:`members`,describe:`Operations for user-groups.members`,builder:e=>e.command(Z).command(ne).command(ie).command(oe).command(se).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function le(e){return e.usage(`$0 iam user-groups update <user-group-id>
51
+
52
+ Modify an existing user group.`).positional(`user-group-id`,{type:`string`,description:`User Group identifier tag.`,demandOption:!0}).option(`name`,{type:`string`,description:`Name of the User group.`}).option(`policies`,{type:`string`,description:`Policies attached to the User group. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ue={command:`update <user-group-id>`,describe:`Update User Group`,builder:le,handler:async f=>s({command:`iam user-groups update`,classification:{safeFlags:[`dry-run`]}},f,async()=>{if(f.dryRun){let e=await n();a({command:`cf iam user-groups update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/iam/user_groups/${f[`user-group-id`]==null?`<user-group-id>`:encodeURIComponent(String(f[`user-group-id`]))}`,pathParams:{"user-group-id":String(f[`user-group-id`]??``)},bodyKind:`json`,body:f.body===void 0?u({name:d(f.name,`name`,`text`),policies:l(f.policies,`policies`)}):c(f.body)});return}let s=await t(f),p=f.local?e:await r();if(f.accountId=p,f.body){let e=c(f.body),t=await o(`Updating`,async()=>s.iam.userGroups.update({...e,account_id:p,user_group_id:f[`user-group-id`]}));i(t,{successLabel:`Updated`});return}let m=u({name:d(f.name,`name`,`text`),policies:l(f.policies,`policies`)}),h=await o(`Updating`,async()=>s.iam.userGroups.update({...m,account_id:p,user_group_id:f[`user-group-id`]}));i(h,{successLabel:`Updated`})})},de={command:`user-groups`,describe:`Organize account members into groups for easier permission assignment`,builder:e=>e.command(U).command(G).command(q).command(Y).command(ue).command(ce).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},fe={command:`iam`,describe:`Identity and access management — permission groups, resource groups, user groups, and SSO connectors`,builder:e=>e.command(v).command(k).command(V).command(de).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{fe as default};