Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Shared utils -> extra-utils

Chocobozzz94565d52bb28
diff --git a/server/tests/api/activitypub/client.ts b/server/tests/api/activitypub/client.ts
index 6d90d86437..52e7e27f8b 100644
--- a/server/tests/api/activitypub/client.ts
+++ b/server/tests/api/activitypub/client.ts
@@ -11,7 +11,7 @@ import {
ServerInfo,
setAccessTokensToServers,
uploadVideo
-} from '../../../../shared/utils'
+} from '../../../../shared/extra-utils'
const expect = chai.expect
diff --git a/server/tests/api/activitypub/fetch.ts b/server/tests/api/activitypub/fetch.ts
index 9cbc7dd848..f9dba3418d 100644
--- a/server/tests/api/activitypub/fetch.ts
+++ b/server/tests/api/activitypub/fetch.ts
@@ -17,7 +17,7 @@ import {
uploadVideo,
userLogin,
waitJobs
-} from '../../../../shared/utils'
+} from '../../../../shared/extra-utils'
import * as chai from 'chai'
import { Video } from '../../../../shared/models/videos'
diff --git a/server/tests/api/activitypub/helpers.ts b/server/tests/api/activitypub/helpers.ts
index ac6e755c36..365d0e1aef 100644
--- a/server/tests/api/activitypub/helpers.ts
+++ b/server/tests/api/activitypub/helpers.ts
@@ -2,7 +2,7 @@
import 'mocha'
import { expect } from 'chai'
-import { buildRequestStub } from '../../../../shared/utils/miscs/stubs'
+import { buildRequestStub } from '../../../../shared/extra-utils/miscs/stubs'
import { isHTTPSignatureVerified, isJsonLDSignatureVerified, parseHTTPSignature } from '../../../helpers/peertube-crypto'
import { cloneDeep } from 'lodash'
import { buildSignedActivity } from '../../../helpers/activitypub'
diff --git a/server/tests/api/activitypub/refresher.ts b/server/tests/api/activitypub/refresher.ts
index 665a9f9f0f..7b08b1dabc 100644
--- a/server/tests/api/activitypub/refresher.ts
+++ b/server/tests/api/activitypub/refresher.ts
@@ -20,8 +20,8 @@ import {
uploadVideoAndGetId,
wait,
waitJobs
-} from '../../../../shared/utils'
-import { getAccount } from '../../../../shared/utils/users/accounts'
+} from '../../../../shared/extra-utils'
+import { getAccount } from '../../../../shared/extra-utils/users/accounts'
import { VideoPlaylistPrivacy } from '../../../../shared/models/videos'
describe('Test AP refresher', function () {
diff --git a/server/tests/api/activitypub/security.ts b/server/tests/api/activitypub/security.ts
index 2c55876bad..2346e9c8eb 100644
--- a/server/tests/api/activitypub/security.ts
+++ b/server/tests/api/activitypub/security.ts
@@ -9,12 +9,12 @@ import {
killallServers,
ServerInfo,
setActorField
-} from '../../../../shared/utils'
+} from '../../../../shared/extra-utils'
import { HTTP_SIGNATURE } from '../../../initializers/constants'
import { buildDigest, buildGlobalHeaders } from '../../../lib/job-queue/handlers/utils/activitypub-http-utils'
import * as chai from 'chai'
import { activityPubContextify, buildSignedActivity } from '../../../helpers/activitypub'
-import { makeFollowRequest, makePOSTAPRequest } from '../../../../shared/utils/requests/activitypub'
+import { makeFollowRequest, makePOSTAPRequest } from '../../../../shared/extra-utils/requests/activitypub'
const expect = chai.expect
diff --git a/server/tests/api/check-params/accounts.ts b/server/tests/api/check-params/accounts.ts
index 68f9519c6b..4c145c41d4 100644
--- a/server/tests/api/check-params/accounts.ts
+++ b/server/tests/api/check-params/accounts.ts
@@ -2,13 +2,13 @@
import 'mocha'
-import { flushTests, killallServers, runServer, ServerInfo } from '../../../../shared/utils'
+import { flushTests, killallServers, runServer, ServerInfo } from '../../../../shared/extra-utils'
import {
checkBadCountPagination,
checkBadSortPagination,
checkBadStartPagination
-} from '../../../../shared/utils/requests/check-api-params'
-import { getAccount } from '../../../../shared/utils/users/accounts'
+} from '../../../../shared/extra-utils/requests/check-api-params'
+import { getAccount } from '../../../../shared/extra-utils/users/accounts'
describe('Test accounts API validators', function () {
const path = '/api/v1/accounts/'
diff --git a/server/tests/api/check-params/blocklist.ts b/server/tests/api/check-params/blocklist.ts
index 62a2c2a520..6c7351d388 100644
--- a/server/tests/api/check-params/blocklist.ts
+++ b/server/tests/api/check-params/blocklist.ts
@@ -13,12 +13,12 @@ import {
makePostBodyRequest,
ServerInfo,
setAccessTokensToServers, userLogin
-} from '../../../../shared/utils'
+} from '../../../../shared/extra-utils'
import {
checkBadCountPagination,
checkBadSortPagination,
checkBadStartPagination
-} from '../../../../shared/utils/requests/check-api-params'
+} from '../../../../shared/extra-utils/requests/check-api-params'
describe('Test blocklist API validators', function () {
let servers: ServerInfo[]
diff --git a/server/tests/api/check-params/config.ts b/server/tests/api/check-params/config.ts
index 3bcb015d91..ba07552cfa 100644
--- a/server/tests/api/check-params/config.ts
+++ b/server/tests/api/check-params/config.ts
@@ -7,7 +7,7 @@ import { CustomConfig } from '../../../../shared/models/server/custom-config.mod
import {
createUser, flushTests, killallServers, makeDeleteRequest, makeGetRequest, makePutBodyRequest, runServer, ServerInfo,
setAccessTokensToServers, userLogin, immutableAssign
-} from '../../../../shared/utils'
+} from '../../../../shared/extra-utils'
describe('Test config API validators', function () {
const path = '/api/v1/config/custom'
diff --git a/server/tests/api/check-params/contact-form.ts b/server/tests/api/check-params/contact-form.ts
index c7e014b1ff..9ba6136aae 100644
--- a/server/tests/api/check-params/contact-form.ts
+++ b/server/tests/api/check-params/contact-form.ts
@@ -10,15 +10,15 @@ import {
runServer,
ServerInfo,
setAccessTokensToServers
-} from '../../../../shared/utils'
+} from '../../../../shared/extra-utils'
import {
checkBadCountPagination,
checkBadSortPagination,
checkBadStartPagination
-} from '../../../../shared/utils/requests/check-api-params'
-import { getAccount } from '../../../../shared/utils/users/accounts'
-import { sendContactForm } from '../../../../shared/utils/server/contact-form'
-import { MockSmtpServer } from '../../../../shared/utils/miscs/email'
+} from '../../../../shared/extra-utils/requests/check-api-params'
+import { getAccount } from '../../../../shared/extra-utils/users/accounts'
+import { sendContactForm } from '../../../../shared/extra-utils/server/contact-form'
+import { MockSmtpServer } from '../../../../shared/extra-utils/miscs/email'
describe('Test contact form API validators', function () {
let server: ServerInfo
diff --git a/server/tests/api/check-params/debug.ts b/server/tests/api/check-params/debug.ts
index da94beffeb..8ba7e04305 100644
--- a/server/tests/api/check-params/debug.ts
+++ b/server/tests/api/check-params/debug.ts
@@ -10,8 +10,8 @@ import {
ServerInfo,
setAccessTokensToServers,
userLogin
-} from '../../../../shared/utils'
-import { makeGetRequest } from '../../../../shared/utils/requests/requests'
+} from '../../../../shared/extra-utils'
+import { makeGetRequest } from '../../../../shared/extra-utils/requests/requests'
describe('Test debug API validators', function () {
const path = '/api/v1/server/debug'
diff --git a/server/tests/api/check-params/follows.ts b/server/tests/api/check-params/follows.ts
index 5bb337682f..e756313120 100644
--- a/server/tests/api/check-params/follows.ts
+++ b/server/tests/api/check-params/follows.ts
@@ -5,12 +5,12 @@ import 'mocha'
import {
createUser, flushTests, killallServers, makeDeleteRequest, makePostBodyRequest, runServer, ServerInfo, setAccessTokensToServers,
userLogin
-} from '../../../../shared/utils'
+} from '../../../../shared/extra-utils'
import {
checkBadCountPagination,
checkBadSortPagination,
checkBadStartPagination
-} from '../../../../shared/utils/requests/check-api-params'
+} from '../../../../shared/extra-utils/requests/check-api-params'
describe('Test server follows API validators', function () {
let server: ServerInfo
diff --git a/server/tests/api/check-params/jobs.ts b/server/tests/api/check-params/jobs.ts
index 5fb2b96060..682406e872 100644
--- a/server/tests/api/check-params/jobs.ts
+++ b/server/tests/api/check-params/jobs.ts
@@ -10,13 +10,13 @@ import {
ServerInfo,
setAccessTokensToServers,
userLogin
-} from '../../../../shared/utils'
+} from '../../../../shared/extra-utils'
import {
checkBadCountPagination,
checkBadSortPagination,
checkBadStartPagination
-} from '../../../../shared/utils/requests/check-api-params'
-import { makeGetRequest } from '../../../../shared/utils/requests/requests'
+} from '../../../../shared/extra-utils/requests/check-api-params'
+import { makeGetRequest } from '../../../../shared/extra-utils/requests/requests'
describe('Test jobs API validators', function () {
const path = '/api/v1/jobs/failed'
diff --git a/server/tests/api/check-params/logs.ts b/server/tests/api/check-params/logs.ts
index 9bc6ac2440..0948f7c5e6 100644
--- a/server/tests/api/check-params/logs.ts
+++ b/server/tests/api/check-params/logs.ts
@@ -10,8 +10,8 @@ import {
ServerInfo,
setAccessTokensToServers,
userLogin
-} from '../../../../shared/utils'
-import { makeGetRequest } from '../../../../shared/utils/requests/requests'
+} from '../../../../shared/extra-utils'
+import { makeGetRequest } from '../../../../shared/extra-utils/requests/requests'
describe('Test logs API validators', function () {
const path = '/api/v1/server/logs'
diff --git a/server/tests/api/check-params/redundancy.ts b/server/tests/api/check-params/redundancy.ts
index d14e35cf21..93b905feab 100644
--- a/server/tests/api/check-params/redundancy.ts
+++ b/server/tests/api/check-params/redundancy.ts
@@ -12,7 +12,7 @@ import {
ServerInfo,
setAccessTokensToServers,
userLogin
-} from '../../../../shared/utils'
+} from '../../../../shared/extra-utils'
describe('Test server redundancy API validators', function () {
let servers: ServerInfo[]
diff --git a/server/tests/api/check-params/search.ts b/server/tests/api/check-params/search.ts
index 7b7e07784f..1fcdedd90a 100644
--- a/server/tests/api/check-params/search.ts
+++ b/server/tests/api/check-params/search.ts
@@ -2,12 +2,12 @@
import 'mocha'
-import { flushTests, immutableAssign, killallServers, makeGetRequest, runServer, ServerInfo } from '../../../../shared/utils'
+import { flushTests, immutableAssign, killallServers, makeGetRequest, runServer, ServerInfo } from '../../../../shared/extra-utils'
import {
checkBadCountPagination,
checkBadSortPagination,
checkBadStartPagination
-} from '../../../../shared/utils/requests/check-api-params'
+} from '../../../../shared/extra-utils/requests/check-api-params'
describe('Test videos API validator', function () {
let server: ServerInfo
diff --git a/server/tests/api/check-params/services.ts b/server/tests/api/check-params/services.ts
index 28591af9dd..813bc7e364 100644
--- a/server/tests/api/check-params/services.ts
+++ b/server/tests/api/check-params/services.ts
@@ -10,7 +10,7 @@ import {
ServerInfo,
setAccessTokensToServers,
uploadVideo
-} from '../../../../shared/utils'
+} from '../../../../shared/extra-utils'
describe('Test services API validators', function () {
let server: ServerInfo
diff --git a/server/tests/api/check-params/user-notifications.ts b/server/tests/api/check-params/user-notifications.ts
index 4b75f6920b..c563284069 100644
--- a/server/tests/api/check-params/user-notifications.ts
+++ b/server/tests/api/check-params/user-notifications.ts
@@ -14,12 +14,12 @@ import {
ServerInfo,
setAccessTokensToServers,
wait
-} from '../../../../shared/utils'
+} from '../../../../shared/extra-utils'
import {
checkBadCountPagination,
checkBadSortPagination,
checkBadStartPagination
-} from '../../../../shared/utils/requests/check-api-params'
+} from '../../../../shared/extra-utils/requests/check-api-params'
import { UserNotificationSetting, UserNotificationSettingValue } from '../../../../shared/models/users'
describe('Test user notifications API validators', function () {
diff --git a/server/tests/api/check-params/user-subscriptions.ts b/server/tests/api/check-params/user-subscriptions.ts
index a18e1a43b9..d33b3bca63 100644
--- a/server/tests/api/check-params/user-subscriptions.ts
+++ b/server/tests/api/check-params/user-subscriptions.ts
@@ -13,14 +13,14 @@ import {
ServerInfo,
setAccessTokensToServers,
userLogin
-} from '../../../../shared/utils'
+} from '../../../../shared/extra-utils'
import {
checkBadCountPagination,
checkBadSortPagination,
checkBadStartPagination
-} from '../../../../shared/utils/requests/check-api-params'
-import { waitJobs } from '../../../../shared/utils/server/jobs'
+} from '../../../../shared/extra-utils/requests/check-api-params'
+import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
describe('Test user subscriptions API validators', function () {
const path = '/api/v1/users/me/subscriptions'
diff --git a/server/tests/api/check-params/users.ts b/server/tests/api/check-params/users.ts
index b5c812e8f1..b62806554b 100644
--- a/server/tests/api/check-params/users.ts
+++ b/server/tests/api/check-params/users.ts
@@ -9,15 +9,15 @@ import {
createUser, flushTests, getMyUserInformation, getMyUserVideoRating, getUsersList, immutableAssign, killallServers, makeGetRequest,
makePostBodyRequest, makeUploadRequest, makePutBodyRequest, registerUser, removeUser, runServer, ServerInfo, setAccessTokensToServers,
updateUser, uploadVideo, userLogin, deleteMe, unblockUser, blockUser
-} from '../../../../shared/utils'
+} from '../../../../shared/extra-utils'
import {
checkBadCountPagination,
checkBadSortPagination,
checkBadStartPagination
-} from '../../../../shared/utils/requests/check-api-params'
-import { getMagnetURI, getMyVideoImports, getYoutubeVideoUrl, importVideo } from '../../../../shared/utils/videos/video-imports'
+} from '../../../../shared/extra-utils/requests/check-api-params'
+import { getMagnetURI, getMyVideoImports, getYoutubeVideoUrl, importVideo } from '../../../../shared/extra-utils/videos/video-imports'
import { VideoPrivacy } from '../../../../shared/models/videos'
-import { waitJobs } from '../../../../shared/utils/server/jobs'
+import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
import { expect } from 'chai'
import { UserAdminFlag } from '../../../../shared/models/users/user-flag.model'
diff --git a/server/tests/api/check-params/video-abuses.ts b/server/tests/api/check-params/video-abuses.ts
index 7edc8e39d4..78e4acf2fe 100644
--- a/server/tests/api/check-params/video-abuses.ts
+++ b/server/tests/api/check-params/video-abuses.ts
@@ -15,12 +15,12 @@ import {
updateVideoAbuse,
uploadVideo,
userLogin
-} from '../../../../shared/utils'
+} from '../../../../shared/extra-utils'
import {
checkBadCountPagination,
checkBadSortPagination,
checkBadStartPagination
-} from '../../../../shared/utils/requests/check-api-params'
+} from '../../../../shared/extra-utils/requests/check-api-params'
import { VideoAbuseState } from '../../../../shared/models/videos'
describe('Test video abuses API validators', function () {
diff --git a/server/tests/api/check-params/video-blacklist.ts b/server/tests/api/check-params/video-blacklist.ts
index 81423aee90..c2e9622cc4 100644
--- a/server/tests/api/check-params/video-blacklist.ts
+++ b/server/tests/api/check-params/video-blacklist.ts
@@ -18,12 +18,12 @@ import {
setAccessTokensToServers,
uploadVideo,
userLogin, waitJobs
-} from '../../../../shared/utils'
+} from '../../../../shared/extra-utils'
import {
checkBadCountPagination,
checkBadSortPagination,
checkBadStartPagination
-} from '../../../../shared/utils/requests/check-api-params'
+} from '../../../../shared/extra-utils/requests/check-api-params'
import { VideoDetails, VideoBlacklistType } from '../../../../shared/models/videos'
import { expect } from 'chai'
diff --git a/server/tests/api/check-params/video-captions.ts b/server/tests/api/check-params/video-captions.ts
index de2ca8cd12..4ef5e03ede 100644
--- a/server/tests/api/check-params/video-captions.ts
+++ b/server/tests/api/check-params/video-captions.ts
@@ -13,9 +13,9 @@ import {
setAccessTokensToServers,
uploadVideo,
userLogin
-} from '../../../../shared/utils'
+} from '../../../../shared/extra-utils'
import { join } from 'path'
-import { createVideoCaption } from '../../../../shared/utils/videos/video-captions'
+import { createVideoCaption } from '../../../../shared/extra-utils/videos/video-captions'
describe('Test video captions API validator', function () {
const path = '/api/v1/videos/'
diff --git a/server/tests/api/check-params/video-channels.ts b/server/tests/api/check-params/video-channels.ts
index b72fc42206..b6aa745ab5 100644
--- a/server/tests/api/check-params/video-channels.ts
+++ b/server/tests/api/check-params/video-channels.ts
@@ -20,12 +20,12 @@ import {
ServerInfo,
setAccessTokensToServers,
userLogin
-} from '../../../../shared/utils'
+} from '../../../../shared/extra-utils'
import {
checkBadCountPagination,
checkBadSortPagination,
checkBadStartPagination
-} from '../../../../shared/utils/requests/check-api-params'
+} from '../../../../shared/extra-utils/requests/check-api-params'
import { User } from '../../../../shared/models/users'
import { join } from 'path'
diff --git a/server/tests/api/check-params/video-comments.ts b/server/tests/api/check-params/video-comments.ts
index 5f70998efe..b80d912799 100644
--- a/server/tests/api/check-params/video-comments.ts
+++ b/server/tests/api/check-params/video-comments.ts
@@ -6,13 +6,13 @@ import {
createUser,
flushTests, killallServers, makeDeleteRequest, makeGetRequest, makePostBodyRequest, runServer, ServerInfo, setAccessTokensToServers,
uploadVideo, userLogin
-} from '../../../../shared/utils'
+} from '../../../../shared/extra-utils'
import {
checkBadCountPagination,
checkBadSortPagination,
checkBadStartPagination
-} from '../../../../shared/utils/requests/check-api-params'
-import { addVideoCommentThread } from '../../../../shared/utils/videos/video-comments'
+} from '../../../../shared/extra-utils/requests/check-api-params'
+import { addVideoCommentThread } from '../../../../shared/extra-utils/videos/video-comments'
const expect = chai.expect
diff --git a/server/tests/api/check-params/video-imports.ts b/server/tests/api/check-params/video-imports.ts
index 4d2bf2e8d8..ad4c4def03 100644
--- a/server/tests/api/check-params/video-imports.ts
+++ b/server/tests/api/check-params/video-imports.ts
@@ -18,13 +18,13 @@ import {
setAccessTokensToServers,
updateCustomSubConfig,
userLogin
-} from '../../../../shared/utils'
+} from '../../../../shared/extra-utils'
import {
checkBadCountPagination,
checkBadSortPagination,
checkBadStartPagination
-} from '../../../../shared/utils/requests/check-api-params'
-import { getMagnetURI, getYoutubeVideoUrl } from '../../../../shared/utils/videos/video-imports'
+} from '../../../../shared/extra-utils/requests/check-api-params'
+import { getMagnetURI, getYoutubeVideoUrl } from '../../../../shared/extra-utils/videos/video-imports'
describe('Test video imports API validator', function () {
const path = '/api/v1/videos/imports'
diff --git a/server/tests/api/check-params/video-playlists.ts b/server/tests/api/check-params/video-playlists.ts
index 229c231180..0f34847633 100644
--- a/server/tests/api/check-params/video-playlists.ts
+++ b/server/tests/api/check-params/video-playlists.ts
@@ -20,12 +20,12 @@ import {
updateVideoPlaylist,
updateVideoPlaylistElement,
uploadVideoAndGetId
-} from '../../../../shared/utils'
+} from '../../../../shared/extra-utils'
import {
checkBadCountPagination,
checkBadSortPagination,
checkBadStartPagination
-} from '../../../../shared/utils/requests/check-api-params'
+} from '../../../../shared/extra-utils/requests/check-api-params'
import { VideoPlaylistPrivacy } from '../../../../shared/models/videos/playlist/video-playlist-privacy.model'
import { VideoPlaylistType } from '../../../../shared/models/videos/playlist/video-playlist-type.model'
diff --git a/server/tests/api/check-params/videos-filter.ts b/server/tests/api/check-params/videos-filter.ts
index 7c487ae814..971867b27d 100644
--- a/server/tests/api/check-params/videos-filter.ts
+++ b/server/tests/api/check-params/videos-filter.ts
@@ -11,7 +11,7 @@ import {
ServerInfo,
setAccessTokensToServers, setDefaultVideoChannel,
userLogin
-} from '../../../../shared/utils'
+} from '../../../../shared/extra-utils'
import { UserRole } from '../../../../shared/models/users'
import { VideoPlaylistPrivacy } from '../../../../shared/models/videos/playlist/video-playlist-privacy.model'
diff --git a/server/tests/api/check-params/videos-history.ts b/server/tests/api/check-params/videos-history.ts
index 8c079a956c..11e2776440 100644
--- a/server/tests/api/check-params/videos-history.ts
+++ b/server/tests/api/check-params/videos-history.ts
@@ -14,7 +14,7 @@ import {
ServerInfo,
setAccessTokensToServers,
uploadVideo
-} from '../../../../shared/utils'
+} from '../../../../shared/extra-utils'
const expect = chai.expect
diff --git a/server/tests/api/check-params/videos.ts b/server/tests/api/check-params/videos.ts
index 3f0e0d646e..e96f324cc2 100644
--- a/server/tests/api/check-params/videos.ts
+++ b/server/tests/api/check-params/videos.ts
@@ -9,13 +9,13 @@ import {
createUser, flushTests, getMyUserInformation, getVideo, getVideosList, immutableAssign, killallServers, makeDeleteRequest,
makeGetRequest, makeUploadRequest, makePutBodyRequest, removeVideo, uploadVideo,
runServer, ServerInfo, setAccessTokensToServers, userLogin, updateCustomSubConfig
-} from '../../../../shared/utils'
+} from '../../../../shared/extra-utils'
import {
checkBadCountPagination,
checkBadSortPagination,
checkBadStartPagination
-} from '../../../../shared/utils/requests/check-api-params'
-import { getAccountsList } from '../../../../shared/utils/users/accounts'
+} from '../../../../shared/extra-utils/requests/check-api-params'
+import { getAccountsList } from '../../../../shared/extra-utils/users/accounts'
const expect = chai.expect
diff --git a/server/tests/api/notifications/user-notifications.ts b/server/tests/api/notifications/user-notifications.ts
index d1d6f3c358..8f7ce82a48 100644
--- a/server/tests/api/notifications/user-notifications.ts
+++ b/server/tests/api/notifications/user-notifications.ts
@@ -20,11 +20,11 @@ import {
wait,
getCustomConfig,
updateCustomConfig, getVideoThreadComments, getVideoCommentThreads, follow
-} from '../../../../shared/utils'
-import { killallServers, ServerInfo, uploadVideo } from '../../../../shared/utils/index'
-import { setAccessTokensToServers } from '../../../../shared/utils/users/login'
-import { waitJobs } from '../../../../shared/utils/server/jobs'
-import { getUserNotificationSocket } from '../../../../shared/utils/socket/socket-io'
+} from '../../../../shared/extra-utils'
+import { killallServers, ServerInfo, uploadVideo } from '../../../../shared/extra-utils/index'
+import { setAccessTokensToServers } from '../../../../shared/extra-utils/users/login'
+import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
+import { getUserNotificationSocket } from '../../../../shared/extra-utils/socket/socket-io'
import {
checkCommentMention,
CheckerBaseParams,
@@ -42,7 +42,7 @@ import {
markAsReadNotifications,
updateMyNotificationSettings,
markAsReadAllNotifications, checkNewInstanceFollower
-} from '../../../../shared/utils/users/user-notifications'
+} from '../../../../shared/extra-utils/users/user-notifications'
import {
User,
UserNotification,
@@ -50,13 +50,13 @@ import {
UserNotificationSettingValue,
UserNotificationType
} from '../../../../shared/models/users'
-import { MockSmtpServer } from '../../../../shared/utils/miscs/email'
-import { addUserSubscription, removeUserSubscription } from '../../../../shared/utils/users/user-subscriptions'
+import { MockSmtpServer } from '../../../../shared/extra-utils/miscs/email'
+import { addUserSubscription, removeUserSubscription } from '../../../../shared/extra-utils/users/user-subscriptions'
import { VideoPrivacy } from '../../../../shared/models/videos'
-import { getBadVideoUrl, getYoutubeVideoUrl, importVideo } from '../../../../shared/utils/videos/video-imports'
-import { addVideoCommentReply, addVideoCommentThread } from '../../../../shared/utils/videos/video-comments'
+import { getBadVideoUrl, getYoutubeVideoUrl, importVideo } from '../../../../shared/extra-utils/videos/video-imports'
+import { addVideoCommentReply, addVideoCommentThread } from '../../../../shared/extra-utils/videos/video-comments'
import * as uuidv4 from 'uuid/v4'
-import { addAccountToAccountBlocklist, removeAccountFromAccountBlocklist } from '../../../../shared/utils/users/blocklist'
+import { addAccountToAccountBlocklist, removeAccountFromAccountBlocklist } from '../../../../shared/extra-utils/users/blocklist'
import { CustomConfig } from '../../../../shared/models/server'
import { VideoCommentThreadTree } from '../../../../shared/models/videos/video-comment.model'
diff --git a/server/tests/api/redundancy/redundancy.ts b/server/tests/api/redundancy/redundancy.ts
index 33921763da..280a4c64b5 100644
--- a/server/tests/api/redundancy/redundancy.ts
+++ b/server/tests/api/redundancy/redundancy.ts
@@ -24,16 +24,16 @@ import {
viewVideo,
wait,
waitUntilLog
-} from '../../../../shared/utils'
-import { waitJobs } from '../../../../shared/utils/server/jobs'
+} from '../../../../shared/extra-utils'
+import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
import * as magnetUtil from 'magnet-uri'
-import { updateRedundancy } from '../../../../shared/utils/server/redundancy'
+import { updateRedundancy } from '../../../../shared/extra-utils/server/redundancy'
import { ActorFollow } from '../../../../shared/models/actors'
import { readdir } from 'fs-extra'
import { join } from 'path'
import { VideoRedundancyStrategy } from '../../../../shared/models/redundancy'
-import { getStats } from '../../../../shared/utils/server/stats'
+import { getStats } from '../../../../shared/extra-utils/server/stats'
import { ServerStats } from '../../../../shared/models/server/server-stats.model'
const expect = chai.expect
diff --git a/server/tests/api/search/search-activitypub-video-channels.ts b/server/tests/api/search/search-activitypub-video-channels.ts
index 682bd262a8..1f59a951be 100644
--- a/server/tests/api/search/search-activitypub-video-channels.ts
+++ b/server/tests/api/search/search-activitypub-video-channels.ts
@@ -17,10 +17,10 @@ import {
uploadVideo,
userLogin,
wait
-} from '../../../../shared/utils'
-import { waitJobs } from '../../../../shared/utils/server/jobs'
+} from '../../../../shared/extra-utils'
+import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
import { VideoChannel } from '../../../../shared/models/videos'
-import { searchVideoChannel } from '../../../../shared/utils/search/video-channels'
+import { searchVideoChannel } from '../../../../shared/extra-utils/search/video-channels'
const expect = chai.expect
diff --git a/server/tests/api/search/search-activitypub-videos.ts b/server/tests/api/search/search-activitypub-videos.ts
index f881917e75..d984c696c2 100644
--- a/server/tests/api/search/search-activitypub-videos.ts
+++ b/server/tests/api/search/search-activitypub-videos.ts
@@ -16,8 +16,8 @@ import {
uploadVideo,
wait,
searchVideo
-} from '../../../../shared/utils'
-import { waitJobs } from '../../../../shared/utils/server/jobs'
+} from '../../../../shared/extra-utils'
+import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
import { Video, VideoPrivacy } from '../../../../shared/models/videos'
const expect = chai.expect
diff --git a/server/tests/api/search/search-videos.ts b/server/tests/api/search/search-videos.ts
index fa4078b99f..65f3c91862 100644
--- a/server/tests/api/search/search-videos.ts
+++ b/server/tests/api/search/search-videos.ts
@@ -13,7 +13,7 @@ import {
uploadVideo,
wait,
immutableAssign
-} from '../../../../shared/utils'
+} from '../../../../shared/extra-utils'
const expect = chai.expect
diff --git a/server/tests/api/server/config.ts b/server/tests/api/server/config.ts
index 5373d02f22..a999166278 100644
--- a/server/tests/api/server/config.ts
+++ b/server/tests/api/server/config.ts
@@ -16,7 +16,7 @@ import {
runServer,
setAccessTokensToServers,
updateCustomConfig
-} from '../../../../shared/utils'
+} from '../../../../shared/extra-utils'
import { ServerConfig } from '../../../../shared/models'
const expect = chai.expect
diff --git a/server/tests/api/server/contact-form.ts b/server/tests/api/server/contact-form.ts
index 06a2f89b0b..fdd5e97302 100644
--- a/server/tests/api/server/contact-form.ts
+++ b/server/tests/api/server/contact-form.ts
@@ -2,10 +2,10 @@
import * as chai from 'chai'
import 'mocha'
-import { flushTests, killallServers, runServer, ServerInfo, setAccessTokensToServers, wait } from '../../../../shared/utils'
-import { MockSmtpServer } from '../../../../shared/utils/miscs/email'
-import { waitJobs } from '../../../../shared/utils/server/jobs'
-import { sendContactForm } from '../../../../shared/utils/server/contact-form'
+import { flushTests, killallServers, runServer, ServerInfo, setAccessTokensToServers, wait } from '../../../../shared/extra-utils'
+import { MockSmtpServer } from '../../../../shared/extra-utils/miscs/email'
+import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
+import { sendContactForm } from '../../../../shared/extra-utils/server/contact-form'
const expect = chai.expect
diff --git a/server/tests/api/server/email.ts b/server/tests/api/server/email.ts
index bc45102d28..a40a281f82 100644
--- a/server/tests/api/server/email.ts
+++ b/server/tests/api/server/email.ts
@@ -19,9 +19,9 @@ import {
killallServers,
ServerInfo,
setAccessTokensToServers
-} from '../../../../shared/utils'
-import { MockSmtpServer } from '../../../../shared/utils/miscs/email'
-import { waitJobs } from '../../../../shared/utils/server/jobs'
+} from '../../../../shared/extra-utils'
+import { MockSmtpServer } from '../../../../shared/extra-utils/miscs/email'
+import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
const expect = chai.expect
diff --git a/server/tests/api/server/follow-constraints.ts b/server/tests/api/server/follow-constraints.ts
index 28862a1c64..bdd8b1c700 100644
--- a/server/tests/api/server/follow-constraints.ts
+++ b/server/tests/api/server/follow-constraints.ts
@@ -13,10 +13,10 @@ import {
ServerInfo,
setAccessTokensToServers,
uploadVideo
-} from '../../../../shared/utils'
-import { unfollow } from '../../../../shared/utils/server/follows'
-import { userLogin } from '../../../../shared/utils/users/login'
-import { createUser } from '../../../../shared/utils/users/users'
+} from '../../../../shared/extra-utils'
+import { unfollow } from '../../../../shared/extra-utils/server/follows'
+import { userLogin } from '../../../../shared/extra-utils/users/login'
+import { createUser } from '../../../../shared/extra-utils/users/users'
const expect = chai.expect
diff --git a/server/tests/api/server/follows-moderation.ts b/server/tests/api/server/follows-moderation.ts
index 0bb3aa866d..f4a826ea8e 100644
--- a/server/tests/api/server/follows-moderation.ts
+++ b/server/tests/api/server/follows-moderation.ts
@@ -9,15 +9,15 @@ import {
ServerInfo,
setAccessTokensToServers,
updateCustomSubConfig
-} from '../../../../shared/utils/index'
+} from '../../../../shared/extra-utils/index'
import {
follow,
getFollowersListPaginationAndSort,
getFollowingListPaginationAndSort,
removeFollower,
rejectFollower
-} from '../../../../shared/utils/server/follows'
-import { waitJobs } from '../../../../shared/utils/server/jobs'
+} from '../../../../shared/extra-utils/server/follows'
+import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
import { ActorFollow } from '../../../../shared/models/actors'
const expect = chai.expect
diff --git a/server/tests/api/server/follows.ts b/server/tests/api/server/follows.ts
index a5e6c3c1e0..527b54e1ed 100644
--- a/server/tests/api/server/follows.ts
+++ b/server/tests/api/server/follows.ts
@@ -4,7 +4,7 @@ import * as chai from 'chai'
import 'mocha'
import { Video, VideoPrivacy } from '../../../../shared/models/videos'
import { VideoComment, VideoCommentThreadTree } from '../../../../shared/models/videos/video-comment.model'
-import { completeVideoCheck } from '../../../../shared/utils'
+import { completeVideoCheck } from '../../../../shared/extra-utils'
import {
flushAndRunMultipleServers,
getVideosList,
@@ -12,26 +12,26 @@ import {
ServerInfo,
setAccessTokensToServers,
uploadVideo
-} from '../../../../shared/utils/index'
-import { dateIsValid } from '../../../../shared/utils/miscs/miscs'
+} from '../../../../shared/extra-utils/index'
+import { dateIsValid } from '../../../../shared/extra-utils/miscs/miscs'
import {
follow,
getFollowersListPaginationAndSort,
getFollowingListPaginationAndSort,
unfollow
-} from '../../../../shared/utils/server/follows'
-import { expectAccountFollows } from '../../../../shared/utils/users/accounts'
-import { userLogin } from '../../../../shared/utils/users/login'
-import { createUser } from '../../../../shared/utils/users/users'
+} from '../../../../shared/extra-utils/server/follows'
+import { expectAccountFollows } from '../../../../shared/extra-utils/users/accounts'
+import { userLogin } from '../../../../shared/extra-utils/users/login'
+import { createUser } from '../../../../shared/extra-utils/users/users'
import {
addVideoCommentReply,
addVideoCommentThread,
getVideoCommentThreads,
getVideoThreadComments
-} from '../../../../shared/utils/videos/video-comments'
-import { rateVideo } from '../../../../shared/utils/videos/videos'
-import { waitJobs } from '../../../../shared/utils/server/jobs'
-import { createVideoCaption, listVideoCaptions, testCaptionFile } from '../../../../shared/utils/videos/video-captions'
+} from '../../../../shared/extra-utils/videos/video-comments'
+import { rateVideo } from '../../../../shared/extra-utils/videos/videos'
+import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
+import { createVideoCaption, listVideoCaptions, testCaptionFile } from '../../../../shared/extra-utils/videos/video-captions'
import { VideoCaption } from '../../../../shared/models/videos/caption/video-caption.model'
const expect = chai.expect
diff --git a/server/tests/api/server/handle-down.ts b/server/tests/api/server/handle-down.ts
index cd5acbe168..8c49541ee1 100644
--- a/server/tests/api/server/handle-down.ts
+++ b/server/tests/api/server/handle-down.ts
@@ -20,15 +20,15 @@ import {
updateVideo,
uploadVideo,
wait
-} from '../../../../shared/utils'
-import { follow, getFollowersListPaginationAndSort } from '../../../../shared/utils/server/follows'
-import { getJobsListPaginationAndSort, waitJobs } from '../../../../shared/utils/server/jobs'
+} from '../../../../shared/extra-utils'
+import { follow, getFollowersListPaginationAndSort } from '../../../../shared/extra-utils/server/follows'
+import { getJobsListPaginationAndSort, waitJobs } from '../../../../shared/extra-utils/server/jobs'
import {
addVideoCommentReply,
addVideoCommentThread,
getVideoCommentThreads,
getVideoThreadComments
-} from '../../../../shared/utils/videos/video-comments'
+} from '../../../../shared/extra-utils/videos/video-comments'
const expect = chai.expect
diff --git a/server/tests/api/server/jobs.ts b/server/tests/api/server/jobs.ts
index 52948b1d64..1d74298733 100644
--- a/server/tests/api/server/jobs.ts
+++ b/server/tests/api/server/jobs.ts
@@ -2,12 +2,12 @@
import * as chai from 'chai'
import 'mocha'
-import { killallServers, ServerInfo, setAccessTokensToServers } from '../../../../shared/utils/index'
-import { doubleFollow } from '../../../../shared/utils/server/follows'
-import { getJobsList, getJobsListPaginationAndSort, waitJobs } from '../../../../shared/utils/server/jobs'
-import { flushAndRunMultipleServers } from '../../../../shared/utils/server/servers'
-import { uploadVideo } from '../../../../shared/utils/videos/videos'
-import { dateIsValid } from '../../../../shared/utils/miscs/miscs'
+import { killallServers, ServerInfo, setAccessTokensToServers } from '../../../../shared/extra-utils/index'
+import { doubleFollow } from '../../../../shared/extra-utils/server/follows'
+import { getJobsList, getJobsListPaginationAndSort, waitJobs } from '../../../../shared/extra-utils/server/jobs'
+import { flushAndRunMultipleServers } from '../../../../shared/extra-utils/server/servers'
+import { uploadVideo } from '../../../../shared/extra-utils/videos/videos'
+import { dateIsValid } from '../../../../shared/extra-utils/miscs/miscs'
const expect = chai.expect
diff --git a/server/tests/api/server/logs.ts b/server/tests/api/server/logs.ts
index 05b0308deb..f55e124076 100644
--- a/server/tests/api/server/logs.ts
+++ b/server/tests/api/server/logs.ts
@@ -2,10 +2,10 @@
import * as chai from 'chai'
import 'mocha'
-import { flushTests, killallServers, runServer, ServerInfo, setAccessTokensToServers } from '../../../../shared/utils/index'
-import { waitJobs } from '../../../../shared/utils/server/jobs'
-import { uploadVideo } from '../../../../shared/utils/videos/videos'
-import { getLogs } from '../../../../shared/utils/logs/logs'
+import { flushTests, killallServers, runServer, ServerInfo, setAccessTokensToServers } from '../../../../shared/extra-utils/index'
+import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
+import { uploadVideo } from '../../../../shared/extra-utils/videos/videos'
+import { getLogs } from '../../../../shared/extra-utils/logs/logs'
const expect = chai.expect
diff --git a/server/tests/api/server/no-client.ts b/server/tests/api/server/no-client.ts
index 3b95ce945b..88d34063cb 100644
--- a/server/tests/api/server/no-client.ts
+++ b/server/tests/api/server/no-client.ts
@@ -4,8 +4,8 @@ import {
flushTests,
killallServers,
ServerInfo
-} from '../../../../shared/utils'
-import { runServer } from '../../../../shared/utils/server/servers'
+} from '../../../../shared/extra-utils'
+import { runServer } from '../../../../shared/extra-utils/server/servers'
describe('Start and stop server without web client routes', function () {
let server: ServerInfo
diff --git a/server/tests/api/server/reverse-proxy.ts b/server/tests/api/server/reverse-proxy.ts
index ee0fffd5ae..e7dc165315 100644
--- a/server/tests/api/server/reverse-proxy.ts
+++ b/server/tests/api/server/reverse-proxy.ts
@@ -15,7 +15,7 @@ import {
userLogin,
viewVideo,
wait
-} from '../../../../shared/utils'
+} from '../../../../shared/extra-utils'
const expect = chai.expect
import {
@@ -23,7 +23,7 @@ import {
flushTests,
runServer,
registerUser, getCustomConfig, setAccessTokensToServers, updateCustomConfig
-} from '../../../../shared/utils/index'
+} from '../../../../shared/extra-utils/index'
describe('Test application behind a reverse proxy', function () {
let server = null
diff --git a/server/tests/api/server/stats.ts b/server/tests/api/server/stats.ts
index eadbcaf834..48addad227 100644
--- a/server/tests/api/server/stats.ts
+++ b/server/tests/api/server/stats.ts
@@ -13,11 +13,11 @@ import {
uploadVideo,
viewVideo,
wait
-} from '../../../../shared/utils'
-import { flushTests, setAccessTokensToServers } from '../../../../shared/utils/index'
-import { getStats } from '../../../../shared/utils/server/stats'
-import { addVideoCommentThread } from '../../../../shared/utils/videos/video-comments'
-import { waitJobs } from '../../../../shared/utils/server/jobs'
+} from '../../../../shared/extra-utils'
+import { flushTests, setAccessTokensToServers } from '../../../../shared/extra-utils/index'
+import { getStats } from '../../../../shared/extra-utils/server/stats'
+import { addVideoCommentThread } from '../../../../shared/extra-utils/videos/video-comments'
+import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
const expect = chai.expect
diff --git a/server/tests/api/server/tracker.ts b/server/tests/api/server/tracker.ts
index 41803aef13..4f7cc05a7a 100644
--- a/server/tests/api/server/tracker.ts
+++ b/server/tests/api/server/tracker.ts
@@ -2,8 +2,8 @@
import * as magnetUtil from 'magnet-uri'
import 'mocha'
-import { getVideo, killallServers, reRunServer, runServer, ServerInfo, uploadVideo } from '../../../../shared/utils'
-import { flushTests, setAccessTokensToServers } from '../../../../shared/utils/index'
+import { getVideo, killallServers, reRunServer, runServer, ServerInfo, uploadVideo } from '../../../../shared/extra-utils'
+import { flushTests, setAccessTokensToServers } from '../../../../shared/extra-utils/index'
import { VideoDetails } from '../../../../shared/models/videos'
import * as WebTorrent from 'webtorrent'
diff --git a/server/tests/api/users/blocklist.ts b/server/tests/api/users/blocklist.ts
index 638a443bad..cd96ffe2ac 100644
--- a/server/tests/api/users/blocklist.ts
+++ b/server/tests/api/users/blocklist.ts
@@ -12,16 +12,16 @@ import {
ServerInfo,
uploadVideo,
userLogin
-} from '../../../../shared/utils/index'
-import { setAccessTokensToServers } from '../../../../shared/utils/users/login'
-import { getVideosListWithToken, getVideosList } from '../../../../shared/utils/videos/videos'
+} from '../../../../shared/extra-utils/index'
+import { setAccessTokensToServers } from '../../../../shared/extra-utils/users/login'
+import { getVideosListWithToken, getVideosList } from '../../../../shared/extra-utils/videos/videos'
import {
addVideoCommentReply,
addVideoCommentThread,
getVideoCommentThreads,
getVideoThreadComments
-} from '../../../../shared/utils/videos/video-comments'
-import { waitJobs } from '../../../../shared/utils/server/jobs'
+} from '../../../../shared/extra-utils/videos/video-comments'
+import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
import { VideoComment, VideoCommentThreadTree } from '../../../../shared/models/videos/video-comment.model'
import {
addAccountToAccountBlocklist,
@@ -36,7 +36,7 @@ import {
removeAccountFromServerBlocklist,
removeServerFromAccountBlocklist,
removeServerFromServerBlocklist
-} from '../../../../shared/utils/users/blocklist'
+} from '../../../../shared/extra-utils/users/blocklist'
const expect = chai.expect
diff --git a/server/tests/api/users/user-subscriptions.ts b/server/tests/api/users/user-subscriptions.ts
index 037a79a76d..5be185678a 100644
--- a/server/tests/api/users/user-subscriptions.ts
+++ b/server/tests/api/users/user-subscriptions.ts
@@ -11,18 +11,18 @@ import {
unfollow,
updateVideo,
userLogin
-} from '../../../../shared/utils'
-import { killallServers, ServerInfo, uploadVideo } from '../../../../shared/utils/index'
-import { setAccessTokensToServers } from '../../../../shared/utils/users/login'
+} from '../../../../shared/extra-utils'
+import { killallServers, ServerInfo, uploadVideo } from '../../../../shared/extra-utils/index'
+import { setAccessTokensToServers } from '../../../../shared/extra-utils/users/login'
import { Video, VideoChannel } from '../../../../shared/models/videos'
-import { waitJobs } from '../../../../shared/utils/server/jobs'
+import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
import {
addUserSubscription,
listUserSubscriptions,
listUserSubscriptionVideos,
removeUserSubscription,
getUserSubscription, areSubscriptionsExist
-} from '../../../../shared/utils/users/user-subscriptions'
+} from '../../../../shared/extra-utils/users/user-subscriptions'
const expect = chai.expect
diff --git a/server/tests/api/users/users-multiple-servers.ts b/server/tests/api/users/users-multiple-servers.ts
index 0510b2de9f..9b8db00725 100644
--- a/server/tests/api/users/users-multiple-servers.ts
+++ b/server/tests/api/users/users-multiple-servers.ts
@@ -14,13 +14,20 @@ import {
removeUser,
updateMyUser,
userLogin
-} from '../../../../shared/utils'
-import { getMyUserInformation, killallServers, ServerInfo, testImage, updateMyAvatar, uploadVideo } from '../../../../shared/utils/index'
-import { checkActorFilesWereRemoved, getAccount, getAccountsList } from '../../../../shared/utils/users/accounts'
-import { setAccessTokensToServers } from '../../../../shared/utils/users/login'
+} from '../../../../shared/extra-utils'
+import {
+ getMyUserInformation,
+ killallServers,
+ ServerInfo,
+ testImage,
+ updateMyAvatar,
+ uploadVideo
+} from '../../../../shared/extra-utils/index'
+import { checkActorFilesWereRemoved, getAccount, getAccountsList } from '../../../../shared/extra-utils/users/accounts'
+import { setAccessTokensToServers } from '../../../../shared/extra-utils/users/login'
import { User } from '../../../../shared/models/users'
import { VideoChannel } from '../../../../shared/models/videos'
-import { waitJobs } from '../../../../shared/utils/server/jobs'
+import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
const expect = chai.expect
diff --git a/server/tests/api/users/users-verification.ts b/server/tests/api/users/users-verification.ts
index babeda2b89..7fcd3e50b5 100644
--- a/server/tests/api/users/users-verification.ts
+++ b/server/tests/api/users/users-verification.ts
@@ -5,10 +5,10 @@ import 'mocha'
import {
registerUser, flushTests, getUserInformation, getMyUserInformation, killallServers,
userLogin, login, runServer, ServerInfo, verifyEmail, updateCustomSubConfig, wait
-} from '../../../../shared/utils'
-import { setAccessTokensToServers } from '../../../../shared/utils/users/login'
-import { MockSmtpServer } from '../../../../shared/utils/miscs/email'
-import { waitJobs } from '../../../../shared/utils/server/jobs'
+} from '../../../../shared/extra-utils'
+import { setAccessTokensToServers } from '../../../../shared/extra-utils/users/login'
+import { MockSmtpServer } from '../../../../shared/extra-utils/miscs/email'
+import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
const expect = chai.expect
diff --git a/server/tests/api/users/users.ts b/server/tests/api/users/users.ts
index 13511e070d..472ff511cc 100644
--- a/server/tests/api/users/users.ts
+++ b/server/tests/api/users/users.ts
@@ -33,10 +33,10 @@ import {
updateUser,
uploadVideo,
userLogin
-} from '../../../../shared/utils'
-import { follow } from '../../../../shared/utils/server/follows'
-import { setAccessTokensToServers } from '../../../../shared/utils/users/login'
-import { getMyVideos } from '../../../../shared/utils/videos/videos'
+} from '../../../../shared/extra-utils'
+import { follow } from '../../../../shared/extra-utils/server/follows'
+import { setAccessTokensToServers } from '../../../../shared/extra-utils/users/login'
+import { getMyVideos } from '../../../../shared/extra-utils/videos/videos'
import { UserAdminFlag } from '../../../../shared/models/users/user-flag.model'
const expect = chai.expect
diff --git a/server/tests/api/videos/multiple-servers.ts b/server/tests/api/videos/multiple-servers.ts
index 46486b7773..dd50f905d2 100644
--- a/server/tests/api/videos/multiple-servers.ts
+++ b/server/tests/api/videos/multiple-servers.ts
@@ -32,15 +32,15 @@ import {
viewVideo,
wait,
webtorrentAdd
-} from '../../../../shared/utils'
+} from '../../../../shared/extra-utils'
import {
addVideoCommentReply,
addVideoCommentThread,
deleteVideoComment,
getVideoCommentThreads,
getVideoThreadComments
-} from '../../../../shared/utils/videos/video-comments'
-import { waitJobs } from '../../../../shared/utils/server/jobs'
+} from '../../../../shared/extra-utils/videos/video-comments'
+import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
const expect = chai.expect
diff --git a/server/tests/api/videos/services.ts b/server/tests/api/videos/services.ts
index 2da86964ff..e79ce59a6a 100644
--- a/server/tests/api/videos/services.ts
+++ b/server/tests/api/videos/services.ts
@@ -10,8 +10,8 @@ import {
ServerInfo,
setAccessTokensToServers,
uploadVideo
-} from '../../../../shared/utils/index'
-import { runServer } from '../../../../shared/utils/server/servers'
+} from '../../../../shared/extra-utils/index'
+import { runServer } from '../../../../shared/extra-utils/server/servers'
const expect = chai.expect
diff --git a/server/tests/api/videos/single-server.ts b/server/tests/api/videos/single-server.ts
index cfdcbaf3f1..ea3e7c4214 100644
--- a/server/tests/api/videos/single-server.ts
+++ b/server/tests/api/videos/single-server.ts
@@ -28,7 +28,7 @@ import {
uploadVideo,
viewVideo,
wait
-} from '../../../../shared/utils'
+} from '../../../../shared/extra-utils'
const expect = chai.expect
diff --git a/server/tests/api/videos/video-abuse.ts b/server/tests/api/videos/video-abuse.ts
index 3a7b623daa..2ae1bf34d0 100644
--- a/server/tests/api/videos/video-abuse.ts
+++ b/server/tests/api/videos/video-abuse.ts
@@ -14,9 +14,9 @@ import {
setAccessTokensToServers,
updateVideoAbuse,
uploadVideo
-} from '../../../../shared/utils/index'
-import { doubleFollow } from '../../../../shared/utils/server/follows'
-import { waitJobs } from '../../../../shared/utils/server/jobs'
+} from '../../../../shared/extra-utils/index'
+import { doubleFollow } from '../../../../shared/extra-utils/server/follows'
+import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
const expect = chai.expect
diff --git a/server/tests/api/videos/video-blacklist.ts b/server/tests/api/videos/video-blacklist.ts
index 1feae19e93..582c82e05b 100644
--- a/server/tests/api/videos/video-blacklist.ts
+++ b/server/tests/api/videos/video-blacklist.ts
@@ -20,9 +20,9 @@ import {
updateVideoBlacklist,
uploadVideo,
userLogin
-} from '../../../../shared/utils/index'
-import { doubleFollow } from '../../../../shared/utils/server/follows'
-import { waitJobs } from '../../../../shared/utils/server/jobs'
+} from '../../../../shared/extra-utils/index'
+import { doubleFollow } from '../../../../shared/extra-utils/server/follows'
+import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
import { VideoBlacklist, VideoBlacklistType } from '../../../../shared/models/videos'
import { UserAdminFlag } from '../../../../shared/models/users/user-flag.model'
import { UserRole } from '../../../../shared/models/users'
diff --git a/server/tests/api/videos/video-captions.ts b/server/tests/api/videos/video-captions.ts
index 57bee713f9..da920e00c5 100644
--- a/server/tests/api/videos/video-captions.ts
+++ b/server/tests/api/videos/video-captions.ts
@@ -9,10 +9,15 @@ import {
removeVideo,
uploadVideo,
wait
-} from '../../../../shared/utils'
-import { flushTests, killallServers, ServerInfo, setAccessTokensToServers } from '../../../../shared/utils/index'
-import { waitJobs } from '../../../../shared/utils/server/jobs'
-import { createVideoCaption, deleteVideoCaption, listVideoCaptions, testCaptionFile } from '../../../../shared/utils/videos/video-captions'
+} from '../../../../shared/extra-utils'
+import { flushTests, killallServers, ServerInfo, setAccessTokensToServers } from '../../../../shared/extra-utils/index'
+import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
+import {
+ createVideoCaption,
+ deleteVideoCaption,
+ listVideoCaptions,
+ testCaptionFile
+} from '../../../../shared/extra-utils/videos/video-captions'
import { VideoCaption } from '../../../../shared/models/videos/caption/video-caption.model'
const expect = chai.expect
diff --git a/server/tests/api/videos/video-change-ownership.ts b/server/tests/api/videos/video-change-ownership.ts
index a23e30dc0d..9040ac3084 100644
--- a/server/tests/api/videos/video-change-ownership.ts
+++ b/server/tests/api/videos/video-change-ownership.ts
@@ -18,8 +18,8 @@ import {
uploadVideo,
userLogin,
getVideo
-} from '../../../../shared/utils'
-import { waitJobs } from '../../../../shared/utils/server/jobs'
+} from '../../../../shared/extra-utils'
+import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
import { User } from '../../../../shared/models/users'
import { VideoDetails } from '../../../../shared/models/videos'
diff --git a/server/tests/api/videos/video-channels.ts b/server/tests/api/videos/video-channels.ts
index bd672cf41c..e30e6bb4fc 100644
--- a/server/tests/api/videos/video-channels.ts
+++ b/server/tests/api/videos/video-channels.ts
@@ -13,7 +13,7 @@ import {
updateVideoChannelAvatar,
uploadVideo,
userLogin
-} from '../../../../shared/utils'
+} from '../../../../shared/extra-utils'
import {
addVideoChannel,
deleteVideoChannel,
@@ -26,8 +26,8 @@ import {
ServerInfo,
setAccessTokensToServers,
updateVideoChannel
-} from '../../../../shared/utils/index'
-import { waitJobs } from '../../../../shared/utils/server/jobs'
+} from '../../../../shared/extra-utils/index'
+import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
const expect = chai.expect
diff --git a/server/tests/api/videos/video-comments.ts b/server/tests/api/videos/video-comments.ts
index ce1b17e35f..abf4d0c449 100644
--- a/server/tests/api/videos/video-comments.ts
+++ b/server/tests/api/videos/video-comments.ts
@@ -3,7 +3,7 @@
import * as chai from 'chai'
import 'mocha'
import { VideoComment, VideoCommentThreadTree } from '../../../../shared/models/videos/video-comment.model'
-import { testImage } from '../../../../shared/utils'
+import { testImage } from '../../../../shared/extra-utils'
import {
dateIsValid,
flushTests,
@@ -13,14 +13,14 @@ import {
setAccessTokensToServers,
updateMyAvatar,
uploadVideo
-} from '../../../../shared/utils/index'
+} from '../../../../shared/extra-utils/index'
import {
addVideoCommentReply,
addVideoCommentThread,
deleteVideoComment,
getVideoCommentThreads,
getVideoThreadComments
-} from '../../../../shared/utils/videos/video-comments'
+} from '../../../../shared/extra-utils/videos/video-comments'
const expect = chai.expect
diff --git a/server/tests/api/videos/video-description.ts b/server/tests/api/videos/video-description.ts
index cbda0b9a6c..0c03d17d85 100644
--- a/server/tests/api/videos/video-description.ts
+++ b/server/tests/api/videos/video-description.ts
@@ -12,9 +12,9 @@ import {
setAccessTokensToServers,
updateVideo,
uploadVideo
-} from '../../../../shared/utils/index'
-import { doubleFollow } from '../../../../shared/utils/server/follows'
-import { waitJobs } from '../../../../shared/utils/server/jobs'
+} from '../../../../shared/extra-utils/index'
+import { doubleFollow } from '../../../../shared/extra-utils/server/follows'
+import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
const expect = chai.expect
diff --git a/server/tests/api/videos/video-hls.ts b/server/tests/api/videos/video-hls.ts
index 3d04758b16..a9251406ab 100644
--- a/server/tests/api/videos/video-hls.ts
+++ b/server/tests/api/videos/video-hls.ts
@@ -18,7 +18,7 @@ import {
updateVideo,
uploadVideo,
waitJobs
-} from '../../../../shared/utils'
+} from '../../../../shared/extra-utils'
import { VideoDetails } from '../../../../shared/models/videos'
import { VideoStreamingPlaylistType } from '../../../../shared/models/videos/video-streaming-playlist.type'
import { join } from 'path'
diff --git a/server/tests/api/videos/video-imports.ts b/server/tests/api/videos/video-imports.ts
index c5ffb793ba..f8b2c0407e 100644
--- a/server/tests/api/videos/video-imports.ts
+++ b/server/tests/api/videos/video-imports.ts
@@ -14,9 +14,9 @@ import {
killallServers,
ServerInfo,
setAccessTokensToServers
-} from '../../../../shared/utils'
-import { waitJobs } from '../../../../shared/utils/server/jobs'
-import { getMagnetURI, getYoutubeVideoUrl, importVideo, getMyVideoImports } from '../../../../shared/utils/videos/video-imports'
+} from '../../../../shared/extra-utils'
+import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
+import { getMagnetURI, getYoutubeVideoUrl, importVideo, getMyVideoImports } from '../../../../shared/extra-utils/videos/video-imports'
const expect = chai.expect
diff --git a/server/tests/api/videos/video-nsfw.ts b/server/tests/api/videos/video-nsfw.ts
index cb972d9210..9f2d99ffec 100644
--- a/server/tests/api/videos/video-nsfw.ts
+++ b/server/tests/api/videos/video-nsfw.ts
@@ -9,10 +9,10 @@ import {
ServerInfo,
setAccessTokensToServers,
uploadVideo
-} from '../../../../shared/utils/index'
-import { userLogin } from '../../../../shared/utils/users/login'
-import { createUser } from '../../../../shared/utils/users/users'
-import { getMyVideos } from '../../../../shared/utils/videos/videos'
+} from '../../../../shared/extra-utils/index'
+import { userLogin } from '../../../../shared/extra-utils/users/login'
+import { createUser } from '../../../../shared/extra-utils/users/users'
+import { getMyVideos } from '../../../../shared/extra-utils/videos/videos'
import {
getAccountVideos,
getConfig,
@@ -25,7 +25,7 @@ import {
searchVideoWithToken,
updateCustomConfig,
updateMyUser
-} from '../../../../shared/utils'
+} from '../../../../shared/extra-utils'
import { ServerConfig } from '../../../../shared/models'
import { CustomConfig } from '../../../../shared/models/server/custom-config.model'
import { User } from '../../../../shared/models/users'
diff --git a/server/tests/api/videos/video-playlists.ts b/server/tests/api/videos/video-playlists.ts
index d9cb719928..8c3542906d 100644
--- a/server/tests/api/videos/video-playlists.ts
+++ b/server/tests/api/videos/video-playlists.ts
@@ -36,7 +36,7 @@ import {
uploadVideoAndGetId,
userLogin,
waitJobs
-} from '../../../../shared/utils'
+} from '../../../../shared/extra-utils'
import { VideoPlaylistPrivacy } from '../../../../shared/models/videos/playlist/video-playlist-privacy.model'
import { VideoPlaylist } from '../../../../shared/models/videos/playlist/video-playlist.model'
import { Video } from '../../../../shared/models/videos'
diff --git a/server/tests/api/videos/video-privacy.ts b/server/tests/api/videos/video-privacy.ts
index e1b5fb1939..ba5e0f044d 100644
--- a/server/tests/api/videos/video-privacy.ts
+++ b/server/tests/api/videos/video-privacy.ts
@@ -10,12 +10,12 @@ import {
ServerInfo,
setAccessTokensToServers,
uploadVideo
-} from '../../../../shared/utils/index'
-import { doubleFollow } from '../../../../shared/utils/server/follows'
-import { userLogin } from '../../../../shared/utils/users/login'
-import { createUser } from '../../../../shared/utils/users/users'
-import { getMyVideos, getVideo, getVideoWithToken, updateVideo } from '../../../../shared/utils/videos/videos'
-import { waitJobs } from '../../../../shared/utils/server/jobs'
+} from '../../../../shared/extra-utils/index'
+import { doubleFollow } from '../../../../shared/extra-utils/server/follows'
+import { userLogin } from '../../../../shared/extra-utils/users/login'
+import { createUser } from '../../../../shared/extra-utils/users/users'
+import { getMyVideos, getVideo, getVideoWithToken, updateVideo } from '../../../../shared/extra-utils/videos/videos'
+import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
const expect = chai.expect
diff --git a/server/tests/api/videos/video-schedule-update.ts b/server/tests/api/videos/video-schedule-update.ts
index 632c4244ce..b19a9116aa 100644
--- a/server/tests/api/videos/video-schedule-update.ts
+++ b/server/tests/api/videos/video-schedule-update.ts
@@ -15,8 +15,8 @@ import {
updateVideo,
uploadVideo,
wait
-} from '../../../../shared/utils'
-import { waitJobs } from '../../../../shared/utils/server/jobs'
+} from '../../../../shared/extra-utils'
+import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
const expect = chai.expect
diff --git a/server/tests/api/videos/video-transcoder.ts b/server/tests/api/videos/video-transcoder.ts
index eefd32ef81..3d4739ca96 100644
--- a/server/tests/api/videos/video-transcoder.ts
+++ b/server/tests/api/videos/video-transcoder.ts
@@ -19,9 +19,9 @@ import {
setAccessTokensToServers,
uploadVideo,
webtorrentAdd
-} from '../../../../shared/utils'
+} from '../../../../shared/extra-utils'
import { extname, join } from 'path'
-import { waitJobs } from '../../../../shared/utils/server/jobs'
+import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
import { VIDEO_TRANSCODING_FPS } from '../../../../server/initializers/constants'
const expect = chai.expect
diff --git a/server/tests/api/videos/videos-filter.ts b/server/tests/api/videos/videos-filter.ts
index 920ca00230..36664b17fc 100644
--- a/server/tests/api/videos/videos-filter.ts
+++ b/server/tests/api/videos/videos-filter.ts
@@ -13,7 +13,7 @@ import {
setAccessTokensToServers,
uploadVideo,
userLogin
-} from '../../../../shared/utils'
+} from '../../../../shared/extra-utils'
import { Video, VideoPrivacy } from '../../../../shared/models/videos'
import { UserRole } from '../../../../shared/models/users'
diff --git a/server/tests/api/videos/videos-history.ts b/server/tests/api/videos/videos-history.ts
index ab40bb64cb..6f75ce42c6 100644
--- a/server/tests/api/videos/videos-history.ts
+++ b/server/tests/api/videos/videos-history.ts
@@ -16,9 +16,9 @@ import {
uploadVideo,
userLogin,
wait
-} from '../../../../shared/utils'
+} from '../../../../shared/extra-utils'
import { Video, VideoDetails } from '../../../../shared/models/videos'
-import { listMyVideosHistory, removeMyVideosHistory, userWatchVideo } from '../../../../shared/utils/videos/video-history'
+import { listMyVideosHistory, removeMyVideosHistory, userWatchVideo } from '../../../../shared/extra-utils/videos/video-history'
const expect = chai.expect
diff --git a/server/tests/api/videos/videos-overview.ts b/server/tests/api/videos/videos-overview.ts
index 7221bcae65..233ca8a5dd 100644
--- a/server/tests/api/videos/videos-overview.ts
+++ b/server/tests/api/videos/videos-overview.ts
@@ -2,8 +2,8 @@
import * as chai from 'chai'
import 'mocha'
-import { flushTests, killallServers, runServer, ServerInfo, setAccessTokensToServers, uploadVideo } from '../../../../shared/utils'
-import { getVideosOverview } from '../../../../shared/utils/overviews/overviews'
+import { flushTests, killallServers, runServer, ServerInfo, setAccessTokensToServers, uploadVideo } from '../../../../shared/extra-utils'
+import { getVideosOverview } from '../../../../shared/extra-utils/overviews/overviews'
import { VideosOverview } from '../../../../shared/models/overviews'
const expect = chai.expect
diff --git a/server/tests/api/videos/videos-views-cleaner.ts b/server/tests/api/videos/videos-views-cleaner.ts
index 9f268c8e6b..4001969c3c 100644
--- a/server/tests/api/videos/videos-views-cleaner.ts
+++ b/server/tests/api/videos/videos-views-cleaner.ts
@@ -11,10 +11,10 @@ import {
ServerInfo,
setAccessTokensToServers,
uploadVideo, uploadVideoAndGetId, viewVideo, wait, countVideoViewsOf, doubleFollow, waitJobs
-} from '../../../../shared/utils'
-import { getVideosOverview } from '../../../../shared/utils/overviews/overviews'
+} from '../../../../shared/extra-utils'
+import { getVideosOverview } from '../../../../shared/extra-utils/overviews/overviews'
import { VideosOverview } from '../../../../shared/models/overviews'
-import { listMyVideosHistory } from '../../../../shared/utils/videos/video-history'
+import { listMyVideosHistory } from '../../../../shared/extra-utils/videos/video-history'
const expect = chai.expect
diff --git a/server/tests/cli/create-import-video-file-job.ts b/server/tests/cli/create-import-video-file-job.ts
index 4acda47b1c..4dc12a1c61 100644
--- a/server/tests/cli/create-import-video-file-job.ts
+++ b/server/tests/cli/create-import-video-file-job.ts
@@ -15,8 +15,8 @@ import {
ServerInfo,
setAccessTokensToServers,
uploadVideo
-} from '../../../shared/utils'
-import { waitJobs } from '../../../shared/utils/server/jobs'
+} from '../../../shared/extra-utils'
+import { waitJobs } from '../../../shared/extra-utils/server/jobs'
const expect = chai.expect
diff --git a/server/tests/cli/create-transcoding-job.ts b/server/tests/cli/create-transcoding-job.ts
index 50be5fa19f..bd1de20794 100644
--- a/server/tests/cli/create-transcoding-job.ts
+++ b/server/tests/cli/create-transcoding-job.ts
@@ -15,8 +15,8 @@ import {
ServerInfo,
setAccessTokensToServers,
uploadVideo, wait
-} from '../../../shared/utils'
-import { waitJobs } from '../../../shared/utils/server/jobs'
+} from '../../../shared/extra-utils'
+import { waitJobs } from '../../../shared/extra-utils/server/jobs'
const expect = chai.expect
diff --git a/server/tests/cli/optimize-old-videos.ts b/server/tests/cli/optimize-old-videos.ts
index f84ba1ecef..b3724476b1 100644
--- a/server/tests/cli/optimize-old-videos.ts
+++ b/server/tests/cli/optimize-old-videos.ts
@@ -15,8 +15,8 @@ import {
ServerInfo,
setAccessTokensToServers,
uploadVideo, viewVideo, wait
-} from '../../../shared/utils'
-import { waitJobs } from '../../../shared/utils/server/jobs'
+} from '../../../shared/extra-utils'
+import { waitJobs } from '../../../shared/extra-utils/server/jobs'
import { getVideoFileBitrate, getVideoFileFPS, getVideoFileResolution } from '../../helpers/ffmpeg-utils'
import { VIDEO_TRANSCODING_FPS } from '../../initializers/constants'
import { join } from 'path'
diff --git a/server/tests/cli/peertube.ts b/server/tests/cli/peertube.ts
index b0ae876d35..45411bdbc6 100644
--- a/server/tests/cli/peertube.ts
+++ b/server/tests/cli/peertube.ts
@@ -11,7 +11,7 @@ import {
runServer,
ServerInfo,
setAccessTokensToServers
-} from '../../../shared/utils'
+} from '../../../shared/extra-utils'
describe('Test CLI wrapper', function () {
let server: ServerInfo
diff --git a/server/tests/cli/reset-password.ts b/server/tests/cli/reset-password.ts
index 4c9f0c5f80..3c56bf45b7 100644
--- a/server/tests/cli/reset-password.ts
+++ b/server/tests/cli/reset-password.ts
@@ -10,7 +10,7 @@ import {
runServer,
ServerInfo,
setAccessTokensToServers
-} from '../../../shared/utils'
+} from '../../../shared/extra-utils'
describe('Test reset password scripts', function () {
let server: ServerInfo
diff --git a/server/tests/cli/update-host.ts b/server/tests/cli/update-host.ts
index 39533edea6..2270ff4945 100644
--- a/server/tests/cli/update-host.ts
+++ b/server/tests/cli/update-host.ts
@@ -3,8 +3,8 @@
import 'mocha'
import * as chai from 'chai'
import { VideoDetails } from '../../../shared/models/videos'
-import { waitJobs } from '../../../shared/utils/server/jobs'
-import { addVideoCommentThread } from '../../../shared/utils/videos/video-comments'
+import { waitJobs } from '../../../shared/extra-utils/server/jobs'
+import { addVideoCommentThread } from '../../../shared/extra-utils/videos/video-comments'
import {
addVideoChannel,
createUser,
@@ -21,8 +21,8 @@ import {
ServerInfo,
setAccessTokensToServers,
uploadVideo
-} from '../../../shared/utils'
-import { getAccountsList } from '../../../shared/utils/users/accounts'
+} from '../../../shared/extra-utils'
+import { getAccountsList } from '../../../shared/extra-utils/users/accounts'
const expect = chai.expect
diff --git a/server/tests/client.ts b/server/tests/client.ts
index 06b4a9c5a1..1161895100 100644
--- a/server/tests/client.ts
+++ b/server/tests/client.ts
@@ -15,7 +15,7 @@ import {
updateCustomConfig,
updateCustomSubConfig,
uploadVideo
-} from '../../shared/utils'
+} from '../../shared/extra-utils'
const expect = chai.expect
diff --git a/server/tests/feeds/feeds.ts b/server/tests/feeds/feeds.ts
index d632be4275..0e9ea1a18e 100644
--- a/server/tests/feeds/feeds.ts
+++ b/server/tests/feeds/feeds.ts
@@ -13,10 +13,10 @@ import {
ServerInfo,
setAccessTokensToServers,
uploadVideo, userLogin
-} from '../../../shared/utils'
+} from '../../../shared/extra-utils'
import * as libxmljs from 'libxmljs'
-import { addVideoCommentThread } from '../../../shared/utils/videos/video-comments'
-import { waitJobs } from '../../../shared/utils/server/jobs'
+import { addVideoCommentThread } from '../../../shared/extra-utils/videos/video-comments'
+import { waitJobs } from '../../../shared/extra-utils/server/jobs'
import { User } from '../../../shared/models/users'
chai.use(require('chai-xml'))
diff --git a/server/tests/helpers/request.ts b/server/tests/helpers/request.ts
index 95a74fdfaa..a754bc6e27 100644
--- a/server/tests/helpers/request.ts
+++ b/server/tests/helpers/request.ts
@@ -2,7 +2,7 @@
import 'mocha'
import { doRequest, doRequestAndSaveToFile } from '../../helpers/requests'
-import { get4KFileUrl, root, wait } from '../../../shared/utils'
+import { get4KFileUrl, root, wait } from '../../../shared/extra-utils'
import { join } from 'path'
import { pathExists, remove } from 'fs-extra'
import { expect } from 'chai'
diff --git a/server/tests/misc-endpoints.ts b/server/tests/misc-endpoints.ts
index 104876f2f2..d78b62d60c 100644
--- a/server/tests/misc-endpoints.ts
+++ b/server/tests/misc-endpoints.ts
@@ -12,7 +12,7 @@ import {
ServerInfo,
setAccessTokensToServers,
uploadVideo
-} from '../../shared/utils'
+} from '../../shared/extra-utils'
import { VideoPrivacy } from '../../shared/models/videos'
const expect = chai.expect
diff --git a/server/tests/real-world/populate-database.ts b/server/tests/real-world/populate-database.ts
index 3616127ad0..459c9cbd83 100644
--- a/server/tests/real-world/populate-database.ts
+++ b/server/tests/real-world/populate-database.ts
@@ -10,7 +10,7 @@ import {
ServerInfo,
setAccessTokensToServers,
uploadVideo
-} from '../../../shared/utils'
+} from '../../../shared/extra-utils'
import * as Bluebird from 'bluebird'
start()
diff --git a/server/tests/real-world/real-world.ts b/server/tests/real-world/real-world.ts
index ac3baaf9a1..8b070004d7 100644
--- a/server/tests/real-world/real-world.ts
+++ b/server/tests/real-world/real-world.ts
@@ -16,8 +16,8 @@ import {
updateVideo,
uploadVideo, viewVideo,
wait
-} from '../../../shared/utils'
-import { getJobsListPaginationAndSort } from '../../../shared/utils/server/jobs'
+} from '../../../shared/extra-utils'
+import { getJobsListPaginationAndSort } from '../../../shared/extra-utils/server/jobs'
interface ServerInfo extends DefaultServerInfo {
requestsNumber: number
diff --git a/server/tools/peertube-get-access-token.ts b/server/tools/peertube-get-access-token.ts
index a68665f5bb..85660de2c9 100644
--- a/server/tools/peertube-get-access-token.ts
+++ b/server/tools/peertube-get-access-token.ts
@@ -6,7 +6,7 @@ import {
Server,
Client,
User
-} from '../../shared/utils'
+} from '../../shared/extra-utils'
program
.option('-u, --url <url>', 'Server url')
diff --git a/server/tools/peertube-import-videos.ts b/server/tools/peertube-import-videos.ts
index 03f13b5e26..8c4c711f78 100644
--- a/server/tools/peertube-import-videos.ts
+++ b/server/tools/peertube-import-videos.ts
@@ -6,7 +6,7 @@ import { join } from 'path'
import { VideoPrivacy } from '../../shared/models/videos'
import { doRequestAndSaveToFile } from '../helpers/requests'
import { CONSTRAINTS_FIELDS } from '../initializers/constants'
-import { getClient, getVideoCategories, login, searchVideoWithSort, uploadVideo } from '../../shared/utils/index'
+import { getClient, getVideoCategories, login, searchVideoWithSort, uploadVideo } from '../../shared/extra-utils/index'
import { truncate } from 'lodash'
import * as prompt from 'prompt'
import { remove } from 'fs-extra'
diff --git a/server/tools/peertube-upload.ts b/server/tools/peertube-upload.ts
index ebc62c9651..13ca94e516 100644
--- a/server/tools/peertube-upload.ts
+++ b/server/tools/peertube-upload.ts
@@ -1,8 +1,8 @@
import * as program from 'commander'
import { access, constants } from 'fs-extra'
import { isAbsolute } from 'path'
-import { getClient, login } from '../../shared/utils'
-import { uploadVideo } from '../../shared/utils/'
+import { getClient, login } from '../../shared/extra-utils'
+import { uploadVideo } from '../../shared/extra-utils/'
import { VideoPrivacy } from '../../shared/models/videos'
import { netrc, getSettings } from './cli'
diff --git a/shared/utils/cli/cli.ts b/shared/extra-utils/cli/cli.ts
similarity index 100%
rename from shared/utils/cli/cli.ts
rename to shared/extra-utils/cli/cli.ts
diff --git a/shared/utils/feeds/feeds.ts b/shared/extra-utils/feeds/feeds.ts
similarity index 100%
rename from shared/utils/feeds/feeds.ts
rename to shared/extra-utils/feeds/feeds.ts
diff --git a/shared/utils/index.ts b/shared/extra-utils/index.ts
similarity index 100%
rename from shared/utils/index.ts
rename to shared/extra-utils/index.ts
diff --git a/shared/utils/logs/logs.ts b/shared/extra-utils/logs/logs.ts
similarity index 100%
rename from shared/utils/logs/logs.ts
rename to shared/extra-utils/logs/logs.ts
diff --git a/shared/utils/miscs/email-child-process.js b/shared/extra-utils/miscs/email-child-process.js
similarity index 100%
rename from shared/utils/miscs/email-child-process.js
rename to shared/extra-utils/miscs/email-child-process.js
diff --git a/shared/utils/miscs/email.ts b/shared/extra-utils/miscs/email.ts
similarity index 100%
rename from shared/utils/miscs/email.ts
rename to shared/extra-utils/miscs/email.ts
diff --git a/shared/utils/miscs/miscs.ts b/shared/extra-utils/miscs/miscs.ts
similarity index 98%
rename from shared/utils/miscs/miscs.ts
rename to shared/extra-utils/miscs/miscs.ts
index 91a93b631f..d1ffb7be42 100644
--- a/shared/utils/miscs/miscs.ts
+++ b/shared/extra-utils/miscs/miscs.ts
@@ -33,7 +33,7 @@ function webtorrentAdd (torrent: string, refreshWebTorrent = false) {
}
function root () {
- // We are in /shared/utils/miscs
+ // We are in /miscs
return join(__dirname, '..', '..', '..')
}
diff --git a/shared/utils/miscs/sql.ts b/shared/extra-utils/miscs/sql.ts
similarity index 100%
rename from shared/utils/miscs/sql.ts
rename to shared/extra-utils/miscs/sql.ts
diff --git a/shared/utils/miscs/stubs.ts b/shared/extra-utils/miscs/stubs.ts
similarity index 100%
rename from shared/utils/miscs/stubs.ts
rename to shared/extra-utils/miscs/stubs.ts
diff --git a/shared/utils/overviews/overviews.ts b/shared/extra-utils/overviews/overviews.ts
similarity index 100%
rename from shared/utils/overviews/overviews.ts
rename to shared/extra-utils/overviews/overviews.ts
diff --git a/shared/utils/requests/activitypub.ts b/shared/extra-utils/requests/activitypub.ts
similarity index 100%
rename from shared/utils/requests/activitypub.ts
rename to shared/extra-utils/requests/activitypub.ts
diff --git a/shared/utils/requests/check-api-params.ts b/shared/extra-utils/requests/check-api-params.ts
similarity index 100%
rename from shared/utils/requests/check-api-params.ts
rename to shared/extra-utils/requests/check-api-params.ts
diff --git a/shared/utils/requests/requests.ts b/shared/extra-utils/requests/requests.ts
similarity index 100%
rename from shared/utils/requests/requests.ts
rename to shared/extra-utils/requests/requests.ts
diff --git a/shared/utils/search/video-channels.ts b/shared/extra-utils/search/video-channels.ts
similarity index 100%
rename from shared/utils/search/video-channels.ts
rename to shared/extra-utils/search/video-channels.ts
diff --git a/shared/utils/search/videos.ts b/shared/extra-utils/search/videos.ts
similarity index 100%
rename from shared/utils/search/videos.ts
rename to shared/extra-utils/search/videos.ts
diff --git a/shared/utils/server/activitypub.ts b/shared/extra-utils/server/activitypub.ts
similarity index 100%
rename from shared/utils/server/activitypub.ts
rename to shared/extra-utils/server/activitypub.ts
diff --git a/shared/utils/server/clients.ts b/shared/extra-utils/server/clients.ts
similarity index 100%
rename from shared/utils/server/clients.ts
rename to shared/extra-utils/server/clients.ts
diff --git a/shared/utils/server/config.ts b/shared/extra-utils/server/config.ts
similarity index 100%
rename from shared/utils/server/config.ts
rename to shared/extra-utils/server/config.ts
diff --git a/shared/utils/server/contact-form.ts b/shared/extra-utils/server/contact-form.ts
similarity index 100%
rename from shared/utils/server/contact-form.ts
rename to shared/extra-utils/server/contact-form.ts
diff --git a/shared/utils/server/follows.ts b/shared/extra-utils/server/follows.ts
similarity index 100%
rename from shared/utils/server/follows.ts
rename to shared/extra-utils/server/follows.ts
diff --git a/shared/utils/server/jobs.ts b/shared/extra-utils/server/jobs.ts
similarity index 100%
rename from shared/utils/server/jobs.ts
rename to shared/extra-utils/server/jobs.ts
diff --git a/shared/utils/server/redundancy.ts b/shared/extra-utils/server/redundancy.ts
similarity index 100%
rename from shared/utils/server/redundancy.ts
rename to shared/extra-utils/server/redundancy.ts
diff --git a/shared/utils/server/servers.ts b/shared/extra-utils/server/servers.ts
similarity index 100%
rename from shared/utils/server/servers.ts
rename to shared/extra-utils/server/servers.ts
diff --git a/shared/utils/server/stats.ts b/shared/extra-utils/server/stats.ts
similarity index 100%
rename from shared/utils/server/stats.ts
rename to shared/extra-utils/server/stats.ts
diff --git a/shared/utils/socket/socket-io.ts b/shared/extra-utils/socket/socket-io.ts
similarity index 100%
rename from shared/utils/socket/socket-io.ts
rename to shared/extra-utils/socket/socket-io.ts
diff --git a/shared/utils/users/accounts.ts b/shared/extra-utils/users/accounts.ts
similarity index 100%
rename from shared/utils/users/accounts.ts
rename to shared/extra-utils/users/accounts.ts
diff --git a/shared/utils/users/blocklist.ts b/shared/extra-utils/users/blocklist.ts
similarity index 100%
rename from shared/utils/users/blocklist.ts
rename to shared/extra-utils/users/blocklist.ts
diff --git a/shared/utils/users/login.ts b/shared/extra-utils/users/login.ts
similarity index 100%
rename from shared/utils/users/login.ts
rename to shared/extra-utils/users/login.ts
diff --git a/shared/utils/users/user-notifications.ts b/shared/extra-utils/users/user-notifications.ts
similarity index 100%
rename from shared/utils/users/user-notifications.ts
rename to shared/extra-utils/users/user-notifications.ts
diff --git a/shared/utils/users/user-subscriptions.ts b/shared/extra-utils/users/user-subscriptions.ts
similarity index 100%
rename from shared/utils/users/user-subscriptions.ts
rename to shared/extra-utils/users/user-subscriptions.ts
diff --git a/shared/utils/users/users.ts b/shared/extra-utils/users/users.ts
similarity index 100%
rename from shared/utils/users/users.ts
rename to shared/extra-utils/users/users.ts
diff --git a/shared/utils/videos/services.ts b/shared/extra-utils/videos/services.ts
similarity index 100%
rename from shared/utils/videos/services.ts
rename to shared/extra-utils/videos/services.ts
diff --git a/shared/utils/videos/video-abuses.ts b/shared/extra-utils/videos/video-abuses.ts
similarity index 100%
rename from shared/utils/videos/video-abuses.ts
rename to shared/extra-utils/videos/video-abuses.ts
diff --git a/shared/utils/videos/video-blacklist.ts b/shared/extra-utils/videos/video-blacklist.ts
similarity index 100%
rename from shared/utils/videos/video-blacklist.ts
rename to shared/extra-utils/videos/video-blacklist.ts
diff --git a/shared/utils/videos/video-captions.ts b/shared/extra-utils/videos/video-captions.ts
similarity index 100%
rename from shared/utils/videos/video-captions.ts
rename to shared/extra-utils/videos/video-captions.ts
diff --git a/shared/utils/videos/video-change-ownership.ts b/shared/extra-utils/videos/video-change-ownership.ts
similarity index 100%
rename from shared/utils/videos/video-change-ownership.ts
rename to shared/extra-utils/videos/video-change-ownership.ts
diff --git a/shared/utils/videos/video-channels.ts b/shared/extra-utils/videos/video-channels.ts
similarity index 100%
rename from shared/utils/videos/video-channels.ts
rename to shared/extra-utils/videos/video-channels.ts
diff --git a/shared/utils/videos/video-comments.ts b/shared/extra-utils/videos/video-comments.ts
similarity index 100%
rename from shared/utils/videos/video-comments.ts
rename to shared/extra-utils/videos/video-comments.ts
diff --git a/shared/utils/videos/video-history.ts b/shared/extra-utils/videos/video-history.ts
similarity index 100%
rename from shared/utils/videos/video-history.ts
rename to shared/extra-utils/videos/video-history.ts
diff --git a/shared/utils/videos/video-imports.ts b/shared/extra-utils/videos/video-imports.ts
similarity index 100%
rename from shared/utils/videos/video-imports.ts
rename to shared/extra-utils/videos/video-imports.ts
diff --git a/shared/utils/videos/video-playlists.ts b/shared/extra-utils/videos/video-playlists.ts
similarity index 100%
rename from shared/utils/videos/video-playlists.ts
rename to shared/extra-utils/videos/video-playlists.ts
diff --git a/shared/utils/videos/video-streaming-playlists.ts b/shared/extra-utils/videos/video-streaming-playlists.ts
similarity index 100%
rename from shared/utils/videos/video-streaming-playlists.ts
rename to shared/extra-utils/videos/video-streaming-playlists.ts
diff --git a/shared/utils/videos/videos.ts b/shared/extra-utils/videos/videos.ts
similarity index 100%
rename from shared/utils/videos/videos.ts
rename to shared/extra-utils/videos/videos.ts