cf 1.0.0-beta.11 → 1.0.0-beta.12

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 (427) hide show
  1. package/bin/cf +1 -1
  2. package/dist/abuse-reports-Cy9RcWPu.mjs +24 -0
  3. package/dist/{access-DuHs0Mii.mjs → access-DwJm1qet.mjs} +1 -1
  4. package/dist/account-tags-d0RkEw6s.mjs +15 -0
  5. package/dist/{accounts-DfXSHrkF.mjs → accounts-BSd4b-1j.mjs} +63 -63
  6. package/dist/{acm-BgSr3Ig4.mjs → acm-BfI0p2sX.mjs} +7 -7
  7. package/dist/addressing-lfeJf7YB.mjs +93 -0
  8. package/dist/agent-context-DFEgYjEQ.mjs +2 -0
  9. package/dist/agent-memory-CP1qpn-y.mjs +34 -0
  10. package/dist/{ai-audit-Bn_BfMFS.mjs → ai-audit-B_tSl78A.mjs} +3 -3
  11. package/dist/ai-gateway-CJaUlfGc.mjs +82 -0
  12. package/dist/ai-jFzFBANM.mjs +29 -0
  13. package/dist/{ai-search-C4YWVTCa.mjs → ai-search-PTlpY1T9.mjs} +42 -42
  14. package/dist/ai-security-CKGE547U.mjs +10 -0
  15. package/dist/alerting-CuxoqG3S.mjs +56 -0
  16. package/dist/analytics-NPND7aHB.mjs +20 -0
  17. package/dist/analytics_engine-BoapM9wd.mjs +4 -0
  18. package/dist/ansi-styles-kSC6bEIq.mjs +2 -0
  19. package/dist/{api-security-gB1FHrHq.mjs → api-security-Nk_bg-Kg.mjs} +57 -57
  20. package/dist/{argo-wFCAsYx7.mjs → argo-DYfLQhd2.mjs} +5 -5
  21. package/dist/artifacts-BS6cEqCB.mjs +43 -0
  22. package/dist/{audit-logs-CpPUjMUP.mjs → audit-logs-x5tLqeX2.mjs} +2 -2
  23. package/dist/auth-AobvBmz4.mjs +2 -0
  24. package/dist/auth-CBtzZ3Sw.mjs +2 -0
  25. package/dist/{auth-7Fk7PVIC.mjs → auth-CKotxfap.mjs} +1 -1
  26. package/dist/{auth-token-DeG33BMQ.mjs → auth-token-CtguMdmF.mjs} +1 -1
  27. package/dist/autoconfig-PfnbLuEO.mjs +532 -0
  28. package/dist/{banner-Xk4xBN8U.mjs → banner-D03JEqRs.mjs} +1 -1
  29. package/dist/basin-catalog-Ddi-t3q9.mjs +46 -0
  30. package/dist/billing-CDMc4tvX.mjs +23 -0
  31. package/dist/bot-management-UrCM3P8K.mjs +9 -0
  32. package/dist/botnet-feed-CVwRm42k.mjs +11 -0
  33. package/dist/brand-protection-DfNf5REj.mjs +27 -0
  34. package/dist/browser-run-DVaiBLYX.mjs +46 -0
  35. package/dist/build-BKPVP5ip.mjs +2 -0
  36. package/dist/build-C4giET85.mjs +2 -0
  37. package/dist/builds-BG5DHqU3.mjs +71 -0
  38. package/dist/cache-C05hHXUp.mjs +45 -0
  39. package/dist/{certificate-authorities-NUQzCDK8.mjs → certificate-authorities-DyCFmZwR.mjs} +3 -3
  40. package/dist/cf-B9aqZZKD.mjs +18 -0
  41. package/dist/chunk-AUSY7DKT-BJX6Fdc4.mjs +312 -0
  42. package/dist/chunk-FT2NMTJB-DQ7s3x7Q.mjs +361 -0
  43. package/dist/chunk-KKDV4JPS-D3kwd1Nq.mjs +2 -0
  44. package/dist/chunk-U6NEESU5-DqqRCaWH.mjs +2 -0
  45. package/dist/chunk-WMOON6TZ-C0dmPHpM.mjs +2 -0
  46. package/dist/{cli-aChy8ou_.mjs → cli-D9qlPB-6.mjs} +1 -1
  47. package/dist/cli-exit-CstFZ1eJ.mjs +2 -0
  48. package/dist/{client-certificates-qgLpBn8t.mjs → client-certificates-B-m8rfM9.mjs} +6 -6
  49. package/dist/{client-side-security-DZO6Xw14.mjs → client-side-security-M4oIUqID.mjs} +14 -14
  50. package/dist/{cloud-connector-C7vGDCzX.mjs → cloud-connector-B63Dwn6n.mjs} +3 -3
  51. package/dist/cloudflared-B48cfu95.mjs +2 -0
  52. package/dist/cloudforce-one-Dlc1GNFy.mjs +447 -0
  53. package/dist/{command-07vhr56i.mjs → command-BQpXcGKV.mjs} +1 -1
  54. package/dist/{command-Cdx___59.mjs → command-BWlpCtHe.mjs} +1 -1
  55. package/dist/{command-CrtDkZNs.mjs → command-BlGILcTA.mjs} +1 -1
  56. package/dist/{command-eM48o0J6.mjs → command-CKQlxypn.mjs} +1 -1
  57. package/dist/{command-D0MKPucK.mjs → command-CRl00uA2.mjs} +1 -1
  58. package/dist/{command-Ds5OVat3.mjs → command-CUkXxZsc.mjs} +1 -1
  59. package/dist/command-CXxh5Hce.mjs +2 -0
  60. package/dist/{command-BWC9CbE7.mjs → command-CzvlHvov.mjs} +1 -1
  61. package/dist/{command-B6TpINoN.mjs → command-DBaNgfA4.mjs} +1 -1
  62. package/dist/{command-C2pNxAeL.mjs → command-DEQSv-S1.mjs} +1 -1
  63. package/dist/{command-Dv6YavZa.mjs → command-DyE8v4sd.mjs} +1 -1
  64. package/dist/command-Rv2MR-eh.mjs +2 -0
  65. package/dist/{command-BsmF3J_l.mjs → command-SS1z_t68.mjs} +1 -1
  66. package/dist/{command-maDJWJgu.mjs → command-VuxpEvmH.mjs} +1 -1
  67. package/dist/{command-dAYWrB5y.mjs → command-ZBQ1WITj.mjs} +1 -1
  68. package/dist/{completions-D0280hul.mjs → completions-lf50FBGm.mjs} +2 -2
  69. package/dist/connector-interrupts-DHN1KtUE.mjs +6 -0
  70. package/dist/connector-telemetry-events-CHg7FmXh.mjs +6 -0
  71. package/dist/connector-telemetry-snapshots-CSifYi9r.mjs +6 -0
  72. package/dist/connectors-0UwPUav-.mjs +15 -0
  73. package/dist/containers-DRzgE46U.mjs +375 -0
  74. package/dist/containers-DuIsM7lM.mjs +78 -0
  75. package/dist/{content-scan-BCtWBCqd.mjs → content-scan-COyTz0Wb.mjs} +7 -7
  76. package/dist/{context-CquYYyS3.mjs → context-Bwkz4Lm_.mjs} +2 -2
  77. package/dist/{cps-C8BbnbuD.mjs → cps-B7_BJaAU.mjs} +3 -3
  78. package/dist/{csamScanner-CsJ9H2fA.mjs → csamScanner-jez2EYXC.mjs} +3 -3
  79. package/dist/ct-alerting-CACDrY0E.mjs +5 -0
  80. package/dist/{custom-certificates-CA8HqolM.mjs → custom-certificates-BBd92YlF.mjs} +7 -7
  81. package/dist/{custom-csrs-D0P2vWJE.mjs → custom-csrs-DTwBiNMX.mjs} +5 -5
  82. package/dist/{custom-hostnames-CzYMChbh.mjs → custom-hostnames-DIWlqvN9.mjs} +12 -12
  83. package/dist/{custom-nameservers-Cet3oF56.mjs → custom-nameservers-DISy8v8u.mjs} +5 -5
  84. package/dist/{custom-pages-DUkHIaTP.mjs → custom-pages-BHXO_NFv.mjs} +10 -10
  85. package/dist/d1-MvAQMvvo.mjs +89 -0
  86. package/dist/{dcv-delegation-BkdRVEAH.mjs → dcv-delegation-Buq0hcm_.mjs} +2 -2
  87. package/dist/delegate.mjs +1 -1
  88. package/dist/{deploy-BdWBEbLj.mjs → deploy-BS47vZvJ.mjs} +1 -1
  89. package/dist/deploy-context-Cfushp8j.mjs +56 -0
  90. package/dist/{deploy-input-LmLfj6kI.mjs → deploy-input-BAhS5LYx.mjs} +1 -1
  91. package/dist/{dev-BHkVwAea.mjs → dev-D8FGPKRt.mjs} +2 -2
  92. package/dist/diagnostics-ChDfJ-Gv.mjs +15 -0
  93. package/dist/{dialog-Dpi-UVbz.mjs → dialog-CL1Zy4pn.mjs} +1 -1
  94. package/dist/discover-DIDEGKo3.mjs +2 -0
  95. package/dist/discover-P20XeGBF.mjs +2 -0
  96. package/dist/{dist-Cpb7_h4N.mjs → dist-8rP3V95o.mjs} +5 -5
  97. package/dist/dist-CYFkGHYv.mjs +487 -0
  98. package/dist/dls-8D00tqvC.mjs +17 -0
  99. package/dist/{dns-BLNa0GrP.mjs → dns-C-A5pwf3.mjs} +63 -63
  100. package/dist/{dns-firewall-ChCvC5rT.mjs → dns-firewall-DIiF4pro.mjs} +9 -9
  101. package/dist/dot-prop-IITUZ2XW-BnPfnQkb.mjs +2 -0
  102. package/dist/dotenv-DpXaxfho.mjs +4 -0
  103. package/dist/dry-run-DmsbOMF1.mjs +2 -0
  104. package/dist/durable-objects-CnIqbj84.mjs +6 -0
  105. package/dist/{email-auth-C28s03aI.mjs → email-auth-v97Md32E.mjs} +3 -3
  106. package/dist/{email-routing-Ci-xjXIN.mjs → email-routing-I29RG4hb.mjs} +22 -22
  107. package/dist/{email-security-DPU6xvI9.mjs → email-security-BCarmbky.mjs} +86 -86
  108. package/dist/{email-sending-kTVAlVKO.mjs → email-sending-CsHk2HAJ.mjs} +22 -22
  109. package/dist/error-sanitization-BWnGnB73.mjs +2 -0
  110. package/dist/error-sanitization-C_a2LxOK.mjs +2 -0
  111. package/dist/fieldExtractors-GIVe9jZa.mjs +9 -0
  112. package/dist/{firewall-BND3qSY2.mjs → firewall-DpgFqJr3.mjs} +16 -16
  113. package/dist/flagship-BVaXXlsX.mjs +28 -0
  114. package/dist/{fraud-DgyYv_CC.mjs → fraud-B5GQdEF2.mjs} +3 -3
  115. package/dist/{generate-VxmGG8BF.mjs → generate-CeeWW3eX.mjs} +1 -1
  116. package/dist/generate-D80-1GnZ.mjs +2 -0
  117. package/dist/{google-tag-gateway-v3p7murv.mjs → google-tag-gateway-C4O61lp-.mjs} +3 -3
  118. package/dist/gt-3bcLGJ7V.mjs +3 -0
  119. package/dist/{healthchecks-CByb4qYA.mjs → healthchecks-BwYMnKSF.mjs} +10 -10
  120. package/dist/{hostnames-3CqeMF5g.mjs → hostnames-DhrGRFeI.mjs} +5 -5
  121. package/dist/{hyperdrive-CmyYTE-K.mjs → hyperdrive-DAA8Fazg.mjs} +10 -10
  122. package/dist/iam-sRKDU2Z3.mjs +52 -0
  123. package/dist/images-DXdekLVs.mjs +71 -0
  124. package/dist/index.mjs +1 -1
  125. package/dist/init-j47MT4Qe.mjs +39 -0
  126. package/dist/intel-CnVeSjIS.mjs +76 -0
  127. package/dist/interactive-Dqv0RWVU.mjs +42 -0
  128. package/dist/interactive-Wpd3FcDc.mjs +2 -0
  129. package/dist/{ips-WWvPwSBc.mjs → ips-COCUG8mk.mjs} +2 -2
  130. package/dist/k2-CmHkArHL.mjs +13 -0
  131. package/dist/{keyless-certificates-DqILy3t9.mjs → keyless-certificates-l2_S__h3.mjs} +6 -6
  132. package/dist/keys-CDZreums.mjs +4 -0
  133. package/dist/kv-DkpKVimq.mjs +15 -0
  134. package/dist/{lazy-command--5YpWUVY.mjs → lazy-command-_vZGz6mv.mjs} +1 -1
  135. package/dist/{leaked-credential-checks-C0U1oYM5.mjs → leaked-credential-checks-edbapECI.mjs} +8 -8
  136. package/dist/lifecycle-oud60haK.mjs +2 -0
  137. package/dist/{load-balancers-BJKI9lm7.mjs → load-balancers-C5YMvhXD.mjs} +40 -40
  138. package/dist/{local-rYpzEQb-.mjs → local-C0lQ9sTg.mjs} +1 -1
  139. package/dist/local-D5L5Bwju.mjs +2 -0
  140. package/dist/{local-runtime-DZTTIe6x.mjs → local-runtime-DtnWXN0a.mjs} +1 -1
  141. package/dist/{login-bnylLTit.mjs → login-BrjOuHKu.mjs} +1 -1
  142. package/dist/login-DeOM4v0L.mjs +2 -0
  143. package/dist/logo-matches-CF8321pb.mjs +6 -0
  144. package/dist/logos-Bd8xNRKW.mjs +7 -0
  145. package/dist/logpush-BYk3qqwY.mjs +46 -0
  146. package/dist/{logs-c3b3USyS.mjs → logs-Jcj2NN8H.mjs} +11 -11
  147. package/dist/magic-cloud-networking-Dgdb9H0f.mjs +71 -0
  148. package/dist/magic-network-monitoring-CxVU4MZB.mjs +36 -0
  149. package/dist/magic-transit-KDyfUgTv.mjs +383 -0
  150. package/dist/managed-defense-CxaDeNUd.mjs +18 -0
  151. package/dist/{managed-transforms-DcYAvqTe.mjs → managed-transforms-C7rT5E-x.mjs} +4 -4
  152. package/dist/{matches-hnU16rSJ.mjs → matches-BtKqG8T9.mjs} +3 -3
  153. package/dist/{mcp-kZX4irfN.mjs → mcp-QDd1Iyc0.mjs} +17 -17
  154. package/dist/mesh-DtrIzl5z.mjs +26 -0
  155. package/dist/metadata-Df5kCWJv.mjs +2 -0
  156. package/dist/{migrate-BNvUWrjy.mjs → migrate-DHlfR_gZ.mjs} +1 -1
  157. package/dist/{monetization-Dsqj9DCA.mjs → monetization-pLalYYMI.mjs} +9 -9
  158. package/dist/mtls-certificates-DYA9Wu-c.mjs +13 -0
  159. package/dist/network-DrJxPWXQ.mjs +50 -0
  160. package/dist/{network-interconnects-osO_vAPu.mjs → network-interconnects-D73MlYG8.mjs} +19 -19
  161. package/dist/{oauth-CeZ3d_dB.mjs → oauth-B08YQ4xq.mjs} +1 -1
  162. package/dist/{oauth-w0fWmrwU.mjs → oauth-TGbM1Q0V.mjs} +1 -1
  163. package/dist/oauth-clients-CkPDLFd-.mjs +16 -0
  164. package/dist/{oauth-scopes-CxpRD6d7.mjs → oauth-scopes-VgliqcQe.mjs} +2 -2
  165. package/dist/{observability-BxL2RqWZ.mjs → observability-CvN9oxAo.mjs} +42 -42
  166. package/dist/open-PCXX3ZDZ-D55O2jpQ.mjs +4 -0
  167. package/dist/{organization-DNieJ1xJ.mjs → organization-DIwqRBBV.mjs} +16 -16
  168. package/dist/{organizations-BIXPmTy5.mjs → organizations-Dk0D9ukm.mjs} +2 -2
  169. package/dist/{origin-ca-certificates-dVJvSIH8.mjs → origin-ca-certificates-BSFqMTn-.mjs} +5 -5
  170. package/dist/{origin-post-quantum-encryption-CO6tDW1t.mjs → origin-post-quantum-encryption-BOKWKDTY.mjs} +3 -3
  171. package/dist/{origin-tls-client-auth-DeTY8aN2.mjs → origin-tls-client-auth-BzE3WpcN.mjs} +14 -14
  172. package/dist/output-BGqhvqe2.mjs +2 -0
  173. package/dist/{page-rules-DA552Ra4.mjs → page-rules-BKaU37cM.mjs} +7 -7
  174. package/dist/pages-2Xg-lrMf.mjs +54 -0
  175. package/dist/{pay-per-crawl-DoTg9VP7.mjs → pay-per-crawl-5-KTQXRr.mjs} +33 -33
  176. package/dist/pay-per-use-sGebKzNK.mjs +6 -0
  177. package/dist/pipelines-BM-T7mMK.mjs +44 -0
  178. package/dist/precursor-DmQ32-Sp.mjs +4 -0
  179. package/dist/previews-DDQ9ACDJ.mjs +4 -0
  180. package/dist/{progress-TLUEIYE6.mjs → progress-BYVZuEcG.mjs} +1 -1
  181. package/dist/{prompt-Ck_1PCHm.mjs → prompt-F5wxc8zq.mjs} +1 -1
  182. package/dist/queries-DPBkVynK.mjs +9 -0
  183. package/dist/queues-CCXRs98q.mjs +57 -0
  184. package/dist/r2-BKuBSW8h.mjs +125 -0
  185. package/dist/{radar-Bez6k9Dw.mjs → radar-Gv1yFoRX.mjs} +150 -150
  186. package/dist/{raw-fetch-DNxNCoeP.mjs → raw-fetch-DyYWa923.mjs} +1 -1
  187. package/dist/realtime-CVl-rvgx.mjs +172 -0
  188. package/dist/registrar-sandbox-cmOYDnkp.mjs +56 -0
  189. package/dist/registrar-swlnh22i.mjs +43 -0
  190. package/dist/{registry-CsSLAAOE.mjs → registry-C20J1MW0.mjs} +1 -1
  191. package/dist/reporting-Bgwsvol1.mjs +14 -0
  192. package/dist/request-headers-CUee83pa.mjs +2 -0
  193. package/dist/request-tracers-BBiJvVDz.mjs +4 -0
  194. package/dist/resolve-DvxgnWjL.mjs +2 -0
  195. package/dist/resolve-qwL1LmKN.mjs +2 -0
  196. package/dist/resource-sharing-C1JiYLbl.mjs +40 -0
  197. package/dist/resource-tagging-C9VOSlDR.mjs +4 -0
  198. package/dist/rules-BDunCGMj.mjs +18 -0
  199. package/dist/{rulesets-RJ6yBefy.mjs → rulesets-BMGxrnv9.mjs} +17 -17
  200. package/dist/rum-B7XiECe9.mjs +30 -0
  201. package/dist/run-CrZgB8L_.mjs +2 -0
  202. package/dist/run-nNxXb_Cv.mjs +2 -0
  203. package/dist/schema-DC0kdqgV.mjs +2 -0
  204. package/dist/schema-flags-BUZR9SLd.mjs +5 -0
  205. package/dist/scim-CORcs2wK.mjs +18 -0
  206. package/dist/secrets-store-BoZQaFey.mjs +24 -0
  207. package/dist/{security-insights-DVAqroY5.mjs → security-insights-DblK_6sg.mjs} +20 -20
  208. package/dist/{security-txt-rfrrdiZV.mjs → security-txt-Dl7RPnRb.mjs} +4 -4
  209. package/dist/{session-B6mFkaVZ.mjs → session-BWe9et4K.mjs} +1 -1
  210. package/dist/shared-0N31BXkY.mjs +2 -0
  211. package/dist/{smart-shield-_HA814Im.mjs → smart-shield-DX0-8ruu.mjs} +11 -11
  212. package/dist/{snippets-mRelEw0p.mjs → snippets-BFN-Lg3K.mjs} +8 -8
  213. package/dist/source-mXUcrTVw.mjs +6 -0
  214. package/dist/spawn-DZ9A-xXb.mjs +10 -0
  215. package/dist/{spectrum-BwtOiaDw.mjs → spectrum-HYWLWB0X.mjs} +11 -11
  216. package/dist/{speed-DmqsZtiJ.mjs → speed-Dj0YhfRe.mjs} +11 -11
  217. package/dist/src-CAiZlihY.mjs +117 -0
  218. package/dist/{ssl-DCvfveJB.mjs → ssl-BQL1fNtD.mjs} +16 -16
  219. package/dist/startup-profile-0X5ebbng.mjs +29 -0
  220. package/dist/startup-profile-CXnsF4c7.mjs +2 -0
  221. package/dist/state-BA2CanJ_.mjs +2 -0
  222. package/dist/{state-BPwdiNO_.mjs → state-Dy6-rKNd.mjs} +1 -1
  223. package/dist/stream-DKv2TtZN.mjs +102 -0
  224. package/dist/submit-Byt2KBGI.mjs +4 -0
  225. package/dist/{tags-Djw0e-4j.mjs → tags-BIBsdG68.mjs} +2 -2
  226. package/dist/telemetry-DBXOMuLh.mjs +2 -0
  227. package/dist/{telemetry-DrFNujdx.mjs → telemetry-bu3txnIR.mjs} +1 -1
  228. package/dist/{tenant-tc1wb_ym.mjs → tenant-Bs4Ac4n3.mjs} +5 -5
  229. package/dist/{tenant-custom-nameservers-XCbXryBZ.mjs → tenant-custom-nameservers-DcaELeCE.mjs} +4 -4
  230. package/dist/{theme-BIWQFmZ0.mjs → theme-CQ_TYifs.mjs} +2 -2
  231. package/dist/{tools-CB4NleeJ.mjs → tools-BbTX7rlM.mjs} +1 -1
  232. package/dist/tunnels-DWcrz9Sf.mjs +29 -0
  233. package/dist/turnstile-2MIGp2ce.mjs +33 -0
  234. package/dist/{ui-D1hhIDIs.mjs → ui-YmjF66Ct.mjs} +1 -1
  235. package/dist/update-check-B-CvDAUz.mjs +2 -0
  236. package/dist/update-check-CfB0PNTY.mjs +2 -0
  237. package/dist/update-check-worker.mjs +1 -1
  238. package/dist/url-info-B8udoxlx.mjs +4 -0
  239. package/dist/{url-normalization-Dbypc9wz.mjs → url-normalization-C6AdWtaE.mjs} +4 -4
  240. package/dist/url-scanner-Dg0c_yVb.mjs +16 -0
  241. package/dist/{user-3uwLMH78.mjs → user-BLZ-0Bgv.mjs} +51 -51
  242. package/dist/values-BUK-m0Jg.mjs +4 -0
  243. package/dist/vectorize-DEUSEQXY.mjs +32 -0
  244. package/dist/version-BZNc7Y3t.mjs +2 -0
  245. package/dist/waiting-rooms-BycGk2Y0.mjs +53 -0
  246. package/dist/{web-assets-BfEprX1S.mjs → web-assets-CLZdWOmN.mjs} +30 -30
  247. package/dist/{web3-DNbp5sZw.mjs → web3-DjeavuLg.mjs} +13 -13
  248. package/dist/workers-C_SfyU-v.mjs +38 -0
  249. package/dist/workers-builds-COn5Ne5G.mjs +14 -0
  250. package/dist/workers-for-platforms-tchCXwNF.mjs +42 -0
  251. package/dist/{workers-vpc-LVfayM2-.mjs → workers-vpc-CKts8Av0.mjs} +7 -7
  252. package/dist/workflows-BibtWuOx.mjs +43 -0
  253. package/dist/{wrangler-migration-B0mKHqGd.mjs → wrangler-migration-BpJqCFAa.mjs} +1 -1
  254. package/dist/{zaraz-BY60ZUQ4.mjs → zaraz-BvQZB0YY.mjs} +11 -11
  255. package/dist/{zero-trust-CQNohO7_.mjs → zero-trust-FStq4uhn.mjs} +411 -411
  256. package/dist/{zone-BVDW2UGd.mjs → zone-tymlghWb.mjs} +2 -2
  257. package/dist/{zones-CcZL0YQp.mjs → zones-Bz6dgT9_.mjs} +43 -43
  258. package/package.json +20 -21
  259. package/dist/abuse-reports-DX5xgeka.mjs +0 -24
  260. package/dist/account-tags-CiKwgOWd.mjs +0 -15
  261. package/dist/addressing-B70NFnrX.mjs +0 -93
  262. package/dist/agent-context-GRiQ4zRU.mjs +0 -2
  263. package/dist/agent-memory-DJRquHeq.mjs +0 -34
  264. package/dist/ai-CP2oIS-I.mjs +0 -29
  265. package/dist/ai-gateway-CrrEtzUP.mjs +0 -82
  266. package/dist/ai-security-Bt_fG65f.mjs +0 -10
  267. package/dist/alerting-CRr88fVR.mjs +0 -56
  268. package/dist/analytics-XqS9OP5B.mjs +0 -20
  269. package/dist/analytics_engine-CzmYem4f.mjs +0 -4
  270. package/dist/ansi-styles-eKEZXVwN.mjs +0 -2
  271. package/dist/artifacts-qFjlNRqb.mjs +0 -43
  272. package/dist/auth-BmJ946bE.mjs +0 -2
  273. package/dist/auth-Br-t8vL_.mjs +0 -2
  274. package/dist/autoconfig-D-copdZG.mjs +0 -511
  275. package/dist/basin-catalog-CshcpsAH.mjs +0 -46
  276. package/dist/billing-B-xNxxiP.mjs +0 -23
  277. package/dist/bot-management-DhafeA2J.mjs +0 -9
  278. package/dist/botnet-feed-D6uCLE_D.mjs +0 -11
  279. package/dist/brand-protection-c3WiHbYn.mjs +0 -27
  280. package/dist/browser-run-D9_cwaSD.mjs +0 -46
  281. package/dist/build-9ihDp-Gy.mjs +0 -2
  282. package/dist/build-DrG6TqMw.mjs +0 -2
  283. package/dist/builds-Dl8if-2k.mjs +0 -71
  284. package/dist/cache-CIZokBjd.mjs +0 -45
  285. package/dist/cf-DfQfIu3q.mjs +0 -18
  286. package/dist/chunk-FT2NMTJB-BFqlGcem.mjs +0 -97
  287. package/dist/chunk-KKDV4JPS-B_t8sDTz.mjs +0 -2
  288. package/dist/chunk-U6NEESU5-BhF4rnpx.mjs +0 -2
  289. package/dist/chunk-WMOON6TZ-B8xCqjB1.mjs +0 -2
  290. package/dist/cli-exit-Dqoo6Jgb.mjs +0 -2
  291. package/dist/cloudflared-CEfZhSQH.mjs +0 -2
  292. package/dist/cloudforce-one-CE7y5UkF.mjs +0 -447
  293. package/dist/command-C65Ed0o9.mjs +0 -2
  294. package/dist/command-DHdWKtqx.mjs +0 -2
  295. package/dist/connector-interrupts-CVjFhU-C.mjs +0 -6
  296. package/dist/connector-telemetry-events-Bu3LKP6T.mjs +0 -6
  297. package/dist/connector-telemetry-snapshots-BbDTIc06.mjs +0 -6
  298. package/dist/connectors-DGtx-rPI.mjs +0 -15
  299. package/dist/containers-CzNbBrYE.mjs +0 -239
  300. package/dist/containers-DEFrbNgO.mjs +0 -78
  301. package/dist/ct-alerting-CYsQZO2H.mjs +0 -5
  302. package/dist/d1-B2duXfH2.mjs +0 -41
  303. package/dist/diagnostics-9Wj5UWBL.mjs +0 -15
  304. package/dist/discover-BYkHr5Ja.mjs +0 -2
  305. package/dist/discover-t6E9lpf3.mjs +0 -2
  306. package/dist/dist-D1iG7guo.mjs +0 -366
  307. package/dist/dist-zep5OXGt.mjs +0 -48
  308. package/dist/dls-Caya7FZc.mjs +0 -17
  309. package/dist/dot-prop-IITUZ2XW-BsZYdILY.mjs +0 -2
  310. package/dist/dotenv-CcQjGlV0.mjs +0 -4
  311. package/dist/dry-run-p9Q7nMZ5.mjs +0 -2
  312. package/dist/durable-objects-DuRbdp7N.mjs +0 -6
  313. package/dist/error-sanitization-BbEw--0B.mjs +0 -2
  314. package/dist/error-sanitization-p5rmb53x.mjs +0 -2
  315. package/dist/fieldExtractors-ceaXu4zD.mjs +0 -9
  316. package/dist/flagship-DfxbNzgx.mjs +0 -28
  317. package/dist/generate-9P8Q_RiO.mjs +0 -2
  318. package/dist/gt-KlYHH-UC.mjs +0 -2
  319. package/dist/iam-CV_M681j.mjs +0 -52
  320. package/dist/images-DaLPjskW.mjs +0 -71
  321. package/dist/init-CBKifk5L.mjs +0 -39
  322. package/dist/intel-MpftjuPB.mjs +0 -76
  323. package/dist/interactive-D80kbTap.mjs +0 -32
  324. package/dist/interactive-mJQ_IrGd.mjs +0 -2
  325. package/dist/k2-D0QYUFqT.mjs +0 -13
  326. package/dist/keys-DhX4AcqF.mjs +0 -4
  327. package/dist/kv-DLUfUL0_.mjs +0 -15
  328. package/dist/lifecycle-Cyc3fmyN.mjs +0 -2
  329. package/dist/local-DkYQiSQQ.mjs +0 -2
  330. package/dist/login-CnE2Ii_F.mjs +0 -2
  331. package/dist/logo-matches-DFZybI0C.mjs +0 -6
  332. package/dist/logos-Da2YtqSN.mjs +0 -7
  333. package/dist/logpush-Q7WIEHS1.mjs +0 -46
  334. package/dist/magic-cloud-networking-BoyDmFq3.mjs +0 -71
  335. package/dist/magic-network-monitoring-BkUbpMUp.mjs +0 -36
  336. package/dist/magic-transit-4-THD45G.mjs +0 -383
  337. package/dist/managed-defense-CTMqSp6z.mjs +0 -18
  338. package/dist/mesh-Dxzvvso6.mjs +0 -26
  339. package/dist/metadata-C33s4rc-.mjs +0 -2
  340. package/dist/mtls-certificates-BSbMwIna.mjs +0 -13
  341. package/dist/network-mEnXTEiG.mjs +0 -50
  342. package/dist/oauth-clients-CWPHi-Yn.mjs +0 -16
  343. package/dist/open-PCXX3ZDZ-C7gpxSsl.mjs +0 -4
  344. package/dist/output-ClYel9WX.mjs +0 -2
  345. package/dist/pages-B0x7tidm.mjs +0 -54
  346. package/dist/pay-per-use-yRO2QBfe.mjs +0 -6
  347. package/dist/pipelines-CQxrm9ao.mjs +0 -44
  348. package/dist/precursor-FiGYDRV9.mjs +0 -4
  349. package/dist/previews-BthBa50j.mjs +0 -4
  350. package/dist/queries-C0RRdol7.mjs +0 -9
  351. package/dist/queues-sLgvjsRP.mjs +0 -57
  352. package/dist/r2-C2PllL6i.mjs +0 -125
  353. package/dist/realtime-D-HSXznX.mjs +0 -172
  354. package/dist/registrar-DwHrG9QR.mjs +0 -43
  355. package/dist/registrar-sandbox-jNukmzQP.mjs +0 -56
  356. package/dist/reporting-DolhAb10.mjs +0 -14
  357. package/dist/request-headers-Lhj314mk.mjs +0 -2
  358. package/dist/request-tracers-w72hKc33.mjs +0 -4
  359. package/dist/resolve-CGKqk7q8.mjs +0 -2
  360. package/dist/resolve-Djf2xgBx.mjs +0 -2
  361. package/dist/resource-sharing-DTrSkqI4.mjs +0 -40
  362. package/dist/resource-tagging-aURR4fIJ.mjs +0 -4
  363. package/dist/rules-C8a7cV-W.mjs +0 -18
  364. package/dist/rum-Bk1dPW4p.mjs +0 -30
  365. package/dist/run-BJOAPmsz.mjs +0 -2
  366. package/dist/run-iFM5TxtQ.mjs +0 -2
  367. package/dist/schema-flags-PagOq-G2.mjs +0 -5
  368. package/dist/schema-v7mOxMdx.mjs +0 -2
  369. package/dist/scim-C0FmjkkV.mjs +0 -18
  370. package/dist/secrets-store-cG_5RMzK.mjs +0 -24
  371. package/dist/shared-BqsWoApw.mjs +0 -2
  372. package/dist/source-38bULAR8.mjs +0 -6
  373. package/dist/spawn-BzPhcLJI.mjs +0 -10
  374. package/dist/src--KDGqL5N.mjs +0 -109
  375. package/dist/startup-profile-BCe9k9sR.mjs +0 -17
  376. package/dist/startup-profile-WrwRyMwH.mjs +0 -2
  377. package/dist/state-a1tTOGjm.mjs +0 -2
  378. package/dist/stream-aroClJeD.mjs +0 -102
  379. package/dist/submit-BBKhoKT8.mjs +0 -4
  380. package/dist/telemetry-DoBQOGRk.mjs +0 -2
  381. package/dist/tunnels-C2FTswb6.mjs +0 -29
  382. package/dist/turnstile-BV4Mdd-j.mjs +0 -33
  383. package/dist/update-check-CFt6cMOi.mjs +0 -2
  384. package/dist/update-check-Dtj9fzNe.mjs +0 -2
  385. package/dist/url-info-CeegsDK7.mjs +0 -4
  386. package/dist/url-scanner-BFXMrpJF.mjs +0 -16
  387. package/dist/values-BTncDc3U.mjs +0 -4
  388. package/dist/vectorize-CtMAtx8r.mjs +0 -32
  389. package/dist/version-oN1bmOgM.mjs +0 -2
  390. package/dist/waiting-rooms-1xDvjF13.mjs +0 -53
  391. package/dist/workers-DK_JgS4Y.mjs +0 -38
  392. package/dist/workers-builds-CdhwmmsQ.mjs +0 -14
  393. package/dist/workers-for-platforms-CP6IqxrK.mjs +0 -42
  394. package/dist/workflows-CA5K8FFb.mjs +0 -43
  395. /package/dist/{Page-DAgOEX17.mjs → Page-BShsqCXr.mjs} +0 -0
  396. /package/dist/{alerts-D3iKtzoN.mjs → alerts-BSON-vFh.mjs} +0 -0
  397. /package/dist/{args-CXgkQKK7.mjs → args-CfbYkeXd.mjs} +0 -0
  398. /package/dist/{autorag-pvRfDwne.mjs → autorag-kNrLiqDX.mjs} +0 -0
  399. /package/dist/{body-parser-NjzJZMOV.mjs → body-parser-DkHKPkJ7.mjs} +0 -0
  400. /package/dist/{brands-DP5Ndir1.mjs → brands-bBJgbbOH.mjs} +0 -0
  401. /package/dist/{browser-extension-Dee2Y1qn.mjs → browser-extension-C1_fcw7h.mjs} +0 -0
  402. /package/dist/{clear-qLKPlJqb.mjs → clear-BW9vLgI3.mjs} +0 -0
  403. /package/dist/{cli-types-_Kmwfpnp.mjs → cli-types-9oYmRTHJ.mjs} +0 -0
  404. /package/dist/{connector-telemetry-events-latest-_aCmWeZx.mjs → connector-telemetry-events-latest-BQdOvbWh.mjs} +0 -0
  405. /package/dist/{connector-telemetry-snapshots-latest-CffEplpV.mjs → connector-telemetry-snapshots-latest-CtdN_dGu.mjs} +0 -0
  406. /package/dist/{delegate-CCGgla7X.mjs → delegate-Tgfxa-MZ.mjs} +0 -0
  407. /package/dist/{domain-info-BQh9XapD.mjs → domain-info-BkcBcyfF.mjs} +0 -0
  408. /package/dist/{errors-cuuW88wR.mjs → errors-_sob7Ihu.mjs} +0 -0
  409. /package/dist/{health--10IShMi.mjs → health-CTaCeVyC.mjs} +0 -0
  410. /package/dist/{input-validation-0CeePPHp.mjs → input-validation-D7z60HJH.mjs} +0 -0
  411. /package/dist/{internal-BUs583vv.mjs → internal-BYS7hO8c.mjs} +0 -0
  412. /package/dist/{live-VCSxA0N9.mjs → live-BJE_YWE1.mjs} +0 -0
  413. /package/dist/{project-settings-Bf6rReo1.mjs → project-settings-nBMEx1f-.mjs} +0 -0
  414. /package/dist/{r2-data-catalog-Bg7zq1IB.mjs → r2-data-catalog-BRo-Rx2I.mjs} +0 -0
  415. /package/dist/{rate-limit-analytics-D3q0mGv2.mjs → rate-limit-analytics-BiRyU0Xd.mjs} +0 -0
  416. /package/dist/{rate-limits-BIxlBuMn.mjs → rate-limits-Cr2zpncO.mjs} +0 -0
  417. /package/dist/{ready-CAgelFmC.mjs → ready-B3pLxnjc.mjs} +0 -0
  418. /package/dist/{recent-submissions-B3TOjNmk.mjs → recent-submissions-JLOvuZq-.mjs} +0 -0
  419. /package/dist/{refute-BZNkFpBB.mjs → refute-Dp3VodMn.mjs} +0 -0
  420. /package/dist/{scan-logo-StecHiaf.mjs → scan-logo-3Zr6CDJB.mjs} +0 -0
  421. /package/dist/{scan-page-B4adr-vD.mjs → scan-page-CxeudOzj.mjs} +0 -0
  422. /package/dist/{search-Devngw4M.mjs → search-B_P5ZTQj.mjs} +0 -0
  423. /package/dist/{signed-url-ChR5eXXd.mjs → signed-url-D5RwvrQq.mjs} +0 -0
  424. /package/dist/{submission-info-BGb81HZN.mjs → submission-info-_t78q2OE.mjs} +0 -0
  425. /package/dist/{total-queries-_wa6KxEl.mjs → total-queries-CPrKEciQ.mjs} +0 -0
  426. /package/dist/{tracked-domains-BesKGqfI.mjs → tracked-domains-CTRItgFT.mjs} +0 -0
  427. /package/dist/{verify-CYM5GlPu.mjs → verify-5KcvRk-q.mjs} +0 -0
