cf 1.0.0-beta.20 → 1.0.0-beta.21

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 (290) hide show
  1. package/README.md +1 -1
  2. package/dist/_meta/commands.json +911 -751
  3. package/dist/_meta/schemas.json +401 -382
  4. package/dist/{abuse-reports-mKv00yPh.mjs → abuse-reports-CbUAnJxd.mjs} +1 -1
  5. package/dist/{access-CyRjTbhh.mjs → access-C-78DlxL.mjs} +1 -1
  6. package/dist/{accounts-BmF_YKvG.mjs → accounts-DEqQPxCz.mjs} +8 -15
  7. package/dist/{acm-BcIFiAb8.mjs → acm-jmhCq3Yh.mjs} +2 -3
  8. package/dist/{addressing-D6xVD7MM.mjs → addressing-BeYFpQvC.mjs} +12 -23
  9. package/dist/{agent-memory-Blldunhv.mjs → agent-memory-Chlovb7j.mjs} +5 -9
  10. package/dist/{ai-CU8tdTfC.mjs → ai-BndH3HYN.mjs} +2 -3
  11. package/dist/{ai-audit-Id3hq5pV.mjs → ai-audit-BUJ-70O_.mjs} +1 -1
  12. package/dist/{ai-gateway-BKeZ28CQ.mjs → ai-gateway-CCk7VKhL.mjs} +9 -15
  13. package/dist/{ai-search-DOiZEmn7.mjs → ai-search-BexET_wp.mjs} +6 -11
  14. package/dist/{ai-security-CioADDZi.mjs → ai-security-D4MxRlxX.mjs} +3 -5
  15. package/dist/{alerting-BzN1N3Se.mjs → alerting-rw8Oi3x7.mjs} +5 -9
  16. package/dist/{analytics-engine-CugCQfDe.mjs → analytics-engine-Bk7dQLcm.mjs} +1 -1
  17. package/dist/{analytics-Cte-DrzH.mjs → analytics-q-guNEOK.mjs} +1 -1
  18. package/dist/{api-security-CCs0g510.mjs → api-security-BDc6gkf1.mjs} +9 -17
  19. package/dist/{argo-BHBFZnmO.mjs → argo-CnLIqm0i.mjs} +1 -1
  20. package/dist/args-BAOHroBC.mjs +2 -0
  21. package/dist/{artifacts-BzAwvrCD.mjs → artifacts-Cil33dzV.mjs} +4 -7
  22. package/dist/{audit-logs-jWivEKCy.mjs → audit-logs--E2Eclb7.mjs} +1 -1
  23. package/dist/auth-B0lEsD_1.mjs +2 -0
  24. package/dist/{auth-BUQscD5b.mjs → auth-BcNLQji1.mjs} +1 -1
  25. package/dist/auth-BtZmY6sE.mjs +2 -0
  26. package/dist/{auth-token-T0aqYgl9.mjs → auth-token-aF5AVLlH.mjs} +1 -1
  27. package/dist/{autoconfig-CBdcYYf4.mjs → autoconfig-Dbp6J25P.mjs} +88 -88
  28. package/dist/{basin-catalog-_8w_4599.mjs → basin-catalog-dnVyzopm.mjs} +3 -5
  29. package/dist/{billing-Ce0WN0yw.mjs → billing-Fqp3jB2V.mjs} +2 -3
  30. package/dist/{blocks-CFAm0Ma3.mjs → blocks-BOQH-Won.mjs} +1 -1
  31. package/dist/{bot-management-DskcSr4B.mjs → bot-management-SEDgo1Xg.mjs} +1 -1
  32. package/dist/{botnet-feed-CmBm13-D.mjs → botnet-feed-DPqR4M0Y.mjs} +2 -3
  33. package/dist/{brand-protection-DTuFrsN0.mjs → brand-protection-B8vwKfM9.mjs} +2 -3
  34. package/dist/{browser-run-CXdzSOHa.mjs → browser-run-BybYDq3I.mjs} +3 -5
  35. package/dist/build-BqGmiORA.mjs +2 -0
  36. package/dist/build-CWlpWVBf.mjs +2 -0
  37. package/dist/{builds-_1u5Nx6f.mjs → builds-CvtOG-Gk.mjs} +8 -15
  38. package/dist/cache-Bme_d2Wx.mjs +36 -0
  39. package/dist/cf-fIBhEAxU.mjs +18 -0
  40. package/dist/chunk-DSGVRFIS-DHC6NOIj.mjs +2 -0
  41. package/dist/{chunk-2K52M2W5-iYNzknM1.mjs → chunk-XVBBSNW2-DfMyGS-l.mjs} +8 -8
  42. package/dist/{cli-DyhOdzMo.mjs → cli-CIKDqm-u.mjs} +3 -3
  43. package/dist/{client-side-security-DnnYaRsd.mjs → client-side-security-ZQeRoo1t.mjs} +2 -3
  44. package/dist/{cloud-connector-Ct6b6pz8.mjs → cloud-connector-BeunZlNV.mjs} +1 -1
  45. package/dist/{cloudflared-CHLpWU35.mjs → cloudflared-DbzoIouQ.mjs} +1 -1
  46. package/dist/{cloudforce-one-Rl6nCCm0.mjs → cloudforce-one-D20t9ojD.mjs} +26 -51
  47. package/dist/{command-BwgvUpNx.mjs → command-B3uWlw57.mjs} +1 -1
  48. package/dist/{command-DuLxEkGq.mjs → command-BGRucANI.mjs} +1 -1
  49. package/dist/{command-BONLLcyz.mjs → command-C6kE7BU0.mjs} +1 -1
  50. package/dist/{command-DOpykk8X.mjs → command-C9CNvZi_.mjs} +1 -1
  51. package/dist/{command-BRpBIju7.mjs → command-CQ5qHE7n.mjs} +1 -1
  52. package/dist/{command-CHGc-KZ7.mjs → command-CkZkTjIj.mjs} +1 -1
  53. package/dist/{command-BRXOUAGD.mjs → command-CqKRlHGv.mjs} +1 -1
  54. package/dist/{command-BwlIi3Bv.mjs → command-CtlD6MEi.mjs} +1 -1
  55. package/dist/{command-CXzje7qc.mjs → command-CzWWQv8j.mjs} +1 -1
  56. package/dist/{command-BMYi_gS-.mjs → command-DWWuXQV8.mjs} +1 -1
  57. package/dist/{command-CPDQPdss.mjs → command-DkwmylF2.mjs} +1 -1
  58. package/dist/{command-CMa807gY.mjs → command-MxFFWqMg.mjs} +1 -1
  59. package/dist/{command-BVO9UOuU.mjs → command-orlUsdgf.mjs} +1 -1
  60. package/dist/{command-CVoDyQnL.mjs → command-prWMAJbg.mjs} +1 -1
  61. package/dist/{command-0WS5I_JW.mjs → command-rUCxlpQI.mjs} +1 -1
  62. package/dist/command-resolution-DAQ4PWUt.mjs +2 -0
  63. package/dist/{completions-DMwrvK_S.mjs → completions-2Otv0HMd.mjs} +1 -1
  64. package/dist/{connector-interrupts-DyWilINb.mjs → connector-interrupts-Dfhxupmg.mjs} +1 -1
  65. package/dist/{connector-telemetry-events-BUW9qTOs.mjs → connector-telemetry-events-CLVpDTIa.mjs} +1 -1
  66. package/dist/{connector-telemetry-snapshots-Djs5QssR.mjs → connector-telemetry-snapshots-E_1tmNmQ.mjs} +1 -1
  67. package/dist/{connectors-e_cpzDEm.mjs → connectors-ChJpQFSl.mjs} +2 -3
  68. package/dist/{containers-CEH15JUu.mjs → containers-Cj5-9nUg.mjs} +6 -9
  69. package/dist/containers-CzAZfmnj.mjs +380 -0
  70. package/dist/{content-scan-B6Ahw9JA.mjs → content-scan-CIA_9PV8.mjs} +3 -5
  71. package/dist/{context-Sgba0fZP.mjs → context-DVh8Wyfs.mjs} +2 -2
  72. package/dist/{cps-uDD0SSJ-.mjs → cps-hJkqdsHx.mjs} +1 -1
  73. package/dist/{csam-scanner-BSUl7jGn.mjs → csam-scanner-cCVO3lNF.mjs} +1 -1
  74. package/dist/{custom-csrs-BDcXggph.mjs → custom-csrs-BrTWUZ0c.mjs} +2 -3
  75. package/dist/{custom-hostnames-UmIlwkwt.mjs → custom-hostnames-C4ft77oC.mjs} +4 -7
  76. package/dist/{custom-nameservers-D7kU6d--.mjs → custom-nameservers-BWfrZhD1.mjs} +2 -3
  77. package/dist/{custom-pages-CkhIQCfM.mjs → custom-pages-DqTMKtRc.mjs} +2 -3
  78. package/dist/{d1-myRLEAGs.mjs → d1-B58AA9PA.mjs} +3 -6
  79. package/dist/delegate-D7yYckA4.mjs +2 -0
  80. package/dist/delegate.mjs +1 -1
  81. package/dist/{deploy-BJqCpycz.mjs → deploy-CEROLAdh.mjs} +1 -1
  82. package/dist/deploy-context-Do89WayB.mjs +56 -0
  83. package/dist/{deploy-input-v2DryyLP.mjs → deploy-input-DyMuMsi5.mjs} +1 -1
  84. package/dist/{dev-S1PJi83q.mjs → dev-BaFS7kOM.mjs} +2 -2
  85. package/dist/{diagnostics-q65rcNIk.mjs → diagnostics-4gfYj7Pf.mjs} +2 -3
  86. package/dist/dialog-D5lus4M4.mjs +2 -0
  87. package/dist/discover-6kAmVMPp.mjs +2 -0
  88. package/dist/discover-C06Syc2B.mjs +2 -0
  89. package/dist/dist-BtzWfAjU.mjs +453 -0
  90. package/dist/dls-ClWVxTBg.mjs +16 -0
  91. package/dist/{dns-DhARjFQs.mjs → dns-CML-wxIt.mjs} +68 -68
  92. package/dist/{dns-firewall-BP6r9QG6.mjs → dns-firewall-CL0b3dJ1.mjs} +2 -3
  93. package/dist/{docs-CReGWDrw.mjs → docs-BeYBHwUN.mjs} +1 -1
  94. package/dist/{dotenv-Ck-6V1hm.mjs → dotenv-CmPRiXmU.mjs} +1 -1
  95. package/dist/{dry-run-BBjUQUhR.mjs → dry-run-gy0Hl9xo.mjs} +1 -1
  96. package/dist/{durable-objects-tOJy-5te.mjs → durable-objects-uZECeq_f.mjs} +1 -1
  97. package/dist/{email-auth-Bq9sq_2j.mjs → email-auth-CCNW798I.mjs} +1 -1
  98. package/dist/email-domains-1rD1d84O.mjs +12 -0
  99. package/dist/{email-routing-CYo4dp50.mjs → email-routing-CYv-LrbV.mjs} +4 -7
  100. package/dist/{email-security-CNtWET2d.mjs → email-security-CWEUYPYo.mjs} +16 -31
  101. package/dist/{email-sending-BvagNLRr.mjs → email-sending-DHSzCfJx.mjs} +3 -5
  102. package/dist/{errors-DpbAQQv8.mjs → errors-ol9sMqSe.mjs} +8 -8
  103. package/dist/{field-extractors-C9R3Qivh.mjs → field-extractors-CuBM_uO4.mjs} +2 -3
  104. package/dist/{firewall-DsgUY-Qv.mjs → firewall-SMIUSypF.mjs} +4 -7
  105. package/dist/flagship-D3v6iDdw.mjs +24 -0
  106. package/dist/{fraud-24l8dKyk.mjs → fraud-B2f7O15X.mjs} +1 -1
  107. package/dist/{google-tag-gateway-CAkudP5W.mjs → google-tag-gateway-BwOc62Gy.mjs} +1 -1
  108. package/dist/{gt-D6YemCLh.mjs → gt-BQkaDQDq.mjs} +1 -1
  109. package/dist/{healthchecks-CEGMe3lO.mjs → healthchecks-BQXHnihB.mjs} +3 -5
  110. package/dist/{hyperdrive-DLDaOU2O.mjs → hyperdrive-Bd6Yfje3.mjs} +2 -3
  111. package/dist/{iam-ChldOMSL.mjs → iam-qJPI1_aZ.mjs} +5 -9
  112. package/dist/{images-Ba9tS5wT.mjs → images-goHZJOxy.mjs} +6 -11
  113. package/dist/index.mjs +1 -1
  114. package/dist/init-CVx0Ya1E.mjs +43 -0
  115. package/dist/{intel-DbLRah4Y.mjs → intel-CwiqwJI9.mjs} +18 -21
  116. package/dist/interactive-CHcvofEp.mjs +2 -0
  117. package/dist/{interactive-d_lFnSev.mjs → interactive-D4E8PdaW.mjs} +31 -31
  118. package/dist/interactive-wQM7Blhm.mjs +2 -0
  119. package/dist/internal-5cnlw9mH.mjs +4 -0
  120. package/dist/{ips-BGyzyQLL.mjs → ips-KBxmXhvO.mjs} +1 -1
  121. package/dist/{k2-BVQ3MqEl.mjs → k2-KhIP5NFT.mjs} +2 -3
  122. package/dist/kv-CCem2sEY.mjs +12 -0
  123. package/dist/{lazy-command-D0I6itZs.mjs → lazy-command-BMhD5ffF.mjs} +1 -1
  124. package/dist/{leaked-credential-checks-Dga83Qy3.mjs → leaked-credential-checks-BkPZiwE2.mjs} +3 -5
  125. package/dist/live-BhHzxFna.mjs +4 -0
  126. package/dist/{load-balancers-D9cB6of8.mjs → load-balancers-17GBXdju.mjs} +5 -9
  127. package/dist/local-CAs8RWYW.mjs +2 -0
  128. package/dist/{local-B7ZJ78al.mjs → local-CSH3UMpD.mjs} +1 -1
  129. package/dist/{local-runtime-DB545Gqq.mjs → local-runtime-KOFLRZeZ.mjs} +1 -1
  130. package/dist/log-BWdaOGOW.mjs +66 -0
  131. package/dist/log-DZfik9Jk.mjs +2 -0
  132. package/dist/login-BTiflOun.mjs +2 -0
  133. package/dist/login-Buhvx6Fi.mjs +5 -0
  134. package/dist/{logpush-Ccmr0Y_I.mjs → logpush-BCCUxa4J.mjs} +3 -5
  135. package/dist/{logs-CZBMuuBC.mjs → logs-4CwupKRG.mjs} +2 -3
  136. package/dist/{magic-cloud-networking-BwOxZVql.mjs → magic-cloud-networking-Xy6SC-V-.mjs} +4 -7
  137. package/dist/{magic-network-monitoring-Cx5kKdbk.mjs → magic-network-monitoring-B8pRZp2g.mjs} +3 -5
  138. package/dist/{magic-transit-BJwg3sVK.mjs → magic-transit-CwfO3OOX.mjs} +36 -67
  139. package/dist/managed-defense-CtFLuvuB.mjs +18 -0
  140. package/dist/{managed-transforms-C-HMtesC.mjs → managed-transforms-Hto8OCBS.mjs} +2 -3
  141. package/dist/{mcp-bGKgzz6F.mjs → mcp-SQ0MAVUJ.mjs} +3 -5
  142. package/dist/{mesh-DeQIll19.mjs → mesh-C8A6tVqA.mjs} +3 -5
  143. package/dist/{migrate-B6HsPeFh.mjs → migrate-Dufxsb_F.mjs} +1 -1
  144. package/dist/{monetization-B-TIrpA5.mjs → monetization-CYVaCAe9.mjs} +3 -5
  145. package/dist/{network-BrjykU-I.mjs → network-CJBTdEM3.mjs} +5 -9
  146. package/dist/{network-interconnects-I06kbxIl.mjs → network-interconnects-CKlNFj3i.mjs} +3 -5
  147. package/dist/{o11y-Ba0Fa98_.mjs → o11y-5x2Q8CWm.mjs} +8 -15
  148. package/dist/{oauth-BH-uQd3C.mjs → oauth-BN6_FpYp.mjs} +1 -1
  149. package/dist/oauth-D_A8AcIS.mjs +4 -0
  150. package/dist/{oauth-clients-Dd5gvDqf.mjs → oauth-clients-qKXg8ZH3.mjs} +3 -5
  151. package/dist/{oauth-scopes-CXpH3Syj.mjs → oauth-scopes-Ct1jDyC5.mjs} +1 -1
  152. package/dist/{organization-DKPqwe3j.mjs → organization-lBQSeqS1.mjs} +3 -5
  153. package/dist/{organizations-Cq4iy-Yr.mjs → organizations-DEX8Er3g.mjs} +1 -1
  154. package/dist/{origin-post-quantum-encryption-DSB1sbYV.mjs → origin-post-quantum-encryption-DUsxVGCs.mjs} +1 -1
  155. package/dist/output-BJEgbI0G.mjs +2 -0
  156. package/dist/package-BqSbnt6u.mjs +2 -0
  157. package/dist/{page-rules-CDWTYaf7.mjs → page-rules-BMt6nt03.mjs} +2 -3
  158. package/dist/{pages-Dgtm51Uj.mjs → pages-Jxa92ECz.mjs} +7 -13
  159. package/dist/{pay-per-crawl-CHenxdhv.mjs → pay-per-crawl-Cv0044CZ.mjs} +3 -5
  160. package/dist/{pay-per-use-Bd5l0hBi.mjs → pay-per-use-DGEeG-dC.mjs} +2 -3
  161. package/dist/{pipelines-GsyD6nUM.mjs → pipelines-CEC78A3w.mjs} +5 -9
  162. package/dist/{precursor-mO-Zua09.mjs → precursor-Ba0Ejhzt.mjs} +1 -1
  163. package/dist/previews-DnZbUTym.mjs +6 -0
  164. package/dist/progress-CtGsPOpV.mjs +2 -0
  165. package/dist/prompt-YrI7ltMa.mjs +4 -0
  166. package/dist/{queues-D8cAr2lB.mjs → queues-Chq997uj.mjs} +6 -11
  167. package/dist/{r2-CJiJbG6b.mjs → r2-BFgZDs-F.mjs} +17 -33
  168. package/dist/{radar-PUZ_PCZ8.mjs → radar-DJdDzLJw.mjs} +1 -1
  169. package/dist/{raw-fetch-DSdFjojI.mjs → raw-fetch-BE3QgdTE.mjs} +1 -1
  170. package/dist/ready-Cok0aqke.mjs +4 -0
  171. package/dist/{realtime-X6uQsldp.mjs → realtime-BHWWCiKp.mjs} +10 -19
  172. package/dist/{registrar-BqZdUTss.mjs → registrar-9Y-1IQ0n.mjs} +1 -1
  173. package/dist/{registrar-sandbox-CmM3e1QN.mjs → registrar-sandbox-DTS1kRnb.mjs} +1 -1
  174. package/dist/{registry-D0tMkLv6.mjs → registry-Bm-GgDC3.mjs} +1 -1
  175. package/dist/{reporting-DFVz98Xg.mjs → reporting-D5RbKQJf.mjs} +1 -1
  176. package/dist/request-headers-KhW_hy36.mjs +2 -0
  177. package/dist/{request-tracers-BC1u2WDU.mjs → request-tracers-wxWCjmHo.mjs} +1 -1
  178. package/dist/{resource-sharing-CdEn5Iex.mjs → resource-sharing-BGoaVvJa.mjs} +5 -9
  179. package/dist/rolldown-runtime-BNtqjh-B.mjs +2 -0
  180. package/dist/{rules-B663VetJ.mjs → rules-Cd3EjhdF.mjs} +3 -5
  181. package/dist/{rulesets-p4EijVr6.mjs → rulesets-Bnz3rSBT.mjs} +4 -7
  182. package/dist/{rum-CHHXe4KK.mjs → rum-CK9HEe3O.mjs} +3 -5
  183. package/dist/run-Be6Js7D6.mjs +2 -0
  184. package/dist/run-DnZGQbq_.mjs +2 -0
  185. package/dist/sanitization-DkVWMHkc.mjs +2 -0
  186. package/dist/{schema-B38ojvsS.mjs → schema-DuLIZRhA.mjs} +1 -1
  187. package/dist/{schema-flags-z7yn0JZ_.mjs → schema-flags-BrDlFwLv.mjs} +1 -1
  188. package/dist/{scim-BMnUa4Oz.mjs → scim-UdqaWnOu.mjs} +3 -5
  189. package/dist/{secrets-store-EYrhEzVG.mjs → secrets-store-Bf5v96LC.mjs} +3 -5
  190. package/dist/{security-insights-C-AwDwXb.mjs → security-insights-BAGySlGu.mjs} +1 -1
  191. package/dist/{security-txt-CQMe8TD3.mjs → security-txt-D0fMmjHs.mjs} +2 -3
  192. package/dist/session-6xqrJWXy.mjs +2 -0
  193. package/dist/shared-DYRRG9A-.mjs +2 -0
  194. package/dist/signed-url-Ce0muRem.mjs +4 -0
  195. package/dist/{smart-shield-CHSuitaH.mjs → smart-shield-CCy7_M3j.mjs} +3 -5
  196. package/dist/{snippets-DGSBz4lg.mjs → snippets-Bc8m3HSV.mjs} +3 -5
  197. package/dist/spawn-BAEdy9kS.mjs +5 -0
  198. package/dist/{spectrum-59LhYG1t.mjs → spectrum-DtNX8WBX.mjs} +2 -3
  199. package/dist/{speed-CMCfoG3s.mjs → speed-TbkeWV_x.mjs} +3 -5
  200. package/dist/{sql-MxWaTDdj.mjs → sql-DI319y25.mjs} +1 -1
  201. package/dist/src-COwxoocl.mjs +2 -0
  202. package/dist/{src-J3Yss3VM.mjs → src-Dc6ojwUW.mjs} +5 -5
  203. package/dist/{ssl-DTTFZR9x.mjs → ssl-D0MIzFl2.mjs} +9 -17
  204. package/dist/startup-profile-CZYtQziF.mjs +2 -0
  205. package/dist/{startup-profile-bp348qmf.mjs → startup-profile-DlWrt4Fm.mjs} +5 -5
  206. package/dist/state-B3Uy1jPX.mjs +2 -0
  207. package/dist/{state-CqAtTENS.mjs → state-DazGSbRx.mjs} +1 -1
  208. package/dist/{stream-gVG_7si-.mjs → stream-4Mrb8HEo.mjs} +14 -27
  209. package/dist/tags-BP25qydR.mjs +22 -0
  210. package/dist/telemetry-CvZean4s.mjs +2 -0
  211. package/dist/telemetry-DKSJSLtq.mjs +2 -0
  212. package/dist/{tenant-custom-nameservers-DBmmUcxn.mjs → tenant-custom-nameservers-BzVP85Tq.mjs} +2 -3
  213. package/dist/{tenant-Qv_PC8gW.mjs → tenant-jmfZqEZ4.mjs} +1 -1
  214. package/dist/{tools-B1ajcUAF.mjs → tools-C-vmgYSv.mjs} +1 -1
  215. package/dist/{tunnels-CHNKPYRV.mjs → tunnels-BNswR1Dj.mjs} +4 -6
  216. package/dist/{turnstile-C60RxPo2.mjs → turnstile-BgsTP2fz.mjs} +2 -3
  217. package/dist/ui-Bo6DCvbS.mjs +2 -0
  218. package/dist/{update-check-BHarE3V9.mjs → update-check-BOF1hn_I.mjs} +1 -1
  219. package/dist/update-check-C7mfEeQ7.mjs +2 -0
  220. package/dist/update-check-worker.mjs +1 -1
  221. package/dist/{url-normalization-3t6Xpafi.mjs → url-normalization-Bqrs4-2F.mjs} +2 -3
  222. package/dist/{url-scanner-DNG__DiK.mjs → url-scanner-Dm4Fps5T.mjs} +1 -1
  223. package/dist/{user-B4i7OIFK.mjs → user-u_LxzLM4.mjs} +8 -15
  224. package/dist/{vectorize-y3PCQDDf.mjs → vectorize-DLGiOyd4.mjs} +3 -5
  225. package/dist/version-DmTuWNZ5.mjs +2 -0
  226. package/dist/{waiting-rooms-xkZLvPkT.mjs → waiting-rooms-DmgJgJXb.mjs} +4 -7
  227. package/dist/{web-assets-BlqHZywy.mjs → web-assets-rNhZWP-6.mjs} +7 -13
  228. package/dist/{web3-DGAJMcLv.mjs → web3-BVBdFt8E.mjs} +3 -5
  229. package/dist/{workers-cCNBx0Bc.mjs → workers-CjUKJvH8.mjs} +18 -22
  230. package/dist/{workers-builds-COKp3NfU.mjs → workers-builds-D3Q97l7X.mjs} +1 -1
  231. package/dist/{workers-for-platforms-CAtiWI_G.mjs → workers-for-platforms-C_fcw30y.mjs} +5 -9
  232. package/dist/{workers-vpc-ChBfXwPy.mjs → workers-vpc-CnRO3Stc.mjs} +2 -3
  233. package/dist/{workflows-BYhgJvyR.mjs → workflows-cpHFe5v6.mjs} +5 -9
  234. package/dist/{wrangler-migration-B12OR2bu.mjs → wrangler-migration-DQehjmoh.mjs} +74 -74
  235. package/dist/{zaraz-BW0kvRCK.mjs → zaraz-BRj0J7vK.mjs} +1 -1
  236. package/dist/{zero-trust-DSeWXkNV.mjs → zero-trust-CVZKDLCB.mjs} +75 -149
  237. package/dist/{zone-B-YJG2UA.mjs → zone-N6ccK70C.mjs} +1 -1
  238. package/dist/{zones-B8pqPHu8.mjs → zones-C4S_kpGz.mjs} +49 -52
  239. package/package.json +12 -12
  240. package/dist/auth-CdEGiJ5Y.mjs +0 -2
  241. package/dist/auth-DF_ml7rE.mjs +0 -2
  242. package/dist/build-BJHRK6qE.mjs +0 -2
  243. package/dist/build-D7s3a8zW.mjs +0 -2
  244. package/dist/cache-CDPUUv_O.mjs +0 -45
  245. package/dist/cf-3vj8dGYz.mjs +0 -18
  246. package/dist/chunk-DSGVRFIS-RUG6Dtqz.mjs +0 -2
  247. package/dist/containers-CcZHRM9g.mjs +0 -376
  248. package/dist/delegate-Tgfxa-MZ.mjs +0 -2
  249. package/dist/deploy-context-DIAl408H.mjs +0 -56
  250. package/dist/dialog-BnIgdgWi.mjs +0 -2
  251. package/dist/discover-DEjUARkU.mjs +0 -2
  252. package/dist/discover-P20XeGBF.mjs +0 -2
  253. package/dist/dist-CX6dDtzj.mjs +0 -449
  254. package/dist/dist-DAeCUX-u.mjs +0 -60
  255. package/dist/dls-CMTrCDjZ.mjs +0 -17
  256. package/dist/flagship-geGDHp9H.mjs +0 -28
  257. package/dist/init-C08hBFYn.mjs +0 -43
  258. package/dist/interactive-pjVqirHx.mjs +0 -2
  259. package/dist/kv-Cd8vbPWK.mjs +0 -15
  260. package/dist/local-CFZtOOxg.mjs +0 -2
  261. package/dist/log-CRbgNbDp.mjs +0 -3
  262. package/dist/login-C3Bahro9.mjs +0 -5
  263. package/dist/login-DvsRxI3E.mjs +0 -2
  264. package/dist/logo-matches-jeNkUxAq.mjs +0 -6
  265. package/dist/logos-pxN5aumY.mjs +0 -7
  266. package/dist/managed-defense-C_KLy4oB.mjs +0 -18
  267. package/dist/matches-DnjBnG-Y.mjs +0 -6
  268. package/dist/oauth-Cf3-g-kk.mjs +0 -4
  269. package/dist/output-CpiIVa7Q.mjs +0 -2
  270. package/dist/previews-oHUiD54J.mjs +0 -7
  271. package/dist/progress-B1dpmxCT.mjs +0 -2
  272. package/dist/prompt-Y5OBwDVE.mjs +0 -4
  273. package/dist/queries-CS0sYfte.mjs +0 -9
  274. package/dist/request-headers-Bg8_Idw3.mjs +0 -2
  275. package/dist/run-0EozpORq.mjs +0 -2
  276. package/dist/run-DKg70Sqf.mjs +0 -2
  277. package/dist/session-3DgztoAI.mjs +0 -2
  278. package/dist/shared-o8saqcSK.mjs +0 -2
  279. package/dist/source-AlTrHNem.mjs +0 -6
  280. package/dist/spawn-BZd__5sj.mjs +0 -10
  281. package/dist/startup-profile-DJsOtbVN.mjs +0 -2
  282. package/dist/state-Dvzl3aSj.mjs +0 -2
  283. package/dist/submit-wJYcQB8d.mjs +0 -4
  284. package/dist/tags-BwFKjaOr.mjs +0 -23
  285. package/dist/telemetry-BczXOpQn.mjs +0 -2
  286. package/dist/telemetry-CE15pfOU.mjs +0 -2
  287. package/dist/ui-CBhKUPys.mjs +0 -2
  288. package/dist/update-check-C3RhhXja.mjs +0 -2
  289. package/dist/url-info-By6VD20A.mjs +0 -4
  290. package/dist/version-izjB0Yrl.mjs +0 -2
