import { OverviewsCommand } from '../overviews'
import { SearchCommand } from '../search'
import { SocketIOCommand } from '../socket'
-import { AccountsCommand, BlocklistCommand, LoginCommand, NotificationsCommand, SubscriptionsCommand, UsersCommand } from '../users'
+import {
+ AccountsCommand,
+ BlocklistCommand,
+ LoginCommand,
+ NotificationsCommand,
+ RegistrationsCommand,
+ SubscriptionsCommand,
+ TwoFactorCommand,
+ UsersCommand
+} from '../users'
import {
BlacklistCommand,
CaptionsCommand,
StreamingPlaylistsCommand,
VideosCommand,
VideoStudioCommand,
+ VideoTokenCommand,
ViewsCommand
} from '../videos'
import { CommentsCommand } from '../videos/comments-command'
videos?: VideosCommand
videoStats?: VideoStatsCommand
views?: ViewsCommand
+ twoFactor?: TwoFactorCommand
+ videoToken?: VideoTokenCommand
+ registrations?: RegistrationsCommand
constructor (options: { serverNumber: number } | { url: string }) {
if ((options as any).url) {
this.rtmpsPort = this.parallel ? this.randomRTMP() : 1937
this.port = 9000 + this.internalServerNumber
- this.url = `http://localhost:${this.port}`
- this.host = `localhost:${this.port}`
- this.hostname = 'localhost'
+ this.url = `http://127.0.0.1:${this.port}`
+ this.host = `127.0.0.1:${this.port}`
+ this.hostname = '127.0.0.1'
}
setUrl (url: string) {
const onPeerTubeExit = () => rej(new Error('Process exited:\n' + aggregatedLogs))
const onParentExit = () => {
- if (!this.app || !this.app.pid) return
+ if (!this.app?.pid) return
try {
process.kill(self.app.pid)
this.videoStudio = new VideoStudioCommand(this)
this.videoStats = new VideoStatsCommand(this)
this.views = new ViewsCommand(this)
+ this.twoFactor = new TwoFactorCommand(this)
+ this.videoToken = new VideoTokenCommand(this)
+ this.registrations = new RegistrationsCommand(this)
}
}