aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-12-17 11:58:15 +0100
committerChocobozzz <me@florianbigard.com>2021-12-17 12:24:03 +0100
commitc55e3d7227fe1453869e309025996b9d75256d5d (patch)
tree08e9b0ca210d75c82c8606fef0852eca020e8e0e /server/helpers
parentbf54587a3e2ad9c2c186828f2a5682b91ee2cc00 (diff)
downloadPeerTube-c55e3d7227fe1453869e309025996b9d75256d5d.tar.gz
PeerTube-c55e3d7227fe1453869e309025996b9d75256d5d.tar.zst
PeerTube-c55e3d7227fe1453869e309025996b9d75256d5d.zip
Move test functions outside extra-utils
Diffstat (limited to 'server/helpers')
-rw-r--r--server/helpers/custom-validators/misc.ts2
-rw-r--r--server/helpers/image-utils.ts3
-rw-r--r--server/helpers/peertube-crypto.ts2
-rw-r--r--server/helpers/utils.ts2
-rw-r--r--server/helpers/webtorrent.ts2
5 files changed, 5 insertions, 6 deletions
diff --git a/server/helpers/custom-validators/misc.ts b/server/helpers/custom-validators/misc.ts
index eaabdbbea..65578c143 100644
--- a/server/helpers/custom-validators/misc.ts
+++ b/server/helpers/custom-validators/misc.ts
@@ -2,7 +2,7 @@ import 'multer'
2import { UploadFilesForCheck } from 'express' 2import { UploadFilesForCheck } from 'express'
3import { sep } from 'path' 3import { sep } from 'path'
4import validator from 'validator' 4import validator from 'validator'
5import { isShortUUID, shortToUUID } from '@shared/core-utils/uuid' 5import { isShortUUID, shortToUUID } from '@shared/core-utils'
6 6
7function exists (value: any) { 7function exists (value: any) {
8 return value !== undefined && value !== null 8 return value !== undefined && value !== null
diff --git a/server/helpers/image-utils.ts b/server/helpers/image-utils.ts
index ced288045..c4704b189 100644
--- a/server/helpers/image-utils.ts
+++ b/server/helpers/image-utils.ts
@@ -1,9 +1,8 @@
1import { copy, readFile, remove, rename } from 'fs-extra' 1import { copy, readFile, remove, rename } from 'fs-extra'
2import Jimp, { read } from 'jimp' 2import Jimp, { read } from 'jimp'
3import { getLowercaseExtension } from '@shared/core-utils' 3import { buildUUID, getLowercaseExtension } from '@shared/core-utils'
4import { convertWebPToJPG, processGIF } from './ffmpeg-utils' 4import { convertWebPToJPG, processGIF } from './ffmpeg-utils'
5import { logger } from './logger' 5import { logger } from './logger'
6import { buildUUID } from '@shared/core-utils/uuid'
7 6
8function generateImageFilename (extension = '.jpg') { 7function generateImageFilename (extension = '.jpg') {
9 return buildUUID() + extension 8 return buildUUID() + extension
diff --git a/server/helpers/peertube-crypto.ts b/server/helpers/peertube-crypto.ts
index 31705e7fa..66a353204 100644
--- a/server/helpers/peertube-crypto.ts
+++ b/server/helpers/peertube-crypto.ts
@@ -4,7 +4,7 @@ import { Request } from 'express'
4import { cloneDeep } from 'lodash' 4import { cloneDeep } from 'lodash'
5import { BCRYPT_SALT_SIZE, HTTP_SIGNATURE, PRIVATE_RSA_KEY_SIZE } from '../initializers/constants' 5import { BCRYPT_SALT_SIZE, HTTP_SIGNATURE, PRIVATE_RSA_KEY_SIZE } from '../initializers/constants'
6import { MActor } from '../types/models' 6import { MActor } from '../types/models'
7import { sha256 } from '@shared/core-utils/crypto' 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 882f808ab..d6a3dae95 100644
--- a/server/helpers/utils.ts
+++ b/server/helpers/utils.ts
@@ -3,7 +3,7 @@ import { Instance as ParseTorrent } from 'parse-torrent'
3import { join } from 'path' 3import { join } from 'path'
4import { ResultList } from '../../shared' 4import { ResultList } from '../../shared'
5import { CONFIG } from '../initializers/config' 5import { CONFIG } from '../initializers/config'
6import { sha256 } from '@shared/core-utils/crypto' 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 67cb3971d..03663d73c 100644
--- a/server/helpers/webtorrent.ts
+++ b/server/helpers/webtorrent.ts
@@ -15,7 +15,7 @@ import { MVideoFile, MVideoFileRedundanciesOpt } from '@server/types/models/vide
15import { MStreamingPlaylistVideo } from '@server/types/models/video/video-streaming-playlist' 15import { MStreamingPlaylistVideo } from '@server/types/models/video/video-streaming-playlist'
16import { CONFIG } from '../initializers/config' 16import { CONFIG } from '../initializers/config'
17import { promisify2 } from './core-utils' 17import { promisify2 } from './core-utils'
18import { sha1 } from '@shared/core-utils/crypto' 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'