cf 1.0.0-beta.12 → 1.0.0-beta.14

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 (306) hide show
  1. package/dist/_meta/commands.json +4648 -3810
  2. package/dist/_meta/hand-written-commands.json +356 -23
  3. package/dist/_meta/schemas.json +2522 -2143
  4. package/dist/abuse-reports-CVv52Q2w.mjs +24 -0
  5. package/dist/access-k1QjF5rE.mjs +2 -0
  6. package/dist/account-tags-RhvWOkOf.mjs +15 -0
  7. package/dist/{accounts-BSd4b-1j.mjs → accounts--3lrEkmu.mjs} +67 -80
  8. package/dist/{acm-BfI0p2sX.mjs → acm-BJxINEcu.mjs} +2 -2
  9. package/dist/{addressing-lfeJf7YB.mjs → addressing-BqByG9JW.mjs} +55 -43
  10. package/dist/{agent-memory-CP1qpn-y.mjs → agent-memory-D4dQMGbh.mjs} +2 -2
  11. package/dist/{ai-jFzFBANM.mjs → ai-CRkQ4pjC.mjs} +18 -16
  12. package/dist/{ai-audit-B_tSl78A.mjs → ai-audit-fMSn4c5L.mjs} +1 -1
  13. package/dist/ai-gateway-CbhvQK4L.mjs +80 -0
  14. package/dist/ai-search-CvVSnOA0.mjs +79 -0
  15. package/dist/{ai-security-CKGE547U.mjs → ai-security-Z_qpI92I.mjs} +1 -1
  16. package/dist/{alerting-CuxoqG3S.mjs → alerting-CpbCB8br.mjs} +5 -5
  17. package/dist/analytics-DkY9dOP1.mjs +17 -0
  18. package/dist/{analytics_engine-BoapM9wd.mjs → analytics_engine-DE_jvlx_.mjs} +1 -1
  19. package/dist/{api-security-Nk_bg-Kg.mjs → api-security-BHnOU5MM.mjs} +25 -25
  20. package/dist/argo-DhC5L_aN.mjs +14 -0
  21. package/dist/{artifacts-BS6cEqCB.mjs → artifacts-CrIupY7P.mjs} +3 -3
  22. package/dist/{audit-logs-x5tLqeX2.mjs → audit-logs-BjeBxTox.mjs} +1 -1
  23. package/dist/{auth-CKotxfap.mjs → auth-BNYfOMl0.mjs} +1 -1
  24. package/dist/{auth-AobvBmz4.mjs → auth-CAWalgW0.mjs} +1 -1
  25. package/dist/auth-DOwC01PW.mjs +2 -0
  26. package/dist/{auth-token-CtguMdmF.mjs → auth-token-Dop0wLCw.mjs} +1 -1
  27. package/dist/{autoconfig-PfnbLuEO.mjs → autoconfig-RQ3HS4m1.mjs} +151 -151
  28. package/dist/{basin-catalog-Ddi-t3q9.mjs → basin-catalog-DZ7QV-_N.mjs} +3 -3
  29. package/dist/{billing-CDMc4tvX.mjs → billing-BFyte9fL.mjs} +3 -3
  30. package/dist/bot-management-DXcbV3am.mjs +9 -0
  31. package/dist/{botnet-feed-CVwRm42k.mjs → botnet-feed-bGGp_cwX.mjs} +1 -1
  32. package/dist/{brand-protection-DfNf5REj.mjs → brand-protection-DN36XkxH.mjs} +2 -2
  33. package/dist/browser-run-hHD1RT43.mjs +42 -0
  34. package/dist/build-BhpWYgNm.mjs +2 -0
  35. package/dist/{build-BKPVP5ip.mjs → build-CCe7IrWT.mjs} +1 -1
  36. package/dist/{builds-BG5DHqU3.mjs → builds-6aO61R9R.mjs} +4 -4
  37. package/dist/{cache-C05hHXUp.mjs → cache-C5YJpMqi.mjs} +6 -6
  38. package/dist/{certificate-authorities-DyCFmZwR.mjs → certificate-authorities-CbqDAktQ.mjs} +1 -1
  39. package/dist/cf-oRSQKirD.mjs +18 -0
  40. package/dist/chunk-DSGVRFIS-CPI5cYtB.mjs +2 -0
  41. package/dist/{chunk-FT2NMTJB-DQ7s3x7Q.mjs → chunk-NDZDTP46-Civns3WA.mjs} +3 -3
  42. package/dist/{chunk-AUSY7DKT-BJX6Fdc4.mjs → chunk-TAK63GWY-DdMktrgc.mjs} +9 -2
  43. package/dist/{cli-D9qlPB-6.mjs → cli-ht4q6i2y.mjs} +1 -1
  44. package/dist/{client-certificates-B-m8rfM9.mjs → client-certificates-balaN_my.mjs} +1 -1
  45. package/dist/{client-side-security-M4oIUqID.mjs → client-side-security-3_4Ermmg.mjs} +3 -3
  46. package/dist/{cloud-connector-B63Dwn6n.mjs → cloud-connector-avx27sLw.mjs} +1 -1
  47. package/dist/cloudflared-D83U8Yn3.mjs +2 -0
  48. package/dist/{cloudforce-one-Dlc1GNFy.mjs → cloudforce-one-CXdeqJ9l.mjs} +143 -185
  49. package/dist/{command-VuxpEvmH.mjs → command-9VAc7b30.mjs} +1 -1
  50. package/dist/{command-CUkXxZsc.mjs → command-B_Ixlz8Q.mjs} +1 -1
  51. package/dist/{command-ZBQ1WITj.mjs → command-Bpzp8Mz2.mjs} +1 -1
  52. package/dist/{command-DBaNgfA4.mjs → command-BtDY_MKv.mjs} +1 -1
  53. package/dist/command-CUNMrMou.mjs +2 -0
  54. package/dist/{command-SS1z_t68.mjs → command-Ckb9FufU.mjs} +1 -1
  55. package/dist/{command-BWlpCtHe.mjs → command-CtVUNm__.mjs} +1 -1
  56. package/dist/{command-DyE8v4sd.mjs → command-CyJQ40fc.mjs} +1 -1
  57. package/dist/{command-BlGILcTA.mjs → command-DPX9sJVi.mjs} +1 -1
  58. package/dist/{command-CXxh5Hce.mjs → command-DXaRn1ls.mjs} +1 -1
  59. package/dist/{command-CRl00uA2.mjs → command-DjEJaOwV.mjs} +1 -1
  60. package/dist/{command-Rv2MR-eh.mjs → command-DtgJilOK.mjs} +1 -1
  61. package/dist/{command-CKQlxypn.mjs → command-OHov3PEc.mjs} +1 -1
  62. package/dist/{command-DEQSv-S1.mjs → command-OWe3v69l.mjs} +1 -1
  63. package/dist/{command-BQpXcGKV.mjs → command-SmWD-MeI.mjs} +1 -1
  64. package/dist/{completions-lf50FBGm.mjs → completions-CuqAO3N_.mjs} +11 -11
  65. package/dist/{connector-interrupts-DHN1KtUE.mjs → connector-interrupts-ftd10Du-.mjs} +1 -1
  66. package/dist/{connector-telemetry-events-CHg7FmXh.mjs → connector-telemetry-events-TwDZYdEM.mjs} +1 -1
  67. package/dist/{connector-telemetry-snapshots-CSifYi9r.mjs → connector-telemetry-snapshots-CZxkOuC3.mjs} +1 -1
  68. package/dist/{connectors-0UwPUav-.mjs → connectors-6lVSr-fd.mjs} +1 -1
  69. package/dist/containers-Dqs_ZnO2.mjs +78 -0
  70. package/dist/containers-ncw3bd3a.mjs +376 -0
  71. package/dist/{content-scan-COyTz0Wb.mjs → content-scan-BWFbqfQ0.mjs} +3 -3
  72. package/dist/{context-Bwkz4Lm_.mjs → context-BBLtgdR1.mjs} +2 -2
  73. package/dist/cps-C5phNoVU.mjs +6 -0
  74. package/dist/{csamScanner-jez2EYXC.mjs → csamScanner-BwZNZu0A.mjs} +3 -3
  75. package/dist/{ct-alerting-CACDrY0E.mjs → ct-alerting-DPp3qLqO.mjs} +1 -1
  76. package/dist/{custom-certificates-BBd92YlF.mjs → custom-certificates-pfpZcr06.mjs} +5 -5
  77. package/dist/{custom-csrs-DTwBiNMX.mjs → custom-csrs-DrvGRAkl.mjs} +2 -2
  78. package/dist/{custom-hostnames-DIWlqvN9.mjs → custom-hostnames-wGtmFbz1.mjs} +4 -4
  79. package/dist/{custom-nameservers-DISy8v8u.mjs → custom-nameservers-HTG6MPKv.mjs} +1 -1
  80. package/dist/{custom-pages-BHXO_NFv.mjs → custom-pages-DqEHBSVt.mjs} +2 -2
  81. package/dist/d1-EQMUlHTJ.mjs +94 -0
  82. package/dist/{dcv-delegation-Buq0hcm_.mjs → dcv-delegation-D6nj0Z5N.mjs} +1 -1
  83. package/dist/deploy-B22sEVHd.mjs +2 -0
  84. package/dist/deploy-context-DmG9rgPO.mjs +56 -0
  85. package/dist/deploy-input-BCjcuP6u.mjs +2 -0
  86. package/dist/{dev-D8FGPKRt.mjs → dev-ClhhXuNU.mjs} +1 -1
  87. package/dist/diagnostics-tqHjq-Pl.mjs +15 -0
  88. package/dist/dialog-D4Y9ocuF.mjs +2 -0
  89. package/dist/dist-DmRM6WSZ.mjs +449 -0
  90. package/dist/dist-uRuGmkMB.mjs +60 -0
  91. package/dist/{dls-8D00tqvC.mjs → dls-BEHj4X9T.mjs} +1 -1
  92. package/dist/{dns-firewall-DIiF4pro.mjs → dns-firewall-zwbkutyf.mjs} +1 -1
  93. package/dist/{dns-C-A5pwf3.mjs → dns-n4mfYBZg.mjs} +7 -7
  94. package/dist/dry-run-DRj2_uV3.mjs +2 -0
  95. package/dist/{durable-objects-CnIqbj84.mjs → durable-objects-CQ2dHhho.mjs} +1 -1
  96. package/dist/{email-auth-v97Md32E.mjs → email-auth-DOi6yOt3.mjs} +1 -1
  97. package/dist/{email-routing-I29RG4hb.mjs → email-routing-WcSPt22u.mjs} +5 -5
  98. package/dist/{email-security-BCarmbky.mjs → email-security-BXu3OGay.mjs} +15 -15
  99. package/dist/{email-sending-CsHk2HAJ.mjs → email-sending-B9zTlIjt.mjs} +2 -2
  100. package/dist/{error-sanitization-BWnGnB73.mjs → error-sanitization-DE_zSrXw.mjs} +1 -1
  101. package/dist/error-sanitization-DOCQ9Ykh.mjs +2 -0
  102. package/dist/{fieldExtractors-GIVe9jZa.mjs → fieldExtractors-B37m2lKW.mjs} +1 -1
  103. package/dist/{firewall-DpgFqJr3.mjs → firewall-CRtYO0Ha.mjs} +7 -7
  104. package/dist/{flagship-BVaXXlsX.mjs → flagship-DvTFZSay.mjs} +3 -3
  105. package/dist/{fraud-B5GQdEF2.mjs → fraud-uSyibsit.mjs} +5 -5
  106. package/dist/{google-tag-gateway-C4O61lp-.mjs → google-tag-gateway-BFXiiokq.mjs} +1 -1
  107. package/dist/hand-written-dry-run-B82fRl2N.mjs +2 -0
  108. package/dist/{healthchecks-BwYMnKSF.mjs → healthchecks-27u7b7Jb.mjs} +5 -5
  109. package/dist/{hostnames-DhrGRFeI.mjs → hostnames-DvaUSzsj.mjs} +1 -1
  110. package/dist/hyperdrive-BzJvPdu6.mjs +37 -0
  111. package/dist/{iam-sRKDU2Z3.mjs → iam-Dl3cU9GI.mjs} +1 -1
  112. package/dist/{images-DXdekLVs.mjs → images-C2OkI1j7.mjs} +6 -6
  113. package/dist/index.mjs +1 -1
  114. package/dist/init-Da8pe296.mjs +43 -0
  115. package/dist/{intel-CnVeSjIS.mjs → intel-DoB1g_K7.mjs} +2 -2
  116. package/dist/interactive-BW9T1D1q.mjs +48 -0
  117. package/dist/interactive-DGUWZ2Gk.mjs +2 -0
  118. package/dist/{ips-COCUG8mk.mjs → ips-BRt68epr.mjs} +1 -1
  119. package/dist/k2-_eq5ZY2t.mjs +11 -0
  120. package/dist/{keyless-certificates-l2_S__h3.mjs → keyless-certificates-DaO2yqYu.mjs} +2 -2
  121. package/dist/{keys-CDZreums.mjs → keys-7BQ3Zq6Y.mjs} +1 -1
  122. package/dist/{kv-DkpKVimq.mjs → kv-BTYCXKML.mjs} +4 -4
  123. package/dist/{lazy-command-_vZGz6mv.mjs → lazy-command-CDWwCsD2.mjs} +1 -1
  124. package/dist/{leaked-credential-checks-edbapECI.mjs → leaked-credential-checks-CPHOK_dE.mjs} +1 -1
  125. package/dist/load-balancers-Bu9pd2SV.mjs +76 -0
  126. package/dist/{local-C0lQ9sTg.mjs → local-BcPM4I0s.mjs} +1 -1
  127. package/dist/local-BundUuDT.mjs +2 -0
  128. package/dist/{local-runtime-DtnWXN0a.mjs → local-runtime-BHKyRlCP.mjs} +1 -1
  129. package/dist/{login-DeOM4v0L.mjs → login-BBYC_BtH.mjs} +1 -1
  130. package/dist/{login-BrjOuHKu.mjs → login-D2uoWhWh.mjs} +1 -1
  131. package/dist/{logo-matches-CF8321pb.mjs → logo-matches-Bc1DQ4-g.mjs} +1 -1
  132. package/dist/{logos-Bd8xNRKW.mjs → logos-X5B8z7Iv.mjs} +1 -1
  133. package/dist/{logpush-BYk3qqwY.mjs → logpush-C2ENi1et.mjs} +7 -7
  134. package/dist/{logs-Jcj2NN8H.mjs → logs-BKDz7kBW.mjs} +1 -1
  135. package/dist/{magic-cloud-networking-Dgdb9H0f.mjs → magic-cloud-networking-B60Gld8A.mjs} +6 -6
  136. package/dist/{magic-network-monitoring-CxVU4MZB.mjs → magic-network-monitoring-CxXI3Y-H.mjs} +4 -4
  137. package/dist/{magic-transit-KDyfUgTv.mjs → magic-transit-ZCSaCbl8.mjs} +171 -168
  138. package/dist/{managed-defense-CxaDeNUd.mjs → managed-defense-DrxMb7xi.mjs} +1 -1
  139. package/dist/{managed-transforms-C7rT5E-x.mjs → managed-transforms-AI7KrRU1.mjs} +1 -1
  140. package/dist/{matches-BtKqG8T9.mjs → matches-rPMLS3Ip.mjs} +1 -1
  141. package/dist/mcp-DXUMvEWt.mjs +32 -0
  142. package/dist/mesh-MmBCQ37q.mjs +26 -0
  143. package/dist/{migrate-DHlfR_gZ.mjs → migrate-CZNq63Uj.mjs} +1 -1
  144. package/dist/{monetization-pLalYYMI.mjs → monetization-DQE5VtUO.mjs} +2 -2
  145. package/dist/{mtls-certificates-DYA9Wu-c.mjs → mtls-certificates-DwkEb-Hy.mjs} +2 -2
  146. package/dist/{network-DrJxPWXQ.mjs → network-BcfobxQY.mjs} +1 -1
  147. package/dist/{network-interconnects-D73MlYG8.mjs → network-interconnects-BU3tN_Ab.mjs} +10 -11
  148. package/dist/o11y-BBv7nedp.mjs +93 -0
  149. package/dist/{oauth-B08YQ4xq.mjs → oauth-BUr8bPwo.mjs} +1 -1
  150. package/dist/{oauth-clients-CkPDLFd-.mjs → oauth-clients-qWVImhHE.mjs} +3 -3
  151. package/dist/{oauth-TGbM1Q0V.mjs → oauth-n8um6MFk.mjs} +1 -1
  152. package/dist/{oauth-scopes-VgliqcQe.mjs → oauth-scopes-CdeIgJIx.mjs} +1 -1
  153. package/dist/organization-CJeOVWH7.mjs +71 -0
  154. package/dist/{organizations-Dk0D9ukm.mjs → organizations-BpfoqZcG.mjs} +1 -1
  155. package/dist/{origin-ca-certificates-BSFqMTn-.mjs → origin-ca-certificates-Bimf07RF.mjs} +2 -2
  156. package/dist/origin-post-quantum-encryption-CM-If38w.mjs +6 -0
  157. package/dist/{origin-tls-client-auth-BzE3WpcN.mjs → origin-tls-client-auth-BPwYPhc9.mjs} +3 -3
  158. package/dist/{output-BGqhvqe2.mjs → output-BOe-3AQG.mjs} +1 -1
  159. package/dist/{page-rules-BKaU37cM.mjs → page-rules-DOeekMrj.mjs} +4 -4
  160. package/dist/pages-Bn0Sg1ay.mjs +54 -0
  161. package/dist/pay-per-crawl-qJpseNNx.mjs +38 -0
  162. package/dist/pay-per-use-C1MWKJ4O.mjs +33 -0
  163. package/dist/pipelines-rCwXQw6S.mjs +44 -0
  164. package/dist/{precursor-DmQ32-Sp.mjs → precursor-Bk8Pp6jT.mjs} +2 -2
  165. package/dist/previews-BEheHO3T.mjs +4 -0
  166. package/dist/process-2wmDCy17.mjs +2 -0
  167. package/dist/{progress-BYVZuEcG.mjs → progress-CQqDtgmF.mjs} +1 -1
  168. package/dist/prompt-C8FyienX.mjs +3 -0
  169. package/dist/{queries-DPBkVynK.mjs → queries-DJ8looyq.mjs} +1 -1
  170. package/dist/{queues-CCXRs98q.mjs → queues-BBH9Q-Tt.mjs} +7 -7
  171. package/dist/{r2-BKuBSW8h.mjs → r2-CdJKpP2w.mjs} +52 -49
  172. package/dist/{radar-Gv1yFoRX.mjs → radar-CdvQL4xm.mjs} +1 -1
  173. package/dist/raw-fetch-DbXN3SlE.mjs +2 -0
  174. package/dist/{realtime-CVl-rvgx.mjs → realtime-onrXppzh.mjs} +9 -9
  175. package/dist/{registrar-swlnh22i.mjs → registrar-CbEBc5IE.mjs} +2 -2
  176. package/dist/{registrar-sandbox-cmOYDnkp.mjs → registrar-sandbox-BJhn1HFT.mjs} +3 -3
  177. package/dist/{registry-C20J1MW0.mjs → registry-PI6sO95I.mjs} +1 -1
  178. package/dist/{reporting-Bgwsvol1.mjs → reporting-bXZY6obP.mjs} +1 -1
  179. package/dist/{request-headers-CUee83pa.mjs → request-headers-D8L95bEQ.mjs} +1 -1
  180. package/dist/{request-tracers-BBiJvVDz.mjs → request-tracers-CihskC2A.mjs} +1 -1
  181. package/dist/{resolve-DvxgnWjL.mjs → resolve-CaTBV-c6.mjs} +1 -1
  182. package/dist/resolve-DCGSzUDQ.mjs +2 -0
  183. package/dist/{resource-sharing-C1JiYLbl.mjs → resource-sharing-DDqcCHVs.mjs} +11 -11
  184. package/dist/{resource-tagging-C9VOSlDR.mjs → resource-tagging-D63RpBce.mjs} +1 -1
  185. package/dist/{rules-BDunCGMj.mjs → rules-CAW0-Wde.mjs} +1 -1
  186. package/dist/rulesets-CPir63Qc.mjs +37 -0
  187. package/dist/{rum-B7XiECe9.mjs → rum-BfwTcuup.mjs} +1 -1
  188. package/dist/{run-CrZgB8L_.mjs → run-CW2Cgi0S.mjs} +1 -1
  189. package/dist/run-DEynXvCc.mjs +2 -0
  190. package/dist/{schema-DC0kdqgV.mjs → schema-elj12WOx.mjs} +1 -1
  191. package/dist/{schema-flags-BUZR9SLd.mjs → schema-flags-BTItUu1K.mjs} +1 -1
  192. package/dist/{scim-CORcs2wK.mjs → scim-CtZ1FeQE.mjs} +1 -1
  193. package/dist/{secrets-store-BoZQaFey.mjs → secrets-store-BIuBYUJT.mjs} +2 -2
  194. package/dist/{security-insights-DblK_6sg.mjs → security-insights-DfUus0bs.mjs} +3 -3
  195. package/dist/{security-txt-Dl7RPnRb.mjs → security-txt-CgZOsAIZ.mjs} +1 -1
  196. package/dist/{session-BWe9et4K.mjs → session-BcM8Vyyx.mjs} +1 -1
  197. package/dist/shared-CpS23WwR.mjs +2 -0
  198. package/dist/{smart-shield-DX0-8ruu.mjs → smart-shield-ClgB7r-9.mjs} +5 -5
  199. package/dist/{snippets-BFN-Lg3K.mjs → snippets-DLO3iFAg.mjs} +1 -1
  200. package/dist/spawn-D07wH-MH.mjs +10 -0
  201. package/dist/{spectrum-HYWLWB0X.mjs → spectrum-B6qkjR_Z.mjs} +5 -5
  202. package/dist/{speed-Dj0YhfRe.mjs → speed-DX5X2EIR.mjs} +1 -1
  203. package/dist/sql-CF044HDW.mjs +4 -0
  204. package/dist/src-BMATTZU_.mjs +125 -0
  205. package/dist/{ssl-BQL1fNtD.mjs → ssl-CM-rChEC.mjs} +5 -5
  206. package/dist/{startup-profile-0X5ebbng.mjs → startup-profile-CrtCP-6-.mjs} +1 -1
  207. package/dist/startup-profile-D662WI9s.mjs +2 -0
  208. package/dist/state-D7uNYnoi.mjs +2 -0
  209. package/dist/{state-Dy6-rKNd.mjs → state-DIiIGEtR.mjs} +1 -1
  210. package/dist/{stream-DKv2TtZN.mjs → stream-5EmUOQvy.mjs} +5 -5
  211. package/dist/{submit-Byt2KBGI.mjs → submit-lEAaRSMR.mjs} +1 -1
  212. package/dist/{tags-BIBsdG68.mjs → tags-CX23P4jg.mjs} +1 -1
  213. package/dist/telemetry-0Y5hAtCX.mjs +2 -0
  214. package/dist/{telemetry-bu3txnIR.mjs → telemetry-ZlCi5Xhc.mjs} +1 -1
  215. package/dist/{tenant-Bs4Ac4n3.mjs → tenant-DnI7QziH.mjs} +1 -1
  216. package/dist/{tenant-custom-nameservers-DcaELeCE.mjs → tenant-custom-nameservers-MR0dlcGm.mjs} +1 -1
  217. package/dist/{tools-BbTX7rlM.mjs → tools-CSc5DmFi.mjs} +1 -1
  218. package/dist/{tunnels-DWcrz9Sf.mjs → tunnels-NzYpsfi_.mjs} +15 -15
  219. package/dist/{turnstile-2MIGp2ce.mjs → turnstile-M7sKCEz3.mjs} +11 -11
  220. package/dist/{update-check-CfB0PNTY.mjs → update-check-HFkPml6x.mjs} +1 -1
  221. package/dist/update-check-aTutXNRd.mjs +2 -0
  222. package/dist/update-check-worker.mjs +1 -1
  223. package/dist/{url-info-B8udoxlx.mjs → url-info-Dos9VOXV.mjs} +1 -1
  224. package/dist/{url-normalization-C6AdWtaE.mjs → url-normalization-CZbFOq_v.mjs} +2 -2
  225. package/dist/{url-scanner-Dg0c_yVb.mjs → url-scanner-B7quLPGW.mjs} +2 -2
  226. package/dist/{user-BLZ-0Bgv.mjs → user-rXca0J9M.mjs} +14 -14
  227. package/dist/values-D-rrZrDa.mjs +4 -0
  228. package/dist/{vectorize-DEUSEQXY.mjs → vectorize-D2tf_oA8.mjs} +4 -4
  229. package/dist/version-BGnqDvNR.mjs +2 -0
  230. package/dist/waiting-rooms-DrA3-0bw.mjs +53 -0
  231. package/dist/{web-assets-CLZdWOmN.mjs → web-assets-DQAfvPT9.mjs} +3 -3
  232. package/dist/{web3-DjeavuLg.mjs → web3-MI0GQDnu.mjs} +5 -5
  233. package/dist/workers-By6Pf8fv.mjs +40 -0
  234. package/dist/{workers-builds-COn5Ne5G.mjs → workers-builds-6YsWsCmC.mjs} +2 -2
  235. package/dist/{workers-for-platforms-tchCXwNF.mjs → workers-for-platforms-DL8fC1qR.mjs} +4 -6
  236. package/dist/workers-vpc-BYx6sbgd.mjs +13 -0
  237. package/dist/workflows-ByQLnV0E.mjs +52 -0
  238. package/dist/{wrangler-migration-BpJqCFAa.mjs → wrangler-migration-C6FKHER1.mjs} +1 -1
  239. package/dist/{zaraz-BvQZB0YY.mjs → zaraz-CgbpmA85.mjs} +1 -1
  240. package/dist/{zero-trust-FStq4uhn.mjs → zero-trust-CpjTkkWt.mjs} +418 -402
  241. package/dist/{zone-tymlghWb.mjs → zone-DnKIe6po.mjs} +1 -1
  242. package/dist/{zones-Bz6dgT9_.mjs → zones--5ZzsDmQ.mjs} +15 -15
  243. package/package.json +25 -26
  244. package/dist/abuse-reports-Cy9RcWPu.mjs +0 -24
  245. package/dist/access-DwJm1qet.mjs +0 -2
  246. package/dist/account-tags-d0RkEw6s.mjs +0 -15
  247. package/dist/ai-gateway-CJaUlfGc.mjs +0 -82
  248. package/dist/ai-search-PTlpY1T9.mjs +0 -79
  249. package/dist/analytics-NPND7aHB.mjs +0 -20
  250. package/dist/argo-DYfLQhd2.mjs +0 -10
  251. package/dist/auth-CBtzZ3Sw.mjs +0 -2
  252. package/dist/bot-management-UrCM3P8K.mjs +0 -9
  253. package/dist/browser-run-DVaiBLYX.mjs +0 -46
  254. package/dist/build-C4giET85.mjs +0 -2
  255. package/dist/cf-B9aqZZKD.mjs +0 -18
  256. package/dist/chunk-KKDV4JPS-D3kwd1Nq.mjs +0 -2
  257. package/dist/cloudflared-B48cfu95.mjs +0 -2
  258. package/dist/command-CzvlHvov.mjs +0 -2
  259. package/dist/containers-DRzgE46U.mjs +0 -375
  260. package/dist/containers-DuIsM7lM.mjs +0 -78
  261. package/dist/cps-B7_BJaAU.mjs +0 -6
  262. package/dist/d1-MvAQMvvo.mjs +0 -89
  263. package/dist/deploy-BS47vZvJ.mjs +0 -2
  264. package/dist/deploy-context-Cfushp8j.mjs +0 -56
  265. package/dist/deploy-input-BAhS5LYx.mjs +0 -2
  266. package/dist/diagnostics-ChDfJ-Gv.mjs +0 -15
  267. package/dist/dialog-CL1Zy4pn.mjs +0 -2
  268. package/dist/dist-8rP3V95o.mjs +0 -57
  269. package/dist/dist-CYFkGHYv.mjs +0 -487
  270. package/dist/dry-run-DmsbOMF1.mjs +0 -2
  271. package/dist/error-sanitization-C_a2LxOK.mjs +0 -2
  272. package/dist/hyperdrive-DAA8Fazg.mjs +0 -37
  273. package/dist/init-j47MT4Qe.mjs +0 -39
  274. package/dist/interactive-Dqv0RWVU.mjs +0 -42
  275. package/dist/interactive-Wpd3FcDc.mjs +0 -2
  276. package/dist/k2-CmHkArHL.mjs +0 -13
  277. package/dist/load-balancers-C5YMvhXD.mjs +0 -76
  278. package/dist/local-D5L5Bwju.mjs +0 -2
  279. package/dist/mcp-QDd1Iyc0.mjs +0 -32
  280. package/dist/mesh-DtrIzl5z.mjs +0 -26
  281. package/dist/observability-CvN9oxAo.mjs +0 -80
  282. package/dist/organization-DIwqRBBV.mjs +0 -75
  283. package/dist/origin-post-quantum-encryption-BOKWKDTY.mjs +0 -6
  284. package/dist/pages-2Xg-lrMf.mjs +0 -54
  285. package/dist/pay-per-crawl-5-KTQXRr.mjs +0 -65
  286. package/dist/pay-per-use-sGebKzNK.mjs +0 -6
  287. package/dist/pipelines-BM-T7mMK.mjs +0 -44
  288. package/dist/previews-DDQ9ACDJ.mjs +0 -4
  289. package/dist/prompt-F5wxc8zq.mjs +0 -3
  290. package/dist/raw-fetch-DyYWa923.mjs +0 -2
  291. package/dist/resolve-qwL1LmKN.mjs +0 -2
  292. package/dist/rulesets-BMGxrnv9.mjs +0 -37
  293. package/dist/run-nNxXb_Cv.mjs +0 -2
  294. package/dist/shared-0N31BXkY.mjs +0 -2
  295. package/dist/spawn-DZ9A-xXb.mjs +0 -10
  296. package/dist/src-CAiZlihY.mjs +0 -117
  297. package/dist/startup-profile-CXnsF4c7.mjs +0 -2
  298. package/dist/state-BA2CanJ_.mjs +0 -2
  299. package/dist/telemetry-DBXOMuLh.mjs +0 -2
  300. package/dist/update-check-B-CvDAUz.mjs +0 -2
  301. package/dist/values-BUK-m0Jg.mjs +0 -4
  302. package/dist/version-BZNc7Y3t.mjs +0 -2
  303. package/dist/waiting-rooms-BycGk2Y0.mjs +0 -53
  304. package/dist/workers-C_SfyU-v.mjs +0 -38
  305. package/dist/workers-vpc-CKts8Av0.mjs +0 -13
  306. package/dist/workflows-BibtWuOx.mjs +0 -43
