aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tools/peertube-redundancy.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-06-25 17:48:27 +0200
committerChocobozzz <me@florianbigard.com>2021-06-25 17:48:27 +0200
commit12152aa09ff47dc5c5a627c27030855e254e58ad (patch)
tree3b630bce33bd62a21da4a10c3ac62189eabcb8a6 /server/tools/peertube-redundancy.ts
parent8cc6120118a9fb75b3165c9f84b2d0068d1ade72 (diff)
downloadPeerTube-12152aa09ff47dc5c5a627c27030855e254e58ad.tar.gz
PeerTube-12152aa09ff47dc5c5a627c27030855e254e58ad.tar.zst
PeerTube-12152aa09ff47dc5c5a627c27030855e254e58ad.zip
Update tools dependencies
Diffstat (limited to 'server/tools/peertube-redundancy.ts')
-rw-r--r--server/tools/peertube-redundancy.ts7
1 files changed, 3 insertions, 4 deletions
diff --git a/server/tools/peertube-redundancy.ts b/server/tools/peertube-redundancy.ts
index 5bc80ddb9..4810deee0 100644
--- a/server/tools/peertube-redundancy.ts
+++ b/server/tools/peertube-redundancy.ts
@@ -3,7 +3,7 @@
3import { registerTSPaths } from '../helpers/register-ts-paths' 3import { registerTSPaths } from '../helpers/register-ts-paths'
4registerTSPaths() 4registerTSPaths()
5 5
6import * as program from 'commander' 6import { program, Command } from 'commander'
7import { getAdminTokenOrDie, getServerCredentials } from './cli' 7import { getAdminTokenOrDie, getServerCredentials } from './cli'
8import { VideoRedundanciesTarget, VideoRedundancy } from '@shared/models' 8import { VideoRedundanciesTarget, VideoRedundancy } from '@shared/models'
9import { addVideoRedundancy, listVideoRedundancies, removeVideoRedundancy } from '@shared/extra-utils/server/redundancy' 9import { addVideoRedundancy, listVideoRedundancies, removeVideoRedundancy } from '@shared/extra-utils/server/redundancy'
@@ -14,7 +14,6 @@ import { URL } from 'url'
14import { uniq } from 'lodash' 14import { uniq } from 'lodash'
15 15
16import bytes = require('bytes') 16import bytes = require('bytes')
17import commander = require('commander')
18 17
19program 18program
20 .name('plugins') 19 .name('plugins')
@@ -105,7 +104,7 @@ async function listRedundanciesCLI (target: VideoRedundanciesTarget) {
105 process.exit(0) 104 process.exit(0)
106} 105}
107 106
108async function addRedundancyCLI (options: { video: number }, command: commander.CommanderStatic) { 107async function addRedundancyCLI (options: { video: number }, command: Command) {
109 const { url, username, password } = await getServerCredentials(command) 108 const { url, username, password } = await getServerCredentials(command)
110 const accessToken = await getAdminTokenOrDie(url, username, password) 109 const accessToken = await getAdminTokenOrDie(url, username, password)
111 110
@@ -138,7 +137,7 @@ async function addRedundancyCLI (options: { video: number }, command: commander.
138 } 137 }
139} 138}
140 139
141async function removeRedundancyCLI (options: { video: number }, command: commander.CommanderStatic) { 140async function removeRedundancyCLI (options: { video: number }, command: Command) {
142 const { url, username, password } = await getServerCredentials(command) 141 const { url, username, password } = await getServerCredentials(command)
143 const accessToken = await getAdminTokenOrDie(url, username, password) 142 const accessToken = await getAdminTokenOrDie(url, username, password)
144 143