cf 1.0.0-beta.26 → 1.0.0-beta.27

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 (256) hide show
  1. package/dist/_meta/commands.json +1996 -3422
  2. package/dist/_meta/schemas.json +9249 -2339
  3. package/dist/abuse-reports-RxXqfDEW.mjs +24 -0
  4. package/dist/{access-DCOOmDC5.mjs → access-BxEprr2f.mjs} +1 -1
  5. package/dist/{accounts-HC6XuIwP.mjs → accounts-DU2ZNYqP.mjs} +17 -11
  6. package/dist/{acm-DYgr6SAR.mjs → acm-CBCIKBJ4.mjs} +1 -1
  7. package/dist/{addressing-BS66pJ_a.mjs → addressing-BKxiLRHk.mjs} +1 -1
  8. package/dist/{agent-memory-BbXdueL0.mjs → agent-memory-DkBpQYUL.mjs} +1 -1
  9. package/dist/{ai-BiIKznNv.mjs → ai-DqEN_hhg.mjs} +2 -2
  10. package/dist/{ai-audit-DI4Rw2wl.mjs → ai-audit-BmzOgt6x.mjs} +1 -1
  11. package/dist/{ai-gateway-rlYCbts5.mjs → ai-gateway-B0uiYVHq.mjs} +3 -3
  12. package/dist/ai-search-DbZIxdio.mjs +74 -0
  13. package/dist/{ai-security-BUwS6kVh.mjs → ai-security-CvZfP2JC.mjs} +1 -1
  14. package/dist/{alerting-BSzuvFk1.mjs → alerting-BjGwBxZT.mjs} +1 -1
  15. package/dist/{analytics-CQ-Yt1mm.mjs → analytics-C7kT_H-W.mjs} +4 -4
  16. package/dist/{analytics-engine-CdrY5-95.mjs → analytics-engine-BHpcNSdD.mjs} +1 -1
  17. package/dist/{api-security-BBxEJjGv.mjs → api-security-BbcvDtff.mjs} +2 -2
  18. package/dist/{argo-BiefH8wc.mjs → argo-D1VONzu-.mjs} +1 -1
  19. package/dist/{artifacts-B9g9aPrk.mjs → artifacts-2R2sxIKO.mjs} +1 -1
  20. package/dist/{audit-logs-BhJs-OS2.mjs → audit-logs-LoBB1OO_.mjs} +1 -1
  21. package/dist/auth-CspwoBlp.mjs +2 -0
  22. package/dist/{auth-C50SqX9F.mjs → auth-D499YE2n.mjs} +3 -3
  23. package/dist/{auth-D5Yj9eYU.mjs → auth-FK2eLQ02.mjs} +1 -1
  24. package/dist/{auth-token-DvNoIhRL.mjs → auth-token-BwpERbnG.mjs} +1 -1
  25. package/dist/{autoconfig-ldsgXxa6.mjs → autoconfig-B2w-woU0.mjs} +36 -36
  26. package/dist/{basin-catalog-CtKFiH-n.mjs → basin-catalog-AgOHGiPI.mjs} +2 -2
  27. package/dist/billing-DRNww0iC.mjs +24 -0
  28. package/dist/{blocks-DnNrvi8s.mjs → blocks-C8vyXIAT.mjs} +1 -1
  29. package/dist/body-unions-CjpNjwSW.mjs +2 -0
  30. package/dist/bot-management-fwxKIbaB.mjs +9 -0
  31. package/dist/{botnet-feed-lD9s2oLA.mjs → botnet-feed-DCYB5kYZ.mjs} +1 -1
  32. package/dist/{brand-protection-Byoa1hvj.mjs → brand-protection-BVICLzBc.mjs} +1 -1
  33. package/dist/browser-run-CEk-NIgP.mjs +40 -0
  34. package/dist/build-CRm2TQq8.mjs +2 -0
  35. package/dist/{build-Dwd1_7o0.mjs → build-DO_GNhRl.mjs} +1 -1
  36. package/dist/{builds-D3mAH87h.mjs → builds-CoazxuN-.mjs} +26 -26
  37. package/dist/{cache-0xCdyNg9.mjs → cache-jlLJLSu7.mjs} +1 -1
  38. package/dist/{cf-CpC4giTf.mjs → cf-hP0SOgC6.mjs} +2 -2
  39. package/dist/{chunk-DSGVRFIS-vdfri8fR.mjs → chunk-DSGVRFIS-DQwKND2c.mjs} +1 -1
  40. package/dist/chunk-SOBRPAPT-BKzUiNx_.mjs +363 -0
  41. package/dist/{cli-Cm4Twas4.mjs → cli-Nqf58-1c.mjs} +1 -1
  42. package/dist/{client-side-security-BRn7KBpu.mjs → client-side-security-VmZzMy-m.mjs} +1 -1
  43. package/dist/{cloud-connector-DqkOIRDr.mjs → cloud-connector-bMlFnqP0.mjs} +1 -1
  44. package/dist/{cloudflared-DDp_8PTK.mjs → cloudflared-Ba4KWdTO.mjs} +1 -1
  45. package/dist/{cloudforce-one-B9k8vhso.mjs → cloudforce-one-CCaIBOAo.mjs} +121 -119
  46. package/dist/{command-BV8-laJK.mjs → command-BASaTmJc.mjs} +1 -1
  47. package/dist/{command-CfOqnqlN.mjs → command-BiIVclNA.mjs} +1 -1
  48. package/dist/{command-BKNQsGqu.mjs → command-Bih1HLr3.mjs} +1 -1
  49. package/dist/{command-BVz2aES3.mjs → command-BxZBNPxG.mjs} +1 -1
  50. package/dist/{command-B-_ba4rQ.mjs → command-ByYf12-8.mjs} +1 -1
  51. package/dist/{command-Dn39o5xQ.mjs → command-C0qCuw03.mjs} +1 -1
  52. package/dist/{command-BsCFkho-.mjs → command-C2FVMd1b.mjs} +1 -1
  53. package/dist/{command--Y_QAiU2.mjs → command-C4OgtX_x.mjs} +1 -1
  54. package/dist/{command-DlI7Z_7j.mjs → command-C5Kqc5Km.mjs} +1 -1
  55. package/dist/{command-CQMRxiDz.mjs → command-CFxyp8Uo.mjs} +1 -1
  56. package/dist/{command-CN8NFLs2.mjs → command-CZAR85ba.mjs} +1 -1
  57. package/dist/{command-QHmV62Fv.mjs → command-CelQVrZL.mjs} +1 -1
  58. package/dist/{command-yOG9VUtq.mjs → command-CrAlzysj.mjs} +1 -1
  59. package/dist/{command-DsOv6z9q.mjs → command-pMoNdd22.mjs} +1 -1
  60. package/dist/{completions-BA52jTea.mjs → completions-DRzBiqpv.mjs} +1 -1
  61. package/dist/{connector-interrupts-zL7pxPn6.mjs → connector-interrupts-CrTeSyaM.mjs} +1 -1
  62. package/dist/{connector-telemetry-events-PL4Fqqvu.mjs → connector-telemetry-events-BbAOUt9h.mjs} +1 -1
  63. package/dist/{connector-telemetry-snapshots-DyBSuEFB.mjs → connector-telemetry-snapshots-DcpBx7Qx.mjs} +1 -1
  64. package/dist/{connectors-D8H6rQz9.mjs → connectors-D1WFLJoE.mjs} +1 -1
  65. package/dist/{containers-Db-eWudu.mjs → containers-BOBEs1Gk.mjs} +4 -4
  66. package/dist/containers-DINLx5_i.mjs +380 -0
  67. package/dist/{content-scan-DUVq09i8.mjs → content-scan-D1GfPSL0.mjs} +1 -1
  68. package/dist/{context-BvLXzoMs.mjs → context-Dp4CXG22.mjs} +1 -1
  69. package/dist/{cps-CqaRliZZ.mjs → cps-D4uhzg3k.mjs} +1 -1
  70. package/dist/{csam-scanner-DsXvOOsZ.mjs → csam-scanner-DOOUBeBM.mjs} +1 -3
  71. package/dist/custom-csrs-DtdFo5YZ.mjs +18 -0
  72. package/dist/{custom-hostnames-Cj_csfo_.mjs → custom-hostnames-ccdlELaD.mjs} +1 -1
  73. package/dist/custom-nameservers-p3gDjfva.mjs +12 -0
  74. package/dist/custom-pages-DAkKVzgR.mjs +38 -0
  75. package/dist/d1-CDIyRdh4.mjs +52 -0
  76. package/dist/{delegate-CMfEjvHn.mjs → delegate-B4bKqF7i.mjs} +1 -1
  77. package/dist/delegate.mjs +1 -1
  78. package/dist/{deploy-DDbmxkiX.mjs → deploy-BaC5Ty7F.mjs} +1 -1
  79. package/dist/{deploy-context-DsEVu7bf.mjs → deploy-context-DTTgNGro.mjs} +1 -1
  80. package/dist/{deploy-input-BA_3Q2Xu.mjs → deploy-input-mAy06fAI.mjs} +1 -1
  81. package/dist/{dev-BS156bim.mjs → dev-De-HszNT.mjs} +1 -1
  82. package/dist/{diagnostics-BmkQnSEb.mjs → diagnostics-D1CUs2o9.mjs} +1 -1
  83. package/dist/{dist-DehXZozc.mjs → dist-D5qkmHhC.mjs} +1 -1
  84. package/dist/{dls-DciZC_gQ.mjs → dls-DWBiYzY1.mjs} +1 -1
  85. package/dist/{dns-firewall-CRfde07f.mjs → dns-firewall-DH9xIT5H.mjs} +8 -8
  86. package/dist/{dns-C2YPspGN.mjs → dns-wMjf1t6-.mjs} +14 -8
  87. package/dist/{docs-CYjyBA8q.mjs → docs-BA7qslb2.mjs} +1 -1
  88. package/dist/{durable-objects-DcI97y4p.mjs → durable-objects-DF0MYpnV.mjs} +1 -1
  89. package/dist/{email-auth-CMCQAu99.mjs → email-auth-BShMFXn4.mjs} +1 -1
  90. package/dist/email-domains-CDSbVclP.mjs +14 -0
  91. package/dist/{email-routing-7p9dr5Ue.mjs → email-routing-CBCkbg_F.mjs} +4 -2
  92. package/dist/{email-security-Bu0fAYh-.mjs → email-security-CnNa1YON.mjs} +4 -4
  93. package/dist/{email-sending-OpMZNaHZ.mjs → email-sending-CpDSw-Eb.mjs} +16 -16
  94. package/dist/{errors-C5RGao2J.mjs → errors-DatLr-iR.mjs} +1 -1
  95. package/dist/{field-extractors-BfsNjd0e.mjs → field-extractors-BwGdMnTr.mjs} +1 -1
  96. package/dist/{firewall-CJ-VIOk1.mjs → firewall-CY_oem-d.mjs} +25 -9
  97. package/dist/{flagship-C5PTR1ND.mjs → flagship-Bat5EZCk.mjs} +1 -1
  98. package/dist/{fraud-B7hwBheX.mjs → fraud-CSUKLh8X.mjs} +2 -2
  99. package/dist/global-options-DiKj2cQy.mjs +2 -0
  100. package/dist/{google-tag-gateway-D7iFDVEa.mjs → google-tag-gateway-C2skt6t-.mjs} +1 -1
  101. package/dist/{healthchecks-B4jTcKV7.mjs → healthchecks-uC43QKQd.mjs} +1 -1
  102. package/dist/{hyperdrive-1432DM-p.mjs → hyperdrive-FcBbpew4.mjs} +3 -3
  103. package/dist/iam-8T74DNhH.mjs +62 -0
  104. package/dist/{images-Ttea4khD.mjs → images-C3JUaf6b.mjs} +1 -1
  105. package/dist/index.mjs +1 -1
  106. package/dist/{init-BeYrAg7Q.mjs → init-BEVVz4_P.mjs} +1 -1
  107. package/dist/{intel-CJznBf5n.mjs → intel-DRy4rHrt.mjs} +6 -7
  108. package/dist/{interactive-DsU8VDvK.mjs → interactive-CKHdGvkh.mjs} +1 -1
  109. package/dist/{internal-DOho_iA0.mjs → internal-CamuESs0.mjs} +1 -1
  110. package/dist/{ips-BgNoRwFN.mjs → ips-DinCNnWj.mjs} +1 -1
  111. package/dist/k2-wsanPL3y.mjs +10 -0
  112. package/dist/{kv-CTyuvcAz.mjs → kv-BLSPcEnH.mjs} +1 -1
  113. package/dist/{lazy-command-DeTzOWvU.mjs → lazy-command-WB1FOuew.mjs} +1 -1
  114. package/dist/{leaked-credential-checks-21Wc7OqL.mjs → leaked-credential-checks-CSZd9hBQ.mjs} +1 -1
  115. package/dist/{live-BfrWKfq8.mjs → live-B6AsI_E5.mjs} +1 -1
  116. package/dist/{load-balancers-DMTsh-9q.mjs → load-balancers-gap5u4b1.mjs} +19 -7
  117. package/dist/local-CFsO9Tkg.mjs +2 -0
  118. package/dist/{local-CvzO-cQH.mjs → local-CgBhtmON.mjs} +1 -1
  119. package/dist/{local-runtime-DOpR_Tnc.mjs → local-runtime-CmlJ20uJ.mjs} +1 -1
  120. package/dist/{login-CVWkMh1L.mjs → login-BJHaTERg.mjs} +1 -1
  121. package/dist/login-BfuOf-Yi.mjs +2 -0
  122. package/dist/logpush-qhlxsioM.mjs +68 -0
  123. package/dist/{logs-BSyyNwso.mjs → logs-bI54CJ0w.mjs} +23 -7
  124. package/dist/{magic-network-monitoring-DRRvSrDP.mjs → magic-network-monitoring-CX3TaMTu.mjs} +1 -1
  125. package/dist/{magic-transit-BhP424T-.mjs → magic-transit-BwDyySHJ.mjs} +20 -20
  126. package/dist/{managed-defense-6l_B3hn_.mjs → managed-defense-CsBBkfeQ.mjs} +2 -2
  127. package/dist/{managed-transforms-D7FMBsnq.mjs → managed-transforms-CUC-uAbW.mjs} +1 -1
  128. package/dist/{mcp-BUOfMkBP.mjs → mcp-CyI0sDmL.mjs} +3 -3
  129. package/dist/{mesh-B1RrhAT1.mjs → mesh-Czr0UCP4.mjs} +2 -2
  130. package/dist/{migrate-BTU8AvlP.mjs → migrate-DKDWYrz2.mjs} +1 -1
  131. package/dist/{monetization-Da3ooFLC.mjs → monetization-NUgfDtSy.mjs} +7 -3
  132. package/dist/{network-CjhSzhMm.mjs → network-B42zrBic.mjs} +1 -1
  133. package/dist/{network-interconnects-DEQD6GM8.mjs → network-interconnects-DuIBe8fK.mjs} +4 -4
  134. package/dist/{o11y-DeNxXxcp.mjs → o11y-oEUpMC3O.mjs} +6 -6
  135. package/dist/{oauth-DdXkpU44.mjs → oauth-BLQ1-y3R.mjs} +1 -1
  136. package/dist/{oauth-Dnog5v-Q.mjs → oauth-BmSFLp_s.mjs} +1 -1
  137. package/dist/observability-BxhJQCgZ.mjs +4 -0
  138. package/dist/organization-CEnlXwrl.mjs +70 -0
  139. package/dist/{organizations-p8Mgo8A7.mjs → organizations-Dt86ToxE.mjs} +1 -1
  140. package/dist/{origin-post-quantum-encryption-Bwysyttf.mjs → origin-post-quantum-encryption-lX-uaJSL.mjs} +1 -1
  141. package/dist/package-CiRJBRHO.mjs +2 -0
  142. package/dist/{page-rules-D2eFbKWb.mjs → page-rules-J6LhwR-s.mjs} +1 -1
  143. package/dist/{pages-DYZDvWK6.mjs → pages-BksdnChs.mjs} +4 -4
  144. package/dist/{pay-per-crawl-CgPFv5HT.mjs → pay-per-crawl-BLcbHRoR.mjs} +1 -1
  145. package/dist/{pay-per-use-BIQrsrTy.mjs → pay-per-use-VatiU-Nt.mjs} +4 -2
  146. package/dist/{pipelines-D6pkhlpm.mjs → pipelines-B5AoB3f3.mjs} +5 -5
  147. package/dist/precursor-D3VH2MXT.mjs +4 -0
  148. package/dist/{previews-B1mqjXaJ.mjs → previews-DzJ85fsr.mjs} +1 -1
  149. package/dist/{progress-B-CVX0kn.mjs → progress-DLri-rA7.mjs} +1 -1
  150. package/dist/{prompt-DJF_Rs5S.mjs → prompt-D0dXwuME.mjs} +1 -1
  151. package/dist/{queues-DaqLO-UO.mjs → queues-BsAck4To.mjs} +5 -5
  152. package/dist/{r2-DDIU9JN3.mjs → r2-BYjdHDEZ.mjs} +38 -38
  153. package/dist/{radar-D59qCgld.mjs → radar-CvLtu-Vr.mjs} +1 -1
  154. package/dist/{raw-fetch-BrOxDN9k.mjs → raw-fetch-DQeDx1wT.mjs} +1 -1
  155. package/dist/{ready-DgE08svD.mjs → ready-gsGEaWLL.mjs} +1 -1
  156. package/dist/{realtime-DWjdrDzv.mjs → realtime-DiCEgFTC.mjs} +81 -79
  157. package/dist/{registrar-uYOU1U27.mjs → registrar-D4wdgWpo.mjs} +8 -8
  158. package/dist/{registrar-sandbox-uzs3eOKk.mjs → registrar-sandbox-B6yopzdG.mjs} +2 -2
  159. package/dist/{reporting-Dx2YTick.mjs → reporting-BiHgnT8L.mjs} +1 -1
  160. package/dist/{request-headers-DHzBX7dQ.mjs → request-headers-CoxHUNcB.mjs} +1 -1
  161. package/dist/{request-tracers-B49cBKkj.mjs → request-tracers-817HTytF.mjs} +1 -1
  162. package/dist/{resource-sharing-CIsLVAcK.mjs → resource-sharing-CW9xxtq5.mjs} +12 -12
  163. package/dist/{rules-CjgLSlUC.mjs → rules-CRhe_ca9.mjs} +1 -1
  164. package/dist/rulesets-CKyc-Xlx.mjs +42 -0
  165. package/dist/{rum-vPEpMS_h.mjs → rum-BfnWHW_d.mjs} +1 -1
  166. package/dist/{run-BZ6Fj3jQ.mjs → run-Ciw_GIrC.mjs} +1 -1
  167. package/dist/run-DD45EQTm.mjs +2 -0
  168. package/dist/{schema-cache-C_rvto6Y.mjs → schema-cache-BIo0Gi2H.mjs} +1 -1
  169. package/dist/schema-flags-DrqvwQNw.mjs +4 -0
  170. package/dist/{scim-BA7XbsSu.mjs → scim-C4iRWNYB.mjs} +1 -1
  171. package/dist/{secrets-store-MEUNt1Ph.mjs → secrets-store-DgtzZRze.mjs} +1 -1
  172. package/dist/security-insights-SlUGW3F_.mjs +62 -0
  173. package/dist/{security-txt-DikhnR2L.mjs → security-txt-C3YS0REz.mjs} +1 -1
  174. package/dist/{session-BOnam-Wv.mjs → session-D2yuwO4i.mjs} +1 -1
  175. package/dist/{shared-DmmWSObC.mjs → shared--uVkAAd7.mjs} +1 -1
  176. package/dist/{signed-url-C-24KbWB.mjs → signed-url-ClLk45_J.mjs} +1 -1
  177. package/dist/{smart-shield-DPqLMz7M.mjs → smart-shield-Dn95hqUH.mjs} +1 -1
  178. package/dist/{snippets-Bi3Uq1DF.mjs → snippets-BNUKOajz.mjs} +1 -1
  179. package/dist/{spawn-C3hzWVrJ.mjs → spawn-DuT4snxu.mjs} +1 -1
  180. package/dist/{spectrum-BaWKMoAl.mjs → spectrum-Cj0BMtg2.mjs} +3 -3
  181. package/dist/{speed-DShjlpAs.mjs → speed-BrVeZRyX.mjs} +1 -1
  182. package/dist/{sql-DCoFf15T.mjs → sql-BX1pBqj3.mjs} +2 -2
  183. package/dist/src-DPnUfK4c.mjs +131 -0
  184. package/dist/{ssl-C4nt4pJK.mjs → ssl-Bx4LCutF.mjs} +3 -3
  185. package/dist/{startup-profile-CFJ_Lu1c.mjs → startup-profile-DqaYNT0b.mjs} +1 -1
  186. package/dist/startup-profile-tZNb2HGz.mjs +2 -0
  187. package/dist/{state-DmjHXZat.mjs → state-BmzOLELo.mjs} +1 -1
  188. package/dist/state-Uwfrmw5I.mjs +2 -0
  189. package/dist/{stream-CpZbnSpH.mjs → stream-BRzr6yh0.mjs} +1 -1
  190. package/dist/{tags-BIjQ3Kjh.mjs → tags-xVzjZxdt.mjs} +11 -5
  191. package/dist/{telemetry-BDhqOpUw.mjs → telemetry-CJ9URio3.mjs} +1 -1
  192. package/dist/telemetry-Pt5GpCKD.mjs +2 -0
  193. package/dist/tenant-custom-nameservers-M7Fxqh2W.mjs +8 -0
  194. package/dist/{tunnels-CXAO2CeL.mjs → tunnels-DQVXKUKA.mjs} +3 -3
  195. package/dist/{turnstile-Ctm0rs0q.mjs → turnstile-B_Ugzgom.mjs} +1 -1
  196. package/dist/ui-FYultowZ.mjs +2 -0
  197. package/dist/{update-check-D_Wtw0_D.mjs → update-check-DHUo4FOJ.mjs} +1 -1
  198. package/dist/{update-check-Dc7cRFlx.mjs → update-check-DRr0eRhB.mjs} +1 -1
  199. package/dist/update-check-worker.mjs +1 -1
  200. package/dist/{url-normalization-DOfc2Q7a.mjs → url-normalization-CZRQH_pJ.mjs} +1 -1
  201. package/dist/{url-scanner-J8M3X2tR.mjs → url-scanner-BH4PLy16.mjs} +1 -1
  202. package/dist/{user-BaF0qvvO.mjs → user-Bn82Qw0Y.mjs} +10 -12
  203. package/dist/{vectorize-D5qiggZU.mjs → vectorize-DoVVz_sh.mjs} +1 -1
  204. package/dist/version-Zr2oF8mY.mjs +2 -0
  205. package/dist/{waiting-rooms-BdmAq7ul.mjs → waiting-rooms-QUW131o3.mjs} +5 -3
  206. package/dist/{web-assets-BySw_Tme.mjs → web-assets-CgQXsp8m.mjs} +2 -2
  207. package/dist/{web3-BKkKf1RF.mjs → web3-TY9s6Swn.mjs} +3 -3
  208. package/dist/workers-B3uJqJKc.mjs +39 -0
  209. package/dist/{workers-builds-CVJ4FqzB.mjs → workers-builds-BgGY0IGk.mjs} +2 -2
  210. package/dist/{workers-for-platforms-mzdtmr6r.mjs → workers-for-platforms-5RkV9MVp.mjs} +2 -2
  211. package/dist/workers-vpc-Bt4OQbwM.mjs +12 -0
  212. package/dist/{workflows-Cr957c4U.mjs → workflows-6m85DdqF.mjs} +7 -7
  213. package/dist/{wrangler-migration-DZV7-4Fp.mjs → wrangler-migration-BbmGOu8l.mjs} +3 -3
  214. package/dist/{zaraz-C8__FhOh.mjs → zaraz-8WSJ7l0L.mjs} +2 -2
  215. package/dist/{zero-trust-BVCvQJ4e.mjs → zero-trust-DK0cqDZv.mjs} +483 -405
  216. package/dist/{zones-BzyjOT10.mjs → zones-DTAcguf6.mjs} +3 -3
  217. package/package.json +14 -14
  218. package/dist/abuse-reports-zPrsxbRz.mjs +0 -24
  219. package/dist/ai-search-QOenIzDL.mjs +0 -74
  220. package/dist/auth-Czzy5Rs_.mjs +0 -2
  221. package/dist/billing-BrLJqlOf.mjs +0 -22
  222. package/dist/bot-management-BSBVuKc0.mjs +0 -9
  223. package/dist/browser-run-BSVANGzU.mjs +0 -40
  224. package/dist/build-CPKxZ3kL.mjs +0 -2
  225. package/dist/chunk-3PJ54H4K-CY8EY_n2.mjs +0 -363
  226. package/dist/containers-D4sa-Eoy.mjs +0 -380
  227. package/dist/custom-csrs-Dl_daAbX.mjs +0 -10
  228. package/dist/custom-nameservers-Bw2P7F_W.mjs +0 -8
  229. package/dist/custom-pages-CJ7ecSX6.mjs +0 -20
  230. package/dist/d1-BsWI546w.mjs +0 -89
  231. package/dist/email-domains-1Nx60ETD.mjs +0 -12
  232. package/dist/iam-DuZenYtc.mjs +0 -48
  233. package/dist/k2-Cj1ORHul.mjs +0 -10
  234. package/dist/local-CWTti4ot.mjs +0 -2
  235. package/dist/login-Djz5mvHJ.mjs +0 -2
  236. package/dist/logpush-OMhp7VgE.mjs +0 -44
  237. package/dist/magic-cloud-networking-DD29yMnE.mjs +0 -68
  238. package/dist/oauth-clients-UnbMcHkx.mjs +0 -14
  239. package/dist/oauth-scopes-DbtnZVO4.mjs +0 -4
  240. package/dist/organization-IsxVyWol.mjs +0 -73
  241. package/dist/package-BOE_De2L.mjs +0 -2
  242. package/dist/precursor-B35P8h6h.mjs +0 -4
  243. package/dist/rulesets-C7_aZA7m.mjs +0 -34
  244. package/dist/run-D4-K_cbQ.mjs +0 -2
  245. package/dist/schema-flags-Cr6kleor.mjs +0 -4
  246. package/dist/security-insights-ZKtey62s.mjs +0 -40
  247. package/dist/src-jyCTFHcS.mjs +0 -131
  248. package/dist/startup-profile-D_Qjgca1.mjs +0 -2
  249. package/dist/state-C7lNNN31.mjs +0 -2
  250. package/dist/telemetry-BZdRnr26.mjs +0 -2
  251. package/dist/tenant-CqYoylyU.mjs +0 -10
  252. package/dist/tenant-custom-nameservers-DDzzdyY3.mjs +0 -8
  253. package/dist/ui-BUCBQ3Sq.mjs +0 -2
  254. package/dist/version-DNcdABcr.mjs +0 -2
  255. package/dist/workers-TS0oQ-XH.mjs +0 -39
  256. package/dist/workers-vpc-xB1hHFPd.mjs +0 -12
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CvzO-cQH.mjs";import{n}from"./auth-D5Yj9eYU.mjs";import{a as r,t as i}from"./context-BvLXzoMs.mjs";import{t as a}from"./output-BJEgbI0G.mjs";import{t as o}from"./dry-run-gy0Hl9xo.mjs";import{t as s}from"./progress-B-CVX0kn.mjs";import{t as c}from"./run-BZ6Fj3jQ.mjs";import"./telemetry-BZdRnr26.mjs";import{n as l,t as u}from"./body-parser-BKcZS9iJ.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{a as f,i as p,n as m}from"./prompt-DJF_Rs5S.mjs";var h={method:`POST`,path:t=>e`/accounts/${t.account_id}/hyperdrive/configs`,body:`json`};function g(e){return e.usage(`$0 hyperdrive create
2
+ import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CgBhtmON.mjs";import{n}from"./auth-FK2eLQ02.mjs";import{a as r,t as i}from"./context-Dp4CXG22.mjs";import{t as a}from"./output-BJEgbI0G.mjs";import{t as o}from"./dry-run-gy0Hl9xo.mjs";import{t as s}from"./progress-DLri-rA7.mjs";import{t as c}from"./run-Ciw_GIrC.mjs";import"./telemetry-Pt5GpCKD.mjs";import{n as l,t as u}from"./body-parser-BKcZS9iJ.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{a as f,i as p,n as m}from"./prompt-D0dXwuME.mjs";var h={method:`POST`,path:t=>e`/accounts/${t.account_id}/hyperdrive/configs`,body:`json`};function g(e){return e.usage(`$0 hyperdrive create
3
3
 
4
4
  Creates and returns a new Hyperdrive configuration. For a PlanetScale integration, the Cloudflare account must already be linked to PlanetScale in the Hyperdrive dashboard.`).option(`mtls-ca-certificate-id`,{type:`string`,description:`Define CA certificate ID obtained after uploading CA cert.`}).option(`mtls-certificate-id`,{type:`string`,description:`Define mTLS certificate ID obtained after uploading client cert.`}).option(`mtls-sslmode`,{type:`string`,description:"PostgreSQL accepts `require`, `verify-ca`, and `verify-full`. MySQL accepts `REQUIRED`, `VERIFY_CA`, and `VERIFY_IDENTITY`. The verify modes require a CA certificate; the require modes cannot be used with a CA certificate.",choices:[`require`,`verify-ca`,`verify-full`,`REQUIRED`,`VERIFY_CA`,`VERIFY_IDENTITY`]}).coerce(`mtls-sslmode`,e=>d(e,`mtls-sslmode`,`text`)).option(`name`,{type:`string`,description:`The name of the Hyperdrive configuration. Used to identify the configuration in the Cloudflare dashboard and API.`}).option(`origin-connection-limit`,{type:`number`,description:`The (soft) maximum number of connections the Hyperdrive is allowed to make to the origin database.
5
5
 
@@ -7,7 +7,7 @@ Maximum allowed: 20 for free tier accounts, 100 for paid tier accounts.
7
7
  If not specified, defaults to 20 for free tier and 60 for paid tier.
8
8
  Certain Cloudflare-managed origins may be permitted a higher limit.
9
9
  Contact Cloudflare if you need a higher limit.
10
- `}).option(`integration-custom-database-name`,{type:`string`,description:"The database name to use when connecting. Defaults to `postgres` for PostgreSQL and `mysql` for MySQL."}).option(`integration-database-branch-name`,{type:`string`,description:`The name of the PlanetScale database branch.`}).option(`integration-database-name`,{type:`string`,description:`The name of the PlanetScale database.`}).option(`integration-organization-name`,{type:`string`,description:`The name of the PlanetScale organization.`}).option(`integration-provider`,{type:`string`,description:`The database integration provider used by this operation.`,choices:[`planetscale`]}).coerce(`integration-provider`,e=>d(e,`integration-provider`,`text`)).option(`integration-scheme`,{type:`string`,description:`Specifies the URL scheme used to connect to your origin database.`,choices:[`postgres`,`postgresql`,`mysql`]}).coerce(`integration-scheme`,e=>d(e,`integration-scheme`,`text`)).option(`origin-database`,{type:`string`,description:`Set the name of your origin database.`}).option(`origin-password`,{type:`string`,description:`Set the password needed to access your origin database. The API never returns this write-only value.`}).option(`origin-scheme`,{type:`string`,description:`Specifies the URL scheme used to connect to your origin database.`,choices:[`postgres`,`postgresql`,`mysql`]}).coerce(`origin-scheme`,e=>d(e,`origin-scheme`,`text`)).option(`origin-user`,{type:`string`,description:`Set the user of your origin database.`}).option(`origin-host`,{type:`string`,description:`Defines the publicly reachable hostname or IP of your origin database. Private, loopback, and link-local IP addresses are not allowed.`}).option(`origin-port`,{type:`number`,description:`Defines the port of your origin database. Defaults to 5432 for PostgreSQL or 3306 for MySQL if not specified.`}).option(`origin-access-client-id`,{type:`string`,description:`Defines the Client ID of the Access token to use when connecting to the origin database.`}).option(`origin-access-client-secret`,{type:`string`,description:`Defines the Client Secret of the Access Token to use when connecting to the origin database. The API never returns this write-only value.`}).option(`origin-service-id`,{type:`string`,description:`The identifier of the Workers VPC Service to connect through. Hyperdrive will egress through the specified VPC Service to reach the origin database.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`A request to create a Hyperdrive configuration using exactly one of caller-supplied origin credentials or a managed integration.`}).conflicts(`origin-host`,[`origin-service-id`]).conflicts(`origin-port`,[`origin-access-client-id`,`origin-access-client-secret`,`origin-service-id`]).implies(`origin-port`,[`origin-host`]).conflicts(`origin-access-client-id`,[`origin-port`,`origin-service-id`]).implies(`origin-access-client-id`,[`origin-access-client-secret`,`origin-host`]).conflicts(`origin-access-client-secret`,[`origin-port`,`origin-service-id`]).implies(`origin-access-client-secret`,[`origin-access-client-id`,`origin-host`]).conflicts(`origin-service-id`,[`origin-host`,`origin-port`,`origin-access-client-id`,`origin-access-client-secret`]).check(e=>{if([`origin-database`,`origin-password`,`origin-scheme`,`origin-user`,`origin-host`,`origin-port`,`origin-access-client-id`,`origin-access-client-secret`,`origin-service-id`].some(t=>e[t]!==void 0)){let t=[`origin-database`,`origin-password`,`origin-scheme`,`origin-user`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --origin-* flag is set`)}return!0})}const _={command:`create`,describe:`Create Hyperdrive`,builder:g,handler:async e=>c({command:`hyperdrive create`,classification:{safeFlags:[`mtls-sslmode`,`integration-provider`,`integration-scheme`,`origin-scheme`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf hyperdrive create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/hyperdrive/configs`,pathParams:{},bodyKind:`json`,body:e.body===void 0?u({mtls:{ca_certificate_id:d(e[`mtls-ca-certificate-id`],`mtls-ca-certificate-id`,`text`),mtls_certificate_id:d(e[`mtls-certificate-id`],`mtls-certificate-id`,`text`),sslmode:e[`mtls-sslmode`]},name:d(e.name,`name`,`text`),origin_connection_limit:e[`origin-connection-limit`],integration:{custom_database_name:d(e[`integration-custom-database-name`],`integration-custom-database-name`,`text`),database_branch_name:d(e[`integration-database-branch-name`],`integration-database-branch-name`,`text`),database_name:d(e[`integration-database-name`],`integration-database-name`,`text`),organization_name:d(e[`integration-organization-name`],`integration-organization-name`,`text`),provider:e[`integration-provider`],scheme:e[`integration-scheme`]},origin:{database:d(e[`origin-database`],`origin-database`,`text`),password:d(e[`origin-password`],`origin-password`,`text`),scheme:e[`origin-scheme`],user:d(e[`origin-user`],`origin-user`,`text`),host:d(e[`origin-host`],`origin-host`,`text`),port:e[`origin-port`],access_client_id:d(e[`origin-access-client-id`],`origin-access-client-id`,`text`),access_client_secret:d(e[`origin-access-client-secret`],`origin-access-client-secret`,`text`),service_id:d(e[`origin-service-id`],`origin-service-id`,`text`)}}):l(e.body),sensitiveBodyPaths:[[`origin`,`password`],[`origin`,`access_client_secret`]]});return}let c=await n(e),p=e.local?t:await i();if(e.accountId=p,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(h,{body:t,account_id:p}));a(n,{successLabel:`Created`});return}e.name===void 0&&(e.name=await f(`name`,`The name of the Hyperdrive configuration. Used to identify the configuration in the Cloudflare dashboard and API.`));let m=u({mtls:{ca_certificate_id:d(e[`mtls-ca-certificate-id`],`mtls-ca-certificate-id`,`text`),mtls_certificate_id:d(e[`mtls-certificate-id`],`mtls-certificate-id`,`text`),sslmode:e[`mtls-sslmode`]},name:d(e.name,`name`,`text`),origin_connection_limit:e[`origin-connection-limit`],integration:{custom_database_name:d(e[`integration-custom-database-name`],`integration-custom-database-name`,`text`),database_branch_name:d(e[`integration-database-branch-name`],`integration-database-branch-name`,`text`),database_name:d(e[`integration-database-name`],`integration-database-name`,`text`),organization_name:d(e[`integration-organization-name`],`integration-organization-name`,`text`),provider:e[`integration-provider`],scheme:e[`integration-scheme`]},origin:{database:d(e[`origin-database`],`origin-database`,`text`),password:d(e[`origin-password`],`origin-password`,`text`),scheme:e[`origin-scheme`],user:d(e[`origin-user`],`origin-user`,`text`),host:d(e[`origin-host`],`origin-host`,`text`),port:e[`origin-port`],access_client_id:d(e[`origin-access-client-id`],`origin-access-client-id`,`text`),access_client_secret:d(e[`origin-access-client-secret`],`origin-access-client-secret`,`text`),service_id:d(e[`origin-service-id`],`origin-service-id`,`text`)}}),g=await s(`Creating`,async()=>c.send(h,{body:m,account_id:p}));a(g,{successLabel:`Created`})})};var v={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/hyperdrive/configs/${t.hyperdrive_id}`};function y(e){return e.usage(`$0 hyperdrive delete <hyperdrive-id>
10
+ `}).option(`integration-custom-database-name`,{type:`string`,description:"The database name to use when connecting. Defaults to `postgres` for PostgreSQL and `mysql` for MySQL."}).option(`integration-database-branch-name`,{type:`string`,description:`The name of the PlanetScale database branch.`}).option(`integration-database-name`,{type:`string`,description:`The name of the PlanetScale database.`}).option(`integration-organization-name`,{type:`string`,description:`The name of the PlanetScale organization.`}).option(`integration-provider`,{type:`string`,description:`The database integration provider used by this operation.`,choices:[`planetscale`]}).coerce(`integration-provider`,e=>d(e,`integration-provider`,`text`)).option(`integration-scheme`,{type:`string`,description:`Specifies the URL scheme used to connect to your origin database.`,choices:[`postgres`,`postgresql`,`mysql`]}).coerce(`integration-scheme`,e=>d(e,`integration-scheme`,`text`)).option(`origin-database`,{type:`string`,description:`Set the name of your origin database.`}).option(`origin-password`,{type:`string`,description:`Set the password needed to access your origin database. The API never returns this write-only value.`}).option(`origin-scheme`,{type:`string`,description:`Specifies the URL scheme used to connect to your origin database.`,choices:[`postgres`,`postgresql`,`mysql`]}).coerce(`origin-scheme`,e=>d(e,`origin-scheme`,`text`)).option(`origin-user`,{type:`string`,description:`Set the user of your origin database.`}).option(`origin-host`,{type:`string`,description:`Defines the publicly reachable hostname or IP of your origin database. Private, loopback, and link-local IP addresses are not allowed.`}).option(`origin-port`,{type:`number`,description:`Defines the port of your origin database. Defaults to 5432 for PostgreSQL or 3306 for MySQL if not specified.`}).option(`origin-access-client-id`,{type:`string`,description:`Defines the Client ID of the Access token to use when connecting to the origin database.`}).option(`origin-access-client-secret`,{type:`string`,description:`Defines the Client Secret of the Access Token to use when connecting to the origin database. The API never returns this write-only value.`}).option(`origin-service-id`,{type:`string`,description:`The identifier of the Workers VPC Service to connect through. Hyperdrive will egress through the specified VPC Service to reach the origin database.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`A request to create a Hyperdrive configuration using exactly one of caller-supplied origin credentials or a managed integration.`}).conflicts(`integration-custom-database-name`,[`origin-database`,`origin-password`,`origin-scheme`,`origin-user`,`origin-host`,`origin-port`,`origin-access-client-id`,`origin-access-client-secret`,`origin-service-id`]).implies(`integration-custom-database-name`,[`integration-database-branch-name`,`integration-database-name`,`integration-organization-name`,`integration-provider`,`integration-scheme`]).conflicts(`integration-database-branch-name`,[`origin-database`,`origin-password`,`origin-scheme`,`origin-user`,`origin-host`,`origin-port`,`origin-access-client-id`,`origin-access-client-secret`,`origin-service-id`]).implies(`integration-database-branch-name`,[`integration-database-name`,`integration-organization-name`,`integration-provider`,`integration-scheme`]).conflicts(`integration-database-name`,[`origin-database`,`origin-password`,`origin-scheme`,`origin-user`,`origin-host`,`origin-port`,`origin-access-client-id`,`origin-access-client-secret`,`origin-service-id`]).implies(`integration-database-name`,[`integration-database-branch-name`,`integration-organization-name`,`integration-provider`,`integration-scheme`]).conflicts(`integration-organization-name`,[`origin-database`,`origin-password`,`origin-scheme`,`origin-user`,`origin-host`,`origin-port`,`origin-access-client-id`,`origin-access-client-secret`,`origin-service-id`]).implies(`integration-organization-name`,[`integration-database-branch-name`,`integration-database-name`,`integration-provider`,`integration-scheme`]).conflicts(`integration-provider`,[`origin-database`,`origin-password`,`origin-scheme`,`origin-user`,`origin-host`,`origin-port`,`origin-access-client-id`,`origin-access-client-secret`,`origin-service-id`]).implies(`integration-provider`,[`integration-database-branch-name`,`integration-database-name`,`integration-organization-name`,`integration-scheme`]).conflicts(`integration-scheme`,[`origin-database`,`origin-password`,`origin-scheme`,`origin-user`,`origin-host`,`origin-port`,`origin-access-client-id`,`origin-access-client-secret`,`origin-service-id`]).implies(`integration-scheme`,[`integration-database-branch-name`,`integration-database-name`,`integration-organization-name`,`integration-provider`]).conflicts(`origin-database`,[`integration-custom-database-name`,`integration-database-branch-name`,`integration-database-name`,`integration-organization-name`,`integration-provider`,`integration-scheme`]).implies(`origin-database`,[`origin-password`,`origin-scheme`,`origin-user`]).conflicts(`origin-password`,[`integration-custom-database-name`,`integration-database-branch-name`,`integration-database-name`,`integration-organization-name`,`integration-provider`,`integration-scheme`]).implies(`origin-password`,[`origin-database`,`origin-scheme`,`origin-user`]).conflicts(`origin-scheme`,[`integration-custom-database-name`,`integration-database-branch-name`,`integration-database-name`,`integration-organization-name`,`integration-provider`,`integration-scheme`]).implies(`origin-scheme`,[`origin-database`,`origin-password`,`origin-user`]).conflicts(`origin-user`,[`integration-custom-database-name`,`integration-database-branch-name`,`integration-database-name`,`integration-organization-name`,`integration-provider`,`integration-scheme`]).implies(`origin-user`,[`origin-database`,`origin-password`,`origin-scheme`]).conflicts(`origin-host`,[`origin-service-id`,`integration-custom-database-name`,`integration-database-branch-name`,`integration-database-name`,`integration-organization-name`,`integration-provider`,`integration-scheme`]).implies(`origin-host`,[`origin-database`,`origin-password`,`origin-scheme`,`origin-user`]).conflicts(`origin-port`,[`origin-access-client-id`,`origin-access-client-secret`,`origin-service-id`,`integration-custom-database-name`,`integration-database-branch-name`,`integration-database-name`,`integration-organization-name`,`integration-provider`,`integration-scheme`]).implies(`origin-port`,[`origin-host`,`origin-database`,`origin-password`,`origin-scheme`,`origin-user`]).conflicts(`origin-access-client-id`,[`origin-port`,`origin-service-id`,`integration-custom-database-name`,`integration-database-branch-name`,`integration-database-name`,`integration-organization-name`,`integration-provider`,`integration-scheme`]).implies(`origin-access-client-id`,[`origin-host`,`origin-access-client-secret`,`origin-database`,`origin-password`,`origin-scheme`,`origin-user`]).conflicts(`origin-access-client-secret`,[`origin-port`,`origin-service-id`,`integration-custom-database-name`,`integration-database-branch-name`,`integration-database-name`,`integration-organization-name`,`integration-provider`,`integration-scheme`]).implies(`origin-access-client-secret`,[`origin-host`,`origin-access-client-id`,`origin-database`,`origin-password`,`origin-scheme`,`origin-user`]).conflicts(`origin-service-id`,[`origin-host`,`origin-port`,`origin-access-client-id`,`origin-access-client-secret`,`integration-custom-database-name`,`integration-database-branch-name`,`integration-database-name`,`integration-organization-name`,`integration-provider`,`integration-scheme`]).implies(`origin-service-id`,[`origin-database`,`origin-password`,`origin-scheme`,`origin-user`])}const _={command:`create`,describe:`Create Hyperdrive`,builder:g,handler:async e=>c({command:`hyperdrive create`,classification:{safeFlags:[`mtls-sslmode`,`integration-provider`,`integration-scheme`,`origin-scheme`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf hyperdrive create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/hyperdrive/configs`,pathParams:{},bodyKind:`json`,body:e.body===void 0?u({mtls:{ca_certificate_id:d(e[`mtls-ca-certificate-id`],`mtls-ca-certificate-id`,`text`),mtls_certificate_id:d(e[`mtls-certificate-id`],`mtls-certificate-id`,`text`),sslmode:e[`mtls-sslmode`]},name:d(e.name,`name`,`text`),origin_connection_limit:e[`origin-connection-limit`],integration:{custom_database_name:d(e[`integration-custom-database-name`],`integration-custom-database-name`,`text`),database_branch_name:d(e[`integration-database-branch-name`],`integration-database-branch-name`,`text`),database_name:d(e[`integration-database-name`],`integration-database-name`,`text`),organization_name:d(e[`integration-organization-name`],`integration-organization-name`,`text`),provider:e[`integration-provider`],scheme:e[`integration-scheme`]},origin:{database:d(e[`origin-database`],`origin-database`,`text`),password:d(e[`origin-password`],`origin-password`,`text`),scheme:e[`origin-scheme`],user:d(e[`origin-user`],`origin-user`,`text`),host:d(e[`origin-host`],`origin-host`,`text`),port:e[`origin-port`],access_client_id:d(e[`origin-access-client-id`],`origin-access-client-id`,`text`),access_client_secret:d(e[`origin-access-client-secret`],`origin-access-client-secret`,`text`),service_id:d(e[`origin-service-id`],`origin-service-id`,`text`)}}):l(e.body),sensitiveBodyPaths:[[`origin`,`password`],[`origin`,`access_client_secret`]]});return}let c=await n(e),p=e.local?t:await i();if(e.accountId=p,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(h,{body:t,account_id:p}));a(n,{successLabel:`Created`});return}e.name===void 0&&(e.name=await f(`name`,`The name of the Hyperdrive configuration. Used to identify the configuration in the Cloudflare dashboard and API.`));let m=u({mtls:{ca_certificate_id:d(e[`mtls-ca-certificate-id`],`mtls-ca-certificate-id`,`text`),mtls_certificate_id:d(e[`mtls-certificate-id`],`mtls-certificate-id`,`text`),sslmode:e[`mtls-sslmode`]},name:d(e.name,`name`,`text`),origin_connection_limit:e[`origin-connection-limit`],integration:{custom_database_name:d(e[`integration-custom-database-name`],`integration-custom-database-name`,`text`),database_branch_name:d(e[`integration-database-branch-name`],`integration-database-branch-name`,`text`),database_name:d(e[`integration-database-name`],`integration-database-name`,`text`),organization_name:d(e[`integration-organization-name`],`integration-organization-name`,`text`),provider:e[`integration-provider`],scheme:e[`integration-scheme`]},origin:{database:d(e[`origin-database`],`origin-database`,`text`),password:d(e[`origin-password`],`origin-password`,`text`),scheme:e[`origin-scheme`],user:d(e[`origin-user`],`origin-user`,`text`),host:d(e[`origin-host`],`origin-host`,`text`),port:e[`origin-port`],access_client_id:d(e[`origin-access-client-id`],`origin-access-client-id`,`text`),access_client_secret:d(e[`origin-access-client-secret`],`origin-access-client-secret`,`text`),service_id:d(e[`origin-service-id`],`origin-service-id`,`text`)}}),g=await s(`Creating`,async()=>c.send(h,{body:m,account_id:p}));a(g,{successLabel:`Created`})})};var v={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/hyperdrive/configs/${t.hyperdrive_id}`};function y(e){return e.usage(`$0 hyperdrive delete <hyperdrive-id>
11
11
 
12
12
  Deletes the specified Hyperdrive.`).positional(`hyperdrive-id`,{type:`string`,description:`The unique identifier of the Hyperdrive configuration.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const b={command:`delete <hyperdrive-id>`,describe:`Delete Hyperdrive`,builder:y,handler:async e=>c({command:`hyperdrive delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf hyperdrive delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/hyperdrive/configs/${e[`hyperdrive-id`]==null?`<hyperdrive-id>`:encodeURIComponent(String(e[`hyperdrive-id`]))}`,pathParams:{"hyperdrive-id":String(e[`hyperdrive-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await m({force:!!e.force,message:`This operation deletes an existing Hyperdrive configuration.`}))return;let u=await s(`Deleting`,async()=>c.send(v,{account_id:l,hyperdrive_id:e[`hyperdrive-id`]}));a(u,{successLabel:`Deleted`})})};var x={method:`GET`,path:t=>e`/accounts/${t.account_id}/hyperdrive/configs/${t.hyperdrive_id}`};function S(e){return e.usage(`$0 hyperdrive get <hyperdrive-id>
13
13
 
@@ -23,7 +23,7 @@ Maximum allowed: 20 for free tier accounts, 100 for paid tier accounts.
23
23
  If not specified, defaults to 20 for free tier and 60 for paid tier.
24
24
  Certain Cloudflare-managed origins may be permitted a higher limit.
25
25
  Contact Cloudflare if you need a higher limit.
26
- `}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).conflicts(`origin-host`,[`origin-service-id`]).conflicts(`origin-port`,[`origin-access-client-id`,`origin-access-client-secret`,`origin-service-id`]).implies(`origin-port`,[`origin-host`]).conflicts(`origin-access-client-id`,[`origin-port`,`origin-service-id`]).implies(`origin-access-client-id`,[`origin-access-client-secret`,`origin-host`]).conflicts(`origin-access-client-secret`,[`origin-port`,`origin-service-id`]).implies(`origin-access-client-secret`,[`origin-access-client-id`,`origin-host`]).conflicts(`origin-service-id`,[`origin-host`,`origin-port`,`origin-access-client-id`,`origin-access-client-secret`])}const P={command:`replace <hyperdrive-id>`,describe:`Replace Hyperdrive`,builder:N,handler:async e=>c({command:`hyperdrive replace`,classification:{safeFlags:[`caching-disabled`,`mtls-sslmode`,`origin-scheme`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf hyperdrive replace`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/hyperdrive/configs/${e[`hyperdrive-id`]==null?`<hyperdrive-id>`:encodeURIComponent(String(e[`hyperdrive-id`]))}`,pathParams:{"hyperdrive-id":String(e[`hyperdrive-id`]??``)},bodyKind:`json`,body:e.body===void 0?u({caching:{disabled:e[`caching-disabled`],max_age:e[`caching-max-age`],stale_while_revalidate:e[`caching-stale-while-revalidate`]},mtls:{ca_certificate_id:d(e[`mtls-ca-certificate-id`],`mtls-ca-certificate-id`,`text`),mtls_certificate_id:d(e[`mtls-certificate-id`],`mtls-certificate-id`,`text`),sslmode:e[`mtls-sslmode`]},name:d(e.name,`name`,`text`),origin:{database:d(e[`origin-database`],`origin-database`,`text`),password:d(e[`origin-password`],`origin-password`,`text`),scheme:e[`origin-scheme`],user:d(e[`origin-user`],`origin-user`,`text`),host:d(e[`origin-host`],`origin-host`,`text`),port:e[`origin-port`],access_client_id:d(e[`origin-access-client-id`],`origin-access-client-id`,`text`),access_client_secret:d(e[`origin-access-client-secret`],`origin-access-client-secret`,`text`),service_id:d(e[`origin-service-id`],`origin-service-id`,`text`)},origin_connection_limit:e[`origin-connection-limit`]}):l(e.body),sensitiveBodyPaths:[[`origin`,`password`],[`origin`,`access_client_secret`]]});return}let c=await n(e),m=e.local?t:await i();if(e.accountId=m,e.body){let t=l(e.body),n=await s(`Updating`,async()=>c.send(M,{body:t,account_id:m,hyperdrive_id:e[`hyperdrive-id`]}));a(n,{successLabel:`Updated`});return}e.name===void 0&&(e.name=await f(`name`,`The name of the Hyperdrive configuration. Used to identify the configuration in the Cloudflare dashboard and API.`)),e[`origin-database`]===void 0&&(e[`origin-database`]=await f(`origin-database`,`Set the name of your origin database.`)),e[`origin-password`]===void 0&&(e[`origin-password`]=await f(`origin-password`,`Set the password needed to access your origin database. The API never returns this write-only value.`,{kind:`secret`})),e[`origin-scheme`]===void 0&&(e[`origin-scheme`]=await p(`origin-scheme`,`Specifies the URL scheme used to connect to your origin database.`,[`postgres`,`postgresql`,`mysql`])),e[`origin-user`]===void 0&&(e[`origin-user`]=await f(`origin-user`,`Set the user of your origin database.`));let h=u({caching:{disabled:e[`caching-disabled`],max_age:e[`caching-max-age`],stale_while_revalidate:e[`caching-stale-while-revalidate`]},mtls:{ca_certificate_id:d(e[`mtls-ca-certificate-id`],`mtls-ca-certificate-id`,`text`),mtls_certificate_id:d(e[`mtls-certificate-id`],`mtls-certificate-id`,`text`),sslmode:e[`mtls-sslmode`]},name:d(e.name,`name`,`text`),origin:{database:d(e[`origin-database`],`origin-database`,`text`),password:d(e[`origin-password`],`origin-password`,`text`),scheme:e[`origin-scheme`],user:d(e[`origin-user`],`origin-user`,`text`),host:d(e[`origin-host`],`origin-host`,`text`),port:e[`origin-port`],access_client_id:d(e[`origin-access-client-id`],`origin-access-client-id`,`text`),access_client_secret:d(e[`origin-access-client-secret`],`origin-access-client-secret`,`text`),service_id:d(e[`origin-service-id`],`origin-service-id`,`text`)},origin_connection_limit:e[`origin-connection-limit`]}),g=await s(`Updating`,async()=>c.send(M,{body:h,account_id:m,hyperdrive_id:e[`hyperdrive-id`]}));a(g,{successLabel:`Updated`})})};var F={method:`POST`,path:t=>e`/accounts/${t.account_id}/hyperdrive/configs/${t.hyperdrive_id}/restart`};function I(e){return e.usage(`$0 hyperdrive restart <hyperdrive-id>
26
+ `}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).conflicts(`origin-host`,[`origin-service-id`]).conflicts(`origin-port`,[`origin-access-client-id`,`origin-access-client-secret`,`origin-service-id`]).implies(`origin-port`,[`origin-host`]).conflicts(`origin-access-client-id`,[`origin-port`,`origin-service-id`]).implies(`origin-access-client-id`,[`origin-host`,`origin-access-client-secret`]).conflicts(`origin-access-client-secret`,[`origin-port`,`origin-service-id`]).implies(`origin-access-client-secret`,[`origin-host`,`origin-access-client-id`]).conflicts(`origin-service-id`,[`origin-host`,`origin-port`,`origin-access-client-id`,`origin-access-client-secret`])}const P={command:`replace <hyperdrive-id>`,describe:`Replace Hyperdrive`,builder:N,handler:async e=>c({command:`hyperdrive replace`,classification:{safeFlags:[`caching-disabled`,`mtls-sslmode`,`origin-scheme`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf hyperdrive replace`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/hyperdrive/configs/${e[`hyperdrive-id`]==null?`<hyperdrive-id>`:encodeURIComponent(String(e[`hyperdrive-id`]))}`,pathParams:{"hyperdrive-id":String(e[`hyperdrive-id`]??``)},bodyKind:`json`,body:e.body===void 0?u({caching:{disabled:e[`caching-disabled`],max_age:e[`caching-max-age`],stale_while_revalidate:e[`caching-stale-while-revalidate`]},mtls:{ca_certificate_id:d(e[`mtls-ca-certificate-id`],`mtls-ca-certificate-id`,`text`),mtls_certificate_id:d(e[`mtls-certificate-id`],`mtls-certificate-id`,`text`),sslmode:e[`mtls-sslmode`]},name:d(e.name,`name`,`text`),origin:{database:d(e[`origin-database`],`origin-database`,`text`),password:d(e[`origin-password`],`origin-password`,`text`),scheme:e[`origin-scheme`],user:d(e[`origin-user`],`origin-user`,`text`),host:d(e[`origin-host`],`origin-host`,`text`),port:e[`origin-port`],access_client_id:d(e[`origin-access-client-id`],`origin-access-client-id`,`text`),access_client_secret:d(e[`origin-access-client-secret`],`origin-access-client-secret`,`text`),service_id:d(e[`origin-service-id`],`origin-service-id`,`text`)},origin_connection_limit:e[`origin-connection-limit`]}):l(e.body),sensitiveBodyPaths:[[`origin`,`password`],[`origin`,`access_client_secret`]]});return}let c=await n(e),m=e.local?t:await i();if(e.accountId=m,e.body){let t=l(e.body),n=await s(`Updating`,async()=>c.send(M,{body:t,account_id:m,hyperdrive_id:e[`hyperdrive-id`]}));a(n,{successLabel:`Updated`});return}e.name===void 0&&(e.name=await f(`name`,`The name of the Hyperdrive configuration. Used to identify the configuration in the Cloudflare dashboard and API.`)),e[`origin-database`]===void 0&&(e[`origin-database`]=await f(`origin-database`,`Set the name of your origin database.`)),e[`origin-password`]===void 0&&(e[`origin-password`]=await f(`origin-password`,`Set the password needed to access your origin database. The API never returns this write-only value.`,{kind:`secret`})),e[`origin-scheme`]===void 0&&(e[`origin-scheme`]=await p(`origin-scheme`,`Specifies the URL scheme used to connect to your origin database.`,[`postgres`,`postgresql`,`mysql`])),e[`origin-user`]===void 0&&(e[`origin-user`]=await f(`origin-user`,`Set the user of your origin database.`));let h=u({caching:{disabled:e[`caching-disabled`],max_age:e[`caching-max-age`],stale_while_revalidate:e[`caching-stale-while-revalidate`]},mtls:{ca_certificate_id:d(e[`mtls-ca-certificate-id`],`mtls-ca-certificate-id`,`text`),mtls_certificate_id:d(e[`mtls-certificate-id`],`mtls-certificate-id`,`text`),sslmode:e[`mtls-sslmode`]},name:d(e.name,`name`,`text`),origin:{database:d(e[`origin-database`],`origin-database`,`text`),password:d(e[`origin-password`],`origin-password`,`text`),scheme:e[`origin-scheme`],user:d(e[`origin-user`],`origin-user`,`text`),host:d(e[`origin-host`],`origin-host`,`text`),port:e[`origin-port`],access_client_id:d(e[`origin-access-client-id`],`origin-access-client-id`,`text`),access_client_secret:d(e[`origin-access-client-secret`],`origin-access-client-secret`,`text`),service_id:d(e[`origin-service-id`],`origin-service-id`,`text`)},origin_connection_limit:e[`origin-connection-limit`]}),g=await s(`Updating`,async()=>c.send(M,{body:h,account_id:m,hyperdrive_id:e[`hyperdrive-id`]}));a(g,{successLabel:`Updated`})})};var F={method:`POST`,path:t=>e`/accounts/${t.account_id}/hyperdrive/configs/${t.hyperdrive_id}/restart`};function I(e){return e.usage(`$0 hyperdrive restart <hyperdrive-id>
27
27
 
28
28
  Restarts the connection pool for the specified Hyperdrive configuration without changing its configuration. Existing connections are drained and a new pool is established at the edge.`).positional(`hyperdrive-id`,{type:`string`,description:`The unique identifier of the Hyperdrive configuration.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const L={command:`restart <hyperdrive-id>`,describe:`Restart Hyperdrive`,builder:I,handler:async e=>c({command:`hyperdrive restart`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf hyperdrive restart`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/hyperdrive/configs/${e[`hyperdrive-id`]==null?`<hyperdrive-id>`:encodeURIComponent(String(e[`hyperdrive-id`]))}/restart`,pathParams:{"hyperdrive-id":String(e[`hyperdrive-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Creating`,async()=>c.send(F,{account_id:l,hyperdrive_id:e[`hyperdrive-id`]}));a(u,{successLabel:`Created`})})};var R={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/hyperdrive/configs/${t.hyperdrive_id}`,body:`json`};function z(e){return e.usage(`$0 hyperdrive update <hyperdrive-id>
29
29
 
@@ -0,0 +1,62 @@
1
+ #!/usr/bin/env node
2
+ import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CgBhtmON.mjs";import{t as n}from"./list-ByCv9-Fl.mjs";import{n as r}from"./auth-FK2eLQ02.mjs";import{a as i,t as a}from"./context-Dp4CXG22.mjs";import{t as o}from"./output-BJEgbI0G.mjs";import{t as s}from"./dry-run-gy0Hl9xo.mjs";import{t as c}from"./progress-DLri-rA7.mjs";import{t as l}from"./run-Ciw_GIrC.mjs";import"./telemetry-Pt5GpCKD.mjs";import{a as u,n as d,t as f}from"./body-parser-BKcZS9iJ.mjs";import{n as p}from"./input-validation-D7z60HJH.mjs";import{a as m,i as h,n as g}from"./prompt-D0dXwuME.mjs";var _={method:`POST`,path:t=>e`/accounts/${t.account_id}/oauth_clients`,body:`json`};function v(e){return e.usage(`$0 iam oauth-clients create
3
+
4
+ Create a new OAuth client for an account.`).option(`allowed-cors-origins`,{type:`string`,array:!0,description:`Array of allowed CORS origins.`}).option(`client-name`,{type:`string`,description:`Human-readable name of the OAuth client.`}).option(`client-uri`,{type:`string`,description:`URL of the home page of the client.`}).option(`grant-types`,{type:`string`,array:!0,description:"Array of OAuth grant types the client is allowed to use. `authorization_code` is required; `refresh_token` may be included optionally."}).option(`logo-uri`,{type:`string`,description:`URL of the client's logo.`}).option(`optional-scopes`,{type:`string`,array:!0,description:"Scopes that the authorizing user may decline during consent. Each value must also appear in `scopes`. The scopes `openid`, `offline`, and `offline_access` cannot be optional."}).option(`policy-uri`,{type:`string`,description:`URL that points to a privacy policy document.`}).option(`post-logout-redirect-uris`,{type:`string`,array:!0,description:`Array of allowed post-logout redirect URIs.`}).option(`redirect-uris`,{type:`string`,array:!0,description:`Array of allowed redirect URIs for the client.`}).option(`response-types`,{type:`string`,array:!0,description:`Array of OAuth response types the client is allowed to use.`}).option(`scopes`,{type:`string`,array:!0,description:"Array of OAuth scopes the client is allowed to request. Colon-delimited scopes are not accepted. Dot-delimited scopes are validated against available OAuth API scopes; simple identity scopes are allowed. Protocol scopes `offline_access` and `openid` are added or removed automatically based on `grant_types` and `response_types`."}).option(`token-endpoint-auth-method`,{type:`string`,description:`The authentication method the client uses at the token endpoint.`,choices:[`none`,`client_secret_basic`,`client_secret_post`]}).coerce(`token-endpoint-auth-method`,e=>p(e,`token-endpoint-auth-method`,`text`)).option(`tos-uri`,{type:`string`,description:`URL that points to a terms of service document.`}).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 OAuth Client`,builder:v,handler:async e=>l({command:`iam oauth-clients create`,classification:{safeFlags:[`token-endpoint-auth-method`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf iam oauth-clients create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/oauth_clients`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({allowed_cors_origins:e[`allowed-cors-origins`],client_name:p(e[`client-name`],`client-name`,`text`),client_uri:p(e[`client-uri`],`client-uri`,`text`),grant_types:e[`grant-types`],logo_uri:p(e[`logo-uri`],`logo-uri`,`text`),optional_scopes:e[`optional-scopes`],policy_uri:p(e[`policy-uri`],`policy-uri`,`text`),post_logout_redirect_uris:e[`post-logout-redirect-uris`],redirect_uris:e[`redirect-uris`],response_types:e[`response-types`],scopes:e.scopes,token_endpoint_auth_method:e[`token-endpoint-auth-method`],tos_uri:p(e[`tos-uri`],`tos-uri`,`text`)}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Creating`,async()=>n.send(_,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}if(e[`client-name`]===void 0&&(e[`client-name`]=await m(`client-name`,`Human-readable name of the OAuth client.`)),e[`grant-types`]===void 0)throw Error(`--grant-types is required (or pass --body with this field set).`);if(e[`redirect-uris`]===void 0)throw Error(`--redirect-uris is required (or pass --body with this field set).`);if(e[`response-types`]===void 0)throw Error(`--response-types is required (or pass --body with this field set).`);if(e.scopes===void 0)throw Error(`--scopes is required (or pass --body with this field set).`);e[`token-endpoint-auth-method`]===void 0&&(e[`token-endpoint-auth-method`]=await h(`token-endpoint-auth-method`,`The authentication method the client uses at the token endpoint.`,[`none`,`client_secret_basic`,`client_secret_post`]));let u=f({allowed_cors_origins:e[`allowed-cors-origins`],client_name:p(e[`client-name`],`client-name`,`text`),client_uri:p(e[`client-uri`],`client-uri`,`text`),grant_types:e[`grant-types`],logo_uri:p(e[`logo-uri`],`logo-uri`,`text`),optional_scopes:e[`optional-scopes`],policy_uri:p(e[`policy-uri`],`policy-uri`,`text`),post_logout_redirect_uris:e[`post-logout-redirect-uris`],redirect_uris:e[`redirect-uris`],response_types:e[`response-types`],scopes:e.scopes,token_endpoint_auth_method:e[`token-endpoint-auth-method`],tos_uri:p(e[`tos-uri`],`tos-uri`,`text`)}),g=await c(`Creating`,async()=>n.send(_,{body:u,account_id:l}));o(g,{successLabel:`Created`})})};var ee={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/oauth_clients/${t.oauth_client_id}/rotate_secret`};function te(e){return e.usage(`$0 iam oauth-clients delete-rotated-secret <oauth-client-id>
5
+
6
+ Removes the old client secret after a rotation, keeping only the new one. Use this after you have updated your client configuration to use the new secret. The \`has_rotated_secret\` field on the client indicates whether there is an old secret to delete.`).positional(`oauth-client-id`,{type:`string`,description:`The unique identifier for an OAuth client.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ne={command:`delete-rotated-secret <oauth-client-id>`,describe:`Delete Rotated OAuth Client Secret`,builder:te,handler:async e=>l({command:`iam oauth-clients delete-rotated-secret`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf iam oauth-clients delete-rotated-secret`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/oauth_clients/${e[`oauth-client-id`]==null?`<oauth-client-id>`:encodeURIComponent(String(e[`oauth-client-id`]))}/rotate_secret`,pathParams:{"oauth-client-id":String(e[`oauth-client-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await g({force:!!e.force,message:`Are you sure? This action cannot be undone.`}))return;let u=await c(`Deleting`,async()=>n.send(ee,{account_id:l,oauth_client_id:e[`oauth-client-id`]}));o(u,{successLabel:`Deleted`})})};var re={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/oauth_clients/${t.oauth_client_id}`};function ie(e){return e.usage(`$0 iam oauth-clients delete <oauth-client-id>
7
+
8
+ Delete an OAuth client.`).positional(`oauth-client-id`,{type:`string`,description:`The unique identifier for an OAuth client.`,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 ae={command:`delete <oauth-client-id>`,describe:`Delete OAuth Client`,builder:ie,handler:async e=>l({command:`iam oauth-clients delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf iam oauth-clients delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/oauth_clients/${e[`oauth-client-id`]==null?`<oauth-client-id>`:encodeURIComponent(String(e[`oauth-client-id`]))}`,pathParams:{"oauth-client-id":String(e[`oauth-client-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await g({force:!!e.force,message:`Are you sure? This action cannot be undone.`}))return;let u=await c(`Deleting`,async()=>n.send(re,{account_id:l,oauth_client_id:e[`oauth-client-id`]}));o(u,{successLabel:`Deleted`})})};var oe={method:`GET`,path:t=>e`/accounts/${t.account_id}/oauth_clients/${t.oauth_client_id}`};function b(e){return e.usage(`$0 iam oauth-clients get <oauth-client-id>
9
+
10
+ Get details of a specific OAuth client.`).positional(`oauth-client-id`,{type:`string`,description:`The unique identifier for an OAuth client.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const x={command:`get <oauth-client-id>`,describe:`OAuth Client Details`,builder:b,handler:async e=>l({command:`iam oauth-clients get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf iam oauth-clients get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/oauth_clients/${e[`oauth-client-id`]==null?`<oauth-client-id>`:encodeURIComponent(String(e[`oauth-client-id`]))}`,pathParams:{"oauth-client-id":String(e[`oauth-client-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(oe,{account_id:l,oauth_client_id:e[`oauth-client-id`]}));o(u,{successLabel:`Loaded`})})};var S={method:`GET`,path:t=>e`/accounts/${t.account_id}/oauth_clients`};function C(e){return e.usage(`$0 iam oauth-clients list
11
+
12
+ List all OAuth clients for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const w={command:`list`,describe:`List OAuth Clients`,builder:C,handler:async e=>l({command:`iam oauth-clients list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf iam oauth-clients list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/oauth_clients`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(S,{account_id:l}));o(u,{successLabel:`Loaded`})})};var T={method:`POST`,path:t=>e`/accounts/${t.account_id}/oauth_clients/${t.oauth_client_id}/rotate_secret`};function E(e){return e.usage("$0 iam oauth-clients rotate-secret <oauth-client-id>\n\nCreates a second client secret so you can update your client configuration before deleting the old one. The `has_rotated_secret` field on the client will be set to `true`.").positional(`oauth-client-id`,{type:`string`,description:`The unique identifier for an OAuth client.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const D={command:`rotate-secret <oauth-client-id>`,describe:`Rotate OAuth Client Secret`,builder:E,handler:async e=>l({command:`iam oauth-clients rotate-secret`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf iam oauth-clients rotate-secret`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/oauth_clients/${e[`oauth-client-id`]==null?`<oauth-client-id>`:encodeURIComponent(String(e[`oauth-client-id`]))}/rotate_secret`,pathParams:{"oauth-client-id":String(e[`oauth-client-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Creating`,async()=>n.send(T,{account_id:l,oauth_client_id:e[`oauth-client-id`]}));o(u,{successLabel:`Created`})})};var O={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/oauth_clients/${t.oauth_client_id}`,body:`json`};function k(e){return e.usage(`$0 iam oauth-clients update <oauth-client-id>
13
+
14
+ Update an existing OAuth client. Only include fields you want to update.`).positional(`oauth-client-id`,{type:`string`,description:`The unique identifier for an OAuth client.`,demandOption:!0}).option(`allowed-cors-origins`,{type:`string`,array:!0,description:`Array of allowed CORS origins.`}).option(`client-name`,{type:`string`,description:`Human-readable name of the OAuth client.`}).option(`client-uri`,{type:`string`,description:`URL of the home page of the client.`}).option(`grant-types`,{type:`string`,array:!0,description:"Array of OAuth grant types the client is allowed to use. `authorization_code` is required; `refresh_token` may be included optionally."}).option(`logo-uri`,{type:`string`,description:`URL of the client's logo.`}).option(`optional-scopes`,{type:`string`,array:!0,description:"Scopes that the authorizing user may decline during consent. Each value must also appear in `scopes`. The scopes `openid`, `offline`, and `offline_access` cannot be optional."}).option(`policy-uri`,{type:`string`,description:`URL that points to a privacy policy document.`}).option(`post-logout-redirect-uris`,{type:`string`,array:!0,description:`Array of allowed post-logout redirect URIs.`}).option(`redirect-uris`,{type:`string`,array:!0,description:`Array of allowed redirect URIs for the client.`}).option(`response-types`,{type:`string`,array:!0,description:`Array of OAuth response types the client is allowed to use.`}).option(`scopes`,{type:`string`,array:!0,description:"Array of OAuth scopes the client is allowed to request. Colon-delimited scopes are not accepted. Dot-delimited scopes are validated against available OAuth API scopes; simple identity scopes are allowed. Protocol scopes `offline_access` and `openid` are added or removed automatically based on `grant_types` and `response_types`."}).option(`token-endpoint-auth-method`,{type:`string`,description:`The authentication method the client uses at the token endpoint.`,choices:[`none`,`client_secret_basic`,`client_secret_post`]}).coerce(`token-endpoint-auth-method`,e=>p(e,`token-endpoint-auth-method`,`text`)).option(`tos-uri`,{type:`string`,description:`URL that points to a terms of service document.`}).option(`visibility`,{type:`string`,description:"Promote the OAuth client from private to public visibility. Only `public` is accepted; demotion to `private` is not supported. Promotion requires a non-empty client name, logo URI, verified client URI host, and at least one non-identity scope.",choices:[`public`]}).coerce(`visibility`,e=>p(e,`visibility`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Partial update request for an OAuth client. Only include fields you want to update.`})}const A={command:`update <oauth-client-id>`,describe:`Update OAuth Client`,builder:k,handler:async e=>l({command:`iam oauth-clients update`,classification:{safeFlags:[`token-endpoint-auth-method`,`visibility`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf iam oauth-clients update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/oauth_clients/${e[`oauth-client-id`]==null?`<oauth-client-id>`:encodeURIComponent(String(e[`oauth-client-id`]))}`,pathParams:{"oauth-client-id":String(e[`oauth-client-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({allowed_cors_origins:e[`allowed-cors-origins`],client_name:p(e[`client-name`],`client-name`,`text`),client_uri:p(e[`client-uri`],`client-uri`,`text`),grant_types:e[`grant-types`],logo_uri:p(e[`logo-uri`],`logo-uri`,`text`),optional_scopes:e[`optional-scopes`],policy_uri:p(e[`policy-uri`],`policy-uri`,`text`),post_logout_redirect_uris:e[`post-logout-redirect-uris`],redirect_uris:e[`redirect-uris`],response_types:e[`response-types`],scopes:e.scopes,token_endpoint_auth_method:e[`token-endpoint-auth-method`],tos_uri:p(e[`tos-uri`],`tos-uri`,`text`),visibility:e.visibility}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Updating`,async()=>n.send(O,{body:t,account_id:l,oauth_client_id:e[`oauth-client-id`]}));o(r,{successLabel:`Updated`});return}let u=f({allowed_cors_origins:e[`allowed-cors-origins`],client_name:p(e[`client-name`],`client-name`,`text`),client_uri:p(e[`client-uri`],`client-uri`,`text`),grant_types:e[`grant-types`],logo_uri:p(e[`logo-uri`],`logo-uri`,`text`),optional_scopes:e[`optional-scopes`],policy_uri:p(e[`policy-uri`],`policy-uri`,`text`),post_logout_redirect_uris:e[`post-logout-redirect-uris`],redirect_uris:e[`redirect-uris`],response_types:e[`response-types`],scopes:e.scopes,token_endpoint_auth_method:e[`token-endpoint-auth-method`],tos_uri:p(e[`tos-uri`],`tos-uri`,`text`),visibility:e.visibility}),m=await c(`Updating`,async()=>n.send(O,{body:u,account_id:l,oauth_client_id:e[`oauth-client-id`]}));o(m,{successLabel:`Updated`})})},j={command:`oauth-clients`,describe:`Operations for oauth-clients`,builder:e=>e.command(y).command(ae).command(ne).command(x).command(w).command(D).command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function M(e){return e.usage(`$0 iam oauth-scopes list
15
+
16
+ List all available OAuth scopes. This endpoint requires authentication but has no authorization role requirements.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const N={command:`list`,describe:`List OAuth Scopes`,builder:M,handler:async e=>l({command:`iam oauth-scopes list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf iam oauth-scopes list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/oauth/scopes`,pathParams:{},bodyKind:`none`});return}let t=await r(e),i=await c(`Loading`,async()=>t.send(n));o(i,{successLabel:`Loaded`})})},P={command:`oauth-scopes`,describe:`Operations for oauth-scopes`,builder:e=>e.command(N).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var F={method:`GET`,path:t=>e`/accounts/${t.account_id}/iam/permission_groups/${t.permission_group_id}`};function I(e){return e.usage(`$0 iam permission-groups get <permission-group-id>
17
+
18
+ Get information about a specific permission group in an account.`).positional(`permission-group-id`,{type:`string`,description:`Permission Group identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const L={command:`get <permission-group-id>`,describe:`Permission Group Details`,builder:I,handler:async e=>l({command:`iam permission-groups get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf iam permission-groups get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/iam/permission_groups/${e[`permission-group-id`]==null?`<permission-group-id>`:encodeURIComponent(String(e[`permission-group-id`]))}`,pathParams:{"permission-group-id":String(e[`permission-group-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(F,{account_id:l,permission_group_id:e[`permission-group-id`]}));o(u,{successLabel:`Loaded`})})};var R={method:`GET`,path:t=>e`/accounts/${t.account_id}/iam/permission_groups`,query:[`id`,`name`,`label`,`page`,`per_page`]};function z(e){return e.usage(`$0 iam permission-groups list
19
+
20
+ List all the permissions groups for an account.`).option(`id`,{type:`string`,description:`ID of the permission group to be fetched.`}).option(`name`,{type:`string`,description:`Name of the permission group to be fetched.`}).option(`label`,{type:`string`,description:`Label of the permission group to be fetched.`}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const B={command:`list`,describe:`List Account Permission Groups`,builder:z,handler:async e=>l({command:`iam permission-groups list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={id:e.id,name:e.name,label:e.label,page:e.page,per_page:e[`per-page`]};if(e.dryRun){let e=await i();s({command:`cf iam permission-groups list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/iam/permission_groups`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(R,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})},V={command:`permission-groups`,describe:`View the permission groups that can be assigned to API tokens and policies`,builder:e=>e.command(L).command(B).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var H={method:`POST`,path:t=>e`/accounts/${t.account_id}/iam/resource_groups`,body:`json`};function U(e){return e.usage(`$0 iam resource-groups create
21
+
22
+ Create a new Resource Group under the specified account.`).option(`name`,{type:`string`,description:`Name of the resource group`}).option(`scope-objects`,{type:`string`,description:`A list of scope objects for additional context. The number of Scope objects should not be zero. 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 W={command:`create`,describe:`Create Resource Group`,builder:U,handler:async e=>l({command:`iam resource-groups create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf iam resource-groups create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/iam/resource_groups`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({name:p(e.name,`name`,`text`),scope:{objects:u(e[`scope-objects`],`scope-objects`)}}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Creating`,async()=>n.send(H,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}if(e.name===void 0&&(e.name=await m(`name`,`Name of the resource group`)),e[`scope-objects`]===void 0)throw Error(`--scope-objects is required (or pass --body with this field set).`);let h=f({name:p(e.name,`name`,`text`),scope:{objects:u(e[`scope-objects`],`scope-objects`)}}),g=await c(`Creating`,async()=>n.send(H,{body:h,account_id:l}));o(g,{successLabel:`Created`})})};var G={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/iam/resource_groups/${t.resource_group_id}`};function K(e){return e.usage(`$0 iam resource-groups delete <resource-group-id>
23
+
24
+ Remove a resource group from an account.`).positional(`resource-group-id`,{type:`string`,description:`Resource Group identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const q={command:`delete <resource-group-id>`,describe:`Remove Resource Group`,builder:K,handler:async e=>l({command:`iam resource-groups delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf iam resource-groups delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/iam/resource_groups/${e[`resource-group-id`]==null?`<resource-group-id>`:encodeURIComponent(String(e[`resource-group-id`]))}`,pathParams:{"resource-group-id":String(e[`resource-group-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await g({force:!!e.force,message:`Are you sure? This action cannot be undone.`}))return;let u=await c(`Deleting`,async()=>n.send(G,{account_id:l,resource_group_id:e[`resource-group-id`]}));o(u,{successLabel:`Deleted`})})};var se={method:`GET`,path:t=>e`/accounts/${t.account_id}/iam/resource_groups/${t.resource_group_id}`};function ce(e){return e.usage(`$0 iam resource-groups get <resource-group-id>
25
+
26
+ Get information about a specific resource group in an account.`).positional(`resource-group-id`,{type:`string`,description:`Resource Group identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const le={command:`get <resource-group-id>`,describe:`Resource Group Details`,builder:ce,handler:async e=>l({command:`iam resource-groups get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf iam resource-groups get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/iam/resource_groups/${e[`resource-group-id`]==null?`<resource-group-id>`:encodeURIComponent(String(e[`resource-group-id`]))}`,pathParams:{"resource-group-id":String(e[`resource-group-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(se,{account_id:l,resource_group_id:e[`resource-group-id`]}));o(u,{successLabel:`Loaded`})})};var ue={method:`GET`,path:t=>e`/accounts/${t.account_id}/iam/resource_groups`,query:[`id`,`name`]};function de(e){return e.usage(`$0 iam resource-groups list
27
+
28
+ List all the resource groups for an account.`).option(`id`,{type:`string`,description:`ID of the resource group to be fetched.`}).option(`name`,{type:`string`,description:`Name of the resource group to be fetched.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const fe={command:`list`,describe:`List Resource Groups`,builder:de,handler:async e=>l({command:`iam resource-groups list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={id:e.id,name:e.name};if(e.dryRun){let e=await i();s({command:`cf iam resource-groups list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/iam/resource_groups`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(ue,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var J={method:`PUT`,path:t=>e`/accounts/${t.account_id}/iam/resource_groups/${t.resource_group_id}`,body:`json`};function pe(e){return e.usage(`$0 iam resource-groups update <resource-group-id>
29
+
30
+ Modify an existing resource group.`).positional(`resource-group-id`,{type:`string`,description:`Resource Group identifier tag.`,demandOption:!0}).option(`name`,{type:`string`,description:`Name of the resource group`}).option(`scope-objects`,{type:`string`,description:`A list of scope objects for additional context. The number of Scope objects should not be zero. 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 me={command:`update <resource-group-id>`,describe:`Update Resource Group`,builder:pe,handler:async e=>l({command:`iam resource-groups update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf iam resource-groups update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/iam/resource_groups/${e[`resource-group-id`]==null?`<resource-group-id>`:encodeURIComponent(String(e[`resource-group-id`]))}`,pathParams:{"resource-group-id":String(e[`resource-group-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({name:p(e.name,`name`,`text`),scope:{objects:u(e[`scope-objects`],`scope-objects`)}}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Updating`,async()=>n.send(J,{body:t,account_id:l,resource_group_id:e[`resource-group-id`]}));o(r,{successLabel:`Updated`});return}let m=f({name:p(e.name,`name`,`text`),scope:{objects:u(e[`scope-objects`],`scope-objects`)}}),h=await c(`Updating`,async()=>n.send(J,{body:m,account_id:l,resource_group_id:e[`resource-group-id`]}));o(h,{successLabel:`Updated`})})},he={command:`resource-groups`,describe:`Define scopes that limit which account resources a policy or token can access`,builder:e=>e.command(W).command(q).command(le).command(fe).command(me).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ge={method:`POST`,path:t=>e`/accounts/${t.account_id}/sso_connectors/${t.sso_connector_id}/begin_verification`};function _e(e){return e.usage(`$0 iam sso begin-verification <sso-connector-id>
31
+
32
+ Validates the user has added the DNS TXT record required for validating ownership of the domain they are trying to set up a connector for.`).positional(`sso-connector-id`,{type:`string`,description:`SSO Connector identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ve={command:`begin-verification <sso-connector-id>`,describe:`Begin SSO connector verification`,builder:_e,handler:async e=>l({command:`iam sso begin-verification`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf iam sso begin-verification`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/sso_connectors/${e[`sso-connector-id`]==null?`<sso-connector-id>`:encodeURIComponent(String(e[`sso-connector-id`]))}/begin_verification`,pathParams:{"sso-connector-id":String(e[`sso-connector-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Creating`,async()=>n.send(ge,{account_id:l,sso_connector_id:e[`sso-connector-id`]}));o(u,{successLabel:`Created`})})};var Y={method:`POST`,path:t=>e`/accounts/${t.account_id}/sso_connectors`,body:`json`};function ye(e){return e.usage(`$0 iam sso create
33
+
34
+ Creates a new SSO connector for logging into Cloudflare through an identity provider.`).option(`begin-verification`,{type:`boolean`,description:`Begin the verification process after creation`,default:!0}).option(`email-domain`,{type:`string`,description:`Email domain of the new SSO connector`}).option(`use-fedramp-language`,{type:`boolean`,description:`Controls the display of FedRAMP language to the user during SSO login`,default:!1}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const be={command:`create`,describe:`Initialize new SSO connector`,builder:ye,handler:async e=>l({command:`iam sso create`,classification:{safeFlags:[`begin-verification`,`use-fedramp-language`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf iam sso create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/sso_connectors`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({begin_verification:e[`begin-verification`],email_domain:p(e[`email-domain`],`email-domain`,`text`),use_fedramp_language:e[`use-fedramp-language`]}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Creating`,async()=>n.send(Y,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}e[`email-domain`]===void 0&&(e[`email-domain`]=await m(`email-domain`,`Email domain of the new SSO connector`));let u=f({begin_verification:e[`begin-verification`],email_domain:p(e[`email-domain`],`email-domain`,`text`),use_fedramp_language:e[`use-fedramp-language`]}),h=await c(`Creating`,async()=>n.send(Y,{body:u,account_id:l}));o(h,{successLabel:`Created`})})};var xe={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/sso_connectors/${t.sso_connector_id}`};function Se(e){return e.usage(`$0 iam sso delete <sso-connector-id>
35
+
36
+ Deletes an SSO connector from the account.`).positional(`sso-connector-id`,{type:`string`,description:`SSO Connector identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Ce={command:`delete <sso-connector-id>`,describe:`Delete SSO connector`,builder:Se,handler:async e=>l({command:`iam sso delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf iam sso delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/sso_connectors/${e[`sso-connector-id`]==null?`<sso-connector-id>`:encodeURIComponent(String(e[`sso-connector-id`]))}`,pathParams:{"sso-connector-id":String(e[`sso-connector-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await g({force:!!e.force,message:`Are you sure? This action cannot be undone.`}))return;let u=await c(`Deleting`,async()=>n.send(xe,{account_id:l,sso_connector_id:e[`sso-connector-id`]}));o(u,{successLabel:`Deleted`})})};var we={method:`GET`,path:t=>e`/accounts/${t.account_id}/sso_connectors/${t.sso_connector_id}`};function Te(e){return e.usage(`$0 iam sso get <sso-connector-id>
37
+
38
+ Retrieves details for a specific SSO connector.`).positional(`sso-connector-id`,{type:`string`,description:`SSO Connector identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ee={command:`get <sso-connector-id>`,describe:`Get single SSO connector`,builder:Te,handler:async e=>l({command:`iam sso get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf iam sso get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/sso_connectors/${e[`sso-connector-id`]==null?`<sso-connector-id>`:encodeURIComponent(String(e[`sso-connector-id`]))}`,pathParams:{"sso-connector-id":String(e[`sso-connector-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(we,{account_id:l,sso_connector_id:e[`sso-connector-id`]}));o(u,{successLabel:`Loaded`})})};var De={method:`GET`,path:t=>e`/accounts/${t.account_id}/sso_connectors`};function Oe(e){return e.usage(`$0 iam sso list
39
+
40
+ Lists all SSO connectors configured for the account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ke={command:`list`,describe:`Get all SSO connectors`,builder:Oe,handler:async e=>l({command:`iam sso list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf iam sso list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/sso_connectors`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(De,{account_id:l}));o(u,{successLabel:`Loaded`})})};var X={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/sso_connectors/${t.sso_connector_id}`,body:`json`};function Ae(e){return e.usage(`$0 iam sso update <sso-connector-id>
41
+
42
+ Updates the state or configuration of an SSO connector.`).positional(`sso-connector-id`,{type:`string`,description:`SSO Connector identifier tag.`,demandOption:!0}).option(`enabled`,{type:`boolean`,description:`SSO Connector enabled state`}).option(`use-fedramp-language`,{type:`boolean`,description:`Controls the display of FedRAMP language to the user during SSO login`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const je={command:`update <sso-connector-id>`,describe:`Update SSO connector state`,builder:Ae,handler:async e=>l({command:`iam sso update`,classification:{safeFlags:[`enabled`,`use-fedramp-language`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf iam sso update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/sso_connectors/${e[`sso-connector-id`]==null?`<sso-connector-id>`:encodeURIComponent(String(e[`sso-connector-id`]))}`,pathParams:{"sso-connector-id":String(e[`sso-connector-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({enabled:e.enabled,use_fedramp_language:e[`use-fedramp-language`]}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Updating`,async()=>n.send(X,{body:t,account_id:l,sso_connector_id:e[`sso-connector-id`]}));o(r,{successLabel:`Updated`});return}let u=f({enabled:e.enabled,use_fedramp_language:e[`use-fedramp-language`]}),p=await c(`Updating`,async()=>n.send(X,{body:u,account_id:l,sso_connector_id:e[`sso-connector-id`]}));o(p,{successLabel:`Updated`})})},Me={command:`sso`,describe:`Configure single sign-on connectors to authenticate account members through an external identity provider`,builder:e=>e.command(ve).command(be).command(Ce).command(Ee).command(ke).command(je).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Z={method:`POST`,path:t=>e`/accounts/${t.account_id}/iam/user_groups`,body:`json`};function Ne(e){return e.usage(`$0 iam user-groups create
43
+
44
+ Create a new user group under the specified account.`).option(`name`,{type:`string`,description:`Name of the User group.`}).option(`policies`,{type:`string`,description:`Policies attached to the User group. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Pe={command:`create`,describe:`Create User Group`,builder:Ne,handler:async e=>l({command:`iam user-groups create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf iam user-groups create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/iam/user_groups`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({name:p(e.name,`name`,`text`),policies:u(e.policies,`policies`)}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Creating`,async()=>n.send(Z,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}e.name===void 0&&(e.name=await m(`name`,`Name of the User group.`));let h=f({name:p(e.name,`name`,`text`),policies:u(e.policies,`policies`)}),g=await c(`Creating`,async()=>n.send(Z,{body:h,account_id:l}));o(g,{successLabel:`Created`})})};var Fe={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/iam/user_groups/${t.user_group_id}`};function Ie(e){return e.usage(`$0 iam user-groups delete <user-group-id>
45
+
46
+ Remove a user group from an account.`).positional(`user-group-id`,{type:`string`,description:`User Group identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Le={command:`delete <user-group-id>`,describe:`Remove User Group`,builder:Ie,handler:async e=>l({command:`iam user-groups delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf iam user-groups delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/iam/user_groups/${e[`user-group-id`]==null?`<user-group-id>`:encodeURIComponent(String(e[`user-group-id`]))}`,pathParams:{"user-group-id":String(e[`user-group-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await g({force:!!e.force,message:`Are you sure? This action cannot be undone.`}))return;let u=await c(`Deleting`,async()=>n.send(Fe,{account_id:l,user_group_id:e[`user-group-id`]}));o(u,{successLabel:`Deleted`})})};var Re={method:`GET`,path:t=>e`/accounts/${t.account_id}/iam/user_groups/${t.user_group_id}`};function ze(e){return e.usage(`$0 iam user-groups get <user-group-id>
47
+
48
+ Get information about a specific user group in an account.`).positional(`user-group-id`,{type:`string`,description:`User Group identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Be={command:`get <user-group-id>`,describe:`User Group Details`,builder:ze,handler:async e=>l({command:`iam user-groups get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf iam user-groups get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/iam/user_groups/${e[`user-group-id`]==null?`<user-group-id>`:encodeURIComponent(String(e[`user-group-id`]))}`,pathParams:{"user-group-id":String(e[`user-group-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Re,{account_id:l,user_group_id:e[`user-group-id`]}));o(u,{successLabel:`Loaded`})})};var Ve={method:`GET`,path:t=>e`/accounts/${t.account_id}/iam/user_groups`,query:[`id`,`name`,`fuzzyName`,`page`,`per_page`,`direction`]};function He(e){return e.usage(`$0 iam user-groups list
49
+
50
+ List all the user groups for an account.`).option(`id`,{type:`string`,description:`ID of the user group to be fetched.`}).option(`name`,{type:`string`,description:`Name of the user group to be fetched.`}).option(`fuzzy-name`,{type:`string`,description:`A string used for searching for user groups containing that substring.`}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results per page.`}).option(`direction`,{type:`string`,description:`The sort order of returned user groups by name (ascending or descending).`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ue={command:`list`,describe:`List User Groups`,builder:He,handler:async e=>l({command:`iam user-groups list`,classification:{safeFlags:[`direction`,`dry-run`]}},e,async()=>{let n={id:e.id,name:e.name,fuzzyName:e[`fuzzy-name`],page:e.page,per_page:e[`per-page`],direction:e.direction};if(e.dryRun){let e=await i();s({command:`cf iam user-groups list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/iam/user_groups`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(Ve,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var We={method:`POST`,path:t=>e`/accounts/${t.account_id}/iam/user_groups/${t.user_group_id}/members`,body:`json`};function Ge(e){return e.usage(`$0 iam user-groups members create <user-group-id>
51
+
52
+ Add members to a User Group.`).positional(`user-group-id`,{type:`string`,description:`User Group identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Ke={command:`create <user-group-id>`,describe:`Add User Group Members`,builder:Ge,handler:async e=>l({command:`iam user-groups members create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf iam user-groups members create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/iam/user_groups/${e[`user-group-id`]==null?`<user-group-id>`:encodeURIComponent(String(e[`user-group-id`]))}/members`,pathParams:{"user-group-id":String(e[`user-group-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Creating`,async()=>n.send(We,{body:t,account_id:l,user_group_id:e[`user-group-id`]}));o(r,{successLabel:`Created`})}else if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};var qe={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/iam/user_groups/${t.user_group_id}/members/${t.member_id}`};function Je(e){return e.usage(`$0 iam user-groups members delete <member-id>
53
+
54
+ Remove a member from User Group`).positional(`member-id`,{type:`string`,description:`The identifier of an existing account Member.`,demandOption:!0}).option(`user-group-id`,{type:`string`,description:`User Group identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Ye={command:`delete <member-id>`,describe:`Remove User Group Member`,builder:Je,handler:async e=>l({command:`iam user-groups members delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf iam user-groups members delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/iam/user_groups/${e[`user-group-id`]==null?`<user-group-id>`:encodeURIComponent(String(e[`user-group-id`]))}/members/${e[`member-id`]==null?`<member-id>`:encodeURIComponent(String(e[`member-id`]))}`,pathParams:{"user-group-id":String(e[`user-group-id`]??``),"member-id":String(e[`member-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await g({force:!!e.force,message:`Are you sure? This action cannot be undone.`}))return;let u=await c(`Deleting`,async()=>n.send(qe,{account_id:l,user_group_id:e[`user-group-id`],member_id:e[`member-id`]}));o(u,{successLabel:`Deleted`})})};var Q={method:`GET`,path:t=>e`/accounts/${t.account_id}/iam/user_groups/${t.user_group_id}/members/${t.member_id}`};function Xe(e){return e.usage(`$0 iam user-groups members get <member-id>
55
+
56
+ Get details of a specific member in a user group.`).positional(`member-id`,{type:`string`,description:`The identifier of an existing account Member.`,demandOption:!0}).option(`user-group-id`,{type:`string`,description:`User Group identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ze={command:`get <member-id>`,describe:`Get User Group Member`,builder:Xe,handler:async e=>l({command:`iam user-groups members get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf iam user-groups members get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/iam/user_groups/${e[`user-group-id`]==null?`<user-group-id>`:encodeURIComponent(String(e[`user-group-id`]))}/members/${e[`member-id`]==null?`<member-id>`:encodeURIComponent(String(e[`member-id`]))}`,pathParams:{"user-group-id":String(e[`user-group-id`]??``),"member-id":String(e[`member-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Q,{account_id:l,user_group_id:e[`user-group-id`],member_id:e[`member-id`]}));o(u,{successLabel:`Loaded`})})};var Qe={method:`GET`,path:t=>e`/accounts/${t.account_id}/iam/user_groups/${t.user_group_id}/members`,query:[`page`,`per_page`,`fuzzyEmail`,`direction`]};function $e(e){return e.usage(`$0 iam user-groups members list
57
+
58
+ List all the members attached to a user group.`).option(`user-group-id`,{type:`string`,description:`User Group identifier tag.`,demandOption:!0}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results per page.`}).option(`fuzzy-email`,{type:`string`,description:`A string used for filtering members by partial email match.`}).option(`direction`,{type:`string`,description:`The sort order of returned user group members by email.`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const et={command:`list`,describe:`List User Group Members`,builder:$e,handler:async e=>l({command:`iam user-groups members list`,classification:{safeFlags:[`direction`,`dry-run`]}},e,async()=>{let n={page:e.page,per_page:e[`per-page`],fuzzyEmail:e[`fuzzy-email`],direction:e.direction};if(e.dryRun){let t=await i();s({command:`cf iam user-groups members list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/iam/user_groups/${e[`user-group-id`]==null?`<user-group-id>`:encodeURIComponent(String(e[`user-group-id`]))}/members`,pathParams:{"user-group-id":String(e[`user-group-id`]??``)},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(Qe,{account_id:u,user_group_id:e[`user-group-id`],...n}));o(d,{successLabel:`Loaded`})})};var tt={method:`PUT`,path:t=>e`/accounts/${t.account_id}/iam/user_groups/${t.user_group_id}/members`,body:`json`};function nt(e){return e.usage(`$0 iam user-groups members update <user-group-id>
59
+
60
+ Replace the set of members attached to a User Group.`).positional(`user-group-id`,{type:`string`,description:`User Group identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Set/Replace members to a user group.`})}const rt={command:`update <user-group-id>`,describe:`Update User Group Members`,builder:nt,handler:async e=>l({command:`iam user-groups members update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf iam user-groups members update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/iam/user_groups/${e[`user-group-id`]==null?`<user-group-id>`:encodeURIComponent(String(e[`user-group-id`]))}/members`,pathParams:{"user-group-id":String(e[`user-group-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Updating`,async()=>n.send(tt,{body:t,account_id:l,user_group_id:e[`user-group-id`]}));o(r,{successLabel:`Updated`})}else if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},it={command:`members`,describe:`Operations for user-groups.members`,builder:e=>e.command(Ke).command(Ye).command(Ze).command(et).command(rt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var $={method:`PUT`,path:t=>e`/accounts/${t.account_id}/iam/user_groups/${t.user_group_id}`,body:`json`};function at(e){return e.usage(`$0 iam user-groups update <user-group-id>
61
+
62
+ Modify an existing user group.`).positional(`user-group-id`,{type:`string`,description:`User Group identifier tag.`,demandOption:!0}).option(`name`,{type:`string`,description:`Name of the User group.`}).option(`policies`,{type:`string`,description:`Policies attached to the User group. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ot={command:`update <user-group-id>`,describe:`Update User Group`,builder:at,handler:async e=>l({command:`iam user-groups update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf iam user-groups update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/iam/user_groups/${e[`user-group-id`]==null?`<user-group-id>`:encodeURIComponent(String(e[`user-group-id`]))}`,pathParams:{"user-group-id":String(e[`user-group-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({name:p(e.name,`name`,`text`),policies:u(e.policies,`policies`)}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Updating`,async()=>n.send($,{body:t,account_id:l,user_group_id:e[`user-group-id`]}));o(r,{successLabel:`Updated`});return}let m=f({name:p(e.name,`name`,`text`),policies:u(e.policies,`policies`)}),h=await c(`Updating`,async()=>n.send($,{body:m,account_id:l,user_group_id:e[`user-group-id`]}));o(h,{successLabel:`Updated`})})},st={command:`user-groups`,describe:`Organize account members into groups for easier permission assignment`,builder:e=>e.command(Pe).command(Le).command(Be).command(Ue).command(ot).command(it).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ct={command:`iam`,describe:`Identity and access management — permission groups, resource groups, user groups, and SSO connectors`,builder:e=>e.command(j).command(P).command(V).command(he).command(Me).command(st).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{ct as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CvzO-cQH.mjs";import{i as n,n as r}from"./auth-D5Yj9eYU.mjs";import{a as i,i as a,t as o}from"./context-BvLXzoMs.mjs";import{t as s}from"./output-BJEgbI0G.mjs";import{t as c}from"./dry-run-gy0Hl9xo.mjs";import{t as l}from"./progress-B-CVX0kn.mjs";import{t as u}from"./run-BZ6Fj3jQ.mjs";import"./telemetry-BZdRnr26.mjs";import{a as d,n as f,r as p,t as m}from"./body-parser-BKcZS9iJ.mjs";import{n as h,t as g}from"./input-validation-D7z60HJH.mjs";import{a as _,i as v,n as y}from"./prompt-DJF_Rs5S.mjs";import{n as b,t as x}from"./raw-fetch-BrOxDN9k.mjs";var S={method:`POST`,path:t=>e`/accounts/${t.account_id}/images/v1`,pathParams:[`account_id`],body:`form`};function ee(e){return e.usage(`$0 images create
2
+ import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CgBhtmON.mjs";import{i as n,n as r}from"./auth-FK2eLQ02.mjs";import{a as i,i as a,t as o}from"./context-Dp4CXG22.mjs";import{t as s}from"./output-BJEgbI0G.mjs";import{t as c}from"./dry-run-gy0Hl9xo.mjs";import{t as l}from"./progress-DLri-rA7.mjs";import{t as u}from"./run-Ciw_GIrC.mjs";import"./telemetry-Pt5GpCKD.mjs";import{a as d,n as f,r as p,t as m}from"./body-parser-BKcZS9iJ.mjs";import{n as h,t as g}from"./input-validation-D7z60HJH.mjs";import{a as _,i as v,n as y}from"./prompt-D0dXwuME.mjs";import{n as b,t as x}from"./raw-fetch-DQeDx1wT.mjs";var S={method:`POST`,path:t=>e`/accounts/${t.account_id}/images/v1`,pathParams:[`account_id`],body:`form`};function ee(e){return e.usage(`$0 images create
3
3
 
4
4
  Upload an image to CF Images. Images up to 10 Megabytes can be uploaded using a single HTTP POST (multipart/form-data) request by sending an image file or passing a URL accessible to the API.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`}).option(`creator`,{type:`string`,description:`Can set the creator field with an internal user ID.`}).option(`id`,{type:`string`,description:`An optional custom unique identifier for your image.`}).option(`metadata`,{type:`string`,description:`User modifiable key-value store. Can use used for keeping references to another system of record for managing images.`}).option(`require-signed-urls`,{type:`boolean`,description:`Indicates whether the image requires a signature token for the access.`}).option(`url`,{type:`string`,description:`A URL to fetch an image from origin. Only needed when type is uploading from a URL.`})}const te={command:`create`,describe:`Upload an image`,builder:ee,handler:async e=>u({command:`images create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v1`,pathParams:{},bodyKind:`multipart`,body:{body:e.body,file:e.file,creator:e.creator,id:e.id,metadata:e.metadata,"require-signed-urls":e[`require-signed-urls`],url:e.url}});return}let a=await r(e),u=e.local?t:await o();if(e.accountId=u,e.file!==void 0||e.body!==void 0||e.creator!==void 0||e.id!==void 0||e.metadata!==void 0||e[`require-signed-urls`]!==void 0||e.url!==void 0){let t=new FormData;if(e.file){let n=g(e.file);t.append(`file`,new Blob([n]),e.file.split(/[\\/]/).filter(Boolean).pop())}else e.body!==void 0&&t.append(`file`,e.body);if(e.creator!==void 0&&t.append(`creator`,String(h(e.creator,`creator`,`text`)??``)),e.id!==void 0&&t.append(`id`,String(h(e.id,`id`,`text`)??``)),e.metadata!==void 0){let n=typeof e.metadata==`string`?h(e.metadata,`metadata`,`text`):e.metadata;t.append(`metadata`,typeof n==`string`?n:JSON.stringify(n))}e[`require-signed-urls`]!==void 0&&t.append(`requireSignedURLs`,String(e[`require-signed-urls`])),e.url!==void 0&&t.append(`url`,String(h(e.url,`url`,`text`)??``));let r=await l(`Creating`,async()=>n(a,`POST`,`/accounts/${u}/images/v1`,{body:t}));s(r,{successLabel:`Created`});return}if(e.body){let t=h(e.body,`body`,`binary`),r=await l(`Creating`,async()=>n(a,`POST`,`/accounts/${u}/images/v1`,{body:t,headers:{"Content-Type":`multipart/form-data`}}));s(r,{successLabel:`Created`});return}let d=await l(`Creating`,async()=>a.send(S,{account_id:u}));s(d,{successLabel:`Created`})})};var ne={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/images/v1/${t.image_id}`};function re(e){return e.usage(`$0 images delete <image-id>
5
5
 
package/dist/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{n as e,r as t,t as n}from"./src-jyCTFHcS.mjs";import{t as r}from"./cli-exit-CstFZ1eJ.mjs";export{r as CliExit,n as buildCli,e as main,t as runMain};
2
+ import{n as e,r as t,t as n}from"./src-DPnUfK4c.mjs";import{t as r}from"./cli-exit-CstFZ1eJ.mjs";export{r as CliExit,n as buildCli,e as main,t as runMain};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./src-jyCTFHcS.mjs";import{r as e}from"./theme-BGHWSKCw.mjs";import{t}from"./cli-exit-CstFZ1eJ.mjs";import{R as n,n as r}from"./dist-DehXZozc.mjs";import{i,n as a,t as o}from"./autoconfig-ldsgXxa6.mjs";import{n as s}from"./version-DNcdABcr.mjs";import{i as c}from"./delegate-CMfEjvHn.mjs";import{t as l}from"./project-settings-nBMEx1f-.mjs";import"./ui-BUCBQ3Sq.mjs";import{t as u}from"./log-BWdaOGOW.mjs";import{n as d,r as f}from"./dialog-D5lus4M4.mjs";import{t as p}from"./progress-B-CVX0kn.mjs";import{n as m}from"./run-BZ6Fj3jQ.mjs";import"./telemetry-BZdRnr26.mjs";import{basename as h,dirname as g,isAbsolute as _,join as v,relative as y,resolve as b}from"node:path";import{mkdir as x,readdir as S,stat as C,writeFile as w}from"node:fs/promises";const T={"@cloudflare/vite-plugin":`beta`,typescript:`^7.0.2`,vite:`^8.3.0`};function ee(e){return{".gitignore":M(),"cloudflare.config.ts":D(e),"package.json":A(e),...e.packageManager===`pnpm`?{"pnpm-workspace.yaml":te()}:{},"src/index.ts":k(),"tsconfig.json":j(),"vite.config.ts":O()}}function te(){return`# Approve build scripts needed by the generated Worker's dependencies.
2
+ import"./src-DPnUfK4c.mjs";import{r as e}from"./theme-BGHWSKCw.mjs";import{t}from"./cli-exit-CstFZ1eJ.mjs";import{R as n,n as r}from"./dist-D5qkmHhC.mjs";import{i,n as a,t as o}from"./autoconfig-B2w-woU0.mjs";import{n as s}from"./version-Zr2oF8mY.mjs";import{i as c}from"./delegate-B4bKqF7i.mjs";import{t as l}from"./project-settings-nBMEx1f-.mjs";import"./ui-FYultowZ.mjs";import{t as u}from"./log-BWdaOGOW.mjs";import{n as d,r as f}from"./dialog-D5lus4M4.mjs";import{t as p}from"./progress-DLri-rA7.mjs";import{n as m}from"./run-Ciw_GIrC.mjs";import"./telemetry-Pt5GpCKD.mjs";import{basename as h,dirname as g,isAbsolute as _,join as v,relative as y,resolve as b}from"node:path";import{mkdir as x,readdir as S,stat as C,writeFile as w}from"node:fs/promises";const T={"@cloudflare/vite-plugin":`beta`,typescript:`^7.0.2`,vite:`^8.3.0`};function ee(e){return{".gitignore":M(),"cloudflare.config.ts":D(e),"package.json":A(e),...e.packageManager===`pnpm`?{"pnpm-workspace.yaml":te()}:{},"src/index.ts":k(),"tsconfig.json":j(),"vite.config.ts":O()}}function te(){return`# Approve build scripts needed by the generated Worker's dependencies.
3
3
  allowBuilds:
4
4
  esbuild: true
5
5
  workerd: true
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CvzO-cQH.mjs";import{i as n,n as r}from"./auth-D5Yj9eYU.mjs";import{a as i,i as a,t as o}from"./context-BvLXzoMs.mjs";import{t as s}from"./output-BJEgbI0G.mjs";import{t as c}from"./dry-run-gy0Hl9xo.mjs";import{t as l}from"./progress-B-CVX0kn.mjs";import{t as u}from"./run-BZ6Fj3jQ.mjs";import"./telemetry-BZdRnr26.mjs";import{n as d,t as f}from"./body-parser-BKcZS9iJ.mjs";import{n as p,t as m}from"./input-validation-D7z60HJH.mjs";import{a as h,n as g}from"./prompt-DJF_Rs5S.mjs";import{n as _,t as ee}from"./raw-fetch-BrOxDN9k.mjs";var te={method:`GET`,path:t=>e`/accounts/${t.account_id}/intel/asn/${t.asn}`};function ne(e){return e.usage(`$0 intel asn get <asn>
2
+ import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CgBhtmON.mjs";import{i as n,n as r}from"./auth-FK2eLQ02.mjs";import{a as i,i as a,t as o}from"./context-Dp4CXG22.mjs";import{t as s}from"./output-BJEgbI0G.mjs";import{t as c}from"./dry-run-gy0Hl9xo.mjs";import{t as l}from"./progress-DLri-rA7.mjs";import{t as u}from"./run-Ciw_GIrC.mjs";import"./telemetry-Pt5GpCKD.mjs";import{n as d,t as f}from"./body-parser-BKcZS9iJ.mjs";import{n as p,t as m}from"./input-validation-D7z60HJH.mjs";import{a as h,n as g}from"./prompt-D0dXwuME.mjs";import{n as _,t as ee}from"./raw-fetch-DQeDx1wT.mjs";var te={method:`GET`,path:t=>e`/accounts/${t.account_id}/intel/asn/${t.asn}`};function ne(e){return e.usage(`$0 intel asn get <asn>
3
3
 
4
4
  Gets an overview of the Autonomous System Number (ASN) and a list of subnets for it.`).positional(`asn`,{type:`string`,description:`Asn`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const re={command:`get <asn>`,describe:`Get ASN Overview.`,builder:ne,handler:async e=>u({command:`intel asn get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf intel asn get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/intel/asn/${e.asn==null?`<asn>`:encodeURIComponent(String(e.asn))}`,pathParams:{asn:String(e.asn??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(te,{account_id:a,asn:e.asn}));s(u,{successLabel:`Loaded`})})};var ie={method:`GET`,path:t=>e`/accounts/${t.account_id}/intel/asn/${t.asn}/subnets`};function ae(e){return e.usage(`$0 intel asn subnets get <asn>
5
5
 
@@ -27,12 +27,9 @@ Grants access permissions for a custom threat indicator feed to other accounts.`
27
27
 
28
28
  Revokes access permissions for a custom threat indicator feed.`).option(`account-tag`,{type:`string`,description:`The Cloudflare account tag of the account to change permissions on`}).option(`feed-id`,{type:`number`,description:`The ID of the feed to add/remove permissions on`}).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:`Raw JSON request body (bypasses individual flags)`})}const Se={command:`delete`,describe:`Revoke permission to indicator feed`,builder:xe,handler:async e=>u({command:`intel indicator-feeds permissions delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf intel indicator-feeds permissions delete`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/intel/indicator-feeds/permissions/remove`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({account_tag:p(e[`account-tag`],`account-tag`,`text`),feed_id:e[`feed-id`]}):d(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await g({force:!!e.force,message:`This operation destructively removes a permission entry.`}))return;if(e.body){let t=d(e.body),r=await l(`Deleting`,async()=>n.send(G,{body:t,account_id:a}));s(r,{successLabel:`Deleted`});return}let u=f({account_tag:p(e[`account-tag`],`account-tag`,`text`),feed_id:e[`feed-id`]}),m=await l(`Deleting`,async()=>n.send(G,{body:u,account_id:a}));s(m,{successLabel:`Deleted`})})};var Ce={method:`GET`,path:t=>e`/accounts/${t.account_id}/intel/indicator-feeds/permissions/view`};function we(e){return e.usage(`$0 intel indicator-feeds permissions list
29
29
 
30
- Lists current access permissions for custom threat indicator feeds.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Te={command:`list`,describe:`List indicator feed permissions`,builder:we,handler:async e=>u({command:`intel indicator-feeds permissions list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf intel indicator-feeds permissions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/intel/indicator-feeds/permissions/view`,pathParams:{},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(Ce,{account_id:a}));s(u,{successLabel:`Loaded`})})},Ee={command:`permissions`,describe:`Operations for indicator-feeds.permissions`,builder:e=>e.command(be).command(Se).command(Te).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var K={method:`PUT`,path:t=>e`/accounts/${t.account_id_path}/intel/indicator-feeds/permissions/createProvider`,body:`json`};function De(e){return e.usage(`$0 intel indicator-feeds providers create <account-id-path>
30
+ Lists current access permissions for custom threat indicator feeds.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Te={command:`list`,describe:`List indicator feed permissions`,builder:we,handler:async e=>u({command:`intel indicator-feeds permissions list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf intel indicator-feeds permissions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/intel/indicator-feeds/permissions/view`,pathParams:{},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(Ce,{account_id:a}));s(u,{successLabel:`Loaded`})})},Ee={command:`permissions`,describe:`Operations for indicator-feeds.permissions`,builder:e=>e.command(be).command(Se).command(Te).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var K={method:`PUT`,path:t=>e`/accounts/${t.account_id}/intel/indicator-feeds/permissions/createProvider`,body:`json`};function De(e){return e.usage(`$0 intel indicator-feeds providers create
31
31
 
32
- Creates a new indicator feed provider for an account. Only available to Intel accounts.`).positional(`account-id-path`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`account-id-body`,{type:`number`,description:`The numeric account ID to create the provider for. Distinct from the
33
- path \`account_id\` parameter, which carries the account identifier
34
- string used for routing.
35
- `}).option(`name`,{type:`string`,description:`The name of the provider`}).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 Oe={command:`create <account-id-path>`,describe:`Create indicator feed provider`,builder:De,handler:async e=>u({command:`intel indicator-feeds providers create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){c({command:`cf intel indicator-feeds providers create`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e[`account-id-path`]==null?`<account-id-path>`:encodeURIComponent(String(e[`account-id-path`]))}/intel/indicator-feeds/permissions/createProvider`,pathParams:{"account-id-path":String(e[`account-id-path`]??``)},bodyKind:`json`,body:e.body===void 0?f({account_id:e[`account-id-body`],name:p(e.name,`name`,`text`)}):d(e.body)});return}let t=await r(e);if(e.body){let n=d(e.body),r=await l(`Updating`,async()=>t.send(K,{body:n,account_id_path:e[`account-id-path`]}));s(r,{successLabel:`Updated`});return}if(e[`account-id-body`]===void 0)throw Error(`--account-id-body is required (or pass --body with this field set).`);e.name===void 0&&(e.name=await h(`name`,`The name of the provider`));let n=f({account_id:e[`account-id-body`],name:p(e.name,`name`,`text`)}),i=await l(`Updating`,async()=>t.send(K,{body:n,account_id_path:e[`account-id-path`]}));s(i,{successLabel:`Updated`})})},ke={command:`providers`,describe:`Operations for indicator-feeds.providers`,builder:e=>e.command(Oe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ae(e){return e.usage("$0 intel indicator-feeds snapshots update <feed-id>\n\nRevises the raw data entries in a custom threat indicator feed. Accepts both plain and gzipped STIX2/CRDF bodies. Gzip is detected by RFC 1952 magic bytes (`0x1f 0x8b`) and/or a `.gz` filename suffix (case-insensitive) — either signal alone is sufficient to trigger the gzip path; if the body is not valid gzip, the upload fails fast. Customers are encouraged to gzip larger uploads — the api-gateway 500 MB body cap applies to the on-the-wire (compressed) size, so gzip lets a single upload carry several GiB of decompressed STIX.").positional(`feed-id`,{type:`string`,description:`Indicator feed ID`,demandOption:!0}).option(`cf-async-upload`,{type:`string`,description:"Set to the literal value `1` to enqueue the upload and receive a\n`202` response with a polling URL. Any other value uses the legacy\nsynchronous response."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`}).option(`source`,{type:`string`,description:"The file to upload. Either a plain STIX2/CRDF body or a gzipped one (recognised by `0x1f 0x8b` magic bytes or a `.gz` filename suffix). "})}const je={command:`update <feed-id>`,describe:`Update indicator feed data`,builder:Ae,handler:async e=>u({command:`intel indicator-feeds snapshots update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let a={};if(e[`cf-async-upload`]!==void 0&&(a[`Cf-Async-Upload`]=String(e[`cf-async-upload`])),e.dryRun){let t=await i();c({command:`cf intel indicator-feeds snapshots update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/intel/indicator-feeds/${e[`feed-id`]==null?`<feed-id>`:encodeURIComponent(String(e[`feed-id`]))}/snapshot`,pathParams:{"feed-id":String(e[`feed-id`]??``)},bodyKind:`multipart`,body:{body:e.body,file:e.file,source:e.source}});return}let u=await r(e),d=e.local?t:await o();if(e.accountId=d,e.file!==void 0||e.body!==void 0||e.source!==void 0){let t=new FormData;if(e.file){let n=m(e.file);t.append(`file`,new Blob([n]),e.file.split(/[\\/]/).filter(Boolean).pop())}else e.body!==void 0&&t.append(`file`,e.body);e.source!==void 0&&t.append(`source`,String(p(e.source,`source`,`text`)??``));let r=await l(`Updating`,async()=>n(u,`PUT`,`/accounts/${d}/intel/indicator-feeds/${encodeURIComponent(String(e[`feed-id`]))}/snapshot`,{body:t,headers:Object.keys(a).length>0?a:void 0}));s(r,{successLabel:`Updated`})}else if(e.body){let t=p(e.body,`body`,`binary`),r=await l(`Updating`,async()=>n(u,`PUT`,`/accounts/${d}/intel/indicator-feeds/${encodeURIComponent(String(e[`feed-id`]))}/snapshot`,{body:t,headers:{"Content-Type":`multipart/form-data`,...a}}));s(r,{successLabel:`Updated`})}else if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},Me={command:`snapshots`,describe:`Operations for indicator-feeds.snapshots`,builder:e=>e.command(je).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var q={method:`PUT`,path:t=>e`/accounts/${t.account_id}/intel/indicator-feeds/${t.feed_id}`,body:`json`};function Ne(e){return e.usage(`$0 intel indicator-feeds update <feed-id>
32
+ Creates a new indicator feed provider for an account. Only available to Intel accounts.`).option(`name`,{type:`string`,description:`The name of the provider`}).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 Oe={command:`create`,describe:`Create indicator feed provider`,builder:De,handler:async e=>u({command:`intel indicator-feeds providers create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf intel indicator-feeds providers create`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/intel/indicator-feeds/permissions/createProvider`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({name:p(e.name,`name`,`text`)}):d(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=d(e.body),r=await l(`Updating`,async()=>n.send(K,{body:t,account_id:a}));s(r,{successLabel:`Updated`});return}e.name===void 0&&(e.name=await h(`name`,`The name of the provider`));let u=f({name:p(e.name,`name`,`text`)}),m=await l(`Updating`,async()=>n.send(K,{body:u,account_id:a}));s(m,{successLabel:`Updated`})})},ke={command:`providers`,describe:`Operations for indicator-feeds.providers`,builder:e=>e.command(Oe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ae(e){return e.usage("$0 intel indicator-feeds snapshots update <feed-id>\n\nRevises the raw data entries in a custom threat indicator feed. Accepts both plain and gzipped STIX2/CRDF bodies. Gzip is detected by RFC 1952 magic bytes (`0x1f 0x8b`) and/or a `.gz` filename suffix (case-insensitive) — either signal alone is sufficient to trigger the gzip path; if the body is not valid gzip, the upload fails fast. Customers are encouraged to gzip larger uploads — the api-gateway 500 MB body cap applies to the on-the-wire (compressed) size, so gzip lets a single upload carry several GiB of decompressed STIX.").positional(`feed-id`,{type:`string`,description:`Indicator feed ID`,demandOption:!0}).option(`cf-async-upload`,{type:`string`,description:"Set to the literal value `1` to enqueue the upload and receive a\n`202` response with a polling URL. Any other value uses the legacy\nsynchronous response."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`}).option(`source`,{type:`string`,description:"The file to upload. Either a plain STIX2/CRDF body or a gzipped one (recognised by `0x1f 0x8b` magic bytes or a `.gz` filename suffix). "})}const je={command:`update <feed-id>`,describe:`Update indicator feed data`,builder:Ae,handler:async e=>u({command:`intel indicator-feeds snapshots update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let a={};if(e[`cf-async-upload`]!==void 0&&(a[`Cf-Async-Upload`]=String(e[`cf-async-upload`])),e.dryRun){let t=await i();c({command:`cf intel indicator-feeds snapshots update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/intel/indicator-feeds/${e[`feed-id`]==null?`<feed-id>`:encodeURIComponent(String(e[`feed-id`]))}/snapshot`,pathParams:{"feed-id":String(e[`feed-id`]??``)},bodyKind:`multipart`,body:{body:e.body,file:e.file,source:e.source}});return}let u=await r(e),d=e.local?t:await o();if(e.accountId=d,e.file!==void 0||e.body!==void 0||e.source!==void 0){let t=new FormData;if(e.file){let n=m(e.file);t.append(`file`,new Blob([n]),e.file.split(/[\\/]/).filter(Boolean).pop())}else e.body!==void 0&&t.append(`file`,e.body);e.source!==void 0&&t.append(`source`,String(p(e.source,`source`,`text`)??``));let r=await l(`Updating`,async()=>n(u,`PUT`,`/accounts/${d}/intel/indicator-feeds/${encodeURIComponent(String(e[`feed-id`]))}/snapshot`,{body:t,headers:Object.keys(a).length>0?a:void 0}));s(r,{successLabel:`Updated`})}else if(e.body){let t=p(e.body,`body`,`binary`),r=await l(`Updating`,async()=>n(u,`PUT`,`/accounts/${d}/intel/indicator-feeds/${encodeURIComponent(String(e[`feed-id`]))}/snapshot`,{body:t,headers:{"Content-Type":`multipart/form-data`,...a}}));s(r,{successLabel:`Updated`})}else if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},Me={command:`snapshots`,describe:`Operations for indicator-feeds.snapshots`,builder:e=>e.command(je).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var q={method:`PUT`,path:t=>e`/accounts/${t.account_id}/intel/indicator-feeds/${t.feed_id}`,body:`json`};function Ne(e){return e.usage(`$0 intel indicator-feeds update <feed-id>
36
33
 
37
34
  Revises details for a specific custom threat indicator feed.`).positional(`feed-id`,{type:`string`,description:`Indicator feed ID`,demandOption:!0}).option(`description`,{type:`string`,description:`The new description of the feed`}).option(`is-attributable`,{type:`boolean`,description:`The new is_attributable value of the feed`}).option(`is-downloadable`,{type:`boolean`,description:`The new is_downloadable value of the feed`}).option(`is-public`,{type:`boolean`,description:`The new is_public value of the feed`}).option(`name`,{type:`string`,description:`The new name of the feed`}).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 Pe={command:`update <feed-id>`,describe:`Update indicator feed metadata`,builder:Ne,handler:async e=>u({command:`intel indicator-feeds update`,classification:{safeFlags:[`is-attributable`,`is-downloadable`,`is-public`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf intel indicator-feeds update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/intel/indicator-feeds/${e[`feed-id`]==null?`<feed-id>`:encodeURIComponent(String(e[`feed-id`]))}`,pathParams:{"feed-id":String(e[`feed-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({description:p(e.description,`description`,`text`),is_attributable:e[`is-attributable`],is_downloadable:e[`is-downloadable`],is_public:e[`is-public`],name:p(e.name,`name`,`text`)}):d(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=d(e.body),r=await l(`Updating`,async()=>n.send(q,{body:t,account_id:a,feed_id:e[`feed-id`]}));s(r,{successLabel:`Updated`});return}let u=f({description:p(e.description,`description`,`text`),is_attributable:e[`is-attributable`],is_downloadable:e[`is-downloadable`],is_public:e[`is-public`],name:p(e.name,`name`,`text`)}),m=await l(`Updating`,async()=>n.send(q,{body:u,account_id:a,feed_id:e[`feed-id`]}));s(m,{successLabel:`Updated`})})};var Fe={method:`GET`,path:t=>e`/accounts/${t.account_id}/intel/indicator-feeds/${t.feed_id}/uploads/${t.upload_id}`};function Ie(e){return e.usage("$0 intel indicator-feeds uploads get <upload-id>\n\nPolls an asynchronously accepted upload. Continue polling after the recommended `poll_after_seconds` delay until status is `Unified` or `Error`. `Unified` is returned only after the durable loader finishes.").positional(`upload-id`,{type:`string`,description:`Upload ID`,demandOption:!0}).option(`feed-id`,{type:`string`,description:`Indicator feed ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Le={command:`get <upload-id>`,describe:`Get indicator feed upload status`,builder:Ie,handler:async e=>u({command:`intel indicator-feeds uploads get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf intel indicator-feeds uploads get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/intel/indicator-feeds/${e[`feed-id`]==null?`<feed-id>`:encodeURIComponent(String(e[`feed-id`]))}/uploads/${e[`upload-id`]==null?`<upload-id>`:encodeURIComponent(String(e[`upload-id`]))}`,pathParams:{"feed-id":String(e[`feed-id`]??``),"upload-id":String(e[`upload-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(Fe,{account_id:a,feed_id:e[`feed-id`],upload_id:e[`upload-id`]}));s(u,{successLabel:`Loaded`})})},Re={command:`uploads`,describe:`Operations for indicator-feeds.uploads`,builder:e=>e.command(Le).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ze={command:`indicator-feeds`,describe:`Threat indicator feeds — subscribe to and manage curated lists of malicious IPs, domains, and URLs`,builder:e=>e.command(z).command(V).command(he).command(ve).command(Pe).command(fe).command(Ee).command(ke).command(Me).command(Re).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Be={method:`GET`,path:t=>e`/accounts/${t.account_id}/intel/ip-lists`};function Ve(e){return e.usage(`$0 intel ip-lists get
38
35
 
@@ -50,7 +47,9 @@ Delete the specified ingress rule. The sinkhole must belong to the same account
50
47
 
51
48
  Get the specified ingress rule associated with a sinkhole. The sinkhole must belong to the same account as the zone.`).positional(`ingress-id`,{type:`string`,description:`The unique identifier for the ingress rule.`,demandOption:!0}).option(`sinkhole-id`,{type:`string`,description:`The unique identifier for the sinkhole.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ft={command:`get <ingress-id>`,describe:`Get an ingress rule`,builder:dt,handler:async e=>u({command:`intel sinkholes ingresses get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){c({command:`cf intel sinkholes ingresses get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/intel/sinkholes/${e[`sinkhole-id`]==null?`<sinkhole-id>`:encodeURIComponent(String(e[`sinkhole-id`]))}/ingresses/${e[`ingress-id`]==null?`<ingress-id>`:encodeURIComponent(String(e[`ingress-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"sinkhole-id":String(e[`sinkhole-id`]??``),"ingress-id":String(e[`ingress-id`]??``)},bodyKind:`none`});return}let t=await r(e),n=await a({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n;let i=await l(`Loading`,async()=>t.send(ut,{zone_id:n,sinkhole_id:e[`sinkhole-id`],ingress_id:e[`ingress-id`]}));s(i,{successLabel:`Loaded`})})};var pt={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/intel/sinkholes/${t.sinkhole_id}/ingresses`};function mt(e){return e.usage(`$0 intel sinkholes ingresses list
52
49
 
53
- Returns all ingress rules associated with the specified sinkhole.`).option(`sinkhole-id`,{type:`string`,description:`The unique identifier for the sinkhole.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ht={command:`list`,describe:`List ingresses for a sinkhole`,builder:mt,handler:async e=>u({command:`intel sinkholes ingresses list`,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 intel sinkholes ingresses list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/intel/sinkholes/${e[`sinkhole-id`]==null?`<sinkhole-id>`:encodeURIComponent(String(e[`sinkhole-id`]))}/ingresses`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r),"sinkhole-id":String(e[`sinkhole-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(pt,{account_or_zone:u,account_or_zone_id:d,sinkhole_id:e[`sinkhole-id`]}));s(f,{successLabel:`Loaded`})})};var Z={method:`PUT`,path:t=>e`/zones/${t.zone_id}/intel/sinkholes/${t.sinkhole_id}/ingresses/${t.ingress_id}`,body:`json`};function gt(e){return e.usage(`$0 intel sinkholes ingresses update <ingress-id>
50
+ Returns all ingress rules associated with the specified sinkhole.
51
+
52
+ Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).option(`sinkhole-id`,{type:`string`,description:`The unique identifier for the sinkhole.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ht={command:`list`,describe:`List ingresses for a sinkhole`,builder:mt,handler:async e=>u({command:`intel sinkholes ingresses list`,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 intel sinkholes ingresses list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/intel/sinkholes/${e[`sinkhole-id`]==null?`<sinkhole-id>`:encodeURIComponent(String(e[`sinkhole-id`]))}/ingresses`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r),"sinkhole-id":String(e[`sinkhole-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(pt,{account_or_zone:u,account_or_zone_id:d,sinkhole_id:e[`sinkhole-id`]}));s(f,{successLabel:`Loaded`})})};var Z={method:`PUT`,path:t=>e`/zones/${t.zone_id}/intel/sinkholes/${t.sinkhole_id}/ingresses/${t.ingress_id}`,body:`json`};function gt(e){return e.usage(`$0 intel sinkholes ingresses update <ingress-id>
54
53
 
55
54
  Replaces the specified ingress rule. The sinkhole must belong to the same account as the zone.`).positional(`ingress-id`,{type:`string`,description:`The unique identifier for the ingress rule.`,demandOption:!0}).option(`sinkhole-id`,{type:`string`,description:`The unique identifier for the sinkhole.`,demandOption:!0}).option(`cidr`,{type:`string`,description:`The CIDR block for the ingress rule in IPv4 or IPv6 notation (e.g., 192.0.2.0/24). Provide a Cloudflare BYOIP CIDR that your account owns.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const _t={command:`update <ingress-id>`,describe:`Update an ingress rule`,builder:gt,handler:async e=>u({command:`intel sinkholes ingresses update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){c({command:`cf intel sinkholes ingresses update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/intel/sinkholes/${e[`sinkhole-id`]==null?`<sinkhole-id>`:encodeURIComponent(String(e[`sinkhole-id`]))}/ingresses/${e[`ingress-id`]==null?`<ingress-id>`:encodeURIComponent(String(e[`ingress-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"sinkhole-id":String(e[`sinkhole-id`]??``),"ingress-id":String(e[`ingress-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({cidr:p(e.cidr,`cidr`,`text`)}):d(e.body)});return}let t=await r(e),n=await a({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=d(e.body),i=await l(`Updating`,async()=>t.send(Z,{body:r,zone_id:n,sinkhole_id:e[`sinkhole-id`],ingress_id:e[`ingress-id`]}));s(i,{successLabel:`Updated`});return}e.cidr===void 0&&(e.cidr=await h(`cidr`,`The CIDR block for the ingress rule in IPv4 or IPv6 notation (e.g., 192.0.2.0/24). Provide a Cloudflare BYOIP CIDR that your account owns.`));let i=f({cidr:p(e.cidr,`cidr`,`text`)}),o=await l(`Updating`,async()=>t.send(Z,{body:i,zone_id:n,sinkhole_id:e[`sinkhole-id`],ingress_id:e[`ingress-id`]}));s(o,{successLabel:`Updated`})})},vt={command:`ingresses`,describe:`Operations for sinkholes.ingresses`,builder:e=>e.command(ot).command(lt).command(ft).command(ht).command(_t).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var yt={method:`GET`,path:t=>e`/accounts/${t.account_id}/intel/sinkholes`};function bt(e){return e.usage(`$0 intel sinkholes list
56
55
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{n as e,r as t,t as n}from"./rolldown-runtime-BNtqjh-B.mjs";import{n as r,t as i}from"./ansi-styles-kSC6bEIq.mjs";import{V as a}from"./dist-DehXZozc.mjs";import{t as o}from"./src-COwxoocl.mjs";import{r as s}from"./interactive-wQM7Blhm.mjs";import c,{exit as l,stdin as u,stdout as d}from"node:process";import"node:os";import"node:tty";import{styleText as f}from"node:util";import p from"node:readline";const{white:m,gray:h,dim:g,hidden:_,bold:v,cyanBright:y,bgCyan:b}=a,x=a.hex(`#BD5B08`),S=a.hex(`#111`),C=a.hex(`#0E838F`),w=S.bgHex(`#0E838F`),ee=a.hex(`#AB2526`),te=S.bgHex(`#AB2526`),ne=a.hex(`#218529`),re=S.bgHex(`#218529`),ie=a.hex(`#7F7322`),ae=S.bgHex(`#7F7322`);var oe=class extends Error{constructor(e,t){super(e),this.signal=t}};const se=e=>e===161||e===164||e===167||e===168||e===170||e===173||e===174||e>=176&&e<=180||e>=182&&e<=186||e>=188&&e<=191||e===198||e===208||e===215||e===216||e>=222&&e<=225||e===230||e>=232&&e<=234||e===236||e===237||e===240||e===242||e===243||e>=247&&e<=250||e===252||e===254||e===257||e===273||e===275||e===283||e===294||e===295||e===299||e>=305&&e<=307||e===312||e>=319&&e<=322||e===324||e>=328&&e<=331||e===333||e===338||e===339||e===358||e===359||e===363||e===462||e===464||e===466||e===468||e===470||e===472||e===474||e===476||e===593||e===609||e===708||e===711||e>=713&&e<=715||e===717||e===720||e>=728&&e<=731||e===733||e===735||e>=768&&e<=879||e>=913&&e<=929||e>=931&&e<=937||e>=945&&e<=961||e>=963&&e<=969||e===1025||e>=1040&&e<=1103||e===1105||e===8208||e>=8211&&e<=8214||e===8216||e===8217||e===8220||e===8221||e>=8224&&e<=8226||e>=8228&&e<=8231||e===8240||e===8242||e===8243||e===8245||e===8251||e===8254||e===8308||e===8319||e>=8321&&e<=8324||e===8364||e===8451||e===8453||e===8457||e===8467||e===8470||e===8481||e===8482||e===8486||e===8491||e===8531||e===8532||e>=8539&&e<=8542||e>=8544&&e<=8555||e>=8560&&e<=8569||e===8585||e>=8592&&e<=8601||e===8632||e===8633||e===8658||e===8660||e===8679||e===8704||e===8706||e===8707||e===8711||e===8712||e===8715||e===8719||e===8721||e===8725||e===8730||e>=8733&&e<=8736||e===8739||e===8741||e>=8743&&e<=8748||e===8750||e>=8756&&e<=8759||e===8764||e===8765||e===8776||e===8780||e===8786||e===8800||e===8801||e>=8804&&e<=8807||e===8810||e===8811||e===8814||e===8815||e===8834||e===8835||e===8838||e===8839||e===8853||e===8857||e===8869||e===8895||e===8978||e>=9312&&e<=9449||e>=9451&&e<=9547||e>=9552&&e<=9587||e>=9600&&e<=9615||e>=9618&&e<=9621||e===9632||e===9633||e>=9635&&e<=9641||e===9650||e===9651||e===9654||e===9655||e===9660||e===9661||e===9664||e===9665||e>=9670&&e<=9672||e===9675||e>=9678&&e<=9681||e>=9698&&e<=9701||e===9711||e===9733||e===9734||e===9737||e===9742||e===9743||e===9756||e===9758||e===9792||e===9794||e===9824||e===9825||e>=9827&&e<=9829||e>=9831&&e<=9834||e===9836||e===9837||e===9839||e===9886||e===9887||e===9919||e>=9926&&e<=9933||e>=9935&&e<=9939||e>=9941&&e<=9953||e===9955||e===9960||e===9961||e>=9963&&e<=9969||e===9972||e>=9974&&e<=9977||e===9979||e===9980||e===9982||e===9983||e===10045||e>=10102&&e<=10111||e>=11094&&e<=11097||e>=12872&&e<=12879||e>=57344&&e<=63743||e>=65024&&e<=65039||e===65533||e>=127232&&e<=127242||e>=127248&&e<=127277||e>=127280&&e<=127337||e>=127344&&e<=127373||e===127375||e===127376||e>=127387&&e<=127404||e>=917760&&e<=917999||e>=983040&&e<=1048573||e>=1048576&&e<=1114109,ce=e=>e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510,le=e=>e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9800&&e<=9811||e===9855||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||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>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e===94192||e===94193||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101632&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129672||e>=129680&&e<=129725||e>=129727&&e<=129733||e>=129742&&e<=129755||e>=129760&&e<=129768||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141,ue=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y,T=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,E=/\t{1,1000}/y,de=/[\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,D=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,fe=/\p{M}+/gu,pe={limit:1/0,ellipsis:``},me=(e,t={},n={})=>{let r=t.limit??1/0,i=t.ellipsis??``,a=t?.ellipsisWidth??(i?me(i,pe,n).width:0),o=n.ansiWidth??0,s=n.controlWidth??0,c=n.tabWidth??8,l=n.ambiguousWidth??1,u=n.emojiWidth??2,d=n.fullWidthWidth??2,f=n.regularWidth??1,p=n.wideWidth??2,m=0,h=0,g=e.length,_=0,v=!1,y=g,b=Math.max(0,r-a),x=0,S=0,C=0,w=0;outer:for(;;){if(S>x||h>=g&&h>m){let t=e.slice(x,S)||e.slice(m,h);_=0;for(let e of t.replaceAll(fe,``)){let t=e.codePointAt(0)||0;if(w=ce(t)?d:le(t)?p:l!==f&&se(t)?l:f,C+w>b&&(y=Math.min(y,Math.max(x,m)+_)),C+w>r){v=!0;break outer}_+=e.length,C+=w}x=S=0}if(h>=g)break;if(D.lastIndex=h,D.test(e)){if(_=D.lastIndex-h,w=_*f,C+w>b&&(y=Math.min(y,h+Math.floor((b-C)/f))),C+w>r){v=!0;break}C+=w,x=m,S=h,h=m=D.lastIndex}else if(ue.lastIndex=h,ue.test(e)){if(C+o>b&&(y=Math.min(y,h)),C+o>r){v=!0;break}C+=o,x=m,S=h,h=m=ue.lastIndex}else if(T.lastIndex=h,T.test(e)){if(_=T.lastIndex-h,w=_*s,C+w>b&&(y=Math.min(y,h+Math.floor((b-C)/s))),C+w>r){v=!0;break}C+=w,x=m,S=h,h=m=T.lastIndex}else if(E.lastIndex=h,E.test(e)){if(_=E.lastIndex-h,w=_*c,C+w>b&&(y=Math.min(y,h+Math.floor((b-C)/c))),C+w>r){v=!0;break}C+=w,x=m,S=h,h=m=E.lastIndex}else if(de.lastIndex=h,de.test(e)){if(C+u>b&&(y=Math.min(y,h)),C+u>r){v=!0;break}C+=u,x=m,S=h,h=m=de.lastIndex}else h+=1}return{width:v?b:C,index:v?y:g,truncated:v,ellipsed:v&&r>=a}},he={limit:1/0,ellipsis:``,ellipsisWidth:0},O=(e,t={})=>me(e,he,t).width,ge=`]8;;`,_e=RegExp(`(?:\\[(?<code>\\d+)m|\\${ge}(?<uri>.*))`,`y`),ve=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},ye=e=>`[${e}m`,be=e=>`${ge}${e}`,xe=(e,t,n)=>{let r=t[Symbol.iterator](),i=!1,a=!1,o=e.at(-1),s=o===void 0?0:O(o),c=r.next(),l=r.next(),u=0;for(;!c.done;){let o=c.value,d=O(o);s+d<=n?e[e.length-1]+=o:(e.push(o),s=0),(o===`\x1B`||o===`›`)&&(i=!0,a=t.startsWith(ge,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())},Se=e=>{let t=e.split(` `),n=t.length;for(;n&&!O(t[n-1]);)n--;return n===t.length?e:t.slice(0,n).join(` `)+t.slice(n).join(``)},Ce=(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=O(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=O(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(``),xe(s,r,t),c=O(s.at(-1)??``)}else{if(c+i>t&&c&&i){if(n.wordWrap===!1&&c<t){xe(s,r,t),c=O(s.at(-1)??``);continue}s.push(``),c=0}c+i>t&&n.wordWrap===!1?(xe(s,r,t),c=O(s.at(-1)??``)):(s[s.length-1]+=r,c+=i)}}n.trim!==!1&&(s=s.map(e=>Se(e)));let l=s.join(`
2
+ import{n as e,r as t,t as n}from"./rolldown-runtime-BNtqjh-B.mjs";import{n as r,t as i}from"./ansi-styles-kSC6bEIq.mjs";import{V as a}from"./dist-D5qkmHhC.mjs";import{t as o}from"./src-COwxoocl.mjs";import{r as s}from"./interactive-wQM7Blhm.mjs";import c,{exit as l,stdin as u,stdout as d}from"node:process";import"node:os";import"node:tty";import{styleText as f}from"node:util";import p from"node:readline";const{white:m,gray:h,dim:g,hidden:_,bold:v,cyanBright:y,bgCyan:b}=a,x=a.hex(`#BD5B08`),S=a.hex(`#111`),C=a.hex(`#0E838F`),w=S.bgHex(`#0E838F`),ee=a.hex(`#AB2526`),te=S.bgHex(`#AB2526`),ne=a.hex(`#218529`),re=S.bgHex(`#218529`),ie=a.hex(`#7F7322`),ae=S.bgHex(`#7F7322`);var oe=class extends Error{constructor(e,t){super(e),this.signal=t}};const se=e=>e===161||e===164||e===167||e===168||e===170||e===173||e===174||e>=176&&e<=180||e>=182&&e<=186||e>=188&&e<=191||e===198||e===208||e===215||e===216||e>=222&&e<=225||e===230||e>=232&&e<=234||e===236||e===237||e===240||e===242||e===243||e>=247&&e<=250||e===252||e===254||e===257||e===273||e===275||e===283||e===294||e===295||e===299||e>=305&&e<=307||e===312||e>=319&&e<=322||e===324||e>=328&&e<=331||e===333||e===338||e===339||e===358||e===359||e===363||e===462||e===464||e===466||e===468||e===470||e===472||e===474||e===476||e===593||e===609||e===708||e===711||e>=713&&e<=715||e===717||e===720||e>=728&&e<=731||e===733||e===735||e>=768&&e<=879||e>=913&&e<=929||e>=931&&e<=937||e>=945&&e<=961||e>=963&&e<=969||e===1025||e>=1040&&e<=1103||e===1105||e===8208||e>=8211&&e<=8214||e===8216||e===8217||e===8220||e===8221||e>=8224&&e<=8226||e>=8228&&e<=8231||e===8240||e===8242||e===8243||e===8245||e===8251||e===8254||e===8308||e===8319||e>=8321&&e<=8324||e===8364||e===8451||e===8453||e===8457||e===8467||e===8470||e===8481||e===8482||e===8486||e===8491||e===8531||e===8532||e>=8539&&e<=8542||e>=8544&&e<=8555||e>=8560&&e<=8569||e===8585||e>=8592&&e<=8601||e===8632||e===8633||e===8658||e===8660||e===8679||e===8704||e===8706||e===8707||e===8711||e===8712||e===8715||e===8719||e===8721||e===8725||e===8730||e>=8733&&e<=8736||e===8739||e===8741||e>=8743&&e<=8748||e===8750||e>=8756&&e<=8759||e===8764||e===8765||e===8776||e===8780||e===8786||e===8800||e===8801||e>=8804&&e<=8807||e===8810||e===8811||e===8814||e===8815||e===8834||e===8835||e===8838||e===8839||e===8853||e===8857||e===8869||e===8895||e===8978||e>=9312&&e<=9449||e>=9451&&e<=9547||e>=9552&&e<=9587||e>=9600&&e<=9615||e>=9618&&e<=9621||e===9632||e===9633||e>=9635&&e<=9641||e===9650||e===9651||e===9654||e===9655||e===9660||e===9661||e===9664||e===9665||e>=9670&&e<=9672||e===9675||e>=9678&&e<=9681||e>=9698&&e<=9701||e===9711||e===9733||e===9734||e===9737||e===9742||e===9743||e===9756||e===9758||e===9792||e===9794||e===9824||e===9825||e>=9827&&e<=9829||e>=9831&&e<=9834||e===9836||e===9837||e===9839||e===9886||e===9887||e===9919||e>=9926&&e<=9933||e>=9935&&e<=9939||e>=9941&&e<=9953||e===9955||e===9960||e===9961||e>=9963&&e<=9969||e===9972||e>=9974&&e<=9977||e===9979||e===9980||e===9982||e===9983||e===10045||e>=10102&&e<=10111||e>=11094&&e<=11097||e>=12872&&e<=12879||e>=57344&&e<=63743||e>=65024&&e<=65039||e===65533||e>=127232&&e<=127242||e>=127248&&e<=127277||e>=127280&&e<=127337||e>=127344&&e<=127373||e===127375||e===127376||e>=127387&&e<=127404||e>=917760&&e<=917999||e>=983040&&e<=1048573||e>=1048576&&e<=1114109,ce=e=>e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510,le=e=>e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9800&&e<=9811||e===9855||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||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>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e===94192||e===94193||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101632&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129672||e>=129680&&e<=129725||e>=129727&&e<=129733||e>=129742&&e<=129755||e>=129760&&e<=129768||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141,ue=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y,T=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,E=/\t{1,1000}/y,de=/[\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,D=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,fe=/\p{M}+/gu,pe={limit:1/0,ellipsis:``},me=(e,t={},n={})=>{let r=t.limit??1/0,i=t.ellipsis??``,a=t?.ellipsisWidth??(i?me(i,pe,n).width:0),o=n.ansiWidth??0,s=n.controlWidth??0,c=n.tabWidth??8,l=n.ambiguousWidth??1,u=n.emojiWidth??2,d=n.fullWidthWidth??2,f=n.regularWidth??1,p=n.wideWidth??2,m=0,h=0,g=e.length,_=0,v=!1,y=g,b=Math.max(0,r-a),x=0,S=0,C=0,w=0;outer:for(;;){if(S>x||h>=g&&h>m){let t=e.slice(x,S)||e.slice(m,h);_=0;for(let e of t.replaceAll(fe,``)){let t=e.codePointAt(0)||0;if(w=ce(t)?d:le(t)?p:l!==f&&se(t)?l:f,C+w>b&&(y=Math.min(y,Math.max(x,m)+_)),C+w>r){v=!0;break outer}_+=e.length,C+=w}x=S=0}if(h>=g)break;if(D.lastIndex=h,D.test(e)){if(_=D.lastIndex-h,w=_*f,C+w>b&&(y=Math.min(y,h+Math.floor((b-C)/f))),C+w>r){v=!0;break}C+=w,x=m,S=h,h=m=D.lastIndex}else if(ue.lastIndex=h,ue.test(e)){if(C+o>b&&(y=Math.min(y,h)),C+o>r){v=!0;break}C+=o,x=m,S=h,h=m=ue.lastIndex}else if(T.lastIndex=h,T.test(e)){if(_=T.lastIndex-h,w=_*s,C+w>b&&(y=Math.min(y,h+Math.floor((b-C)/s))),C+w>r){v=!0;break}C+=w,x=m,S=h,h=m=T.lastIndex}else if(E.lastIndex=h,E.test(e)){if(_=E.lastIndex-h,w=_*c,C+w>b&&(y=Math.min(y,h+Math.floor((b-C)/c))),C+w>r){v=!0;break}C+=w,x=m,S=h,h=m=E.lastIndex}else if(de.lastIndex=h,de.test(e)){if(C+u>b&&(y=Math.min(y,h)),C+u>r){v=!0;break}C+=u,x=m,S=h,h=m=de.lastIndex}else h+=1}return{width:v?b:C,index:v?y:g,truncated:v,ellipsed:v&&r>=a}},he={limit:1/0,ellipsis:``,ellipsisWidth:0},O=(e,t={})=>me(e,he,t).width,ge=`]8;;`,_e=RegExp(`(?:\\[(?<code>\\d+)m|\\${ge}(?<uri>.*))`,`y`),ve=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},ye=e=>`[${e}m`,be=e=>`${ge}${e}`,xe=(e,t,n)=>{let r=t[Symbol.iterator](),i=!1,a=!1,o=e.at(-1),s=o===void 0?0:O(o),c=r.next(),l=r.next(),u=0;for(;!c.done;){let o=c.value,d=O(o);s+d<=n?e[e.length-1]+=o:(e.push(o),s=0),(o===`\x1B`||o===`›`)&&(i=!0,a=t.startsWith(ge,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())},Se=e=>{let t=e.split(` `),n=t.length;for(;n&&!O(t[n-1]);)n--;return n===t.length?e:t.slice(0,n).join(` `)+t.slice(n).join(``)},Ce=(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=O(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=O(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(``),xe(s,r,t),c=O(s.at(-1)??``)}else{if(c+i>t&&c&&i){if(n.wordWrap===!1&&c<t){xe(s,r,t),c=O(s.at(-1)??``);continue}s.push(``),c=0}c+i>t&&n.wordWrap===!1?(xe(s,r,t),c=O(s.at(-1)??``)):(s[s.length-1]+=r,c+=i)}}n.trim!==!1&&(s=s.map(e=>Se(e)));let l=s.join(`
3
3
  `),u=!1;for(let e=0;e<l.length;e++){let t=l[e];if(r+=t,!u)u=t>=`\ud800`&&t<=`\udbff`;else continue;if(t===`\x1B`||t===`›`){_e.lastIndex=e+1;let t=_e.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
4
  `){a&&(r+=be(``));let e=i?ve(i):void 0;i&&e&&(r+=ye(e))}else t===`
5
5
  `&&(i&&ve(i)&&(r+=ye(i)),a&&(r+=be(a)))}return r},we=/\r?\n/;function Te(e,t,n){return String(e).normalize().split(we).map(e=>Ce(e,t,n)).join(`
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import{n as e}from"./auth-D5Yj9eYU.mjs";import{t}from"./output-BJEgbI0G.mjs";import{t as n}from"./dry-run-gy0Hl9xo.mjs";import{t as r}from"./progress-B-CVX0kn.mjs";import{t as i}from"./run-BZ6Fj3jQ.mjs";import"./telemetry-BZdRnr26.mjs";var a={method:`POST`,path:()=>`/internal/submit`,response:!1,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function o(e){return e.usage(`$0 internal submit create
2
+ import{n as e}from"./auth-FK2eLQ02.mjs";import{t}from"./output-BJEgbI0G.mjs";import{t as n}from"./dry-run-gy0Hl9xo.mjs";import{t as r}from"./progress-DLri-rA7.mjs";import{t as i}from"./run-Ciw_GIrC.mjs";import"./telemetry-Pt5GpCKD.mjs";var a={method:`POST`,path:()=>`/internal/submit`,response:!1,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function o(e){return e.usage(`$0 internal submit create
3
3
 
4
4
  Internal route for testing URL submissions.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const s={command:`create`,describe:`Internal route for testing URL submissions`,builder:o,handler:async o=>i({command:`internal submit create`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){n({command:`cf internal submit create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/internal/submit`,pathParams:{},bodyKind:`none`});return}let i=await e(o),s=await r(`Creating`,async()=>i.send(a));t(s,{successLabel:`Created`})})},c={command:`submit`,describe:`Operations for submit`,builder:e=>e.command(s).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},l={command:`internal`,describe:`internal`,builder:e=>e.command(c).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{l as default};
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import{n as e}from"./auth-D5Yj9eYU.mjs";import{t}from"./output-BJEgbI0G.mjs";import{t as n}from"./dry-run-gy0Hl9xo.mjs";import{t as r}from"./progress-B-CVX0kn.mjs";import{t as i}from"./run-BZ6Fj3jQ.mjs";import"./telemetry-BZdRnr26.mjs";var a={method:`GET`,path:()=>`/ips`,query:[`networks`]};function o(e){return e.usage(`$0 ips list
2
+ import{n as e}from"./auth-FK2eLQ02.mjs";import{t}from"./output-BJEgbI0G.mjs";import{t as n}from"./dry-run-gy0Hl9xo.mjs";import{t as r}from"./progress-DLri-rA7.mjs";import{t as i}from"./run-Ciw_GIrC.mjs";import"./telemetry-Pt5GpCKD.mjs";var a={method:`GET`,path:()=>`/ips`,query:[`networks`]};function o(e){return e.usage(`$0 ips list
3
3
 
4
4
  Get IPs used on the Cloudflare/JD Cloud network, see https://www.cloudflare.com/ips for Cloudflare IPs or https://developers.cloudflare.com/china-network/reference/infrastructure/ for JD Cloud IPs.`).option(`networks`,{type:`string`,description:"Specified as `jdcloud` to list IPs used by JD Cloud data centers."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const s={command:`list`,describe:`Cloudflare/JD Cloud IP Details`,builder:o,handler:async o=>i({command:`ips list`,classification:{safeFlags:[`dry-run`]}},o,async()=>{let i={networks:o.networks};if(o.dryRun){n({command:`cf ips list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/ips`,pathParams:{},query:i,bodyKind:`none`});return}let s=await e(o),c=await r(`Loading`,async()=>s.send(a,i));t(c,{successLabel:`Loaded`})})},c={command:`ips`,describe:`ips`,builder:e=>e.command(s).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{c as default};
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env node
2
+ import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CgBhtmON.mjs";import{n}from"./auth-FK2eLQ02.mjs";import{a as r,t as i}from"./context-Dp4CXG22.mjs";import{t as a}from"./output-BJEgbI0G.mjs";import{t as o}from"./dry-run-gy0Hl9xo.mjs";import{t as s}from"./progress-DLri-rA7.mjs";import{t as c}from"./run-Ciw_GIrC.mjs";import"./telemetry-Pt5GpCKD.mjs";import{n as l,t as u}from"./body-parser-BKcZS9iJ.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{a as f,n as p}from"./prompt-D0dXwuME.mjs";import{t as m}from"./body-unions-CjpNjwSW.mjs";var h={method:`POST`,path:t=>e`/accounts/${t.account_id}/k2/streams`,body:`json`};function g(e){return e.usage("$0 k2 streams create\n\nCreate a new K2 stream. HTTP is disabled when `http` is omitted. Enabled HTTP requires authentication and allows all origins unless `authentication` or `cors` say otherwise. At least one input must be enabled.").option(`http-authentication`,{type:`boolean`,description:`Indicates whether the HTTP endpoint requires an API token with K2 produce permission. When false, the endpoint accepts unauthenticated records. Defaults to true when HTTP is enabled without a stored value.`}).option(`http-cors-origins`,{type:`string`,array:!0,description:"Allows browser requests from these HTTP or HTTPS origins. Use a wildcard only as the sole origin. An empty list blocks cross-origin browser requests. Defaults to `['*']` when HTTP is enabled without stored origins."}).option(`http-enabled`,{type:`boolean`,description:`Indicates whether the HTTP endpoint accepts records.`}).option(`name`,{type:`string`,description:`Specifies the name of the K2 stream.`}).option(`retention-seconds`,{type:`number`,description:`Sets the record retention period from 1 hour (3600 seconds) to 30 days (2592000 seconds), inclusive.`,default:604800}).option(`worker-binding-enabled`,{type:`boolean`,description:`Indicates whether Workers bindings can produce records to the stream.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{let t=[`http-authentication`,`http-cors-origins`,`http-enabled`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`http-enabled`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --http-* flag is set`)}return!0})}const _=[{path:[`worker_binding`],selector:`enabled`,variants:[{values:[!1],schema:{type:`object`,properties:{enabled:{enum:[!1]}},required:[`enabled`],additionalProperties:!1}},{values:[!0],schema:{type:`object`,properties:{enabled:{enum:[!0]}},required:[`enabled`],additionalProperties:!1}}]}],v={command:`create`,describe:`Create K2 stream`,builder:g,handler:async e=>c({command:`k2 streams create`,classification:{safeFlags:[`http-authentication`,`http-enabled`,`worker-binding-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf k2 streams create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/k2/streams`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m(u({http:{authentication:e[`http-authentication`],cors:{origins:e[`http-cors-origins`]},enabled:e[`http-enabled`]},name:d(e.name,`name`,`text`),retention_seconds:e[`retention-seconds`],worker_binding:{enabled:e[`worker-binding-enabled`]}}),_):l(e.body)});return}let c=await n(e),p=e.local?t:await i();if(e.accountId=p,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(h,{body:t,account_id:p}));a(n,{successLabel:`Created`});return}e.name===void 0&&(e.name=await f(`name`,`Specifies the name of the K2 stream.`));let g=u({http:{authentication:e[`http-authentication`],cors:{origins:e[`http-cors-origins`]},enabled:e[`http-enabled`]},name:d(e.name,`name`,`text`),retention_seconds:e[`retention-seconds`],worker_binding:{enabled:e[`worker-binding-enabled`]}});m(g,_);let v=await s(`Creating`,async()=>c.send(h,{body:g,account_id:p}));a(v,{successLabel:`Created`})})};var y={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/k2/streams/${t.stream_id}`};function b(e){return e.usage(`$0 k2 streams delete <stream-id>
3
+
4
+ Delete a K2 stream in an account. Deleting a stream that does not exist also succeeds.`).positional(`stream-id`,{type:`string`,description:`Specifies the public ID of the K2 stream.`,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 x={command:`delete <stream-id>`,describe:`Delete K2 stream`,builder:b,handler:async e=>c({command:`k2 streams delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf k2 streams delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/k2/streams/${e[`stream-id`]==null?`<stream-id>`:encodeURIComponent(String(e[`stream-id`]))}`,pathParams:{"stream-id":String(e[`stream-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await p({force:!!e.force}))return;let u=await s(`Deleting`,async()=>c.send(y,{account_id:l,stream_id:e[`stream-id`]}));a(u,{successLabel:`Deleted`})})};var S={method:`GET`,path:t=>e`/accounts/${t.account_id}/k2/streams/${t.stream_id}`};function C(e){return e.usage(`$0 k2 streams get <stream-id>
5
+
6
+ Get K2 stream details.`).positional(`stream-id`,{type:`string`,description:`Specifies the public ID of the K2 stream.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const w={command:`get <stream-id>`,describe:`Get K2 stream`,builder:C,handler:async e=>c({command:`k2 streams get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf k2 streams get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/k2/streams/${e[`stream-id`]==null?`<stream-id>`:encodeURIComponent(String(e[`stream-id`]))}`,pathParams:{"stream-id":String(e[`stream-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(S,{account_id:l,stream_id:e[`stream-id`]}));a(u,{successLabel:`Loaded`})})};var T={method:`GET`,path:t=>e`/accounts/${t.account_id}/k2/streams`,query:[`name`,`page`,`per_page`]};function E(e){return e.usage(`$0 k2 streams list
7
+
8
+ List or filter K2 streams in an account.`).option(`name`,{type:`string`,description:`Filters K2 streams by name using a case-insensitive substring.`}).option(`page`,{type:`number`,description:`Page`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const D={command:`list`,describe:`List K2 streams`,builder:E,handler:async e=>c({command:`k2 streams list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let c={name:e.name,page:e.page,per_page:e[`per-page`]};if(e.dryRun){let e=await r();o({command:`cf k2 streams list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/k2/streams`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(T,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})};var O={method:`GET`,path:t=>e`/accounts/${t.account_id}/k2/streams/${t.stream_id}/subscriptions`};function k(e){return e.usage(`$0 k2 streams subscriptions list
9
+
10
+ Lists every subscription on one stream, oldest first. Lag uses committed positions, not reserved read positions. A failed tail observation preserves subscription metadata and returns unavailable lag.`).option(`stream-id`,{type:`string`,description:`Specifies the public ID of the K2 stream.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const A={command:`list`,describe:`List subscriptions with consumer lag`,builder:k,handler:async e=>c({command:`k2 streams subscriptions list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf k2 streams subscriptions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/k2/streams/${e[`stream-id`]==null?`<stream-id>`:encodeURIComponent(String(e[`stream-id`]))}/subscriptions`,pathParams:{"stream-id":String(e[`stream-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(O,{account_id:l,stream_id:e[`stream-id`]}));a(u,{successLabel:`Loaded`})})},j={command:`subscriptions`,describe:`Subscriptions that consume a K2 stream, with committed-position lag`,builder:e=>e.command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var M={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/k2/streams/${t.stream_id}`,body:`json`};function N(e){return e.usage("$0 k2 streams update <stream-id>\n\nUpdate a K2 stream. Omitted `http` settings, such as `authentication` and `cors`, keep their current values. Disabling HTTP keeps them, so enabling HTTP again restores them. At least one input must remain enabled.").positional(`stream-id`,{type:`string`,description:`Specifies the public ID of the K2 stream.`,demandOption:!0}).option(`http-authentication`,{type:`boolean`,description:`Indicates whether the HTTP endpoint requires an API token with K2 produce permission. When false, the endpoint accepts unauthenticated records. Defaults to true when HTTP is enabled without a stored value.`}).option(`http-cors-origins`,{type:`string`,array:!0,description:"Allows browser requests from these HTTP or HTTPS origins. Use a wildcard only as the sole origin. An empty list blocks cross-origin browser requests. Defaults to `['*']` when HTTP is enabled without stored origins."}).option(`http-enabled`,{type:`boolean`,description:`Indicates whether the HTTP endpoint accepts records.`}).option(`retention-seconds`,{type:`number`,description:`Sets the record retention period from 1 hour (3600 seconds) to 30 days (2592000 seconds), inclusive.`}).option(`worker-binding-enabled`,{type:`boolean`,description:`Indicates whether Workers bindings can produce records to the stream.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{let t=[`http-authentication`,`http-cors-origins`,`http-enabled`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`http-enabled`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --http-* flag is set`)}return!0})}const P=[{path:[`worker_binding`],selector:`enabled`,variants:[{values:[!1],schema:{type:`object`,properties:{enabled:{enum:[!1]}},required:[`enabled`],additionalProperties:!1}},{values:[!0],schema:{type:`object`,properties:{enabled:{enum:[!0]}},required:[`enabled`],additionalProperties:!1}}]}],F={command:`update <stream-id>`,describe:`Update K2 stream`,builder:N,handler:async e=>c({command:`k2 streams update`,classification:{safeFlags:[`http-authentication`,`http-enabled`,`worker-binding-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf k2 streams update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/k2/streams/${e[`stream-id`]==null?`<stream-id>`:encodeURIComponent(String(e[`stream-id`]))}`,pathParams:{"stream-id":String(e[`stream-id`]??``)},bodyKind:`json`,body:e.body===void 0?m(u({http:{authentication:e[`http-authentication`],cors:{origins:e[`http-cors-origins`]},enabled:e[`http-enabled`]},retention_seconds:e[`retention-seconds`],worker_binding:{enabled:e[`worker-binding-enabled`]}}),P):l(e.body)});return}let c=await n(e),d=e.local?t:await i();if(e.accountId=d,e.body){let t=l(e.body),n=await s(`Updating`,async()=>c.send(M,{body:t,account_id:d,stream_id:e[`stream-id`]}));a(n,{successLabel:`Updated`});return}let f=u({http:{authentication:e[`http-authentication`],cors:{origins:e[`http-cors-origins`]},enabled:e[`http-enabled`]},retention_seconds:e[`retention-seconds`],worker_binding:{enabled:e[`worker-binding-enabled`]}});m(f,P);let p=await s(`Updating`,async()=>c.send(M,{body:f,account_id:d,stream_id:e[`stream-id`]}));a(p,{successLabel:`Updated`})})},I={command:`streams`,describe:`K2 streams, their retention, and the HTTP and Workers binding inputs used to produce records`,builder:e=>e.command(v).command(x).command(w).command(D).command(F).command(j).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},L={command:`k2`,describe:`Durable, ordered event streams that you produce records to and consume from with subscriptions`,builder:e=>e.command(I).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{L as default};