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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (290) hide show
  1. package/README.md +1 -1
  2. package/dist/_meta/commands.json +911 -751
  3. package/dist/_meta/schemas.json +401 -382
  4. package/dist/{abuse-reports-mKv00yPh.mjs → abuse-reports-CbUAnJxd.mjs} +1 -1
  5. package/dist/{access-CyRjTbhh.mjs → access-C-78DlxL.mjs} +1 -1
  6. package/dist/{accounts-BmF_YKvG.mjs → accounts-DEqQPxCz.mjs} +8 -15
  7. package/dist/{acm-BcIFiAb8.mjs → acm-jmhCq3Yh.mjs} +2 -3
  8. package/dist/{addressing-D6xVD7MM.mjs → addressing-BeYFpQvC.mjs} +12 -23
  9. package/dist/{agent-memory-Blldunhv.mjs → agent-memory-Chlovb7j.mjs} +5 -9
  10. package/dist/{ai-CU8tdTfC.mjs → ai-BndH3HYN.mjs} +2 -3
  11. package/dist/{ai-audit-Id3hq5pV.mjs → ai-audit-BUJ-70O_.mjs} +1 -1
  12. package/dist/{ai-gateway-BKeZ28CQ.mjs → ai-gateway-CCk7VKhL.mjs} +9 -15
  13. package/dist/{ai-search-DOiZEmn7.mjs → ai-search-BexET_wp.mjs} +6 -11
  14. package/dist/{ai-security-CioADDZi.mjs → ai-security-D4MxRlxX.mjs} +3 -5
  15. package/dist/{alerting-BzN1N3Se.mjs → alerting-rw8Oi3x7.mjs} +5 -9
  16. package/dist/{analytics-engine-CugCQfDe.mjs → analytics-engine-Bk7dQLcm.mjs} +1 -1
  17. package/dist/{analytics-Cte-DrzH.mjs → analytics-q-guNEOK.mjs} +1 -1
  18. package/dist/{api-security-CCs0g510.mjs → api-security-BDc6gkf1.mjs} +9 -17
  19. package/dist/{argo-BHBFZnmO.mjs → argo-CnLIqm0i.mjs} +1 -1
  20. package/dist/args-BAOHroBC.mjs +2 -0
  21. package/dist/{artifacts-BzAwvrCD.mjs → artifacts-Cil33dzV.mjs} +4 -7
  22. package/dist/{audit-logs-jWivEKCy.mjs → audit-logs--E2Eclb7.mjs} +1 -1
  23. package/dist/auth-B0lEsD_1.mjs +2 -0
  24. package/dist/{auth-BUQscD5b.mjs → auth-BcNLQji1.mjs} +1 -1
  25. package/dist/auth-BtZmY6sE.mjs +2 -0
  26. package/dist/{auth-token-T0aqYgl9.mjs → auth-token-aF5AVLlH.mjs} +1 -1
  27. package/dist/{autoconfig-CBdcYYf4.mjs → autoconfig-Dbp6J25P.mjs} +88 -88
  28. package/dist/{basin-catalog-_8w_4599.mjs → basin-catalog-dnVyzopm.mjs} +3 -5
  29. package/dist/{billing-Ce0WN0yw.mjs → billing-Fqp3jB2V.mjs} +2 -3
  30. package/dist/{blocks-CFAm0Ma3.mjs → blocks-BOQH-Won.mjs} +1 -1
  31. package/dist/{bot-management-DskcSr4B.mjs → bot-management-SEDgo1Xg.mjs} +1 -1
  32. package/dist/{botnet-feed-CmBm13-D.mjs → botnet-feed-DPqR4M0Y.mjs} +2 -3
  33. package/dist/{brand-protection-DTuFrsN0.mjs → brand-protection-B8vwKfM9.mjs} +2 -3
  34. package/dist/{browser-run-CXdzSOHa.mjs → browser-run-BybYDq3I.mjs} +3 -5
  35. package/dist/build-BqGmiORA.mjs +2 -0
  36. package/dist/build-CWlpWVBf.mjs +2 -0
  37. package/dist/{builds-_1u5Nx6f.mjs → builds-CvtOG-Gk.mjs} +8 -15
  38. package/dist/cache-Bme_d2Wx.mjs +36 -0
  39. package/dist/cf-fIBhEAxU.mjs +18 -0
  40. package/dist/chunk-DSGVRFIS-DHC6NOIj.mjs +2 -0
  41. package/dist/{chunk-2K52M2W5-iYNzknM1.mjs → chunk-XVBBSNW2-DfMyGS-l.mjs} +8 -8
  42. package/dist/{cli-DyhOdzMo.mjs → cli-CIKDqm-u.mjs} +3 -3
  43. package/dist/{client-side-security-DnnYaRsd.mjs → client-side-security-ZQeRoo1t.mjs} +2 -3
  44. package/dist/{cloud-connector-Ct6b6pz8.mjs → cloud-connector-BeunZlNV.mjs} +1 -1
  45. package/dist/{cloudflared-CHLpWU35.mjs → cloudflared-DbzoIouQ.mjs} +1 -1
  46. package/dist/{cloudforce-one-Rl6nCCm0.mjs → cloudforce-one-D20t9ojD.mjs} +26 -51
  47. package/dist/{command-BwgvUpNx.mjs → command-B3uWlw57.mjs} +1 -1
  48. package/dist/{command-DuLxEkGq.mjs → command-BGRucANI.mjs} +1 -1
  49. package/dist/{command-BONLLcyz.mjs → command-C6kE7BU0.mjs} +1 -1
  50. package/dist/{command-DOpykk8X.mjs → command-C9CNvZi_.mjs} +1 -1
  51. package/dist/{command-BRpBIju7.mjs → command-CQ5qHE7n.mjs} +1 -1
  52. package/dist/{command-CHGc-KZ7.mjs → command-CkZkTjIj.mjs} +1 -1
  53. package/dist/{command-BRXOUAGD.mjs → command-CqKRlHGv.mjs} +1 -1
  54. package/dist/{command-BwlIi3Bv.mjs → command-CtlD6MEi.mjs} +1 -1
  55. package/dist/{command-CXzje7qc.mjs → command-CzWWQv8j.mjs} +1 -1
  56. package/dist/{command-BMYi_gS-.mjs → command-DWWuXQV8.mjs} +1 -1
  57. package/dist/{command-CPDQPdss.mjs → command-DkwmylF2.mjs} +1 -1
  58. package/dist/{command-CMa807gY.mjs → command-MxFFWqMg.mjs} +1 -1
  59. package/dist/{command-BVO9UOuU.mjs → command-orlUsdgf.mjs} +1 -1
  60. package/dist/{command-CVoDyQnL.mjs → command-prWMAJbg.mjs} +1 -1
  61. package/dist/{command-0WS5I_JW.mjs → command-rUCxlpQI.mjs} +1 -1
  62. package/dist/command-resolution-DAQ4PWUt.mjs +2 -0
  63. package/dist/{completions-DMwrvK_S.mjs → completions-2Otv0HMd.mjs} +1 -1
  64. package/dist/{connector-interrupts-DyWilINb.mjs → connector-interrupts-Dfhxupmg.mjs} +1 -1
  65. package/dist/{connector-telemetry-events-BUW9qTOs.mjs → connector-telemetry-events-CLVpDTIa.mjs} +1 -1
  66. package/dist/{connector-telemetry-snapshots-Djs5QssR.mjs → connector-telemetry-snapshots-E_1tmNmQ.mjs} +1 -1
  67. package/dist/{connectors-e_cpzDEm.mjs → connectors-ChJpQFSl.mjs} +2 -3
  68. package/dist/{containers-CEH15JUu.mjs → containers-Cj5-9nUg.mjs} +6 -9
  69. package/dist/containers-CzAZfmnj.mjs +380 -0
  70. package/dist/{content-scan-B6Ahw9JA.mjs → content-scan-CIA_9PV8.mjs} +3 -5
  71. package/dist/{context-Sgba0fZP.mjs → context-DVh8Wyfs.mjs} +2 -2
  72. package/dist/{cps-uDD0SSJ-.mjs → cps-hJkqdsHx.mjs} +1 -1
  73. package/dist/{csam-scanner-BSUl7jGn.mjs → csam-scanner-cCVO3lNF.mjs} +1 -1
  74. package/dist/{custom-csrs-BDcXggph.mjs → custom-csrs-BrTWUZ0c.mjs} +2 -3
  75. package/dist/{custom-hostnames-UmIlwkwt.mjs → custom-hostnames-C4ft77oC.mjs} +4 -7
  76. package/dist/{custom-nameservers-D7kU6d--.mjs → custom-nameservers-BWfrZhD1.mjs} +2 -3
  77. package/dist/{custom-pages-CkhIQCfM.mjs → custom-pages-DqTMKtRc.mjs} +2 -3
  78. package/dist/{d1-myRLEAGs.mjs → d1-B58AA9PA.mjs} +3 -6
  79. package/dist/delegate-D7yYckA4.mjs +2 -0
  80. package/dist/delegate.mjs +1 -1
  81. package/dist/{deploy-BJqCpycz.mjs → deploy-CEROLAdh.mjs} +1 -1
  82. package/dist/deploy-context-Do89WayB.mjs +56 -0
  83. package/dist/{deploy-input-v2DryyLP.mjs → deploy-input-DyMuMsi5.mjs} +1 -1
  84. package/dist/{dev-S1PJi83q.mjs → dev-BaFS7kOM.mjs} +2 -2
  85. package/dist/{diagnostics-q65rcNIk.mjs → diagnostics-4gfYj7Pf.mjs} +2 -3
  86. package/dist/dialog-D5lus4M4.mjs +2 -0
  87. package/dist/discover-6kAmVMPp.mjs +2 -0
  88. package/dist/discover-C06Syc2B.mjs +2 -0
  89. package/dist/dist-BtzWfAjU.mjs +453 -0
  90. package/dist/dls-ClWVxTBg.mjs +16 -0
  91. package/dist/{dns-DhARjFQs.mjs → dns-CML-wxIt.mjs} +68 -68
  92. package/dist/{dns-firewall-BP6r9QG6.mjs → dns-firewall-CL0b3dJ1.mjs} +2 -3
  93. package/dist/{docs-CReGWDrw.mjs → docs-BeYBHwUN.mjs} +1 -1
  94. package/dist/{dotenv-Ck-6V1hm.mjs → dotenv-CmPRiXmU.mjs} +1 -1
  95. package/dist/{dry-run-BBjUQUhR.mjs → dry-run-gy0Hl9xo.mjs} +1 -1
  96. package/dist/{durable-objects-tOJy-5te.mjs → durable-objects-uZECeq_f.mjs} +1 -1
  97. package/dist/{email-auth-Bq9sq_2j.mjs → email-auth-CCNW798I.mjs} +1 -1
  98. package/dist/email-domains-1rD1d84O.mjs +12 -0
  99. package/dist/{email-routing-CYo4dp50.mjs → email-routing-CYv-LrbV.mjs} +4 -7
  100. package/dist/{email-security-CNtWET2d.mjs → email-security-CWEUYPYo.mjs} +16 -31
  101. package/dist/{email-sending-BvagNLRr.mjs → email-sending-DHSzCfJx.mjs} +3 -5
  102. package/dist/{errors-DpbAQQv8.mjs → errors-ol9sMqSe.mjs} +8 -8
  103. package/dist/{field-extractors-C9R3Qivh.mjs → field-extractors-CuBM_uO4.mjs} +2 -3
  104. package/dist/{firewall-DsgUY-Qv.mjs → firewall-SMIUSypF.mjs} +4 -7
  105. package/dist/flagship-D3v6iDdw.mjs +24 -0
  106. package/dist/{fraud-24l8dKyk.mjs → fraud-B2f7O15X.mjs} +1 -1
  107. package/dist/{google-tag-gateway-CAkudP5W.mjs → google-tag-gateway-BwOc62Gy.mjs} +1 -1
  108. package/dist/{gt-D6YemCLh.mjs → gt-BQkaDQDq.mjs} +1 -1
  109. package/dist/{healthchecks-CEGMe3lO.mjs → healthchecks-BQXHnihB.mjs} +3 -5
  110. package/dist/{hyperdrive-DLDaOU2O.mjs → hyperdrive-Bd6Yfje3.mjs} +2 -3
  111. package/dist/{iam-ChldOMSL.mjs → iam-qJPI1_aZ.mjs} +5 -9
  112. package/dist/{images-Ba9tS5wT.mjs → images-goHZJOxy.mjs} +6 -11
  113. package/dist/index.mjs +1 -1
  114. package/dist/init-CVx0Ya1E.mjs +43 -0
  115. package/dist/{intel-DbLRah4Y.mjs → intel-CwiqwJI9.mjs} +18 -21
  116. package/dist/interactive-CHcvofEp.mjs +2 -0
  117. package/dist/{interactive-d_lFnSev.mjs → interactive-D4E8PdaW.mjs} +31 -31
  118. package/dist/interactive-wQM7Blhm.mjs +2 -0
  119. package/dist/internal-5cnlw9mH.mjs +4 -0
  120. package/dist/{ips-BGyzyQLL.mjs → ips-KBxmXhvO.mjs} +1 -1
  121. package/dist/{k2-BVQ3MqEl.mjs → k2-KhIP5NFT.mjs} +2 -3
  122. package/dist/kv-CCem2sEY.mjs +12 -0
  123. package/dist/{lazy-command-D0I6itZs.mjs → lazy-command-BMhD5ffF.mjs} +1 -1
  124. package/dist/{leaked-credential-checks-Dga83Qy3.mjs → leaked-credential-checks-BkPZiwE2.mjs} +3 -5
  125. package/dist/live-BhHzxFna.mjs +4 -0
  126. package/dist/{load-balancers-D9cB6of8.mjs → load-balancers-17GBXdju.mjs} +5 -9
  127. package/dist/local-CAs8RWYW.mjs +2 -0
  128. package/dist/{local-B7ZJ78al.mjs → local-CSH3UMpD.mjs} +1 -1
  129. package/dist/{local-runtime-DB545Gqq.mjs → local-runtime-KOFLRZeZ.mjs} +1 -1
  130. package/dist/log-BWdaOGOW.mjs +66 -0
  131. package/dist/log-DZfik9Jk.mjs +2 -0
  132. package/dist/login-BTiflOun.mjs +2 -0
  133. package/dist/login-Buhvx6Fi.mjs +5 -0
  134. package/dist/{logpush-Ccmr0Y_I.mjs → logpush-BCCUxa4J.mjs} +3 -5
  135. package/dist/{logs-CZBMuuBC.mjs → logs-4CwupKRG.mjs} +2 -3
  136. package/dist/{magic-cloud-networking-BwOxZVql.mjs → magic-cloud-networking-Xy6SC-V-.mjs} +4 -7
  137. package/dist/{magic-network-monitoring-Cx5kKdbk.mjs → magic-network-monitoring-B8pRZp2g.mjs} +3 -5
  138. package/dist/{magic-transit-BJwg3sVK.mjs → magic-transit-CwfO3OOX.mjs} +36 -67
  139. package/dist/managed-defense-CtFLuvuB.mjs +18 -0
  140. package/dist/{managed-transforms-C-HMtesC.mjs → managed-transforms-Hto8OCBS.mjs} +2 -3
  141. package/dist/{mcp-bGKgzz6F.mjs → mcp-SQ0MAVUJ.mjs} +3 -5
  142. package/dist/{mesh-DeQIll19.mjs → mesh-C8A6tVqA.mjs} +3 -5
  143. package/dist/{migrate-B6HsPeFh.mjs → migrate-Dufxsb_F.mjs} +1 -1
  144. package/dist/{monetization-B-TIrpA5.mjs → monetization-CYVaCAe9.mjs} +3 -5
  145. package/dist/{network-BrjykU-I.mjs → network-CJBTdEM3.mjs} +5 -9
  146. package/dist/{network-interconnects-I06kbxIl.mjs → network-interconnects-CKlNFj3i.mjs} +3 -5
  147. package/dist/{o11y-Ba0Fa98_.mjs → o11y-5x2Q8CWm.mjs} +8 -15
  148. package/dist/{oauth-BH-uQd3C.mjs → oauth-BN6_FpYp.mjs} +1 -1
  149. package/dist/oauth-D_A8AcIS.mjs +4 -0
  150. package/dist/{oauth-clients-Dd5gvDqf.mjs → oauth-clients-qKXg8ZH3.mjs} +3 -5
  151. package/dist/{oauth-scopes-CXpH3Syj.mjs → oauth-scopes-Ct1jDyC5.mjs} +1 -1
  152. package/dist/{organization-DKPqwe3j.mjs → organization-lBQSeqS1.mjs} +3 -5
  153. package/dist/{organizations-Cq4iy-Yr.mjs → organizations-DEX8Er3g.mjs} +1 -1
  154. package/dist/{origin-post-quantum-encryption-DSB1sbYV.mjs → origin-post-quantum-encryption-DUsxVGCs.mjs} +1 -1
  155. package/dist/output-BJEgbI0G.mjs +2 -0
  156. package/dist/package-BqSbnt6u.mjs +2 -0
  157. package/dist/{page-rules-CDWTYaf7.mjs → page-rules-BMt6nt03.mjs} +2 -3
  158. package/dist/{pages-Dgtm51Uj.mjs → pages-Jxa92ECz.mjs} +7 -13
  159. package/dist/{pay-per-crawl-CHenxdhv.mjs → pay-per-crawl-Cv0044CZ.mjs} +3 -5
  160. package/dist/{pay-per-use-Bd5l0hBi.mjs → pay-per-use-DGEeG-dC.mjs} +2 -3
  161. package/dist/{pipelines-GsyD6nUM.mjs → pipelines-CEC78A3w.mjs} +5 -9
  162. package/dist/{precursor-mO-Zua09.mjs → precursor-Ba0Ejhzt.mjs} +1 -1
  163. package/dist/previews-DnZbUTym.mjs +6 -0
  164. package/dist/progress-CtGsPOpV.mjs +2 -0
  165. package/dist/prompt-YrI7ltMa.mjs +4 -0
  166. package/dist/{queues-D8cAr2lB.mjs → queues-Chq997uj.mjs} +6 -11
  167. package/dist/{r2-CJiJbG6b.mjs → r2-BFgZDs-F.mjs} +17 -33
  168. package/dist/{radar-PUZ_PCZ8.mjs → radar-DJdDzLJw.mjs} +1 -1
  169. package/dist/{raw-fetch-DSdFjojI.mjs → raw-fetch-BE3QgdTE.mjs} +1 -1
  170. package/dist/ready-Cok0aqke.mjs +4 -0
  171. package/dist/{realtime-X6uQsldp.mjs → realtime-BHWWCiKp.mjs} +10 -19
  172. package/dist/{registrar-BqZdUTss.mjs → registrar-9Y-1IQ0n.mjs} +1 -1
  173. package/dist/{registrar-sandbox-CmM3e1QN.mjs → registrar-sandbox-DTS1kRnb.mjs} +1 -1
  174. package/dist/{registry-D0tMkLv6.mjs → registry-Bm-GgDC3.mjs} +1 -1
  175. package/dist/{reporting-DFVz98Xg.mjs → reporting-D5RbKQJf.mjs} +1 -1
  176. package/dist/request-headers-KhW_hy36.mjs +2 -0
  177. package/dist/{request-tracers-BC1u2WDU.mjs → request-tracers-wxWCjmHo.mjs} +1 -1
  178. package/dist/{resource-sharing-CdEn5Iex.mjs → resource-sharing-BGoaVvJa.mjs} +5 -9
  179. package/dist/rolldown-runtime-BNtqjh-B.mjs +2 -0
  180. package/dist/{rules-B663VetJ.mjs → rules-Cd3EjhdF.mjs} +3 -5
  181. package/dist/{rulesets-p4EijVr6.mjs → rulesets-Bnz3rSBT.mjs} +4 -7
  182. package/dist/{rum-CHHXe4KK.mjs → rum-CK9HEe3O.mjs} +3 -5
  183. package/dist/run-Be6Js7D6.mjs +2 -0
  184. package/dist/run-DnZGQbq_.mjs +2 -0
  185. package/dist/sanitization-DkVWMHkc.mjs +2 -0
  186. package/dist/{schema-B38ojvsS.mjs → schema-DuLIZRhA.mjs} +1 -1
  187. package/dist/{schema-flags-z7yn0JZ_.mjs → schema-flags-BrDlFwLv.mjs} +1 -1
  188. package/dist/{scim-BMnUa4Oz.mjs → scim-UdqaWnOu.mjs} +3 -5
  189. package/dist/{secrets-store-EYrhEzVG.mjs → secrets-store-Bf5v96LC.mjs} +3 -5
  190. package/dist/{security-insights-C-AwDwXb.mjs → security-insights-BAGySlGu.mjs} +1 -1
  191. package/dist/{security-txt-CQMe8TD3.mjs → security-txt-D0fMmjHs.mjs} +2 -3
  192. package/dist/session-6xqrJWXy.mjs +2 -0
  193. package/dist/shared-DYRRG9A-.mjs +2 -0
  194. package/dist/signed-url-Ce0muRem.mjs +4 -0
  195. package/dist/{smart-shield-CHSuitaH.mjs → smart-shield-CCy7_M3j.mjs} +3 -5
  196. package/dist/{snippets-DGSBz4lg.mjs → snippets-Bc8m3HSV.mjs} +3 -5
  197. package/dist/spawn-BAEdy9kS.mjs +5 -0
  198. package/dist/{spectrum-59LhYG1t.mjs → spectrum-DtNX8WBX.mjs} +2 -3
  199. package/dist/{speed-CMCfoG3s.mjs → speed-TbkeWV_x.mjs} +3 -5
  200. package/dist/{sql-MxWaTDdj.mjs → sql-DI319y25.mjs} +1 -1
  201. package/dist/src-COwxoocl.mjs +2 -0
  202. package/dist/{src-J3Yss3VM.mjs → src-Dc6ojwUW.mjs} +5 -5
  203. package/dist/{ssl-DTTFZR9x.mjs → ssl-D0MIzFl2.mjs} +9 -17
  204. package/dist/startup-profile-CZYtQziF.mjs +2 -0
  205. package/dist/{startup-profile-bp348qmf.mjs → startup-profile-DlWrt4Fm.mjs} +5 -5
  206. package/dist/state-B3Uy1jPX.mjs +2 -0
  207. package/dist/{state-CqAtTENS.mjs → state-DazGSbRx.mjs} +1 -1
  208. package/dist/{stream-gVG_7si-.mjs → stream-4Mrb8HEo.mjs} +14 -27
  209. package/dist/tags-BP25qydR.mjs +22 -0
  210. package/dist/telemetry-CvZean4s.mjs +2 -0
  211. package/dist/telemetry-DKSJSLtq.mjs +2 -0
  212. package/dist/{tenant-custom-nameservers-DBmmUcxn.mjs → tenant-custom-nameservers-BzVP85Tq.mjs} +2 -3
  213. package/dist/{tenant-Qv_PC8gW.mjs → tenant-jmfZqEZ4.mjs} +1 -1
  214. package/dist/{tools-B1ajcUAF.mjs → tools-C-vmgYSv.mjs} +1 -1
  215. package/dist/{tunnels-CHNKPYRV.mjs → tunnels-BNswR1Dj.mjs} +4 -6
  216. package/dist/{turnstile-C60RxPo2.mjs → turnstile-BgsTP2fz.mjs} +2 -3
  217. package/dist/ui-Bo6DCvbS.mjs +2 -0
  218. package/dist/{update-check-BHarE3V9.mjs → update-check-BOF1hn_I.mjs} +1 -1
  219. package/dist/update-check-C7mfEeQ7.mjs +2 -0
  220. package/dist/update-check-worker.mjs +1 -1
  221. package/dist/{url-normalization-3t6Xpafi.mjs → url-normalization-Bqrs4-2F.mjs} +2 -3
  222. package/dist/{url-scanner-DNG__DiK.mjs → url-scanner-Dm4Fps5T.mjs} +1 -1
  223. package/dist/{user-B4i7OIFK.mjs → user-u_LxzLM4.mjs} +8 -15
  224. package/dist/{vectorize-y3PCQDDf.mjs → vectorize-DLGiOyd4.mjs} +3 -5
  225. package/dist/version-DmTuWNZ5.mjs +2 -0
  226. package/dist/{waiting-rooms-xkZLvPkT.mjs → waiting-rooms-DmgJgJXb.mjs} +4 -7
  227. package/dist/{web-assets-BlqHZywy.mjs → web-assets-rNhZWP-6.mjs} +7 -13
  228. package/dist/{web3-DGAJMcLv.mjs → web3-BVBdFt8E.mjs} +3 -5
  229. package/dist/{workers-cCNBx0Bc.mjs → workers-CjUKJvH8.mjs} +18 -22
  230. package/dist/{workers-builds-COKp3NfU.mjs → workers-builds-D3Q97l7X.mjs} +1 -1
  231. package/dist/{workers-for-platforms-CAtiWI_G.mjs → workers-for-platforms-C_fcw30y.mjs} +5 -9
  232. package/dist/{workers-vpc-ChBfXwPy.mjs → workers-vpc-CnRO3Stc.mjs} +2 -3
  233. package/dist/{workflows-BYhgJvyR.mjs → workflows-cpHFe5v6.mjs} +5 -9
  234. package/dist/{wrangler-migration-B12OR2bu.mjs → wrangler-migration-DQehjmoh.mjs} +74 -74
  235. package/dist/{zaraz-BW0kvRCK.mjs → zaraz-BRj0J7vK.mjs} +1 -1
  236. package/dist/{zero-trust-DSeWXkNV.mjs → zero-trust-CVZKDLCB.mjs} +75 -149
  237. package/dist/{zone-B-YJG2UA.mjs → zone-N6ccK70C.mjs} +1 -1
  238. package/dist/{zones-B8pqPHu8.mjs → zones-C4S_kpGz.mjs} +49 -52
  239. package/package.json +12 -12
  240. package/dist/auth-CdEGiJ5Y.mjs +0 -2
  241. package/dist/auth-DF_ml7rE.mjs +0 -2
  242. package/dist/build-BJHRK6qE.mjs +0 -2
  243. package/dist/build-D7s3a8zW.mjs +0 -2
  244. package/dist/cache-CDPUUv_O.mjs +0 -45
  245. package/dist/cf-3vj8dGYz.mjs +0 -18
  246. package/dist/chunk-DSGVRFIS-RUG6Dtqz.mjs +0 -2
  247. package/dist/containers-CcZHRM9g.mjs +0 -376
  248. package/dist/delegate-Tgfxa-MZ.mjs +0 -2
  249. package/dist/deploy-context-DIAl408H.mjs +0 -56
  250. package/dist/dialog-BnIgdgWi.mjs +0 -2
  251. package/dist/discover-DEjUARkU.mjs +0 -2
  252. package/dist/discover-P20XeGBF.mjs +0 -2
  253. package/dist/dist-CX6dDtzj.mjs +0 -449
  254. package/dist/dist-DAeCUX-u.mjs +0 -60
  255. package/dist/dls-CMTrCDjZ.mjs +0 -17
  256. package/dist/flagship-geGDHp9H.mjs +0 -28
  257. package/dist/init-C08hBFYn.mjs +0 -43
  258. package/dist/interactive-pjVqirHx.mjs +0 -2
  259. package/dist/kv-Cd8vbPWK.mjs +0 -15
  260. package/dist/local-CFZtOOxg.mjs +0 -2
  261. package/dist/log-CRbgNbDp.mjs +0 -3
  262. package/dist/login-C3Bahro9.mjs +0 -5
  263. package/dist/login-DvsRxI3E.mjs +0 -2
  264. package/dist/logo-matches-jeNkUxAq.mjs +0 -6
  265. package/dist/logos-pxN5aumY.mjs +0 -7
  266. package/dist/managed-defense-C_KLy4oB.mjs +0 -18
  267. package/dist/matches-DnjBnG-Y.mjs +0 -6
  268. package/dist/oauth-Cf3-g-kk.mjs +0 -4
  269. package/dist/output-CpiIVa7Q.mjs +0 -2
  270. package/dist/previews-oHUiD54J.mjs +0 -7
  271. package/dist/progress-B1dpmxCT.mjs +0 -2
  272. package/dist/prompt-Y5OBwDVE.mjs +0 -4
  273. package/dist/queries-CS0sYfte.mjs +0 -9
  274. package/dist/request-headers-Bg8_Idw3.mjs +0 -2
  275. package/dist/run-0EozpORq.mjs +0 -2
  276. package/dist/run-DKg70Sqf.mjs +0 -2
  277. package/dist/session-3DgztoAI.mjs +0 -2
  278. package/dist/shared-o8saqcSK.mjs +0 -2
  279. package/dist/source-AlTrHNem.mjs +0 -6
  280. package/dist/spawn-BZd__5sj.mjs +0 -10
  281. package/dist/startup-profile-DJsOtbVN.mjs +0 -2
  282. package/dist/state-Dvzl3aSj.mjs +0 -2
  283. package/dist/submit-wJYcQB8d.mjs +0 -4
  284. package/dist/tags-BwFKjaOr.mjs +0 -23
  285. package/dist/telemetry-BczXOpQn.mjs +0 -2
  286. package/dist/telemetry-CE15pfOU.mjs +0 -2
  287. package/dist/ui-CBhKUPys.mjs +0 -2
  288. package/dist/update-check-C3RhhXja.mjs +0 -2
  289. package/dist/url-info-By6VD20A.mjs +0 -4
  290. package/dist/version-izjB0Yrl.mjs +0 -2
