cf 1.0.0-beta.17 → 1.0.0-beta.18
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.
- package/dist/_meta/commands.json +6117 -4540
- package/dist/_meta/schemas.json +5016 -3257
- package/dist/{abuse-reports-C4LxDvUM.mjs → abuse-reports-Ce-g5uZP.mjs} +6 -6
- package/dist/{access-DnWW2AAT.mjs → access-BtsMwesh.mjs} +1 -1
- package/dist/{accounts-8UcHNm3S.mjs → accounts-X5QVzEUW.mjs} +27 -21
- package/dist/{acm-qRM3iy4Z.mjs → acm-C_NepMi6.mjs} +1 -1
- package/dist/{addressing-CAb8z2Dq.mjs → addressing-BkQY1hoA.mjs} +18 -18
- package/dist/{agent-memory-oIUP4ZV5.mjs → agent-memory-1OPgC3lK.mjs} +6 -6
- package/dist/{ai-DnhytGdc.mjs → ai-Bb0_Zknm.mjs} +1 -1
- package/dist/{ai-audit-B7_5EOcN.mjs → ai-audit-DuEjVdML.mjs} +1 -1
- package/dist/{ai-gateway-b3FFu6UV.mjs → ai-gateway-Cm2vWMSI.mjs} +42 -42
- package/dist/ai-search-DDRpxyOM.mjs +79 -0
- package/dist/{ai-security-KUs94UW-.mjs → ai-security-A2STvE1b.mjs} +5 -5
- package/dist/{alerting-CCmyEPzN.mjs → alerting-CIwSk-Ks.mjs} +1 -1
- package/dist/{analytics-BAvBj6qx.mjs → analytics-H--uM3DA.mjs} +7 -7
- package/dist/{analytics-engine-DAJp89gM.mjs → analytics-engine-Alu7cllT.mjs} +1 -1
- package/dist/{api-security-BItVQymb.mjs → api-security-D-pcnhUL.mjs} +26 -26
- package/dist/{argo-DsJCvfml.mjs → argo-Lvmcx3am.mjs} +1 -1
- package/dist/{artifacts-DzHXeah6.mjs → artifacts-xT5S-mVa.mjs} +1 -1
- package/dist/{audit-logs-D9XxsVZm.mjs → audit-logs-DEoRBLkU.mjs} +1 -1
- package/dist/{auth-C530fHKQ.mjs → auth-B73lQS2h.mjs} +1 -1
- package/dist/auth-DMzEmOhG.mjs +2 -0
- package/dist/{auth-MNz2D-PD.mjs → auth-Db1KT0vm.mjs} +1 -1
- package/dist/{auth-token-Cw4c0y89.mjs → auth-token-D9XIPlwf.mjs} +1 -1
- package/dist/{basin-catalog-DcMiZV9J.mjs → basin-catalog-DFHt3cWi.mjs} +1 -1
- package/dist/{billing-COgAWTYh.mjs → billing-Bm2JNSGa.mjs} +6 -6
- package/dist/body-parser-DnBfDdx3.mjs +2 -0
- package/dist/{bot-management-Dx3lh9Fi.mjs → bot-management-CSr38g-O.mjs} +4 -4
- package/dist/{botnet-feed-C8496Nhl.mjs → botnet-feed-ebeWWSJj.mjs} +1 -1
- package/dist/{brand-protection-B0p8Sv6s.mjs → brand-protection-BCn9Mv-d.mjs} +5 -5
- package/dist/browser-run-BcWxzhAn.mjs +42 -0
- package/dist/{builds-DmEFTQTa.mjs → builds-BMwDzi7G.mjs} +39 -39
- package/dist/{cache-BUh85NRr.mjs → cache-_VaTLC5T.mjs} +1 -1
- package/dist/{cli-DJhpXf38.mjs → cli-P3q5DG3W.mjs} +1 -1
- package/dist/{client-side-security-km3-4L_4.mjs → client-side-security-CjSXrpa9.mjs} +1 -1
- package/dist/{cloud-connector-BoKFprDD.mjs → cloud-connector-BPJBeP06.mjs} +1 -1
- package/dist/{cloudforce-one-DN5N3C3w.mjs → cloudforce-one-DXX31GMi.mjs} +189 -189
- package/dist/{command-B694oLDo.mjs → command-BXiA79DP.mjs} +1 -1
- package/dist/{command-rx0Kb5pn.mjs → command-BbsPxJBT.mjs} +1 -1
- package/dist/{command-RC9WM5jq.mjs → command-Bkc04OyY.mjs} +1 -1
- package/dist/{command-Bmee6uwe.mjs → command-BtTc28ql.mjs} +1 -1
- package/dist/{command-CAs3SxlI.mjs → command-CBZhxmKD.mjs} +1 -1
- package/dist/{command-CCq-Z2Ua.mjs → command-CL7LLXM7.mjs} +1 -1
- package/dist/{command-DerHAjQL.mjs → command-CYyfigfC.mjs} +1 -1
- package/dist/{command-D1JR8Fb7.mjs → command-CxWLFv5Y.mjs} +1 -1
- package/dist/{command-CiApsRql.mjs → command-DDcBC4px.mjs} +1 -1
- package/dist/{command-CbQFbfps.mjs → command-NoxvOARP.mjs} +1 -1
- package/dist/{completions-11latun5.mjs → completions-CrDmwKnK.mjs} +1 -1
- package/dist/{connector-interrupts-wvQcZsO1.mjs → connector-interrupts-V4HGULCM.mjs} +1 -1
- package/dist/{connector-telemetry-events-C0GGCIQk.mjs → connector-telemetry-events-D9mTcfbJ.mjs} +1 -1
- package/dist/{connector-telemetry-snapshots-ZXzsFgea.mjs → connector-telemetry-snapshots-COrPVKol.mjs} +1 -1
- package/dist/{connectors-DXIUG4Zi.mjs → connectors-DvVlxGDx.mjs} +1 -1
- package/dist/{containers-DCH6MFjY.mjs → containers-Bt2zFsFd.mjs} +8 -8
- package/dist/{containers-WMWKhLkp.mjs → containers-BtcOgwm5.mjs} +2 -2
- package/dist/{content-scan-CRDmR7rD.mjs → content-scan-DldLmTjy.mjs} +1 -1
- package/dist/{context-q-6bMSL-.mjs → context-C_a8oSY9.mjs} +1 -1
- package/dist/cps-REo1OWP1.mjs +6 -0
- package/dist/csam-scanner-CIbbdoJK.mjs +10 -0
- package/dist/{custom-csrs-BV017SqE.mjs → custom-csrs-iGNc3rSZ.mjs} +1 -1
- package/dist/{custom-hostnames-DI_dFaof.mjs → custom-hostnames-BNxYbTyu.mjs} +15 -15
- package/dist/{custom-nameservers-BLoE8VGG.mjs → custom-nameservers-BMJoTSlQ.mjs} +1 -1
- package/dist/custom-pages-Qdemt1Fm.mjs +21 -0
- package/dist/{d1-Dbs8HItA.mjs → d1-DvCiQibO.mjs} +8 -8
- package/dist/{deploy-5utIiOMN.mjs → deploy-K664XPOb.mjs} +1 -1
- package/dist/{deploy-context-C0iVbWRG.mjs → deploy-context-ClNVJYlR.mjs} +13 -13
- package/dist/{diagnostics-C9B07eJY.mjs → diagnostics-Cw0mtcep.mjs} +2 -2
- package/dist/{dls-lbM3i4x-.mjs → dls-DoqfqutH.mjs} +1 -1
- package/dist/{dns-QTMPGYMa.mjs → dns-DC6WcO3m.mjs} +21 -21
- package/dist/{dns-firewall-Bfv0S44I.mjs → dns-firewall-DpQH9BCE.mjs} +9 -9
- package/dist/{docs-bV3hPwQL.mjs → docs-CqNRBHab.mjs} +1 -1
- package/dist/{durable-objects-0JvGTV27.mjs → durable-objects-CJDDy3CC.mjs} +1 -1
- package/dist/{email-auth-PzRqG0ex.mjs → email-auth--NHg1TjG.mjs} +1 -1
- package/dist/{email-routing-BgHL0Rbz.mjs → email-routing-COjENK55.mjs} +13 -13
- package/dist/{email-security-CSTKIecn.mjs → email-security-rdjH95T2.mjs} +38 -38
- package/dist/{email-sending-BSwuAir8.mjs → email-sending-26VJhR6Q.mjs} +18 -18
- package/dist/{field-extractors-B_lFnwaL.mjs → field-extractors-DBOvGOwz.mjs} +2 -2
- package/dist/{firewall-BsZxVitA.mjs → firewall-D8K93ffF.mjs} +20 -20
- package/dist/{flagship-qBohOZaM.mjs → flagship-CHdmCmvQ.mjs} +11 -11
- package/dist/{fraud-vGNdrSm-.mjs → fraud-CY4TV5Vc.mjs} +1 -1
- package/dist/{google-tag-gateway-BHdOg4VW.mjs → google-tag-gateway-DzSt4wlz.mjs} +1 -1
- package/dist/healthchecks-B52Mf3uL.mjs +22 -0
- package/dist/{hostnames-CLlaMqHu.mjs → hostnames-BMITIM8P.mjs} +1 -1
- package/dist/{hyperdrive-CXTqaIqk.mjs → hyperdrive-CHsW0r6Z.mjs} +1 -1
- package/dist/{iam-Dl_n_Lqq.mjs → iam-o1n9eUXf.mjs} +9 -9
- package/dist/{images-vMtXk2Rf.mjs → images-CJHAGxX6.mjs} +37 -37
- package/dist/index.mjs +1 -1
- package/dist/{init-_7djeBVw.mjs → init-CqQDL6i3.mjs} +1 -1
- package/dist/{intel-Bq4GGXv-.mjs → intel-B3S1gxUg.mjs} +1 -1
- package/dist/{ips-BcvZS46g.mjs → ips-q_UJMiy8.mjs} +1 -1
- package/dist/{k2-DL4hrVTj.mjs → k2-BNqVZnDN.mjs} +2 -2
- package/dist/{kv-BLo9wMgb.mjs → kv-B0nXSOcW.mjs} +1 -1
- package/dist/{lazy-command-CRcT6Dx-.mjs → lazy-command-4ccdBqrc.mjs} +1 -1
- package/dist/{leaked-credential-checks-Dx4RXMyN.mjs → leaked-credential-checks-BXwIjlTs.mjs} +1 -1
- package/dist/load-balancers-DJtMztJ0.mjs +76 -0
- package/dist/{login-Du_W6b9o.mjs → login-D-1FiBNv.mjs} +1 -1
- package/dist/{login-DT6Q1UJw.mjs → login-chQP8825.mjs} +1 -1
- package/dist/{logo-matches-C-1J0Oc3.mjs → logo-matches-qVYq8tWL.mjs} +1 -1
- package/dist/{logos-BuhvSu_H.mjs → logos-tnIahhcu.mjs} +1 -1
- package/dist/{logpush-DgZtF9vG.mjs → logpush-D4s3pJRw.mjs} +24 -24
- package/dist/{logs-CaKOk-1v.mjs → logs-cw7UL5V2.mjs} +3 -3
- package/dist/{magic-cloud-networking-CKxXYT8r.mjs → magic-cloud-networking-CLEHztNY.mjs} +1 -1
- package/dist/{magic-network-monitoring-BykFGQCz.mjs → magic-network-monitoring-DRwygeVq.mjs} +9 -9
- package/dist/{magic-transit-DYULsrUP.mjs → magic-transit-BFopRdPs.mjs} +170 -170
- package/dist/{managed-defense-DIb_uN25.mjs → managed-defense-D5kpmq0T.mjs} +9 -9
- package/dist/{managed-transforms-an3wQ0DW.mjs → managed-transforms-CT4jjnzJ.mjs} +2 -2
- package/dist/{matches-DkLSWb5X.mjs → matches-ClJ_24EY.mjs} +1 -1
- package/dist/{mcp-BcV1XqE8.mjs → mcp-50os3IRG.mjs} +10 -10
- package/dist/{mesh-CSSlZ-0F.mjs → mesh-jxtQP8sS.mjs} +2 -2
- package/dist/{monetization-B-nJ0SyI.mjs → monetization-D6cCDi-h.mjs} +4 -4
- package/dist/{network-ZzxQ_Dcz.mjs → network-dnWHB2uY.mjs} +27 -25
- package/dist/{network-interconnects-CI9NXQpe.mjs → network-interconnects-Cf8qSVdt.mjs} +1 -1
- package/dist/{o11y-LG6Y9LUZ.mjs → o11y-oMSg1pG4.mjs} +49 -49
- package/dist/{oauth-CP82E1_0.mjs → oauth-BfBdHhPS.mjs} +1 -1
- package/dist/{oauth-Bx693Af5.mjs → oauth-DDOiiH7h.mjs} +1 -1
- package/dist/{oauth-clients-BA30rTEl.mjs → oauth-clients-XDmoe-b4.mjs} +1 -1
- package/dist/{oauth-scopes-hseWES1v.mjs → oauth-scopes-D9VYGuTs.mjs} +1 -1
- package/dist/organization-94lHeeOs.mjs +75 -0
- package/dist/{organizations-CcgZPmFl.mjs → organizations-BJf3UTFi.mjs} +1 -1
- package/dist/{origin-post-quantum-encryption-BhdlaolV.mjs → origin-post-quantum-encryption-DMytVSUZ.mjs} +1 -1
- package/dist/{page-rules-DFfqfllI.mjs → page-rules-BUI-50oz.mjs} +4 -4
- package/dist/pages-CcdpCzHs.mjs +54 -0
- package/dist/pay-per-crawl-B1uHZn9j.mjs +38 -0
- package/dist/{pay-per-use-C_HxhpM4.mjs → pay-per-use-t066I5wm.mjs} +7 -7
- package/dist/{pipelines-DUMIVwof.mjs → pipelines-Co6S044l.mjs} +8 -8
- package/dist/precursor-BftyvS86.mjs +4 -0
- package/dist/previews-BLhnhElx.mjs +7 -0
- package/dist/{progress-DaQ4MzBI.mjs → progress-Q5w9PNTT.mjs} +1 -1
- package/dist/{prompt-KWYZvJWM.mjs → prompt-C0hKSr-R.mjs} +1 -1
- package/dist/{queries-DoyhspQf.mjs → queries-4MubO6Sz.mjs} +3 -3
- package/dist/{queues-BPxTU2rU.mjs → queues-CteS5M92.mjs} +17 -17
- package/dist/{r2-CQt4S7o7.mjs → r2-2QpT_Gso.mjs} +24 -24
- package/dist/{radar-CALpR1vq.mjs → radar-ODKaK4FJ.mjs} +1 -1
- package/dist/{raw-fetch-Cy09TjHc.mjs → raw-fetch-CEOuoKl9.mjs} +1 -1
- package/dist/{realtime-BiHKBoI4.mjs → realtime-DkfU8uEX.mjs} +84 -84
- package/dist/registrar-DM6JTVPS.mjs +43 -0
- package/dist/{registrar-sandbox-BttFwYqE.mjs → registrar-sandbox-BPNGf65G.mjs} +11 -9
- package/dist/{reporting-8aRJD5HX.mjs → reporting-5yFNXbJg.mjs} +1 -1
- package/dist/{request-headers-CqfJOkpO.mjs → request-headers-DXvswze2.mjs} +1 -1
- package/dist/request-tracers-BarLZY95.mjs +4 -0
- package/dist/{resource-sharing-uVVpMW0w.mjs → resource-sharing-BVEwBPs8.mjs} +19 -19
- package/dist/{rules-CFOuN3t2.mjs → rules-_C31X4Jz.mjs} +6 -6
- package/dist/{rulesets-DkhV2Hny.mjs → rulesets-8RwxoFhG.mjs} +6 -6
- package/dist/{rum-BnMW0Tlb.mjs → rum-CAUcpXpM.mjs} +6 -6
- package/dist/{run-Clc3P2u7.mjs → run-DtFLvOHB.mjs} +1 -1
- package/dist/run-LcOb9rhI.mjs +2 -0
- package/dist/{schema-flags-b096XMpt.mjs → schema-flags-DibfxEF6.mjs} +1 -1
- package/dist/{scim-tvZm6A-r.mjs → scim-DX5XrQ4w.mjs} +1 -1
- package/dist/{secrets-store-DuNxSh1_.mjs → secrets-store-DSqqrr25.mjs} +1 -1
- package/dist/{security-insights-C17c9ZYZ.mjs → security-insights-FSktO04S.mjs} +1 -1
- package/dist/{security-txt-D4pRk7-w.mjs → security-txt-D2g3lQdg.mjs} +1 -1
- package/dist/{shared-zePemxHi.mjs → shared-eefMO8R4.mjs} +1 -1
- package/dist/smart-shield-IVb2sR0C.mjs +24 -0
- package/dist/{snippets-BIcZ6vSW.mjs → snippets-cWwWficN.mjs} +2 -2
- package/dist/{spectrum-DjDX0geK.mjs → spectrum-DYiIBYRB.mjs} +1 -1
- package/dist/{speed-DiPoFJMm.mjs → speed-C7uiW2Wf.mjs} +1 -1
- package/dist/{sql-DLjCt_R3.mjs → sql-TGV8qQMj.mjs} +1 -1
- package/dist/{src-CutrsNl4.mjs → src-BUH-P_zd.mjs} +5 -5
- package/dist/ssl-xQP_HbWN.mjs +139 -0
- package/dist/{stream-uhn_Zsni.mjs → stream-CfWgj8Cr.mjs} +55 -55
- package/dist/{submit-C3suIDBX.mjs → submit-DxGr1T40.mjs} +1 -1
- package/dist/tags-LEJ2VYhQ.mjs +23 -0
- package/dist/{telemetry-DYjsavEr.mjs → telemetry-BHne10Yy.mjs} +1 -1
- package/dist/telemetry-BavSU4ku.mjs +2 -0
- package/dist/{tenant-DK88yQM4.mjs → tenant-7d5vwc6K.mjs} +1 -1
- package/dist/{tenant-custom-nameservers-BZ1JD1Yf.mjs → tenant-custom-nameservers-BkxlPr5O.mjs} +1 -1
- package/dist/{tunnels-DjbomhCa.mjs → tunnels-DlGODvwT.mjs} +4 -4
- package/dist/{turnstile-DXrbEy2A.mjs → turnstile-DhLkdhij.mjs} +5 -5
- package/dist/update-check-nLfkSfdz.mjs +2 -0
- package/dist/update-check-worker.mjs +1 -1
- package/dist/{update-check-BhhtSXVZ.mjs → update-check-wvjOsnGK.mjs} +1 -1
- package/dist/{url-info-a0mY4UsC.mjs → url-info-CeoV5dBc.mjs} +1 -1
- package/dist/{url-normalization-DiwpDIhc.mjs → url-normalization-9NoaoRNh.mjs} +1 -1
- package/dist/{url-scanner-D0egjBe5.mjs → url-scanner-w_-Sumz-.mjs} +8 -8
- package/dist/{user-DDH9lxf5.mjs → user-D33B3alX.mjs} +59 -59
- package/dist/{vectorize-DaT3amFV.mjs → vectorize-Wp9De13y.mjs} +17 -17
- package/dist/version-B2RUUqGT.mjs +2 -0
- package/dist/{waiting-rooms-BGMpu9gS.mjs → waiting-rooms-BE8FloRd.mjs} +13 -13
- package/dist/{web-assets-NqNglLSI.mjs → web-assets-ew0iaP7c.mjs} +35 -35
- package/dist/{web3-UnCUuIfB.mjs → web3-BUyXBaqq.mjs} +6 -6
- package/dist/{workers-builds-Cy6fdtm5.mjs → workers-builds-DzU9NGno.mjs} +7 -7
- package/dist/{workers-for-platforms-JscCHivQ.mjs → workers-for-platforms-B4xzFNxJ.mjs} +25 -22
- package/dist/{workers-DfA9ugmb.mjs → workers-pP5tsDbD.mjs} +25 -22
- package/dist/{workers-vpc-FDZQBqOu.mjs → workers-vpc-Bre_t9Al.mjs} +1 -1
- package/dist/{workflows-Dq-k81hU.mjs → workflows-DXYGKtqq.mjs} +1 -1
- package/dist/zaraz-DoH4QD0u.mjs +22 -0
- package/dist/{zero-trust-CZ685QhO.mjs → zero-trust-DKt20rzE.mjs} +461 -458
- package/dist/{zone-DcZIUTWt.mjs → zone-BXM3p0JR.mjs} +1 -1
- package/dist/{zones-BVdvYUCv.mjs → zones-CJdtqEBx.mjs} +21 -21
- package/package.json +9 -9
- package/dist/account-tags-zvHRQZxb.mjs +0 -15
- package/dist/ai-search-CtfW5fzl.mjs +0 -79
- package/dist/auth-Ccm5viK_.mjs +0 -2
- package/dist/body-parser-DkHKPkJ7.mjs +0 -2
- package/dist/browser-run-ChXohmNG.mjs +0 -42
- package/dist/certificate-authorities-BTLdA7EQ.mjs +0 -6
- package/dist/client-certificates-B3UxH_Au.mjs +0 -13
- package/dist/cps-Due0P5IW.mjs +0 -6
- package/dist/csam-scanner-DvLrPw45.mjs +0 -10
- package/dist/ct-alerting-BtEGkRJi.mjs +0 -5
- package/dist/custom-certificates-CMLXTTEc.mjs +0 -17
- package/dist/custom-pages-ubava9Qm.mjs +0 -21
- package/dist/dcv-delegation-sGGt6UU_.mjs +0 -4
- package/dist/healthchecks-DAYYLZ6u.mjs +0 -22
- package/dist/keyless-certificates-0pzjkZb6.mjs +0 -13
- package/dist/keys-BSV5IXdU.mjs +0 -4
- package/dist/load-balancers-CCCWoQXv.mjs +0 -76
- package/dist/mtls-certificates-ukwDz6Lc.mjs +0 -13
- package/dist/organization-DMr_z6n4.mjs +0 -71
- package/dist/origin-ca-certificates-BZxUbB5N.mjs +0 -11
- package/dist/origin-tls-client-auth-DzbZvtmi.mjs +0 -30
- package/dist/pages-BkcL5rC4.mjs +0 -54
- package/dist/pay-per-crawl-Dulm7Xy5.mjs +0 -38
- package/dist/precursor-DsGbA_YJ.mjs +0 -4
- package/dist/previews-Cma3-M7K.mjs +0 -7
- package/dist/registrar-gERQ3b85.mjs +0 -43
- package/dist/request-tracers-DcnwQg3K.mjs +0 -4
- package/dist/resource-tagging-SlsUtLsq.mjs +0 -4
- package/dist/run-CHNyLZLG.mjs +0 -2
- package/dist/smart-shield-2egm1Vaw.mjs +0 -24
- package/dist/ssl-vNzK0c9S.mjs +0 -45
- package/dist/tags-Dy2jG-Dt.mjs +0 -4
- package/dist/telemetry-Bdv5LZZs.mjs +0 -2
- package/dist/update-check-Dld7rbLd.mjs +0 -2
- package/dist/values-Bfr5-bL6.mjs +0 -4
- package/dist/version-CAuKDZAG.mjs +0 -2
- package/dist/zaraz-Dpr1pLDx.mjs +0 -22
|
@@ -1,102 +1,102 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-Dil4fTWX.mjs";import{i as n,n as r}from"./auth-
|
|
2
|
+
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-Dil4fTWX.mjs";import{i as n,n as r}from"./auth-Db1KT0vm.mjs";import{a as i,t as a}from"./context-C_a8oSY9.mjs";import{t as o}from"./output-Co4xdFf6.mjs";import{t as s}from"./dry-run-C2KjGX10.mjs";import{t as c}from"./progress-Q5w9PNTT.mjs";import{t as l}from"./run-DtFLvOHB.mjs";import"./telemetry-BavSU4ku.mjs";import{a as u,i as d,n as f,r as p,t as m}from"./body-parser-DnBfDdx3.mjs";import{n as h,t as g}from"./input-validation-D7z60HJH.mjs";import{a as _,n as v}from"./prompt-C0hKSr-R.mjs";import{n as y,t as ee}from"./raw-fetch-CEOuoKl9.mjs";var te={method:`POST`,path:t=>e`/accounts/${t.account_id}/stream/keys`};function ne(e){return e.usage(`$0 stream keys create
|
|
3
3
|
|
|
4
4
|
Creates an RSA private key in PEM and JWK formats. Key files are only displayed once after creation. Keys are created, used, and deleted independently of videos, and every key can sign any video.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const re={command:`create`,describe:`Create signing keys`,builder:ne,handler:async e=>l({command:`stream keys create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf stream keys create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/stream/keys`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Creating`,async()=>n.send(te,{account_id:l}));o(u,{successLabel:`Created`})})};var ie={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/stream/keys/${t.identifier}`};function ae(e){return e.usage(`$0 stream keys delete <identifier>
|
|
5
5
|
|
|
6
|
-
Deletes signing keys and revokes all signed URLs generated with the key.`).positional(`identifier`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const oe={command:`delete <identifier>`,describe:`Delete signing keys`,builder:ae,handler:async e=>l({command:`stream keys delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf stream keys delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/stream/keys/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}`,pathParams:{identifier:String(e.identifier??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await
|
|
6
|
+
Deletes signing keys and revokes all signed URLs generated with the key.`).positional(`identifier`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const oe={command:`delete <identifier>`,describe:`Delete signing keys`,builder:ae,handler:async e=>l({command:`stream keys delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf stream keys delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/stream/keys/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}`,pathParams:{identifier:String(e.identifier??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force,message:`Permanently delete signing key? All tokens created with this key will become unauthorized!`})){process.stderr.write(`Aborted.
|
|
7
7
|
`);return}let u=await c(`Deleting`,async()=>n.send(ie,{account_id:l,identifier:e.identifier}));o(u,{successLabel:`Deleted`})})};var se={method:`GET`,path:t=>e`/accounts/${t.account_id}/stream/keys`};function ce(e){return e.usage(`$0 stream keys list
|
|
8
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 le={command:`list`,describe:`List signing keys`,builder:ce,handler:async e=>l({command:`stream keys list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf stream keys list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/stream/keys`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(se,{account_id:l}));o(u,{successLabel:`Loaded`})})},
|
|
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 le={command:`list`,describe:`List signing keys`,builder:ce,handler:async e=>l({command:`stream keys list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf stream keys list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/stream/keys`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(se,{account_id:l}));o(u,{successLabel:`Loaded`})})},b={command:`keys`,describe:`Signing keys used to generate short-lived signed URLs for private video playback`,builder:e=>e.command(re).command(oe).command(le).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function x(e){return e.usage(`$0 stream live-inputs create
|
|
10
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`]}).coerce(`recording-mode`,e=>
|
|
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(`meta`,{type:`string`,description:`A user modifiable key-value store used to reference other systems of record for managing live inputs. Provide as a JSON object or @path/to/file.json.`}).option(`prefer-low-latency`,{type:`boolean`,description:`When enabled, the live stream is delivered using Low-Latency HLS (LL-HLS), reducing glass-to-glass latency for viewers at the cost of reduced player compatibility.`,default:!1}).option(`recording-allowed-origins`,{type:`string`,array:!0,description:"Lists the origins allowed to display videos created with this input. Enter allowed origin domains in an array and use `*` for wildcard subdomains. An empty array allows videos to be viewed on any origin."}).option(`recording-hide-live-viewer-count`,{type:`boolean`,description:"Disables reporting the number of live viewers when this property is set to `true`."}).option(`recording-mode`,{type:`string`,description:"Specifies the recording behavior for the live input. Set this value to `off` to prevent a recording. Set the value to `automatic` to begin a recording and transition to on-demand after Stream Live stops receiving input.",choices:[`off`,`automatic`]}).coerce(`recording-mode`,e=>h(e,`recording-mode`,`text`)).option(`recording-require-signed-urls`,{type:`boolean`,description:"Indicates if a video using the live input has the `requireSignedURLs` property set. Also enforces access controls on any video recording of the livestream with the live input."}).option(`recording-timeout-seconds`,{type:`number`,description:"Determines the amount of time a live input configured in `automatic` mode should wait before a recording transitions from live to on-demand. `0` is recommended for most use cases and indicates the platform default should be used."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const S={command:`create`,describe:`Create a live input`,builder:x,handler:async e=>l({command:`stream live-inputs create`,classification:{safeFlags:[`enabled`,`prefer-low-latency`,`recording-hide-live-viewer-count`,`recording-mode`,`recording-require-signed-urls`,`dry-run`]}},e,async()=>{let l={};if(e[`idempotency-key`]!==void 0&&(l[`Idempotency-Key`]=String(e[`idempotency-key`])),e.dryRun){let t=await i();s({command:`cf stream live-inputs create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/stream/live_inputs`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({defaultCreator:h(e[`default-creator`],`default-creator`,`text`),deleteRecordingAfterDays:e[`delete-recording-after-days`],enabled:e.enabled,meta:p(e.meta,`meta`),preferLowLatency:e[`prefer-low-latency`],recording:{allowedOrigins:e[`recording-allowed-origins`],hideLiveViewerCount:e[`recording-hide-live-viewer-count`],mode:e[`recording-mode`],requireSignedURLs:e[`recording-require-signed-urls`],timeoutSeconds:e[`recording-timeout-seconds`]}},[[`meta`]]):f(e.body)});return}let d=await r(e),g=e.local?t:await a();if(e.accountId=g,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n(d,`POST`,`/accounts/${g}/stream/live_inputs`,{body:t,headers:Object.keys(l).length>0?l:void 0}));o(r,{successLabel:`Created`});return}let _={};e[`default-creator`]!==void 0&&u(_,[`defaultCreator`],h(e[`default-creator`],`default-creator`,`text`)),e[`delete-recording-after-days`]!==void 0&&u(_,[`deleteRecordingAfterDays`],e[`delete-recording-after-days`]),e.enabled!==void 0&&u(_,[`enabled`],e.enabled),e.meta!==void 0&&u(_,[`meta`],p(e.meta,`meta`)),e[`prefer-low-latency`]!==void 0&&u(_,[`preferLowLatency`],e[`prefer-low-latency`]),e[`recording-allowed-origins`]!==void 0&&u(_,[`recording`,`allowedOrigins`],e[`recording-allowed-origins`]),e[`recording-hide-live-viewer-count`]!==void 0&&u(_,[`recording`,`hideLiveViewerCount`],e[`recording-hide-live-viewer-count`]),e[`recording-mode`]!==void 0&&u(_,[`recording`,`mode`],e[`recording-mode`]),e[`recording-require-signed-urls`]!==void 0&&u(_,[`recording`,`requireSignedURLs`],e[`recording-require-signed-urls`]),e[`recording-timeout-seconds`]!==void 0&&u(_,[`recording`,`timeoutSeconds`],e[`recording-timeout-seconds`]);let v=await c(`Creating`,async()=>n(d,`POST`,`/accounts/${g}/stream/live_inputs`,{body:_,headers:Object.keys(l).length>0?l:void 0}));o(v,{successLabel:`Created`})})};var C={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/stream/live_inputs/${t.live_input_identifier}`};function w(e){return e.usage(`$0 stream live-inputs delete <live-input-identifier>
|
|
12
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
|
|
14
|
-
`);return}let u=await c(`Deleting`,async()=>n.send(
|
|
13
|
+
Permanently delete a live input, making it inaccessible and blocking current and future broadcasts to it. Existing recordings will be retained.`).positional(`live-input-identifier`,{type:`string`,description:`A unique identifier for a live input.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const T={command:`delete <live-input-identifier>`,describe:`Delete a live input`,builder:w,handler:async e=>l({command:`stream live-inputs delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf stream live-inputs delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/stream/live_inputs/${e[`live-input-identifier`]==null?`<live-input-identifier>`:encodeURIComponent(String(e[`live-input-identifier`]))}`,pathParams:{"live-input-identifier":String(e[`live-input-identifier`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force,message:`Permanently delete this live input? It cannot be recreated.`})){process.stderr.write(`Aborted.
|
|
14
|
+
`);return}let u=await c(`Deleting`,async()=>n.send(C,{account_id:l,live_input_identifier:e[`live-input-identifier`]}));o(u,{successLabel:`Deleted`})})};var E={method:`POST`,path:t=>e`/accounts/${t.account_id}/stream/live_inputs/${t.live_input_identifier}/disable`};function D(e){return e.usage(`$0 stream live-inputs disable <live-input-identifier>
|
|
15
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
|
|
17
|
-
`);return}let u=await c(`Deleting`,async()=>n.send(
|
|
16
|
+
Prevents a live input from being streamed to and terminates any active broadcasts until re-enabled.`).positional(`live-input-identifier`,{type:`string`,description:`A unique identifier for a live input.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const O={command:`disable <live-input-identifier>`,describe:`Disable a live input`,builder:D,handler:async e=>l({command:`stream live-inputs disable`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf stream live-inputs disable`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/stream/live_inputs/${e[`live-input-identifier`]==null?`<live-input-identifier>`:encodeURIComponent(String(e[`live-input-identifier`]))}/disable`,pathParams:{"live-input-identifier":String(e[`live-input-identifier`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force,message:`Disable this live input? Active broadcasts will be terminated and future connections will be blocked until it is re-enabled.`})){process.stderr.write(`Aborted.
|
|
17
|
+
`);return}let u=await c(`Deleting`,async()=>n.send(E,{account_id:l,live_input_identifier:e[`live-input-identifier`]}));o(u,{successLabel:`Deleted`})})};var k={method:`POST`,path:t=>e`/accounts/${t.account_id}/stream/live_inputs/${t.live_input_identifier}/enable`};function A(e){return e.usage(`$0 stream live-inputs enable <live-input-identifier>
|
|
18
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
|
|
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 j={command:`enable <live-input-identifier>`,describe:`Enable a live input`,builder:A,handler:async e=>l({command:`stream live-inputs enable`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf stream live-inputs enable`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/stream/live_inputs/${e[`live-input-identifier`]==null?`<live-input-identifier>`:encodeURIComponent(String(e[`live-input-identifier`]))}/enable`,pathParams:{"live-input-identifier":String(e[`live-input-identifier`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Creating`,async()=>n.send(k,{account_id:l,live_input_identifier:e[`live-input-identifier`]}));o(u,{successLabel:`Created`})})};var M={method:`GET`,path:t=>e`/accounts/${t.account_id}/stream/live_inputs/${t.live_input_identifier}`};function N(e){return e.usage(`$0 stream live-inputs get <live-input-identifier>
|
|
20
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
|
|
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 e=>l({command:`stream live-inputs get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf stream live-inputs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/stream/live_inputs/${e[`live-input-identifier`]==null?`<live-input-identifier>`:encodeURIComponent(String(e[`live-input-identifier`]))}`,pathParams:{"live-input-identifier":String(e[`live-input-identifier`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(M,{account_id:l,live_input_identifier:e[`live-input-identifier`]}));o(u,{successLabel:`Loaded`})})};var F={method:`GET`,path:t=>e`/accounts/${t.account_id}/stream/live_inputs`,query:[`include_counts`]};function I(e){return e.usage(`$0 stream live-inputs list
|
|
22
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
|
|
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 L={command:`list`,describe:`List live inputs`,builder:I,handler:async e=>l({command:`stream live-inputs list`,classification:{safeFlags:[`include-counts`,`dry-run`]}},e,async()=>{let n={include_counts:e[`include-counts`]};if(e.dryRun){let e=await i();s({command:`cf stream live-inputs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/stream/live_inputs`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(F,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var R={method:`POST`,path:t=>e`/accounts/${t.account_id}/stream/live_inputs/${t.live_input_identifier}/outputs`,body:`json`};function z(e){return e.usage(`$0 stream live-inputs outputs create <live-input-identifier>
|
|
24
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
|
|
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 B={command:`create <live-input-identifier>`,describe:`Create a new output, connected to a live input`,builder:z,handler:async e=>l({command:`stream live-inputs outputs create`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf stream live-inputs outputs create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/stream/live_inputs/${e[`live-input-identifier`]==null?`<live-input-identifier>`:encodeURIComponent(String(e[`live-input-identifier`]))}/outputs`,pathParams:{"live-input-identifier":String(e[`live-input-identifier`]??``)},bodyKind:`json`,body:e.body===void 0?m({enabled:e.enabled,streamKey:h(e[`stream-key`],`stream-key`,`text`),url:h(e.url,`url`,`text`)}):f(e.body),sensitiveBodyPaths:[[`streamKey`],[`url`]]});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(R,{body:t,account_id:l,live_input_identifier:e[`live-input-identifier`]}));o(r,{successLabel:`Created`});return}e[`stream-key`]===void 0&&(e[`stream-key`]=await _(`stream-key`,`The streamKey used to authenticate against an output's target.`,{kind:`secret`})),e.url===void 0&&(e.url=await _(`url`,`The URL an output uses to restream.`,{kind:`secret`}));let u=m({enabled:e.enabled,streamKey:h(e[`stream-key`],`stream-key`,`text`),url:h(e.url,`url`,`text`)}),d=await c(`Creating`,async()=>n.send(R,{body:u,account_id:l,live_input_identifier:e[`live-input-identifier`]}));o(d,{successLabel:`Created`})})};var V={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/stream/live_inputs/${t.live_input_identifier}/outputs/${t.output_identifier}`};function H(e){return e.usage(`$0 stream live-inputs outputs delete <output-identifier>
|
|
26
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
|
|
28
|
-
`);return}let u=await c(`Deleting`,async()=>n.send(
|
|
27
|
+
Deletes an output and removes it from the associated live input.`).positional(`output-identifier`,{type:`string`,description:`A unique identifier for the output.`,demandOption:!0}).option(`live-input-identifier`,{type:`string`,description:`A unique identifier for a live input.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const U={command:`delete <output-identifier>`,describe:`Delete an output`,builder:H,handler:async e=>l({command:`stream live-inputs outputs delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf stream live-inputs outputs delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/stream/live_inputs/${e[`live-input-identifier`]==null?`<live-input-identifier>`:encodeURIComponent(String(e[`live-input-identifier`]))}/outputs/${e[`output-identifier`]==null?`<output-identifier>`:encodeURIComponent(String(e[`output-identifier`]))}`,pathParams:{"live-input-identifier":String(e[`live-input-identifier`]??``),"output-identifier":String(e[`output-identifier`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force,message:`Delete this output? Any active broadcast to this target will be terminated.`})){process.stderr.write(`Aborted.
|
|
28
|
+
`);return}let u=await c(`Deleting`,async()=>n.send(V,{account_id:l,live_input_identifier:e[`live-input-identifier`],output_identifier:e[`output-identifier`]}));o(u,{successLabel:`Deleted`})})};var W={method:`GET`,path:t=>e`/accounts/${t.account_id}/stream/live_inputs/${t.live_input_identifier}/outputs`};function ue(e){return e.usage(`$0 stream live-inputs outputs list
|
|
29
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
|
|
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 de={command:`list`,describe:`List all outputs associated with a specified live input`,builder:ue,handler:async e=>l({command:`stream live-inputs outputs list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf stream live-inputs outputs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/stream/live_inputs/${e[`live-input-identifier`]==null?`<live-input-identifier>`:encodeURIComponent(String(e[`live-input-identifier`]))}/outputs`,pathParams:{"live-input-identifier":String(e[`live-input-identifier`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(W,{account_id:l,live_input_identifier:e[`live-input-identifier`]}));o(u,{successLabel:`Loaded`})})};var G={method:`PUT`,path:t=>e`/accounts/${t.account_id}/stream/live_inputs/${t.live_input_identifier}/outputs/${t.output_identifier}`,body:`json`};function fe(e){return e.usage(`$0 stream live-inputs outputs update <output-identifier>
|
|
31
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
|
|
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 pe={command:`update <output-identifier>`,describe:`Update an output`,builder:fe,handler:async e=>l({command:`stream live-inputs outputs update`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf stream live-inputs outputs update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/stream/live_inputs/${e[`live-input-identifier`]==null?`<live-input-identifier>`:encodeURIComponent(String(e[`live-input-identifier`]))}/outputs/${e[`output-identifier`]==null?`<output-identifier>`:encodeURIComponent(String(e[`output-identifier`]))}`,pathParams:{"live-input-identifier":String(e[`live-input-identifier`]??``),"output-identifier":String(e[`output-identifier`]??``)},bodyKind:`json`,body:e.body===void 0?m({enabled:e.enabled}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(G,{body:t,account_id:l,live_input_identifier:e[`live-input-identifier`],output_identifier:e[`output-identifier`]}));o(r,{successLabel:`Updated`});return}if(e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);let u=m({enabled:e.enabled}),d=await c(`Updating`,async()=>n.send(G,{body:u,account_id:l,live_input_identifier:e[`live-input-identifier`],output_identifier:e[`output-identifier`]}));o(d,{successLabel:`Updated`})})},me={command:`outputs`,describe:`Operations for live-inputs.outputs`,builder:e=>e.command(B).command(U).command(de).command(pe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var he={method:`POST`,path:t=>e`/accounts/${t.account_id}/stream/live_inputs/${t.live_input_identifier}/rotate_keys`};function ge(e){return e.usage(`$0 stream live-inputs rotate-keys <live-input-identifier>
|
|
33
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
|
|
35
|
-
`);return}let u=await c(`Deleting`,async()=>n.send(
|
|
34
|
+
Rotates the credentials for a live input without changing its identifier. Old credentials are revoked, broadcasts using stale credentials are automatically disconnected shortly after rotation, and the response returns refreshed credentials.`).positional(`live-input-identifier`,{type:`string`,description:`A unique identifier for a live input.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const _e={command:`rotate-keys <live-input-identifier>`,describe:`Rotate keys for a live input`,builder:ge,handler:async e=>l({command:`stream live-inputs rotate-keys`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf stream live-inputs rotate-keys`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/stream/live_inputs/${e[`live-input-identifier`]==null?`<live-input-identifier>`:encodeURIComponent(String(e[`live-input-identifier`]))}/rotate_keys`,pathParams:{"live-input-identifier":String(e[`live-input-identifier`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force,message:`Rotate keys for this live input? Active broadcasts will be terminated. New broadcasts cannot start with outdated credentials.`})){process.stderr.write(`Aborted.
|
|
35
|
+
`);return}let u=await c(`Deleting`,async()=>n.send(he,{account_id:l,live_input_identifier:e[`live-input-identifier`]}));o(u,{successLabel:`Deleted`})})};var K={method:`PUT`,path:t=>e`/accounts/${t.account_id}/stream/live_inputs/${t.live_input_identifier}`,body:`json`};function ve(e){return e.usage(`$0 stream live-inputs update <live-input-identifier>
|
|
36
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`]}).coerce(`recording-mode`,e=>
|
|
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(`meta`,{type:`string`,description:`A user modifiable key-value store used to reference other systems of record for managing live inputs. Provide as a JSON object or @path/to/file.json.`}).option(`prefer-low-latency`,{type:`boolean`,description:`When enabled, the live stream is delivered using Low-Latency HLS (LL-HLS), reducing glass-to-glass latency for viewers at the cost of reduced player compatibility.`}).option(`recording-allowed-origins`,{type:`string`,array:!0,description:"Lists the origins allowed to display videos created with this input. Enter allowed origin domains in an array and use `*` for wildcard subdomains. An empty array allows videos to be viewed on any origin."}).option(`recording-hide-live-viewer-count`,{type:`boolean`,description:"Disables reporting the number of live viewers when this property is set to `true`."}).option(`recording-mode`,{type:`string`,description:"Specifies the recording behavior for the live input. Set this value to `off` to prevent a recording. Set the value to `automatic` to begin a recording and transition to on-demand after Stream Live stops receiving input.",choices:[`off`,`automatic`]}).coerce(`recording-mode`,e=>h(e,`recording-mode`,`text`)).option(`recording-require-signed-urls`,{type:`boolean`,description:"Indicates if a video using the live input has the `requireSignedURLs` property set. Also enforces access controls on any video recording of the livestream with the live input."}).option(`recording-timeout-seconds`,{type:`number`,description:"Determines the amount of time a live input configured in `automatic` mode should wait before a recording transitions from live to on-demand. `0` is recommended for most use cases and indicates the platform default should be used."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ye={command:`update <live-input-identifier>`,describe:`Update a live input`,builder:ve,handler:async e=>l({command:`stream live-inputs update`,classification:{safeFlags:[`enabled`,`prefer-low-latency`,`recording-hide-live-viewer-count`,`recording-mode`,`recording-require-signed-urls`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf stream live-inputs update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/stream/live_inputs/${e[`live-input-identifier`]==null?`<live-input-identifier>`:encodeURIComponent(String(e[`live-input-identifier`]))}`,pathParams:{"live-input-identifier":String(e[`live-input-identifier`]??``)},bodyKind:`json`,body:e.body===void 0?m({defaultCreator:h(e[`default-creator`],`default-creator`,`text`),deleteRecordingAfterDays:e[`delete-recording-after-days`],enabled:e.enabled,meta:p(e.meta,`meta`),preferLowLatency:e[`prefer-low-latency`],recording:{allowedOrigins:e[`recording-allowed-origins`],hideLiveViewerCount:e[`recording-hide-live-viewer-count`],mode:e[`recording-mode`],requireSignedURLs:e[`recording-require-signed-urls`],timeoutSeconds:e[`recording-timeout-seconds`]}},[[`meta`]]):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(K,{body:t,account_id:l,live_input_identifier:e[`live-input-identifier`]}));o(r,{successLabel:`Updated`});return}let u=m({defaultCreator:h(e[`default-creator`],`default-creator`,`text`),deleteRecordingAfterDays:e[`delete-recording-after-days`],enabled:e.enabled,meta:p(e.meta,`meta`),preferLowLatency:e[`prefer-low-latency`],recording:{allowedOrigins:e[`recording-allowed-origins`],hideLiveViewerCount:e[`recording-hide-live-viewer-count`],mode:e[`recording-mode`],requireSignedURLs:e[`recording-require-signed-urls`],timeoutSeconds:e[`recording-timeout-seconds`]}},[[`meta`]]),d=await c(`Updating`,async()=>n.send(K,{body:u,account_id:l,live_input_identifier:e[`live-input-identifier`]}));o(d,{successLabel:`Updated`})})},be={command:`live-inputs`,describe:`Enable and disable live input streams`,builder:e=>e.command(S).command(T).command(O).command(j).command(P).command(L).command(_e).command(ye).command(me).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var xe={method:`GET`,path:t=>e`/accounts/${t.account_id}/stream/storage-usage`,query:[`creator`]};function Se(e){return e.usage(`$0 stream storage-usage
|
|
38
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
|
|
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 Ce={command:`storage-usage`,describe:`Storage use`,builder:Se,handler:async e=>l({command:`stream storage-usage`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={creator:e.creator};if(e.dryRun){let e=await i();s({command:`cf stream storage-usage`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/stream/storage-usage`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(xe,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var q={method:`POST`,path:t=>e`/accounts/${t.account_id}/stream/${t.identifier}/audio/copy`,body:`json`};function we(e){return e.usage(`$0 stream videos audio-tracks copy <identifier>
|
|
40
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
|
|
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 Te={command:`copy <identifier>`,describe:`Add audio tracks to a video`,builder:we,handler:async e=>l({command:`stream videos audio-tracks copy`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf stream videos audio-tracks copy`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/stream/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}/audio/copy`,pathParams:{identifier:String(e.identifier??``)},bodyKind:`json`,body:e.body===void 0?m({label:h(e.label,`label`,`text`),url:h(e.url,`url`,`text`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(q,{body:t,account_id:l,identifier:e.identifier}));o(r,{successLabel:`Created`});return}e.label===void 0&&(e.label=await _(`label`,`A string to uniquely identify the track amongst other audio track labels for the specified video.`));let u=m({label:h(e.label,`label`,`text`),url:h(e.url,`url`,`text`)}),d=await c(`Creating`,async()=>n.send(q,{body:u,account_id:l,identifier:e.identifier}));o(d,{successLabel:`Created`})})};var Ee={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/stream/${t.identifier}/audio/${t.audio_identifier}`};function De(e){return e.usage(`$0 stream videos audio-tracks delete <audio-identifier>
|
|
42
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
|
|
44
|
-
`);return}let u=await c(`Deleting`,async()=>n.send(
|
|
43
|
+
Deletes additional audio tracks on a video. Deleting a default audio track is not allowed. You must assign another audio track as default prior to deletion.`).positional(`audio-identifier`,{type:`string`,description:`The unique identifier for an additional audio track.`,demandOption:!0}).option(`identifier`,{type:`string`,description:`A Cloudflare-generated unique identifier for a media item.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Oe={command:`delete <audio-identifier>`,describe:`Delete additional audio tracks on a video`,builder:De,handler:async e=>l({command:`stream videos audio-tracks delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf stream videos audio-tracks delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/stream/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}/audio/${e[`audio-identifier`]==null?`<audio-identifier>`:encodeURIComponent(String(e[`audio-identifier`]))}`,pathParams:{identifier:String(e.identifier??``),"audio-identifier":String(e[`audio-identifier`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force,message:`Permanently delete this audio track?`})){process.stderr.write(`Aborted.
|
|
44
|
+
`);return}let u=await c(`Deleting`,async()=>n.send(Ee,{account_id:l,identifier:e.identifier,audio_identifier:e[`audio-identifier`]}));o(u,{successLabel:`Deleted`})})};var J={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/stream/${t.identifier}/audio/${t.audio_identifier}`,body:`json`};function ke(e){return e.usage("$0 stream videos audio-tracks edit <audio-identifier>\n\nEdits additional audio tracks on a video. Editing the default status of an audio track to `true` will mark all other audio tracks on the video default status to `false`.").positional(`audio-identifier`,{type:`string`,description:`The unique identifier for an additional audio track.`,demandOption:!0}).option(`identifier`,{type:`string`,description:`A Cloudflare-generated unique identifier for a media item.`,demandOption:!0}).option(`default`,{type:`boolean`,description:`Denotes whether the audio track will be played by default in a player.`}).option(`label`,{type:`string`,description:`A string to uniquely identify the track amongst other audio track labels for the specified video.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Ae={command:`edit <audio-identifier>`,describe:`Edit additional audio tracks on a video`,builder:ke,handler:async e=>l({command:`stream videos audio-tracks edit`,classification:{safeFlags:[`default`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf stream videos audio-tracks edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/stream/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}/audio/${e[`audio-identifier`]==null?`<audio-identifier>`:encodeURIComponent(String(e[`audio-identifier`]))}`,pathParams:{identifier:String(e.identifier??``),"audio-identifier":String(e[`audio-identifier`]??``)},bodyKind:`json`,body:e.body===void 0?m({default:e.default,label:h(e.label,`label`,`text`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(J,{body:t,account_id:l,identifier:e.identifier,audio_identifier:e[`audio-identifier`]}));o(r,{successLabel:`Updated`});return}let u=m({default:e.default,label:h(e.label,`label`,`text`)}),d=await c(`Updating`,async()=>n.send(J,{body:u,account_id:l,identifier:e.identifier,audio_identifier:e[`audio-identifier`]}));o(d,{successLabel:`Updated`})})};var je={method:`GET`,path:t=>e`/accounts/${t.account_id}/stream/${t.identifier}/audio`};function Me(e){return e.usage(`$0 stream videos audio-tracks list
|
|
45
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
|
|
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 Ne={command:`list`,describe:`List additional audio tracks on a video`,builder:Me,handler:async e=>l({command:`stream videos audio-tracks list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf stream videos audio-tracks list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/stream/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}/audio`,pathParams:{identifier:String(e.identifier??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(je,{account_id:l,identifier:e.identifier}));o(u,{successLabel:`Loaded`})})},Pe={command:`audio-tracks`,describe:`Operations for videos.audio-tracks`,builder:e=>e.command(Te).command(Oe).command(Ae).command(Ne).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Fe={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/stream/${t.identifier}/captions/${t.language}`};function Ie(e){return e.usage(`$0 stream videos captions language delete <language>
|
|
47
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
|
|
49
|
-
`);return}let u=await c(`Deleting`,async()=>n.send(
|
|
48
|
+
Removes the captions or subtitles from a video.`).positional(`language`,{type:`string`,description:`The language tag in BCP 47 format.`,demandOption:!0}).option(`identifier`,{type:`string`,description:`A Cloudflare-generated unique identifier for a media item.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Le={command:`delete <language>`,describe:`Delete captions or subtitles`,builder:Ie,handler:async e=>l({command:`stream videos captions language delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf stream videos captions language delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/stream/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}/captions/${e.language==null?`<language>`:encodeURIComponent(String(e.language))}`,pathParams:{identifier:String(e.identifier??``),language:String(e.language??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force,message:`Remove this caption?`})){process.stderr.write(`Aborted.
|
|
49
|
+
`);return}let u=await c(`Deleting`,async()=>n.send(Fe,{account_id:l,identifier:e.identifier,language:e.language}));o(u,{successLabel:`Deleted`})})};var Re={method:`POST`,path:t=>e`/accounts/${t.account_id}/stream/${t.identifier}/captions/${t.language}/generate`};function ze(e){return e.usage(`$0 stream videos captions language generate <language>
|
|
50
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
|
|
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 Be={command:`generate <language>`,describe:`Generate captions or subtitles for a provided language via AI`,builder:ze,handler:async e=>l({command:`stream videos captions language generate`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf stream videos captions language generate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/stream/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}/captions/${e.language==null?`<language>`:encodeURIComponent(String(e.language))}/generate`,pathParams:{identifier:String(e.identifier??``),language:String(e.language??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Creating`,async()=>n.send(Re,{account_id:l,identifier:e.identifier,language:e.language}));o(u,{successLabel:`Created`})})};var Ve={method:`GET`,path:t=>e`/accounts/${t.account_id}/stream/${t.identifier}/captions/${t.language}`};function He(e){return e.usage(`$0 stream videos captions language get <language>
|
|
52
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
|
|
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 Ue={command:`get <language>`,describe:`List captions or subtitles for a provided language`,builder:He,handler:async e=>l({command:`stream videos captions language get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf stream videos captions language get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/stream/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}/captions/${e.language==null?`<language>`:encodeURIComponent(String(e.language))}`,pathParams:{identifier:String(e.identifier??``),language:String(e.language??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Ve,{account_id:l,identifier:e.identifier,language:e.language}));o(u,{successLabel:`Loaded`})})};function We(e){return e.usage(`$0 stream videos captions language upload <language>
|
|
54
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
|
|
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 Ge={command:`upload <language>`,describe:`Upload captions or subtitles`,builder:We,handler:async e=>l({command:`stream videos captions language upload`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf stream videos captions language upload`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/stream/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}/captions/${e.language==null?`<language>`:encodeURIComponent(String(e.language))}`,pathParams:{identifier:String(e.identifier??``),language:String(e.language??``)},bodyKind:`multipart`,body:{body:e.body,file:e.file}});return}let l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.file!==void 0||e.body!==void 0){let t=new FormData;if(e.file){let n=g(e.file);t.append(`file`,new Blob([n]),e.file.split(/[\\/]/).filter(Boolean).pop())}else e.body!==void 0&&t.append(`file`,e.body);let r=await c(`Updating`,async()=>n(l,`PUT`,`/accounts/${u}/stream/${encodeURIComponent(String(e.identifier))}/captions/${encodeURIComponent(String(e.language))}`,{body:t}));o(r,{successLabel:`Updated`});return}if(e.body){let t=h(e.body,`body`,`binary`),r=await c(`Updating`,async()=>n(l,`PUT`,`/accounts/${u}/stream/${encodeURIComponent(String(e.identifier))}/captions/${encodeURIComponent(String(e.language))}`,{body:t,headers:{"Content-Type":`multipart/form-data`}}));o(r,{successLabel:`Updated`});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function Ke(e){return e.usage(`$0 stream videos captions language vtt get <language>
|
|
56
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
|
|
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 qe={command:`get <language>`,describe:`Return WebVTT captions for a provided language`,builder:Ke,handler:async e=>l({command:`stream videos captions language vtt get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf stream videos captions language vtt get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/stream/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}/captions/${e.language==null?`<language>`:encodeURIComponent(String(e.language))}/vtt`,pathParams:{identifier:String(e.identifier??``),language:String(e.language??``)},bodyKind:`none`});return}await r(e);let n=e.local?t:await a();e.accountId=n;let o=await c(`Loading`,async()=>ee(`/accounts/${n}/stream/${encodeURIComponent(String(e.identifier))}/captions/${encodeURIComponent(String(e.language))}/vtt`,{method:`GET`,local:e.local===!0,persistTo:e.persistTo}));y(o.toString(`utf-8`))})},Je={command:`vtt`,describe:`Operations for videos.captions.language.vtt`,builder:e=>e.command(qe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ye={command:`language`,describe:`Operations for videos.captions.language`,builder:e=>e.command(Le).command(Be).command(Ue).command(Ge).command(Je).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Xe={method:`GET`,path:t=>e`/accounts/${t.account_id}/stream/${t.identifier}/captions`};function Ze(e){return e.usage(`$0 stream videos captions list
|
|
58
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
|
|
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 Qe={command:`list`,describe:`List captions or subtitles`,builder:Ze,handler:async e=>l({command:`stream videos captions list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf stream videos captions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/stream/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}/captions`,pathParams:{identifier:String(e.identifier??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Xe,{account_id:l,identifier:e.identifier}));o(u,{successLabel:`Loaded`})})},$e={command:`captions`,describe:`Operations for videos.captions`,builder:e=>e.command(Qe).command(Ye).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Y={method:`POST`,path:t=>e`/accounts/${t.account_id}/stream/clip`,body:`json`};function et(e){return e.usage(`$0 stream videos clip
|
|
60
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
|
|
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(`meta`,{type:`string`,description:`A user modifiable key-value store used to reference other systems of record for managing videos. Provide as a JSON object or @path/to/file.json.`}).option(`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 tt={command:`clip`,describe:`Clip videos given a start and end time`,builder:et,handler:async e=>l({command:`stream videos clip`,classification:{safeFlags:[`require-signed-urls`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf stream videos clip`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/stream/clip`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({allowedOrigins:e[`allowed-origins`],clippedFromVideoUID:h(e[`clipped-from-video-uid`],`clipped-from-video-uid`,`text`),creator:h(e.creator,`creator`,`text`),endTimeSeconds:e[`end-time-seconds`],input:h(e.input,`input`,`text`),meta:p(e.meta,`meta`),name:h(e.name,`name`,`text`),requireSignedURLs:e[`require-signed-urls`],scheduledDeletion:h(e[`scheduled-deletion`],`scheduled-deletion`,`text`),startTimeSeconds:e[`start-time-seconds`],thumbnailTimestampPct:e[`thumbnail-timestamp-pct`],url:h(e.url,`url`,`text`),watermark:{uid:h(e[`watermark-uid`],`watermark-uid`,`text`)}},[[`meta`]]):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(Y,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}if(e[`clipped-from-video-uid`]===void 0&&(e[`clipped-from-video-uid`]=await _(`clipped-from-video-uid`,`The unique video identifier (UID).`)),e[`end-time-seconds`]===void 0)throw Error(`--end-time-seconds is required (or pass --body with this field set).`);if(e[`start-time-seconds`]===void 0)throw Error(`--start-time-seconds is required (or pass --body with this field set).`);let u=m({allowedOrigins:e[`allowed-origins`],clippedFromVideoUID:h(e[`clipped-from-video-uid`],`clipped-from-video-uid`,`text`),creator:h(e.creator,`creator`,`text`),endTimeSeconds:e[`end-time-seconds`],input:h(e.input,`input`,`text`),meta:p(e.meta,`meta`),name:h(e.name,`name`,`text`),requireSignedURLs:e[`require-signed-urls`],scheduledDeletion:h(e[`scheduled-deletion`],`scheduled-deletion`,`text`),startTimeSeconds:e[`start-time-seconds`],thumbnailTimestampPct:e[`thumbnail-timestamp-pct`],url:h(e.url,`url`,`text`),watermark:{uid:h(e[`watermark-uid`],`watermark-uid`,`text`)}},[[`meta`]]),d=await c(`Creating`,async()=>n.send(Y,{body:u,account_id:l}));o(d,{successLabel:`Created`})})};function nt(e){return e.usage(`$0 stream videos copy
|
|
62
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
|
|
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(`meta`,{type:`string`,description:`A user modifiable key-value store used to reference other systems of record for managing videos. Provide as a JSON object or @path/to/file.json.`}).option(`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 rt={command:`copy`,describe:`Upload videos from a URL`,builder:nt,handler:async e=>l({command:`stream videos copy`,classification:{safeFlags:[`require-signed-urls`,`dry-run`]}},e,async()=>{let l={};if(e[`upload-creator`]!==void 0&&(l[`Upload-Creator`]=String(e[`upload-creator`])),e.dryRun){let t=await i();s({command:`cf stream videos copy`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/stream/copy`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({allowedOrigins:e[`allowed-origins`],creator:h(e.creator,`creator`,`text`),input:h(e.input,`input`,`text`),meta:p(e.meta,`meta`),name:h(e.name,`name`,`text`),requireSignedURLs:e[`require-signed-urls`],scheduledDeletion:h(e[`scheduled-deletion`],`scheduled-deletion`,`text`),thumbnailTimestampPct:e[`thumbnail-timestamp-pct`],url:h(e.url,`url`,`text`),watermark:{uid:h(e[`watermark-uid`],`watermark-uid`,`text`)}},[[`meta`]]):f(e.body)});return}let d=await r(e),g=e.local?t:await a();if(e.accountId=g,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n(d,`POST`,`/accounts/${g}/stream/copy`,{body:t,headers:Object.keys(l).length>0?l:void 0}));o(r,{successLabel:`Created`});return}let _={};e[`allowed-origins`]!==void 0&&u(_,[`allowedOrigins`],e[`allowed-origins`]),e.creator!==void 0&&u(_,[`creator`],h(e.creator,`creator`,`text`)),e.input!==void 0&&u(_,[`input`],h(e.input,`input`,`text`)),e.meta!==void 0&&u(_,[`meta`],p(e.meta,`meta`)),e.name!==void 0&&u(_,[`name`],h(e.name,`name`,`text`)),e[`require-signed-urls`]!==void 0&&u(_,[`requireSignedURLs`],e[`require-signed-urls`]),e[`scheduled-deletion`]!==void 0&&u(_,[`scheduledDeletion`],h(e[`scheduled-deletion`],`scheduled-deletion`,`text`)),e[`thumbnail-timestamp-pct`]!==void 0&&u(_,[`thumbnailTimestampPct`],e[`thumbnail-timestamp-pct`]),e.url!==void 0&&u(_,[`url`],h(e.url,`url`,`text`)),e[`watermark-uid`]!==void 0&&u(_,[`watermark`,`uid`],h(e[`watermark-uid`],`watermark-uid`,`text`));let v=await c(`Creating`,async()=>n(d,`POST`,`/accounts/${g}/stream/copy`,{body:_,headers:Object.keys(l).length>0?l:void 0}));o(v,{successLabel:`Created`})})};function it(e){return e.usage(`$0 stream videos create
|
|
64
64
|
|
|
65
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
|
|
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 at={command:`create`,describe:`Initiate video uploads using TUS`,builder:it,handler:async e=>l({command:`stream videos create`,classification:{safeFlags:[`direct-user`,`dry-run`]}},e,async()=>{let l={direct_user:e[`direct-user`]},u={};if(e[`tus-resumable`]!==void 0&&(u[`Tus-Resumable`]=String(e[`tus-resumable`])),e[`upload-creator`]!==void 0&&(u[`Upload-Creator`]=String(e[`upload-creator`])),e[`upload-length`]!==void 0&&(u[`Upload-Length`]=String(e[`upload-length`])),e[`upload-metadata`]!==void 0&&(u[`Upload-Metadata`]=String(e[`upload-metadata`])),e.dryRun){let e=await i();s({command:`cf stream videos create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/stream`,pathParams:{},query:l,bodyKind:`none`});return}let d=await r(e),f=e.local?t:await a();e.accountId=f;let p=await c(`Creating`,async()=>n(d,`POST`,`/accounts/${f}/stream`,{query:l,headers:Object.keys(u).length>0?u:void 0}));o(p,{successLabel:`Created`})})};var ot={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/stream/${t.identifier}`,response:!1};function st(e){return e.usage(`$0 stream videos delete <identifier>
|
|
67
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
|
|
69
|
-
`);return}let u=await c(`Deleting`,async()=>n.send(
|
|
68
|
+
Deletes a video and its copies from Cloudflare Stream.`).positional(`identifier`,{type:`string`,description:`A Cloudflare-generated unique identifier for a media item.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ct={command:`delete <identifier>`,describe:`Delete video`,builder:st,handler:async e=>l({command:`stream videos delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf stream videos delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/stream/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}`,pathParams:{identifier:String(e.identifier??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force,message:`Permanently delete this video?`})){process.stderr.write(`Aborted.
|
|
69
|
+
`);return}let u=await c(`Deleting`,async()=>n.send(ot,{account_id:l,identifier:e.identifier}));o(u,{successLabel:`Deleted`})})};function lt(e){return e.usage(`$0 stream videos direct-upload create
|
|
70
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
|
|
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(`meta`,{type:`string`,description:`A user modifiable key-value store used to reference other systems of record for managing videos. Provide as a JSON object or @path/to/file.json.`}).option(`require-signed-urls`,{type:`boolean`,description:"Indicates whether the video can be a accessed using the UID. When set to `true`, a signed token must be generated with a signing key to view the video.",default:!1}).option(`scheduled-deletion`,{type:`string`,description:"Indicates the date and time at which the video will be deleted. Omit the field to indicate no change, or include with a `null` value to remove an existing scheduled deletion. If specified, must be at least 30 days from upload time."}).option(`thumbnail-timestamp-pct`,{type:`number`,description:`The timestamp for a thumbnail image calculated as a percentage value of the video's duration. To convert from a second-wise timestamp to a percentage, divide the desired timestamp by the total duration of the video. If this value is not set, the default thumbnail image is taken from 0s of the video.`,default:0}).option(`watermark-uid`,{type:`string`,description:`The unique identifier for the watermark profile.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ut={command:`create`,describe:`Upload videos via direct upload URLs`,builder:lt,handler:async e=>l({command:`stream videos direct-upload create`,classification:{safeFlags:[`require-signed-urls`,`dry-run`]}},e,async()=>{let l={};if(e[`upload-creator`]!==void 0&&(l[`Upload-Creator`]=String(e[`upload-creator`])),e.dryRun){let t=await i();s({command:`cf stream videos direct-upload create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/stream/direct_upload`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({allowedOrigins:e[`allowed-origins`],creator:h(e.creator,`creator`,`text`),expiry:h(e.expiry,`expiry`,`text`),maxDurationSeconds:e[`max-duration-seconds`],meta:p(e.meta,`meta`),requireSignedURLs:e[`require-signed-urls`],scheduledDeletion:h(e[`scheduled-deletion`],`scheduled-deletion`,`text`),thumbnailTimestampPct:e[`thumbnail-timestamp-pct`],watermark:{uid:h(e[`watermark-uid`],`watermark-uid`,`text`)}},[[`meta`]]):f(e.body)});return}let d=await r(e),g=e.local?t:await a();if(e.accountId=g,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n(d,`POST`,`/accounts/${g}/stream/direct_upload`,{body:t,headers:Object.keys(l).length>0?l:void 0}));o(r,{successLabel:`Created`});return}if(e[`max-duration-seconds`]===void 0)throw Error(`--max-duration-seconds is required (or pass --body with this field set).`);let _={};e[`allowed-origins`]!==void 0&&u(_,[`allowedOrigins`],e[`allowed-origins`]),e.creator!==void 0&&u(_,[`creator`],h(e.creator,`creator`,`text`)),e.expiry!==void 0&&u(_,[`expiry`],h(e.expiry,`expiry`,`text`)),e[`max-duration-seconds`]!==void 0&&u(_,[`maxDurationSeconds`],e[`max-duration-seconds`]),e.meta!==void 0&&u(_,[`meta`],p(e.meta,`meta`)),e[`require-signed-urls`]!==void 0&&u(_,[`requireSignedURLs`],e[`require-signed-urls`]),e[`scheduled-deletion`]!==void 0&&u(_,[`scheduledDeletion`],h(e[`scheduled-deletion`],`scheduled-deletion`,`text`)),e[`thumbnail-timestamp-pct`]!==void 0&&u(_,[`thumbnailTimestampPct`],e[`thumbnail-timestamp-pct`]),e[`watermark-uid`]!==void 0&&u(_,[`watermark`,`uid`],h(e[`watermark-uid`],`watermark-uid`,`text`));let v=await c(`Creating`,async()=>n(d,`POST`,`/accounts/${g}/stream/direct_upload`,{body:_,headers:Object.keys(l).length>0?l:void 0}));o(v,{successLabel:`Created`})})},dt={command:`direct-upload`,describe:`Operations for videos.direct-upload`,builder:e=>e.command(ut).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ft={method:`POST`,path:t=>e`/accounts/${t.account_id}/stream/${t.identifier}/downloads/${t.download_type}`};function pt(e){return e.usage(`$0 stream videos downloads create <download-type>
|
|
72
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
|
|
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 mt={command:`create <download-type>`,describe:`Create download`,builder:pt,handler:async e=>l({command:`stream videos downloads create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf stream videos downloads create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/stream/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}/downloads/${e[`download-type`]==null?`<download-type>`:encodeURIComponent(String(e[`download-type`]))}`,pathParams:{identifier:String(e.identifier??``),"download-type":String(e[`download-type`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Creating`,async()=>n.send(ft,{account_id:l,identifier:e.identifier,download_type:e[`download-type`]}));o(u,{successLabel:`Created`})})};var ht={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/stream/${t.identifier}/downloads/${t.download_type}`};function gt(e){return e.usage(`$0 stream videos downloads delete <download-type>
|
|
74
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
|
|
76
|
-
`);return}let u=await c(`Deleting`,async()=>n.send(
|
|
75
|
+
Delete specific type of download. For backwards-compatibility, DELETE requests to /downloads will delete the default download.`).positional(`download-type`,{type:`string`,description:"The type of downloads available are: `default`, `audio`.",demandOption:!0}).option(`identifier`,{type:`string`,description:`A Cloudflare-generated unique identifier for a media item.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const _t={command:`delete <download-type>`,describe:`Delete download`,builder:gt,handler:async e=>l({command:`stream videos downloads delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf stream videos downloads delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/stream/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}/downloads/${e[`download-type`]==null?`<download-type>`:encodeURIComponent(String(e[`download-type`]))}`,pathParams:{identifier:String(e.identifier??``),"download-type":String(e[`download-type`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force,message:`Remove this download? It will need to be regenerated for future use.`})){process.stderr.write(`Aborted.
|
|
76
|
+
`);return}let u=await c(`Deleting`,async()=>n.send(ht,{account_id:l,identifier:e.identifier,download_type:e[`download-type`]}));o(u,{successLabel:`Deleted`})})},vt={command:`downloads`,describe:`Operations for videos.downloads`,builder:e=>e.command(mt).command(_t).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var X={method:`POST`,path:t=>e`/accounts/${t.account_id}/stream/${t.identifier}`,body:`json`};function yt(e){return e.usage(`$0 stream videos edit <identifier>
|
|
77
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
|
|
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(`meta`,{type:`string`,description:`A user modifiable key-value store used to reference other systems of record for managing videos. Provide as a JSON object or @path/to/file.json.`}).option(`public-details-channel-link`,{type:`string`,description:`The publicDetails.channel_link field`}).option(`public-details-logo`,{type:`string`,description:`The publicDetails.logo field`}).option(`public-details-share-link`,{type:`string`,description:`The publicDetails.share_link field`}).option(`public-details-title`,{type:`string`,description:`The publicDetails.title field`}).option(`require-signed-urls`,{type:`boolean`,description:"Indicates whether the video can be a accessed using the UID. When set to `true`, a signed token must be generated with a signing key to view the video.",default:!1}).option(`scheduled-deletion`,{type:`string`,description:"Indicates the date and time at which the video will be deleted. Omit the field to indicate no change, or include with a `null` value to remove an existing scheduled deletion. If specified, must be at least 30 days from upload time."}).option(`thumbnail-timestamp-pct`,{type:`number`,description:`The timestamp for a thumbnail image calculated as a percentage value of the video's duration. To convert from a second-wise timestamp to a percentage, divide the desired timestamp by the total duration of the video. If this value is not set, the default thumbnail image is taken from 0s of the video.`,default:0}).option(`uid`,{type:`string`,description:`The unique identifier for the video. Can be used to verify the video being updated.`}).option(`upload-expiry`,{type:`string`,description:`The date and time when the video upload URL is no longer valid for direct user uploads.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const bt={command:`edit <identifier>`,describe:`Edit video details`,builder:yt,handler:async e=>l({command:`stream videos edit`,classification:{safeFlags:[`require-signed-urls`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf stream videos edit`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/stream/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}`,pathParams:{identifier:String(e.identifier??``)},bodyKind:`json`,body:e.body===void 0?m({allowedOrigins:e[`allowed-origins`],creator:h(e.creator,`creator`,`text`),maxDurationSeconds:e[`max-duration-seconds`],meta:p(e.meta,`meta`),publicDetails:{channel_link:h(e[`public-details-channel-link`],`public-details-channel-link`,`text`),logo:h(e[`public-details-logo`],`public-details-logo`,`text`),share_link:h(e[`public-details-share-link`],`public-details-share-link`,`text`),title:h(e[`public-details-title`],`public-details-title`,`text`)},requireSignedURLs:e[`require-signed-urls`],scheduledDeletion:h(e[`scheduled-deletion`],`scheduled-deletion`,`text`),thumbnailTimestampPct:e[`thumbnail-timestamp-pct`],uid:h(e.uid,`uid`,`text`),uploadExpiry:h(e[`upload-expiry`],`upload-expiry`,`text`)},[[`meta`]]):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(X,{body:t,account_id:l,identifier:e.identifier}));o(r,{successLabel:`Created`});return}let u=m({allowedOrigins:e[`allowed-origins`],creator:h(e.creator,`creator`,`text`),maxDurationSeconds:e[`max-duration-seconds`],meta:p(e.meta,`meta`),publicDetails:{channel_link:h(e[`public-details-channel-link`],`public-details-channel-link`,`text`),logo:h(e[`public-details-logo`],`public-details-logo`,`text`),share_link:h(e[`public-details-share-link`],`public-details-share-link`,`text`),title:h(e[`public-details-title`],`public-details-title`,`text`)},requireSignedURLs:e[`require-signed-urls`],scheduledDeletion:h(e[`scheduled-deletion`],`scheduled-deletion`,`text`),thumbnailTimestampPct:e[`thumbnail-timestamp-pct`],uid:h(e.uid,`uid`,`text`),uploadExpiry:h(e[`upload-expiry`],`upload-expiry`,`text`)},[[`meta`]]),d=await c(`Creating`,async()=>n.send(X,{body:u,account_id:l,identifier:e.identifier}));o(d,{successLabel:`Created`})})};var xt={method:`GET`,path:t=>e`/accounts/${t.account_id}/stream/${t.identifier}`};function St(e){return e.usage(`$0 stream videos get <identifier>
|
|
79
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
|
|
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 Ct={command:`get <identifier>`,describe:`Retrieve video details`,builder:St,handler:async e=>l({command:`stream videos get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf stream videos get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/stream/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}`,pathParams:{identifier:String(e.identifier??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(xt,{account_id:l,identifier:e.identifier}));o(u,{successLabel:`Loaded`})})};var wt={method:`GET`,path:t=>e`/accounts/${t.account_id}/stream`,query:[`status`,`creator`,`type`,`asc`,`video_name`,`search`,`start`,`end`,`include_counts`,`id`,`name`,`live_input_id`,`before`,`after`,`limit`]};function Tt(e){return e.usage(`$0 stream videos list
|
|
81
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
|
|
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 Et={command:`list`,describe:`List videos`,builder:Tt,handler:async e=>l({command:`stream videos list`,classification:{safeFlags:[`status`,`asc`,`include-counts`,`dry-run`]}},e,async()=>{let n={status:e.status,creator:e.creator,type:e.type,asc:e.asc,video_name:e[`video-name`],search:e.search,start:e.start,end:e.end,include_counts:e[`include-counts`],id:e.id,name:e.name,live_input_id:e[`live-input-id`],before:e.before,after:e.after,limit:e.limit};if(e.dryRun){let e=await i();s({command:`cf stream videos list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/stream`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(wt,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var Z={method:`POST`,path:t=>e`/accounts/${t.account_id}/stream/${t.identifier}/token`,body:`json`};function Dt(e){return e.usage(`$0 stream videos token create <identifier>
|
|
83
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
|
|
85
|
-
`);return}if(e.body){let t=
|
|
84
|
+
Creates a signed URL token for a video. If a body is not provided in the request, a token is created with default values.`).positional(`identifier`,{type:`string`,description:`A Cloudflare-generated unique identifier for a media item.`,demandOption:!0}).option(`access-rules`,{type:`string`,description:`The optional list of access rule constraints on the token. Access can be blocked or allowed based on an IP, IP range, or by country. Access rules are evaluated from first to last. If a rule matches, the associated action is applied and no further rules are evaluated. Provide as a JSON array of objects or @path/to/file.json.`}).option(`downloadable`,{type:`boolean`,description:`The optional boolean value that enables using signed tokens to access MP4 download links for a video.`,default:!1}).option(`exp`,{type:`number`,description:`The optional unix epoch timestamp that specficies the time after a token is not accepted. The maximum time specification is 24 hours from issuing time. If this field is not set, the default is one hour after issuing.`}).option(`flags-original`,{type:`boolean`,description:`Whether to return the original video without transformations.`}).option(`id`,{type:`string`,description:"The optional ID of a Stream signing key. If present, the `pem` field is also required."}).option(`nbf`,{type:`number`,description:`The optional unix epoch timestamp that specifies the time before a the token is not accepted. If this field is not set, the default is one hour before issuing.`}).option(`pem`,{type:`string`,description:"The optional base64 encoded private key in PEM format associated with a Stream signing key. If present, the `id` field is also required."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Ot={command:`create <identifier>`,describe:`Create signed URL tokens for videos`,builder:Dt,handler:async e=>l({command:`stream videos token create`,classification:{safeFlags:[`downloadable`,`flags-original`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf stream videos token create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/stream/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}/token`,pathParams:{identifier:String(e.identifier??``)},bodyKind:`json`,body:e.body===void 0?m({accessRules:d(e[`access-rules`],`access-rules`),downloadable:e.downloadable,exp:e.exp,flags:{original:e[`flags-original`]},id:h(e.id,`id`,`text`),nbf:e.nbf,pem:h(e.pem,`pem`,`text`)}):f(e.body),sensitiveBodyPaths:[[`pem`]]});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force,message:`Provision temporary token? For use at scale, consider creating a signing key instead.`})){process.stderr.write(`Aborted.
|
|
85
|
+
`);return}if(e.body){let t=f(e.body),r=await c(`Deleting`,async()=>n.send(Z,{body:t,account_id:l,identifier:e.identifier}));o(r,{successLabel:`Deleted`});return}let u=m({accessRules:d(e[`access-rules`],`access-rules`),downloadable:e.downloadable,exp:e.exp,flags:{original:e[`flags-original`]},id:h(e.id,`id`,`text`),nbf:e.nbf,pem:h(e.pem,`pem`,`text`)}),p=await c(`Deleting`,async()=>n.send(Z,{body:u,account_id:l,identifier:e.identifier}));o(p,{successLabel:`Deleted`})})},kt={command:`token`,describe:`Operations for videos.token`,builder:e=>e.command(Ot).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},At={command:`videos`,describe:`Aggregate video storage usage statistics for the account`,builder:e=>e.command(tt).command(rt).command(at).command(ct).command(bt).command(Ct).command(Et).command(Pe).command($e).command(dt).command(vt).command(kt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function jt(e){return e.usage(`$0 stream watermarks create
|
|
86
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
|
|
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 Mt={command:`create`,describe:`Create watermark profiles via basic upload`,builder:jt,handler:async e=>l({command:`stream watermarks create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf stream watermarks create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/stream/watermarks`,pathParams:{},bodyKind:`multipart`,body:{name:e.name,opacity:e.opacity,padding:e.padding,position:e.position,scale:e.scale,url:e.url,body:e.body,file:e.file}});return}let l=await r(e),d=e.local?t:await a();if(e.accountId=d,e.file!==void 0||e.body!==void 0||e.name!==void 0||e.opacity!==void 0||e.padding!==void 0||e.position!==void 0||e.scale!==void 0){let t=new FormData;if(e.file){let n=g(e.file);t.append(`file`,new Blob([n]),e.file.split(/[\\/]/).filter(Boolean).pop())}else e.body!==void 0&&t.append(`file`,e.body);e.name!==void 0&&t.append(`name`,String(h(e.name,`name`,`text`)??``)),e.opacity!==void 0&&t.append(`opacity`,String(e.opacity)),e.padding!==void 0&&t.append(`padding`,String(e.padding)),e.position!==void 0&&t.append(`position`,String(h(e.position,`position`,`text`)??``)),e.scale!==void 0&&t.append(`scale`,String(e.scale));let r=await c(`Creating`,async()=>n(l,`POST`,`/accounts/${d}/stream/watermarks`,{body:t}));o(r,{successLabel:`Created`});return}if(e.body){let t=f(e.body),r=await c(`Creating`,async()=>n(l,`POST`,`/accounts/${d}/stream/watermarks`,{body:t}));o(r,{successLabel:`Created`});return}let p={};e.name!==void 0&&u(p,[`name`],h(e.name,`name`,`text`)),e.opacity!==void 0&&u(p,[`opacity`],e.opacity),e.padding!==void 0&&u(p,[`padding`],e.padding),e.position!==void 0&&u(p,[`position`],h(e.position,`position`,`text`)),e.scale!==void 0&&u(p,[`scale`],e.scale),e.url!==void 0&&u(p,[`url`],h(e.url,`url`,`text`));let m=await c(`Creating`,async()=>n(l,`POST`,`/accounts/${d}/stream/watermarks`,{body:p}));o(m,{successLabel:`Created`})})};var Nt={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/stream/watermarks/${t.identifier}`};function Pt(e){return e.usage(`$0 stream watermarks delete <identifier>
|
|
88
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
|
|
90
|
-
`);return}let u=await c(`Deleting`,async()=>n.send(
|
|
89
|
+
Deletes a watermark profile.`).positional(`identifier`,{type:`string`,description:`The unique identifier for a watermark profile.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Ft={command:`delete <identifier>`,describe:`Delete watermark profiles`,builder:Pt,handler:async e=>l({command:`stream watermarks delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf stream watermarks delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/stream/watermarks/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}`,pathParams:{identifier:String(e.identifier??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force,message:`Remove this watermark profile? New upload requests referencing this profile will fail.`})){process.stderr.write(`Aborted.
|
|
90
|
+
`);return}let u=await c(`Deleting`,async()=>n.send(Nt,{account_id:l,identifier:e.identifier}));o(u,{successLabel:`Deleted`})})};var It={method:`GET`,path:t=>e`/accounts/${t.account_id}/stream/watermarks/${t.identifier}`};function Lt(e){return e.usage(`$0 stream watermarks get <identifier>
|
|
91
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
|
|
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 Rt={command:`get <identifier>`,describe:`Watermark profile details`,builder:Lt,handler:async e=>l({command:`stream watermarks get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf stream watermarks get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/stream/watermarks/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}`,pathParams:{identifier:String(e.identifier??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(It,{account_id:l,identifier:e.identifier}));o(u,{successLabel:`Loaded`})})};var zt={method:`GET`,path:t=>e`/accounts/${t.account_id}/stream/watermarks`};function Bt(e){return e.usage(`$0 stream watermarks list
|
|
93
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
|
|
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 Vt={command:`list`,describe:`List watermark profiles`,builder:Bt,handler:async e=>l({command:`stream watermarks list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf stream watermarks list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/stream/watermarks`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(zt,{account_id:l}));o(u,{successLabel:`Loaded`})})},Q={command:`watermarks`,describe:`Watermark profiles that overlay an image on every video in the account`,builder:e=>e.command(Mt).command(Ft).command(Rt).command(Vt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ht={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/stream/webhook`};function Ut(e){return e.usage(`$0 stream webhooks delete
|
|
95
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
|
|
97
|
-
`);return}let u=await c(`Deleting`,async()=>n.send(
|
|
96
|
+
Deletes the on-demand video webhook.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Wt={command:`delete`,describe:`Delete webhooks`,builder:Ut,handler:async e=>l({command:`stream webhooks delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf stream webhooks delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/stream/webhook`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force,message:`Delete this webhook? If recreated, the secret will change.`})){process.stderr.write(`Aborted.
|
|
97
|
+
`);return}let u=await c(`Deleting`,async()=>n.send(Ht,{account_id:l}));o(u,{successLabel:`Deleted`})})};var Gt={method:`GET`,path:t=>e`/accounts/${t.account_id}/stream/webhook`};function Kt(e){return e.usage(`$0 stream webhooks get
|
|
98
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
|
|
99
|
+
Retrieve current on-demand webhook information.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const qt={command:`get`,describe:`View webhook`,builder:Kt,handler:async e=>l({command:`stream webhooks get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf stream webhooks get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/stream/webhook`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Gt,{account_id:l}));o(u,{successLabel:`Loaded`})})};var $={method:`PUT`,path:t=>e`/accounts/${t.account_id}/stream/webhook`,body:`json`};function Jt(e){return e.usage(`$0 stream webhooks update
|
|
100
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
|
|
102
|
-
`);return}if(e.body){let t=
|
|
101
|
+
Create a webhook for notifications about on-demand video uploads.`).option(`notification-url`,{type:`string`,description:`The URL where webhooks will be sent.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Yt={command:`update`,describe:`Create VOD webhooks`,builder:Jt,handler:async e=>l({command:`stream webhooks update`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf stream webhooks update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/stream/webhook`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({notification_url:h(e[`notification-url`],`notification-url`,`text`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force,message:`Create a webhook for on-demand operations? Will replace previously configured webhook. Live input webhooks are handled via Notifications Service.`})){process.stderr.write(`Aborted.
|
|
102
|
+
`);return}if(e.body){let t=f(e.body),r=await c(`Deleting`,async()=>n.send($,{body:t,account_id:l}));o(r,{successLabel:`Deleted`});return}let u=m({notification_url:h(e[`notification-url`],`notification-url`,`text`)}),d=await c(`Deleting`,async()=>n.send($,{body:u,account_id:l}));o(d,{successLabel:`Deleted`})})},Xt={command:`webhooks`,describe:`Webhook notifications for video lifecycle events (ready, error, etc.)`,builder:e=>e.command(Wt).command(qt).command(Yt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Zt={command:`stream`,describe:`Video encoding, storage, and delivery — upload, live-stream, clip, caption, and embed video at scale`,builder:e=>e.command(Ce).command(b).command(be).command(At).command(Q).command(Xt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Zt as default};
|