cf 1.0.0-beta.26 → 1.0.0-beta.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (294) hide show
  1. package/dist/_meta/commands.json +7373 -4926
  2. package/dist/_meta/hand-written-commands.json +2 -2
  3. package/dist/_meta/schemas.json +11614 -4465
  4. package/dist/abuse-reports-D9edOyag.mjs +24 -0
  5. package/dist/{access-DCOOmDC5.mjs → access-CKCCSrrU.mjs} +1 -1
  6. package/dist/{accounts-HC6XuIwP.mjs → accounts-CNb9U9bK.mjs} +33 -27
  7. package/dist/{acm-DYgr6SAR.mjs → acm-CdKTAToZ.mjs} +3 -3
  8. package/dist/{addressing-BS66pJ_a.mjs → addressing-eZI_C-b0.mjs} +18 -18
  9. package/dist/{agent-memory-BbXdueL0.mjs → agent-memory-BBHCEE7h.mjs} +7 -7
  10. package/dist/{ai-BiIKznNv.mjs → ai-Csl_QNwv.mjs} +7 -7
  11. package/dist/ai-audit-DlqWsQi-.mjs +6 -0
  12. package/dist/{ai-gateway-rlYCbts5.mjs → ai-gateway-Lj4On37s.mjs} +13 -13
  13. package/dist/ai-search-BxyhS3X7.mjs +74 -0
  14. package/dist/{ai-security-BUwS6kVh.mjs → ai-security-DvU2iYkY.mjs} +3 -3
  15. package/dist/{alerting-BSzuvFk1.mjs → alerting-r0G2X9y9.mjs} +10 -10
  16. package/dist/analytics-C6bfqm-W.mjs +17 -0
  17. package/dist/analytics-engine-BlIecoOe.mjs +4 -0
  18. package/dist/api-Dnt6lRJG.mjs +3 -0
  19. package/dist/{api-security-BBxEJjGv.mjs → api-security-DZ7GWOqD.mjs} +26 -26
  20. package/dist/argo-Bh0_cj49.mjs +14 -0
  21. package/dist/{artifacts-B9g9aPrk.mjs → artifacts-VZJWVq_6.mjs} +16 -16
  22. package/dist/{audit-logs-BhJs-OS2.mjs → audit-logs-B8cGL4B9.mjs} +1 -1
  23. package/dist/auth-B-h0BHg7.mjs +2 -0
  24. package/dist/auth-B6tswVxH.mjs +2 -0
  25. package/dist/{auth-C50SqX9F.mjs → auth-clmqFEWU.mjs} +3 -3
  26. package/dist/{auth-token-DvNoIhRL.mjs → auth-token-DW4dJVdj.mjs} +1 -1
  27. package/dist/{autoconfig-ldsgXxa6.mjs → autoconfig-C0ynlGHf.mjs} +23 -23
  28. package/dist/{basin-catalog-CtKFiH-n.mjs → basin-catalog-TehR1sKZ.mjs} +11 -11
  29. package/dist/billing-B2KusU6g.mjs +22 -0
  30. package/dist/{blocks-DnNrvi8s.mjs → blocks-BFulF68V.mjs} +1 -1
  31. package/dist/body-parser-DoewLePl.mjs +2 -0
  32. package/dist/body-unions-DNs981Ia.mjs +2 -0
  33. package/dist/bot-management-CXHXgrQC.mjs +9 -0
  34. package/dist/{botnet-feed-lD9s2oLA.mjs → botnet-feed-UyK7Rfp6.mjs} +1 -1
  35. package/dist/brand-protection-kv1ba80i.mjs +14 -0
  36. package/dist/browser-run-D-vRoZmf.mjs +40 -0
  37. package/dist/build-BzJGqb2o.mjs +2 -0
  38. package/dist/build-FFxzigo4.mjs +2 -0
  39. package/dist/{builds-D3mAH87h.mjs → builds-BbxINHRP.mjs} +27 -27
  40. package/dist/cache-BacNNtLu.mjs +36 -0
  41. package/dist/{cf-CpC4giTf.mjs → cf-BQ_LRiut.mjs} +2 -2
  42. package/dist/{chunk-DSGVRFIS-vdfri8fR.mjs → chunk-DSGVRFIS-BaNZNW-M.mjs} +1 -1
  43. package/dist/chunk-SOBRPAPT-QTjnHSNs.mjs +363 -0
  44. package/dist/{cli-Cm4Twas4.mjs → cli-B7vslRfu.mjs} +1 -1
  45. package/dist/{client-side-security-BRn7KBpu.mjs → client-side-security-bzB9JosR.mjs} +6 -6
  46. package/dist/{cloud-connector-DqkOIRDr.mjs → cloud-connector-BHtf37R5.mjs} +2 -2
  47. package/dist/{cloudflared-DDp_8PTK.mjs → cloudflared-QDdHMUEY.mjs} +1 -1
  48. package/dist/{cloudforce-one-B9k8vhso.mjs → cloudforce-one-DWBPQDA3.mjs} +126 -124
  49. package/dist/{command--Y_QAiU2.mjs → command-AVwd7XjE.mjs} +1 -1
  50. package/dist/{command-DlI7Z_7j.mjs → command-B87T_f2f.mjs} +1 -1
  51. package/dist/{command-QHmV62Fv.mjs → command-CEHhi3t0.mjs} +1 -1
  52. package/dist/{command-B-_ba4rQ.mjs → command-CYmQE79n.mjs} +1 -1
  53. package/dist/{command-DsOv6z9q.mjs → command-CbxXc5IW.mjs} +1 -1
  54. package/dist/{command-BKNQsGqu.mjs → command-Ce8CVLth.mjs} +1 -1
  55. package/dist/{command-MxFFWqMg.mjs → command-CqDudQZs.mjs} +1 -1
  56. package/dist/{command-BV8-laJK.mjs → command-D4YcwpVp.mjs} +1 -1
  57. package/dist/{command-BVz2aES3.mjs → command-D895kdlh.mjs} +1 -1
  58. package/dist/{command-yOG9VUtq.mjs → command-D9Qyi1B0.mjs} +1 -1
  59. package/dist/{command-CfOqnqlN.mjs → command-DeutqL1n.mjs} +1 -1
  60. package/dist/{command-Dn39o5xQ.mjs → command-Dl9ICrRK.mjs} +1 -1
  61. package/dist/{command-CN8NFLs2.mjs → command-DtCSe8Hy.mjs} +1 -1
  62. package/dist/{command-BsCFkho-.mjs → command-DwzVtmb3.mjs} +1 -1
  63. package/dist/{command-CQMRxiDz.mjs → command-wtBubtZ4.mjs} +1 -1
  64. package/dist/{completions-BA52jTea.mjs → completions-BvdKtzsX.mjs} +1 -1
  65. package/dist/{connector-interrupts-zL7pxPn6.mjs → connector-interrupts-dUPW6Ya_.mjs} +2 -2
  66. package/dist/{connector-telemetry-events-PL4Fqqvu.mjs → connector-telemetry-events-DWVCqnhn.mjs} +1 -1
  67. package/dist/{connector-telemetry-snapshots-DyBSuEFB.mjs → connector-telemetry-snapshots-CeMP3qeI.mjs} +1 -1
  68. package/dist/{connectors-D8H6rQz9.mjs → connectors-DZFGNw3i.mjs} +4 -4
  69. package/dist/{containers-D4sa-Eoy.mjs → containers-B06OGOEB.mjs} +212 -212
  70. package/dist/{containers-Db-eWudu.mjs → containers-DCzQCo79.mjs} +8 -8
  71. package/dist/{content-scan-DUVq09i8.mjs → content-scan-XhnNJqXf.mjs} +4 -4
  72. package/dist/{context-BvLXzoMs.mjs → context-BY1Eh_Qe.mjs} +1 -1
  73. package/dist/{cps-CqaRliZZ.mjs → cps-CohlxvuN.mjs} +2 -2
  74. package/dist/create-DmLDMvrj.mjs +2 -0
  75. package/dist/{csam-scanner-DsXvOOsZ.mjs → csam-scanner-BV4bHq8v.mjs} +2 -4
  76. package/dist/custom-csrs-BVdMQjYq.mjs +18 -0
  77. package/dist/{custom-hostnames-Cj_csfo_.mjs → custom-hostnames-r-CxhSa1.mjs} +5 -5
  78. package/dist/custom-nameservers-CapMDyly.mjs +12 -0
  79. package/dist/custom-pages-BVIniWfq.mjs +38 -0
  80. package/dist/d1-nJCOJZb8.mjs +50 -0
  81. package/dist/{delegate-CMfEjvHn.mjs → delegate-CcL6RoGw.mjs} +1 -1
  82. package/dist/delegate.mjs +1 -1
  83. package/dist/{deploy-DDbmxkiX.mjs → deploy-DJMnWFNk.mjs} +1 -1
  84. package/dist/{deploy-context-DsEVu7bf.mjs → deploy-context-YCW3eqP1.mjs} +15 -15
  85. package/dist/{deploy-input-BA_3Q2Xu.mjs → deploy-input-CQLBXFEB.mjs} +1 -1
  86. package/dist/{dev-BS156bim.mjs → dev-GsYHvMah.mjs} +1 -1
  87. package/dist/{diagnostics-BmkQnSEb.mjs → diagnostics-C3nqxsAO.mjs} +4 -4
  88. package/dist/{dist-DehXZozc.mjs → dist-D-ihn_mV.mjs} +42 -33
  89. package/dist/{dls-DciZC_gQ.mjs → dls-N1x8sAK3.mjs} +3 -3
  90. package/dist/{dns-C2YPspGN.mjs → dns-DATWP-PF.mjs} +36 -30
  91. package/dist/{dns-firewall-CRfde07f.mjs → dns-firewall-n3Y2ui6W.mjs} +8 -8
  92. package/dist/{docs-CYjyBA8q.mjs → docs-CRc_WOXh.mjs} +1 -1
  93. package/dist/{dry-run-gy0Hl9xo.mjs → dry-run-kJbjn4kG.mjs} +1 -1
  94. package/dist/{durable-objects-DcI97y4p.mjs → durable-objects-DHK9w-vO.mjs} +2 -2
  95. package/dist/{email-auth-CMCQAu99.mjs → email-auth-ptdqNSTZ.mjs} +1 -1
  96. package/dist/email-domains-uL22-zRY.mjs +14 -0
  97. package/dist/{email-routing-7p9dr5Ue.mjs → email-routing-CV43rMJC.mjs} +15 -13
  98. package/dist/{email-security-Bu0fAYh-.mjs → email-security-DK_SJ0yi.mjs} +38 -38
  99. package/dist/{email-sending-OpMZNaHZ.mjs → email-sending-CTQafGec.mjs} +17 -17
  100. package/dist/{error-sanitization-DG8WSzHe.mjs → error-sanitization-BkgtZ0Vx.mjs} +1 -1
  101. package/dist/error-sanitization-D069tpKk.mjs +2 -0
  102. package/dist/{errors-C5RGao2J.mjs → errors-VG1mgwJl.mjs} +1 -1
  103. package/dist/{field-extractors-BfsNjd0e.mjs → field-extractors-jcZ_bAGc.mjs} +2 -2
  104. package/dist/{firewall-CJ-VIOk1.mjs → firewall-CW-fAI9m.mjs} +30 -14
  105. package/dist/{flagship-C5PTR1ND.mjs → flagship-RiLnDwfJ.mjs} +8 -8
  106. package/dist/{fraud-B7hwBheX.mjs → fraud-DvfBBTe8.mjs} +2 -2
  107. package/dist/get-3XNn0upb.mjs +2 -0
  108. package/dist/global-options-DiKj2cQy.mjs +2 -0
  109. package/dist/{google-tag-gateway-D7iFDVEa.mjs → google-tag-gateway-C5WYsSXv.mjs} +2 -2
  110. package/dist/{healthchecks-B4jTcKV7.mjs → healthchecks-BA1fmzTm.mjs} +5 -5
  111. package/dist/{hyperdrive-1432DM-p.mjs → hyperdrive-Ch6klUp3.mjs} +4 -4
  112. package/dist/iam-LlGEzRCq.mjs +62 -0
  113. package/dist/{images-Ttea4khD.mjs → images-C5WqUXkK.mjs} +11 -11
  114. package/dist/index.mjs +1 -1
  115. package/dist/{init-BeYrAg7Q.mjs → init-EVsjBrOz.mjs} +2 -2
  116. package/dist/{intel-CJznBf5n.mjs → intel-vcWyslaX.mjs} +18 -19
  117. package/dist/{interactive-DsU8VDvK.mjs → interactive-BCDFSPtq.mjs} +1 -1
  118. package/dist/{internal-DOho_iA0.mjs → internal-BhV9WjLp.mjs} +1 -1
  119. package/dist/{ips-BgNoRwFN.mjs → ips-CqHjVsqd.mjs} +1 -1
  120. package/dist/{k2-Cj1ORHul.mjs → k2-CZT2Pd5J.mjs} +2 -2
  121. package/dist/kv-Ipa7dnvF.mjs +12 -0
  122. package/dist/{lazy-command-DeTzOWvU.mjs → lazy-command-DbKVgdGT.mjs} +1 -1
  123. package/dist/{leaked-credential-checks-21Wc7OqL.mjs → leaked-credential-checks-EzT4TTjO.mjs} +4 -4
  124. package/dist/{live-BfrWKfq8.mjs → live-C9L1bNuE.mjs} +1 -1
  125. package/dist/load-balancers-Cb3VkSfc.mjs +84 -0
  126. package/dist/local-D5Vq6ooZ.mjs +2 -0
  127. package/dist/{local-CvzO-cQH.mjs → local-DIJ7SIKC.mjs} +1 -1
  128. package/dist/{local-runtime-DOpR_Tnc.mjs → local-runtime-BZjgkacr.mjs} +1 -1
  129. package/dist/{login-CVWkMh1L.mjs → login-DG5ebyab.mjs} +1 -1
  130. package/dist/login-DRJugxya.mjs +2 -0
  131. package/dist/logpush-C5Gw7F_9.mjs +68 -0
  132. package/dist/logs-y3REfHbb.mjs +51 -0
  133. package/dist/magic-network-monitoring-BZBGZB6M.mjs +34 -0
  134. package/dist/{magic-transit-BhP424T-.mjs → magic-transit-BPV_POf5.mjs} +129 -129
  135. package/dist/{managed-defense-6l_B3hn_.mjs → managed-defense-BaUBSUcz.mjs} +3 -3
  136. package/dist/{managed-transforms-D7FMBsnq.mjs → managed-transforms-CjkjLzMC.mjs} +2 -2
  137. package/dist/{mcp-BUOfMkBP.mjs → mcp-RPtrISTy.mjs} +6 -6
  138. package/dist/{mesh-B1RrhAT1.mjs → mesh-DZ4QHBPE.mjs} +5 -5
  139. package/dist/{migrate-BTU8AvlP.mjs → migrate-CRIUqGi2.mjs} +1 -1
  140. package/dist/{monetization-Da3ooFLC.mjs → monetization-CVZqM8Xo.mjs} +9 -5
  141. package/dist/{network-CjhSzhMm.mjs → network-DLt2JUo1.mjs} +15 -15
  142. package/dist/{network-interconnects-DEQD6GM8.mjs → network-interconnects-9nS5jL__.mjs} +10 -10
  143. package/dist/o11y-ySxrnP1Z.mjs +88 -0
  144. package/dist/{oauth-Dnog5v-Q.mjs → oauth-CFVUl-Wv.mjs} +1 -1
  145. package/dist/{oauth-DdXkpU44.mjs → oauth-Cidoyxfp.mjs} +1 -1
  146. package/dist/observability-C-KNh__y.mjs +4 -0
  147. package/dist/ohttp-gateway-B5nCl4s3.mjs +8 -0
  148. package/dist/organizations-DbeeWUL4.mjs +71 -0
  149. package/dist/output-BZQEl3mK.mjs +2 -0
  150. package/dist/package-B7RgwuFR.mjs +2 -0
  151. package/dist/{page-rules-D2eFbKWb.mjs → page-rules-DRw763O1.mjs} +4 -4
  152. package/dist/{pages-DYZDvWK6.mjs → pages-DfQnxiTk.mjs} +12 -12
  153. package/dist/{pay-per-crawl-CgPFv5HT.mjs → pay-per-crawl-EHYtSKxX.mjs} +13 -13
  154. package/dist/{pay-per-use-BIQrsrTy.mjs → pay-per-use-wdEhl8k4.mjs} +14 -12
  155. package/dist/{pipelines-D6pkhlpm.mjs → pipelines-DbyrI6F4.mjs} +11 -11
  156. package/dist/precursor-Dx8lN4UJ.mjs +4 -0
  157. package/dist/previews-DEVNSip2.mjs +6 -0
  158. package/dist/{progress-B-CVX0kn.mjs → progress-yvPscjYg.mjs} +1 -1
  159. package/dist/{prompt-DJF_Rs5S.mjs → prompt-CEpZ-lQZ.mjs} +1 -1
  160. package/dist/{queues-DaqLO-UO.mjs → queues-DgMc7Z6A.mjs} +18 -18
  161. package/dist/{r2-DDIU9JN3.mjs → r2-BpTVicIq.mjs} +43 -43
  162. package/dist/{radar-D59qCgld.mjs → radar-DW-S1VUh.mjs} +11 -11
  163. package/dist/{raw-fetch-BrOxDN9k.mjs → raw-fetch-Cl5spWC3.mjs} +1 -1
  164. package/dist/{ready-DgE08svD.mjs → ready-d0li0X6r.mjs} +1 -1
  165. package/dist/realtime-DMKHLYF4.mjs +170 -0
  166. package/dist/registrar-D23gfKBi.mjs +43 -0
  167. package/dist/{registrar-sandbox-uzs3eOKk.mjs → registrar-sandbox-lVLB1-mC.mjs} +4 -4
  168. package/dist/{reporting-Dx2YTick.mjs → reporting-WX8P3Y0k.mjs} +2 -2
  169. package/dist/{request-headers-DHzBX7dQ.mjs → request-headers-C0FpeBhz.mjs} +1 -1
  170. package/dist/{request-tracers-B49cBKkj.mjs → request-tracers-qd7XOAka.mjs} +2 -2
  171. package/dist/resource-sharing-B2ZSt_cA.mjs +36 -0
  172. package/dist/{rules-CjgLSlUC.mjs → rules-CB0QQTB3.mjs} +5 -5
  173. package/dist/rulesets-DmqwixUC.mjs +42 -0
  174. package/dist/{rum-vPEpMS_h.mjs → rum-BZ_24qZU.mjs} +9 -9
  175. package/dist/{run-BZ6Fj3jQ.mjs → run-BOKI1uWa.mjs} +1 -1
  176. package/dist/run-DBqOjD1P.mjs +2 -0
  177. package/dist/{schema-DuLIZRhA.mjs → schema-Dj9STsWI.mjs} +1 -1
  178. package/dist/{schema-cache-C_rvto6Y.mjs → schema-cache-5NkOj7Y3.mjs} +1 -1
  179. package/dist/schema-flags-CXm9iIv6.mjs +4 -0
  180. package/dist/{scim-BA7XbsSu.mjs → scim-DchxaJfE.mjs} +8 -8
  181. package/dist/{secrets-store-MEUNt1Ph.mjs → secrets-store-oAft1cFE.mjs} +5 -5
  182. package/dist/security-insights-DMm0qg_m.mjs +62 -0
  183. package/dist/{security-txt-DikhnR2L.mjs → security-txt-CIt0494b.mjs} +2 -2
  184. package/dist/{session-BOnam-Wv.mjs → session-vzNfUhPl.mjs} +1 -1
  185. package/dist/{shared-DmmWSObC.mjs → shared-MK-_lkbn.mjs} +1 -1
  186. package/dist/{signed-url-C-24KbWB.mjs → signed-url-gNangfwc.mjs} +1 -1
  187. package/dist/{smart-shield-DPqLMz7M.mjs → smart-shield-Boy_qbqd.mjs} +6 -6
  188. package/dist/{snippets-Bi3Uq1DF.mjs → snippets-DdoDYXW-.mjs} +3 -3
  189. package/dist/{spawn-C3hzWVrJ.mjs → spawn-B5F4OIHG.mjs} +1 -1
  190. package/dist/{spectrum-BaWKMoAl.mjs → spectrum-DLYIHelC.mjs} +3 -3
  191. package/dist/{speed-DShjlpAs.mjs → speed-DugG9Tm9.mjs} +2 -2
  192. package/dist/{sql-DCoFf15T.mjs → sql-Bb56llsb.mjs} +2 -2
  193. package/dist/src-BoSDeQ9m.mjs +133 -0
  194. package/dist/{ssl-C4nt4pJK.mjs → ssl-Bg4X3WGk.mjs} +24 -24
  195. package/dist/startup-profile-DQVkZZpb.mjs +2 -0
  196. package/dist/{startup-profile-CFJ_Lu1c.mjs → startup-profile-DZL2DC44.mjs} +1 -1
  197. package/dist/state-DW3QZtfh.mjs +2 -0
  198. package/dist/{state-DmjHXZat.mjs → state-mr5ux1Nb.mjs} +1 -1
  199. package/dist/{stream-CpZbnSpH.mjs → stream-BuZYDbNR.mjs} +21 -21
  200. package/dist/{tags-BIjQ3Kjh.mjs → tags-SKz2odE_.mjs} +12 -6
  201. package/dist/{telemetry-BDhqOpUw.mjs → telemetry-B4zmCpT0.mjs} +1 -1
  202. package/dist/telemetry-DkDUr4KK.mjs +2 -0
  203. package/dist/tenant-custom-nameservers-BhkhBerL.mjs +8 -0
  204. package/dist/tenants-DD-GMq0K.mjs +13 -0
  205. package/dist/{tools-C-vmgYSv.mjs → tools-KW_4hvzY.mjs} +1 -1
  206. package/dist/{tunnels-CXAO2CeL.mjs → tunnels-D90ztENM.mjs} +6 -6
  207. package/dist/{turnstile-Ctm0rs0q.mjs → turnstile-DhSU_Xar.mjs} +4 -4
  208. package/dist/ui-xjCox-gU.mjs +2 -0
  209. package/dist/{update-check-D_Wtw0_D.mjs → update-check-CRttabfu.mjs} +1 -1
  210. package/dist/{update-check-Dc7cRFlx.mjs → update-check-HltjTMDE.mjs} +1 -1
  211. package/dist/update-check-worker.mjs +1 -1
  212. package/dist/{url-normalization-DOfc2Q7a.mjs → url-normalization-K7gkmPvG.mjs} +2 -2
  213. package/dist/{url-scanner-J8M3X2tR.mjs → url-scanner-BRdWwka4.mjs} +3 -3
  214. package/dist/{user-BaF0qvvO.mjs → user-Cmb1_Wu5.mjs} +50 -52
  215. package/dist/{vectorize-D5qiggZU.mjs → vectorize-BTBerJME.mjs} +11 -11
  216. package/dist/verify-B9ILCohg.mjs +2 -0
  217. package/dist/verify-BCuWaO-L.mjs +2 -0
  218. package/dist/version-6Bpy6Bgt.mjs +2 -0
  219. package/dist/{waiting-rooms-BdmAq7ul.mjs → waiting-rooms-LymmKIGr.mjs} +16 -14
  220. package/dist/{web-assets-BySw_Tme.mjs → web-assets-LHPQsrnY.mjs} +21 -21
  221. package/dist/{web3-BKkKf1RF.mjs → web3-BsOio0Ae.mjs} +12 -12
  222. package/dist/workers-BnLiOjZf.mjs +39 -0
  223. package/dist/{workers-builds-CVJ4FqzB.mjs → workers-builds-sKpITeRk.mjs} +4 -4
  224. package/dist/{workers-for-platforms-mzdtmr6r.mjs → workers-for-platforms-BGp6yr6P.mjs} +9 -9
  225. package/dist/workers-vpc-D8lefWDo.mjs +12 -0
  226. package/dist/{workflows-Cr957c4U.mjs → workflows-B-ZIG3y7.mjs} +22 -22
  227. package/dist/{wrangler-migration-DZV7-4Fp.mjs → wrangler-migration-6E6wT_LZ.mjs} +67 -58
  228. package/dist/zaraz-BBKki5WS.mjs +22 -0
  229. package/dist/{zero-trust-BVCvQJ4e.mjs → zero-trust-BZDXM5r6.mjs} +487 -409
  230. package/dist/{zones-BzyjOT10.mjs → zones-B-UV_DGE.mjs} +24 -24
  231. package/package.json +16 -16
  232. package/dist/abuse-reports-zPrsxbRz.mjs +0 -24
  233. package/dist/ai-audit-DI4Rw2wl.mjs +0 -6
  234. package/dist/ai-search-QOenIzDL.mjs +0 -74
  235. package/dist/analytics-CQ-Yt1mm.mjs +0 -17
  236. package/dist/analytics-engine-CdrY5-95.mjs +0 -4
  237. package/dist/api-X3wKppsT.mjs +0 -3
  238. package/dist/argo-BiefH8wc.mjs +0 -14
  239. package/dist/auth-Czzy5Rs_.mjs +0 -2
  240. package/dist/auth-D5Yj9eYU.mjs +0 -2
  241. package/dist/billing-BrLJqlOf.mjs +0 -22
  242. package/dist/body-parser-BKcZS9iJ.mjs +0 -2
  243. package/dist/bot-management-BSBVuKc0.mjs +0 -9
  244. package/dist/brand-protection-Byoa1hvj.mjs +0 -26
  245. package/dist/browser-run-BSVANGzU.mjs +0 -40
  246. package/dist/build-CPKxZ3kL.mjs +0 -2
  247. package/dist/build-Dwd1_7o0.mjs +0 -2
  248. package/dist/cache-0xCdyNg9.mjs +0 -36
  249. package/dist/chunk-3PJ54H4K-CY8EY_n2.mjs +0 -363
  250. package/dist/create-BtmuVqVL.mjs +0 -2
  251. package/dist/custom-csrs-Dl_daAbX.mjs +0 -10
  252. package/dist/custom-nameservers-Bw2P7F_W.mjs +0 -8
  253. package/dist/custom-pages-CJ7ecSX6.mjs +0 -20
  254. package/dist/d1-BsWI546w.mjs +0 -89
  255. package/dist/email-domains-1Nx60ETD.mjs +0 -12
  256. package/dist/error-sanitization-B025CygB.mjs +0 -2
  257. package/dist/get-Be821dio.mjs +0 -2
  258. package/dist/iam-DuZenYtc.mjs +0 -48
  259. package/dist/kv-CTyuvcAz.mjs +0 -12
  260. package/dist/load-balancers-DMTsh-9q.mjs +0 -72
  261. package/dist/local-CWTti4ot.mjs +0 -2
  262. package/dist/login-Djz5mvHJ.mjs +0 -2
  263. package/dist/logpush-OMhp7VgE.mjs +0 -44
  264. package/dist/logs-BSyyNwso.mjs +0 -35
  265. package/dist/magic-cloud-networking-DD29yMnE.mjs +0 -68
  266. package/dist/magic-network-monitoring-DRRvSrDP.mjs +0 -34
  267. package/dist/o11y-DeNxXxcp.mjs +0 -86
  268. package/dist/oauth-clients-UnbMcHkx.mjs +0 -14
  269. package/dist/oauth-scopes-DbtnZVO4.mjs +0 -4
  270. package/dist/organization-IsxVyWol.mjs +0 -73
  271. package/dist/organizations-p8Mgo8A7.mjs +0 -4
  272. package/dist/origin-post-quantum-encryption-Bwysyttf.mjs +0 -6
  273. package/dist/output-BJEgbI0G.mjs +0 -2
  274. package/dist/package-BOE_De2L.mjs +0 -2
  275. package/dist/precursor-B35P8h6h.mjs +0 -4
  276. package/dist/previews-B1mqjXaJ.mjs +0 -6
  277. package/dist/realtime-DWjdrDzv.mjs +0 -168
  278. package/dist/registrar-uYOU1U27.mjs +0 -43
  279. package/dist/resource-sharing-CIsLVAcK.mjs +0 -36
  280. package/dist/rulesets-C7_aZA7m.mjs +0 -34
  281. package/dist/run-D4-K_cbQ.mjs +0 -2
  282. package/dist/schema-flags-Cr6kleor.mjs +0 -4
  283. package/dist/security-insights-ZKtey62s.mjs +0 -40
  284. package/dist/src-jyCTFHcS.mjs +0 -131
  285. package/dist/startup-profile-D_Qjgca1.mjs +0 -2
  286. package/dist/state-C7lNNN31.mjs +0 -2
  287. package/dist/telemetry-BZdRnr26.mjs +0 -2
  288. package/dist/tenant-CqYoylyU.mjs +0 -10
  289. package/dist/tenant-custom-nameservers-DDzzdyY3.mjs +0 -8
  290. package/dist/ui-BUCBQ3Sq.mjs +0 -2
  291. package/dist/version-DNcdABcr.mjs +0 -2
  292. package/dist/workers-TS0oQ-XH.mjs +0 -39
  293. package/dist/workers-vpc-xB1hHFPd.mjs +0 -12
  294. package/dist/zaraz-C8__FhOh.mjs +0 -22
