Move cli.ts in a private shared directory

It's only used by cli scripts of this directory
pull/5615/head
Chocobozzz 2023-02-15 16:30:33 +01:00
parent 1ec4835dca
commit 1a73a7dcd0
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
9 changed files with 10 additions and 10 deletions

View File

@ -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')

View File

@ -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')

View File

@ -13,7 +13,7 @@ import {
buildVideoAttributesFromCommander,
getLogger,
getServerCredentials
} from './cli'
} from './shared'
import prompt = require('prompt')

View File

@ -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')

View File

@ -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

View File

@ -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')

View File

@ -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')

View File

@ -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()}`

View File

@ -0,0 +1 @@
export * from './cli'