Browse Source

shared/ typescript types dir server-commands

Chocobozzz 2 years ago
parent
commit
bf54587a3e
100 changed files with 108 additions and 102 deletions
  1. 1 1
      scripts/benchmark.ts
  2. 1 1
      scripts/generate-code-contributors.ts
  3. 1 1
      server/tests/api/activitypub/cleaner.ts
  4. 1 1
      server/tests/api/activitypub/client.ts
  5. 1 1
      server/tests/api/activitypub/fetch.ts
  6. 1 1
      server/tests/api/activitypub/helpers.ts
  7. 1 1
      server/tests/api/activitypub/refresher.ts
  8. 1 1
      server/tests/api/activitypub/security.ts
  9. 1 1
      server/tests/api/check-params/abuses.ts
  10. 1 1
      server/tests/api/check-params/accounts.ts
  11. 1 1
      server/tests/api/check-params/blocklist.ts
  12. 1 1
      server/tests/api/check-params/bulk.ts
  13. 1 1
      server/tests/api/check-params/config.ts
  14. 8 2
      server/tests/api/check-params/contact-form.ts
  15. 1 1
      server/tests/api/check-params/custom-pages.ts
  16. 1 1
      server/tests/api/check-params/debug.ts
  17. 1 1
      server/tests/api/check-params/follows.ts
  18. 1 1
      server/tests/api/check-params/jobs.ts
  19. 1 1
      server/tests/api/check-params/live.ts
  20. 1 1
      server/tests/api/check-params/logs.ts
  21. 1 1
      server/tests/api/check-params/my-user.ts
  22. 1 1
      server/tests/api/check-params/plugins.ts
  23. 1 1
      server/tests/api/check-params/redundancy.ts
  24. 1 1
      server/tests/api/check-params/search.ts
  25. 1 1
      server/tests/api/check-params/services.ts
  26. 1 1
      server/tests/api/check-params/transcoding.ts
  27. 1 1
      server/tests/api/check-params/upload-quota.ts
  28. 1 1
      server/tests/api/check-params/user-notifications.ts
  29. 1 1
      server/tests/api/check-params/user-subscriptions.ts
  30. 1 1
      server/tests/api/check-params/users-admin.ts
  31. 1 1
      server/tests/api/check-params/users.ts
  32. 1 1
      server/tests/api/check-params/video-blacklist.ts
  33. 1 1
      server/tests/api/check-params/video-captions.ts
  34. 1 1
      server/tests/api/check-params/video-channels.ts
  35. 1 1
      server/tests/api/check-params/video-comments.ts
  36. 1 1
      server/tests/api/check-params/video-files.ts
  37. 1 1
      server/tests/api/check-params/video-imports.ts
  38. 1 1
      server/tests/api/check-params/video-playlists.ts
  39. 1 1
      server/tests/api/check-params/videos-common-filters.ts
  40. 1 1
      server/tests/api/check-params/videos-history.ts
  41. 1 1
      server/tests/api/check-params/videos-overviews.ts
  42. 1 1
      server/tests/api/check-params/videos.ts
  43. 1 1
      server/tests/api/live/live-constraints.ts
  44. 1 1
      server/tests/api/live/live-permanent.ts
  45. 1 1
      server/tests/api/live/live-rtmps.ts
  46. 1 1
      server/tests/api/live/live-save-replay.ts
  47. 1 1
      server/tests/api/live/live-socket-messages.ts
  48. 1 1
      server/tests/api/live/live-views.ts
  49. 1 1
      server/tests/api/live/live.ts
  50. 1 1
      server/tests/api/moderation/abuses.ts
  51. 1 1
      server/tests/api/moderation/blocklist-notification.ts
  52. 1 1
      server/tests/api/moderation/blocklist.ts
  53. 1 1
      server/tests/api/moderation/video-blacklist.ts
  54. 1 1
      server/tests/api/notifications/admin-notifications.ts
  55. 1 1
      server/tests/api/notifications/comments-notifications.ts
  56. 1 1
      server/tests/api/notifications/moderation-notifications.ts
  57. 1 1
      server/tests/api/notifications/notifications-api.ts
  58. 1 1
      server/tests/api/notifications/user-notifications.ts
  59. 1 1
      server/tests/api/object-storage/live.ts
  60. 1 1
      server/tests/api/object-storage/video-imports.ts
  61. 1 1
      server/tests/api/object-storage/videos.ts
  62. 1 1
      server/tests/api/redundancy/manage-redundancy.ts
  63. 1 1
      server/tests/api/redundancy/redundancy-constraints.ts
  64. 1 1
      server/tests/api/redundancy/redundancy.ts
  65. 1 1
      server/tests/api/search/search-activitypub-video-channels.ts
  66. 1 1
      server/tests/api/search/search-activitypub-video-playlists.ts
  67. 1 1
      server/tests/api/search/search-activitypub-videos.ts
  68. 1 1
      server/tests/api/search/search-channels.ts
  69. 1 1
      server/tests/api/search/search-index.ts
  70. 1 1
      server/tests/api/search/search-playlists.ts
  71. 1 1
      server/tests/api/search/search-videos.ts
  72. 1 1
      server/tests/api/server/auto-follows.ts
  73. 1 1
      server/tests/api/server/bulk.ts
  74. 1 1
      server/tests/api/server/config-defaults.ts
  75. 1 1
      server/tests/api/server/config.ts
  76. 1 1
      server/tests/api/server/contact-form.ts
  77. 1 1
      server/tests/api/server/email.ts
  78. 1 1
      server/tests/api/server/follow-constraints.ts
  79. 1 1
      server/tests/api/server/follows-moderation.ts
  80. 1 1
      server/tests/api/server/follows.ts
  81. 1 1
      server/tests/api/server/handle-down.ts
  82. 1 1
      server/tests/api/server/homepage.ts
  83. 1 1
      server/tests/api/server/jobs.ts
  84. 1 1
      server/tests/api/server/logs.ts
  85. 1 1
      server/tests/api/server/no-client.ts
  86. 1 1
      server/tests/api/server/plugins.ts
  87. 2 2
      server/tests/api/server/proxy.ts
  88. 1 1
      server/tests/api/server/reverse-proxy.ts
  89. 1 1
      server/tests/api/server/services.ts
  90. 1 1
      server/tests/api/server/slow-follows.ts
  91. 1 1
      server/tests/api/server/stats.ts
  92. 1 1
      server/tests/api/server/tracker.ts
  93. 1 1
      server/tests/api/users/user-subscriptions.ts
  94. 1 1
      server/tests/api/users/users-multiple-servers.ts
  95. 1 1
      server/tests/api/users/users-verification.ts
  96. 1 1
      server/tests/api/users/users.ts
  97. 1 1
      server/tests/api/videos/audio-only.ts
  98. 1 1
      server/tests/api/videos/multiple-servers.ts
  99. 1 1
      server/tests/api/videos/resumable-upload.ts
  100. 1 1
      server/tests/api/videos/single-server.ts

