aboutsummaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/tools/peertube-auth.ts2
-rw-r--r--server/tools/peertube-get-access-token.ts2
-rw-r--r--server/tools/peertube-import-videos.ts2
-rw-r--r--server/tools/peertube-plugins.ts2
-rw-r--r--server/tools/peertube-redundancy.ts2
-rw-r--r--server/tools/peertube-upload.ts2
-rw-r--r--server/tools/peertube.ts2
-rw-r--r--server/tools/shared/cli.ts (renamed from server/tools/cli.ts)5
-rw-r--r--server/tools/shared/index.ts1
9 files changed, 10 insertions, 10 deletions
diff --git a/server/tools/peertube-auth.ts b/server/tools/peertube-auth.ts
index 051156d66..c853469c2 100644
--- a/server/tools/peertube-auth.ts
+++ b/server/tools/peertube-auth.ts
@@ -1,7 +1,7 @@
1import CliTable3 from 'cli-table3' 1import CliTable3 from 'cli-table3'
2import { OptionValues, program } from 'commander' 2import { OptionValues, program } from 'commander'
3import { isUserUsernameValid } from '../helpers/custom-validators/users' 3import { isUserUsernameValid } from '../helpers/custom-validators/users'
4import { assignToken, buildServer, getNetrc, getSettings, writeSettings } from './cli' 4import { assignToken, buildServer, getNetrc, getSettings, writeSettings } from './shared'
5 5
6import prompt = require('prompt') 6import prompt = require('prompt')
7 7
diff --git a/server/tools/peertube-get-access-token.ts b/server/tools/peertube-get-access-token.ts
index d59a3632e..71a4826e8 100644
--- a/server/tools/peertube-get-access-token.ts
+++ b/server/tools/peertube-get-access-token.ts
@@ -1,5 +1,5 @@
1import { program } from 'commander' 1import { program } from 'commander'
2import { assignToken, buildServer } from './cli' 2import { assignToken, buildServer } from './shared'
3 3
4program 4program
5 .option('-u, --url <url>', 'Server url') 5 .option('-u, --url <url>', 'Server url')
diff --git a/server/tools/peertube-import-videos.ts b/server/tools/peertube-import-videos.ts
index 938eed0ef..bbdaa09c0 100644
--- a/server/tools/peertube-import-videos.ts
+++ b/server/tools/peertube-import-videos.ts
@@ -13,7 +13,7 @@ import {
13 buildVideoAttributesFromCommander, 13 buildVideoAttributesFromCommander,
14 getLogger, 14 getLogger,
15 getServerCredentials 15 getServerCredentials
16} from './cli' 16} from './shared'
17 17
18import prompt = require('prompt') 18import prompt = require('prompt')
19 19
diff --git a/server/tools/peertube-plugins.ts b/server/tools/peertube-plugins.ts
index c51d9ebd1..0660c855f 100644
--- a/server/tools/peertube-plugins.ts
+++ b/server/tools/peertube-plugins.ts
@@ -2,7 +2,7 @@ import CliTable3 from 'cli-table3'
2import { Command, OptionValues, program } from 'commander' 2import { Command, OptionValues, program } from 'commander'
3import { isAbsolute } from 'path' 3import { isAbsolute } from 'path'
4import { PluginType } from '../../shared/models' 4import { PluginType } from '../../shared/models'
5import { assignToken, buildServer, getServerCredentials } from './cli' 5import { assignToken, buildServer, getServerCredentials } from './shared'
6 6
7program 7program
8 .name('plugins') 8 .name('plugins')
diff --git a/server/tools/peertube-redundancy.ts b/server/tools/peertube-redundancy.ts
index 5c82fa420..fd6c760b2 100644
--- a/server/tools/peertube-redundancy.ts
+++ b/server/tools/peertube-redundancy.ts
@@ -4,7 +4,7 @@ import { URL } from 'url'
4import validator from 'validator' 4import validator from 'validator'
5import { forceNumber, uniqify } from '@shared/core-utils' 5import { forceNumber, uniqify } from '@shared/core-utils'
6import { HttpStatusCode, VideoRedundanciesTarget } from '@shared/models' 6import { HttpStatusCode, VideoRedundanciesTarget } from '@shared/models'
7import { assignToken, buildServer, getServerCredentials } from './cli' 7import { assignToken, buildServer, getServerCredentials } from './shared'
8 8
9import bytes = require('bytes') 9import bytes = require('bytes')
10program 10program
diff --git a/server/tools/peertube-upload.ts b/server/tools/peertube-upload.ts
index 114fe8a29..87da55005 100644
--- a/server/tools/peertube-upload.ts
+++ b/server/tools/peertube-upload.ts
@@ -1,7 +1,7 @@
1import { program } from 'commander' 1import { program } from 'commander'
2import { access, constants } from 'fs-extra' 2import { access, constants } from 'fs-extra'
3import { isAbsolute } from 'path' 3import { isAbsolute } from 'path'
4import { assignToken, buildCommonVideoOptions, buildServer, buildVideoAttributesFromCommander, getServerCredentials } from './cli' 4import { assignToken, buildCommonVideoOptions, buildServer, buildVideoAttributesFromCommander, getServerCredentials } from './shared'
5 5
6let command = program 6let command = program
7 .name('upload') 7 .name('upload')
diff --git a/server/tools/peertube.ts b/server/tools/peertube.ts
index 1d3158044..b79917b4f 100644
--- a/server/tools/peertube.ts
+++ b/server/tools/peertube.ts
@@ -1,7 +1,7 @@
1#!/usr/bin/env node 1#!/usr/bin/env node
2 2
3import { CommandOptions, program } from 'commander' 3import { CommandOptions, program } from 'commander'
4import { getSettings, version } from './cli' 4import { getSettings, version } from './shared'
5 5
6program 6program
7 .version(version, '-v, --version') 7 .version(version, '-v, --version')
diff --git a/server/tools/cli.ts b/server/tools/shared/cli.ts
index 4607d052a..e010ab320 100644
--- a/server/tools/cli.ts
+++ b/server/tools/shared/cli.ts
@@ -2,12 +2,11 @@ import { Command } from 'commander'
2import { Netrc } from 'netrc-parser' 2import { Netrc } from 'netrc-parser'
3import { join } from 'path' 3import { join } from 'path'
4import { createLogger, format, transports } from 'winston' 4import { createLogger, format, transports } from 'winston'
5import { getAppNumber, isTestInstance } from '@server/helpers/core-utils'
5import { loadLanguages } from '@server/initializers/constants' 6import { loadLanguages } from '@server/initializers/constants'
6import { root } from '@shared/core-utils' 7import { root } from '@shared/core-utils'
7import { UserRole } from '@shared/models' 8import { UserRole, VideoPrivacy } from '@shared/models'
8import { PeerTubeServer } from '@shared/server-commands' 9import { PeerTubeServer } from '@shared/server-commands'
9import { VideoPrivacy } from '../../shared/models/videos'
10import { getAppNumber, isTestInstance } from '../helpers/core-utils'
11 10
12let configName = 'PeerTube/CLI' 11let configName = 'PeerTube/CLI'
13if (isTestInstance()) configName += `-${getAppNumber()}` 12if (isTestInstance()) configName += `-${getAppNumber()}`
diff --git a/server/tools/shared/index.ts b/server/tools/shared/index.ts
new file mode 100644
index 000000000..8a3f31e2f
--- /dev/null
+++ b/server/tools/shared/index.ts
@@ -0,0 +1 @@
export * from './cli'