@@ -1,20 +1,17 @@
1
1
  #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-B7ZJ78al.mjs";import{i as n,n as r}from"./auth-BUQscD5b.mjs";import{a as i,t as a}from"./context-Sgba0fZP.mjs";import{t as o}from"./output-CpiIVa7Q.mjs";import{t as s}from"./dry-run-BBjUQUhR.mjs";import{t as c}from"./progress-B1dpmxCT.mjs";import{t as l}from"./run-0EozpORq.mjs";import"./telemetry-BczXOpQn.mjs";import{a as u,n as d,r as f,s as p,t as m}from"./body-parser-ChnyBsfm.mjs";import{n as h,t as g}from"./input-validation-D7z60HJH.mjs";import{a as _,n as v}from"./prompt-Y5OBwDVE.mjs";import{n as y,t as ee}from"./raw-fetch-DSdFjojI.mjs";var te={method:`POST`,path:t=>e`/accounts/${t.account_id}/stream/keys`};function ne(e){return e.usage(`$0 stream keys create
2
+ import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CSH3UMpD.mjs";import{i as n,n as r}from"./auth-BcNLQji1.mjs";import{a as i,t as a}from"./context-DVh8Wyfs.mjs";import{t as o}from"./output-BJEgbI0G.mjs";import{t as s}from"./dry-run-gy0Hl9xo.mjs";import{t as c}from"./progress-CtGsPOpV.mjs";import{t as l}from"./run-DnZGQbq_.mjs";import"./telemetry-CvZean4s.mjs";import{a as u,n as d,r as f,s as p,t as m}from"./body-parser-ChnyBsfm.mjs";import{n as h,t as g}from"./input-validation-D7z60HJH.mjs";import{a as _,n as v}from"./prompt-YrI7ltMa.mjs";import{n as y,t as ee}from"./raw-fetch-BE3QgdTE.mjs";var te={method:`POST`,path:t=>e`/accounts/${t.account_id}/stream/keys`};function ne(e){return e.usage(`$0 stream keys create
3
3
 
