cf 1.0.0-beta.28 → 1.0.0-beta.29

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 (328) hide show
  1. package/README.md +10 -3
  2. package/dist/_meta/commands.json +2240 -3181
  3. package/dist/_meta/hand-written-commands.json +38 -8
  4. package/dist/_meta/schemas.json +1683 -2505
  5. package/dist/{abuse-reports-D9edOyag.mjs → abuse-reports-DqXYX_6F.mjs} +10 -10
  6. package/dist/{access-CKCCSrrU.mjs → access-Cte4yyIz.mjs} +1 -1
  7. package/dist/{accounts-CNb9U9bK.mjs → accounts-G-x-_cEx.mjs} +58 -57
  8. package/dist/{acm-CdKTAToZ.mjs → acm-Bg3HqMGG.mjs} +7 -7
  9. package/dist/{addressing-eZI_C-b0.mjs → addressing-BwEofGEm.mjs} +46 -46
  10. package/dist/{agent-memory-BBHCEE7h.mjs → agent-memory-DhwZ2KRw.mjs} +15 -15
  11. package/dist/{ai-Csl_QNwv.mjs → ai-DWWRIQIt.mjs} +16 -16
  12. package/dist/{ai-audit-DlqWsQi-.mjs → ai-audit-CMEBz6ZP.mjs} +3 -3
  13. package/dist/ai-gateway-D2s0isU-.mjs +76 -0
  14. package/dist/ai-search-a0uqr9yJ.mjs +74 -0
  15. package/dist/{ai-security-DvU2iYkY.mjs → ai-security-H_RqjRoL.mjs} +4 -4
  16. package/dist/alerting-Bgp9rE4I.mjs +52 -0
  17. package/dist/analytics-CFYM82FD.mjs +17 -0
  18. package/dist/{analytics-engine-BlIecoOe.mjs → analytics-engine-BLiEaLxb.mjs} +2 -2
  19. package/dist/{api-security-DZ7GWOqD.mjs → api-security-B0YtHglt.mjs} +63 -63
  20. package/dist/{argo-Bh0_cj49.mjs → argo-BPwbzHY7.mjs} +7 -7
  21. package/dist/{artifacts-VZJWVq_6.mjs → artifacts-B6UwC2PH.mjs} +20 -20
  22. package/dist/{audit-logs-B8cGL4B9.mjs → audit-logs-kG97iEnI.mjs} +2 -2
  23. package/dist/auth-Czr8ChBB.mjs +2 -0
  24. package/dist/auth-DA1PHaHi.mjs +2 -0
  25. package/dist/auth-Dwfa4S3h.mjs +7 -0
  26. package/dist/{auth-token-DW4dJVdj.mjs → auth-token-CE3Wa5-b.mjs} +1 -1
  27. package/dist/{autoconfig-C0ynlGHf.mjs → autoconfig-B4tFR6ua.mjs} +120 -116
  28. package/dist/{basin-catalog-TehR1sKZ.mjs → basin-catalog-DzVEPupy.mjs} +17 -17
  29. package/dist/{billing-B2KusU6g.mjs → billing-TERxOuLR.mjs} +11 -11
  30. package/dist/{blocks-BFulF68V.mjs → blocks-C3Im7AT0.mjs} +1 -1
  31. package/dist/body-parser-HN91kAf0.mjs +2 -0
  32. package/dist/{body-unions-DNs981Ia.mjs → body-unions-D9OSaf4M.mjs} +1 -1
  33. package/dist/{bot-management-CXHXgrQC.mjs → bot-management-SZw9jTOC.mjs} +4 -4
  34. package/dist/{botnet-feed-UyK7Rfp6.mjs → botnet-feed-DjdAeUtb.mjs} +5 -5
  35. package/dist/brand-protection-BpA7Gmf1.mjs +18 -0
  36. package/dist/browser-run-BvjfMK3f.mjs +40 -0
  37. package/dist/build-CCwo_ydV.mjs +2 -0
  38. package/dist/{build-FFxzigo4.mjs → build-yQOzZg6Z.mjs} +1 -1
  39. package/dist/builds-tMa3sbQU.mjs +62 -0
  40. package/dist/{cache-BacNNtLu.mjs → cache-b_EPh6Is.mjs} +18 -18
  41. package/dist/cf-DmvZ2L51.mjs +18 -0
  42. package/dist/{chunk-DSGVRFIS-BaNZNW-M.mjs → chunk-DSGVRFIS-Cj7pO-YQ.mjs} +1 -1
  43. package/dist/chunk-Q5KVZMHK-WOCEMyET.mjs +363 -0
  44. package/dist/cli-Cc7ujzAy.mjs +4 -0
  45. package/dist/{client-side-security-bzB9JosR.mjs → client-side-security-DVkeCzcC.mjs} +14 -14
  46. package/dist/{cloud-connector-BHtf37R5.mjs → cloud-connector-MVf4acRR.mjs} +3 -3
  47. package/dist/{cloudflared-QDdHMUEY.mjs → cloudflared-BOkMl8Gm.mjs} +1 -1
  48. package/dist/cloudforce-one-KrCfQbRx.mjs +318 -0
  49. package/dist/{command-D895kdlh.mjs → command-BQbZw4Kx.mjs} +1 -1
  50. package/dist/command-BVct0Dvr.mjs +2 -0
  51. package/dist/{command-DeutqL1n.mjs → command-C4_lMRkw.mjs} +1 -1
  52. package/dist/command-CJ3ldWrA.mjs +2 -0
  53. package/dist/command-CyOdBNur.mjs +2 -0
  54. package/dist/command-D2XkyO1e.mjs +2 -0
  55. package/dist/command-DHODgfFZ.mjs +2 -0
  56. package/dist/command-DIIaZx_f.mjs +2 -0
  57. package/dist/command-DONwHpqZ.mjs +2 -0
  58. package/dist/command-DdYnSf-8.mjs +2 -0
  59. package/dist/command-DqOU7Ql2.mjs +2 -0
  60. package/dist/{command-CbxXc5IW.mjs → command-HW7k43qu.mjs} +1 -1
  61. package/dist/command-NqM0lo4a.mjs +2 -0
  62. package/dist/command-bwVDyMv4.mjs +2 -0
  63. package/dist/command-yzqs4m83.mjs +2 -0
  64. package/dist/{completions-BvdKtzsX.mjs → completions-0YKvIyBT.mjs} +2 -2
  65. package/dist/{connector-interrupts-dUPW6Ya_.mjs → connector-interrupts-CsunbRsr.mjs} +3 -3
  66. package/dist/{connector-telemetry-events-DWVCqnhn.mjs → connector-telemetry-events-DmQPD7xC.mjs} +3 -3
  67. package/dist/{connector-telemetry-snapshots-CeMP3qeI.mjs → connector-telemetry-snapshots-C62iHjC9.mjs} +3 -3
  68. package/dist/{connectors-DZFGNw3i.mjs → connectors-Bg0MU6ZT.mjs} +7 -7
  69. package/dist/{containers-DCzQCo79.mjs → containers-BiA_bpPR.mjs} +22 -21
  70. package/dist/{content-scan-XhnNJqXf.mjs → content-scan-4SA2nacB.mjs} +6 -6
  71. package/dist/{context-BY1Eh_Qe.mjs → context-BGm5_wTT.mjs} +1 -1
  72. package/dist/{cps-CohlxvuN.mjs → cps-WDmD3V5I.mjs} +3 -3
  73. package/dist/csam-scanner-Rmy-hBEA.mjs +8 -0
  74. package/dist/{custom-csrs-BVdMQjYq.mjs → custom-csrs-D-lvkyRV.mjs} +5 -5
  75. package/dist/{custom-hostnames-r-CxhSa1.mjs → custom-hostnames-B5BQX5m6.mjs} +12 -12
  76. package/dist/{custom-nameservers-CapMDyly.mjs → custom-nameservers-CZrRjcjx.mjs} +4 -4
  77. package/dist/{custom-pages-BVIniWfq.mjs → custom-pages-CWwjtfbj.mjs} +10 -10
  78. package/dist/d1-N81q-FAr.mjs +50 -0
  79. package/dist/{delegate-CcL6RoGw.mjs → delegate-livNdiwK.mjs} +1 -1
  80. package/dist/delegate.mjs +1 -1
  81. package/dist/deploy-Ok4ncy06.mjs +2 -0
  82. package/dist/deploy-context-B_lLfxt7.mjs +55 -0
  83. package/dist/deploy-input-JZlEJwKB.mjs +2 -0
  84. package/dist/dev-DxbkJkzc.mjs +4 -0
  85. package/dist/{diagnostics-C3nqxsAO.mjs → diagnostics-DlJzpO8b.mjs} +7 -7
  86. package/dist/dialog-CD94-Kzw.mjs +2 -0
  87. package/dist/discover-D9FNaCDK.mjs +2 -0
  88. package/dist/discover-DGsMj9ZN.mjs +2 -0
  89. package/dist/{dist-D-ihn_mV.mjs → dist-BxhwE-W1.mjs} +193 -193
  90. package/dist/{dls-N1x8sAK3.mjs → dls-5OXuxLAB.mjs} +8 -8
  91. package/dist/{dns-DATWP-PF.mjs → dns-Burep9O7.mjs} +59 -69
  92. package/dist/{dns-firewall-n3Y2ui6W.mjs → dns-firewall-hUHaQ0DE.mjs} +8 -8
  93. package/dist/docs-BFVK88kB.mjs +3 -0
  94. package/dist/{dry-run-kJbjn4kG.mjs → dry-run-qsnRlRk6.mjs} +1 -1
  95. package/dist/{durable-objects-DHK9w-vO.mjs → durable-objects-D6R8S2Dk.mjs} +3 -3
  96. package/dist/email-auth--2KCzZNA.mjs +6 -0
  97. package/dist/email-routing-DzaExfVf.mjs +44 -0
  98. package/dist/{email-security-DK_SJ0yi.mjs → email-security-DwQJszzy.mjs} +71 -71
  99. package/dist/{email-sending-CTQafGec.mjs → email-sending-mQd2qB-o.mjs} +21 -21
  100. package/dist/errors-C_bGcR0X.mjs +11 -0
  101. package/dist/field-extractors-MVOizTlB.mjs +8 -0
  102. package/dist/{firewall-CW-fAI9m.mjs → firewall-DtSIlkfL.mjs} +19 -19
  103. package/dist/{flagship-RiLnDwfJ.mjs → flagship-9E5gwNki.mjs} +12 -12
  104. package/dist/{fraud-DvfBBTe8.mjs → fraud-DjqhVJdf.mjs} +3 -3
  105. package/dist/generate-BzOnRBij.mjs +2 -0
  106. package/dist/generate-DfxZtpn9.mjs +2 -0
  107. package/dist/{global-options-DiKj2cQy.mjs → global-options-4pyD17hd.mjs} +1 -1
  108. package/dist/{google-tag-gateway-C5WYsSXv.mjs → google-tag-gateway-BM5GmCZa.mjs} +3 -3
  109. package/dist/gt-BV-jij5q.mjs +4 -0
  110. package/dist/healthchecks-CEZ5f3XJ.mjs +20 -0
  111. package/dist/{hyperdrive-Ch6klUp3.mjs → hyperdrive-Da8hCcUw.mjs} +12 -12
  112. package/dist/{iam-LlGEzRCq.mjs → iam-BK6N7NdQ.mjs} +31 -31
  113. package/dist/{images-C5WqUXkK.mjs → images-3bCWE6Ml.mjs} +33 -33
  114. package/dist/index.mjs +1 -1
  115. package/dist/init-BgCF9K8h.mjs +43 -0
  116. package/dist/{intel-vcWyslaX.mjs → intel-BQ58CJLt.mjs} +30 -30
  117. package/dist/{interactive-BCDFSPtq.mjs → interactive-JBA3qOUa.mjs} +9 -9
  118. package/dist/{internal-BhV9WjLp.mjs → internal-CWPz0sBF.mjs} +2 -2
  119. package/dist/{ips-CqHjVsqd.mjs → ips-3WYegiVW.mjs} +2 -2
  120. package/dist/{k2-CZT2Pd5J.mjs → k2-Bc_hjmiv.mjs} +5 -5
  121. package/dist/{kv-Ipa7dnvF.mjs → kv-DbShBhhg.mjs} +6 -6
  122. package/dist/{lazy-command-DbKVgdGT.mjs → lazy-command-CbGyEqFK.mjs} +1 -1
  123. package/dist/leaked-credential-checks-DgPefxP9.mjs +16 -0
  124. package/dist/{live-C9L1bNuE.mjs → live-BTtMv1a6.mjs} +2 -2
  125. package/dist/load-balancers-C2hg52WA.mjs +84 -0
  126. package/dist/{local-DIJ7SIKC.mjs → local-B3zt9PXR.mjs} +1 -1
  127. package/dist/local-DRxctCh9.mjs +2 -0
  128. package/dist/local-runtime-BOnDiMDc.mjs +2 -0
  129. package/dist/{log-BWdaOGOW.mjs → log-Brx-wjJW.mjs} +3 -3
  130. package/dist/log-DBAHla_W.mjs +2 -0
  131. package/dist/login-CK3nn9a5.mjs +2 -0
  132. package/dist/{login-DG5ebyab.mjs → login-DiR-buzS.mjs} +3 -3
  133. package/dist/{logpush-C5Gw7F_9.mjs → logpush-CitvUX-J.mjs} +22 -22
  134. package/dist/{logs-y3REfHbb.mjs → logs-CfWHu4Ir.mjs} +14 -16
  135. package/dist/{magic-network-monitoring-BZBGZB6M.mjs → magic-network-monitoring-gU6yzzML.mjs} +17 -17
  136. package/dist/{magic-transit-BPV_POf5.mjs → magic-transit-B3JY9u5o.mjs} +139 -139
  137. package/dist/{managed-defense-BaUBSUcz.mjs → managed-defense-C_EQ-NYp.mjs} +9 -9
  138. package/dist/managed-transforms-DIGl6JkM.mjs +8 -0
  139. package/dist/{mcp-RPtrISTy.mjs → mcp-DqhQJVaz.mjs} +15 -15
  140. package/dist/{mesh-DZ4QHBPE.mjs → mesh-DXVZBNDC.mjs} +12 -12
  141. package/dist/{migrate-CRIUqGi2.mjs → migrate-CmXyk9vX.mjs} +1 -1
  142. package/dist/{monetization-CVZqM8Xo.mjs → monetization-CWg-mySr.mjs} +9 -9
  143. package/dist/{network-interconnects-9nS5jL__.mjs → network-interconnects-DhfKL5tG.mjs} +17 -19
  144. package/dist/{network-DLt2JUo1.mjs → network-jtgq5eb4.mjs} +24 -24
  145. package/dist/o11y-eYYs59X9.mjs +88 -0
  146. package/dist/oauth-BgDZMd72.mjs +5 -0
  147. package/dist/{oauth-Cidoyxfp.mjs → oauth-V37G-PaV.mjs} +1 -1
  148. package/dist/{observability-C-KNh__y.mjs → observability-CB72eC4T.mjs} +2 -2
  149. package/dist/{ohttp-gateway-B5nCl4s3.mjs → ohttp-gateway-K9ToEft8.mjs} +4 -4
  150. package/dist/{organizations-DbeeWUL4.mjs → organizations-BllV7l_c.mjs} +18 -19
  151. package/dist/output-hFMAotFl.mjs +2 -0
  152. package/dist/package-oNVeacC9.mjs +2 -0
  153. package/dist/page-rules-BVmi-ZFW.mjs +35 -0
  154. package/dist/pages-5spcBpX1.mjs +48 -0
  155. package/dist/{pay-per-crawl-EHYtSKxX.mjs → pay-per-crawl-BgsdGcBi.mjs} +18 -18
  156. package/dist/{pay-per-use-wdEhl8k4.mjs → pay-per-use-CzmI1kEA.mjs} +16 -16
  157. package/dist/pipelines-CbtmLRxt.mjs +40 -0
  158. package/dist/{precursor-Dx8lN4UJ.mjs → precursor-Dk8YOKf_.mjs} +2 -2
  159. package/dist/previews-Bv1HMMtO.mjs +6 -0
  160. package/dist/progress-DE_G09u2.mjs +2 -0
  161. package/dist/project-settings-D_S-UC8I.mjs +3 -0
  162. package/dist/prompt-D274Im1O.mjs +4 -0
  163. package/dist/{queues-DgMc7Z6A.mjs → queues-DGCYUr4g.mjs} +26 -26
  164. package/dist/{r2-BpTVicIq.mjs → r2-DtCk-Nfi.mjs} +51 -51
  165. package/dist/{radar-DW-S1VUh.mjs → radar-1CwqOsMZ.mjs} +150 -150
  166. package/dist/raw-fetch-DhlyWQtk.mjs +2 -0
  167. package/dist/{ready-d0li0X6r.mjs → ready-CcoEA7M7.mjs} +2 -2
  168. package/dist/{realtime-DMKHLYF4.mjs → realtime-DFUxwIG5.mjs} +80 -81
  169. package/dist/registrar-Cl1snz8z.mjs +43 -0
  170. package/dist/{registrar-sandbox-lVLB1-mC.mjs → registrar-sandbox-Cne9BVCZ.mjs} +9 -9
  171. package/dist/{reporting-WX8P3Y0k.mjs → reporting-D9FC-Z-3.mjs} +7 -7
  172. package/dist/request-headers-Bopp5lH_.mjs +2 -0
  173. package/dist/request-tracers-CSSB9_aW.mjs +4 -0
  174. package/dist/{resource-sharing-B2ZSt_cA.mjs → resource-sharing-D8yuzJm7.mjs} +18 -18
  175. package/dist/{rules-CB0QQTB3.mjs → rules-DzmOQ3MB.mjs} +8 -8
  176. package/dist/rulesets-DsTGcgbc.mjs +42 -0
  177. package/dist/{rum-BZ_24qZU.mjs → rum-DrJLI93T.mjs} +14 -14
  178. package/dist/run-C5yPsiO2.mjs +2 -0
  179. package/dist/run-CXWkMU3x.mjs +2 -0
  180. package/dist/schema-CfZOW8Zw.mjs +2 -0
  181. package/dist/{schema-cache-5NkOj7Y3.mjs → schema-cache-CtqAs0PP.mjs} +1 -1
  182. package/dist/schema-flags-DO3kLYBu.mjs +4 -0
  183. package/dist/{scim-DchxaJfE.mjs → scim-0OufLKru.mjs} +8 -8
  184. package/dist/{secrets-store-oAft1cFE.mjs → secrets-store-BQeLzFxv.mjs} +11 -11
  185. package/dist/{security-insights-DMm0qg_m.mjs → security-insights-D2pj8-O-.mjs} +20 -20
  186. package/dist/{security-txt-CIt0494b.mjs → security-txt-SKtgW4n-.mjs} +4 -4
  187. package/dist/session-COdP8BXD.mjs +2 -0
  188. package/dist/shared-D_2KLpP3.mjs +2 -0
  189. package/dist/{signed-url-gNangfwc.mjs → signed-url-CcE2zQ4Y.mjs} +2 -2
  190. package/dist/smart-shield-Dod9Gs6T.mjs +22 -0
  191. package/dist/snippets-DrrdpLnS.mjs +18 -0
  192. package/dist/spawn-DNf-Ge8d.mjs +5 -0
  193. package/dist/{spectrum-DLYIHelC.mjs → spectrum-CHBGZbZF.mjs} +11 -11
  194. package/dist/{speed-DugG9Tm9.mjs → speed-vOlHyG3v.mjs} +11 -11
  195. package/dist/sql-BCuLxGSf.mjs +4 -0
  196. package/dist/src-ByCoEqOw.mjs +133 -0
  197. package/dist/{ssl-Bg4X3WGk.mjs → ssl-BA_dcVwF.mjs} +60 -62
  198. package/dist/startup-profile-CyQk_f_L.mjs +2 -0
  199. package/dist/{startup-profile-DZL2DC44.mjs → startup-profile-uh-F0HRS.mjs} +3 -3
  200. package/dist/state-B6r-b_-d.mjs +2 -0
  201. package/dist/{state-mr5ux1Nb.mjs → state-CTLznbVs.mjs} +1 -1
  202. package/dist/static-assets-DGDoaJf1.mjs +386 -0
  203. package/dist/stream-CzlqY8hq.mjs +89 -0
  204. package/dist/{tags-SKz2odE_.mjs → tags-BLeaslAb.mjs} +8 -8
  205. package/dist/telemetry-COlodX5Z.mjs +2 -0
  206. package/dist/{telemetry-B4zmCpT0.mjs → telemetry-DF7A5Bpk.mjs} +1 -1
  207. package/dist/{tenant-custom-nameservers-BhkhBerL.mjs → tenant-custom-nameservers-C5rh6jPf.mjs} +4 -4
  208. package/dist/{tenants-DD-GMq0K.mjs → tenants-CRirmhxS.mjs} +3 -3
  209. package/dist/{tools-KW_4hvzY.mjs → tools-BRjRgZnj.mjs} +1 -1
  210. package/dist/tunnels-nLfIWPYT.mjs +27 -0
  211. package/dist/{turnstile-DhSU_Xar.mjs → turnstile-CZjXtBCr.mjs} +10 -10
  212. package/dist/ui-dWsVmFCG.mjs +2 -0
  213. package/dist/{update-check-HltjTMDE.mjs → update-check-CXMdVBhW.mjs} +1 -1
  214. package/dist/{update-check-CRttabfu.mjs → update-check-D_Oky9-u.mjs} +1 -1
  215. package/dist/update-check-worker.mjs +1 -1
  216. package/dist/{url-normalization-K7gkmPvG.mjs → url-normalization-DTKgJHE8.mjs} +4 -4
  217. package/dist/url-scanner-9XW3zLaU.mjs +16 -0
  218. package/dist/user-Bk1BIqZ5.mjs +103 -0
  219. package/dist/{vectorize-BTBerJME.mjs → vectorize-CgOfmWYq.mjs} +15 -15
  220. package/dist/version-CcuBNjqg.mjs +2 -0
  221. package/dist/waiting-rooms-C3nTKfK9.mjs +52 -0
  222. package/dist/{web-assets-LHPQsrnY.mjs → web-assets-CWU3jrit.mjs} +29 -29
  223. package/dist/{web3-BsOio0Ae.mjs → web3-CRpQ5sl4.mjs} +13 -13
  224. package/dist/workers-BZMvamn0.mjs +39 -0
  225. package/dist/{workers-for-platforms-BGp6yr6P.mjs → workers-for-platforms-C7F2ev-5.mjs} +18 -18
  226. package/dist/{workers-vpc-D8lefWDo.mjs → workers-vpc-ztEKvWmq.mjs} +6 -6
  227. package/dist/{workflows-B-ZIG3y7.mjs → workflows-Dd88_Nqc.mjs} +24 -24
  228. package/dist/{wrangler-migration-6E6wT_LZ.mjs → wrangler-migration-BzMTJPdI.mjs} +294 -294
  229. package/dist/zaraz-BFK0p28R.mjs +22 -0
  230. package/dist/{zero-trust-BZDXM5r6.mjs → zero-trust-Cdjfp0Ie.mjs} +441 -455
  231. package/dist/{zones-B-UV_DGE.mjs → zones-DDn5jk6I.mjs} +51 -51
  232. package/package.json +19 -19
  233. package/dist/ai-gateway-Lj4On37s.mjs +0 -74
  234. package/dist/ai-search-BxyhS3X7.mjs +0 -74
  235. package/dist/alerting-r0G2X9y9.mjs +0 -52
  236. package/dist/analytics-C6bfqm-W.mjs +0 -17
  237. package/dist/auth-B-h0BHg7.mjs +0 -2
  238. package/dist/auth-B6tswVxH.mjs +0 -2
  239. package/dist/auth-clmqFEWU.mjs +0 -7
  240. package/dist/body-parser-DoewLePl.mjs +0 -2
  241. package/dist/brand-protection-kv1ba80i.mjs +0 -14
  242. package/dist/browser-run-D-vRoZmf.mjs +0 -40
  243. package/dist/build-BzJGqb2o.mjs +0 -2
  244. package/dist/builds-BbxINHRP.mjs +0 -64
  245. package/dist/cf-BQ_LRiut.mjs +0 -18
  246. package/dist/chunk-SOBRPAPT-QTjnHSNs.mjs +0 -363
  247. package/dist/cli-B7vslRfu.mjs +0 -4
  248. package/dist/cloudforce-one-DWBPQDA3.mjs +0 -318
  249. package/dist/command-AVwd7XjE.mjs +0 -2
  250. package/dist/command-B87T_f2f.mjs +0 -2
  251. package/dist/command-CEHhi3t0.mjs +0 -2
  252. package/dist/command-CYmQE79n.mjs +0 -2
  253. package/dist/command-Ce8CVLth.mjs +0 -2
  254. package/dist/command-CqDudQZs.mjs +0 -2
  255. package/dist/command-D4YcwpVp.mjs +0 -2
  256. package/dist/command-D9Qyi1B0.mjs +0 -2
  257. package/dist/command-Dl9ICrRK.mjs +0 -2
  258. package/dist/command-DtCSe8Hy.mjs +0 -2
  259. package/dist/command-DwzVtmb3.mjs +0 -2
  260. package/dist/command-wtBubtZ4.mjs +0 -2
  261. package/dist/containers-B06OGOEB.mjs +0 -380
  262. package/dist/csam-scanner-BV4bHq8v.mjs +0 -8
  263. package/dist/d1-nJCOJZb8.mjs +0 -50
  264. package/dist/deploy-DJMnWFNk.mjs +0 -2
  265. package/dist/deploy-context-YCW3eqP1.mjs +0 -56
  266. package/dist/deploy-input-CQLBXFEB.mjs +0 -2
  267. package/dist/dev-GsYHvMah.mjs +0 -4
  268. package/dist/dialog-D5lus4M4.mjs +0 -2
  269. package/dist/discover-6kAmVMPp.mjs +0 -2
  270. package/dist/discover-C06Syc2B.mjs +0 -2
  271. package/dist/docs-CRc_WOXh.mjs +0 -3
  272. package/dist/email-auth-ptdqNSTZ.mjs +0 -6
  273. package/dist/email-domains-uL22-zRY.mjs +0 -14
  274. package/dist/email-routing-CV43rMJC.mjs +0 -44
  275. package/dist/errors-VG1mgwJl.mjs +0 -11
  276. package/dist/field-extractors-jcZ_bAGc.mjs +0 -8
  277. package/dist/generate-CeeWW3eX.mjs +0 -3
  278. package/dist/generate-D6V4Q58z.mjs +0 -2
  279. package/dist/gt-BQkaDQDq.mjs +0 -3
  280. package/dist/healthchecks-BA1fmzTm.mjs +0 -20
  281. package/dist/init-EVsjBrOz.mjs +0 -43
  282. package/dist/leaked-credential-checks-EzT4TTjO.mjs +0 -16
  283. package/dist/load-balancers-Cb3VkSfc.mjs +0 -84
  284. package/dist/local-D5Vq6ooZ.mjs +0 -2
  285. package/dist/local-runtime-BZjgkacr.mjs +0 -2
  286. package/dist/log-DZfik9Jk.mjs +0 -2
  287. package/dist/login-DRJugxya.mjs +0 -2
  288. package/dist/managed-transforms-CjkjLzMC.mjs +0 -8
  289. package/dist/o11y-ySxrnP1Z.mjs +0 -88
  290. package/dist/oauth-CFVUl-Wv.mjs +0 -4
  291. package/dist/output-BZQEl3mK.mjs +0 -2
  292. package/dist/package-B7RgwuFR.mjs +0 -2
  293. package/dist/page-rules-DRw763O1.mjs +0 -38
  294. package/dist/pages-DfQnxiTk.mjs +0 -48
  295. package/dist/pipelines-DbyrI6F4.mjs +0 -40
  296. package/dist/previews-DEVNSip2.mjs +0 -6
  297. package/dist/progress-yvPscjYg.mjs +0 -2
  298. package/dist/project-settings-nBMEx1f-.mjs +0 -3
  299. package/dist/prompt-CEpZ-lQZ.mjs +0 -4
  300. package/dist/raw-fetch-Cl5spWC3.mjs +0 -2
  301. package/dist/registrar-D23gfKBi.mjs +0 -43
  302. package/dist/request-headers-C0FpeBhz.mjs +0 -2
  303. package/dist/request-tracers-qd7XOAka.mjs +0 -4
  304. package/dist/rulesets-DmqwixUC.mjs +0 -42
  305. package/dist/run-BOKI1uWa.mjs +0 -2
  306. package/dist/run-DBqOjD1P.mjs +0 -2
  307. package/dist/schema-Dj9STsWI.mjs +0 -2
  308. package/dist/schema-flags-CXm9iIv6.mjs +0 -4
  309. package/dist/session-vzNfUhPl.mjs +0 -2
  310. package/dist/shared-MK-_lkbn.mjs +0 -2
  311. package/dist/smart-shield-Boy_qbqd.mjs +0 -22
  312. package/dist/snippets-DdoDYXW-.mjs +0 -18
  313. package/dist/spawn-B5F4OIHG.mjs +0 -5
  314. package/dist/sql-Bb56llsb.mjs +0 -4
  315. package/dist/src-BoSDeQ9m.mjs +0 -133
  316. package/dist/startup-profile-DQVkZZpb.mjs +0 -2
  317. package/dist/state-DW3QZtfh.mjs +0 -2
  318. package/dist/stream-BuZYDbNR.mjs +0 -89
  319. package/dist/telemetry-DkDUr4KK.mjs +0 -2
  320. package/dist/tunnels-D90ztENM.mjs +0 -27
  321. package/dist/ui-xjCox-gU.mjs +0 -2
  322. package/dist/url-scanner-BRdWwka4.mjs +0 -16
  323. package/dist/user-Cmb1_Wu5.mjs +0 -103
  324. package/dist/version-6Bpy6Bgt.mjs +0 -2
  325. package/dist/waiting-rooms-LymmKIGr.mjs +0 -52
  326. package/dist/workers-BnLiOjZf.mjs +0 -39
  327. package/dist/workers-builds-sKpITeRk.mjs +0 -14
  328. package/dist/zaraz-BBKki5WS.mjs +0 -22
