diff options
author | Chocobozzz <me@florianbigard.com> | 2021-12-17 11:58:15 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-12-17 12:24:03 +0100 |
commit | c55e3d7227fe1453869e309025996b9d75256d5d (patch) | |
tree | 08e9b0ca210d75c82c8606fef0852eca020e8e0e /server/helpers | |
parent | bf54587a3e2ad9c2c186828f2a5682b91ee2cc00 (diff) | |
download | PeerTube-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.ts | 2 | ||||
-rw-r--r-- | server/helpers/image-utils.ts | 3 | ||||
-rw-r--r-- | server/helpers/peertube-crypto.ts | 2 | ||||
-rw-r--r-- | server/helpers/utils.ts | 2 | ||||
-rw-r--r-- | server/helpers/webtorrent.ts | 2 |
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' | |||
2 | import { UploadFilesForCheck } from 'express' | 2 | import { UploadFilesForCheck } from 'express' |
3 | import { sep } from 'path' | 3 | import { sep } from 'path' |
4 | import validator from 'validator' | 4 | import validator from 'validator' |
5 | import { isShortUUID, shortToUUID } from '@shared/core-utils/uuid' | 5 | import { isShortUUID, shortToUUID } from '@shared/core-utils' |
6 | 6 | ||
7 | function exists (value: any) { | 7 | function 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 @@ | |||
1 | import { copy, readFile, remove, rename } from 'fs-extra' | 1 | import { copy, readFile, remove, rename } from 'fs-extra' |
2 | import Jimp, { read } from 'jimp' | 2 | import Jimp, { read } from 'jimp' |
3 | import { getLowercaseExtension } from '@shared/core-utils' | 3 | import { buildUUID, getLowercaseExtension } from '@shared/core-utils' |
4 | import { convertWebPToJPG, processGIF } from './ffmpeg-utils' | 4 | import { convertWebPToJPG, processGIF } from './ffmpeg-utils' |
5 | import { logger } from './logger' | 5 | import { logger } from './logger' |
6 | import { buildUUID } from '@shared/core-utils/uuid' | ||
7 | 6 | ||
8 | function generateImageFilename (extension = '.jpg') { | 7 | function 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' | |||
4 | import { cloneDeep } from 'lodash' | 4 | import { cloneDeep } from 'lodash' |
5 | import { BCRYPT_SALT_SIZE, HTTP_SIGNATURE, PRIVATE_RSA_KEY_SIZE } from '../initializers/constants' | 5 | import { BCRYPT_SALT_SIZE, HTTP_SIGNATURE, PRIVATE_RSA_KEY_SIZE } from '../initializers/constants' |
6 | import { MActor } from '../types/models' | 6 | import { MActor } from '../types/models' |
7 | import { sha256 } from '@shared/core-utils/crypto' | 7 | import { sha256 } from '@shared/core-utils/common/crypto' |
8 | import { createPrivateKey, getPublicKey, promisify1, promisify2 } from './core-utils' | 8 | import { createPrivateKey, getPublicKey, promisify1, promisify2 } from './core-utils' |
9 | import { jsonld } from './custom-jsonld-signature' | 9 | import { jsonld } from './custom-jsonld-signature' |
10 | import { logger } from './logger' | 10 | import { 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' | |||
3 | import { join } from 'path' | 3 | import { join } from 'path' |
4 | import { ResultList } from '../../shared' | 4 | import { ResultList } from '../../shared' |
5 | import { CONFIG } from '../initializers/config' | 5 | import { CONFIG } from '../initializers/config' |
6 | import { sha256 } from '@shared/core-utils/crypto' | 6 | import { sha256 } from '@shared/core-utils/common/crypto' |
7 | import { execPromise, execPromise2, randomBytesPromise } from './core-utils' | 7 | import { execPromise, execPromise2, randomBytesPromise } from './core-utils' |
8 | import { logger } from './logger' | 8 | import { 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 | |||
15 | import { MStreamingPlaylistVideo } from '@server/types/models/video/video-streaming-playlist' | 15 | import { MStreamingPlaylistVideo } from '@server/types/models/video/video-streaming-playlist' |
16 | import { CONFIG } from '../initializers/config' | 16 | import { CONFIG } from '../initializers/config' |
17 | import { promisify2 } from './core-utils' | 17 | import { promisify2 } from './core-utils' |
18 | import { sha1 } from '@shared/core-utils/crypto' | 18 | import { sha1 } from '@shared/core-utils/common/crypto' |
19 | import { logger } from './logger' | 19 | import { logger } from './logger' |
20 | import { generateVideoImportTmpPath } from './utils' | 20 | import { generateVideoImportTmpPath } from './utils' |
21 | import { extractVideo } from './video' | 21 | import { extractVideo } from './video' |