@@ -1,17 +1,17 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-C0lQ9sTg.mjs";import{n as t}from"./auth-AobvBmz4.mjs";import{a as n,i as r,t as i}from"./context-Bwkz4Lm_.mjs";import{t as a}from"./output-BGqhvqe2.mjs";import{t as o}from"./dry-run-DmsbOMF1.mjs";import{t as s}from"./progress-BYVZuEcG.mjs";import{t as c}from"./run-CrZgB8L_.mjs";import"./telemetry-DBXOMuLh.mjs";import{n as l,r as u,t as d}from"./body-parser-DkHKPkJ7.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{n as p}from"./prompt-F5wxc8zq.mjs";import{t as m}from"./cli-types-9oYmRTHJ.mjs";function h(e){return e.usage(`$0 firewall access-rules create
2
+ import{t as e}from"./local-BcPM4I0s.mjs";import{n as t}from"./auth-CAWalgW0.mjs";import{a as n,i as r,t as i}from"./context-BBLtgdR1.mjs";import{t as a}from"./output-BOe-3AQG.mjs";import{t as o}from"./dry-run-DRj2_uV3.mjs";import{t as s}from"./progress-CQqDtgmF.mjs";import{t as c}from"./run-CW2Cgi0S.mjs";import"./telemetry-0Y5hAtCX.mjs";import{n as l,r as u,t as d}from"./body-parser-DkHKPkJ7.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{n as p}from"./prompt-C8FyienX.mjs";import{t as m}from"./cli-types-9oYmRTHJ.mjs";function h(e){return e.usage(`$0 firewall access-rules create
3
3
 
4
- Creates a new IP Access rule for an account or zone. The rule will apply to all zones in the account or zone. Note: To create an IP Access rule that applies to a single zone, refer to the [IP Access rules for a zone](#ip-access-rules-for-a-zone) endpoints.`).option(`configuration-target`,{type:`string`,description:"The configuration target. You must set the target to `ip` when specifying an IP address in the rule.",choices:[`ip`,`ip6`,`ip_range`,`asn`,`country`]}).option(`configuration-value`,{type:`string`,description:`The IP address to match. This address will be compared to the IP address of incoming requests.`}).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:`create`,describe:`Create an IP Access rule`,builder:h,handler:async u=>c({command:`firewall access-rules create`,classification:{safeFlags:[`configuration-target`,`dry-run`]}},u,async()=>{if(u.dryRun){let e=u.zone===void 0?await n():void 0,t=u.zone===void 0?`accounts`:`zones`,r=u.zone??e??`<account-id>`;o({command:`cf firewall access-rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/firewall/access_rules/rules`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r)},bodyKind:`json`,body:u.body===void 0?d({configuration:{target:f(u[`configuration-target`],`configuration-target`,`text`),value:f(u[`configuration-value`],`configuration-value`,`text`)}}):l(u.body)});return}let c=await t(u),p=u.zone===void 0?`accounts`:`zones`,m=p===`zones`?await r({zone:u.zone},c,{quiet:u.quiet}):u.local?e:await i();if(p===`zones`?u.zoneId=m:u.accountId=m,u.body){let e=l(u.body),t=await s(`Creating`,async()=>c.firewall.accessRules.create({...e,account_or_zone:p,account_or_zone_id:m}));a(t,{successLabel:`Created`});return}let h=d({configuration:{target:f(u[`configuration-target`],`configuration-target`,`text`),value:f(u[`configuration-value`],`configuration-value`,`text`)}}),g=await s(`Creating`,async()=>c.firewall.accessRules.create({...h,account_or_zone:p,account_or_zone_id:m}));a(g,{successLabel:`Created`})})};function _(e){return e.usage(`$0 firewall access-rules delete <rule-id>
4
+ Creates a new IP Access rule for an account or zone. The rule will apply to all zones in the account or zone. Note: To create an IP Access rule that applies to a single zone, refer to the [IP Access rules for a zone](#ip-access-rules-for-a-zone) endpoints.`).option(`configuration-target`,{type:`string`,description:"The configuration target. You must set the target to `ip` when specifying an IP address in the rule.",choices:[`ip`,`ip6`,`ip_range`,`asn`,`country`]}).coerce(`configuration-target`,e=>f(e,`configuration-target`,`text`)).option(`configuration-value`,{type:`string`,description:`The IP address to match. This address will be compared to the IP address of incoming requests.`}).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:`create`,describe:`Create an IP Access rule`,builder:h,handler:async u=>c({command:`firewall access-rules create`,classification:{safeFlags:[`configuration-target`,`dry-run`]}},u,async()=>{if(u.dryRun){let e=u.zone===void 0?await n():void 0,t=u.zone===void 0?`accounts`:`zones`,r=u.zone??e??`<account-id>`;o({command:`cf firewall access-rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/firewall/access_rules/rules`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r)},bodyKind:`json`,body:u.body===void 0?d({configuration:{target:u[`configuration-target`],value:f(u[`configuration-value`],`configuration-value`,`text`)}}):l(u.body)});return}let c=await t(u),p=u.zone===void 0?`accounts`:`zones`,m=p===`zones`?await r({zone:u.zone},c,{quiet:u.quiet}):u.local?e:await i();if(p===`zones`?u.zoneId=m:u.accountId=m,u.body){let e=l(u.body),t=await s(`Creating`,async()=>c.firewall.accessRules.create({...e,account_or_zone:p,account_or_zone_id:m}));a(t,{successLabel:`Created`});return}let h=d({configuration:{target:u[`configuration-target`],value:f(u[`configuration-value`],`configuration-value`,`text`)}}),g=await s(`Creating`,async()=>c.firewall.accessRules.create({...h,account_or_zone:p,account_or_zone_id:m}));a(g,{successLabel:`Created`})})};function _(e){return e.usage(`$0 firewall access-rules delete <rule-id>
5
5
 
6
6
  Deletes an existing IP Access rule defined. Note: This operation will affect all zones in the account or zone.`).positional(`rule-id`,{type:`string`,description:`Unique identifier for a rule.`,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 v={command:`delete <rule-id>`,describe:`Delete an IP Access rule`,builder:_,handler:async l=>c({command:`firewall access-rules delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},l,async()=>{if(l.dryRun){let e=l.zone===void 0?await n():void 0,t=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf firewall access-rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/firewall/access_rules/rules/${l[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(l[`rule-id`]))}`,pathParams:{"account-or-zone":String(t),"rule-id":String(l[`rule-id`]??``),"account-or-zone-id":String(r)},bodyKind:`none`});return}let c=await t(l),u=l.zone===void 0?`accounts`:`zones`,d=u===`zones`?await r({zone:l.zone},c,{quiet:l.quiet}):l.local?e:await i();if(u===`zones`?l.zoneId=d:l.accountId=d,!await p({force:!!l.force,message:`This operation deletes the account-level IP Access Rule and affects every zone in the account.`})){process.stderr.write(`Aborted.
7
7
  `);return}let f=await s(`Deleting`,async()=>c.firewall.accessRules.delete({account_or_zone:u,account_or_zone_id:d,rule_id:l[`rule-id`]}));a(f,{successLabel:`Deleted`})})};function y(e){return e.usage(`$0 firewall access-rules edit <rule-id>
8
8
 
9
- Updates an IP Access rule defined. Note: This operation will affect all zones in the account or zone.`).positional(`rule-id`,{type:`string`,description:`Unique identifier for a rule.`,demandOption:!0}).option(`configuration-target`,{type:`string`,description:"The configuration target. You must set the target to `ip` when specifying an IP address in the rule.",choices:[`ip`,`ip6`,`ip_range`,`asn`,`country`]}).option(`configuration-value`,{type:`string`,description:`The IP address to match. This address will be compared to the IP address of incoming requests.`}).option(`notes`,{type:`string`,description:`An informative summary of the rule, typically used as a reminder or explanation.`}).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:`edit <rule-id>`,describe:`Update an IP Access rule`,builder:y,handler:async u=>c({command:`firewall access-rules edit`,classification:{safeFlags:[`configuration-target`,`dry-run`]}},u,async()=>{if(u.dryRun){let e=u.zone===void 0?await n():void 0,t=u.zone===void 0?`accounts`:`zones`,r=u.zone??e??`<account-id>`;o({command:`cf firewall access-rules edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/firewall/access_rules/rules/${u[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(u[`rule-id`]))}`,pathParams:{"account-or-zone":String(t),"rule-id":String(u[`rule-id`]??``),"account-or-zone-id":String(r)},bodyKind:`json`,body:u.body===void 0?d({configuration:{target:f(u[`configuration-target`],`configuration-target`,`text`),value:f(u[`configuration-value`],`configuration-value`,`text`)},notes:f(u.notes,`notes`,`text`)}):l(u.body)});return}let c=await t(u),p=u.zone===void 0?`accounts`:`zones`,m=p===`zones`?await r({zone:u.zone},c,{quiet:u.quiet}):u.local?e:await i();if(p===`zones`?u.zoneId=m:u.accountId=m,u.body){let e=l(u.body),t=await s(`Updating`,async()=>c.firewall.accessRules.edit({body:e,account_or_zone:p,account_or_zone_id:m,rule_id:u[`rule-id`]}));a(t,{successLabel:`Updated`});return}let h=d({configuration:{target:f(u[`configuration-target`],`configuration-target`,`text`),value:f(u[`configuration-value`],`configuration-value`,`text`)},notes:f(u.notes,`notes`,`text`)}),g=await s(`Updating`,async()=>c.firewall.accessRules.edit({body:h,account_or_zone:p,account_or_zone_id:m,rule_id:u[`rule-id`]}));a(g,{successLabel:`Updated`})})};function x(e){return e.usage(`$0 firewall access-rules get <rule-id>
9
+ Updates an IP Access rule defined. Note: This operation will affect all zones in the account or zone.`).positional(`rule-id`,{type:`string`,description:`Unique identifier for a rule.`,demandOption:!0}).option(`configuration-target`,{type:`string`,description:"The configuration target. You must set the target to `ip` when specifying an IP address in the rule.",choices:[`ip`,`ip6`,`ip_range`,`asn`,`country`]}).coerce(`configuration-target`,e=>f(e,`configuration-target`,`text`)).option(`configuration-value`,{type:`string`,description:`The IP address to match. This address will be compared to the IP address of incoming requests.`}).option(`notes`,{type:`string`,description:`An informative summary of the rule, typically used as a reminder or explanation.`}).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:`edit <rule-id>`,describe:`Update an IP Access rule`,builder:y,handler:async u=>c({command:`firewall access-rules edit`,classification:{safeFlags:[`configuration-target`,`dry-run`]}},u,async()=>{if(u.dryRun){let e=u.zone===void 0?await n():void 0,t=u.zone===void 0?`accounts`:`zones`,r=u.zone??e??`<account-id>`;o({command:`cf firewall access-rules edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/firewall/access_rules/rules/${u[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(u[`rule-id`]))}`,pathParams:{"account-or-zone":String(t),"rule-id":String(u[`rule-id`]??``),"account-or-zone-id":String(r)},bodyKind:`json`,body:u.body===void 0?d({configuration:{target:u[`configuration-target`],value:f(u[`configuration-value`],`configuration-value`,`text`)},notes:f(u.notes,`notes`,`text`)}):l(u.body)});return}let c=await t(u),p=u.zone===void 0?`accounts`:`zones`,m=p===`zones`?await r({zone:u.zone},c,{quiet:u.quiet}):u.local?e:await i();if(p===`zones`?u.zoneId=m:u.accountId=m,u.body){let e=l(u.body),t=await s(`Updating`,async()=>c.firewall.accessRules.edit({body:e,account_or_zone:p,account_or_zone_id:m,rule_id:u[`rule-id`]}));a(t,{successLabel:`Updated`});return}let h=d({configuration:{target:u[`configuration-target`],value:f(u[`configuration-value`],`configuration-value`,`text`)},notes:f(u.notes,`notes`,`text`)}),g=await s(`Updating`,async()=>c.firewall.accessRules.edit({body:h,account_or_zone:p,account_or_zone_id:m,rule_id:u[`rule-id`]}));a(g,{successLabel:`Updated`})})};function x(e){return e.usage(`$0 firewall access-rules get <rule-id>
10
10
 
11
11
  Fetches the details of an IP Access rule defined.`).positional(`rule-id`,{type:`string`,description:`Unique identifier for a rule.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const S={command:`get <rule-id>`,describe:`Get an IP Access rule`,builder:x,handler:async l=>c({command:`firewall access-rules get`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=l.zone===void 0?await n():void 0,t=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf firewall access-rules get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/firewall/access_rules/rules/${l[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(l[`rule-id`]))}`,pathParams:{"account-or-zone":String(t),"rule-id":String(l[`rule-id`]??``),"account-or-zone-id":String(r)},bodyKind:`none`});return}let c=await t(l),u=l.zone===void 0?`accounts`:`zones`,d=u===`zones`?await r({zone:l.zone},c,{quiet:l.quiet}):l.local?e:await i();u===`zones`?l.zoneId=d:l.accountId=d;let f=await s(`Loading`,async()=>c.firewall.accessRules.get({account_or_zone:u,account_or_zone_id:d,rule_id:l[`rule-id`]}));a(f,{successLabel:`Loaded`})})};function C(e){return e.usage(`$0 firewall access-rules list
12
12
 
13
- Fetches IP Access rules of an account or zone. These rules apply to all the zones in the account or zone. You can filter the results using several optional parameters.`).option(`configuration-target`,{type:`string`,description:`Defines the target to search in existing rules.`,choices:[`ip`,`ip_range`,`asn`,`country`]}).option(`configuration-value`,{type:`string`,description:"Defines the target value to search for in existing rules: an IP address, an IP address range, or a country code, depending on the provided `configuration.target`.\nNotes: You can search for a single IPv4 address, an IP address range with a subnet of '/16' or '/24', or a two-letter ISO-3166-1 alpha-2 country code."}).option(`notes`,{type:`string`,description:`Defines the string to search for in the notes of existing IP Access rules.
14
- Notes: For example, the string 'attack' would match IP Access rules with notes 'Attack 26/02' and 'Attack 27/02'. The search is case insensitive.`}).option(`match`,{type:`string`,description:"Defines the search requirements. When set to `all`, all the search requirements must match. When set to `any`, only one of the search requirements has to match.",choices:[`any`,`all`]}).option(`page`,{type:`number`,description:`Defines the requested page within paginated list of results.`}).option(`per-page`,{type:`number`,description:`Defines the maximum number of results requested.`}).option(`order`,{type:`string`,description:`Defines the field used to sort returned rules.`,choices:[`configuration.target`,`configuration.value`,`mode`]}).option(`direction`,{type:`string`,description:`Defines the direction used to sort returned rules.`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const w={command:`list`,describe:`List IP Access rules`,builder:m(C),handler:async l=>c({command:`firewall access-rules list`,classification:{safeFlags:[`configuration-target`,`match`,`order`,`direction`,`dry-run`]}},l,async()=>{let c={"configuration.target":l[`configuration-target`],"configuration.value":l[`configuration-value`],notes:l.notes,match:l.match,page:l.page,per_page:l[`per-page`],order:l.order,direction:l.direction};if(l.dryRun){let e=l.zone===void 0?await n():void 0,t=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf firewall access-rules list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/firewall/access_rules/rules`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r)},query:c,bodyKind:`none`});return}let u=await t(l),d=l.zone===void 0?`accounts`:`zones`,f=d===`zones`?await r({zone:l.zone},u,{quiet:l.quiet}):l.local?e:await i();d===`zones`?l.zoneId=f:l.accountId=f;let p=await s(`Loading`,async()=>u.firewall.accessRules.list({account_or_zone:d,account_or_zone_id:f,...c}));a(p,{successLabel:`Loaded`})})},T={command:`access-rules`,describe:`IP-based access rules that allow, block, challenge, or whitelist traffic globally or per-zone`,builder:e=>e.command(g).command(v).command(b).command(S).command(w).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function E(e){return e.usage(`$0 firewall lockdowns create
13
+ Fetches IP Access rules of an account or zone. These rules apply to all the zones in the account or zone. You can filter the results using several optional parameters.`).option(`action`,{type:`string`,description:`The action to apply to a matched request.`,choices:[`block`,`challenge`,`whitelist`,`js_challenge`,`managed_challenge`]}).option(`configuration-target`,{type:`string`,description:`Defines the target to search in existing rules.`,choices:[`ip`,`ip_range`,`asn`,`country`]}).option(`configuration-value`,{type:`string`,description:"Defines the target value to search for in existing rules: an IP address, an IP address range, or a country code, depending on the provided `configuration.target`.\nNotes: You can search for a single IPv4 address, an IP address range with a subnet of '/16' or '/24', or a two-letter ISO-3166-1 alpha-2 country code."}).option(`notes`,{type:`string`,description:`Defines the string to search for in the notes of existing IP Access rules.
14
+ Notes: For example, the string 'attack' would match IP Access rules with notes 'Attack 26/02' and 'Attack 27/02'. The search is case insensitive.`}).option(`match`,{type:`string`,description:"Defines the search requirements. When set to `all`, all the search requirements must match. When set to `any`, only one of the search requirements has to match.",choices:[`any`,`all`]}).option(`page`,{type:`number`,description:`Defines the requested page within paginated list of results.`}).option(`per-page`,{type:`number`,description:`Defines the maximum number of results requested.`}).option(`order`,{type:`string`,description:`Defines the field used to sort returned rules.`,choices:[`configuration.target`,`configuration.value`,`mode`]}).option(`direction`,{type:`string`,description:`Defines the direction used to sort returned rules.`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const w={command:`list`,describe:`List IP Access rules`,builder:m(C),handler:async l=>c({command:`firewall access-rules list`,classification:{safeFlags:[`action`,`configuration-target`,`match`,`order`,`direction`,`dry-run`]}},l,async()=>{let c={mode:l.action,"configuration.target":l[`configuration-target`],"configuration.value":l[`configuration-value`],notes:l.notes,match:l.match,page:l.page,per_page:l[`per-page`],order:l.order,direction:l.direction};if(l.dryRun){let e=l.zone===void 0?await n():void 0,t=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf firewall access-rules list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/firewall/access_rules/rules`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r)},query:c,bodyKind:`none`});return}let u=await t(l),d=l.zone===void 0?`accounts`:`zones`,f=d===`zones`?await r({zone:l.zone},u,{quiet:l.quiet}):l.local?e:await i();d===`zones`?l.zoneId=f:l.accountId=f;let p=await s(`Loading`,async()=>u.firewall.accessRules.list({account_or_zone:d,account_or_zone_id:f,...c}));a(p,{successLabel:`Loaded`})})},T={command:`access-rules`,describe:`IP-based access rules that allow, block, challenge, or whitelist traffic globally or per-zone`,builder:e=>e.command(g).command(v).command(b).command(S).command(w).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function E(e){return e.usage(`$0 firewall lockdowns create
15
15
 
16
16
  Creates a new Zone Lockdown rule.`).option(`configurations`,{type:`string`,description:"A list of IP addresses or CIDR ranges that will be allowed to access the URLs specified in the Zone Lockdown rule. You can include any number of `ip` or `ip_range` configurations. Provide as a JSON array of objects or @path/to/file.json."}).option(`description`,{type:`string`,description:`An informative summary of the rule. This value is sanitized and any tags will be removed.`}).option(`paused`,{type:`boolean`,description:`When true, indicates that the rule is currently paused.`}).option(`priority`,{type:`number`,description:`The priority of the rule to control the processing order. A lower number indicates higher priority. If not provided, any rules with a configured priority will be processed before rules without a priority.`}).option(`urls`,{type:`string`,array:!0,description:`The URLs to include in the current WAF override. You can use wildcards. Each entered URL will be escaped before use, which means you can only use simple wildcard patterns.`}).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 D={command:`create`,describe:`Create a Zone Lockdown rule`,builder:E,handler:async e=>c({command:`firewall lockdowns create`,classification:{safeFlags:[`paused`,`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf firewall lockdowns create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/firewall/lockdowns`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({configurations:u(e.configurations,`configurations`),description:f(e.description,`description`,`text`),paused:e.paused,priority:e.priority,urls:e.urls}):l(e.body)});return}let n=await t(e),i=await r({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=i,e.body){let t=l(e.body),r=await s(`Creating`,async()=>n.firewall.lockdowns.create({...t,zone_id:i}));a(r,{successLabel:`Created`});return}if(e.configurations===void 0)throw Error(`--configurations is required (or pass --body with this field set).`);if(e.urls===void 0)throw Error(`--urls is required (or pass --body with this field set).`);let c=d({configurations:u(e.configurations,`configurations`),description:f(e.description,`description`,`text`),paused:e.paused,priority:e.priority,urls:e.urls}),p=await s(`Creating`,async()=>n.firewall.lockdowns.create({...c,zone_id:i}));a(p,{successLabel:`Created`})})};function O(e){return e.usage(`$0 firewall lockdowns delete <lock-downs-id>
17
17
 
@@ -24,7 +24,7 @@ Fetches Zone Lockdown rules. You can filter the results using several optional p
24
24
 
25
25
  Updates an existing Zone Lockdown rule.`).positional(`lock-downs-id`,{type:`string`,description:`The unique identifier of the Zone Lockdown rule.`,demandOption:!0}).option(`configurations`,{type:`string`,description:"A list of IP addresses or CIDR ranges that will be allowed to access the URLs specified in the Zone Lockdown rule. You can include any number of `ip` or `ip_range` configurations. Provide as a JSON array of objects or @path/to/file.json."}).option(`urls`,{type:`string`,array:!0,description:`The URLs to include in the current WAF override. You can use wildcards. Each entered URL will be escaped before use, which means you can only use simple wildcard patterns.`}).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:`update <lock-downs-id>`,describe:`Update a Zone Lockdown rule`,builder:P,handler:async e=>c({command:`firewall lockdowns update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf firewall lockdowns update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/firewall/lockdowns/${e[`lock-downs-id`]==null?`<lock-downs-id>`:encodeURIComponent(String(e[`lock-downs-id`]))}`,pathParams:{"lock-downs-id":String(e[`lock-downs-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({configurations:u(e.configurations,`configurations`),urls:e.urls}):l(e.body)});return}let n=await t(e),i=await r({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=i,e.body){let t=l(e.body),r=await s(`Updating`,async()=>n.firewall.lockdowns.update({...t,zone_id:i,lock_downs_id:e[`lock-downs-id`]}));a(r,{successLabel:`Updated`});return}if(e.configurations===void 0)throw Error(`--configurations is required (or pass --body with this field set).`);if(e.urls===void 0)throw Error(`--urls is required (or pass --body with this field set).`);let c=d({configurations:u(e.configurations,`configurations`),urls:e.urls}),f=await s(`Updating`,async()=>n.firewall.lockdowns.update({...c,zone_id:i,lock_downs_id:e[`lock-downs-id`]}));a(f,{successLabel:`Updated`})})},I={command:`lockdowns`,describe:`Zone lockdown rules that restrict access to URLs by IP address or range`,builder:e=>e.command(D).command(k).command(j).command(N).command(F).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function L(e){return e.usage(`$0 firewall ua-rules create
26
26
 
27
- Creates a new User Agent Blocking rule in a zone.`).option(`configuration-target`,{type:`string`,description:"The configuration target. You must set the target to `ua` when specifying a user agent in the rule.",choices:[`ua`]}).option(`configuration-value`,{type:`string`,description:`the user agent to exactly match`}).option(`description`,{type:`string`,description:`An informative summary of the rule. This value is sanitized and any tags will be removed.`}).option(`paused`,{type:`boolean`,description:`When true, indicates that the rule is currently paused.`}).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 R={command:`create`,describe:`Create a User Agent Blocking rule`,builder:L,handler:async e=>c({command:`firewall ua-rules create`,classification:{safeFlags:[`configuration-target`,`paused`,`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf firewall ua-rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/firewall/ua_rules`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({configuration:{target:f(e[`configuration-target`],`configuration-target`,`text`),value:f(e[`configuration-value`],`configuration-value`,`text`)},description:f(e.description,`description`,`text`),paused:e.paused}):l(e.body)});return}let n=await t(e),i=await r({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=i,e.body){let t=l(e.body),r=await s(`Creating`,async()=>n.firewall.uaRules.create({...t,zone_id:i}));a(r,{successLabel:`Created`});return}let c=d({configuration:{target:f(e[`configuration-target`],`configuration-target`,`text`),value:f(e[`configuration-value`],`configuration-value`,`text`)},description:f(e.description,`description`,`text`),paused:e.paused}),u=await s(`Creating`,async()=>n.firewall.uaRules.create({...c,zone_id:i}));a(u,{successLabel:`Created`})})};function z(e){return e.usage(`$0 firewall ua-rules delete <ua-rule-id>
27
+ Creates a new User Agent Blocking rule in a zone.`).option(`configuration-target`,{type:`string`,description:"The configuration target. You must set the target to `ua` when specifying a user agent in the rule.",choices:[`ua`]}).coerce(`configuration-target`,e=>f(e,`configuration-target`,`text`)).option(`configuration-value`,{type:`string`,description:`the user agent to exactly match`}).option(`description`,{type:`string`,description:`An informative summary of the rule. This value is sanitized and any tags will be removed.`}).option(`paused`,{type:`boolean`,description:`When true, indicates that the rule is currently paused.`}).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 R={command:`create`,describe:`Create a User Agent Blocking rule`,builder:L,handler:async e=>c({command:`firewall ua-rules create`,classification:{safeFlags:[`configuration-target`,`paused`,`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf firewall ua-rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/firewall/ua_rules`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({configuration:{target:e[`configuration-target`],value:f(e[`configuration-value`],`configuration-value`,`text`)},description:f(e.description,`description`,`text`),paused:e.paused}):l(e.body)});return}let n=await t(e),i=await r({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=i,e.body){let t=l(e.body),r=await s(`Creating`,async()=>n.firewall.uaRules.create({...t,zone_id:i}));a(r,{successLabel:`Created`});return}let c=d({configuration:{target:e[`configuration-target`],value:f(e[`configuration-value`],`configuration-value`,`text`)},description:f(e.description,`description`,`text`),paused:e.paused}),u=await s(`Creating`,async()=>n.firewall.uaRules.create({...c,zone_id:i}));a(u,{successLabel:`Created`})})};function z(e){return e.usage(`$0 firewall ua-rules delete <ua-rule-id>
28
28
 
29
29
  Deletes an existing User Agent Blocking rule.`).positional(`ua-rule-id`,{type:`string`,description:`The unique identifier of the User Agent Blocking rule.`,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 B={command:`delete <ua-rule-id>`,describe:`Delete a User Agent Blocking rule`,builder:z,handler:async e=>c({command:`firewall ua-rules delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){o({command:`cf firewall ua-rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/firewall/ua_rules/${e[`ua-rule-id`]==null?`<ua-rule-id>`:encodeURIComponent(String(e[`ua-rule-id`]))}`,pathParams:{"ua-rule-id":String(e[`ua-rule-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let n=await t(e),i=await r({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=i,!await p({force:!!e.force,message:`This operation deletes the User Agent Blocking rule from the zone.`})){process.stderr.write(`Aborted.
30
30
  `);return}let c=await s(`Deleting`,async()=>n.firewall.uaRules.delete({zone_id:i,ua_rule_id:e[`ua-rule-id`]}));a(c,{successLabel:`Deleted`})})};function V(e){return e.usage(`$0 firewall ua-rules get <ua-rule-id>
@@ -33,4 +33,4 @@ Fetches the details of a User Agent Blocking rule.`).positional(`ua-rule-id`,{ty
33
33
 
34
34
  Fetches User Agent Blocking rules in a zone. You can filter the results using several optional parameters.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`description`,{type:`string`,description:`A string to search for in the description of existing rules.`}).option(`per-page`,{type:`number`,description:"The maximum number of results per page. You can only set the value to `1` or to a multiple of 5 such as `5`, `10`, `15`, or `20`."}).option(`user-agent`,{type:`string`,description:`A string to search for in the user agent values of existing rules.`}).option(`paused`,{type:`boolean`,description:`When true, indicates that the rule is currently paused.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const W={command:`list`,describe:`List User Agent Blocking rules`,builder:U,handler:async e=>c({command:`firewall ua-rules list`,classification:{safeFlags:[`paused`,`dry-run`]}},e,async()=>{let n={page:e.page,description:e.description,per_page:e[`per-page`],user_agent:e[`user-agent`],paused:e.paused};if(e.dryRun){o({command:`cf firewall ua-rules list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/firewall/ua_rules`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:n,bodyKind:`none`});return}let i=await t(e),c=await r({zone:e.zone},i,{quiet:e.quiet});e.zoneId=c;let l=await s(`Loading`,async()=>i.firewall.uaRules.list({zone_id:c,...n}));a(l,{successLabel:`Loaded`})})};function G(e){return e.usage(`$0 firewall ua-rules update <ua-rule-id>
35
35
 
36
- Updates an existing User Agent Blocking rule.`).positional(`ua-rule-id`,{type:`string`,description:`The unique identifier of the User Agent Blocking rule.`,demandOption:!0}).option(`configuration-target`,{type:`string`,description:"The configuration target. You must set the target to `ip` when specifying an IP address in the rule.",choices:[`ip`,`ip6`,`ip_range`,`asn`,`country`]}).option(`configuration-value`,{type:`string`,description:`The IP address to match. This address will be compared to the IP address of incoming requests.`}).option(`description`,{type:`string`,description:`An informative summary of the rule. This value is sanitized and any tags will be removed.`}).option(`paused`,{type:`boolean`,description:`When true, indicates that the rule is currently paused.`}).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 <ua-rule-id>`,describe:`Update a User Agent Blocking rule`,builder:G,handler:async e=>c({command:`firewall ua-rules update`,classification:{safeFlags:[`configuration-target`,`paused`,`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf firewall ua-rules update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/firewall/ua_rules/${e[`ua-rule-id`]==null?`<ua-rule-id>`:encodeURIComponent(String(e[`ua-rule-id`]))}`,pathParams:{"ua-rule-id":String(e[`ua-rule-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({configuration:{target:f(e[`configuration-target`],`configuration-target`,`text`),value:f(e[`configuration-value`],`configuration-value`,`text`)},description:f(e.description,`description`,`text`),paused:e.paused}):l(e.body)});return}let n=await t(e),i=await r({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=i,e.body){let t=l(e.body),r=await s(`Updating`,async()=>n.firewall.uaRules.update({...t,zone_id:i,ua_rule_id:e[`ua-rule-id`]}));a(r,{successLabel:`Updated`});return}let c=d({configuration:{target:f(e[`configuration-target`],`configuration-target`,`text`),value:f(e[`configuration-value`],`configuration-value`,`text`)},description:f(e.description,`description`,`text`),paused:e.paused}),u=await s(`Updating`,async()=>n.firewall.uaRules.update({...c,zone_id:i,ua_rule_id:e[`ua-rule-id`]}));a(u,{successLabel:`Updated`})})},q={command:`ua-rules`,describe:`Block or challenge requests based on the User-Agent header string`,builder:e=>e.command(R).command(B).command(H).command(W).command(K).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},J={command:`firewall`,describe:`Legacy firewall rules, zone lockdowns, access rules, user-agent blocking, and WAF packages`,builder:e=>e.command(T).command(I).command(q).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{J as default};
36
+ Updates an existing User Agent Blocking rule.`).positional(`ua-rule-id`,{type:`string`,description:`The unique identifier of the User Agent Blocking rule.`,demandOption:!0}).option(`configuration-target`,{type:`string`,description:"The configuration target. You must set the target to `ip` when specifying an IP address in the rule.",choices:[`ip`,`ip6`,`ip_range`,`asn`,`country`]}).coerce(`configuration-target`,e=>f(e,`configuration-target`,`text`)).option(`configuration-value`,{type:`string`,description:`The IP address to match. This address will be compared to the IP address of incoming requests.`}).option(`description`,{type:`string`,description:`An informative summary of the rule. This value is sanitized and any tags will be removed.`}).option(`paused`,{type:`boolean`,description:`When true, indicates that the rule is currently paused.`}).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 <ua-rule-id>`,describe:`Update a User Agent Blocking rule`,builder:G,handler:async e=>c({command:`firewall ua-rules update`,classification:{safeFlags:[`configuration-target`,`paused`,`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf firewall ua-rules update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/firewall/ua_rules/${e[`ua-rule-id`]==null?`<ua-rule-id>`:encodeURIComponent(String(e[`ua-rule-id`]))}`,pathParams:{"ua-rule-id":String(e[`ua-rule-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({configuration:{target:e[`configuration-target`],value:f(e[`configuration-value`],`configuration-value`,`text`)},description:f(e.description,`description`,`text`),paused:e.paused}):l(e.body)});return}let n=await t(e),i=await r({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=i,e.body){let t=l(e.body),r=await s(`Updating`,async()=>n.firewall.uaRules.update({...t,zone_id:i,ua_rule_id:e[`ua-rule-id`]}));a(r,{successLabel:`Updated`});return}let c=d({configuration:{target:e[`configuration-target`],value:f(e[`configuration-value`],`configuration-value`,`text`)},description:f(e.description,`description`,`text`),paused:e.paused}),u=await s(`Updating`,async()=>n.firewall.uaRules.update({...c,zone_id:i,ua_rule_id:e[`ua-rule-id`]}));a(u,{successLabel:`Updated`})})},q={command:`ua-rules`,describe:`Block or challenge requests based on the User-Agent header string`,builder:e=>e.command(R).command(B).command(H).command(W).command(K).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},J={command:`firewall`,describe:`Legacy firewall rules, zone lockdowns, access rules, user-agent blocking, and WAF packages`,builder:e=>e.command(T).command(I).command(q).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{J as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-C0lQ9sTg.mjs";import{i as t,n}from"./auth-AobvBmz4.mjs";import{a as r,t as i}from"./context-Bwkz4Lm_.mjs";import{t as a}from"./output-BGqhvqe2.mjs";import{t as o}from"./dry-run-DmsbOMF1.mjs";import{t as s}from"./progress-BYVZuEcG.mjs";import{t as c}from"./run-CrZgB8L_.mjs";import"./telemetry-DBXOMuLh.mjs";import{n as l,r as u,t as d}from"./body-parser-DkHKPkJ7.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{a as p,n as m}from"./prompt-F5wxc8zq.mjs";function h(e){return e.usage(`$0 flagship apps create
2
+ import{t as e}from"./local-BcPM4I0s.mjs";import{i as t,n}from"./auth-CAWalgW0.mjs";import{a as r,t as i}from"./context-BBLtgdR1.mjs";import{t as a}from"./output-BOe-3AQG.mjs";import{t as o}from"./dry-run-DRj2_uV3.mjs";import{t as s}from"./progress-CQqDtgmF.mjs";import{t as c}from"./run-CW2Cgi0S.mjs";import"./telemetry-0Y5hAtCX.mjs";import{n as l,r as u,t as d}from"./body-parser-DkHKPkJ7.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{a as p,n as m}from"./prompt-C8FyienX.mjs";function h(e){return e.usage(`$0 flagship apps create
3
3
 
4
4
  Creates an app. The returned \`id\` is used in all subsequent flag, changelog, and evaluation requests.`).option(`name`,{type:`string`,description:`Name of the Flagship app (1–64 letters, numbers, hyphens, or underscores).`}).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:`create`,describe:`Create app`,builder:h,handler:async t=>c({command:`flagship apps create`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf flagship apps create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/flagship/apps`,pathParams:{},bodyKind:`json`,body:t.body===void 0?d({name:f(t.name,`name`,`text`)}):l(t.body)});return}let c=await n(t),u=t.local?e:await i();if(t.accountId=u,t.body){let e=l(t.body),n=await s(`Creating`,async()=>c.flagship.apps.create({...e,account_id:u}));a(n,{successLabel:`Created`});return}t.name===void 0&&(t.name=await p(`name`,`Name of the Flagship app (1–64 letters, numbers, hyphens, or underscores).`));let m=d({name:f(t.name,`name`,`text`)}),h=await s(`Creating`,async()=>c.flagship.apps.create({...m,account_id:u}));a(h,{successLabel:`Created`})})};function _(e){return e.usage("$0 flagship apps definitions get <app-id>\n\nReturns an app's evaluation-only flag definitions for SDKs that evaluate locally. Send the returned `ETag` in `If-None-Match` to avoid downloading unchanged definitions.").positional(`app-id`,{type:`string`,description:`Flagship app ID returned when the app was created.`,demandOption:!0}).option(`if-none-match`,{type:`string`,description:"Previously returned ETag, or `*`."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`get <app-id>`,describe:`Get flag definitions`,builder:_,handler:async l=>c({command:`flagship apps definitions get`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={};if(l[`if-none-match`]!==void 0&&(c[`If-None-Match`]=String(l[`if-none-match`])),l.dryRun){let e=await r();o({command:`cf flagship apps definitions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/flagship/apps/${l[`app-id`]==null?`<app-id>`:encodeURIComponent(String(l[`app-id`]))}/definitions`,pathParams:{"app-id":String(l[`app-id`]??``)},bodyKind:`none`});return}let u=await n(l),d=l.local?e:await i();l.accountId=d;let f=await s(`Loading`,async()=>t(u,`GET`,`/accounts/${d}/flagship/apps/${encodeURIComponent(String(l[`app-id`]))}/definitions`,{headers:Object.keys(c).length>0?c:void 0}));a(f,{successLabel:`Loaded`})})},y={command:`definitions`,describe:`Operations for apps.definitions`,builder:e=>e.command(v).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function b(e){return e.usage(`$0 flagship apps delete <app-id>
5
5
 
@@ -10,7 +10,7 @@ Evaluates a flag against the provided context. Pass context attributes as query
10
10
 
11
11
  Returns the audit history for a flag, newest first. Each entry includes the event type and full flag state after the change; \`update\` entries include a field-level diff. Capped at 200 entries per flag.`).option(`app-id`,{type:`string`,description:`Flagship app ID returned when the app was created.`,demandOption:!0}).option(`flag-key`,{type:`string`,description:`Case-sensitive key identifying the flag within the app.`,demandOption:!0}).option(`limit`,{type:`number`,description:`Max items to return (1–200).`}).option(`cursor`,{type:`string`,description:`Pagination cursor from a previous response.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`list`,describe:`List flag changelog entries`,builder:T,handler:async t=>c({command:`flagship apps flags changelog list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let c={limit:t.limit,cursor:t.cursor};if(t.dryRun){let e=await r();o({command:`cf flagship apps flags changelog list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/flagship/apps/${t[`app-id`]==null?`<app-id>`:encodeURIComponent(String(t[`app-id`]))}/flags/${t[`flag-key`]==null?`<flag-key>`:encodeURIComponent(String(t[`flag-key`]))}/changelog`,pathParams:{"app-id":String(t[`app-id`]??``),"flag-key":String(t[`flag-key`]??``)},query:c,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await i();t.accountId=u;let d=await s(`Loading`,async()=>l.flagship.apps.flags.changelog.list({account_id:u,app_id:t[`app-id`],flag_key:t[`flag-key`],...c}));a(d,{successLabel:`Loaded`})})},D={command:`changelog`,describe:`Operations for apps.flags.changelog`,builder:e=>e.command(E).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function O(e){return e.usage(`$0 flagship apps flags create <app-id>
12
12
 
13
- Creates a flag. Returns 409 if the key already exists. \`type\` is always inferred from variation values; legacy request-side values are ignored.`).positional(`app-id`,{type:`string`,description:`Flagship app ID returned when the app was created.`,demandOption:!0}).option(`default-variation`,{type:`string`,description:"Variation the API serves when the flag is off, or when it's on but no rule matches the context. Must be a key in `variations`."}).option(`description`,{type:`string`,description:`Optional operator-facing description. It does not affect flag evaluation.`}).option(`enabled`,{type:`boolean`,description:"When false, the flag bypasses all rules and always serves `default_variation`."}).option(`key`,{type:`string`,description:`Unique identifier for the flag within an app. Used in all evaluation and SDK calls.`}).option(`rules`,{type:`string`,description:"Targeting rules evaluated in ascending `priority`; the first matching rule wins. An empty array means the flag always serves `default_variation`. Provide as a JSON array of objects or @path/to/file.json."}).option(`type`,{type:`string`,description:`Deprecated compatibility field. Omit it; the API ignores this value and infers the type from the flag's variations.`,choices:[`boolean`,`string`,`number`,`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 k={command:`create <app-id>`,describe:`Create flag`,builder:O,handler:async t=>c({command:`flagship apps flags create`,classification:{safeFlags:[`enabled`,`type`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf flagship apps flags create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/flagship/apps/${t[`app-id`]==null?`<app-id>`:encodeURIComponent(String(t[`app-id`]))}/flags`,pathParams:{"app-id":String(t[`app-id`]??``)},bodyKind:`json`,body:t.body===void 0?d({default_variation:f(t[`default-variation`],`default-variation`,`text`),description:f(t.description,`description`,`text`),enabled:t.enabled,key:f(t.key,`key`,`text`),rules:u(t.rules,`rules`),type:f(t.type,`type`,`text`)}):l(t.body)});return}let c=await n(t),m=t.local?e:await i();if(t.accountId=m,t.body){let e=l(t.body),n=await s(`Creating`,async()=>c.flagship.apps.flags.create({...e,account_id:m,app_id:t[`app-id`]}));a(n,{successLabel:`Created`});return}if(t[`default-variation`]===void 0&&(t[`default-variation`]=await p(`default-variation`,"Variation the API serves when the flag is off, or when it's on but no rule matches the context. Must be a key in `variations`.")),t.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);if(t.key===void 0&&(t.key=await p(`key`,`Unique identifier for the flag within an app. Used in all evaluation and SDK calls.`)),t.rules===void 0)throw Error(`--rules is required (or pass --body with this field set).`);let h=d({default_variation:f(t[`default-variation`],`default-variation`,`text`),description:f(t.description,`description`,`text`),enabled:t.enabled,key:f(t.key,`key`,`text`),rules:u(t.rules,`rules`),type:f(t.type,`type`,`text`)}),g=await s(`Creating`,async()=>c.flagship.apps.flags.create({...h,account_id:m,app_id:t[`app-id`]}));a(g,{successLabel:`Created`})})};function A(e){return e.usage(`$0 flagship apps flags delete <flag-key>
13
+ Creates a flag. Returns 409 if the key already exists. \`type\` is always inferred from variation values; legacy request-side values are ignored.`).positional(`app-id`,{type:`string`,description:`Flagship app ID returned when the app was created.`,demandOption:!0}).option(`default-variation`,{type:`string`,description:"Variation the API serves when the flag is off, or when it's on but no rule matches the context. Must be a key in `variations`."}).option(`description`,{type:`string`,description:`Optional operator-facing description. It does not affect flag evaluation.`}).option(`enabled`,{type:`boolean`,description:"When false, the flag bypasses all rules and always serves `default_variation`."}).option(`key`,{type:`string`,description:`Unique identifier for the flag within an app. Used in all evaluation and SDK calls.`}).option(`rules`,{type:`string`,description:"Targeting rules evaluated in ascending `priority`; the first matching rule wins. An empty array means the flag always serves `default_variation`. Provide as a JSON array of objects or @path/to/file.json."}).option(`type`,{type:`string`,description:`Deprecated compatibility field. Omit it; the API ignores this value and infers the type from the flag's variations.`,choices:[`boolean`,`string`,`number`,`json`]}).coerce(`type`,e=>f(e,`type`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const k={command:`create <app-id>`,describe:`Create flag`,builder:O,handler:async t=>c({command:`flagship apps flags create`,classification:{safeFlags:[`enabled`,`type`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf flagship apps flags create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/flagship/apps/${t[`app-id`]==null?`<app-id>`:encodeURIComponent(String(t[`app-id`]))}/flags`,pathParams:{"app-id":String(t[`app-id`]??``)},bodyKind:`json`,body:t.body===void 0?d({default_variation:f(t[`default-variation`],`default-variation`,`text`),description:f(t.description,`description`,`text`),enabled:t.enabled,key:f(t.key,`key`,`text`),rules:u(t.rules,`rules`),type:t.type}):l(t.body)});return}let c=await n(t),m=t.local?e:await i();if(t.accountId=m,t.body){let e=l(t.body),n=await s(`Creating`,async()=>c.flagship.apps.flags.create({...e,account_id:m,app_id:t[`app-id`]}));a(n,{successLabel:`Created`});return}if(t[`default-variation`]===void 0&&(t[`default-variation`]=await p(`default-variation`,"Variation the API serves when the flag is off, or when it's on but no rule matches the context. Must be a key in `variations`.")),t.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);if(t.key===void 0&&(t.key=await p(`key`,`Unique identifier for the flag within an app. Used in all evaluation and SDK calls.`)),t.rules===void 0)throw Error(`--rules is required (or pass --body with this field set).`);let h=d({default_variation:f(t[`default-variation`],`default-variation`,`text`),description:f(t.description,`description`,`text`),enabled:t.enabled,key:f(t.key,`key`,`text`),rules:u(t.rules,`rules`),type:t.type}),g=await s(`Creating`,async()=>c.flagship.apps.flags.create({...h,account_id:m,app_id:t[`app-id`]}));a(g,{successLabel:`Created`})})};function A(e){return e.usage(`$0 flagship apps flags delete <flag-key>
14
14
 
15
15
  Deletes a flag permanently. After deletion propagates, direct evaluations return not found; typed binding accessors may return the caller-supplied default. Cannot be undone.`).positional(`flag-key`,{type:`string`,description:`Case-sensitive key identifying the flag within the app.`,demandOption:!0}).option(`app-id`,{type:`string`,description:`Flagship app ID returned when the app was created.`,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 j={command:`delete <flag-key>`,describe:`Delete flag`,builder:A,handler:async t=>c({command:`flagship apps flags delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf flagship apps flags delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/flagship/apps/${t[`app-id`]==null?`<app-id>`:encodeURIComponent(String(t[`app-id`]))}/flags/${t[`flag-key`]==null?`<flag-key>`:encodeURIComponent(String(t[`flag-key`]))}`,pathParams:{"app-id":String(t[`app-id`]??``),"flag-key":String(t[`flag-key`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await m({force:!!t.force,message:`Delete this feature flag? After the deletion propagates, evaluation requests can no longer resolve it. This action cannot be undone.`})){process.stderr.write(`Aborted.
16
16
  `);return}let u=await s(`Deleting`,async()=>c.flagship.apps.flags.delete({account_id:l,app_id:t[`app-id`],flag_key:t[`flag-key`]}));a(u,{successLabel:`Deleted`})})};function M(e){return e.usage(`$0 flagship apps flags evaluate <app-id>
@@ -19,7 +19,7 @@ Evaluates a flag against the provided context, passed as a JSON request body (OF
19
19
 
20
20
  Returns the full flag definition including rules, variations, and audit fields.`).positional(`flag-key`,{type:`string`,description:`Case-sensitive key identifying the flag within the app.`,demandOption:!0}).option(`app-id`,{type:`string`,description:`Flagship app ID returned when the app was created.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const F={command:`get <flag-key>`,describe:`Get flag`,builder:P,handler:async t=>c({command:`flagship apps flags get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf flagship apps flags get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/flagship/apps/${t[`app-id`]==null?`<app-id>`:encodeURIComponent(String(t[`app-id`]))}/flags/${t[`flag-key`]==null?`<flag-key>`:encodeURIComponent(String(t[`flag-key`]))}`,pathParams:{"app-id":String(t[`app-id`]??``),"flag-key":String(t[`flag-key`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.flagship.apps.flags.get({account_id:l,app_id:t[`app-id`],flag_key:t[`flag-key`]}));a(u,{successLabel:`Loaded`})})};function I(e){return e.usage("$0 flagship apps flags list\n\nLists an app's flags ordered by key. Pass `cursor` from `result_info` to page forward; a null cursor indicates the last page.").option(`app-id`,{type:`string`,description:`Flagship app ID returned when the app was created.`,demandOption:!0}).option(`limit`,{type:`number`,description:`Max items to return (1–200).`}).option(`cursor`,{type:`string`,description:`Pagination cursor from a previous response.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const L={command:`list`,describe:`List flags`,builder:I,handler:async t=>c({command:`flagship apps flags list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let c={limit:t.limit,cursor:t.cursor};if(t.dryRun){let e=await r();o({command:`cf flagship apps flags list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/flagship/apps/${t[`app-id`]==null?`<app-id>`:encodeURIComponent(String(t[`app-id`]))}/flags`,pathParams:{"app-id":String(t[`app-id`]??``)},query:c,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await i();t.accountId=u;let d=await s(`Loading`,async()=>l.flagship.apps.flags.list({account_id:u,app_id:t[`app-id`],...c}));a(d,{successLabel:`Loaded`})})};function R(e){return e.usage(`$0 flagship apps flags update <flag-key>
21
21
 
22
- Replaces the entire flag definition. Omitted fields are dropped, not preserved — read before writing. The path key identifies the flag and cannot be renamed by changing the body \`key\`. Each update appends a changelog entry.`).positional(`flag-key`,{type:`string`,description:`Case-sensitive key identifying the flag within the app.`,demandOption:!0}).option(`app-id`,{type:`string`,description:`Flagship app ID returned when the app was created.`,demandOption:!0}).option(`default-variation`,{type:`string`,description:"Variation the API serves when the flag is off, or when it's on but no rule matches the context. Must be a key in `variations`."}).option(`description`,{type:`string`,description:`Optional operator-facing description. It does not affect flag evaluation.`}).option(`enabled`,{type:`boolean`,description:"When false, the flag bypasses all rules and always serves `default_variation`."}).option(`key`,{type:`string`,description:`Unique identifier for the flag within an app. Used in all evaluation and SDK calls.`}).option(`rules`,{type:`string`,description:"Targeting rules evaluated in ascending `priority`; the first matching rule wins. An empty array means the flag always serves `default_variation`. Provide as a JSON array of objects or @path/to/file.json."}).option(`type`,{type:`string`,description:`Deprecated compatibility field. Omit it; the API ignores this value and infers the type from the flag's variations.`,choices:[`boolean`,`string`,`number`,`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 z={command:`update <flag-key>`,describe:`Update flag`,builder:R,handler:async t=>c({command:`flagship apps flags update`,classification:{safeFlags:[`enabled`,`type`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf flagship apps flags update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/flagship/apps/${t[`app-id`]==null?`<app-id>`:encodeURIComponent(String(t[`app-id`]))}/flags/${t[`flag-key`]==null?`<flag-key>`:encodeURIComponent(String(t[`flag-key`]))}`,pathParams:{"app-id":String(t[`app-id`]??``),"flag-key":String(t[`flag-key`]??``)},bodyKind:`json`,body:t.body===void 0?d({default_variation:f(t[`default-variation`],`default-variation`,`text`),description:f(t.description,`description`,`text`),enabled:t.enabled,key:f(t.key,`key`,`text`),rules:u(t.rules,`rules`),type:f(t.type,`type`,`text`)}):l(t.body)});return}let c=await n(t),m=t.local?e:await i();if(t.accountId=m,t.body){let e=l(t.body),n=await s(`Updating`,async()=>c.flagship.apps.flags.update({...e,account_id:m,app_id:t[`app-id`],flag_key:t[`flag-key`]}));a(n,{successLabel:`Updated`});return}if(t[`default-variation`]===void 0&&(t[`default-variation`]=await p(`default-variation`,"Variation the API serves when the flag is off, or when it's on but no rule matches the context. Must be a key in `variations`.")),t.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);if(t.key===void 0&&(t.key=await p(`key`,`Unique identifier for the flag within an app. Used in all evaluation and SDK calls.`)),t.rules===void 0)throw Error(`--rules is required (or pass --body with this field set).`);let h=d({default_variation:f(t[`default-variation`],`default-variation`,`text`),description:f(t.description,`description`,`text`),enabled:t.enabled,key:f(t.key,`key`,`text`),rules:u(t.rules,`rules`),type:f(t.type,`type`,`text`)}),g=await s(`Updating`,async()=>c.flagship.apps.flags.update({...h,account_id:m,app_id:t[`app-id`],flag_key:t[`flag-key`]}));a(g,{successLabel:`Updated`})})},B={command:`flags`,describe:`Operations for apps.flags`,builder:e=>e.command(k).command(j).command(N).command(F).command(L).command(z).command(D).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function V(e){return e.usage(`$0 flagship apps get <app-id>
22
+ Replaces the entire flag definition. Omitted fields are dropped, not preserved — read before writing. The path key identifies the flag and cannot be renamed by changing the body \`key\`. Each update appends a changelog entry.`).positional(`flag-key`,{type:`string`,description:`Case-sensitive key identifying the flag within the app.`,demandOption:!0}).option(`app-id`,{type:`string`,description:`Flagship app ID returned when the app was created.`,demandOption:!0}).option(`default-variation`,{type:`string`,description:"Variation the API serves when the flag is off, or when it's on but no rule matches the context. Must be a key in `variations`."}).option(`description`,{type:`string`,description:`Optional operator-facing description. It does not affect flag evaluation.`}).option(`enabled`,{type:`boolean`,description:"When false, the flag bypasses all rules and always serves `default_variation`."}).option(`key`,{type:`string`,description:`Unique identifier for the flag within an app. Used in all evaluation and SDK calls.`}).option(`rules`,{type:`string`,description:"Targeting rules evaluated in ascending `priority`; the first matching rule wins. An empty array means the flag always serves `default_variation`. Provide as a JSON array of objects or @path/to/file.json."}).option(`type`,{type:`string`,description:`Deprecated compatibility field. Omit it; the API ignores this value and infers the type from the flag's variations.`,choices:[`boolean`,`string`,`number`,`json`]}).coerce(`type`,e=>f(e,`type`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const z={command:`update <flag-key>`,describe:`Update flag`,builder:R,handler:async t=>c({command:`flagship apps flags update`,classification:{safeFlags:[`enabled`,`type`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf flagship apps flags update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/flagship/apps/${t[`app-id`]==null?`<app-id>`:encodeURIComponent(String(t[`app-id`]))}/flags/${t[`flag-key`]==null?`<flag-key>`:encodeURIComponent(String(t[`flag-key`]))}`,pathParams:{"app-id":String(t[`app-id`]??``),"flag-key":String(t[`flag-key`]??``)},bodyKind:`json`,body:t.body===void 0?d({default_variation:f(t[`default-variation`],`default-variation`,`text`),description:f(t.description,`description`,`text`),enabled:t.enabled,key:f(t.key,`key`,`text`),rules:u(t.rules,`rules`),type:t.type}):l(t.body)});return}let c=await n(t),m=t.local?e:await i();if(t.accountId=m,t.body){let e=l(t.body),n=await s(`Updating`,async()=>c.flagship.apps.flags.update({...e,account_id:m,app_id:t[`app-id`],flag_key:t[`flag-key`]}));a(n,{successLabel:`Updated`});return}if(t[`default-variation`]===void 0&&(t[`default-variation`]=await p(`default-variation`,"Variation the API serves when the flag is off, or when it's on but no rule matches the context. Must be a key in `variations`.")),t.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);if(t.key===void 0&&(t.key=await p(`key`,`Unique identifier for the flag within an app. Used in all evaluation and SDK calls.`)),t.rules===void 0)throw Error(`--rules is required (or pass --body with this field set).`);let h=d({default_variation:f(t[`default-variation`],`default-variation`,`text`),description:f(t.description,`description`,`text`),enabled:t.enabled,key:f(t.key,`key`,`text`),rules:u(t.rules,`rules`),type:t.type}),g=await s(`Updating`,async()=>c.flagship.apps.flags.update({...h,account_id:m,app_id:t[`app-id`],flag_key:t[`flag-key`]}));a(g,{successLabel:`Updated`})})},B={command:`flags`,describe:`Operations for apps.flags`,builder:e=>e.command(k).command(j).command(N).command(F).command(L).command(z).command(D).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function V(e){return e.usage(`$0 flagship apps get <app-id>
23
23
 
24
24
  Returns an app's name and audit fields. Flag definitions are not included.`).positional(`app-id`,{type:`string`,description:`Flagship app ID returned when the app was created.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const H={command:`get <app-id>`,describe:`Get app`,builder:V,handler:async t=>c({command:`flagship apps get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf flagship apps get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/flagship/apps/${t[`app-id`]==null?`<app-id>`:encodeURIComponent(String(t[`app-id`]))}`,pathParams:{"app-id":String(t[`app-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.flagship.apps.get({account_id:l,app_id:t[`app-id`]}));a(u,{successLabel:`Loaded`})})};function U(e){return e.usage(`$0 flagship apps list
25
25
 
@@ -1,22 +1,22 @@
1
1
  #!/usr/bin/env node
2
- import{n as e}from"./auth-AobvBmz4.mjs";import{i as t}from"./context-Bwkz4Lm_.mjs";import{t as n}from"./output-BGqhvqe2.mjs";import{t as r}from"./dry-run-DmsbOMF1.mjs";import{t as i}from"./progress-BYVZuEcG.mjs";import{t as a}from"./run-CrZgB8L_.mjs";import"./telemetry-DBXOMuLh.mjs";import{n as o,t as s}from"./body-parser-DkHKPkJ7.mjs";import{n as c}from"./input-validation-D7z60HJH.mjs";function l(e){return e.usage(`$0 fraud get
2
+ import{n as e}from"./auth-CAWalgW0.mjs";import{i as t}from"./context-BBLtgdR1.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-CQqDtgmF.mjs";import{t as a}from"./run-CW2Cgi0S.mjs";import"./telemetry-0Y5hAtCX.mjs";import{n as o,t as s}from"./body-parser-DkHKPkJ7.mjs";import{n as c}from"./input-validation-D7z60HJH.mjs";function l(e){return e.usage(`$0 fraud get
3
3
 
4
- Retrieve Fraud Detection settings for a zone.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const u={command:`get`,describe:`Get Fraud Detection Settings`,builder:l,handler:async o=>a({command:`fraud get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf fraud get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/fraud_detection/settings`,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.fraud.get({zone_id:s}));n(c,{successLabel:`Loaded`})})};function d(e){return e.usage("$0 fraud update\n\nUpdate Fraud Detection settings for a zone. Notes on `username_expressions` behavior: - If omitted or set to null, expressions are not modified. - If provided as an empty array `[]`, all expressions will be cleared.").option(`authentication-settings-failure-criteria-kind`,{type:`string`,description:"The type of criterion. Currently only `status_code` is supported.",choices:[`status_code`]}).option(`authentication-settings-failure-criteria-status-codes`,{type:`string`,array:!0,description:`HTTP status codes to match against the origin response.
4
+ Retrieve Fraud Detection settings for a zone.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const u={command:`get`,describe:`Get Fraud Detection Settings`,builder:l,handler:async o=>a({command:`fraud get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf fraud get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/fraud_detection/settings`,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.fraud.get({zone_id:s}));n(c,{successLabel:`Loaded`})})};function d(e){return e.usage("$0 fraud update\n\nUpdate Fraud Detection settings for a zone. Notes on `username_expressions` behavior: - If omitted or set to null, expressions are not modified. - If provided as an empty array `[]`, all expressions will be cleared.").option(`authentication-settings-failure-criteria-kind`,{type:`string`,description:"The type of criterion. Currently only `status_code` is supported.",choices:[`status_code`]}).coerce(`authentication-settings-failure-criteria-kind`,e=>c(e,`authentication-settings-failure-criteria-kind`,`text`)).option(`authentication-settings-failure-criteria-status-codes`,{type:`string`,array:!0,description:`HTTP status codes to match against the origin response.
5
5
  - Maximum of 10 codes per criterion.
6
6
  - Each code must be a valid HTTP status code (100-599).
7
7
  - Codes are deduplicated and sorted on save.
8
8
  - Omit to leave unchanged on update.
9
9
  - Provide an empty array \`[]\` to clear codes on update.
10
- `}).option(`authentication-settings-success-criteria-kind`,{type:`string`,description:"The type of criterion. Currently only `status_code` is supported.",choices:[`status_code`]}).option(`authentication-settings-success-criteria-status-codes`,{type:`string`,array:!0,description:`HTTP status codes to match against the origin response.
10
+ `}).option(`authentication-settings-success-criteria-kind`,{type:`string`,description:"The type of criterion. Currently only `status_code` is supported.",choices:[`status_code`]}).coerce(`authentication-settings-success-criteria-kind`,e=>c(e,`authentication-settings-success-criteria-kind`,`text`)).option(`authentication-settings-success-criteria-status-codes`,{type:`string`,array:!0,description:`HTTP status codes to match against the origin response.
11
11
  - Maximum of 10 codes per criterion.
12
12
  - Each code must be a valid HTTP status code (100-599).
13
13
  - Codes are deduplicated and sorted on save.
14
14
  - Omit to leave unchanged on update.
15
15
  - Provide an empty array \`[]\` to clear codes on update.
16
- `}).option(`user-profiles`,{type:`string`,description:`Whether Fraud User Profiles is enabled for the zone.`,choices:[`enabled`,`disabled`]}).option(`username-expressions`,{type:`string`,array:!0,description:`List of expressions to detect usernames in write HTTP requests.
16
+ `}).option(`user-profiles`,{type:`string`,description:`Whether Fraud User Profiles is enabled for the zone.`,choices:[`enabled`,`disabled`]}).coerce(`user-profiles`,e=>c(e,`user-profiles`,`text`)).option(`username-expressions`,{type:`string`,array:!0,description:`List of expressions to detect usernames in write HTTP requests.
17
17
 
18
18
  - Maximum of 10 expressions.
19
19
  - Omit or set to null to leave unchanged on update.
20
20
  - Provide an empty array \`[]\` to clear all expressions on update.
21
21
  - Invalid expressions will result in a 10400 Bad Request with details in the \`messages\` array.
22
- `}).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)`}).check(e=>{if([`authentication-settings-failure-criteria-kind`,`authentication-settings-failure-criteria-status-codes`,`authentication-settings-success-criteria-kind`,`authentication-settings-success-criteria-status-codes`].some(t=>e[t]!==void 0)){let t=[`authentication-settings-failure-criteria-kind`,`authentication-settings-success-criteria-kind`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --authentication_settings-* flag is set`)}return!0})}const f={command:`update`,describe:`Update Fraud Detection Settings`,builder:d,handler:async l=>a({command:`fraud update`,classification:{safeFlags:[`authentication-settings-failure-criteria-kind`,`authentication-settings-success-criteria-kind`,`user-profiles`,`dry-run`]}},l,async()=>{if(l.dryRun){r({command:`cf fraud update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${l.zone??l.zoneId??`<zone>`}/fraud_detection/settings`,pathParams:{"zone-id":String(l.zone??l[`zone-id`]??``)},bodyKind:`json`,body:l.body===void 0?s({authentication_settings:{failure_criteria:{kind:c(l[`authentication-settings-failure-criteria-kind`],`authentication-settings-failure-criteria-kind`,`text`),status_codes:l[`authentication-settings-failure-criteria-status-codes`]},success_criteria:{kind:c(l[`authentication-settings-success-criteria-kind`],`authentication-settings-success-criteria-kind`,`text`),status_codes:l[`authentication-settings-success-criteria-status-codes`]}},user_profiles:c(l[`user-profiles`],`user-profiles`,`text`),username_expressions:l[`username-expressions`]}):o(l.body)});return}let a=await e(l),u=await t({zone:l.zone},a,{quiet:l.quiet});if(l.zoneId=u,l.body){let e=o(l.body),t=await i(`Updating`,async()=>a.fraud.update({body:e,zone_id:u}));n(t,{successLabel:`Updated`});return}let d=s({authentication_settings:{failure_criteria:{kind:c(l[`authentication-settings-failure-criteria-kind`],`authentication-settings-failure-criteria-kind`,`text`),status_codes:l[`authentication-settings-failure-criteria-status-codes`]},success_criteria:{kind:c(l[`authentication-settings-success-criteria-kind`],`authentication-settings-success-criteria-kind`,`text`),status_codes:l[`authentication-settings-success-criteria-status-codes`]}},user_profiles:c(l[`user-profiles`],`user-profiles`,`text`),username_expressions:l[`username-expressions`]}),f=await i(`Updating`,async()=>a.fraud.update({body:d,zone_id:u}));n(f,{successLabel:`Updated`})})},p={command:`fraud`,describe:`fraud`,builder:e=>e.command(u).command(f).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{p as default};
22
+ `}).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)`}).check(e=>{if([`authentication-settings-failure-criteria-kind`,`authentication-settings-failure-criteria-status-codes`,`authentication-settings-success-criteria-kind`,`authentication-settings-success-criteria-status-codes`].some(t=>e[t]!==void 0)){let t=[`authentication-settings-failure-criteria-kind`,`authentication-settings-success-criteria-kind`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --authentication_settings-* flag is set`)}return!0})}const f={command:`update`,describe:`Update Fraud Detection Settings`,builder:d,handler:async c=>a({command:`fraud update`,classification:{safeFlags:[`authentication-settings-failure-criteria-kind`,`authentication-settings-success-criteria-kind`,`user-profiles`,`dry-run`]}},c,async()=>{if(c.dryRun){r({command:`cf fraud update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${c.zone??c.zoneId??`<zone>`}/fraud_detection/settings`,pathParams:{"zone-id":String(c.zone??c[`zone-id`]??``)},bodyKind:`json`,body:c.body===void 0?s({authentication_settings:{failure_criteria:{kind:c[`authentication-settings-failure-criteria-kind`],status_codes:c[`authentication-settings-failure-criteria-status-codes`]},success_criteria:{kind:c[`authentication-settings-success-criteria-kind`],status_codes:c[`authentication-settings-success-criteria-status-codes`]}},user_profiles:c[`user-profiles`],username_expressions:c[`username-expressions`]}):o(c.body)});return}let a=await e(c),l=await t({zone:c.zone},a,{quiet:c.quiet});if(c.zoneId=l,c.body){let e=o(c.body),t=await i(`Updating`,async()=>a.fraud.update({body:e,zone_id:l}));n(t,{successLabel:`Updated`});return}let u=s({authentication_settings:{failure_criteria:{kind:c[`authentication-settings-failure-criteria-kind`],status_codes:c[`authentication-settings-failure-criteria-status-codes`]},success_criteria:{kind:c[`authentication-settings-success-criteria-kind`],status_codes:c[`authentication-settings-success-criteria-status-codes`]}},user_profiles:c[`user-profiles`],username_expressions:c[`username-expressions`]}),d=await i(`Updating`,async()=>a.fraud.update({body:u,zone_id:l}));n(d,{successLabel:`Updated`})})},p={command:`fraud`,describe:`fraud`,builder:e=>e.command(u).command(f).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{p as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{n as e}from"./auth-AobvBmz4.mjs";import{i as t}from"./context-Bwkz4Lm_.mjs";import{t as n}from"./output-BGqhvqe2.mjs";import{t as r}from"./dry-run-DmsbOMF1.mjs";import{t as i}from"./progress-BYVZuEcG.mjs";import{t as a}from"./run-CrZgB8L_.mjs";import"./telemetry-DBXOMuLh.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-F5wxc8zq.mjs";function u(e){return e.usage(`$0 google-tag-gateway config get
2
+ import{n as e}from"./auth-CAWalgW0.mjs";import{i as t}from"./context-BBLtgdR1.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-CQqDtgmF.mjs";import{t as a}from"./run-CW2Cgi0S.mjs";import"./telemetry-0Y5hAtCX.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-C8FyienX.mjs";function u(e){return e.usage(`$0 google-tag-gateway config get
3
3
 
4
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
 
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{t as e}from"./cli-exit-CstFZ1eJ.mjs";function t(t,n){return{...t,builder:r=>{let i=r.option(`dry-run`,{type:`boolean`,default:!1,global:!0,description:`Parse arguments and show the command without executing it`});n===`preview`&&i.middleware(t=>{if(!(t[`dry-run`]!==!0||t.help))throw console.log(JSON.stringify({command:`cf ${t._.map(String).join(` `)}`,dryRun:!0,executed:!1,validated:`arguments only`},null,2)),new e(0)});let a=t.builder;return typeof a==`function`?a(i):a===void 0?i:i.options(a)}}}export{t};
@@ -1,22 +1,22 @@
1
1
  #!/usr/bin/env node
2
- import{n as e}from"./auth-AobvBmz4.mjs";import{i as t}from"./context-Bwkz4Lm_.mjs";import{t as n}from"./output-BGqhvqe2.mjs";import{t as r}from"./dry-run-DmsbOMF1.mjs";import{t as i}from"./progress-BYVZuEcG.mjs";import{t as a}from"./run-CrZgB8L_.mjs";import"./telemetry-DBXOMuLh.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-F5wxc8zq.mjs";function d(e){return e.usage(`$0 healthchecks create
2
+ import{n as e}from"./auth-CAWalgW0.mjs";import{i as t}from"./context-BBLtgdR1.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-CQqDtgmF.mjs";import{t as a}from"./run-CW2Cgi0S.mjs";import"./telemetry-0Y5hAtCX.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-C8FyienX.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),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>
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`]}).coerce(`http-config-method`,e=>c(e,`http-config-method`,`text`)).option(`http-config-path`,{type:`string`,description:`The endpoint path to health check against.`}).option(`http-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80 if type is HTTP or 443 if type is HTTPS.`}).option(`interval`,{type:`number`,description:`The interval between each health check. Shorter intervals may give quicker notifications if the origin status changes, but will increase load on the origin as we check from multiple locations.`,default:60}).option(`name`,{type:`string`,description:`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`}).option(`retries`,{type:`number`,description:`The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.`,default:2}).option(`suspended`,{type:`boolean`,description:`If suspended, no health checks are sent to the origin.`,default:!1}).option(`tcp-config-method`,{type:`string`,description:`The TCP connection method to use for the health check.`,choices:[`connection_established`]}).coerce(`tcp-config-method`,e=>c(e,`tcp-config-method`,`text`)).option(`tcp-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80.`}).option(`timeout`,{type:`number`,description:`The timeout (in seconds) before marking the health check as failed.`,default:5}).option(`type`,{type:`string`,description:`The protocol to use for the health check. Currently supported protocols are 'HTTP', 'HTTPS' and 'TCP'.`,default:`HTTP`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const 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:u[`http-config-method`],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:u[`tcp-config-method`],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:u[`http-config-method`],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:u[`tcp-config-method`],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
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),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>
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`]}).coerce(`http-config-method`,e=>c(e,`http-config-method`,`text`)).option(`http-config-path`,{type:`string`,description:`The endpoint path to health check against.`}).option(`http-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80 if type is HTTP or 443 if type is HTTPS.`}).option(`interval`,{type:`number`,description:`The interval between each health check. Shorter intervals may give quicker notifications if the origin status changes, but will increase load on the origin as we check from multiple locations.`}).option(`name`,{type:`string`,description:`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`}).option(`retries`,{type:`number`,description:`The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.`}).option(`suspended`,{type:`boolean`,description:`If suspended, no health checks are sent to the origin.`}).option(`tcp-config-method`,{type:`string`,description:`The TCP connection method to use for the health check.`,choices:[`connection_established`]}).coerce(`tcp-config-method`,e=>c(e,`tcp-config-method`,`text`)).option(`tcp-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80.`}).option(`timeout`,{type:`number`,description:`The timeout (in seconds) before marking the health check as failed.`}).option(`type`,{type:`string`,description:`The protocol to use for the health check. Currently supported protocols are 'HTTP', 'HTTPS' and 'TCP'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const 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:u[`http-config-method`],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:u[`tcp-config-method`],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:u[`http-config-method`],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:u[`tcp-config-method`],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
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
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),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>
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`]}).coerce(`http-config-method`,e=>c(e,`http-config-method`,`text`)).option(`http-config-path`,{type:`string`,description:`The endpoint path to health check against.`}).option(`http-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80 if type is HTTP or 443 if type is HTTPS.`}).option(`interval`,{type:`number`,description:`The interval between each health check. Shorter intervals may give quicker notifications if the origin status changes, but will increase load on the origin as we check from multiple locations.`,default:60}).option(`name`,{type:`string`,description:`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`}).option(`retries`,{type:`number`,description:`The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.`,default:2}).option(`suspended`,{type:`boolean`,description:`If suspended, no health checks are sent to the origin.`,default:!1}).option(`tcp-config-method`,{type:`string`,description:`The TCP connection method to use for the health check.`,choices:[`connection_established`]}).coerce(`tcp-config-method`,e=>c(e,`tcp-config-method`,`text`)).option(`tcp-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80.`}).option(`timeout`,{type:`number`,description:`The timeout (in seconds) before marking the health check as failed.`,default:5}).option(`type`,{type:`string`,description:`The protocol to use for the health check. Currently supported protocols are 'HTTP', 'HTTPS' and 'TCP'.`,default:`HTTP`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const 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:u[`http-config-method`],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:u[`tcp-config-method`],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:u[`http-config-method`],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:u[`tcp-config-method`],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
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
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),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};
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`]}).coerce(`http-config-method`,e=>c(e,`http-config-method`,`text`)).option(`http-config-path`,{type:`string`,description:`The endpoint path to health check against.`}).option(`http-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80 if type is HTTP or 443 if type is HTTPS.`}).option(`interval`,{type:`number`,description:`The interval between each health check. Shorter intervals may give quicker notifications if the origin status changes, but will increase load on the origin as we check from multiple locations.`}).option(`name`,{type:`string`,description:`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`}).option(`retries`,{type:`number`,description:`The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.`}).option(`suspended`,{type:`boolean`,description:`If suspended, no health checks are sent to the origin.`}).option(`tcp-config-method`,{type:`string`,description:`The TCP connection method to use for the health check.`,choices:[`connection_established`]}).coerce(`tcp-config-method`,e=>c(e,`tcp-config-method`,`text`)).option(`tcp-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80.`}).option(`timeout`,{type:`number`,description:`The timeout (in seconds) before marking the health check as failed.`}).option(`type`,{type:`string`,description:`The protocol to use for the health check. Currently supported protocols are 'HTTP', 'HTTPS' and 'TCP'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const 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:u[`http-config-method`],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:u[`tcp-config-method`],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:u[`http-config-method`],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:u[`tcp-config-method`],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,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{i as e,n as t}from"./auth-AobvBmz4.mjs";import{i as n}from"./context-Bwkz4Lm_.mjs";import{t as r}from"./output-BGqhvqe2.mjs";import{t as i}from"./dry-run-DmsbOMF1.mjs";import{t as a}from"./progress-BYVZuEcG.mjs";import{t as o}from"./run-CrZgB8L_.mjs";import"./telemetry-DBXOMuLh.mjs";import{n as s}from"./body-parser-DkHKPkJ7.mjs";import{n as c}from"./prompt-F5wxc8zq.mjs";function l(e){return e.usage(`$0 hostnames settings tls-single get <hostname>
2
+ import{i as e,n as t}from"./auth-CAWalgW0.mjs";import{i as n}from"./context-BBLtgdR1.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-CQqDtgmF.mjs";import{t as o}from"./run-CW2Cgi0S.mjs";import"./telemetry-0Y5hAtCX.mjs";import{n as s}from"./body-parser-DkHKPkJ7.mjs";import{n as c}from"./prompt-C8FyienX.mjs";function l(e){return e.usage(`$0 hostnames settings tls-single get <hostname>
3
3
 
4
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
 
@@ -0,0 +1,37 @@
1
+ #!/usr/bin/env node
2
+ import{t as e}from"./local-BcPM4I0s.mjs";import{n as t}from"./auth-CAWalgW0.mjs";import{a as n,t as r}from"./context-BBLtgdR1.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-CQqDtgmF.mjs";import{t as s}from"./run-CW2Cgi0S.mjs";import"./telemetry-0Y5hAtCX.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-C8FyienX.mjs";function m(e){return e.usage(`$0 hyperdrive create
3
+
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`]}).coerce(`mtls-sslmode`,e=>u(e,`mtls-sslmode`,`text`)).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
+
6
+ Maximum allowed: 20 for free tier accounts, 100 for paid tier accounts.
7
+ If not specified, defaults to 20 for free tier and 60 for paid tier.
8
+ Certain Cloudflare-managed origins may be permitted a higher limit.
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`]}).coerce(`integration-provider`,e=>u(e,`integration-provider`,`text`)).option(`integration-scheme`,{type:`string`,description:`Specifies the URL scheme used to connect to your origin database.`,choices:[`postgres`,`postgresql`,`mysql`]}).coerce(`integration-scheme`,e=>u(e,`integration-scheme`,`text`)).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:f[`mtls-sslmode`]},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:f[`integration-provider`],scheme:f[`integration-scheme`]}}):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:f[`mtls-sslmode`]},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:f[`integration-provider`],scheme:f[`integration-scheme`]}}),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
+
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
+
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
+
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
+
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
+
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. The integration association is set only during creation and cannot be changed; omit the integration field even when replacing an integration-backed configuration. 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`]}).coerce(`mtls-sslmode`,e=>u(e,`mtls-sslmode`,`text`)).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`]}).coerce(`origin-scheme`,e=>u(e,`origin-scheme`,`text`)).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
+
23
+ Maximum allowed: 20 for free tier accounts, 100 for paid tier accounts.
24
+ If not specified, defaults to 20 for free tier and 60 for paid tier.
25
+ Certain Cloudflare-managed origins may be permitted a higher limit.
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){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:p[`mtls-sslmode`]},name:u(p.name,`name`,`text`),origin:{database:u(p[`origin-database`],`origin-database`,`text`),password:u(p[`origin-password`],`origin-password`,`text`),scheme:p[`origin-scheme`],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:p[`mtls-sslmode`]},name:u(p.name,`name`,`text`),origin:{database:u(p[`origin-database`],`origin-database`,`text`),password:u(p[`origin-password`],`origin-password`,`text`),scheme:p[`origin-scheme`],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
+
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
+
31
+ Updates and returns the specified fields of the Hyperdrive configuration. Custom caching settings are not kept if caching is disabled. For an integration-backed configuration, the integration association is preserved but cannot be changed; omit the integration field.`).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`]}).coerce(`mtls-sslmode`,e=>u(e,`mtls-sslmode`,`text`)).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
+
33
+ Maximum allowed: 20 for free tier accounts, 100 for paid tier accounts.
34
+ If not specified, defaults to 20 for free tier and 60 for paid tier.
35
+ Certain Cloudflare-managed origins may be permitted a higher limit.
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){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:d[`mtls-sslmode`]},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:d[`mtls-sslmode`]},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};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-C0lQ9sTg.mjs";import{n as t}from"./auth-AobvBmz4.mjs";import{a as n,t as r}from"./context-Bwkz4Lm_.mjs";import{t as i}from"./output-BGqhvqe2.mjs";import{t as a}from"./dry-run-DmsbOMF1.mjs";import{t as o}from"./progress-BYVZuEcG.mjs";import{t as s}from"./run-CrZgB8L_.mjs";import"./telemetry-DBXOMuLh.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-F5wxc8zq.mjs";import{t as m}from"./cli-types-9oYmRTHJ.mjs";function h(e){return e.usage(`$0 iam permission-groups get <permission-group-id>
2
+ import{t as e}from"./local-BcPM4I0s.mjs";import{n as t}from"./auth-CAWalgW0.mjs";import{a as n,t as r}from"./context-BBLtgdR1.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-CQqDtgmF.mjs";import{t as s}from"./run-CW2Cgi0S.mjs";import"./telemetry-0Y5hAtCX.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-C8FyienX.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
3
 
4
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
5