+ 1 - 1
scripts/benchmark.ts

@@ -3,7 +3,7 @@ registerTSPaths()
 
 import autocannon, { printResult } from 'autocannon'
 import { writeJson } from 'fs-extra'
-import { createSingleServer, killallServers, PeerTubeServer, setAccessTokensToServers } from '@shared/extra-utils'
+import { createSingleServer, killallServers, PeerTubeServer, setAccessTokensToServers } from '@shared/server-commands'
 import { Video, VideoPrivacy } from '@shared/models'
 
 let server: PeerTubeServer

+ 1 - 1
scripts/generate-code-contributors.ts

@@ -1,7 +1,7 @@
 import { registerTSPaths } from '../server/helpers/register-ts-paths'
 registerTSPaths()
 
-import { CLICommand } from '@shared/extra-utils'
+import { CLICommand } from '@shared/server-commands'
 
 run()
   .then(() => process.exit(0))

+ 1 - 1
server/tests/api/activitypub/cleaner.ts

@@ -10,7 +10,7 @@ import {
   setAccessTokensToServers,
   wait,
   waitJobs
-} from '@shared/extra-utils'
+} from '@shared/server-commands'
 
 const expect = chai.expect
 

+ 1 - 1
server/tests/api/activitypub/client.ts

@@ -10,7 +10,7 @@ import {
   PeerTubeServer,
   setAccessTokensToServers,
   setDefaultVideoChannel
-} from '@shared/extra-utils'
+} from '@shared/server-commands'
 import { HttpStatusCode, VideoPlaylistPrivacy } from '@shared/models'
 
 const expect = chai.expect

+ 1 - 1
server/tests/api/activitypub/fetch.ts

@@ -2,7 +2,7 @@
 
 import 'mocha'
 import * as chai from 'chai'
