diff options
Diffstat (limited to 'server/tools/peertube-auth.ts')
-rw-r--r-- | server/tools/peertube-auth.ts | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/server/tools/peertube-auth.ts b/server/tools/peertube-auth.ts index 6597a5c36..6b486e575 100644 --- a/server/tools/peertube-auth.ts +++ b/server/tools/peertube-auth.ts | |||
@@ -1,3 +1,5 @@ | |||
1 | // eslint-disable @typescript-eslint/no-unnecessary-type-assertion | ||
2 | |||
1 | import { registerTSPaths } from '../helpers/register-ts-paths' | 3 | import { registerTSPaths } from '../helpers/register-ts-paths' |
2 | registerTSPaths() | 4 | registerTSPaths() |
3 | 5 | ||
@@ -5,9 +7,8 @@ import * as program from 'commander' | |||
5 | import * as prompt from 'prompt' | 7 | import * as prompt from 'prompt' |
6 | import { getNetrc, getSettings, writeSettings } from './cli' | 8 | import { getNetrc, getSettings, writeSettings } from './cli' |
7 | import { isUserUsernameValid } from '../helpers/custom-validators/users' | 9 | import { isUserUsernameValid } from '../helpers/custom-validators/users' |
8 | import { getAccessToken, login } from '../../shared/extra-utils' | 10 | import { getAccessToken } from '../../shared/extra-utils' |
9 | 11 | import * as CliTable3 from 'cli-table3' | |
10 | const Table = require('cli-table') | ||
11 | 12 | ||
12 | async function delInstance (url: string) { | 13 | async function delInstance (url: string) { |
13 | const [ settings, netrc ] = await Promise.all([ getSettings(), getNetrc() ]) | 14 | const [ settings, netrc ] = await Promise.all([ getSettings(), getNetrc() ]) |
@@ -108,10 +109,10 @@ program | |||
108 | .action(async () => { | 109 | .action(async () => { |
109 | const [ settings, netrc ] = await Promise.all([ getSettings(), getNetrc() ]) | 110 | const [ settings, netrc ] = await Promise.all([ getSettings(), getNetrc() ]) |
110 | 111 | ||
111 | const table = new Table({ | 112 | const table = new CliTable3({ |
112 | head: ['instance', 'login'], | 113 | head: [ 'instance', 'login' ], |
113 | colWidths: [30, 30] | 114 | colWidths: [ 30, 30 ] |
114 | }) | 115 | }) as any |
115 | 116 | ||
116 | settings.remotes.forEach(element => { | 117 | settings.remotes.forEach(element => { |
117 | if (!netrc.machines[element]) return | 118 | if (!netrc.machines[element]) return |