X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftools%2Fpeertube-auth.ts;h=051156d6682396352953e46c0dca577b3ca97321;hb=16922d582433f0b9b4b1acdb00e1de29eb6906ab;hp=afa19ee085753b8eae0db246aaef1d0d46e8b897;hpb=41fb13c330de629df2d23379209e79c7af0f2e9a;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tools/peertube-auth.ts b/server/tools/peertube-auth.ts index afa19ee08..051156d66 100644 --- a/server/tools/peertube-auth.ts +++ b/server/tools/peertube-auth.ts @@ -1,12 +1,7 @@ -// eslint-disable @typescript-eslint/no-unnecessary-type-assertion - -import { registerTSPaths } from '../helpers/register-ts-paths' -registerTSPaths() - +import CliTable3 from 'cli-table3' import { OptionValues, program } from 'commander' -import { assignToken, buildServer, getNetrc, getSettings, writeSettings } from './cli' import { isUserUsernameValid } from '../helpers/custom-validators/users' -import CliTable3 from 'cli-table3' +import { assignToken, buildServer, getNetrc, getSettings, writeSettings } from './cli' import prompt = require('prompt') @@ -52,7 +47,7 @@ function stripExtraneousFromPeerTubeUrl (url: string) { ? url.indexOf('/', 8) : url.length - return url.substr(0, urlLength) + return url.substring(0, urlLength) } program @@ -94,7 +89,7 @@ program // Check credentials try { // Strip out everything after the domain:port. - // @see https://github.com/Chocobozzz/PeerTube/issues/3520 + // See https://github.com/Chocobozzz/PeerTube/issues/3520 result.url = stripExtraneousFromPeerTubeUrl(result.url) const server = buildServer(result.url)