mirror of https://github.com/Chocobozzz/PeerTube
Move cli.ts in a private shared directory
It's only used by cli scripts of this directorypull/5615/head
parent
1ec4835dca
commit
1a73a7dcd0
|
@ -1,7 +1,7 @@
|
|||
import CliTable3 from 'cli-table3'
|
||||
import { OptionValues, program } from 'commander'
|
||||
import { isUserUsernameValid } from '../helpers/custom-validators/users'
|
||||
import { assignToken, buildServer, getNetrc, getSettings, writeSettings } from './cli'
|
||||
import { assignToken, buildServer, getNetrc, getSettings, writeSettings } from './shared'
|
||||
|
||||
import prompt = require('prompt')
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { program } from 'commander'
|
||||
import { assignToken, buildServer } from './cli'
|
||||
import { assignToken, buildServer } from './shared'
|
||||
|
||||
program
|
||||
.option('-u, --url <url>', 'Server url')
|
||||
|
|
|
@ -13,7 +13,7 @@ import {
|
|||
buildVideoAttributesFromCommander,
|
||||
getLogger,
|
||||
getServerCredentials
|
||||
} from './cli'
|
||||
} from './shared'
|
||||
|
||||
import prompt = require('prompt')
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ import CliTable3 from 'cli-table3'
|
|||
import { Command, OptionValues, program } from 'commander'
|
||||
import { isAbsolute } from 'path'
|
||||
import { PluginType } from '../../shared/models'
|
||||
import { assignToken, buildServer, getServerCredentials } from './cli'
|
||||
import { assignToken, buildServer, getServerCredentials } from './shared'
|
||||
|
||||
program
|
||||
.name('plugins')
|
||||
|
|
|
@ -4,7 +4,7 @@ import { URL } from 'url'
|
|||
import validator from 'validator'
|
||||
import { forceNumber, uniqify } from '@shared/core-utils'
|
||||
import { HttpStatusCode, VideoRedundanciesTarget } from '@shared/models'
|
||||
import { assignToken, buildServer, getServerCredentials } from './cli'
|
||||
import { assignToken, buildServer, getServerCredentials } from './shared'
|
||||
|
||||
import bytes = require('bytes')
|
||||
program
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { program } from 'commander'
|
||||
import { access, constants } from 'fs-extra'
|
||||
import { isAbsolute } from 'path'
|
||||
import { assignToken, buildCommonVideoOptions, buildServer, buildVideoAttributesFromCommander, getServerCredentials } from './cli'
|
||||
import { assignToken, buildCommonVideoOptions, buildServer, buildVideoAttributesFromCommander, getServerCredentials } from './shared'
|
||||
|
||||
let command = program
|
||||
.name('upload')
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env node
|
||||
|
||||
import { CommandOptions, program } from 'commander'
|
||||
import { getSettings, version } from './cli'
|
||||
import { getSettings, version } from './shared'
|
||||
|
||||
program
|
||||
.version(version, '-v, --version')
|
||||
|
|
|
@ -2,12 +2,11 @@ import { Command } from 'commander'
|
|||
import { Netrc } from 'netrc-parser'
|
||||
import { join } from 'path'
|
||||
import { createLogger, format, transports } from 'winston'
|
||||
import { getAppNumber, isTestInstance } from '@server/helpers/core-utils'
|
||||
import { loadLanguages } from '@server/initializers/constants'
|
||||
import { root } from '@shared/core-utils'
|
||||
import { UserRole } from '@shared/models'
|
||||
import { UserRole, VideoPrivacy } from '@shared/models'
|
||||
import { PeerTubeServer } from '@shared/server-commands'
|
||||
import { VideoPrivacy } from '../../shared/models/videos'
|
||||
import { getAppNumber, isTestInstance } from '../helpers/core-utils'
|
||||
|
||||
let configName = 'PeerTube/CLI'
|
||||
if (isTestInstance()) configName += `-${getAppNumber()}`
|
|
@ -0,0 +1 @@
|
|||
export * from './cli'
|
Loading…
Reference in New Issue