diff options
author | Chocobozzz <me@florianbigard.com> | 2021-06-25 17:48:27 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-06-25 17:48:27 +0200 |
commit | 12152aa09ff47dc5c5a627c27030855e254e58ad (patch) | |
tree | 3b630bce33bd62a21da4a10c3ac62189eabcb8a6 /server/tools/peertube-redundancy.ts | |
parent | 8cc6120118a9fb75b3165c9f84b2d0068d1ade72 (diff) | |
download | PeerTube-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.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 | ||