shared/ typescript types dir server-commands

pull/4650/head
Chocobozzz 2021-12-17 09:29:23 +01:00
parent 6b5f72beda
commit bf54587a3e
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
242 changed files with 228 additions and 172 deletions

View File

@ -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

View File

@ -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))

View File

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

View File

@ -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

View File

@ -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

View File

@ -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'

View File

@ -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 () {

View File

@ -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'

View File

@ -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 () {

View File

@ -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 () {

View File

@ -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 () {

View File

@ -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 () {

View File

@ -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 () {

View File

@ -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

View File

@ -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 () {

View File

@ -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 () {

View File

@ -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 () {

View File

@ -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 () {

View File

@ -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 () {

View File

@ -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 () {

View File

@ -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 () {

View File

@ -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 () {

View File

@ -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 () {

View File

@ -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) {

View File

@ -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 () {

View File

@ -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 () {

View File

@ -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 () {

View File

@ -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 () {

View File

@ -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 () {

View File

@ -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 () {

View File

@ -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 () {

View File

@ -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 () {

View File

@ -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 () {

View File

@ -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

View File

@ -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

View File

@ -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 () {

View File

@ -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 () {

View File

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

View File

@ -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 () {

View File

@ -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 () {

View File

@ -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

View File

@ -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

View File

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

View File

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

View File

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

View File

@ -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

View File

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

View File

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

View File

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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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 () {

View File

@ -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

View File

@ -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 () {

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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 () {

View File

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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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,

View File

@ -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

View File

@ -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

View File

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

View File

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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

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

View File

@ -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'

View File

@ -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'

View File

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

View File

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

View File

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

View File

@ -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 () {

View File

@ -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

View File

@ -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

View File

@ -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 () {

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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'

View File

@ -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

View File

@ -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 have changed in this diff Show More