4
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 re={command:`create`,describe:`Create signing keys`,builder:ne,handler:async e=>l({command:`stream keys create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({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 n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Creating`,async()=>n.send(te,{account_id:l}));o(u,{successLabel:`Created`})})};var ie={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/stream/keys/${t.identifier}`};function ae(e){return e.usage(`$0 stream keys delete <identifier>
5
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 oe={command:`delete <identifier>`,describe:`Delete signing keys`,builder:ae,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();s({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 n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force,message:`Permanently delete signing key? All tokens created with this key will become unauthorized!`})){process.stderr.write(`Aborted.
7
- `);return}let u=await c(`Deleting`,async()=>n.send(ie,{account_id:l,identifier:e.identifier}));o(u,{successLabel:`Deleted`})})};var se={method:`GET`,path:t=>e`/accounts/${t.account_id}/stream/keys`};function ce(e){return e.usage(`$0 stream keys list
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 oe={command:`delete <identifier>`,describe:`Delete signing keys`,builder:ae,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();s({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 n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force,message:`Permanently delete signing key? All tokens created with this key will become unauthorized!`}))return;let u=await c(`Deleting`,async()=>n.send(ie,{account_id:l,identifier:e.identifier}));o(u,{successLabel:`Deleted`})})};var se={method:`GET`,path:t=>e`/accounts/${t.account_id}/stream/keys`};function ce(e){return e.usage(`$0 stream keys list
8
7
 
9
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 le={command:`list`,describe:`List signing keys`,builder:ce,handler:async e=>l({command:`stream keys list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({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 n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(se,{account_id:l}));o(u,{successLabel:`Loaded`})})},b={command:`keys`,describe:`Signing keys used to generate short-lived signed URLs for private video playback`,builder:e=>e.command(re).command(oe).command(le).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function x(e){return e.usage(`$0 stream live-inputs create
10
9
 
11
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.`}).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=>h(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 S={command:`create`,describe:`Create a live input`,builder:x,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();s({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?m({defaultCreator:h(e[`default-creator`],`default-creator`,`text`),deleteRecordingAfterDays:e[`delete-recording-after-days`],enabled:e.enabled,meta:f(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`]]):d(e.body)});return}let u=await r(e),g=e.local?t:await a();if(e.accountId=g,e.body){let t=d(e.body),r=await c(`Creating`,async()=>n(u,`POST`,`/accounts/${g}/stream/live_inputs`,{body:t,headers:Object.keys(l).length>0?l:void 0}));o(r,{successLabel:`Created`});return}let _={};e[`default-creator`]!==void 0&&p(_,[`defaultCreator`],h(e[`default-creator`],`default-creator`,`text`)),e[`delete-recording-after-days`]!==void 0&&p(_,[`deleteRecordingAfterDays`],e[`delete-recording-after-days`]),e.enabled!==void 0&&p(_,[`enabled`],e.enabled),e.meta!==void 0&&p(_,[`meta`],f(e.meta,`meta`)),e[`prefer-low-latency`]!==void 0&&p(_,[`preferLowLatency`],e[`prefer-low-latency`]),e[`recording-allowed-origins`]!==void 0&&p(_,[`recording`,`allowedOrigins`],e[`recording-allowed-origins`]),e[`recording-hide-live-viewer-count`]!==void 0&&p(_,[`recording`,`hideLiveViewerCount`],e[`recording-hide-live-viewer-count`]),e[`recording-mode`]!==void 0&&p(_,[`recording`,`mode`],e[`recording-mode`]),e[`recording-require-signed-urls`]!==void 0&&p(_,[`recording`,`requireSignedURLs`],e[`recording-require-signed-urls`]),e[`recording-timeout-seconds`]!==void 0&&p(_,[`recording`,`timeoutSeconds`],e[`recording-timeout-seconds`]);let v=await c(`Creating`,async()=>n(u,`POST`,`/accounts/${g}/stream/live_inputs`,{body:_,headers:Object.keys(l).length>0?l:void 0}));o(v,{successLabel:`Created`})})};var C={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/stream/live_inputs/${t.live_input_identifier}`};function w(e){return e.usage(`$0 stream live-inputs delete <live-input-identifier>
12
11
 
13
- 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 T={command:`delete <live-input-identifier>`,describe:`Delete a live input`,builder:w,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();s({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 n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force,message:`Permanently delete this live input? It cannot be recreated.`})){process.stderr.write(`Aborted.
14
- `);return}let u=await c(`Deleting`,async()=>n.send(C,{account_id:l,live_input_identifier:e[`live-input-identifier`]}));o(u,{successLabel:`Deleted`})})};var E={method:`POST`,path:t=>e`/accounts/${t.account_id}/stream/live_inputs/${t.live_input_identifier}/disable`};function D(e){return e.usage(`$0 stream live-inputs disable <live-input-identifier>
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 T={command:`delete <live-input-identifier>`,describe:`Delete a live input`,builder:w,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();s({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 n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force,message:`Permanently delete this live input? It cannot be recreated.`}))return;let u=await c(`Deleting`,async()=>n.send(C,{account_id:l,live_input_identifier:e[`live-input-identifier`]}));o(u,{successLabel:`Deleted`})})};var E={method:`POST`,path:t=>e`/accounts/${t.account_id}/stream/live_inputs/${t.live_input_identifier}/disable`};function D(e){return e.usage(`$0 stream live-inputs disable <live-input-identifier>
15
13
 
16
- 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 O={command:`disable <live-input-identifier>`,describe:`Disable a live input`,builder:D,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();s({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 n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force,message:`Disable this live input? Active broadcasts will be terminated and future connections will be blocked until it is re-enabled.`})){process.stderr.write(`Aborted.
17
- `);return}let u=await c(`Deleting`,async()=>n.send(E,{account_id:l,live_input_identifier:e[`live-input-identifier`]}));o(u,{successLabel:`Deleted`})})};var k={method:`POST`,path:t=>e`/accounts/${t.account_id}/stream/live_inputs/${t.live_input_identifier}/enable`};function A(e){return e.usage(`$0 stream live-inputs enable <live-input-identifier>
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 O={command:`disable <live-input-identifier>`,describe:`Disable a live input`,builder:D,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();s({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 n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({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(`Deleting`,async()=>n.send(E,{account_id:l,live_input_identifier:e[`live-input-identifier`]}));o(u,{successLabel:`Deleted`})})};var k={method:`POST`,path:t=>e`/accounts/${t.account_id}/stream/live_inputs/${t.live_input_identifier}/enable`};function A(e){return e.usage(`$0 stream live-inputs enable <live-input-identifier>
18
15
 
19
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 j={command:`enable <live-input-identifier>`,describe:`Enable a live input`,builder:A,handler:async e=>l({command:`stream live-inputs enable`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({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 n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Creating`,async()=>n.send(k,{account_id:l,live_input_identifier:e[`live-input-identifier`]}));o(u,{successLabel:`Created`})})};var M={method:`GET`,path:t=>e`/accounts/${t.account_id}/stream/live_inputs/${t.live_input_identifier}`};function N(e){return e.usage(`$0 stream live-inputs get <live-input-identifier>
20
17
 
@@ -24,15 +21,13 @@ Lists the live inputs created for an account. To get the credentials needed to s
24
21
 
25
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 B={command:`create <live-input-identifier>`,describe:`Create a new output, connected to a live input`,builder:z,handler:async e=>l({command:`stream live-inputs outputs create`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({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?m({enabled:e.enabled,streamKey:h(e[`stream-key`],`stream-key`,`text`),url:h(e.url,`url`,`text`)}):d(e.body),sensitiveBodyPaths:[[`streamKey`],[`url`]]});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Creating`,async()=>n.send(R,{body:t,account_id:l,live_input_identifier:e[`live-input-identifier`]}));o(r,{successLabel:`Created`});return}e[`stream-key`]===void 0&&(e[`stream-key`]=await _(`stream-key`,`The streamKey used to authenticate against an output's target.`,{kind:`secret`})),e.url===void 0&&(e.url=await _(`url`,`The URL an output uses to restream.`,{kind:`secret`}));let u=m({enabled:e.enabled,streamKey:h(e[`stream-key`],`stream-key`,`text`),url:h(e.url,`url`,`text`)}),f=await c(`Creating`,async()=>n.send(R,{body:u,account_id:l,live_input_identifier:e[`live-input-identifier`]}));o(f,{successLabel:`Created`})})};var V={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/stream/live_inputs/${t.live_input_identifier}/outputs/${t.output_identifier}`};function H(e){return e.usage(`$0 stream live-inputs outputs delete <output-identifier>
26
23
 
27
- 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 U={command:`delete <output-identifier>`,describe:`Delete an output`,builder:H,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();s({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 n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force,message:`Delete this output? Any active broadcast to this target will be terminated.`})){process.stderr.write(`Aborted.
28
- `);return}let u=await c(`Deleting`,async()=>n.send(V,{account_id:l,live_input_identifier:e[`live-input-identifier`],output_identifier:e[`output-identifier`]}));o(u,{successLabel:`Deleted`})})};var W={method:`GET`,path:t=>e`/accounts/${t.account_id}/stream/live_inputs/${t.live_input_identifier}/outputs`};function ue(e){return e.usage(`$0 stream live-inputs outputs list
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 U={command:`delete <output-identifier>`,describe:`Delete an output`,builder:H,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();s({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 n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force,message:`Delete this output? Any active broadcast to this target will be terminated.`}))return;let u=await c(`Deleting`,async()=>n.send(V,{account_id:l,live_input_identifier:e[`live-input-identifier`],output_identifier:e[`output-identifier`]}));o(u,{successLabel:`Deleted`})})};var W={method:`GET`,path:t=>e`/accounts/${t.account_id}/stream/live_inputs/${t.live_input_identifier}/outputs`};function ue(e){return e.usage(`$0 stream live-inputs outputs list
29
25
 
30
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 de={command:`list`,describe:`List all outputs associated with a specified live input`,builder:ue,handler:async e=>l({command:`stream live-inputs outputs list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({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 n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(W,{account_id:l,live_input_identifier:e[`live-input-identifier`]}));o(u,{successLabel:`Loaded`})})};var G={method:`PUT`,path:t=>e`/accounts/${t.account_id}/stream/live_inputs/${t.live_input_identifier}/outputs/${t.output_identifier}`,body:`json`};function fe(e){return e.usage(`$0 stream live-inputs outputs update <output-identifier>
31
27
 
32
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 pe={command:`update <output-identifier>`,describe:`Update an output`,builder:fe,handler:async e=>l({command:`stream live-inputs outputs update`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({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?m({enabled:e.enabled}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Updating`,async()=>n.send(G,{body:t,account_id:l,live_input_identifier:e[`live-input-identifier`],output_identifier:e[`output-identifier`]}));o(r,{successLabel:`Updated`});return}if(e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);let u=m({enabled:e.enabled}),f=await c(`Updating`,async()=>n.send(G,{body:u,account_id:l,live_input_identifier:e[`live-input-identifier`],output_identifier:e[`output-identifier`]}));o(f,{successLabel:`Updated`})})},me={command:`outputs`,describe:`Operations for live-inputs.outputs`,builder:e=>e.command(B).command(U).command(de).command(pe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var he={method:`POST`,path:t=>e`/accounts/${t.account_id}/stream/live_inputs/${t.live_input_identifier}/rotate_keys`};function ge(e){return e.usage(`$0 stream live-inputs rotate-keys <live-input-identifier>
33
29
 
34
- 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 _e={command:`rotate-keys <live-input-identifier>`,describe:`Rotate keys for a live input`,builder:ge,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();s({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 n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force,message:`Rotate keys for this live input? Active broadcasts will be terminated. New broadcasts cannot start with outdated credentials.`})){process.stderr.write(`Aborted.
35
- `);return}let u=await c(`Deleting`,async()=>n.send(he,{account_id:l,live_input_identifier:e[`live-input-identifier`]}));o(u,{successLabel:`Deleted`})})};var K={method:`PUT`,path:t=>e`/accounts/${t.account_id}/stream/live_inputs/${t.live_input_identifier}`,body:`json`};function ve(e){return e.usage(`$0 stream live-inputs update <live-input-identifier>
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 _e={command:`rotate-keys <live-input-identifier>`,describe:`Rotate keys for a live input`,builder:ge,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();s({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 n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({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(`Deleting`,async()=>n.send(he,{account_id:l,live_input_identifier:e[`live-input-identifier`]}));o(u,{successLabel:`Deleted`})})};var K={method:`PUT`,path:t=>e`/accounts/${t.account_id}/stream/live_inputs/${t.live_input_identifier}`,body:`json`};function ve(e){return e.usage(`$0 stream live-inputs update <live-input-identifier>
36
31
 
37
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.`}).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=>h(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 ye={command:`update <live-input-identifier>`,describe:`Update a live input`,builder:ve,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();s({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?m({defaultCreator:h(e[`default-creator`],`default-creator`,`text`),deleteRecordingAfterDays:e[`delete-recording-after-days`],enabled:e.enabled,meta:f(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`]]):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Updating`,async()=>n.send(K,{body:t,account_id:l,live_input_identifier:e[`live-input-identifier`]}));o(r,{successLabel:`Updated`});return}let u=m({defaultCreator:h(e[`default-creator`],`default-creator`,`text`),deleteRecordingAfterDays:e[`delete-recording-after-days`],enabled:e.enabled,meta:f(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`]]),p=await c(`Updating`,async()=>n.send(K,{body:u,account_id:l,live_input_identifier:e[`live-input-identifier`]}));o(p,{successLabel:`Updated`})})},be={command:`live-inputs`,describe:`Enable and disable live input streams`,builder:e=>e.command(S).command(T).command(O).command(j).command(P).command(L).command(_e).command(ye).command(me).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var xe={method:`GET`,path:t=>e`/accounts/${t.account_id}/stream/storage-usage`,query:[`creator`]};function Se(e){return e.usage(`$0 stream storage-usage
38
33
 
@@ -40,13 +35,11 @@ Returns information about an account's storage use.`).option(`creator`,{type:`st
40
35
 
41
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 Te={command:`copy <identifier>`,describe:`Add audio tracks to a video`,builder:we,handler:async e=>l({command:`stream videos audio-tracks copy`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({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?m({label:h(e.label,`label`,`text`),url:h(e.url,`url`,`text`)}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Creating`,async()=>n.send(q,{body:t,account_id:l,identifier:e.identifier}));o(r,{successLabel:`Created`});return}e.label===void 0&&(e.label=await _(`label`,`A string to uniquely identify the track amongst other audio track labels for the specified video.`));let u=m({label:h(e.label,`label`,`text`),url:h(e.url,`url`,`text`)}),f=await c(`Creating`,async()=>n.send(q,{body:u,account_id:l,identifier:e.identifier}));o(f,{successLabel:`Created`})})};var Ee={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/stream/${t.identifier}/audio/${t.audio_identifier}`};function De(e){return e.usage(`$0 stream videos audio-tracks delete <audio-identifier>
42
37
 
43
- 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 Oe={command:`delete <audio-identifier>`,describe:`Delete additional audio tracks on a video`,builder:De,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();s({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 n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force,message:`Permanently delete this audio track?`})){process.stderr.write(`Aborted.
44
- `);return}let u=await c(`Deleting`,async()=>n.send(Ee,{account_id:l,identifier:e.identifier,audio_identifier:e[`audio-identifier`]}));o(u,{successLabel:`Deleted`})})};var J={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/stream/${t.identifier}/audio/${t.audio_identifier}`,body:`json`};function ke(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 Ae={command:`edit <audio-identifier>`,describe:`Edit additional audio tracks on a video`,builder:ke,handler:async e=>l({command:`stream videos audio-tracks edit`,classification:{safeFlags:[`default`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({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?m({default:e.default,label:h(e.label,`label`,`text`)}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Updating`,async()=>n.send(J,{body:t,account_id:l,identifier:e.identifier,audio_identifier:e[`audio-identifier`]}));o(r,{successLabel:`Updated`});return}let u=m({default:e.default,label:h(e.label,`label`,`text`)}),f=await c(`Updating`,async()=>n.send(J,{body:u,account_id:l,identifier:e.identifier,audio_identifier:e[`audio-identifier`]}));o(f,{successLabel:`Updated`})})};var je={method:`GET`,path:t=>e`/accounts/${t.account_id}/stream/${t.identifier}/audio`};function Me(e){return e.usage(`$0 stream videos audio-tracks list
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 Oe={command:`delete <audio-identifier>`,describe:`Delete additional audio tracks on a video`,builder:De,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();s({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 n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force,message:`Permanently delete this audio track?`}))return;let u=await c(`Deleting`,async()=>n.send(Ee,{account_id:l,identifier:e.identifier,audio_identifier:e[`audio-identifier`]}));o(u,{successLabel:`Deleted`})})};var J={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/stream/${t.identifier}/audio/${t.audio_identifier}`,body:`json`};function ke(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 Ae={command:`edit <audio-identifier>`,describe:`Edit additional audio tracks on a video`,builder:ke,handler:async e=>l({command:`stream videos audio-tracks edit`,classification:{safeFlags:[`default`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({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?m({default:e.default,label:h(e.label,`label`,`text`)}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Updating`,async()=>n.send(J,{body:t,account_id:l,identifier:e.identifier,audio_identifier:e[`audio-identifier`]}));o(r,{successLabel:`Updated`});return}let u=m({default:e.default,label:h(e.label,`label`,`text`)}),f=await c(`Updating`,async()=>n.send(J,{body:u,account_id:l,identifier:e.identifier,audio_identifier:e[`audio-identifier`]}));o(f,{successLabel:`Updated`})})};var je={method:`GET`,path:t=>e`/accounts/${t.account_id}/stream/${t.identifier}/audio`};function Me(e){return e.usage(`$0 stream videos audio-tracks list
45
39
 
46
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 Ne={command:`list`,describe:`List additional audio tracks on a video`,builder:Me,handler:async e=>l({command:`stream videos audio-tracks list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({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 n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(je,{account_id:l,identifier:e.identifier}));o(u,{successLabel:`Loaded`})})},Pe={command:`audio-tracks`,describe:`Operations for videos.audio-tracks`,builder:e=>e.command(Te).command(Oe).command(Ae).command(Ne).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Fe={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/stream/${t.identifier}/captions/${t.language}`};function Ie(e){return e.usage(`$0 stream videos captions language delete <language>
47
41
 
48
- 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 Le={command:`delete <language>`,describe:`Delete captions or subtitles`,builder:Ie,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();s({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 n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force,message:`Remove this caption?`})){process.stderr.write(`Aborted.
49
- `);return}let u=await c(`Deleting`,async()=>n.send(Fe,{account_id:l,identifier:e.identifier,language:e.language}));o(u,{successLabel:`Deleted`})})};var Re={method:`POST`,path:t=>e`/accounts/${t.account_id}/stream/${t.identifier}/captions/${t.language}/generate`};function ze(e){return e.usage(`$0 stream videos captions language generate <language>
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 Le={command:`delete <language>`,describe:`Delete captions or subtitles`,builder:Ie,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();s({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 n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force,message:`Remove this caption?`}))return;let u=await c(`Deleting`,async()=>n.send(Fe,{account_id:l,identifier:e.identifier,language:e.language}));o(u,{successLabel:`Deleted`})})};var Re={method:`POST`,path:t=>e`/accounts/${t.account_id}/stream/${t.identifier}/captions/${t.language}/generate`};function ze(e){return e.usage(`$0 stream videos captions language generate <language>
50
43
 
51
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 Be={command:`generate <language>`,describe:`Generate captions or subtitles for a provided language via AI`,builder:ze,handler:async e=>l({command:`stream videos captions language generate`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({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 n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Creating`,async()=>n.send(Re,{account_id:l,identifier:e.identifier,language:e.language}));o(u,{successLabel:`Created`})})};var Ve={method:`GET`,path:t=>e`/accounts/${t.account_id}/stream/${t.identifier}/captions/${t.language}`};function He(e){return e.usage(`$0 stream videos captions language get <language>
52
45
 
@@ -65,15 +58,13 @@ Uploads a video to Stream from a provided URL.`).option(`upload-creator`,{type:`
65
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.
66
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 at={command:`create`,describe:`Initiate video uploads using TUS`,builder:it,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();s({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 r(e),f=e.local?t:await a();e.accountId=f;let p=await c(`Creating`,async()=>n(d,`POST`,`/accounts/${f}/stream`,{query:l,headers:Object.keys(u).length>0?u:void 0}));o(p,{successLabel:`Created`})})};var ot={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/stream/${t.identifier}`,response:!1};function st(e){return e.usage(`$0 stream videos delete <identifier>
67
60
 
68
- 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 ct={command:`delete <identifier>`,describe:`Delete video`,builder:st,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();s({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 n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force,message:`Permanently delete this video?`})){process.stderr.write(`Aborted.
69
- `);return}let u=await c(`Deleting`,async()=>n.send(ot,{account_id:l,identifier:e.identifier}));o(u,{successLabel:`Deleted`})})};function lt(e){return e.usage(`$0 stream videos direct-upload create
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 ct={command:`delete <identifier>`,describe:`Delete video`,builder:st,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();s({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 n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force,message:`Permanently delete this video?`}))return;let u=await c(`Deleting`,async()=>n.send(ot,{account_id:l,identifier:e.identifier}));o(u,{successLabel:`Deleted`})})};function lt(e){return e.usage(`$0 stream videos direct-upload create
70
62
 
71
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.`}).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 ut={command:`create`,describe:`Upload videos via direct upload URLs`,builder:lt,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();s({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?m({allowedOrigins:e[`allowed-origins`],creator:h(e.creator,`creator`,`text`),expiry:h(e.expiry,`expiry`,`text`),maxDurationSeconds:e[`max-duration-seconds`],meta:f(e.meta,`meta`),requireSignedURLs:e[`require-signed-urls`],scheduledDeletion:h(e[`scheduled-deletion`],`scheduled-deletion`,`text`),thumbnailTimestampPct:e[`thumbnail-timestamp-pct`],watermark:{uid:h(e[`watermark-uid`],`watermark-uid`,`text`)}},[[`meta`]]):d(e.body)});return}let u=await r(e),g=e.local?t:await a();if(e.accountId=g,e.body){let t=d(e.body),r=await c(`Creating`,async()=>n(u,`POST`,`/accounts/${g}/stream/direct_upload`,{body:t,headers:Object.keys(l).length>0?l:void 0}));o(r,{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 _={};e[`allowed-origins`]!==void 0&&p(_,[`allowedOrigins`],e[`allowed-origins`]),e.creator!==void 0&&p(_,[`creator`],h(e.creator,`creator`,`text`)),e.expiry!==void 0&&p(_,[`expiry`],h(e.expiry,`expiry`,`text`)),e[`max-duration-seconds`]!==void 0&&p(_,[`maxDurationSeconds`],e[`max-duration-seconds`]),e.meta!==void 0&&p(_,[`meta`],f(e.meta,`meta`)),e[`require-signed-urls`]!==void 0&&p(_,[`requireSignedURLs`],e[`require-signed-urls`]),e[`scheduled-deletion`]!==void 0&&p(_,[`scheduledDeletion`],h(e[`scheduled-deletion`],`scheduled-deletion`,`text`)),e[`thumbnail-timestamp-pct`]!==void 0&&p(_,[`thumbnailTimestampPct`],e[`thumbnail-timestamp-pct`]),e[`watermark-uid`]!==void 0&&p(_,[`watermark`,`uid`],h(e[`watermark-uid`],`watermark-uid`,`text`));let v=await c(`Creating`,async()=>n(u,`POST`,`/accounts/${g}/stream/direct_upload`,{body:_,headers:Object.keys(l).length>0?l:void 0}));o(v,{successLabel:`Created`})})},dt={command:`direct-upload`,describe:`Operations for videos.direct-upload`,builder:e=>e.command(ut).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ft={method:`POST`,path:t=>e`/accounts/${t.account_id}/stream/${t.identifier}/downloads/${t.download_type}`};function pt(e){return e.usage(`$0 stream videos downloads create <download-type>
72
64
 
73
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 mt={command:`create <download-type>`,describe:`Create download`,builder:pt,handler:async e=>l({command:`stream videos downloads create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({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 n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Creating`,async()=>n.send(ft,{account_id:l,identifier:e.identifier,download_type:e[`download-type`]}));o(u,{successLabel:`Created`})})};var ht={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/stream/${t.identifier}/downloads/${t.download_type}`};function gt(e){return e.usage(`$0 stream videos downloads delete <download-type>
74
66
 
75
- 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 _t={command:`delete <download-type>`,describe:`Delete download`,builder:gt,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();s({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 n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force,message:`Remove this download? It will need to be regenerated for future use.`})){process.stderr.write(`Aborted.
76
- `);return}let u=await c(`Deleting`,async()=>n.send(ht,{account_id:l,identifier:e.identifier,download_type:e[`download-type`]}));o(u,{successLabel:`Deleted`})})},vt={command:`downloads`,describe:`Operations for videos.downloads`,builder:e=>e.command(mt).command(_t).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var X={method:`POST`,path:t=>e`/accounts/${t.account_id}/stream/${t.identifier}`,body:`json`};function yt(e){return e.usage(`$0 stream videos edit <identifier>
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 _t={command:`delete <download-type>`,describe:`Delete download`,builder:gt,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();s({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 n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force,message:`Remove this download? It will need to be regenerated for future use.`}))return;let u=await c(`Deleting`,async()=>n.send(ht,{account_id:l,identifier:e.identifier,download_type:e[`download-type`]}));o(u,{successLabel:`Deleted`})})},vt={command:`downloads`,describe:`Operations for videos.downloads`,builder:e=>e.command(mt).command(_t).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var X={method:`POST`,path:t=>e`/accounts/${t.account_id}/stream/${t.identifier}`,body:`json`};function yt(e){return e.usage(`$0 stream videos edit <identifier>
77
68
 
78
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.`}).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 bt={command:`edit <identifier>`,describe:`Edit video details`,builder:yt,handler:async e=>l({command:`stream videos edit`,classification:{safeFlags:[`require-signed-urls`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({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?m({allowedOrigins:e[`allowed-origins`],creator:h(e.creator,`creator`,`text`),maxDurationSeconds:e[`max-duration-seconds`],meta:f(e.meta,`meta`),publicDetails:{channel_link:h(e[`public-details-channel-link`],`public-details-channel-link`,`text`),logo:h(e[`public-details-logo`],`public-details-logo`,`text`),share_link:h(e[`public-details-share-link`],`public-details-share-link`,`text`),title:h(e[`public-details-title`],`public-details-title`,`text`)},requireSignedURLs:e[`require-signed-urls`],scheduledDeletion:h(e[`scheduled-deletion`],`scheduled-deletion`,`text`),thumbnailTimestampPct:e[`thumbnail-timestamp-pct`],uid:h(e.uid,`uid`,`text`),uploadExpiry:h(e[`upload-expiry`],`upload-expiry`,`text`)},[[`meta`]]):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Creating`,async()=>n.send(X,{body:t,account_id:l,identifier:e.identifier}));o(r,{successLabel:`Created`});return}let u=m({allowedOrigins:e[`allowed-origins`],creator:h(e.creator,`creator`,`text`),maxDurationSeconds:e[`max-duration-seconds`],meta:f(e.meta,`meta`),publicDetails:{channel_link:h(e[`public-details-channel-link`],`public-details-channel-link`,`text`),logo:h(e[`public-details-logo`],`public-details-logo`,`text`),share_link:h(e[`public-details-share-link`],`public-details-share-link`,`text`),title:h(e[`public-details-title`],`public-details-title`,`text`)},requireSignedURLs:e[`require-signed-urls`],scheduledDeletion:h(e[`scheduled-deletion`],`scheduled-deletion`,`text`),thumbnailTimestampPct:e[`thumbnail-timestamp-pct`],uid:h(e.uid,`uid`,`text`),uploadExpiry:h(e[`upload-expiry`],`upload-expiry`,`text`)},[[`meta`]]),p=await c(`Creating`,async()=>n.send(X,{body:u,account_id:l,identifier:e.identifier}));o(p,{successLabel:`Created`})})};var xt={method:`GET`,path:t=>e`/accounts/${t.account_id}/stream/${t.identifier}`};function St(e){return e.usage(`$0 stream videos get <identifier>
79
70
 
@@ -81,22 +72,18 @@ Fetches details for a single video.`).positional(`identifier`,{type:`string`,des
81
72
 
82
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 Et={command:`list`,describe:`List videos`,builder:Tt,handler:async e=>l({command:`stream videos list`,classification:{safeFlags:[`status`,`asc`,`include-counts`,`dry-run`]}},e,async()=>{let n={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();s({command:`cf stream videos list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/stream`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(wt,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var Z={method:`POST`,path:t=>e`/accounts/${t.account_id}/stream/${t.identifier}/token`,body:`json`};function Dt(e){return e.usage(`$0 stream videos token create <identifier>
83
74
 
84
- 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.`}).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 Ot={command:`create <identifier>`,describe:`Create signed URL tokens for videos`,builder:Dt,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();s({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?m({accessRules:u(e[`access-rules`],`access-rules`),downloadable:e.downloadable,exp:e.exp,flags:{original:e[`flags-original`]},id:h(e.id,`id`,`text`),nbf:e.nbf,pem:h(e.pem,`pem`,`text`)}):d(e.body),sensitiveBodyPaths:[[`pem`]]});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force,message:`Provision temporary token? For use at scale, consider creating a signing key instead.`})){process.stderr.write(`Aborted.
85
- `);return}if(e.body){let t=d(e.body),r=await c(`Deleting`,async()=>n.send(Z,{body:t,account_id:l,identifier:e.identifier}));o(r,{successLabel:`Deleted`});return}let f=m({accessRules:u(e[`access-rules`],`access-rules`),downloadable:e.downloadable,exp:e.exp,flags:{original:e[`flags-original`]},id:h(e.id,`id`,`text`),nbf:e.nbf,pem:h(e.pem,`pem`,`text`)}),p=await c(`Deleting`,async()=>n.send(Z,{body:f,account_id:l,identifier:e.identifier}));o(p,{successLabel:`Deleted`})})},kt={command:`token`,describe:`Operations for videos.token`,builder:e=>e.command(Ot).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},At={command:`videos`,describe:`Aggregate video storage usage statistics for the account`,builder:e=>e.command(tt).command(rt).command(at).command(ct).command(bt).command(Ct).command(Et).command(Pe).command($e).command(dt).command(vt).command(kt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function jt(e){return e.usage(`$0 stream watermarks create
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.`}).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 Ot={command:`create <identifier>`,describe:`Create signed URL tokens for videos`,builder:Dt,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();s({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?m({accessRules:u(e[`access-rules`],`access-rules`),downloadable:e.downloadable,exp:e.exp,flags:{original:e[`flags-original`]},id:h(e.id,`id`,`text`),nbf:e.nbf,pem:h(e.pem,`pem`,`text`)}):d(e.body),sensitiveBodyPaths:[[`pem`]]});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force,message:`Provision temporary token? For use at scale, consider creating a signing key instead.`}))return;if(e.body){let t=d(e.body),r=await c(`Deleting`,async()=>n.send(Z,{body:t,account_id:l,identifier:e.identifier}));o(r,{successLabel:`Deleted`});return}let f=m({accessRules:u(e[`access-rules`],`access-rules`),downloadable:e.downloadable,exp:e.exp,flags:{original:e[`flags-original`]},id:h(e.id,`id`,`text`),nbf:e.nbf,pem:h(e.pem,`pem`,`text`)}),p=await c(`Deleting`,async()=>n.send(Z,{body:f,account_id:l,identifier:e.identifier}));o(p,{successLabel:`Deleted`})})},kt={command:`token`,describe:`Operations for videos.token`,builder:e=>e.command(Ot).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},At={command:`videos`,describe:`Aggregate video storage usage statistics for the account`,builder:e=>e.command(tt).command(rt).command(at).command(ct).command(bt).command(Ct).command(Et).command(Pe).command($e).command(dt).command(vt).command(kt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function jt(e){return e.usage(`$0 stream watermarks create
86
76
 
87
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 Mt={command:`create`,describe:`Create watermark profiles via basic upload`,builder:jt,handler:async e=>l({command:`stream watermarks create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({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 r(e),u=e.local?t: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 t=new FormData;if(e.file){let n=g(e.file);t.append(`file`,new Blob([n]),e.file.split(/[\\/]/).filter(Boolean).pop())}else e.body!==void 0&&t.append(`file`,e.body);e.name!==void 0&&t.append(`name`,String(h(e.name,`name`,`text`)??``)),e.opacity!==void 0&&t.append(`opacity`,String(e.opacity)),e.padding!==void 0&&t.append(`padding`,String(e.padding)),e.position!==void 0&&t.append(`position`,String(h(e.position,`position`,`text`)??``)),e.scale!==void 0&&t.append(`scale`,String(e.scale));let r=await c(`Creating`,async()=>n(l,`POST`,`/accounts/${u}/stream/watermarks`,{body:t}));o(r,{successLabel:`Created`});return}if(e.body){let t=d(e.body),r=await c(`Creating`,async()=>n(l,`POST`,`/accounts/${u}/stream/watermarks`,{body:t}));o(r,{successLabel:`Created`});return}let f={};e.name!==void 0&&p(f,[`name`],h(e.name,`name`,`text`)),e.opacity!==void 0&&p(f,[`opacity`],e.opacity),e.padding!==void 0&&p(f,[`padding`],e.padding),e.position!==void 0&&p(f,[`position`],h(e.position,`position`,`text`)),e.scale!==void 0&&p(f,[`scale`],e.scale),e.url!==void 0&&p(f,[`url`],h(e.url,`url`,`text`));let m=await c(`Creating`,async()=>n(l,`POST`,`/accounts/${u}/stream/watermarks`,{body:f}));o(m,{successLabel:`Created`})})};var Nt={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/stream/watermarks/${t.identifier}`};function Pt(e){return e.usage(`$0 stream watermarks delete <identifier>
88
78
 
89
- 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 Ft={command:`delete <identifier>`,describe:`Delete watermark profiles`,builder:Pt,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();s({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 n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force,message:`Remove this watermark profile? New upload requests referencing this profile will fail.`})){process.stderr.write(`Aborted.
90
- `);return}let u=await c(`Deleting`,async()=>n.send(Nt,{account_id:l,identifier:e.identifier}));o(u,{successLabel:`Deleted`})})};var It={method:`GET`,path:t=>e`/accounts/${t.account_id}/stream/watermarks/${t.identifier}`};function Lt(e){return e.usage(`$0 stream watermarks get <identifier>
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 Ft={command:`delete <identifier>`,describe:`Delete watermark profiles`,builder:Pt,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();s({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 n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force,message:`Remove this watermark profile? New upload requests referencing this profile will fail.`}))return;let u=await c(`Deleting`,async()=>n.send(Nt,{account_id:l,identifier:e.identifier}));o(u,{successLabel:`Deleted`})})};var It={method:`GET`,path:t=>e`/accounts/${t.account_id}/stream/watermarks/${t.identifier}`};function Lt(e){return e.usage(`$0 stream watermarks get <identifier>
91
80
 
92
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 Rt={command:`get <identifier>`,describe:`Watermark profile details`,builder:Lt,handler:async e=>l({command:`stream watermarks get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({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 n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(It,{account_id:l,identifier:e.identifier}));o(u,{successLabel:`Loaded`})})};var zt={method:`GET`,path:t=>e`/accounts/${t.account_id}/stream/watermarks`};function Bt(e){return e.usage(`$0 stream watermarks list
93
82
 
94
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 Vt={command:`list`,describe:`List watermark profiles`,builder:Bt,handler:async e=>l({command:`stream watermarks list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({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 n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(zt,{account_id:l}));o(u,{successLabel:`Loaded`})})},Q={command:`watermarks`,describe:`Watermark profiles that overlay an image on every video in the account`,builder:e=>e.command(Mt).command(Ft).command(Rt).command(Vt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ht={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/stream/webhook`};function Ut(e){return e.usage(`$0 stream webhooks delete
95
84
 
96
- 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 Wt={command:`delete`,describe:`Delete webhooks`,builder:Ut,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();s({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 n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force,message:`Delete this webhook? If recreated, the secret will change.`})){process.stderr.write(`Aborted.
97
- `);return}let u=await c(`Deleting`,async()=>n.send(Ht,{account_id:l}));o(u,{successLabel:`Deleted`})})};var Gt={method:`GET`,path:t=>e`/accounts/${t.account_id}/stream/webhook`};function Kt(e){return e.usage(`$0 stream webhooks get
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 Wt={command:`delete`,describe:`Delete webhooks`,builder:Ut,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();s({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 n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force,message:`Delete this webhook? If recreated, the secret will change.`}))return;let u=await c(`Deleting`,async()=>n.send(Ht,{account_id:l}));o(u,{successLabel:`Deleted`})})};var Gt={method:`GET`,path:t=>e`/accounts/${t.account_id}/stream/webhook`};function Kt(e){return e.usage(`$0 stream webhooks get
98
86
 
99
87
  Retrieve current on-demand webhook information.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const qt={command:`get`,describe:`View webhook`,builder:Kt,handler:async e=>l({command:`stream webhooks get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({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 n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Gt,{account_id:l}));o(u,{successLabel:`Loaded`})})};var $={method:`PUT`,path:t=>e`/accounts/${t.account_id}/stream/webhook`,body:`json`};function Jt(e){return e.usage(`$0 stream webhooks update
100
88
 
101
- Create a webhook for notifications about on-demand video uploads.`).option(`notification-url`,{type:`string`,description:`The URL where webhooks will be sent.`}).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();s({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?m({notification_url:h(e[`notification-url`],`notification-url`,`text`)}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force,message:`Create a webhook for on-demand operations? Will replace previously configured webhook. Live input webhooks are handled via Notifications Service.`})){process.stderr.write(`Aborted.
102
- `);return}if(e.body){let t=d(e.body),r=await c(`Deleting`,async()=>n.send($,{body:t,account_id:l}));o(r,{successLabel:`Deleted`});return}let u=m({notification_url:h(e[`notification-url`],`notification-url`,`text`)}),f=await c(`Deleting`,async()=>n.send($,{body:u,account_id:l}));o(f,{successLabel:`Deleted`})})},Xt={command:`webhooks`,describe:`Webhook notifications for video lifecycle events (ready, error, etc.)`,builder:e=>e.command(Wt).command(qt).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(Ce).command(b).command(be).command(At).command(Q).command(Xt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Zt as default};
89
+ Create a webhook for notifications about on-demand video uploads.`).option(`notification-url`,{type:`string`,description:`The URL where webhooks will be sent.`}).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();s({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?m({notification_url:h(e[`notification-url`],`notification-url`,`text`)}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force,message:`Create a webhook for on-demand operations? Will replace previously configured webhook. Live input webhooks are handled via Notifications Service.`}))return;if(e.body){let t=d(e.body),r=await c(`Deleting`,async()=>n.send($,{body:t,account_id:l}));o(r,{successLabel:`Deleted`});return}let u=m({notification_url:h(e[`notification-url`],`notification-url`,`text`)}),f=await c(`Deleting`,async()=>n.send($,{body:u,account_id:l}));o(f,{successLabel:`Deleted`})})},Xt={command:`webhooks`,describe:`Webhook notifications for video lifecycle events (ready, error, etc.)`,builder:e=>e.command(Wt).command(qt).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(Ce).command(b).command(be).command(At).command(Q).command(Xt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Zt as default};
@@ -0,0 +1,22 @@
1
+ #!/usr/bin/env node
2
+ import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CSH3UMpD.mjs";import{i as n,n as r}from"./auth-BcNLQji1.mjs";import{a as i,i as a,t as o}from"./context-DVh8Wyfs.mjs";import{t as s}from"./output-BJEgbI0G.mjs";import{t as c}from"./dry-run-gy0Hl9xo.mjs";import{t as l}from"./progress-CtGsPOpV.mjs";import{t as u}from"./run-DnZGQbq_.mjs";import"./telemetry-CvZean4s.mjs";import{n as d,s as f,t as p}from"./body-parser-ChnyBsfm.mjs";import{n as m}from"./input-validation-D7z60HJH.mjs";import{a as h,i as g,n as _}from"./prompt-YrI7ltMa.mjs";function v(e){return e.usage(`$0 tags account-resources delete
3
+
4
+ Removes all tags from a specific account or zone-level resource.`).option(`if-match`,{type:`string`,description:`ETag value for optimistic concurrency control. When provided, the server will
5
+ verify the current resource ETag matches before applying the write. Returns
6
+ 412 Precondition Failed if the resource has been modified since the ETag was
7
+ 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=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,!await _({force:!!e.force}))return;if(e.body){let t=d(e.body),r=await l(`Deleting`,async()=>n(v,`DELETE`,`/${y}/${b}/tags`,{body:t,headers:Object.keys(u).length>0?u:void 0}));s(r,{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 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(`Deleting`,async()=>n(v,`DELETE`,`/${y}/${b}/tags`,{body:x,headers:Object.keys(u).length>0?u:void 0}));s(S,{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
8
+
9
+ Retrieves tags for a specific account or zone-level resource.`).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
10
+
11
+ Creates or updates tags for a specific account or zone-level resource. Replaces all existing tags for the resource.`).option(`if-match`,{type:`string`,description:`ETag value for optimistic concurrency control. When provided, the server will
12
+ verify the current resource ETag matches before applying the write. Returns
13
+ 412 Precondition Failed if the resource has been modified since the ETag was
14
+ 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 _=await r(e),v=e.zone===void 0?`accounts`:`zones`,y=v===`zones`?await a({zone:e.zone},_,{quiet:e.quiet}):e.local?t:await o();if(v===`zones`?e.zoneId=y:e.accountId=y,e.body){let t=d(e.body),r=await l(`Updating`,async()=>n(_,`PUT`,`/${v}/${y}/tags`,{body:t,headers:Object.keys(u).length>0?u:void 0}));s(r,{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(`.`))),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 b={};e[`resource-id`]!==void 0&&f(b,[`resource_id`],m(e[`resource-id`],`resource-id`,`text`)),e[`resource-type`]!==void 0&&f(b,[`resource_type`],e[`resource-type`]),e[`worker-id`]!==void 0&&f(b,[`worker_id`],m(e[`worker-id`],`worker-id`,`text`));let x=await l(`Updating`,async()=>n(_,`PUT`,`/${v}/${y}/tags`,{body:b,headers:Object.keys(u).length>0?u:void 0}));s(x,{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
15
+
16
+ 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
17
+
18
+ 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`,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`,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`,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
19
+
20
+ 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
21
+
22
+ 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};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import"./run-DnZGQbq_.mjs";const e=`unknown command`;export{e as t};
@@ -0,0 +1,2 @@
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-DnZGQbq_.mjs";import{r as g}from"./sanitization-DkVWMHkc.mjs";import{t as _}from"./telemetry-CvZean4s.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,9 +1,8 @@
1
1
  #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-BUQscD5b.mjs";import{t as n}from"./output-CpiIVa7Q.mjs";import{t as r}from"./dry-run-BBjUQUhR.mjs";import{t as i}from"./progress-B1dpmxCT.mjs";import{t as a}from"./run-0EozpORq.mjs";import"./telemetry-BczXOpQn.mjs";import{n as o,t as s}from"./body-parser-ChnyBsfm.mjs";import{n as c}from"./input-validation-D7z60HJH.mjs";import{a as l,n as u}from"./prompt-Y5OBwDVE.mjs";var d={method:`POST`,path:t=>e`/tenants/${t.tenant_tag}/custom_ns`,body:`json`};function f(e){return e.usage(`$0 tenant-custom-nameservers create <tenant-tag>
2
+ import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-BcNLQji1.mjs";import{t as n}from"./output-BJEgbI0G.mjs";import{t as r}from"./dry-run-gy0Hl9xo.mjs";import{t as i}from"./progress-CtGsPOpV.mjs";import{t as a}from"./run-DnZGQbq_.mjs";import"./telemetry-CvZean4s.mjs";import{n as o,t as s}from"./body-parser-ChnyBsfm.mjs";import{n as c}from"./input-validation-D7z60HJH.mjs";import{a as l,n as u}from"./prompt-YrI7ltMa.mjs";var d={method:`POST`,path:t=>e`/tenants/${t.tenant_tag}/custom_ns`,body:`json`};function f(e){return e.usage(`$0 tenant-custom-nameservers create <tenant-tag>
3
3
 
4
4
  Adds a custom nameserver for a tenant.`).positional(`tenant-tag`,{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-tag>`,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-tag`]==null?`<tenant-tag>`:encodeURIComponent(String(e[`tenant-tag`]))}/custom_ns`,pathParams:{"tenant-tag":String(e[`tenant-tag`]??``)},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=await t(e);if(e.body){let t=o(e.body),r=await i(`Creating`,async()=>a.send(d,{body:t,tenant_tag:e[`tenant-tag`]}));n(r,{successLabel:`Created`});return}e[`ns-name`]===void 0&&(e[`ns-name`]=await l(`ns-name`,`The FQDN of the name server.`));let u=s({ns_name:c(e[`ns-name`],`ns-name`,`text`),ns_set:e[`ns-set`]}),f=await i(`Creating`,async()=>a.send(d,{body:u,tenant_tag:e[`tenant-tag`]}));n(f,{successLabel:`Created`})})};var m={method:`DELETE`,path:t=>e`/tenants/${t.tenant_tag}/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-tag`,{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-tag`]==null?`<tenant-tag>`:encodeURIComponent(String(e[`tenant-tag`]))}/custom_ns/${e[`custom-ns-id`]==null?`<custom-ns-id>`:encodeURIComponent(String(e[`custom-ns-id`]))}`,pathParams:{"tenant-tag":String(e[`tenant-tag`]??``),"custom-ns-id":String(e[`custom-ns-id`]??``)},bodyKind:`none`});return}let a=await t(e);if(!await u({force:!!e.force})){process.stderr.write(`Aborted.
7
- `);return}let o=await i(`Deleting`,async()=>a.send(m,{tenant_tag:e[`tenant-tag`],custom_ns_id:e[`custom-ns-id`]}));n(o,{successLabel:`Deleted`})})};var _={method:`GET`,path:t=>e`/tenants/${t.tenant_tag}/custom_ns`};function v(e){return e.usage(`$0 tenant-custom-nameservers get <tenant-tag>
6
+ Deletes a tenant's custom nameserver.`).positional(`custom-ns-id`,{type:`string`,description:`The FQDN of the name server.`,demandOption:!0}).option(`tenant-tag`,{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-tag`]==null?`<tenant-tag>`:encodeURIComponent(String(e[`tenant-tag`]))}/custom_ns/${e[`custom-ns-id`]==null?`<custom-ns-id>`:encodeURIComponent(String(e[`custom-ns-id`]))}`,pathParams:{"tenant-tag":String(e[`tenant-tag`]??``),"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_tag:e[`tenant-tag`],custom_ns_id:e[`custom-ns-id`]}));n(o,{successLabel:`Deleted`})})};var _={method:`GET`,path:t=>e`/tenants/${t.tenant_tag}/custom_ns`};function v(e){return e.usage(`$0 tenant-custom-nameservers get <tenant-tag>
8
7
 
9
8
  Lists a tenant's custom nameservers.`).positional(`tenant-tag`,{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-tag>`,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-tag`]==null?`<tenant-tag>`:encodeURIComponent(String(e[`tenant-tag`]))}/custom_ns`,pathParams:{"tenant-tag":String(e[`tenant-tag`]??``)},bodyKind:`none`});return}let a=await t(e),o=await i(`Loading`,async()=>a.send(_,{tenant_tag:e[`tenant-tag`]}));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};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-BUQscD5b.mjs";import{t as n}from"./output-CpiIVa7Q.mjs";import{t as r}from"./dry-run-BBjUQUhR.mjs";import{t as i}from"./progress-B1dpmxCT.mjs";import{t as a}from"./run-0EozpORq.mjs";import"./telemetry-BczXOpQn.mjs";var o={method:`GET`,path:t=>e`/tenants/${t.tenant_id}/account_types`};function s(e){return e.usage(`$0 tenant account-type list
2
+ import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-BcNLQji1.mjs";import{t as n}from"./output-BJEgbI0G.mjs";import{t as r}from"./dry-run-gy0Hl9xo.mjs";import{t as i}from"./progress-CtGsPOpV.mjs";import{t as a}from"./run-DnZGQbq_.mjs";import"./telemetry-CvZean4s.mjs";var o={method:`GET`,path:t=>e`/tenants/${t.tenant_id}/account_types`};function s(e){return e.usage(`$0 tenant account-type list
3
3
 
4
4
  Lists the account types this tenant is allowed to provision.`).option(`tenant-id`,{type:`string`,description:`The ID of the tenant whose available account types to list.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const c={command:`list`,describe:`List tenant account types`,builder:s,handler:async e=>a({command:`tenant account-type list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf tenant account-type list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/tenants/${e[`tenant-id`]==null?`<tenant-id>`:encodeURIComponent(String(e[`tenant-id`]))}/account_types`,pathParams:{"tenant-id":String(e[`tenant-id`]??``)},bodyKind:`none`});return}let a=await t(e),s=await i(`Loading`,async()=>a.send(o,{tenant_id:e[`tenant-id`]}));n(s,{successLabel:`Loaded`})})},l={command:`account-type`,describe:`Operations for account-type`,builder:e=>e.command(c).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var u={method:`GET`,path:t=>e`/tenants/${t.tenant_id}/accounts`};function d(e){return e.usage(`$0 tenant account list
5
5
 
@@ -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-CpiIVa7Q.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-BJEgbI0G.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};
@@ -1,13 +1,12 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./lazy-command-D0I6itZs.mjs";import"./api-eMuS5GI1.mjs";import{t}from"./path-DRw6Y-nd.mjs";import{t as n}from"./hand-written-dry-run-B82fRl2N.mjs";import{t as r}from"./local-B7ZJ78al.mjs";import{n as i}from"./auth-BUQscD5b.mjs";import{a,t as o}from"./context-Sgba0fZP.mjs";import{t as s}from"./output-CpiIVa7Q.mjs";import{t as c}from"./dry-run-BBjUQUhR.mjs";import{t as l}from"./progress-B1dpmxCT.mjs";import{t as u}from"./run-0EozpORq.mjs";import"./telemetry-BczXOpQn.mjs";import{a as d,n as f,t as p}from"./body-parser-ChnyBsfm.mjs";import{n as m}from"./input-validation-D7z60HJH.mjs";import{a as h,n as g}from"./prompt-Y5OBwDVE.mjs";import{t as _}from"./create-OXylMu6m.mjs";import{t as v}from"./get-iPUHxD1r.mjs";var y={method:`GET`,path:e=>t`/accounts/${e.account_id}/cfd_tunnel/${e.tunnel_id}/configurations`};function b(e){return e.usage(`$0 tunnels config get <tunnel-id>
2
+ import{t as e}from"./lazy-command-BMhD5ffF.mjs";import"./api-eMuS5GI1.mjs";import{t}from"./path-DRw6Y-nd.mjs";import{t as n}from"./hand-written-dry-run-B82fRl2N.mjs";import{t as r}from"./local-CSH3UMpD.mjs";import{n as i}from"./auth-BcNLQji1.mjs";import{a,t as o}from"./context-DVh8Wyfs.mjs";import{t as s}from"./output-BJEgbI0G.mjs";import{t as c}from"./dry-run-gy0Hl9xo.mjs";import{t as l}from"./progress-CtGsPOpV.mjs";import{t as u}from"./run-DnZGQbq_.mjs";import"./telemetry-CvZean4s.mjs";import{a as d,n as f,t as p}from"./body-parser-ChnyBsfm.mjs";import{n as m}from"./input-validation-D7z60HJH.mjs";import{a as h,n as g}from"./prompt-YrI7ltMa.mjs";import{t as _}from"./create-OXylMu6m.mjs";import{t as v}from"./get-iPUHxD1r.mjs";var y={method:`GET`,path:e=>t`/accounts/${e.account_id}/cfd_tunnel/${e.tunnel_id}/configurations`};function b(e){return e.usage(`$0 tunnels config get <tunnel-id>
3
3
 
4
4
  Retrieves the configuration for a remotely managed Cloudflare Tunnel.`).positional(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ee={command:`get <tunnel-id>`,describe:`Get Tunnel configuration`,builder:b,handler:async e=>u({command:`tunnels config get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();c({command:`cf tunnels config get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cfd_tunnel/${e[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(e[`tunnel-id`]))}/configurations`,pathParams:{"tunnel-id":String(e[`tunnel-id`]??``)},bodyKind:`none`});return}let t=await i(e),n=e.local?r:await o();e.accountId=n;let u=await l(`Loading`,async()=>t.send(y,{account_id:n,tunnel_id:e[`tunnel-id`]}));s(u,{successLabel:`Loaded`})})};var x={method:`PUT`,path:e=>t`/accounts/${e.account_id}/cfd_tunnel/${e.tunnel_id}/configurations`,body:`json`};function S(e){return e.usage(`$0 tunnels config update <tunnel-id>
5
5
 
6
6
  Replaces the configuration for a remotely managed Cloudflare Tunnel, including its ingress rules and origin request settings.`).positional(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`tunnel-config-ingress`,{type:`string`,description:`List of public hostname definitions. At least one ingress rule needs to be defined for the tunnel. Provide as a JSON array of objects or @path/to/file.json.`}).option(`tunnel-config-origin-request-access-aud-tag`,{type:`string`,array:!0,description:`Access applications that are allowed to reach this hostname for this Tunnel. Audience tags can be identified in the dashboard or via the List Access policies API.`}).option(`tunnel-config-origin-request-access-required`,{type:`boolean`,description:`Deny traffic that has not fulfilled Access authorization.`}).option(`tunnel-config-origin-request-access-team-name`,{type:`string`,description:`The config.originRequest.access.teamName field`}).option(`tunnel-config-origin-request-ca-pool`,{type:`string`,description:`Path to the certificate authority (CA) for the certificate of your origin. This option should be used only if your certificate is not signed by Cloudflare.`}).option(`tunnel-config-origin-request-connect-timeout`,{type:`number`,description:`Timeout for establishing a new TCP connection to your origin server. This excludes the time taken to establish TLS, which is controlled by tlsTimeout.`}).option(`tunnel-config-origin-request-disable-chunked-encoding`,{type:`boolean`,description:`Disables chunked transfer encoding. Useful if you are running a WSGI server.`}).option(`tunnel-config-origin-request-http2origin`,{type:`boolean`,description:`Attempt to connect to origin using HTTP2. Origin must be configured as https.`}).option(`tunnel-config-origin-request-http-host-header`,{type:`string`,description:`Sets the HTTP Host header on requests sent to the local service.`}).option(`tunnel-config-origin-request-keep-alive-connections`,{type:`number`,description:`Maximum number of idle keepalive connections between Tunnel and your origin. This does not restrict the total number of concurrent connections.`}).option(`tunnel-config-origin-request-keep-alive-timeout`,{type:`number`,description:`Timeout after which an idle keepalive connection can be discarded.`}).option(`tunnel-config-origin-request-match-snito-host`,{type:`boolean`,description:`Auto configure the Hostname on the origin server certificate.`}).option(`tunnel-config-origin-request-no-happy-eyeballs`,{type:`boolean`,description:`Disable the “happy eyeballs” algorithm for IPv4/IPv6 fallback if your local network has misconfigured one of the protocols.`}).option(`tunnel-config-origin-request-no-tlsverify`,{type:`boolean`,description:`Disables TLS verification of the certificate presented by your origin. Will allow any certificate from the origin to be accepted.`}).option(`tunnel-config-origin-request-origin-server-name`,{type:`string`,description:`Hostname that cloudflared should expect from your origin server certificate.`}).option(`tunnel-config-origin-request-proxy-type`,{type:`string`,description:`cloudflared starts a proxy server to translate HTTP traffic into TCP when proxying, for example, SSH or RDP. This configures what type of proxy will be started. Valid options are: "" for the regular proxy and "socks" for a SOCKS5 proxy.
7
7
  `}).option(`tunnel-config-origin-request-tcp-keep-alive`,{type:`number`,description:`The timeout after which a TCP keepalive packet is sent on a connection between Tunnel and the origin server.`}).option(`tunnel-config-origin-request-tls-timeout`,{type:`number`,description:`Timeout for completing a TLS handshake to your origin server, if you have chosen to connect Tunnel to an HTTPS server.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{if([`tunnel-config-ingress`,`tunnel-config-origin-request-access-aud-tag`,`tunnel-config-origin-request-access-required`,`tunnel-config-origin-request-access-team-name`,`tunnel-config-origin-request-ca-pool`,`tunnel-config-origin-request-connect-timeout`,`tunnel-config-origin-request-disable-chunked-encoding`,`tunnel-config-origin-request-http2origin`,`tunnel-config-origin-request-http-host-header`,`tunnel-config-origin-request-keep-alive-connections`,`tunnel-config-origin-request-keep-alive-timeout`,`tunnel-config-origin-request-match-snito-host`,`tunnel-config-origin-request-no-happy-eyeballs`,`tunnel-config-origin-request-no-tlsverify`,`tunnel-config-origin-request-origin-server-name`,`tunnel-config-origin-request-proxy-type`,`tunnel-config-origin-request-tcp-keep-alive`,`tunnel-config-origin-request-tls-timeout`].some(t=>e[t]!==void 0)){let t=[`tunnel-config-origin-request-access-aud-tag`,`tunnel-config-origin-request-access-team-name`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --config-* flag is set`)}return!0})}const C={command:`update <tunnel-id>`,describe:`Update Tunnel configuration`,builder:S,handler:async e=>u({command:`tunnels config update`,classification:{safeFlags:[`tunnel-config-origin-request-access-required`,`tunnel-config-origin-request-disable-chunked-encoding`,`tunnel-config-origin-request-http2origin`,`tunnel-config-origin-request-match-snito-host`,`tunnel-config-origin-request-no-happy-eyeballs`,`tunnel-config-origin-request-no-tlsverify`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();c({command:`cf tunnels config update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cfd_tunnel/${e[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(e[`tunnel-id`]))}/configurations`,pathParams:{"tunnel-id":String(e[`tunnel-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({config:{ingress:d(e[`tunnel-config-ingress`],`tunnel-config-ingress`),originRequest:{access:{audTag:e[`tunnel-config-origin-request-access-aud-tag`],required:e[`tunnel-config-origin-request-access-required`],teamName:m(e[`tunnel-config-origin-request-access-team-name`],`tunnel-config-origin-request-access-team-name`,`text`)},caPool:m(e[`tunnel-config-origin-request-ca-pool`],`tunnel-config-origin-request-ca-pool`,`text`),connectTimeout:e[`tunnel-config-origin-request-connect-timeout`],disableChunkedEncoding:e[`tunnel-config-origin-request-disable-chunked-encoding`],http2Origin:e[`tunnel-config-origin-request-http2origin`],httpHostHeader:m(e[`tunnel-config-origin-request-http-host-header`],`tunnel-config-origin-request-http-host-header`,`text`),keepAliveConnections:e[`tunnel-config-origin-request-keep-alive-connections`],keepAliveTimeout:e[`tunnel-config-origin-request-keep-alive-timeout`],matchSNItoHost:e[`tunnel-config-origin-request-match-snito-host`],noHappyEyeballs:e[`tunnel-config-origin-request-no-happy-eyeballs`],noTLSVerify:e[`tunnel-config-origin-request-no-tlsverify`],originServerName:m(e[`tunnel-config-origin-request-origin-server-name`],`tunnel-config-origin-request-origin-server-name`,`text`),proxyType:m(e[`tunnel-config-origin-request-proxy-type`],`tunnel-config-origin-request-proxy-type`,`text`),tcpKeepAlive:e[`tunnel-config-origin-request-tcp-keep-alive`],tlsTimeout:e[`tunnel-config-origin-request-tls-timeout`]}}}):f(e.body)});return}let t=await i(e),n=e.local?r:await o();if(e.accountId=n,e.body){let r=f(e.body),i=await l(`Updating`,async()=>t.send(x,{body:r,account_id:n,tunnel_id:e[`tunnel-id`]}));s(i,{successLabel:`Updated`});return}let u=p({config:{ingress:d(e[`tunnel-config-ingress`],`tunnel-config-ingress`),originRequest:{access:{audTag:e[`tunnel-config-origin-request-access-aud-tag`],required:e[`tunnel-config-origin-request-access-required`],teamName:m(e[`tunnel-config-origin-request-access-team-name`],`tunnel-config-origin-request-access-team-name`,`text`)},caPool:m(e[`tunnel-config-origin-request-ca-pool`],`tunnel-config-origin-request-ca-pool`,`text`),connectTimeout:e[`tunnel-config-origin-request-connect-timeout`],disableChunkedEncoding:e[`tunnel-config-origin-request-disable-chunked-encoding`],http2Origin:e[`tunnel-config-origin-request-http2origin`],httpHostHeader:m(e[`tunnel-config-origin-request-http-host-header`],`tunnel-config-origin-request-http-host-header`,`text`),keepAliveConnections:e[`tunnel-config-origin-request-keep-alive-connections`],keepAliveTimeout:e[`tunnel-config-origin-request-keep-alive-timeout`],matchSNItoHost:e[`tunnel-config-origin-request-match-snito-host`],noHappyEyeballs:e[`tunnel-config-origin-request-no-happy-eyeballs`],noTLSVerify:e[`tunnel-config-origin-request-no-tlsverify`],originServerName:m(e[`tunnel-config-origin-request-origin-server-name`],`tunnel-config-origin-request-origin-server-name`,`text`),proxyType:m(e[`tunnel-config-origin-request-proxy-type`],`tunnel-config-origin-request-proxy-type`,`text`),tcpKeepAlive:e[`tunnel-config-origin-request-tcp-keep-alive`],tlsTimeout:e[`tunnel-config-origin-request-tls-timeout`]}}}),h=await l(`Updating`,async()=>t.send(x,{body:u,account_id:n,tunnel_id:e[`tunnel-id`]}));s(h,{successLabel:`Updated`})})},w={command:`config`,describe:`Operations for config`,builder:e=>e.command(ee).command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var T={method:`DELETE`,path:e=>t`/accounts/${e.account_id}/cfd_tunnel/${e.tunnel_id}/connections`,query:[`client_id`]};function E(e){return e.usage(`$0 tunnels connections cleanup <tunnel-id>
8
8
 
9
- Removes a connection (aka Cloudflare Tunnel Connector) from a Cloudflare Tunnel independently of its current state. If no connector id (client_id) is provided all connectors will be removed. We recommend running this command after rotating tokens.`).positional(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`client-id`,{type:`string`,description:`UUID of the Cloudflare Tunnel connector.`}).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 D={command:`cleanup <tunnel-id>`,describe:`Clean up Cloudflare Tunnel connections`,builder:E,handler:async e=>u({command:`tunnels connections cleanup`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let t={client_id:e[`client-id`]};if(e.dryRun){let n=await a();c({command:`cf tunnels connections cleanup`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${n??`<account-id>`}/cfd_tunnel/${e[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(e[`tunnel-id`]))}/connections`,pathParams:{"tunnel-id":String(e[`tunnel-id`]??``)},query:t,bodyKind:`none`});return}let n=await i(e),u=e.local?r:await o();if(e.accountId=u,!await g({force:!!e.force,message:`This operation removes Cloudflare Tunnel connections.`})){process.stderr.write(`Aborted.
10
- `);return}let d=await l(`Deleting`,async()=>n.send(T,{account_id:u,tunnel_id:e[`tunnel-id`],...t}));s(d,{successLabel:`Deleted`})})};var O={method:`GET`,path:e=>t`/accounts/${e.account_id}/cfd_tunnel/${e.tunnel_id}/connections`};function k(e){return e.usage(`$0 tunnels connections list
9
+ Removes a connection (aka Cloudflare Tunnel Connector) from a Cloudflare Tunnel independently of its current state. If no connector id (client_id) is provided all connectors will be removed. We recommend running this command after rotating tokens.`).positional(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`client-id`,{type:`string`,description:`UUID of the Cloudflare Tunnel connector.`}).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 D={command:`cleanup <tunnel-id>`,describe:`Clean up Cloudflare Tunnel connections`,builder:E,handler:async e=>u({command:`tunnels connections cleanup`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let t={client_id:e[`client-id`]};if(e.dryRun){let n=await a();c({command:`cf tunnels connections cleanup`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${n??`<account-id>`}/cfd_tunnel/${e[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(e[`tunnel-id`]))}/connections`,pathParams:{"tunnel-id":String(e[`tunnel-id`]??``)},query:t,bodyKind:`none`});return}let n=await i(e),u=e.local?r:await o();if(e.accountId=u,!await g({force:!!e.force,message:`This operation removes Cloudflare Tunnel connections.`}))return;let d=await l(`Deleting`,async()=>n.send(T,{account_id:u,tunnel_id:e[`tunnel-id`],...t}));s(d,{successLabel:`Deleted`})})};var O={method:`GET`,path:e=>t`/accounts/${e.account_id}/cfd_tunnel/${e.tunnel_id}/connections`};function k(e){return e.usage(`$0 tunnels connections list
11
10
 
12
11
  Lists the connections for a Cloudflare Tunnel, including connector IDs, cloudflared versions, and Cloudflare locations.`).option(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const A={command:`list`,describe:`List Cloudflare Tunnel connections`,builder:k,handler:async e=>u({command:`tunnels connections list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();c({command:`cf tunnels connections list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cfd_tunnel/${e[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(e[`tunnel-id`]))}/connections`,pathParams:{"tunnel-id":String(e[`tunnel-id`]??``)},bodyKind:`none`});return}let t=await i(e),n=e.local?r:await o();e.accountId=n;let u=await l(`Loading`,async()=>t.send(O,{account_id:n,tunnel_id:e[`tunnel-id`]}));s(u,{successLabel:`Loaded`})})},j={command:`connections`,describe:`Operations for connections`,builder:e=>e.command(D).command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var M={method:`GET`,path:e=>t`/accounts/${e.account_id}/cfd_tunnel/${e.tunnel_id}/connectors/${e.connector_id}`};function N(e){return e.usage(`$0 tunnels connectors get <connector-id>
13
12
 
@@ -15,8 +14,7 @@ Retrieves a connector and its connection details for a Cloudflare Tunnel, includ
15
14
 
16
15
  Creates a remotely or locally managed Cloudflare Tunnel in an account. After creation, retrieve its token and run cloudflared to establish the connector connection.`).option(`config-source`,{type:`string`,description:"Indicates if this is a locally or remotely configured tunnel. If `local`, manage the tunnel using a YAML file on the origin machine. If `cloudflare`, manage the tunnel on the Zero Trust dashboard.",choices:[`local`,`cloudflare`]}).coerce(`config-source`,e=>m(e,`config-source`,`text`)).option(`name`,{type:`string`,description:`A user-friendly name for a tunnel.`}).option(`tunnel-secret`,{type:`string`,description:`Sets the password required to run a locally-managed tunnel. Must be at least 32 bytes and encoded as a base64 string.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const R={command:`create`,describe:`Create a Cloudflare Tunnel`,builder:L,handler:async e=>u({command:`tunnels create`,classification:{safeFlags:[`config-source`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();c({command:`cf tunnels create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cfd_tunnel`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({config_src:e[`config-source`],name:m(e.name,`name`,`text`),tunnel_secret:m(e[`tunnel-secret`],`tunnel-secret`,`text`)}):f(e.body),sensitiveBodyPaths:[[`tunnel_secret`]]});return}let t=await i(e),n=e.local?r:await o();if(e.accountId=n,e.body){let r=f(e.body),i=await l(`Creating`,async()=>t.send(I,{body:r,account_id:n}));s(i,{successLabel:`Created`});return}e.name===void 0&&(e.name=await h(`name`,`A user-friendly name for a tunnel.`));let u=p({config_src:e[`config-source`],name:m(e.name,`name`,`text`),tunnel_secret:m(e[`tunnel-secret`],`tunnel-secret`,`text`)}),d=await l(`Creating`,async()=>t.send(I,{body:u,account_id:n}));s(d,{successLabel:`Created`})})};var z={method:`DELETE`,path:e=>t`/accounts/${e.account_id}/cfd_tunnel/${e.tunnel_id}`};function B(e){return e.usage(`$0 tunnels delete <tunnel-id>
17
16
 
18
- Permanently deletes a Cloudflare Tunnel from an account. The tunnel must have no active connections.`).positional(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,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 te={command:`delete <tunnel-id>`,describe:`Delete a Cloudflare Tunnel`,builder:B,handler:async e=>u({command:`tunnels delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await a();c({command:`cf tunnels delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cfd_tunnel/${e[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(e[`tunnel-id`]))}`,pathParams:{"tunnel-id":String(e[`tunnel-id`]??``)},bodyKind:`none`});return}let t=await i(e),n=e.local?r:await o();if(e.accountId=n,!await g({force:!!e.force,message:`This operation permanently deletes a Cloudflare Tunnel.`})){process.stderr.write(`Aborted.
19
- `);return}let u=await l(`Deleting`,async()=>t.send(z,{account_id:n,tunnel_id:e[`tunnel-id`]}));s(u,{successLabel:`Deleted`})})};var V={method:`PATCH`,path:e=>t`/accounts/${e.account_id}/cfd_tunnel/${e.tunnel_id}`,body:`json`};function H(e){return e.usage(`$0 tunnels edit <tunnel-id>
17
+ Permanently deletes a Cloudflare Tunnel from an account. The tunnel must have no active connections.`).positional(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,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 te={command:`delete <tunnel-id>`,describe:`Delete a Cloudflare Tunnel`,builder:B,handler:async e=>u({command:`tunnels delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await a();c({command:`cf tunnels delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cfd_tunnel/${e[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(e[`tunnel-id`]))}`,pathParams:{"tunnel-id":String(e[`tunnel-id`]??``)},bodyKind:`none`});return}let t=await i(e),n=e.local?r:await o();if(e.accountId=n,!await g({force:!!e.force,message:`This operation permanently deletes a Cloudflare Tunnel.`}))return;let u=await l(`Deleting`,async()=>t.send(z,{account_id:n,tunnel_id:e[`tunnel-id`]}));s(u,{successLabel:`Deleted`})})};var V={method:`PATCH`,path:e=>t`/accounts/${e.account_id}/cfd_tunnel/${e.tunnel_id}`,body:`json`};function H(e){return e.usage(`$0 tunnels edit <tunnel-id>
20
18
 
21
19
  Updates the name or secret of an existing Cloudflare Tunnel.`).positional(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`name`,{type:`string`,description:`A user-friendly name for a tunnel.`}).option(`tunnel-secret`,{type:`string`,description:`Sets the password required to run a locally-managed tunnel. Must be at least 32 bytes and encoded as a base64 string.`}).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 U={command:`edit <tunnel-id>`,describe:`Update a Cloudflare Tunnel`,builder:H,handler:async e=>u({command:`tunnels edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();c({command:`cf tunnels edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cfd_tunnel/${e[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(e[`tunnel-id`]))}`,pathParams:{"tunnel-id":String(e[`tunnel-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({name:m(e.name,`name`,`text`),tunnel_secret:m(e[`tunnel-secret`],`tunnel-secret`,`text`)}):f(e.body),sensitiveBodyPaths:[[`tunnel_secret`]]});return}let t=await i(e),n=e.local?r:await o();if(e.accountId=n,e.body){let r=f(e.body),i=await l(`Updating`,async()=>t.send(V,{body:r,account_id:n,tunnel_id:e[`tunnel-id`]}));s(i,{successLabel:`Updated`});return}let u=p({name:m(e.name,`name`,`text`),tunnel_secret:m(e[`tunnel-secret`],`tunnel-secret`,`text`)}),d=await l(`Updating`,async()=>t.send(V,{body:u,account_id:n,tunnel_id:e[`tunnel-id`]}));s(d,{successLabel:`Updated`})})};var W={method:`GET`,path:e=>t`/accounts/${e.account_id}/cfd_tunnel/${e.tunnel_id}`};function G(e){return e.usage(`$0 tunnels get <tunnel-id>
22
20
 
@@ -26,4 +24,4 @@ Lists and filters all types of Tunnels in an account.`).option(`name`,{type:`str
26
24
 
27
25
  Creates a short-lived management token for the requested Tunnel management resources, such as streaming logs. Treat the token as a secret.`).positional(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`resources`,{type:`string`,array:!0,description:`The resources field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Z={command:`create <tunnel-id>`,describe:`Get a Cloudflare Tunnel management token`,builder:X,handler:async e=>u({command:`tunnels management-token create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();c({command:`cf tunnels management-token create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cfd_tunnel/${e[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(e[`tunnel-id`]))}/management`,pathParams:{"tunnel-id":String(e[`tunnel-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({resources:e.resources}):f(e.body)});return}let t=await i(e),n=e.local?r:await o();if(e.accountId=n,e.body){let r=f(e.body),i=await l(`Creating`,async()=>t.send(_,{body:r,account_id:n,tunnel_id:e[`tunnel-id`]}));s(i,{successLabel:`Created`});return}if(e.resources===void 0)throw Error(`--resources is required (or pass --body with this field set).`);let u=p({resources:e.resources}),d=await l(`Creating`,async()=>t.send(_,{body:u,account_id:n,tunnel_id:e[`tunnel-id`]}));s(d,{successLabel:`Created`})})},Q={command:`management-token`,describe:`Operations for management-token`,builder:e=>e.command(Z).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ne(e){return e.usage(`$0 tunnels token get <tunnel-id>
28
26
 
29
- Retrieves the token used to run cloudflared and associate it with a specific Cloudflare Tunnel. Treat the token as a secret.`).positional(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const re={command:`get <tunnel-id>`,describe:`Get a Cloudflare Tunnel token`,builder:ne,handler:async e=>u({command:`tunnels token get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();c({command:`cf tunnels token get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cfd_tunnel/${e[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(e[`tunnel-id`]))}/token`,pathParams:{"tunnel-id":String(e[`tunnel-id`]??``)},bodyKind:`none`});return}let t=await i(e),n=e.local?r:await o();e.accountId=n;let u=await l(`Loading`,async()=>t.send(v,{account_id:n,tunnel_id:e[`tunnel-id`]}));s(u,{successLabel:`Loaded`})})},ie={command:`token`,describe:`Operations for token`,builder:e=>e.command(re).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ae=e(`diag`,`Create a diagnostic report from a local cloudflared instance.`,()=>import(`./command-BVO9UOuU.mjs`),{command:`tunnels diag`,recordArgs:!1}),oe=e(`login`,`Authorize cloudflared and download an origin certificate for locally managed tunnels.`,()=>import(`./command-DuLxEkGq.mjs`),{command:`tunnels login`,recordArgs:!1}),$=e(`quick-start <url>`,`Expose a local URL with a temporary trycloudflare.com tunnel. The tunnel remains active until cf exits.`,()=>import(`./command-0WS5I_JW.mjs`),{command:`tunnels quick-start`,recordArgs:!1}),se=e(`ready`,`Check the /ready endpoint exposed by a local cloudflared instance.`,()=>import(`./command-BONLLcyz.mjs`),{command:`tunnels ready`,recordArgs:!1}),ce=e(`run [tunnel]`,`Run a named Cloudflare Tunnel using the cf-managed cloudflared binary.`,()=>import(`./command-DOpykk8X.mjs`),{command:`tunnels run`,recordArgs:!1}),le=e(`tail [tunnel-id]`,`Stream logs from a remote cloudflared instance.`,()=>import(`./command-CPDQPdss.mjs`),{command:`tunnels tail`,recordArgs:!1});const ue={command:`tunnels`,describe:`tunnels`,builder:e=>e.command(R).command(te).command(n(ae,`preview`)).command(U).command(K).command(Y).command(n(oe,`preview`)).command(n($,`preview`)).command(n(se,`preview`)).command(n(ce,`preview`)).command(n(le,`preview`)).command(w).command(j).command(F).command(Q).command(ie).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{ue as default};
27
+ Retrieves the token used to run cloudflared and associate it with a specific Cloudflare Tunnel. Treat the token as a secret.`).positional(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const re={command:`get <tunnel-id>`,describe:`Get a Cloudflare Tunnel token`,builder:ne,handler:async e=>u({command:`tunnels token get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();c({command:`cf tunnels token get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cfd_tunnel/${e[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(e[`tunnel-id`]))}/token`,pathParams:{"tunnel-id":String(e[`tunnel-id`]??``)},bodyKind:`none`});return}let t=await i(e),n=e.local?r:await o();e.accountId=n;let u=await l(`Loading`,async()=>t.send(v,{account_id:n,tunnel_id:e[`tunnel-id`]}));s(u,{successLabel:`Loaded`})})},ie={command:`token`,describe:`Operations for token`,builder:e=>e.command(re).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ae=e(`diag`,`Create a diagnostic report from a local cloudflared instance.`,()=>import(`./command-orlUsdgf.mjs`),{command:`tunnels diag`,recordArgs:!1}),oe=e(`login`,`Authorize cloudflared and download an origin certificate for locally managed tunnels.`,()=>import(`./command-BGRucANI.mjs`),{command:`tunnels login`,recordArgs:!1}),$=e(`quick-start <url>`,`Expose a local URL with a temporary trycloudflare.com tunnel. The tunnel remains active until cf exits.`,()=>import(`./command-rUCxlpQI.mjs`),{command:`tunnels quick-start`,recordArgs:!1}),se=e(`ready`,`Check the /ready endpoint exposed by a local cloudflared instance.`,()=>import(`./command-C6kE7BU0.mjs`),{command:`tunnels ready`,recordArgs:!1}),ce=e(`run [tunnel]`,`Run a named Cloudflare Tunnel using the cf-managed cloudflared binary.`,()=>import(`./command-C9CNvZi_.mjs`),{command:`tunnels run`,recordArgs:!1}),le=e(`tail [tunnel-id]`,`Stream logs from a remote cloudflared instance.`,()=>import(`./command-DkwmylF2.mjs`),{command:`tunnels tail`,recordArgs:!1});const ue={command:`tunnels`,describe:`tunnels`,builder:e=>e.command(R).command(te).command(n(ae,`preview`)).command(U).command(K).command(Y).command(n(oe,`preview`)).command(n($,`preview`)).command(n(se,`preview`)).command(n(ce,`preview`)).command(n(le,`preview`)).command(w).command(j).command(F).command(Q).command(ie).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{ue as default};