@@ -1,24 +1,24 @@
1
1
  #!/usr/bin/env node
2
- import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CvzO-cQH.mjs";import{i as n,n as r}from"./auth-D5Yj9eYU.mjs";import{a as i,t as a}from"./context-BvLXzoMs.mjs";import{t as o}from"./output-BJEgbI0G.mjs";import{t as s}from"./dry-run-gy0Hl9xo.mjs";import{t as c}from"./progress-B-CVX0kn.mjs";import{t as l}from"./run-BZ6Fj3jQ.mjs";import"./telemetry-BZdRnr26.mjs";import{a as u,n as d,r as f,t as p}from"./body-parser-BKcZS9iJ.mjs";import{n as m}from"./input-validation-D7z60HJH.mjs";import{a as h,n as g}from"./prompt-DJF_Rs5S.mjs";var _={method:`POST`,path:t=>e`/accounts/${t.account_id}/flagship/apps`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function v(e){return e.usage(`$0 flagship apps create
2
+ import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-DIJ7SIKC.mjs";import{i as n,n as r}from"./auth-B-h0BHg7.mjs";import{a as i,t as a}from"./context-BY1Eh_Qe.mjs";import{t as o}from"./output-BZQEl3mK.mjs";import{t as s}from"./dry-run-kJbjn4kG.mjs";import{t as c}from"./progress-yvPscjYg.mjs";import{t as l}from"./run-BOKI1uWa.mjs";import"./telemetry-DkDUr4KK.mjs";import{a as u,n as d,r as f,t as p}from"./body-parser-DoewLePl.mjs";import{n as m}from"./input-validation-D7z60HJH.mjs";import{a as h,n as g}from"./prompt-CEpZ-lQZ.mjs";var _={method:`POST`,path:t=>e`/accounts/${t.account_id}/flagship/apps`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function v(e){return e.usage(`$0 flagship apps create
3
3
 
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 y={command:`create`,describe:`Create app`,builder:v,handler:async e=>l({command:`flagship apps create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf flagship apps create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/flagship/apps`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({name:m(e.name,`name`,`text`)}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Creating`,async()=>n.send(_,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}e.name===void 0&&(e.name=await h(`name`,`Name of the Flagship app (1–64 letters, numbers, hyphens, or underscores).`));let u=p({name:m(e.name,`name`,`text`)}),f=await c(`Creating`,async()=>n.send(_,{body:u,account_id:l}));o(f,{successLabel:`Created`})})};function b(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 x={command:`get <app-id>`,describe:`Get flag definitions`,builder:b,handler:async e=>l({command:`flagship apps definitions get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={};if(e[`if-none-match`]!==void 0&&(l[`If-None-Match`]=String(e[`if-none-match`])),e.dryRun){let t=await i();s({command:`cf flagship apps definitions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/flagship/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/definitions`,pathParams:{"app-id":String(e[`app-id`]??``)},bodyKind:`none`});return}let u=await r(e),d=e.local?t:await a();e.accountId=d;let f=await c(`Loading`,async()=>n(u,`GET`,`/accounts/${d}/flagship/apps/${encodeURIComponent(String(e[`app-id`]))}/definitions`,{headers:Object.keys(l).length>0?l:void 0}));o(f,{successLabel:`Loaded`})})},ee={command:`definitions`,describe:`Operations for apps.definitions`,builder:e=>e.command(x).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var te={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/flagship/apps/${t.app_id}`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function S(e){return e.usage(`$0 flagship apps delete <app-id>
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 y={command:`create`,describe:`Create app`,builder:v,handler:async e=>l({command:`flagship apps create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf flagship apps create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/flagship/apps`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({name:m(e.name,`name`,`text`)}):d(e.body)});return}let n=e.body===void 0?void 0:d(e.body),l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body!==void 0){let e=n,t=await c(`Creating`,async()=>l.send(_,{body:e,account_id:u}));o(t,{successLabel:`Created`});return}e.name===void 0&&(e.name=await h(`name`,`Name of the Flagship app (1–64 letters, numbers, hyphens, or underscores).`));let f=p({name:m(e.name,`name`,`text`)}),g=await c(`Creating`,async()=>l.send(_,{body:f,account_id:u}));o(g,{successLabel:`Created`})})};function b(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 x={command:`get <app-id>`,describe:`Get flag definitions`,builder:b,handler:async e=>l({command:`flagship apps definitions get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={};if(e[`if-none-match`]!==void 0&&(l[`If-None-Match`]=String(e[`if-none-match`])),e.dryRun){let t=await i();s({command:`cf flagship apps definitions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/flagship/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/definitions`,pathParams:{"app-id":String(e[`app-id`]??``)},bodyKind:`none`});return}let u=await r(e),d=e.local?t:await a();e.accountId=d;let f=await c(`Loading`,async()=>n(u,`GET`,`/accounts/${d}/flagship/apps/${encodeURIComponent(String(e[`app-id`]))}/definitions`,{headers:Object.keys(l).length>0?l:void 0}));o(f,{successLabel:`Loaded`})})},S={command:`definitions`,describe:`Operations for apps.definitions`,builder:e=>e.command(x).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ee={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/flagship/apps/${t.app_id}`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function te(e){return e.usage(`$0 flagship apps delete <app-id>
5
5
 
6
- Deletes an app and all its flags and changelog history. Returns 409 if any Worker still references this app via a Flagship binding.`).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}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const C={command:`delete <app-id>`,describe:`Delete app`,builder:S,handler:async e=>l({command:`flagship apps delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf flagship apps delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/flagship/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}`,pathParams:{"app-id":String(e[`app-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await g({force:!!e.force,message:`Delete this Flagship app, all of its flags, and all changelog history? This action cannot be undone.`}))return;let u=await c(`Deleting`,async()=>n.send(te,{account_id:l,app_id:e[`app-id`]}));o(u,{successLabel:`Deleted`})})};var w={method:`GET`,path:t=>e`/accounts/${t.account_id}/flagship/apps/${t.app_id}/evaluate`,query:[`flagKey`,`targetingKey`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`,503:`ServiceUnavailableError`}};function T(e){return e.usage(`$0 flagship apps evaluate get <app-id>
6
+ Deletes an app and all its flags and changelog history. Returns 409 if any Worker still references this app via a Flagship binding.`).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}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const C={command:`delete <app-id>`,describe:`Delete app`,builder:te,handler:async e=>l({command:`flagship apps delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf flagship apps delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/flagship/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}`,pathParams:{"app-id":String(e[`app-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await g({force:!!e.force,message:`Delete this Flagship app, all of its flags, and all changelog history? This action cannot be undone.`}))return;let u=await c(`Deleting`,async()=>n.send(ee,{account_id:l,app_id:e[`app-id`]}));o(u,{successLabel:`Deleted`})})};var w={method:`GET`,path:t=>e`/accounts/${t.account_id}/flagship/apps/${t.app_id}/evaluate`,query:[`flagKey`,`targetingKey`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`,503:`ServiceUnavailableError`}};function T(e){return e.usage(`$0 flagship apps evaluate get <app-id>
7
7
 
8
8
  Evaluates a flag against the provided context. Pass context attributes as query parameters; values are coerced to numbers or booleans where unambiguous. For low-latency in-Worker evaluation, prefer the Flagship binding over this endpoint.`).positional(`app-id`,{type:`string`,description:`Flagship app ID returned when the app was created.`,demandOption:!0}).option(`flag-key`,{type:`string`,description:`The flag key to evaluate.`,demandOption:!0}).option(`targeting-key`,{type:`string`,description:`Context targeting key (per OpenFeature spec); used for percentage rollout bucketing.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`get <app-id>`,describe:`Evaluate flag from query context`,builder:T,handler:async e=>l({command:`flagship apps evaluate get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={flagKey:e[`flag-key`],targetingKey:e[`targeting-key`]};if(e.dryRun){let t=await i();s({command:`cf flagship apps evaluate get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/flagship/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/evaluate`,pathParams:{"app-id":String(e[`app-id`]??``)},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(w,{account_id:u,app_id:e[`app-id`],...n}));o(d,{successLabel:`Loaded`})})},D={command:`evaluate`,describe:`Operations for apps.evaluate`,builder:e=>e.command(E).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var O={method:`GET`,path:t=>e`/accounts/${t.account_id}/flagship/apps/${t.app_id}/flags/${t.flag_key}/changelog`,query:[`limit`,`cursor`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function k(e){return e.usage(`$0 flagship apps flags changelog list
9
9
 
10
- 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 A={command:`list`,describe:`List flag changelog entries`,builder:k,handler:async e=>l({command:`flagship apps flags changelog list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={limit:e.limit,cursor:e.cursor};if(e.dryRun){let t=await i();s({command:`cf flagship apps flags changelog list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/flagship/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/flags/${e[`flag-key`]==null?`<flag-key>`:encodeURIComponent(String(e[`flag-key`]))}/changelog`,pathParams:{"app-id":String(e[`app-id`]??``),"flag-key":String(e[`flag-key`]??``)},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(O,{account_id:u,app_id:e[`app-id`],flag_key:e[`flag-key`],...n}));o(d,{successLabel:`Loaded`})})},j={command:`changelog`,describe:`Operations for apps.flags.changelog`,builder:e=>e.command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var M={method:`POST`,path:t=>e`/accounts/${t.account_id}/flagship/apps/${t.app_id}/flags`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function N(e){return e.usage("$0 flagship apps flags create <app-id>\n\nCreates a flag. Returns 409 if the key already exists. `type` is always inferred from variation values; legacy request-side values are ignored. Optional `metadata` can be attached at creation.").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(`metadata`,{type:`string`,description:"Key-value metadata associated with the flag. `null` or an empty object clears existing metadata; omission semantics depend on the endpoint (PUT clears it, PATCH preserves it). Provide as a JSON object or @path/to/file.json."}).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=>m(e,`type`,`text`)).option(`variations`,{type:`string`,description:`Map of variation name to value. All values share the same type (boolean, string, number, or JSON object/array), and each serialized value stays within 10KB. Provide as a JSON object or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const P={command:`create <app-id>`,describe:`Create flag`,builder:N,handler:async e=>l({command:`flagship apps flags create`,classification:{safeFlags:[`enabled`,`type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf flagship apps flags create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/flagship/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/flags`,pathParams:{"app-id":String(e[`app-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({default_variation:m(e[`default-variation`],`default-variation`,`text`),description:m(e.description,`description`,`text`),enabled:e.enabled,key:m(e.key,`key`,`text`),metadata:f(e.metadata,`metadata`),rules:u(e.rules,`rules`),type:e.type,variations:f(e.variations,`variations`,!0)},[[`metadata`],[`variations`]]):d(e.body,[{path:[`variations`],flag:`variations`}])});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body,[{path:[`variations`],flag:`variations`}]),r=await c(`Creating`,async()=>n.send(M,{body:t,account_id:l,app_id:e[`app-id`]}));o(r,{successLabel:`Created`});return}if(e[`default-variation`]===void 0&&(e[`default-variation`]=await h(`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`.")),e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);if(e.key===void 0&&(e.key=await h(`key`,`Unique identifier for the flag within an app. Used in all evaluation and SDK calls.`)),e.rules===void 0)throw Error(`--rules is required (or pass --body with this field set).`);if(e.variations===void 0)throw Error(`--variations is required (or pass --body with this field set).`);let g=p({default_variation:m(e[`default-variation`],`default-variation`,`text`),description:m(e.description,`description`,`text`),enabled:e.enabled,key:m(e.key,`key`,`text`),metadata:f(e.metadata,`metadata`),rules:u(e.rules,`rules`),type:e.type,variations:f(e.variations,`variations`,!0)},[[`metadata`],[`variations`]]),_=await c(`Creating`,async()=>n.send(M,{body:g,account_id:l,app_id:e[`app-id`]}));o(_,{successLabel:`Created`})})};var F={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/flagship/apps/${t.app_id}/flags/${t.flag_key}`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function I(e){return e.usage(`$0 flagship apps flags delete <flag-key>
10
+ 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 A={command:`list`,describe:`List flag changelog entries`,builder:k,handler:async e=>l({command:`flagship apps flags changelog list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={limit:e.limit,cursor:e.cursor};if(e.dryRun){let t=await i();s({command:`cf flagship apps flags changelog list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/flagship/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/flags/${e[`flag-key`]==null?`<flag-key>`:encodeURIComponent(String(e[`flag-key`]))}/changelog`,pathParams:{"app-id":String(e[`app-id`]??``),"flag-key":String(e[`flag-key`]??``)},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(O,{account_id:u,app_id:e[`app-id`],flag_key:e[`flag-key`],...n}));o(d,{successLabel:`Loaded`})})},j={command:`changelog`,describe:`Operations for apps.flags.changelog`,builder:e=>e.command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var M={method:`POST`,path:t=>e`/accounts/${t.account_id}/flagship/apps/${t.app_id}/flags`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function N(e){return e.usage("$0 flagship apps flags create <app-id>\n\nCreates a flag. Returns 409 if the key already exists. `type` is always inferred from variation values; legacy request-side values are ignored. Optional `metadata` can be attached at creation.").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(`metadata`,{type:`string`,description:"Key-value metadata associated with the flag. `null` or an empty object clears existing metadata; omission semantics depend on the endpoint (PUT clears it, PATCH preserves it). Provide as a JSON object or @path/to/file.json."}).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=>m(e,`type`,`text`)).option(`variations`,{type:`string`,description:`Map of variation name to value. All values share the same type (boolean, string, number, or JSON object/array), and each serialized value stays within 10KB. Provide as a JSON object or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const P={command:`create <app-id>`,describe:`Create flag`,builder:N,handler:async e=>l({command:`flagship apps flags create`,classification:{safeFlags:[`enabled`,`type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf flagship apps flags create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/flagship/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/flags`,pathParams:{"app-id":String(e[`app-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({default_variation:m(e[`default-variation`],`default-variation`,`text`),description:m(e.description,`description`,`text`),enabled:e.enabled,key:m(e.key,`key`,`text`),metadata:f(e.metadata,`metadata`),rules:u(e.rules,`rules`),type:e.type,variations:f(e.variations,`variations`,!0)},[[`metadata`],[`variations`]]):d(e.body,[{path:[`variations`],flag:`variations`}])});return}let n=e.body===void 0?void 0:d(e.body,[{path:[`variations`],flag:`variations`}]),l=await r(e),g=e.local?t:await a();if(e.accountId=g,e.body!==void 0){let t=n,r=await c(`Creating`,async()=>l.send(M,{body:t,account_id:g,app_id:e[`app-id`]}));o(r,{successLabel:`Created`});return}if(e[`default-variation`]===void 0&&(e[`default-variation`]=await h(`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`.")),e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);if(e.key===void 0&&(e.key=await h(`key`,`Unique identifier for the flag within an app. Used in all evaluation and SDK calls.`)),e.rules===void 0)throw Error(`--rules is required (or pass --body with this field set).`);if(e.variations===void 0)throw Error(`--variations is required (or pass --body with this field set).`);let _=p({default_variation:m(e[`default-variation`],`default-variation`,`text`),description:m(e.description,`description`,`text`),enabled:e.enabled,key:m(e.key,`key`,`text`),metadata:f(e.metadata,`metadata`),rules:u(e.rules,`rules`),type:e.type,variations:f(e.variations,`variations`,!0)},[[`metadata`],[`variations`]]),v=await c(`Creating`,async()=>l.send(M,{body:_,account_id:g,app_id:e[`app-id`]}));o(v,{successLabel:`Created`})})};var F={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/flagship/apps/${t.app_id}/flags/${t.flag_key}`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function I(e){return e.usage(`$0 flagship apps flags delete <flag-key>
11
11
 
12
12
  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 L={command:`delete <flag-key>`,describe:`Delete flag`,builder:I,handler:async e=>l({command:`flagship apps flags delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf flagship apps flags delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/flagship/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/flags/${e[`flag-key`]==null?`<flag-key>`:encodeURIComponent(String(e[`flag-key`]))}`,pathParams:{"app-id":String(e[`app-id`]??``),"flag-key":String(e[`flag-key`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await g({force:!!e.force,message:`Delete this feature flag? After the deletion propagates, evaluation requests can no longer resolve it. This action cannot be undone.`}))return;let u=await c(`Deleting`,async()=>n.send(F,{account_id:l,app_id:e[`app-id`],flag_key:e[`flag-key`]}));o(u,{successLabel:`Deleted`})})};var R={method:`POST`,path:t=>e`/accounts/${t.account_id}/flagship/apps/${t.app_id}/evaluate`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`,503:`ServiceUnavailableError`}};function z(e){return e.usage(`$0 flagship apps flags evaluate <app-id>
13
13
 
14
- Evaluates a flag against the provided context, passed as a JSON request body (OFREP-shaped) rather than query parameters. Returns the same response shape as the GET variant.`).positional(`app-id`,{type:`string`,description:`Flagship app ID returned when the app was created.`,demandOption:!0}).option(`context`,{type:`string`,description:`Evaluation attributes keyed by name. Values may be any JSON value; the context supports up to 100 entries, nesting depth of 10, 10,000 values, and 32 KB. Provide as a JSON object or @path/to/file.json.`}).option(`flag-key`,{type:`string`,description:`Key of the flag to evaluate within the app.`}).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:`evaluate <app-id>`,describe:`Evaluate flag with JSON context`,builder:z,handler:async e=>l({command:`flagship apps flags evaluate`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf flagship apps flags evaluate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/flagship/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/evaluate`,pathParams:{"app-id":String(e[`app-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({context:f(e.context,`context`),flagKey:m(e[`flag-key`],`flag-key`,`text`)},[[`context`]]):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Creating`,async()=>n.send(R,{body:t,account_id:l,app_id:e[`app-id`]}));o(r,{successLabel:`Created`});return}e[`flag-key`]===void 0&&(e[`flag-key`]=await h(`flag-key`,`Key of the flag to evaluate within the app.`));let u=p({context:f(e.context,`context`),flagKey:m(e[`flag-key`],`flag-key`,`text`)},[[`context`]]),g=await c(`Creating`,async()=>n.send(R,{body:u,account_id:l,app_id:e[`app-id`]}));o(g,{successLabel:`Created`})})};var V={method:`GET`,path:t=>e`/accounts/${t.account_id}/flagship/apps/${t.app_id}/flags/${t.flag_key}`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function ne(e){return e.usage(`$0 flagship apps flags get <flag-key>
14
+ Evaluates a flag against the provided context, passed as a JSON request body (OFREP-shaped) rather than query parameters. Returns the same response shape as the GET variant.`).positional(`app-id`,{type:`string`,description:`Flagship app ID returned when the app was created.`,demandOption:!0}).option(`context`,{type:`string`,description:`Evaluation attributes keyed by name. Values may be any JSON value; the context supports up to 100 entries, nesting depth of 10, 10,000 values, and 32 KB. Provide as a JSON object or @path/to/file.json.`}).option(`flag-key`,{type:`string`,description:`Key of the flag to evaluate within the app.`}).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:`evaluate <app-id>`,describe:`Evaluate flag with JSON context`,builder:z,handler:async e=>l({command:`flagship apps flags evaluate`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf flagship apps flags evaluate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/flagship/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/evaluate`,pathParams:{"app-id":String(e[`app-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({context:f(e.context,`context`),flagKey:m(e[`flag-key`],`flag-key`,`text`)},[[`context`]]):d(e.body)});return}let n=e.body===void 0?void 0:d(e.body),l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body!==void 0){let t=n,r=await c(`Creating`,async()=>l.send(R,{body:t,account_id:u,app_id:e[`app-id`]}));o(r,{successLabel:`Created`});return}e[`flag-key`]===void 0&&(e[`flag-key`]=await h(`flag-key`,`Key of the flag to evaluate within the app.`));let g=p({context:f(e.context,`context`),flagKey:m(e[`flag-key`],`flag-key`,`text`)},[[`context`]]),_=await c(`Creating`,async()=>l.send(R,{body:g,account_id:u,app_id:e[`app-id`]}));o(_,{successLabel:`Created`})})};var V={method:`GET`,path:t=>e`/accounts/${t.account_id}/flagship/apps/${t.app_id}/flags/${t.flag_key}`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function H(e){return e.usage(`$0 flagship apps flags get <flag-key>
15
15
 
16
- Returns the full flag definition including rules, variations, metadata, 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 H={command:`get <flag-key>`,describe:`Get flag`,builder:ne,handler:async e=>l({command:`flagship apps flags get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf flagship apps flags get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/flagship/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/flags/${e[`flag-key`]==null?`<flag-key>`:encodeURIComponent(String(e[`flag-key`]))}`,pathParams:{"app-id":String(e[`app-id`]??``),"flag-key":String(e[`flag-key`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(V,{account_id:l,app_id:e[`app-id`],flag_key:e[`flag-key`]}));o(u,{successLabel:`Loaded`})})};var U={method:`GET`,path:t=>e`/accounts/${t.account_id}/flagship/apps/${t.app_id}/flags`,query:[`limit`,`cursor`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function W(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 G={command:`list`,describe:`List flags`,builder:W,handler:async e=>l({command:`flagship apps flags list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={limit:e.limit,cursor:e.cursor};if(e.dryRun){let t=await i();s({command:`cf flagship apps flags list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/flagship/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/flags`,pathParams:{"app-id":String(e[`app-id`]??``)},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(U,{account_id:u,app_id:e[`app-id`],...n}));o(d,{successLabel:`Loaded`})})};var K={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/flagship/apps/${t.app_id}/flags/${t.flag_key}`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function q(e){return e.usage("$0 flagship apps flags patch <flag-key>\n\nApplies a partial update to lightweight flag fields: `enabled`, `description`, `metadata`, and `default_variation`. Only fields present in the request body are modified; omitted fields are preserved. `metadata: null` or an empty object clears metadata. `default_variation` must exist in the current `variations`. Structural changes to `variations` and `rules` use PUT. A changelog entry is appended when the flag content actually changes.").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(`metadata`,{type:`string`,description:"Key-value metadata associated with the flag. `null` or an empty object clears existing metadata; omission semantics depend on the endpoint (PUT clears it, PATCH preserves it). Provide as a JSON object or @path/to/file.json."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const J={command:`patch <flag-key>`,describe:`Partially update flag`,builder:q,handler:async e=>l({command:`flagship apps flags patch`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf flagship apps flags patch`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/flagship/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/flags/${e[`flag-key`]==null?`<flag-key>`:encodeURIComponent(String(e[`flag-key`]))}`,pathParams:{"app-id":String(e[`app-id`]??``),"flag-key":String(e[`flag-key`]??``)},bodyKind:`json`,body:e.body===void 0?p({default_variation:m(e[`default-variation`],`default-variation`,`text`),description:m(e.description,`description`,`text`),enabled:e.enabled,metadata:f(e.metadata,`metadata`)},[[`metadata`]]):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Updating`,async()=>n.send(K,{body:t,account_id:l,app_id:e[`app-id`],flag_key:e[`flag-key`]}));o(r,{successLabel:`Updated`});return}let u=p({default_variation:m(e[`default-variation`],`default-variation`,`text`),description:m(e.description,`description`,`text`),enabled:e.enabled,metadata:f(e.metadata,`metadata`)},[[`metadata`]]),h=await c(`Updating`,async()=>n.send(K,{body:u,account_id:l,app_id:e[`app-id`],flag_key:e[`flag-key`]}));o(h,{successLabel:`Updated`})})};var Y={method:`PUT`,path:t=>e`/accounts/${t.account_id}/flagship/apps/${t.app_id}/flags/${t.flag_key}`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function X(e){return e.usage(`$0 flagship apps flags update <flag-key>
16
+ Returns the full flag definition including rules, variations, metadata, 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 ne={command:`get <flag-key>`,describe:`Get flag`,builder:H,handler:async e=>l({command:`flagship apps flags get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf flagship apps flags get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/flagship/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/flags/${e[`flag-key`]==null?`<flag-key>`:encodeURIComponent(String(e[`flag-key`]))}`,pathParams:{"app-id":String(e[`app-id`]??``),"flag-key":String(e[`flag-key`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(V,{account_id:l,app_id:e[`app-id`],flag_key:e[`flag-key`]}));o(u,{successLabel:`Loaded`})})};var U={method:`GET`,path:t=>e`/accounts/${t.account_id}/flagship/apps/${t.app_id}/flags`,query:[`limit`,`cursor`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function W(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 G={command:`list`,describe:`List flags`,builder:W,handler:async e=>l({command:`flagship apps flags list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={limit:e.limit,cursor:e.cursor};if(e.dryRun){let t=await i();s({command:`cf flagship apps flags list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/flagship/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/flags`,pathParams:{"app-id":String(e[`app-id`]??``)},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(U,{account_id:u,app_id:e[`app-id`],...n}));o(d,{successLabel:`Loaded`})})};var K={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/flagship/apps/${t.app_id}/flags/${t.flag_key}`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function q(e){return e.usage("$0 flagship apps flags patch <flag-key>\n\nApplies a partial update to lightweight flag fields: `enabled`, `description`, `metadata`, and `default_variation`. Only fields present in the request body are modified; omitted fields are preserved. `metadata: null` or an empty object clears metadata. `default_variation` must exist in the current `variations`. Structural changes to `variations` and `rules` use PUT. A changelog entry is appended when the flag content actually changes.").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(`metadata`,{type:`string`,description:"Key-value metadata associated with the flag. `null` or an empty object clears existing metadata; omission semantics depend on the endpoint (PUT clears it, PATCH preserves it). Provide as a JSON object or @path/to/file.json."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const J={command:`patch <flag-key>`,describe:`Partially update flag`,builder:q,handler:async e=>l({command:`flagship apps flags patch`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf flagship apps flags patch`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/flagship/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/flags/${e[`flag-key`]==null?`<flag-key>`:encodeURIComponent(String(e[`flag-key`]))}`,pathParams:{"app-id":String(e[`app-id`]??``),"flag-key":String(e[`flag-key`]??``)},bodyKind:`json`,body:e.body===void 0?p({default_variation:m(e[`default-variation`],`default-variation`,`text`),description:m(e.description,`description`,`text`),enabled:e.enabled,metadata:f(e.metadata,`metadata`)},[[`metadata`]]):d(e.body)});return}let n=e.body===void 0?void 0:d(e.body),l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body!==void 0){let t=n,r=await c(`Updating`,async()=>l.send(K,{body:t,account_id:u,app_id:e[`app-id`],flag_key:e[`flag-key`]}));o(r,{successLabel:`Updated`});return}let h=p({default_variation:m(e[`default-variation`],`default-variation`,`text`),description:m(e.description,`description`,`text`),enabled:e.enabled,metadata:f(e.metadata,`metadata`)},[[`metadata`]]),g=await c(`Updating`,async()=>l.send(K,{body:h,account_id:u,app_id:e[`app-id`],flag_key:e[`flag-key`]}));o(g,{successLabel:`Updated`})})};var Y={method:`PUT`,path:t=>e`/accounts/${t.account_id}/flagship/apps/${t.app_id}/flags/${t.flag_key}`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function X(e){return e.usage(`$0 flagship apps flags update <flag-key>
17
17
 
18
- Replaces the entire flag definition. Omitted fields are cleared, not preserved — read before writing. The path key identifies the flag and cannot be renamed by changing the body \`key\`. A changelog entry is appended when the flag content actually changes; identical updates are no-ops.`).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(`metadata`,{type:`string`,description:"Key-value metadata associated with the flag. `null` or an empty object clears existing metadata; omission semantics depend on the endpoint (PUT clears it, PATCH preserves it). Provide as a JSON object or @path/to/file.json."}).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=>m(e,`type`,`text`)).option(`variations`,{type:`string`,description:`Map of variation name to value. All values share the same type (boolean, string, number, or JSON object/array), and each serialized value stays within 10KB. Provide as a JSON object or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Z={command:`update <flag-key>`,describe:`Update flag`,builder:X,handler:async e=>l({command:`flagship apps flags update`,classification:{safeFlags:[`enabled`,`type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf flagship apps flags update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/flagship/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/flags/${e[`flag-key`]==null?`<flag-key>`:encodeURIComponent(String(e[`flag-key`]))}`,pathParams:{"app-id":String(e[`app-id`]??``),"flag-key":String(e[`flag-key`]??``)},bodyKind:`json`,body:e.body===void 0?p({default_variation:m(e[`default-variation`],`default-variation`,`text`),description:m(e.description,`description`,`text`),enabled:e.enabled,key:m(e.key,`key`,`text`),metadata:f(e.metadata,`metadata`),rules:u(e.rules,`rules`),type:e.type,variations:f(e.variations,`variations`,!0)},[[`metadata`],[`variations`]]):d(e.body,[{path:[`variations`],flag:`variations`}])});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body,[{path:[`variations`],flag:`variations`}]),r=await c(`Updating`,async()=>n.send(Y,{body:t,account_id:l,app_id:e[`app-id`],flag_key:e[`flag-key`]}));o(r,{successLabel:`Updated`});return}if(e[`default-variation`]===void 0&&(e[`default-variation`]=await h(`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`.")),e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);if(e.key===void 0&&(e.key=await h(`key`,`Unique identifier for the flag within an app. Used in all evaluation and SDK calls.`)),e.rules===void 0)throw Error(`--rules is required (or pass --body with this field set).`);if(e.variations===void 0)throw Error(`--variations is required (or pass --body with this field set).`);let g=p({default_variation:m(e[`default-variation`],`default-variation`,`text`),description:m(e.description,`description`,`text`),enabled:e.enabled,key:m(e.key,`key`,`text`),metadata:f(e.metadata,`metadata`),rules:u(e.rules,`rules`),type:e.type,variations:f(e.variations,`variations`,!0)},[[`metadata`],[`variations`]]),_=await c(`Updating`,async()=>n.send(Y,{body:g,account_id:l,app_id:e[`app-id`],flag_key:e[`flag-key`]}));o(_,{successLabel:`Updated`})})},re={command:`flags`,describe:`Operations for apps.flags`,builder:e=>e.command(P).command(L).command(B).command(H).command(G).command(J).command(Z).command(j).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ie={method:`GET`,path:t=>e`/accounts/${t.account_id}/flagship/apps/${t.app_id}`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function ae(e){return e.usage(`$0 flagship apps get <app-id>
18
+ Replaces the entire flag definition. Omitted fields are cleared, not preserved — read before writing. The path key identifies the flag and cannot be renamed by changing the body \`key\`. A changelog entry is appended when the flag content actually changes; identical updates are no-ops.`).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(`metadata`,{type:`string`,description:"Key-value metadata associated with the flag. `null` or an empty object clears existing metadata; omission semantics depend on the endpoint (PUT clears it, PATCH preserves it). Provide as a JSON object or @path/to/file.json."}).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=>m(e,`type`,`text`)).option(`variations`,{type:`string`,description:`Map of variation name to value. All values share the same type (boolean, string, number, or JSON object/array), and each serialized value stays within 10KB. Provide as a JSON object or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Z={command:`update <flag-key>`,describe:`Update flag`,builder:X,handler:async e=>l({command:`flagship apps flags update`,classification:{safeFlags:[`enabled`,`type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf flagship apps flags update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/flagship/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/flags/${e[`flag-key`]==null?`<flag-key>`:encodeURIComponent(String(e[`flag-key`]))}`,pathParams:{"app-id":String(e[`app-id`]??``),"flag-key":String(e[`flag-key`]??``)},bodyKind:`json`,body:e.body===void 0?p({default_variation:m(e[`default-variation`],`default-variation`,`text`),description:m(e.description,`description`,`text`),enabled:e.enabled,key:m(e.key,`key`,`text`),metadata:f(e.metadata,`metadata`),rules:u(e.rules,`rules`),type:e.type,variations:f(e.variations,`variations`,!0)},[[`metadata`],[`variations`]]):d(e.body,[{path:[`variations`],flag:`variations`}])});return}let n=e.body===void 0?void 0:d(e.body,[{path:[`variations`],flag:`variations`}]),l=await r(e),g=e.local?t:await a();if(e.accountId=g,e.body!==void 0){let t=n,r=await c(`Updating`,async()=>l.send(Y,{body:t,account_id:g,app_id:e[`app-id`],flag_key:e[`flag-key`]}));o(r,{successLabel:`Updated`});return}if(e[`default-variation`]===void 0&&(e[`default-variation`]=await h(`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`.")),e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);if(e.key===void 0&&(e.key=await h(`key`,`Unique identifier for the flag within an app. Used in all evaluation and SDK calls.`)),e.rules===void 0)throw Error(`--rules is required (or pass --body with this field set).`);if(e.variations===void 0)throw Error(`--variations is required (or pass --body with this field set).`);let _=p({default_variation:m(e[`default-variation`],`default-variation`,`text`),description:m(e.description,`description`,`text`),enabled:e.enabled,key:m(e.key,`key`,`text`),metadata:f(e.metadata,`metadata`),rules:u(e.rules,`rules`),type:e.type,variations:f(e.variations,`variations`,!0)},[[`metadata`],[`variations`]]),v=await c(`Updating`,async()=>l.send(Y,{body:_,account_id:g,app_id:e[`app-id`],flag_key:e[`flag-key`]}));o(v,{successLabel:`Updated`})})},re={command:`flags`,describe:`Operations for apps.flags`,builder:e=>e.command(P).command(L).command(B).command(ne).command(G).command(J).command(Z).command(j).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ie={method:`GET`,path:t=>e`/accounts/${t.account_id}/flagship/apps/${t.app_id}`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function ae(e){return e.usage(`$0 flagship apps get <app-id>
19
19
 
20
20
  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 oe={command:`get <app-id>`,describe:`Get app`,builder:ae,handler:async e=>l({command:`flagship apps get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf flagship apps get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/flagship/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}`,pathParams:{"app-id":String(e[`app-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(ie,{account_id:l,app_id:e[`app-id`]}));o(u,{successLabel:`Loaded`})})};var se={method:`GET`,path:t=>e`/accounts/${t.account_id}/flagship/apps`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function Q(e){return e.usage(`$0 flagship apps list
21
21
 
22
22
  Lists all Flagship apps in the account. Returns identity and audit fields only; flag definitions are not included.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ce={command:`list`,describe:`List apps`,builder:Q,handler:async e=>l({command:`flagship apps list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf flagship apps list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/flagship/apps`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(se,{account_id:l}));o(u,{successLabel:`Loaded`})})};var $={method:`PUT`,path:t=>e`/accounts/${t.account_id}/flagship/apps/${t.app_id}`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function le(e){return e.usage(`$0 flagship apps update <app-id>
23
23
 
24
- Updates an app. Only \`name\` is mutable.`).positional(`app-id`,{type:`string`,description:`Flagship app ID returned when the app was created.`,demandOption:!0}).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 ue={command:`update <app-id>`,describe:`Update app`,builder:le,handler:async e=>l({command:`flagship apps update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf flagship apps update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/flagship/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}`,pathParams:{"app-id":String(e[`app-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({name:m(e.name,`name`,`text`)}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Updating`,async()=>n.send($,{body:t,account_id:l,app_id:e[`app-id`]}));o(r,{successLabel:`Updated`});return}let u=p({name:m(e.name,`name`,`text`)}),f=await c(`Updating`,async()=>n.send($,{body:u,account_id:l,app_id:e[`app-id`]}));o(f,{successLabel:`Updated`})})},de={command:`apps`,describe:`Operations for apps`,builder:e=>e.command(y).command(C).command(oe).command(ce).command(ue).command(ee).command(D).command(re).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},fe={command:`flagship`,describe:`flagship`,builder:e=>e.command(de).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{fe as default};
24
+ Updates an app. Only \`name\` is mutable.`).positional(`app-id`,{type:`string`,description:`Flagship app ID returned when the app was created.`,demandOption:!0}).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 ue={command:`update <app-id>`,describe:`Update app`,builder:le,handler:async e=>l({command:`flagship apps update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf flagship apps update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/flagship/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}`,pathParams:{"app-id":String(e[`app-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({name:m(e.name,`name`,`text`)}):d(e.body)});return}let n=e.body===void 0?void 0:d(e.body),l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body!==void 0){let t=n,r=await c(`Updating`,async()=>l.send($,{body:t,account_id:u,app_id:e[`app-id`]}));o(r,{successLabel:`Updated`});return}let f=p({name:m(e.name,`name`,`text`)}),h=await c(`Updating`,async()=>l.send($,{body:f,account_id:u,app_id:e[`app-id`]}));o(h,{successLabel:`Updated`})})},de={command:`apps`,describe:`Operations for apps`,builder:e=>e.command(y).command(C).command(oe).command(ce).command(ue).command(S).command(D).command(re).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},fe={command:`flagship`,describe:`flagship`,builder:e=>e.command(de).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{fe as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-D5Yj9eYU.mjs";import{i as n}from"./context-BvLXzoMs.mjs";import{t as r}from"./output-BJEgbI0G.mjs";import{t as i}from"./dry-run-gy0Hl9xo.mjs";import{t as a}from"./progress-B-CVX0kn.mjs";import{t as o}from"./run-BZ6Fj3jQ.mjs";import"./telemetry-BZdRnr26.mjs";import{n as s,t as c}from"./body-parser-BKcZS9iJ.mjs";import{n as l}from"./input-validation-D7z60HJH.mjs";var u={method:`GET`,path:t=>e`/zones/${t.zone_id}/fraud_detection/settings`};function d(e){return e.usage(`$0 fraud get
2
+ import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-B-h0BHg7.mjs";import{i as n}from"./context-BY1Eh_Qe.mjs";import{t as r}from"./output-BZQEl3mK.mjs";import{t as i}from"./dry-run-kJbjn4kG.mjs";import{t as a}from"./progress-yvPscjYg.mjs";import{t as o}from"./run-BOKI1uWa.mjs";import"./telemetry-DkDUr4KK.mjs";import{n as s,t as c}from"./body-parser-DoewLePl.mjs";import{n as l}from"./input-validation-D7z60HJH.mjs";var u={method:`GET`,path:t=>e`/zones/${t.zone_id}/fraud_detection/settings`};function d(e){return e.usage(`$0 fraud get
3
3
 
4
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 f={command:`get`,describe:`Get Fraud Detection Settings`,builder:d,handler:async e=>o({command:`fraud get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf fraud get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/fraud_detection/settings`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(u,{zone_id:s}));r(c,{successLabel:`Loaded`})})};var p={method:`PUT`,path:t=>e`/zones/${t.zone_id}/fraud_detection/settings`,body:`json`};function m(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=>l(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.
@@ -19,4 +19,4 @@ Retrieve Fraud Detection settings for a zone.`).option(`dry-run`,{type:`boolean`
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 h={command:`update`,describe:`Update Fraud Detection Settings`,builder:m,handler:async e=>o({command:`fraud update`,classification:{safeFlags:[`authentication-settings-failure-criteria-kind`,`authentication-settings-success-criteria-kind`,`user-profiles`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf fraud update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/fraud_detection/settings`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?c({authentication_settings:{failure_criteria:{kind:e[`authentication-settings-failure-criteria-kind`],status_codes:e[`authentication-settings-failure-criteria-status-codes`]},success_criteria:{kind:e[`authentication-settings-success-criteria-kind`],status_codes:e[`authentication-settings-success-criteria-status-codes`]}},user_profiles:e[`user-profiles`],username_expressions:e[`username-expressions`]}):s(e.body)});return}let o=await t(e),l=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=l,e.body){let t=s(e.body),n=await a(`Updating`,async()=>o.send(p,{body:t,zone_id:l}));r(n,{successLabel:`Updated`});return}let u=c({authentication_settings:{failure_criteria:{kind:e[`authentication-settings-failure-criteria-kind`],status_codes:e[`authentication-settings-failure-criteria-status-codes`]},success_criteria:{kind:e[`authentication-settings-success-criteria-kind`],status_codes:e[`authentication-settings-success-criteria-status-codes`]}},user_profiles:e[`user-profiles`],username_expressions:e[`username-expressions`]}),d=await a(`Updating`,async()=>o.send(p,{body:u,zone_id:l}));r(d,{successLabel:`Updated`})})},g={command:`fraud`,describe:`fraud`,builder:e=>e.command(f).command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{g 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=>{let t=[`authentication-settings-failure-criteria-kind`,`authentication-settings-failure-criteria-status-codes`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`authentication-settings-failure-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-failure-criteria-* flag is set`)}return!0}).check(e=>{let t=[`authentication-settings-success-criteria-kind`,`authentication-settings-success-criteria-status-codes`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`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-success-criteria-* flag is set`)}return!0})}const h={command:`update`,describe:`Update Fraud Detection Settings`,builder:m,handler:async e=>o({command:`fraud update`,classification:{safeFlags:[`authentication-settings-failure-criteria-kind`,`authentication-settings-success-criteria-kind`,`user-profiles`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf fraud update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/fraud_detection/settings`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?c({authentication_settings:{failure_criteria:{kind:e[`authentication-settings-failure-criteria-kind`],status_codes:e[`authentication-settings-failure-criteria-status-codes`]},success_criteria:{kind:e[`authentication-settings-success-criteria-kind`],status_codes:e[`authentication-settings-success-criteria-status-codes`]}},user_profiles:e[`user-profiles`],username_expressions:e[`username-expressions`]}):s(e.body)});return}let o=e.body===void 0?void 0:s(e.body),l=await t(e),u=await n({zone:e.zone},l,{quiet:e.quiet});if(e.zoneId=u,e.body!==void 0){let e=o,t=await a(`Updating`,async()=>l.send(p,{body:e,zone_id:u}));r(t,{successLabel:`Updated`});return}let d=c({authentication_settings:{failure_criteria:{kind:e[`authentication-settings-failure-criteria-kind`],status_codes:e[`authentication-settings-failure-criteria-status-codes`]},success_criteria:{kind:e[`authentication-settings-success-criteria-kind`],status_codes:e[`authentication-settings-success-criteria-status-codes`]}},user_profiles:e[`user-profiles`],username_expressions:e[`username-expressions`]}),f=await a(`Updating`,async()=>l.send(p,{body:d,zone_id:u}));r(f,{successLabel:`Updated`})})},g={command:`fraud`,describe:`fraud`,builder:e=>e.command(f).command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{g as default};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";var t={method:`GET`,path:t=>e`/accounts/${t.account_id}/cfd_tunnel/${t.tunnel_id}/token`};export{t};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ const e={quiet:{type:`boolean`,alias:`q`,description:`Suppress non-essential output`,global:!0,default:!1},zone:{type:`string`,alias:`z`,description:`Zone ID or domain name (overrides CLOUDFLARE_ZONE_ID)`,global:!0,coerce:e=>{if(Array.isArray(e))throw Error(`--zone can only be specified once.`);if(typeof e!=`string`||e===``)throw Error(`--zone requires a non-empty value.`);return e}},profile:{type:`string`,description:`Use a specific auth profile`,requiresArg:!0,global:!0},mode:{type:`string`,alias:`m`,description:`Mode used to evaluate project configuration`,requiresArg:!0,global:!0,coerce:e=>{if(Array.isArray(e))throw Error(`--mode can only be specified once.`);if(e===``)throw Error(`--mode requires a non-empty value.`);return e}},"temporary-account":{type:`boolean`,description:`Create or reuse a temporary account when no Cloudflare credentials are available`,global:!0,default:!1,hidden:!0},"event-code":{type:`string`,description:`Specify the event code to use when creating a temporary account for an event`,requiresArg:!0,global:!0,hidden:!0,coerce:e=>{if(Array.isArray(e))throw Error(`--event-code expects a single value.`);let t=e.trim();if(!t)throw Error(`--event-code cannot be empty.`);return t}},local:{type:`boolean`,description:`Use local resource simulations`,global:!0,default:!1},"persist-to":{type:`string`,description:`Directory holding local persisted state (default: ~/.config/cloudflare/state)`,requiresArg:!0,global:!0}},t={help:{alias:`h`,description:`Show help`},version:{alias:`v`,description:`Show version number`}},n=Object.entries({...e,...t}).flatMap(([e,{alias:t}])=>[e,...t===void 0?[]:typeof t==`string`?[t]:t]),r=[`remote`,`cwd`,`config`,`c`,`json`,`ndjson`,`pretty`],i=new Set(n.map(s)),a=new Set(r);function o(e){let t=new Set(Array.from(e,s));return e=>{let n=s(e);return i.has(n)?`global`:a.has(n)?`future`:n.startsWith(`experimental-`)?`experimental`:/^[a-z]$/.test(n)?`single-letter`:t.has(n)?`command`:void 0}}function s(e){return e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).replace(/[_.\s]+/g,`-`).toLowerCase()}export{o as i,e as n,n as r,t};
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
- import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-D5Yj9eYU.mjs";import{i as n}from"./context-BvLXzoMs.mjs";import{t as r}from"./output-BJEgbI0G.mjs";import{t as i}from"./dry-run-gy0Hl9xo.mjs";import{t as a}from"./progress-B-CVX0kn.mjs";import{t as o}from"./run-BZ6Fj3jQ.mjs";import"./telemetry-BZdRnr26.mjs";import{n as s,t as c}from"./body-parser-BKcZS9iJ.mjs";import{n as l}from"./input-validation-D7z60HJH.mjs";import{a as u}from"./prompt-DJF_Rs5S.mjs";var d={method:`GET`,path:t=>e`/zones/${t.zone_id}/settings/google-tag-gateway/config`};function f(e){return e.usage(`$0 google-tag-gateway config get
2
+ import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-B-h0BHg7.mjs";import{i as n}from"./context-BY1Eh_Qe.mjs";import{t as r}from"./output-BZQEl3mK.mjs";import{t as i}from"./dry-run-kJbjn4kG.mjs";import{t as a}from"./progress-yvPscjYg.mjs";import{t as o}from"./run-BOKI1uWa.mjs";import"./telemetry-DkDUr4KK.mjs";import{n as s,t as c}from"./body-parser-DoewLePl.mjs";import{n as l}from"./input-validation-D7z60HJH.mjs";import{a as u}from"./prompt-CEpZ-lQZ.mjs";var d={method:`GET`,path:t=>e`/zones/${t.zone_id}/settings/google-tag-gateway/config`};function f(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 p={command:`get`,describe:`Get Google Tag Gateway configuration`,builder:f,handler:async e=>o({command:`google-tag-gateway config get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf google-tag-gateway config get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/settings/google-tag-gateway/config`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(d,{zone_id:s}));r(c,{successLabel:`Loaded`})})};var m={method:`PUT`,path:t=>e`/zones/${t.zone_id}/settings/google-tag-gateway/config`,body:`json`};function h(e){return e.usage(`$0 google-tag-gateway config update
5
5
 
6
- Updates the Google Tag Gateway configuration for a zone.`).option(`enabled`,{type:`boolean`,description:`Enables or disables Google Tag Gateway for this zone.`}).option(`endpoint`,{type:`string`,description:`Specifies the endpoint path for proxying Google Tag Manager requests. Use an absolute path starting with '/', with no nested paths and alphanumeric characters only (e.g. /metrics).`}).option(`hide-original-ip`,{type:`boolean`,description:`Hides the original client IP address from Google when enabled.`}).option(`measurement-id`,{type:`string`,description:`Specify the Google Tag Manager container or measurement ID (e.g. GTM-XXXXXXX or G-XXXXXXXXXX).`}).option(`set-up-tag`,{type:`boolean`,description:`Set up the associated Google Tag on the zone automatically when enabled.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Google Tag Gateway configuration for a zone.`})}const g={command:`update`,describe:`Update Google Tag Gateway configuration`,builder:h,handler:async e=>o({command:`google-tag-gateway config update`,classification:{safeFlags:[`enabled`,`hide-original-ip`,`set-up-tag`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf google-tag-gateway config update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/settings/google-tag-gateway/config`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?c({enabled:e.enabled,endpoint:l(e.endpoint,`endpoint`,`text`),hideOriginalIp:e[`hide-original-ip`],measurementId:l(e[`measurement-id`],`measurement-id`,`text`),setUpTag:e[`set-up-tag`]}):s(e.body)});return}let o=await t(e),d=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=d,e.body){let t=s(e.body),n=await a(`Updating`,async()=>o.send(m,{body:t,zone_id:d}));r(n,{successLabel:`Updated`});return}if(e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);if(e.endpoint===void 0&&(e.endpoint=await u(`endpoint`,`Specifies the endpoint path for proxying Google Tag Manager requests. Use an absolute path starting with '/', with no nested paths and alphanumeric characters only (e.g. /metrics).`)),e[`hide-original-ip`]===void 0)throw Error(`--hide-original-ip is required (or pass --body with this field set).`);e[`measurement-id`]===void 0&&(e[`measurement-id`]=await u(`measurement-id`,`Specify the Google Tag Manager container or measurement ID (e.g. GTM-XXXXXXX or G-XXXXXXXXXX).`));let f=c({enabled:e.enabled,endpoint:l(e.endpoint,`endpoint`,`text`),hideOriginalIp:e[`hide-original-ip`],measurementId:l(e[`measurement-id`],`measurement-id`,`text`),setUpTag:e[`set-up-tag`]}),p=await a(`Updating`,async()=>o.send(m,{body:f,zone_id:d}));r(p,{successLabel:`Updated`})})},_={command:`config`,describe:`Google Tag Gateway config operations`,builder:e=>e.command(p).command(g).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},v={command:`google-tag-gateway`,describe:`Google Tag Gateway operations`,builder:e=>e.command(_).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{v as default};
6
+ Updates the Google Tag Gateway configuration for a zone.`).option(`enabled`,{type:`boolean`,description:`Enables or disables Google Tag Gateway for this zone.`}).option(`endpoint`,{type:`string`,description:`Specifies the endpoint path for proxying Google Tag Manager requests. Use an absolute path starting with '/', with no nested paths and alphanumeric characters only (e.g. /metrics).`}).option(`hide-original-ip`,{type:`boolean`,description:`Hides the original client IP address from Google when enabled.`}).option(`measurement-id`,{type:`string`,description:`Specify the Google Tag Manager container or measurement ID (e.g. GTM-XXXXXXX or G-XXXXXXXXXX).`}).option(`set-up-tag`,{type:`boolean`,description:`Set up the associated Google Tag on the zone automatically when enabled.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Google Tag Gateway configuration for a zone.`})}const g={command:`update`,describe:`Update Google Tag Gateway configuration`,builder:h,handler:async e=>o({command:`google-tag-gateway config update`,classification:{safeFlags:[`enabled`,`hide-original-ip`,`set-up-tag`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf google-tag-gateway config update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/settings/google-tag-gateway/config`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?c({enabled:e.enabled,endpoint:l(e.endpoint,`endpoint`,`text`),hideOriginalIp:e[`hide-original-ip`],measurementId:l(e[`measurement-id`],`measurement-id`,`text`),setUpTag:e[`set-up-tag`]}):s(e.body)});return}let o=e.body===void 0?void 0:s(e.body),d=await t(e),f=await n({zone:e.zone},d,{quiet:e.quiet});if(e.zoneId=f,e.body!==void 0){let e=o,t=await a(`Updating`,async()=>d.send(m,{body:e,zone_id:f}));r(t,{successLabel:`Updated`});return}if(e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);if(e.endpoint===void 0&&(e.endpoint=await u(`endpoint`,`Specifies the endpoint path for proxying Google Tag Manager requests. Use an absolute path starting with '/', with no nested paths and alphanumeric characters only (e.g. /metrics).`)),e[`hide-original-ip`]===void 0)throw Error(`--hide-original-ip is required (or pass --body with this field set).`);e[`measurement-id`]===void 0&&(e[`measurement-id`]=await u(`measurement-id`,`Specify the Google Tag Manager container or measurement ID (e.g. GTM-XXXXXXX or G-XXXXXXXXXX).`));let p=c({enabled:e.enabled,endpoint:l(e.endpoint,`endpoint`,`text`),hideOriginalIp:e[`hide-original-ip`],measurementId:l(e[`measurement-id`],`measurement-id`,`text`),setUpTag:e[`set-up-tag`]}),h=await a(`Updating`,async()=>d.send(m,{body:p,zone_id:f}));r(h,{successLabel:`Updated`})})},_={command:`config`,describe:`Google Tag Gateway config operations`,builder:e=>e.command(p).command(g).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},v={command:`google-tag-gateway`,describe:`Google Tag Gateway operations`,builder:e=>e.command(_).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{v as default};
@@ -1,20 +1,20 @@
1
1
  #!/usr/bin/env node
2
- import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-D5Yj9eYU.mjs";import{i as n}from"./context-BvLXzoMs.mjs";import{t as r}from"./output-BJEgbI0G.mjs";import{t as i}from"./dry-run-gy0Hl9xo.mjs";import{t as a}from"./progress-B-CVX0kn.mjs";import{t as o}from"./run-BZ6Fj3jQ.mjs";import"./telemetry-BZdRnr26.mjs";import{n as s,r as c,t as l}from"./body-parser-BKcZS9iJ.mjs";import{n as u}from"./input-validation-D7z60HJH.mjs";import{a as d,n as f}from"./prompt-DJF_Rs5S.mjs";var p={method:`POST`,path:t=>e`/zones/${t.zone_id}/healthchecks`,body:`json`};function m(e){return e.usage(`$0 healthchecks create
2
+ import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-B-h0BHg7.mjs";import{i as n}from"./context-BY1Eh_Qe.mjs";import{t as r}from"./output-BZQEl3mK.mjs";import{t as i}from"./dry-run-kJbjn4kG.mjs";import{t as a}from"./progress-yvPscjYg.mjs";import{t as o}from"./run-BOKI1uWa.mjs";import"./telemetry-DkDUr4KK.mjs";import{n as s,r as c,t as l}from"./body-parser-DoewLePl.mjs";import{n as u}from"./input-validation-D7z60HJH.mjs";import{a as d,n as f}from"./prompt-CEpZ-lQZ.mjs";var p={method:`POST`,path:t=>e`/zones/${t.zone_id}/healthchecks`,body:`json`};function m(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-header`,{type:`string`,description:`The HTTP request headers to send in the health check. It is recommended you set a Host header by default. The User-Agent header cannot be overridden. Provide as a JSON object or @path/to/file.json.`}).option(`http-config-method`,{type:`string`,description:`The HTTP method to use for the health check.`,choices:[`GET`,`HEAD`]}).coerce(`http-config-method`,e=>u(e,`http-config-method`,`text`)).option(`http-config-path`,{type:`string`,description:`The endpoint path to health check against.`}).option(`http-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80 if type is HTTP or 443 if type is HTTPS.`}).option(`interval`,{type:`number`,description:`The interval between each health check. Shorter intervals may give quicker notifications if the origin status changes, but will increase load on the origin as we check from multiple locations.`,default:60}).option(`name`,{type:`string`,description:`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`}).option(`retries`,{type:`number`,description:`The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.`,default:2}).option(`suspended`,{type:`boolean`,description:`If suspended, no health checks are sent to the origin.`,default:!1}).option(`tcp-config-method`,{type:`string`,description:`The TCP connection method to use for the health check.`,choices:[`connection_established`]}).coerce(`tcp-config-method`,e=>u(e,`tcp-config-method`,`text`)).option(`tcp-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80.`}).option(`timeout`,{type:`number`,description:`The timeout (in seconds) before marking the health check as failed.`,default:5}).option(`type`,{type:`string`,description:`The protocol to use for the health check. Currently supported protocols are 'HTTP', 'HTTPS' and 'TCP'.`,default:`HTTP`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const h={command:`create`,describe:`Create Health Check`,builder:m,handler:async e=>o({command:`healthchecks create`,classification:{safeFlags:[`http-config-allow-insecure`,`http-config-follow-redirects`,`http-config-method`,`suspended`,`tcp-config-method`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf healthchecks create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/healthchecks`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({address:u(e.address,`address`,`text`),check_regions:e[`check-regions`],consecutive_fails:e[`consecutive-fails`],consecutive_successes:e[`consecutive-successes`],description:u(e.description,`description`,`text`),http_config:{allow_insecure:e[`http-config-allow-insecure`],expected_body:u(e[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:e[`http-config-expected-codes`],follow_redirects:e[`http-config-follow-redirects`],header:c(e[`http-config-header`],`http-config-header`),method:e[`http-config-method`],path:u(e[`http-config-path`],`http-config-path`,`text`),port:e[`http-config-port`]},interval:e.interval,name:u(e.name,`name`,`text`),retries:e.retries,suspended:e.suspended,tcp_config:{method:e[`tcp-config-method`],port:e[`tcp-config-port`]},timeout:e.timeout,type:u(e.type,`type`,`text`)},[[`http_config`,`header`]]):s(e.body)});return}let o=await t(e),f=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=f,e.body){let t=s(e.body),n=await a(`Creating`,async()=>o.send(p,{body:t,zone_id:f}));r(n,{successLabel:`Created`});return}e.address===void 0&&(e.address=await d(`address`,`The hostname or IP address of the origin server to run health checks on.`)),e.name===void 0&&(e.name=await d(`name`,`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`));let m=l({address:u(e.address,`address`,`text`),check_regions:e[`check-regions`],consecutive_fails:e[`consecutive-fails`],consecutive_successes:e[`consecutive-successes`],description:u(e.description,`description`,`text`),http_config:{allow_insecure:e[`http-config-allow-insecure`],expected_body:u(e[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:e[`http-config-expected-codes`],follow_redirects:e[`http-config-follow-redirects`],header:c(e[`http-config-header`],`http-config-header`),method:e[`http-config-method`],path:u(e[`http-config-path`],`http-config-path`,`text`),port:e[`http-config-port`]},interval:e.interval,name:u(e.name,`name`,`text`),retries:e.retries,suspended:e.suspended,tcp_config:{method:e[`tcp-config-method`],port:e[`tcp-config-port`]},timeout:e.timeout,type:u(e.type,`type`,`text`)},[[`http_config`,`header`]]),h=await a(`Creating`,async()=>o.send(p,{body:m,zone_id:f}));r(h,{successLabel:`Created`})})};var g={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/healthchecks/${t.healthcheck_id}`};function _(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-header`,{type:`string`,description:`The HTTP request headers to send in the health check. It is recommended you set a Host header by default. The User-Agent header cannot be overridden. Provide as a JSON object or @path/to/file.json.`}).option(`http-config-method`,{type:`string`,description:`The HTTP method to use for the health check.`,choices:[`GET`,`HEAD`]}).coerce(`http-config-method`,e=>u(e,`http-config-method`,`text`)).option(`http-config-path`,{type:`string`,description:`The endpoint path to health check against.`}).option(`http-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80 if type is HTTP or 443 if type is HTTPS.`}).option(`interval`,{type:`number`,description:`The interval between each health check. Shorter intervals may give quicker notifications if the origin status changes, but will increase load on the origin as we check from multiple locations.`,default:60}).option(`name`,{type:`string`,description:`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`}).option(`retries`,{type:`number`,description:`The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.`,default:2}).option(`suspended`,{type:`boolean`,description:`If suspended, no health checks are sent to the origin.`,default:!1}).option(`tcp-config-method`,{type:`string`,description:`The TCP connection method to use for the health check.`,choices:[`connection_established`]}).coerce(`tcp-config-method`,e=>u(e,`tcp-config-method`,`text`)).option(`tcp-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80.`}).option(`timeout`,{type:`number`,description:`The timeout (in seconds) before marking the health check as failed.`,default:5}).option(`type`,{type:`string`,description:`The protocol to use for the health check. Currently supported protocols are 'HTTP', 'HTTPS' and 'TCP'.`,default:`HTTP`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const h={command:`create`,describe:`Create Health Check`,builder:m,handler:async e=>o({command:`healthchecks create`,classification:{safeFlags:[`http-config-allow-insecure`,`http-config-follow-redirects`,`http-config-method`,`suspended`,`tcp-config-method`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf healthchecks create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/healthchecks`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({address:u(e.address,`address`,`text`),check_regions:e[`check-regions`],consecutive_fails:e[`consecutive-fails`],consecutive_successes:e[`consecutive-successes`],description:u(e.description,`description`,`text`),http_config:{allow_insecure:e[`http-config-allow-insecure`],expected_body:u(e[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:e[`http-config-expected-codes`],follow_redirects:e[`http-config-follow-redirects`],header:c(e[`http-config-header`],`http-config-header`),method:e[`http-config-method`],path:u(e[`http-config-path`],`http-config-path`,`text`),port:e[`http-config-port`]},interval:e.interval,name:u(e.name,`name`,`text`),retries:e.retries,suspended:e.suspended,tcp_config:{method:e[`tcp-config-method`],port:e[`tcp-config-port`]},timeout:e.timeout,type:u(e.type,`type`,`text`)},[[`http_config`,`header`]]):s(e.body)});return}let o=e.body===void 0?void 0:s(e.body),f=await t(e),m=await n({zone:e.zone},f,{quiet:e.quiet});if(e.zoneId=m,e.body!==void 0){let e=o,t=await a(`Creating`,async()=>f.send(p,{body:e,zone_id:m}));r(t,{successLabel:`Created`});return}e.address===void 0&&(e.address=await d(`address`,`The hostname or IP address of the origin server to run health checks on.`)),e.name===void 0&&(e.name=await d(`name`,`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`));let h=l({address:u(e.address,`address`,`text`),check_regions:e[`check-regions`],consecutive_fails:e[`consecutive-fails`],consecutive_successes:e[`consecutive-successes`],description:u(e.description,`description`,`text`),http_config:{allow_insecure:e[`http-config-allow-insecure`],expected_body:u(e[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:e[`http-config-expected-codes`],follow_redirects:e[`http-config-follow-redirects`],header:c(e[`http-config-header`],`http-config-header`),method:e[`http-config-method`],path:u(e[`http-config-path`],`http-config-path`,`text`),port:e[`http-config-port`]},interval:e.interval,name:u(e.name,`name`,`text`),retries:e.retries,suspended:e.suspended,tcp_config:{method:e[`tcp-config-method`],port:e[`tcp-config-port`]},timeout:e.timeout,type:u(e.type,`type`,`text`)},[[`http_config`,`header`]]),g=await a(`Creating`,async()=>f.send(p,{body:h,zone_id:m}));r(g,{successLabel:`Created`})})};var g={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/healthchecks/${t.healthcheck_id}`};function _(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 v={command:`delete <healthcheck-id>`,describe:`Delete Health Check`,builder:_,handler:async e=>o({command:`healthchecks delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf healthchecks delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/healthchecks/${e[`healthcheck-id`]==null?`<healthcheck-id>`:encodeURIComponent(String(e[`healthcheck-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"healthcheck-id":String(e[`healthcheck-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=s,!await f({force:!!e.force}))return;let c=await a(`Deleting`,async()=>o.send(g,{zone_id:s,healthcheck_id:e[`healthcheck-id`]}));r(c,{successLabel:`Deleted`})})};var y={method:`PATCH`,path:t=>e`/zones/${t.zone_id}/healthchecks/${t.healthcheck_id}`,body:`json`};function b(e){return e.usage(`$0 healthchecks edit <healthcheck-id>
7
7
 
8
- Patch a configured health check.`).positional(`healthcheck-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`address`,{type:`string`,description:`The hostname or IP address of the origin server to run health checks on.`}).option(`check-regions`,{type:`string`,array:!0,description:`A list of regions from which to run health checks. Null means Cloudflare will pick a default region.`}).option(`consecutive-fails`,{type:`number`,description:`The number of consecutive fails required from a health check before changing the health to unhealthy.`}).option(`consecutive-successes`,{type:`number`,description:`The number of consecutive successes required from a health check before changing the health to healthy.`}).option(`description`,{type:`string`,description:`A human-readable description of the health check.`}).option(`http-config-allow-insecure`,{type:`boolean`,description:`Do not validate the certificate when the health check uses HTTPS.`}).option(`http-config-expected-body`,{type:`string`,description:`A case-insensitive sub-string to look for in the response body. If this string is not found, the origin will be marked as unhealthy.`}).option(`http-config-expected-codes`,{type:`string`,array:!0,description:`The expected HTTP response codes (e.g. "200") or code ranges (e.g. "2xx" for all codes starting with 2) of the health check.`}).option(`http-config-follow-redirects`,{type:`boolean`,description:`Follow redirects if the origin returns a 3xx status code.`}).option(`http-config-header`,{type:`string`,description:`The HTTP request headers to send in the health check. It is recommended you set a Host header by default. The User-Agent header cannot be overridden. Provide as a JSON object or @path/to/file.json.`}).option(`http-config-method`,{type:`string`,description:`The HTTP method to use for the health check.`,choices:[`GET`,`HEAD`]}).coerce(`http-config-method`,e=>u(e,`http-config-method`,`text`)).option(`http-config-path`,{type:`string`,description:`The endpoint path to health check against.`}).option(`http-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80 if type is HTTP or 443 if type is HTTPS.`}).option(`interval`,{type:`number`,description:`The interval between each health check. Shorter intervals may give quicker notifications if the origin status changes, but will increase load on the origin as we check from multiple locations.`}).option(`name`,{type:`string`,description:`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`}).option(`retries`,{type:`number`,description:`The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.`}).option(`suspended`,{type:`boolean`,description:`If suspended, no health checks are sent to the origin.`}).option(`tcp-config-method`,{type:`string`,description:`The TCP connection method to use for the health check.`,choices:[`connection_established`]}).coerce(`tcp-config-method`,e=>u(e,`tcp-config-method`,`text`)).option(`tcp-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80.`}).option(`timeout`,{type:`number`,description:`The timeout (in seconds) before marking the health check as failed.`}).option(`type`,{type:`string`,description:`The protocol to use for the health check. Currently supported protocols are 'HTTP', 'HTTPS' and 'TCP'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const x={command:`edit <healthcheck-id>`,describe:`Patch Health Check`,builder:b,handler:async e=>o({command:`healthchecks edit`,classification:{safeFlags:[`http-config-allow-insecure`,`http-config-follow-redirects`,`http-config-method`,`suspended`,`tcp-config-method`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf healthchecks edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/healthchecks/${e[`healthcheck-id`]==null?`<healthcheck-id>`:encodeURIComponent(String(e[`healthcheck-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"healthcheck-id":String(e[`healthcheck-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({address:u(e.address,`address`,`text`),check_regions:e[`check-regions`],consecutive_fails:e[`consecutive-fails`],consecutive_successes:e[`consecutive-successes`],description:u(e.description,`description`,`text`),http_config:{allow_insecure:e[`http-config-allow-insecure`],expected_body:u(e[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:e[`http-config-expected-codes`],follow_redirects:e[`http-config-follow-redirects`],header:c(e[`http-config-header`],`http-config-header`),method:e[`http-config-method`],path:u(e[`http-config-path`],`http-config-path`,`text`),port:e[`http-config-port`]},interval:e.interval,name:u(e.name,`name`,`text`),retries:e.retries,suspended:e.suspended,tcp_config:{method:e[`tcp-config-method`],port:e[`tcp-config-port`]},timeout:e.timeout,type:u(e.type,`type`,`text`)},[[`http_config`,`header`]]):s(e.body)});return}let o=await t(e),f=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=f,e.body){let t=s(e.body),n=await a(`Updating`,async()=>o.send(y,{body:t,zone_id:f,healthcheck_id:e[`healthcheck-id`]}));r(n,{successLabel:`Updated`});return}e.address===void 0&&(e.address=await d(`address`,`The hostname or IP address of the origin server to run health checks on.`)),e.name===void 0&&(e.name=await d(`name`,`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`));let p=l({address:u(e.address,`address`,`text`),check_regions:e[`check-regions`],consecutive_fails:e[`consecutive-fails`],consecutive_successes:e[`consecutive-successes`],description:u(e.description,`description`,`text`),http_config:{allow_insecure:e[`http-config-allow-insecure`],expected_body:u(e[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:e[`http-config-expected-codes`],follow_redirects:e[`http-config-follow-redirects`],header:c(e[`http-config-header`],`http-config-header`),method:e[`http-config-method`],path:u(e[`http-config-path`],`http-config-path`,`text`),port:e[`http-config-port`]},interval:e.interval,name:u(e.name,`name`,`text`),retries:e.retries,suspended:e.suspended,tcp_config:{method:e[`tcp-config-method`],port:e[`tcp-config-port`]},timeout:e.timeout,type:u(e.type,`type`,`text`)},[[`http_config`,`header`]]),m=await a(`Updating`,async()=>o.send(y,{body:p,zone_id:f,healthcheck_id:e[`healthcheck-id`]}));r(m,{successLabel:`Updated`})})};var S={method:`GET`,path:t=>e`/zones/${t.zone_id}/healthchecks/${t.healthcheck_id}`};function C(e){return e.usage(`$0 healthchecks get <healthcheck-id>
8
+ Patch a configured health check.`).positional(`healthcheck-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`address`,{type:`string`,description:`The hostname or IP address of the origin server to run health checks on.`}).option(`check-regions`,{type:`string`,array:!0,description:`A list of regions from which to run health checks. Null means Cloudflare will pick a default region.`}).option(`consecutive-fails`,{type:`number`,description:`The number of consecutive fails required from a health check before changing the health to unhealthy.`}).option(`consecutive-successes`,{type:`number`,description:`The number of consecutive successes required from a health check before changing the health to healthy.`}).option(`description`,{type:`string`,description:`A human-readable description of the health check.`}).option(`http-config-allow-insecure`,{type:`boolean`,description:`Do not validate the certificate when the health check uses HTTPS.`}).option(`http-config-expected-body`,{type:`string`,description:`A case-insensitive sub-string to look for in the response body. If this string is not found, the origin will be marked as unhealthy.`}).option(`http-config-expected-codes`,{type:`string`,array:!0,description:`The expected HTTP response codes (e.g. "200") or code ranges (e.g. "2xx" for all codes starting with 2) of the health check.`}).option(`http-config-follow-redirects`,{type:`boolean`,description:`Follow redirects if the origin returns a 3xx status code.`}).option(`http-config-header`,{type:`string`,description:`The HTTP request headers to send in the health check. It is recommended you set a Host header by default. The User-Agent header cannot be overridden. Provide as a JSON object or @path/to/file.json.`}).option(`http-config-method`,{type:`string`,description:`The HTTP method to use for the health check.`,choices:[`GET`,`HEAD`]}).coerce(`http-config-method`,e=>u(e,`http-config-method`,`text`)).option(`http-config-path`,{type:`string`,description:`The endpoint path to health check against.`}).option(`http-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80 if type is HTTP or 443 if type is HTTPS.`}).option(`interval`,{type:`number`,description:`The interval between each health check. Shorter intervals may give quicker notifications if the origin status changes, but will increase load on the origin as we check from multiple locations.`}).option(`name`,{type:`string`,description:`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`}).option(`retries`,{type:`number`,description:`The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.`}).option(`suspended`,{type:`boolean`,description:`If suspended, no health checks are sent to the origin.`}).option(`tcp-config-method`,{type:`string`,description:`The TCP connection method to use for the health check.`,choices:[`connection_established`]}).coerce(`tcp-config-method`,e=>u(e,`tcp-config-method`,`text`)).option(`tcp-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80.`}).option(`timeout`,{type:`number`,description:`The timeout (in seconds) before marking the health check as failed.`}).option(`type`,{type:`string`,description:`The protocol to use for the health check. Currently supported protocols are 'HTTP', 'HTTPS' and 'TCP'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const x={command:`edit <healthcheck-id>`,describe:`Patch Health Check`,builder:b,handler:async e=>o({command:`healthchecks edit`,classification:{safeFlags:[`http-config-allow-insecure`,`http-config-follow-redirects`,`http-config-method`,`suspended`,`tcp-config-method`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf healthchecks edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/healthchecks/${e[`healthcheck-id`]==null?`<healthcheck-id>`:encodeURIComponent(String(e[`healthcheck-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"healthcheck-id":String(e[`healthcheck-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({address:u(e.address,`address`,`text`),check_regions:e[`check-regions`],consecutive_fails:e[`consecutive-fails`],consecutive_successes:e[`consecutive-successes`],description:u(e.description,`description`,`text`),http_config:{allow_insecure:e[`http-config-allow-insecure`],expected_body:u(e[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:e[`http-config-expected-codes`],follow_redirects:e[`http-config-follow-redirects`],header:c(e[`http-config-header`],`http-config-header`),method:e[`http-config-method`],path:u(e[`http-config-path`],`http-config-path`,`text`),port:e[`http-config-port`]},interval:e.interval,name:u(e.name,`name`,`text`),retries:e.retries,suspended:e.suspended,tcp_config:{method:e[`tcp-config-method`],port:e[`tcp-config-port`]},timeout:e.timeout,type:u(e.type,`type`,`text`)},[[`http_config`,`header`]]):s(e.body)});return}let o=e.body===void 0?void 0:s(e.body),f=await t(e),p=await n({zone:e.zone},f,{quiet:e.quiet});if(e.zoneId=p,e.body!==void 0){let t=o,n=await a(`Updating`,async()=>f.send(y,{body:t,zone_id:p,healthcheck_id:e[`healthcheck-id`]}));r(n,{successLabel:`Updated`});return}e.address===void 0&&(e.address=await d(`address`,`The hostname or IP address of the origin server to run health checks on.`)),e.name===void 0&&(e.name=await d(`name`,`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`));let m=l({address:u(e.address,`address`,`text`),check_regions:e[`check-regions`],consecutive_fails:e[`consecutive-fails`],consecutive_successes:e[`consecutive-successes`],description:u(e.description,`description`,`text`),http_config:{allow_insecure:e[`http-config-allow-insecure`],expected_body:u(e[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:e[`http-config-expected-codes`],follow_redirects:e[`http-config-follow-redirects`],header:c(e[`http-config-header`],`http-config-header`),method:e[`http-config-method`],path:u(e[`http-config-path`],`http-config-path`,`text`),port:e[`http-config-port`]},interval:e.interval,name:u(e.name,`name`,`text`),retries:e.retries,suspended:e.suspended,tcp_config:{method:e[`tcp-config-method`],port:e[`tcp-config-port`]},timeout:e.timeout,type:u(e.type,`type`,`text`)},[[`http_config`,`header`]]),h=await a(`Updating`,async()=>f.send(y,{body:m,zone_id:p,healthcheck_id:e[`healthcheck-id`]}));r(h,{successLabel:`Updated`})})};var S={method:`GET`,path:t=>e`/zones/${t.zone_id}/healthchecks/${t.healthcheck_id}`};function C(e){return e.usage(`$0 healthchecks get <healthcheck-id>
9
9
 
10
10
  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 w={command:`get <healthcheck-id>`,describe:`Health Check Details`,builder:C,handler:async e=>o({command:`healthchecks get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf healthchecks get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/healthchecks/${e[`healthcheck-id`]==null?`<healthcheck-id>`:encodeURIComponent(String(e[`healthcheck-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"healthcheck-id":String(e[`healthcheck-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(S,{zone_id:s,healthcheck_id:e[`healthcheck-id`]}));r(c,{successLabel:`Loaded`})})};var T={method:`GET`,path:t=>e`/zones/${t.zone_id}/healthchecks`,query:[`page`,`per_page`]};function E(e){return e.usage(`$0 healthchecks list
11
11
 
12
12
  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 D={command:`list`,describe:`List Health Checks`,builder:E,handler:async e=>o({command:`healthchecks list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let o={page:e.page,per_page:e[`per-page`]};if(e.dryRun){i({command:`cf healthchecks list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/healthchecks`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:o,bodyKind:`none`});return}let s=await t(e),c=await n({zone:e.zone},s,{quiet:e.quiet});e.zoneId=c;let l=await a(`Loading`,async()=>s.send(T,{zone_id:c,...o}));r(l,{successLabel:`Loaded`})})};var O={method:`POST`,path:t=>e`/zones/${t.zone_id}/healthchecks/preview`,body:`json`};function k(e){return e.usage(`$0 healthchecks previews create
13
13
 
14
- 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-header`,{type:`string`,description:`The HTTP request headers to send in the health check. It is recommended you set a Host header by default. The User-Agent header cannot be overridden. Provide as a JSON object or @path/to/file.json.`}).option(`http-config-method`,{type:`string`,description:`The HTTP method to use for the health check.`,choices:[`GET`,`HEAD`]}).coerce(`http-config-method`,e=>u(e,`http-config-method`,`text`)).option(`http-config-path`,{type:`string`,description:`The endpoint path to health check against.`}).option(`http-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80 if type is HTTP or 443 if type is HTTPS.`}).option(`interval`,{type:`number`,description:`The interval between each health check. Shorter intervals may give quicker notifications if the origin status changes, but will increase load on the origin as we check from multiple locations.`,default:60}).option(`name`,{type:`string`,description:`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`}).option(`retries`,{type:`number`,description:`The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.`,default:2}).option(`suspended`,{type:`boolean`,description:`If suspended, no health checks are sent to the origin.`,default:!1}).option(`tcp-config-method`,{type:`string`,description:`The TCP connection method to use for the health check.`,choices:[`connection_established`]}).coerce(`tcp-config-method`,e=>u(e,`tcp-config-method`,`text`)).option(`tcp-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80.`}).option(`timeout`,{type:`number`,description:`The timeout (in seconds) before marking the health check as failed.`,default:5}).option(`type`,{type:`string`,description:`The protocol to use for the health check. Currently supported protocols are 'HTTP', 'HTTPS' and 'TCP'.`,default:`HTTP`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const A={command:`create`,describe:`Create Preview Health Check`,builder:k,handler:async e=>o({command:`healthchecks previews create`,classification:{safeFlags:[`http-config-allow-insecure`,`http-config-follow-redirects`,`http-config-method`,`suspended`,`tcp-config-method`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf healthchecks previews create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/healthchecks/preview`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({address:u(e.address,`address`,`text`),check_regions:e[`check-regions`],consecutive_fails:e[`consecutive-fails`],consecutive_successes:e[`consecutive-successes`],description:u(e.description,`description`,`text`),http_config:{allow_insecure:e[`http-config-allow-insecure`],expected_body:u(e[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:e[`http-config-expected-codes`],follow_redirects:e[`http-config-follow-redirects`],header:c(e[`http-config-header`],`http-config-header`),method:e[`http-config-method`],path:u(e[`http-config-path`],`http-config-path`,`text`),port:e[`http-config-port`]},interval:e.interval,name:u(e.name,`name`,`text`),retries:e.retries,suspended:e.suspended,tcp_config:{method:e[`tcp-config-method`],port:e[`tcp-config-port`]},timeout:e.timeout,type:u(e.type,`type`,`text`)},[[`http_config`,`header`]]):s(e.body)});return}let o=await t(e),f=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=f,e.body){let t=s(e.body),n=await a(`Creating`,async()=>o.send(O,{body:t,zone_id:f}));r(n,{successLabel:`Created`});return}e.address===void 0&&(e.address=await d(`address`,`The hostname or IP address of the origin server to run health checks on.`)),e.name===void 0&&(e.name=await d(`name`,`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`));let p=l({address:u(e.address,`address`,`text`),check_regions:e[`check-regions`],consecutive_fails:e[`consecutive-fails`],consecutive_successes:e[`consecutive-successes`],description:u(e.description,`description`,`text`),http_config:{allow_insecure:e[`http-config-allow-insecure`],expected_body:u(e[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:e[`http-config-expected-codes`],follow_redirects:e[`http-config-follow-redirects`],header:c(e[`http-config-header`],`http-config-header`),method:e[`http-config-method`],path:u(e[`http-config-path`],`http-config-path`,`text`),port:e[`http-config-port`]},interval:e.interval,name:u(e.name,`name`,`text`),retries:e.retries,suspended:e.suspended,tcp_config:{method:e[`tcp-config-method`],port:e[`tcp-config-port`]},timeout:e.timeout,type:u(e.type,`type`,`text`)},[[`http_config`,`header`]]),m=await a(`Creating`,async()=>o.send(O,{body:p,zone_id:f}));r(m,{successLabel:`Created`})})};var j={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/healthchecks/preview/${t.healthcheck_id}`};function M(e){return e.usage(`$0 healthchecks previews delete <healthcheck-id>
14
+ 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-header`,{type:`string`,description:`The HTTP request headers to send in the health check. It is recommended you set a Host header by default. The User-Agent header cannot be overridden. Provide as a JSON object or @path/to/file.json.`}).option(`http-config-method`,{type:`string`,description:`The HTTP method to use for the health check.`,choices:[`GET`,`HEAD`]}).coerce(`http-config-method`,e=>u(e,`http-config-method`,`text`)).option(`http-config-path`,{type:`string`,description:`The endpoint path to health check against.`}).option(`http-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80 if type is HTTP or 443 if type is HTTPS.`}).option(`interval`,{type:`number`,description:`The interval between each health check. Shorter intervals may give quicker notifications if the origin status changes, but will increase load on the origin as we check from multiple locations.`,default:60}).option(`name`,{type:`string`,description:`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`}).option(`retries`,{type:`number`,description:`The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.`,default:2}).option(`suspended`,{type:`boolean`,description:`If suspended, no health checks are sent to the origin.`,default:!1}).option(`tcp-config-method`,{type:`string`,description:`The TCP connection method to use for the health check.`,choices:[`connection_established`]}).coerce(`tcp-config-method`,e=>u(e,`tcp-config-method`,`text`)).option(`tcp-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80.`}).option(`timeout`,{type:`number`,description:`The timeout (in seconds) before marking the health check as failed.`,default:5}).option(`type`,{type:`string`,description:`The protocol to use for the health check. Currently supported protocols are 'HTTP', 'HTTPS' and 'TCP'.`,default:`HTTP`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const A={command:`create`,describe:`Create Preview Health Check`,builder:k,handler:async e=>o({command:`healthchecks previews create`,classification:{safeFlags:[`http-config-allow-insecure`,`http-config-follow-redirects`,`http-config-method`,`suspended`,`tcp-config-method`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf healthchecks previews create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/healthchecks/preview`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({address:u(e.address,`address`,`text`),check_regions:e[`check-regions`],consecutive_fails:e[`consecutive-fails`],consecutive_successes:e[`consecutive-successes`],description:u(e.description,`description`,`text`),http_config:{allow_insecure:e[`http-config-allow-insecure`],expected_body:u(e[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:e[`http-config-expected-codes`],follow_redirects:e[`http-config-follow-redirects`],header:c(e[`http-config-header`],`http-config-header`),method:e[`http-config-method`],path:u(e[`http-config-path`],`http-config-path`,`text`),port:e[`http-config-port`]},interval:e.interval,name:u(e.name,`name`,`text`),retries:e.retries,suspended:e.suspended,tcp_config:{method:e[`tcp-config-method`],port:e[`tcp-config-port`]},timeout:e.timeout,type:u(e.type,`type`,`text`)},[[`http_config`,`header`]]):s(e.body)});return}let o=e.body===void 0?void 0:s(e.body),f=await t(e),p=await n({zone:e.zone},f,{quiet:e.quiet});if(e.zoneId=p,e.body!==void 0){let e=o,t=await a(`Creating`,async()=>f.send(O,{body:e,zone_id:p}));r(t,{successLabel:`Created`});return}e.address===void 0&&(e.address=await d(`address`,`The hostname or IP address of the origin server to run health checks on.`)),e.name===void 0&&(e.name=await d(`name`,`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`));let m=l({address:u(e.address,`address`,`text`),check_regions:e[`check-regions`],consecutive_fails:e[`consecutive-fails`],consecutive_successes:e[`consecutive-successes`],description:u(e.description,`description`,`text`),http_config:{allow_insecure:e[`http-config-allow-insecure`],expected_body:u(e[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:e[`http-config-expected-codes`],follow_redirects:e[`http-config-follow-redirects`],header:c(e[`http-config-header`],`http-config-header`),method:e[`http-config-method`],path:u(e[`http-config-path`],`http-config-path`,`text`),port:e[`http-config-port`]},interval:e.interval,name:u(e.name,`name`,`text`),retries:e.retries,suspended:e.suspended,tcp_config:{method:e[`tcp-config-method`],port:e[`tcp-config-port`]},timeout:e.timeout,type:u(e.type,`type`,`text`)},[[`http_config`,`header`]]),h=await a(`Creating`,async()=>f.send(O,{body:m,zone_id:p}));r(h,{successLabel:`Created`})})};var j={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/healthchecks/preview/${t.healthcheck_id}`};function M(e){return e.usage(`$0 healthchecks previews delete <healthcheck-id>
15
15
 
16
16
  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 N={command:`delete <healthcheck-id>`,describe:`Delete Preview Health Check`,builder:M,handler:async e=>o({command:`healthchecks previews delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf healthchecks previews delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/healthchecks/preview/${e[`healthcheck-id`]==null?`<healthcheck-id>`:encodeURIComponent(String(e[`healthcheck-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"healthcheck-id":String(e[`healthcheck-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=s,!await f({force:!!e.force}))return;let c=await a(`Deleting`,async()=>o.send(j,{zone_id:s,healthcheck_id:e[`healthcheck-id`]}));r(c,{successLabel:`Deleted`})})};var P={method:`GET`,path:t=>e`/zones/${t.zone_id}/healthchecks/preview/${t.healthcheck_id}`};function F(e){return e.usage(`$0 healthchecks previews get <healthcheck-id>
17
17
 
18
18
  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 I={command:`get <healthcheck-id>`,describe:`Health Check Preview Details`,builder:F,handler:async e=>o({command:`healthchecks previews get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf healthchecks previews get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/healthchecks/preview/${e[`healthcheck-id`]==null?`<healthcheck-id>`:encodeURIComponent(String(e[`healthcheck-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"healthcheck-id":String(e[`healthcheck-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(P,{zone_id:s,healthcheck_id:e[`healthcheck-id`]}));r(c,{successLabel:`Loaded`})})},L={command:`previews`,describe:`Test a health check configuration before deploying it to production`,builder:e=>e.command(A).command(N).command(I).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var R={method:`PUT`,path:t=>e`/zones/${t.zone_id}/healthchecks/${t.healthcheck_id}`,body:`json`};function z(e){return e.usage(`$0 healthchecks update <healthcheck-id>
19
19
 
20
- 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-header`,{type:`string`,description:`The HTTP request headers to send in the health check. It is recommended you set a Host header by default. The User-Agent header cannot be overridden. Provide as a JSON object or @path/to/file.json.`}).option(`http-config-method`,{type:`string`,description:`The HTTP method to use for the health check.`,choices:[`GET`,`HEAD`]}).coerce(`http-config-method`,e=>u(e,`http-config-method`,`text`)).option(`http-config-path`,{type:`string`,description:`The endpoint path to health check against.`}).option(`http-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80 if type is HTTP or 443 if type is HTTPS.`}).option(`interval`,{type:`number`,description:`The interval between each health check. Shorter intervals may give quicker notifications if the origin status changes, but will increase load on the origin as we check from multiple locations.`}).option(`name`,{type:`string`,description:`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`}).option(`retries`,{type:`number`,description:`The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.`}).option(`suspended`,{type:`boolean`,description:`If suspended, no health checks are sent to the origin.`}).option(`tcp-config-method`,{type:`string`,description:`The TCP connection method to use for the health check.`,choices:[`connection_established`]}).coerce(`tcp-config-method`,e=>u(e,`tcp-config-method`,`text`)).option(`tcp-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80.`}).option(`timeout`,{type:`number`,description:`The timeout (in seconds) before marking the health check as failed.`}).option(`type`,{type:`string`,description:`The protocol to use for the health check. Currently supported protocols are 'HTTP', 'HTTPS' and 'TCP'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const B={command:`update <healthcheck-id>`,describe:`Update Health Check`,builder:z,handler:async e=>o({command:`healthchecks update`,classification:{safeFlags:[`http-config-allow-insecure`,`http-config-follow-redirects`,`http-config-method`,`suspended`,`tcp-config-method`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf healthchecks update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/healthchecks/${e[`healthcheck-id`]==null?`<healthcheck-id>`:encodeURIComponent(String(e[`healthcheck-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"healthcheck-id":String(e[`healthcheck-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({address:u(e.address,`address`,`text`),check_regions:e[`check-regions`],consecutive_fails:e[`consecutive-fails`],consecutive_successes:e[`consecutive-successes`],description:u(e.description,`description`,`text`),http_config:{allow_insecure:e[`http-config-allow-insecure`],expected_body:u(e[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:e[`http-config-expected-codes`],follow_redirects:e[`http-config-follow-redirects`],header:c(e[`http-config-header`],`http-config-header`),method:e[`http-config-method`],path:u(e[`http-config-path`],`http-config-path`,`text`),port:e[`http-config-port`]},interval:e.interval,name:u(e.name,`name`,`text`),retries:e.retries,suspended:e.suspended,tcp_config:{method:e[`tcp-config-method`],port:e[`tcp-config-port`]},timeout:e.timeout,type:u(e.type,`type`,`text`)},[[`http_config`,`header`]]):s(e.body)});return}let o=await t(e),f=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=f,e.body){let t=s(e.body),n=await a(`Updating`,async()=>o.send(R,{body:t,zone_id:f,healthcheck_id:e[`healthcheck-id`]}));r(n,{successLabel:`Updated`});return}e.address===void 0&&(e.address=await d(`address`,`The hostname or IP address of the origin server to run health checks on.`)),e.name===void 0&&(e.name=await d(`name`,`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`));let p=l({address:u(e.address,`address`,`text`),check_regions:e[`check-regions`],consecutive_fails:e[`consecutive-fails`],consecutive_successes:e[`consecutive-successes`],description:u(e.description,`description`,`text`),http_config:{allow_insecure:e[`http-config-allow-insecure`],expected_body:u(e[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:e[`http-config-expected-codes`],follow_redirects:e[`http-config-follow-redirects`],header:c(e[`http-config-header`],`http-config-header`),method:e[`http-config-method`],path:u(e[`http-config-path`],`http-config-path`,`text`),port:e[`http-config-port`]},interval:e.interval,name:u(e.name,`name`,`text`),retries:e.retries,suspended:e.suspended,tcp_config:{method:e[`tcp-config-method`],port:e[`tcp-config-port`]},timeout:e.timeout,type:u(e.type,`type`,`text`)},[[`http_config`,`header`]]),m=await a(`Updating`,async()=>o.send(R,{body:p,zone_id:f,healthcheck_id:e[`healthcheck-id`]}));r(m,{successLabel:`Updated`})})},V={command:`healthchecks`,describe:`Standalone health checks that monitor origin server availability from Cloudflare's edge`,builder:e=>e.command(h).command(v).command(x).command(w).command(D).command(B).command(L).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{V as default};
20
+ 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-header`,{type:`string`,description:`The HTTP request headers to send in the health check. It is recommended you set a Host header by default. The User-Agent header cannot be overridden. Provide as a JSON object or @path/to/file.json.`}).option(`http-config-method`,{type:`string`,description:`The HTTP method to use for the health check.`,choices:[`GET`,`HEAD`]}).coerce(`http-config-method`,e=>u(e,`http-config-method`,`text`)).option(`http-config-path`,{type:`string`,description:`The endpoint path to health check against.`}).option(`http-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80 if type is HTTP or 443 if type is HTTPS.`}).option(`interval`,{type:`number`,description:`The interval between each health check. Shorter intervals may give quicker notifications if the origin status changes, but will increase load on the origin as we check from multiple locations.`}).option(`name`,{type:`string`,description:`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`}).option(`retries`,{type:`number`,description:`The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.`}).option(`suspended`,{type:`boolean`,description:`If suspended, no health checks are sent to the origin.`}).option(`tcp-config-method`,{type:`string`,description:`The TCP connection method to use for the health check.`,choices:[`connection_established`]}).coerce(`tcp-config-method`,e=>u(e,`tcp-config-method`,`text`)).option(`tcp-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80.`}).option(`timeout`,{type:`number`,description:`The timeout (in seconds) before marking the health check as failed.`}).option(`type`,{type:`string`,description:`The protocol to use for the health check. Currently supported protocols are 'HTTP', 'HTTPS' and 'TCP'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const B={command:`update <healthcheck-id>`,describe:`Update Health Check`,builder:z,handler:async e=>o({command:`healthchecks update`,classification:{safeFlags:[`http-config-allow-insecure`,`http-config-follow-redirects`,`http-config-method`,`suspended`,`tcp-config-method`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf healthchecks update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/healthchecks/${e[`healthcheck-id`]==null?`<healthcheck-id>`:encodeURIComponent(String(e[`healthcheck-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"healthcheck-id":String(e[`healthcheck-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({address:u(e.address,`address`,`text`),check_regions:e[`check-regions`],consecutive_fails:e[`consecutive-fails`],consecutive_successes:e[`consecutive-successes`],description:u(e.description,`description`,`text`),http_config:{allow_insecure:e[`http-config-allow-insecure`],expected_body:u(e[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:e[`http-config-expected-codes`],follow_redirects:e[`http-config-follow-redirects`],header:c(e[`http-config-header`],`http-config-header`),method:e[`http-config-method`],path:u(e[`http-config-path`],`http-config-path`,`text`),port:e[`http-config-port`]},interval:e.interval,name:u(e.name,`name`,`text`),retries:e.retries,suspended:e.suspended,tcp_config:{method:e[`tcp-config-method`],port:e[`tcp-config-port`]},timeout:e.timeout,type:u(e.type,`type`,`text`)},[[`http_config`,`header`]]):s(e.body)});return}let o=e.body===void 0?void 0:s(e.body),f=await t(e),p=await n({zone:e.zone},f,{quiet:e.quiet});if(e.zoneId=p,e.body!==void 0){let t=o,n=await a(`Updating`,async()=>f.send(R,{body:t,zone_id:p,healthcheck_id:e[`healthcheck-id`]}));r(n,{successLabel:`Updated`});return}e.address===void 0&&(e.address=await d(`address`,`The hostname or IP address of the origin server to run health checks on.`)),e.name===void 0&&(e.name=await d(`name`,`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`));let m=l({address:u(e.address,`address`,`text`),check_regions:e[`check-regions`],consecutive_fails:e[`consecutive-fails`],consecutive_successes:e[`consecutive-successes`],description:u(e.description,`description`,`text`),http_config:{allow_insecure:e[`http-config-allow-insecure`],expected_body:u(e[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:e[`http-config-expected-codes`],follow_redirects:e[`http-config-follow-redirects`],header:c(e[`http-config-header`],`http-config-header`),method:e[`http-config-method`],path:u(e[`http-config-path`],`http-config-path`,`text`),port:e[`http-config-port`]},interval:e.interval,name:u(e.name,`name`,`text`),retries:e.retries,suspended:e.suspended,tcp_config:{method:e[`tcp-config-method`],port:e[`tcp-config-port`]},timeout:e.timeout,type:u(e.type,`type`,`text`)},[[`http_config`,`header`]]),h=await a(`Updating`,async()=>f.send(R,{body:m,zone_id:p,healthcheck_id:e[`healthcheck-id`]}));r(h,{successLabel:`Updated`})})},V={command:`healthchecks`,describe:`Standalone health checks that monitor origin server availability from Cloudflare's edge`,builder:e=>e.command(h).command(v).command(x).command(w).command(D).command(B).command(L).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{V as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CvzO-cQH.mjs";import{n}from"./auth-D5Yj9eYU.mjs";import{a as r,t as i}from"./context-BvLXzoMs.mjs";import{t as a}from"./output-BJEgbI0G.mjs";import{t as o}from"./dry-run-gy0Hl9xo.mjs";import{t as s}from"./progress-B-CVX0kn.mjs";import{t as c}from"./run-BZ6Fj3jQ.mjs";import"./telemetry-BZdRnr26.mjs";import{n as l,t as u}from"./body-parser-BKcZS9iJ.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{a as f,i as p,n as m}from"./prompt-DJF_Rs5S.mjs";var h={method:`POST`,path:t=>e`/accounts/${t.account_id}/hyperdrive/configs`,body:`json`};function g(e){return e.usage(`$0 hyperdrive create
2
+ import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-DIJ7SIKC.mjs";import{n}from"./auth-B-h0BHg7.mjs";import{a as r,t as i}from"./context-BY1Eh_Qe.mjs";import{t as a}from"./output-BZQEl3mK.mjs";import{t as o}from"./dry-run-kJbjn4kG.mjs";import{t as s}from"./progress-yvPscjYg.mjs";import{t as c}from"./run-BOKI1uWa.mjs";import"./telemetry-DkDUr4KK.mjs";import{n as l,t as u}from"./body-parser-DoewLePl.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{a as f,i as p,n as m}from"./prompt-CEpZ-lQZ.mjs";var h={method:`POST`,path:t=>e`/accounts/${t.account_id}/hyperdrive/configs`,body:`json`};function g(e){return e.usage(`$0 hyperdrive create
3
3
 
4
4
  Creates and returns a new Hyperdrive configuration. For a PlanetScale integration, the Cloudflare account must already be linked to PlanetScale in the Hyperdrive dashboard.`).option(`mtls-ca-certificate-id`,{type:`string`,description:`Define CA certificate ID obtained after uploading CA cert.`}).option(`mtls-certificate-id`,{type:`string`,description:`Define mTLS certificate ID obtained after uploading client cert.`}).option(`mtls-sslmode`,{type:`string`,description:"PostgreSQL accepts `require`, `verify-ca`, and `verify-full`. MySQL accepts `REQUIRED`, `VERIFY_CA`, and `VERIFY_IDENTITY`. The verify modes require a CA certificate; the require modes cannot be used with a CA certificate.",choices:[`require`,`verify-ca`,`verify-full`,`REQUIRED`,`VERIFY_CA`,`VERIFY_IDENTITY`]}).coerce(`mtls-sslmode`,e=>d(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
5
 
@@ -7,7 +7,7 @@ Maximum allowed: 20 for free tier accounts, 100 for paid tier accounts.
7
7
  If not specified, defaults to 20 for free tier and 60 for paid tier.
8
8
  Certain Cloudflare-managed origins may be permitted a higher limit.
9
9
  Contact Cloudflare if you need a higher limit.
10
- `}).option(`integration-custom-database-name`,{type:`string`,description:"The database name to use when connecting. Defaults to `postgres` for PostgreSQL and `mysql` for MySQL."}).option(`integration-database-branch-name`,{type:`string`,description:`The name of the PlanetScale database branch.`}).option(`integration-database-name`,{type:`string`,description:`The name of the PlanetScale database.`}).option(`integration-organization-name`,{type:`string`,description:`The name of the PlanetScale organization.`}).option(`integration-provider`,{type:`string`,description:`The database integration provider used by this operation.`,choices:[`planetscale`]}).coerce(`integration-provider`,e=>d(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=>d(e,`integration-scheme`,`text`)).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=>d(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(`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.`}).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-access-client-secret`,`origin-host`]).conflicts(`origin-access-client-secret`,[`origin-port`,`origin-service-id`]).implies(`origin-access-client-secret`,[`origin-access-client-id`,`origin-host`]).conflicts(`origin-service-id`,[`origin-host`,`origin-port`,`origin-access-client-id`,`origin-access-client-secret`]).check(e=>{if([`origin-database`,`origin-password`,`origin-scheme`,`origin-user`,`origin-host`,`origin-port`,`origin-access-client-id`,`origin-access-client-secret`,`origin-service-id`].some(t=>e[t]!==void 0)){let t=[`origin-database`,`origin-password`,`origin-scheme`,`origin-user`].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 --origin-* flag is set`)}return!0})}const _={command:`create`,describe:`Create Hyperdrive`,builder:g,handler:async e=>c({command:`hyperdrive create`,classification:{safeFlags:[`mtls-sslmode`,`integration-provider`,`integration-scheme`,`origin-scheme`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf hyperdrive create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/hyperdrive/configs`,pathParams:{},bodyKind:`json`,body:e.body===void 0?u({mtls:{ca_certificate_id:d(e[`mtls-ca-certificate-id`],`mtls-ca-certificate-id`,`text`),mtls_certificate_id:d(e[`mtls-certificate-id`],`mtls-certificate-id`,`text`),sslmode:e[`mtls-sslmode`]},name:d(e.name,`name`,`text`),origin_connection_limit:e[`origin-connection-limit`],integration:{custom_database_name:d(e[`integration-custom-database-name`],`integration-custom-database-name`,`text`),database_branch_name:d(e[`integration-database-branch-name`],`integration-database-branch-name`,`text`),database_name:d(e[`integration-database-name`],`integration-database-name`,`text`),organization_name:d(e[`integration-organization-name`],`integration-organization-name`,`text`),provider:e[`integration-provider`],scheme:e[`integration-scheme`]},origin:{database:d(e[`origin-database`],`origin-database`,`text`),password:d(e[`origin-password`],`origin-password`,`text`),scheme:e[`origin-scheme`],user:d(e[`origin-user`],`origin-user`,`text`),host:d(e[`origin-host`],`origin-host`,`text`),port:e[`origin-port`],access_client_id:d(e[`origin-access-client-id`],`origin-access-client-id`,`text`),access_client_secret:d(e[`origin-access-client-secret`],`origin-access-client-secret`,`text`),service_id:d(e[`origin-service-id`],`origin-service-id`,`text`)}}):l(e.body),sensitiveBodyPaths:[[`origin`,`password`],[`origin`,`access_client_secret`]]});return}let c=await n(e),p=e.local?t:await i();if(e.accountId=p,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(h,{body:t,account_id:p}));a(n,{successLabel:`Created`});return}e.name===void 0&&(e.name=await f(`name`,`The name of the Hyperdrive configuration. Used to identify the configuration in the Cloudflare dashboard and API.`));let m=u({mtls:{ca_certificate_id:d(e[`mtls-ca-certificate-id`],`mtls-ca-certificate-id`,`text`),mtls_certificate_id:d(e[`mtls-certificate-id`],`mtls-certificate-id`,`text`),sslmode:e[`mtls-sslmode`]},name:d(e.name,`name`,`text`),origin_connection_limit:e[`origin-connection-limit`],integration:{custom_database_name:d(e[`integration-custom-database-name`],`integration-custom-database-name`,`text`),database_branch_name:d(e[`integration-database-branch-name`],`integration-database-branch-name`,`text`),database_name:d(e[`integration-database-name`],`integration-database-name`,`text`),organization_name:d(e[`integration-organization-name`],`integration-organization-name`,`text`),provider:e[`integration-provider`],scheme:e[`integration-scheme`]},origin:{database:d(e[`origin-database`],`origin-database`,`text`),password:d(e[`origin-password`],`origin-password`,`text`),scheme:e[`origin-scheme`],user:d(e[`origin-user`],`origin-user`,`text`),host:d(e[`origin-host`],`origin-host`,`text`),port:e[`origin-port`],access_client_id:d(e[`origin-access-client-id`],`origin-access-client-id`,`text`),access_client_secret:d(e[`origin-access-client-secret`],`origin-access-client-secret`,`text`),service_id:d(e[`origin-service-id`],`origin-service-id`,`text`)}}),g=await s(`Creating`,async()=>c.send(h,{body:m,account_id:p}));a(g,{successLabel:`Created`})})};var v={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/hyperdrive/configs/${t.hyperdrive_id}`};function y(e){return e.usage(`$0 hyperdrive delete <hyperdrive-id>
10
+ `}).option(`integration-custom-database-name`,{type:`string`,description:"The database name to use when connecting. Defaults to `postgres` for PostgreSQL and `mysql` for MySQL."}).option(`integration-database-branch-name`,{type:`string`,description:`The name of the PlanetScale database branch.`}).option(`integration-database-name`,{type:`string`,description:`The name of the PlanetScale database.`}).option(`integration-organization-name`,{type:`string`,description:`The name of the PlanetScale organization.`}).option(`integration-provider`,{type:`string`,description:`The database integration provider used by this operation.`,choices:[`planetscale`]}).coerce(`integration-provider`,e=>d(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=>d(e,`integration-scheme`,`text`)).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=>d(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(`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.`}).conflicts(`integration-custom-database-name`,[`origin-database`,`origin-password`,`origin-scheme`,`origin-user`,`origin-host`,`origin-port`,`origin-access-client-id`,`origin-access-client-secret`,`origin-service-id`]).implies(`integration-custom-database-name`,[`integration-database-branch-name`,`integration-database-name`,`integration-organization-name`,`integration-provider`,`integration-scheme`]).conflicts(`integration-database-branch-name`,[`origin-database`,`origin-password`,`origin-scheme`,`origin-user`,`origin-host`,`origin-port`,`origin-access-client-id`,`origin-access-client-secret`,`origin-service-id`]).implies(`integration-database-branch-name`,[`integration-database-name`,`integration-organization-name`,`integration-provider`,`integration-scheme`]).conflicts(`integration-database-name`,[`origin-database`,`origin-password`,`origin-scheme`,`origin-user`,`origin-host`,`origin-port`,`origin-access-client-id`,`origin-access-client-secret`,`origin-service-id`]).implies(`integration-database-name`,[`integration-database-branch-name`,`integration-organization-name`,`integration-provider`,`integration-scheme`]).conflicts(`integration-organization-name`,[`origin-database`,`origin-password`,`origin-scheme`,`origin-user`,`origin-host`,`origin-port`,`origin-access-client-id`,`origin-access-client-secret`,`origin-service-id`]).implies(`integration-organization-name`,[`integration-database-branch-name`,`integration-database-name`,`integration-provider`,`integration-scheme`]).conflicts(`integration-provider`,[`origin-database`,`origin-password`,`origin-scheme`,`origin-user`,`origin-host`,`origin-port`,`origin-access-client-id`,`origin-access-client-secret`,`origin-service-id`]).implies(`integration-provider`,[`integration-database-branch-name`,`integration-database-name`,`integration-organization-name`,`integration-scheme`]).conflicts(`integration-scheme`,[`origin-database`,`origin-password`,`origin-scheme`,`origin-user`,`origin-host`,`origin-port`,`origin-access-client-id`,`origin-access-client-secret`,`origin-service-id`]).implies(`integration-scheme`,[`integration-database-branch-name`,`integration-database-name`,`integration-organization-name`,`integration-provider`]).conflicts(`origin-database`,[`integration-custom-database-name`,`integration-database-branch-name`,`integration-database-name`,`integration-organization-name`,`integration-provider`,`integration-scheme`]).implies(`origin-database`,[`origin-password`,`origin-scheme`,`origin-user`]).conflicts(`origin-password`,[`integration-custom-database-name`,`integration-database-branch-name`,`integration-database-name`,`integration-organization-name`,`integration-provider`,`integration-scheme`]).implies(`origin-password`,[`origin-database`,`origin-scheme`,`origin-user`]).conflicts(`origin-scheme`,[`integration-custom-database-name`,`integration-database-branch-name`,`integration-database-name`,`integration-organization-name`,`integration-provider`,`integration-scheme`]).implies(`origin-scheme`,[`origin-database`,`origin-password`,`origin-user`]).conflicts(`origin-user`,[`integration-custom-database-name`,`integration-database-branch-name`,`integration-database-name`,`integration-organization-name`,`integration-provider`,`integration-scheme`]).implies(`origin-user`,[`origin-database`,`origin-password`,`origin-scheme`]).conflicts(`origin-host`,[`origin-service-id`,`integration-custom-database-name`,`integration-database-branch-name`,`integration-database-name`,`integration-organization-name`,`integration-provider`,`integration-scheme`]).implies(`origin-host`,[`origin-database`,`origin-password`,`origin-scheme`,`origin-user`]).conflicts(`origin-port`,[`origin-access-client-id`,`origin-access-client-secret`,`origin-service-id`,`integration-custom-database-name`,`integration-database-branch-name`,`integration-database-name`,`integration-organization-name`,`integration-provider`,`integration-scheme`]).implies(`origin-port`,[`origin-host`,`origin-database`,`origin-password`,`origin-scheme`,`origin-user`]).conflicts(`origin-access-client-id`,[`origin-port`,`origin-service-id`,`integration-custom-database-name`,`integration-database-branch-name`,`integration-database-name`,`integration-organization-name`,`integration-provider`,`integration-scheme`]).implies(`origin-access-client-id`,[`origin-host`,`origin-access-client-secret`,`origin-database`,`origin-password`,`origin-scheme`,`origin-user`]).conflicts(`origin-access-client-secret`,[`origin-port`,`origin-service-id`,`integration-custom-database-name`,`integration-database-branch-name`,`integration-database-name`,`integration-organization-name`,`integration-provider`,`integration-scheme`]).implies(`origin-access-client-secret`,[`origin-host`,`origin-access-client-id`,`origin-database`,`origin-password`,`origin-scheme`,`origin-user`]).conflicts(`origin-service-id`,[`origin-host`,`origin-port`,`origin-access-client-id`,`origin-access-client-secret`,`integration-custom-database-name`,`integration-database-branch-name`,`integration-database-name`,`integration-organization-name`,`integration-provider`,`integration-scheme`]).implies(`origin-service-id`,[`origin-database`,`origin-password`,`origin-scheme`,`origin-user`])}const _={command:`create`,describe:`Create Hyperdrive`,builder:g,handler:async e=>c({command:`hyperdrive create`,classification:{safeFlags:[`mtls-sslmode`,`integration-provider`,`integration-scheme`,`origin-scheme`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf hyperdrive create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/hyperdrive/configs`,pathParams:{},bodyKind:`json`,body:e.body===void 0?u({mtls:{ca_certificate_id:d(e[`mtls-ca-certificate-id`],`mtls-ca-certificate-id`,`text`),mtls_certificate_id:d(e[`mtls-certificate-id`],`mtls-certificate-id`,`text`),sslmode:e[`mtls-sslmode`]},name:d(e.name,`name`,`text`),origin_connection_limit:e[`origin-connection-limit`],integration:{custom_database_name:d(e[`integration-custom-database-name`],`integration-custom-database-name`,`text`),database_branch_name:d(e[`integration-database-branch-name`],`integration-database-branch-name`,`text`),database_name:d(e[`integration-database-name`],`integration-database-name`,`text`),organization_name:d(e[`integration-organization-name`],`integration-organization-name`,`text`),provider:e[`integration-provider`],scheme:e[`integration-scheme`]},origin:{database:d(e[`origin-database`],`origin-database`,`text`),password:d(e[`origin-password`],`origin-password`,`text`),scheme:e[`origin-scheme`],user:d(e[`origin-user`],`origin-user`,`text`),host:d(e[`origin-host`],`origin-host`,`text`),port:e[`origin-port`],access_client_id:d(e[`origin-access-client-id`],`origin-access-client-id`,`text`),access_client_secret:d(e[`origin-access-client-secret`],`origin-access-client-secret`,`text`),service_id:d(e[`origin-service-id`],`origin-service-id`,`text`)}}):l(e.body),sensitiveBodyPaths:[[`origin`,`password`],[`origin`,`access_client_secret`]]});return}let c=e.body===void 0?void 0:l(e.body),p=await n(e),m=e.local?t:await i();if(e.accountId=m,e.body!==void 0){let e=c,t=await s(`Creating`,async()=>p.send(h,{body:e,account_id:m}));a(t,{successLabel:`Created`});return}e.name===void 0&&(e.name=await f(`name`,`The name of the Hyperdrive configuration. Used to identify the configuration in the Cloudflare dashboard and API.`));let g=u({mtls:{ca_certificate_id:d(e[`mtls-ca-certificate-id`],`mtls-ca-certificate-id`,`text`),mtls_certificate_id:d(e[`mtls-certificate-id`],`mtls-certificate-id`,`text`),sslmode:e[`mtls-sslmode`]},name:d(e.name,`name`,`text`),origin_connection_limit:e[`origin-connection-limit`],integration:{custom_database_name:d(e[`integration-custom-database-name`],`integration-custom-database-name`,`text`),database_branch_name:d(e[`integration-database-branch-name`],`integration-database-branch-name`,`text`),database_name:d(e[`integration-database-name`],`integration-database-name`,`text`),organization_name:d(e[`integration-organization-name`],`integration-organization-name`,`text`),provider:e[`integration-provider`],scheme:e[`integration-scheme`]},origin:{database:d(e[`origin-database`],`origin-database`,`text`),password:d(e[`origin-password`],`origin-password`,`text`),scheme:e[`origin-scheme`],user:d(e[`origin-user`],`origin-user`,`text`),host:d(e[`origin-host`],`origin-host`,`text`),port:e[`origin-port`],access_client_id:d(e[`origin-access-client-id`],`origin-access-client-id`,`text`),access_client_secret:d(e[`origin-access-client-secret`],`origin-access-client-secret`,`text`),service_id:d(e[`origin-service-id`],`origin-service-id`,`text`)}}),_=await s(`Creating`,async()=>p.send(h,{body:g,account_id:m}));a(_,{successLabel:`Created`})})};var v={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/hyperdrive/configs/${t.hyperdrive_id}`};function y(e){return e.usage(`$0 hyperdrive delete <hyperdrive-id>
11
11
 
12
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 b={command:`delete <hyperdrive-id>`,describe:`Delete Hyperdrive`,builder:y,handler:async e=>c({command:`hyperdrive delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf hyperdrive delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/hyperdrive/configs/${e[`hyperdrive-id`]==null?`<hyperdrive-id>`:encodeURIComponent(String(e[`hyperdrive-id`]))}`,pathParams:{"hyperdrive-id":String(e[`hyperdrive-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await m({force:!!e.force,message:`This operation deletes an existing Hyperdrive configuration.`}))return;let u=await s(`Deleting`,async()=>c.send(v,{account_id:l,hyperdrive_id:e[`hyperdrive-id`]}));a(u,{successLabel:`Deleted`})})};var x={method:`GET`,path:t=>e`/accounts/${t.account_id}/hyperdrive/configs/${t.hyperdrive_id}`};function S(e){return e.usage(`$0 hyperdrive get <hyperdrive-id>
13
13
 
@@ -23,7 +23,7 @@ Maximum allowed: 20 for free tier accounts, 100 for paid tier accounts.
23
23
  If not specified, defaults to 20 for free tier and 60 for paid tier.
24
24
  Certain Cloudflare-managed origins may be permitted a higher limit.
25
25
  Contact Cloudflare if you need a higher limit.
26
- `}).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-access-client-secret`,`origin-host`]).conflicts(`origin-access-client-secret`,[`origin-port`,`origin-service-id`]).implies(`origin-access-client-secret`,[`origin-access-client-id`,`origin-host`]).conflicts(`origin-service-id`,[`origin-host`,`origin-port`,`origin-access-client-id`,`origin-access-client-secret`])}const P={command:`replace <hyperdrive-id>`,describe:`Replace Hyperdrive`,builder:N,handler:async e=>c({command:`hyperdrive replace`,classification:{safeFlags:[`caching-disabled`,`mtls-sslmode`,`origin-scheme`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf hyperdrive replace`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/hyperdrive/configs/${e[`hyperdrive-id`]==null?`<hyperdrive-id>`:encodeURIComponent(String(e[`hyperdrive-id`]))}`,pathParams:{"hyperdrive-id":String(e[`hyperdrive-id`]??``)},bodyKind:`json`,body:e.body===void 0?u({caching:{disabled:e[`caching-disabled`],max_age:e[`caching-max-age`],stale_while_revalidate:e[`caching-stale-while-revalidate`]},mtls:{ca_certificate_id:d(e[`mtls-ca-certificate-id`],`mtls-ca-certificate-id`,`text`),mtls_certificate_id:d(e[`mtls-certificate-id`],`mtls-certificate-id`,`text`),sslmode:e[`mtls-sslmode`]},name:d(e.name,`name`,`text`),origin:{database:d(e[`origin-database`],`origin-database`,`text`),password:d(e[`origin-password`],`origin-password`,`text`),scheme:e[`origin-scheme`],user:d(e[`origin-user`],`origin-user`,`text`),host:d(e[`origin-host`],`origin-host`,`text`),port:e[`origin-port`],access_client_id:d(e[`origin-access-client-id`],`origin-access-client-id`,`text`),access_client_secret:d(e[`origin-access-client-secret`],`origin-access-client-secret`,`text`),service_id:d(e[`origin-service-id`],`origin-service-id`,`text`)},origin_connection_limit:e[`origin-connection-limit`]}):l(e.body),sensitiveBodyPaths:[[`origin`,`password`],[`origin`,`access_client_secret`]]});return}let c=await n(e),m=e.local?t:await i();if(e.accountId=m,e.body){let t=l(e.body),n=await s(`Updating`,async()=>c.send(M,{body:t,account_id:m,hyperdrive_id:e[`hyperdrive-id`]}));a(n,{successLabel:`Updated`});return}e.name===void 0&&(e.name=await f(`name`,`The name of the Hyperdrive configuration. Used to identify the configuration in the Cloudflare dashboard and API.`)),e[`origin-database`]===void 0&&(e[`origin-database`]=await f(`origin-database`,`Set the name of your origin database.`)),e[`origin-password`]===void 0&&(e[`origin-password`]=await f(`origin-password`,`Set the password needed to access your origin database. The API never returns this write-only value.`,{kind:`secret`})),e[`origin-scheme`]===void 0&&(e[`origin-scheme`]=await p(`origin-scheme`,`Specifies the URL scheme used to connect to your origin database.`,[`postgres`,`postgresql`,`mysql`])),e[`origin-user`]===void 0&&(e[`origin-user`]=await f(`origin-user`,`Set the user of your origin database.`));let h=u({caching:{disabled:e[`caching-disabled`],max_age:e[`caching-max-age`],stale_while_revalidate:e[`caching-stale-while-revalidate`]},mtls:{ca_certificate_id:d(e[`mtls-ca-certificate-id`],`mtls-ca-certificate-id`,`text`),mtls_certificate_id:d(e[`mtls-certificate-id`],`mtls-certificate-id`,`text`),sslmode:e[`mtls-sslmode`]},name:d(e.name,`name`,`text`),origin:{database:d(e[`origin-database`],`origin-database`,`text`),password:d(e[`origin-password`],`origin-password`,`text`),scheme:e[`origin-scheme`],user:d(e[`origin-user`],`origin-user`,`text`),host:d(e[`origin-host`],`origin-host`,`text`),port:e[`origin-port`],access_client_id:d(e[`origin-access-client-id`],`origin-access-client-id`,`text`),access_client_secret:d(e[`origin-access-client-secret`],`origin-access-client-secret`,`text`),service_id:d(e[`origin-service-id`],`origin-service-id`,`text`)},origin_connection_limit:e[`origin-connection-limit`]}),g=await s(`Updating`,async()=>c.send(M,{body:h,account_id:m,hyperdrive_id:e[`hyperdrive-id`]}));a(g,{successLabel:`Updated`})})};var F={method:`POST`,path:t=>e`/accounts/${t.account_id}/hyperdrive/configs/${t.hyperdrive_id}/restart`};function I(e){return e.usage(`$0 hyperdrive restart <hyperdrive-id>
26
+ `}).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 P={command:`replace <hyperdrive-id>`,describe:`Replace Hyperdrive`,builder:N,handler:async e=>c({command:`hyperdrive replace`,classification:{safeFlags:[`caching-disabled`,`mtls-sslmode`,`origin-scheme`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf hyperdrive replace`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/hyperdrive/configs/${e[`hyperdrive-id`]==null?`<hyperdrive-id>`:encodeURIComponent(String(e[`hyperdrive-id`]))}`,pathParams:{"hyperdrive-id":String(e[`hyperdrive-id`]??``)},bodyKind:`json`,body:e.body===void 0?u({caching:{disabled:e[`caching-disabled`],max_age:e[`caching-max-age`],stale_while_revalidate:e[`caching-stale-while-revalidate`]},mtls:{ca_certificate_id:d(e[`mtls-ca-certificate-id`],`mtls-ca-certificate-id`,`text`),mtls_certificate_id:d(e[`mtls-certificate-id`],`mtls-certificate-id`,`text`),sslmode:e[`mtls-sslmode`]},name:d(e.name,`name`,`text`),origin:{database:d(e[`origin-database`],`origin-database`,`text`),password:d(e[`origin-password`],`origin-password`,`text`),scheme:e[`origin-scheme`],user:d(e[`origin-user`],`origin-user`,`text`),host:d(e[`origin-host`],`origin-host`,`text`),port:e[`origin-port`],access_client_id:d(e[`origin-access-client-id`],`origin-access-client-id`,`text`),access_client_secret:d(e[`origin-access-client-secret`],`origin-access-client-secret`,`text`),service_id:d(e[`origin-service-id`],`origin-service-id`,`text`)},origin_connection_limit:e[`origin-connection-limit`]}):l(e.body),sensitiveBodyPaths:[[`origin`,`password`],[`origin`,`access_client_secret`]]});return}let c=e.body===void 0?void 0:l(e.body),m=await n(e),h=e.local?t:await i();if(e.accountId=h,e.body!==void 0){let t=c,n=await s(`Updating`,async()=>m.send(M,{body:t,account_id:h,hyperdrive_id:e[`hyperdrive-id`]}));a(n,{successLabel:`Updated`});return}e.name===void 0&&(e.name=await f(`name`,`The name of the Hyperdrive configuration. Used to identify the configuration in the Cloudflare dashboard and API.`)),e[`origin-database`]===void 0&&(e[`origin-database`]=await f(`origin-database`,`Set the name of your origin database.`)),e[`origin-password`]===void 0&&(e[`origin-password`]=await f(`origin-password`,`Set the password needed to access your origin database. The API never returns this write-only value.`,{kind:`secret`})),e[`origin-scheme`]===void 0&&(e[`origin-scheme`]=await p(`origin-scheme`,`Specifies the URL scheme used to connect to your origin database.`,[`postgres`,`postgresql`,`mysql`])),e[`origin-user`]===void 0&&(e[`origin-user`]=await f(`origin-user`,`Set the user of your origin database.`));let g=u({caching:{disabled:e[`caching-disabled`],max_age:e[`caching-max-age`],stale_while_revalidate:e[`caching-stale-while-revalidate`]},mtls:{ca_certificate_id:d(e[`mtls-ca-certificate-id`],`mtls-ca-certificate-id`,`text`),mtls_certificate_id:d(e[`mtls-certificate-id`],`mtls-certificate-id`,`text`),sslmode:e[`mtls-sslmode`]},name:d(e.name,`name`,`text`),origin:{database:d(e[`origin-database`],`origin-database`,`text`),password:d(e[`origin-password`],`origin-password`,`text`),scheme:e[`origin-scheme`],user:d(e[`origin-user`],`origin-user`,`text`),host:d(e[`origin-host`],`origin-host`,`text`),port:e[`origin-port`],access_client_id:d(e[`origin-access-client-id`],`origin-access-client-id`,`text`),access_client_secret:d(e[`origin-access-client-secret`],`origin-access-client-secret`,`text`),service_id:d(e[`origin-service-id`],`origin-service-id`,`text`)},origin_connection_limit:e[`origin-connection-limit`]}),_=await s(`Updating`,async()=>m.send(M,{body:g,account_id:h,hyperdrive_id:e[`hyperdrive-id`]}));a(_,{successLabel:`Updated`})})};var F={method:`POST`,path:t=>e`/accounts/${t.account_id}/hyperdrive/configs/${t.hyperdrive_id}/restart`};function I(e){return e.usage(`$0 hyperdrive restart <hyperdrive-id>
27
27
 
28
28
  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 L={command:`restart <hyperdrive-id>`,describe:`Restart Hyperdrive`,builder:I,handler:async e=>c({command:`hyperdrive restart`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf hyperdrive restart`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/hyperdrive/configs/${e[`hyperdrive-id`]==null?`<hyperdrive-id>`:encodeURIComponent(String(e[`hyperdrive-id`]))}/restart`,pathParams:{"hyperdrive-id":String(e[`hyperdrive-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Creating`,async()=>c.send(F,{account_id:l,hyperdrive_id:e[`hyperdrive-id`]}));a(u,{successLabel:`Created`})})};var R={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/hyperdrive/configs/${t.hyperdrive_id}`,body:`json`};function z(e){return e.usage(`$0 hyperdrive update <hyperdrive-id>
29
29
 
@@ -33,4 +33,4 @@ Maximum allowed: 20 for free tier accounts, 100 for paid tier accounts.
33
33
  If not specified, defaults to 20 for free tier and 60 for paid tier.
34
34
  Certain Cloudflare-managed origins may be permitted a higher limit.
35
35
  Contact Cloudflare if you need a higher limit.
36
- `}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const B={command:`update <hyperdrive-id>`,describe:`Update Hyperdrive`,builder:z,handler:async e=>c({command:`hyperdrive update`,classification:{safeFlags:[`caching-disabled`,`mtls-sslmode`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf hyperdrive update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/hyperdrive/configs/${e[`hyperdrive-id`]==null?`<hyperdrive-id>`:encodeURIComponent(String(e[`hyperdrive-id`]))}`,pathParams:{"hyperdrive-id":String(e[`hyperdrive-id`]??``)},bodyKind:`json`,body:e.body===void 0?u({caching:{disabled:e[`caching-disabled`],max_age:e[`caching-max-age`],stale_while_revalidate:e[`caching-stale-while-revalidate`]},mtls:{ca_certificate_id:d(e[`mtls-ca-certificate-id`],`mtls-ca-certificate-id`,`text`),mtls_certificate_id:d(e[`mtls-certificate-id`],`mtls-certificate-id`,`text`),sslmode:e[`mtls-sslmode`]},name:d(e.name,`name`,`text`),origin_connection_limit:e[`origin-connection-limit`]}):l(e.body)});return}let c=await n(e),f=e.local?t:await i();if(e.accountId=f,e.body){let t=l(e.body),n=await s(`Updating`,async()=>c.send(R,{body:t,account_id:f,hyperdrive_id:e[`hyperdrive-id`]}));a(n,{successLabel:`Updated`});return}let p=u({caching:{disabled:e[`caching-disabled`],max_age:e[`caching-max-age`],stale_while_revalidate:e[`caching-stale-while-revalidate`]},mtls:{ca_certificate_id:d(e[`mtls-ca-certificate-id`],`mtls-ca-certificate-id`,`text`),mtls_certificate_id:d(e[`mtls-certificate-id`],`mtls-certificate-id`,`text`),sslmode:e[`mtls-sslmode`]},name:d(e.name,`name`,`text`),origin_connection_limit:e[`origin-connection-limit`]}),m=await s(`Updating`,async()=>c.send(R,{body:p,account_id:f,hyperdrive_id:e[`hyperdrive-id`]}));a(m,{successLabel:`Updated`})})},V={command:`hyperdrive`,describe:`Accelerate access to existing databases by caching queries and pooling connections at the edge`,builder:e=>e.command(_).command(b).command(C).command(j).command(P).command(L).command(B).command(O).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{V as default};
36
+ `}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const B={command:`update <hyperdrive-id>`,describe:`Update Hyperdrive`,builder:z,handler:async e=>c({command:`hyperdrive update`,classification:{safeFlags:[`caching-disabled`,`mtls-sslmode`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf hyperdrive update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/hyperdrive/configs/${e[`hyperdrive-id`]==null?`<hyperdrive-id>`:encodeURIComponent(String(e[`hyperdrive-id`]))}`,pathParams:{"hyperdrive-id":String(e[`hyperdrive-id`]??``)},bodyKind:`json`,body:e.body===void 0?u({caching:{disabled:e[`caching-disabled`],max_age:e[`caching-max-age`],stale_while_revalidate:e[`caching-stale-while-revalidate`]},mtls:{ca_certificate_id:d(e[`mtls-ca-certificate-id`],`mtls-ca-certificate-id`,`text`),mtls_certificate_id:d(e[`mtls-certificate-id`],`mtls-certificate-id`,`text`),sslmode:e[`mtls-sslmode`]},name:d(e.name,`name`,`text`),origin_connection_limit:e[`origin-connection-limit`]}):l(e.body)});return}let c=e.body===void 0?void 0:l(e.body),f=await n(e),p=e.local?t:await i();if(e.accountId=p,e.body!==void 0){let t=c,n=await s(`Updating`,async()=>f.send(R,{body:t,account_id:p,hyperdrive_id:e[`hyperdrive-id`]}));a(n,{successLabel:`Updated`});return}let m=u({caching:{disabled:e[`caching-disabled`],max_age:e[`caching-max-age`],stale_while_revalidate:e[`caching-stale-while-revalidate`]},mtls:{ca_certificate_id:d(e[`mtls-ca-certificate-id`],`mtls-ca-certificate-id`,`text`),mtls_certificate_id:d(e[`mtls-certificate-id`],`mtls-certificate-id`,`text`),sslmode:e[`mtls-sslmode`]},name:d(e.name,`name`,`text`),origin_connection_limit:e[`origin-connection-limit`]}),h=await s(`Updating`,async()=>f.send(R,{body:m,account_id:p,hyperdrive_id:e[`hyperdrive-id`]}));a(h,{successLabel:`Updated`})})},V={command:`hyperdrive`,describe:`Accelerate access to existing databases by caching queries and pooling connections at the edge`,builder:e=>e.command(_).command(b).command(C).command(j).command(P).command(L).command(B).command(O).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{V as default};