+import { registerTSPaths } from '../server/helpers/register-ts-paths'
+registerTSPaths()
+
import * as program from 'commander'
import { resolve } from 'path'
import { VideoModel } from '../server/models/video/video'
+import { registerTSPaths } from '../server/helpers/register-ts-paths'
+registerTSPaths()
+
import * as program from 'commander'
import { VideoModel } from '../server/models/video/video'
import { initDatabaseModels } from '../server/initializers'
+import { registerTSPaths } from '../../../server/helpers/register-ts-paths'
+registerTSPaths()
+
import * as Promise from 'bluebird'
import * as rimraf from 'rimraf'
import { initDatabaseModels, sequelizeTypescript } from '../../../server/initializers'
+import { registerTSPaths } from '../server/helpers/register-ts-paths'
+registerTSPaths()
+
import { doRequest } from '../server/helpers/requests'
import { readFileSync } from 'fs-extra'
+import { registerTSPaths } from '../../server/helpers/register-ts-paths'
+registerTSPaths()
+
import * as jsToXliff12 from 'xliff/jsToXliff12'
import { writeFile } from 'fs-extra'
import { join } from 'path'
+import { registerTSPaths } from '../../server/helpers/register-ts-paths'
+registerTSPaths()
+
import * as xliff12ToJs from 'xliff/xliff12ToJs'
import { readFileSync, unlink, writeFile } from 'fs-extra'
import { join } from 'path'
+import { registerTSPaths } from '../server/helpers/register-ts-paths'
+registerTSPaths()
+
import { VIDEO_TRANSCODING_FPS } from '../server/initializers/constants'
import { getDurationFromVideoFile, getVideoFileBitrate, getVideoFileFPS, getVideoFileResolution } from '../server/helpers/ffmpeg-utils'
import { getMaxBitrate } from '../shared/models/videos'
+import { registerTSPaths } from '../server/helpers/register-ts-paths'
+registerTSPaths()
+
import * as program from 'commander'
import { createReadStream, readdir } from 'fs-extra'
import { join } from 'path'
+import { registerTSPaths } from '../../server/helpers/register-ts-paths'
+registerTSPaths()
+
import { initDatabaseModels } from '../../server/initializers/database'
import * as program from 'commander'
import { PluginManager } from '../../server/lib/plugins/plugin-manager'
+import { registerTSPaths } from '../../server/helpers/register-ts-paths'
+registerTSPaths()
+
import { initDatabaseModels } from '../../server/initializers/database'
import * as program from 'commander'
import { PluginManager } from '../../server/lib/plugins/plugin-manager'
})
async function run () {
+
await initDatabaseModels(true)
const toUninstall = program['npmName']
+import { registerTSPaths } from '../server/helpers/register-ts-paths'
+registerTSPaths()
+
import * as prompt from 'prompt'
import { join } from 'path'
import { CONFIG } from '../server/initializers/config'
+import { registerTSPaths } from '../server/helpers/register-ts-paths'
+registerTSPaths()
+
import * as program from 'commander'
import { initDatabaseModels } from '../server/initializers'
import { UserModel } from '../server/models/account/user'
+import { registerTSPaths } from '../server/helpers/register-ts-paths'
+registerTSPaths()
+
import { WEBSERVER } from '../server/initializers/constants'
import { ActorFollowModel } from '../server/models/activitypub/actor-follow'
import { VideoModel } from '../server/models/video/video'
-import { resolve } from 'path'
+import { registerTSPaths } from './server/helpers/register-ts-paths'
-const tsConfig = require('./tsconfig.json')
-const tsConfigPaths = require('tsconfig-paths')
-
-// Thanks: https://github.com/dividab/tsconfig-paths/issues/75#issuecomment-458936883
-tsConfigPaths.register({
- baseUrl: resolve(tsConfig.compilerOptions.baseUrl || '', tsConfig.compilerOptions.outDir || ''),
- paths: tsConfig.compilerOptions.paths
-})
+registerTSPaths()
// FIXME: https://github.com/nodejs/node/pull/16853
require('tls').DEFAULT_ECDH_CURVE = 'auto'
--- /dev/null
+import { resolve } from 'path'
+const tsConfigPaths = require('tsconfig-paths')
+
+const tsConfig = require('../../tsconfig.json')
+
+function registerTSPaths () {
+ // Thanks: https://github.com/dividab/tsconfig-paths/issues/75#issuecomment-458936883
+ tsConfigPaths.register({
+ baseUrl: resolve(tsConfig.compilerOptions.baseUrl || '', tsConfig.compilerOptions.outDir || ''),
+ paths: tsConfig.compilerOptions.paths
+ })
+}
+
+export {
+ registerTSPaths
+}
+import { registerTSPaths } from '../helpers/register-ts-paths'
+registerTSPaths()
+
import * as program from 'commander'
import * as prompt from 'prompt'
import { getNetrc, getSettings, writeSettings } from './cli'
+import { registerTSPaths } from '../helpers/register-ts-paths'
+registerTSPaths()
+
import * as program from 'commander'
import { getClient, Server, serverLogin } from '../../shared/extra-utils'
+import { registerTSPaths } from '../helpers/register-ts-paths'
+registerTSPaths()
+
// FIXME: https://github.com/nodejs/node/pull/16853
require('tls').DEFAULT_ECDH_CURVE = 'auto'
+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'
+import { registerTSPaths } from '../helpers/register-ts-paths'
+registerTSPaths()
+
import * as repl from 'repl'
import * as path from 'path'
import * as _ from 'lodash'
+import { registerTSPaths } from '../helpers/register-ts-paths'
+registerTSPaths()
+
import * as program from 'commander'
import { access, constants } from 'fs-extra'
import { isAbsolute } from 'path'
+import { registerTSPaths } from '../helpers/register-ts-paths'
+registerTSPaths()
+
import * as program from 'commander'
import { join } from 'path'
import { execSync } from 'child_process'
#!/usr/bin/env node
+import { registerTSPaths } from '../helpers/register-ts-paths'
+registerTSPaths()
+
import * as program from 'commander'
import {
version,