@@ -1,10 +1,9 @@
1
1
  #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-BUQscD5b.mjs";import{i as n}from"./context-Sgba0fZP.mjs";import{t as r}from"./output-CpiIVa7Q.mjs";import{t as i}from"./dry-run-BBjUQUhR.mjs";import{t as a}from"./progress-B1dpmxCT.mjs";import{t as o}from"./run-0EozpORq.mjs";import"./telemetry-BczXOpQn.mjs";import{n as s,t as c}from"./body-parser-ChnyBsfm.mjs";import{n as l}from"./input-validation-D7z60HJH.mjs";import{n as u}from"./prompt-Y5OBwDVE.mjs";var d={method:`POST`,path:t=>e`/zones/${t.zone_id}/leaked-credential-checks/detections`,body:`json`};function f(e){return e.usage(`$0 leaked-credential-checks detections create
2
+ import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-BcNLQji1.mjs";import{i as n}from"./context-DVh8Wyfs.mjs";import{t as r}from"./output-BJEgbI0G.mjs";import{t as i}from"./dry-run-gy0Hl9xo.mjs";import{t as a}from"./progress-CtGsPOpV.mjs";import{t as o}from"./run-DnZGQbq_.mjs";import"./telemetry-CvZean4s.mjs";import{n as s,t as c}from"./body-parser-ChnyBsfm.mjs";import{n as l}from"./input-validation-D7z60HJH.mjs";import{n as u}from"./prompt-YrI7ltMa.mjs";var d={method:`POST`,path:t=>e`/zones/${t.zone_id}/leaked-credential-checks/detections`,body:`json`};function f(e){return e.usage(`$0 leaked-credential-checks detections create
3
3
 
