aboutsummaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/helpers/peertube-crypto.ts2
-rw-r--r--server/helpers/utils.ts2
-rw-r--r--server/helpers/webtorrent.ts2
-rw-r--r--server/lib/auth/oauth.ts2
-rw-r--r--server/lib/client-html.ts2
-rw-r--r--server/lib/hls.ts2
-rw-r--r--server/models/video/video-streaming-playlist.ts4
-rw-r--r--server/tests/shared/streaming-playlists.ts2
-rw-r--r--server/tests/shared/tracker.ts2
-rw-r--r--server/tools/peertube-import-videos.ts3
10 files changed, 11 insertions, 12 deletions
diff --git a/server/helpers/peertube-crypto.ts b/server/helpers/peertube-crypto.ts
index 66a353204..b8f7c782a 100644
--- a/server/helpers/peertube-crypto.ts
+++ b/server/helpers/peertube-crypto.ts
@@ -2,9 +2,9 @@ import { compare, genSalt, hash } from 'bcrypt'
2import { createSign, createVerify } from 'crypto' 2import { createSign, createVerify } from 'crypto'
3import { Request } from 'express' 3import { Request } from 'express'
4import { cloneDeep } from 'lodash' 4import { cloneDeep } from 'lodash'
5import { sha256 } from '@shared/extra-utils'
5import { BCRYPT_SALT_SIZE, HTTP_SIGNATURE, PRIVATE_RSA_KEY_SIZE } from '../initializers/constants' 6import { BCRYPT_SALT_SIZE, HTTP_SIGNATURE, PRIVATE_RSA_KEY_SIZE } from '../initializers/constants'
6import { MActor } from '../types/models' 7import { MActor } from '../types/models'
7import { sha256 } from '@shared/core-utils/common/crypto'
8import { createPrivateKey, getPublicKey, promisify1, promisify2 } from './core-utils' 8import { createPrivateKey, getPublicKey, promisify1, promisify2 } from './core-utils'
9import { jsonld } from './custom-jsonld-signature' 9import { jsonld } from './custom-jsonld-signature'
10import { logger } from './logger' 10import { logger } from './logger'
diff --git a/server/helpers/utils.ts b/server/helpers/utils.ts
index d6a3dae95..bd85eaa56 100644
--- a/server/helpers/utils.ts
+++ b/server/helpers/utils.ts
@@ -1,9 +1,9 @@
1import { remove } from 'fs-extra' 1import { remove } from 'fs-extra'
2import { Instance as ParseTorrent } from 'parse-torrent' 2import { Instance as ParseTorrent } from 'parse-torrent'
3import { join } from 'path' 3import { join } from 'path'
4import { sha256 } from '@shared/extra-utils'
4import { ResultList } from '../../shared' 5import { ResultList } from '../../shared'
5import { CONFIG } from '../initializers/config' 6import { CONFIG } from '../initializers/config'
6import { sha256 } from '@shared/core-utils/common/crypto'
7import { execPromise, execPromise2, randomBytesPromise } from './core-utils' 7import { execPromise, execPromise2, randomBytesPromise } from './core-utils'
8import { logger } from './logger' 8import { logger } from './logger'
9 9
diff --git a/server/helpers/webtorrent.ts b/server/helpers/webtorrent.ts
index 03663d73c..68d532c48 100644
--- a/server/helpers/webtorrent.ts
+++ b/server/helpers/webtorrent.ts
@@ -13,9 +13,9 @@ import { VideoPathManager } from '@server/lib/video-path-manager'
13import { MVideo } from '@server/types/models/video/video' 13import { MVideo } from '@server/types/models/video/video'
14import { MVideoFile, MVideoFileRedundanciesOpt } from '@server/types/models/video/video-file' 14import { MVideoFile, MVideoFileRedundanciesOpt } from '@server/types/models/video/video-file'
15import { MStreamingPlaylistVideo } from '@server/types/models/video/video-streaming-playlist' 15import { MStreamingPlaylistVideo } from '@server/types/models/video/video-streaming-playlist'
16import { sha1 } from '@shared/extra-utils'
16import { CONFIG } from '../initializers/config' 17import { CONFIG } from '../initializers/config'
17import { promisify2 } from './core-utils' 18import { promisify2 } from './core-utils'
18import { sha1 } from '@shared/core-utils/common/crypto'
19import { logger } from './logger' 19import { logger } from './logger'
20import { generateVideoImportTmpPath } from './utils' 20import { generateVideoImportTmpPath } from './utils'
21import { extractVideo } from './video' 21import { extractVideo } from './video'
diff --git a/server/lib/auth/oauth.ts b/server/lib/auth/oauth.ts
index dc0022852..2bf7a6361 100644
--- a/server/lib/auth/oauth.ts
+++ b/server/lib/auth/oauth.ts
@@ -8,9 +8,9 @@ import {
8 UnauthorizedClientError, 8 UnauthorizedClientError,
9 UnsupportedGrantTypeError 9 UnsupportedGrantTypeError
10} from 'oauth2-server' 10} from 'oauth2-server'
11import { sha1 } from '@shared/core-utils/common/crypto'
12import { randomBytesPromise } from '@server/helpers/core-utils' 11import { randomBytesPromise } from '@server/helpers/core-utils'
13import { MOAuthClient } from '@server/types/models' 12import { MOAuthClient } from '@server/types/models'
13import { sha1 } from '@shared/extra-utils'
14import { OAUTH_LIFETIME } from '../../initializers/constants' 14import { OAUTH_LIFETIME } from '../../initializers/constants'
15import { BypassLogin, getClient, getRefreshToken, getUser, revokeToken, saveToken } from './oauth-model' 15import { BypassLogin, getClient, getRefreshToken, getUser, revokeToken, saveToken } from './oauth-model'
16 16
diff --git a/server/lib/client-html.ts b/server/lib/client-html.ts
index 91708839b..e7e439bfe 100644
--- a/server/lib/client-html.ts
+++ b/server/lib/client-html.ts
@@ -4,12 +4,12 @@ import { join } from 'path'
4import validator from 'validator' 4import validator from 'validator'
5import { toCompleteUUID } from '@server/helpers/custom-validators/misc' 5import { toCompleteUUID } from '@server/helpers/custom-validators/misc'
6import { escapeHTML } from '@shared/core-utils/renderer' 6import { escapeHTML } from '@shared/core-utils/renderer'
7import { sha256 } from '@shared/extra-utils'
7import { HTMLServerConfig } from '@shared/models' 8import { HTMLServerConfig } from '@shared/models'
8import { buildFileLocale, getDefaultLocale, is18nLocale, POSSIBLE_LOCALES } from '../../shared/core-utils/i18n/i18n' 9import { buildFileLocale, getDefaultLocale, is18nLocale, POSSIBLE_LOCALES } from '../../shared/core-utils/i18n/i18n'
9import { HttpStatusCode } from '../../shared/models/http/http-error-codes' 10import { HttpStatusCode } from '../../shared/models/http/http-error-codes'
10import { VideoPlaylistPrivacy, VideoPrivacy } from '../../shared/models/videos' 11import { VideoPlaylistPrivacy, VideoPrivacy } from '../../shared/models/videos'
11import { isTestInstance } from '../helpers/core-utils' 12import { isTestInstance } from '../helpers/core-utils'
12import { sha256 } from '@shared/core-utils/common/crypto'
13import { logger } from '../helpers/logger' 13import { logger } from '../helpers/logger'
14import { mdToPlainText } from '../helpers/markdown' 14import { mdToPlainText } from '../helpers/markdown'
15import { CONFIG } from '../initializers/config' 15import { CONFIG } from '../initializers/config'
diff --git a/server/lib/hls.ts b/server/lib/hls.ts
index e4904be5f..1574ff27b 100644
--- a/server/lib/hls.ts
+++ b/server/lib/hls.ts
@@ -2,7 +2,7 @@ import { close, ensureDir, move, open, outputJSON, read, readFile, remove, stat,
2import { flatten, uniq } from 'lodash' 2import { flatten, uniq } from 'lodash'
3import { basename, dirname, join } from 'path' 3import { basename, dirname, join } from 'path'
4import { MStreamingPlaylistFilesVideo, MVideo, MVideoUUID } from '@server/types/models' 4import { MStreamingPlaylistFilesVideo, MVideo, MVideoUUID } from '@server/types/models'
5import { sha256 } from '@shared/core-utils/common/crypto' 5import { sha256 } from '@shared/extra-utils'
6import { getAudioStreamCodec, getVideoStreamCodec, getVideoStreamSize } from '../helpers/ffprobe-utils' 6import { getAudioStreamCodec, getVideoStreamCodec, getVideoStreamSize } from '../helpers/ffprobe-utils'
7import { logger } from '../helpers/logger' 7import { logger } from '../helpers/logger'
8import { doRequest, doRequestAndSaveToFile } from '../helpers/requests' 8import { doRequest, doRequestAndSaveToFile } from '../helpers/requests'
diff --git a/server/models/video/video-streaming-playlist.ts b/server/models/video/video-streaming-playlist.ts
index 7b410f8ee..9957ffee3 100644
--- a/server/models/video/video-streaming-playlist.ts
+++ b/server/models/video/video-streaming-playlist.ts
@@ -18,10 +18,10 @@ import {
18import { getHLSPublicFileUrl } from '@server/lib/object-storage' 18import { getHLSPublicFileUrl } from '@server/lib/object-storage'
19import { VideoFileModel } from '@server/models/video/video-file' 19import { VideoFileModel } from '@server/models/video/video-file'
20import { MStreamingPlaylist, MVideo } from '@server/types/models' 20import { MStreamingPlaylist, MVideo } from '@server/types/models'
21import { AttributesOnly } from '@shared/typescript-utils' 21import { sha1 } from '@shared/extra-utils'
22import { VideoStorage } from '@shared/models' 22import { VideoStorage } from '@shared/models'
23import { AttributesOnly } from '@shared/typescript-utils'
23import { VideoStreamingPlaylistType } from '../../../shared/models/videos/video-streaming-playlist.type' 24import { VideoStreamingPlaylistType } from '../../../shared/models/videos/video-streaming-playlist.type'
24import { sha1 } from '@shared/core-utils/common/crypto'
25import { isActivityPubUrlValid } from '../../helpers/custom-validators/activitypub/misc' 25import { isActivityPubUrlValid } from '../../helpers/custom-validators/activitypub/misc'
26import { isArrayOf } from '../../helpers/custom-validators/misc' 26import { isArrayOf } from '../../helpers/custom-validators/misc'
27import { isVideoFileInfoHashValid } from '../../helpers/custom-validators/videos' 27import { isVideoFileInfoHashValid } from '../../helpers/custom-validators/videos'
diff --git a/server/tests/shared/streaming-playlists.ts b/server/tests/shared/streaming-playlists.ts
index 738dc90e1..7ca707f2e 100644
--- a/server/tests/shared/streaming-playlists.ts
+++ b/server/tests/shared/streaming-playlists.ts
@@ -1,7 +1,7 @@
1import { expect } from 'chai' 1import { expect } from 'chai'
2import { basename } from 'path' 2import { basename } from 'path'
3import { removeFragmentedMP4Ext } from '@shared/core-utils' 3import { removeFragmentedMP4Ext } from '@shared/core-utils'
4import { sha256 } from '@shared/core-utils/common/crypto' 4import { sha256 } from '@shared/extra-utils'
5import { HttpStatusCode, VideoStreamingPlaylist } from '@shared/models' 5import { HttpStatusCode, VideoStreamingPlaylist } from '@shared/models'
6import { PeerTubeServer } from '@shared/server-commands' 6import { PeerTubeServer } from '@shared/server-commands'
7 7
diff --git a/server/tests/shared/tracker.ts b/server/tests/shared/tracker.ts
index 699895d5f..9c1f0246a 100644
--- a/server/tests/shared/tracker.ts
+++ b/server/tests/shared/tracker.ts
@@ -1,5 +1,5 @@
1import { expect } from 'chai' 1import { expect } from 'chai'
2import { sha1 } from '@shared/core-utils' 2import { sha1 } from '@shared/extra-utils'
3import { makeGetRequest } from '@shared/server-commands' 3import { makeGetRequest } from '@shared/server-commands'
4 4
5async function hlsInfohashExist (serverUrl: string, masterPlaylistUrl: string, fileNumber: number) { 5async function hlsInfohashExist (serverUrl: string, masterPlaylistUrl: string, fileNumber: number) {
diff --git a/server/tools/peertube-import-videos.ts b/server/tools/peertube-import-videos.ts
index 8314551f6..44c42bad6 100644
--- a/server/tools/peertube-import-videos.ts
+++ b/server/tools/peertube-import-videos.ts
@@ -5,7 +5,7 @@ import { program } from 'commander'
5import { accessSync, constants } from 'fs' 5import { accessSync, constants } from 'fs'
6import { remove } from 'fs-extra' 6import { remove } from 'fs-extra'
7import { join } from 'path' 7import { join } from 'path'
8import { sha256 } from '@shared/core-utils/crypto' 8import { sha256, wait } from '@shared/core-utils'
9import { doRequestAndSaveToFile } from '../helpers/requests' 9import { doRequestAndSaveToFile } from '../helpers/requests'
10import { 10import {
11 assignToken, 11 assignToken,
@@ -15,7 +15,6 @@ import {
15 getLogger, 15 getLogger,
16 getServerCredentials 16 getServerCredentials
17} from './cli' 17} from './cli'
18import { wait } from '@shared/server-commands'
19import { YoutubeDLCLI, YoutubeDLInfo, YoutubeDLInfoBuilder } from '@server/helpers/youtube-dl' 18import { YoutubeDLCLI, YoutubeDLInfo, YoutubeDLInfoBuilder } from '@server/helpers/youtube-dl'
20import prompt = require('prompt') 19import prompt = require('prompt')
21 20