aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-12-17 09:29:23 +0100
committerChocobozzz <me@florianbigard.com>2021-12-17 09:29:23 +0100
commitbf54587a3e2ad9c2c186828f2a5682b91ee2cc00 (patch)
tree54b40aaf01bae210632473285c3c7571d51e4f89
parent6b5f72beda96d8b7e4d6329c4001827334de27dd (diff)
downloadPeerTube-bf54587a3e2ad9c2c186828f2a5682b91ee2cc00.tar.gz
PeerTube-bf54587a3e2ad9c2c186828f2a5682b91ee2cc00.tar.zst
PeerTube-bf54587a3e2ad9c2c186828f2a5682b91ee2cc00.zip
shared/ typescript types dir server-commands
-rw-r--r--scripts/benchmark.ts2
-rwxr-xr-xscripts/generate-code-contributors.ts2
-rw-r--r--server/tests/api/activitypub/cleaner.ts2
-rw-r--r--server/tests/api/activitypub/client.ts2
-rw-r--r--server/tests/api/activitypub/fetch.ts2
-rw-r--r--server/tests/api/activitypub/helpers.ts2
-rw-r--r--server/tests/api/activitypub/refresher.ts2
-rw-r--r--server/tests/api/activitypub/security.ts2
-rw-r--r--server/tests/api/check-params/abuses.ts2
-rw-r--r--server/tests/api/check-params/accounts.ts2
-rw-r--r--server/tests/api/check-params/blocklist.ts2
-rw-r--r--server/tests/api/check-params/bulk.ts2
-rw-r--r--server/tests/api/check-params/config.ts2
-rw-r--r--server/tests/api/check-params/contact-form.ts10
-rw-r--r--server/tests/api/check-params/custom-pages.ts2
-rw-r--r--server/tests/api/check-params/debug.ts2
-rw-r--r--server/tests/api/check-params/follows.ts2
-rw-r--r--server/tests/api/check-params/jobs.ts2
-rw-r--r--server/tests/api/check-params/live.ts2
-rw-r--r--server/tests/api/check-params/logs.ts2
-rw-r--r--server/tests/api/check-params/my-user.ts2
-rw-r--r--server/tests/api/check-params/plugins.ts2
-rw-r--r--server/tests/api/check-params/redundancy.ts2
-rw-r--r--server/tests/api/check-params/search.ts2
-rw-r--r--server/tests/api/check-params/services.ts2
-rw-r--r--server/tests/api/check-params/transcoding.ts2
-rw-r--r--server/tests/api/check-params/upload-quota.ts2
-rw-r--r--server/tests/api/check-params/user-notifications.ts2
-rw-r--r--server/tests/api/check-params/user-subscriptions.ts2
-rw-r--r--server/tests/api/check-params/users-admin.ts2
-rw-r--r--server/tests/api/check-params/users.ts2
-rw-r--r--server/tests/api/check-params/video-blacklist.ts2
-rw-r--r--server/tests/api/check-params/video-captions.ts2
-rw-r--r--server/tests/api/check-params/video-channels.ts2
-rw-r--r--server/tests/api/check-params/video-comments.ts2
-rw-r--r--server/tests/api/check-params/video-files.ts2
-rw-r--r--server/tests/api/check-params/video-imports.ts2
-rw-r--r--server/tests/api/check-params/video-playlists.ts2
-rw-r--r--server/tests/api/check-params/videos-common-filters.ts2
-rw-r--r--server/tests/api/check-params/videos-history.ts2
-rw-r--r--server/tests/api/check-params/videos-overviews.ts2
-rw-r--r--server/tests/api/check-params/videos.ts2
-rw-r--r--server/tests/api/live/live-constraints.ts2
-rw-r--r--server/tests/api/live/live-permanent.ts2
-rw-r--r--server/tests/api/live/live-rtmps.ts2
-rw-r--r--server/tests/api/live/live-save-replay.ts2
-rw-r--r--server/tests/api/live/live-socket-messages.ts2
-rw-r--r--server/tests/api/live/live-views.ts2
-rw-r--r--server/tests/api/live/live.ts2
-rw-r--r--server/tests/api/moderation/abuses.ts2
-rw-r--r--server/tests/api/moderation/blocklist-notification.ts2
-rw-r--r--server/tests/api/moderation/blocklist.ts2
-rw-r--r--server/tests/api/moderation/video-blacklist.ts2
-rw-r--r--server/tests/api/notifications/admin-notifications.ts2
-rw-r--r--server/tests/api/notifications/comments-notifications.ts2
-rw-r--r--server/tests/api/notifications/moderation-notifications.ts2
-rw-r--r--server/tests/api/notifications/notifications-api.ts2
-rw-r--r--server/tests/api/notifications/user-notifications.ts2
-rw-r--r--server/tests/api/object-storage/live.ts2
-rw-r--r--server/tests/api/object-storage/video-imports.ts2
-rw-r--r--server/tests/api/object-storage/videos.ts2
-rw-r--r--server/tests/api/redundancy/manage-redundancy.ts2
-rw-r--r--server/tests/api/redundancy/redundancy-constraints.ts2
-rw-r--r--server/tests/api/redundancy/redundancy.ts2
-rw-r--r--server/tests/api/search/search-activitypub-video-channels.ts2
-rw-r--r--server/tests/api/search/search-activitypub-video-playlists.ts2
-rw-r--r--server/tests/api/search/search-activitypub-videos.ts2
-rw-r--r--server/tests/api/search/search-channels.ts2
-rw-r--r--server/tests/api/search/search-index.ts2
-rw-r--r--server/tests/api/search/search-playlists.ts2
-rw-r--r--server/tests/api/search/search-videos.ts2
-rw-r--r--server/tests/api/server/auto-follows.ts2
-rw-r--r--server/tests/api/server/bulk.ts2
-rw-r--r--server/tests/api/server/config-defaults.ts2
-rw-r--r--server/tests/api/server/config.ts2
-rw-r--r--server/tests/api/server/contact-form.ts2
-rw-r--r--server/tests/api/server/email.ts2
-rw-r--r--server/tests/api/server/follow-constraints.ts2
-rw-r--r--server/tests/api/server/follows-moderation.ts2
-rw-r--r--server/tests/api/server/follows.ts2
-rw-r--r--server/tests/api/server/handle-down.ts2
-rw-r--r--server/tests/api/server/homepage.ts2
-rw-r--r--server/tests/api/server/jobs.ts2
-rw-r--r--server/tests/api/server/logs.ts2
-rw-r--r--server/tests/api/server/no-client.ts2
-rw-r--r--server/tests/api/server/plugins.ts2
-rw-r--r--server/tests/api/server/proxy.ts4
-rw-r--r--server/tests/api/server/reverse-proxy.ts2
-rw-r--r--server/tests/api/server/services.ts2
-rw-r--r--server/tests/api/server/slow-follows.ts2
-rw-r--r--server/tests/api/server/stats.ts2
-rw-r--r--server/tests/api/server/tracker.ts2
-rw-r--r--server/tests/api/users/user-subscriptions.ts2
-rw-r--r--server/tests/api/users/users-multiple-servers.ts2
-rw-r--r--server/tests/api/users/users-verification.ts2
-rw-r--r--server/tests/api/users/users.ts2
-rw-r--r--server/tests/api/videos/audio-only.ts2
-rw-r--r--server/tests/api/videos/multiple-servers.ts2
-rw-r--r--server/tests/api/videos/resumable-upload.ts2
-rw-r--r--server/tests/api/videos/single-server.ts2
-rw-r--r--server/tests/api/videos/video-captions.ts2
-rw-r--r--server/tests/api/videos/video-change-ownership.ts2
-rw-r--r--server/tests/api/videos/video-channels.ts2
-rw-r--r--server/tests/api/videos/video-comments.ts2
-rw-r--r--server/tests/api/videos/video-create-transcoding.ts2
-rw-r--r--server/tests/api/videos/video-description.ts2
-rw-r--r--server/tests/api/videos/video-files.ts2
-rw-r--r--server/tests/api/videos/video-hls.ts2
-rw-r--r--server/tests/api/videos/video-imports.ts2
-rw-r--r--server/tests/api/videos/video-nsfw.ts2
-rw-r--r--server/tests/api/videos/video-playlist-thumbnails.ts2
-rw-r--r--server/tests/api/videos/video-playlists.ts2
-rw-r--r--server/tests/api/videos/video-privacy.ts2
-rw-r--r--server/tests/api/videos/video-schedule-update.ts2
-rw-r--r--server/tests/api/videos/video-transcoder.ts2
-rw-r--r--server/tests/api/videos/videos-common-filters.ts2
-rw-r--r--server/tests/api/videos/videos-history.ts2
-rw-r--r--server/tests/api/videos/videos-overview.ts2
-rw-r--r--server/tests/api/videos/videos-views-cleaner.ts2
-rw-r--r--server/tests/cli/create-import-video-file-job.ts2
-rw-r--r--server/tests/cli/create-move-video-storage-job.ts2
-rw-r--r--server/tests/cli/create-transcoding-job.ts2
-rw-r--r--server/tests/cli/peertube.ts2
-rw-r--r--server/tests/cli/plugins.ts2
-rw-r--r--server/tests/cli/print-transcode-command.ts2
-rw-r--r--server/tests/cli/prune-storage.ts2
-rw-r--r--server/tests/cli/regenerate-thumbnails.ts2
-rw-r--r--server/tests/cli/reset-password.ts2
-rw-r--r--server/tests/cli/update-host.ts2
-rw-r--r--server/tests/client.ts2
-rw-r--r--server/tests/external-plugins/auth-ldap.ts2
-rw-r--r--server/tests/external-plugins/auto-block-videos.ts2
-rw-r--r--server/tests/external-plugins/auto-mute.ts2
-rw-r--r--server/tests/feeds/feeds.ts2
-rw-r--r--server/tests/helpers/image.ts2
-rw-r--r--server/tests/helpers/request.ts4
-rw-r--r--server/tests/misc-endpoints.ts2
-rw-r--r--server/tests/plugins/action-hooks.ts2
-rw-r--r--server/tests/plugins/external-auth.ts2
-rw-r--r--server/tests/plugins/filter-hooks.ts2
-rw-r--r--server/tests/plugins/html-injection.ts2
-rw-r--r--server/tests/plugins/id-and-pass-auth.ts2
-rw-r--r--server/tests/plugins/plugin-helpers.ts2
-rw-r--r--server/tests/plugins/plugin-router.ts2
-rw-r--r--server/tests/plugins/plugin-storage.ts2
-rw-r--r--server/tests/plugins/plugin-transcoding.ts2
-rw-r--r--server/tests/plugins/plugin-unloading.ts2
-rw-r--r--server/tests/plugins/translations.ts2
-rw-r--r--server/tests/plugins/video-constants.ts2
-rw-r--r--server/tests/shared/video.ts2
-rw-r--r--server/tools/cli.ts2
-rw-r--r--server/tools/peertube-import-videos.ts2
-rw-r--r--shared/extra-utils/index.ts16
-rw-r--r--shared/server-commands/bulk/bulk-command.ts (renamed from shared/extra-utils/bulk/bulk-command.ts)0
-rw-r--r--shared/server-commands/bulk/index.ts (renamed from shared/extra-utils/bulk/index.ts)0
-rw-r--r--shared/server-commands/cli/cli-command.ts (renamed from shared/extra-utils/cli/cli-command.ts)0
-rw-r--r--shared/server-commands/cli/index.ts (renamed from shared/extra-utils/cli/index.ts)0
-rw-r--r--shared/server-commands/custom-pages/custom-pages-command.ts (renamed from shared/extra-utils/custom-pages/custom-pages-command.ts)0
-rw-r--r--shared/server-commands/custom-pages/index.ts (renamed from shared/extra-utils/custom-pages/index.ts)0
-rw-r--r--shared/server-commands/feeds/feeds-command.ts (renamed from shared/extra-utils/feeds/feeds-command.ts)0
-rw-r--r--shared/server-commands/feeds/index.ts (renamed from shared/extra-utils/feeds/index.ts)0
-rw-r--r--shared/server-commands/index.ts15
-rw-r--r--shared/server-commands/logs/index.ts (renamed from shared/extra-utils/logs/index.ts)0
-rw-r--r--shared/server-commands/logs/logs-command.ts (renamed from shared/extra-utils/logs/logs-command.ts)0
-rw-r--r--shared/server-commands/miscs/checks.ts (renamed from shared/extra-utils/miscs/checks.ts)0
-rw-r--r--shared/server-commands/miscs/generate.ts (renamed from shared/extra-utils/miscs/generate.ts)0
-rw-r--r--shared/server-commands/miscs/index.ts (renamed from shared/extra-utils/miscs/index.ts)0
-rw-r--r--shared/server-commands/miscs/sql-command.ts (renamed from shared/extra-utils/miscs/sql-command.ts)0
-rw-r--r--shared/server-commands/miscs/tests.ts (renamed from shared/extra-utils/miscs/tests.ts)0
-rw-r--r--shared/server-commands/miscs/webtorrent.ts (renamed from shared/extra-utils/miscs/webtorrent.ts)0
-rw-r--r--shared/server-commands/mock-servers/index.ts (renamed from shared/extra-utils/mock-servers/index.ts)0
-rw-r--r--shared/server-commands/mock-servers/mock-429.ts (renamed from shared/extra-utils/mock-servers/mock-429.ts)0
-rw-r--r--shared/server-commands/mock-servers/mock-email.ts (renamed from shared/extra-utils/mock-servers/mock-email.ts)0
-rw-r--r--shared/server-commands/mock-servers/mock-instances-index.ts (renamed from shared/extra-utils/mock-servers/mock-instances-index.ts)0
-rw-r--r--shared/server-commands/mock-servers/mock-joinpeertube-versions.ts (renamed from shared/extra-utils/mock-servers/mock-joinpeertube-versions.ts)0
-rw-r--r--shared/server-commands/mock-servers/mock-object-storage.ts (renamed from shared/extra-utils/mock-servers/mock-object-storage.ts)0
-rw-r--r--shared/server-commands/mock-servers/mock-plugin-blocklist.ts (renamed from shared/extra-utils/mock-servers/mock-plugin-blocklist.ts)0
-rw-r--r--shared/server-commands/mock-servers/mock-proxy.ts (renamed from shared/extra-utils/mock-servers/mock-proxy.ts)0
-rw-r--r--shared/server-commands/mock-servers/utils.ts (renamed from shared/extra-utils/mock-servers/utils.ts)0
-rw-r--r--shared/server-commands/moderation/abuses-command.ts (renamed from shared/extra-utils/moderation/abuses-command.ts)0
-rw-r--r--shared/server-commands/moderation/index.ts (renamed from shared/extra-utils/moderation/index.ts)0
-rw-r--r--shared/server-commands/overviews/index.ts (renamed from shared/extra-utils/overviews/index.ts)0
-rw-r--r--shared/server-commands/overviews/overviews-command.ts (renamed from shared/extra-utils/overviews/overviews-command.ts)0
-rw-r--r--shared/server-commands/requests/check-api-params.ts (renamed from shared/extra-utils/requests/check-api-params.ts)0
-rw-r--r--shared/server-commands/requests/index.ts (renamed from shared/extra-utils/requests/index.ts)0
-rw-r--r--shared/server-commands/requests/requests.ts (renamed from shared/extra-utils/requests/requests.ts)0
-rw-r--r--shared/server-commands/search/index.ts (renamed from shared/extra-utils/search/index.ts)0
-rw-r--r--shared/server-commands/search/search-command.ts (renamed from shared/extra-utils/search/search-command.ts)0
-rw-r--r--shared/server-commands/server/config-command.ts (renamed from shared/extra-utils/server/config-command.ts)0
-rw-r--r--shared/server-commands/server/contact-form-command.ts (renamed from shared/extra-utils/server/contact-form-command.ts)0
-rw-r--r--shared/server-commands/server/debug-command.ts (renamed from shared/extra-utils/server/debug-command.ts)0
-rw-r--r--shared/server-commands/server/directories.ts (renamed from shared/extra-utils/server/directories.ts)0
-rw-r--r--shared/server-commands/server/follows-command.ts (renamed from shared/extra-utils/server/follows-command.ts)0
-rw-r--r--shared/server-commands/server/follows.ts (renamed from shared/extra-utils/server/follows.ts)0
-rw-r--r--shared/server-commands/server/index.ts (renamed from shared/extra-utils/server/index.ts)0
-rw-r--r--shared/server-commands/server/jobs-command.ts (renamed from shared/extra-utils/server/jobs-command.ts)0
-rw-r--r--shared/server-commands/server/jobs.ts (renamed from shared/extra-utils/server/jobs.ts)0
-rw-r--r--shared/server-commands/server/object-storage-command.ts (renamed from shared/extra-utils/server/object-storage-command.ts)0
-rw-r--r--shared/server-commands/server/plugins-command.ts (renamed from shared/extra-utils/server/plugins-command.ts)0
-rw-r--r--shared/server-commands/server/plugins.ts (renamed from shared/extra-utils/server/plugins.ts)2
-rw-r--r--shared/server-commands/server/redundancy-command.ts (renamed from shared/extra-utils/server/redundancy-command.ts)0
-rw-r--r--shared/server-commands/server/server.ts (renamed from shared/extra-utils/server/server.ts)0
-rw-r--r--shared/server-commands/server/servers-command.ts (renamed from shared/extra-utils/server/servers-command.ts)0
-rw-r--r--shared/server-commands/server/servers.ts (renamed from shared/extra-utils/server/servers.ts)0
-rw-r--r--shared/server-commands/server/stats-command.ts (renamed from shared/extra-utils/server/stats-command.ts)0
-rw-r--r--shared/server-commands/server/tracker.ts (renamed from shared/extra-utils/server/tracker.ts)0
-rw-r--r--shared/server-commands/shared/abstract-command.ts (renamed from shared/extra-utils/shared/abstract-command.ts)0
-rw-r--r--shared/server-commands/shared/index.ts (renamed from shared/extra-utils/shared/index.ts)0
-rw-r--r--shared/server-commands/socket/index.ts (renamed from shared/extra-utils/socket/index.ts)0
-rw-r--r--shared/server-commands/socket/socket-io-command.ts (renamed from shared/extra-utils/socket/socket-io-command.ts)0
-rw-r--r--shared/server-commands/users/accounts-command.ts (renamed from shared/extra-utils/users/accounts-command.ts)0
-rw-r--r--shared/server-commands/users/actors.ts (renamed from shared/extra-utils/users/actors.ts)0
-rw-r--r--shared/server-commands/users/blocklist-command.ts (renamed from shared/extra-utils/users/blocklist-command.ts)0
-rw-r--r--shared/server-commands/users/index.ts (renamed from shared/extra-utils/users/index.ts)0
-rw-r--r--shared/server-commands/users/login-command.ts (renamed from shared/extra-utils/users/login-command.ts)0
-rw-r--r--shared/server-commands/users/login.ts (renamed from shared/extra-utils/users/login.ts)0
-rw-r--r--shared/server-commands/users/notifications-command.ts (renamed from shared/extra-utils/users/notifications-command.ts)0
-rw-r--r--shared/server-commands/users/notifications.ts (renamed from shared/extra-utils/users/notifications.ts)0
-rw-r--r--shared/server-commands/users/subscriptions-command.ts (renamed from shared/extra-utils/users/subscriptions-command.ts)0
-rw-r--r--shared/server-commands/users/users-command.ts (renamed from shared/extra-utils/users/users-command.ts)0
-rw-r--r--shared/server-commands/videos/blacklist-command.ts (renamed from shared/extra-utils/videos/blacklist-command.ts)0
-rw-r--r--shared/server-commands/videos/captions-command.ts (renamed from shared/extra-utils/videos/captions-command.ts)0
-rw-r--r--shared/server-commands/videos/captions.ts (renamed from shared/extra-utils/videos/captions.ts)0
-rw-r--r--shared/server-commands/videos/change-ownership-command.ts (renamed from shared/extra-utils/videos/change-ownership-command.ts)0
-rw-r--r--shared/server-commands/videos/channels-command.ts (renamed from shared/extra-utils/videos/channels-command.ts)0
-rw-r--r--shared/server-commands/videos/channels.ts (renamed from shared/extra-utils/videos/channels.ts)0
-rw-r--r--shared/server-commands/videos/comments-command.ts (renamed from shared/extra-utils/videos/comments-command.ts)0
-rw-r--r--shared/server-commands/videos/history-command.ts (renamed from shared/extra-utils/videos/history-command.ts)0
-rw-r--r--shared/server-commands/videos/imports-command.ts (renamed from shared/extra-utils/videos/imports-command.ts)0
-rw-r--r--shared/server-commands/videos/index.ts (renamed from shared/extra-utils/videos/index.ts)0
-rw-r--r--shared/server-commands/videos/live-command.ts (renamed from shared/extra-utils/videos/live-command.ts)0
-rw-r--r--shared/server-commands/videos/live.ts (renamed from shared/extra-utils/videos/live.ts)0
-rw-r--r--shared/server-commands/videos/playlists-command.ts (renamed from shared/extra-utils/videos/playlists-command.ts)0
-rw-r--r--shared/server-commands/videos/playlists.ts (renamed from shared/extra-utils/videos/playlists.ts)0
-rw-r--r--shared/server-commands/videos/services-command.ts (renamed from shared/extra-utils/videos/services-command.ts)0
-rw-r--r--shared/server-commands/videos/streaming-playlists-command.ts (renamed from shared/extra-utils/videos/streaming-playlists-command.ts)0
-rw-r--r--shared/server-commands/videos/streaming-playlists.ts (renamed from shared/extra-utils/videos/streaming-playlists.ts)0
-rw-r--r--shared/server-commands/videos/videos-command.ts (renamed from shared/extra-utils/videos/videos-command.ts)0
-rw-r--r--shared/server-commands/videos/videos.ts (renamed from shared/extra-utils/videos/videos.ts)0
-rw-r--r--shared/tsconfig.types.json5
-rw-r--r--shared/typescript-utils/index.ts1
-rw-r--r--shared/typescript-utils/types.ts45
242 files changed, 228 insertions, 172 deletions
diff --git a/scripts/benchmark.ts b/scripts/benchmark.ts
index 788318313..011519fe3 100644
--- a/scripts/benchmark.ts
+++ b/scripts/benchmark.ts
@@ -3,7 +3,7 @@ registerTSPaths()
3 3
4import autocannon, { printResult } from 'autocannon' 4import autocannon, { printResult } from 'autocannon'
5import { writeJson } from 'fs-extra' 5import { writeJson } from 'fs-extra'
6import { createSingleServer, killallServers, PeerTubeServer, setAccessTokensToServers } from '@shared/extra-utils' 6import { createSingleServer, killallServers, PeerTubeServer, setAccessTokensToServers } from '@shared/server-commands'
7import { Video, VideoPrivacy } from '@shared/models' 7import { Video, VideoPrivacy } from '@shared/models'
8 8
9let server: PeerTubeServer 9let server: PeerTubeServer
diff --git a/scripts/generate-code-contributors.ts b/scripts/generate-code-contributors.ts
index 70b33c0d3..449407c44 100755
--- a/scripts/generate-code-contributors.ts
+++ b/scripts/generate-code-contributors.ts
@@ -1,7 +1,7 @@
1import { registerTSPaths } from '../server/helpers/register-ts-paths' 1import { registerTSPaths } from '../server/helpers/register-ts-paths'
2registerTSPaths() 2registerTSPaths()
3 3
4import { CLICommand } from '@shared/extra-utils' 4import { CLICommand } from '@shared/server-commands'
5 5
6run() 6run()
7 .then(() => process.exit(0)) 7 .then(() => process.exit(0))
diff --git a/server/tests/api/activitypub/cleaner.ts b/server/tests/api/activitypub/cleaner.ts
index 51cf6e599..c3368c7eb 100644
--- a/server/tests/api/activitypub/cleaner.ts
+++ b/server/tests/api/activitypub/cleaner.ts
@@ -10,7 +10,7 @@ import {
10 setAccessTokensToServers, 10 setAccessTokensToServers,
11 wait, 11 wait,
12 waitJobs 12 waitJobs
13} from '@shared/extra-utils' 13} from '@shared/server-commands'
14 14
15const expect = chai.expect 15const expect = chai.expect
16 16
diff --git a/server/tests/api/activitypub/client.ts b/server/tests/api/activitypub/client.ts
index c3e4b7f74..e69ab3cb9 100644
--- a/server/tests/api/activitypub/client.ts
+++ b/server/tests/api/activitypub/client.ts
@@ -10,7 +10,7 @@ import {
10 PeerTubeServer, 10 PeerTubeServer,
11 setAccessTokensToServers, 11 setAccessTokensToServers,
12 setDefaultVideoChannel 12 setDefaultVideoChannel
13} from '@shared/extra-utils' 13} from '@shared/server-commands'
14import { HttpStatusCode, VideoPlaylistPrivacy } from '@shared/models' 14import { HttpStatusCode, VideoPlaylistPrivacy } from '@shared/models'
15 15
16const expect = chai.expect 16const expect = chai.expect
diff --git a/server/tests/api/activitypub/fetch.ts b/server/tests/api/activitypub/fetch.ts
index 422a75d6e..93bf01842 100644
--- a/server/tests/api/activitypub/fetch.ts
+++ b/server/tests/api/activitypub/fetch.ts
@@ -2,7 +2,7 @@
2 2
3import 'mocha' 3import 'mocha'
4import * as chai from 'chai' 4import * as chai from 'chai'
5import { cleanupTests, createMultipleServers, doubleFollow, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/extra-utils' 5import { cleanupTests, createMultipleServers, doubleFollow, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/server-commands'
6 6
7const expect = chai.expect 7const expect = chai.expect
8 8
diff --git a/server/tests/api/activitypub/helpers.ts b/server/tests/api/activitypub/helpers.ts
index 57b1cab23..5aa94af5d 100644
--- a/server/tests/api/activitypub/helpers.ts
+++ b/server/tests/api/activitypub/helpers.ts
@@ -3,7 +3,7 @@
3import 'mocha' 3import 'mocha'
4import { expect } from 'chai' 4import { expect } from 'chai'
5import { cloneDeep } from 'lodash' 5import { cloneDeep } from 'lodash'
6import { buildAbsoluteFixturePath, buildRequestStub } from '@shared/extra-utils' 6import { buildAbsoluteFixturePath, buildRequestStub } from '@shared/server-commands'
7import { buildSignedActivity } from '../../../helpers/activitypub' 7import { buildSignedActivity } from '../../../helpers/activitypub'
8import { isHTTPSignatureVerified, isJsonLDSignatureVerified, parseHTTPSignature } from '../../../helpers/peertube-crypto' 8import { isHTTPSignatureVerified, isJsonLDSignatureVerified, parseHTTPSignature } from '../../../helpers/peertube-crypto'
9 9
diff --git a/server/tests/api/activitypub/refresher.ts b/server/tests/api/activitypub/refresher.ts
index 81fee0044..669a86fca 100644
--- a/server/tests/api/activitypub/refresher.ts
+++ b/server/tests/api/activitypub/refresher.ts
@@ -11,7 +11,7 @@ import {
11 setDefaultVideoChannel, 11 setDefaultVideoChannel,
12 wait, 12 wait,
13 waitJobs 13 waitJobs
14} from '@shared/extra-utils' 14} from '@shared/server-commands'
15import { HttpStatusCode, VideoPlaylistPrivacy } from '@shared/models' 15import { HttpStatusCode, VideoPlaylistPrivacy } from '@shared/models'
16 16
17describe('Test AP refresher', function () { 17describe('Test AP refresher', function () {
diff --git a/server/tests/api/activitypub/security.ts b/server/tests/api/activitypub/security.ts
index 2700cff13..3b871ae12 100644
--- a/server/tests/api/activitypub/security.ts
+++ b/server/tests/api/activitypub/security.ts
@@ -6,7 +6,7 @@ import { activityPubContextify, buildSignedActivity } from '@server/helpers/acti
6import { buildDigest } from '@server/helpers/peertube-crypto' 6import { buildDigest } from '@server/helpers/peertube-crypto'
7import { HTTP_SIGNATURE } from '@server/initializers/constants' 7import { HTTP_SIGNATURE } from '@server/initializers/constants'
8import { buildGlobalHeaders } from '@server/lib/job-queue/handlers/utils/activitypub-http-utils' 8import { buildGlobalHeaders } from '@server/lib/job-queue/handlers/utils/activitypub-http-utils'
9import { buildAbsoluteFixturePath, cleanupTests, createMultipleServers, killallServers, PeerTubeServer, wait } from '@shared/extra-utils' 9import { buildAbsoluteFixturePath, cleanupTests, createMultipleServers, killallServers, PeerTubeServer, wait } from '@shared/server-commands'
10import { makeFollowRequest, makePOSTAPRequest } from '@server/tests/shared' 10import { makeFollowRequest, makePOSTAPRequest } from '@server/tests/shared'
11import { HttpStatusCode } from '@shared/models' 11import { HttpStatusCode } from '@shared/models'
12 12
diff --git a/server/tests/api/check-params/abuses.ts b/server/tests/api/check-params/abuses.ts
index fb9a5fd8b..58167cbab 100644
--- a/server/tests/api/check-params/abuses.ts
+++ b/server/tests/api/check-params/abuses.ts
@@ -14,7 +14,7 @@ import {
14 PeerTubeServer, 14 PeerTubeServer,
15 setAccessTokensToServers, 15 setAccessTokensToServers,
16 waitJobs 16 waitJobs
17} from '@shared/extra-utils' 17} from '@shared/server-commands'
18import { AbuseCreate, AbuseState, HttpStatusCode } from '@shared/models' 18import { AbuseCreate, AbuseState, HttpStatusCode } from '@shared/models'
19 19
20describe('Test abuses API validators', function () { 20describe('Test abuses API validators', function () {
diff --git a/server/tests/api/check-params/accounts.ts b/server/tests/api/check-params/accounts.ts
index 141d869b7..fc8e63ed4 100644
--- a/server/tests/api/check-params/accounts.ts
+++ b/server/tests/api/check-params/accounts.ts
@@ -8,7 +8,7 @@ import {
8 cleanupTests, 8 cleanupTests,
9 createSingleServer, 9 createSingleServer,
10 PeerTubeServer 10 PeerTubeServer
11} from '@shared/extra-utils' 11} from '@shared/server-commands'
12import { HttpStatusCode } from '@shared/models' 12import { HttpStatusCode } from '@shared/models'
13 13
14describe('Test accounts API validators', function () { 14describe('Test accounts API validators', function () {
diff --git a/server/tests/api/check-params/blocklist.ts b/server/tests/api/check-params/blocklist.ts
index f72a892e2..2dc3a166d 100644
--- a/server/tests/api/check-params/blocklist.ts
+++ b/server/tests/api/check-params/blocklist.ts
@@ -13,7 +13,7 @@ import {
13 makePostBodyRequest, 13 makePostBodyRequest,
14 PeerTubeServer, 14 PeerTubeServer,
15 setAccessTokensToServers 15 setAccessTokensToServers
16} from '@shared/extra-utils' 16} from '@shared/server-commands'
17import { HttpStatusCode } from '@shared/models' 17import { HttpStatusCode } from '@shared/models'
18 18
19describe('Test blocklist API validators', function () { 19describe('Test blocklist API validators', function () {
diff --git a/server/tests/api/check-params/bulk.ts b/server/tests/api/check-params/bulk.ts
index bc9d7784d..9bd0016cf 100644
--- a/server/tests/api/check-params/bulk.ts
+++ b/server/tests/api/check-params/bulk.ts
@@ -1,7 +1,7 @@
1/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ 1/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
2 2
3import 'mocha' 3import 'mocha'
4import { cleanupTests, createSingleServer, makePostBodyRequest, PeerTubeServer, setAccessTokensToServers } from '@shared/extra-utils' 4import { cleanupTests, createSingleServer, makePostBodyRequest, PeerTubeServer, setAccessTokensToServers } from '@shared/server-commands'
5import { HttpStatusCode } from '@shared/models' 5import { HttpStatusCode } from '@shared/models'
6 6
7describe('Test bulk API validators', function () { 7describe('Test bulk API validators', function () {
diff --git a/server/tests/api/check-params/config.ts b/server/tests/api/check-params/config.ts
index a6e87730a..3cccb612a 100644
--- a/server/tests/api/check-params/config.ts
+++ b/server/tests/api/check-params/config.ts
@@ -10,7 +10,7 @@ import {
10 makePutBodyRequest, 10 makePutBodyRequest,
11 PeerTubeServer, 11 PeerTubeServer,
12 setAccessTokensToServers 12 setAccessTokensToServers
13} from '@shared/extra-utils' 13} from '@shared/server-commands'
14import { CustomConfig, HttpStatusCode } from '@shared/models' 14import { CustomConfig, HttpStatusCode } from '@shared/models'
15 15
16describe('Test config API validators', function () { 16describe('Test config API validators', function () {
diff --git a/server/tests/api/check-params/contact-form.ts b/server/tests/api/check-params/contact-form.ts
index 9f86fecc6..a2e51e14d 100644
--- a/server/tests/api/check-params/contact-form.ts
+++ b/server/tests/api/check-params/contact-form.ts
@@ -1,9 +1,15 @@
1/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ 1/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
2 2
3import 'mocha' 3import 'mocha'
4import { cleanupTests, createSingleServer, killallServers, MockSmtpServer, PeerTubeServer } from '@shared/extra-utils'
5import { ContactFormCommand } from '@shared/extra-utils/server'
6import { HttpStatusCode } from '@shared/models' 4import { HttpStatusCode } from '@shared/models'
5import {
6 cleanupTests,
7 ContactFormCommand,
8 createSingleServer,
9 killallServers,
10 MockSmtpServer,
11 PeerTubeServer
12} from '@shared/server-commands'
7 13
8describe('Test contact form API validators', function () { 14describe('Test contact form API validators', function () {
9 let server: PeerTubeServer 15 let server: PeerTubeServer
diff --git a/server/tests/api/check-params/custom-pages.ts b/server/tests/api/check-params/custom-pages.ts
index 9fbbea315..a102ee437 100644
--- a/server/tests/api/check-params/custom-pages.ts
+++ b/server/tests/api/check-params/custom-pages.ts
@@ -8,7 +8,7 @@ import {
8 makePutBodyRequest, 8 makePutBodyRequest,
9 PeerTubeServer, 9 PeerTubeServer,
10 setAccessTokensToServers 10 setAccessTokensToServers
11} from '@shared/extra-utils' 11} from '@shared/server-commands'
12import { HttpStatusCode } from '@shared/models' 12import { HttpStatusCode } from '@shared/models'
13 13
14describe('Test custom pages validators', function () { 14describe('Test custom pages validators', function () {
diff --git a/server/tests/api/check-params/debug.ts b/server/tests/api/check-params/debug.ts
index a55786359..cfa44deca 100644
--- a/server/tests/api/check-params/debug.ts
+++ b/server/tests/api/check-params/debug.ts
@@ -1,7 +1,7 @@
1/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ 1/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
2 2
3import 'mocha' 3import 'mocha'
4import { cleanupTests, createSingleServer, makeGetRequest, PeerTubeServer, setAccessTokensToServers } from '@shared/extra-utils' 4import { cleanupTests, createSingleServer, makeGetRequest, PeerTubeServer, setAccessTokensToServers } from '@shared/server-commands'
5import { HttpStatusCode } from '@shared/models' 5import { HttpStatusCode } from '@shared/models'
6 6
7describe('Test debug API validators', function () { 7describe('Test debug API validators', function () {
diff --git a/server/tests/api/check-params/follows.ts b/server/tests/api/check-params/follows.ts
index 2bc9f6b96..6121d2202 100644
--- a/server/tests/api/check-params/follows.ts
+++ b/server/tests/api/check-params/follows.ts
@@ -12,7 +12,7 @@ import {
12 makePostBodyRequest, 12 makePostBodyRequest,
13 PeerTubeServer, 13 PeerTubeServer,
14 setAccessTokensToServers 14 setAccessTokensToServers
15} from '@shared/extra-utils' 15} from '@shared/server-commands'
16import { HttpStatusCode } from '@shared/models' 16import { HttpStatusCode } from '@shared/models'
17 17
18describe('Test server follows API validators', function () { 18describe('Test server follows API validators', function () {
diff --git a/server/tests/api/check-params/jobs.ts b/server/tests/api/check-params/jobs.ts
index 23d95d8e4..b7c603755 100644
--- a/server/tests/api/check-params/jobs.ts
+++ b/server/tests/api/check-params/jobs.ts
@@ -10,7 +10,7 @@ import {
10 makeGetRequest, 10 makeGetRequest,
11 PeerTubeServer, 11 PeerTubeServer,
12 setAccessTokensToServers 12 setAccessTokensToServers
13} from '@shared/extra-utils' 13} from '@shared/server-commands'
14import { HttpStatusCode } from '@shared/models' 14import { HttpStatusCode } from '@shared/models'
15 15
16describe('Test jobs API validators', function () { 16describe('Test jobs API validators', function () {
diff --git a/server/tests/api/check-params/live.ts b/server/tests/api/check-params/live.ts
index 8e1d655d4..8b79d97e0 100644
--- a/server/tests/api/check-params/live.ts
+++ b/server/tests/api/check-params/live.ts
@@ -13,7 +13,7 @@ import {
13 sendRTMPStream, 13 sendRTMPStream,
14 setAccessTokensToServers, 14 setAccessTokensToServers,
15 stopFfmpeg 15 stopFfmpeg
16} from '@shared/extra-utils' 16} from '@shared/server-commands'
17import { HttpStatusCode, VideoCreateResult, VideoPrivacy } from '@shared/models' 17import { HttpStatusCode, VideoCreateResult, VideoPrivacy } from '@shared/models'
18 18
19describe('Test video lives API validator', function () { 19describe('Test video lives API validator', function () {
diff --git a/server/tests/api/check-params/logs.ts b/server/tests/api/check-params/logs.ts
index 05372257a..970671c15 100644
--- a/server/tests/api/check-params/logs.ts
+++ b/server/tests/api/check-params/logs.ts
@@ -1,7 +1,7 @@
1/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ 1/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
2 2
3import 'mocha' 3import 'mocha'
4import { cleanupTests, createSingleServer, makeGetRequest, PeerTubeServer, setAccessTokensToServers } from '@shared/extra-utils' 4import { cleanupTests, createSingleServer, makeGetRequest, PeerTubeServer, setAccessTokensToServers } from '@shared/server-commands'
5import { HttpStatusCode } from '@shared/models' 5import { HttpStatusCode } from '@shared/models'
6 6
7describe('Test logs API validators', function () { 7describe('Test logs API validators', function () {
diff --git a/server/tests/api/check-params/my-user.ts b/server/tests/api/check-params/my-user.ts
index d35284d60..c8ac71476 100644
--- a/server/tests/api/check-params/my-user.ts
+++ b/server/tests/api/check-params/my-user.ts
@@ -15,7 +15,7 @@ import {
15 PeerTubeServer, 15 PeerTubeServer,
16 setAccessTokensToServers, 16 setAccessTokensToServers,
17 UsersCommand 17 UsersCommand
18} from '@shared/extra-utils' 18} from '@shared/server-commands'
19import { HttpStatusCode, UserRole, VideoCreateResult } from '@shared/models' 19import { HttpStatusCode, UserRole, VideoCreateResult } from '@shared/models'
20 20
21describe('Test my user API validators', function () { 21describe('Test my user API validators', function () {
diff --git a/server/tests/api/check-params/plugins.ts b/server/tests/api/check-params/plugins.ts
index 2c436376c..79e487590 100644
--- a/server/tests/api/check-params/plugins.ts
+++ b/server/tests/api/check-params/plugins.ts
@@ -12,7 +12,7 @@ import {
12 makePutBodyRequest, 12 makePutBodyRequest,
13 PeerTubeServer, 13 PeerTubeServer,
14 setAccessTokensToServers 14 setAccessTokensToServers
15} from '@shared/extra-utils' 15} from '@shared/server-commands'
16import { HttpStatusCode, PeerTubePlugin, PluginType } from '@shared/models' 16import { HttpStatusCode, PeerTubePlugin, PluginType } from '@shared/models'
17 17
18describe('Test server plugins API validators', function () { 18describe('Test server plugins API validators', function () {
diff --git a/server/tests/api/check-params/redundancy.ts b/server/tests/api/check-params/redundancy.ts
index d9f905549..f3bfcb16c 100644
--- a/server/tests/api/check-params/redundancy.ts
+++ b/server/tests/api/check-params/redundancy.ts
@@ -15,7 +15,7 @@ import {
15 PeerTubeServer, 15 PeerTubeServer,
16 setAccessTokensToServers, 16 setAccessTokensToServers,
17 waitJobs 17 waitJobs
18} from '@shared/extra-utils' 18} from '@shared/server-commands'
19import { HttpStatusCode, VideoCreateResult } from '@shared/models' 19import { HttpStatusCode, VideoCreateResult } from '@shared/models'
20 20
21describe('Test server redundancy API validators', function () { 21describe('Test server redundancy API validators', function () {
diff --git a/server/tests/api/check-params/search.ts b/server/tests/api/check-params/search.ts
index cc15d2593..edeeed571 100644
--- a/server/tests/api/check-params/search.ts
+++ b/server/tests/api/check-params/search.ts
@@ -10,7 +10,7 @@ import {
10 makeGetRequest, 10 makeGetRequest,
11 PeerTubeServer, 11 PeerTubeServer,
12 setAccessTokensToServers 12 setAccessTokensToServers
13} from '@shared/extra-utils' 13} from '@shared/server-commands'
14import { HttpStatusCode } from '@shared/models' 14import { HttpStatusCode } from '@shared/models'
15 15
16function updateSearchIndex (server: PeerTubeServer, enabled: boolean, disableLocalSearch = false) { 16function updateSearchIndex (server: PeerTubeServer, enabled: boolean, disableLocalSearch = false) {
diff --git a/server/tests/api/check-params/services.ts b/server/tests/api/check-params/services.ts
index 8d795fabc..e63f09884 100644
--- a/server/tests/api/check-params/services.ts
+++ b/server/tests/api/check-params/services.ts
@@ -8,7 +8,7 @@ import {
8 PeerTubeServer, 8 PeerTubeServer,
9 setAccessTokensToServers, 9 setAccessTokensToServers,
10 setDefaultVideoChannel 10 setDefaultVideoChannel
11} from '@shared/extra-utils' 11} from '@shared/server-commands'
12import { HttpStatusCode, VideoPlaylistPrivacy } from '@shared/models' 12import { HttpStatusCode, VideoPlaylistPrivacy } from '@shared/models'
13 13
14describe('Test services API validators', function () { 14describe('Test services API validators', function () {
diff --git a/server/tests/api/check-params/transcoding.ts b/server/tests/api/check-params/transcoding.ts
index 6b6f73d46..11ade9071 100644
--- a/server/tests/api/check-params/transcoding.ts
+++ b/server/tests/api/check-params/transcoding.ts
@@ -1,7 +1,7 @@
1/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ 1/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
2 2
3import 'mocha' 3import 'mocha'
4import { cleanupTests, createMultipleServers, doubleFollow, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/extra-utils' 4import { cleanupTests, createMultipleServers, doubleFollow, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/server-commands'
5import { HttpStatusCode, UserRole } from '@shared/models' 5import { HttpStatusCode, UserRole } from '@shared/models'
6 6
7describe('Test transcoding API validators', function () { 7describe('Test transcoding API validators', function () {
diff --git a/server/tests/api/check-params/upload-quota.ts b/server/tests/api/check-params/upload-quota.ts
index 322e93d0d..02898bb87 100644
--- a/server/tests/api/check-params/upload-quota.ts
+++ b/server/tests/api/check-params/upload-quota.ts
@@ -12,7 +12,7 @@ import {
12 setDefaultVideoChannel, 12 setDefaultVideoChannel,
13 VideosCommand, 13 VideosCommand,
14 waitJobs 14 waitJobs
15} from '@shared/extra-utils' 15} from '@shared/server-commands'
16import { HttpStatusCode, VideoImportState, VideoPrivacy } from '@shared/models' 16import { HttpStatusCode, VideoImportState, VideoPrivacy } from '@shared/models'
17 17
18describe('Test upload quota', function () { 18describe('Test upload quota', function () {
diff --git a/server/tests/api/check-params/user-notifications.ts b/server/tests/api/check-params/user-notifications.ts
index 17edf5aa1..912d4a992 100644
--- a/server/tests/api/check-params/user-notifications.ts
+++ b/server/tests/api/check-params/user-notifications.ts
@@ -14,7 +14,7 @@ import {
14 PeerTubeServer, 14 PeerTubeServer,
15 setAccessTokensToServers, 15 setAccessTokensToServers,
16 wait 16 wait
17} from '@shared/extra-utils' 17} from '@shared/server-commands'
18import { HttpStatusCode, UserNotificationSetting, UserNotificationSettingValue } from '@shared/models' 18import { HttpStatusCode, UserNotificationSetting, UserNotificationSettingValue } from '@shared/models'
19 19
20describe('Test user notifications API validators', function () { 20describe('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 624069c80..95226dff5 100644
--- a/server/tests/api/check-params/user-subscriptions.ts
+++ b/server/tests/api/check-params/user-subscriptions.ts
@@ -13,7 +13,7 @@ import {
13 PeerTubeServer, 13 PeerTubeServer,
14 setAccessTokensToServers, 14 setAccessTokensToServers,
15 waitJobs 15 waitJobs
16} from '@shared/extra-utils' 16} from '@shared/server-commands'
17import { HttpStatusCode } from '@shared/models' 17import { HttpStatusCode } from '@shared/models'
18 18
19describe('Test user subscriptions API validators', function () { 19describe('Test user subscriptions API validators', function () {
diff --git a/server/tests/api/check-params/users-admin.ts b/server/tests/api/check-params/users-admin.ts
index f71414a6b..c98b5e189 100644
--- a/server/tests/api/check-params/users-admin.ts
+++ b/server/tests/api/check-params/users-admin.ts
@@ -15,7 +15,7 @@ import {
15 MockSmtpServer, 15 MockSmtpServer,
16 PeerTubeServer, 16 PeerTubeServer,
17 setAccessTokensToServers 17 setAccessTokensToServers
18} from '@shared/extra-utils' 18} from '@shared/server-commands'
19import { HttpStatusCode, UserAdminFlag, UserRole } from '@shared/models' 19import { HttpStatusCode, UserAdminFlag, UserRole } from '@shared/models'
20 20
21describe('Test users admin API validators', function () { 21describe('Test users admin API validators', function () {
diff --git a/server/tests/api/check-params/users.ts b/server/tests/api/check-params/users.ts
index 5f9cbc5eb..254177afd 100644
--- a/server/tests/api/check-params/users.ts
+++ b/server/tests/api/check-params/users.ts
@@ -9,7 +9,7 @@ import {
9 MockSmtpServer, 9 MockSmtpServer,
10 PeerTubeServer, 10 PeerTubeServer,
11 setAccessTokensToServers 11 setAccessTokensToServers
12} from '@shared/extra-utils' 12} from '@shared/server-commands'
13import { HttpStatusCode, UserRole } from '@shared/models' 13import { HttpStatusCode, UserRole } from '@shared/models'
14 14
15describe('Test users API validators', function () { 15describe('Test users API validators', function () {
diff --git a/server/tests/api/check-params/video-blacklist.ts b/server/tests/api/check-params/video-blacklist.ts
index 1f926d227..7eb3c1cae 100644
--- a/server/tests/api/check-params/video-blacklist.ts
+++ b/server/tests/api/check-params/video-blacklist.ts
@@ -15,7 +15,7 @@ import {
15 PeerTubeServer, 15 PeerTubeServer,
16 setAccessTokensToServers, 16 setAccessTokensToServers,
17 waitJobs 17 waitJobs
18} from '@shared/extra-utils' 18} from '@shared/server-commands'
19import { HttpStatusCode, VideoBlacklistType } from '@shared/models' 19import { HttpStatusCode, VideoBlacklistType } from '@shared/models'
20 20
21describe('Test video blacklist API validators', function () { 21describe('Test video blacklist API validators', function () {
diff --git a/server/tests/api/check-params/video-captions.ts b/server/tests/api/check-params/video-captions.ts
index 90f429314..34c1a9673 100644
--- a/server/tests/api/check-params/video-captions.ts
+++ b/server/tests/api/check-params/video-captions.ts
@@ -10,7 +10,7 @@ import {
10 makeUploadRequest, 10 makeUploadRequest,
11 PeerTubeServer, 11 PeerTubeServer,
12 setAccessTokensToServers 12 setAccessTokensToServers
13} from '@shared/extra-utils' 13} from '@shared/server-commands'
14import { HttpStatusCode, VideoCreateResult } from '@shared/models' 14import { HttpStatusCode, VideoCreateResult } from '@shared/models'
15 15
16describe('Test video captions API validator', function () { 16describe('Test video captions API validator', function () {
diff --git a/server/tests/api/check-params/video-channels.ts b/server/tests/api/check-params/video-channels.ts
index e86c315fa..747a5d3ec 100644
--- a/server/tests/api/check-params/video-channels.ts
+++ b/server/tests/api/check-params/video-channels.ts
@@ -17,7 +17,7 @@ import {
17 makeUploadRequest, 17 makeUploadRequest,
18 PeerTubeServer, 18 PeerTubeServer,
19 setAccessTokensToServers 19 setAccessTokensToServers
20} from '@shared/extra-utils' 20} from '@shared/server-commands'
21import { HttpStatusCode, VideoChannelUpdate } from '@shared/models' 21import { HttpStatusCode, VideoChannelUpdate } from '@shared/models'
22 22
23const expect = chai.expect 23const expect = chai.expect
diff --git a/server/tests/api/check-params/video-comments.ts b/server/tests/api/check-params/video-comments.ts
index 2d9ee1e0d..05cf61cba 100644
--- a/server/tests/api/check-params/video-comments.ts
+++ b/server/tests/api/check-params/video-comments.ts
@@ -13,7 +13,7 @@ import {
13 makePostBodyRequest, 13 makePostBodyRequest,
14 PeerTubeServer, 14 PeerTubeServer,
15 setAccessTokensToServers 15 setAccessTokensToServers
16} from '@shared/extra-utils' 16} from '@shared/server-commands'
17import { HttpStatusCode, VideoCreateResult } from '@shared/models' 17import { HttpStatusCode, VideoCreateResult } from '@shared/models'
18 18
19const expect = chai.expect 19const expect = chai.expect
diff --git a/server/tests/api/check-params/video-files.ts b/server/tests/api/check-params/video-files.ts
index 3ccdf5f49..90ab4460c 100644
--- a/server/tests/api/check-params/video-files.ts
+++ b/server/tests/api/check-params/video-files.ts
@@ -1,7 +1,7 @@
1/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ 1/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
2 2
3import 'mocha' 3import 'mocha'
4import { cleanupTests, createMultipleServers, doubleFollow, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/extra-utils' 4import { cleanupTests, createMultipleServers, doubleFollow, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/server-commands'
5import { HttpStatusCode, UserRole } from '@shared/models' 5import { HttpStatusCode, UserRole } from '@shared/models'
6 6
7describe('Test videos files', function () { 7describe('Test videos files', function () {
diff --git a/server/tests/api/check-params/video-imports.ts b/server/tests/api/check-params/video-imports.ts
index d6d745488..7cefb2a54 100644
--- a/server/tests/api/check-params/video-imports.ts
+++ b/server/tests/api/check-params/video-imports.ts
@@ -15,7 +15,7 @@ import {
15 makeUploadRequest, 15 makeUploadRequest,
16 PeerTubeServer, 16 PeerTubeServer,
17 setAccessTokensToServers 17 setAccessTokensToServers
18} from '@shared/extra-utils' 18} from '@shared/server-commands'
19import { HttpStatusCode, VideoPrivacy } from '@shared/models' 19import { HttpStatusCode, VideoPrivacy } from '@shared/models'
20 20
21describe('Test video imports API validator', function () { 21describe('Test video imports API validator', function () {
diff --git a/server/tests/api/check-params/video-playlists.ts b/server/tests/api/check-params/video-playlists.ts
index e4d541b48..ac3c13f78 100644
--- a/server/tests/api/check-params/video-playlists.ts
+++ b/server/tests/api/check-params/video-playlists.ts
@@ -12,7 +12,7 @@ import {
12 PlaylistsCommand, 12 PlaylistsCommand,
13 setAccessTokensToServers, 13 setAccessTokensToServers,
14 setDefaultVideoChannel 14 setDefaultVideoChannel
15} from '@shared/extra-utils' 15} from '@shared/server-commands'
16import { 16import {
17 HttpStatusCode, 17 HttpStatusCode,
18 VideoPlaylistCreate, 18 VideoPlaylistCreate,
diff --git a/server/tests/api/check-params/videos-common-filters.ts b/server/tests/api/check-params/videos-common-filters.ts
index f2b5bee8e..6b3ec917e 100644
--- a/server/tests/api/check-params/videos-common-filters.ts
+++ b/server/tests/api/check-params/videos-common-filters.ts
@@ -8,7 +8,7 @@ import {
8 PeerTubeServer, 8 PeerTubeServer,
9 setAccessTokensToServers, 9 setAccessTokensToServers,
10 setDefaultVideoChannel 10 setDefaultVideoChannel
11} from '@shared/extra-utils' 11} from '@shared/server-commands'
12import { HttpStatusCode, UserRole, VideoInclude, VideoPrivacy } from '@shared/models' 12import { HttpStatusCode, UserRole, VideoInclude, VideoPrivacy } from '@shared/models'
13 13
14describe('Test video filters validators', function () { 14describe('Test video filters validators', function () {
diff --git a/server/tests/api/check-params/videos-history.ts b/server/tests/api/check-params/videos-history.ts
index c3c309ed2..e4b4c4b2a 100644
--- a/server/tests/api/check-params/videos-history.ts
+++ b/server/tests/api/check-params/videos-history.ts
@@ -11,7 +11,7 @@ import {
11 makePutBodyRequest, 11 makePutBodyRequest,
12 PeerTubeServer, 12 PeerTubeServer,
13 setAccessTokensToServers 13 setAccessTokensToServers
14} from '@shared/extra-utils' 14} from '@shared/server-commands'
15import { HttpStatusCode } from '@shared/models' 15import { HttpStatusCode } from '@shared/models'
16 16
17describe('Test videos history API validator', function () { 17describe('Test videos history API validator', function () {
diff --git a/server/tests/api/check-params/videos-overviews.ts b/server/tests/api/check-params/videos-overviews.ts
index c2139d74b..1da15dc43 100644
--- a/server/tests/api/check-params/videos-overviews.ts
+++ b/server/tests/api/check-params/videos-overviews.ts
@@ -1,7 +1,7 @@
1/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ 1/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
2 2
3import 'mocha' 3import 'mocha'
4import { cleanupTests, createSingleServer, PeerTubeServer } from '@shared/extra-utils' 4import { cleanupTests, createSingleServer, PeerTubeServer } from '@shared/server-commands'
5 5
6describe('Test videos overview', function () { 6describe('Test videos overview', function () {
7 let server: PeerTubeServer 7 let server: PeerTubeServer
diff --git a/server/tests/api/check-params/videos.ts b/server/tests/api/check-params/videos.ts
index d02b6e156..3b2607eed 100644
--- a/server/tests/api/check-params/videos.ts
+++ b/server/tests/api/check-params/videos.ts
@@ -19,7 +19,7 @@ import {
19 PeerTubeServer, 19 PeerTubeServer,
20 root, 20 root,
21 setAccessTokensToServers 21 setAccessTokensToServers
22} from '@shared/extra-utils' 22} from '@shared/server-commands'
23import { HttpStatusCode, PeerTubeProblemDocument, VideoCreateResult, VideoPrivacy } from '@shared/models' 23import { HttpStatusCode, PeerTubeProblemDocument, VideoCreateResult, VideoPrivacy } from '@shared/models'
24 24
25const expect = chai.expect 25const expect = chai.expect
diff --git a/server/tests/api/live/live-constraints.ts b/server/tests/api/live/live-constraints.ts
index 6a6a11796..89880c46b 100644
--- a/server/tests/api/live/live-constraints.ts
+++ b/server/tests/api/live/live-constraints.ts
@@ -14,7 +14,7 @@ import {
14 setDefaultVideoChannel, 14 setDefaultVideoChannel,
15 wait, 15 wait,
16 waitJobs 16 waitJobs
17} from '../../../../shared/extra-utils' 17} from '../../../../shared/server-commands'
18 18
19const expect = chai.expect 19const expect = chai.expect
20 20
diff --git a/server/tests/api/live/live-permanent.ts b/server/tests/api/live/live-permanent.ts
index c5f942901..12a4d64d8 100644
--- a/server/tests/api/live/live-permanent.ts
+++ b/server/tests/api/live/live-permanent.ts
@@ -14,7 +14,7 @@ import {
14 stopFfmpeg, 14 stopFfmpeg,
15 wait, 15 wait,
16 waitJobs 16 waitJobs
17} from '../../../../shared/extra-utils' 17} from '../../../../shared/server-commands'
18 18
19const expect = chai.expect 19const expect = chai.expect
20 20
diff --git a/server/tests/api/live/live-rtmps.ts b/server/tests/api/live/live-rtmps.ts
index 378e6df3c..31e8f906e 100644
--- a/server/tests/api/live/live-rtmps.ts
+++ b/server/tests/api/live/live-rtmps.ts
@@ -14,7 +14,7 @@ import {
14 stopFfmpeg, 14 stopFfmpeg,
15 testFfmpegStreamError, 15 testFfmpegStreamError,
16 waitUntilLivePublishedOnAllServers 16 waitUntilLivePublishedOnAllServers
17} from '../../../../shared/extra-utils' 17} from '../../../../shared/server-commands'
18 18
19const expect = chai.expect 19const expect = chai.expect
20 20
diff --git a/server/tests/api/live/live-save-replay.ts b/server/tests/api/live/live-save-replay.ts
index 6c4ea90ca..9fb6b4e54 100644
--- a/server/tests/api/live/live-save-replay.ts
+++ b/server/tests/api/live/live-save-replay.ts
@@ -18,7 +18,7 @@ import {
18 waitJobs, 18 waitJobs,
19 waitUntilLivePublishedOnAllServers, 19 waitUntilLivePublishedOnAllServers,
20 waitUntilLiveSavedOnAllServers 20 waitUntilLiveSavedOnAllServers
21} from '@shared/extra-utils' 21} from '@shared/server-commands'
22import { HttpStatusCode, LiveVideoCreate, VideoPrivacy, VideoState } from '@shared/models' 22import { HttpStatusCode, LiveVideoCreate, VideoPrivacy, VideoState } from '@shared/models'
23 23
24const expect = chai.expect 24const expect = chai.expect
diff --git a/server/tests/api/live/live-socket-messages.ts b/server/tests/api/live/live-socket-messages.ts
index 33ee2c051..42cf9c5f6 100644
--- a/server/tests/api/live/live-socket-messages.ts
+++ b/server/tests/api/live/live-socket-messages.ts
@@ -14,7 +14,7 @@ import {
14 wait, 14 wait,
15 waitJobs, 15 waitJobs,
16 waitUntilLivePublishedOnAllServers 16 waitUntilLivePublishedOnAllServers
17} from '../../../../shared/extra-utils' 17} from '../../../../shared/server-commands'
18 18
19const expect = chai.expect 19const expect = chai.expect
20 20
diff --git a/server/tests/api/live/live-views.ts b/server/tests/api/live/live-views.ts
index 9186af8e7..5de4436be 100644
--- a/server/tests/api/live/live-views.ts
+++ b/server/tests/api/live/live-views.ts
@@ -15,7 +15,7 @@ import {
15 wait, 15 wait,
16 waitJobs, 16 waitJobs,
17 waitUntilLivePublishedOnAllServers 17 waitUntilLivePublishedOnAllServers
18} from '../../../../shared/extra-utils' 18} from '../../../../shared/server-commands'
19 19
20const expect = chai.expect 20const expect = chai.expect
21 21
diff --git a/server/tests/api/live/live.ts b/server/tests/api/live/live.ts
index b96c03cf8..3869fd6c7 100644
--- a/server/tests/api/live/live.ts
+++ b/server/tests/api/live/live.ts
@@ -24,7 +24,7 @@ import {
24 wait, 24 wait,
25 waitJobs, 25 waitJobs,
26 waitUntilLivePublishedOnAllServers 26 waitUntilLivePublishedOnAllServers
27} from '@shared/extra-utils' 27} from '@shared/server-commands'
28import { 28import {
29 HttpStatusCode, 29 HttpStatusCode,
30 LiveVideo, 30 LiveVideo,
diff --git a/server/tests/api/moderation/abuses.ts b/server/tests/api/moderation/abuses.ts
index c258414ce..9eb84fdec 100644
--- a/server/tests/api/moderation/abuses.ts
+++ b/server/tests/api/moderation/abuses.ts
@@ -10,7 +10,7 @@ import {
10 PeerTubeServer, 10 PeerTubeServer,
11 setAccessTokensToServers, 11 setAccessTokensToServers,
12 waitJobs 12 waitJobs
13} from '@shared/extra-utils' 13} from '@shared/server-commands'
14import { AbuseMessage, AbusePredefinedReasonsString, AbuseState, AdminAbuse, UserAbuse } from '@shared/models' 14import { AbuseMessage, AbusePredefinedReasonsString, AbuseState, AdminAbuse, UserAbuse } from '@shared/models'
15 15
16const expect = chai.expect 16const expect = chai.expect
diff --git a/server/tests/api/moderation/blocklist-notification.ts b/server/tests/api/moderation/blocklist-notification.ts
index 75b15c298..d1e2ea56e 100644
--- a/server/tests/api/moderation/blocklist-notification.ts
+++ b/server/tests/api/moderation/blocklist-notification.ts
@@ -2,7 +2,7 @@
2 2
3import 'mocha' 3import 'mocha'
4import * as chai from 'chai' 4import * as chai from 'chai'
5import { cleanupTests, createMultipleServers, doubleFollow, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/extra-utils' 5import { cleanupTests, createMultipleServers, doubleFollow, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/server-commands'
6import { UserNotificationType } from '@shared/models' 6import { UserNotificationType } from '@shared/models'
7 7
8const expect = chai.expect 8const expect = chai.expect
diff --git a/server/tests/api/moderation/blocklist.ts b/server/tests/api/moderation/blocklist.ts
index b3fd8ecac..b45460bb4 100644
--- a/server/tests/api/moderation/blocklist.ts
+++ b/server/tests/api/moderation/blocklist.ts
@@ -11,7 +11,7 @@ import {
11 PeerTubeServer, 11 PeerTubeServer,
12 setAccessTokensToServers, 12 setAccessTokensToServers,
13 waitJobs 13 waitJobs
14} from '@shared/extra-utils' 14} from '@shared/server-commands'
15import { UserNotificationType } from '@shared/models' 15import { UserNotificationType } from '@shared/models'
16 16
17const expect = chai.expect 17const expect = chai.expect
diff --git a/server/tests/api/moderation/video-blacklist.ts b/server/tests/api/moderation/video-blacklist.ts
index d5838191a..4e2887fa0 100644
--- a/server/tests/api/moderation/video-blacklist.ts
+++ b/server/tests/api/moderation/video-blacklist.ts
@@ -13,7 +13,7 @@ import {
13 PeerTubeServer, 13 PeerTubeServer,
14 setAccessTokensToServers, 14 setAccessTokensToServers,
15 waitJobs 15 waitJobs
16} from '@shared/extra-utils' 16} from '@shared/server-commands'
17import { UserAdminFlag, UserRole, VideoBlacklist, VideoBlacklistType } from '@shared/models' 17import { UserAdminFlag, UserRole, VideoBlacklist, VideoBlacklistType } from '@shared/models'
18 18
19const expect = chai.expect 19const expect = chai.expect
diff --git a/server/tests/api/notifications/admin-notifications.ts b/server/tests/api/notifications/admin-notifications.ts
index c00d4e257..18962a71e 100644
--- a/server/tests/api/notifications/admin-notifications.ts
+++ b/server/tests/api/notifications/admin-notifications.ts
@@ -12,7 +12,7 @@ import {
12 PeerTubeServer, 12 PeerTubeServer,
13 prepareNotificationsTest, 13 prepareNotificationsTest,
14 wait 14 wait
15} from '@shared/extra-utils' 15} from '@shared/server-commands'
16import { PluginType, UserNotification, UserNotificationType } from '@shared/models' 16import { PluginType, UserNotification, UserNotificationType } from '@shared/models'
17 17
18describe('Test admin notifications', function () { 18describe('Test admin notifications', function () {
diff --git a/server/tests/api/notifications/comments-notifications.ts b/server/tests/api/notifications/comments-notifications.ts
index 7cbb21397..919be4bca 100644
--- a/server/tests/api/notifications/comments-notifications.ts
+++ b/server/tests/api/notifications/comments-notifications.ts
@@ -11,7 +11,7 @@ import {
11 PeerTubeServer, 11 PeerTubeServer,
12 prepareNotificationsTest, 12 prepareNotificationsTest,
13 waitJobs 13 waitJobs
14} from '@shared/extra-utils' 14} from '@shared/server-commands'
15import { UserNotification } from '@shared/models' 15import { UserNotification } from '@shared/models'
16 16
17const expect = chai.expect 17const expect = chai.expect
diff --git a/server/tests/api/notifications/moderation-notifications.ts b/server/tests/api/notifications/moderation-notifications.ts
index 6d8e5359b..4da9d2684 100644
--- a/server/tests/api/notifications/moderation-notifications.ts
+++ b/server/tests/api/notifications/moderation-notifications.ts
@@ -23,7 +23,7 @@ import {
23 prepareNotificationsTest, 23 prepareNotificationsTest,
24 wait, 24 wait,
25 waitJobs 25 waitJobs
26} from '@shared/extra-utils' 26} from '@shared/server-commands'
27import { AbuseState, CustomConfig, UserNotification, UserRole, VideoPrivacy } from '@shared/models' 27import { AbuseState, CustomConfig, UserNotification, UserRole, VideoPrivacy } from '@shared/models'
28 28
29describe('Test moderation notifications', function () { 29describe('Test moderation notifications', function () {
diff --git a/server/tests/api/notifications/notifications-api.ts b/server/tests/api/notifications/notifications-api.ts
index a529a9bf7..aeb73350b 100644
--- a/server/tests/api/notifications/notifications-api.ts
+++ b/server/tests/api/notifications/notifications-api.ts
@@ -11,7 +11,7 @@ import {
11 PeerTubeServer, 11 PeerTubeServer,
12 prepareNotificationsTest, 12 prepareNotificationsTest,
13 waitJobs 13 waitJobs
14} from '@shared/extra-utils' 14} from '@shared/server-commands'
15import { UserNotification, UserNotificationSettingValue } from '@shared/models' 15import { UserNotification, UserNotificationSettingValue } from '@shared/models'
16 16
17const expect = chai.expect 17const expect = chai.expect
diff --git a/server/tests/api/notifications/user-notifications.ts b/server/tests/api/notifications/user-notifications.ts
index 6db0347cc..a2fcdf2ef 100644
--- a/server/tests/api/notifications/user-notifications.ts
+++ b/server/tests/api/notifications/user-notifications.ts
@@ -17,7 +17,7 @@ import {
17 uploadRandomVideoOnServers, 17 uploadRandomVideoOnServers,
18 wait, 18 wait,
19 waitJobs 19 waitJobs
20} from '@shared/extra-utils' 20} from '@shared/server-commands'
21import { UserNotification, UserNotificationType, VideoPrivacy } from '@shared/models' 21import { UserNotification, UserNotificationType, VideoPrivacy } from '@shared/models'
22 22
23const expect = chai.expect 23const expect = chai.expect
diff --git a/server/tests/api/object-storage/live.ts b/server/tests/api/object-storage/live.ts
index 3726a717b..2c341c139 100644
--- a/server/tests/api/object-storage/live.ts
+++ b/server/tests/api/object-storage/live.ts
@@ -18,7 +18,7 @@ import {
18 waitJobs, 18 waitJobs,
19 waitUntilLivePublishedOnAllServers, 19 waitUntilLivePublishedOnAllServers,
20 waitUntilLiveSavedOnAllServers 20 waitUntilLiveSavedOnAllServers
21} from '@shared/extra-utils' 21} from '@shared/server-commands'
22import { HttpStatusCode, LiveVideoCreate, VideoFile, VideoPrivacy } from '@shared/models' 22import { HttpStatusCode, LiveVideoCreate, VideoFile, VideoPrivacy } from '@shared/models'
23 23
24const expect = chai.expect 24const expect = chai.expect
diff --git a/server/tests/api/object-storage/video-imports.ts b/server/tests/api/object-storage/video-imports.ts
index 363fe3b5b..adca16e8f 100644
--- a/server/tests/api/object-storage/video-imports.ts
+++ b/server/tests/api/object-storage/video-imports.ts
@@ -14,7 +14,7 @@ import {
14 setAccessTokensToServers, 14 setAccessTokensToServers,
15 setDefaultVideoChannel, 15 setDefaultVideoChannel,
16 waitJobs 16 waitJobs
17} from '@shared/extra-utils' 17} from '@shared/server-commands'
18import { HttpStatusCode, VideoPrivacy } from '@shared/models' 18import { HttpStatusCode, VideoPrivacy } from '@shared/models'
19 19
20const expect = chai.expect 20const expect = chai.expect
diff --git a/server/tests/api/object-storage/videos.ts b/server/tests/api/object-storage/videos.ts
index 35a5f19ed..bf469015f 100644
--- a/server/tests/api/object-storage/videos.ts
+++ b/server/tests/api/object-storage/videos.ts
@@ -20,7 +20,7 @@ import {
20 setAccessTokensToServers, 20 setAccessTokensToServers,
21 waitJobs, 21 waitJobs,
22 webtorrentAdd 22 webtorrentAdd
23} from '@shared/extra-utils' 23} from '@shared/server-commands'
24import { HttpStatusCode, VideoDetails } from '@shared/models' 24import { HttpStatusCode, VideoDetails } from '@shared/models'
25 25
26const expect = chai.expect 26const expect = chai.expect
diff --git a/server/tests/api/redundancy/manage-redundancy.ts b/server/tests/api/redundancy/manage-redundancy.ts
index 5fd464ded..cbf3106bd 100644
--- a/server/tests/api/redundancy/manage-redundancy.ts
+++ b/server/tests/api/redundancy/manage-redundancy.ts
@@ -10,7 +10,7 @@ import {
10 RedundancyCommand, 10 RedundancyCommand,
11 setAccessTokensToServers, 11 setAccessTokensToServers,
12 waitJobs 12 waitJobs
13} from '@shared/extra-utils' 13} from '@shared/server-commands'
14import { VideoPrivacy, VideoRedundanciesTarget } from '@shared/models' 14import { VideoPrivacy, VideoRedundanciesTarget } from '@shared/models'
15 15
16const expect = chai.expect 16const expect = chai.expect
diff --git a/server/tests/api/redundancy/redundancy-constraints.ts b/server/tests/api/redundancy/redundancy-constraints.ts
index 933a2c776..1a8d8183b 100644
--- a/server/tests/api/redundancy/redundancy-constraints.ts
+++ b/server/tests/api/redundancy/redundancy-constraints.ts
@@ -2,7 +2,7 @@
2 2
3import 'mocha' 3import 'mocha'
4import { expect } from 'chai' 4import { expect } from 'chai'
5import { cleanupTests, createSingleServer, killallServers, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/extra-utils' 5import { cleanupTests, createSingleServer, killallServers, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/server-commands'
6import { VideoPrivacy } from '@shared/models' 6import { VideoPrivacy } from '@shared/models'
7 7
8describe('Test redundancy constraints', function () { 8describe('Test redundancy constraints', function () {
diff --git a/server/tests/api/redundancy/redundancy.ts b/server/tests/api/redundancy/redundancy.ts
index b5929129a..556cfbc31 100644
--- a/server/tests/api/redundancy/redundancy.ts
+++ b/server/tests/api/redundancy/redundancy.ts
@@ -19,7 +19,7 @@ import {
19 setAccessTokensToServers, 19 setAccessTokensToServers,
20 wait, 20 wait,
21 waitJobs 21 waitJobs
22} from '@shared/extra-utils' 22} from '@shared/server-commands'
23import { 23import {
24 HttpStatusCode, 24 HttpStatusCode,
25 VideoDetails, 25 VideoDetails,
diff --git a/server/tests/api/search/search-activitypub-video-channels.ts b/server/tests/api/search/search-activitypub-video-channels.ts
index efcdb33dc..1f29f840a 100644
--- a/server/tests/api/search/search-activitypub-video-channels.ts
+++ b/server/tests/api/search/search-activitypub-video-channels.ts
@@ -10,7 +10,7 @@ import {
10 setAccessTokensToServers, 10 setAccessTokensToServers,
11 wait, 11 wait,
12 waitJobs 12 waitJobs
13} from '@shared/extra-utils' 13} from '@shared/server-commands'
14import { VideoChannel } from '@shared/models' 14import { VideoChannel } from '@shared/models'
15 15
16const expect = chai.expect 16const expect = chai.expect
diff --git a/server/tests/api/search/search-activitypub-video-playlists.ts b/server/tests/api/search/search-activitypub-video-playlists.ts
index 34b318268..550af8ed2 100644
--- a/server/tests/api/search/search-activitypub-video-playlists.ts
+++ b/server/tests/api/search/search-activitypub-video-playlists.ts
@@ -11,7 +11,7 @@ import {
11 setDefaultVideoChannel, 11 setDefaultVideoChannel,
12 wait, 12 wait,
13 waitJobs 13 waitJobs
14} from '@shared/extra-utils' 14} from '@shared/server-commands'
15import { VideoPlaylistPrivacy } from '@shared/models' 15import { VideoPlaylistPrivacy } from '@shared/models'
16 16
17const expect = chai.expect 17const expect = chai.expect
diff --git a/server/tests/api/search/search-activitypub-videos.ts b/server/tests/api/search/search-activitypub-videos.ts
index a2e6e70fe..5aa3738c9 100644
--- a/server/tests/api/search/search-activitypub-videos.ts
+++ b/server/tests/api/search/search-activitypub-videos.ts
@@ -10,7 +10,7 @@ import {
10 setAccessTokensToServers, 10 setAccessTokensToServers,
11 wait, 11 wait,
12 waitJobs 12 waitJobs
13} from '@shared/extra-utils' 13} from '@shared/server-commands'
14import { VideoPrivacy } from '@shared/models' 14import { VideoPrivacy } from '@shared/models'
15 15
16const expect = chai.expect 16const expect = chai.expect
diff --git a/server/tests/api/search/search-channels.ts b/server/tests/api/search/search-channels.ts
index 67612537c..8a92def61 100644
--- a/server/tests/api/search/search-channels.ts
+++ b/server/tests/api/search/search-channels.ts
@@ -9,7 +9,7 @@ import {
9 PeerTubeServer, 9 PeerTubeServer,
10 SearchCommand, 10 SearchCommand,
11 setAccessTokensToServers 11 setAccessTokensToServers
12} from '@shared/extra-utils' 12} from '@shared/server-commands'
13import { VideoChannel } from '@shared/models' 13import { VideoChannel } from '@shared/models'
14 14
15const expect = chai.expect 15const expect = chai.expect
diff --git a/server/tests/api/search/search-index.ts b/server/tests/api/search/search-index.ts
index 1845c2069..f84d03345 100644
--- a/server/tests/api/search/search-index.ts
+++ b/server/tests/api/search/search-index.ts
@@ -2,7 +2,7 @@
2 2
3import 'mocha' 3import 'mocha'
4import * as chai from 'chai' 4import * as chai from 'chai'
5import { cleanupTests, createSingleServer, PeerTubeServer, SearchCommand, setAccessTokensToServers } from '@shared/extra-utils' 5import { cleanupTests, createSingleServer, PeerTubeServer, SearchCommand, setAccessTokensToServers } from '@shared/server-commands'
6import { 6import {
7 BooleanBothQuery, 7 BooleanBothQuery,
8 VideoChannelsSearchQuery, 8 VideoChannelsSearchQuery,
diff --git a/server/tests/api/search/search-playlists.ts b/server/tests/api/search/search-playlists.ts
index 15aac029a..1e9c8d4bb 100644
--- a/server/tests/api/search/search-playlists.ts
+++ b/server/tests/api/search/search-playlists.ts
@@ -10,7 +10,7 @@ import {
10 SearchCommand, 10 SearchCommand,
11 setAccessTokensToServers, 11 setAccessTokensToServers,
12 setDefaultVideoChannel 12 setDefaultVideoChannel
13} from '@shared/extra-utils' 13} from '@shared/server-commands'
14import { VideoPlaylistPrivacy } from '@shared/models' 14import { VideoPlaylistPrivacy } from '@shared/models'
15 15
16const expect = chai.expect 16const expect = chai.expect
diff --git a/server/tests/api/search/search-videos.ts b/server/tests/api/search/search-videos.ts
index ad2a2fddc..bf2375ffa 100644
--- a/server/tests/api/search/search-videos.ts
+++ b/server/tests/api/search/search-videos.ts
@@ -12,7 +12,7 @@ import {
12 setDefaultVideoChannel, 12 setDefaultVideoChannel,
13 stopFfmpeg, 13 stopFfmpeg,
14 wait 14 wait
15} from '@shared/extra-utils' 15} from '@shared/server-commands'
16import { VideoPrivacy } from '@shared/models' 16import { VideoPrivacy } from '@shared/models'
17 17
18const expect = chai.expect 18const expect = chai.expect
diff --git a/server/tests/api/server/auto-follows.ts b/server/tests/api/server/auto-follows.ts
index 90a668edb..74bb96040 100644
--- a/server/tests/api/server/auto-follows.ts
+++ b/server/tests/api/server/auto-follows.ts
@@ -10,7 +10,7 @@ import {
10 setAccessTokensToServers, 10 setAccessTokensToServers,
11 wait, 11 wait,
12 waitJobs 12 waitJobs
13} from '@shared/extra-utils' 13} from '@shared/server-commands'
14 14
15const expect = chai.expect 15const expect = chai.expect
16 16
diff --git a/server/tests/api/server/bulk.ts b/server/tests/api/server/bulk.ts
index 16cbcd5c3..1b81a6954 100644
--- a/server/tests/api/server/bulk.ts
+++ b/server/tests/api/server/bulk.ts
@@ -10,7 +10,7 @@ import {
10 PeerTubeServer, 10 PeerTubeServer,
11 setAccessTokensToServers, 11 setAccessTokensToServers,
12 waitJobs 12 waitJobs
13} from '@shared/extra-utils' 13} from '@shared/server-commands'
14 14
15const expect = chai.expect 15const expect = chai.expect
16 16
diff --git a/server/tests/api/server/config-defaults.ts b/server/tests/api/server/config-defaults.ts
index 117fc20d7..4ceda7de3 100644
--- a/server/tests/api/server/config-defaults.ts
+++ b/server/tests/api/server/config-defaults.ts
@@ -9,7 +9,7 @@ import {
9 PeerTubeServer, 9 PeerTubeServer,
10 setAccessTokensToServers, 10 setAccessTokensToServers,
11 setDefaultVideoChannel 11 setDefaultVideoChannel
12} from '@shared/extra-utils' 12} from '@shared/server-commands'
13import { VideoDetails, VideoPrivacy } from '@shared/models' 13import { VideoDetails, VideoPrivacy } from '@shared/models'
14 14
15const expect = chai.expect 15const expect = chai.expect
diff --git a/server/tests/api/server/config.ts b/server/tests/api/server/config.ts
index 96ec17b0f..2e6617a15 100644
--- a/server/tests/api/server/config.ts
+++ b/server/tests/api/server/config.ts
@@ -10,7 +10,7 @@ import {
10 parallelTests, 10 parallelTests,
11 PeerTubeServer, 11 PeerTubeServer,
12 setAccessTokensToServers 12 setAccessTokensToServers
13} from '@shared/extra-utils' 13} from '@shared/server-commands'
14import { CustomConfig, HttpStatusCode } from '@shared/models' 14import { CustomConfig, HttpStatusCode } from '@shared/models'
15 15
16const expect = chai.expect 16const expect = chai.expect
diff --git a/server/tests/api/server/contact-form.ts b/server/tests/api/server/contact-form.ts
index c555661ad..109251453 100644
--- a/server/tests/api/server/contact-form.ts
+++ b/server/tests/api/server/contact-form.ts
@@ -11,7 +11,7 @@ import {
11 setAccessTokensToServers, 11 setAccessTokensToServers,
12 wait, 12 wait,
13 waitJobs 13 waitJobs
14} from '@shared/extra-utils' 14} from '@shared/server-commands'
15import { HttpStatusCode } from '@shared/models' 15import { HttpStatusCode } from '@shared/models'
16 16
17const expect = chai.expect 17const expect = chai.expect
diff --git a/server/tests/api/server/email.ts b/server/tests/api/server/email.ts
index cd8d70341..6fa6053cb 100644
--- a/server/tests/api/server/email.ts
+++ b/server/tests/api/server/email.ts
@@ -2,7 +2,7 @@
2 2
3import 'mocha' 3import 'mocha'
4import * as chai from 'chai' 4import * as chai from 'chai'
5import { cleanupTests, createSingleServer, MockSmtpServer, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/extra-utils' 5import { cleanupTests, createSingleServer, MockSmtpServer, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/server-commands'
6import { HttpStatusCode } from '@shared/models' 6import { HttpStatusCode } from '@shared/models'
7 7
8const expect = chai.expect 8const expect = chai.expect
diff --git a/server/tests/api/server/follow-constraints.ts b/server/tests/api/server/follow-constraints.ts
index 471f5d8d0..0f3c138ad 100644
--- a/server/tests/api/server/follow-constraints.ts
+++ b/server/tests/api/server/follow-constraints.ts
@@ -2,7 +2,7 @@
2 2
3import 'mocha' 3import 'mocha'
4import * as chai from 'chai' 4import * as chai from 'chai'
5import { cleanupTests, createMultipleServers, doubleFollow, PeerTubeServer, setAccessTokensToServers } from '@shared/extra-utils' 5import { cleanupTests, createMultipleServers, doubleFollow, PeerTubeServer, setAccessTokensToServers } from '@shared/server-commands'
6import { HttpStatusCode, PeerTubeProblemDocument, ServerErrorCode } from '@shared/models' 6import { HttpStatusCode, PeerTubeProblemDocument, ServerErrorCode } from '@shared/models'
7 7
8const expect = chai.expect 8const expect = chai.expect
diff --git a/server/tests/api/server/follows-moderation.ts b/server/tests/api/server/follows-moderation.ts
index 921f51043..120bd7f88 100644
--- a/server/tests/api/server/follows-moderation.ts
+++ b/server/tests/api/server/follows-moderation.ts
@@ -9,7 +9,7 @@ import {
9 PeerTubeServer, 9 PeerTubeServer,
10 setAccessTokensToServers, 10 setAccessTokensToServers,
11 waitJobs 11 waitJobs
12} from '@shared/extra-utils' 12} from '@shared/server-commands'
13 13
14const expect = chai.expect 14const expect = chai.expect
15 15
diff --git a/server/tests/api/server/follows.ts b/server/tests/api/server/follows.ts
index c132d99ea..e128c36a5 100644
--- a/server/tests/api/server/follows.ts
+++ b/server/tests/api/server/follows.ts
@@ -12,7 +12,7 @@ import {
12 setAccessTokensToServers, 12 setAccessTokensToServers,
13 testCaptionFile, 13 testCaptionFile,
14 waitJobs 14 waitJobs
15} from '@shared/extra-utils' 15} from '@shared/server-commands'
16import { VideoCreateResult, VideoPrivacy } from '@shared/models' 16import { VideoCreateResult, VideoPrivacy } from '@shared/models'
17import { completeVideoCheck } from '@server/tests/shared/video' 17import { completeVideoCheck } from '@server/tests/shared/video'
18 18
diff --git a/server/tests/api/server/handle-down.ts b/server/tests/api/server/handle-down.ts
index 2d059c0ed..b134e074b 100644
--- a/server/tests/api/server/handle-down.ts
+++ b/server/tests/api/server/handle-down.ts
@@ -11,7 +11,7 @@ import {
11 setAccessTokensToServers, 11 setAccessTokensToServers,
12 wait, 12 wait,
13 waitJobs 13 waitJobs
14} from '@shared/extra-utils' 14} from '@shared/server-commands'
15import { HttpStatusCode, JobState, VideoCreateResult, VideoPrivacy } from '@shared/models' 15import { HttpStatusCode, JobState, VideoCreateResult, VideoPrivacy } from '@shared/models'
16import { completeVideoCheck } from '@server/tests/shared/video' 16import { completeVideoCheck } from '@server/tests/shared/video'
17 17
diff --git a/server/tests/api/server/homepage.ts b/server/tests/api/server/homepage.ts
index cb3ba5677..552ee98cf 100644
--- a/server/tests/api/server/homepage.ts
+++ b/server/tests/api/server/homepage.ts
@@ -10,7 +10,7 @@ import {
10 killallServers, 10 killallServers,
11 PeerTubeServer, 11 PeerTubeServer,
12 setAccessTokensToServers 12 setAccessTokensToServers
13} from '../../../../shared/extra-utils/index' 13} from '../../../../shared/server-commands/index'
14 14
15const expect = chai.expect 15const expect = chai.expect
16 16
diff --git a/server/tests/api/server/jobs.ts b/server/tests/api/server/jobs.ts
index 5d946f5e8..5b38f6741 100644
--- a/server/tests/api/server/jobs.ts
+++ b/server/tests/api/server/jobs.ts
@@ -10,7 +10,7 @@ import {
10 PeerTubeServer, 10 PeerTubeServer,
11 setAccessTokensToServers, 11 setAccessTokensToServers,
12 waitJobs 12 waitJobs
13} from '@shared/extra-utils' 13} from '@shared/server-commands'
14 14
15const expect = chai.expect 15const expect = chai.expect
16 16
diff --git a/server/tests/api/server/logs.ts b/server/tests/api/server/logs.ts
index 4fa13886e..697f10337 100644
--- a/server/tests/api/server/logs.ts
+++ b/server/tests/api/server/logs.ts
@@ -10,7 +10,7 @@ import {
10 PeerTubeServer, 10 PeerTubeServer,
11 setAccessTokensToServers, 11 setAccessTokensToServers,
12 waitJobs 12 waitJobs
13} from '@shared/extra-utils' 13} from '@shared/server-commands'
14 14
15const expect = chai.expect 15const expect = chai.expect
16 16
diff --git a/server/tests/api/server/no-client.ts b/server/tests/api/server/no-client.ts
index 1e0c95a3b..913907788 100644
--- a/server/tests/api/server/no-client.ts
+++ b/server/tests/api/server/no-client.ts
@@ -1,6 +1,6 @@
1import 'mocha' 1import 'mocha'
2import request from 'supertest' 2import request from 'supertest'
3import { cleanupTests, createSingleServer, PeerTubeServer } from '@shared/extra-utils' 3import { cleanupTests, createSingleServer, PeerTubeServer } from '@shared/server-commands'
4import { HttpStatusCode } from '@shared/models' 4import { HttpStatusCode } from '@shared/models'
5 5
6describe('Start and stop server without web client routes', function () { 6describe('Start and stop server without web client routes', function () {
diff --git a/server/tests/api/server/plugins.ts b/server/tests/api/server/plugins.ts
index 5f9f4ffdd..fbcd89101 100644
--- a/server/tests/api/server/plugins.ts
+++ b/server/tests/api/server/plugins.ts
@@ -11,7 +11,7 @@ import {
11 setAccessTokensToServers, 11 setAccessTokensToServers,
12 testHelloWorldRegisteredSettings, 12 testHelloWorldRegisteredSettings,
13 wait 13 wait
14} from '@shared/extra-utils' 14} from '@shared/server-commands'
15import { HttpStatusCode, PluginType } from '@shared/models' 15import { HttpStatusCode, PluginType } from '@shared/models'
16 16
17const expect = chai.expect 17const expect = chai.expect
diff --git a/server/tests/api/server/proxy.ts b/server/tests/api/server/proxy.ts
index 29f3e10d8..626a0d860 100644
--- a/server/tests/api/server/proxy.ts
+++ b/server/tests/api/server/proxy.ts
@@ -11,8 +11,8 @@ import {
11 setAccessTokensToServers, 11 setAccessTokensToServers,
12 setDefaultVideoChannel, 12 setDefaultVideoChannel,
13 waitJobs 13 waitJobs
14} from '@shared/extra-utils' 14} from '@shared/server-commands'
15import { MockProxy } from '@shared/extra-utils/mock-servers/mock-proxy' 15import { MockProxy } from '@shared/server-commands/mock-servers/mock-proxy'
16import { HttpStatusCode, VideoPrivacy } from '@shared/models' 16import { HttpStatusCode, VideoPrivacy } from '@shared/models'
17 17
18const expect = chai.expect 18const expect = chai.expect
diff --git a/server/tests/api/server/reverse-proxy.ts b/server/tests/api/server/reverse-proxy.ts
index 484f88d67..fc9b88a6a 100644
--- a/server/tests/api/server/reverse-proxy.ts
+++ b/server/tests/api/server/reverse-proxy.ts
@@ -1,7 +1,7 @@
1/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ 1/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
2 2
3import { expect } from 'chai' 3import { expect } from 'chai'
4import { cleanupTests, createSingleServer, PeerTubeServer, setAccessTokensToServers, wait } from '@shared/extra-utils' 4import { cleanupTests, createSingleServer, PeerTubeServer, setAccessTokensToServers, wait } from '@shared/server-commands'
5import { HttpStatusCode } from '@shared/models' 5import { HttpStatusCode } from '@shared/models'
6 6
7describe('Test application behind a reverse proxy', function () { 7describe('Test application behind a reverse proxy', function () {
diff --git a/server/tests/api/server/services.ts b/server/tests/api/server/services.ts
index 823630ae4..5fd2abda4 100644
--- a/server/tests/api/server/services.ts
+++ b/server/tests/api/server/services.ts
@@ -2,7 +2,7 @@
2 2
3import 'mocha' 3import 'mocha'
4import * as chai from 'chai' 4import * as chai from 'chai'
5import { cleanupTests, createSingleServer, PeerTubeServer, setAccessTokensToServers, setDefaultVideoChannel } from '@shared/extra-utils' 5import { cleanupTests, createSingleServer, PeerTubeServer, setAccessTokensToServers, setDefaultVideoChannel } from '@shared/server-commands'
6import { Video, VideoPlaylistPrivacy } from '@shared/models' 6import { Video, VideoPlaylistPrivacy } from '@shared/models'
7 7
8const expect = chai.expect 8const expect = chai.expect
diff --git a/server/tests/api/server/slow-follows.ts b/server/tests/api/server/slow-follows.ts
index 2bef0c9f2..5f24c351b 100644
--- a/server/tests/api/server/slow-follows.ts
+++ b/server/tests/api/server/slow-follows.ts
@@ -2,7 +2,7 @@
2 2
3import 'mocha' 3import 'mocha'
4import * as chai from 'chai' 4import * as chai from 'chai'
5import { cleanupTests, createMultipleServers, doubleFollow, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/extra-utils' 5import { cleanupTests, createMultipleServers, doubleFollow, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/server-commands'
6import { Job } from '@shared/models' 6import { Job } from '@shared/models'
7 7
8const expect = chai.expect 8const expect = chai.expect
diff --git a/server/tests/api/server/stats.ts b/server/tests/api/server/stats.ts
index efc80463c..65ef4607b 100644
--- a/server/tests/api/server/stats.ts
+++ b/server/tests/api/server/stats.ts
@@ -10,7 +10,7 @@ import {
10 setAccessTokensToServers, 10 setAccessTokensToServers,
11 wait, 11 wait,
12 waitJobs 12 waitJobs
13} from '@shared/extra-utils' 13} from '@shared/server-commands'
14import { ActivityType, VideoPlaylistPrivacy } from '@shared/models' 14import { ActivityType, VideoPlaylistPrivacy } from '@shared/models'
15 15
16const expect = chai.expect 16const expect = chai.expect
diff --git a/server/tests/api/server/tracker.ts b/server/tests/api/server/tracker.ts
index 30a9618b3..712bb485f 100644
--- a/server/tests/api/server/tracker.ts
+++ b/server/tests/api/server/tracker.ts
@@ -3,7 +3,7 @@
3import 'mocha' 3import 'mocha'
4import magnetUtil from 'magnet-uri' 4import magnetUtil from 'magnet-uri'
5import WebTorrent from 'webtorrent' 5import WebTorrent from 'webtorrent'
6import { cleanupTests, createSingleServer, killallServers, PeerTubeServer, setAccessTokensToServers } from '@shared/extra-utils' 6import { cleanupTests, createSingleServer, killallServers, PeerTubeServer, setAccessTokensToServers } from '@shared/server-commands'
7 7
8describe('Test tracker', function () { 8describe('Test tracker', function () {
9 let server: PeerTubeServer 9 let server: PeerTubeServer
diff --git a/server/tests/api/users/user-subscriptions.ts b/server/tests/api/users/user-subscriptions.ts
index d1d192238..190a19c38 100644
--- a/server/tests/api/users/user-subscriptions.ts
+++ b/server/tests/api/users/user-subscriptions.ts
@@ -10,7 +10,7 @@ import {
10 setAccessTokensToServers, 10 setAccessTokensToServers,
11 SubscriptionsCommand, 11 SubscriptionsCommand,
12 waitJobs 12 waitJobs
13} from '@shared/extra-utils' 13} from '@shared/server-commands'
14 14
15const expect = chai.expect 15const expect = chai.expect
16 16
diff --git a/server/tests/api/users/users-multiple-servers.ts b/server/tests/api/users/users-multiple-servers.ts
index d0ca82b07..e6699a059 100644
--- a/server/tests/api/users/users-multiple-servers.ts
+++ b/server/tests/api/users/users-multiple-servers.ts
@@ -14,7 +14,7 @@ import {
14 setAccessTokensToServers, 14 setAccessTokensToServers,
15 testImage, 15 testImage,
16 waitJobs 16 waitJobs
17} from '@shared/extra-utils' 17} from '@shared/server-commands'
18import { MyUser } from '@shared/models' 18import { MyUser } from '@shared/models'
19 19
20const expect = chai.expect 20const expect = chai.expect
diff --git a/server/tests/api/users/users-verification.ts b/server/tests/api/users/users-verification.ts
index f54463359..9b23ba797 100644
--- a/server/tests/api/users/users-verification.ts
+++ b/server/tests/api/users/users-verification.ts
@@ -2,7 +2,7 @@
2 2
3import 'mocha' 3import 'mocha'
4import * as chai from 'chai' 4import * as chai from 'chai'
5import { cleanupTests, createSingleServer, MockSmtpServer, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/extra-utils' 5import { cleanupTests, createSingleServer, MockSmtpServer, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/server-commands'
6import { HttpStatusCode } from '@shared/models' 6import { HttpStatusCode } from '@shared/models'
7 7
8const expect = chai.expect 8const expect = chai.expect
diff --git a/server/tests/api/users/users.ts b/server/tests/api/users/users.ts
index f00cbab5a..fc44a6acd 100644
--- a/server/tests/api/users/users.ts
+++ b/server/tests/api/users/users.ts
@@ -11,7 +11,7 @@ import {
11 setAccessTokensToServers, 11 setAccessTokensToServers,
12 testImage, 12 testImage,
13 waitJobs 13 waitJobs
14} from '@shared/extra-utils' 14} from '@shared/server-commands'
15import { AbuseState, HttpStatusCode, OAuth2ErrorCode, UserAdminFlag, UserRole, Video, VideoPlaylistType } from '@shared/models' 15import { AbuseState, HttpStatusCode, OAuth2ErrorCode, UserAdminFlag, UserRole, Video, VideoPlaylistType } from '@shared/models'
16 16
17const expect = chai.expect 17const expect = chai.expect
diff --git a/server/tests/api/videos/audio-only.ts b/server/tests/api/videos/audio-only.ts
index f4b635bd5..4b27f2fbe 100644
--- a/server/tests/api/videos/audio-only.ts
+++ b/server/tests/api/videos/audio-only.ts
@@ -3,7 +3,7 @@
3import 'mocha' 3import 'mocha'
4import * as chai from 'chai' 4import * as chai from 'chai'
5import { getAudioStream, getVideoStreamSize } from '@server/helpers/ffprobe-utils' 5import { getAudioStream, getVideoStreamSize } from '@server/helpers/ffprobe-utils'
6import { cleanupTests, createMultipleServers, doubleFollow, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/extra-utils' 6import { cleanupTests, createMultipleServers, doubleFollow, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/server-commands'
7 7
8const expect = chai.expect 8const expect = chai.expect
9 9
diff --git a/server/tests/api/videos/multiple-servers.ts b/server/tests/api/videos/multiple-servers.ts
index 9e7b39cfa..cb83fa0f0 100644
--- a/server/tests/api/videos/multiple-servers.ts
+++ b/server/tests/api/videos/multiple-servers.ts
@@ -18,7 +18,7 @@ import {
18 wait, 18 wait,
19 waitJobs, 19 waitJobs,
20 webtorrentAdd 20 webtorrentAdd
21} from '@shared/extra-utils' 21} from '@shared/server-commands'
22import { HttpStatusCode, VideoCommentThreadTree, VideoPrivacy } from '@shared/models' 22import { HttpStatusCode, VideoCommentThreadTree, VideoPrivacy } from '@shared/models'
23import { completeVideoCheck } from '@server/tests/shared/video' 23import { completeVideoCheck } from '@server/tests/shared/video'
24 24
diff --git a/server/tests/api/videos/resumable-upload.ts b/server/tests/api/videos/resumable-upload.ts
index 1ba7cdbcc..0842817dc 100644
--- a/server/tests/api/videos/resumable-upload.ts
+++ b/server/tests/api/videos/resumable-upload.ts
@@ -11,7 +11,7 @@ import {
11 PeerTubeServer, 11 PeerTubeServer,
12 setAccessTokensToServers, 12 setAccessTokensToServers,
13 setDefaultVideoChannel 13 setDefaultVideoChannel
14} from '@shared/extra-utils' 14} from '@shared/server-commands'
15import { HttpStatusCode, VideoPrivacy } from '@shared/models' 15import { HttpStatusCode, VideoPrivacy } from '@shared/models'
16 16
17const expect = chai.expect 17const expect = chai.expect
diff --git a/server/tests/api/videos/single-server.ts b/server/tests/api/videos/single-server.ts
index 100067f18..e5e12dd19 100644
--- a/server/tests/api/videos/single-server.ts
+++ b/server/tests/api/videos/single-server.ts
@@ -10,7 +10,7 @@ import {
10 setAccessTokensToServers, 10 setAccessTokensToServers,
11 testImage, 11 testImage,
12 wait 12 wait
13} from '@shared/extra-utils' 13} from '@shared/server-commands'
14import { Video, VideoPrivacy } from '@shared/models' 14import { Video, VideoPrivacy } from '@shared/models'
15import { completeVideoCheck } from '@server/tests/shared/video' 15import { completeVideoCheck } from '@server/tests/shared/video'
16 16
diff --git a/server/tests/api/videos/video-captions.ts b/server/tests/api/videos/video-captions.ts
index 3bb0d131c..9f00312aa 100644
--- a/server/tests/api/videos/video-captions.ts
+++ b/server/tests/api/videos/video-captions.ts
@@ -12,7 +12,7 @@ import {
12 testCaptionFile, 12 testCaptionFile,
13 wait, 13 wait,
14 waitJobs 14 waitJobs
15} from '@shared/extra-utils' 15} from '@shared/server-commands'
16 16
17const expect = chai.expect 17const expect = chai.expect
18 18
diff --git a/server/tests/api/videos/video-change-ownership.ts b/server/tests/api/videos/video-change-ownership.ts
index d6665fe4e..6c229c6cf 100644
--- a/server/tests/api/videos/video-change-ownership.ts
+++ b/server/tests/api/videos/video-change-ownership.ts
@@ -12,7 +12,7 @@ import {
12 setAccessTokensToServers, 12 setAccessTokensToServers,
13 setDefaultVideoChannel, 13 setDefaultVideoChannel,
14 waitJobs 14 waitJobs
15} from '@shared/extra-utils' 15} from '@shared/server-commands'
16import { HttpStatusCode, VideoPrivacy } from '@shared/models' 16import { HttpStatusCode, VideoPrivacy } from '@shared/models'
17 17
18const expect = chai.expect 18const expect = chai.expect
diff --git a/server/tests/api/videos/video-channels.ts b/server/tests/api/videos/video-channels.ts
index 6ab5faa07..2ac577a59 100644
--- a/server/tests/api/videos/video-channels.ts
+++ b/server/tests/api/videos/video-channels.ts
@@ -15,7 +15,7 @@ import {
15 testImage, 15 testImage,
16 wait, 16 wait,
17 waitJobs 17 waitJobs
18} from '@shared/extra-utils' 18} from '@shared/server-commands'
19import { User, VideoChannel } from '@shared/models' 19import { User, VideoChannel } from '@shared/models'
20 20
21const expect = chai.expect 21const expect = chai.expect
diff --git a/server/tests/api/videos/video-comments.ts b/server/tests/api/videos/video-comments.ts
index 61ee54540..bb4f92a9b 100644
--- a/server/tests/api/videos/video-comments.ts
+++ b/server/tests/api/videos/video-comments.ts
@@ -10,7 +10,7 @@ import {
10 PeerTubeServer, 10 PeerTubeServer,
11 setAccessTokensToServers, 11 setAccessTokensToServers,
12 testImage 12 testImage
13} from '@shared/extra-utils' 13} from '@shared/server-commands'
14 14
15const expect = chai.expect 15const expect = chai.expect
16 16
diff --git a/server/tests/api/videos/video-create-transcoding.ts b/server/tests/api/videos/video-create-transcoding.ts
index c4627e0c1..e81f54714 100644
--- a/server/tests/api/videos/video-create-transcoding.ts
+++ b/server/tests/api/videos/video-create-transcoding.ts
@@ -14,7 +14,7 @@ import {
14 PeerTubeServer, 14 PeerTubeServer,
15 setAccessTokensToServers, 15 setAccessTokensToServers,
16 waitJobs 16 waitJobs
17} from '@shared/extra-utils' 17} from '@shared/server-commands'
18import { HttpStatusCode, VideoDetails } from '@shared/models' 18import { HttpStatusCode, VideoDetails } from '@shared/models'
19 19
20const expect = chai.expect 20const expect = chai.expect
diff --git a/server/tests/api/videos/video-description.ts b/server/tests/api/videos/video-description.ts
index d22b4ed96..23c55f728 100644
--- a/server/tests/api/videos/video-description.ts
+++ b/server/tests/api/videos/video-description.ts
@@ -2,7 +2,7 @@
2 2
3import 'mocha' 3import 'mocha'
4import * as chai from 'chai' 4import * as chai from 'chai'
5import { cleanupTests, createMultipleServers, doubleFollow, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/extra-utils' 5import { cleanupTests, createMultipleServers, doubleFollow, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/server-commands'
6 6
7const expect = chai.expect 7const expect = chai.expect
8 8
diff --git a/server/tests/api/videos/video-files.ts b/server/tests/api/videos/video-files.ts
index fcb2ca2e4..0b5121740 100644
--- a/server/tests/api/videos/video-files.ts
+++ b/server/tests/api/videos/video-files.ts
@@ -2,7 +2,7 @@
2 2
3import 'mocha' 3import 'mocha'
4import { expect } from 'chai' 4import { expect } from 'chai'
5import { cleanupTests, createMultipleServers, doubleFollow, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/extra-utils' 5import { cleanupTests, createMultipleServers, doubleFollow, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/server-commands'
6 6
7describe('Test videos files', function () { 7describe('Test videos files', function () {
8 let servers: PeerTubeServer[] 8 let servers: PeerTubeServer[]
diff --git a/server/tests/api/videos/video-hls.ts b/server/tests/api/videos/video-hls.ts
index a18c3d672..d050a7a7e 100644
--- a/server/tests/api/videos/video-hls.ts
+++ b/server/tests/api/videos/video-hls.ts
@@ -21,7 +21,7 @@ import {
21 setAccessTokensToServers, 21 setAccessTokensToServers,
22 waitJobs, 22 waitJobs,
23 webtorrentAdd 23 webtorrentAdd
24} from '@shared/extra-utils' 24} from '@shared/server-commands'
25import { HttpStatusCode, VideoStreamingPlaylistType } from '@shared/models' 25import { HttpStatusCode, VideoStreamingPlaylistType } from '@shared/models'
26import { DEFAULT_AUDIO_RESOLUTION } from '../../../initializers/constants' 26import { DEFAULT_AUDIO_RESOLUTION } from '../../../initializers/constants'
27 27
diff --git a/server/tests/api/videos/video-imports.ts b/server/tests/api/videos/video-imports.ts
index b6168b54e..2518743f7 100644
--- a/server/tests/api/videos/video-imports.ts
+++ b/server/tests/api/videos/video-imports.ts
@@ -17,7 +17,7 @@ import {
17 testCaptionFile, 17 testCaptionFile,
18 testImage, 18 testImage,
19 waitJobs 19 waitJobs
20} from '@shared/extra-utils' 20} from '@shared/server-commands'
21import { VideoPrivacy, VideoResolution } from '@shared/models' 21import { VideoPrivacy, VideoResolution } from '@shared/models'
22 22
23async function checkVideosServer1 (server: PeerTubeServer, idHttp: string, idMagnet: string, idTorrent: string) { 23async function checkVideosServer1 (server: PeerTubeServer, idHttp: string, idMagnet: string, idTorrent: string) {
diff --git a/server/tests/api/videos/video-nsfw.ts b/server/tests/api/videos/video-nsfw.ts
index b5d183d62..99ea67a0f 100644
--- a/server/tests/api/videos/video-nsfw.ts
+++ b/server/tests/api/videos/video-nsfw.ts
@@ -2,7 +2,7 @@
2 2
3import 'mocha' 3import 'mocha'
4import * as chai from 'chai' 4import * as chai from 'chai'
5import { cleanupTests, createSingleServer, PeerTubeServer, setAccessTokensToServers } from '@shared/extra-utils' 5import { cleanupTests, createSingleServer, PeerTubeServer, setAccessTokensToServers } from '@shared/server-commands'
6import { BooleanBothQuery, CustomConfig, ResultList, Video, VideosOverview } from '@shared/models' 6import { BooleanBothQuery, CustomConfig, ResultList, Video, VideosOverview } from '@shared/models'
7 7
8const expect = chai.expect 8const expect = chai.expect
diff --git a/server/tests/api/videos/video-playlist-thumbnails.ts b/server/tests/api/videos/video-playlist-thumbnails.ts
index f0b2ca169..e6b6c34eb 100644
--- a/server/tests/api/videos/video-playlist-thumbnails.ts
+++ b/server/tests/api/videos/video-playlist-thumbnails.ts
@@ -11,7 +11,7 @@ import {
11 setDefaultVideoChannel, 11 setDefaultVideoChannel,
12 testImage, 12 testImage,
13 waitJobs 13 waitJobs
14} from '../../../../shared/extra-utils' 14} from '../../../../shared/server-commands'
15import { VideoPlaylistPrivacy } from '../../../../shared/models/videos/playlist/video-playlist-privacy.model' 15import { VideoPlaylistPrivacy } from '../../../../shared/models/videos/playlist/video-playlist-privacy.model'
16 16
17const expect = chai.expect 17const expect = chai.expect
diff --git a/server/tests/api/videos/video-playlists.ts b/server/tests/api/videos/video-playlists.ts
index f42aee2ff..6279f5cd0 100644
--- a/server/tests/api/videos/video-playlists.ts
+++ b/server/tests/api/videos/video-playlists.ts
@@ -14,7 +14,7 @@ import {
14 testImage, 14 testImage,
15 wait, 15 wait,
16 waitJobs 16 waitJobs
17} from '@shared/extra-utils' 17} from '@shared/server-commands'
18import { 18import {
19 HttpStatusCode, 19 HttpStatusCode,
20 VideoPlaylist, 20 VideoPlaylist,
diff --git a/server/tests/api/videos/video-privacy.ts b/server/tests/api/videos/video-privacy.ts
index 08b624ff3..13eb941ea 100644
--- a/server/tests/api/videos/video-privacy.ts
+++ b/server/tests/api/videos/video-privacy.ts
@@ -10,7 +10,7 @@ import {
10 setAccessTokensToServers, 10 setAccessTokensToServers,
11 wait, 11 wait,
12 waitJobs 12 waitJobs
13} from '@shared/extra-utils' 13} from '@shared/server-commands'
14import { HttpStatusCode, VideoCreateResult, VideoPrivacy } from '@shared/models' 14import { HttpStatusCode, VideoCreateResult, VideoPrivacy } from '@shared/models'
15 15
16const expect = chai.expect 16const expect = chai.expect
diff --git a/server/tests/api/videos/video-schedule-update.ts b/server/tests/api/videos/video-schedule-update.ts
index 3f7738784..9408574ad 100644
--- a/server/tests/api/videos/video-schedule-update.ts
+++ b/server/tests/api/videos/video-schedule-update.ts
@@ -10,7 +10,7 @@ import {
10 setAccessTokensToServers, 10 setAccessTokensToServers,
11 wait, 11 wait,
12 waitJobs 12 waitJobs
13} from '@shared/extra-utils' 13} from '@shared/server-commands'
14import { VideoPrivacy } from '@shared/models' 14import { VideoPrivacy } from '@shared/models'
15 15
16const expect = chai.expect 16const expect = chai.expect
diff --git a/server/tests/api/videos/video-transcoder.ts b/server/tests/api/videos/video-transcoder.ts
index 7ed55b8e8..f4b0bc53a 100644
--- a/server/tests/api/videos/video-transcoder.ts
+++ b/server/tests/api/videos/video-transcoder.ts
@@ -16,7 +16,7 @@ import {
16 setAccessTokensToServers, 16 setAccessTokensToServers,
17 waitJobs, 17 waitJobs,
18 webtorrentAdd 18 webtorrentAdd
19} from '@shared/extra-utils' 19} from '@shared/server-commands'
20import { HttpStatusCode, VideoState } from '@shared/models' 20import { HttpStatusCode, VideoState } from '@shared/models'
21import { 21import {
22 canDoQuickTranscode, 22 canDoQuickTranscode,
diff --git a/server/tests/api/videos/videos-common-filters.ts b/server/tests/api/videos/videos-common-filters.ts
index ca5f42173..0254662c5 100644
--- a/server/tests/api/videos/videos-common-filters.ts
+++ b/server/tests/api/videos/videos-common-filters.ts
@@ -12,7 +12,7 @@ import {
12 setAccessTokensToServers, 12 setAccessTokensToServers,
13 setDefaultVideoChannel, 13 setDefaultVideoChannel,
14 waitJobs 14 waitJobs
15} from '@shared/extra-utils' 15} from '@shared/server-commands'
16import { HttpStatusCode, UserRole, Video, VideoDetails, VideoInclude, VideoPrivacy } from '@shared/models' 16import { HttpStatusCode, UserRole, Video, VideoDetails, VideoInclude, VideoPrivacy } from '@shared/models'
17 17
18describe('Test videos filter', function () { 18describe('Test videos filter', function () {
diff --git a/server/tests/api/videos/videos-history.ts b/server/tests/api/videos/videos-history.ts
index e4bc0bb3a..813fc4f45 100644
--- a/server/tests/api/videos/videos-history.ts
+++ b/server/tests/api/videos/videos-history.ts
@@ -10,7 +10,7 @@ import {
10 PeerTubeServer, 10 PeerTubeServer,
11 setAccessTokensToServers, 11 setAccessTokensToServers,
12 wait 12 wait
13} from '@shared/extra-utils' 13} from '@shared/server-commands'
14import { HttpStatusCode, Video } from '@shared/models' 14import { HttpStatusCode, Video } from '@shared/models'
15 15
16const expect = chai.expect 16const expect = chai.expect
diff --git a/server/tests/api/videos/videos-overview.ts b/server/tests/api/videos/videos-overview.ts
index 70aa66549..08a4efb63 100644
--- a/server/tests/api/videos/videos-overview.ts
+++ b/server/tests/api/videos/videos-overview.ts
@@ -2,7 +2,7 @@
2 2
3import 'mocha' 3import 'mocha'
4import * as chai from 'chai' 4import * as chai from 'chai'
5import { cleanupTests, createSingleServer, PeerTubeServer, setAccessTokensToServers, wait } from '@shared/extra-utils' 5import { cleanupTests, createSingleServer, PeerTubeServer, setAccessTokensToServers, wait } from '@shared/server-commands'
6import { VideosOverview } from '@shared/models' 6import { VideosOverview } from '@shared/models'
7 7
8const expect = chai.expect 8const expect = chai.expect
diff --git a/server/tests/api/videos/videos-views-cleaner.ts b/server/tests/api/videos/videos-views-cleaner.ts
index 82268b1be..7f7597af4 100644
--- a/server/tests/api/videos/videos-views-cleaner.ts
+++ b/server/tests/api/videos/videos-views-cleaner.ts
@@ -11,7 +11,7 @@ import {
11 setAccessTokensToServers, 11 setAccessTokensToServers,
12 wait, 12 wait,
13 waitJobs 13 waitJobs
14} from '../../../../shared/extra-utils' 14} from '../../../../shared/server-commands'
15 15
16const expect = chai.expect 16const expect = chai.expect
17 17
diff --git a/server/tests/cli/create-import-video-file-job.ts b/server/tests/cli/create-import-video-file-job.ts
index c06b9550c..5973272e5 100644
--- a/server/tests/cli/create-import-video-file-job.ts
+++ b/server/tests/cli/create-import-video-file-job.ts
@@ -13,7 +13,7 @@ import {
13 PeerTubeServer, 13 PeerTubeServer,
14 setAccessTokensToServers, 14 setAccessTokensToServers,
15 waitJobs 15 waitJobs
16} from '@shared/extra-utils' 16} from '@shared/server-commands'
17import { HttpStatusCode, VideoDetails, VideoFile, VideoInclude } from '@shared/models' 17import { HttpStatusCode, VideoDetails, VideoFile, VideoInclude } from '@shared/models'
18 18
19const expect = chai.expect 19const expect = chai.expect
diff --git a/server/tests/cli/create-move-video-storage-job.ts b/server/tests/cli/create-move-video-storage-job.ts
index b598c8359..8b66f24bf 100644
--- a/server/tests/cli/create-move-video-storage-job.ts
+++ b/server/tests/cli/create-move-video-storage-job.ts
@@ -13,7 +13,7 @@ import {
13 PeerTubeServer, 13 PeerTubeServer,
14 setAccessTokensToServers, 14 setAccessTokensToServers,
15 waitJobs 15 waitJobs
16} from '@shared/extra-utils' 16} from '@shared/server-commands'
17import { HttpStatusCode, VideoDetails } from '@shared/models' 17import { HttpStatusCode, VideoDetails } from '@shared/models'
18 18
19async function checkFiles (origin: PeerTubeServer, video: VideoDetails, inObjectStorage: boolean) { 19async function checkFiles (origin: PeerTubeServer, video: VideoDetails, inObjectStorage: boolean) {
diff --git a/server/tests/cli/create-transcoding-job.ts b/server/tests/cli/create-transcoding-job.ts
index fb9c2584f..ea3428662 100644
--- a/server/tests/cli/create-transcoding-job.ts
+++ b/server/tests/cli/create-transcoding-job.ts
@@ -14,7 +14,7 @@ import {
14 PeerTubeServer, 14 PeerTubeServer,
15 setAccessTokensToServers, 15 setAccessTokensToServers,
16 waitJobs 16 waitJobs
17} from '../../../shared/extra-utils' 17} from '../../../shared/server-commands'
18 18
19const expect = chai.expect 19const expect = chai.expect
20 20
diff --git a/server/tests/cli/peertube.ts b/server/tests/cli/peertube.ts
index 3ac440f84..72213473b 100644
--- a/server/tests/cli/peertube.ts
+++ b/server/tests/cli/peertube.ts
@@ -14,7 +14,7 @@ import {
14 setAccessTokensToServers, 14 setAccessTokensToServers,
15 testHelloWorldRegisteredSettings, 15 testHelloWorldRegisteredSettings,
16 waitJobs 16 waitJobs
17} from '../../../shared/extra-utils' 17} from '../../../shared/server-commands'
18 18
19describe('Test CLI wrapper', function () { 19describe('Test CLI wrapper', function () {
20 let server: PeerTubeServer 20 let server: PeerTubeServer
diff --git a/server/tests/cli/plugins.ts b/server/tests/cli/plugins.ts
index 07c78cc89..d9cf9465c 100644
--- a/server/tests/cli/plugins.ts
+++ b/server/tests/cli/plugins.ts
@@ -9,7 +9,7 @@ import {
9 PeerTubeServer, 9 PeerTubeServer,
10 PluginsCommand, 10 PluginsCommand,
11 setAccessTokensToServers 11 setAccessTokensToServers
12} from '../../../shared/extra-utils' 12} from '../../../shared/server-commands'
13 13
14describe('Test plugin scripts', function () { 14describe('Test plugin scripts', function () {
15 let server: PeerTubeServer 15 let server: PeerTubeServer
diff --git a/server/tests/cli/print-transcode-command.ts b/server/tests/cli/print-transcode-command.ts
index 0b8629251..36c43c6df 100644
--- a/server/tests/cli/print-transcode-command.ts
+++ b/server/tests/cli/print-transcode-command.ts
@@ -2,7 +2,7 @@
2 2
3import 'mocha' 3import 'mocha'
4import * as chai from 'chai' 4import * as chai from 'chai'
5import { buildAbsoluteFixturePath, CLICommand } from '@shared/extra-utils' 5import { buildAbsoluteFixturePath, CLICommand } from '@shared/server-commands'
6import { VideoResolution } from '../../../shared/models/videos' 6import { VideoResolution } from '../../../shared/models/videos'
7 7
8const expect = chai.expect 8const expect = chai.expect
diff --git a/server/tests/cli/prune-storage.ts b/server/tests/cli/prune-storage.ts
index 4b4f75527..e0bc6a589 100644
--- a/server/tests/cli/prune-storage.ts
+++ b/server/tests/cli/prune-storage.ts
@@ -17,7 +17,7 @@ import {
17 setDefaultVideoChannel, 17 setDefaultVideoChannel,
18 wait, 18 wait,
19 waitJobs 19 waitJobs
20} from '@shared/extra-utils' 20} from '@shared/server-commands'
21import { HttpStatusCode, VideoPlaylistPrivacy } from '@shared/models' 21import { HttpStatusCode, VideoPlaylistPrivacy } from '@shared/models'
22 22
23const expect = chai.expect 23const expect = chai.expect
diff --git a/server/tests/cli/regenerate-thumbnails.ts b/server/tests/cli/regenerate-thumbnails.ts
index 780c9b4bd..98d15272a 100644
--- a/server/tests/cli/regenerate-thumbnails.ts
+++ b/server/tests/cli/regenerate-thumbnails.ts
@@ -11,7 +11,7 @@ import {
11 PeerTubeServer, 11 PeerTubeServer,
12 setAccessTokensToServers, 12 setAccessTokensToServers,
13 waitJobs 13 waitJobs
14} from '../../../shared/extra-utils' 14} from '../../../shared/server-commands'
15 15
16async function testThumbnail (server: PeerTubeServer, videoId: number | string) { 16async function testThumbnail (server: PeerTubeServer, videoId: number | string) {
17 const video = await server.videos.get({ id: videoId }) 17 const video = await server.videos.get({ id: videoId })
diff --git a/server/tests/cli/reset-password.ts b/server/tests/cli/reset-password.ts
index 4a02db35d..34dedb113 100644
--- a/server/tests/cli/reset-password.ts
+++ b/server/tests/cli/reset-password.ts
@@ -1,5 +1,5 @@
1import 'mocha' 1import 'mocha'
2import { cleanupTests, CLICommand, createSingleServer, PeerTubeServer, setAccessTokensToServers } from '../../../shared/extra-utils' 2import { cleanupTests, CLICommand, createSingleServer, PeerTubeServer, setAccessTokensToServers } from '../../../shared/server-commands'
3 3
4describe('Test reset password scripts', function () { 4describe('Test reset password scripts', function () {
5 let server: PeerTubeServer 5 let server: PeerTubeServer
diff --git a/server/tests/cli/update-host.ts b/server/tests/cli/update-host.ts
index 43fbaec30..da89ff153 100644
--- a/server/tests/cli/update-host.ts
+++ b/server/tests/cli/update-host.ts
@@ -11,7 +11,7 @@ import {
11 PeerTubeServer, 11 PeerTubeServer,
12 setAccessTokensToServers, 12 setAccessTokensToServers,
13 waitJobs 13 waitJobs
14} from '@shared/extra-utils' 14} from '@shared/server-commands'
15 15
16describe('Test update host scripts', function () { 16describe('Test update host scripts', function () {
17 let server: PeerTubeServer 17 let server: PeerTubeServer
diff --git a/server/tests/client.ts b/server/tests/client.ts
index a91bec906..fe048d7ff 100644
--- a/server/tests/client.ts
+++ b/server/tests/client.ts
@@ -14,7 +14,7 @@ import {
14 setAccessTokensToServers, 14 setAccessTokensToServers,
15 setDefaultVideoChannel, 15 setDefaultVideoChannel,
16 waitJobs 16 waitJobs
17} from '../../shared/extra-utils' 17} from '../../shared/server-commands'
18 18
19const expect = chai.expect 19const expect = chai.expect
20 20
diff --git a/server/tests/external-plugins/auth-ldap.ts b/server/tests/external-plugins/auth-ldap.ts
index acec69df5..326453a5f 100644
--- a/server/tests/external-plugins/auth-ldap.ts
+++ b/server/tests/external-plugins/auth-ldap.ts
@@ -2,7 +2,7 @@
2 2
3import 'mocha' 3import 'mocha'
4import { expect } from 'chai' 4import { expect } from 'chai'
5import { cleanupTests, createSingleServer, PeerTubeServer, setAccessTokensToServers } from '@shared/extra-utils' 5import { cleanupTests, createSingleServer, PeerTubeServer, setAccessTokensToServers } from '@shared/server-commands'
6import { HttpStatusCode } from '@shared/models' 6import { HttpStatusCode } from '@shared/models'
7 7
8describe('Official plugin auth-ldap', function () { 8describe('Official plugin auth-ldap', function () {
diff --git a/server/tests/external-plugins/auto-block-videos.ts b/server/tests/external-plugins/auto-block-videos.ts
index 0eb4bda9a..2f75ad25b 100644
--- a/server/tests/external-plugins/auto-block-videos.ts
+++ b/server/tests/external-plugins/auto-block-videos.ts
@@ -11,7 +11,7 @@ import {
11 PeerTubeServer, 11 PeerTubeServer,
12 setAccessTokensToServers, 12 setAccessTokensToServers,
13 wait 13 wait
14} from '@shared/extra-utils' 14} from '@shared/server-commands'
15import { Video } from '@shared/models' 15import { Video } from '@shared/models'
16 16
17async function check (server: PeerTubeServer, videoUUID: string, exists = true) { 17async function check (server: PeerTubeServer, videoUUID: string, exists = true) {
diff --git a/server/tests/external-plugins/auto-mute.ts b/server/tests/external-plugins/auto-mute.ts
index 271779dd4..bfa67e7ad 100644
--- a/server/tests/external-plugins/auto-mute.ts
+++ b/server/tests/external-plugins/auto-mute.ts
@@ -12,7 +12,7 @@ import {
12 PeerTubeServer, 12 PeerTubeServer,
13 setAccessTokensToServers, 13 setAccessTokensToServers,
14 wait 14 wait
15} from '@shared/extra-utils' 15} from '@shared/server-commands'
16import { HttpStatusCode } from '@shared/models' 16import { HttpStatusCode } from '@shared/models'
17 17
18describe('Official plugin auto-mute', function () { 18describe('Official plugin auto-mute', function () {
diff --git a/server/tests/feeds/feeds.ts b/server/tests/feeds/feeds.ts
index a1c976fd3..bf030162e 100644
--- a/server/tests/feeds/feeds.ts
+++ b/server/tests/feeds/feeds.ts
@@ -12,7 +12,7 @@ import {
12 PeerTubeServer, 12 PeerTubeServer,
13 setAccessTokensToServers, 13 setAccessTokensToServers,
14 waitJobs 14 waitJobs
15} from '@shared/extra-utils' 15} from '@shared/server-commands'
16import { HttpStatusCode, VideoPrivacy } from '@shared/models' 16import { HttpStatusCode, VideoPrivacy } from '@shared/models'
17 17
18chai.use(require('chai-xml')) 18chai.use(require('chai-xml'))
diff --git a/server/tests/helpers/image.ts b/server/tests/helpers/image.ts
index 9fe9aa4cb..330139ee4 100644
--- a/server/tests/helpers/image.ts
+++ b/server/tests/helpers/image.ts
@@ -5,7 +5,7 @@ import { expect } from 'chai'
5import { readFile, remove } from 'fs-extra' 5import { readFile, remove } from 'fs-extra'
6import { join } from 'path' 6import { join } from 'path'
7import { processImage } from '../../../server/helpers/image-utils' 7import { processImage } from '../../../server/helpers/image-utils'
8import { buildAbsoluteFixturePath, root } from '../../../shared/extra-utils' 8import { buildAbsoluteFixturePath, root } from '../../../shared/server-commands'
9 9
10async function checkBuffers (path1: string, path2: string, equals: boolean) { 10async function checkBuffers (path1: string, path2: string, equals: boolean) {
11 const [ buf1, buf2 ] = await Promise.all([ 11 const [ buf1, buf2 ] = await Promise.all([
diff --git a/server/tests/helpers/request.ts b/server/tests/helpers/request.ts
index 6edbf2a76..db0cca390 100644
--- a/server/tests/helpers/request.ts
+++ b/server/tests/helpers/request.ts
@@ -4,8 +4,8 @@ import 'mocha'
4import { expect } from 'chai' 4import { expect } from 'chai'
5import { pathExists, remove } from 'fs-extra' 5import { pathExists, remove } from 'fs-extra'
6import { join } from 'path' 6import { join } from 'path'
7import { Mock429 } from '@shared/extra-utils/mock-servers/mock-429' 7import { Mock429 } from '@shared/server-commands/mock-servers/mock-429'
8import { FIXTURE_URLS, root, wait } from '../../../shared/extra-utils' 8import { FIXTURE_URLS, root, wait } from '../../../shared/server-commands'
9import { doRequest, doRequestAndSaveToFile } from '../../helpers/requests' 9import { doRequest, doRequestAndSaveToFile } from '../../helpers/requests'
10 10
11describe('Request helpers', function () { 11describe('Request helpers', function () {
diff --git a/server/tests/misc-endpoints.ts b/server/tests/misc-endpoints.ts
index 4968eef08..876546d89 100644
--- a/server/tests/misc-endpoints.ts
+++ b/server/tests/misc-endpoints.ts
@@ -2,7 +2,7 @@
2 2
3import 'mocha' 3import 'mocha'
4import * as chai from 'chai' 4import * as chai from 'chai'
5import { cleanupTests, createSingleServer, makeGetRequest, PeerTubeServer, setAccessTokensToServers } from '@shared/extra-utils' 5import { cleanupTests, createSingleServer, makeGetRequest, PeerTubeServer, setAccessTokensToServers } from '@shared/server-commands'
6import { HttpStatusCode, VideoPrivacy } from '@shared/models' 6import { HttpStatusCode, VideoPrivacy } from '@shared/models'
7 7
8const expect = chai.expect 8const expect = chai.expect
diff --git a/server/tests/plugins/action-hooks.ts b/server/tests/plugins/action-hooks.ts
index 4c1bc7d06..686926c17 100644
--- a/server/tests/plugins/action-hooks.ts
+++ b/server/tests/plugins/action-hooks.ts
@@ -9,7 +9,7 @@ import {
9 PluginsCommand, 9 PluginsCommand,
10 setAccessTokensToServers, 10 setAccessTokensToServers,
11 setDefaultVideoChannel 11 setDefaultVideoChannel
12} from '@shared/extra-utils' 12} from '@shared/server-commands'
13import { ServerHookName, VideoPlaylistPrivacy, VideoPrivacy } from '@shared/models' 13import { ServerHookName, VideoPlaylistPrivacy, VideoPrivacy } from '@shared/models'
14 14
15describe('Test plugin action hooks', function () { 15describe('Test plugin action hooks', function () {
diff --git a/server/tests/plugins/external-auth.ts b/server/tests/plugins/external-auth.ts
index 25b25bfee..a4a3764f5 100644
--- a/server/tests/plugins/external-auth.ts
+++ b/server/tests/plugins/external-auth.ts
@@ -10,7 +10,7 @@ import {
10 PluginsCommand, 10 PluginsCommand,
11 setAccessTokensToServers, 11 setAccessTokensToServers,
12 wait 12 wait
13} from '@shared/extra-utils' 13} from '@shared/server-commands'
14import { HttpStatusCode, UserRole } from '@shared/models' 14import { HttpStatusCode, UserRole } from '@shared/models'
15 15
16async function loginExternal (options: { 16async function loginExternal (options: {
diff --git a/server/tests/plugins/filter-hooks.ts b/server/tests/plugins/filter-hooks.ts
index ff2afc56b..a84edfac6 100644
--- a/server/tests/plugins/filter-hooks.ts
+++ b/server/tests/plugins/filter-hooks.ts
@@ -13,7 +13,7 @@ import {
13 setAccessTokensToServers, 13 setAccessTokensToServers,
14 setDefaultVideoChannel, 14 setDefaultVideoChannel,
15 waitJobs 15 waitJobs
16} from '@shared/extra-utils' 16} from '@shared/server-commands'
17import { HttpStatusCode, VideoDetails, VideoImportState, VideoPlaylist, VideoPlaylistPrivacy, VideoPrivacy } from '@shared/models' 17import { HttpStatusCode, VideoDetails, VideoImportState, VideoPlaylist, VideoPlaylistPrivacy, VideoPrivacy } from '@shared/models'
18 18
19const expect = chai.expect 19const expect = chai.expect
diff --git a/server/tests/plugins/html-injection.ts b/server/tests/plugins/html-injection.ts
index 95c0cd687..9e10d3302 100644
--- a/server/tests/plugins/html-injection.ts
+++ b/server/tests/plugins/html-injection.ts
@@ -9,7 +9,7 @@ import {
9 PeerTubeServer, 9 PeerTubeServer,
10 PluginsCommand, 10 PluginsCommand,
11 setAccessTokensToServers 11 setAccessTokensToServers
12} from '../../../shared/extra-utils' 12} from '../../../shared/server-commands'
13 13
14const expect = chai.expect 14const expect = chai.expect
15 15
diff --git a/server/tests/plugins/id-and-pass-auth.ts b/server/tests/plugins/id-and-pass-auth.ts
index fde0166f9..ea3b0f6ab 100644
--- a/server/tests/plugins/id-and-pass-auth.ts
+++ b/server/tests/plugins/id-and-pass-auth.ts
@@ -2,7 +2,7 @@
2 2
3import 'mocha' 3import 'mocha'
4import { expect } from 'chai' 4import { expect } from 'chai'
5import { cleanupTests, createSingleServer, PeerTubeServer, PluginsCommand, setAccessTokensToServers, wait } from '@shared/extra-utils' 5import { cleanupTests, createSingleServer, PeerTubeServer, PluginsCommand, setAccessTokensToServers, wait } from '@shared/server-commands'
6import { HttpStatusCode, UserRole } from '@shared/models' 6import { HttpStatusCode, UserRole } from '@shared/models'
7 7
8describe('Test id and pass auth plugins', function () { 8describe('Test id and pass auth plugins', function () {
diff --git a/server/tests/plugins/plugin-helpers.ts b/server/tests/plugins/plugin-helpers.ts
index da84658bb..4ab4acd58 100644
--- a/server/tests/plugins/plugin-helpers.ts
+++ b/server/tests/plugins/plugin-helpers.ts
@@ -15,7 +15,7 @@ import {
15 PluginsCommand, 15 PluginsCommand,
16 setAccessTokensToServers, 16 setAccessTokensToServers,
17 waitJobs 17 waitJobs
18} from '@shared/extra-utils' 18} from '@shared/server-commands'
19import { HttpStatusCode, ThumbnailType } from '@shared/models' 19import { HttpStatusCode, ThumbnailType } from '@shared/models'
20 20
21function postCommand (server: PeerTubeServer, command: string, bodyArg?: object) { 21function postCommand (server: PeerTubeServer, command: string, bodyArg?: object) {
diff --git a/server/tests/plugins/plugin-router.ts b/server/tests/plugins/plugin-router.ts
index b1ac9e2fe..58629adc7 100644
--- a/server/tests/plugins/plugin-router.ts
+++ b/server/tests/plugins/plugin-router.ts
@@ -10,7 +10,7 @@ import {
10 PeerTubeServer, 10 PeerTubeServer,
11 PluginsCommand, 11 PluginsCommand,
12 setAccessTokensToServers 12 setAccessTokensToServers
13} from '@shared/extra-utils' 13} from '@shared/server-commands'
14import { HttpStatusCode } from '@shared/models' 14import { HttpStatusCode } from '@shared/models'
15 15
16describe('Test plugin helpers', function () { 16describe('Test plugin helpers', function () {
diff --git a/server/tests/plugins/plugin-storage.ts b/server/tests/plugins/plugin-storage.ts
index c0596819e..0bfc4fe28 100644
--- a/server/tests/plugins/plugin-storage.ts
+++ b/server/tests/plugins/plugin-storage.ts
@@ -11,7 +11,7 @@ import {
11 PeerTubeServer, 11 PeerTubeServer,
12 PluginsCommand, 12 PluginsCommand,
13 setAccessTokensToServers 13 setAccessTokensToServers
14} from '@shared/extra-utils' 14} from '@shared/server-commands'
15import { HttpStatusCode } from '@shared/models' 15import { HttpStatusCode } from '@shared/models'
16 16
17describe('Test plugin storage', function () { 17describe('Test plugin storage', function () {
diff --git a/server/tests/plugins/plugin-transcoding.ts b/server/tests/plugins/plugin-transcoding.ts
index 93637e3ce..5ab686472 100644
--- a/server/tests/plugins/plugin-transcoding.ts
+++ b/server/tests/plugins/plugin-transcoding.ts
@@ -12,7 +12,7 @@ import {
12 setDefaultVideoChannel, 12 setDefaultVideoChannel,
13 testFfmpegStreamError, 13 testFfmpegStreamError,
14 waitJobs 14 waitJobs
15} from '@shared/extra-utils' 15} from '@shared/server-commands'
16import { VideoPrivacy } from '@shared/models' 16import { VideoPrivacy } from '@shared/models'
17 17
18async function createLiveWrapper (server: PeerTubeServer) { 18async function createLiveWrapper (server: PeerTubeServer) {
diff --git a/server/tests/plugins/plugin-unloading.ts b/server/tests/plugins/plugin-unloading.ts
index 6bf2fda9b..a94b83695 100644
--- a/server/tests/plugins/plugin-unloading.ts
+++ b/server/tests/plugins/plugin-unloading.ts
@@ -9,7 +9,7 @@ import {
9 PeerTubeServer, 9 PeerTubeServer,
10 PluginsCommand, 10 PluginsCommand,
11 setAccessTokensToServers 11 setAccessTokensToServers
12} from '@shared/extra-utils' 12} from '@shared/server-commands'
13import { HttpStatusCode } from '@shared/models' 13import { HttpStatusCode } from '@shared/models'
14 14
15describe('Test plugins module unloading', function () { 15describe('Test plugins module unloading', function () {
diff --git a/server/tests/plugins/translations.ts b/server/tests/plugins/translations.ts
index 8b25c6b75..0b6e5793d 100644
--- a/server/tests/plugins/translations.ts
+++ b/server/tests/plugins/translations.ts
@@ -2,7 +2,7 @@
2 2
3import 'mocha' 3import 'mocha'
4import * as chai from 'chai' 4import * as chai from 'chai'
5import { cleanupTests, createSingleServer, PeerTubeServer, PluginsCommand, setAccessTokensToServers } from '@shared/extra-utils' 5import { cleanupTests, createSingleServer, PeerTubeServer, PluginsCommand, setAccessTokensToServers } from '@shared/server-commands'
6 6
7const expect = chai.expect 7const expect = chai.expect
8 8
diff --git a/server/tests/plugins/video-constants.ts b/server/tests/plugins/video-constants.ts
index 19cba6c2c..6dce6922f 100644
--- a/server/tests/plugins/video-constants.ts
+++ b/server/tests/plugins/video-constants.ts
@@ -9,7 +9,7 @@ import {
9 PeerTubeServer, 9 PeerTubeServer,
10 PluginsCommand, 10 PluginsCommand,
11 setAccessTokensToServers 11 setAccessTokensToServers
12} from '@shared/extra-utils' 12} from '@shared/server-commands'
13import { HttpStatusCode, VideoPlaylistPrivacy } from '@shared/models' 13import { HttpStatusCode, VideoPlaylistPrivacy } from '@shared/models'
14 14
15const expect = chai.expect 15const expect = chai.expect
diff --git a/server/tests/shared/video.ts b/server/tests/shared/video.ts
index 95b30b27c..cf923d4cd 100644
--- a/server/tests/shared/video.ts
+++ b/server/tests/shared/video.ts
@@ -1,5 +1,5 @@
1/* eslint-disable @typescript-eslint/no-unused-expressions */ 1/* eslint-disable @typescript-eslint/no-unused-expressions */
2import { dateIsValid, makeRawRequest, PeerTubeServer, testImage, webtorrentAdd } from '@shared/extra-utils' 2import { dateIsValid, makeRawRequest, PeerTubeServer, testImage, webtorrentAdd } from '@shared/server-commands'
3import { expect } from 'chai' 3import { expect } from 'chai'
4import { loadLanguages, VIDEO_CATEGORIES, VIDEO_LANGUAGES, VIDEO_LICENCES, VIDEO_PRIVACIES } from '@server/initializers/constants' 4import { loadLanguages, VIDEO_CATEGORIES, VIDEO_LANGUAGES, VIDEO_LICENCES, VIDEO_PRIVACIES } from '@server/initializers/constants'
5import { getLowercaseExtension, uuidRegex } from '@shared/core-utils' 5import { getLowercaseExtension, uuidRegex } from '@shared/core-utils'
diff --git a/server/tools/cli.ts b/server/tools/cli.ts
index 7c763734f..00adcedeb 100644
--- a/server/tools/cli.ts
+++ b/server/tools/cli.ts
@@ -2,7 +2,7 @@ import { Command } from 'commander'
2import { Netrc } from 'netrc-parser' 2import { Netrc } from 'netrc-parser'
3import { join } from 'path' 3import { join } from 'path'
4import { createLogger, format, transports } from 'winston' 4import { createLogger, format, transports } from 'winston'
5import { PeerTubeServer } from '@shared/extra-utils' 5import { PeerTubeServer } from '@shared/server-commands'
6import { UserRole } from '@shared/models' 6import { UserRole } from '@shared/models'
7import { VideoPrivacy } from '../../shared/models/videos' 7import { VideoPrivacy } from '../../shared/models/videos'
8import { getAppNumber, isTestInstance } from '../helpers/core-utils' 8import { getAppNumber, isTestInstance } from '../helpers/core-utils'
diff --git a/server/tools/peertube-import-videos.ts b/server/tools/peertube-import-videos.ts
index 223bf7f1b..8314551f6 100644
--- a/server/tools/peertube-import-videos.ts
+++ b/server/tools/peertube-import-videos.ts
@@ -15,7 +15,7 @@ import {
15 getLogger, 15 getLogger,
16 getServerCredentials 16 getServerCredentials
17} from './cli' 17} from './cli'
18import { wait } from '@shared/extra-utils' 18import { wait } from '@shared/server-commands'
19import { YoutubeDLCLI, YoutubeDLInfo, YoutubeDLInfoBuilder } from '@server/helpers/youtube-dl' 19import { YoutubeDLCLI, YoutubeDLInfo, YoutubeDLInfoBuilder } from '@server/helpers/youtube-dl'
20import prompt = require('prompt') 20import prompt = require('prompt')
21 21
diff --git a/shared/extra-utils/index.ts b/shared/extra-utils/index.ts
index 4b3636d06..5710c5ab5 100644
--- a/shared/extra-utils/index.ts
+++ b/shared/extra-utils/index.ts
@@ -1,15 +1 @@
1export * from './bulk' export * from './ffprobe'
2export * from './cli'
3export * from './custom-pages'
4export * from './feeds'
5export * from './logs'
6export * from './miscs'
7export * from './mock-servers'
8export * from './moderation'
9export * from './overviews'
10export * from './requests'
11export * from './search'
12export * from './server'
13export * from './socket'
14export * from './users'
15export * from './videos'
diff --git a/shared/extra-utils/bulk/bulk-command.ts b/shared/server-commands/bulk/bulk-command.ts
index b5c5673ce..b5c5673ce 100644
--- a/shared/extra-utils/bulk/bulk-command.ts
+++ b/shared/server-commands/bulk/bulk-command.ts
diff --git a/shared/extra-utils/bulk/index.ts b/shared/server-commands/bulk/index.ts
index 391597243..391597243 100644
--- a/shared/extra-utils/bulk/index.ts
+++ b/shared/server-commands/bulk/index.ts
diff --git a/shared/extra-utils/cli/cli-command.ts b/shared/server-commands/cli/cli-command.ts
index ab9738174..ab9738174 100644
--- a/shared/extra-utils/cli/cli-command.ts
+++ b/shared/server-commands/cli/cli-command.ts
diff --git a/shared/extra-utils/cli/index.ts b/shared/server-commands/cli/index.ts
index 91b5abfbe..91b5abfbe 100644
--- a/shared/extra-utils/cli/index.ts
+++ b/shared/server-commands/cli/index.ts
diff --git a/shared/extra-utils/custom-pages/custom-pages-command.ts b/shared/server-commands/custom-pages/custom-pages-command.ts
index cd869a8de..cd869a8de 100644
--- a/shared/extra-utils/custom-pages/custom-pages-command.ts
+++ b/shared/server-commands/custom-pages/custom-pages-command.ts
diff --git a/shared/extra-utils/custom-pages/index.ts b/shared/server-commands/custom-pages/index.ts
index 58aed04f2..58aed04f2 100644
--- a/shared/extra-utils/custom-pages/index.ts
+++ b/shared/server-commands/custom-pages/index.ts
diff --git a/shared/extra-utils/feeds/feeds-command.ts b/shared/server-commands/feeds/feeds-command.ts
index 3c95f9536..3c95f9536 100644
--- a/shared/extra-utils/feeds/feeds-command.ts
+++ b/shared/server-commands/feeds/feeds-command.ts
diff --git a/shared/extra-utils/feeds/index.ts b/shared/server-commands/feeds/index.ts
index 662a22b6f..662a22b6f 100644
--- a/shared/extra-utils/feeds/index.ts
+++ b/shared/server-commands/feeds/index.ts
diff --git a/shared/server-commands/index.ts b/shared/server-commands/index.ts
new file mode 100644
index 000000000..4b3636d06
--- /dev/null
+++ b/shared/server-commands/index.ts
@@ -0,0 +1,15 @@
1export * from './bulk'
2export * from './cli'
3export * from './custom-pages'
4export * from './feeds'
5export * from './logs'
6export * from './miscs'
7export * from './mock-servers'
8export * from './moderation'
9export * from './overviews'
10export * from './requests'
11export * from './search'
12export * from './server'
13export * from './socket'
14export * from './users'
15export * from './videos'
diff --git a/shared/extra-utils/logs/index.ts b/shared/server-commands/logs/index.ts
index 69452d7f0..69452d7f0 100644
--- a/shared/extra-utils/logs/index.ts
+++ b/shared/server-commands/logs/index.ts
diff --git a/shared/extra-utils/logs/logs-command.ts b/shared/server-commands/logs/logs-command.ts
index 7b5c66c0c..7b5c66c0c 100644
--- a/shared/extra-utils/logs/logs-command.ts
+++ b/shared/server-commands/logs/logs-command.ts
diff --git a/shared/extra-utils/miscs/checks.ts b/shared/server-commands/miscs/checks.ts
index 589928997..589928997 100644
--- a/shared/extra-utils/miscs/checks.ts
+++ b/shared/server-commands/miscs/checks.ts
diff --git a/shared/extra-utils/miscs/generate.ts b/shared/server-commands/miscs/generate.ts
index 93673a063..93673a063 100644
--- a/shared/extra-utils/miscs/generate.ts
+++ b/shared/server-commands/miscs/generate.ts
diff --git a/shared/extra-utils/miscs/index.ts b/shared/server-commands/miscs/index.ts
index 4474661de..4474661de 100644
--- a/shared/extra-utils/miscs/index.ts
+++ b/shared/server-commands/miscs/index.ts
diff --git a/shared/extra-utils/miscs/sql-command.ts b/shared/server-commands/miscs/sql-command.ts
index bedb3349b..bedb3349b 100644
--- a/shared/extra-utils/miscs/sql-command.ts
+++ b/shared/server-commands/miscs/sql-command.ts
diff --git a/shared/extra-utils/miscs/tests.ts b/shared/server-commands/miscs/tests.ts
index 658fe5fd3..658fe5fd3 100644
--- a/shared/extra-utils/miscs/tests.ts
+++ b/shared/server-commands/miscs/tests.ts
diff --git a/shared/extra-utils/miscs/webtorrent.ts b/shared/server-commands/miscs/webtorrent.ts
index 0683f8893..0683f8893 100644
--- a/shared/extra-utils/miscs/webtorrent.ts
+++ b/shared/server-commands/miscs/webtorrent.ts
diff --git a/shared/extra-utils/mock-servers/index.ts b/shared/server-commands/mock-servers/index.ts
index 93c00c788..93c00c788 100644
--- a/shared/extra-utils/mock-servers/index.ts
+++ b/shared/server-commands/mock-servers/index.ts
diff --git a/shared/extra-utils/mock-servers/mock-429.ts b/shared/server-commands/mock-servers/mock-429.ts
index 9e0d1281a..9e0d1281a 100644
--- a/shared/extra-utils/mock-servers/mock-429.ts
+++ b/shared/server-commands/mock-servers/mock-429.ts
diff --git a/shared/extra-utils/mock-servers/mock-email.ts b/shared/server-commands/mock-servers/mock-email.ts
index f646c1621..f646c1621 100644
--- a/shared/extra-utils/mock-servers/mock-email.ts
+++ b/shared/server-commands/mock-servers/mock-email.ts
diff --git a/shared/extra-utils/mock-servers/mock-instances-index.ts b/shared/server-commands/mock-servers/mock-instances-index.ts
index 92b12d6f3..92b12d6f3 100644
--- a/shared/extra-utils/mock-servers/mock-instances-index.ts
+++ b/shared/server-commands/mock-servers/mock-instances-index.ts
diff --git a/shared/extra-utils/mock-servers/mock-joinpeertube-versions.ts b/shared/server-commands/mock-servers/mock-joinpeertube-versions.ts
index e7906ea56..e7906ea56 100644
--- a/shared/extra-utils/mock-servers/mock-joinpeertube-versions.ts
+++ b/shared/server-commands/mock-servers/mock-joinpeertube-versions.ts
diff --git a/shared/extra-utils/mock-servers/mock-object-storage.ts b/shared/server-commands/mock-servers/mock-object-storage.ts
index d135c2631..d135c2631 100644
--- a/shared/extra-utils/mock-servers/mock-object-storage.ts
+++ b/shared/server-commands/mock-servers/mock-object-storage.ts
diff --git a/shared/extra-utils/mock-servers/mock-plugin-blocklist.ts b/shared/server-commands/mock-servers/mock-plugin-blocklist.ts
index f8a271cba..f8a271cba 100644
--- a/shared/extra-utils/mock-servers/mock-plugin-blocklist.ts
+++ b/shared/server-commands/mock-servers/mock-plugin-blocklist.ts
diff --git a/shared/extra-utils/mock-servers/mock-proxy.ts b/shared/server-commands/mock-servers/mock-proxy.ts
index 75ac79055..75ac79055 100644
--- a/shared/extra-utils/mock-servers/mock-proxy.ts
+++ b/shared/server-commands/mock-servers/mock-proxy.ts
diff --git a/shared/extra-utils/mock-servers/utils.ts b/shared/server-commands/mock-servers/utils.ts
index 235642439..235642439 100644
--- a/shared/extra-utils/mock-servers/utils.ts
+++ b/shared/server-commands/mock-servers/utils.ts
diff --git a/shared/extra-utils/moderation/abuses-command.ts b/shared/server-commands/moderation/abuses-command.ts
index 0db32ba46..0db32ba46 100644
--- a/shared/extra-utils/moderation/abuses-command.ts
+++ b/shared/server-commands/moderation/abuses-command.ts
diff --git a/shared/extra-utils/moderation/index.ts b/shared/server-commands/moderation/index.ts
index b37643956..b37643956 100644
--- a/shared/extra-utils/moderation/index.ts
+++ b/shared/server-commands/moderation/index.ts
diff --git a/shared/extra-utils/overviews/index.ts b/shared/server-commands/overviews/index.ts
index e19551907..e19551907 100644
--- a/shared/extra-utils/overviews/index.ts
+++ b/shared/server-commands/overviews/index.ts
diff --git a/shared/extra-utils/overviews/overviews-command.ts b/shared/server-commands/overviews/overviews-command.ts
index 06b4892d2..06b4892d2 100644
--- a/shared/extra-utils/overviews/overviews-command.ts
+++ b/shared/server-commands/overviews/overviews-command.ts
diff --git a/shared/extra-utils/requests/check-api-params.ts b/shared/server-commands/requests/check-api-params.ts
index 26ba1e913..26ba1e913 100644
--- a/shared/extra-utils/requests/check-api-params.ts
+++ b/shared/server-commands/requests/check-api-params.ts
diff --git a/shared/extra-utils/requests/index.ts b/shared/server-commands/requests/index.ts
index 501163f92..501163f92 100644
--- a/shared/extra-utils/requests/index.ts
+++ b/shared/server-commands/requests/index.ts
diff --git a/shared/extra-utils/requests/requests.ts b/shared/server-commands/requests/requests.ts
index b6b9024ed..b6b9024ed 100644
--- a/shared/extra-utils/requests/requests.ts
+++ b/shared/server-commands/requests/requests.ts
diff --git a/shared/extra-utils/search/index.ts b/shared/server-commands/search/index.ts
index 48dbe8ae9..48dbe8ae9 100644
--- a/shared/extra-utils/search/index.ts
+++ b/shared/server-commands/search/index.ts
diff --git a/shared/extra-utils/search/search-command.ts b/shared/server-commands/search/search-command.ts
index 0fbbcd6ef..0fbbcd6ef 100644
--- a/shared/extra-utils/search/search-command.ts
+++ b/shared/server-commands/search/search-command.ts
diff --git a/shared/extra-utils/server/config-command.ts b/shared/server-commands/server/config-command.ts
index 89ae8eb4f..89ae8eb4f 100644
--- a/shared/extra-utils/server/config-command.ts
+++ b/shared/server-commands/server/config-command.ts
diff --git a/shared/extra-utils/server/contact-form-command.ts b/shared/server-commands/server/contact-form-command.ts
index 0e8fd6d84..0e8fd6d84 100644
--- a/shared/extra-utils/server/contact-form-command.ts
+++ b/shared/server-commands/server/contact-form-command.ts
diff --git a/shared/extra-utils/server/debug-command.ts b/shared/server-commands/server/debug-command.ts
index 3c5a785bb..3c5a785bb 100644
--- a/shared/extra-utils/server/debug-command.ts
+++ b/shared/server-commands/server/debug-command.ts
diff --git a/shared/extra-utils/server/directories.ts b/shared/server-commands/server/directories.ts
index e6f72d6fc..e6f72d6fc 100644
--- a/shared/extra-utils/server/directories.ts
+++ b/shared/server-commands/server/directories.ts
diff --git a/shared/extra-utils/server/follows-command.ts b/shared/server-commands/server/follows-command.ts
index 01ef6f179..01ef6f179 100644
--- a/shared/extra-utils/server/follows-command.ts
+++ b/shared/server-commands/server/follows-command.ts
diff --git a/shared/extra-utils/server/follows.ts b/shared/server-commands/server/follows.ts
index 698238f29..698238f29 100644
--- a/shared/extra-utils/server/follows.ts
+++ b/shared/server-commands/server/follows.ts
diff --git a/shared/extra-utils/server/index.ts b/shared/server-commands/server/index.ts
index 76a2099da..76a2099da 100644
--- a/shared/extra-utils/server/index.ts
+++ b/shared/server-commands/server/index.ts
diff --git a/shared/extra-utils/server/jobs-command.ts b/shared/server-commands/server/jobs-command.ts
index 6636e7e4d..6636e7e4d 100644
--- a/shared/extra-utils/server/jobs-command.ts
+++ b/shared/server-commands/server/jobs-command.ts
diff --git a/shared/extra-utils/server/jobs.ts b/shared/server-commands/server/jobs.ts
index 34fefd444..34fefd444 100644
--- a/shared/extra-utils/server/jobs.ts
+++ b/shared/server-commands/server/jobs.ts
diff --git a/shared/extra-utils/server/object-storage-command.ts b/shared/server-commands/server/object-storage-command.ts
index b4de8f4cb..b4de8f4cb 100644
--- a/shared/extra-utils/server/object-storage-command.ts
+++ b/shared/server-commands/server/object-storage-command.ts
diff --git a/shared/extra-utils/server/plugins-command.ts b/shared/server-commands/server/plugins-command.ts
index 1c44711da..1c44711da 100644
--- a/shared/extra-utils/server/plugins-command.ts
+++ b/shared/server-commands/server/plugins-command.ts
diff --git a/shared/extra-utils/server/plugins.ts b/shared/server-commands/server/plugins.ts
index 0f5fabd5a..c6316898d 100644
--- a/shared/extra-utils/server/plugins.ts
+++ b/shared/server-commands/server/plugins.ts
@@ -1,7 +1,7 @@
1/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ 1/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
2 2
3import { expect } from 'chai' 3import { expect } from 'chai'
4import { PeerTubeServer } from '../server/server' 4import { PeerTubeServer } from './server'
5 5
6async function testHelloWorldRegisteredSettings (server: PeerTubeServer) { 6async function testHelloWorldRegisteredSettings (server: PeerTubeServer) {
7 const body = await server.plugins.getRegisteredSettings({ npmName: 'peertube-plugin-hello-world' }) 7 const body = await server.plugins.getRegisteredSettings({ npmName: 'peertube-plugin-hello-world' })
diff --git a/shared/extra-utils/server/redundancy-command.ts b/shared/server-commands/server/redundancy-command.ts
index e7a8b3c29..e7a8b3c29 100644
--- a/shared/extra-utils/server/redundancy-command.ts
+++ b/shared/server-commands/server/redundancy-command.ts
diff --git a/shared/extra-utils/server/server.ts b/shared/server-commands/server/server.ts
index 339b9cabb..339b9cabb 100644
--- a/shared/extra-utils/server/server.ts
+++ b/shared/server-commands/server/server.ts
diff --git a/shared/extra-utils/server/servers-command.ts b/shared/server-commands/server/servers-command.ts
index 47420c95f..47420c95f 100644
--- a/shared/extra-utils/server/servers-command.ts
+++ b/shared/server-commands/server/servers-command.ts
diff --git a/shared/extra-utils/server/servers.ts b/shared/server-commands/server/servers.ts
index 21ab9405b..21ab9405b 100644
--- a/shared/extra-utils/server/servers.ts
+++ b/shared/server-commands/server/servers.ts
diff --git a/shared/extra-utils/server/stats-command.ts b/shared/server-commands/server/stats-command.ts
index 64a452306..64a452306 100644
--- a/shared/extra-utils/server/stats-command.ts
+++ b/shared/server-commands/server/stats-command.ts
diff --git a/shared/extra-utils/server/tracker.ts b/shared/server-commands/server/tracker.ts
index ed43a5924..ed43a5924 100644
--- a/shared/extra-utils/server/tracker.ts
+++ b/shared/server-commands/server/tracker.ts
diff --git a/shared/extra-utils/shared/abstract-command.ts b/shared/server-commands/shared/abstract-command.ts
index a57c857fc..a57c857fc 100644
--- a/shared/extra-utils/shared/abstract-command.ts
+++ b/shared/server-commands/shared/abstract-command.ts
diff --git a/shared/extra-utils/shared/index.ts b/shared/server-commands/shared/index.ts
index e807ab4f7..e807ab4f7 100644
--- a/shared/extra-utils/shared/index.ts
+++ b/shared/server-commands/shared/index.ts
diff --git a/shared/extra-utils/socket/index.ts b/shared/server-commands/socket/index.ts
index 594329b2f..594329b2f 100644
--- a/shared/extra-utils/socket/index.ts
+++ b/shared/server-commands/socket/index.ts
diff --git a/shared/extra-utils/socket/socket-io-command.ts b/shared/server-commands/socket/socket-io-command.ts
index c277ead28..c277ead28 100644
--- a/shared/extra-utils/socket/socket-io-command.ts
+++ b/shared/server-commands/socket/socket-io-command.ts
diff --git a/shared/extra-utils/users/accounts-command.ts b/shared/server-commands/users/accounts-command.ts
index 98d9d5927..98d9d5927 100644
--- a/shared/extra-utils/users/accounts-command.ts
+++ b/shared/server-commands/users/accounts-command.ts
diff --git a/shared/extra-utils/users/actors.ts b/shared/server-commands/users/actors.ts
index 12c3e078a..12c3e078a 100644
--- a/shared/extra-utils/users/actors.ts
+++ b/shared/server-commands/users/actors.ts
diff --git a/shared/extra-utils/users/blocklist-command.ts b/shared/server-commands/users/blocklist-command.ts
index 2e7ed074d..2e7ed074d 100644
--- a/shared/extra-utils/users/blocklist-command.ts
+++ b/shared/server-commands/users/blocklist-command.ts
diff --git a/shared/extra-utils/users/index.ts b/shared/server-commands/users/index.ts
index 460a06f70..460a06f70 100644
--- a/shared/extra-utils/users/index.ts
+++ b/shared/server-commands/users/index.ts
diff --git a/shared/extra-utils/users/login-command.ts b/shared/server-commands/users/login-command.ts
index 143f72a59..143f72a59 100644
--- a/shared/extra-utils/users/login-command.ts
+++ b/shared/server-commands/users/login-command.ts
diff --git a/shared/extra-utils/users/login.ts b/shared/server-commands/users/login.ts
index f1df027d3..f1df027d3 100644
--- a/shared/extra-utils/users/login.ts
+++ b/shared/server-commands/users/login.ts
diff --git a/shared/extra-utils/users/notifications-command.ts b/shared/server-commands/users/notifications-command.ts
index 692420b8b..692420b8b 100644
--- a/shared/extra-utils/users/notifications-command.ts
+++ b/shared/server-commands/users/notifications-command.ts
diff --git a/shared/extra-utils/users/notifications.ts b/shared/server-commands/users/notifications.ts
index 07ccb0f8d..07ccb0f8d 100644
--- a/shared/extra-utils/users/notifications.ts
+++ b/shared/server-commands/users/notifications.ts
diff --git a/shared/extra-utils/users/subscriptions-command.ts b/shared/server-commands/users/subscriptions-command.ts
index edc60e612..edc60e612 100644
--- a/shared/extra-utils/users/subscriptions-command.ts
+++ b/shared/server-commands/users/subscriptions-command.ts
diff --git a/shared/extra-utils/users/users-command.ts b/shared/server-commands/users/users-command.ts
index 90c5f2183..90c5f2183 100644
--- a/shared/extra-utils/users/users-command.ts
+++ b/shared/server-commands/users/users-command.ts
diff --git a/shared/extra-utils/videos/blacklist-command.ts b/shared/server-commands/videos/blacklist-command.ts
index 3a2ef89ba..3a2ef89ba 100644
--- a/shared/extra-utils/videos/blacklist-command.ts
+++ b/shared/server-commands/videos/blacklist-command.ts
diff --git a/shared/extra-utils/videos/captions-command.ts b/shared/server-commands/videos/captions-command.ts
index a65ea99e3..a65ea99e3 100644
--- a/shared/extra-utils/videos/captions-command.ts
+++ b/shared/server-commands/videos/captions-command.ts
diff --git a/shared/extra-utils/videos/captions.ts b/shared/server-commands/videos/captions.ts
index 35e722408..35e722408 100644
--- a/shared/extra-utils/videos/captions.ts
+++ b/shared/server-commands/videos/captions.ts
diff --git a/shared/extra-utils/videos/change-ownership-command.ts b/shared/server-commands/videos/change-ownership-command.ts
index ad4c726ef..ad4c726ef 100644
--- a/shared/extra-utils/videos/change-ownership-command.ts
+++ b/shared/server-commands/videos/change-ownership-command.ts
diff --git a/shared/extra-utils/videos/channels-command.ts b/shared/server-commands/videos/channels-command.ts
index e406e570b..e406e570b 100644
--- a/shared/extra-utils/videos/channels-command.ts
+++ b/shared/server-commands/videos/channels-command.ts
diff --git a/shared/extra-utils/videos/channels.ts b/shared/server-commands/videos/channels.ts
index 756c47453..756c47453 100644
--- a/shared/extra-utils/videos/channels.ts
+++ b/shared/server-commands/videos/channels.ts
diff --git a/shared/extra-utils/videos/comments-command.ts b/shared/server-commands/videos/comments-command.ts
index f0d163a07..f0d163a07 100644
--- a/shared/extra-utils/videos/comments-command.ts
+++ b/shared/server-commands/videos/comments-command.ts
diff --git a/shared/extra-utils/videos/history-command.ts b/shared/server-commands/videos/history-command.ts
index 13b7150c1..13b7150c1 100644
--- a/shared/extra-utils/videos/history-command.ts
+++ b/shared/server-commands/videos/history-command.ts
diff --git a/shared/extra-utils/videos/imports-command.ts b/shared/server-commands/videos/imports-command.ts
index e4944694d..e4944694d 100644
--- a/shared/extra-utils/videos/imports-command.ts
+++ b/shared/server-commands/videos/imports-command.ts
diff --git a/shared/extra-utils/videos/index.ts b/shared/server-commands/videos/index.ts
index 26e663f46..26e663f46 100644
--- a/shared/extra-utils/videos/index.ts
+++ b/shared/server-commands/videos/index.ts
diff --git a/shared/extra-utils/videos/live-command.ts b/shared/server-commands/videos/live-command.ts
index 74f5d3089..74f5d3089 100644
--- a/shared/extra-utils/videos/live-command.ts
+++ b/shared/server-commands/videos/live-command.ts
diff --git a/shared/extra-utils/videos/live.ts b/shared/server-commands/videos/live.ts
index d3665bc90..d3665bc90 100644
--- a/shared/extra-utils/videos/live.ts
+++ b/shared/server-commands/videos/live.ts
diff --git a/shared/extra-utils/videos/playlists-command.ts b/shared/server-commands/videos/playlists-command.ts
index ce23900d3..ce23900d3 100644
--- a/shared/extra-utils/videos/playlists-command.ts
+++ b/shared/server-commands/videos/playlists-command.ts
diff --git a/shared/extra-utils/videos/playlists.ts b/shared/server-commands/videos/playlists.ts
index 3dde52bb9..3dde52bb9 100644
--- a/shared/extra-utils/videos/playlists.ts
+++ b/shared/server-commands/videos/playlists.ts
diff --git a/shared/extra-utils/videos/services-command.ts b/shared/server-commands/videos/services-command.ts
index 06760df42..06760df42 100644
--- a/shared/extra-utils/videos/services-command.ts
+++ b/shared/server-commands/videos/services-command.ts
diff --git a/shared/extra-utils/videos/streaming-playlists-command.ts b/shared/server-commands/videos/streaming-playlists-command.ts
index 5d40d35cb..5d40d35cb 100644
--- a/shared/extra-utils/videos/streaming-playlists-command.ts
+++ b/shared/server-commands/videos/streaming-playlists-command.ts
diff --git a/shared/extra-utils/videos/streaming-playlists.ts b/shared/server-commands/videos/streaming-playlists.ts
index 0451c0efe..0451c0efe 100644
--- a/shared/extra-utils/videos/streaming-playlists.ts
+++ b/shared/server-commands/videos/streaming-playlists.ts
diff --git a/shared/extra-utils/videos/videos-command.ts b/shared/server-commands/videos/videos-command.ts
index 8ea828b40..8ea828b40 100644
--- a/shared/extra-utils/videos/videos-command.ts
+++ b/shared/server-commands/videos/videos-command.ts
diff --git a/shared/extra-utils/videos/videos.ts b/shared/server-commands/videos/videos.ts
index 2c3464aa8..2c3464aa8 100644
--- a/shared/extra-utils/videos/videos.ts
+++ b/shared/server-commands/videos/videos.ts
diff --git a/shared/tsconfig.types.json b/shared/tsconfig.types.json
index b01d12e53..73c1cae6c 100644
--- a/shared/tsconfig.types.json
+++ b/shared/tsconfig.types.json
@@ -5,5 +5,8 @@
5 "stripInternal": true, 5 "stripInternal": true,
6 "removeComments": false, 6 "removeComments": false,
7 "emitDeclarationOnly": true 7 "emitDeclarationOnly": true
8 } 8 },
9 "exclude": [
10 "server-commands/"
11 ]
9} 12}
diff --git a/shared/typescript-utils/index.ts b/shared/typescript-utils/index.ts
new file mode 100644
index 000000000..c9f6f047d
--- /dev/null
+++ b/shared/typescript-utils/index.ts
@@ -0,0 +1 @@
export * from './types'
diff --git a/shared/typescript-utils/types.ts b/shared/typescript-utils/types.ts
new file mode 100644
index 000000000..bd2a97b98
--- /dev/null
+++ b/shared/typescript-utils/types.ts
@@ -0,0 +1,45 @@
1/* eslint-disable @typescript-eslint/array-type */
2
3export type FunctionPropertyNames<T> = {
4 [K in keyof T]: T[K] extends Function ? K : never
5}[keyof T]
6
7export type FunctionProperties<T> = Pick<T, FunctionPropertyNames<T>>
8
9export type AttributesOnly<T> = {
10 [K in keyof T]: T[K] extends Function ? never : T[K]
11}
12
13export type PickWith<T, KT extends keyof T, V> = {
14 [P in KT]: T[P] extends V ? V : never
15}
16
17export type PickWithOpt<T, KT extends keyof T, V> = {
18 [P in KT]?: T[P] extends V ? V : never
19}
20
21// https://github.com/krzkaczor/ts-essentials Rocks!
22export type DeepPartial<T> = {
23 [P in keyof T]?: T[P] extends Array<infer U>
24 ? Array<DeepPartial<U>>
25 : T[P] extends ReadonlyArray<infer U>
26 ? ReadonlyArray<DeepPartial<U>>
27 : DeepPartial<T[P]>
28}
29
30type Primitive = string | Function | number | boolean | Symbol | undefined | null
31export type DeepOmitHelper<T, K extends keyof T> = {
32 [P in K]: // extra level of indirection needed to trigger homomorhic behavior
33 T[P] extends infer TP // distribute over unions
34 ? TP extends Primitive
35 ? TP // leave primitives and functions alone
36 : TP extends any[]
37 ? DeepOmitArray<TP, K> // Array special handling
38 : DeepOmit<TP, K>
39 : never
40}
41export type DeepOmit<T, K> = T extends Primitive ? T : DeepOmitHelper<T, Exclude<keyof T, K>>
42
43export type DeepOmitArray<T extends any[], K> = {
44 [P in keyof T]: DeepOmit<T[P], K>
45}