diff options
Diffstat (limited to 'server/tools/peertube-redundancy.ts')
-rw-r--r-- | server/tools/peertube-redundancy.ts | 7 |
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 @@ | |||
3 | import { registerTSPaths } from '../helpers/register-ts-paths' | 3 | import { registerTSPaths } from '../helpers/register-ts-paths' |
4 | registerTSPaths() | 4 | registerTSPaths() |
5 | 5 | ||
6 | import * as program from 'commander' | 6 | import { program, Command } from 'commander' |
7 | import { getAdminTokenOrDie, getServerCredentials } from './cli' | 7 | import { getAdminTokenOrDie, getServerCredentials } from './cli' |
8 | import { VideoRedundanciesTarget, VideoRedundancy } from '@shared/models' | 8 | import { VideoRedundanciesTarget, VideoRedundancy } from '@shared/models' |
9 | import { addVideoRedundancy, listVideoRedundancies, removeVideoRedundancy } from '@shared/extra-utils/server/redundancy' | 9 | import { addVideoRedundancy, listVideoRedundancies, removeVideoRedundancy } from '@shared/extra-utils/server/redundancy' |
@@ -14,7 +14,6 @@ import { URL } from 'url' | |||
14 | import { uniq } from 'lodash' | 14 | import { uniq } from 'lodash' |
15 | 15 | ||
16 | import bytes = require('bytes') | 16 | import bytes = require('bytes') |
17 | import commander = require('commander') | ||
18 | 17 | ||
19 | program | 18 | program |
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 | ||
108 | async function addRedundancyCLI (options: { video: number }, command: commander.CommanderStatic) { | 107 | async 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 | ||
141 | async function removeRedundancyCLI (options: { video: number }, command: commander.CommanderStatic) { | 140 | async 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 | ||