-import { cleanupTests, createMultipleServers, doubleFollow, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/extra-utils'
+import { cleanupTests, createMultipleServers, doubleFollow, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/server-commands'
 
 const expect = chai.expect
 

+ 1 - 1
server/tests/api/activitypub/helpers.ts

@@ -3,7 +3,7 @@
 import 'mocha'
 import { expect } from 'chai'
 import { cloneDeep } from 'lodash'
-import { buildAbsoluteFixturePath, buildRequestStub } from '@shared/extra-utils'
+import { buildAbsoluteFixturePath, buildRequestStub } from '@shared/server-commands'
 import { buildSignedActivity } from '../../../helpers/activitypub'
 import { isHTTPSignatureVerified, isJsonLDSignatureVerified, parseHTTPSignature } from '../../../helpers/peertube-crypto'
 

+ 1 - 1
server/tests/api/activitypub/refresher.ts

@@ -11,7 +11,7 @@ import {
   setDefaultVideoChannel,
   wait,
   waitJobs
-} from '@shared/extra-utils'
+} from '@shared/server-commands'
 import { HttpStatusCode, VideoPlaylistPrivacy } from '@shared/models'
 
 describe('Test AP refresher', function () {

+ 1 - 1
server/tests/api/activitypub/security.ts

@@ -6,7 +6,7 @@ import { activityPubContextify, buildSignedActivity } from '@server/helpers/acti
 import { buildDigest } from '@server/helpers/peertube-crypto'
 import { HTTP_SIGNATURE } from '@server/initializers/constants'
 import { buildGlobalHeaders } from '@server/lib/job-queue/handlers/utils/activitypub-http-utils'
-import { buildAbsoluteFixturePath, cleanupTests, createMultipleServers, killallServers, PeerTubeServer, wait } from '@shared/extra-utils'
+import { buildAbsoluteFixturePath, cleanupTests, createMultipleServers, killallServers, PeerTubeServer, wait } from '@shared/server-commands'
 import { makeFollowRequest, makePOSTAPRequest } from '@server/tests/shared'
 import { HttpStatusCode } from '@shared/models'
 

+ 1 - 1
server/tests/api/check-params/abuses.ts

@@ -14,7 +14,7 @@ import {
   PeerTubeServer,
   setAccessTokensToServers,
   waitJobs
-} from '@shared/extra-utils'
+} from '@shared/server-commands'
 import { AbuseCreate, AbuseState, HttpStatusCode } from '@shared/models'
 
 describe('Test abuses API validators', function () {

+ 1 - 1
server/tests/api/check-params/accounts.ts

@@ -8,7 +8,7 @@ import {
   cleanupTests,
   createSingleServer,
   PeerTubeServer
-} from '@shared/extra-utils'
+} from '@shared/server-commands'
 import { HttpStatusCode } from '@shared/models'
 
 describe('Test accounts API validators', function () {

+ 1 - 1
server/tests/api/check-params/blocklist.ts

@@ -13,7 +13,7 @@ import {
   makePostBodyRequest,
   PeerTubeServer,
   setAccessTokensToServers
-} from '@shared/extra-utils'
+} from '@shared/server-commands'
 import { HttpStatusCode } from '@shared/models'
 
 describe('Test blocklist API validators', function () {

+ 1 - 1
server/tests/api/check-params/bulk.ts

@@ -1,7 +1,7 @@
 /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
 
 import 'mocha'
-import { cleanupTests, createSingleServer, makePostBodyRequest, PeerTubeServer, setAccessTokensToServers } from '@shared/extra-utils'
+import { cleanupTests, createSingleServer, makePostBodyRequest, PeerTubeServer, setAccessTokensToServers } from '@shared/server-commands'
 import { HttpStatusCode } from '@shared/models'
 
 describe('Test bulk API validators', function () {

+ 1 - 1
server/tests/api/check-params/config.ts

@@ -10,7 +10,7 @@ import {
   makePutBodyRequest,
   PeerTubeServer,
   setAccessTokensToServers
-} from '@shared/extra-utils'
+} from '@shared/server-commands'
 import { CustomConfig, HttpStatusCode } from '@shared/models'
 
 describe('Test config API validators', function () {

+ 8 - 2
server/tests/api/check-params/contact-form.ts

@@ -1,9 +1,15 @@
 /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
 
 import 'mocha'
-import { cleanupTests, createSingleServer, killallServers, MockSmtpServer, PeerTubeServer } from '@shared/extra-utils'
-import { ContactFormCommand } from '@shared/extra-utils/server'
 import { HttpStatusCode } from '@shared/models'
+import {
+  cleanupTests,
+  ContactFormCommand,
+  createSingleServer,
+  killallServers,
+  MockSmtpServer,
+  PeerTubeServer
+} from '@shared/server-commands'
 
 describe('Test contact form API validators', function () {
   let server: PeerTubeServer

+ 1 - 1
server/tests/api/check-params/custom-pages.ts

@@ -8,7 +8,7 @@ import {
   makePutBodyRequest,
   PeerTubeServer,
   setAccessTokensToServers
-} from '@shared/extra-utils'
+} from '@shared/server-commands'
 import { HttpStatusCode } from '@shared/models'
 
 describe('Test custom pages validators', function () {

+ 1 - 1
server/tests/api/check-params/debug.ts

@@ -1,7 +1,7 @@
 /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
 
 import 'mocha'
-import { cleanupTests, createSingleServer, makeGetRequest, PeerTubeServer, setAccessTokensToServers } from '@shared/extra-utils'
+import { cleanupTests, createSingleServer, makeGetRequest, PeerTubeServer, setAccessTokensToServers } from '@shared/server-commands'
 import { HttpStatusCode } from '@shared/models'
 
 describe('Test debug API validators', function () {

+ 1 - 1
server/tests/api/check-params/follows.ts

@@ -12,7 +12,7 @@ import {
   makePostBodyRequest,
   PeerTubeServer,
   setAccessTokensToServers
-} from '@shared/extra-utils'
+} from '@shared/server-commands'
 import { HttpStatusCode } from '@shared/models'
 
 describe('Test server follows API validators', function () {

+ 1 - 1
server/tests/api/check-params/jobs.ts

@@ -10,7 +10,7 @@ import {
   makeGetRequest,
   PeerTubeServer,
   setAccessTokensToServers
-} from '@shared/extra-utils'
+} from '@shared/server-commands'
 import { HttpStatusCode } from '@shared/models'
 
 describe('Test jobs API validators', function () {

+ 1 - 1
server/tests/api/check-params/live.ts

@@ -13,7 +13,7 @@ import {
   sendRTMPStream,
   setAccessTokensToServers,
   stopFfmpeg
-} from '@shared/extra-utils'
+} from '@shared/server-commands'
 import { HttpStatusCode, VideoCreateResult, VideoPrivacy } from '@shared/models'
 
 describe('Test video lives API validator', function () {

+ 1 - 1
server/tests/api/check-params/logs.ts

@@ -1,7 +1,7 @@
 /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
 
 import 'mocha'
-import { cleanupTests, createSingleServer, makeGetRequest, PeerTubeServer, setAccessTokensToServers } from '@shared/extra-utils'
+import { cleanupTests, createSingleServer, makeGetRequest, PeerTubeServer, setAccessTokensToServers } from '@shared/server-commands'
 import { HttpStatusCode } from '@shared/models'
 
 describe('Test logs API validators', function () {

+ 1 - 1
server/tests/api/check-params/my-user.ts

@@ -15,7 +15,7 @@ import {
   PeerTubeServer,
   setAccessTokensToServers,
   UsersCommand
-} from '@shared/extra-utils'
+} from '@shared/server-commands'
 import { HttpStatusCode, UserRole, VideoCreateResult } from '@shared/models'
 
 describe('Test my user API validators', function () {

+ 1 - 1
server/tests/api/check-params/plugins.ts

@@ -12,7 +12,7 @@ import {
   makePutBodyRequest,
   PeerTubeServer,
   setAccessTokensToServers
-} from '@shared/extra-utils'
+} from '@shared/server-commands'
 import { HttpStatusCode, PeerTubePlugin, PluginType } from '@shared/models'
 
 describe('Test server plugins API validators', function () {

+ 1 - 1
server/tests/api/check-params/redundancy.ts

@@ -15,7 +15,7 @@ import {
   PeerTubeServer,
   setAccessTokensToServers,
   waitJobs
-} from '@shared/extra-utils'
+} from '@shared/server-commands'
 import { HttpStatusCode, VideoCreateResult } from '@shared/models'
 
 describe('Test server redundancy API validators', function () {

+ 1 - 1
server/tests/api/check-params/search.ts

@@ -10,7 +10,7 @@ import {
   makeGetRequest,
   PeerTubeServer,
   setAccessTokensToServers
-} from '@shared/extra-utils'
+} from '@shared/server-commands'
 import { HttpStatusCode } from '@shared/models'
 
 function updateSearchIndex (server: PeerTubeServer, enabled: boolean, disableLocalSearch = false) {

+ 1 - 1
server/tests/api/check-params/services.ts

@@ -8,7 +8,7 @@ import {
   PeerTubeServer,
   setAccessTokensToServers,
   setDefaultVideoChannel
-} from '@shared/extra-utils'
+} from '@shared/server-commands'
 import { HttpStatusCode, VideoPlaylistPrivacy } from '@shared/models'
 
 describe('Test services API validators', function () {

+ 1 - 1
server/tests/api/check-params/transcoding.ts

@@ -1,7 +1,7 @@
 /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
 
 import 'mocha'
-import { cleanupTests, createMultipleServers, doubleFollow, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/extra-utils'
+import { cleanupTests, createMultipleServers, doubleFollow, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/server-commands'
 import { HttpStatusCode, UserRole } from '@shared/models'
 
 describe('Test transcoding API validators', function () {

+ 1 - 1
server/tests/api/check-params/upload-quota.ts

@@ -12,7 +12,7 @@ import {
   setDefaultVideoChannel,
   VideosCommand,
   waitJobs
-} from '@shared/extra-utils'
+} from '@shared/server-commands'
 import { HttpStatusCode, VideoImportState, VideoPrivacy } from '@shared/models'
 
 describe('Test upload quota', function () {

+ 1 - 1
server/tests/api/check-params/user-notifications.ts

@@ -14,7 +14,7 @@ import {
   PeerTubeServer,
   setAccessTokensToServers,
   wait
-} from '@shared/extra-utils'
+} from '@shared/server-commands'
 import { HttpStatusCode, UserNotificationSetting, UserNotificationSettingValue } from '@shared/models'
 
 describe('Test user notifications API validators', function () {

+ 1 - 1
server/tests/api/check-params/user-subscriptions.ts

@@ -13,7 +13,7 @@ import {
   PeerTubeServer,
   setAccessTokensToServers,
   waitJobs
-} from '@shared/extra-utils'
+} from '@shared/server-commands'
 import { HttpStatusCode } from '@shared/models'
 
 describe('Test user subscriptions API validators', function () {

+ 1 - 1
server/tests/api/check-params/users-admin.ts

@@ -15,7 +15,7 @@ import {
   MockSmtpServer,
   PeerTubeServer,
   setAccessTokensToServers
-} from '@shared/extra-utils'
+} from '@shared/server-commands'
 import { HttpStatusCode, UserAdminFlag, UserRole } from '@shared/models'
 
 describe('Test users admin API validators', function () {

+ 1 - 1
server/tests/api/check-params/users.ts

@@ -9,7 +9,7 @@ import {
   MockSmtpServer,
   PeerTubeServer,
   setAccessTokensToServers
-} from '@shared/extra-utils'
+} from '@shared/server-commands'
 import { HttpStatusCode, UserRole } from '@shared/models'
 
 describe('Test users API validators', function () {

+ 1 - 1
server/tests/api/check-params/video-blacklist.ts

@@ -15,7 +15,7 @@ import {
   PeerTubeServer,
   setAccessTokensToServers,
   waitJobs
-} from '@shared/extra-utils'
+} from '@shared/server-commands'
 import { HttpStatusCode, VideoBlacklistType } from '@shared/models'
 
 describe('Test video blacklist API validators', function () {

+ 1 - 1
server/tests/api/check-params/video-captions.ts

@@ -10,7 +10,7 @@ import {
   makeUploadRequest,
   PeerTubeServer,
   setAccessTokensToServers
-} from '@shared/extra-utils'
+} from '@shared/server-commands'
 import { HttpStatusCode, VideoCreateResult } from '@shared/models'
 
 describe('Test video captions API validator', function () {

+ 1 - 1
server/tests/api/check-params/video-channels.ts

@@ -17,7 +17,7 @@ import {
   makeUploadRequest,
   PeerTubeServer,
   setAccessTokensToServers
-} from '@shared/extra-utils'
+} from '@shared/server-commands'
 import { HttpStatusCode, VideoChannelUpdate } from '@shared/models'
 
 const expect = chai.expect

+ 1 - 1
server/tests/api/check-params/video-comments.ts

@@ -13,7 +13,7 @@ import {
   makePostBodyRequest,
   PeerTubeServer,
   setAccessTokensToServers
-} from '@shared/extra-utils'
+} from '@shared/server-commands'
 import { HttpStatusCode, VideoCreateResult } from '@shared/models'
 
 const expect = chai.expect

+ 1 - 1
server/tests/api/check-params/video-files.ts

@@ -1,7 +1,7 @@
 /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
 
 import 'mocha'
-import { cleanupTests, createMultipleServers, doubleFollow, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/extra-utils'
+import { cleanupTests, createMultipleServers, doubleFollow, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/server-commands'
 import { HttpStatusCode, UserRole } from '@shared/models'
 
 describe('Test videos files', function () {

+ 1 - 1
server/tests/api/check-params/video-imports.ts

@@ -15,7 +15,7 @@ import {
   makeUploadRequest,
   PeerTubeServer,
   setAccessTokensToServers
-} from '@shared/extra-utils'
+} from '@shared/server-commands'
 import { HttpStatusCode, VideoPrivacy } from '@shared/models'
 
 describe('Test video imports API validator', function () {

+ 1 - 1
server/tests/api/check-params/video-playlists.ts

@@ -12,7 +12,7 @@ import {
   PlaylistsCommand,
   setAccessTokensToServers,
   setDefaultVideoChannel
-} from '@shared/extra-utils'
+} from '@shared/server-commands'
 import {
   HttpStatusCode,
   VideoPlaylistCreate,

+ 1 - 1
server/tests/api/check-params/videos-common-filters.ts

@@ -8,7 +8,7 @@ import {
   PeerTubeServer,
   setAccessTokensToServers,
   setDefaultVideoChannel
-} from '@shared/extra-utils'
+} from '@shared/server-commands'
 import { HttpStatusCode, UserRole, VideoInclude, VideoPrivacy } from '@shared/models'
 
 describe('Test video filters validators', function () {

+ 1 - 1
server/tests/api/check-params/videos-history.ts

@@ -11,7 +11,7 @@ import {
   makePutBodyRequest,
   PeerTubeServer,
   setAccessTokensToServers
-} from '@shared/extra-utils'
+} from '@shared/server-commands'
 import { HttpStatusCode } from '@shared/models'
 
 describe('Test videos history API validator', function () {

+ 1 - 1
server/tests/api/check-params/videos-overviews.ts

@@ -1,7 +1,7 @@
 /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
 
 import 'mocha'
-import { cleanupTests, createSingleServer, PeerTubeServer } from '@shared/extra-utils'
+import { cleanupTests, createSingleServer, PeerTubeServer } from '@shared/server-commands'
 
 describe('Test videos overview', function () {
   let server: PeerTubeServer

+ 1 - 1
server/tests/api/check-params/videos.ts

@@ -19,7 +19,7 @@ import {
   PeerTubeServer,
   root,
   setAccessTokensToServers
-} from '@shared/extra-utils'
+} from '@shared/server-commands'
 import { HttpStatusCode, PeerTubeProblemDocument, VideoCreateResult, VideoPrivacy } from '@shared/models'
 
 const expect = chai.expect

+ 1 - 1
server/tests/api/live/live-constraints.ts

@@ -14,7 +14,7 @@ import {
   setDefaultVideoChannel,
   wait,
   waitJobs
-} from '../../../../shared/extra-utils'
+} from '../../../../shared/server-commands'
 
 const expect = chai.expect
 

+ 1 - 1
server/tests/api/live/live-permanent.ts

@@ -14,7 +14,7 @@ import {
   stopFfmpeg,
   wait,
   waitJobs
-} from '../../../../shared/extra-utils'
+} from '../../../../shared/server-commands'
 
 const expect = chai.expect
 

+ 1 - 1
server/tests/api/live/live-rtmps.ts

@@ -14,7 +14,7 @@ import {
   stopFfmpeg,
   testFfmpegStreamError,
   waitUntilLivePublishedOnAllServers
-} from '../../../../shared/extra-utils'
+} from '../../../../shared/server-commands'
 
 const expect = chai.expect
 

+ 1 - 1
server/tests/api/live/live-save-replay.ts

@@ -18,7 +18,7 @@ import {
   waitJobs,
   waitUntilLivePublishedOnAllServers,
   waitUntilLiveSavedOnAllServers
-} from '@shared/extra-utils'
+} from '@shared/server-commands'
 import { HttpStatusCode, LiveVideoCreate, VideoPrivacy, VideoState } from '@shared/models'
 
 const expect = chai.expect

+ 1 - 1
server/tests/api/live/live-socket-messages.ts

@@ -14,7 +14,7 @@ import {
   wait,
   waitJobs,
   waitUntilLivePublishedOnAllServers
-} from '../../../../shared/extra-utils'
+} from '../../../../shared/server-commands'
 
 const expect = chai.expect
 

+ 1 - 1
server/tests/api/live/live-views.ts

@@ -15,7 +15,7 @@ import {
   wait,
   waitJobs,
   waitUntilLivePublishedOnAllServers
-} from '../../../../shared/extra-utils'
+} from '../../../../shared/server-commands'
 
 const expect = chai.expect
 

+ 1 - 1
server/tests/api/live/live.ts

@@ -24,7 +24,7 @@ import {
   wait,
   waitJobs,
   waitUntilLivePublishedOnAllServers
-} from '@shared/extra-utils'
+} from '@shared/server-commands'
 import {
   HttpStatusCode,
   LiveVideo,

+ 1 - 1
server/tests/api/moderation/abuses.ts

@@ -10,7 +10,7 @@ import {
   PeerTubeServer,
   setAccessTokensToServers,
   waitJobs
-} from '@shared/extra-utils'
+} from '@shared/server-commands'
 import { AbuseMessage, AbusePredefinedReasonsString, AbuseState, AdminAbuse, UserAbuse } from '@shared/models'
 
 const expect = chai.expect

+ 1 - 1
server/tests/api/moderation/blocklist-notification.ts

@@ -2,7 +2,7 @@
 
 import 'mocha'
 import * as chai from 'chai'
-import { cleanupTests, createMultipleServers, doubleFollow, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/extra-utils'
+import { cleanupTests, createMultipleServers, doubleFollow, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/server-commands'
 import { UserNotificationType } from '@shared/models'
 
 const expect = chai.expect

+ 1 - 1
server/tests/api/moderation/blocklist.ts

@@ -11,7 +11,7 @@ import {
   PeerTubeServer,
   setAccessTokensToServers,
   waitJobs
-} from '@shared/extra-utils'
+} from '@shared/server-commands'
 import { UserNotificationType } from '@shared/models'
 
 const expect = chai.expect

+ 1 - 1
server/tests/api/moderation/video-blacklist.ts

@@ -13,7 +13,7 @@ import {
   PeerTubeServer,
   setAccessTokensToServers,
   waitJobs
-} from '@shared/extra-utils'
+} from '@shared/server-commands'
 import { UserAdminFlag, UserRole, VideoBlacklist, VideoBlacklistType } from '@shared/models'
 
 const expect = chai.expect

+ 1 - 1
server/tests/api/notifications/admin-notifications.ts

@@ -12,7 +12,7 @@ import {
   PeerTubeServer,
   prepareNotificationsTest,
   wait
-} from '@shared/extra-utils'
+} from '@shared/server-commands'
 import { PluginType, UserNotification, UserNotificationType } from '@shared/models'
 
 describe('Test admin notifications', function () {

+ 1 - 1
server/tests/api/notifications/comments-notifications.ts

@@ -11,7 +11,7 @@ import {
   PeerTubeServer,
   prepareNotificationsTest,
   waitJobs
-} from '@shared/extra-utils'
+} from '@shared/server-commands'
 import { UserNotification } from '@shared/models'
 
 const expect = chai.expect

+ 1 - 1
server/tests/api/notifications/moderation-notifications.ts

@@ -23,7 +23,7 @@ import {
   prepareNotificationsTest,
   wait,
   waitJobs
-} from '@shared/extra-utils'
+} from '@shared/server-commands'
 import { AbuseState, CustomConfig, UserNotification, UserRole, VideoPrivacy } from '@shared/models'
 
 describe('Test moderation notifications', function () {

+ 1 - 1
server/tests/api/notifications/notifications-api.ts

@@ -11,7 +11,7 @@ import {
   PeerTubeServer,
   prepareNotificationsTest,
   waitJobs
-} from '@shared/extra-utils'
+} from '@shared/server-commands'
 import { UserNotification, UserNotificationSettingValue } from '@shared/models'
 
 const expect = chai.expect

+ 1 - 1
server/tests/api/notifications/user-notifications.ts

@@ -17,7 +17,7 @@ import {
   uploadRandomVideoOnServers,
   wait,
   waitJobs
-} from '@shared/extra-utils'
+} from '@shared/server-commands'
 import { UserNotification, UserNotificationType, VideoPrivacy } from '@shared/models'
 
 const expect = chai.expect

+ 1 - 1
server/tests/api/object-storage/live.ts

@@ -18,7 +18,7 @@ import {
   waitJobs,
   waitUntilLivePublishedOnAllServers,
   waitUntilLiveSavedOnAllServers
-} from '@shared/extra-utils'
+} from '@shared/server-commands'
 import { HttpStatusCode, LiveVideoCreate, VideoFile, VideoPrivacy } from '@shared/models'
 
 const expect = chai.expect

+ 1 - 1
server/tests/api/object-storage/video-imports.ts

@@ -14,7 +14,7 @@ import {
   setAccessTokensToServers,
   setDefaultVideoChannel,
   waitJobs
-} from '@shared/extra-utils'
+} from '@shared/server-commands'
 import { HttpStatusCode, VideoPrivacy } from '@shared/models'
 
 const expect = chai.expect

+ 1 - 1
server/tests/api/object-storage/videos.ts

@@ -20,7 +20,7 @@ import {
   setAccessTokensToServers,
   waitJobs,
   webtorrentAdd
-} from '@shared/extra-utils'
+} from '@shared/server-commands'
 import { HttpStatusCode, VideoDetails } from '@shared/models'
 
 const expect = chai.expect

+ 1 - 1
server/tests/api/redundancy/manage-redundancy.ts

@@ -10,7 +10,7 @@ import {
   RedundancyCommand,
   setAccessTokensToServers,
   waitJobs
-} from '@shared/extra-utils'
+} from '@shared/server-commands'
 import { VideoPrivacy, VideoRedundanciesTarget } from '@shared/models'
 
 const expect = chai.expect

+ 1 - 1
server/tests/api/redundancy/redundancy-constraints.ts

@@ -2,7 +2,7 @@
 
 import 'mocha'
 import { expect } from 'chai'
-import { cleanupTests, createSingleServer, killallServers, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/extra-utils'
+import { cleanupTests, createSingleServer, killallServers, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/server-commands'
 import { VideoPrivacy } from '@shared/models'
 
 describe('Test redundancy constraints', function () {

+ 1 - 1
server/tests/api/redundancy/redundancy.ts

@@ -19,7 +19,7 @@ import {
   setAccessTokensToServers,
   wait,
   waitJobs
-} from '@shared/extra-utils'
+} from '@shared/server-commands'
 import {
   HttpStatusCode,
   VideoDetails,

+ 1 - 1
server/tests/api/search/search-activitypub-video-channels.ts

@@ -10,7 +10,7 @@ import {
   setAccessTokensToServers,
   wait,
   waitJobs
-} from '@shared/extra-utils'
+} from '@shared/server-commands'
 import { VideoChannel } from '@shared/models'
 
 const expect = chai.expect

+ 1 - 1
server/tests/api/search/search-activitypub-video-playlists.ts

@@ -11,7 +11,7 @@ import {
   setDefaultVideoChannel,
   wait,
   waitJobs
-} from '@shared/extra-utils'
+} from '@shared/server-commands'
 import { VideoPlaylistPrivacy } from '@shared/models'
 
 const expect = chai.expect

+ 1 - 1
server/tests/api/search/search-activitypub-videos.ts

@@ -10,7 +10,7 @@ import {
   setAccessTokensToServers,
   wait,
   waitJobs
-} from '@shared/extra-utils'
+} from '@shared/server-commands'
 import { VideoPrivacy } from '@shared/models'
 
 const expect = chai.expect

+ 1 - 1
server/tests/api/search/search-channels.ts

@@ -9,7 +9,7 @@ import {
   PeerTubeServer,
   SearchCommand,
   setAccessTokensToServers
-} from '@shared/extra-utils'
+} from '@shared/server-commands'
 import { VideoChannel } from '@shared/models'
 
 const expect = chai.expect

+ 1 - 1
server/tests/api/search/search-index.ts

@@ -2,7 +2,7 @@
 
 import 'mocha'
 import * as chai from 'chai'
-import { cleanupTests, createSingleServer, PeerTubeServer, SearchCommand, setAccessTokensToServers } from '@shared/extra-utils'
+import { cleanupTests, createSingleServer, PeerTubeServer, SearchCommand, setAccessTokensToServers } from '@shared/server-commands'
 import {
   BooleanBothQuery,
   VideoChannelsSearchQuery,

+ 1 - 1
server/tests/api/search/search-playlists.ts

@@ -10,7 +10,7 @@ import {
   SearchCommand,
   setAccessTokensToServers,
   setDefaultVideoChannel
-} from '@shared/extra-utils'
+} from '@shared/server-commands'
 import { VideoPlaylistPrivacy } from '@shared/models'
 
 const expect = chai.expect

+ 1 - 1
server/tests/api/search/search-videos.ts

@@ -12,7 +12,7 @@ import {
   setDefaultVideoChannel,
   stopFfmpeg,
   wait
-} from '@shared/extra-utils'
+} from '@shared/server-commands'
 import { VideoPrivacy } from '@shared/models'
 
 const expect = chai.expect

+ 1 - 1
server/tests/api/server/auto-follows.ts

@@ -10,7 +10,7 @@ import {
   setAccessTokensToServers,
   wait,
   waitJobs
-} from '@shared/extra-utils'
+} from '@shared/server-commands'
 
 const expect = chai.expect
 

+ 1 - 1
server/tests/api/server/bulk.ts

@@ -10,7 +10,7 @@ import {
   PeerTubeServer,
   setAccessTokensToServers,
   waitJobs
-} from '@shared/extra-utils'
+} from '@shared/server-commands'
 
 const expect = chai.expect
 

+ 1 - 1
server/tests/api/server/config-defaults.ts

@@ -9,7 +9,7 @@ import {
   PeerTubeServer,
   setAccessTokensToServers,
   setDefaultVideoChannel
-} from '@shared/extra-utils'
+} from '@shared/server-commands'
 import { VideoDetails, VideoPrivacy } from '@shared/models'
 
 const expect = chai.expect

+ 1 - 1
server/tests/api/server/config.ts

@@ -10,7 +10,7 @@ import {
   parallelTests,
   PeerTubeServer,
   setAccessTokensToServers
-} from '@shared/extra-utils'
+} from '@shared/server-commands'
 import { CustomConfig, HttpStatusCode } from '@shared/models'
 
 const expect = chai.expect

+ 1 - 1
server/tests/api/server/contact-form.ts

@@ -11,7 +11,7 @@ import {
   setAccessTokensToServers,
   wait,
   waitJobs
-} from '@shared/extra-utils'
+} from '@shared/server-commands'
 import { HttpStatusCode } from '@shared/models'
 
 const expect = chai.expect

+ 1 - 1
server/tests/api/server/email.ts

@@ -2,7 +2,7 @@
 
 import 'mocha'
 import * as chai from 'chai'
-import { cleanupTests, createSingleServer, MockSmtpServer, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/extra-utils'
+import { cleanupTests, createSingleServer, MockSmtpServer, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/server-commands'
 import { HttpStatusCode } from '@shared/models'
 
 const expect = chai.expect

+ 1 - 1
server/tests/api/server/follow-constraints.ts

@@ -2,7 +2,7 @@
 
 import 'mocha'
 import * as chai from 'chai'
-import { cleanupTests, createMultipleServers, doubleFollow, PeerTubeServer, setAccessTokensToServers } from '@shared/extra-utils'
+import { cleanupTests, createMultipleServers, doubleFollow, PeerTubeServer, setAccessTokensToServers } from '@shared/server-commands'
 import { HttpStatusCode, PeerTubeProblemDocument, ServerErrorCode } from '@shared/models'
 
 const expect = chai.expect

+ 1 - 1
server/tests/api/server/follows-moderation.ts

@@ -9,7 +9,7 @@ import {
   PeerTubeServer,
   setAccessTokensToServers,
   waitJobs
-} from '@shared/extra-utils'
+} from '@shared/server-commands'
 
 const expect = chai.expect
 

+ 1 - 1
server/tests/api/server/follows.ts

@@ -12,7 +12,7 @@ import {
   setAccessTokensToServers,
   testCaptionFile,
   waitJobs
-} from '@shared/extra-utils'
+} from '@shared/server-commands'
 import { VideoCreateResult, VideoPrivacy } from '@shared/models'
 import { completeVideoCheck } from '@server/tests/shared/video'
 

+ 1 - 1
server/tests/api/server/handle-down.ts

@@ -11,7 +11,7 @@ import {
   setAccessTokensToServers,
   wait,
   waitJobs
-} from '@shared/extra-utils'
+} from '@shared/server-commands'
 import { HttpStatusCode, JobState, VideoCreateResult, VideoPrivacy } from '@shared/models'
 import { completeVideoCheck } from '@server/tests/shared/video'
 

+ 1 - 1
server/tests/api/server/homepage.ts

@@ -10,7 +10,7 @@ import {
   killallServers,
   PeerTubeServer,
   setAccessTokensToServers
-} from '../../../../shared/extra-utils/index'
+} from '../../../../shared/server-commands/index'
 
 const expect = chai.expect
 

+ 1 - 1
server/tests/api/server/jobs.ts

@@ -10,7 +10,7 @@ import {
   PeerTubeServer,
   setAccessTokensToServers,
   waitJobs
-} from '@shared/extra-utils'
+} from '@shared/server-commands'
 
 const expect = chai.expect
 

+ 1 - 1
server/tests/api/server/logs.ts

@@ -10,7 +10,7 @@ import {
   PeerTubeServer,
   setAccessTokensToServers,
   waitJobs
-} from '@shared/extra-utils'
+} from '@shared/server-commands'
 
 const expect = chai.expect
 

+ 1 - 1
server/tests/api/server/no-client.ts

@@ -1,6 +1,6 @@
 import 'mocha'
 import request from 'supertest'
-import { cleanupTests, createSingleServer, PeerTubeServer } from '@shared/extra-utils'
+import { cleanupTests, createSingleServer, PeerTubeServer } from '@shared/server-commands'
 import { HttpStatusCode } from '@shared/models'
 
 describe('Start and stop server without web client routes', function () {

+ 1 - 1
server/tests/api/server/plugins.ts

@@ -11,7 +11,7 @@ import {
   setAccessTokensToServers,
   testHelloWorldRegisteredSettings,
   wait
-} from '@shared/extra-utils'
+} from '@shared/server-commands'
 import { HttpStatusCode, PluginType } from '@shared/models'
 
 const expect = chai.expect

+ 2 - 2
server/tests/api/server/proxy.ts

@@ -11,8 +11,8 @@ import {
   setAccessTokensToServers,
   setDefaultVideoChannel,
   waitJobs
-} from '@shared/extra-utils'
-import { MockProxy } from '@shared/extra-utils/mock-servers/mock-proxy'
+} from '@shared/server-commands'
+import { MockProxy } from '@shared/server-commands/mock-servers/mock-proxy'
 import { HttpStatusCode, VideoPrivacy } from '@shared/models'
 
 const expect = chai.expect

+ 1 - 1
server/tests/api/server/reverse-proxy.ts

@@ -1,7 +1,7 @@
 /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
 
 import { expect } from 'chai'
-import { cleanupTests, createSingleServer, PeerTubeServer, setAccessTokensToServers, wait } from '@shared/extra-utils'
+import { cleanupTests, createSingleServer, PeerTubeServer, setAccessTokensToServers, wait } from '@shared/server-commands'
 import { HttpStatusCode } from '@shared/models'
 
 describe('Test application behind a reverse proxy', function () {

+ 1 - 1
server/tests/api/server/services.ts

@@ -2,7 +2,7 @@
 
 import 'mocha'
 import * as chai from 'chai'
-import { cleanupTests, createSingleServer, PeerTubeServer, setAccessTokensToServers, setDefaultVideoChannel } from '@shared/extra-utils'
+import { cleanupTests, createSingleServer, PeerTubeServer, setAccessTokensToServers, setDefaultVideoChannel } from '@shared/server-commands'
 import { Video, VideoPlaylistPrivacy } from '@shared/models'
 
 const expect = chai.expect

+ 1 - 1
server/tests/api/server/slow-follows.ts

@@ -2,7 +2,7 @@
 
 import 'mocha'
 import * as chai from 'chai'
-import { cleanupTests, createMultipleServers, doubleFollow, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/extra-utils'
+import { cleanupTests, createMultipleServers, doubleFollow, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/server-commands'
 import { Job } from '@shared/models'
 
 const expect = chai.expect

+ 1 - 1
server/tests/api/server/stats.ts

@@ -10,7 +10,7 @@ import {
   setAccessTokensToServers,
   wait,
   waitJobs
-} from '@shared/extra-utils'
+} from '@shared/server-commands'
 import { ActivityType, VideoPlaylistPrivacy } from '@shared/models'
 
 const expect = chai.expect

+ 1 - 1
server/tests/api/server/tracker.ts

@@ -3,7 +3,7 @@
 import 'mocha'
 import magnetUtil from 'magnet-uri'
 import WebTorrent from 'webtorrent'
-import { cleanupTests, createSingleServer, killallServers, PeerTubeServer, setAccessTokensToServers } from '@shared/extra-utils'
+import { cleanupTests, createSingleServer, killallServers, PeerTubeServer, setAccessTokensToServers } from '@shared/server-commands'
 
 describe('Test tracker', function () {
   let server: PeerTubeServer

+ 1 - 1
server/tests/api/users/user-subscriptions.ts

@@ -10,7 +10,7 @@ import {
   setAccessTokensToServers,
   SubscriptionsCommand,
   waitJobs
-} from '@shared/extra-utils'
+} from '@shared/server-commands'
 
 const expect = chai.expect
 

+ 1 - 1
server/tests/api/users/users-multiple-servers.ts

@@ -14,7 +14,7 @@ import {
   setAccessTokensToServers,
   testImage,
   waitJobs
-} from '@shared/extra-utils'
+} from '@shared/server-commands'
 import { MyUser } from '@shared/models'
 
 const expect = chai.expect

+ 1 - 1
server/tests/api/users/users-verification.ts

@@ -2,7 +2,7 @@
 
 import 'mocha'
 import * as chai from 'chai'
-import { cleanupTests, createSingleServer, MockSmtpServer, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/extra-utils'
+import { cleanupTests, createSingleServer, MockSmtpServer, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/server-commands'
 import { HttpStatusCode } from '@shared/models'
 
 const expect = chai.expect

+ 1 - 1
server/tests/api/users/users.ts

@@ -11,7 +11,7 @@ import {
   setAccessTokensToServers,
   testImage,
   waitJobs
-} from '@shared/extra-utils'
+} from '@shared/server-commands'
 import { AbuseState, HttpStatusCode, OAuth2ErrorCode, UserAdminFlag, UserRole, Video, VideoPlaylistType } from '@shared/models'
 
 const expect = chai.expect

+ 1 - 1
server/tests/api/videos/audio-only.ts

@@ -3,7 +3,7 @@
 import 'mocha'
 import * as chai from 'chai'
 import { getAudioStream, getVideoStreamSize } from '@server/helpers/ffprobe-utils'
-import { cleanupTests, createMultipleServers, doubleFollow, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/extra-utils'
+import { cleanupTests, createMultipleServers, doubleFollow, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/server-commands'
 
 const expect = chai.expect
 

+ 1 - 1
server/tests/api/videos/multiple-servers.ts

@@ -18,7 +18,7 @@ import {
   wait,
   waitJobs,
   webtorrentAdd
-} from '@shared/extra-utils'
+} from '@shared/server-commands'
 import { HttpStatusCode, VideoCommentThreadTree, VideoPrivacy } from '@shared/models'
 import { completeVideoCheck } from '@server/tests/shared/video'
 

+ 1 - 1
server/tests/api/videos/resumable-upload.ts

@@ -11,7 +11,7 @@ import {
   PeerTubeServer,
   setAccessTokensToServers,
   setDefaultVideoChannel
-} from '@shared/extra-utils'
+} from '@shared/server-commands'
 import { HttpStatusCode, VideoPrivacy } from '@shared/models'
 
 const expect = chai.expect

+ 1 - 1
server/tests/api/videos/single-server.ts

@@ -10,7 +10,7 @@ import {
   setAccessTokensToServers,
   testImage,
   wait
-} from '@shared/extra-utils'
+} from '@shared/server-commands'
 import { Video, VideoPrivacy } from '@shared/models'
 import { completeVideoCheck } from '@server/tests/shared/video'
 

Some files were not shown because too many files changed in this diff