@@ -0,0 +1,89 @@
1
+ #!/usr/bin/env node
2
+ import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{i as t,n}from"./auth-DA1PHaHi.mjs";import{t as r}from"./dry-run-qsnRlRk6.mjs";import{a as i,t as a}from"./context-BGm5_wTT.mjs";import{t as o}from"./local-B3zt9PXR.mjs";import{t as s}from"./output-hFMAotFl.mjs";import{t as c}from"./progress-DE_G09u2.mjs";import{t as l}from"./run-CXWkMU3x.mjs";import"./telemetry-COlodX5Z.mjs";import{a as u,n as d}from"./prompt-D274Im1O.mjs";import{c as f,i as p,o as m,r as h,t as g}from"./body-parser-HN91kAf0.mjs";import{n as _,t as v}from"./input-validation-D7z60HJH.mjs";import{n as y,t as b}from"./raw-fetch-DhlyWQtk.mjs";var ee={method:`POST`,path:t=>e`/accounts/${t.account_id}/stream/keys`};function te(e){return e.usage(`$0 stream keys create
3
+
4
+ Creates an RSA private key in PEM and JWK formats. Key files are only displayed once after creation. Keys are created, used, and deleted independently of videos, and every key can sign any video.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ne={command:`create`,describe:`Create signing keys`,builder:te,handler:async e=>l({command:`stream keys create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();r({command:`cf stream keys create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/stream/keys`,pathParams:{},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();e.accountId=l;let u=await c(`Creating`,async()=>t.send(ee,{account_id:l}));s(u,{successLabel:`Created`})})};var re={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/stream/keys/${t.identifier}`};function ie(e){return e.usage(`$0 stream keys delete <identifier>
5
+
6
+ Deletes signing keys and revokes all signed URLs generated with the key.`).positional(`identifier`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ae={command:`delete <identifier>`,describe:`Delete signing keys`,builder:ie,handler:async e=>l({command:`stream keys delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf stream keys delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/stream/keys/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}`,pathParams:{identifier:String(e.identifier??``)},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();if(e.accountId=l,!await d({force:!!e.force,message:`Permanently delete signing key? All tokens created with this key will become unauthorized!`}))return;let u=await c(`Deleting`,async()=>t.send(re,{account_id:l,identifier:e.identifier}));s(u,{successLabel:`Deleted`})})};var oe={method:`GET`,path:t=>e`/accounts/${t.account_id}/stream/keys`};function se(e){return e.usage(`$0 stream keys list
7
+
8
+ Lists the video ID and creation date and time when a signing key was created.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ce={command:`list`,describe:`List signing keys`,builder:se,handler:async e=>l({command:`stream keys list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();r({command:`cf stream keys list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/stream/keys`,pathParams:{},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();e.accountId=l;let u=await c(`Loading`,async()=>t.send(oe,{account_id:l}));s(u,{successLabel:`Loaded`})})},x={command:`keys`,describe:`Signing keys used to generate short-lived signed URLs for private video playback`,builder:e=>e.command(ne).command(ae).command(ce).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function S(e){return e.usage(`$0 stream live-inputs create
9
+
10
+ Creates a live input, and returns credentials that you or your users can use to stream live video to Cloudflare Stream.`).option(`idempotency-key`,{type:`string`,description:`Prevents duplicate live inputs from being created when retrying this request. The key is scoped to the account, may contain up to 255 bytes, and expires six hours after the live input is created. Reusing a key for a deleted input before expiry returns a 409 Conflict response.`}).option(`default-creator`,{type:`string`,description:`Sets the creator ID asssociated with this live input.`}).option(`delete-recording-after-days`,{type:`number`,description:"Indicates the number of days after which the live inputs recordings will be deleted. When a stream completes and the recording is ready, the value is used to calculate a scheduled deletion date for that recording. Omit the field to indicate no change, or include with a `null` value to remove an existing scheduled deletion."}).option(`enabled`,{type:`boolean`,description:`Indicates whether the live input is enabled and can accept streams.`,default:!0}).option(`meta`,{type:`string`,description:`A user modifiable key-value store used to reference other systems of record for managing live inputs. Provide as a JSON object or @path/to/file.json. Shape: {"<key>": unknown}.`}).option(`prefer-low-latency`,{type:`boolean`,description:`When enabled, the live stream is delivered using Low-Latency HLS (LL-HLS), reducing glass-to-glass latency for viewers at the cost of reduced player compatibility.`,default:!1}).option(`recording-allowed-origins`,{type:`string`,array:!0,description:"Lists the origins allowed to display videos created with this input. Enter allowed origin domains in an array and use `*` for wildcard subdomains. An empty array allows videos to be viewed on any origin."}).option(`recording-hide-live-viewer-count`,{type:`boolean`,description:"Disables reporting the number of live viewers when this property is set to `true`."}).option(`recording-mode`,{type:`string`,description:"Specifies the recording behavior for the live input. Set this value to `off` to prevent a recording. Set the value to `automatic` to begin a recording and transition to on-demand after Stream Live stops receiving input.",choices:[`off`,`automatic`]}).coerce(`recording-mode`,e=>_(e,`recording-mode`,`text`)).option(`recording-require-signed-urls`,{type:`boolean`,description:"Indicates if a video using the live input has the `requireSignedURLs` property set. Also enforces access controls on any video recording of the livestream with the live input."}).option(`recording-timeout-seconds`,{type:`number`,description:"Determines the amount of time a live input configured in `automatic` mode should wait before a recording transitions from live to on-demand. `0` is recommended for most use cases and indicates the platform default should be used."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const C={command:`create`,describe:`Create a live input`,builder:S,handler:async e=>l({command:`stream live-inputs create`,classification:{safeFlags:[`enabled`,`prefer-low-latency`,`recording-hide-live-viewer-count`,`recording-mode`,`recording-require-signed-urls`,`dry-run`]}},e,async()=>{let l={};if(e[`idempotency-key`]!==void 0&&(l[`Idempotency-Key`]=String(e[`idempotency-key`])),e.dryRun){let t=await i();r({command:`cf stream live-inputs create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/stream/live_inputs`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({defaultCreator:_(e[`default-creator`],`default-creator`,`text`),deleteRecordingAfterDays:e[`delete-recording-after-days`],enabled:e.enabled,meta:p(e.meta,`meta`),preferLowLatency:e[`prefer-low-latency`],recording:{allowedOrigins:e[`recording-allowed-origins`],hideLiveViewerCount:e[`recording-hide-live-viewer-count`],mode:e[`recording-mode`],requireSignedURLs:e[`recording-require-signed-urls`],timeoutSeconds:e[`recording-timeout-seconds`]}},[[`meta`]]):h(e.body)});return}let u=e.body===void 0?void 0:h(e.body),d=await n(e),m=e.local?o:await a();if(e.accountId=m,e.body!==void 0){let e=u,n=await c(`Creating`,async()=>t(d,`POST`,`/accounts/${m}/stream/live_inputs`,{body:e,headers:Object.keys(l).length>0?l:void 0}));s(n,{successLabel:`Created`});return}let v={};e[`default-creator`]!==void 0&&f(v,[`defaultCreator`],_(e[`default-creator`],`default-creator`,`text`)),e[`delete-recording-after-days`]!==void 0&&f(v,[`deleteRecordingAfterDays`],e[`delete-recording-after-days`]),e.enabled!==void 0&&f(v,[`enabled`],e.enabled),e.meta!==void 0&&f(v,[`meta`],p(e.meta,`meta`)),e[`prefer-low-latency`]!==void 0&&f(v,[`preferLowLatency`],e[`prefer-low-latency`]),e[`recording-allowed-origins`]!==void 0&&f(v,[`recording`,`allowedOrigins`],e[`recording-allowed-origins`]),e[`recording-hide-live-viewer-count`]!==void 0&&f(v,[`recording`,`hideLiveViewerCount`],e[`recording-hide-live-viewer-count`]),e[`recording-mode`]!==void 0&&f(v,[`recording`,`mode`],e[`recording-mode`]),e[`recording-require-signed-urls`]!==void 0&&f(v,[`recording`,`requireSignedURLs`],e[`recording-require-signed-urls`]),e[`recording-timeout-seconds`]!==void 0&&f(v,[`recording`,`timeoutSeconds`],e[`recording-timeout-seconds`]);let y=await c(`Creating`,async()=>t(d,`POST`,`/accounts/${m}/stream/live_inputs`,{body:v,headers:Object.keys(l).length>0?l:void 0}));s(y,{successLabel:`Created`})})};var w={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/stream/live_inputs/${t.live_input_identifier}`};function T(e){return e.usage(`$0 stream live-inputs delete <live-input-identifier>
11
+
12
+ Permanently delete a live input, making it inaccessible and blocking current and future broadcasts to it. Existing recordings will be retained.`).positional(`live-input-identifier`,{type:`string`,description:`A unique identifier for a live input.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const E={command:`delete <live-input-identifier>`,describe:`Delete a live input`,builder:T,handler:async e=>l({command:`stream live-inputs delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf stream live-inputs delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/stream/live_inputs/${e[`live-input-identifier`]==null?`<live-input-identifier>`:encodeURIComponent(String(e[`live-input-identifier`]))}`,pathParams:{"live-input-identifier":String(e[`live-input-identifier`]??``)},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();if(e.accountId=l,!await d({force:!!e.force,message:`Permanently delete this live input? It cannot be recreated.`}))return;let u=await c(`Deleting`,async()=>t.send(w,{account_id:l,live_input_identifier:e[`live-input-identifier`]}));s(u,{successLabel:`Deleted`})})};var D={method:`POST`,path:t=>e`/accounts/${t.account_id}/stream/live_inputs/${t.live_input_identifier}/disable`};function O(e){return e.usage(`$0 stream live-inputs disable <live-input-identifier>
13
+
14
+ Prevents a live input from being streamed to and terminates any active broadcasts until re-enabled.`).positional(`live-input-identifier`,{type:`string`,description:`A unique identifier for a live input.`,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 k={command:`disable <live-input-identifier>`,describe:`Disable a live input`,builder:O,handler:async e=>l({command:`stream live-inputs disable`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf stream live-inputs disable`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/stream/live_inputs/${e[`live-input-identifier`]==null?`<live-input-identifier>`:encodeURIComponent(String(e[`live-input-identifier`]))}/disable`,pathParams:{"live-input-identifier":String(e[`live-input-identifier`]??``)},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();if(e.accountId=l,!await d({force:!!e.force,message:`Disable this live input? Active broadcasts will be terminated and future connections will be blocked until it is re-enabled.`}))return;let u=await c(`Processing`,async()=>t.send(D,{account_id:l,live_input_identifier:e[`live-input-identifier`]}));s(u,{successLabel:`Done`})})};var A={method:`POST`,path:t=>e`/accounts/${t.account_id}/stream/live_inputs/${t.live_input_identifier}/enable`};function j(e){return e.usage(`$0 stream live-inputs enable <live-input-identifier>
15
+
16
+ Allows a disabled live input to start receiving broadcasts again.`).positional(`live-input-identifier`,{type:`string`,description:`A unique identifier for a live input.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const M={command:`enable <live-input-identifier>`,describe:`Enable a live input`,builder:j,handler:async e=>l({command:`stream live-inputs enable`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf stream live-inputs enable`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/stream/live_inputs/${e[`live-input-identifier`]==null?`<live-input-identifier>`:encodeURIComponent(String(e[`live-input-identifier`]))}/enable`,pathParams:{"live-input-identifier":String(e[`live-input-identifier`]??``)},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();e.accountId=l;let u=await c(`Creating`,async()=>t.send(A,{account_id:l,live_input_identifier:e[`live-input-identifier`]}));s(u,{successLabel:`Created`})})};var N={method:`GET`,path:t=>e`/accounts/${t.account_id}/stream/live_inputs/${t.live_input_identifier}`};function P(e){return e.usage(`$0 stream live-inputs get <live-input-identifier>
17
+
18
+ Retrieves details of an existing live input.`).positional(`live-input-identifier`,{type:`string`,description:`A unique identifier for a live input.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const F={command:`get <live-input-identifier>`,describe:`Retrieve a live input`,builder:P,handler:async e=>l({command:`stream live-inputs get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf stream live-inputs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/stream/live_inputs/${e[`live-input-identifier`]==null?`<live-input-identifier>`:encodeURIComponent(String(e[`live-input-identifier`]))}`,pathParams:{"live-input-identifier":String(e[`live-input-identifier`]??``)},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();e.accountId=l;let u=await c(`Loading`,async()=>t.send(N,{account_id:l,live_input_identifier:e[`live-input-identifier`]}));s(u,{successLabel:`Loaded`})})};var I={method:`GET`,path:t=>e`/accounts/${t.account_id}/stream/live_inputs`,query:[`include_counts`]};function L(e){return e.usage(`$0 stream live-inputs list
19
+
20
+ Lists the live inputs created for an account. To get the credentials needed to stream to a specific live input, request a single live input.`).option(`include-counts`,{type:`boolean`,description:`Includes the total number of videos associated with the submitted query parameters.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const R={command:`list`,describe:`List live inputs`,builder:L,handler:async e=>l({command:`stream live-inputs list`,classification:{safeFlags:[`include-counts`,`dry-run`]}},e,async()=>{let t={include_counts:e[`include-counts`]};if(e.dryRun){let e=await i();r({command:`cf stream live-inputs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/stream/live_inputs`,pathParams:{},query:t,bodyKind:`none`});return}let l=await n(e),u=e.local?o:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(I,{account_id:u,...t}));s(d,{successLabel:`Loaded`})})};var z={method:`POST`,path:t=>e`/accounts/${t.account_id}/stream/live_inputs/${t.live_input_identifier}/outputs`,body:`json`};function B(e){return e.usage(`$0 stream live-inputs outputs create <live-input-identifier>
21
+
22
+ Creates a new output that can be used to simulcast or restream live video to other RTMP or SRT destinations. Outputs are always linked to a specific live input — one live input can have many outputs.`).positional(`live-input-identifier`,{type:`string`,description:`A unique identifier for a live input.`,demandOption:!0}).option(`enabled`,{type:`boolean`,description:`When enabled, live video streamed to the associated live input will be sent to the output URL. When disabled, live video will not be sent to the output URL, even when streaming to the associated live input. Use this to control precisely when you start and stop simulcasting to specific destinations like YouTube and Twitch.`,default:!0}).option(`stream-key`,{type:`string`,description:`The streamKey used to authenticate against an output's target.`}).option(`url`,{type:`string`,description:`The URL an output uses to restream.`}).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 V={command:`create <live-input-identifier>`,describe:`Create a new output, connected to a live input`,builder:B,handler:async e=>l({command:`stream live-inputs outputs create`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf stream live-inputs outputs create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/stream/live_inputs/${e[`live-input-identifier`]==null?`<live-input-identifier>`:encodeURIComponent(String(e[`live-input-identifier`]))}/outputs`,pathParams:{"live-input-identifier":String(e[`live-input-identifier`]??``)},bodyKind:`json`,body:e.body===void 0?g({enabled:e.enabled,streamKey:_(e[`stream-key`],`stream-key`,`text`),url:_(e.url,`url`,`text`)}):h(e.body),sensitiveBodyPaths:[[`streamKey`],[`url`]]});return}let t=e.body===void 0?void 0:h(e.body),l=await n(e),d=e.local?o:await a();if(e.accountId=d,e.body!==void 0){let n=t,r=await c(`Creating`,async()=>l.send(z,{body:n,account_id:d,live_input_identifier:e[`live-input-identifier`]}));s(r,{successLabel:`Created`});return}e[`stream-key`]===void 0&&(e[`stream-key`]=await u(`stream-key`,`The streamKey used to authenticate against an output's target.`,{kind:`secret`})),e.url===void 0&&(e.url=await u(`url`,`The URL an output uses to restream.`,{kind:`secret`}));let f=g({enabled:e.enabled,streamKey:_(e[`stream-key`],`stream-key`,`text`),url:_(e.url,`url`,`text`)}),p=await c(`Creating`,async()=>l.send(z,{body:f,account_id:d,live_input_identifier:e[`live-input-identifier`]}));s(p,{successLabel:`Created`})})};var H={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/stream/live_inputs/${t.live_input_identifier}/outputs/${t.output_identifier}`};function U(e){return e.usage(`$0 stream live-inputs outputs delete <output-identifier>
23
+
24
+ Deletes an output and removes it from the associated live input.`).positional(`output-identifier`,{type:`string`,description:`A unique identifier for the output.`,demandOption:!0}).option(`live-input-identifier`,{type:`string`,description:`A unique identifier for a live input.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const W={command:`delete <output-identifier>`,describe:`Delete an output`,builder:U,handler:async e=>l({command:`stream live-inputs outputs delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf stream live-inputs outputs delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/stream/live_inputs/${e[`live-input-identifier`]==null?`<live-input-identifier>`:encodeURIComponent(String(e[`live-input-identifier`]))}/outputs/${e[`output-identifier`]==null?`<output-identifier>`:encodeURIComponent(String(e[`output-identifier`]))}`,pathParams:{"live-input-identifier":String(e[`live-input-identifier`]??``),"output-identifier":String(e[`output-identifier`]??``)},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();if(e.accountId=l,!await d({force:!!e.force,message:`Delete this output? Any active broadcast to this target will be terminated.`}))return;let u=await c(`Deleting`,async()=>t.send(H,{account_id:l,live_input_identifier:e[`live-input-identifier`],output_identifier:e[`output-identifier`]}));s(u,{successLabel:`Deleted`})})};var G={method:`GET`,path:t=>e`/accounts/${t.account_id}/stream/live_inputs/${t.live_input_identifier}/outputs`};function le(e){return e.usage(`$0 stream live-inputs outputs list
25
+
26
+ Retrieves all outputs associated with a specified live input.`).option(`live-input-identifier`,{type:`string`,description:`A unique identifier for a live input.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ue={command:`list`,describe:`List all outputs associated with a specified live input`,builder:le,handler:async e=>l({command:`stream live-inputs outputs list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf stream live-inputs outputs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/stream/live_inputs/${e[`live-input-identifier`]==null?`<live-input-identifier>`:encodeURIComponent(String(e[`live-input-identifier`]))}/outputs`,pathParams:{"live-input-identifier":String(e[`live-input-identifier`]??``)},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();e.accountId=l;let u=await c(`Loading`,async()=>t.send(G,{account_id:l,live_input_identifier:e[`live-input-identifier`]}));s(u,{successLabel:`Loaded`})})};var K={method:`PUT`,path:t=>e`/accounts/${t.account_id}/stream/live_inputs/${t.live_input_identifier}/outputs/${t.output_identifier}`,body:`json`};function de(e){return e.usage(`$0 stream live-inputs outputs update <output-identifier>
27
+
28
+ Updates the state of an output.`).positional(`output-identifier`,{type:`string`,description:`A unique identifier for the output.`,demandOption:!0}).option(`live-input-identifier`,{type:`string`,description:`A unique identifier for a live input.`,demandOption:!0}).option(`enabled`,{type:`boolean`,description:`When enabled, live video streamed to the associated live input will be sent to the output URL. When disabled, live video will not be sent to the output URL, even when streaming to the associated live input. Use this to control precisely when you start and stop simulcasting to specific destinations like YouTube and Twitch.`}).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 fe={command:`update <output-identifier>`,describe:`Update an output`,builder:de,handler:async e=>l({command:`stream live-inputs outputs update`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf stream live-inputs outputs update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/stream/live_inputs/${e[`live-input-identifier`]==null?`<live-input-identifier>`:encodeURIComponent(String(e[`live-input-identifier`]))}/outputs/${e[`output-identifier`]==null?`<output-identifier>`:encodeURIComponent(String(e[`output-identifier`]))}`,pathParams:{"live-input-identifier":String(e[`live-input-identifier`]??``),"output-identifier":String(e[`output-identifier`]??``)},bodyKind:`json`,body:e.body===void 0?g({enabled:e.enabled}):h(e.body)});return}let t=e.body===void 0?void 0:h(e.body),l=await n(e),u=e.local?o:await a();if(e.accountId=u,e.body!==void 0){let n=t,r=await c(`Updating`,async()=>l.send(K,{body:n,account_id:u,live_input_identifier:e[`live-input-identifier`],output_identifier:e[`output-identifier`]}));s(r,{successLabel:`Updated`});return}if(e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);let d=g({enabled:e.enabled}),f=await c(`Updating`,async()=>l.send(K,{body:d,account_id:u,live_input_identifier:e[`live-input-identifier`],output_identifier:e[`output-identifier`]}));s(f,{successLabel:`Updated`})})},pe={command:`outputs`,describe:`Operations for live-inputs.outputs`,builder:e=>e.command(V).command(W).command(ue).command(fe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var me={method:`POST`,path:t=>e`/accounts/${t.account_id}/stream/live_inputs/${t.live_input_identifier}/rotate_keys`};function he(e){return e.usage(`$0 stream live-inputs rotate-keys <live-input-identifier>
29
+
30
+ Rotates the credentials for a live input without changing its identifier. Old credentials are revoked, broadcasts using stale credentials are automatically disconnected shortly after rotation, and the response returns refreshed credentials.`).positional(`live-input-identifier`,{type:`string`,description:`A unique identifier for a live input.`,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 ge={command:`rotate-keys <live-input-identifier>`,describe:`Rotate keys for a live input`,builder:he,handler:async e=>l({command:`stream live-inputs rotate-keys`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf stream live-inputs rotate-keys`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/stream/live_inputs/${e[`live-input-identifier`]==null?`<live-input-identifier>`:encodeURIComponent(String(e[`live-input-identifier`]))}/rotate_keys`,pathParams:{"live-input-identifier":String(e[`live-input-identifier`]??``)},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();if(e.accountId=l,!await d({force:!!e.force,message:`Rotate keys for this live input? Active broadcasts will be terminated. New broadcasts cannot start with outdated credentials.`}))return;let u=await c(`Processing`,async()=>t.send(me,{account_id:l,live_input_identifier:e[`live-input-identifier`]}));s(u,{successLabel:`Done`})})};var q={method:`PUT`,path:t=>e`/accounts/${t.account_id}/stream/live_inputs/${t.live_input_identifier}`,body:`json`};function _e(e){return e.usage(`$0 stream live-inputs update <live-input-identifier>
31
+
32
+ Updates a specified live input.`).positional(`live-input-identifier`,{type:`string`,description:`A unique identifier for a live input.`,demandOption:!0}).option(`default-creator`,{type:`string`,description:`Sets the creator ID asssociated with this live input.`}).option(`delete-recording-after-days`,{type:`number`,description:"Indicates the number of days after which the live inputs recordings will be deleted. When a stream completes and the recording is ready, the value is used to calculate a scheduled deletion date for that recording. Omit the field to indicate no change, or include with a `null` value to remove an existing scheduled deletion."}).option(`enabled`,{type:`boolean`,description:`Indicates whether the live input is enabled and can accept streams.`}).option(`meta`,{type:`string`,description:`A user modifiable key-value store used to reference other systems of record for managing live inputs. Provide as a JSON object or @path/to/file.json. Shape: {"<key>": unknown}.`}).option(`prefer-low-latency`,{type:`boolean`,description:`When enabled, the live stream is delivered using Low-Latency HLS (LL-HLS), reducing glass-to-glass latency for viewers at the cost of reduced player compatibility.`}).option(`recording-allowed-origins`,{type:`string`,array:!0,description:"Lists the origins allowed to display videos created with this input. Enter allowed origin domains in an array and use `*` for wildcard subdomains. An empty array allows videos to be viewed on any origin."}).option(`recording-hide-live-viewer-count`,{type:`boolean`,description:"Disables reporting the number of live viewers when this property is set to `true`."}).option(`recording-mode`,{type:`string`,description:"Specifies the recording behavior for the live input. Set this value to `off` to prevent a recording. Set the value to `automatic` to begin a recording and transition to on-demand after Stream Live stops receiving input.",choices:[`off`,`automatic`]}).coerce(`recording-mode`,e=>_(e,`recording-mode`,`text`)).option(`recording-require-signed-urls`,{type:`boolean`,description:"Indicates if a video using the live input has the `requireSignedURLs` property set. Also enforces access controls on any video recording of the livestream with the live input."}).option(`recording-timeout-seconds`,{type:`number`,description:"Determines the amount of time a live input configured in `automatic` mode should wait before a recording transitions from live to on-demand. `0` is recommended for most use cases and indicates the platform default should be used."}).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 ve={command:`update <live-input-identifier>`,describe:`Update a live input`,builder:_e,handler:async e=>l({command:`stream live-inputs update`,classification:{safeFlags:[`enabled`,`prefer-low-latency`,`recording-hide-live-viewer-count`,`recording-mode`,`recording-require-signed-urls`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf stream live-inputs update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/stream/live_inputs/${e[`live-input-identifier`]==null?`<live-input-identifier>`:encodeURIComponent(String(e[`live-input-identifier`]))}`,pathParams:{"live-input-identifier":String(e[`live-input-identifier`]??``)},bodyKind:`json`,body:e.body===void 0?g({defaultCreator:_(e[`default-creator`],`default-creator`,`text`),deleteRecordingAfterDays:e[`delete-recording-after-days`],enabled:e.enabled,meta:p(e.meta,`meta`),preferLowLatency:e[`prefer-low-latency`],recording:{allowedOrigins:e[`recording-allowed-origins`],hideLiveViewerCount:e[`recording-hide-live-viewer-count`],mode:e[`recording-mode`],requireSignedURLs:e[`recording-require-signed-urls`],timeoutSeconds:e[`recording-timeout-seconds`]}},[[`meta`]]):h(e.body)});return}let t=e.body===void 0?void 0:h(e.body),l=await n(e),u=e.local?o:await a();if(e.accountId=u,e.body!==void 0){let n=t,r=await c(`Updating`,async()=>l.send(q,{body:n,account_id:u,live_input_identifier:e[`live-input-identifier`]}));s(r,{successLabel:`Updated`});return}let d=g({defaultCreator:_(e[`default-creator`],`default-creator`,`text`),deleteRecordingAfterDays:e[`delete-recording-after-days`],enabled:e.enabled,meta:p(e.meta,`meta`),preferLowLatency:e[`prefer-low-latency`],recording:{allowedOrigins:e[`recording-allowed-origins`],hideLiveViewerCount:e[`recording-hide-live-viewer-count`],mode:e[`recording-mode`],requireSignedURLs:e[`recording-require-signed-urls`],timeoutSeconds:e[`recording-timeout-seconds`]}},[[`meta`]]),f=await c(`Updating`,async()=>l.send(q,{body:d,account_id:u,live_input_identifier:e[`live-input-identifier`]}));s(f,{successLabel:`Updated`})})},ye={command:`live-inputs`,describe:`Enable and disable live input streams`,builder:e=>e.command(C).command(E).command(k).command(M).command(F).command(R).command(ge).command(ve).command(pe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var be={method:`GET`,path:t=>e`/accounts/${t.account_id}/stream/storage-usage`,query:[`creator`]};function xe(e){return e.usage(`$0 stream storage-usage
33
+
34
+ Returns information about an account's storage use.`).option(`creator`,{type:`string`,description:`A user-defined identifier for the media creator.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Se={command:`storage-usage`,describe:`Storage use`,builder:xe,handler:async e=>l({command:`stream storage-usage`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let t={creator:e.creator};if(e.dryRun){let e=await i();r({command:`cf stream storage-usage`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/stream/storage-usage`,pathParams:{},query:t,bodyKind:`none`});return}let l=await n(e),u=e.local?o:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(be,{account_id:u,...t}));s(d,{successLabel:`Loaded`})})};var J={method:`POST`,path:t=>e`/accounts/${t.account_id}/stream/${t.identifier}/audio/copy`,body:`json`};function Ce(e){return e.usage(`$0 stream videos audio-tracks copy <identifier>
35
+
36
+ Adds an additional audio track to a video using the provided audio track URL.`).positional(`identifier`,{type:`string`,description:`A Cloudflare-generated unique identifier for a media item.`,demandOption:!0}).option(`label`,{type:`string`,description:`A string to uniquely identify the track amongst other audio track labels for the specified video.`}).option(`url`,{type:`string`,description:"An audio track URL. The server must be publicly routable and support `HTTP HEAD` requests and `HTTP GET` range requests. The server should respond to `HTTP HEAD` requests with a `content-range` header that includes the size of the file."}).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 we={command:`copy <identifier>`,describe:`Add audio tracks to a video`,builder:Ce,handler:async e=>l({command:`stream videos audio-tracks copy`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf stream videos audio-tracks copy`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/stream/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}/audio/copy`,pathParams:{identifier:String(e.identifier??``)},bodyKind:`json`,body:e.body===void 0?g({label:_(e.label,`label`,`text`),url:_(e.url,`url`,`text`)}):h(e.body)});return}let t=e.body===void 0?void 0:h(e.body),l=await n(e),d=e.local?o:await a();if(e.accountId=d,e.body!==void 0){let n=t,r=await c(`Creating`,async()=>l.send(J,{body:n,account_id:d,identifier:e.identifier}));s(r,{successLabel:`Created`});return}e.label===void 0&&(e.label=await u(`label`,`A string to uniquely identify the track amongst other audio track labels for the specified video.`));let f=g({label:_(e.label,`label`,`text`),url:_(e.url,`url`,`text`)}),p=await c(`Creating`,async()=>l.send(J,{body:f,account_id:d,identifier:e.identifier}));s(p,{successLabel:`Created`})})};var Te={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/stream/${t.identifier}/audio/${t.audio_identifier}`};function Ee(e){return e.usage(`$0 stream videos audio-tracks delete <audio-identifier>
37
+
38
+ Deletes additional audio tracks on a video. Deleting a default audio track is not allowed. You must assign another audio track as default prior to deletion.`).positional(`audio-identifier`,{type:`string`,description:`The unique identifier for an additional audio track.`,demandOption:!0}).option(`identifier`,{type:`string`,description:`A Cloudflare-generated unique identifier for a media item.`,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 De={command:`delete <audio-identifier>`,describe:`Delete additional audio tracks on a video`,builder:Ee,handler:async e=>l({command:`stream videos audio-tracks delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf stream videos audio-tracks delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/stream/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}/audio/${e[`audio-identifier`]==null?`<audio-identifier>`:encodeURIComponent(String(e[`audio-identifier`]))}`,pathParams:{identifier:String(e.identifier??``),"audio-identifier":String(e[`audio-identifier`]??``)},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();if(e.accountId=l,!await d({force:!!e.force,message:`Permanently delete this audio track?`}))return;let u=await c(`Deleting`,async()=>t.send(Te,{account_id:l,identifier:e.identifier,audio_identifier:e[`audio-identifier`]}));s(u,{successLabel:`Deleted`})})};var Y={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/stream/${t.identifier}/audio/${t.audio_identifier}`,body:`json`};function Oe(e){return e.usage("$0 stream videos audio-tracks edit <audio-identifier>\n\nEdits additional audio tracks on a video. Editing the default status of an audio track to `true` will mark all other audio tracks on the video default status to `false`.").positional(`audio-identifier`,{type:`string`,description:`The unique identifier for an additional audio track.`,demandOption:!0}).option(`identifier`,{type:`string`,description:`A Cloudflare-generated unique identifier for a media item.`,demandOption:!0}).option(`default`,{type:`boolean`,description:`Denotes whether the audio track will be played by default in a player.`}).option(`label`,{type:`string`,description:`A string to uniquely identify the track amongst other audio track labels for the specified video.`}).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:`edit <audio-identifier>`,describe:`Edit additional audio tracks on a video`,builder:Oe,handler:async e=>l({command:`stream videos audio-tracks edit`,classification:{safeFlags:[`default`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf stream videos audio-tracks edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/stream/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}/audio/${e[`audio-identifier`]==null?`<audio-identifier>`:encodeURIComponent(String(e[`audio-identifier`]))}`,pathParams:{identifier:String(e.identifier??``),"audio-identifier":String(e[`audio-identifier`]??``)},bodyKind:`json`,body:e.body===void 0?g({default:e.default,label:_(e.label,`label`,`text`)}):h(e.body)});return}let t=e.body===void 0?void 0:h(e.body),l=await n(e),u=e.local?o:await a();if(e.accountId=u,e.body!==void 0){let n=t,r=await c(`Updating`,async()=>l.send(Y,{body:n,account_id:u,identifier:e.identifier,audio_identifier:e[`audio-identifier`]}));s(r,{successLabel:`Updated`});return}let d=g({default:e.default,label:_(e.label,`label`,`text`)}),f=await c(`Updating`,async()=>l.send(Y,{body:d,account_id:u,identifier:e.identifier,audio_identifier:e[`audio-identifier`]}));s(f,{successLabel:`Updated`})})};var Ae={method:`GET`,path:t=>e`/accounts/${t.account_id}/stream/${t.identifier}/audio`};function je(e){return e.usage(`$0 stream videos audio-tracks list
39
+
40
+ Lists additional audio tracks on a video. Note this API will not return information for audio attached to the video upload.`).option(`identifier`,{type:`string`,description:`A Cloudflare-generated unique identifier for a media item.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Me={command:`list`,describe:`List additional audio tracks on a video`,builder:je,handler:async e=>l({command:`stream videos audio-tracks list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf stream videos audio-tracks list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/stream/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}/audio`,pathParams:{identifier:String(e.identifier??``)},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();e.accountId=l;let u=await c(`Loading`,async()=>t.send(Ae,{account_id:l,identifier:e.identifier}));s(u,{successLabel:`Loaded`})})},Ne={command:`audio-tracks`,describe:`Operations for videos.audio-tracks`,builder:e=>e.command(we).command(De).command(ke).command(Me).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Pe={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/stream/${t.identifier}/captions/${t.language}`};function Fe(e){return e.usage(`$0 stream videos captions language delete <language>
41
+
42
+ Removes the captions or subtitles from a video.`).positional(`language`,{type:`string`,description:`The language tag in BCP 47 format.`,demandOption:!0}).option(`identifier`,{type:`string`,description:`A Cloudflare-generated unique identifier for a media item.`,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 Ie={command:`delete <language>`,describe:`Delete captions or subtitles`,builder:Fe,handler:async e=>l({command:`stream videos captions language delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf stream videos captions language delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/stream/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}/captions/${e.language==null?`<language>`:encodeURIComponent(String(e.language))}`,pathParams:{identifier:String(e.identifier??``),language:String(e.language??``)},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();if(e.accountId=l,!await d({force:!!e.force,message:`Remove this caption?`}))return;let u=await c(`Deleting`,async()=>t.send(Pe,{account_id:l,identifier:e.identifier,language:e.language}));s(u,{successLabel:`Deleted`})})};var Le={method:`POST`,path:t=>e`/accounts/${t.account_id}/stream/${t.identifier}/captions/${t.language}/generate`};function Re(e){return e.usage(`$0 stream videos captions language generate <language>
43
+
44
+ Generate captions or subtitles for provided language via AI.`).positional(`language`,{type:`string`,description:`The language tag in BCP 47 format.`,demandOption:!0}).option(`identifier`,{type:`string`,description:`A Cloudflare-generated unique identifier for a media item.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ze={command:`generate <language>`,describe:`Generate captions or subtitles for a provided language via AI`,builder:Re,handler:async e=>l({command:`stream videos captions language generate`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf stream videos captions language generate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/stream/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}/captions/${e.language==null?`<language>`:encodeURIComponent(String(e.language))}/generate`,pathParams:{identifier:String(e.identifier??``),language:String(e.language??``)},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();e.accountId=l;let u=await c(`Creating`,async()=>t.send(Le,{account_id:l,identifier:e.identifier,language:e.language}));s(u,{successLabel:`Created`})})};var Be={method:`GET`,path:t=>e`/accounts/${t.account_id}/stream/${t.identifier}/captions/${t.language}`};function Ve(e){return e.usage(`$0 stream videos captions language get <language>
45
+
46
+ Lists the captions or subtitles for provided language.`).positional(`language`,{type:`string`,description:`The language tag in BCP 47 format.`,demandOption:!0}).option(`identifier`,{type:`string`,description:`A Cloudflare-generated unique identifier for a media item.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const He={command:`get <language>`,describe:`List captions or subtitles for a provided language`,builder:Ve,handler:async e=>l({command:`stream videos captions language get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf stream videos captions language get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/stream/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}/captions/${e.language==null?`<language>`:encodeURIComponent(String(e.language))}`,pathParams:{identifier:String(e.identifier??``),language:String(e.language??``)},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();e.accountId=l;let u=await c(`Loading`,async()=>t.send(Be,{account_id:l,identifier:e.identifier,language:e.language}));s(u,{successLabel:`Loaded`})})};function Ue(e){return e.usage(`$0 stream videos captions language upload <language>
47
+
48
+ Uploads the caption or subtitle file to the endpoint for a specific BCP47 language. One caption or subtitle file per language is allowed.`).positional(`language`,{type:`string`,description:`The language tag in BCP 47 format.`,demandOption:!0}).option(`identifier`,{type:`string`,description:`A Cloudflare-generated unique identifier for a media item.`,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)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`})}const We={command:`upload <language>`,describe:`Upload captions or subtitles`,builder:Ue,handler:async e=>l({command:`stream videos captions language upload`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf stream videos captions language upload`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/stream/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}/captions/${e.language==null?`<language>`:encodeURIComponent(String(e.language))}`,pathParams:{identifier:String(e.identifier??``),language:String(e.language??``)},bodyKind:`multipart`,body:{body:e.body,file:e.file}});return}if(e.body===void 0&&e.file===void 0)throw Error(`--body or --file is required for this command. Pass --body '<value>' or --file path/to/file.`);let l=await n(e),u=e.local?o:await a();if(e.accountId=u,e.file!==void 0||e.body!==void 0){let n=new FormData;if(e.file!==void 0){let t=v(e.file);n.append(`file`,new Blob([t]),e.file.split(/[\\/]/).filter(Boolean).pop())}else e.body!==void 0&&n.append(`file`,e.body);let r=await c(`Updating`,async()=>t(l,`PUT`,`/accounts/${u}/stream/${encodeURIComponent(String(e.identifier))}/captions/${encodeURIComponent(String(e.language))}`,{body:n}));s(r,{successLabel:`Updated`})}else if(e.body!==void 0){let n=_(e.body,`body`,`binary`),r=await c(`Updating`,async()=>t(l,`PUT`,`/accounts/${u}/stream/${encodeURIComponent(String(e.identifier))}/captions/${encodeURIComponent(String(e.language))}`,{body:n,headers:{"Content-Type":`multipart/form-data`}}));s(r,{successLabel:`Updated`})}})};function Ge(e){return e.usage(`$0 stream videos captions language vtt get <language>
49
+
50
+ Return WebVTT captions for a provided language.`).positional(`language`,{type:`string`,description:`The language tag in BCP 47 format.`,demandOption:!0}).option(`identifier`,{type:`string`,description:`A Cloudflare-generated unique identifier for a media item.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ke={command:`get <language>`,describe:`Return WebVTT captions for a provided language`,builder:Ge,handler:async e=>l({command:`stream videos captions language vtt get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf stream videos captions language vtt get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/stream/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}/captions/${e.language==null?`<language>`:encodeURIComponent(String(e.language))}/vtt`,pathParams:{identifier:String(e.identifier??``),language:String(e.language??``)},bodyKind:`none`});return}await n(e);let t=e.local?o:await a();e.accountId=t;let s=await c(`Loading`,async()=>b(`/accounts/${t}/stream/${encodeURIComponent(String(e.identifier))}/captions/${encodeURIComponent(String(e.language))}/vtt`,{method:`GET`,local:e.local===!0,persistTo:e.persistTo}));y(s.toString(`utf-8`))})},qe={command:`vtt`,describe:`Operations for videos.captions.language.vtt`,builder:e=>e.command(Ke).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Je={command:`language`,describe:`Operations for videos.captions.language`,builder:e=>e.command(Ie).command(ze).command(He).command(We).command(qe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ye={method:`GET`,path:t=>e`/accounts/${t.account_id}/stream/${t.identifier}/captions`};function Xe(e){return e.usage(`$0 stream videos captions list
51
+
52
+ Lists the available captions or subtitles for a specific video.`).option(`identifier`,{type:`string`,description:`A Cloudflare-generated unique identifier for a media item.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ze={command:`list`,describe:`List captions or subtitles`,builder:Xe,handler:async e=>l({command:`stream videos captions list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf stream videos captions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/stream/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}/captions`,pathParams:{identifier:String(e.identifier??``)},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();e.accountId=l;let u=await c(`Loading`,async()=>t.send(Ye,{account_id:l,identifier:e.identifier}));s(u,{successLabel:`Loaded`})})},Qe={command:`captions`,describe:`Operations for videos.captions`,builder:e=>e.command(Ze).command(Je).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var X={method:`POST`,path:t=>e`/accounts/${t.account_id}/stream/clip`,body:`json`};function $e(e){return e.usage(`$0 stream videos clip
53
+
54
+ Clips a video based on the specified start and end times provided in seconds.`).option(`allowed-origins`,{type:`string`,array:!0,description:"Lists the origins allowed to display the video. Enter allowed origin domains in an array and use `*` for wildcard subdomains. Empty arrays allow the video to be viewed on any origin."}).option(`clipped-from-video-uid`,{type:`string`,description:`The unique video identifier (UID).`}).option(`creator`,{type:`string`,description:`A user-defined identifier for the media creator.`}).option(`end-time-seconds`,{type:`number`,description:`Specifies the end time for the video clip in seconds.`}).option(`input`,{type:`string`,description:`A video's URL. Preferred over 'url'.`}).option(`meta`,{type:`string`,description:`A user modifiable key-value store used to reference other systems of record for managing videos. Provide as a JSON object or @path/to/file.json. Shape: {"<key>": unknown}.`}).option(`name`,{type:`string`,description:`A name for the video.`}).option(`require-signed-urls`,{type:`boolean`,description:"Indicates whether the video can be a accessed using the UID. When set to `true`, a signed token must be generated with a signing key to view the video.",default:!1}).option(`scheduled-deletion`,{type:`string`,description:"Indicates the date and time at which the video will be deleted. Omit the field to indicate no change, or include with a `null` value to remove an existing scheduled deletion. If specified, must be at least 30 days from upload time."}).option(`start-time-seconds`,{type:`number`,description:`Specifies the start time for the video clip in seconds.`}).option(`thumbnail-timestamp-pct`,{type:`number`,description:`The timestamp for a thumbnail image calculated as a percentage value of the video's duration. To convert from a second-wise timestamp to a percentage, divide the desired timestamp by the total duration of the video. If this value is not set, the default thumbnail image is taken from 0s of the video.`,default:0}).option(`url`,{type:`string`,description:`A video's URL (legacy field, use 'input' instead).`}).option(`watermark-uid`,{type:`string`,description:`The unique identifier for the watermark profile.`}).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 et={command:`clip`,describe:`Clip videos given a start and end time`,builder:$e,handler:async e=>l({command:`stream videos clip`,classification:{safeFlags:[`require-signed-urls`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf stream videos clip`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/stream/clip`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({allowedOrigins:e[`allowed-origins`],clippedFromVideoUID:_(e[`clipped-from-video-uid`],`clipped-from-video-uid`,`text`),creator:_(e.creator,`creator`,`text`),endTimeSeconds:e[`end-time-seconds`],input:_(e.input,`input`,`text`),meta:p(e.meta,`meta`),name:_(e.name,`name`,`text`),requireSignedURLs:e[`require-signed-urls`],scheduledDeletion:_(e[`scheduled-deletion`],`scheduled-deletion`,`text`),startTimeSeconds:e[`start-time-seconds`],thumbnailTimestampPct:e[`thumbnail-timestamp-pct`],url:_(e.url,`url`,`text`),watermark:{uid:_(e[`watermark-uid`],`watermark-uid`,`text`)}},[[`meta`]]):h(e.body)});return}let t=e.body===void 0?void 0:h(e.body),l=await n(e),d=e.local?o:await a();if(e.accountId=d,e.body!==void 0){let e=t,n=await c(`Creating`,async()=>l.send(X,{body:e,account_id:d}));s(n,{successLabel:`Created`});return}if(e[`clipped-from-video-uid`]===void 0&&(e[`clipped-from-video-uid`]=await u(`clipped-from-video-uid`,`The unique video identifier (UID).`)),e[`end-time-seconds`]===void 0)throw Error(`--end-time-seconds is required (or pass --body with this field set).`);if(e[`start-time-seconds`]===void 0)throw Error(`--start-time-seconds is required (or pass --body with this field set).`);let f=g({allowedOrigins:e[`allowed-origins`],clippedFromVideoUID:_(e[`clipped-from-video-uid`],`clipped-from-video-uid`,`text`),creator:_(e.creator,`creator`,`text`),endTimeSeconds:e[`end-time-seconds`],input:_(e.input,`input`,`text`),meta:p(e.meta,`meta`),name:_(e.name,`name`,`text`),requireSignedURLs:e[`require-signed-urls`],scheduledDeletion:_(e[`scheduled-deletion`],`scheduled-deletion`,`text`),startTimeSeconds:e[`start-time-seconds`],thumbnailTimestampPct:e[`thumbnail-timestamp-pct`],url:_(e.url,`url`,`text`),watermark:{uid:_(e[`watermark-uid`],`watermark-uid`,`text`)}},[[`meta`]]),m=await c(`Creating`,async()=>l.send(X,{body:f,account_id:d}));s(m,{successLabel:`Created`})})};function tt(e){return e.usage(`$0 stream videos copy
55
+
56
+ Uploads a video to Stream from a provided URL.`).option(`upload-creator`,{type:`string`,description:`A user-defined identifier for the media creator.`}).option(`allowed-origins`,{type:`string`,array:!0,description:"Lists the origins allowed to display the video. Enter allowed origin domains in an array and use `*` for wildcard subdomains. Empty arrays allow the video to be viewed on any origin."}).option(`creator`,{type:`string`,description:`A user-defined identifier for the media creator.`}).option(`input`,{type:`string`,description:"A video's URL. The server must be publicly routable and support `HTTP HEAD` requests and `HTTP GET` range requests. The server should respond to `HTTP HEAD` requests with a `content-range` header that includes the size of the file. This is the preferred field over `url`."}).option(`meta`,{type:`string`,description:`A user modifiable key-value store used to reference other systems of record for managing videos. Provide as a JSON object or @path/to/file.json. Shape: {"<key>": unknown}.`}).option(`name`,{type:`string`,description:`A video's name. Used for legacy compatibility.`}).option(`require-signed-urls`,{type:`boolean`,description:"Indicates whether the video can be a accessed using the UID. When set to `true`, a signed token must be generated with a signing key to view the video.",default:!1}).option(`scheduled-deletion`,{type:`string`,description:"Indicates the date and time at which the video will be deleted. Omit the field to indicate no change, or include with a `null` value to remove an existing scheduled deletion. If specified, must be at least 30 days from upload time."}).option(`thumbnail-timestamp-pct`,{type:`number`,description:`The timestamp for a thumbnail image calculated as a percentage value of the video's duration. To convert from a second-wise timestamp to a percentage, divide the desired timestamp by the total duration of the video. If this value is not set, the default thumbnail image is taken from 0s of the video.`,default:0}).option(`url`,{type:`string`,description:"A video's URL. The server must be publicly routable and support `HTTP HEAD` requests and `HTTP GET` range requests. The server should respond to `HTTP HEAD` requests with a `content-range` header that includes the size of the file. This field is deprecated in favor of `input`."}).option(`watermark-uid`,{type:`string`,description:`The unique identifier for the watermark profile.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:"Copy upload request. Provide `input` (preferred) or `url` (deprecated)."})}const nt={command:`copy`,describe:`Upload videos from a URL`,builder:tt,handler:async e=>l({command:`stream videos copy`,classification:{safeFlags:[`require-signed-urls`,`dry-run`]}},e,async()=>{let l={};if(e[`upload-creator`]!==void 0&&(l[`Upload-Creator`]=String(e[`upload-creator`])),e.dryRun){let t=await i();r({command:`cf stream videos copy`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/stream/copy`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({allowedOrigins:e[`allowed-origins`],creator:_(e.creator,`creator`,`text`),input:_(e.input,`input`,`text`),meta:p(e.meta,`meta`),name:_(e.name,`name`,`text`),requireSignedURLs:e[`require-signed-urls`],scheduledDeletion:_(e[`scheduled-deletion`],`scheduled-deletion`,`text`),thumbnailTimestampPct:e[`thumbnail-timestamp-pct`],url:_(e.url,`url`,`text`),watermark:{uid:_(e[`watermark-uid`],`watermark-uid`,`text`)}},[[`meta`]]):h(e.body)});return}let u=e.body===void 0?void 0:h(e.body),d=await n(e),m=e.local?o:await a();if(e.accountId=m,e.body!==void 0){let e=u,n=await c(`Creating`,async()=>t(d,`POST`,`/accounts/${m}/stream/copy`,{body:e,headers:Object.keys(l).length>0?l:void 0}));s(n,{successLabel:`Created`});return}let v={};e[`allowed-origins`]!==void 0&&f(v,[`allowedOrigins`],e[`allowed-origins`]),e.creator!==void 0&&f(v,[`creator`],_(e.creator,`creator`,`text`)),e.input!==void 0&&f(v,[`input`],_(e.input,`input`,`text`)),e.meta!==void 0&&f(v,[`meta`],p(e.meta,`meta`)),e.name!==void 0&&f(v,[`name`],_(e.name,`name`,`text`)),e[`require-signed-urls`]!==void 0&&f(v,[`requireSignedURLs`],e[`require-signed-urls`]),e[`scheduled-deletion`]!==void 0&&f(v,[`scheduledDeletion`],_(e[`scheduled-deletion`],`scheduled-deletion`,`text`)),e[`thumbnail-timestamp-pct`]!==void 0&&f(v,[`thumbnailTimestampPct`],e[`thumbnail-timestamp-pct`]),e.url!==void 0&&f(v,[`url`],_(e.url,`url`,`text`)),e[`watermark-uid`]!==void 0&&f(v,[`watermark`,`uid`],_(e[`watermark-uid`],`watermark-uid`,`text`));let y=await c(`Creating`,async()=>t(d,`POST`,`/accounts/${m}/stream/copy`,{body:v,headers:Object.keys(l).length>0?l:void 0}));s(y,{successLabel:`Created`})})};function rt(e){return e.usage(`$0 stream videos create
57
+
58
+ Initiates a video upload using the TUS protocol. On success, the server responds with a status code 201 (created) and includes a \`location\` header to indicate where the content should be uploaded. Refer to https://tus.io for protocol details.`).option(`direct-user`,{type:`boolean`,description:`Provisions a URL to let your end users upload videos directly to Cloudflare Stream without exposing your API token to clients.`}).option(`tus-resumable`,{type:`string`,description:`Specifies the TUS protocol version. This value must be included in every upload request.
59
+ Notes: The only supported version of TUS protocol is 1.0.0.`,demandOption:!0}).option(`upload-creator`,{type:`string`,description:`A user-defined identifier for the media creator.`}).option(`upload-length`,{type:`string`,description:`Indicates the size of the entire upload in bytes. The value must be a non-negative integer.`,demandOption:!0}).option(`upload-metadata`,{type:`string`,description:"Comma-separated key-value pairs following the TUS protocol specification. Values are Base-64 encoded.\nSupported keys: `name`, `requiresignedurls`, `allowedorigins`, `thumbnailtimestamppct`, `watermark`, `scheduleddeletion`, `maxdurationseconds`."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const it={command:`create`,describe:`Initiate video uploads using TUS`,builder:rt,handler:async e=>l({command:`stream videos create`,classification:{safeFlags:[`direct-user`,`dry-run`]}},e,async()=>{let l={direct_user:e[`direct-user`]},u={};if(e[`tus-resumable`]!==void 0&&(u[`Tus-Resumable`]=String(e[`tus-resumable`])),e[`upload-creator`]!==void 0&&(u[`Upload-Creator`]=String(e[`upload-creator`])),e[`upload-length`]!==void 0&&(u[`Upload-Length`]=String(e[`upload-length`])),e[`upload-metadata`]!==void 0&&(u[`Upload-Metadata`]=String(e[`upload-metadata`])),e.dryRun){let e=await i();r({command:`cf stream videos create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/stream`,pathParams:{},query:l,bodyKind:`none`});return}let d=await n(e),f=e.local?o:await a();e.accountId=f;let p=await c(`Creating`,async()=>t(d,`POST`,`/accounts/${f}/stream`,{query:l,headers:Object.keys(u).length>0?u:void 0}));s(p,{successLabel:`Created`})})};var at={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/stream/${t.identifier}`,response:!1};function ot(e){return e.usage(`$0 stream videos delete <identifier>
60
+
61
+ Deletes a video and its copies from Cloudflare Stream.`).positional(`identifier`,{type:`string`,description:`A Cloudflare-generated unique identifier for a media item.`,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 st={command:`delete <identifier>`,describe:`Delete video`,builder:ot,handler:async e=>l({command:`stream videos delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf stream videos delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/stream/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}`,pathParams:{identifier:String(e.identifier??``)},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();if(e.accountId=l,!await d({force:!!e.force,message:`Permanently delete this video?`}))return;let u=await c(`Deleting`,async()=>t.send(at,{account_id:l,identifier:e.identifier}));s(u,{successLabel:`Deleted`})})};function ct(e){return e.usage(`$0 stream videos direct-upload create
62
+
63
+ Creates a direct upload endpoint that allows an end-user to upload a video without an API key.`).option(`upload-creator`,{type:`string`,description:`A user-defined identifier for the media creator.`}).option(`allowed-origins`,{type:`string`,array:!0,description:"Lists the origins allowed to display the video. Enter allowed origin domains in an array and use `*` for wildcard subdomains. Empty arrays allow the video to be viewed on any origin."}).option(`creator`,{type:`string`,description:`A user-defined identifier for the media creator.`}).option(`expiry`,{type:`string`,description:`The date and time after upload when videos will not be accepted.`,default:`Now + 30 minutes`}).option(`max-duration-seconds`,{type:`number`,description:"The maximum duration in seconds for a video upload. Can be set for a video that is not yet uploaded to limit its duration. Uploads that exceed the specified duration will fail during processing. A value of `-1` means the value is unknown."}).option(`meta`,{type:`string`,description:`A user modifiable key-value store used to reference other systems of record for managing videos. Provide as a JSON object or @path/to/file.json. Shape: {"<key>": unknown}.`}).option(`require-signed-urls`,{type:`boolean`,description:"Indicates whether the video can be a accessed using the UID. When set to `true`, a signed token must be generated with a signing key to view the video.",default:!1}).option(`scheduled-deletion`,{type:`string`,description:"Indicates the date and time at which the video will be deleted. Omit the field to indicate no change, or include with a `null` value to remove an existing scheduled deletion. If specified, must be at least 30 days from upload time."}).option(`thumbnail-timestamp-pct`,{type:`number`,description:`The timestamp for a thumbnail image calculated as a percentage value of the video's duration. To convert from a second-wise timestamp to a percentage, divide the desired timestamp by the total duration of the video. If this value is not set, the default thumbnail image is taken from 0s of the video.`,default:0}).option(`watermark-uid`,{type:`string`,description:`The unique identifier for the watermark profile.`}).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 lt={command:`create`,describe:`Upload videos via direct upload URLs`,builder:ct,handler:async e=>l({command:`stream videos direct-upload create`,classification:{safeFlags:[`require-signed-urls`,`dry-run`]}},e,async()=>{let l={};if(e[`upload-creator`]!==void 0&&(l[`Upload-Creator`]=String(e[`upload-creator`])),e.dryRun){let t=await i();r({command:`cf stream videos direct-upload create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/stream/direct_upload`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({allowedOrigins:e[`allowed-origins`],creator:_(e.creator,`creator`,`text`),expiry:_(e.expiry,`expiry`,`text`),maxDurationSeconds:e[`max-duration-seconds`],meta:p(e.meta,`meta`),requireSignedURLs:e[`require-signed-urls`],scheduledDeletion:_(e[`scheduled-deletion`],`scheduled-deletion`,`text`),thumbnailTimestampPct:e[`thumbnail-timestamp-pct`],watermark:{uid:_(e[`watermark-uid`],`watermark-uid`,`text`)}},[[`meta`]]):h(e.body)});return}let u=e.body===void 0?void 0:h(e.body),d=await n(e),m=e.local?o:await a();if(e.accountId=m,e.body!==void 0){let e=u,n=await c(`Creating`,async()=>t(d,`POST`,`/accounts/${m}/stream/direct_upload`,{body:e,headers:Object.keys(l).length>0?l:void 0}));s(n,{successLabel:`Created`});return}if(e[`max-duration-seconds`]===void 0)throw Error(`--max-duration-seconds is required (or pass --body with this field set).`);let v={};e[`allowed-origins`]!==void 0&&f(v,[`allowedOrigins`],e[`allowed-origins`]),e.creator!==void 0&&f(v,[`creator`],_(e.creator,`creator`,`text`)),e.expiry!==void 0&&f(v,[`expiry`],_(e.expiry,`expiry`,`text`)),e[`max-duration-seconds`]!==void 0&&f(v,[`maxDurationSeconds`],e[`max-duration-seconds`]),e.meta!==void 0&&f(v,[`meta`],p(e.meta,`meta`)),e[`require-signed-urls`]!==void 0&&f(v,[`requireSignedURLs`],e[`require-signed-urls`]),e[`scheduled-deletion`]!==void 0&&f(v,[`scheduledDeletion`],_(e[`scheduled-deletion`],`scheduled-deletion`,`text`)),e[`thumbnail-timestamp-pct`]!==void 0&&f(v,[`thumbnailTimestampPct`],e[`thumbnail-timestamp-pct`]),e[`watermark-uid`]!==void 0&&f(v,[`watermark`,`uid`],_(e[`watermark-uid`],`watermark-uid`,`text`));let y=await c(`Creating`,async()=>t(d,`POST`,`/accounts/${m}/stream/direct_upload`,{body:v,headers:Object.keys(l).length>0?l:void 0}));s(y,{successLabel:`Created`})})},ut={command:`direct-upload`,describe:`Operations for videos.direct-upload`,builder:e=>e.command(lt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var dt={method:`POST`,path:t=>e`/accounts/${t.account_id}/stream/${t.identifier}/downloads/${t.download_type}`};function ft(e){return e.usage(`$0 stream videos downloads create <download-type>
64
+
65
+ Creates a download for a video of specified type. For backwards-compatibility, POST requests to /downloads will enable the default download.`).positional(`download-type`,{type:`string`,description:"The type of downloads available are: `default`, `audio`.",demandOption:!0}).option(`identifier`,{type:`string`,description:`A Cloudflare-generated unique identifier for a media item.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const pt={command:`create <download-type>`,describe:`Create download`,builder:ft,handler:async e=>l({command:`stream videos downloads create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf stream videos downloads create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/stream/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}/downloads/${e[`download-type`]==null?`<download-type>`:encodeURIComponent(String(e[`download-type`]))}`,pathParams:{identifier:String(e.identifier??``),"download-type":String(e[`download-type`]??``)},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();e.accountId=l;let u=await c(`Creating`,async()=>t.send(dt,{account_id:l,identifier:e.identifier,download_type:e[`download-type`]}));s(u,{successLabel:`Created`})})};var mt={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/stream/${t.identifier}/downloads/${t.download_type}`};function ht(e){return e.usage(`$0 stream videos downloads delete <download-type>
66
+
67
+ Delete specific type of download. For backwards-compatibility, DELETE requests to /downloads will delete the default download.`).positional(`download-type`,{type:`string`,description:"The type of downloads available are: `default`, `audio`.",demandOption:!0}).option(`identifier`,{type:`string`,description:`A Cloudflare-generated unique identifier for a media item.`,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 gt={command:`delete <download-type>`,describe:`Delete download`,builder:ht,handler:async e=>l({command:`stream videos downloads delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf stream videos downloads delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/stream/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}/downloads/${e[`download-type`]==null?`<download-type>`:encodeURIComponent(String(e[`download-type`]))}`,pathParams:{identifier:String(e.identifier??``),"download-type":String(e[`download-type`]??``)},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();if(e.accountId=l,!await d({force:!!e.force,message:`Remove this download? It will need to be regenerated for future use.`}))return;let u=await c(`Deleting`,async()=>t.send(mt,{account_id:l,identifier:e.identifier,download_type:e[`download-type`]}));s(u,{successLabel:`Deleted`})})},_t={command:`downloads`,describe:`Operations for videos.downloads`,builder:e=>e.command(pt).command(gt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Z={method:`POST`,path:t=>e`/accounts/${t.account_id}/stream/${t.identifier}`,body:`json`};function vt(e){return e.usage(`$0 stream videos edit <identifier>
68
+
69
+ Edit details for a single video.`).positional(`identifier`,{type:`string`,description:`A Cloudflare-generated unique identifier for a media item.`,demandOption:!0}).option(`allowed-origins`,{type:`string`,array:!0,description:"Lists the origins allowed to display the video. Enter allowed origin domains in an array and use `*` for wildcard subdomains. Empty arrays allow the video to be viewed on any origin."}).option(`creator`,{type:`string`,description:`A user-defined identifier for the media creator.`}).option(`max-duration-seconds`,{type:`number`,description:"The maximum duration in seconds for a video upload. Can be set for a video that is not yet uploaded to limit its duration. Uploads that exceed the specified duration will fail during processing. A value of `-1` means the value is unknown."}).option(`meta`,{type:`string`,description:`A user modifiable key-value store used to reference other systems of record for managing videos. Provide as a JSON object or @path/to/file.json. Shape: {"<key>": unknown}.`}).option(`public-details-channel-link`,{type:`string`,description:`The publicDetails.channel_link field`}).option(`public-details-logo`,{type:`string`,description:`The publicDetails.logo field`}).option(`public-details-share-link`,{type:`string`,description:`The publicDetails.share_link field`}).option(`public-details-title`,{type:`string`,description:`The publicDetails.title field`}).option(`require-signed-urls`,{type:`boolean`,description:"Indicates whether the video can be a accessed using the UID. When set to `true`, a signed token must be generated with a signing key to view the video.",default:!1}).option(`scheduled-deletion`,{type:`string`,description:"Indicates the date and time at which the video will be deleted. Omit the field to indicate no change, or include with a `null` value to remove an existing scheduled deletion. If specified, must be at least 30 days from upload time."}).option(`thumbnail-timestamp-pct`,{type:`number`,description:`The timestamp for a thumbnail image calculated as a percentage value of the video's duration. To convert from a second-wise timestamp to a percentage, divide the desired timestamp by the total duration of the video. If this value is not set, the default thumbnail image is taken from 0s of the video.`,default:0}).option(`uid`,{type:`string`,description:`The unique identifier for the video. Can be used to verify the video being updated.`}).option(`upload-expiry`,{type:`string`,description:`The date and time when the video upload URL is no longer valid for direct user uploads.`}).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 yt={command:`edit <identifier>`,describe:`Edit video details`,builder:vt,handler:async e=>l({command:`stream videos edit`,classification:{safeFlags:[`require-signed-urls`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf stream videos edit`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/stream/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}`,pathParams:{identifier:String(e.identifier??``)},bodyKind:`json`,body:e.body===void 0?g({allowedOrigins:e[`allowed-origins`],creator:_(e.creator,`creator`,`text`),maxDurationSeconds:e[`max-duration-seconds`],meta:p(e.meta,`meta`),publicDetails:{channel_link:_(e[`public-details-channel-link`],`public-details-channel-link`,`text`),logo:_(e[`public-details-logo`],`public-details-logo`,`text`),share_link:_(e[`public-details-share-link`],`public-details-share-link`,`text`),title:_(e[`public-details-title`],`public-details-title`,`text`)},requireSignedURLs:e[`require-signed-urls`],scheduledDeletion:_(e[`scheduled-deletion`],`scheduled-deletion`,`text`),thumbnailTimestampPct:e[`thumbnail-timestamp-pct`],uid:_(e.uid,`uid`,`text`),uploadExpiry:_(e[`upload-expiry`],`upload-expiry`,`text`)},[[`meta`]]):h(e.body)});return}let t=e.body===void 0?void 0:h(e.body),l=await n(e),u=e.local?o:await a();if(e.accountId=u,e.body!==void 0){let n=t,r=await c(`Creating`,async()=>l.send(Z,{body:n,account_id:u,identifier:e.identifier}));s(r,{successLabel:`Created`});return}let d=g({allowedOrigins:e[`allowed-origins`],creator:_(e.creator,`creator`,`text`),maxDurationSeconds:e[`max-duration-seconds`],meta:p(e.meta,`meta`),publicDetails:{channel_link:_(e[`public-details-channel-link`],`public-details-channel-link`,`text`),logo:_(e[`public-details-logo`],`public-details-logo`,`text`),share_link:_(e[`public-details-share-link`],`public-details-share-link`,`text`),title:_(e[`public-details-title`],`public-details-title`,`text`)},requireSignedURLs:e[`require-signed-urls`],scheduledDeletion:_(e[`scheduled-deletion`],`scheduled-deletion`,`text`),thumbnailTimestampPct:e[`thumbnail-timestamp-pct`],uid:_(e.uid,`uid`,`text`),uploadExpiry:_(e[`upload-expiry`],`upload-expiry`,`text`)},[[`meta`]]),f=await c(`Creating`,async()=>l.send(Z,{body:d,account_id:u,identifier:e.identifier}));s(f,{successLabel:`Created`})})};var bt={method:`GET`,path:t=>e`/accounts/${t.account_id}/stream/${t.identifier}`};function xt(e){return e.usage(`$0 stream videos get <identifier>
70
+
71
+ Fetches details for a single video.`).positional(`identifier`,{type:`string`,description:`A Cloudflare-generated unique identifier for a media item.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const St={command:`get <identifier>`,describe:`Retrieve video details`,builder:xt,handler:async e=>l({command:`stream videos get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf stream videos get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/stream/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}`,pathParams:{identifier:String(e.identifier??``)},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();e.accountId=l;let u=await c(`Loading`,async()=>t.send(bt,{account_id:l,identifier:e.identifier}));s(u,{successLabel:`Loaded`})})};var Ct={method:`GET`,path:t=>e`/accounts/${t.account_id}/stream`,query:[`status`,`creator`,`type`,`asc`,`video_name`,`search`,`start`,`end`,`include_counts`,`id`,`name`,`live_input_id`,`before`,`after`,`limit`]};function wt(e){return e.usage(`$0 stream videos list
72
+
73
+ Lists up to 1000 videos from a single request. For a specific range, refer to the optional parameters.`).option(`status`,{type:`string`,description:`Specifies the processing status for all quality levels for a video.`,choices:[`pendingupload`,`downloading`,`queued`,`inprogress`,`ready`,`error`,`live-inprogress`]}).option(`creator`,{type:`string`,description:`A user-defined identifier for the media creator.`}).option(`type`,{type:`string`,description:"Specifies whether the video is `vod` or `live`."}).option(`asc`,{type:`boolean`,description:`Lists videos in ascending order of creation.`}).option(`video-name`,{type:`string`,description:"Provides a fast, exact string match on the `name` key in the `meta` field."}).option(`search`,{type:`string`,description:"Provides a partial word match of the `name` key in the `meta` field. Slow for medium to large video libraries. May be unavailable for very large libraries."}).option(`start`,{type:`string`,description:`Lists videos created after the specified date.`}).option(`end`,{type:`string`,description:`Lists videos created before the specified date.`}).option(`include-counts`,{type:`boolean`,description:`Includes the total number of videos associated with the submitted query parameters.`}).option(`id`,{type:`string`,description:`Filter by video ID(s). Can be a single ID or a comma-separated list of IDs.`}).option(`name`,{type:`string`,description:`Filter by video name/UID(s). Can be a single name or a comma-separated list.`}).option(`live-input-id`,{type:`string`,description:`Filter by live input ID to find videos associated with a specific live stream.`}).option(`before`,{type:`string`,description:`Alias for 'end'. Returns videos created before this date/time (RFC 3339 format).`}).option(`after`,{type:`string`,description:`Alias for 'start'. Returns videos created after this date/time (RFC 3339 format).`}).option(`limit`,{type:`number`,description:`Maximum number of videos to return (default 1000, max 1000).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Tt={command:`list`,describe:`List videos`,builder:wt,handler:async e=>l({command:`stream videos list`,classification:{safeFlags:[`status`,`asc`,`include-counts`,`dry-run`]}},e,async()=>{let t={status:e.status,creator:e.creator,type:e.type,asc:e.asc,video_name:e[`video-name`],search:e.search,start:e.start,end:e.end,include_counts:e[`include-counts`],id:e.id,name:e.name,live_input_id:e[`live-input-id`],before:e.before,after:e.after,limit:e.limit};if(e.dryRun){let e=await i();r({command:`cf stream videos list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/stream`,pathParams:{},query:t,bodyKind:`none`});return}let l=await n(e),u=e.local?o:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(Ct,{account_id:u,...t}));s(d,{successLabel:`Loaded`})})};var Q={method:`POST`,path:t=>e`/accounts/${t.account_id}/stream/${t.identifier}/token`,body:`json`};function Et(e){return e.usage(`$0 stream videos token create <identifier>
74
+
75
+ Creates a signed URL token for a video. If a body is not provided in the request, a token is created with default values.`).positional(`identifier`,{type:`string`,description:`A Cloudflare-generated unique identifier for a media item.`,demandOption:!0}).option(`access-rules`,{type:`string`,description:`The optional list of access rule constraints on the token. Access can be blocked or allowed based on an IP, IP range, or by country. Access rules are evaluated from first to last. If a rule matches, the associated action is applied and no further rules are evaluated. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"action"?: "allow" | "block", "country"?: [string], "ip"?: [string], "type"?: "any" | "ip.src" | "ip.geoip.country"}]. ? marks optional keys.`}).option(`downloadable`,{type:`boolean`,description:`The optional boolean value that enables using signed tokens to access MP4 download links for a video.`,default:!1}).option(`exp`,{type:`number`,description:`The optional unix epoch timestamp that specficies the time after a token is not accepted. The maximum time specification is 24 hours from issuing time. If this field is not set, the default is one hour after issuing.`}).option(`flags-original`,{type:`boolean`,description:`Whether to return the original video without transformations.`}).option(`id`,{type:`string`,description:"The optional ID of a Stream signing key. If present, the `pem` field is also required."}).option(`nbf`,{type:`number`,description:`The optional unix epoch timestamp that specifies the time before a the token is not accepted. If this field is not set, the default is one hour before issuing.`}).option(`pem`,{type:`string`,description:"The optional base64 encoded private key in PEM format associated with a Stream signing key. If present, the `id` field is also required."}).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 Dt={command:`create <identifier>`,describe:`Create signed URL tokens for videos`,builder:Et,handler:async e=>l({command:`stream videos token create`,classification:{safeFlags:[`downloadable`,`flags-original`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf stream videos token create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/stream/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}/token`,pathParams:{identifier:String(e.identifier??``)},bodyKind:`json`,body:e.body===void 0?g({accessRules:m(e[`access-rules`],`access-rules`),downloadable:e.downloadable,exp:e.exp,flags:{original:e[`flags-original`]},id:_(e.id,`id`,`text`),nbf:e.nbf,pem:_(e.pem,`pem`,`text`)}):h(e.body),sensitiveBodyPaths:[[`pem`]]});return}let t=e.body===void 0?void 0:h(e.body),l=await n(e),u=e.local?o:await a();if(e.accountId=u,!await d({force:!!e.force,message:`Provision temporary token? For use at scale, consider creating a signing key instead.`}))return;if(e.body!==void 0){let n=t,r=await c(`Processing`,async()=>l.send(Q,{body:n,account_id:u,identifier:e.identifier}));s(r,{successLabel:`Done`});return}let f=g({accessRules:m(e[`access-rules`],`access-rules`),downloadable:e.downloadable,exp:e.exp,flags:{original:e[`flags-original`]},id:_(e.id,`id`,`text`),nbf:e.nbf,pem:_(e.pem,`pem`,`text`)}),p=await c(`Processing`,async()=>l.send(Q,{body:f,account_id:u,identifier:e.identifier}));s(p,{successLabel:`Done`})})},Ot={command:`token`,describe:`Operations for videos.token`,builder:e=>e.command(Dt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},kt={command:`videos`,describe:`Aggregate video storage usage statistics for the account`,builder:e=>e.command(et).command(nt).command(it).command(st).command(yt).command(St).command(Tt).command(Ne).command(Qe).command(ut).command(_t).command(Ot).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function At(e){return e.usage(`$0 stream watermarks create
76
+
77
+ Creates watermark profiles using a single \`HTTP POST multipart/form-data\` request.`).option(`name`,{type:`string`,description:`A short description of the watermark profile.`,default:``}).option(`opacity`,{type:`number`,description:"The translucency of the image. A value of `0.0` makes the image completely transparent, and `1.0` makes the image completely opaque. Note that if the image is already semi-transparent, setting this to `1.0` will not make the image completely opaque.",default:1}).option(`padding`,{type:`number`,description:"The whitespace between the adjacent edges (determined by position) of the video and the image. `0.0` indicates no padding, and `1.0` indicates a fully padded video width or length, as determined by the algorithm.",default:.05}).option(`position`,{type:`string`,description:"The location of the image. Valid positions are: `upperRight`, `upperLeft`, `lowerLeft`, `lowerRight`, and `center`. Note that `center` ignores the `padding` parameter.",default:`upperRight`}).option(`scale`,{type:`number`,description:"The size of the image relative to the overall size of the video. This parameter will adapt to horizontal and vertical videos automatically. `0.0` indicates no scaling (use the size of the image as-is), and `1.0 `fills the entire video.",default:.15}).option(`url`,{type:`string`,description:`URL of the watermark image to copy.`}).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`})}const jt={command:`create`,describe:`Create watermark profiles via basic upload`,builder:At,handler:async e=>l({command:`stream watermarks create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf stream watermarks create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/stream/watermarks`,pathParams:{},bodyKind:`multipart`,body:{name:e.name,opacity:e.opacity,padding:e.padding,position:e.position,scale:e.scale,url:e.url,body:e.body,file:e.file}});return}let l=await n(e),u=e.local?o:await a();if(e.accountId=u,e.file!==void 0||e.body!==void 0||e.name!==void 0||e.opacity!==void 0||e.padding!==void 0||e.position!==void 0||e.scale!==void 0){let n=new FormData;if(e.file!==void 0){let t=v(e.file);n.append(`file`,new Blob([t]),e.file.split(/[\\/]/).filter(Boolean).pop())}else e.body!==void 0&&n.append(`file`,e.body);e.name!==void 0&&n.append(`name`,String(_(e.name,`name`,`text`)??``)),e.opacity!==void 0&&n.append(`opacity`,String(e.opacity)),e.padding!==void 0&&n.append(`padding`,String(e.padding)),e.position!==void 0&&n.append(`position`,String(_(e.position,`position`,`text`)??``)),e.scale!==void 0&&n.append(`scale`,String(e.scale));let r=await c(`Creating`,async()=>t(l,`POST`,`/accounts/${u}/stream/watermarks`,{body:n}));s(r,{successLabel:`Created`});return}if(e.body!==void 0){let n=h(e.body),r=await c(`Creating`,async()=>t(l,`POST`,`/accounts/${u}/stream/watermarks`,{body:n}));s(r,{successLabel:`Created`});return}let d={};e.name!==void 0&&f(d,[`name`],_(e.name,`name`,`text`)),e.opacity!==void 0&&f(d,[`opacity`],e.opacity),e.padding!==void 0&&f(d,[`padding`],e.padding),e.position!==void 0&&f(d,[`position`],_(e.position,`position`,`text`)),e.scale!==void 0&&f(d,[`scale`],e.scale),e.url!==void 0&&f(d,[`url`],_(e.url,`url`,`text`));let p=await c(`Creating`,async()=>t(l,`POST`,`/accounts/${u}/stream/watermarks`,{body:d}));s(p,{successLabel:`Created`})})};var Mt={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/stream/watermarks/${t.identifier}`};function Nt(e){return e.usage(`$0 stream watermarks delete <identifier>
78
+
79
+ Deletes a watermark profile.`).positional(`identifier`,{type:`string`,description:`The unique identifier for a watermark profile.`,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 Pt={command:`delete <identifier>`,describe:`Delete watermark profiles`,builder:Nt,handler:async e=>l({command:`stream watermarks delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf stream watermarks delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/stream/watermarks/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}`,pathParams:{identifier:String(e.identifier??``)},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();if(e.accountId=l,!await d({force:!!e.force,message:`Remove this watermark profile? New upload requests referencing this profile will fail.`}))return;let u=await c(`Deleting`,async()=>t.send(Mt,{account_id:l,identifier:e.identifier}));s(u,{successLabel:`Deleted`})})};var Ft={method:`GET`,path:t=>e`/accounts/${t.account_id}/stream/watermarks/${t.identifier}`};function It(e){return e.usage(`$0 stream watermarks get <identifier>
80
+
81
+ Retrieves details for a single watermark profile.`).positional(`identifier`,{type:`string`,description:`The unique identifier for a watermark profile.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Lt={command:`get <identifier>`,describe:`Watermark profile details`,builder:It,handler:async e=>l({command:`stream watermarks get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf stream watermarks get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/stream/watermarks/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}`,pathParams:{identifier:String(e.identifier??``)},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();e.accountId=l;let u=await c(`Loading`,async()=>t.send(Ft,{account_id:l,identifier:e.identifier}));s(u,{successLabel:`Loaded`})})};var Rt={method:`GET`,path:t=>e`/accounts/${t.account_id}/stream/watermarks`};function zt(e){return e.usage(`$0 stream watermarks list
82
+
83
+ Lists all watermark profiles for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Bt={command:`list`,describe:`List watermark profiles`,builder:zt,handler:async e=>l({command:`stream watermarks list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();r({command:`cf stream watermarks list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/stream/watermarks`,pathParams:{},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();e.accountId=l;let u=await c(`Loading`,async()=>t.send(Rt,{account_id:l}));s(u,{successLabel:`Loaded`})})},$={command:`watermarks`,describe:`Watermark profiles that overlay an image on every video in the account`,builder:e=>e.command(jt).command(Pt).command(Lt).command(Bt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Vt={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/stream/webhook`};function Ht(e){return e.usage(`$0 stream webhooks delete
84
+
85
+ Deletes the on-demand video webhook.`).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 Ut={command:`delete`,describe:`Delete webhooks`,builder:Ht,handler:async e=>l({command:`stream webhooks delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let e=await i();r({command:`cf stream webhooks delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/stream/webhook`,pathParams:{},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();if(e.accountId=l,!await d({force:!!e.force,message:`Delete this webhook? If recreated, the secret will change.`}))return;let u=await c(`Deleting`,async()=>t.send(Vt,{account_id:l}));s(u,{successLabel:`Deleted`})})};var Wt={method:`GET`,path:t=>e`/accounts/${t.account_id}/stream/webhook`};function Gt(e){return e.usage(`$0 stream webhooks get
86
+
87
+ Retrieve current on-demand webhook information.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Kt={command:`get`,describe:`View webhook`,builder:Gt,handler:async e=>l({command:`stream webhooks get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();r({command:`cf stream webhooks get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/stream/webhook`,pathParams:{},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();e.accountId=l;let u=await c(`Loading`,async()=>t.send(Wt,{account_id:l}));s(u,{successLabel:`Loaded`})})};var qt={method:`PUT`,path:t=>e`/accounts/${t.account_id}/stream/webhook`,body:`json`};function Jt(e){return e.usage(`$0 stream webhooks update
88
+
89
+ Create a webhook for notifications about on-demand video uploads.`).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 Yt={command:`update`,describe:`Create VOD webhooks`,builder:Jt,handler:async e=>l({command:`stream webhooks update`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf stream webhooks update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/stream/webhook`,pathParams:{},bodyKind:`json`,body:e.body===void 0?void 0:h(e.body)});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`);let t=e.body===void 0?void 0:h(e.body),l=await n(e),u=e.local?o:await a();if(e.accountId=u,await d({force:!!e.force,message:`Create a webhook for on-demand operations? Will replace previously configured webhook. Live input webhooks are handled via Notifications Service.`})&&e.body!==void 0){let e=t,n=await c(`Updating`,async()=>l.send(qt,{body:e,account_id:u}));s(n,{successLabel:`Updated`})}})},Xt={command:`webhooks`,describe:`Webhook notifications for video lifecycle events (ready, error, etc.)`,builder:e=>e.command(Ut).command(Kt).command(Yt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Zt={command:`stream`,describe:`Video encoding, storage, and delivery — upload, live-stream, clip, caption, and embed video at scale`,builder:e=>e.command(Se).command(x).command(ye).command(kt).command($).command(Xt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Zt as default};
@@ -1,28 +1,28 @@
1
1
  #!/usr/bin/env node
2
- import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-DIJ7SIKC.mjs";import{i as n,n as r}from"./auth-B-h0BHg7.mjs";import{a as i,i as a,t as o}from"./context-BY1Eh_Qe.mjs";import{t as s}from"./output-BZQEl3mK.mjs";import{t as c}from"./dry-run-kJbjn4kG.mjs";import{t as l}from"./progress-yvPscjYg.mjs";import{t as u}from"./run-BOKI1uWa.mjs";import"./telemetry-DkDUr4KK.mjs";import{n as d,s as f,t as p}from"./body-parser-DoewLePl.mjs";import{n as m}from"./input-validation-D7z60HJH.mjs";import{a as h,i as g,n as _}from"./prompt-CEpZ-lQZ.mjs";function v(e){return e.usage(`$0 tags account-resources delete
2
+ import{i as e,n as t}from"./auth-DA1PHaHi.mjs";import{t as n}from"./path-DRw6Y-nd.mjs";import{c as r,r as i,t as a}from"./body-parser-HN91kAf0.mjs";import{t as o}from"./dry-run-qsnRlRk6.mjs";import{a as s,i as c,t as l}from"./context-BGm5_wTT.mjs";import{n as u}from"./input-validation-D7z60HJH.mjs";import{t as d}from"./local-B3zt9PXR.mjs";import{t as f}from"./output-hFMAotFl.mjs";import{t as p}from"./run-CXWkMU3x.mjs";import{t as m}from"./progress-DE_G09u2.mjs";import{a as h,i as g,n as _}from"./prompt-D274Im1O.mjs";import"./telemetry-COlodX5Z.mjs";import"./api-Dnt6lRJG.mjs";function v(e){return e.usage(`$0 tags account-resources delete
3
3
 
4
4
  Removes all tags from a specific account or zone-level resource.
5
5
 
6
6
  Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).option(`if-match`,{type:`string`,description:`ETag value for optimistic concurrency control. When provided, the server will
7
7
  verify the current resource ETag matches before applying the write. Returns
8
8
  412 Precondition Failed if the resource has been modified since the ETag was
9
- obtained. Omit this header for unconditional writes.`}).option(`resource-id`,{type:`string`,description:`Identifies the unique resource.`}).option(`resource-type`,{type:`string`,description:`Enum for worker_version resource type.`,choices:/* @__PURE__ */ `worker_version.access_application.access_group.access_service_token.account.account_ruleset.ai_gateway.ai_search_instance.ai_search_namespace.alerting_policy.alerting_webhook.cloudflared_tunnel.cws_deployment.cws_policy.cws_policy_set.cws_workload.d1_database.device.durable_object_namespace.gateway_list.gateway_rule.image.infrastructure_target.kv_namespace.load_balancer_monitor.load_balancer_pool.namespace_worker.pages_project.queue.r2_bucket.resource_share.stream_live_input.stream_video.vectorize_index.worker`.split(`.`)}).coerce(`resource-type`,e=>m(e,`resource-type`,`text`)).option(`worker-id`,{type:`string`,description:`Worker ID is required only for worker_version resources`}).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:`Request body schema for deleting tags from account-level resources. Use /zones/{zone_id}/tags for zone-level resources.`})}const y={command:`delete`,describe:`Delete tags from an account or zone-level resource`,builder:v,handler:async e=>u({command:`tags account-resources delete`,classification:{safeFlags:[`resource-type`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let u={};if(e[`if-match`]!==void 0&&(u[`If-Match`]=String(e[`if-match`])),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 tags account-resources delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/tags`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},bodyKind:`json`,body:e.body===void 0?p({resource_id:m(e[`resource-id`],`resource-id`,`text`),resource_type:e[`resource-type`],worker_id:m(e[`worker-id`],`worker-id`,`text`)}):d(e.body)});return}let v=e.body===void 0?void 0:d(e.body),y=await r(e),b=e.zone===void 0?`accounts`:`zones`,x=b===`zones`?await a({zone:e.zone},y,{quiet:e.quiet}):e.local?t:await o();if(b===`zones`?e.zoneId=x:e.accountId=x,!await _({force:!!e.force}))return;if(e.body!==void 0){let e=v,t=await l(`Deleting`,async()=>n(y,`DELETE`,`/${b}/${x}/tags`,{body:e,headers:Object.keys(u).length>0?u:void 0}));s(t,{successLabel:`Deleted`});return}e[`resource-id`]===void 0&&(e[`resource-id`]=await h(`resource-id`,`Identifies the unique resource.`)),e[`resource-type`]===void 0&&(e[`resource-type`]=await g(`resource-type`,`Enum for worker_version resource type.`,/* @__PURE__ */ `worker_version.access_application.access_group.access_service_token.account.account_ruleset.ai_gateway.ai_search_instance.ai_search_namespace.alerting_policy.alerting_webhook.cloudflared_tunnel.cws_deployment.cws_policy.cws_policy_set.cws_workload.d1_database.device.durable_object_namespace.gateway_list.gateway_rule.image.infrastructure_target.kv_namespace.load_balancer_monitor.load_balancer_pool.namespace_worker.pages_project.queue.r2_bucket.resource_share.stream_live_input.stream_video.vectorize_index.worker`.split(`.`))),e[`resource-type`]===`worker_version`&&e[`worker-id`]===void 0&&(e[`worker-id`]=await h(`worker-id`,`Worker ID is required only for worker_version resources`,{question:`Enter value for --worker-id`}));let S={};e[`resource-id`]!==void 0&&f(S,[`resource_id`],m(e[`resource-id`],`resource-id`,`text`)),e[`resource-type`]!==void 0&&f(S,[`resource_type`],e[`resource-type`]),e[`worker-id`]!==void 0&&f(S,[`worker_id`],m(e[`worker-id`],`worker-id`,`text`));let C=await l(`Deleting`,async()=>n(y,`DELETE`,`/${b}/${x}/tags`,{body:S,headers:Object.keys(u).length>0?u:void 0}));s(C,{successLabel:`Deleted`})})};var b={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/tags`,query:[`resource_id`,`resource_type`,`worker_id`]};function x(e){return e.usage(`$0 tags account-resources get
9
+ obtained. Omit this header for unconditional writes.`}).option(`resource-id`,{type:`string`,description:`Identifies the unique resource.`}).option(`resource-type`,{type:`string`,description:`Enum for worker_version resource type.`,choices:/* @__PURE__ */ `worker_version.access_application.access_group.access_service_token.account.account_ruleset.ai_gateway.ai_search_instance.ai_search_namespace.alerting_policy.alerting_webhook.cloudflared_tunnel.cws_deployment.cws_policy.cws_policy_set.cws_workload.d1_database.device.durable_object_namespace.gateway_list.gateway_rule.image.infrastructure_target.kv_namespace.load_balancer_monitor.load_balancer_pool.namespace_worker.pages_project.queue.r2_bucket.resource_share.stream_live_input.stream_video.vectorize_index.worker`.split(`.`)}).coerce(`resource-type`,e=>u(e,`resource-type`,`text`)).option(`worker-id`,{type:`string`,description:`Worker ID is required only for worker_version resources`}).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:`Request body schema for deleting tags from account-level resources. Use /zones/{zone_id}/tags for zone-level resources.`})}const y={command:`delete`,describe:`Delete tags from an account or zone-level resource`,builder:v,handler:async n=>p({command:`tags account-resources delete`,classification:{safeFlags:[`resource-type`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{let p={};if(n[`if-match`]!==void 0&&(p[`If-Match`]=String(n[`if-match`])),n.dryRun){let e=n.zone===void 0?await s():void 0,t=n.zone===void 0?`accounts`:`zones`,r=n.zone??e??`<account-id>`;o({command:`cf tags account-resources delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/tags`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r)},bodyKind:`json`,body:n.body===void 0?a({resource_id:u(n[`resource-id`],`resource-id`,`text`),resource_type:n[`resource-type`],worker_id:u(n[`worker-id`],`worker-id`,`text`)}):i(n.body)});return}let v=n.body===void 0?void 0:i(n.body),y=await t(n),b=n.zone===void 0?`accounts`:`zones`,x=b===`zones`?await c({zone:n.zone},y,{quiet:n.quiet}):n.local?d:await l();if(b===`zones`?n.zoneId=x:n.accountId=x,!await _({force:!!n.force}))return;if(n.body!==void 0){let t=v,n=await m(`Deleting`,async()=>e(y,`DELETE`,`/${b}/${x}/tags`,{body:t,headers:Object.keys(p).length>0?p:void 0}));f(n,{successLabel:`Deleted`});return}n[`resource-id`]===void 0&&(n[`resource-id`]=await h(`resource-id`,`Identifies the unique resource.`)),n[`resource-type`]===void 0&&(n[`resource-type`]=await g(`resource-type`,`Enum for worker_version resource type.`,/* @__PURE__ */ `worker_version.access_application.access_group.access_service_token.account.account_ruleset.ai_gateway.ai_search_instance.ai_search_namespace.alerting_policy.alerting_webhook.cloudflared_tunnel.cws_deployment.cws_policy.cws_policy_set.cws_workload.d1_database.device.durable_object_namespace.gateway_list.gateway_rule.image.infrastructure_target.kv_namespace.load_balancer_monitor.load_balancer_pool.namespace_worker.pages_project.queue.r2_bucket.resource_share.stream_live_input.stream_video.vectorize_index.worker`.split(`.`))),n[`resource-type`]===`worker_version`&&n[`worker-id`]===void 0&&(n[`worker-id`]=await h(`worker-id`,`Worker ID is required only for worker_version resources`,{question:`Enter value for --worker-id`}));let S={};n[`resource-id`]!==void 0&&r(S,[`resource_id`],u(n[`resource-id`],`resource-id`,`text`)),n[`resource-type`]!==void 0&&r(S,[`resource_type`],n[`resource-type`]),n[`worker-id`]!==void 0&&r(S,[`worker_id`],u(n[`worker-id`],`worker-id`,`text`));let C=await m(`Deleting`,async()=>e(y,`DELETE`,`/${b}/${x}/tags`,{body:S,headers:Object.keys(p).length>0?p:void 0}));f(C,{successLabel:`Deleted`})})};var b={method:`GET`,path:e=>n`/${e.account_or_zone}/${e.account_or_zone_id}/tags`,query:[`resource_id`,`resource_type`,`worker_id`]};function x(e){return e.usage(`$0 tags account-resources get
10
10
 
11
11
  Retrieves tags for a specific account or zone-level resource.
12
12
 
13
- Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).option(`resource-id`,{type:`string`,description:`The ID of the resource to retrieve tags for.`,demandOption:!0}).option(`resource-type`,{type:`string`,description:`The type of the resource.`,choices:/* @__PURE__ */ `access_application.access_group.access_service_token.account.account_ruleset.ai_gateway.ai_search_instance.ai_search_namespace.alerting_policy.alerting_webhook.cloudflared_tunnel.cws_deployment.cws_policy.cws_policy_set.cws_workload.d1_database.device.durable_object_namespace.gateway_list.gateway_rule.image.infrastructure_target.kv_namespace.load_balancer_monitor.load_balancer_pool.namespace_worker.pages_project.queue.r2_bucket.resource_share.stream_live_input.stream_video.vectorize_index.worker.worker_version`.split(`.`),demandOption:!0}).option(`worker-id`,{type:`string`,description:`Worker identifier. Required for worker_version resources.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const S={command:`get`,describe:`Get tags for an account or zone-level resource`,builder:x,handler:async e=>u({command:`tags account-resources get`,classification:{safeFlags:[`resource-type`,`dry-run`]}},e,async()=>{let n={resource_id:e[`resource-id`],resource_type:e[`resource-type`],worker_id:e[`worker-id`]};if(e.dryRun){let t=e.zone===void 0?await i():void 0,r=e.zone===void 0?`accounts`:`zones`,a=e.zone??t??`<account-id>`;c({command:`cf tags account-resources get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${r}/${a}/tags`,pathParams:{"account-or-zone":String(r),"account-or-zone-id":String(a)},query:n,bodyKind:`none`});return}let u=await r(e),d=e.zone===void 0?`accounts`:`zones`,f=d===`zones`?await a({zone:e.zone},u,{quiet:e.quiet}):e.local?t:await o();d===`zones`?e.zoneId=f:e.accountId=f;let p=await l(`Loading`,async()=>u.send(b,{account_or_zone:d,account_or_zone_id:f,...n}));s(p,{successLabel:`Loaded`})})};function C(e){return e.usage(`$0 tags account-resources update
13
+ Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).option(`resource-id`,{type:`string`,description:`The ID of the resource to retrieve tags for.`,demandOption:!0}).option(`resource-type`,{type:`string`,description:`The type of the resource.`,choices:/* @__PURE__ */ `access_application.access_group.access_service_token.account.account_ruleset.ai_gateway.ai_search_instance.ai_search_namespace.alerting_policy.alerting_webhook.cloudflared_tunnel.cws_deployment.cws_policy.cws_policy_set.cws_workload.d1_database.device.durable_object_namespace.gateway_list.gateway_rule.image.infrastructure_target.kv_namespace.load_balancer_monitor.load_balancer_pool.namespace_worker.pages_project.queue.r2_bucket.resource_share.stream_live_input.stream_video.vectorize_index.worker.worker_version`.split(`.`),demandOption:!0}).option(`worker-id`,{type:`string`,description:`Worker identifier. Required for worker_version resources.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const S={command:`get`,describe:`Get tags for an account or zone-level resource`,builder:x,handler:async e=>p({command:`tags account-resources get`,classification:{safeFlags:[`resource-type`,`dry-run`]}},e,async()=>{let n={resource_id:e[`resource-id`],resource_type:e[`resource-type`],worker_id:e[`worker-id`]};if(e.dryRun){let t=e.zone===void 0?await s():void 0,r=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;o({command:`cf tags account-resources get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${r}/${i}/tags`,pathParams:{"account-or-zone":String(r),"account-or-zone-id":String(i)},query:n,bodyKind:`none`});return}let r=await t(e),i=e.zone===void 0?`accounts`:`zones`,a=i===`zones`?await c({zone:e.zone},r,{quiet:e.quiet}):e.local?d:await l();i===`zones`?e.zoneId=a:e.accountId=a;let u=await m(`Loading`,async()=>r.send(b,{account_or_zone:i,account_or_zone_id:a,...n}));f(u,{successLabel:`Loaded`})})};function C(e){return e.usage(`$0 tags account-resources update
14
14
 
15
15
  Creates or updates tags for a specific account or zone-level resource. Replaces all existing tags for the resource.
16
16
 
17
17
  Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).option(`if-match`,{type:`string`,description:`ETag value for optimistic concurrency control. When provided, the server will
18
18
  verify the current resource ETag matches before applying the write. Returns
19
19
  412 Precondition Failed if the resource has been modified since the ETag was
20
- obtained. Omit this header for unconditional writes.`}).option(`resource-id`,{type:`string`,description:`Identifies the unique resource.`}).option(`resource-type`,{type:`string`,description:`Enum for worker_version resource type.`,choices:/* @__PURE__ */ `worker_version.access_application.access_group.access_service_token.account.account_ruleset.ai_gateway.ai_search_instance.ai_search_namespace.alerting_policy.alerting_webhook.cloudflared_tunnel.cws_deployment.cws_policy.cws_policy_set.cws_workload.d1_database.device.durable_object_namespace.gateway_list.gateway_rule.image.infrastructure_target.kv_namespace.load_balancer_monitor.load_balancer_pool.namespace_worker.pages_project.queue.r2_bucket.resource_share.stream_live_input.stream_video.vectorize_index.worker`.split(`.`)}).coerce(`resource-type`,e=>m(e,`resource-type`,`text`)).option(`worker-id`,{type:`string`,description:`Worker ID is required only for worker_version resources`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body schema for setting tags on account-level resources.`})}const w={command:`update`,describe:`Set tags for an account or zone-level resource`,builder:C,handler:async e=>u({command:`tags account-resources update`,classification:{safeFlags:[`resource-type`,`dry-run`]}},e,async()=>{let u={};if(e[`if-match`]!==void 0&&(u[`If-Match`]=String(e[`if-match`])),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 tags account-resources update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/tags`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},bodyKind:`json`,body:e.body===void 0?p({resource_id:m(e[`resource-id`],`resource-id`,`text`),resource_type:e[`resource-type`],worker_id:m(e[`worker-id`],`worker-id`,`text`)}):d(e.body)});return}let _=e.body===void 0?void 0:d(e.body),v=await r(e),y=e.zone===void 0?`accounts`:`zones`,b=y===`zones`?await a({zone:e.zone},v,{quiet:e.quiet}):e.local?t:await o();if(y===`zones`?e.zoneId=b:e.accountId=b,e.body!==void 0){let e=_,t=await l(`Updating`,async()=>n(v,`PUT`,`/${y}/${b}/tags`,{body:e,headers:Object.keys(u).length>0?u:void 0}));s(t,{successLabel:`Updated`});return}e[`resource-id`]===void 0&&(e[`resource-id`]=await h(`resource-id`,`Identifies the unique resource.`)),e[`resource-type`]===void 0&&(e[`resource-type`]=await g(`resource-type`,`Enum for worker_version resource type.`,/* @__PURE__ */ `worker_version.access_application.access_group.access_service_token.account.account_ruleset.ai_gateway.ai_search_instance.ai_search_namespace.alerting_policy.alerting_webhook.cloudflared_tunnel.cws_deployment.cws_policy.cws_policy_set.cws_workload.d1_database.device.durable_object_namespace.gateway_list.gateway_rule.image.infrastructure_target.kv_namespace.load_balancer_monitor.load_balancer_pool.namespace_worker.pages_project.queue.r2_bucket.resource_share.stream_live_input.stream_video.vectorize_index.worker`.split(`.`)));let x={};e[`resource-id`]!==void 0&&f(x,[`resource_id`],m(e[`resource-id`],`resource-id`,`text`)),e[`resource-type`]!==void 0&&f(x,[`resource_type`],e[`resource-type`]),e[`worker-id`]!==void 0&&f(x,[`worker_id`],m(e[`worker-id`],`worker-id`,`text`));let S=await l(`Updating`,async()=>n(v,`PUT`,`/${y}/${b}/tags`,{body:x,headers:Object.keys(u).length>0?u:void 0}));s(S,{successLabel:`Updated`})})},T={command:`account-resources`,describe:`Operations for account-resources`,builder:e=>e.command(y).command(S).command(w).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var E={method:`GET`,path:t=>e`/accounts/${t.account_id}/tags/keys`,query:[`cursor`]};function D(e){return e.usage(`$0 tags keys list
20
+ obtained. Omit this header for unconditional writes.`}).option(`resource-id`,{type:`string`,description:`Identifies the unique resource.`}).option(`resource-type`,{type:`string`,description:`Enum for worker_version resource type.`,choices:/* @__PURE__ */ `worker_version.access_application.access_group.access_service_token.account.account_ruleset.ai_gateway.ai_search_instance.ai_search_namespace.alerting_policy.alerting_webhook.cloudflared_tunnel.cws_deployment.cws_policy.cws_policy_set.cws_workload.d1_database.device.durable_object_namespace.gateway_list.gateway_rule.image.infrastructure_target.kv_namespace.load_balancer_monitor.load_balancer_pool.namespace_worker.pages_project.queue.r2_bucket.resource_share.stream_live_input.stream_video.vectorize_index.worker`.split(`.`)}).coerce(`resource-type`,e=>u(e,`resource-type`,`text`)).option(`worker-id`,{type:`string`,description:`Worker ID is required only for worker_version resources`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body schema for setting tags on account-level resources.`})}const w={command:`update`,describe:`Set tags for an account or zone-level resource`,builder:C,handler:async n=>p({command:`tags account-resources update`,classification:{safeFlags:[`resource-type`,`dry-run`]}},n,async()=>{let p={};if(n[`if-match`]!==void 0&&(p[`If-Match`]=String(n[`if-match`])),n.dryRun){let e=n.zone===void 0?await s():void 0,t=n.zone===void 0?`accounts`:`zones`,r=n.zone??e??`<account-id>`;o({command:`cf tags account-resources update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/tags`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r)},bodyKind:`json`,body:n.body===void 0?a({resource_id:u(n[`resource-id`],`resource-id`,`text`),resource_type:n[`resource-type`],worker_id:u(n[`worker-id`],`worker-id`,`text`)}):i(n.body)});return}let _=n.body===void 0?void 0:i(n.body),v=await t(n),y=n.zone===void 0?`accounts`:`zones`,b=y===`zones`?await c({zone:n.zone},v,{quiet:n.quiet}):n.local?d:await l();if(y===`zones`?n.zoneId=b:n.accountId=b,n.body!==void 0){let t=_,n=await m(`Updating`,async()=>e(v,`PUT`,`/${y}/${b}/tags`,{body:t,headers:Object.keys(p).length>0?p:void 0}));f(n,{successLabel:`Updated`});return}n[`resource-id`]===void 0&&(n[`resource-id`]=await h(`resource-id`,`Identifies the unique resource.`)),n[`resource-type`]===void 0&&(n[`resource-type`]=await g(`resource-type`,`Enum for worker_version resource type.`,/* @__PURE__ */ `worker_version.access_application.access_group.access_service_token.account.account_ruleset.ai_gateway.ai_search_instance.ai_search_namespace.alerting_policy.alerting_webhook.cloudflared_tunnel.cws_deployment.cws_policy.cws_policy_set.cws_workload.d1_database.device.durable_object_namespace.gateway_list.gateway_rule.image.infrastructure_target.kv_namespace.load_balancer_monitor.load_balancer_pool.namespace_worker.pages_project.queue.r2_bucket.resource_share.stream_live_input.stream_video.vectorize_index.worker`.split(`.`)));let x={};n[`resource-id`]!==void 0&&r(x,[`resource_id`],u(n[`resource-id`],`resource-id`,`text`)),n[`resource-type`]!==void 0&&r(x,[`resource_type`],n[`resource-type`]),n[`worker-id`]!==void 0&&r(x,[`worker_id`],u(n[`worker-id`],`worker-id`,`text`));let S=await m(`Updating`,async()=>e(v,`PUT`,`/${y}/${b}/tags`,{body:x,headers:Object.keys(p).length>0?p:void 0}));f(S,{successLabel:`Updated`})})},T={command:`account-resources`,describe:`Operations for account-resources`,builder:e=>e.command(y).command(S).command(w).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var E={method:`GET`,path:e=>n`/accounts/${e.account_id}/tags/keys`,query:[`cursor`]};function D(e){return e.usage(`$0 tags keys list
21
21
 
22
- Lists all distinct tag keys used across resources in an account.`).option(`cursor`,{type:`string`,description:`Cursor for pagination.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const O={command:`list`,describe:`List tag keys`,builder:D,handler:async e=>u({command:`tags keys list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={cursor:e.cursor};if(e.dryRun){let e=await i();c({command:`cf tags keys list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/tags/keys`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(E,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})},k={command:`keys`,describe:`Operations for keys`,builder:e=>e.command(O).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var A={method:`GET`,path:t=>e`/accounts/${t.account_id}/tags/resources`,query:[`include_navigation`,`type`,`name`,`id`,`case_insensitive`,`tag`,`cursor`]};function j(e){return e.usage(`$0 tags resources list
22
+ Lists all distinct tag keys used across resources in an account.`).option(`cursor`,{type:`string`,description:`Cursor for pagination.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const O={command:`list`,describe:`List tag keys`,builder:D,handler:async e=>p({command:`tags keys list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={cursor:e.cursor};if(e.dryRun){let e=await s();o({command:`cf tags keys list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/tags/keys`,pathParams:{},query:n,bodyKind:`none`});return}let r=await t(e),i=e.local?d:await l();e.accountId=i;let a=await m(`Loading`,async()=>r.send(E,{account_id:i,...n}));f(a,{successLabel:`Loaded`})})},k={command:`keys`,describe:`Operations for keys`,builder:e=>e.command(O).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var A={method:`GET`,path:e=>n`/accounts/${e.account_id}/tags/resources`,query:[`include_navigation`,`type`,`name`,`id`,`case_insensitive`,`tag`,`cursor`]};function j(e){return e.usage(`$0 tags resources list
23
23
 
24
- Lists all tagged resources for an account.`).option(`include-navigation`,{type:`boolean`,description:`Resolve current namespace Worker navigation by immutable child tag. Optional read-only navigation is omitted for deleted or unresolved children. Lookups are limited to this page, at most five concurrently, with a shared two-second budget. Tag identity, ETag, filters and pagination are unchanged; name filtering still uses the stored resource name. Defaults to false.`}).option(`type`,{type:`string`,array:!0,description:`Filter by resource type. Can be repeated to filter by multiple types (OR logic). Example: ?type=zone&type=worker`}).option(`name`,{type:`string`,description:`Filter by resource name. Performs a case-insensitive substring match. Example: ?name=my-zone`}).option(`id`,{type:`string`,array:!0,description:`Filter by resource ID. Can be repeated up to 50 times to filter by multiple IDs. Example: ?id=abc&id=def`}).option(`case-insensitive`,{type:`boolean`,description:"Match `tag` keys and values case-insensitively. Stored casing is unchanged. Example: ?tag=environment=production&case_insensitive=true"}).option(`tag`,{type:`string`,array:!0,description:"Filter resources by tag criteria. This parameter can be repeated multiple times, with AND logic between parameters.\n\nSupported syntax:\n- **Key-only**: `tag=<key>` - Resource must have the tag key (e.g., `tag=production`)\n- **Key-value**: `tag=<key>=<value>` - Resource must have the tag with specific value (e.g., `tag=env=prod`)\n- **Multiple values (OR)**: `tag=<key>=<v1>,<v2>` - Resource must have tag with any of the values (e.g., `tag=env=prod,staging`)\n- **Negate key-only**: `tag=!<key>` - Resource must not have the tag key (e.g., `tag=!archived`)\n- **Negate key-value**: `tag=<key>!=<value>` - Resource must not have the tag with specific value (e.g., `tag=region!=us-west-1`)\n\nMultiple tag parameters are combined with AND logic."}).option(`cursor`,{type:`string`,description:`Cursor for pagination.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const M={command:`list`,describe:`List tagged resources`,builder:j,handler:async e=>u({command:`tags resources list`,classification:{safeFlags:[`include-navigation`,`case-insensitive`,`dry-run`]}},e,async()=>{let n={include_navigation:e[`include-navigation`],type:e.type,name:e.name,id:e.id,case_insensitive:e[`case-insensitive`],tag:e.tag,cursor:e.cursor};if(e.dryRun){let e=await i();c({command:`cf tags resources list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/tags/resources`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(A,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})},N={command:`resources`,describe:`Operations for resources`,builder:e=>e.command(M).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var P={method:`GET`,path:t=>e`/accounts/${t.account_id}/tags/summary`,query:[`cursor`]};function F(e){return e.usage(`$0 tags summary get
24
+ Lists all tagged resources for an account.`).option(`include-navigation`,{type:`boolean`,description:`Resolve current namespace Worker navigation by immutable child tag. Optional read-only navigation is omitted for deleted or unresolved children. Lookups are limited to this page, at most five concurrently, with a shared two-second budget. Tag identity, ETag, filters and pagination are unchanged; name filtering still uses the stored resource name. Defaults to false.`}).option(`type`,{type:`string`,array:!0,description:`Filter by resource type. Can be repeated to filter by multiple types (OR logic). Example: ?type=zone&type=worker`}).option(`name`,{type:`string`,description:`Filter by resource name. Performs a case-insensitive substring match. Example: ?name=my-zone`}).option(`id`,{type:`string`,array:!0,description:`Filter by resource ID. Can be repeated up to 50 times to filter by multiple IDs. Example: ?id=abc&id=def`}).option(`case-insensitive`,{type:`boolean`,description:"Match `tag` keys and values case-insensitively. Stored casing is unchanged. Example: ?tag=environment=production&case_insensitive=true"}).option(`tag`,{type:`string`,array:!0,description:"Filter resources by tag criteria. This parameter can be repeated multiple times, with AND logic between parameters.\n\nSupported syntax:\n- **Key-only**: `tag=<key>` - Resource must have the tag key (e.g., `tag=production`)\n- **Key-value**: `tag=<key>=<value>` - Resource must have the tag with specific value (e.g., `tag=env=prod`)\n- **Multiple values (OR)**: `tag=<key>=<v1>,<v2>` - Resource must have tag with any of the values (e.g., `tag=env=prod,staging`)\n- **Negate key-only**: `tag=!<key>` - Resource must not have the tag key (e.g., `tag=!archived`)\n- **Negate key-value**: `tag=<key>!=<value>` - Resource must not have the tag with specific value (e.g., `tag=region!=us-west-1`)\n\nMultiple tag parameters are combined with AND logic."}).option(`cursor`,{type:`string`,description:`Cursor for pagination.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const M={command:`list`,describe:`List tagged resources`,builder:j,handler:async e=>p({command:`tags resources list`,classification:{safeFlags:[`include-navigation`,`case-insensitive`,`dry-run`]}},e,async()=>{let n={include_navigation:e[`include-navigation`],type:e.type,name:e.name,id:e.id,case_insensitive:e[`case-insensitive`],tag:e.tag,cursor:e.cursor};if(e.dryRun){let e=await s();o({command:`cf tags resources list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/tags/resources`,pathParams:{},query:n,bodyKind:`none`});return}let r=await t(e),i=e.local?d:await l();e.accountId=i;let a=await m(`Loading`,async()=>r.send(A,{account_id:i,...n}));f(a,{successLabel:`Loaded`})})},N={command:`resources`,describe:`Operations for resources`,builder:e=>e.command(M).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var P={method:`GET`,path:e=>n`/accounts/${e.account_id}/tags/summary`,query:[`cursor`]};function F(e){return e.usage(`$0 tags summary get
25
25
 
26
- Lists all distinct tag keys and their distinct values across resources in an account.`).option(`cursor`,{type:`string`,description:`Cursor for pagination.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const I={command:`get`,describe:`List tag key summary`,builder:F,handler:async e=>u({command:`tags summary get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={cursor:e.cursor};if(e.dryRun){let e=await i();c({command:`cf tags summary get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/tags/summary`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(P,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})},L={command:`summary`,describe:`Operations for summary`,builder:e=>e.command(I).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var R={method:`GET`,path:t=>e`/accounts/${t.account_id}/tags/values/${t.tag_key}`,query:[`type`,`cursor`]};function z(e){return e.usage(`$0 tags values list
26
+ Lists all distinct tag keys and their distinct values across resources in an account.`).option(`cursor`,{type:`string`,description:`Cursor for pagination.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const I={command:`get`,describe:`List tag key summary`,builder:F,handler:async e=>p({command:`tags summary get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={cursor:e.cursor};if(e.dryRun){let e=await s();o({command:`cf tags summary get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/tags/summary`,pathParams:{},query:n,bodyKind:`none`});return}let r=await t(e),i=e.local?d:await l();e.accountId=i;let a=await m(`Loading`,async()=>r.send(P,{account_id:i,...n}));f(a,{successLabel:`Loaded`})})},L={command:`summary`,describe:`Operations for summary`,builder:e=>e.command(I).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var R={method:`GET`,path:e=>n`/accounts/${e.account_id}/tags/values/${e.tag_key}`,query:[`type`,`cursor`]};function z(e){return e.usage(`$0 tags values list
27
27
 
28
- Lists all distinct values for a given tag key, optionally filtered by resource type.`).option(`tag-key`,{type:`string`,description:`The tag key to retrieve values for.`,demandOption:!0}).option(`type`,{type:`string`,description:`Filter by resource type.`,choices:/* @__PURE__ */ `access_application.access_application_policy.access_group.access_service_token.account.account_ruleset.ai_gateway.ai_search_instance.ai_search_namespace.alerting_policy.alerting_webhook.api_gateway_operation.cloudflared_tunnel.custom_certificate.custom_hostname.cws_deployment.cws_policy.cws_policy_set.cws_workload.d1_database.device.dns_record.durable_object_namespace.gateway_list.gateway_rule.healthcheck.image.infrastructure_target.kv_namespace.load_balancer.load_balancer_monitor.load_balancer_pool.managed_client_certificate.namespace_worker.pages_project.queue.r2_bucket.resource_share.stream_live_input.stream_video.vectorize_index.worker.worker_route.worker_version.zone.zone_ruleset`.split(`.`)}).option(`cursor`,{type:`string`,description:`Cursor for pagination.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const B={command:`list`,describe:`List tag values`,builder:z,handler:async e=>u({command:`tags values list`,classification:{safeFlags:[`type`,`dry-run`]}},e,async()=>{let n={type:e.type,cursor:e.cursor};if(e.dryRun){let t=await i();c({command:`cf tags values list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/tags/values/${e[`tag-key`]==null?`<tag-key>`:encodeURIComponent(String(e[`tag-key`]))}`,pathParams:{"tag-key":String(e[`tag-key`]??``)},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(R,{account_id:u,tag_key:e[`tag-key`],...n}));s(d,{successLabel:`Loaded`})})},V={command:`values`,describe:`Operations for values`,builder:e=>e.command(B).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},H={command:`tags`,describe:`tags`,builder:e=>e.command(T).command(k).command(N).command(L).command(V).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{H as default};
28
+ Lists all distinct values for a given tag key, optionally filtered by resource type.`).option(`tag-key`,{type:`string`,description:`The tag key to retrieve values for.`,demandOption:!0}).option(`type`,{type:`string`,description:`Filter by resource type.`,choices:/* @__PURE__ */ `access_application.access_application_policy.access_group.access_service_token.account.account_ruleset.ai_gateway.ai_search_instance.ai_search_namespace.alerting_policy.alerting_webhook.api_gateway_operation.cloudflared_tunnel.custom_certificate.custom_hostname.cws_deployment.cws_policy.cws_policy_set.cws_workload.d1_database.device.dns_record.durable_object_namespace.gateway_list.gateway_rule.healthcheck.image.infrastructure_target.kv_namespace.load_balancer.load_balancer_monitor.load_balancer_pool.managed_client_certificate.namespace_worker.pages_project.queue.r2_bucket.resource_share.stream_live_input.stream_video.vectorize_index.worker.worker_route.worker_version.zone.zone_ruleset`.split(`.`)}).option(`cursor`,{type:`string`,description:`Cursor for pagination.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const B={command:`list`,describe:`List tag values`,builder:z,handler:async e=>p({command:`tags values list`,classification:{safeFlags:[`type`,`dry-run`]}},e,async()=>{let n={type:e.type,cursor:e.cursor};if(e.dryRun){let t=await s();o({command:`cf tags values list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/tags/values/${e[`tag-key`]==null?`<tag-key>`:encodeURIComponent(String(e[`tag-key`]))}`,pathParams:{"tag-key":String(e[`tag-key`]??``)},query:n,bodyKind:`none`});return}let r=await t(e),i=e.local?d:await l();e.accountId=i;let a=await m(`Loading`,async()=>r.send(R,{account_id:i,tag_key:e[`tag-key`],...n}));f(a,{successLabel:`Loaded`})})},V={command:`values`,describe:`Operations for values`,builder:e=>e.command(B).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},H={command:`tags`,describe:`tags`,builder:e=>e.command(T).command(k).command(N).command(L).command(V).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{H as default};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import"./run-CXWkMU3x.mjs";const e=`unknown command`;export{e as t};
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{a as e,n as t,r as n,t as r}from"./lifecycle-oud60haK.mjs";import{a as i,c as a,d as o,f as s,i as c,n as l,o as u,p as d,r as f,s as p,t as m,u as h}from"./run-BOKI1uWa.mjs";import{r as g}from"./sanitization-DkVWMHkc.mjs";import{t as _}from"./telemetry-DkDUr4KK.mjs";export{c as TELEMETRY_ENV_VAR,i as TELEMETRY_POLICY_DATE,_ as UNKNOWN_COMMAND_EVENT,r as allTelemetryDispatchesSettled,t as beginTelemetryRun,u as getBannerLastShown,p as getDeviceId,f as getTelemetryDispatcher,a as getTelemetryFromEnv,h as isFirstUsage,n as markCommandReported,o as resolveTelemetry,m as runWithTelemetry,g as sanitizeArgs,s as setBannerLastShown,d as setTelemetryPermission,e as wasCommandReported,l as withTelemetry};
2
+ import{a as e,n as t,r as n,t as r}from"./lifecycle-oud60haK.mjs";import{a as i,c as a,d as o,f as s,i as c,n as l,o as u,p as d,r as f,s as p,t as m,u as h}from"./run-CXWkMU3x.mjs";import{r as g}from"./sanitization-DkVWMHkc.mjs";import{t as _}from"./telemetry-COlodX5Z.mjs";export{c as TELEMETRY_ENV_VAR,i as TELEMETRY_POLICY_DATE,_ as UNKNOWN_COMMAND_EVENT,r as allTelemetryDispatchesSettled,t as beginTelemetryRun,u as getBannerLastShown,p as getDeviceId,f as getTelemetryDispatcher,a as getTelemetryFromEnv,h as isFirstUsage,n as markCommandReported,o as resolveTelemetry,m as runWithTelemetry,g as sanitizeArgs,s as setBannerLastShown,d as setTelemetryPermission,e as wasCommandReported,l as withTelemetry};
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
- import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-B-h0BHg7.mjs";import{t as n}from"./output-BZQEl3mK.mjs";import{t as r}from"./dry-run-kJbjn4kG.mjs";import{t as i}from"./progress-yvPscjYg.mjs";import{t as a}from"./run-BOKI1uWa.mjs";import"./telemetry-DkDUr4KK.mjs";import{n as o,t as s}from"./body-parser-DoewLePl.mjs";import{n as c}from"./input-validation-D7z60HJH.mjs";import{a as l,n as u}from"./prompt-CEpZ-lQZ.mjs";var d={method:`POST`,path:t=>e`/tenants/${t.tenant_id}/custom_ns`,body:`json`};function f(e){return e.usage(`$0 tenant-custom-nameservers create <tenant-id>
2
+ import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-DA1PHaHi.mjs";import{r as n,t as r}from"./body-parser-HN91kAf0.mjs";import{t as i}from"./dry-run-qsnRlRk6.mjs";import{n as a}from"./input-validation-D7z60HJH.mjs";import{t as o}from"./run-CXWkMU3x.mjs";import{t as s}from"./output-hFMAotFl.mjs";import{t as c}from"./progress-DE_G09u2.mjs";import{a as l,n as u}from"./prompt-D274Im1O.mjs";import"./telemetry-COlodX5Z.mjs";var d={method:`POST`,path:t=>e`/tenants/${t.tenant_id}/custom_ns`,body:`json`};function f(e){return e.usage(`$0 tenant-custom-nameservers create <tenant-id>
3
3
 
4
- Adds a custom nameserver for a tenant.`).positional(`tenant-id`,{type:`string`,description:`Tenant identifier tag.`,demandOption:!0}).option(`ns-name`,{type:`string`,description:`The FQDN of the name server.`}).option(`ns-set`,{type:`number`,description:`The number of the set that this name server belongs to.`,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 p={command:`create <tenant-id>`,describe:`Add Tenant Custom Nameserver`,builder:f,handler:async e=>a({command:`tenant-custom-nameservers create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf tenant-custom-nameservers create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/tenants/${e[`tenant-id`]==null?`<tenant-id>`:encodeURIComponent(String(e[`tenant-id`]))}/custom_ns`,pathParams:{"tenant-id":String(e[`tenant-id`]??``)},bodyKind:`json`,body:e.body===void 0?s({ns_name:c(e[`ns-name`],`ns-name`,`text`),ns_set:e[`ns-set`]}):o(e.body)});return}let a=e.body===void 0?void 0:o(e.body),u=await t(e);if(e.body!==void 0){let t=a,r=await i(`Creating`,async()=>u.send(d,{body:t,tenant_id:e[`tenant-id`]}));n(r,{successLabel:`Created`});return}e[`ns-name`]===void 0&&(e[`ns-name`]=await l(`ns-name`,`The FQDN of the name server.`));let f=s({ns_name:c(e[`ns-name`],`ns-name`,`text`),ns_set:e[`ns-set`]}),p=await i(`Creating`,async()=>u.send(d,{body:f,tenant_id:e[`tenant-id`]}));n(p,{successLabel:`Created`})})};var m={method:`DELETE`,path:t=>e`/tenants/${t.tenant_id}/custom_ns/${t.custom_ns_id}`};function h(e){return e.usage(`$0 tenant-custom-nameservers delete <custom-ns-id>
4
+ Adds a custom nameserver for a tenant.`).positional(`tenant-id`,{type:`string`,description:`Tenant identifier tag.`,demandOption:!0}).option(`ns-name`,{type:`string`,description:`The FQDN of the name server.`}).option(`ns-set`,{type:`number`,description:`The number of the set that this name server belongs to.`,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 p={command:`create <tenant-id>`,describe:`Add Tenant Custom Nameserver`,builder:f,handler:async e=>o({command:`tenant-custom-nameservers create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf tenant-custom-nameservers create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/tenants/${e[`tenant-id`]==null?`<tenant-id>`:encodeURIComponent(String(e[`tenant-id`]))}/custom_ns`,pathParams:{"tenant-id":String(e[`tenant-id`]??``)},bodyKind:`json`,body:e.body===void 0?r({ns_name:a(e[`ns-name`],`ns-name`,`text`),ns_set:e[`ns-set`]}):n(e.body)});return}let o=e.body===void 0?void 0:n(e.body),u=await t(e);if(e.body!==void 0){let t=o,n=await c(`Creating`,async()=>u.send(d,{body:t,tenant_id:e[`tenant-id`]}));s(n,{successLabel:`Created`});return}e[`ns-name`]===void 0&&(e[`ns-name`]=await l(`ns-name`,`The FQDN of the name server.`));let f=r({ns_name:a(e[`ns-name`],`ns-name`,`text`),ns_set:e[`ns-set`]}),p=await c(`Creating`,async()=>u.send(d,{body:f,tenant_id:e[`tenant-id`]}));s(p,{successLabel:`Created`})})};var m={method:`DELETE`,path:t=>e`/tenants/${t.tenant_id}/custom_ns/${t.custom_ns_id}`};function h(e){return e.usage(`$0 tenant-custom-nameservers delete <custom-ns-id>
5
5
 
6
- Deletes a tenant's custom nameserver.`).positional(`custom-ns-id`,{type:`string`,description:`The FQDN of the name server.`,demandOption:!0}).option(`tenant-id`,{type:`string`,description:`Tenant identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const g={command:`delete <custom-ns-id>`,describe:`Delete Tenant Custom Nameserver`,builder:h,handler:async e=>a({command:`tenant-custom-nameservers delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){r({command:`cf tenant-custom-nameservers delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/tenants/${e[`tenant-id`]==null?`<tenant-id>`:encodeURIComponent(String(e[`tenant-id`]))}/custom_ns/${e[`custom-ns-id`]==null?`<custom-ns-id>`:encodeURIComponent(String(e[`custom-ns-id`]))}`,pathParams:{"tenant-id":String(e[`tenant-id`]??``),"custom-ns-id":String(e[`custom-ns-id`]??``)},bodyKind:`none`});return}let a=await t(e);if(!await u({force:!!e.force}))return;let o=await i(`Deleting`,async()=>a.send(m,{tenant_id:e[`tenant-id`],custom_ns_id:e[`custom-ns-id`]}));n(o,{successLabel:`Deleted`})})};var _={method:`GET`,path:t=>e`/tenants/${t.tenant_id}/custom_ns`};function v(e){return e.usage(`$0 tenant-custom-nameservers get <tenant-id>
6
+ Deletes a tenant's custom nameserver.`).positional(`custom-ns-id`,{type:`string`,description:`The FQDN of the name server.`,demandOption:!0}).option(`tenant-id`,{type:`string`,description:`Tenant identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const g={command:`delete <custom-ns-id>`,describe:`Delete Tenant Custom Nameserver`,builder:h,handler:async e=>o({command:`tenant-custom-nameservers delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf tenant-custom-nameservers delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/tenants/${e[`tenant-id`]==null?`<tenant-id>`:encodeURIComponent(String(e[`tenant-id`]))}/custom_ns/${e[`custom-ns-id`]==null?`<custom-ns-id>`:encodeURIComponent(String(e[`custom-ns-id`]))}`,pathParams:{"tenant-id":String(e[`tenant-id`]??``),"custom-ns-id":String(e[`custom-ns-id`]??``)},bodyKind:`none`});return}let n=await t(e);if(!await u({force:!!e.force}))return;let r=await c(`Deleting`,async()=>n.send(m,{tenant_id:e[`tenant-id`],custom_ns_id:e[`custom-ns-id`]}));s(r,{successLabel:`Deleted`})})};var _={method:`GET`,path:t=>e`/tenants/${t.tenant_id}/custom_ns`};function v(e){return e.usage(`$0 tenant-custom-nameservers get <tenant-id>
7
7
 
8
- Lists a tenant's custom nameservers.`).positional(`tenant-id`,{type:`string`,description:`Tenant identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const y={command:`get <tenant-id>`,describe:`List Tenant Custom Nameservers`,builder:v,handler:async e=>a({command:`tenant-custom-nameservers get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf tenant-custom-nameservers get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/tenants/${e[`tenant-id`]==null?`<tenant-id>`:encodeURIComponent(String(e[`tenant-id`]))}/custom_ns`,pathParams:{"tenant-id":String(e[`tenant-id`]??``)},bodyKind:`none`});return}let a=await t(e),o=await i(`Loading`,async()=>a.send(_,{tenant_id:e[`tenant-id`]}));n(o,{successLabel:`Loaded`})})},b={command:`tenant-custom-nameservers`,describe:`tenant-custom-nameservers`,builder:e=>e.command(p).command(g).command(y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{b as default};
8
+ Lists a tenant's custom nameservers.`).positional(`tenant-id`,{type:`string`,description:`Tenant identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const y={command:`get <tenant-id>`,describe:`List Tenant Custom Nameservers`,builder:v,handler:async e=>o({command:`tenant-custom-nameservers get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf tenant-custom-nameservers get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/tenants/${e[`tenant-id`]==null?`<tenant-id>`:encodeURIComponent(String(e[`tenant-id`]))}/custom_ns`,pathParams:{"tenant-id":String(e[`tenant-id`]??``)},bodyKind:`none`});return}let n=await t(e),r=await c(`Loading`,async()=>n.send(_,{tenant_id:e[`tenant-id`]}));s(r,{successLabel:`Loaded`})})},b={command:`tenant-custom-nameservers`,describe:`tenant-custom-nameservers`,builder:e=>e.command(p).command(g).command(y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{b as default};
@@ -1,13 +1,13 @@
1
1
  #!/usr/bin/env node
2
- import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-B-h0BHg7.mjs";import{t as n}from"./output-BZQEl3mK.mjs";import{t as r}from"./dry-run-kJbjn4kG.mjs";import{t as i}from"./progress-yvPscjYg.mjs";import{t as a}from"./run-BOKI1uWa.mjs";import"./telemetry-DkDUr4KK.mjs";var o={method:`GET`,path:t=>e`/tenants/${t.tenant_id}/accounts`,query:[`account_pubname`,`account_pubname.startsWith`,`account_pubname.endsWith`,`account_pubname.contains`,`name`,`name.startsWith`,`name.endsWith`,`name.contains`,`status`,`order_by`,`direction`,`include_total`,`page`,`per_page`,`page_token`,`page_size`],joined:[`account_pubname`,`account_pubname.startsWith`,`account_pubname.endsWith`,`account_pubname.contains`,`name`,`name.startsWith`,`name.endsWith`,`name.contains`,`status`,`order_by`,`direction`,`include_total`,`page`,`per_page`,`page_token`,`page_size`]};function s(e){return e.usage("$0 tenants accounts list\n\nLists all Cloudflare accounts across this tenant's hierarchy using the legacy Account response shape. Use `GET /organizations/{organization_id}/accounts` to list only accounts immediately attached to a specific Organization using the modern Account response shape. Use `page_token` and `page_size` for cursor pagination, or provide `page` and `per_page` together for legacy offset pagination. Cursor pagination takes precedence when requested.").option(`tenant-id`,{type:`string`,description:`The ID of the tenant whose accounts to list.`,demandOption:!0}).option(`account-pubname`,{type:`string`,description:`(case-sensitive) Filter the list of accounts to where the account_pubname is equal to
2
+ import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-DA1PHaHi.mjs";import{t as n}from"./dry-run-qsnRlRk6.mjs";import{t as r}from"./output-hFMAotFl.mjs";import{t as i}from"./progress-DE_G09u2.mjs";import{t as a}from"./run-CXWkMU3x.mjs";import"./telemetry-COlodX5Z.mjs";var o={method:`GET`,path:t=>e`/tenants/${t.tenant_id}/accounts`,query:[`account_pubname`,`account_pubname.startsWith`,`account_pubname.endsWith`,`account_pubname.contains`,`name`,`name.startsWith`,`name.endsWith`,`name.contains`,`status`,`order_by`,`direction`,`include_total`,`page_token`,`page_size`],joined:[`account_pubname`,`account_pubname.startsWith`,`account_pubname.endsWith`,`account_pubname.contains`,`name`,`name.startsWith`,`name.endsWith`,`name.contains`,`status`,`order_by`,`direction`,`include_total`,`page_token`,`page_size`]};function s(e){return e.usage("$0 tenants accounts list\n\nLists all Cloudflare accounts across this tenant's hierarchy using the legacy Account response shape. Use `GET /organizations/{organization_id}/accounts` to list only accounts immediately attached to a specific Organization using the modern Account response shape. Use `page_token` and `page_size` for cursor pagination.").option(`tenant-id`,{type:`string`,description:`The ID of the tenant whose accounts to list.`,demandOption:!0}).option(`account-pubname`,{type:`string`,description:`(case-sensitive) Filter the list of accounts to where the account_pubname is equal to
3
3
  a particular string.`}).option(`account-pubname-starts-with`,{type:`string`,description:`(case-insensitive) Filter the list of accounts to where the account_pubname starts with
4
4
  a particular string.`}).option(`account-pubname-ends-with`,{type:`string`,description:`(case-insensitive) Filter the list of accounts to where the account_pubname ends with
5
5
  a particular string.`}).option(`account-pubname-contains`,{type:`string`,description:`(case-insensitive) Filter the list of accounts to where the account_pubname contains
6
6
  a particular string.`}).option(`name`,{type:`string`,description:"(case-sensitive) Filter the list of accounts to where the name is equal to a\nparticular string. At most one of `name`, `name.startsWith`, `name.endsWith`,\nor `name.contains` may be supplied per request."}).option(`name-starts-with`,{type:`string`,description:`(case-insensitive) Filter the list of accounts to where the name starts with a
7
7
  particular string.`}).option(`name-ends-with`,{type:`string`,description:`(case-insensitive) Filter the list of accounts to where the name ends with a particular
8
8
  string.`}).option(`name-contains`,{type:`string`,description:`(case-insensitive) Filter the list of accounts to where the name contains a particular
9
- string.`}).option(`status`,{type:`string`,description:"Filter accounts by lifecycle status. Defaults to `active`.",choices:[`active`,`deleted`]}).option(`order-by`,{type:`string`,description:"Field to order results by. Currently supported values: `account_name`.",choices:[`account_name`]}).option(`direction`,{type:`string`,description:"Sort direction for the order_by field. Valid values: `asc`, `desc`.\nDefaults to `asc` when order_by is specified.",choices:[`asc`,`desc`]}).option(`include-total`,{type:`boolean`,description:"Whether to calculate and return the exact `result_info.total_size` for cursor\npagination. Defaults to true. When false, `total_size` is omitted. Legacy\n`page`/`per_page` requests always calculate `total_count`."}).option(`page`,{type:`number`,description:"Legacy offset page number. Must be provided with `per_page`. Values below 1 are treated as\n1. Cursor pagination takes precedence when requested."}).option(`per-page`,{type:`number`,description:"Legacy offset page size. Must be provided with `page`. Values are clamped to the range\n1-100. Cursor pagination takes precedence when requested."}).option(`page-token`,{type:`string`,description:`An opaque token returned from the last list response that when
9
+ string.`}).option(`status`,{type:`string`,description:"Filter accounts by lifecycle status. Defaults to `active`.",choices:[`active`,`deleted`]}).option(`order-by`,{type:`string`,description:"Field to order results by. Currently supported values: `account_name`.",choices:[`account_name`]}).option(`direction`,{type:`string`,description:"Sort direction for the order_by field. Valid values: `asc`, `desc`.\nDefaults to `asc` when order_by is specified.",choices:[`asc`,`desc`]}).option(`include-total`,{type:`boolean`,description:"Whether to calculate and return the exact `result_info.total_size` for cursor\npagination. Defaults to true. When false, `total_size` is omitted."}).option(`page-token`,{type:`string`,description:`An opaque token returned from the last list response that when
10
10
  provided will retrieve the next page.
11
11
 
12
12
  Parameters used to filter the retrieved list must remain in subsequent
13
- requests with a page token.`}).option(`page-size`,{type:`number`,description:`The amount of items to return. Defaults to 10.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const c={command:`list`,describe:`List tenant accounts`,builder:s,handler:async e=>a({command:`tenants accounts list`,classification:{safeFlags:[`status`,`order-by`,`direction`,`include-total`,`dry-run`]}},e,async()=>{let a={account_pubname:e[`account-pubname`],"account_pubname.startsWith":e[`account-pubname-starts-with`],"account_pubname.endsWith":e[`account-pubname-ends-with`],"account_pubname.contains":e[`account-pubname-contains`],name:e.name,"name.startsWith":e[`name-starts-with`],"name.endsWith":e[`name-ends-with`],"name.contains":e[`name-contains`],status:e.status,order_by:e[`order-by`],direction:e.direction,include_total:e[`include-total`],page:e.page,per_page:e[`per-page`],page_token:e[`page-token`],page_size:e[`page-size`]};if(e.dryRun){r({command:`cf tenants accounts list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/tenants/${e[`tenant-id`]==null?`<tenant-id>`:encodeURIComponent(String(e[`tenant-id`]))}/accounts`,pathParams:{"tenant-id":String(e[`tenant-id`]??``)},query:a,bodyKind:`none`});return}let s=await t(e),c=await i(`Loading`,async()=>s.send(o,{tenant_id:e[`tenant-id`],...a}));n(c,{successLabel:`Loaded`})})},l={command:`accounts`,describe:`Accounts that belong to a tenant`,builder:e=>e.command(c).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},u={command:`tenants`,describe:`Multi-tenant account management`,builder:e=>e.command(l).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{u as default};
13
+ requests with a page token.`}).option(`page-size`,{type:`number`,description:`The amount of items to return. Defaults to 10.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const c={command:`list`,describe:`List tenant accounts`,builder:s,handler:async e=>a({command:`tenants accounts list`,classification:{safeFlags:[`status`,`order-by`,`direction`,`include-total`,`dry-run`]}},e,async()=>{let a={account_pubname:e[`account-pubname`],"account_pubname.startsWith":e[`account-pubname-starts-with`],"account_pubname.endsWith":e[`account-pubname-ends-with`],"account_pubname.contains":e[`account-pubname-contains`],name:e.name,"name.startsWith":e[`name-starts-with`],"name.endsWith":e[`name-ends-with`],"name.contains":e[`name-contains`],status:e.status,order_by:e[`order-by`],direction:e.direction,include_total:e[`include-total`],page_token:e[`page-token`],page_size:e[`page-size`]};if(e.dryRun){n({command:`cf tenants accounts list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/tenants/${e[`tenant-id`]==null?`<tenant-id>`:encodeURIComponent(String(e[`tenant-id`]))}/accounts`,pathParams:{"tenant-id":String(e[`tenant-id`]??``)},query:a,bodyKind:`none`});return}let s=await t(e),c=await i(`Loading`,async()=>s.send(o,{tenant_id:e[`tenant-id`],...a}));r(c,{successLabel:`Loaded`})})},l={command:`accounts`,describe:`Accounts that belong to a tenant`,builder:e=>e.command(c).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},u={command:`tenants`,describe:`Multi-tenant account management`,builder:e=>e.command(l).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{u as default};
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{n as e,t}from"./metadata-Df5kCWJv.mjs";import{t as n}from"./output-BZQEl3mK.mjs";function r(e){return e.replace(/[\s-]+/g,`_`)}function i(e){let t={type:e.type,description:e.description};return`default`in e&&e.default!==void 0&&(t.default=e.default),e.enum&&e.enum.length>0&&(t.enum=e.enum),t}function a(e){let t={},n=[];for(let r of e.arguments)t[r.name]=i(r),r.required&&n.push(r.name);for(let r of e.options)t[r.name]=i(r),r.required&&n.push(r.name);return{name:r(e.command),description:e.description,inputSchema:{type:`object`,properties:t,required:n}}}const o={command:`tools`,describe:!1,builder:e=>e,handler:async r=>{let i=e(import.meta.url,`commands.json`,t)?.commands??null;if(i===null){console.error(`Warning: Command metadata file not found. Run the build to generate it.`),n({version:`1.0`,tools:[]});return}let o={version:`1.0`,tools:i.map(a)};n(o)}};export{o as default};
2
+ import{n as e,t}from"./metadata-Df5kCWJv.mjs";import{t as n}from"./output-hFMAotFl.mjs";function r(e){return e.replace(/[\s-]+/g,`_`)}function i(e){let t={type:e.type,description:e.description};return`default`in e&&e.default!==void 0&&(t.default=e.default),e.enum&&e.enum.length>0&&(t.enum=e.enum),t}function a(e){let t={},n=[];for(let r of e.arguments)t[r.name]=i(r),r.required&&n.push(r.name);for(let r of e.options)t[r.name]=i(r),r.required&&n.push(r.name);return{name:r(e.command),description:e.description,inputSchema:{type:`object`,properties:t,required:n}}}const o={command:`tools`,describe:!1,builder:e=>e,handler:async r=>{let i=e(import.meta.url,`commands.json`,t)?.commands??null;if(i===null){console.error(`Warning: Command metadata file not found. Run the build to generate it.`),n({version:`1.0`,tools:[]});return}let o={version:`1.0`,tools:i.map(a)};n(o)}};export{o as default};