4
4
  Create a detection location for credentials that the default scan locations do not cover, using Rules language expressions such as \`lookup_json_string(http.request.body.raw, "user")\`. Only the username expression is required, and Leaked Credential Checks must be enabled on the zone.`).option(`id`,{type:`string`,description:`Defines the unique ID for this custom detection.`}).option(`password`,{type:`string`,description:`Defines ehe ruleset expression to use in matching the password in a request.`}).option(`username`,{type:`string`,description:`Defines the ruleset expression to use in matching the username in a request.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Defines a custom set of username/password expressions to match Leaked Credential Checks on.`})}const p={command:`create`,describe:`Create a custom detection location for a zone.`,builder:f,handler:async e=>o({command:`leaked-credential-checks detections create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf leaked-credential-checks detections create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/leaked-credential-checks/detections`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?c({id:l(e.id,`id`,`text`),password:l(e.password,`password`,`text`),username:l(e.username,`username`,`text`)}):s(e.body)});return}let o=await t(e),u=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=u,e.body){let t=s(e.body),n=await a(`Creating`,async()=>o.send(d,{body:t,zone_id:u}));r(n,{successLabel:`Created`});return}let f=c({id:l(e.id,`id`,`text`),password:l(e.password,`password`,`text`),username:l(e.username,`username`,`text`)}),p=await a(`Creating`,async()=>o.send(d,{body:f,zone_id:u}));r(p,{successLabel:`Created`})})};var m={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/leaked-credential-checks/detections/${t.detection_id}`};function h(e){return e.usage(`$0 leaked-credential-checks detections delete <detection-id>
5
5
 
6
- Delete a user-defined detection location, identified by its detection ID. Incoming requests are then scanned using only the default scan locations and the detection locations that remain.`).positional(`detection-id`,{type:`string`,description:`Defines the unique ID for this custom detection.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const g={command:`delete <detection-id>`,describe:`Delete a custom detection location from a zone.`,builder:h,handler:async e=>o({command:`leaked-credential-checks detections delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf leaked-credential-checks detections delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/leaked-credential-checks/detections/${e[`detection-id`]==null?`<detection-id>`:encodeURIComponent(String(e[`detection-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"detection-id":String(e[`detection-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=s,!await u({force:!!e.force,message:`This operation deletes a Leaked Credential Checks custom detection location.`})){process.stderr.write(`Aborted.
7
- `);return}let c=await a(`Deleting`,async()=>o.send(m,{zone_id:s,detection_id:e[`detection-id`]}));r(c,{successLabel:`Deleted`})})};var _={method:`GET`,path:t=>e`/zones/${t.zone_id}/leaked-credential-checks/detections/${t.detection_id}`};function v(e){return e.usage(`$0 leaked-credential-checks detections get <detection-id>
6
+ Delete a user-defined detection location, identified by its detection ID. Incoming requests are then scanned using only the default scan locations and the detection locations that remain.`).positional(`detection-id`,{type:`string`,description:`Defines the unique ID for this custom detection.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const g={command:`delete <detection-id>`,describe:`Delete a custom detection location from a zone.`,builder:h,handler:async e=>o({command:`leaked-credential-checks detections delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf leaked-credential-checks detections delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/leaked-credential-checks/detections/${e[`detection-id`]==null?`<detection-id>`:encodeURIComponent(String(e[`detection-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"detection-id":String(e[`detection-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=s,!await u({force:!!e.force,message:`This operation deletes a Leaked Credential Checks custom detection location.`}))return;let c=await a(`Deleting`,async()=>o.send(m,{zone_id:s,detection_id:e[`detection-id`]}));r(c,{successLabel:`Deleted`})})};var _={method:`GET`,path:t=>e`/zones/${t.zone_id}/leaked-credential-checks/detections/${t.detection_id}`};function v(e){return e.usage(`$0 leaked-credential-checks detections get <detection-id>
8
7
 
9
8
  Get the username and password expressions of a single user-defined detection location, identified by its detection ID.`).positional(`detection-id`,{type:`string`,description:`Defines the unique ID for this custom detection.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const y={command:`get <detection-id>`,describe:`Get a custom detection location of a zone.`,builder:v,handler:async e=>o({command:`leaked-credential-checks detections get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf leaked-credential-checks detections get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/leaked-credential-checks/detections/${e[`detection-id`]==null?`<detection-id>`:encodeURIComponent(String(e[`detection-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"detection-id":String(e[`detection-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(_,{zone_id:s,detection_id:e[`detection-id`]}));r(c,{successLabel:`Loaded`})})};var b={method:`GET`,path:t=>e`/zones/${t.zone_id}/leaked-credential-checks/detections`};function x(e){return e.usage(`$0 leaked-credential-checks detections list
10
9
 
@@ -14,5 +13,4 @@ Update the username and password expressions of an existing detection location,
14
13
 
15
14
  Get the current Leaked Credential Checks status for the zone. While enabled, Cloudflare scans incoming requests for usernames and passwords that were exposed in known data breaches.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`get`,describe:`Get the Leaked Credential Checks status for a zone.`,builder:O,handler:async e=>o({command:`leaked-credential-checks get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf leaked-credential-checks get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/leaked-credential-checks`,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 A={method:`POST`,path:t=>e`/zones/${t.zone_id}/leaked-credential-checks`,body:`json`};function j(e){return e.usage(`$0 leaked-credential-checks update
16
15
 
17
- Update the Leaked Credential Checks status for the zone, enabling or disabling the detection. While enabled, the detection populates the \`cf.waf.credential_check.*\` fields, which you can reference in custom rules and rate limiting rules to challenge or block requests carrying compromised credentials.`).option(`enabled`,{type:`boolean`,description:`Determines whether or not Leaked Credential Checks are enabled.`}).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}).option(`body`,{type:`string`,description:`Defines the overall status for Leaked Credential Checks.`})}const M={command:`update`,describe:`Update the Leaked Credential Checks status for a zone.`,builder:j,handler:async e=>o({command:`leaked-credential-checks update`,classification:{safeFlags:[`enabled`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf leaked-credential-checks update`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/leaked-credential-checks`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?c({enabled:e.enabled}):s(e.body)});return}let o=await t(e),l=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=l,!await u({force:!!e.force,message:`This operation toggles Leaked Credential Checks for a zone.`})){process.stderr.write(`Aborted.
18
- `);return}if(e.body){let t=s(e.body),n=await a(`Deleting`,async()=>o.send(A,{body:t,zone_id:l}));r(n,{successLabel:`Deleted`});return}let d=c({enabled:e.enabled}),f=await a(`Deleting`,async()=>o.send(A,{body:d,zone_id:l}));r(f,{successLabel:`Deleted`})})},N={command:`leaked-credential-checks`,describe:`Detect compromised credentials in login requests by checking against known breach databases`,builder:e=>e.command(k).command(M).command(E).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{N as default};
16
+ Update the Leaked Credential Checks status for the zone, enabling or disabling the detection. While enabled, the detection populates the \`cf.waf.credential_check.*\` fields, which you can reference in custom rules and rate limiting rules to challenge or block requests carrying compromised credentials.`).option(`enabled`,{type:`boolean`,description:`Determines whether or not Leaked Credential Checks are enabled.`}).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}).option(`body`,{type:`string`,description:`Defines the overall status for Leaked Credential Checks.`})}const M={command:`update`,describe:`Update the Leaked Credential Checks status for a zone.`,builder:j,handler:async e=>o({command:`leaked-credential-checks update`,classification:{safeFlags:[`enabled`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf leaked-credential-checks update`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/leaked-credential-checks`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?c({enabled:e.enabled}):s(e.body)});return}let o=await t(e),l=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=l,!await u({force:!!e.force,message:`This operation toggles Leaked Credential Checks for a zone.`}))return;if(e.body){let t=s(e.body),n=await a(`Deleting`,async()=>o.send(A,{body:t,zone_id:l}));r(n,{successLabel:`Deleted`});return}let d=c({enabled:e.enabled}),f=await a(`Deleting`,async()=>o.send(A,{body:d,zone_id:l}));r(f,{successLabel:`Deleted`})})},N={command:`leaked-credential-checks`,describe:`Detect compromised credentials in login requests by checking against known breach databases`,builder:e=>e.command(k).command(M).command(E).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{N as default};
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env node
2
+ import{n as e}from"./auth-BcNLQji1.mjs";import{t}from"./output-BJEgbI0G.mjs";import{t as n}from"./dry-run-gy0Hl9xo.mjs";import{t as r}from"./progress-CtGsPOpV.mjs";import{t as i}from"./run-DnZGQbq_.mjs";import"./telemetry-CvZean4s.mjs";var a={method:`GET`,path:()=>`/live`,response:!1,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function o(e){return e.usage(`$0 live get
3
+
4
+ Return a success message after running liveness checks.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const s={command:`get`,describe:`Run liveness checks`,builder:o,handler:async o=>i({command:`live get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){n({command:`cf live get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/live`,pathParams:{},bodyKind:`none`});return}let i=await e(o),s=await r(`Loading`,async()=>i.send(a));t(s,{successLabel:`Loaded`})})},c={command:`live`,describe:`live`,builder:e=>e.command(s).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{c as default};
@@ -1,10 +1,9 @@
1
1
  #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-B7ZJ78al.mjs";import{n}from"./auth-BUQscD5b.mjs";import{a as r,i,t as a}from"./context-Sgba0fZP.mjs";import{t as o}from"./output-CpiIVa7Q.mjs";import{t as s}from"./dry-run-BBjUQUhR.mjs";import{t as c}from"./progress-B1dpmxCT.mjs";import{t as l}from"./run-0EozpORq.mjs";import"./telemetry-BczXOpQn.mjs";import{a as u,n as d,r as f,t as p}from"./body-parser-ChnyBsfm.mjs";import{n as m}from"./input-validation-D7z60HJH.mjs";import{a as h,n as g}from"./prompt-Y5OBwDVE.mjs";var _={method:`POST`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/load_balancers`,body:`json`};function v(e){return e.usage(`$0 load-balancers account create
2
+ import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CSH3UMpD.mjs";import{n}from"./auth-BcNLQji1.mjs";import{a as r,i,t as a}from"./context-DVh8Wyfs.mjs";import{t as o}from"./output-BJEgbI0G.mjs";import{t as s}from"./dry-run-gy0Hl9xo.mjs";import{t as c}from"./progress-CtGsPOpV.mjs";import{t as l}from"./run-DnZGQbq_.mjs";import"./telemetry-CvZean4s.mjs";import{a as u,n as d,r as f,t as p}from"./body-parser-ChnyBsfm.mjs";import{n as m}from"./input-validation-D7z60HJH.mjs";import{a as h,n as g}from"./prompt-YrI7ltMa.mjs";var _={method:`POST`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/load_balancers`,body:`json`};function v(e){return e.usage(`$0 load-balancers account create
3
3
 
4
4
  Create a new account or zone-scoped load balancer.`).option(`adaptive-routing-failover-across-pools`,{type:`boolean`,description:"Extends zero-downtime failover of requests to healthy origins from alternate pools, when no healthy alternate exists in the same pool, according to the failover order defined by traffic and origin steering. When set false (the default) zero-downtime failover will only occur between origins within the same pool. See `session_affinity_attributes` for control over when sessions are broken or reassigned."}).option(`country-pools`,{type:`string`,description:`A mapping of country codes to a list of pool IDs (ordered by their failover priority) for the given country. Any country not explicitly defined will fall back to using the corresponding region_pool mapping if it exists else to default_pools. Provide as a JSON object or @path/to/file.json.`}).option(`default-pools`,{type:`string`,array:!0,description:`A list of pool IDs ordered by their failover priority. Pools defined here are used by default, or when region_pools are not configured for a given region.`}).option(`description`,{type:`string`,description:`Object description.`}).option(`enabled`,{type:`boolean`,description:`Whether to enable (the default) this load balancer.`,default:!0}).option(`fallback-pool`,{type:`string`,description:`The pool ID to use when all other pools are detected as unhealthy.`}).option(`location-strategy-mode`,{type:`string`,description:'Determines the authoritative location when ECS is not preferred, does not exist in the request, or its GeoIP lookup is unsuccessful.\n- `"pop"`: Use the Cloudflare PoP location.\n- `"resolver_ip"`: Use the DNS resolver GeoIP location. If the GeoIP lookup is unsuccessful, use the Cloudflare PoP location.',choices:[`pop`,`resolver_ip`]}).coerce(`location-strategy-mode`,e=>m(e,`location-strategy-mode`,`text`)).option(`location-strategy-prefer-ecs`,{type:`string`,description:'Whether the EDNS Client Subnet (ECS) GeoIP should be preferred as the authoritative location.\n- `"always"`: Always prefer ECS.\n- `"never"`: Never prefer ECS.\n- `"proximity"`: Prefer ECS only when `steering_policy="proximity"`.\n- `"geo"`: Prefer ECS only when `steering_policy="geo"`.',choices:[`always`,`never`,`proximity`,`geo`]}).coerce(`location-strategy-prefer-ecs`,e=>m(e,`location-strategy-prefer-ecs`,`text`)).option(`name`,{type:`string`,description:`The DNS hostname to associate with your Load Balancer. If this hostname already exists as a DNS record in Cloudflare's DNS, the Load Balancer will take precedence and the DNS record will not be used.`}).option(`networks`,{type:`string`,array:!0,description:`List of networks where Load Balancer or Pool is enabled.`}).option(`pop-pools`,{type:`string`,description:`Enterprise only: A mapping of Cloudflare PoP identifiers to a list of pool IDs (ordered by their failover priority) for the PoP (datacenter). Any PoPs not explicitly defined will fall back to using the corresponding country_pool, then region_pool mapping if it exists else to default_pools. Provide as a JSON object or @path/to/file.json.`}).option(`proxied`,{type:`boolean`,description:`Whether the hostname should be gray clouded (false) or orange clouded (true).`,default:!1}).option(`random-steering-default-weight`,{type:`number`,description:`The default weight for pools in the load balancer that are not specified in the pool_weights map.`}).option(`random-steering-pool-weights`,{type:`string`,description:`A mapping of pool IDs to custom weights. The weight is relative to other pools in the load balancer. Provide as a JSON object or @path/to/file.json.`}).option(`region-pools`,{type:`string`,description:`A mapping of region codes to a list of pool IDs (ordered by their failover priority) for the given region. Any regions not explicitly defined will fall back to using default_pools. Provide as a JSON object or @path/to/file.json.`}).option(`rules`,{type:`string`,description:`BETA Field Not General Access: A list of rules for this load balancer to execute. Provide as a JSON array of objects or @path/to/file.json.`}).option(`session-affinity`,{type:`string`,description:'Specifies the type of session affinity the load balancer should use unless specified as `"none"`. The supported types are: - `"cookie"`: On the first request to a proxied load balancer, a cookie is generated, encoding information of which origin the request will be forwarded to. Subsequent requests, by the same client to the same load balancer, will be sent to the origin server the cookie encodes, for the duration of the cookie and as long as the origin server remains healthy. If the cookie has expired or the origin server is unhealthy, then a new origin server is calculated and used. - `"ip_cookie"`: Behaves the same as `"cookie"` except the initial origin selection is stable and based on the client\'s ip address. - `"header"`: On the first request to a proxied load balancer, a session key based on the configured HTTP headers (see `session_affinity_attributes.headers`) is generated, encoding the request headers used for storing in the load balancer session state which origin the request will be forwarded to. Subsequent requests to the load balancer with the same headers will be sent to the same origin server, for the duration of the session and as long as the origin server remains healthy. If the session has been idle for the duration of `session_affinity_ttl` seconds or the origin server is unhealthy, then a new origin server is calculated and used. See `headers` in `session_affinity_attributes` for additional required configuration.',choices:[`none`,`cookie`,`ip_cookie`,`header`],default:`none`}).coerce(`session-affinity`,e=>m(e,`session-affinity`,`text`)).option(`session-affinity-attributes-drain-duration`,{type:`number`,description:`Configures the drain duration in seconds. This field is only used when session affinity is enabled on the load balancer.`}).option(`session-affinity-attributes-headers`,{type:`string`,array:!0,description:'Configures the names of HTTP headers to base session affinity on when header `session_affinity` is enabled. At least one HTTP header name must be provided. To specify the exact cookies to be used, include an item in the following format: `"cookie:<cookie-name-1>,<cookie-name-2>"` (example) where everything after the colon is a comma-separated list of cookie names. Providing only `"cookie"` will result in all cookies being used. The default max number of HTTP header names that can be provided depends on your plan: 5 for Enterprise, 1 for all other plans.'}).option(`session-affinity-attributes-require-all-headers`,{type:`boolean`,description:'When header `session_affinity` is enabled, this option can be used to specify how HTTP headers on load balancing requests will be used. The supported values are: - `"true"`: Load balancing requests must contain *all* of the HTTP headers specified by the `headers` session affinity attribute, otherwise sessions aren\'t created. - `"false"`: Load balancing requests must contain *at least one* of the HTTP headers specified by the `headers` session affinity attribute, otherwise sessions aren\'t created.'}).option(`session-affinity-attributes-samesite`,{type:`string`,description:`Configures the SameSite attribute on session affinity cookie. Value "Auto" will be translated to "Lax" or "None" depending if Always Use HTTPS is enabled. Note: when using value "None", the secure attribute can not be set to "Never".`,choices:[`Auto`,`Lax`,`None`,`Strict`]}).coerce(`session-affinity-attributes-samesite`,e=>m(e,`session-affinity-attributes-samesite`,`text`)).option(`session-affinity-attributes-secure`,{type:`string`,description:`Configures the Secure attribute on session affinity cookie. Value "Always" indicates the Secure attribute will be set in the Set-Cookie header, "Never" indicates the Secure attribute will not be set, and "Auto" will set the Secure attribute depending if Always Use HTTPS is enabled.`,choices:[`Auto`,`Always`,`Never`]}).coerce(`session-affinity-attributes-secure`,e=>m(e,`session-affinity-attributes-secure`,`text`)).option(`session-affinity-attributes-zero-downtime-failover`,{type:`string`,description:'Configures the zero-downtime failover between origins within a pool when session affinity is enabled. This feature is currently incompatible with Argo, Tiered Cache, and Bandwidth Alliance. The supported values are: - `"none"`: No failover takes place for sessions pinned to the origin (default). - `"temporary"`: Traffic will be sent to another other healthy origin until the originally pinned origin is available; note that this can potentially result in heavy origin flapping. - `"sticky"`: The session affinity cookie is updated and subsequent requests are sent to the new origin. Note: Zero-downtime failover with sticky sessions is currently not supported for session affinity by header.',choices:[`none`,`temporary`,`sticky`]}).coerce(`session-affinity-attributes-zero-downtime-failover`,e=>m(e,`session-affinity-attributes-zero-downtime-failover`,`text`)).option(`session-affinity-ttl`,{type:`number`,description:'Time, in seconds, until a client\'s session expires after being created. Once the expiry time has been reached, subsequent requests may get sent to a different origin server. The accepted ranges per `session_affinity` policy are: - `"cookie"` / `"ip_cookie"`: The current default of 23 hours will be used unless explicitly set. The accepted range of values is between [1800, 604800]. - `"header"`: The current default of 1800 seconds will be used unless explicitly set. The accepted range of values is between [30, 3600]. Note: With session affinity by header, sessions only expire after they haven\'t been used for the number of seconds specified.'}).option(`steering-policy`,{type:`string`,description:'Steering Policy for this load balancer.\n- `"off"`: Use `default_pools`.\n- `"geo"`: Use `region_pools`/`country_pools`/`pop_pools`. For non-proxied requests, the country for `country_pools` is determined by `location_strategy`.\n- `"random"`: Select a pool randomly.\n- `"dynamic_latency"`: Use round trip time to select the closest pool in default_pools (requires pool health checks).\n- `"proximity"`: Use the pools\' latitude and longitude to select the closest pool using the Cloudflare PoP location for proxied requests or the location determined by `location_strategy` for non-proxied requests.\n- `"least_outstanding_requests"`: Select a pool by taking into consideration `random_steering` weights, as well as each pool\'s number of outstanding requests. Pools with more pending requests are weighted proportionately less relative to others.\n- `"least_connections"`: Select a pool by taking into consideration `random_steering` weights, as well as each pool\'s number of open connections. Pools with more open connections are weighted proportionately less relative to others. Supported for HTTP/1 and HTTP/2 connections.\n- `""`: Will map to `"geo"` if you use `region_pools`/`country_pools`/`pop_pools` otherwise `"off"`.',choices:[`off`,`geo`,`random`,`dynamic_latency`,`proximity`,`least_outstanding_requests`,`least_connections`],default:``}).coerce(`steering-policy`,e=>m(e,`steering-policy`,`text`)).option(`ttl`,{type:`number`,description:`Time to live (TTL) of the DNS entry for the IP address returned by this load balancer. This only applies to gray-clouded (unproxied) load balancers.`}).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 account or zone Load Balancer`,builder:v,handler:async e=>l({command:`load-balancers account create`,classification:{safeFlags:[`adaptive-routing-failover-across-pools`,`enabled`,`location-strategy-mode`,`location-strategy-prefer-ecs`,`proxied`,`session-affinity`,`session-affinity-attributes-require-all-headers`,`session-affinity-attributes-samesite`,`session-affinity-attributes-secure`,`session-affinity-attributes-zero-downtime-failover`,`steering-policy`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await r():void 0,n=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;s({command:`cf load-balancers account create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/load_balancers`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i)},bodyKind:`json`,body:e.body===void 0?p({adaptive_routing:{failover_across_pools:e[`adaptive-routing-failover-across-pools`]},country_pools:f(e[`country-pools`],`country-pools`),default_pools:e[`default-pools`],description:m(e.description,`description`,`text`),enabled:e.enabled,fallback_pool:m(e[`fallback-pool`],`fallback-pool`,`text`),location_strategy:{mode:e[`location-strategy-mode`],prefer_ecs:e[`location-strategy-prefer-ecs`]},name:m(e.name,`name`,`text`),networks:e.networks,pop_pools:f(e[`pop-pools`],`pop-pools`),proxied:e.proxied,random_steering:{default_weight:e[`random-steering-default-weight`],pool_weights:f(e[`random-steering-pool-weights`],`random-steering-pool-weights`)},region_pools:f(e[`region-pools`],`region-pools`),rules:u(e.rules,`rules`),session_affinity:e[`session-affinity`],session_affinity_attributes:{drain_duration:e[`session-affinity-attributes-drain-duration`],headers:e[`session-affinity-attributes-headers`],require_all_headers:e[`session-affinity-attributes-require-all-headers`],samesite:e[`session-affinity-attributes-samesite`],secure:e[`session-affinity-attributes-secure`],zero_downtime_failover:e[`session-affinity-attributes-zero-downtime-failover`]},session_affinity_ttl:e[`session-affinity-ttl`],steering_policy:e[`steering-policy`],ttl:e.ttl},[[`country_pools`],[`pop_pools`],[`random_steering`,`pool_weights`],[`region_pools`]]):d(e.body)});return}let l=await n(e),g=e.zone===void 0?`accounts`:`zones`,v=g===`zones`?await i({zone:e.zone},l,{quiet:e.quiet}):e.local?t:await a();if(g===`zones`?e.zoneId=v:e.accountId=v,e.body){let t=d(e.body),n=await c(`Creating`,async()=>l.send(_,{body:t,account_or_zone:g,account_or_zone_id:v}));o(n,{successLabel:`Created`});return}if(e[`default-pools`]===void 0)throw Error(`--default-pools is required (or pass --body with this field set).`);e[`fallback-pool`]===void 0&&(e[`fallback-pool`]=await h(`fallback-pool`,`The pool ID to use when all other pools are detected as unhealthy.`)),e.name===void 0&&(e.name=await h(`name`,`The DNS hostname to associate with your Load Balancer. If this hostname already exists as a DNS record in Cloudflare's DNS, the Load Balancer will take precedence and the DNS record will not be used.`));let y=p({adaptive_routing:{failover_across_pools:e[`adaptive-routing-failover-across-pools`]},country_pools:f(e[`country-pools`],`country-pools`),default_pools:e[`default-pools`],description:m(e.description,`description`,`text`),enabled:e.enabled,fallback_pool:m(e[`fallback-pool`],`fallback-pool`,`text`),location_strategy:{mode:e[`location-strategy-mode`],prefer_ecs:e[`location-strategy-prefer-ecs`]},name:m(e.name,`name`,`text`),networks:e.networks,pop_pools:f(e[`pop-pools`],`pop-pools`),proxied:e.proxied,random_steering:{default_weight:e[`random-steering-default-weight`],pool_weights:f(e[`random-steering-pool-weights`],`random-steering-pool-weights`)},region_pools:f(e[`region-pools`],`region-pools`),rules:u(e.rules,`rules`),session_affinity:e[`session-affinity`],session_affinity_attributes:{drain_duration:e[`session-affinity-attributes-drain-duration`],headers:e[`session-affinity-attributes-headers`],require_all_headers:e[`session-affinity-attributes-require-all-headers`],samesite:e[`session-affinity-attributes-samesite`],secure:e[`session-affinity-attributes-secure`],zero_downtime_failover:e[`session-affinity-attributes-zero-downtime-failover`]},session_affinity_ttl:e[`session-affinity-ttl`],steering_policy:e[`steering-policy`],ttl:e.ttl},[[`country_pools`],[`pop_pools`],[`random_steering`,`pool_weights`],[`region_pools`]]),b=await c(`Creating`,async()=>l.send(_,{body:y,account_or_zone:g,account_or_zone_id:v}));o(b,{successLabel:`Created`})})};var b={method:`DELETE`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/load_balancers/${t.load_balancer_id}`};function x(e){return e.usage(`$0 load-balancers account delete <load-balancer-id>
5
5
 
6
- Delete a configured account or zone-scoped load balancer.`).positional(`load-balancer-id`,{type:`string`,description:`Load balancer ID`,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 ee={command:`delete <load-balancer-id>`,describe:`Delete account or zone Load Balancer`,builder:x,handler:async e=>l({command:`load-balancers account delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await r():void 0,n=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;s({command:`cf load-balancers account delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/load_balancers/${e[`load-balancer-id`]==null?`<load-balancer-id>`:encodeURIComponent(String(e[`load-balancer-id`]))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i),"load-balancer-id":String(e[`load-balancer-id`]??``)},bodyKind:`none`});return}let l=await n(e),u=e.zone===void 0?`accounts`:`zones`,d=u===`zones`?await i({zone:e.zone},l,{quiet:e.quiet}):e.local?t:await a();if(u===`zones`?e.zoneId=d:e.accountId=d,!await g({force:!!e.force})){process.stderr.write(`Aborted.
7
- `);return}let f=await c(`Deleting`,async()=>l.send(b,{account_or_zone:u,account_or_zone_id:d,load_balancer_id:e[`load-balancer-id`]}));o(f,{successLabel:`Deleted`})})};var S={method:`PATCH`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/load_balancers/${t.load_balancer_id}`,body:`json`};function C(e){return e.usage(`$0 load-balancers account edit <load-balancer-id>
6
+ Delete a configured account or zone-scoped load balancer.`).positional(`load-balancer-id`,{type:`string`,description:`Load balancer ID`,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 ee={command:`delete <load-balancer-id>`,describe:`Delete account or zone Load Balancer`,builder:x,handler:async e=>l({command:`load-balancers account delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await r():void 0,n=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;s({command:`cf load-balancers account delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/load_balancers/${e[`load-balancer-id`]==null?`<load-balancer-id>`:encodeURIComponent(String(e[`load-balancer-id`]))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i),"load-balancer-id":String(e[`load-balancer-id`]??``)},bodyKind:`none`});return}let l=await n(e),u=e.zone===void 0?`accounts`:`zones`,d=u===`zones`?await i({zone:e.zone},l,{quiet:e.quiet}):e.local?t:await a();if(u===`zones`?e.zoneId=d:e.accountId=d,!await g({force:!!e.force}))return;let f=await c(`Deleting`,async()=>l.send(b,{account_or_zone:u,account_or_zone_id:d,load_balancer_id:e[`load-balancer-id`]}));o(f,{successLabel:`Deleted`})})};var S={method:`PATCH`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/load_balancers/${t.load_balancer_id}`,body:`json`};function C(e){return e.usage(`$0 load-balancers account edit <load-balancer-id>
8
7
 
9
8
  Apply changes to an existing account or zone-scoped load balancer, overwriting the supplied properties.`).positional(`load-balancer-id`,{type:`string`,description:`Load balancer ID`,demandOption:!0}).option(`adaptive-routing-failover-across-pools`,{type:`boolean`,description:"Extends zero-downtime failover of requests to healthy origins from alternate pools, when no healthy alternate exists in the same pool, according to the failover order defined by traffic and origin steering. When set false (the default) zero-downtime failover will only occur between origins within the same pool. See `session_affinity_attributes` for control over when sessions are broken or reassigned."}).option(`country-pools`,{type:`string`,description:`A mapping of country codes to a list of pool IDs (ordered by their failover priority) for the given country. Any country not explicitly defined will fall back to using the corresponding region_pool mapping if it exists else to default_pools. Provide as a JSON object or @path/to/file.json.`}).option(`default-pools`,{type:`string`,array:!0,description:`A list of pool IDs ordered by their failover priority. Pools defined here are used by default, or when region_pools are not configured for a given region.`}).option(`description`,{type:`string`,description:`Object description.`}).option(`enabled`,{type:`boolean`,description:`Whether to enable (the default) this load balancer.`}).option(`fallback-pool`,{type:`string`,description:`The pool ID to use when all other pools are detected as unhealthy.`}).option(`location-strategy-mode`,{type:`string`,description:'Determines the authoritative location when ECS is not preferred, does not exist in the request, or its GeoIP lookup is unsuccessful.\n- `"pop"`: Use the Cloudflare PoP location.\n- `"resolver_ip"`: Use the DNS resolver GeoIP location. If the GeoIP lookup is unsuccessful, use the Cloudflare PoP location.',choices:[`pop`,`resolver_ip`]}).coerce(`location-strategy-mode`,e=>m(e,`location-strategy-mode`,`text`)).option(`location-strategy-prefer-ecs`,{type:`string`,description:'Whether the EDNS Client Subnet (ECS) GeoIP should be preferred as the authoritative location.\n- `"always"`: Always prefer ECS.\n- `"never"`: Never prefer ECS.\n- `"proximity"`: Prefer ECS only when `steering_policy="proximity"`.\n- `"geo"`: Prefer ECS only when `steering_policy="geo"`.',choices:[`always`,`never`,`proximity`,`geo`]}).coerce(`location-strategy-prefer-ecs`,e=>m(e,`location-strategy-prefer-ecs`,`text`)).option(`name`,{type:`string`,description:`The DNS hostname to associate with your Load Balancer. If this hostname already exists as a DNS record in Cloudflare's DNS, the Load Balancer will take precedence and the DNS record will not be used.`}).option(`networks`,{type:`string`,array:!0,description:`List of networks where Load Balancer or Pool is enabled.`}).option(`pop-pools`,{type:`string`,description:`Enterprise only: A mapping of Cloudflare PoP identifiers to a list of pool IDs (ordered by their failover priority) for the PoP (datacenter). Any PoPs not explicitly defined will fall back to using the corresponding country_pool, then region_pool mapping if it exists else to default_pools. Provide as a JSON object or @path/to/file.json.`}).option(`proxied`,{type:`boolean`,description:`Whether the hostname should be gray clouded (false) or orange clouded (true).`}).option(`random-steering-default-weight`,{type:`number`,description:`The default weight for pools in the load balancer that are not specified in the pool_weights map.`}).option(`random-steering-pool-weights`,{type:`string`,description:`A mapping of pool IDs to custom weights. The weight is relative to other pools in the load balancer. Provide as a JSON object or @path/to/file.json.`}).option(`region-pools`,{type:`string`,description:`A mapping of region codes to a list of pool IDs (ordered by their failover priority) for the given region. Any regions not explicitly defined will fall back to using default_pools. Provide as a JSON object or @path/to/file.json.`}).option(`rules`,{type:`string`,description:`BETA Field Not General Access: A list of rules for this load balancer to execute. Provide as a JSON array of objects or @path/to/file.json.`}).option(`session-affinity`,{type:`string`,description:'Specifies the type of session affinity the load balancer should use unless specified as `"none"`. The supported types are: - `"cookie"`: On the first request to a proxied load balancer, a cookie is generated, encoding information of which origin the request will be forwarded to. Subsequent requests, by the same client to the same load balancer, will be sent to the origin server the cookie encodes, for the duration of the cookie and as long as the origin server remains healthy. If the cookie has expired or the origin server is unhealthy, then a new origin server is calculated and used. - `"ip_cookie"`: Behaves the same as `"cookie"` except the initial origin selection is stable and based on the client\'s ip address. - `"header"`: On the first request to a proxied load balancer, a session key based on the configured HTTP headers (see `session_affinity_attributes.headers`) is generated, encoding the request headers used for storing in the load balancer session state which origin the request will be forwarded to. Subsequent requests to the load balancer with the same headers will be sent to the same origin server, for the duration of the session and as long as the origin server remains healthy. If the session has been idle for the duration of `session_affinity_ttl` seconds or the origin server is unhealthy, then a new origin server is calculated and used. See `headers` in `session_affinity_attributes` for additional required configuration.',choices:[`none`,`cookie`,`ip_cookie`,`header`]}).coerce(`session-affinity`,e=>m(e,`session-affinity`,`text`)).option(`session-affinity-attributes-drain-duration`,{type:`number`,description:`Configures the drain duration in seconds. This field is only used when session affinity is enabled on the load balancer.`}).option(`session-affinity-attributes-headers`,{type:`string`,array:!0,description:'Configures the names of HTTP headers to base session affinity on when header `session_affinity` is enabled. At least one HTTP header name must be provided. To specify the exact cookies to be used, include an item in the following format: `"cookie:<cookie-name-1>,<cookie-name-2>"` (example) where everything after the colon is a comma-separated list of cookie names. Providing only `"cookie"` will result in all cookies being used. The default max number of HTTP header names that can be provided depends on your plan: 5 for Enterprise, 1 for all other plans.'}).option(`session-affinity-attributes-require-all-headers`,{type:`boolean`,description:'When header `session_affinity` is enabled, this option can be used to specify how HTTP headers on load balancing requests will be used. The supported values are: - `"true"`: Load balancing requests must contain *all* of the HTTP headers specified by the `headers` session affinity attribute, otherwise sessions aren\'t created. - `"false"`: Load balancing requests must contain *at least one* of the HTTP headers specified by the `headers` session affinity attribute, otherwise sessions aren\'t created.'}).option(`session-affinity-attributes-samesite`,{type:`string`,description:`Configures the SameSite attribute on session affinity cookie. Value "Auto" will be translated to "Lax" or "None" depending if Always Use HTTPS is enabled. Note: when using value "None", the secure attribute can not be set to "Never".`,choices:[`Auto`,`Lax`,`None`,`Strict`]}).coerce(`session-affinity-attributes-samesite`,e=>m(e,`session-affinity-attributes-samesite`,`text`)).option(`session-affinity-attributes-secure`,{type:`string`,description:`Configures the Secure attribute on session affinity cookie. Value "Always" indicates the Secure attribute will be set in the Set-Cookie header, "Never" indicates the Secure attribute will not be set, and "Auto" will set the Secure attribute depending if Always Use HTTPS is enabled.`,choices:[`Auto`,`Always`,`Never`]}).coerce(`session-affinity-attributes-secure`,e=>m(e,`session-affinity-attributes-secure`,`text`)).option(`session-affinity-attributes-zero-downtime-failover`,{type:`string`,description:'Configures the zero-downtime failover between origins within a pool when session affinity is enabled. This feature is currently incompatible with Argo, Tiered Cache, and Bandwidth Alliance. The supported values are: - `"none"`: No failover takes place for sessions pinned to the origin (default). - `"temporary"`: Traffic will be sent to another other healthy origin until the originally pinned origin is available; note that this can potentially result in heavy origin flapping. - `"sticky"`: The session affinity cookie is updated and subsequent requests are sent to the new origin. Note: Zero-downtime failover with sticky sessions is currently not supported for session affinity by header.',choices:[`none`,`temporary`,`sticky`]}).coerce(`session-affinity-attributes-zero-downtime-failover`,e=>m(e,`session-affinity-attributes-zero-downtime-failover`,`text`)).option(`session-affinity-ttl`,{type:`number`,description:'Time, in seconds, until a client\'s session expires after being created. Once the expiry time has been reached, subsequent requests may get sent to a different origin server. The accepted ranges per `session_affinity` policy are: - `"cookie"` / `"ip_cookie"`: The current default of 23 hours will be used unless explicitly set. The accepted range of values is between [1800, 604800]. - `"header"`: The current default of 1800 seconds will be used unless explicitly set. The accepted range of values is between [30, 3600]. Note: With session affinity by header, sessions only expire after they haven\'t been used for the number of seconds specified.'}).option(`steering-policy`,{type:`string`,description:'Steering Policy for this load balancer.\n- `"off"`: Use `default_pools`.\n- `"geo"`: Use `region_pools`/`country_pools`/`pop_pools`. For non-proxied requests, the country for `country_pools` is determined by `location_strategy`.\n- `"random"`: Select a pool randomly.\n- `"dynamic_latency"`: Use round trip time to select the closest pool in default_pools (requires pool health checks).\n- `"proximity"`: Use the pools\' latitude and longitude to select the closest pool using the Cloudflare PoP location for proxied requests or the location determined by `location_strategy` for non-proxied requests.\n- `"least_outstanding_requests"`: Select a pool by taking into consideration `random_steering` weights, as well as each pool\'s number of outstanding requests. Pools with more pending requests are weighted proportionately less relative to others.\n- `"least_connections"`: Select a pool by taking into consideration `random_steering` weights, as well as each pool\'s number of open connections. Pools with more open connections are weighted proportionately less relative to others. Supported for HTTP/1 and HTTP/2 connections.\n- `""`: Will map to `"geo"` if you use `region_pools`/`country_pools`/`pop_pools` otherwise `"off"`.',choices:[`off`,`geo`,`random`,`dynamic_latency`,`proximity`,`least_outstanding_requests`,`least_connections`]}).coerce(`steering-policy`,e=>m(e,`steering-policy`,`text`)).option(`ttl`,{type:`number`,description:`Time to live (TTL) of the DNS entry for the IP address returned by this load balancer. This only applies to gray-clouded (unproxied) load balancers.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:"The editable properties shared by load balancer create, update, and patch requests. Operations layer their own `required` constraints on top via `allOf`."})}const te={command:`edit <load-balancer-id>`,describe:`Patch account or zone Load Balancer`,builder:C,handler:async e=>l({command:`load-balancers account edit`,classification:{safeFlags:[`adaptive-routing-failover-across-pools`,`enabled`,`location-strategy-mode`,`location-strategy-prefer-ecs`,`proxied`,`session-affinity`,`session-affinity-attributes-require-all-headers`,`session-affinity-attributes-samesite`,`session-affinity-attributes-secure`,`session-affinity-attributes-zero-downtime-failover`,`steering-policy`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await r():void 0,n=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;s({command:`cf load-balancers account edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/load_balancers/${e[`load-balancer-id`]==null?`<load-balancer-id>`:encodeURIComponent(String(e[`load-balancer-id`]))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i),"load-balancer-id":String(e[`load-balancer-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({adaptive_routing:{failover_across_pools:e[`adaptive-routing-failover-across-pools`]},country_pools:f(e[`country-pools`],`country-pools`),default_pools:e[`default-pools`],description:m(e.description,`description`,`text`),enabled:e.enabled,fallback_pool:m(e[`fallback-pool`],`fallback-pool`,`text`),location_strategy:{mode:e[`location-strategy-mode`],prefer_ecs:e[`location-strategy-prefer-ecs`]},name:m(e.name,`name`,`text`),networks:e.networks,pop_pools:f(e[`pop-pools`],`pop-pools`),proxied:e.proxied,random_steering:{default_weight:e[`random-steering-default-weight`],pool_weights:f(e[`random-steering-pool-weights`],`random-steering-pool-weights`)},region_pools:f(e[`region-pools`],`region-pools`),rules:u(e.rules,`rules`),session_affinity:e[`session-affinity`],session_affinity_attributes:{drain_duration:e[`session-affinity-attributes-drain-duration`],headers:e[`session-affinity-attributes-headers`],require_all_headers:e[`session-affinity-attributes-require-all-headers`],samesite:e[`session-affinity-attributes-samesite`],secure:e[`session-affinity-attributes-secure`],zero_downtime_failover:e[`session-affinity-attributes-zero-downtime-failover`]},session_affinity_ttl:e[`session-affinity-ttl`],steering_policy:e[`steering-policy`],ttl:e.ttl},[[`country_pools`],[`pop_pools`],[`random_steering`,`pool_weights`],[`region_pools`]]):d(e.body)});return}let l=await n(e),h=e.zone===void 0?`accounts`:`zones`,g=h===`zones`?await i({zone:e.zone},l,{quiet:e.quiet}):e.local?t:await a();if(h===`zones`?e.zoneId=g:e.accountId=g,e.body){let t=d(e.body),n=await c(`Updating`,async()=>l.send(S,{body:t,account_or_zone:h,account_or_zone_id:g,load_balancer_id:e[`load-balancer-id`]}));o(n,{successLabel:`Updated`});return}let _=p({adaptive_routing:{failover_across_pools:e[`adaptive-routing-failover-across-pools`]},country_pools:f(e[`country-pools`],`country-pools`),default_pools:e[`default-pools`],description:m(e.description,`description`,`text`),enabled:e.enabled,fallback_pool:m(e[`fallback-pool`],`fallback-pool`,`text`),location_strategy:{mode:e[`location-strategy-mode`],prefer_ecs:e[`location-strategy-prefer-ecs`]},name:m(e.name,`name`,`text`),networks:e.networks,pop_pools:f(e[`pop-pools`],`pop-pools`),proxied:e.proxied,random_steering:{default_weight:e[`random-steering-default-weight`],pool_weights:f(e[`random-steering-pool-weights`],`random-steering-pool-weights`)},region_pools:f(e[`region-pools`],`region-pools`),rules:u(e.rules,`rules`),session_affinity:e[`session-affinity`],session_affinity_attributes:{drain_duration:e[`session-affinity-attributes-drain-duration`],headers:e[`session-affinity-attributes-headers`],require_all_headers:e[`session-affinity-attributes-require-all-headers`],samesite:e[`session-affinity-attributes-samesite`],secure:e[`session-affinity-attributes-secure`],zero_downtime_failover:e[`session-affinity-attributes-zero-downtime-failover`]},session_affinity_ttl:e[`session-affinity-ttl`],steering_policy:e[`steering-policy`],ttl:e.ttl},[[`country_pools`],[`pop_pools`],[`random_steering`,`pool_weights`],[`region_pools`]]),v=await c(`Updating`,async()=>l.send(S,{body:_,account_or_zone:h,account_or_zone_id:g,load_balancer_id:e[`load-balancer-id`]}));o(v,{successLabel:`Updated`})})};var ne={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/load_balancers/${t.load_balancer_id}`};function re(e){return e.usage(`$0 load-balancers account get <load-balancer-id>
10
9
 
@@ -18,8 +17,7 @@ Get current load balancer resource usage counts for an account.`).option(`dry-ru
18
17
 
19
18
  Create a new monitor group.`).option(`description`,{type:`string`,description:`A short description of the monitor group`}).option(`members`,{type:`string`,description:`List of monitors in this group. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const A={command:`create`,describe:`Create Monitor Group`,builder:k,handler:async e=>l({command:`load-balancers monitor-groups create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf load-balancers monitor-groups create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/load_balancers/monitor_groups`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({description:m(e.description,`description`,`text`),members:u(e.members,`members`)}):d(e.body)});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),n=await c(`Creating`,async()=>i.send(O,{body:t,account_id:l}));o(n,{successLabel:`Created`});return}if(e.description===void 0&&(e.description=await h(`description`,`A short description of the monitor group`)),e.members===void 0)throw Error(`--members is required (or pass --body with this field set).`);let f=p({description:m(e.description,`description`,`text`),members:u(e.members,`members`)}),g=await c(`Creating`,async()=>i.send(O,{body:f,account_id:l}));o(g,{successLabel:`Created`})})};var j={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/load_balancers/monitor_groups/${t.monitor_group_id}`,errors:{412:`PreconditionFailedError`}};function M(e){return e.usage(`$0 load-balancers monitor-groups delete <monitor-group-id>
20
19
 
21
- Delete a configured monitor group.`).positional(`monitor-group-id`,{type:`string`,description:`Monitor group ID`,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 <monitor-group-id>`,describe:`Delete Monitor Group`,builder:M,handler:async e=>l({command:`load-balancers monitor-groups delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf load-balancers monitor-groups delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/load_balancers/monitor_groups/${e[`monitor-group-id`]==null?`<monitor-group-id>`:encodeURIComponent(String(e[`monitor-group-id`]))}`,pathParams:{"monitor-group-id":String(e[`monitor-group-id`]??``)},bodyKind:`none`});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,!await g({force:!!e.force})){process.stderr.write(`Aborted.
22
- `);return}let u=await c(`Deleting`,async()=>i.send(j,{account_id:l,monitor_group_id:e[`monitor-group-id`]}));o(u,{successLabel:`Deleted`})})};var P={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/load_balancers/monitor_groups/${t.monitor_group_id}`,body:`json`,errors:{412:`PreconditionFailedError`}};function F(e){return e.usage(`$0 load-balancers monitor-groups edit <monitor-group-id>
20
+ Delete a configured monitor group.`).positional(`monitor-group-id`,{type:`string`,description:`Monitor group ID`,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 <monitor-group-id>`,describe:`Delete Monitor Group`,builder:M,handler:async e=>l({command:`load-balancers monitor-groups delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf load-balancers monitor-groups delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/load_balancers/monitor_groups/${e[`monitor-group-id`]==null?`<monitor-group-id>`:encodeURIComponent(String(e[`monitor-group-id`]))}`,pathParams:{"monitor-group-id":String(e[`monitor-group-id`]??``)},bodyKind:`none`});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,!await g({force:!!e.force}))return;let u=await c(`Deleting`,async()=>i.send(j,{account_id:l,monitor_group_id:e[`monitor-group-id`]}));o(u,{successLabel:`Deleted`})})};var P={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/load_balancers/monitor_groups/${t.monitor_group_id}`,body:`json`,errors:{412:`PreconditionFailedError`}};function F(e){return e.usage(`$0 load-balancers monitor-groups edit <monitor-group-id>
23
21
 
24
22
  Apply changes to an existing monitor group, overwriting the supplied properties.`).positional(`monitor-group-id`,{type:`string`,description:`Monitor group ID`,demandOption:!0}).option(`description`,{type:`string`,description:`A short description of the monitor group`}).option(`members`,{type:`string`,description:`List of monitors in this group. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const I={command:`edit <monitor-group-id>`,describe:`Patch Monitor Group`,builder:F,handler:async e=>l({command:`load-balancers monitor-groups edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf load-balancers monitor-groups edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/load_balancers/monitor_groups/${e[`monitor-group-id`]==null?`<monitor-group-id>`:encodeURIComponent(String(e[`monitor-group-id`]))}`,pathParams:{"monitor-group-id":String(e[`monitor-group-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({description:m(e.description,`description`,`text`),members:u(e.members,`members`)}):d(e.body)});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),n=await c(`Updating`,async()=>i.send(P,{body:t,account_id:l,monitor_group_id:e[`monitor-group-id`]}));o(n,{successLabel:`Updated`});return}if(e.description===void 0&&(e.description=await h(`description`,`A short description of the monitor group`)),e.members===void 0)throw Error(`--members is required (or pass --body with this field set).`);let f=p({description:m(e.description,`description`,`text`),members:u(e.members,`members`)}),g=await c(`Updating`,async()=>i.send(P,{body:f,account_id:l,monitor_group_id:e[`monitor-group-id`]}));o(g,{successLabel:`Updated`})})};var L={method:`GET`,path:t=>e`/accounts/${t.account_id}/load_balancers/monitor_groups/${t.monitor_group_id}`};function R(e){return e.usage(`$0 load-balancers monitor-groups get <monitor-group-id>
25
23
 
@@ -33,8 +31,7 @@ Modify a configured monitor group.`).positional(`monitor-group-id`,{type:`string
33
31
 
34
32
  Create a configured monitor.`).option(`allow-insecure`,{type:`boolean`,description:`Do not validate the certificate when monitor use HTTPS. This parameter is currently only valid for HTTP and HTTPS monitors.`,default:!1}).option(`consecutive-down`,{type:`number`,description:`To be marked unhealthy the monitored origin must fail this healthcheck N consecutive times.`}).option(`consecutive-up`,{type:`number`,description:`To be marked healthy the monitored origin must pass this healthcheck N consecutive times.`}).option(`description`,{type:`string`,description:`Object description.`,default:``}).option(`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. This parameter is only valid for HTTP and HTTPS monitors.`,default:``}).option(`expected-codes`,{type:`string`,description:`The expected HTTP response code or code range of the health check. This parameter is only valid for HTTP and HTTPS monitors.`,default:``}).option(`follow-redirects`,{type:`boolean`,description:`Follow redirects if returned by the origin. This parameter is only valid for HTTP and HTTPS monitors.`,default:!1}).option(`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. This parameter is only valid for HTTP and HTTPS monitors. Provide as a JSON object or @path/to/file.json.`}).option(`interval`,{type:`number`,description:`The interval between each health check. Shorter intervals may improve failover time, but will increase load on the origins as we check from multiple locations.`,default:60}).option(`method`,{type:`string`,description:`The method to use for the health check. This defaults to 'GET' for HTTP/HTTPS based checks and 'connection_established' for TCP based health checks.`}).option(`path`,{type:`string`,description:`The endpoint path you want to conduct a health check against. This parameter is only valid for HTTP and HTTPS monitors.`}).option(`port`,{type:`number`,description:`The port number to connect to for the health check. Required for TCP, UDP, and SMTP checks. HTTP and HTTPS checks should only define the port when using a non-standard port (HTTP: default 80, HTTPS: default 443).`}).option(`probe-zone`,{type:`string`,description:`Assign this monitor to emulate the specified zone while probing. This parameter is only valid for HTTP and HTTPS monitors.`,default:``}).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(`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', 'TCP', 'ICMP-PING', 'UDP-ICMP', and 'SMTP'.`,choices:[`http`,`https`,`tcp`,`udp_icmp`,`icmp_ping`,`smtp`],default:`http`}).coerce(`type`,e=>m(e,`type`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const be={command:`create`,describe:`Create Monitor`,builder:ye,handler:async e=>l({command:`load-balancers monitors create`,classification:{safeFlags:[`allow-insecure`,`follow-redirects`,`type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf load-balancers monitors create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/load_balancers/monitors`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({allow_insecure:e[`allow-insecure`],consecutive_down:e[`consecutive-down`],consecutive_up:e[`consecutive-up`],description:m(e.description,`description`,`text`),expected_body:m(e[`expected-body`],`expected-body`,`text`),expected_codes:m(e[`expected-codes`],`expected-codes`,`text`),follow_redirects:e[`follow-redirects`],header:f(e.header,`header`),interval:e.interval,method:m(e.method,`method`,`text`),path:m(e.path,`path`,`text`),port:e.port,probe_zone:m(e[`probe-zone`],`probe-zone`,`text`),retries:e.retries,timeout:e.timeout,type:e.type},[[`header`]]):d(e.body)});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),n=await c(`Creating`,async()=>i.send(W,{body:t,account_id:l}));o(n,{successLabel:`Created`});return}let u=p({allow_insecure:e[`allow-insecure`],consecutive_down:e[`consecutive-down`],consecutive_up:e[`consecutive-up`],description:m(e.description,`description`,`text`),expected_body:m(e[`expected-body`],`expected-body`,`text`),expected_codes:m(e[`expected-codes`],`expected-codes`,`text`),follow_redirects:e[`follow-redirects`],header:f(e.header,`header`),interval:e.interval,method:m(e.method,`method`,`text`),path:m(e.path,`path`,`text`),port:e.port,probe_zone:m(e[`probe-zone`],`probe-zone`,`text`),retries:e.retries,timeout:e.timeout,type:e.type},[[`header`]]),h=await c(`Creating`,async()=>i.send(W,{body:u,account_id:l}));o(h,{successLabel:`Created`})})};var xe={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/load_balancers/monitors/${t.monitor_id}`};function Se(e){return e.usage(`$0 load-balancers monitors delete <monitor-id>
35
33
 
36
- Delete a configured monitor.`).positional(`monitor-id`,{type:`string`,description:`Monitor ID`,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 Ce={command:`delete <monitor-id>`,describe:`Delete Monitor`,builder:Se,handler:async e=>l({command:`load-balancers monitors delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf load-balancers monitors delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/load_balancers/monitors/${e[`monitor-id`]==null?`<monitor-id>`:encodeURIComponent(String(e[`monitor-id`]))}`,pathParams:{"monitor-id":String(e[`monitor-id`]??``)},bodyKind:`none`});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,!await g({force:!!e.force})){process.stderr.write(`Aborted.
37
- `);return}let u=await c(`Deleting`,async()=>i.send(xe,{account_id:l,monitor_id:e[`monitor-id`]}));o(u,{successLabel:`Deleted`})})};var G={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/load_balancers/monitors/${t.monitor_id}`,body:`json`};function we(e){return e.usage(`$0 load-balancers monitors edit <monitor-id>
34
+ Delete a configured monitor.`).positional(`monitor-id`,{type:`string`,description:`Monitor ID`,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 Ce={command:`delete <monitor-id>`,describe:`Delete Monitor`,builder:Se,handler:async e=>l({command:`load-balancers monitors delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf load-balancers monitors delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/load_balancers/monitors/${e[`monitor-id`]==null?`<monitor-id>`:encodeURIComponent(String(e[`monitor-id`]))}`,pathParams:{"monitor-id":String(e[`monitor-id`]??``)},bodyKind:`none`});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,!await g({force:!!e.force}))return;let u=await c(`Deleting`,async()=>i.send(xe,{account_id:l,monitor_id:e[`monitor-id`]}));o(u,{successLabel:`Deleted`})})};var G={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/load_balancers/monitors/${t.monitor_id}`,body:`json`};function we(e){return e.usage(`$0 load-balancers monitors edit <monitor-id>
38
35
 
39
36
  Apply changes to an existing monitor, overwriting the supplied properties.`).positional(`monitor-id`,{type:`string`,description:`Monitor ID`,demandOption:!0}).option(`allow-insecure`,{type:`boolean`,description:`Do not validate the certificate when monitor use HTTPS. This parameter is currently only valid for HTTP and HTTPS monitors.`}).option(`consecutive-down`,{type:`number`,description:`To be marked unhealthy the monitored origin must fail this healthcheck N consecutive times.`}).option(`consecutive-up`,{type:`number`,description:`To be marked healthy the monitored origin must pass this healthcheck N consecutive times.`}).option(`description`,{type:`string`,description:`Object description.`}).option(`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. This parameter is only valid for HTTP and HTTPS monitors.`}).option(`expected-codes`,{type:`string`,description:`The expected HTTP response code or code range of the health check. This parameter is only valid for HTTP and HTTPS monitors.`}).option(`follow-redirects`,{type:`boolean`,description:`Follow redirects if returned by the origin. This parameter is only valid for HTTP and HTTPS monitors.`}).option(`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. This parameter is only valid for HTTP and HTTPS monitors. Provide as a JSON object or @path/to/file.json.`}).option(`interval`,{type:`number`,description:`The interval between each health check. Shorter intervals may improve failover time, but will increase load on the origins as we check from multiple locations.`}).option(`method`,{type:`string`,description:`The method to use for the health check. This defaults to 'GET' for HTTP/HTTPS based checks and 'connection_established' for TCP based health checks.`}).option(`path`,{type:`string`,description:`The endpoint path you want to conduct a health check against. This parameter is only valid for HTTP and HTTPS monitors.`}).option(`port`,{type:`number`,description:`The port number to connect to for the health check. Required for TCP, UDP, and SMTP checks. HTTP and HTTPS checks should only define the port when using a non-standard port (HTTP: default 80, HTTPS: default 443).`}).option(`probe-zone`,{type:`string`,description:`Assign this monitor to emulate the specified zone while probing. This parameter is only valid for HTTP and HTTPS monitors.`}).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(`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', 'TCP', 'ICMP-PING', 'UDP-ICMP', and 'SMTP'.`,choices:[`http`,`https`,`tcp`,`udp_icmp`,`icmp_ping`,`smtp`]}).coerce(`type`,e=>m(e,`type`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Te={command:`edit <monitor-id>`,describe:`Patch Monitor`,builder:we,handler:async e=>l({command:`load-balancers monitors edit`,classification:{safeFlags:[`allow-insecure`,`follow-redirects`,`type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf load-balancers monitors edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/load_balancers/monitors/${e[`monitor-id`]==null?`<monitor-id>`:encodeURIComponent(String(e[`monitor-id`]))}`,pathParams:{"monitor-id":String(e[`monitor-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({allow_insecure:e[`allow-insecure`],consecutive_down:e[`consecutive-down`],consecutive_up:e[`consecutive-up`],description:m(e.description,`description`,`text`),expected_body:m(e[`expected-body`],`expected-body`,`text`),expected_codes:m(e[`expected-codes`],`expected-codes`,`text`),follow_redirects:e[`follow-redirects`],header:f(e.header,`header`),interval:e.interval,method:m(e.method,`method`,`text`),path:m(e.path,`path`,`text`),port:e.port,probe_zone:m(e[`probe-zone`],`probe-zone`,`text`),retries:e.retries,timeout:e.timeout,type:e.type},[[`header`]]):d(e.body)});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),n=await c(`Updating`,async()=>i.send(G,{body:t,account_id:l,monitor_id:e[`monitor-id`]}));o(n,{successLabel:`Updated`});return}let u=p({allow_insecure:e[`allow-insecure`],consecutive_down:e[`consecutive-down`],consecutive_up:e[`consecutive-up`],description:m(e.description,`description`,`text`),expected_body:m(e[`expected-body`],`expected-body`,`text`),expected_codes:m(e[`expected-codes`],`expected-codes`,`text`),follow_redirects:e[`follow-redirects`],header:f(e.header,`header`),interval:e.interval,method:m(e.method,`method`,`text`),path:m(e.path,`path`,`text`),port:e.port,probe_zone:m(e[`probe-zone`],`probe-zone`,`text`),retries:e.retries,timeout:e.timeout,type:e.type},[[`header`]]),h=await c(`Updating`,async()=>i.send(G,{body:u,account_id:l,monitor_id:e[`monitor-id`]}));o(h,{successLabel:`Updated`})})};var Ee={method:`GET`,path:t=>e`/accounts/${t.account_id}/load_balancers/monitors/${t.monitor_id}`};function De(e){return e.usage(`$0 load-balancers monitors get <monitor-id>
40
37
 
@@ -50,8 +47,7 @@ Modify a configured monitor.`).positional(`monitor-id`,{type:`string`,descriptio
50
47
 
51
48
  Create a new pool.`).option(`description`,{type:`string`,description:`A human-readable description of the pool.`,default:``}).option(`enabled`,{type:`boolean`,description:`Whether to enable (the default) or disable this pool. Disabled pools will not receive traffic and are excluded from health checks. Disabling a pool will cause any load balancers using it to failover to the next pool (if any).`,default:!0}).option(`latitude`,{type:`number`,description:`The latitude of the data center containing the origins used in this pool in decimal degrees. If this is set, longitude must also be set.`}).option(`load-shedding-default-percent`,{type:`number`,description:`The percent of traffic to shed from the pool, according to the default policy. Applies to new sessions and traffic without session affinity.`}).option(`load-shedding-default-policy`,{type:`string`,description:`The default policy to use when load shedding. A random policy randomly sheds a given percent of requests. A hash policy computes a hash over the CF-Connecting-IP address and sheds all requests originating from a percent of IPs.`,choices:[`random`,`hash`]}).coerce(`load-shedding-default-policy`,e=>m(e,`load-shedding-default-policy`,`text`)).option(`load-shedding-session-percent`,{type:`number`,description:`The percent of existing sessions to shed from the pool, according to the session policy.`}).option(`load-shedding-session-policy`,{type:`string`,description:`Only the hash policy is supported for existing sessions (to avoid exponential decay).`,choices:[`hash`]}).coerce(`load-shedding-session-policy`,e=>m(e,`load-shedding-session-policy`,`text`)).option(`longitude`,{type:`number`,description:`The longitude of the data center containing the origins used in this pool in decimal degrees. If this is set, latitude must also be set.`}).option(`minimum-origins`,{type:`number`,description:`The minimum number of origins that must be healthy for this pool to serve traffic. If the number of healthy origins falls below this number, the pool will be marked unhealthy and will failover to the next available pool.`,default:1}).option(`monitor`,{type:`string`,description:`The ID of the Monitor to use for checking the health of origins within this pool.`}).option(`monitor-group`,{type:`string`,description:`The ID of the Monitor Group to use for checking the health of origins within this pool.`}).option(`name`,{type:`string`,description:`A short name (tag) for the pool. Only alphanumeric characters, hyphens, and underscores are allowed.`}).option(`notification-email`,{type:`string`,description:`This field is now deprecated. It has been moved to Cloudflare's Centralized Notification service https://developers.cloudflare.com/fundamentals/notifications/. The email address to send health status notifications to. This can be an individual mailbox or a mailing list. Multiple emails can be supplied as a comma delimited list.`,default:``}).option(`notification-filter-origin-disable`,{type:`boolean`,description:`If set true, disable notifications for this type of resource (pool or origin).`}).option(`notification-filter-origin-healthy`,{type:`boolean`,description:`If present, send notifications only for this health status (e.g. false for only DOWN events). Use null to reset (all events).`}).option(`notification-filter-pool-disable`,{type:`boolean`,description:`If set true, disable notifications for this type of resource (pool or origin).`}).option(`notification-filter-pool-healthy`,{type:`boolean`,description:`If present, send notifications only for this health status (e.g. false for only DOWN events). Use null to reset (all events).`}).option(`origin-steering-policy`,{type:`string`,description:'The type of origin steering policy to use.\n- `"random"`: Select an origin randomly.\n- `"hash"`: Select an origin by computing a hash over the CF-Connecting-IP address.\n- `"least_outstanding_requests"`: Select an origin by taking into consideration origin weights, as well as each origin\'s number of outstanding requests. Origins with more pending requests are weighted proportionately less relative to others.\n- `"least_connections"`: Select an origin by taking into consideration origin weights, as well as each origin\'s number of open connections. Origins with more open connections are weighted proportionately less relative to others. Supported for HTTP/1 and HTTP/2 connections.',choices:[`random`,`hash`,`least_outstanding_requests`,`least_connections`]}).coerce(`origin-steering-policy`,e=>m(e,`origin-steering-policy`,`text`)).option(`origins`,{type:`string`,description:`The list of origins within this pool. Traffic directed at this pool is balanced across all currently healthy origins, provided the pool itself is healthy. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Ge={command:`create`,describe:`Create Pool`,builder:We,handler:async e=>l({command:`load-balancers pools create`,classification:{safeFlags:[`enabled`,`load-shedding-default-policy`,`load-shedding-session-policy`,`notification-filter-origin-disable`,`notification-filter-origin-healthy`,`notification-filter-pool-disable`,`notification-filter-pool-healthy`,`origin-steering-policy`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf load-balancers pools create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/load_balancers/pools`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({description:m(e.description,`description`,`text`),enabled:e.enabled,latitude:e.latitude,load_shedding:{default_percent:e[`load-shedding-default-percent`],default_policy:e[`load-shedding-default-policy`],session_percent:e[`load-shedding-session-percent`],session_policy:e[`load-shedding-session-policy`]},longitude:e.longitude,minimum_origins:e[`minimum-origins`],monitor:m(e.monitor,`monitor`,`text`),monitor_group:m(e[`monitor-group`],`monitor-group`,`text`),name:m(e.name,`name`,`text`),notification_email:m(e[`notification-email`],`notification-email`,`text`),notification_filter:{origin:{disable:e[`notification-filter-origin-disable`],healthy:e[`notification-filter-origin-healthy`]},pool:{disable:e[`notification-filter-pool-disable`],healthy:e[`notification-filter-pool-healthy`]}},origin_steering:{policy:e[`origin-steering-policy`]},origins:u(e.origins,`origins`)}):d(e.body)});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),n=await c(`Creating`,async()=>i.send(Y,{body:t,account_id:l}));o(n,{successLabel:`Created`});return}if(e.name===void 0&&(e.name=await h(`name`,`A short name (tag) for the pool. Only alphanumeric characters, hyphens, and underscores are allowed.`)),e.origins===void 0)throw Error(`--origins is required (or pass --body with this field set).`);let f=p({description:m(e.description,`description`,`text`),enabled:e.enabled,latitude:e.latitude,load_shedding:{default_percent:e[`load-shedding-default-percent`],default_policy:e[`load-shedding-default-policy`],session_percent:e[`load-shedding-session-percent`],session_policy:e[`load-shedding-session-policy`]},longitude:e.longitude,minimum_origins:e[`minimum-origins`],monitor:m(e.monitor,`monitor`,`text`),monitor_group:m(e[`monitor-group`],`monitor-group`,`text`),name:m(e.name,`name`,`text`),notification_email:m(e[`notification-email`],`notification-email`,`text`),notification_filter:{origin:{disable:e[`notification-filter-origin-disable`],healthy:e[`notification-filter-origin-healthy`]},pool:{disable:e[`notification-filter-pool-disable`],healthy:e[`notification-filter-pool-healthy`]}},origin_steering:{policy:e[`origin-steering-policy`]},origins:u(e.origins,`origins`)}),g=await c(`Creating`,async()=>i.send(Y,{body:f,account_id:l}));o(g,{successLabel:`Created`})})};var Ke={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/load_balancers/pools/${t.pool_id}`};function qe(e){return e.usage(`$0 load-balancers pools delete <pool-id>
52
49
 
53
- Delete a configured pool.`).positional(`pool-id`,{type:`string`,description:`Pool ID`,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 Je={command:`delete <pool-id>`,describe:`Delete Pool`,builder:qe,handler:async e=>l({command:`load-balancers pools delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf load-balancers pools delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/load_balancers/pools/${e[`pool-id`]==null?`<pool-id>`:encodeURIComponent(String(e[`pool-id`]))}`,pathParams:{"pool-id":String(e[`pool-id`]??``)},bodyKind:`none`});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,!await g({force:!!e.force})){process.stderr.write(`Aborted.
54
- `);return}let u=await c(`Deleting`,async()=>i.send(Ke,{account_id:l,pool_id:e[`pool-id`]}));o(u,{successLabel:`Deleted`})})};var X={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/load_balancers/pools/${t.pool_id}`,body:`json`};function Ye(e){return e.usage(`$0 load-balancers pools edit <pool-id>
50
+ Delete a configured pool.`).positional(`pool-id`,{type:`string`,description:`Pool ID`,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 Je={command:`delete <pool-id>`,describe:`Delete Pool`,builder:qe,handler:async e=>l({command:`load-balancers pools delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf load-balancers pools delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/load_balancers/pools/${e[`pool-id`]==null?`<pool-id>`:encodeURIComponent(String(e[`pool-id`]))}`,pathParams:{"pool-id":String(e[`pool-id`]??``)},bodyKind:`none`});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,!await g({force:!!e.force}))return;let u=await c(`Deleting`,async()=>i.send(Ke,{account_id:l,pool_id:e[`pool-id`]}));o(u,{successLabel:`Deleted`})})};var X={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/load_balancers/pools/${t.pool_id}`,body:`json`};function Ye(e){return e.usage(`$0 load-balancers pools edit <pool-id>
55
51
 
56
52
  Apply changes to an existing pool, overwriting the supplied properties.`).positional(`pool-id`,{type:`string`,description:`Pool ID`,demandOption:!0}).option(`check-regions`,{type:`string`,array:!0,description:`A list of regions from which to run health checks. Null means every Cloudflare data center.`}).option(`description`,{type:`string`,description:`A human-readable description of the pool.`}).option(`enabled`,{type:`boolean`,description:`Whether to enable (the default) or disable this pool. Disabled pools will not receive traffic and are excluded from health checks. Disabling a pool will cause any load balancers using it to failover to the next pool (if any).`}).option(`health-sources`,{type:`string`,array:!0,description:`A list of health sources, ordered from highest to lowest priority, used to evaluate individual origin health and overall pool health. The load balancer uses the first source that has data and falls back to the next. Currently accepted values are null or the exact array ["regional", "global"]; any other combination is rejected. Null (the default) behaves like ["local", "global"]. ["regional", "global"] makes each region steer on its own health, falling back to the global decision when a region has no fresh data. Setting regional requires at least one region in check_regions.`}).option(`latitude`,{type:`number`,description:`The latitude of the data center containing the origins used in this pool in decimal degrees. If this is set, longitude must also be set.`}).option(`load-shedding-default-percent`,{type:`number`,description:`The percent of traffic to shed from the pool, according to the default policy. Applies to new sessions and traffic without session affinity.`}).option(`load-shedding-default-policy`,{type:`string`,description:`The default policy to use when load shedding. A random policy randomly sheds a given percent of requests. A hash policy computes a hash over the CF-Connecting-IP address and sheds all requests originating from a percent of IPs.`,choices:[`random`,`hash`]}).coerce(`load-shedding-default-policy`,e=>m(e,`load-shedding-default-policy`,`text`)).option(`load-shedding-session-percent`,{type:`number`,description:`The percent of existing sessions to shed from the pool, according to the session policy.`}).option(`load-shedding-session-policy`,{type:`string`,description:`Only the hash policy is supported for existing sessions (to avoid exponential decay).`,choices:[`hash`]}).coerce(`load-shedding-session-policy`,e=>m(e,`load-shedding-session-policy`,`text`)).option(`longitude`,{type:`number`,description:`The longitude of the data center containing the origins used in this pool in decimal degrees. If this is set, latitude must also be set.`}).option(`minimum-origins`,{type:`number`,description:`The minimum number of origins that must be healthy for this pool to serve traffic. If the number of healthy origins falls below this number, the pool will be marked unhealthy and will failover to the next available pool.`}).option(`monitor`,{type:`string`,description:`The ID of the Monitor to use for checking the health of origins within this pool.`}).option(`monitor-group`,{type:`string`,description:`The ID of the Monitor Group to use for checking the health of origins within this pool.`}).option(`name`,{type:`string`,description:`A short name (tag) for the pool. Only alphanumeric characters, hyphens, and underscores are allowed.`}).option(`notification-email`,{type:`string`,description:`This field is now deprecated. It has been moved to Cloudflare's Centralized Notification service https://developers.cloudflare.com/fundamentals/notifications/. The email address to send health status notifications to. This can be an individual mailbox or a mailing list. Multiple emails can be supplied as a comma delimited list.`}).option(`notification-filter-origin-disable`,{type:`boolean`,description:`If set true, disable notifications for this type of resource (pool or origin).`}).option(`notification-filter-origin-healthy`,{type:`boolean`,description:`If present, send notifications only for this health status (e.g. false for only DOWN events). Use null to reset (all events).`}).option(`notification-filter-pool-disable`,{type:`boolean`,description:`If set true, disable notifications for this type of resource (pool or origin).`}).option(`notification-filter-pool-healthy`,{type:`boolean`,description:`If present, send notifications only for this health status (e.g. false for only DOWN events). Use null to reset (all events).`}).option(`origin-steering-policy`,{type:`string`,description:'The type of origin steering policy to use.\n- `"random"`: Select an origin randomly.\n- `"hash"`: Select an origin by computing a hash over the CF-Connecting-IP address.\n- `"least_outstanding_requests"`: Select an origin by taking into consideration origin weights, as well as each origin\'s number of outstanding requests. Origins with more pending requests are weighted proportionately less relative to others.\n- `"least_connections"`: Select an origin by taking into consideration origin weights, as well as each origin\'s number of open connections. Origins with more open connections are weighted proportionately less relative to others. Supported for HTTP/1 and HTTP/2 connections.',choices:[`random`,`hash`,`least_outstanding_requests`,`least_connections`]}).coerce(`origin-steering-policy`,e=>m(e,`origin-steering-policy`,`text`)).option(`origins`,{type:`string`,description:`The list of origins within this pool. Traffic directed at this pool is balanced across all currently healthy origins, provided the pool itself is healthy. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Xe={command:`edit <pool-id>`,describe:`Patch Pool`,builder:Ye,handler:async e=>l({command:`load-balancers pools edit`,classification:{safeFlags:[`enabled`,`load-shedding-default-policy`,`load-shedding-session-policy`,`notification-filter-origin-disable`,`notification-filter-origin-healthy`,`notification-filter-pool-disable`,`notification-filter-pool-healthy`,`origin-steering-policy`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf load-balancers pools edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/load_balancers/pools/${e[`pool-id`]==null?`<pool-id>`:encodeURIComponent(String(e[`pool-id`]))}`,pathParams:{"pool-id":String(e[`pool-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({check_regions:e[`check-regions`],description:m(e.description,`description`,`text`),enabled:e.enabled,health_sources:e[`health-sources`],latitude:e.latitude,load_shedding:{default_percent:e[`load-shedding-default-percent`],default_policy:e[`load-shedding-default-policy`],session_percent:e[`load-shedding-session-percent`],session_policy:e[`load-shedding-session-policy`]},longitude:e.longitude,minimum_origins:e[`minimum-origins`],monitor:m(e.monitor,`monitor`,`text`),monitor_group:m(e[`monitor-group`],`monitor-group`,`text`),name:m(e.name,`name`,`text`),notification_email:m(e[`notification-email`],`notification-email`,`text`),notification_filter:{origin:{disable:e[`notification-filter-origin-disable`],healthy:e[`notification-filter-origin-healthy`]},pool:{disable:e[`notification-filter-pool-disable`],healthy:e[`notification-filter-pool-healthy`]}},origin_steering:{policy:e[`origin-steering-policy`]},origins:u(e.origins,`origins`)}):d(e.body)});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),n=await c(`Updating`,async()=>i.send(X,{body:t,account_id:l,pool_id:e[`pool-id`]}));o(n,{successLabel:`Updated`});return}let f=p({check_regions:e[`check-regions`],description:m(e.description,`description`,`text`),enabled:e.enabled,health_sources:e[`health-sources`],latitude:e.latitude,load_shedding:{default_percent:e[`load-shedding-default-percent`],default_policy:e[`load-shedding-default-policy`],session_percent:e[`load-shedding-session-percent`],session_policy:e[`load-shedding-session-policy`]},longitude:e.longitude,minimum_origins:e[`minimum-origins`],monitor:m(e.monitor,`monitor`,`text`),monitor_group:m(e[`monitor-group`],`monitor-group`,`text`),name:m(e.name,`name`,`text`),notification_email:m(e[`notification-email`],`notification-email`,`text`),notification_filter:{origin:{disable:e[`notification-filter-origin-disable`],healthy:e[`notification-filter-origin-healthy`]},pool:{disable:e[`notification-filter-pool-disable`],healthy:e[`notification-filter-pool-healthy`]}},origin_steering:{policy:e[`origin-steering-policy`]},origins:u(e.origins,`origins`)}),h=await c(`Updating`,async()=>i.send(X,{body:f,account_id:l,pool_id:e[`pool-id`]}));o(h,{successLabel:`Updated`})})};var Ze={method:`GET`,path:t=>e`/accounts/${t.account_id}/load_balancers/pools/${t.pool_id}`};function Qe(e){return e.usage(`$0 load-balancers pools get <pool-id>
57
53
 
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export{r as createLocalFetch}from"./local-CSH3UMpD.mjs";
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- const e=`This command has no local equivalent. Re-run without --local to use the Cloudflare API.`;let t;async function n(){let e=t;t=void 0,await e?.()}function r(e={}){return async function(n,r){let{dispatchLocal:i,disposeLocalSession:a}=await import(`./local-runtime-DB545Gqq.mjs`);return t=a,i(new Request(n,r),e.persistTo,e.apiBaseUrl)}}const i=`local`;export{n as i,e as n,r,i as t};
2
+ const e=`This command has no local equivalent. Re-run without --local to use the Cloudflare API.`;let t;async function n(){let e=t;t=void 0,await e?.()}function r(e={}){return async function(n,r){let{dispatchLocal:i,disposeLocalSession:a}=await import(`./local-runtime-KOFLRZeZ.mjs`);return t=a,i(new Request(n,r),e.persistTo,e.apiBaseUrl)}}const i=`local`;export{n as i,e as n,r,i as t};
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{n as e}from"./local-B7ZJ78al.mjs";import{i as t}from"./cf-3vj8dGYz.mjs";import{n}from"./registry-D0tMkLv6.mjs";import{mkdtempSync as r,rmSync as i,statSync as a}from"node:fs";import{join as o,resolve as s}from"node:path";import{tmpdir as c}from"node:os";import{randomUUID as l}from"node:crypto";import{Miniflare as u}from"miniflare";const d=/^\/accounts\/[^/]+/;function f(e){let n=e!==void 0&&e!==``?o(s(process.cwd(),e),`v3`):o(t(),`state`,`v3`);try{if(!a(n).isDirectory())throw Error(`Local persistence path must be a directory: ${n}`)}catch(e){let t=e.code;if(t===`ENOENT`)return n;throw t===`ENOTDIR`?Error(`Local persistence path must be a directory: ${n}`):e}return n}let p;function m(e){let t=n(),a=r(o(c(),`cf-local-isolated-${process.pid}-`));try{return{mf:new u({unsafeLocalExplorer:!0,cf:!1,resourcePersistencePath:e,unsafeEnableSharedStorage:!0,isolatedResourcePersistencePath:a,unsafeDevRegistryPath:t,workers:[{config:{name:`cf-local-${l()}`,compatibilityDate:`2026-08-15`,manifest:{mainModule:`cf-local.mjs`,modules:{"cf-local.mjs":{type:`esm`,contents:`export default { fetch() { return new Response(null, { status: 404 }); } };`}}}}}]}),isolatedPersistRoot:a}}catch(e){throw i(a,{recursive:!0,force:!0}),e}}async function h(t,n,r){let i=new URL(t.url),a=new URL(r??`https://api.cloudflare.com/client/v4`).pathname.replace(/\/+$/,``),o=`http://localhost/cdn-cgi/local/explorer/api${i.pathname.slice(a.length).replace(d,``)||`/`}${i.search}`,s=new Headers(t.headers);s.delete(`Authorization`),s.set(`Host`,`localhost`);let c;try{c=p??=m(f(n))}catch(e){return g(500,`Could not start the local runtime: ${_(e)}`)}let l;try{let e={method:t.method,headers:[...s],redirect:`manual`,signal:t.signal};t.body!==null&&(e.body=t.body,e.duplex=`half`),l=await c.mf.dispatchFetch(o,e)}catch(e){return g(500,`The local runtime failed to answer: ${_(e)}`)}if(l.status===404&&l.headers.get(`content-type`)?.includes(`json`)!==!0){await l.body?.cancel();let n=new URL(o).pathname.replace(/^.*\/explorer\/api/,``);return g(404,`${e} The local explorer API does not implement ${t.method} ${n}.`)}return l}function g(e,t){return new Response(JSON.stringify({success:!1,errors:[{message:t}],messages:[],result:null}),{status:e,headers:{"content-type":`application/json`}})}function _(e){return e instanceof Error?e.message:String(e)}async function v(){let e=p;if(p=void 0,e!==void 0)try{let{mf:t,isolatedPersistRoot:n}=e;await t.dispose().finally(()=>i(n,{recursive:!0,force:!0}))}catch{}}export{h as dispatchLocal,v as disposeLocalSession};
2
+ import{n as e}from"./local-CSH3UMpD.mjs";import{i as t}from"./cf-fIBhEAxU.mjs";import{n}from"./registry-Bm-GgDC3.mjs";import{mkdtempSync as r,rmSync as i,statSync as a}from"node:fs";import{join as o,resolve as s}from"node:path";import{tmpdir as c}from"node:os";import{randomUUID as l}from"node:crypto";import{Miniflare as u}from"miniflare";const d=/^\/accounts\/[^/]+/;function f(e){let n=e!==void 0&&e!==``?o(s(process.cwd(),e),`v3`):o(t(),`state`,`v3`);try{if(!a(n).isDirectory())throw Error(`Local persistence path must be a directory: ${n}`)}catch(e){let t=e.code;if(t===`ENOENT`)return n;throw t===`ENOTDIR`?Error(`Local persistence path must be a directory: ${n}`):e}return n}let p;function m(e){let t=n(),a=r(o(c(),`cf-local-isolated-${process.pid}-`));try{return{mf:new u({unsafeLocalExplorer:!0,cf:!1,resourcePersistencePath:e,unsafeEnableSharedStorage:!0,isolatedResourcePersistencePath:a,unsafeDevRegistryPath:t,workers:[{config:{name:`cf-local-${l()}`,compatibilityDate:`2026-08-15`,manifest:{mainModule:`cf-local.mjs`,modules:{"cf-local.mjs":{type:`esm`,contents:`export default { fetch() { return new Response(null, { status: 404 }); } };`}}}}}]}),isolatedPersistRoot:a}}catch(e){throw i(a,{recursive:!0,force:!0}),e}}async function h(t,n,r){let i=new URL(t.url),a=new URL(r??`https://api.cloudflare.com/client/v4`).pathname.replace(/\/+$/,``),o=`http://localhost/cdn-cgi/local/explorer/api${i.pathname.slice(a.length).replace(d,``)||`/`}${i.search}`,s=new Headers(t.headers);s.delete(`Authorization`),s.set(`Host`,`localhost`);let c;try{c=p??=m(f(n))}catch(e){return g(500,`Could not start the local runtime: ${_(e)}`)}let l;try{let e={method:t.method,headers:[...s],redirect:`manual`,signal:t.signal};t.body!==null&&(e.body=t.body,e.duplex=`half`),l=await c.mf.dispatchFetch(o,e)}catch(e){return g(500,`The local runtime failed to answer: ${_(e)}`)}if(l.status===404&&l.headers.get(`content-type`)?.includes(`json`)!==!0){await l.body?.cancel();let n=new URL(o).pathname.replace(/^.*\/explorer\/api/,``);return g(404,`${e} The local explorer API does not implement ${t.method} ${n}.`)}return l}function g(e,t){return new Response(JSON.stringify({success:!1,errors:[{message:t}],messages:[],result:null}),{status:e,headers:{"content-type":`application/json`}})}function _(e){return e instanceof Error?e.message:String(e)}async function v(){let e=p;if(p=void 0,e!==void 0)try{let{mf:t,isolatedPersistRoot:n}=e;await t.dispose().finally(()=>i(n,{recursive:!0,force:!0}))}catch{}}export{h as dispatchLocal,v as disposeLocalSession};
@@ -0,0 +1,66 @@
1
+ #!/usr/bin/env node
2
+ import{r as e}from"./theme-BGHWSKCw.mjs";import{t}from"./args-BAOHroBC.mjs";import{t as n}from"./src-COwxoocl.mjs";import"node:fs";import"node:path";import r,{stdin as i,stdout as a}from"node:process";import{ReadStream as o}from"node:tty";import{styleText as s}from"node:util";import c,*as l from"node:readline";const u=(()=>{let e=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;return t=>{let n=0;for(e.lastIndex=0;e.test(t);)n+=1;return t.length-n}})(),d=e=>e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510,f=e=>e===8987||e===9001||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12771||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=19903||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e>=131072&&e<=196605||e>=196608&&e<=262141,p=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]|\u001b\]8;[^;]*;.*?(?:\u0007|\u001b\u005c)/y,m=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,h=/(?:(?![\uFF61-\uFF9F\uFF00-\uFFEF])[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\p{Script=Tangut}]){1,1000}/uy,g=/\t{1,1000}/y,_=/[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/uy,v=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,y=/\p{M}+/gu,b={limit:1/0,ellipsis:``},x=(e,t={},n={})=>{let r=t.limit??1/0,i=t.ellipsis??``,a=t?.ellipsisWidth??(i?x(i,b,n).width:0),o=n.controlWidth??0,s=n.tabWidth??8,c=n.emojiWidth??2,l=n.regularWidth??1,S=n.wideWidth??2,C=[[v,l],[p,0],[m,o],[g,s],[_,c],[h,S]],w=0,T=0,E=e.length,D=0,O=!1,k=E,A=Math.max(0,r-a),j=0,M=0,N=0,P=0;outer:for(;;){if(M>j||T>=E&&T>w){let t=e.slice(j,M)||e.slice(w,T);D=0;for(let e of t.replaceAll(y,``)){let t=e.codePointAt(0)||0;if(P=d(t)?2:f(t)?S:l,N+P>A&&(k=Math.min(k,Math.max(j,w)+D)),N+P>r){O=!0;break outer}D+=e.length,N+=P}j=M=0}if(T>=E)break outer;for(let t=0,n=C.length;t<n;t++){let[n,i]=C[t];if(n.lastIndex=T,n.test(e)){if(D=n===h?u(e.slice(T,n.lastIndex)):n===_?1:n.lastIndex-T,P=D*i,N+P>A&&(k=Math.min(k,T+Math.floor((A-N)/i))),N+P>r){O=!0;break outer}N+=P,j=w,M=T,T=w=n.lastIndex;continue outer}}T+=1}return{width:O?A:N,index:O?k:E,truncated:O,ellipsed:O&&r>=a}},S={limit:1/0,ellipsis:``,ellipsisWidth:0},C=(e,t={})=>x(e,S,t).width,w=`]8;;`,T=RegExp(`(?:\\[(?<code>\\d+)m|\\${w}(?<uri>.*))`,`y`),E=e=>{if(e>=30&&e<=37||e>=90&&e<=97)return 39;if(e>=40&&e<=47||e>=100&&e<=107)return 49;if(e===1||e===2)return 22;if(e===3)return 23;if(e===4)return 24;if(e===7)return 27;if(e===8)return 28;if(e===9)return 29;if(e===0)return 0},D=e=>`[${e}m`,O=e=>`${w}${e}`,k=(e,t,n)=>{let r=t[Symbol.iterator](),i=!1,a=!1,o=e.at(-1),s=o===void 0?0:C(o),c=r.next(),l=r.next(),u=0;for(;!c.done;){let o=c.value,d=C(o);s+d<=n?e[e.length-1]+=o:(e.push(o),s=0),(o===`\x1B`||o===`›`)&&(i=!0,a=t.startsWith(w,u+1)),i?a?o===`\x07`&&(i=!1,a=!1):o===`m`&&(i=!1):(s+=d,s===n&&!l.done&&(e.push(``),s=0)),c=l,l=r.next(),u+=o.length}o=e.at(-1),!s&&o!==void 0&&o.length&&e.length>1&&(e[e.length-2]+=e.pop())},A=e=>{let t=e.split(` `),n=t.length;for(;n&&!C(t[n-1]);)n--;return n===t.length?e:t.slice(0,n).join(` `)+t.slice(n).join(``)},j=(e,t,n={})=>{if(n.trim!==!1&&e.trim()===``)return``;let r=``,i,a,o=e.split(` `),s=[``],c=0;for(let e=0;e<o.length;e++){let r=o[e];if(n.trim!==!1){let e=s.at(-1)??``,t=e.trimStart();e.length!==t.length&&(s[s.length-1]=t,c=C(t))}e!==0&&(c>=t&&(n.wordWrap===!1||n.trim===!1)&&(s.push(``),c=0),(c||n.trim===!1)&&(s[s.length-1]+=` `,c++));let i=C(r);if(n.hard&&i>t){let e=t-c,n=1+Math.floor((i-e-1)/t);Math.floor((i-1)/t)<n&&s.push(``),k(s,r,t),c=C(s.at(-1)??``)}else{if(c+i>t&&c&&i){if(n.wordWrap===!1&&c<t){k(s,r,t),c=C(s.at(-1)??``);continue}s.push(``),c=0}c+i>t&&n.wordWrap===!1?(k(s,r,t),c=C(s.at(-1)??``)):(s[s.length-1]+=r,c+=i)}}n.trim!==!1&&(s=s.map(e=>A(e)));let l=s.join(`
3
+ `),u=!1;for(let e=0;e<l.length;e++){let t=l[e];if(r+=t,u)u=!1;else if(u=t>=`\ud800`&&t<=`\udbff`,u)continue;if(t===`\x1B`||t===`›`){T.lastIndex=e+1;let t=T.exec(l)?.groups;if(t?.code!==void 0){let e=Number.parseFloat(t.code);i=e===39?void 0:e}else t?.uri!==void 0&&(a=t.uri.length===0?void 0:t.uri)}if(l[e+1]===`
4
+ `){a&&(r+=O(``));let e=i?E(i):void 0;i&&e&&(r+=D(e))}else t===`
5
+ `&&(i&&E(i)&&(r+=D(i)),a&&(r+=O(a)))}return r},M=/\r?\n/;function N(e,t,n){return String(e).normalize().split(M).map(e=>j(e,t,n)).join(`
6
+ `)}var P=n();function F(e,t,n){if(!n.some(e=>!e.disabled))return e;let r=e+t,i=Math.max(n.length-1,0),a=r<0?i:r>i?0:r;return n[a]?.disabled?F(a,t<0?-1:1,n):a}const I={actions:/* @__PURE__ */ new Set([`up`,`down`,`left`,`right`,`space`,`enter`,`cancel`]),aliases:/* @__PURE__ */ new Map([[`k`,`up`],[`j`,`down`],[`h`,`left`],[`l`,`right`],[``,`cancel`],[`escape`,`cancel`]]),messages:{cancel:`Canceled`,error:`Something went wrong`},withGuide:!0,accessible:void 0,date:{monthNames:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],messages:{required:`Please enter a valid date`,invalidMonth:`There are only 12 months in a year`,invalidDay:(e,t)=>`There are only ${e} days in ${t}`,afterMin:e=>`Date must be on or after ${e.toISOString().slice(0,10)}`,beforeMax:e=>`Date must be on or before ${e.toISOString().slice(0,10)}`}}};function ee(e){if(e!==void 0)return e;if(I.accessible!==void 0)return I.accessible;let t=process.env.ACCESSIBLE;return t!==void 0&&t!==``&&t!==`0`&&t!==`false`}function L(e,t){if(typeof e==`string`)return I.aliases.get(e)===t;for(let n of e)if(n!==void 0&&L(n,t))return!0;return!1}function te(e,t){if(e===t)return;let n=e.split(`
7
+ `),r=t.split(`
8
+ `),i=Math.max(n.length,r.length),a=[];for(let e=0;e<i;e++)n[e]!==r[e]&&a.push(e);return{lines:a,numLinesBefore:n.length,numLinesAfter:r.length,numLines:i}}const ne=globalThis.process.platform.startsWith(`win`),R=Symbol(`clack:cancel`);function re(e){return e===R}function z(e,t){let n=e;n.isTTY&&n.setRawMode(t)}function ie({input:e=i,output:t=a,overwrite:n=!0,hideCursor:r=!0}={}){let s=l.createInterface({input:e,output:t,prompt:``,tabSize:1});l.emitKeypressEvents(e,s),e instanceof o&&e.isTTY&&e.setRawMode(!0);let c=(i,{name:a,sequence:o})=>{if(L([String(i),a,o],`cancel`)){r&&t.write(P.cursor.show),process.exit(0);return}if(!n)return;let s=a===`return`?0:-1,u=a===`return`?-1:0;l.moveCursor(t,s,u,()=>{l.clearLine(t,1,()=>{e.once(`keypress`,c)})})};return r&&t.write(P.cursor.hide),e.once(`keypress`,c),()=>{e.off(`keypress`,c),r&&t.write(P.cursor.show),e instanceof o&&e.isTTY&&!ne&&e.setRawMode(!1),s.terminal=!1,s.close()}}const B=e=>`columns`in e&&typeof e.columns==`number`?e.columns:80,ae=e=>`rows`in e&&typeof e.rows==`number`?e.rows:20;function V(e,t,n,r=n,i=n,o){return N(t,B(e??a)-n.length,{hard:!0,trim:!1}).split(`
9
+ `).map((e,t,a)=>{let s=o?o(e,t):e;return t===0?`${r}${s}`:t===a.length-1?`${i}${s}`:`${n}${s}`}).join(`
10
+ `)}function oe(e,t){if(`~standard`in e){let n=e[`~standard`].validate(t);return n instanceof Promise?n.then(e=>e.issues?.at(0)?.message):n.issues?.at(0)?.message}return e(t)}var H=class{input;output;_abortSignal;rl;opts;_render;_track=!1;_prevFrame=``;_subscribers=/* @__PURE__ */ new Map;_cursor=0;state=`initial`;error=``;value;userInput=``;get accessible(){return ee(this.opts.accessible)}constructor(e,t=!0){let{input:n=i,output:r=a,render:o,signal:s,...c}=e;this.opts=c,this.onKeypress=this.onKeypress.bind(this),this.close=this.close.bind(this),this.render=this.render.bind(this),this._render=o.bind(this),this._track=t,this._abortSignal=s,this.input=n,this.output=r}unsubscribe(){this._subscribers.clear()}setSubscriber(e,t){let n=this._subscribers.get(e)??[];n.push(t),this._subscribers.set(e,n)}on(e,t){this.setSubscriber(e,{cb:t})}once(e,t){this.setSubscriber(e,{cb:t,once:!0})}emit(e,...t){let n=this._subscribers.get(e)??[],r=[];for(let e of n)e.cb(...t),e.once&&r.push(()=>n.splice(n.indexOf(e),1));for(let e of r)e()}prompt(){return new Promise(e=>{if(this._abortSignal){if(this._abortSignal.aborted)return this.state=`cancel`,this.close(),e(R);this._abortSignal.addEventListener(`abort`,()=>{this.state=`cancel`,this.close()},{once:!0})}this.rl=c.createInterface({input:this.input,tabSize:2,prompt:``,escapeCodeTimeout:50,terminal:!0}),this.rl.prompt(),this.opts.initialUserInput!==void 0&&this._setUserInput(this.opts.initialUserInput,!0),this.input.on(`keypress`,this.onKeypress),z(this.input,!0),this.output.on(`resize`,this.render),this.render(),this.once(`submit`,()=>{this.output.write(P.cursor.show),this.output.off(`resize`,this.render),z(this.input,!1),e(this.value)}),this.once(`cancel`,()=>{this.output.write(P.cursor.show),this.output.off(`resize`,this.render),z(this.input,!1),e(R)})})}_isActionKey(e,t){return e===` `}_shouldSubmit(e,t){return!0}_setValue(e){this.value=e,this.emit(`value`,this.value)}_setUserInput(e,t){this.userInput=e??``,this.emit(`userInput`,this.userInput),t&&this._track&&this.rl&&(this.rl.write(this.userInput),this._cursor=this.rl.cursor)}_clearUserInput(){this.rl?.write(null,{ctrl:!0,name:`u`}),this._setUserInput(``)}async onKeypress(e,t){if(this.state!==`validating`){if(this._track&&t.name!==`return`&&(t.name&&this._isActionKey(e,t)&&this.rl?.write(null,{ctrl:!0,name:`h`}),this._cursor=this.rl?.cursor??0,this._setUserInput(this.rl?.line)),this.state===`error`&&(this.state=`active`),t?.name&&(!this._track&&I.aliases.has(t.name)&&this.emit(`cursor`,I.aliases.get(t.name)),I.actions.has(t.name)&&this.emit(`cursor`,t.name)),e&&(e.toLowerCase()===`y`||e.toLowerCase()===`n`)&&this.emit(`confirm`,e.toLowerCase()===`y`),this.emit(`key`,e,t),t?.name===`return`&&this._shouldSubmit(e,t)){if(this.opts.validate){let e=oe(this.opts.validate,this.value),t;e instanceof Promise?(this.state=`validating`,this.render(),t=await e):t=e,t&&(this.error=t instanceof Error?t.message:t,this.state=`error`,this.rl?.write(this.userInput))}this.state!==`error`&&(this.state=`submit`)}L([e,t?.name,t?.sequence],`cancel`)&&(this.state=`cancel`),(this.state===`submit`||this.state===`cancel`)&&this.emit(`finalize`),this.render(),(this.state===`submit`||this.state===`cancel`)&&this.close()}}close(){this.input.unpipe(),this.input.removeListener(`keypress`,this.onKeypress),this.output.write(`
11
+ `),z(this.input,!1),this.rl?.close(),this.rl=void 0,this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){let e=N(this._prevFrame,process.stdout.columns,{hard:!0,trim:!1}).split(`
12
+ `).length-1;this.output.write(P.cursor.move(-999,e*-1))}render(){let e=N(this._render(this)??``,process.stdout.columns,{hard:!0,trim:!1});if(e!==this._prevFrame){if(this.state===`initial`)this.output.write(P.cursor.hide);else{let t=te(this._prevFrame,e),n=ae(this.output);if(this.restoreCursor(),t){let r=Math.max(0,t.numLinesAfter-n),i=Math.max(0,t.numLinesBefore-n),a=t.lines.find(e=>e>=r);if(a===void 0){this._prevFrame=e;return}if(t.lines.length===1){this.output.write(P.cursor.move(0,a-i)),this.output.write(P.erase.lines(1));let t=e.split(`
13
+ `);this.output.write(t[a]),this._prevFrame=e,this.output.write(P.cursor.move(0,t.length-a-1));return}if(t.lines.length>1){if(r<i)a=r;else{let e=a-i;e>0&&this.output.write(P.cursor.move(0,e))}this.output.write(P.erase.down());let t=e.split(`
14
+ `).slice(a);this.output.write(t.join(`
15
+ `)),this._prevFrame=e;return}}this.output.write(P.erase.down())}this.output.write(e),this.state===`initial`&&(this.state=`active`),this._prevFrame=e}}},se=class extends H{get cursor(){return+!this.value}get _value(){return this.cursor===0}constructor(e){super(e,!1),this.value=!!e.initialValue,this.on(`userInput`,()=>{this.value=this._value}),this.on(`confirm`,e=>{this.output.write(P.cursor.move(0,-1)),this.value=e,this.state=`submit`,this.close()}),this.on(`cursor`,()=>{this.value=!this.value})}};let ce=class extends H{_mask=`•`;get cursor(){return this._cursor}get masked(){return this.userInput.replaceAll(/./g,this._mask)}get userInputWithCursor(){if(this.state===`submit`||this.state===`cancel`)return this.masked;let e=this.userInput;if(this.cursor>=e.length)return`${this.masked}${s([`inverse`,`hidden`],`_`)}`;let t=this.masked,n=t.slice(0,this.cursor),r=t.slice(this.cursor,this.cursor+1),i=t.slice(this.cursor+1);return`${n}${s(`inverse`,r)}${i}`}clear(){this._clearUserInput()}constructor({mask:e,...t}){super(t),this._mask=e??`•`,this.on(`userInput`,e=>{this._setValue(e)}),this.on(`finalize`,()=>{this.value===void 0&&(this.value=``)})}},le=class extends H{options;cursor=0;get _selectedValue(){return this.options[this.cursor]}changeValue(){let e=this._selectedValue;this.value=e===void 0?void 0:e.value}constructor(e){super(e,!1),this.options=e.options;let t=this.options.findIndex(({value:t})=>t===e.initialValue),n=t===-1?0:t;this.cursor=this.options[n]?.disabled?F(n,1,this.options):n,this.changeValue(),this.on(`cursor`,e=>{switch(e){case`left`:case`up`:this.cursor=F(this.cursor,-1,this.options);break;case`down`:case`right`:this.cursor=F(this.cursor,1,this.options)}this.changeValue()})}};var ue=class extends H{get userInputWithCursor(){if(this.state===`submit`)return this.userInput;let e=this.userInput;if(this.cursor>=e.length)return`${this.userInput}\u2588`;let t=e.slice(0,this.cursor),n=e.slice(this.cursor,this.cursor+1),r=e.slice(this.cursor+1);return`${t}${s(`inverse`,n)}${r}`}get cursor(){return this._cursor}constructor(e){super({...e,initialUserInput:e.initialUserInput??e.initialValue}),this.on(`userInput`,e=>{this._setValue(e)}),this.on(`finalize`,()=>{this.value||=e.defaultValue,this.value===void 0&&(this.value=``)})}};function de(){return r.platform===`win32`?!!r.env.CI||!!r.env.WT_SESSION||!!r.env.TERMINUS_SUBLIME||r.env.ConEmuTask===`{cmd::Cmder}`||r.env.TERM_PROGRAM===`Terminus-Sublime`||r.env.TERM_PROGRAM===`vscode`||r.env.TERM===`xterm-256color`||r.env.TERM===`alacritty`||r.env.TERMINAL_EMULATOR===`JetBrains-JediTerm`:r.env.TERM!==`linux`}const U=de(),fe=()=>process.env.CI===`true`,W=(e,t)=>U?e:t,pe=W(`◆`,`*`),me=W(`■`,`x`),he=W(`▲`,`x`),G=W(`◇`,`o`),K=W(`│`,`|`),q=W(`└`,`—`),J=W(`●`,`>`),Y=W(`○`,` `),ge=W(`▪`,`•`),_e=W(`●`,`•`),ve=W(`◆`,`*`),ye=W(`▲`,`!`),be=W(`■`,`x`),X=e=>{switch(e){case`initial`:case`active`:return s(`cyan`,pe);case`cancel`:return s(`red`,me);case`error`:return s(`yellow`,he);case`submit`:return s(`green`,G);case`validating`:return s(`dim`,pe)}},xe=e=>{switch(e){case`initial`:case`active`:return s(`cyan`,K);case`cancel`:return s(`red`,K);case`error`:return s(`yellow`,K);case`submit`:return s(`green`,K)}};function Se(e,t){let n=[`${t?`${s(`cyan`,K)} `:``}${e.join(` • `)}`];return t&&n.push(s(`cyan`,q)),n}const Ce=(e,t,n,r,i,a=!1)=>{let o=t,s=0;if(a)for(let t=r-1;t>=n;t--){let n=e[t];if(n&&(o-=n.length),s++,o<=i)break}else for(let t=n;t<r;t++){let n=e[t];if(n&&(o-=n.length),s++,o<=i)break}return{lineCount:o,removals:s}},we=({cursor:e,options:t,style:n,output:r=process.stdout,maxItems:i=1/0,columnPadding:a=0,rowPadding:o=4})=>{let c=B(r)-a,l=ae(r),u=s(`dim`,`...`),d=Math.max(l-o,0),f=Math.max(Math.min(i,d),5),p=0;e>=f-3&&(p=Math.max(Math.min(e-f+3,t.length-f),0));let m=f<t.length&&p>0,h=f<t.length&&p+f<t.length,g=Math.min(p+f,t.length),_=[],v=0;m&&v++,h&&v++;let y=p+ +!!m,b=g-+!!h;for(let r=y;r<b;r++){let i=t[r],a=N(i?n(i,r===e):``,c,{hard:!0,trim:!1}).split(`
16
+ `);_.push(a),v+=a.length}if(v>d){let t=0,n=0,r=v,i=e-y,a=d,o=()=>Ce(_,r,0,i,a),s=()=>Ce(_,r,i+1,_.length,a,!0);m?({lineCount:r,removals:t}=o(),r>a&&(h||--a,{lineCount:r,removals:n}=s())):(h||--a,{lineCount:r,removals:n}=s(),r>a&&(--a,{lineCount:r,removals:t}=o())),t>0&&(m=!0,_.splice(0,t)),n>0&&(h=!0,_.splice(_.length-n,n))}let x=[];m&&x.push(u);for(let e of _)for(let t of e)x.push(t);return h&&x.push(u),x},Te=e=>{let t=e.active??`Yes`,n=e.inactive??`No`;return new se({active:t,inactive:n,signal:e.signal,input:e.input,output:e.output,initialValue:e.initialValue??!0,render(){let r=e.withGuide??I.withGuide,i=`${X(this.state)} `,a=r?`${s(`gray`,K)} `:``,o=V(e.output,e.message,a,i),c=`${r?`${s(`gray`,K)}
17
+ `:``}${o}
18
+ `,l=this.value?t:n;switch(this.state){case`submit`:return`${c}${r?`${s(`gray`,K)} `:``}${s(`dim`,l)}`;case`cancel`:return`${c}${r?`${s(`gray`,K)} `:``}${s([`strikethrough`,`dim`],l)}${r?`
19
+ ${s(`gray`,K)}`:``}`;default:{let i=r?`${s(`cyan`,K)} `:``,a=r?s(`cyan`,q):``;return`${c}${i}${this.value?`${s(`green`,J)} ${t}`:`${s(`dim`,Y)} ${s(`dim`,t)}`}${e.vertical?r?`
20
+ ${s(`cyan`,K)} `:`
21
+ `:` ${s(`dim`,`/`)} `}${this.value?`${s(`dim`,Y)} ${s(`dim`,n)}`:`${s(`green`,J)} ${n}`}
22
+ ${a}
23
+ `}}}}).prompt()};`${s(`dim`,`↑/↓`)}`,`${s(`dim`,`Space:`)}`,`${s(`dim`,`Enter:`)}`;const Z={message:(e=[],{symbol:t=s(`gray`,K),secondarySymbol:n=s(`gray`,K),output:r=process.stdout,spacing:i=1,withGuide:a}={})=>{let o=[],c=a??I.withGuide,l=c?n:``,u=c?`${t} `:``,d=c?`${n} `:``;for(let e=0;e<i;e++)o.push(l);let f=Array.isArray(e)?e:e.split(`
24
+ `);if(f.length>0){let[e,...r]=f;e.length>0?o.push(`${u}${e}`):o.push(c?t:``);for(let e of r)e.length>0?o.push(`${d}${e}`):o.push(c?n:``)}r.write(`${o.join(`
25
+ `)}
26
+ `)},info:(e,t)=>{Z.message(e,{...t,symbol:s(`blue`,_e)})},success:(e,t)=>{Z.message(e,{...t,symbol:s(`green`,ve)})},step:(e,t)=>{Z.message(e,{...t,symbol:s(`green`,G)})},warn:(e,t)=>{Z.message(e,{...t,symbol:s(`yellow`,ye)})},warning:(e,t)=>{Z.warn(e,t)},error:(e,t)=>{Z.message(e,{...t,symbol:s(`red`,be)})}},Ee=(e=``,t)=>{let n=t?.output??process.stdout,r=t?.withGuide??I.withGuide?`${s(`gray`,q)} `:``;n.write(`${r}${s(`red`,e)}
27
+
28
+ `)},De=(e=``,t)=>{let n=t?.output??process.stdout,r=t?.withGuide??I.withGuide?`${s(`gray`,K)}
29
+ ${s(`gray`,q)} `:``;n.write(`${r}${e}
30
+
31
+ `)},Oe=e=>new ce({validate:e.validate,mask:e.mask??ge,signal:e.signal,input:e.input,output:e.output,render(){let t=e.withGuide??I.withGuide,n=`${t?`${s(`gray`,K)}
32
+ `:``}${X(this.state)} ${e.message}
33
+ `,r=this.userInputWithCursor,i=this.masked;switch(this.state){case`error`:{let r=t?`${s(`yellow`,K)} `:``,a=t?`${s(`yellow`,q)} `:``,o=i??``;return e.clearOnError&&this.clear(),`${n.trim()}
34
+ ${r}${o}
35
+ ${a}${s(`yellow`,this.error)}
36
+ `}case`submit`:return`${n}${t?`${s(`gray`,K)} `:``}${i?s(`dim`,i):``}`;case`cancel`:return`${n}${t?`${s(`gray`,K)} `:``}${i?s([`strikethrough`,`dim`],i):``}${i&&t?`
37
+ ${s(`gray`,K)}`:``}`;default:return`${n}${t?`${s(`cyan`,K)} `:``}${r}
38
+ ${t?s(`cyan`,q):``}
39
+ `}}}).prompt(),ke=e=>s(`magenta`,e),Ae=({indicator:e=`dots`,onCancel:t,output:n=process.stdout,cancelMessage:r,errorMessage:i,frames:a=U?[`◒`,`◐`,`◓`,`◑`]:[`•`,`o`,`O`,`0`],delay:o=U?80:120,signal:c,...l}={})=>{let u=fe(),d,f,p=!1,m=!1,h=``,g,_=performance.now(),v=B(n),y=l?.styleFrame??ke,b=e=>{let n=e>1?i??I.messages.error:r??I.messages.cancel;m=e===1,p&&(A(n,e),m&&typeof t==`function`&&t())},x=()=>b(2),S=()=>b(1),C=()=>{process.on(`uncaughtExceptionMonitor`,x),process.on(`unhandledRejection`,x),process.on(`SIGINT`,S),process.on(`SIGTERM`,S),process.on(`exit`,b),c&&c.addEventListener(`abort`,S)},w=()=>{process.removeListener(`uncaughtExceptionMonitor`,x),process.removeListener(`unhandledRejection`,x),process.removeListener(`SIGINT`,S),process.removeListener(`SIGTERM`,S),process.removeListener(`exit`,b),c&&c.removeEventListener(`abort`,S)},T=()=>{if(g===void 0)return;u&&n.write(`
40
+ `);let e=N(g,v,{hard:!0,trim:!1}).split(`
41
+ `);e.length>1&&n.write(P.cursor.up(e.length-1)),n.write(P.cursor.to(0)),n.write(P.erase.down())},E=e=>e.replace(/\.+$/,``),D=e=>{let t=(performance.now()-e)/1e3,n=Math.floor(t/60),r=Math.floor(t%60);return n>0?`[${n}m ${r}s]`:`[${r}s]`},O=l.withGuide??I.withGuide,k=(t=``)=>{p=!0,d=ie({output:n}),h=E(t),_=performance.now(),O&&n.write(`${s(`gray`,K)}
42
+ `);let r=0,i=0;C(),f=setInterval(()=>{if(u&&h===g)return;T(),g=h;let t=y(a[r]),o;if(u)o=`${t} ${h}...`;else if(e===`timer`)o=`${t} ${h} ${D(_)}`;else{let e=`.`.repeat(Math.floor(i)).slice(0,3);o=`${t} ${h}${e}`}let s=N(o,v,{hard:!0,trim:!1});n.write(s),r=r+1<a.length?r+1:0,i=i<4?i+.125:0},o)},A=(t=``,r=0,i=!1)=>{if(!p)return;p=!1,clearInterval(f),T();let a=r===0?s(`green`,G):r===1?s(`red`,me):s(`red`,he);h=t??h,i||(e===`timer`?n.write(`${a} ${h} ${D(_)}
43
+ `):n.write(`${a} ${h}
44
+ `)),w(),d()};return{start:k,stop:(e=``)=>A(e,0),message:(e=``)=>{h=E(e??h)},cancel:(e=``)=>A(e,1),error:(e=``)=>A(e,2),clear:()=>A(``,0,!0),get isCancelled(){return m}}},je=[`${s(`dim`,`↑/↓`)} to navigate`,`${s(`dim`,`Enter:`)} confirm`],Q=(e,t)=>e.includes(`
45
+ `)?e.split(`
46
+ `).map(e=>t(e)).join(`
47
+ `):t(e),Me=e=>{let t=(e,t)=>{if(e===void 0)return``;let n=e.label??String(e.value);switch(t){case`disabled`:return`${s(`gray`,Y)} ${Q(n,e=>s(`gray`,e))}${e.hint?` ${s(`dim`,`(${e.hint??`disabled`})`)}`:``}`;case`selected`:return`${Q(n,e=>s(`dim`,e))}`;case`active`:return`${s(`green`,J)} ${n}${e.hint?` ${s(`dim`,`(${e.hint})`)}`:``}`;case`cancelled`:return`${Q(n,e=>s([`strikethrough`,`dim`],e))}`;default:return`${s(`dim`,Y)} ${Q(n,e=>s(`dim`,e))}`}},n=e.showInstructions??!0;return new le({options:e.options,signal:e.signal,input:e.input,output:e.output,initialValue:e.initialValue,render(){let r=e.withGuide??I.withGuide,i=`${X(this.state)} `,a=`${xe(this.state)} `,o=V(e.output,e.message,a,i),c=`${r?`${s(`gray`,K)}
48
+ `:``}${o}
49
+ `;switch(this.state){case`submit`:{let n=r?`${s(`gray`,K)} `:``;return`${c}${V(e.output,t(this.options[this.cursor],`selected`),n)}`}case`cancel`:{let n=r?`${s(`gray`,K)} `:``;return`${c}${V(e.output,t(this.options[this.cursor],`cancelled`),n)}${r?`
50
+ ${s(`gray`,K)}`:``}`}default:{let i=r?`${s(`cyan`,K)} `:``,a=c.split(`
51
+ `).length,o=n?Se(je,r):r?[s(`cyan`,q)]:[],l=o.join(`
52
+ `),u=o.length+1;return`${c}${i}${we({output:e.output,cursor:this.cursor,options:this.options,maxItems:e.maxItems,columnPadding:i.length,rowPadding:a+u,style:(e,n)=>t(e,e.disabled?`disabled`:n?`active`:`inactive`)}).join(`
53
+ ${i}`)}
54
+ ${l}
55
+ `}}}}).prompt()};`${s(`gray`,K)}`;const Ne=e=>new ue({validate:e.validate,placeholder:e.placeholder,defaultValue:e.defaultValue,initialValue:e.initialValue,output:e.output,signal:e.signal,input:e.input,render(){let t=e?.withGuide??I.withGuide,n=`${`${t?`${s(`gray`,K)}
56
+ `:``}${X(this.state)} `}${e.message}
57
+ `,r=e.placeholder&&e.placeholder.length>0?s(`inverse`,e.placeholder[0])+s(`dim`,e.placeholder.slice(1)):s([`inverse`,`hidden`],`_`),i=this.userInput?this.userInputWithCursor:r,a=this.value??``;switch(this.state){case`validating`:{let e=t?`${s(`cyan`,K)} `:``,r=t?s(`cyan`,q):``;return`${n}${e}${s(`dim`,i)}
58
+ ${r} ${s(`dim`,`Validating...`)}
59
+ `}case`error`:{let e=this.error?` ${s(`yellow`,this.error)}`:``,r=t?`${s(`yellow`,K)} `:``,a=t?s(`yellow`,q):``;return`${n.trim()}
60
+ ${r}${i}
61
+ ${a}${e}
62
+ `}case`submit`:{let e=a?`${t?` `:``}${s(`dim`,a)}`:``;return`${n}${t?s(`gray`,K):``}${e}`}case`cancel`:{let e=a?` ${s([`strikethrough`,`dim`],a)}`:``,r=t?s(`gray`,K):``;return`${n}${r}${e}${a.trim()?`
63
+ ${r}`:``}`}default:return`${n}${t?`${s(`cyan`,K)} `:``}${i}
64
+ ${t?s(`cyan`,q):``}
65
+ `}}}).prompt();function $(e){return{output:process.stderr,spacing:0,...e}}const Pe={info:(e,...n)=>{t()||(Z.info(e,$()),Fe(n))},warn:(e,...t)=>{Z.warn(e,$()),Fe(t)},success:e=>Z.success(e,$()),error:e=>Z.error(e,$()),message:e=>Z.message(e,$()),section:t=>Z.message(e.bold(t),$({symbol:e.muted(`├`)})),end:e=>De(e,{output:process.stderr})};function Fe(t){if(t.length===0)return;let n=` `.repeat(3);process.stderr.write(`\n${t.map(t=>n+e.code(t)).join(`
66
+ `)}\n\n`)}export{Oe as a,Ne as c,Z as i,re as l,Ee as n,Me as o,Te as r,Ae as s,Pe as t,V as u};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export{t as log}from"./log-BWdaOGOW.mjs";
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{r as e}from"./theme-BGHWSKCw.mjs";import"./ui-Bo6DCvbS.mjs";import{t}from"./log-BWdaOGOW.mjs";import{n}from"./run-DnZGQbq_.mjs";import"./telemetry-CvZean4s.mjs";import{n as r,t as i}from"./login-Buhvx6Fi.mjs";const a={...i,describe:!1,handler:async n=>{n.quiet||t.info(`${e.code(`cf login`)} is an alias for ${e.code(`cf auth login`)}. Authentication commands are under ${e.code(`cf auth`)}.`),await i.handler(n)}};var o=n(a,{command:`login`,classification:r});export{o as default};
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env node
2
+ import{r as e}from"./theme-BGHWSKCw.mjs";import{c as t,g as n}from"./chunk-XVBBSNW2-DfMyGS-l.mjs";import"./ui-Bo6DCvbS.mjs";import{t as r}from"./log-BWdaOGOW.mjs";import{c as i,d as a,f as o,g as s,h as c,i as l,o as u,r as d,s as f,u as p}from"./oauth-D_A8AcIS.mjs";import{n as m,t as h}from"./output-BJEgbI0G.mjs";import g from"node:path";function _(e,t,n){if(!e.profile)return;let r=n?` ${n}`:``;throw Error(`The --profile flag cannot be used with \`cf auth ${t}\`.${r}`)}function v(){if(t({allowGlobalAuthKey:!1})!==void 0)throw Error(`Cannot manage auth profiles while CLOUDFLARE_API_TOKEN is set. Unset CLOUDFLARE_API_TOKEN and try again.`)}const y={command:`create <name>`,describe:`Create or re-authenticate a named auth profile`,builder:e=>e.positional(`name`,{type:`string`,description:`Name for the auth profile`,demandOption:!0}).option(`browser`,{type:`boolean`,description:`Open the authorization link in a browser (use --no-browser to print it instead)`,default:!0}).option(`device`,{type:`boolean`,description:`Use OAuth device authorization (use --no-device for the localhost callback flow)`,default:!0}).option(`scopes`,{type:`string`,array:!0,description:`The set of OAuth scopes to request`}),handler:async e=>{_(e,`create`,"Pass the profile name as the command argument: `cf auth create <name>`."),v(),n(e.name);let t=u().configs.exists(e.name);await p({browser:e.browser,device:e.device,scopes:e.scopes,profile:e.name}),m(t?`Profile "${e.name}" re-authenticated.`:`Profile "${e.name}" created.`),r.info(`To use this profile in a directory, run:`,`cf auth activate ${e.name}`)}},b={command:`delete <name>`,describe:`Delete a named auth profile`,builder:e=>e.positional(`name`,{type:`string`,description:`Name of the auth profile to delete`,demandOption:!0}),handler:async t=>{_(t,`delete`),v(),n(t.name);let i=u();if(!i.configs.exists(t.name))throw Error(`Profile "${t.name}" does not exist.`);let o=i.bindings.removeAllBindingsForProfile(t.name);o.length>0&&r.info([`Removed directory bindings:`,...o.map(e=>` ${e}`)].join(`
3
+ `)),await a(t.name),i.configs.delete(t.name),m(`Profile "${t.name}" deleted.`);let s=i.bindings.getProfileForDirectory(process.cwd());s?r.info(`Active profile for this directory: ${s}.`):i.configs.exists(`default`)?r.info(`This directory now uses the default profile.`):r.info(`No active profile for this directory. Run ${e.code(`cf auth login`)} to set up the default profile, or ${e.code(`cf auth create <name>`)} to create a named profile.`)}},x={command:`activate <name> [dir]`,describe:`Bind a named auth profile to a directory`,builder:e=>e.positional(`name`,{type:`string`,description:`Name of the auth profile to activate`,demandOption:!0}).positional(`dir`,{type:`string`,description:`Directory to bind the profile to (defaults to current directory)`}),handler:e=>{_(e,`activate`,"Pass the profile name as the command argument: `cf auth activate <name>`."),v(),n(e.name);let t=u();if(!t.configs.exists(e.name))throw Error(`Profile "${e.name}" does not exist. Run \`cf auth create ${e.name}\` first.`);let r=e.dir??process.cwd();t.bindings.activate(e.name,r),m(`Profile "${e.name}" activated for "${g.resolve(r)}".`)}},S={command:`deactivate [dir]`,describe:`Remove the auth profile binding from a directory`,builder:e=>e.positional(`dir`,{type:`string`,description:`Directory to unbind (defaults to current directory). Must be the exact directory the profile was bound to.`}),handler:t=>{_(t,`deactivate`),v();let n=u(),i=t.dir??process.cwd(),{removedProfile:a,newResolution:o}=n.bindings.deactivate(i);m(`Profile "${a}" deactivated from "${g.resolve(i)}".`),o.profile===void 0?r.info(`Run ${e.code(`cf auth login`)} to set up the default profile, or ${e.code(`cf auth create <name>`)} to create a named profile.`):o.profile==="default"?r.info(`This directory now uses the default profile.`):r.info(`Now using: ${o.profile} (${o.source}).`)}},C={command:`list`,describe:`List all auth profiles`,handler:e=>{_(e,`list`);let t=u(),n=t.bindings.read(),r={};for(let[e,t]of Object.entries(n))(r[t]??=[]).push(e);h(t.configs.list().map(e=>({name:e,boundDirectories:r[e]??[]})))}},w={safeFlags:[`force`,`browser`,`device`,`use-keyring`,`useKeyring`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}},T={command:`login`,describe:`Authenticate with Cloudflare`,builder:e=>e.option(`force`,{type:`boolean`,alias:`f`,description:`Force re-authentication even if already logged in`,default:!1}).option(`browser`,{type:`boolean`,description:`Open the authorization link in a browser (use --no-browser to print it instead)`,default:!0}).option(`device`,{type:`boolean`,description:`Use OAuth device authorization (use --no-device for the localhost callback flow)`,default:!0}).option(`scopes`,{type:`string`,array:!0,description:`The set of OAuth scopes to request`}).option(`use-keyring`,{type:`boolean`,description:`Encrypt OAuth credentials using the OS keychain (persisted across invocations; use --no-use-keyring to disable)`}),handler:async n=>{_(n,`login`,"Run `cf auth create <name>` to authenticate a named profile.");let a=d();if(a!=="default"&&r.warn(`This directory has profile "${a}" active. ${e.code(`cf auth login`)} updates the default profile, not "${a}". To re-authenticate "${a}", run:`,`cf auth create ${a}`),s(`default`),n.useKeyring!==void 0&&c(n.useKeyring),t({allowGlobalAuthKey:!1})!==void 0){r.warn(`${e.code(`CLOUDFLARE_API_TOKEN`)} is set and takes precedence. Unset it to log in via OAuth.`);return}if(!n.force&&i()){if(await f()){let t=o(),n=[`You are already logged in.`,`${e.info(`Config file:`)} ${e.muted(l())}`];t?.expiration_time&&n.push(`${e.info(`Token expires:`)} ${new Date(t.expiration_time).toLocaleString()}`),n.push(`Run ${e.code(`cf auth login --force`)} to re-authenticate, or ${e.code(`cf auth logout`)} to log out.`),r.info(n.join(`
4
+ `));return}r.warn(`Existing tokens are invalid or expired. Starting fresh login...`)}else n.force&&i()&&r.info(`Re-authenticating...`);if(r.info(`Starting OAuth login flow...`),!await p({browser:n.browser,device:n.device,scopes:n.scopes,profile:`default`}))return;let u=o(),m=[`${e.info(`Config file:`)} ${e.muted(l())}`];u?.scopes&&m.push(u.scopes.length>5?`${e.info(`Scopes:`)} ${u.scopes.length} selected. Run ${e.code(`cf auth whoami`)} to see the full list.`:`${e.info(`Scopes:`)} ${u.scopes.join(`, `)}`),u?.expiration_time&&m.push(`${e.info(`Token expires:`)} ${new Date(u.expiration_time).toLocaleString()}`),r.info(m.join(`
5
+ `))}};export{y as a,C as c,_ as i,w as n,S as o,x as r,b as s,T as t};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-B7ZJ78al.mjs";import{n}from"./auth-BUQscD5b.mjs";import{a as r,i,t as a}from"./context-Sgba0fZP.mjs";import{t as o}from"./output-CpiIVa7Q.mjs";import{t as s}from"./dry-run-BBjUQUhR.mjs";import{t as c}from"./progress-B1dpmxCT.mjs";import{t as l}from"./run-0EozpORq.mjs";import"./telemetry-BczXOpQn.mjs";import{n as u,r as d,t as f}from"./body-parser-ChnyBsfm.mjs";import{n as p}from"./input-validation-D7z60HJH.mjs";import{a as m,n as h}from"./prompt-Y5OBwDVE.mjs";var g={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/logpush/datasets/${t.dataset_id}/fields`};function _(e){return e.usage(`$0 logpush account-datasets fields get <dataset-id>
2
+ import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CSH3UMpD.mjs";import{n}from"./auth-BcNLQji1.mjs";import{a as r,i,t as a}from"./context-DVh8Wyfs.mjs";import{t as o}from"./output-BJEgbI0G.mjs";import{t as s}from"./dry-run-gy0Hl9xo.mjs";import{t as c}from"./progress-CtGsPOpV.mjs";import{t as l}from"./run-DnZGQbq_.mjs";import"./telemetry-CvZean4s.mjs";import{n as u,r as d,t as f}from"./body-parser-ChnyBsfm.mjs";import{n as p}from"./input-validation-D7z60HJH.mjs";import{a as m,n as h}from"./prompt-YrI7ltMa.mjs";var g={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/logpush/datasets/${t.dataset_id}/fields`};function _(e){return e.usage(`$0 logpush account-datasets fields get <dataset-id>
3
3
 
4
4
  Lists all fields available for a dataset. The response result is. an object with key-value pairs, where keys are field names, and values are descriptions.`).positional(`dataset-id`,{type:`string`,description:`Name of the dataset. A list of supported datasets can be found on the [Developer Docs](https://developers.cloudflare.com/logs/reference/log-fields/).`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ee={command:`get <dataset-id>`,describe:`List fields`,builder:_,handler:async e=>l({command:`logpush account-datasets fields get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await r():void 0,n=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;s({command:`cf logpush account-datasets fields get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/logpush/datasets/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/fields`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i),"dataset-id":String(e[`dataset-id`]??``)},bodyKind:`none`});return}let l=await n(e),u=e.zone===void 0?`accounts`:`zones`,d=u===`zones`?await i({zone:e.zone},l,{quiet:e.quiet}):e.local?t:await a();u===`zones`?e.zoneId=d:e.accountId=d;let f=await c(`Loading`,async()=>l.send(g,{account_or_zone:u,account_or_zone_id:d,dataset_id:e[`dataset-id`]}));o(f,{successLabel:`Loaded`})})},v={command:`fields`,describe:`Operations for account-datasets.fields`,builder:e=>e.command(ee).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var y={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/logpush/datasets/${t.dataset_id}/jobs`};function b(e){return e.usage(`$0 logpush account-datasets jobs get <dataset-id>
5
5
 
@@ -7,8 +7,7 @@ Lists Logpush jobs for an account or zone for a dataset.`).positional(`dataset-i
7
7
 
8
8
  Creates a new Logpush job for an account or zone.`).option(`dataset`,{type:`string`,description:`Name of the dataset. A list of supported datasets can be found on the [Developer Docs](https://developers.cloudflare.com/logs/reference/log-fields/).`,choices:/* @__PURE__ */ `access_requests.account_abuse_protection_events.audit_logs.audit_logs_v2.biso_user_actions.casb_findings.device_posture_results.dex_application_tests.dex_device_state_events.dlp_forensic_copies.dns_firewall_logs.dns_logs.email_security_alerts.email_security_post_delivery_events.firewall_events.gateway_dns.gateway_http.gateway_network.http_requests.ipsec_logs.magic_bgp_logs.magic_ids_detections.mcp_portal_logs.mnm_flow_logs.nel_reports.network_analytics_logs.page_shield_events.sinkhole_http_logs.spectrum_events.ssh_logs.turnstile_events.warp_config_changes.warp_toggle_changes.websocket_analytics.workers_trace_events.zaraz_events.zero_trust_network_sessions`.split(`.`),default:`http_requests`}).coerce(`dataset`,e=>p(e,`dataset`,`text`)).option(`destination-conf`,{type:`string`,description:`Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included.`}).option(`enabled`,{type:`boolean`,description:`Flag that indicates if the job is enabled.`,default:!1}).option(`filter`,{type:`string`,description:`The filters to select the events to include and/or remove from your logs. For more information, refer to [Filters](https://developers.cloudflare.com/logs/reference/filters/).`}).option(`filter-attack-traffic`,{type:`boolean`,description:"When true, excludes DDoS attack traffic from logs. This option is supported for the `http_requests`, `firewall_events`, and `network_analytics_logs` datasets.",default:!1}).option(`frequency`,{type:`string`,description:"This field is deprecated. Please use `max_upload_*` parameters instead. . The frequency at which Cloudflare sends batches of logs to your destination. Setting frequency to high sends your logs in larger quantities of smaller files. Setting frequency to low sends logs in smaller quantities of larger files.",choices:[`high`,`low`],default:`high`}).coerce(`frequency`,e=>p(e,`frequency`,`text`)).option(`kind`,{type:`string`,description:`The kind parameter (optional) is used to differentiate between Logpush and Edge Log Delivery jobs (when supported by the dataset).`,choices:[`edge`],default:``}).coerce(`kind`,e=>p(e,`kind`,`text`)).option(`logpull-options`,{type:`string`,description:"This field is deprecated. Use `output_options` instead. Configuration string. It specifies things like requested fields and timestamp formats. If migrating from the logpull api, copy the url (full url or just the query string) of your call here, and logpush will keep on making this call for you, setting start and end times appropriately."}).option(`max-upload-bytes`,{type:`number`,description:"The maximum uncompressed file size of a batch of logs. This setting value must be between `5 MB` and `1 GB`, or `0` to disable it. Note that you cannot set a minimum file size; this means that log files may be much smaller than this batch size."}).option(`max-upload-interval-seconds`,{type:`number`,description:"The maximum interval in seconds for log batches. This setting must be between 30 and 300 seconds (5 minutes), or `0` to disable it. Note that you cannot specify a minimum interval for log batches; this means that log files may be sent in shorter intervals than this."}).option(`max-upload-records`,{type:`number`,description:"The maximum number of log lines per batch. This setting must be between 1000 and 1,000,000 lines, or `0` to disable it. Note that you cannot specify a minimum number of log lines per batch; this means that log files may contain many fewer lines than this."}).option(`name`,{type:`string`,description:`Optional human readable job name. Not unique. Cloudflare suggests. that you set this to a meaningful string, like the domain name, to make it easier to identify your job.`}).option(`output-options-cve-2021-44228`,{type:`boolean`,description:"If set to true, will cause all occurrences of `${` in the generated files to be replaced with `x{`."}).option(`output-options-batch-prefix`,{type:`string`,description:`String to be prepended before each batch.`}).option(`output-options-batch-suffix`,{type:`string`,description:`String to be appended after each batch.`}).option(`output-options-field-delimiter`,{type:`string`,description:"String to join fields. This field be ignored when `record_template` is set."}).option(`output-options-field-names`,{type:`string`,array:!0,description:`List of field names to be included in the Logpush output. For the moment, there is no option to add all fields at once, so you must specify all the fields names you are interested in.`}).option(`output-options-merge-subrequests`,{type:`boolean`,description:"If set to true, subrequests will be merged into the parent request. Only supported for the `http_requests` dataset."}).option(`output-options-output-type`,{type:`string`,description:"Specifies the output type, such as `ndjson` or `csv`. This sets default values for the rest of the settings, depending on the chosen output type. Some formatting rules, like string quoting, are different between output types.",choices:[`ndjson`,`csv`]}).coerce(`output-options-output-type`,e=>p(e,`output-options-output-type`,`text`)).option(`output-options-record-delimiter`,{type:`string`,description:`String to be inserted in-between the records as separator.`}).option(`output-options-record-prefix`,{type:`string`,description:`String to be prepended before each record.`}).option(`output-options-record-suffix`,{type:`string`,description:`String to be appended after each record.`}).option(`output-options-record-template`,{type:`string`,description:"String to use as template for each record instead of the default json key value mapping. All fields used in the template must be present in `field_names` as well, otherwise they will end up as null. Format as a Go `text/template` without any standard functions, like conditionals, loops, sub-templates, etc."}).option(`output-options-sample-rate`,{type:`number`,description:"Specifies the sampling rate as a floating number greater than 0 and at most 1. Sampling is applied on top of filtering, and regardless of the current `sample_interval` of the data."}).option(`output-options-timestamp-format`,{type:`string`,description:"String to specify the format for timestamps, such as `unixnano`, `unix`, `rfc3339`, `rfc3339ms` or `rfc3339ns`.",choices:[`unixnano`,`unix`,`rfc3339`,`rfc3339ms`,`rfc3339ns`]}).coerce(`output-options-timestamp-format`,e=>p(e,`output-options-timestamp-format`,`text`)).option(`ownership-challenge`,{type:`string`,description:`Ownership challenge token to prove destination ownership.`}).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 re={command:`create`,describe:`Create Logpush job`,builder:ne,handler:async e=>l({command:`logpush account-jobs create`,classification:{safeFlags:[`dataset`,`enabled`,`filter-attack-traffic`,`frequency`,`kind`,`output-options-cve-2021-44228`,`output-options-merge-subrequests`,`output-options-output-type`,`output-options-timestamp-format`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await r():void 0,n=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;s({command:`cf logpush account-jobs create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/logpush/jobs`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i)},bodyKind:`json`,body:e.body===void 0?f({dataset:e.dataset,destination_conf:p(e[`destination-conf`],`destination-conf`,`text`),enabled:e.enabled,filter:p(e.filter,`filter`,`text`),filter_attack_traffic:e[`filter-attack-traffic`],frequency:e.frequency,kind:e.kind,logpull_options:p(e[`logpull-options`],`logpull-options`,`text`),max_upload_bytes:e[`max-upload-bytes`],max_upload_interval_seconds:e[`max-upload-interval-seconds`],max_upload_records:e[`max-upload-records`],name:p(e.name,`name`,`text`),output_options:{"CVE-2021-44228":e[`output-options-cve-2021-44228`],batch_prefix:p(e[`output-options-batch-prefix`],`output-options-batch-prefix`,`text`),batch_suffix:p(e[`output-options-batch-suffix`],`output-options-batch-suffix`,`text`),field_delimiter:p(e[`output-options-field-delimiter`],`output-options-field-delimiter`,`text`),field_names:e[`output-options-field-names`],merge_subrequests:e[`output-options-merge-subrequests`],output_type:e[`output-options-output-type`],record_delimiter:p(e[`output-options-record-delimiter`],`output-options-record-delimiter`,`text`),record_prefix:p(e[`output-options-record-prefix`],`output-options-record-prefix`,`text`),record_suffix:p(e[`output-options-record-suffix`],`output-options-record-suffix`,`text`),record_template:p(e[`output-options-record-template`],`output-options-record-template`,`text`),sample_rate:e[`output-options-sample-rate`],timestamp_format:e[`output-options-timestamp-format`]},ownership_challenge:p(e[`ownership-challenge`],`ownership-challenge`,`text`)}):u(e.body),sensitiveBodyPaths:[[`destination_conf`],[`ownership_challenge`]]});return}let l=await n(e),d=e.zone===void 0?`accounts`:`zones`,h=d===`zones`?await i({zone:e.zone},l,{quiet:e.quiet}):e.local?t:await a();if(d===`zones`?e.zoneId=h:e.accountId=h,e.body){let t=u(e.body),n=await c(`Creating`,async()=>l.send(C,{body:t,account_or_zone:d,account_or_zone_id:h}));o(n,{successLabel:`Created`});return}e[`destination-conf`]===void 0&&(e[`destination-conf`]=await m(`destination-conf`,`Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included.`,{kind:`secret`}));let g=f({dataset:e.dataset,destination_conf:p(e[`destination-conf`],`destination-conf`,`text`),enabled:e.enabled,filter:p(e.filter,`filter`,`text`),filter_attack_traffic:e[`filter-attack-traffic`],frequency:e.frequency,kind:e.kind,logpull_options:p(e[`logpull-options`],`logpull-options`,`text`),max_upload_bytes:e[`max-upload-bytes`],max_upload_interval_seconds:e[`max-upload-interval-seconds`],max_upload_records:e[`max-upload-records`],name:p(e.name,`name`,`text`),output_options:{"CVE-2021-44228":e[`output-options-cve-2021-44228`],batch_prefix:p(e[`output-options-batch-prefix`],`output-options-batch-prefix`,`text`),batch_suffix:p(e[`output-options-batch-suffix`],`output-options-batch-suffix`,`text`),field_delimiter:p(e[`output-options-field-delimiter`],`output-options-field-delimiter`,`text`),field_names:e[`output-options-field-names`],merge_subrequests:e[`output-options-merge-subrequests`],output_type:e[`output-options-output-type`],record_delimiter:p(e[`output-options-record-delimiter`],`output-options-record-delimiter`,`text`),record_prefix:p(e[`output-options-record-prefix`],`output-options-record-prefix`,`text`),record_suffix:p(e[`output-options-record-suffix`],`output-options-record-suffix`,`text`),record_template:p(e[`output-options-record-template`],`output-options-record-template`,`text`),sample_rate:e[`output-options-sample-rate`],timestamp_format:e[`output-options-timestamp-format`]},ownership_challenge:p(e[`ownership-challenge`],`ownership-challenge`,`text`)}),_=await c(`Creating`,async()=>l.send(C,{body:g,account_or_zone:d,account_or_zone_id:h}));o(_,{successLabel:`Created`})})};var ie={method:`DELETE`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/logpush/jobs/${t.job_id}`};function ae(e){return e.usage(`$0 logpush account-jobs delete <job-id>
9
9
 
10
- Deletes a Logpush job.`).positional(`job-id`,{type:`string`,description:`Unique id of the job.`,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 oe={command:`delete <job-id>`,describe:`Delete Logpush job`,builder:ae,handler:async e=>l({command:`logpush account-jobs delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await r():void 0,n=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;s({command:`cf logpush account-jobs delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/logpush/jobs/${e[`job-id`]==null?`<job-id>`:encodeURIComponent(String(e[`job-id`]))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i),"job-id":String(e[`job-id`]??``)},bodyKind:`none`});return}let l=await n(e),u=e.zone===void 0?`accounts`:`zones`,d=u===`zones`?await i({zone:e.zone},l,{quiet:e.quiet}):e.local?t:await a();if(u===`zones`?e.zoneId=d:e.accountId=d,!await h({force:!!e.force,message:`This operation deletes the Logpush job.`})){process.stderr.write(`Aborted.
11
- `);return}let f=await c(`Deleting`,async()=>l.send(ie,{account_or_zone:u,account_or_zone_id:d,job_id:e[`job-id`]}));o(f,{successLabel:`Deleted`})})};var w={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/logpush/jobs/${t.job_id}`};function T(e){return e.usage(`$0 logpush account-jobs get <job-id>
10
+ Deletes a Logpush job.`).positional(`job-id`,{type:`string`,description:`Unique id of the job.`,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 oe={command:`delete <job-id>`,describe:`Delete Logpush job`,builder:ae,handler:async e=>l({command:`logpush account-jobs delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await r():void 0,n=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;s({command:`cf logpush account-jobs delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/logpush/jobs/${e[`job-id`]==null?`<job-id>`:encodeURIComponent(String(e[`job-id`]))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i),"job-id":String(e[`job-id`]??``)},bodyKind:`none`});return}let l=await n(e),u=e.zone===void 0?`accounts`:`zones`,d=u===`zones`?await i({zone:e.zone},l,{quiet:e.quiet}):e.local?t:await a();if(u===`zones`?e.zoneId=d:e.accountId=d,!await h({force:!!e.force,message:`This operation deletes the Logpush job.`}))return;let f=await c(`Deleting`,async()=>l.send(ie,{account_or_zone:u,account_or_zone_id:d,job_id:e[`job-id`]}));o(f,{successLabel:`Deleted`})})};var w={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/logpush/jobs/${t.job_id}`};function T(e){return e.usage(`$0 logpush account-jobs get <job-id>
12
11
 
13
12
  Gets the details of a Logpush job.`).positional(`job-id`,{type:`string`,description:`Unique id of the job.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`get <job-id>`,describe:`Get Logpush job details`,builder:T,handler:async e=>l({command:`logpush account-jobs get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await r():void 0,n=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;s({command:`cf logpush account-jobs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/logpush/jobs/${e[`job-id`]==null?`<job-id>`:encodeURIComponent(String(e[`job-id`]))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i),"job-id":String(e[`job-id`]??``)},bodyKind:`none`});return}let l=await n(e),u=e.zone===void 0?`accounts`:`zones`,d=u===`zones`?await i({zone:e.zone},l,{quiet:e.quiet}):e.local?t:await a();u===`zones`?e.zoneId=d:e.accountId=d;let f=await c(`Loading`,async()=>l.send(w,{account_or_zone:u,account_or_zone_id:d,job_id:e[`job-id`]}));o(f,{successLabel:`Loaded`})})};var D={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/logpush/jobs`};function O(e){return e.usage(`$0 logpush account-jobs list
14
13
 
@@ -34,8 +33,7 @@ Returns the SQL query content for a transformer. Without query params, returns t
34
33
 
35
34
  Creates a new custom log transformer for an account.`).option(`code`,{type:`string`,description:`The SQL transformer query. Maximum 32 KB. The query must contain a FROM clause referencing a valid logpush dataset.`}).option(`description`,{type:`string`,description:`Optional customer-provided description.`}).option(`name`,{type:`string`,description:`Customer-provided name for identification.`}).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 Ce={command:`create`,describe:`Create transformer`,builder:Se,handler:async e=>l({command:`logpush transformers create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf logpush transformers create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/logpush/transformers`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({code:p(e.code,`code`,`text`),description:p(e.description,`description`,`text`),name:p(e.name,`name`,`text`)}):u(e.body)});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=u(e.body),n=await c(`Creating`,async()=>i.send(X,{body:t,account_id:l}));o(n,{successLabel:`Created`});return}e.code===void 0&&(e.code=await m(`code`,`The SQL transformer query. Maximum 32 KB. The query must contain a FROM clause referencing a valid logpush dataset.`)),e.name===void 0&&(e.name=await m(`name`,`Customer-provided name for identification.`));let d=f({code:p(e.code,`code`,`text`),description:p(e.description,`description`,`text`),name:p(e.name,`name`,`text`)}),h=await c(`Creating`,async()=>i.send(X,{body:d,account_id:l}));o(h,{successLabel:`Created`})})};var we={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/logpush/transformers/${t.transformer_id}`,errors:{409:`ConflictError`}};function Te(e){return e.usage(`$0 logpush transformers delete <transformer-id>
36
35
 
37
- Deletes a custom log transformer. Returns 409 Conflict if any active logpush jobs reference the transformer.`).positional(`transformer-id`,{type:`string`,description:`The transformer ID.`,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 Ee={command:`delete <transformer-id>`,describe:`Delete transformer`,builder:Te,handler:async e=>l({command:`logpush transformers delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf logpush transformers delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/logpush/transformers/${e[`transformer-id`]==null?`<transformer-id>`:encodeURIComponent(String(e[`transformer-id`]))}`,pathParams:{"transformer-id":String(e[`transformer-id`]??``)},bodyKind:`none`});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,!await h({force:!!e.force})){process.stderr.write(`Aborted.
38
- `);return}let u=await c(`Deleting`,async()=>i.send(we,{account_id:l,transformer_id:e[`transformer-id`]}));o(u,{successLabel:`Deleted`})})};var De={method:`GET`,path:t=>e`/accounts/${t.account_id}/logpush/transformers/${t.transformer_id}`};function Oe(e){return e.usage(`$0 logpush transformers get <transformer-id>
36
+ Deletes a custom log transformer. Returns 409 Conflict if any active logpush jobs reference the transformer.`).positional(`transformer-id`,{type:`string`,description:`The transformer ID.`,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 Ee={command:`delete <transformer-id>`,describe:`Delete transformer`,builder:Te,handler:async e=>l({command:`logpush transformers delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf logpush transformers delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/logpush/transformers/${e[`transformer-id`]==null?`<transformer-id>`:encodeURIComponent(String(e[`transformer-id`]))}`,pathParams:{"transformer-id":String(e[`transformer-id`]??``)},bodyKind:`none`});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,!await h({force:!!e.force}))return;let u=await c(`Deleting`,async()=>i.send(we,{account_id:l,transformer_id:e[`transformer-id`]}));o(u,{successLabel:`Deleted`})})};var De={method:`GET`,path:t=>e`/accounts/${t.account_id}/logpush/transformers/${t.transformer_id}`};function Oe(e){return e.usage(`$0 logpush transformers get <transformer-id>
39
37
 
40
38
  Gets a single custom log transformer by ID.`).positional(`transformer-id`,{type:`string`,description:`The transformer ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ke={command:`get <transformer-id>`,describe:`Get transformer`,builder:Oe,handler:async e=>l({command:`logpush transformers get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf logpush transformers get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/logpush/transformers/${e[`transformer-id`]==null?`<transformer-id>`:encodeURIComponent(String(e[`transformer-id`]))}`,pathParams:{"transformer-id":String(e[`transformer-id`]??``)},bodyKind:`none`});return}let i=await n(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>i.send(De,{account_id:l,transformer_id:e[`transformer-id`]}));o(u,{successLabel:`Loaded`})})};var Ae={method:`GET`,path:t=>e`/accounts/${t.account_id}/logpush/transformers`};function je(e){return e.usage(`$0 logpush transformers list
41
39
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-B7ZJ78al.mjs";import{i as n,n as r}from"./auth-BUQscD5b.mjs";import{a as i,i as a,t as o}from"./context-Sgba0fZP.mjs";import{t as s}from"./output-CpiIVa7Q.mjs";import{t as c}from"./dry-run-BBjUQUhR.mjs";import{t as l}from"./progress-B1dpmxCT.mjs";import{t as u}from"./run-0EozpORq.mjs";import"./telemetry-BczXOpQn.mjs";import{a as d,n as f,t as p}from"./body-parser-ChnyBsfm.mjs";import{n as m,t as h}from"./input-validation-D7z60HJH.mjs";import{a as g,n as _}from"./prompt-Y5OBwDVE.mjs";var v={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/logs/explorer/datasets/available`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`}};function y(e){return e.usage(`$0 logs datasets available
2
+ import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CSH3UMpD.mjs";import{i as n,n as r}from"./auth-BcNLQji1.mjs";import{a as i,i as a,t as o}from"./context-DVh8Wyfs.mjs";import{t as s}from"./output-BJEgbI0G.mjs";import{t as c}from"./dry-run-gy0Hl9xo.mjs";import{t as l}from"./progress-CtGsPOpV.mjs";import{t as u}from"./run-DnZGQbq_.mjs";import"./telemetry-CvZean4s.mjs";import{a as d,n as f,t as p}from"./body-parser-ChnyBsfm.mjs";import{n as m,t as h}from"./input-validation-D7z60HJH.mjs";import{a as g,n as _}from"./prompt-YrI7ltMa.mjs";var v={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/logs/explorer/datasets/available`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`}};function y(e){return e.usage(`$0 logs datasets available
3
3
 
4
4
  Returns all dataset types that this account or zone can create. Each entry includes the dataset schema and timestamp field. The schema shows all possible fields for a dataset. However, not all fields may be available for your account or zone. When creating or updating a dataset, only fields available to your account or zone can be enabled. If you request a field that is not available, you will receive an error.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const b={command:`available`,describe:`List available account or zone datasets`,builder:y,handler:async e=>u({command:`logs datasets available`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await i():void 0,n=e.zone===void 0?`accounts`:`zones`,r=e.zone??t??`<account-id>`;c({command:`cf logs datasets available`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/logs/explorer/datasets/available`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},bodyKind:`none`});return}let n=await r(e),u=e.zone===void 0?`accounts`:`zones`,d=u===`zones`?await a({zone:e.zone},n,{quiet:e.quiet}):e.local?t:await o();u===`zones`?e.zoneId=d:e.accountId=d;let f=await l(`Loading`,async()=>n.send(v,{account_or_zone:u,account_or_zone_id:d}));s(f,{successLabel:`Loaded`})})};var x={method:`POST`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/logs/explorer/datasets`,body:`json`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`}};function S(e){return e.usage(`$0 logs datasets create
5
5
 
@@ -10,8 +10,7 @@ See [Logpush filters](https://developers.cloudflare.com/logs/reference/filters/)
10
10
  for syntax and examples.
11
11
  `}).option(`filter-attack-traffic`,{type:`boolean`,description:"Whether to filter attack traffic from the Logpush job. Defaults to\n`true` for supported datasets when omitted. Supported datasets are\n`http_requests`, `firewall_events`, and `network_analytics_logs`.\n"}).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 C={command:`create`,describe:`Create an account or zone dataset`,builder:S,handler:async e=>u({command:`logs datasets create`,classification:{safeFlags:[`filter-attack-traffic`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await i():void 0,n=e.zone===void 0?`accounts`:`zones`,r=e.zone??t??`<account-id>`;c({command:`cf logs datasets create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/logs/explorer/datasets`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},bodyKind:`json`,body:e.body===void 0?p({dataset:m(e.dataset,`dataset`,`text`),fields:d(e.fields,`fields`),filter:m(e.filter,`filter`,`text`),filter_attack_traffic:e[`filter-attack-traffic`]}):f(e.body)});return}let n=await r(e),u=e.zone===void 0?`accounts`:`zones`,h=u===`zones`?await a({zone:e.zone},n,{quiet:e.quiet}):e.local?t:await o();if(u===`zones`?e.zoneId=h:e.accountId=h,e.body){let t=f(e.body),r=await l(`Creating`,async()=>n.send(x,{body:t,account_or_zone:u,account_or_zone_id:h}));s(r,{successLabel:`Created`});return}e.dataset===void 0&&(e.dataset=await g(`dataset`,"Dataset type name to create (e.g. `http_requests`)."));let _=p({dataset:m(e.dataset,`dataset`,`text`),fields:d(e.fields,`fields`),filter:m(e.filter,`filter`,`text`),filter_attack_traffic:e[`filter-attack-traffic`]}),v=await l(`Creating`,async()=>n.send(x,{body:_,account_or_zone:u,account_or_zone_id:h}));s(v,{successLabel:`Created`})})};var w={method:`DELETE`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/logs/explorer/datasets/${t.dataset_id}`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`}};function T(e){return e.usage(`$0 logs datasets delete <dataset-id>
12
12
 
13
- Deletes a Log Explorer dataset for the account or zone. Dataset deletion must not be protected.`).positional(`dataset-id`,{type:`string`,description:`Log Explorer dataset ID.`,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 E={command:`delete <dataset-id>`,describe:`Delete an account or zone dataset`,builder:T,handler:async e=>u({command:`logs datasets delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await i():void 0,n=e.zone===void 0?`accounts`:`zones`,r=e.zone??t??`<account-id>`;c({command:`cf logs datasets delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/logs/explorer/datasets/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r),"dataset-id":String(e[`dataset-id`]??``)},bodyKind:`none`});return}let n=await r(e),u=e.zone===void 0?`accounts`:`zones`,d=u===`zones`?await a({zone:e.zone},n,{quiet:e.quiet}):e.local?t:await o();if(u===`zones`?e.zoneId=d:e.accountId=d,!await _({force:!!e.force,message:`This operation deletes a Log Explorer dataset for the account.`})){process.stderr.write(`Aborted.
14
- `);return}let f=await l(`Deleting`,async()=>n.send(w,{account_or_zone:u,account_or_zone_id:d,dataset_id:e[`dataset-id`]}));s(f,{successLabel:`Deleted`})})};var D={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/logs/explorer/datasets/${t.dataset_id}`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`}};function O(e){return e.usage(`$0 logs datasets get <dataset-id>
13
+ Deletes a Log Explorer dataset for the account or zone. Dataset deletion must not be protected.`).positional(`dataset-id`,{type:`string`,description:`Log Explorer dataset ID.`,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 E={command:`delete <dataset-id>`,describe:`Delete an account or zone dataset`,builder:T,handler:async e=>u({command:`logs datasets delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await i():void 0,n=e.zone===void 0?`accounts`:`zones`,r=e.zone??t??`<account-id>`;c({command:`cf logs datasets delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/logs/explorer/datasets/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r),"dataset-id":String(e[`dataset-id`]??``)},bodyKind:`none`});return}let n=await r(e),u=e.zone===void 0?`accounts`:`zones`,d=u===`zones`?await a({zone:e.zone},n,{quiet:e.quiet}):e.local?t:await o();if(u===`zones`?e.zoneId=d:e.accountId=d,!await _({force:!!e.force,message:`This operation deletes a Log Explorer dataset for the account.`}))return;let f=await l(`Deleting`,async()=>n.send(w,{account_or_zone:u,account_or_zone_id:d,dataset_id:e[`dataset-id`]}));s(f,{successLabel:`Deleted`})})};var D={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/logs/explorer/datasets/${t.dataset_id}`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`}};function O(e){return e.usage(`$0 logs datasets get <dataset-id>
15
14
 
16
15
  Retrieve a single Log Explorer dataset by ID for the account or zone.`).positional(`dataset-id`,{type:`string`,description:`Log Explorer dataset ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`get <dataset-id>`,describe:`Get an account or zone dataset`,builder:O,handler:async e=>u({command:`logs datasets get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await i():void 0,n=e.zone===void 0?`accounts`:`zones`,r=e.zone??t??`<account-id>`;c({command:`cf logs datasets get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/logs/explorer/datasets/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r),"dataset-id":String(e[`dataset-id`]??``)},bodyKind:`none`});return}let n=await r(e),u=e.zone===void 0?`accounts`:`zones`,d=u===`zones`?await a({zone:e.zone},n,{quiet:e.quiet}):e.local?t:await o();u===`zones`?e.zoneId=d:e.accountId=d;let f=await l(`Loading`,async()=>n.send(D,{account_or_zone:u,account_or_zone_id:d,dataset_id:e[`dataset-id`]}));s(f,{successLabel:`Loaded`})})};var A={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/logs/explorer/datasets`,query:[`include_zones`],errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`}};function j(e){return e.usage("$0 logs datasets list\n\nReturns all Log Explorer datasets configured for the account or zone. Pass `include_zones=true` to also include zone-level datasets that belong to this account or zone. List responses omit the `fields` property; use the single-dataset endpoint to retrieve field configuration.").option(`include-zones`,{type:`boolean`,description:`Set to true to include zone-scoped datasets belonging to this account.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const M={command:`list`,describe:`List account or zone datasets`,builder:j,handler:async e=>u({command:`logs datasets list`,classification:{safeFlags:[`include-zones`,`dry-run`]}},e,async()=>{let n={include_zones:e[`include-zones`]};if(e.dryRun){let t=e.zone===void 0?await i():void 0,r=e.zone===void 0?`accounts`:`zones`,a=e.zone??t??`<account-id>`;c({command:`cf logs datasets list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${r}/${a}/logs/explorer/datasets`,pathParams:{"account-or-zone":String(r),"account-or-zone-id":String(a)},query:n,bodyKind:`none`});return}let u=await r(e),d=e.zone===void 0?`accounts`:`zones`,f=d===`zones`?await a({zone:e.zone},u,{quiet:e.quiet}):e.local?t:await o();d===`zones`?e.zoneId=f:e.accountId=f;let p=await l(`Loading`,async()=>u.send(A,{account_or_zone:d,account_or_zone_id:f,...n}));s(p,{successLabel:`Loaded`})})};var N={method:`PUT`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/logs/explorer/datasets/${t.dataset_id}`,body:`json`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`}};function P(e){return e.usage(`$0 logs datasets update <dataset-id>
17
16