@@ -1,102 +0,0 @@
1
- #!/usr/bin/env node
2
- import{t as e}from"./local-rYpzEQb-.mjs";import{i as t,n}from"./auth-Br-t8vL_.mjs";import{a as r,t as i}from"./context-CquYYyS3.mjs";import{t as a}from"./output-ClYel9WX.mjs";import{t as o}from"./dry-run-p9Q7nMZ5.mjs";import{t as s}from"./progress-TLUEIYE6.mjs";import{t as c}from"./run-iFM5TxtQ.mjs";import"./telemetry-DoBQOGRk.mjs";import{i as l,n as u,r as d,t as f}from"./body-parser-NjzJZMOV.mjs";import{n as p,t as m}from"./input-validation-0CeePPHp.mjs";import{a as h,n as g}from"./prompt-Ck_1PCHm.mjs";import{t as ee}from"./cli-types-_Kmwfpnp.mjs";import{n as te,t as _}from"./raw-fetch-DNxNCoeP.mjs";function v(e){return e.usage(`$0 stream keys create
3
-
4
- Creates an RSA private key in PEM and JWK formats. Key files are only displayed once after creation. Keys are created, used, and deleted independently of videos, and every key can sign any video.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const y={command:`create`,describe:`Create signing keys`,builder:v,handler:async t=>c({command:`stream keys create`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){o({command:`cf stream keys create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/stream/keys`,pathParams:{},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l,a(await s(`Creating`,async()=>c.stream.keys.create({account_id:l})),{successLabel:`Created`})})};function b(e){return e.usage(`$0 stream keys delete <identifier>
5
-
6
- Deletes signing keys and revokes all signed URLs generated with the key.`).positional(`identifier`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const x={command:`delete <identifier>`,describe:`Delete signing keys`,builder:b,handler:async t=>c({command:`stream keys delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){o({command:`cf stream keys delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/stream/keys/${t.identifier==null?`<identifier>`:encodeURIComponent(String(t.identifier))}`,pathParams:{identifier:String(t.identifier??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await g({force:!!t.force,message:`Permanently delete signing key? All tokens created with this key will become unauthorized!`})){process.stderr.write(`Aborted.
7
- `);return}a(await s(`Deleting`,async()=>c.stream.keys.delete({account_id:l,identifier:t.identifier})),{successLabel:`Deleted`})})};function S(e){return e.usage(`$0 stream keys list
8
-
9
- 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 C={command:`list`,describe:`List signing keys`,builder:S,handler:async t=>c({command:`stream keys list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){o({command:`cf stream keys list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/stream/keys`,pathParams:{},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l,a(await s(`Loading`,async()=>c.stream.keys.list({account_id:l})),{successLabel:`Loaded`})})},w={command:`keys`,describe:`Signing keys used to generate short-lived signed URLs for private video playback`,builder:e=>e.command(y).command(x).command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function T(e){return e.usage(`$0 stream live-inputs create
10
-
11
- 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(`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`]}).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 E={command:`create`,describe:`Create a live input`,builder:T,handler:async d=>c({command:`stream live-inputs create`,classification:{safeFlags:[`enabled`,`prefer-low-latency`,`recording-hide-live-viewer-count`,`recording-mode`,`recording-require-signed-urls`,`dry-run`]}},d,async()=>{let c={};if(d[`idempotency-key`]!==void 0&&(c[`Idempotency-Key`]=String(d[`idempotency-key`])),d.dryRun){o({command:`cf stream live-inputs create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/stream/live_inputs`,pathParams:{},bodyKind:`json`,body:d.body===void 0?f({defaultCreator:p(d[`default-creator`],`default-creator`,`text`),deleteRecordingAfterDays:d[`delete-recording-after-days`],enabled:d.enabled,preferLowLatency:d[`prefer-low-latency`],recording:{allowedOrigins:d[`recording-allowed-origins`],hideLiveViewerCount:d[`recording-hide-live-viewer-count`],mode:p(d[`recording-mode`],`recording-mode`,`text`),requireSignedURLs:d[`recording-require-signed-urls`],timeoutSeconds:d[`recording-timeout-seconds`]}}):u(d.body)});return}let m=await n(d),h=d.local?e:await i();if(d.accountId=h,d.body){let e=u(d.body);a(await s(`Creating`,async()=>t(m,`POST`,`/accounts/${h}/stream/live_inputs`,{body:e,headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Created`});return}let g={};d[`default-creator`]!==void 0&&l(g,[`defaultCreator`],p(d[`default-creator`],`default-creator`,`text`)),d[`delete-recording-after-days`]!==void 0&&l(g,[`deleteRecordingAfterDays`],d[`delete-recording-after-days`]),d.enabled!==void 0&&l(g,[`enabled`],d.enabled),d[`prefer-low-latency`]!==void 0&&l(g,[`preferLowLatency`],d[`prefer-low-latency`]),d[`recording-allowed-origins`]!==void 0&&l(g,[`recording`,`allowedOrigins`],d[`recording-allowed-origins`]),d[`recording-hide-live-viewer-count`]!==void 0&&l(g,[`recording`,`hideLiveViewerCount`],d[`recording-hide-live-viewer-count`]),d[`recording-mode`]!==void 0&&l(g,[`recording`,`mode`],p(d[`recording-mode`],`recording-mode`,`text`)),d[`recording-require-signed-urls`]!==void 0&&l(g,[`recording`,`requireSignedURLs`],d[`recording-require-signed-urls`]),d[`recording-timeout-seconds`]!==void 0&&l(g,[`recording`,`timeoutSeconds`],d[`recording-timeout-seconds`]),a(await s(`Creating`,async()=>t(m,`POST`,`/accounts/${h}/stream/live_inputs`,{body:Object.keys(g).length>0?g:void 0,headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Created`})})};function D(e){return e.usage(`$0 stream live-inputs delete <live-input-identifier>
12
-
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 O={command:`delete <live-input-identifier>`,describe:`Delete a live input`,builder:D,handler:async t=>c({command:`stream live-inputs delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){o({command:`cf stream live-inputs delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/stream/live_inputs/${t[`live-input-identifier`]==null?`<live-input-identifier>`:encodeURIComponent(String(t[`live-input-identifier`]))}`,pathParams:{"live-input-identifier":String(t[`live-input-identifier`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await g({force:!!t.force,message:`Permanently delete this live input? It cannot be recreated.`})){process.stderr.write(`Aborted.
14
- `);return}a(await s(`Deleting`,async()=>c.stream.liveInputs.delete({account_id:l,live_input_identifier:t[`live-input-identifier`]})),{successLabel:`Deleted`})})};function k(e){return e.usage(`$0 stream live-inputs disable <live-input-identifier>
15
-
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 A={command:`disable <live-input-identifier>`,describe:`Disable a live input`,builder:k,handler:async t=>c({command:`stream live-inputs disable`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){o({command:`cf stream live-inputs disable`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/stream/live_inputs/${t[`live-input-identifier`]==null?`<live-input-identifier>`:encodeURIComponent(String(t[`live-input-identifier`]))}/disable`,pathParams:{"live-input-identifier":String(t[`live-input-identifier`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await g({force:!!t.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}a(await s(`Deleting`,async()=>c.stream.liveInputs.disable({account_id:l,live_input_identifier:t[`live-input-identifier`]})),{successLabel:`Deleted`})})};function j(e){return e.usage(`$0 stream live-inputs enable <live-input-identifier>
18
-
19
- Allows a disabled live input to start receiving broadcasts again.`).positional(`live-input-identifier`,{type:`string`,description:`A unique identifier for a live input.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const M={command:`enable <live-input-identifier>`,describe:`Enable a live input`,builder:j,handler:async t=>c({command:`stream live-inputs enable`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){o({command:`cf stream live-inputs enable`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/stream/live_inputs/${t[`live-input-identifier`]==null?`<live-input-identifier>`:encodeURIComponent(String(t[`live-input-identifier`]))}/enable`,pathParams:{"live-input-identifier":String(t[`live-input-identifier`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l,a(await s(`Creating`,async()=>c.stream.liveInputs.enable({account_id:l,live_input_identifier:t[`live-input-identifier`]})),{successLabel:`Created`})})};function N(e){return e.usage(`$0 stream live-inputs get <live-input-identifier>
20
-
21
- Retrieves details of an existing live input.`).positional(`live-input-identifier`,{type:`string`,description:`A unique identifier for a live input.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const P={command:`get <live-input-identifier>`,describe:`Retrieve a live input`,builder:N,handler:async t=>c({command:`stream live-inputs get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){o({command:`cf stream live-inputs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/stream/live_inputs/${t[`live-input-identifier`]==null?`<live-input-identifier>`:encodeURIComponent(String(t[`live-input-identifier`]))}`,pathParams:{"live-input-identifier":String(t[`live-input-identifier`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l,a(await s(`Loading`,async()=>c.stream.liveInputs.get({account_id:l,live_input_identifier:t[`live-input-identifier`]})),{successLabel:`Loaded`})})};function F(e){return e.usage(`$0 stream live-inputs list
22
-
23
- Lists the live inputs created for an account. To get the credentials needed to stream to a specific live input, request a single live input.`).option(`include-counts`,{type:`boolean`,description:`Includes the total number of videos associated with the submitted query parameters.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const I={command:`list`,describe:`List live inputs`,builder:F,handler:async t=>c({command:`stream live-inputs list`,classification:{safeFlags:[`include-counts`,`dry-run`]}},t,async()=>{let c={include_counts:t[`include-counts`]};if(t.dryRun){o({command:`cf stream live-inputs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/stream/live_inputs`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await i();t.accountId=u,a(await s(`Loading`,async()=>l.stream.liveInputs.list({account_id:u,...c})),{successLabel:`Loaded`})})};function L(e){return e.usage(`$0 stream live-inputs outputs create <live-input-identifier>
24
-
25
- 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 R={command:`create <live-input-identifier>`,describe:`Create a new output, connected to a live input`,builder:L,handler:async t=>c({command:`stream live-inputs outputs create`,classification:{safeFlags:[`enabled`,`dry-run`]}},t,async()=>{if(t.dryRun){o({command:`cf stream live-inputs outputs create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/stream/live_inputs/${t[`live-input-identifier`]==null?`<live-input-identifier>`:encodeURIComponent(String(t[`live-input-identifier`]))}/outputs`,pathParams:{"live-input-identifier":String(t[`live-input-identifier`]??``)},bodyKind:`json`,body:t.body===void 0?f({enabled:t.enabled,streamKey:p(t[`stream-key`],`stream-key`,`text`),url:p(t.url,`url`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body);a(await s(`Creating`,async()=>c.stream.liveInputs.outputs.create({...e,account_id:l,live_input_identifier:t[`live-input-identifier`]})),{successLabel:`Created`});return}t[`stream-key`]===void 0&&(t[`stream-key`]=await h(`stream-key`,`The streamKey used to authenticate against an output's target.`,{kind:`secret`})),t.url===void 0&&(t.url=await h(`url`,`The URL an output uses to restream.`,{kind:`secret`}));let d=f({enabled:t.enabled,streamKey:p(t[`stream-key`],`stream-key`,`text`),url:p(t.url,`url`,`text`)});a(await s(`Creating`,async()=>c.stream.liveInputs.outputs.create({...d,account_id:l,live_input_identifier:t[`live-input-identifier`]})),{successLabel:`Created`})})};function z(e){return e.usage(`$0 stream live-inputs outputs delete <output-identifier>
26
-
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 B={command:`delete <output-identifier>`,describe:`Delete an output`,builder:z,handler:async t=>c({command:`stream live-inputs outputs delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){o({command:`cf stream live-inputs outputs delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/stream/live_inputs/${t[`live-input-identifier`]==null?`<live-input-identifier>`:encodeURIComponent(String(t[`live-input-identifier`]))}/outputs/${t[`output-identifier`]==null?`<output-identifier>`:encodeURIComponent(String(t[`output-identifier`]))}`,pathParams:{"output-identifier":String(t[`output-identifier`]??``),"live-input-identifier":String(t[`live-input-identifier`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await g({force:!!t.force,message:`Delete this output? Any active broadcast to this target will be terminated.`})){process.stderr.write(`Aborted.
28
- `);return}a(await s(`Deleting`,async()=>c.stream.liveInputs.outputs.delete({account_id:l,live_input_identifier:t[`live-input-identifier`],output_identifier:t[`output-identifier`]})),{successLabel:`Deleted`})})};function V(e){return e.usage(`$0 stream live-inputs outputs list
29
-
30
- 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 H={command:`list`,describe:`List all outputs associated with a specified live input`,builder:V,handler:async t=>c({command:`stream live-inputs outputs list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){o({command:`cf stream live-inputs outputs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/stream/live_inputs/${t[`live-input-identifier`]==null?`<live-input-identifier>`:encodeURIComponent(String(t[`live-input-identifier`]))}/outputs`,pathParams:{"live-input-identifier":String(t[`live-input-identifier`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l,a(await s(`Loading`,async()=>c.stream.liveInputs.outputs.list({account_id:l,live_input_identifier:t[`live-input-identifier`]})),{successLabel:`Loaded`})})};function U(e){return e.usage(`$0 stream live-inputs outputs update <output-identifier>
31
-
32
- 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 W={command:`update <output-identifier>`,describe:`Update an output`,builder:U,handler:async t=>c({command:`stream live-inputs outputs update`,classification:{safeFlags:[`enabled`,`dry-run`]}},t,async()=>{if(t.dryRun){o({command:`cf stream live-inputs outputs update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/stream/live_inputs/${t[`live-input-identifier`]==null?`<live-input-identifier>`:encodeURIComponent(String(t[`live-input-identifier`]))}/outputs/${t[`output-identifier`]==null?`<output-identifier>`:encodeURIComponent(String(t[`output-identifier`]))}`,pathParams:{"output-identifier":String(t[`output-identifier`]??``),"live-input-identifier":String(t[`live-input-identifier`]??``)},bodyKind:`json`,body:t.body===void 0?f({enabled:t.enabled}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body);a(await s(`Updating`,async()=>c.stream.liveInputs.outputs.update({...e,account_id:l,live_input_identifier:t[`live-input-identifier`],output_identifier:t[`output-identifier`]})),{successLabel:`Updated`});return}if(t.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);let d=f({enabled:t.enabled});a(await s(`Updating`,async()=>c.stream.liveInputs.outputs.update({...d,account_id:l,live_input_identifier:t[`live-input-identifier`],output_identifier:t[`output-identifier`]})),{successLabel:`Updated`})})},G={command:`outputs`,describe:`Operations for live-inputs.outputs`,builder:e=>e.command(R).command(B).command(H).command(W).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function K(e){return e.usage(`$0 stream live-inputs rotate-keys <live-input-identifier>
33
-
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 q={command:`rotate-keys <live-input-identifier>`,describe:`Rotate keys for a live input`,builder:K,handler:async t=>c({command:`stream live-inputs rotate-keys`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){o({command:`cf stream live-inputs rotate-keys`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/stream/live_inputs/${t[`live-input-identifier`]==null?`<live-input-identifier>`:encodeURIComponent(String(t[`live-input-identifier`]))}/rotate_keys`,pathParams:{"live-input-identifier":String(t[`live-input-identifier`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await g({force:!!t.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}a(await s(`Deleting`,async()=>c.stream.liveInputs.rotateKeys({account_id:l,live_input_identifier:t[`live-input-identifier`]})),{successLabel:`Deleted`})})};function J(e){return e.usage(`$0 stream live-inputs update <live-input-identifier>
36
-
37
- 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(`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`]}).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 Y={command:`update <live-input-identifier>`,describe:`Update a live input`,builder:J,handler:async t=>c({command:`stream live-inputs update`,classification:{safeFlags:[`enabled`,`prefer-low-latency`,`recording-hide-live-viewer-count`,`recording-mode`,`recording-require-signed-urls`,`dry-run`]}},t,async()=>{if(t.dryRun){o({command:`cf stream live-inputs update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/stream/live_inputs/${t[`live-input-identifier`]==null?`<live-input-identifier>`:encodeURIComponent(String(t[`live-input-identifier`]))}`,pathParams:{"live-input-identifier":String(t[`live-input-identifier`]??``)},bodyKind:`json`,body:t.body===void 0?f({defaultCreator:p(t[`default-creator`],`default-creator`,`text`),deleteRecordingAfterDays:t[`delete-recording-after-days`],enabled:t.enabled,preferLowLatency:t[`prefer-low-latency`],recording:{allowedOrigins:t[`recording-allowed-origins`],hideLiveViewerCount:t[`recording-hide-live-viewer-count`],mode:p(t[`recording-mode`],`recording-mode`,`text`),requireSignedURLs:t[`recording-require-signed-urls`],timeoutSeconds:t[`recording-timeout-seconds`]}}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body);a(await s(`Updating`,async()=>c.stream.liveInputs.update({...e,account_id:l,live_input_identifier:t[`live-input-identifier`]})),{successLabel:`Updated`});return}let d=f({defaultCreator:p(t[`default-creator`],`default-creator`,`text`),deleteRecordingAfterDays:t[`delete-recording-after-days`],enabled:t.enabled,preferLowLatency:t[`prefer-low-latency`],recording:{allowedOrigins:t[`recording-allowed-origins`],hideLiveViewerCount:t[`recording-hide-live-viewer-count`],mode:p(t[`recording-mode`],`recording-mode`,`text`),requireSignedURLs:t[`recording-require-signed-urls`],timeoutSeconds:t[`recording-timeout-seconds`]}});a(await s(`Updating`,async()=>c.stream.liveInputs.update({...d,account_id:l,live_input_identifier:t[`live-input-identifier`]})),{successLabel:`Updated`})})},X={command:`live-inputs`,describe:`Enable and disable live input streams`,builder:e=>e.command(E).command(O).command(A).command(M).command(P).command(I).command(q).command(Y).command(G).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Z(e){return e.usage(`$0 stream storage-usage
38
-
39
- Returns information about an account's storage use.`).option(`creator`,{type:`string`,description:`A user-defined identifier for the media creator.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Q={command:`storage-usage`,describe:`Storage use`,builder:Z,handler:async t=>c({command:`stream storage-usage`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let c={creator:t.creator};if(t.dryRun){o({command:`cf stream storage-usage`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/stream/storage-usage`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await i();t.accountId=u,a(await s(`Loading`,async()=>l.stream.storageUsage({account_id:u,...c})),{successLabel:`Loaded`})})};function ne(e){return e.usage(`$0 stream videos audio-tracks copy <identifier>
40
-
41
- 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 re={command:`copy <identifier>`,describe:`Add audio tracks to a video`,builder:ne,handler:async t=>c({command:`stream videos audio-tracks copy`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){o({command:`cf stream videos audio-tracks copy`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/stream/${t.identifier==null?`<identifier>`:encodeURIComponent(String(t.identifier))}/audio/copy`,pathParams:{identifier:String(t.identifier??``)},bodyKind:`json`,body:t.body===void 0?f({label:p(t.label,`label`,`text`),url:p(t.url,`url`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body);a(await s(`Creating`,async()=>c.stream.videos.audioTracks.copy({...e,account_id:l,identifier:t.identifier})),{successLabel:`Created`});return}t.label===void 0&&(t.label=await h(`label`,`A string to uniquely identify the track amongst other audio track labels for the specified video.`));let d=f({label:p(t.label,`label`,`text`),url:p(t.url,`url`,`text`)});a(await s(`Creating`,async()=>c.stream.videos.audioTracks.copy({...d,account_id:l,identifier:t.identifier})),{successLabel:`Created`})})};function ie(e){return e.usage(`$0 stream videos audio-tracks delete <audio-identifier>
42
-
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 ae={command:`delete <audio-identifier>`,describe:`Delete additional audio tracks on a video`,builder:ie,handler:async t=>c({command:`stream videos audio-tracks delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){o({command:`cf stream videos audio-tracks delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/stream/${t.identifier==null?`<identifier>`:encodeURIComponent(String(t.identifier))}/audio/${t[`audio-identifier`]==null?`<audio-identifier>`:encodeURIComponent(String(t[`audio-identifier`]))}`,pathParams:{identifier:String(t.identifier??``),"audio-identifier":String(t[`audio-identifier`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await g({force:!!t.force,message:`Permanently delete this audio track?`})){process.stderr.write(`Aborted.
44
- `);return}a(await s(`Deleting`,async()=>c.stream.videos.audioTracks.delete({account_id:l,identifier:t.identifier,audio_identifier:t[`audio-identifier`]})),{successLabel:`Deleted`})})};function oe(e){return e.usage("$0 stream videos audio-tracks edit <audio-identifier>\n\nEdits additional audio tracks on a video. Editing the default status of an audio track to `true` will mark all other audio tracks on the video default status to `false`.").positional(`audio-identifier`,{type:`string`,description:`The unique identifier for an additional audio track.`,demandOption:!0}).option(`identifier`,{type:`string`,description:`A Cloudflare-generated unique identifier for a media item.`,demandOption:!0}).option(`default`,{type:`boolean`,description:`Denotes whether the audio track will be played by default in a player.`}).option(`label`,{type:`string`,description:`A string to uniquely identify the track amongst other audio track labels for the specified video.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const se={command:`edit <audio-identifier>`,describe:`Edit additional audio tracks on a video`,builder:oe,handler:async t=>c({command:`stream videos audio-tracks edit`,classification:{safeFlags:[`default`,`dry-run`]}},t,async()=>{if(t.dryRun){o({command:`cf stream videos audio-tracks edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/stream/${t.identifier==null?`<identifier>`:encodeURIComponent(String(t.identifier))}/audio/${t[`audio-identifier`]==null?`<audio-identifier>`:encodeURIComponent(String(t[`audio-identifier`]))}`,pathParams:{identifier:String(t.identifier??``),"audio-identifier":String(t[`audio-identifier`]??``)},bodyKind:`json`,body:t.body===void 0?f({default:t.default,label:p(t.label,`label`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body);a(await s(`Updating`,async()=>c.stream.videos.audioTracks.edit({...e,account_id:l,identifier:t.identifier,audio_identifier:t[`audio-identifier`]})),{successLabel:`Updated`});return}let d=f({default:t.default,label:p(t.label,`label`,`text`)});a(await s(`Updating`,async()=>c.stream.videos.audioTracks.edit({...d,account_id:l,identifier:t.identifier,audio_identifier:t[`audio-identifier`]})),{successLabel:`Updated`})})};function ce(e){return e.usage(`$0 stream videos audio-tracks list
45
-
46
- 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 le={command:`list`,describe:`List additional audio tracks on a video`,builder:ce,handler:async t=>c({command:`stream videos audio-tracks list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){o({command:`cf stream videos audio-tracks list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/stream/${t.identifier==null?`<identifier>`:encodeURIComponent(String(t.identifier))}/audio`,pathParams:{identifier:String(t.identifier??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l,a(await s(`Loading`,async()=>c.stream.videos.audioTracks.list({account_id:l,identifier:t.identifier})),{successLabel:`Loaded`})})},ue={command:`audio-tracks`,describe:`Operations for videos.audio-tracks`,builder:e=>e.command(re).command(ae).command(se).command(le).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function de(e){return e.usage(`$0 stream videos captions language delete <language>
47
-
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 fe={command:`delete <language>`,describe:`Delete captions or subtitles`,builder:de,handler:async t=>c({command:`stream videos captions language delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){o({command:`cf stream videos captions language delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/stream/${t.identifier==null?`<identifier>`:encodeURIComponent(String(t.identifier))}/captions/${t.language==null?`<language>`:encodeURIComponent(String(t.language))}`,pathParams:{language:String(t.language??``),identifier:String(t.identifier??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await g({force:!!t.force,message:`Remove this caption?`})){process.stderr.write(`Aborted.
49
- `);return}a(await s(`Deleting`,async()=>c.stream.videos.captions.language.delete({account_id:l,identifier:t.identifier,language:t.language})),{successLabel:`Deleted`})})};function pe(e){return e.usage(`$0 stream videos captions language generate <language>
50
-
51
- 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 me={command:`generate <language>`,describe:`Generate captions or subtitles for a provided language via AI`,builder:pe,handler:async t=>c({command:`stream videos captions language generate`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){o({command:`cf stream videos captions language generate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/stream/${t.identifier==null?`<identifier>`:encodeURIComponent(String(t.identifier))}/captions/${t.language==null?`<language>`:encodeURIComponent(String(t.language))}/generate`,pathParams:{language:String(t.language??``),identifier:String(t.identifier??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l,a(await s(`Creating`,async()=>c.stream.videos.captions.language.generate({account_id:l,identifier:t.identifier,language:t.language})),{successLabel:`Created`})})};function he(e){return e.usage(`$0 stream videos captions language get <language>
52
-
53
- Lists the captions or subtitles for provided language.`).positional(`language`,{type:`string`,description:`The language tag in BCP 47 format.`,demandOption:!0}).option(`identifier`,{type:`string`,description:`A Cloudflare-generated unique identifier for a media item.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ge={command:`get <language>`,describe:`List captions or subtitles for a provided language`,builder:he,handler:async t=>c({command:`stream videos captions language get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){o({command:`cf stream videos captions language get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/stream/${t.identifier==null?`<identifier>`:encodeURIComponent(String(t.identifier))}/captions/${t.language==null?`<language>`:encodeURIComponent(String(t.language))}`,pathParams:{language:String(t.language??``),identifier:String(t.identifier??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l,a(await s(`Loading`,async()=>c.stream.videos.captions.language.get({account_id:l,identifier:t.identifier,language:t.language})),{successLabel:`Loaded`})})};function _e(e){return e.usage(`$0 stream videos captions language upload <language>
54
-
55
- Uploads the caption or subtitle file to the endpoint for a specific BCP47 language. One caption or subtitle file per language is allowed.`).positional(`language`,{type:`string`,description:`The language tag in BCP 47 format.`,demandOption:!0}).option(`identifier`,{type:`string`,description:`A Cloudflare-generated unique identifier for a media item.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`})}const ve={command:`upload <language>`,describe:`Upload captions or subtitles`,builder:_e,handler:async l=>c({command:`stream videos captions language upload`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){o({command:`cf stream videos captions language upload`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/stream/${l.identifier==null?`<identifier>`:encodeURIComponent(String(l.identifier))}/captions/${l.language==null?`<language>`:encodeURIComponent(String(l.language))}`,pathParams:{language:String(l.language??``),identifier:String(l.identifier??``)},bodyKind:`multipart`,body:{body:l.body,file:l.file}});return}let c=await n(l),u=l.local?e:await i();if(l.accountId=u,l.file!==void 0||l.body!==void 0){let e=new FormData;if(l.file){let t=m(l.file);e.append(`file`,new Blob([t]),l.file.split(/[\\/]/).filter(Boolean).pop())}else l.body!==void 0&&e.append(`file`,l.body);a(await s(`Updating`,async()=>t(c,`PUT`,`/accounts/${u}/stream/${encodeURIComponent(String(l.identifier))}/captions/${encodeURIComponent(String(l.language))}`,{body:e})),{successLabel:`Updated`});return}if(l.body){let e=p(l.body,`body`,`binary`);a(await s(`Updating`,async()=>t(c,`PUT`,`/accounts/${u}/stream/${encodeURIComponent(String(l.identifier))}/captions/${encodeURIComponent(String(l.language))}`,{body:e,headers:{"Content-Type":`multipart/form-data`}})),{successLabel:`Updated`});return}if(l.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function ye(e){return e.usage(`$0 stream videos captions language vtt get <language>
56
-
57
- Return WebVTT captions for a provided language.`).positional(`language`,{type:`string`,description:`The language tag in BCP 47 format.`,demandOption:!0}).option(`identifier`,{type:`string`,description:`A Cloudflare-generated unique identifier for a media item.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const be={command:`get <language>`,describe:`Return WebVTT captions for a provided language`,builder:ye,handler:async t=>c({command:`stream videos captions language vtt get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){o({command:`cf stream videos captions language vtt get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/stream/${t.identifier==null?`<identifier>`:encodeURIComponent(String(t.identifier))}/captions/${t.language==null?`<language>`:encodeURIComponent(String(t.language))}/vtt`,pathParams:{language:String(t.language??``),identifier:String(t.identifier??``)},bodyKind:`none`});return}await n(t);let a=t.local?e:await i();t.accountId=a,te((await s(`Loading`,async()=>_(`/accounts/${a}/stream/${encodeURIComponent(String(t.identifier))}/captions/${encodeURIComponent(String(t.language))}/vtt`,{method:`GET`,local:t.local===!0,persistTo:t.persistTo}))).toString(`utf-8`))})},xe={command:`vtt`,describe:`Operations for videos.captions.language.vtt`,builder:e=>e.command(be).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Se={command:`language`,describe:`Operations for videos.captions.language`,builder:e=>e.command(fe).command(me).command(ge).command(ve).command(xe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ce(e){return e.usage(`$0 stream videos captions list
58
-
59
- Lists the available captions or subtitles for a specific video.`).option(`identifier`,{type:`string`,description:`A Cloudflare-generated unique identifier for a media item.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const we={command:`list`,describe:`List captions or subtitles`,builder:Ce,handler:async t=>c({command:`stream videos captions list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){o({command:`cf stream videos captions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/stream/${t.identifier==null?`<identifier>`:encodeURIComponent(String(t.identifier))}/captions`,pathParams:{identifier:String(t.identifier??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l,a(await s(`Loading`,async()=>c.stream.videos.captions.list({account_id:l,identifier:t.identifier})),{successLabel:`Loaded`})})},Te={command:`captions`,describe:`Operations for videos.captions`,builder:e=>e.command(we).command(Se).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ee(e){return e.usage(`$0 stream videos clip
60
-
61
- Clips a video based on the specified start and end times provided in seconds.`).option(`allowed-origins`,{type:`string`,array:!0,description:"Lists the origins allowed to display the video. Enter allowed origin domains in an array and use `*` for wildcard subdomains. Empty arrays allow the video to be viewed on any origin."}).option(`clipped-from-video-uid`,{type:`string`,description:`The unique video identifier (UID).`}).option(`creator`,{type:`string`,description:`A user-defined identifier for the media creator.`}).option(`end-time-seconds`,{type:`number`,description:`Specifies the end time for the video clip in seconds.`}).option(`input`,{type:`string`,description:`A video's URL. Preferred over 'url'.`}).option(`name`,{type:`string`,description:`A name for the video.`}).option(`require-signed-urls`,{type:`boolean`,description:"Indicates whether the video can be a accessed using the UID. When set to `true`, a signed token must be generated with a signing key to view the video.",default:!1}).option(`scheduled-deletion`,{type:`string`,description:"Indicates the date and time at which the video will be deleted. Omit the field to indicate no change, or include with a `null` value to remove an existing scheduled deletion. If specified, must be at least 30 days from upload time."}).option(`start-time-seconds`,{type:`number`,description:`Specifies the start time for the video clip in seconds.`}).option(`thumbnail-timestamp-pct`,{type:`number`,description:`The timestamp for a thumbnail image calculated as a percentage value of the video's duration. To convert from a second-wise timestamp to a percentage, divide the desired timestamp by the total duration of the video. If this value is not set, the default thumbnail image is taken from 0s of the video.`,default:0}).option(`url`,{type:`string`,description:`A video's URL (legacy field, use 'input' instead).`}).option(`watermark-uid`,{type:`string`,description:`The unique identifier for the watermark profile.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const De={command:`clip`,describe:`Clip videos given a start and end time`,builder:Ee,handler:async t=>c({command:`stream videos clip`,classification:{safeFlags:[`require-signed-urls`,`dry-run`]}},t,async()=>{if(t.dryRun){o({command:`cf stream videos clip`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/stream/clip`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({allowedOrigins:t[`allowed-origins`],clippedFromVideoUID:p(t[`clipped-from-video-uid`],`clipped-from-video-uid`,`text`),creator:p(t.creator,`creator`,`text`),endTimeSeconds:t[`end-time-seconds`],input:p(t.input,`input`,`text`),name:p(t.name,`name`,`text`),requireSignedURLs:t[`require-signed-urls`],scheduledDeletion:p(t[`scheduled-deletion`],`scheduled-deletion`,`text`),startTimeSeconds:t[`start-time-seconds`],thumbnailTimestampPct:t[`thumbnail-timestamp-pct`],url:p(t.url,`url`,`text`),watermark:{uid:p(t[`watermark-uid`],`watermark-uid`,`text`)}}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body);a(await s(`Creating`,async()=>c.stream.videos.clip({...e,account_id:l})),{successLabel:`Created`});return}if(t[`clipped-from-video-uid`]===void 0&&(t[`clipped-from-video-uid`]=await h(`clipped-from-video-uid`,`The unique video identifier (UID).`)),t[`end-time-seconds`]===void 0)throw Error(`--end-time-seconds is required (or pass --body with this field set).`);if(t[`start-time-seconds`]===void 0)throw Error(`--start-time-seconds is required (or pass --body with this field set).`);let d=f({allowedOrigins:t[`allowed-origins`],clippedFromVideoUID:p(t[`clipped-from-video-uid`],`clipped-from-video-uid`,`text`),creator:p(t.creator,`creator`,`text`),endTimeSeconds:t[`end-time-seconds`],input:p(t.input,`input`,`text`),name:p(t.name,`name`,`text`),requireSignedURLs:t[`require-signed-urls`],scheduledDeletion:p(t[`scheduled-deletion`],`scheduled-deletion`,`text`),startTimeSeconds:t[`start-time-seconds`],thumbnailTimestampPct:t[`thumbnail-timestamp-pct`],url:p(t.url,`url`,`text`),watermark:{uid:p(t[`watermark-uid`],`watermark-uid`,`text`)}});a(await s(`Creating`,async()=>c.stream.videos.clip({...d,account_id:l})),{successLabel:`Created`})})};function Oe(e){return e.usage(`$0 stream videos copy
62
-
63
- Uploads a video to Stream from a provided URL.`).option(`upload-creator`,{type:`string`,description:`A user-defined identifier for the media creator.`}).option(`allowed-origins`,{type:`string`,array:!0,description:"Lists the origins allowed to display the video. Enter allowed origin domains in an array and use `*` for wildcard subdomains. Empty arrays allow the video to be viewed on any origin."}).option(`creator`,{type:`string`,description:`A user-defined identifier for the media creator.`}).option(`input`,{type:`string`,description:"A video's URL. The server must be publicly routable and support `HTTP HEAD` requests and `HTTP GET` range requests. The server should respond to `HTTP HEAD` requests with a `content-range` header that includes the size of the file. This is the preferred field over `url`."}).option(`name`,{type:`string`,description:`A video's name. Used for legacy compatibility.`}).option(`require-signed-urls`,{type:`boolean`,description:"Indicates whether the video can be a accessed using the UID. When set to `true`, a signed token must be generated with a signing key to view the video.",default:!1}).option(`scheduled-deletion`,{type:`string`,description:"Indicates the date and time at which the video will be deleted. Omit the field to indicate no change, or include with a `null` value to remove an existing scheduled deletion. If specified, must be at least 30 days from upload time."}).option(`thumbnail-timestamp-pct`,{type:`number`,description:`The timestamp for a thumbnail image calculated as a percentage value of the video's duration. To convert from a second-wise timestamp to a percentage, divide the desired timestamp by the total duration of the video. If this value is not set, the default thumbnail image is taken from 0s of the video.`,default:0}).option(`url`,{type:`string`,description:"A video's URL. The server must be publicly routable and support `HTTP HEAD` requests and `HTTP GET` range requests. The server should respond to `HTTP HEAD` requests with a `content-range` header that includes the size of the file. This field is deprecated in favor of `input`."}).option(`watermark-uid`,{type:`string`,description:`The unique identifier for the watermark profile.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:"Copy upload request. Provide `input` (preferred) or `url` (deprecated)."})}const ke={command:`copy`,describe:`Upload videos from a URL`,builder:Oe,handler:async d=>c({command:`stream videos copy`,classification:{safeFlags:[`require-signed-urls`,`dry-run`]}},d,async()=>{let c={};if(d[`upload-creator`]!==void 0&&(c[`Upload-Creator`]=String(d[`upload-creator`])),d.dryRun){o({command:`cf stream videos copy`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/stream/copy`,pathParams:{},bodyKind:`json`,body:d.body===void 0?f({allowedOrigins:d[`allowed-origins`],creator:p(d.creator,`creator`,`text`),input:p(d.input,`input`,`text`),name:p(d.name,`name`,`text`),requireSignedURLs:d[`require-signed-urls`],scheduledDeletion:p(d[`scheduled-deletion`],`scheduled-deletion`,`text`),thumbnailTimestampPct:d[`thumbnail-timestamp-pct`],url:p(d.url,`url`,`text`),watermark:{uid:p(d[`watermark-uid`],`watermark-uid`,`text`)}}):u(d.body)});return}let m=await n(d),h=d.local?e:await i();if(d.accountId=h,d.body){let e=u(d.body);a(await s(`Creating`,async()=>t(m,`POST`,`/accounts/${h}/stream/copy`,{body:e,headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Created`});return}let g={};d[`allowed-origins`]!==void 0&&l(g,[`allowedOrigins`],d[`allowed-origins`]),d.creator!==void 0&&l(g,[`creator`],p(d.creator,`creator`,`text`)),d.input!==void 0&&l(g,[`input`],p(d.input,`input`,`text`)),d.name!==void 0&&l(g,[`name`],p(d.name,`name`,`text`)),d[`require-signed-urls`]!==void 0&&l(g,[`requireSignedURLs`],d[`require-signed-urls`]),d[`scheduled-deletion`]!==void 0&&l(g,[`scheduledDeletion`],p(d[`scheduled-deletion`],`scheduled-deletion`,`text`)),d[`thumbnail-timestamp-pct`]!==void 0&&l(g,[`thumbnailTimestampPct`],d[`thumbnail-timestamp-pct`]),d.url!==void 0&&l(g,[`url`],p(d.url,`url`,`text`)),d[`watermark-uid`]!==void 0&&l(g,[`watermark`,`uid`],p(d[`watermark-uid`],`watermark-uid`,`text`)),a(await s(`Creating`,async()=>t(m,`POST`,`/accounts/${h}/stream/copy`,{body:Object.keys(g).length>0?g:void 0,headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Created`})})};function Ae(e){return e.usage(`$0 stream videos create
64
-
65
- 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
- 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 je={command:`create`,describe:`Initiate video uploads using TUS`,builder:Ae,handler:async l=>c({command:`stream videos create`,classification:{safeFlags:[`direct-user`,`dry-run`]}},l,async()=>{let c={direct_user:l[`direct-user`]},u={};if(l[`tus-resumable`]!==void 0&&(u[`Tus-Resumable`]=String(l[`tus-resumable`])),l[`upload-creator`]!==void 0&&(u[`Upload-Creator`]=String(l[`upload-creator`])),l[`upload-length`]!==void 0&&(u[`Upload-Length`]=String(l[`upload-length`])),l[`upload-metadata`]!==void 0&&(u[`Upload-Metadata`]=String(l[`upload-metadata`])),l.dryRun){o({command:`cf stream videos create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/stream`,pathParams:{},query:c,bodyKind:`none`});return}let d=await n(l),f=l.local?e:await i();l.accountId=f,a(await s(`Creating`,async()=>t(d,`POST`,`/accounts/${f}/stream`,{query:c,headers:Object.keys(u).length>0?u:void 0})),{successLabel:`Created`})})};function Me(e){return e.usage(`$0 stream videos delete <identifier>
67
-
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 Ne={command:`delete <identifier>`,describe:`Delete video`,builder:Me,handler:async t=>c({command:`stream videos delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){o({command:`cf stream videos delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/stream/${t.identifier==null?`<identifier>`:encodeURIComponent(String(t.identifier))}`,pathParams:{identifier:String(t.identifier??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await g({force:!!t.force,message:`Permanently delete this video?`})){process.stderr.write(`Aborted.
69
- `);return}a(await s(`Deleting`,async()=>c.stream.videos.delete({account_id:l,identifier:t.identifier})),{successLabel:`Deleted`})})};function Pe(e){return e.usage(`$0 stream videos direct-upload create
70
-
71
- 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(`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 Fe={command:`create`,describe:`Upload videos via direct upload URLs`,builder:Pe,handler:async d=>c({command:`stream videos direct-upload create`,classification:{safeFlags:[`require-signed-urls`,`dry-run`]}},d,async()=>{let c={};if(d[`upload-creator`]!==void 0&&(c[`Upload-Creator`]=String(d[`upload-creator`])),d.dryRun){o({command:`cf stream videos direct-upload create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/stream/direct_upload`,pathParams:{},bodyKind:`json`,body:d.body===void 0?f({allowedOrigins:d[`allowed-origins`],creator:p(d.creator,`creator`,`text`),expiry:p(d.expiry,`expiry`,`text`),maxDurationSeconds:d[`max-duration-seconds`],requireSignedURLs:d[`require-signed-urls`],scheduledDeletion:p(d[`scheduled-deletion`],`scheduled-deletion`,`text`),thumbnailTimestampPct:d[`thumbnail-timestamp-pct`],watermark:{uid:p(d[`watermark-uid`],`watermark-uid`,`text`)}}):u(d.body)});return}let m=await n(d),h=d.local?e:await i();if(d.accountId=h,d.body){let e=u(d.body);a(await s(`Creating`,async()=>t(m,`POST`,`/accounts/${h}/stream/direct_upload`,{body:e,headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Created`});return}if(d[`max-duration-seconds`]===void 0)throw Error(`--max-duration-seconds is required (or pass --body with this field set).`);let g={};d[`allowed-origins`]!==void 0&&l(g,[`allowedOrigins`],d[`allowed-origins`]),d.creator!==void 0&&l(g,[`creator`],p(d.creator,`creator`,`text`)),d.expiry!==void 0&&l(g,[`expiry`],p(d.expiry,`expiry`,`text`)),d[`max-duration-seconds`]!==void 0&&l(g,[`maxDurationSeconds`],d[`max-duration-seconds`]),d[`require-signed-urls`]!==void 0&&l(g,[`requireSignedURLs`],d[`require-signed-urls`]),d[`scheduled-deletion`]!==void 0&&l(g,[`scheduledDeletion`],p(d[`scheduled-deletion`],`scheduled-deletion`,`text`)),d[`thumbnail-timestamp-pct`]!==void 0&&l(g,[`thumbnailTimestampPct`],d[`thumbnail-timestamp-pct`]),d[`watermark-uid`]!==void 0&&l(g,[`watermark`,`uid`],p(d[`watermark-uid`],`watermark-uid`,`text`)),a(await s(`Creating`,async()=>t(m,`POST`,`/accounts/${h}/stream/direct_upload`,{body:Object.keys(g).length>0?g:void 0,headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Created`})})},Ie={command:`direct-upload`,describe:`Operations for videos.direct-upload`,builder:e=>e.command(Fe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Le(e){return e.usage(`$0 stream videos downloads create <download-type>
72
-
73
- 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 Re={command:`create <download-type>`,describe:`Create download`,builder:Le,handler:async t=>c({command:`stream videos downloads create`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){o({command:`cf stream videos downloads create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/stream/${t.identifier==null?`<identifier>`:encodeURIComponent(String(t.identifier))}/downloads/${t[`download-type`]==null?`<download-type>`:encodeURIComponent(String(t[`download-type`]))}`,pathParams:{identifier:String(t.identifier??``),"download-type":String(t[`download-type`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l,a(await s(`Creating`,async()=>c.stream.videos.downloads.create({account_id:l,identifier:t.identifier,download_type:t[`download-type`]})),{successLabel:`Created`})})};function ze(e){return e.usage(`$0 stream videos downloads delete <download-type>
74
-
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 Be={command:`delete <download-type>`,describe:`Delete download`,builder:ze,handler:async t=>c({command:`stream videos downloads delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){o({command:`cf stream videos downloads delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/stream/${t.identifier==null?`<identifier>`:encodeURIComponent(String(t.identifier))}/downloads/${t[`download-type`]==null?`<download-type>`:encodeURIComponent(String(t[`download-type`]))}`,pathParams:{identifier:String(t.identifier??``),"download-type":String(t[`download-type`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await g({force:!!t.force,message:`Remove this download? It will need to be regenerated for future use.`})){process.stderr.write(`Aborted.
76
- `);return}a(await s(`Deleting`,async()=>c.stream.videos.downloads.delete({account_id:l,identifier:t.identifier,download_type:t[`download-type`]})),{successLabel:`Deleted`})})},Ve={command:`downloads`,describe:`Operations for videos.downloads`,builder:e=>e.command(Re).command(Be).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function He(e){return e.usage(`$0 stream videos edit <identifier>
77
-
78
- 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(`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 Ue={command:`edit <identifier>`,describe:`Edit video details`,builder:He,handler:async t=>c({command:`stream videos edit`,classification:{safeFlags:[`require-signed-urls`,`dry-run`]}},t,async()=>{if(t.dryRun){o({command:`cf stream videos edit`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/stream/${t.identifier==null?`<identifier>`:encodeURIComponent(String(t.identifier))}`,pathParams:{identifier:String(t.identifier??``)},bodyKind:`json`,body:t.body===void 0?f({allowedOrigins:t[`allowed-origins`],creator:p(t.creator,`creator`,`text`),maxDurationSeconds:t[`max-duration-seconds`],publicDetails:{channel_link:p(t[`public-details-channel-link`],`public-details-channel-link`,`text`),logo:p(t[`public-details-logo`],`public-details-logo`,`text`),share_link:p(t[`public-details-share-link`],`public-details-share-link`,`text`),title:p(t[`public-details-title`],`public-details-title`,`text`)},requireSignedURLs:t[`require-signed-urls`],scheduledDeletion:p(t[`scheduled-deletion`],`scheduled-deletion`,`text`),thumbnailTimestampPct:t[`thumbnail-timestamp-pct`],uid:p(t.uid,`uid`,`text`),uploadExpiry:p(t[`upload-expiry`],`upload-expiry`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body);a(await s(`Creating`,async()=>c.stream.videos.edit({...e,account_id:l,identifier:t.identifier})),{successLabel:`Created`});return}let d=f({allowedOrigins:t[`allowed-origins`],creator:p(t.creator,`creator`,`text`),maxDurationSeconds:t[`max-duration-seconds`],publicDetails:{channel_link:p(t[`public-details-channel-link`],`public-details-channel-link`,`text`),logo:p(t[`public-details-logo`],`public-details-logo`,`text`),share_link:p(t[`public-details-share-link`],`public-details-share-link`,`text`),title:p(t[`public-details-title`],`public-details-title`,`text`)},requireSignedURLs:t[`require-signed-urls`],scheduledDeletion:p(t[`scheduled-deletion`],`scheduled-deletion`,`text`),thumbnailTimestampPct:t[`thumbnail-timestamp-pct`],uid:p(t.uid,`uid`,`text`),uploadExpiry:p(t[`upload-expiry`],`upload-expiry`,`text`)});a(await s(`Creating`,async()=>c.stream.videos.edit({...d,account_id:l,identifier:t.identifier})),{successLabel:`Created`})})};function We(e){return e.usage(`$0 stream videos get <identifier>
79
-
80
- Fetches details for a single video.`).positional(`identifier`,{type:`string`,description:`A Cloudflare-generated unique identifier for a media item.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ge={command:`get <identifier>`,describe:`Retrieve video details`,builder:We,handler:async t=>c({command:`stream videos get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){o({command:`cf stream videos get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/stream/${t.identifier==null?`<identifier>`:encodeURIComponent(String(t.identifier))}`,pathParams:{identifier:String(t.identifier??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l,a(await s(`Loading`,async()=>c.stream.videos.get({account_id:l,identifier:t.identifier})),{successLabel:`Loaded`})})};function Ke(e){return e.usage(`$0 stream videos list
81
-
82
- 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 qe={command:`list`,describe:`List videos`,builder:ee(Ke),handler:async t=>c({command:`stream videos list`,classification:{safeFlags:[`status`,`asc`,`include-counts`,`dry-run`]}},t,async()=>{let c={status:t.status,creator:t.creator,type:t.type,asc:t.asc,video_name:t[`video-name`],search:t.search,start:t.start,end:t.end,include_counts:t[`include-counts`],id:t.id,name:t.name,live_input_id:t[`live-input-id`],before:t.before,after:t.after,limit:t.limit};if(t.dryRun){o({command:`cf stream videos list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/stream`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await i();t.accountId=u,a(await s(`Loading`,async()=>l.stream.videos.list({account_id:u,...c})),{successLabel:`Loaded`})})};function Je(e){return e.usage(`$0 stream videos token create <identifier>
83
-
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 Ye={command:`create <identifier>`,describe:`Create signed URL tokens for videos`,builder:Je,handler:async t=>c({command:`stream videos token create`,classification:{safeFlags:[`downloadable`,`flags-original`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){o({command:`cf stream videos token create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/stream/${t.identifier==null?`<identifier>`:encodeURIComponent(String(t.identifier))}/token`,pathParams:{identifier:String(t.identifier??``)},bodyKind:`json`,body:t.body===void 0?f({accessRules:d(t[`access-rules`],`access-rules`),downloadable:t.downloadable,exp:t.exp,flags:{original:t[`flags-original`]},id:p(t.id,`id`,`text`),nbf:t.nbf,pem:p(t.pem,`pem`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await g({force:!!t.force,message:`Provision temporary token? For use at scale, consider creating a signing key instead.`})){process.stderr.write(`Aborted.
85
- `);return}if(t.body){let e=u(t.body);a(await s(`Deleting`,async()=>c.stream.videos.token.create({...e,account_id:l,identifier:t.identifier})),{successLabel:`Deleted`});return}let m=f({accessRules:d(t[`access-rules`],`access-rules`),downloadable:t.downloadable,exp:t.exp,flags:{original:t[`flags-original`]},id:p(t.id,`id`,`text`),nbf:t.nbf,pem:p(t.pem,`pem`,`text`)});a(await s(`Deleting`,async()=>c.stream.videos.token.create({...m,account_id:l,identifier:t.identifier})),{successLabel:`Deleted`})})},Xe={command:`token`,describe:`Operations for videos.token`,builder:e=>e.command(Ye).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ze={command:`videos`,describe:`Aggregate video storage usage statistics for the account`,builder:e=>e.command(De).command(ke).command(je).command(Ne).command(Ue).command(Ge).command(qe).command(ue).command(Te).command(Ie).command(Ve).command(Xe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Qe(e){return e.usage(`$0 stream watermarks create
86
-
87
- 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 $e={command:`create`,describe:`Create watermark profiles via basic upload`,builder:Qe,handler:async d=>c({command:`stream watermarks create`,classification:{safeFlags:[`dry-run`]}},d,async()=>{if(d.dryRun){o({command:`cf stream watermarks create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/stream/watermarks`,pathParams:{},bodyKind:`multipart`,body:{name:d.name,opacity:d.opacity,padding:d.padding,position:d.position,scale:d.scale,url:d.url,body:d.body,file:d.file}});return}let c=await n(d),f=d.local?e:await i();if(d.accountId=f,d.file!==void 0||d.body!==void 0||d.name!==void 0||d.opacity!==void 0||d.padding!==void 0||d.position!==void 0||d.scale!==void 0){let e=new FormData;if(d.file){let t=m(d.file);e.append(`file`,new Blob([t]),d.file.split(/[\\/]/).filter(Boolean).pop())}else d.body!==void 0&&e.append(`file`,d.body);d.name!==void 0&&e.append(`name`,String(p(d.name,`name`,`text`)??``)),d.opacity!==void 0&&e.append(`opacity`,String(d.opacity)),d.padding!==void 0&&e.append(`padding`,String(d.padding)),d.position!==void 0&&e.append(`position`,String(p(d.position,`position`,`text`)??``)),d.scale!==void 0&&e.append(`scale`,String(d.scale)),a(await s(`Creating`,async()=>t(c,`POST`,`/accounts/${f}/stream/watermarks`,{body:e})),{successLabel:`Created`});return}if(d.body){let e=u(d.body);a(await s(`Creating`,async()=>t(c,`POST`,`/accounts/${f}/stream/watermarks`,{body:e})),{successLabel:`Created`});return}let h={};d.name!==void 0&&l(h,[`name`],p(d.name,`name`,`text`)),d.opacity!==void 0&&l(h,[`opacity`],d.opacity),d.padding!==void 0&&l(h,[`padding`],d.padding),d.position!==void 0&&l(h,[`position`],p(d.position,`position`,`text`)),d.scale!==void 0&&l(h,[`scale`],d.scale),d.url!==void 0&&l(h,[`url`],p(d.url,`url`,`text`)),a(await s(`Creating`,async()=>t(c,`POST`,`/accounts/${f}/stream/watermarks`,{body:Object.keys(h).length>0?h:void 0})),{successLabel:`Created`})})};function et(e){return e.usage(`$0 stream watermarks delete <identifier>
88
-
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 tt={command:`delete <identifier>`,describe:`Delete watermark profiles`,builder:et,handler:async t=>c({command:`stream watermarks delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){o({command:`cf stream watermarks delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/stream/watermarks/${t.identifier==null?`<identifier>`:encodeURIComponent(String(t.identifier))}`,pathParams:{identifier:String(t.identifier??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await g({force:!!t.force,message:`Remove this watermark profile? New upload requests referencing this profile will fail.`})){process.stderr.write(`Aborted.
90
- `);return}a(await s(`Deleting`,async()=>c.stream.watermarks.delete({account_id:l,identifier:t.identifier})),{successLabel:`Deleted`})})};function $(e){return e.usage(`$0 stream watermarks get <identifier>
91
-
92
- 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 nt={command:`get <identifier>`,describe:`Watermark profile details`,builder:$,handler:async t=>c({command:`stream watermarks get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){o({command:`cf stream watermarks get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/stream/watermarks/${t.identifier==null?`<identifier>`:encodeURIComponent(String(t.identifier))}`,pathParams:{identifier:String(t.identifier??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l,a(await s(`Loading`,async()=>c.stream.watermarks.get({account_id:l,identifier:t.identifier})),{successLabel:`Loaded`})})};function rt(e){return e.usage(`$0 stream watermarks list
93
-
94
- Lists all watermark profiles for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const it={command:`list`,describe:`List watermark profiles`,builder:rt,handler:async t=>c({command:`stream watermarks list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){o({command:`cf stream watermarks list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/stream/watermarks`,pathParams:{},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l,a(await s(`Loading`,async()=>c.stream.watermarks.list({account_id:l})),{successLabel:`Loaded`})})},at={command:`watermarks`,describe:`Watermark profiles that overlay an image on every video in the account`,builder:e=>e.command($e).command(tt).command(nt).command(it).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ot(e){return e.usage(`$0 stream webhooks delete
95
-
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 st={command:`delete`,describe:`Delete webhooks`,builder:ot,handler:async t=>c({command:`stream webhooks delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){o({command:`cf stream webhooks delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/stream/webhook`,pathParams:{},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await g({force:!!t.force,message:`Delete this webhook? If recreated, the secret will change.`})){process.stderr.write(`Aborted.
97
- `);return}a(await s(`Deleting`,async()=>c.stream.webhooks.delete({account_id:l})),{successLabel:`Deleted`})})};function ct(e){return e.usage(`$0 stream webhooks get
98
-
99
- Retrieve current on-demand webhook information.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const lt={command:`get`,describe:`View webhook`,builder:ct,handler:async t=>c({command:`stream webhooks get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){o({command:`cf stream webhooks get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/stream/webhook`,pathParams:{},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l,a(await s(`Loading`,async()=>c.stream.webhooks.get({account_id:l})),{successLabel:`Loaded`})})};function ut(e){return e.usage(`$0 stream webhooks update
100
-
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 dt={command:`update`,describe:`Create VOD webhooks`,builder:ut,handler:async t=>c({command:`stream webhooks update`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){o({command:`cf stream webhooks update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/stream/webhook`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({notification_url:p(t[`notification-url`],`notification-url`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await g({force:!!t.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(t.body){let e=u(t.body);a(await s(`Deleting`,async()=>c.stream.webhooks.update({body:e,account_id:l})),{successLabel:`Deleted`});return}let d=f({notification_url:p(t[`notification-url`],`notification-url`,`text`)});a(await s(`Deleting`,async()=>c.stream.webhooks.update({body:d,account_id:l})),{successLabel:`Deleted`})})},ft={command:`webhooks`,describe:`Webhook notifications for video lifecycle events (ready, error, etc.)`,builder:e=>e.command(st).command(lt).command(dt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},pt={command:`stream`,describe:`Video encoding, storage, and delivery — upload, live-stream, clip, caption, and embed video at scale`,builder:e=>e.command(Q).command(w).command(X).command(Ze).command(at).command(ft).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{pt as default};
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env node
2
- import{t as e}from"./local-rYpzEQb-.mjs";import{n as t}from"./auth-Br-t8vL_.mjs";import{a as n,t as r}from"./context-CquYYyS3.mjs";import{t as i}from"./output-ClYel9WX.mjs";import{t as a}from"./dry-run-p9Q7nMZ5.mjs";import{t as o}from"./progress-TLUEIYE6.mjs";import{t as s}from"./run-iFM5TxtQ.mjs";import"./telemetry-DoBQOGRk.mjs";function c(e){return e.usage(`$0 submit create
3
-
4
- Return new URL submissions`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const l={command:`create`,describe:`Create new URL submissions`,builder:c,handler:async c=>s({command:`submit create`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf submit create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/brand-protection/submit`,pathParams:{},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l,i(await o(`Creating`,async()=>s.submit.create({account_id:l})),{successLabel:`Created`})})},u={command:`submit`,describe:`submit`,builder:e=>e.command(l).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{u as default};
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- import"./run-iFM5TxtQ.mjs";const e=`unknown command`;export{e as t};
@@ -1,29 +0,0 @@
1
- #!/usr/bin/env node
2
- import{t as e}from"./lazy-command--5YpWUVY.mjs";import{t}from"./local-rYpzEQb-.mjs";import{n}from"./auth-Br-t8vL_.mjs";import{a as r,t as i}from"./context-CquYYyS3.mjs";import{t as a}from"./output-ClYel9WX.mjs";import{t as o}from"./dry-run-p9Q7nMZ5.mjs";import{t as s}from"./progress-TLUEIYE6.mjs";import{t as c}from"./run-iFM5TxtQ.mjs";import"./telemetry-DoBQOGRk.mjs";import{n as l,t as u}from"./body-parser-NjzJZMOV.mjs";import{n as d}from"./input-validation-0CeePPHp.mjs";import{a as f,n as p}from"./prompt-Ck_1PCHm.mjs";import{t as m}from"./cli-types-_Kmwfpnp.mjs";var h=e(`diag`,`Create a diagnostic report from a local cloudflared instance.`,()=>import(`./command-Cdx___59.mjs`),{command:`tunnels diag`,recordArgs:!1}),g=e(`login`,`Authorize cloudflared and download an origin certificate for locally managed tunnels.`,()=>import(`./command-BsmF3J_l.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-BWC9CbE7.mjs`),{command:`tunnels quick-start`,recordArgs:!1}),v=e(`ready`,`Check the /ready endpoint exposed by a local cloudflared instance.`,()=>import(`./command-DHdWKtqx.mjs`),{command:`tunnels ready`,recordArgs:!1}),y=e(`run [tunnel]`,`Run a named Cloudflare Tunnel using the cf-managed cloudflared binary.`,()=>import(`./command-C2pNxAeL.mjs`),{command:`tunnels run`,recordArgs:!1}),b=e(`tail [tunnel-id]`,`Stream logs from a remote cloudflared instance.`,()=>import(`./command-CrtDkZNs.mjs`),{command:`tunnels tail`,recordArgs:!1});function x(e){return e.usage(`$0 tunnels config get <tunnel-id>
3
-
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 S={command:`get <tunnel-id>`,describe:`Get Tunnel configuration`,builder:x,handler:async e=>c({command:`tunnels config get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf tunnels config get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<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 c=await n(e),l=e.local?t:await i();e.accountId=l,a(await s(`Loading`,async()=>c.tunnels.config.get({account_id:l,tunnel_id:e[`tunnel-id`]})),{successLabel:`Loaded`})})};function C(e){return e.usage(`$0 tunnels config update <tunnel-id>
5
-
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(`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(`config-origin-request-access-required`,{type:`boolean`,description:`Deny traffic that has not fulfilled Access authorization.`}).option(`config-origin-request-access-team-name`,{type:`string`,description:`The config.originRequest.access.teamName field`}).option(`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(`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(`config-origin-request-disable-chunked-encoding`,{type:`boolean`,description:`Disables chunked transfer encoding. Useful if you are running a WSGI server.`}).option(`config-origin-request-http2origin`,{type:`boolean`,description:`Attempt to connect to origin using HTTP2. Origin must be configured as https.`}).option(`config-origin-request-http-host-header`,{type:`string`,description:`Sets the HTTP Host header on requests sent to the local service.`}).option(`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(`config-origin-request-keep-alive-timeout`,{type:`number`,description:`Timeout after which an idle keepalive connection can be discarded.`}).option(`config-origin-request-match-snito-host`,{type:`boolean`,description:`Auto configure the Hostname on the origin server certificate.`}).option(`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(`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(`config-origin-request-origin-server-name`,{type:`string`,description:`Hostname that cloudflared should expect from your origin server certificate.`}).option(`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
- `}).option(`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(`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([`config-origin-request-access-aud-tag`,`config-origin-request-access-required`,`config-origin-request-access-team-name`,`config-origin-request-ca-pool`,`config-origin-request-connect-timeout`,`config-origin-request-disable-chunked-encoding`,`config-origin-request-http2origin`,`config-origin-request-http-host-header`,`config-origin-request-keep-alive-connections`,`config-origin-request-keep-alive-timeout`,`config-origin-request-match-snito-host`,`config-origin-request-no-happy-eyeballs`,`config-origin-request-no-tlsverify`,`config-origin-request-origin-server-name`,`config-origin-request-proxy-type`,`config-origin-request-tcp-keep-alive`,`config-origin-request-tls-timeout`].some(t=>e[t]!==void 0)){let t=[`config-origin-request-access-aud-tag`,`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 w={command:`update <tunnel-id>`,describe:`Update Tunnel configuration`,builder:C,handler:async e=>c({command:`tunnels config update`,classification:{safeFlags:[`config-origin-request-access-required`,`config-origin-request-disable-chunked-encoding`,`config-origin-request-http2origin`,`config-origin-request-match-snito-host`,`config-origin-request-no-happy-eyeballs`,`config-origin-request-no-tlsverify`,`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf tunnels config update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<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?u({config:{originRequest:{access:{audTag:e[`config-origin-request-access-aud-tag`],required:e[`config-origin-request-access-required`],teamName:d(e[`config-origin-request-access-team-name`],`config-origin-request-access-team-name`,`text`)},caPool:d(e[`config-origin-request-ca-pool`],`config-origin-request-ca-pool`,`text`),connectTimeout:e[`config-origin-request-connect-timeout`],disableChunkedEncoding:e[`config-origin-request-disable-chunked-encoding`],http2Origin:e[`config-origin-request-http2origin`],httpHostHeader:d(e[`config-origin-request-http-host-header`],`config-origin-request-http-host-header`,`text`),keepAliveConnections:e[`config-origin-request-keep-alive-connections`],keepAliveTimeout:e[`config-origin-request-keep-alive-timeout`],matchSNItoHost:e[`config-origin-request-match-snito-host`],noHappyEyeballs:e[`config-origin-request-no-happy-eyeballs`],noTLSVerify:e[`config-origin-request-no-tlsverify`],originServerName:d(e[`config-origin-request-origin-server-name`],`config-origin-request-origin-server-name`,`text`),proxyType:d(e[`config-origin-request-proxy-type`],`config-origin-request-proxy-type`,`text`),tcpKeepAlive:e[`config-origin-request-tcp-keep-alive`],tlsTimeout:e[`config-origin-request-tls-timeout`]}}}):l(e.body)});return}let c=await n(e),f=e.local?t:await i();if(e.accountId=f,e.body){let t=l(e.body);a(await s(`Updating`,async()=>c.tunnels.config.update({...t,account_id:f,tunnel_id:e[`tunnel-id`]})),{successLabel:`Updated`});return}let p=u({config:{originRequest:{access:{audTag:e[`config-origin-request-access-aud-tag`],required:e[`config-origin-request-access-required`],teamName:d(e[`config-origin-request-access-team-name`],`config-origin-request-access-team-name`,`text`)},caPool:d(e[`config-origin-request-ca-pool`],`config-origin-request-ca-pool`,`text`),connectTimeout:e[`config-origin-request-connect-timeout`],disableChunkedEncoding:e[`config-origin-request-disable-chunked-encoding`],http2Origin:e[`config-origin-request-http2origin`],httpHostHeader:d(e[`config-origin-request-http-host-header`],`config-origin-request-http-host-header`,`text`),keepAliveConnections:e[`config-origin-request-keep-alive-connections`],keepAliveTimeout:e[`config-origin-request-keep-alive-timeout`],matchSNItoHost:e[`config-origin-request-match-snito-host`],noHappyEyeballs:e[`config-origin-request-no-happy-eyeballs`],noTLSVerify:e[`config-origin-request-no-tlsverify`],originServerName:d(e[`config-origin-request-origin-server-name`],`config-origin-request-origin-server-name`,`text`),proxyType:d(e[`config-origin-request-proxy-type`],`config-origin-request-proxy-type`,`text`),tcpKeepAlive:e[`config-origin-request-tcp-keep-alive`],tlsTimeout:e[`config-origin-request-tls-timeout`]}}});a(await s(`Updating`,async()=>c.tunnels.config.update({...p,account_id:f,tunnel_id:e[`tunnel-id`]})),{successLabel:`Updated`})})},T={command:`config`,describe:`Operations for config`,builder:e=>e.command(S).command(w).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function E(e){return e.usage(`$0 tunnels connections cleanup <tunnel-id>
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=>c({command:`tunnels connections cleanup`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let c={client_id:e[`client-id`]};if(e.dryRun){o({command:`cf tunnels connections cleanup`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/cfd_tunnel/${e[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(e[`tunnel-id`]))}/connections`,pathParams:{"tunnel-id":String(e[`tunnel-id`]??``)},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();if(e.accountId=u,!await p({force:!!e.force,message:`This operation removes Cloudflare Tunnel connections.`})){process.stderr.write(`Aborted.
10
- `);return}a(await s(`Deleting`,async()=>l.tunnels.connections.cleanup({account_id:u,tunnel_id:e[`tunnel-id`],...c})),{successLabel:`Deleted`})})};function O(e){return e.usage(`$0 tunnels connections list
11
-
12
- 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 k={command:`list`,describe:`List Cloudflare Tunnel connections`,builder:O,handler:async e=>c({command:`tunnels connections list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf tunnels connections list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<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 c=await n(e),l=e.local?t:await i();e.accountId=l,a(await s(`Loading`,async()=>c.tunnels.connections.list({account_id:l,tunnel_id:e[`tunnel-id`]})),{successLabel:`Loaded`})})},A={command:`connections`,describe:`Operations for connections`,builder:e=>e.command(D).command(k).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function j(e){return e.usage(`$0 tunnels connectors get <connector-id>
13
-
14
- Retrieves a connector and its connection details for a Cloudflare Tunnel, including its cloudflared version, architecture, and connected Cloudflare locations.`).positional(`connector-id`,{type:`string`,description:`UUID of the Cloudflare Tunnel connector.`,demandOption:!0}).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 M={command:`get <connector-id>`,describe:`Get Cloudflare Tunnel connector`,builder:j,handler:async e=>c({command:`tunnels connectors get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf tunnels connectors get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/cfd_tunnel/${e[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(e[`tunnel-id`]))}/connectors/${e[`connector-id`]==null?`<connector-id>`:encodeURIComponent(String(e[`connector-id`]))}`,pathParams:{"tunnel-id":String(e[`tunnel-id`]??``),"connector-id":String(e[`connector-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l,a(await s(`Loading`,async()=>c.tunnels.connectors.get({account_id:l,tunnel_id:e[`tunnel-id`],connector_id:e[`connector-id`]})),{successLabel:`Loaded`})})},N={command:`connectors`,describe:`Operations for connectors`,builder:e=>e.command(M).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function P(e){return e.usage(`$0 tunnels create
15
-
16
- 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-src`,{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`],default:`local`}).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 F={command:`create`,describe:`Create a Cloudflare Tunnel`,builder:P,handler:async e=>c({command:`tunnels create`,classification:{safeFlags:[`config-src`,`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf tunnels create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/cfd_tunnel`,pathParams:{},bodyKind:`json`,body:e.body===void 0?u({config_src:d(e[`config-src`],`config-src`,`text`),name:d(e.name,`name`,`text`),tunnel_secret:d(e[`tunnel-secret`],`tunnel-secret`,`text`)}):l(e.body)});return}let c=await n(e),p=e.local?t:await i();if(e.accountId=p,e.body){let t=l(e.body);a(await s(`Creating`,async()=>c.tunnels.create({...t,account_id:p})),{successLabel:`Created`});return}e.name===void 0&&(e.name=await f(`name`,`A user-friendly name for a tunnel.`));let m=u({config_src:d(e[`config-src`],`config-src`,`text`),name:d(e.name,`name`,`text`),tunnel_secret:d(e[`tunnel-secret`],`tunnel-secret`,`text`)});a(await s(`Creating`,async()=>c.tunnels.create({...m,account_id:p})),{successLabel:`Created`})})};function I(e){return e.usage(`$0 tunnels delete <tunnel-id>
17
-
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 L={command:`delete <tunnel-id>`,describe:`Delete a Cloudflare Tunnel`,builder:I,handler:async e=>c({command:`tunnels delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){o({command:`cf tunnels delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<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 c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await p({force:!!e.force,message:`This operation permanently deletes a Cloudflare Tunnel.`})){process.stderr.write(`Aborted.
19
- `);return}a(await s(`Deleting`,async()=>c.tunnels.delete({account_id:l,tunnel_id:e[`tunnel-id`]})),{successLabel:`Deleted`})})};function R(e){return e.usage(`$0 tunnels edit <tunnel-id>
20
-
21
- 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 z={command:`edit <tunnel-id>`,describe:`Update a Cloudflare Tunnel`,builder:R,handler:async e=>c({command:`tunnels edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf tunnels edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<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?u({name:d(e.name,`name`,`text`),tunnel_secret:d(e[`tunnel-secret`],`tunnel-secret`,`text`)}):l(e.body)});return}let c=await n(e),f=e.local?t:await i();if(e.accountId=f,e.body){let t=l(e.body);a(await s(`Updating`,async()=>c.tunnels.edit({...t,account_id:f,tunnel_id:e[`tunnel-id`]})),{successLabel:`Updated`});return}let p=u({name:d(e.name,`name`,`text`),tunnel_secret:d(e[`tunnel-secret`],`tunnel-secret`,`text`)});a(await s(`Updating`,async()=>c.tunnels.edit({...p,account_id:f,tunnel_id:e[`tunnel-id`]})),{successLabel:`Updated`})})};function B(e){return e.usage(`$0 tunnels get <tunnel-id>
22
-
23
- Fetches a single 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 V={command:`get <tunnel-id>`,describe:`Get a Cloudflare Tunnel`,builder:B,handler:async e=>c({command:`tunnels get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf tunnels get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<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 c=await n(e),l=e.local?t:await i();e.accountId=l,a(await s(`Loading`,async()=>c.tunnels.get({account_id:l,tunnel_id:e[`tunnel-id`]})),{successLabel:`Loaded`})})};function H(e){return e.usage(`$0 tunnels list
24
-
25
- Lists and filters all types of Tunnels in an account.`).option(`name`,{type:`string`,description:`A user-friendly name for the tunnel.`}).option(`is-deleted`,{type:`boolean`,description:"If `true`, only include deleted tunnels. If `false`, exclude deleted tunnels. If empty, all tunnels will be included."}).option(`existed-at`,{type:`string`,description:`If provided, include only resources that were created (and not deleted) before this time. URL encoded.`}).option(`uuid`,{type:`string`,description:`UUID of the tunnel.`}).option(`was-active-at`,{type:`string`,description:`Was active at`}).option(`was-inactive-at`,{type:`string`,description:`Was inactive at`}).option(`include-prefix`,{type:`string`,description:`Include prefix`}).option(`exclude-prefix`,{type:`string`,description:`Exclude prefix`}).option(`tun-types`,{type:`string`,description:`The types of tunnels to filter by, separated by commas.`}).option(`status`,{type:`string`,description:"The status of the tunnel. Valid values are `inactive` (tunnel has never been run), `degraded` (tunnel is active and able to serve traffic but in an unhealthy state), `healthy` (tunnel is active and able to serve traffic), or `down` (tunnel can not serve traffic as it has no connections to the Cloudflare Edge).",choices:[`inactive`,`degraded`,`healthy`,`down`]}).option(`per-page`,{type:`number`,description:`Number of results to display.`}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const U={command:`list`,describe:`List All Tunnels`,builder:m(H),handler:async e=>c({command:`tunnels list`,classification:{safeFlags:[`is-deleted`,`status`,`dry-run`]}},e,async()=>{let c={name:e.name,is_deleted:e[`is-deleted`],existed_at:e[`existed-at`],uuid:e.uuid,was_active_at:e[`was-active-at`],was_inactive_at:e[`was-inactive-at`],include_prefix:e[`include-prefix`],exclude_prefix:e[`exclude-prefix`],tun_types:e[`tun-types`],status:e.status,per_page:e[`per-page`],page:e.page};if(e.dryRun){o({command:`cf tunnels list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/tunnels`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u,a(await s(`Loading`,async()=>l.tunnels.list({account_id:u,...c})),{successLabel:`Loaded`})})};function W(e){return e.usage(`$0 tunnels management-token create <tunnel-id>
26
-
27
- 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 G={command:`create <tunnel-id>`,describe:`Get a Cloudflare Tunnel management token`,builder:W,handler:async e=>c({command:`tunnels management-token create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf tunnels management-token create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<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?u({resources:e.resources}):l(e.body)});return}let c=await n(e),d=e.local?t:await i();if(e.accountId=d,e.body){let t=l(e.body);a(await s(`Creating`,async()=>c.tunnels.managementToken.create({...t,account_id:d,tunnel_id:e[`tunnel-id`]})),{successLabel:`Created`});return}if(e.resources===void 0)throw Error(`--resources is required (or pass --body with this field set).`);let f=u({resources:e.resources});a(await s(`Creating`,async()=>c.tunnels.managementToken.create({...f,account_id:d,tunnel_id:e[`tunnel-id`]})),{successLabel:`Created`})})},K={command:`management-token`,describe:`Operations for management-token`,builder:e=>e.command(G).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function q(e){return e.usage(`$0 tunnels token get <tunnel-id>
28
-
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 J={command:`get <tunnel-id>`,describe:`Get a Cloudflare Tunnel token`,builder:q,handler:async e=>c({command:`tunnels token get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf tunnels token get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<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 c=await n(e),l=e.local?t:await i();e.accountId=l,a(await s(`Loading`,async()=>c.tunnels.token.get({account_id:l,tunnel_id:e[`tunnel-id`]})),{successLabel:`Loaded`})})},Y={command:`token`,describe:`Operations for token`,builder:e=>e.command(J).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},X={command:`tunnels`,describe:`tunnels`,builder:e=>e.command(F).command(L).command(h).command(z).command(V).command(U).command(g).command(_).command(v).command(y).command(b).command(T).command(A).command(N).command(K).command(Y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{X as default};
@@ -1,33 +0,0 @@
1
- #!/usr/bin/env node
2
- import{t as e}from"./local-rYpzEQb-.mjs";import{n as t}from"./auth-Br-t8vL_.mjs";import{a as n,t as r}from"./context-CquYYyS3.mjs";import{t as i}from"./output-ClYel9WX.mjs";import{t as a}from"./dry-run-p9Q7nMZ5.mjs";import{t as o}from"./progress-TLUEIYE6.mjs";import{t as s}from"./run-iFM5TxtQ.mjs";import"./telemetry-DoBQOGRk.mjs";import{n as c,t as l}from"./body-parser-NjzJZMOV.mjs";import{n as u}from"./input-validation-0CeePPHp.mjs";import{a as d,n as f}from"./prompt-Ck_1PCHm.mjs";import{t as p}from"./cli-types-_Kmwfpnp.mjs";function m(e){return e.usage(`$0 turnstile widgets create
3
-
4
- Creates a Turnstile widget for an account.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of items per page.`}).option(`order`,{type:`string`,description:`Field to order widgets by.`,choices:[`id`,`sitekey`,`name`,`created_on`,`modified_on`]}).option(`direction`,{type:`string`,description:`Direction to order widgets.`,choices:[`asc`,`desc`]}).option(`filter`,{type:`string`,description:"Filter widgets by field. The `name` field uses case-insensitive\nsubstring matching; `sitekey` uses exact matching.\nFormat: `field:value`\n\nSupported fields:\n- `name` - Filter by widget name (e.g., `filter=name:login-form`)\n- `sitekey` - Filter by sitekey (e.g., `filter=sitekey:0x4AAA`)\n\nReturns 400 Bad Request if the field is unsupported or format is invalid.\nAn empty filter value returns all results."}).option(`bot-fight-mode`,{type:`boolean`,description:`If bot_fight_mode is set to \`true\`, Cloudflare issues computationally
5
- expensive challenges in response to malicious bots (ENT only).
6
- `}).option(`clearance-level`,{type:`string`,description:`If Turnstile is embedded on a Cloudflare site and the widget should grant challenge clearance,
7
- this setting can determine the clearance level to be set
8
- `,choices:[`no_clearance`,`jschallenge`,`managed`,`interactive`]}).option(`domains`,{type:`string`,array:!0,description:`The domains field`}).option(`ephemeral-id`,{type:`boolean`,description:`Return the Ephemeral ID in /siteverify (ENT only).
9
- `}).option(`name`,{type:`string`,description:`Human readable widget name. Not unique. Cloudflare suggests that you
10
- set this to a meaningful string to make it easier to identify your
11
- widget, and where it is used.
12
- `}).option(`offlabel`,{type:`boolean`,description:`Do not show any Cloudflare branding on the widget (ENT only).
13
- `}).option(`region`,{type:`string`,description:`Region where this widget can be used. This cannot be changed after creation.
14
- `,choices:[`world`,`china`],default:`world`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const h={command:`create`,describe:`Create a Turnstile Widget`,builder:p(m),handler:async f=>s({command:`turnstile widgets create`,classification:{safeFlags:[`order`,`direction`,`bot-fight-mode`,`clearance-level`,`ephemeral-id`,`offlabel`,`region`,`dry-run`]}},f,async()=>{let s={page:f.page,per_page:f[`per-page`],order:f.order,direction:f.direction,filter:f.filter};if(f.dryRun){a({command:`cf turnstile widgets create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/challenges/widgets`,pathParams:{},query:s,bodyKind:`json`,body:f.body===void 0?l({bot_fight_mode:f[`bot-fight-mode`],clearance_level:u(f[`clearance-level`],`clearance-level`,`text`),domains:f.domains,ephemeral_id:f[`ephemeral-id`],name:u(f.name,`name`,`text`),offlabel:f.offlabel,region:u(f.region,`region`,`text`)}):c(f.body)});return}let p=await t(f),m=f.local?e:await r();if(f.accountId=m,f.body){let e=c(f.body);new URLSearchParams(Object.entries(s).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),i(await o(`Creating`,async()=>p.turnstile.widgets.create({...e,account_id:m,...s})),{successLabel:`Created`});return}if(f.domains===void 0)throw Error(`--domains is required (or pass --body with this field set).`);f.name===void 0&&(f.name=await d(`name`,`Human readable widget name. Not unique. Cloudflare suggests that you set this to a meaningful string to make it easier to identify your widget, and where it is used. `));let h=l({bot_fight_mode:f[`bot-fight-mode`],clearance_level:u(f[`clearance-level`],`clearance-level`,`text`),domains:f.domains,ephemeral_id:f[`ephemeral-id`],name:u(f.name,`name`,`text`),offlabel:f.offlabel,region:u(f.region,`region`,`text`)});new URLSearchParams(Object.entries(s).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),i(await o(`Creating`,async()=>p.turnstile.widgets.create({...h,account_id:m,...s})),{successLabel:`Created`})})};function g(e){return e.usage(`$0 turnstile widgets delete <sitekey>
15
-
16
- Deletes a Turnstile widget from an account.`).positional(`sitekey`,{type:`string`,description:`Unique identifier for a Turnstile widget.`,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 _={command:`delete <sitekey>`,describe:`Delete a Turnstile Widget`,builder:g,handler:async c=>s({command:`turnstile widgets delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf turnstile widgets delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/challenges/widgets/${c.sitekey==null?`<sitekey>`:encodeURIComponent(String(c.sitekey))}`,pathParams:{sitekey:String(c.sitekey??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();if(c.accountId=l,!await f({force:!!c.force})){process.stderr.write(`Aborted.
17
- `);return}i(await o(`Deleting`,async()=>s.turnstile.widgets.delete({account_id:l,sitekey:c.sitekey})),{successLabel:`Deleted`})})};function v(e){return e.usage(`$0 turnstile widgets get <sitekey>
18
-
19
- Returns the configuration of a Turnstile widget.`).positional(`sitekey`,{type:`string`,description:`Unique identifier for a Turnstile widget.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const y={command:`get <sitekey>`,describe:`Turnstile Widget Details`,builder:v,handler:async c=>s({command:`turnstile widgets get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf turnstile widgets get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/challenges/widgets/${c.sitekey==null?`<sitekey>`:encodeURIComponent(String(c.sitekey))}`,pathParams:{sitekey:String(c.sitekey??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l,i(await o(`Loading`,async()=>s.turnstile.widgets.get({account_id:l,sitekey:c.sitekey})),{successLabel:`Loaded`})})};function b(e){return e.usage(`$0 turnstile widgets list
20
-
21
- Lists Turnstile widgets for an account.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of items per page.`}).option(`order`,{type:`string`,description:`Field to order widgets by.`,choices:[`id`,`sitekey`,`name`,`created_on`,`modified_on`]}).option(`direction`,{type:`string`,description:`Direction to order widgets.`,choices:[`asc`,`desc`]}).option(`filter`,{type:`string`,description:"Filter widgets by field. The `name` field uses case-insensitive\nsubstring matching; `sitekey` uses exact matching.\nFormat: `field:value`\n\nSupported fields:\n- `name` - Filter by widget name (e.g., `filter=name:login-form`)\n- `sitekey` - Filter by sitekey (e.g., `filter=sitekey:0x4AAA`)\n\nReturns 400 Bad Request if the field is unsupported or format is invalid.\nAn empty filter value returns all results."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const x={command:`list`,describe:`List Turnstile Widgets`,builder:p(b),handler:async c=>s({command:`turnstile widgets list`,classification:{safeFlags:[`order`,`direction`,`dry-run`]}},c,async()=>{let s={page:c.page,per_page:c[`per-page`],order:c.order,direction:c.direction,filter:c.filter};if(c.dryRun){a({command:`cf turnstile widgets list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/challenges/widgets`,pathParams:{},query:s,bodyKind:`none`});return}let l=await t(c),u=c.local?e:await r();c.accountId=u,i(await o(`Loading`,async()=>l.turnstile.widgets.list({account_id:u,...s})),{successLabel:`Loaded`})})};function S(e){return e.usage("$0 turnstile widgets rotate-secret <sitekey>\n\nGenerates a new secret key for this widget. If `invalidate_immediately` is set to `false`, the previous secret remains valid for 2 hours. Note that secrets cannot be rotated again during the grace period.").positional(`sitekey`,{type:`string`,description:`Unique identifier for a Turnstile widget.`,demandOption:!0}).option(`invalidate-immediately`,{type:`boolean`,description:"If `invalidate_immediately` is set to `false`, the previous secret will\nremain valid for two hours. Otherwise, the secret is immediately\ninvalidated, and requests using it will be rejected.\n",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 C={command:`rotate-secret <sitekey>`,describe:`Rotate Secret for a Turnstile Widget`,builder:S,handler:async u=>s({command:`turnstile widgets rotate-secret`,classification:{safeFlags:[`invalidate-immediately`,`dry-run`]}},u,async()=>{if(u.dryRun){a({command:`cf turnstile widgets rotate-secret`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/challenges/widgets/${u.sitekey==null?`<sitekey>`:encodeURIComponent(String(u.sitekey))}/rotate_secret`,pathParams:{sitekey:String(u.sitekey??``)},bodyKind:`json`,body:u.body===void 0?l({invalidate_immediately:u[`invalidate-immediately`]}):c(u.body)});return}let s=await t(u),d=u.local?e:await r();if(u.accountId=d,u.body){let e=c(u.body);i(await o(`Creating`,async()=>s.turnstile.widgets.rotateSecret({...e,account_id:d,sitekey:u.sitekey})),{successLabel:`Created`});return}let f=l({invalidate_immediately:u[`invalidate-immediately`]});i(await o(`Creating`,async()=>s.turnstile.widgets.rotateSecret({...f,account_id:d,sitekey:u.sitekey})),{successLabel:`Created`})})};function w(e){return e.usage(`$0 turnstile widgets update <sitekey>
22
-
23
- Updates the configuration of a Turnstile widget.`).positional(`sitekey`,{type:`string`,description:`Unique identifier for a Turnstile widget.`,demandOption:!0}).option(`bot-fight-mode`,{type:`boolean`,description:`If bot_fight_mode is set to \`true\`, Cloudflare issues computationally
24
- expensive challenges in response to malicious bots (ENT only).
25
- `}).option(`clearance-level`,{type:`string`,description:`If Turnstile is embedded on a Cloudflare site and the widget should grant challenge clearance,
26
- this setting can determine the clearance level to be set
27
- `,choices:[`no_clearance`,`jschallenge`,`managed`,`interactive`]}).option(`domains`,{type:`string`,array:!0,description:`The domains field`}).option(`ephemeral-id`,{type:`boolean`,description:`Return the Ephemeral ID in /siteverify (ENT only).
28
- `}).option(`name`,{type:`string`,description:`Human readable widget name. Not unique. Cloudflare suggests that you
29
- set this to a meaningful string to make it easier to identify your
30
- widget, and where it is used.
31
- `}).option(`offlabel`,{type:`boolean`,description:`Do not show any Cloudflare branding on the widget (ENT only).
32
- `}).option(`region`,{type:`string`,description:`Region where this widget can be used. This cannot be changed after creation.
33
- `,choices:[`world`,`china`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const T={command:`update <sitekey>`,describe:`Update a Turnstile Widget`,builder:w,handler:async f=>s({command:`turnstile widgets update`,classification:{safeFlags:[`bot-fight-mode`,`clearance-level`,`ephemeral-id`,`offlabel`,`region`,`dry-run`]}},f,async()=>{if(f.dryRun){a({command:`cf turnstile widgets update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/challenges/widgets/${f.sitekey==null?`<sitekey>`:encodeURIComponent(String(f.sitekey))}`,pathParams:{sitekey:String(f.sitekey??``)},bodyKind:`json`,body:f.body===void 0?l({bot_fight_mode:f[`bot-fight-mode`],clearance_level:u(f[`clearance-level`],`clearance-level`,`text`),domains:f.domains,ephemeral_id:f[`ephemeral-id`],name:u(f.name,`name`,`text`),offlabel:f.offlabel,region:u(f.region,`region`,`text`)}):c(f.body)});return}let s=await t(f),p=f.local?e:await r();if(f.accountId=p,f.body){let e=c(f.body);i(await o(`Updating`,async()=>s.turnstile.widgets.update({...e,account_id:p,sitekey:f.sitekey})),{successLabel:`Updated`});return}if(f.domains===void 0)throw Error(`--domains is required (or pass --body with this field set).`);f.name===void 0&&(f.name=await d(`name`,`Human readable widget name. Not unique. Cloudflare suggests that you set this to a meaningful string to make it easier to identify your widget, and where it is used. `));let m=l({bot_fight_mode:f[`bot-fight-mode`],clearance_level:u(f[`clearance-level`],`clearance-level`,`text`),domains:f.domains,ephemeral_id:f[`ephemeral-id`],name:u(f.name,`name`,`text`),offlabel:f.offlabel,region:u(f.region,`region`,`text`)});i(await o(`Updating`,async()=>s.turnstile.widgets.update({...m,account_id:p,sitekey:f.sitekey})),{successLabel:`Updated`})})},E={command:`widgets`,describe:`Turnstile widget configurations — site keys, secret rotation, and challenge mode settings`,builder:e=>e.command(h).command(_).command(y).command(x).command(C).command(T).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},D={command:`turnstile`,describe:`CAPTCHA-free bot verification widgets that protect forms and APIs without degrading user experience`,builder:e=>e.command(E).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{D as default};
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- import{n as e,r as t}from"./update-check-Dtj9fzNe.mjs";export{e as getUpdateNotice,t as maybeStartBackgroundUpdateCheck};
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- import{i as e,n as t}from"./source-38bULAR8.mjs";import{n}from"./version-oN1bmOgM.mjs";import{i as r}from"./cf-DfQfIu3q.mjs";import{r as i,t as a}from"./gt-KlYHH-UC.mjs";import{closeSync as o,mkdirSync as s,openSync as c,readFileSync as l,renameSync as u,statSync as d,unlinkSync as f,writeFileSync as p}from"node:fs";import{dirname as m,join as h}from"node:path";import{fileURLToPath as g}from"node:url";import{spawn as _}from"node:child_process";var v=t(((e,t)=>{let n=i();t.exports=(e,t)=>new n(e,t).major})),y=t(((e,t)=>{let n=i();t.exports=(e,t,r=!1)=>{if(e instanceof n)return e;try{return new n(e,t)}catch(e){if(!r)return null;throw e}}})),b=t(((e,t)=>{let n=y();t.exports=(e,t)=>{let r=n(e,t);return r&&r.prerelease.length?r.prerelease:null}})),x=t(((e,t)=>{let n=y();t.exports=(e,t)=>{let r=n(e,t);return r?r.version:null}})),S=e(a(),1),C=e(v(),1),w=e(b(),1),T=e(x(),1);const E=1440*60*1e3;function D(e){return(0,w.default)(e)?.includes(`beta`)?`beta`:`latest`}function O(e=n){return h(r(),`cache`,`update-check-${D(e)}.json`)}function k(e=O()){try{let t=JSON.parse(l(e,`utf8`));if(typeof t!=`object`||!t||Array.isArray(t))return{};let n=t;return{lastAttemptedAt:typeof n.lastAttemptedAt==`number`&&Number.isFinite(n.lastAttemptedAt)?n.lastAttemptedAt:void 0,lastSuccessfulAt:typeof n.lastSuccessfulAt==`number`&&Number.isFinite(n.lastSuccessfulAt)?n.lastSuccessfulAt:void 0,latestVersion:typeof n.latestVersion==`string`&&(0,T.default)(n.latestVersion)?n.latestVersion:void 0}}catch{return{}}}function A(e,t=O()){let n=`${t}.${process.pid}.tmp`;try{return s(m(t),{recursive:!0}),p(n,`${JSON.stringify(e)}\n`,{encoding:`utf8`,mode:384}),u(n,t),!0}catch{try{f(n)}catch{}return!1}}function j(e,t,n){let r=`${e}.lock`,i;try{s(m(e),{recursive:!0});try{i=c(r,`wx`,384)}catch{try{if(t-d(r).mtimeMs<=5e3)return;f(r),i=c(r,`wx`,384)}catch{return}}return n()}catch{return}finally{if(i!==void 0)try{o(i),f(r)}catch{}}}function M(e,t){if(!(0,T.default)(e)||!t.latestVersion||!(0,S.default)(t.latestVersion,e))return;let n=(0,C.default)(t.latestVersion)>(0,C.default)(e);return{latestVersion:t.latestVersion,isMajor:n}}function N(e,t=O(e)){return M(e,k(t))}function P(){let e=import.meta.url.endsWith(`.ts`),t=new URL(e?`../update-check-worker.ts`:`./update-check-worker.mjs`,import.meta.url),n=e?[...process.execArgv,g(t)]:[g(t)];_(process.execPath,n,{detached:!0,stdio:`ignore`,windowsHide:!0}).unref()}function F(e={}){let t=e.cachePath??O(e.currentVersion??n),r=e.now??Date.now();if(j(t,r,()=>{let e=k(t);return e.lastAttemptedAt!==void 0&&r-e.lastAttemptedAt<864e5?!1:A({...e,lastAttemptedAt:r},t)}))try{(e.spawnWorker??P)()}catch{}}async function I(e,t,r,i){if(!(0,T.default)(t))return{status:`failed`};let a=await i(`https://registry.npmjs.org/${encodeURIComponent(e)}/${r}`,{headers:{accept:`application/json`,"user-agent":`cf-cli/${n}`},signal:AbortSignal.timeout(3e3)});if(!a.ok)return{status:`failed`};let o=await a.json();if(typeof o!=`object`||!o||Array.isArray(o))return{status:`failed`};let s=o;return s.name!==e||typeof s.version!=`string`||!(0,T.default)(s.version)?{status:`failed`}:(0,S.default)(s.version,t)?{status:`update-available`,latest:s.version}:{status:`up-to-date`}}async function L(e={}){let t=e.currentVersion??n,r=e.cachePath??O(t),i=e.now??Date.now();try{let n=await(e.check??((t,n,r)=>I(t,n,r,e.fetch??globalThis.fetch)))(`cf`,t,`latest`);if(n.status===`failed`)return;let a=n.status===`update-available`?n.latest:t;if(!(0,T.default)(a))return;A({...k(r),latestVersion:a,lastSuccessfulAt:i},r)}catch{}}export{L as i,N as n,F as r,E as t};
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env node
2
- import{t as e}from"./local-rYpzEQb-.mjs";import{n as t}from"./auth-Br-t8vL_.mjs";import{a as n,t as r}from"./context-CquYYyS3.mjs";import{t as i}from"./output-ClYel9WX.mjs";import{t as a}from"./dry-run-p9Q7nMZ5.mjs";import{t as o}from"./progress-TLUEIYE6.mjs";import{t as s}from"./run-iFM5TxtQ.mjs";import"./telemetry-DoBQOGRk.mjs";function c(e){return e.usage(`$0 url-info get
3
-
4
- Return submitted URLs based on ID`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const l={command:`get`,describe:`Read submitted URLs by ID`,builder:c,handler:async c=>s({command:`url-info get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf url-info get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/brand-protection/url-info`,pathParams:{},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l,i(await o(`Loading`,async()=>s.urlInfo.get({account_id:l})),{successLabel:`Loaded`})})},u={command:`url-info`,describe:`url-info`,builder:e=>e.command(l).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{u as default};
@@ -1,16 +0,0 @@
1
- #!/usr/bin/env node
2
- import{t as e}from"./local-rYpzEQb-.mjs";import{n as t}from"./auth-Br-t8vL_.mjs";import{a as n,t as r}from"./context-CquYYyS3.mjs";import{t as i}from"./output-ClYel9WX.mjs";import{t as a}from"./dry-run-p9Q7nMZ5.mjs";import{t as o}from"./progress-TLUEIYE6.mjs";import{t as s}from"./run-iFM5TxtQ.mjs";import"./telemetry-DoBQOGRk.mjs";import{n as c,t as l}from"./body-parser-NjzJZMOV.mjs";import{n as u}from"./input-validation-0CeePPHp.mjs";import{a as d}from"./prompt-Ck_1PCHm.mjs";import{n as f,t as p}from"./raw-fetch-DNxNCoeP.mjs";function m(e){return e.usage("$0 url-scanner responses get <response-id>\n\nReturns the raw response of the network request. Find the `response_id` in the `data.requests.response.hash`.").positional(`response-id`,{type:`string`,description:`Response hash.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const h={command:`get <response-id>`,describe:`Get raw response`,builder:m,handler:async i=>s({command:`url-scanner responses get`,classification:{safeFlags:[`dry-run`]}},i,async()=>{if(i.dryRun){a({command:`cf url-scanner responses get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/urlscanner/v2/responses/${i[`response-id`]==null?`<response-id>`:encodeURIComponent(String(i[`response-id`]))}`,pathParams:{"response-id":String(i[`response-id`]??``)},bodyKind:`none`});return}await t(i);let s=i.local?e:await r();i.accountId=s,f((await o(`Loading`,async()=>p(`/accounts/${s}/urlscanner/v2/responses/${encodeURIComponent(String(i[`response-id`]))}`,{method:`GET`,local:i.local===!0,persistTo:i.persistTo}))).toString(`utf-8`))})},g={command:`responses`,describe:`Raw HTTP response data captured during URL scans`,builder:e=>e.command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function _(e){return e.usage(`$0 url-scanner scans bulk-create
3
-
4
- Submit URLs to scan. Check limits at https://developers.cloudflare.com/security-center/investigate/scan-limits/ and take into account scans submitted in bulk have lower priority and may take longer to finish.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`List of urls to scan (up to a 100).`})}const v={command:`bulk-create`,describe:`Bulk create URL Scans`,builder:_,handler:async l=>s({command:`url-scanner scans bulk-create`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf url-scanner scans bulk-create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/urlscanner/v2/bulk`,pathParams:{},bodyKind:`json`,body:l.body===void 0?void 0:c(l.body)});return}let s=await t(l),u=l.local?e:await r();if(l.accountId=u,l.body){let e=c(l.body);i(await o(`Creating`,async()=>s.urlScanner.scans.bulkCreate({body:e,account_id:u})),{successLabel:`Created`});return}if(l.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function y(e){return e.usage(`$0 url-scanner scans create
5
-
6
- Submit a URL to scan. Check limits at https://developers.cloudflare.com/security-center/investigate/scan-limits/.`).option(`agent-readiness`,{type:`boolean`,description:`Enable agent readiness checks.`}).option(`country`,{type:`string`,description:`Country to geo egress from`,choices:`AF.AL.DZ.AD.AO.AG.AR.AM.AU.AT.AZ.BH.BD.BB.BY.BE.BZ.BJ.BM.BT.BO.BA.BW.BR.BN.BG.BF.BI.KH.CM.CA.CV.KY.CF.TD.CL.CN.CO.KM.CG.CR.CI.HR.CU.CY.CZ.CD.DK.DJ.DM.DO.EC.EG.SV.GQ.ER.EE.SZ.ET.FJ.FI.FR.GA.GE.DE.GH.GR.GL.GD.GT.GN.GW.GY.HT.HN.HU.IS.IN.ID.IR.IQ.IE.IL.IT.JM.JP.JO.KZ.KE.KI.KW.KG.LA.LV.LB.LS.LR.LY.LI.LT.LU.MO.MG.MW.MY.MV.ML.MR.MU.MX.FM.MD.MC.MN.MS.MA.MZ.MM.NA.NR.NP.NL.NZ.NI.NE.NG.KP.MK.NO.OM.PK.PS.PA.PG.PY.PE.PH.PL.PT.QA.RO.RU.RW.SH.KN.LC.VC.WS.SM.ST.SA.SN.RS.SC.SL.SK.SI.SB.SO.ZA.KR.SS.ES.LK.SD.SR.SE.CH.SY.TW.TJ.TZ.TH.BS.GM.TL.TG.TO.TT.TN.TR.TM.UG.UA.AE.GB.US.UY.UZ.VU.VE.VN.YE.ZM.ZW`.split(`.`)}).option(`customagent`,{type:`string`,description:`The customagent field`}).option(`referer`,{type:`string`,description:`The referer field`}).option(`screenshots-resolutions`,{type:`string`,array:!0,description:`Take multiple screenshots targeting different device types.`}).option(`url`,{type:`string`,description:`The url field`}).option(`visibility`,{type:`string`,description:"The option `Public` means it will be included in listings like recent scans and search results. `Unlisted` means it will not be included in the aforementioned listings, users will need to have the scan's ID to access it. A a scan will be automatically marked as unlisted if it fails, if it contains potential PII or other sensitive material.",choices:[`Public`,`Unlisted`],default:`Public`}).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`,describe:`Create URL Scan`,builder:y,handler:async f=>s({command:`url-scanner scans create`,classification:{safeFlags:[`agent-readiness`,`country`,`visibility`,`dry-run`]}},f,async()=>{if(f.dryRun){a({command:`cf url-scanner scans create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/urlscanner/v2/scan`,pathParams:{},bodyKind:`json`,body:f.body===void 0?l({agentReadiness:f[`agent-readiness`],country:u(f.country,`country`,`text`),customagent:u(f.customagent,`customagent`,`text`),referer:u(f.referer,`referer`,`text`),screenshotsResolutions:f[`screenshots-resolutions`],url:u(f.url,`url`,`text`),visibility:u(f.visibility,`visibility`,`text`)}):c(f.body)});return}let s=await t(f),p=f.local?e:await r();if(f.accountId=p,f.body){let e=c(f.body);i(await o(`Creating`,async()=>s.urlScanner.scans.create({...e,account_id:p})),{successLabel:`Created`});return}f.url===void 0&&(f.url=await d(`url`,`The url field`));let m=l({agentReadiness:f[`agent-readiness`],country:u(f.country,`country`,`text`),customagent:u(f.customagent,`customagent`,`text`),referer:u(f.referer,`referer`,`text`),screenshotsResolutions:f[`screenshots-resolutions`],url:u(f.url,`url`,`text`),visibility:u(f.visibility,`visibility`,`text`)});i(await o(`Creating`,async()=>s.urlScanner.scans.create({...m,account_id:p})),{successLabel:`Created`})})};function x(e){return e.usage(`$0 url-scanner scans dom <scan-id>
7
-
8
- Returns a plain text response, with the scan's DOM content as rendered by Chrome.`).positional(`scan-id`,{type:`string`,description:`Scan UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const S={command:`dom <scan-id>`,describe:`Get URL scan's DOM`,builder:x,handler:async i=>s({command:`url-scanner scans dom`,classification:{safeFlags:[`dry-run`]}},i,async()=>{if(i.dryRun){a({command:`cf url-scanner scans dom`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/urlscanner/v2/dom/${i[`scan-id`]==null?`<scan-id>`:encodeURIComponent(String(i[`scan-id`]))}`,pathParams:{"scan-id":String(i[`scan-id`]??``)},bodyKind:`none`});return}await t(i);let s=i.local?e:await r();i.accountId=s,f((await o(`Loading`,async()=>p(`/accounts/${s}/urlscanner/v2/dom/${encodeURIComponent(String(i[`scan-id`]))}`,{method:`GET`,local:i.local===!0,persistTo:i.persistTo}))).toString(`utf-8`))})};function C(e){return e.usage(`$0 url-scanner scans get <scan-id>
9
-
10
- Get URL scan by uuid`).positional(`scan-id`,{type:`string`,description:`Scan UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const w={command:`get <scan-id>`,describe:`Get URL scan`,builder:C,handler:async c=>s({command:`url-scanner scans get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf url-scanner scans get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/urlscanner/v2/result/${c[`scan-id`]==null?`<scan-id>`:encodeURIComponent(String(c[`scan-id`]))}`,pathParams:{"scan-id":String(c[`scan-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l,i(await o(`Loading`,async()=>s.urlScanner.scans.get({account_id:l,scan_id:c[`scan-id`]})),{successLabel:`Loaded`})})};function T(e){return e.usage(`$0 url-scanner scans har <scan-id>
11
-
12
- Get a URL scan's HAR file. See HAR spec at http://www.softwareishard.com/blog/har-12-spec/.`).positional(`scan-id`,{type:`string`,description:`Scan UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`har <scan-id>`,describe:`Get URL scan's HAR`,builder:T,handler:async c=>s({command:`url-scanner scans har`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf url-scanner scans har`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/urlscanner/v2/har/${c[`scan-id`]==null?`<scan-id>`:encodeURIComponent(String(c[`scan-id`]))}`,pathParams:{"scan-id":String(c[`scan-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l,i(await o(`Loading`,async()=>s.urlScanner.scans.har({account_id:l,scan_id:c[`scan-id`]})),{successLabel:`Loaded`})})};function D(e){return e.usage(`$0 url-scanner scans list
13
-
14
- Use a subset of ElasticSearch Query syntax to filter scans. Some example queries:<br/> <br/>- 'path:"/bundles/jquery.js"': Searches for scans who requested resources with the given path.<br/>- 'page.asn:AS24940 AND hash:xxx': Websites hosted in AS24940 where a resource with the given hash was downloaded.<br/>- 'page.domain:microsoft* AND verdicts.malicious:true AND NOT page.domain:microsoft.com': malicious scans whose hostname starts with "microsoft".<br/>- 'apikey:me AND date:[2025-01 TO 2025-02]': my scans from 2025 January to 2025 February.`).option(`size`,{type:`number`,description:`Limit the number of objects in the response.`}).option(`query`,{type:`string`,description:`Filter scans`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const O={command:`list`,describe:`Search URL scans`,builder:D,handler:async c=>s({command:`url-scanner scans list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={size:c.size,q:c.query};if(c.dryRun){a({command:`cf url-scanner scans list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/urlscanner/v2/search`,pathParams:{},query:s,bodyKind:`none`});return}let l=await t(c),u=c.local?e:await r();c.accountId=u,i(await o(`Loading`,async()=>l.urlScanner.scans.list({account_id:u,...s})),{successLabel:`Loaded`})})};function k(e){return e.usage(`$0 url-scanner scans screenshot <scan-id>
15
-
16
- Get scan's screenshot by resolution (desktop/mobile/tablet).`).positional(`scan-id`,{type:`string`,description:`Scan UUID.`,demandOption:!0}).option(`resolution`,{type:`string`,description:`Target device type.`,choices:[`desktop`,`mobile`,`tablet`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`text`,{type:`boolean`,description:`Decode the response body as UTF-8 text instead of writing raw bytes`,default:!1})}const A={command:`screenshot <scan-id>`,describe:`Get screenshot`,builder:k,handler:async i=>s({command:`url-scanner scans screenshot`,classification:{safeFlags:[`resolution`,`dry-run`,`text`]}},i,async()=>{let s={resolution:i.resolution};if(i.dryRun){a({command:`cf url-scanner scans screenshot`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/urlscanner/v2/screenshots/${i[`scan-id`]==null?`<scan-id>`:encodeURIComponent(String(i[`scan-id`]))}.png`,pathParams:{"scan-id":String(i[`scan-id`]??``)},query:s,bodyKind:`none`});return}await t(i);let c=i.local?e:await r();i.accountId=c;let l=new URLSearchParams(Object.entries(s).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),u=await o(`Loading`,async()=>p(`/accounts/${c}/urlscanner/v2/screenshots/${encodeURIComponent(String(i[`scan-id`]))}.png${l?`?`+l:``}`,{method:`GET`,local:i.local===!0,persistTo:i.persistTo}));f(i.text===!0?u.toString(`utf-8`):u)})},j={command:`scans`,describe:`URL scan requests and results — submit URLs for analysis and retrieve threat verdicts`,builder:e=>e.command(v).command(b).command(S).command(w).command(E).command(O).command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},M={command:`url-scanner`,describe:`Scan URLs for phishing, malware, and other threats — submit scans and retrieve detailed results`,builder:e=>e.command(g).command(j).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{M as default};
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env node
2
- import{t as e}from"./local-rYpzEQb-.mjs";import{n as t}from"./auth-Br-t8vL_.mjs";import{a as n,t as r}from"./context-CquYYyS3.mjs";import{t as i}from"./output-ClYel9WX.mjs";import{t as a}from"./dry-run-p9Q7nMZ5.mjs";import{t as o}from"./progress-TLUEIYE6.mjs";import{t as s}from"./run-iFM5TxtQ.mjs";import"./telemetry-DoBQOGRk.mjs";import{t as c}from"./cli-types-_Kmwfpnp.mjs";function l(e){return e.usage(`$0 values list
3
-
4
- 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:`access_application.access_application_policy.access_group.account.account_ruleset.ai_gateway.alerting_policy.alerting_webhook.api_gateway_operation.cloudflared_tunnel.custom_certificate.custom_hostname.cws_deployment.cws_policy.cws_policy_set.cws_workload.d1_database.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.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 u={command:`list`,describe:`List tag values`,builder:c(l),handler:async c=>s({command:`values list`,classification:{safeFlags:[`type`,`dry-run`]}},c,async()=>{let s={type:c.type,cursor:c.cursor};if(c.dryRun){a({command:`cf values list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/tags/values/${c[`tag-key`]==null?`<tag-key>`:encodeURIComponent(String(c[`tag-key`]))}`,pathParams:{"tag-key":String(c[`tag-key`]??``)},query:s,bodyKind:`none`});return}let l=await t(c),u=c.local?e:await r();c.accountId=u,i(await o(`Loading`,async()=>l.values.list({account_id:u,tag_key:c[`tag-key`],...s})),{successLabel:`Loaded`})})},d={command:`values`,describe:`values`,builder:e=>e.command(u).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{d as default};