From 2aaa1a3fdc49be77aec5309dab5507865c38d392 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 21 Oct 2019 17:13:07 +0200 Subject: Use typescript paths in cli scripts too --- server/tools/peertube-auth.ts | 3 +++ server/tools/peertube-get-access-token.ts | 3 +++ server/tools/peertube-import-videos.ts | 3 +++ server/tools/peertube-plugins.ts | 3 +++ server/tools/peertube-repl.ts | 3 +++ server/tools/peertube-upload.ts | 3 +++ server/tools/peertube-watch.ts | 3 +++ server/tools/peertube.ts | 3 +++ 8 files changed, 24 insertions(+) (limited to 'server/tools') diff --git a/server/tools/peertube-auth.ts b/server/tools/peertube-auth.ts index b5ecbd470..6597a5c36 100644 --- a/server/tools/peertube-auth.ts +++ b/server/tools/peertube-auth.ts @@ -1,3 +1,6 @@ +import { registerTSPaths } from '../helpers/register-ts-paths' +registerTSPaths() + import * as program from 'commander' import * as prompt from 'prompt' import { getNetrc, getSettings, writeSettings } from './cli' diff --git a/server/tools/peertube-get-access-token.ts b/server/tools/peertube-get-access-token.ts index 103495347..6d47d8922 100644 --- a/server/tools/peertube-get-access-token.ts +++ b/server/tools/peertube-get-access-token.ts @@ -1,3 +1,6 @@ +import { registerTSPaths } from '../helpers/register-ts-paths' +registerTSPaths() + import * as program from 'commander' import { getClient, Server, serverLogin } from '../../shared/extra-utils' diff --git a/server/tools/peertube-import-videos.ts b/server/tools/peertube-import-videos.ts index fcb90cca3..39184f46d 100644 --- a/server/tools/peertube-import-videos.ts +++ b/server/tools/peertube-import-videos.ts @@ -1,3 +1,6 @@ +import { registerTSPaths } from '../helpers/register-ts-paths' +registerTSPaths() + // FIXME: https://github.com/nodejs/node/pull/16853 require('tls').DEFAULT_ECDH_CURVE = 'auto' diff --git a/server/tools/peertube-plugins.ts b/server/tools/peertube-plugins.ts index 20254b3b4..e40606107 100644 --- a/server/tools/peertube-plugins.ts +++ b/server/tools/peertube-plugins.ts @@ -1,3 +1,6 @@ +import { registerTSPaths } from '../helpers/register-ts-paths' +registerTSPaths() + import * as program from 'commander' import { PluginType } from '../../shared/models/plugins/plugin.type' import { getAccessToken } from '../../shared/extra-utils/users/login' diff --git a/server/tools/peertube-repl.ts b/server/tools/peertube-repl.ts index fbdec1613..ab6e215d9 100644 --- a/server/tools/peertube-repl.ts +++ b/server/tools/peertube-repl.ts @@ -1,3 +1,6 @@ +import { registerTSPaths } from '../helpers/register-ts-paths' +registerTSPaths() + import * as repl from 'repl' import * as path from 'path' import * as _ from 'lodash' diff --git a/server/tools/peertube-upload.ts b/server/tools/peertube-upload.ts index 4569cbb85..f604c9bee 100644 --- a/server/tools/peertube-upload.ts +++ b/server/tools/peertube-upload.ts @@ -1,3 +1,6 @@ +import { registerTSPaths } from '../helpers/register-ts-paths' +registerTSPaths() + import * as program from 'commander' import { access, constants } from 'fs-extra' import { isAbsolute } from 'path' diff --git a/server/tools/peertube-watch.ts b/server/tools/peertube-watch.ts index 7c27c1364..9ac1d05f9 100644 --- a/server/tools/peertube-watch.ts +++ b/server/tools/peertube-watch.ts @@ -1,3 +1,6 @@ +import { registerTSPaths } from '../helpers/register-ts-paths' +registerTSPaths() + import * as program from 'commander' import { join } from 'path' import { execSync } from 'child_process' diff --git a/server/tools/peertube.ts b/server/tools/peertube.ts index ddfe5b771..fc85c4210 100644 --- a/server/tools/peertube.ts +++ b/server/tools/peertube.ts @@ -1,5 +1,8 @@ #!/usr/bin/env node +import { registerTSPaths } from '../helpers/register-ts-paths' +registerTSPaths() + import * as program from 'commander' import { version, -- cgit v1.2.3