mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2024-08-17 17:30:32 +03:00
Update server dependencies
This commit is contained in:
parent
5bfe684e76
commit
e65ef81cf5
@ -104,7 +104,26 @@
|
||||
"@typescript-eslint/require-await": "error",
|
||||
|
||||
// bugged but useful
|
||||
"@typescript-eslint/restrict-plus-operands": "off"
|
||||
"@typescript-eslint/restrict-plus-operands": "off",
|
||||
|
||||
// Requires strictNullChecks
|
||||
"@typescript-eslint/prefer-nullish-coalescing": "off",
|
||||
"@typescript-eslint/consistent-type-imports": "off",
|
||||
"@typescript-eslint/consistent-indexed-object-style": "off",
|
||||
"@typescript-eslint/no-confusing-void-expression": "off",
|
||||
"@typescript-eslint/consistent-type-exports": "off",
|
||||
"@typescript-eslint/key-spacing": "off",
|
||||
|
||||
"@typescript-eslint/ban-types": [
|
||||
"error",
|
||||
{
|
||||
"types": {
|
||||
"{}": false,
|
||||
"Function": false
|
||||
},
|
||||
"extendDefaults": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"ignorePatterns": [
|
||||
"node_modules/"
|
||||
|
@ -22,7 +22,7 @@ function afterLocalSuite () {
|
||||
}
|
||||
|
||||
async function beforeLocalSession (config: { baseUrl: string }, capabilities: { browserName: string }) {
|
||||
await createScreenshotsDirectory()
|
||||
createScreenshotsDirectory()
|
||||
|
||||
appInstance = capabilities['browserName'] === 'chrome'
|
||||
? 1
|
||||
|
@ -21,7 +21,7 @@ const debugLogger = debug('peertube:main:DeferLoadingDirective')
|
||||
export class DeferLoadingDirective implements AfterViewInit, OnDestroy {
|
||||
@ContentChild(TemplateRef) template: TemplateRef<any>
|
||||
|
||||
@Output() loaded: EventEmitter<any> = new EventEmitter()
|
||||
@Output() loaded = new EventEmitter()
|
||||
|
||||
view: EmbeddedViewRef<any>
|
||||
|
||||
|
42
package.json
42
package.json
@ -74,6 +74,9 @@
|
||||
"client-report": "bash ./scripts/client-report.sh",
|
||||
"swagger-cli": "swagger-cli"
|
||||
},
|
||||
"resolutions": {
|
||||
"eslint/esquery": "1.4.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@aws-sdk/client-s3": "^3.190.0",
|
||||
"@aws-sdk/lib-storage": "^3.190.0",
|
||||
@ -82,14 +85,14 @@
|
||||
"@node-oauth/oauth2-server": "^4.2.0",
|
||||
"@opentelemetry/api": "^1.1.0",
|
||||
"@opentelemetry/exporter-jaeger": "^1.3.1",
|
||||
"@opentelemetry/exporter-prometheus": "~0.34.0",
|
||||
"@opentelemetry/instrumentation": "^0.34.0",
|
||||
"@opentelemetry/instrumentation-dns": "^0.30.0",
|
||||
"@opentelemetry/instrumentation-express": "^0.31.0",
|
||||
"@opentelemetry/instrumentation-fs": "^0.5.0",
|
||||
"@opentelemetry/instrumentation-http": "^0.34.0",
|
||||
"@opentelemetry/instrumentation-ioredis": "^0.32.2",
|
||||
"@opentelemetry/instrumentation-pg": "^0.32.0",
|
||||
"@opentelemetry/exporter-prometheus": "~0.35.1",
|
||||
"@opentelemetry/instrumentation": "^0.35.1",
|
||||
"@opentelemetry/instrumentation-dns": "^0.31.2",
|
||||
"@opentelemetry/instrumentation-express": "^0.32.1",
|
||||
"@opentelemetry/instrumentation-fs": "^0.7.0",
|
||||
"@opentelemetry/instrumentation-http": "^0.35.1",
|
||||
"@opentelemetry/instrumentation-ioredis": "^0.33.2",
|
||||
"@opentelemetry/instrumentation-pg": "^0.34.1",
|
||||
"@opentelemetry/resources": "^1.3.1",
|
||||
"@opentelemetry/sdk-metrics": "^1.8.0",
|
||||
"@opentelemetry/sdk-trace-base": "^1.3.1",
|
||||
@ -107,20 +110,20 @@
|
||||
"bullmq": "^1.87.0",
|
||||
"bytes": "^3.0.0",
|
||||
"chokidar": "^3.4.2",
|
||||
"commander": "^9.0.0",
|
||||
"commander": "^10.0.0",
|
||||
"config": "^3.0.0",
|
||||
"cookie-parser": "^1.4.3",
|
||||
"cors": "^2.8.1",
|
||||
"create-torrent": "^5.0.0",
|
||||
"deep-object-diff": "^1.1.0",
|
||||
"email-templates": "^10.0.0",
|
||||
"email-templates": "^11.0.3",
|
||||
"execa": "^5.1.1",
|
||||
"express": "^4.18.1",
|
||||
"express-rate-limit": "^6.1.0",
|
||||
"express-validator": "^6.4.0",
|
||||
"flat": "^5.0.0",
|
||||
"fluent-ffmpeg": "^2.1.0",
|
||||
"fs-extra": "^10.0.0",
|
||||
"fs-extra": "^11.1.0",
|
||||
"got": "^11.8.2",
|
||||
"helmet": "^6.0.0",
|
||||
"hpagent": "^1.0.0",
|
||||
@ -130,7 +133,7 @@
|
||||
"ipaddr.js": "2.0.1",
|
||||
"is-cidr": "^4.0.0",
|
||||
"iso-639-3": "2.2.0",
|
||||
"jimp": "^0.16.2",
|
||||
"jimp": "^0.22.4",
|
||||
"js-yaml": "^4.0.0",
|
||||
"jsonld": "~8.1.0",
|
||||
"lodash": "^4.17.10",
|
||||
@ -144,7 +147,7 @@
|
||||
"multer": "^1.4.5-lts.1",
|
||||
"node-media-server": "^2.1.4",
|
||||
"nodemailer": "^6.0.0",
|
||||
"opentelemetry-instrumentation-sequelize": "^0.32.0",
|
||||
"opentelemetry-instrumentation-sequelize": "^0.34.0",
|
||||
"otpauth": "^9.0.2",
|
||||
"p-queue": "^6",
|
||||
"parse-torrent": "^9.1.0",
|
||||
@ -186,12 +189,11 @@
|
||||
"@types/create-torrent": "^5.0.0",
|
||||
"@types/express": "4.17.9",
|
||||
"@types/fluent-ffmpeg": "^2.1.16",
|
||||
"@types/fs-extra": "^9.0.1",
|
||||
"@types/fs-extra": "^11.0.1",
|
||||
"@types/lodash": "^4.14.64",
|
||||
"@types/magnet-uri": "^5.1.1",
|
||||
"@types/maildev": "^0.0.3",
|
||||
"@types/maildev": "^0.0.4",
|
||||
"@types/memoizee": "^0.4.2",
|
||||
"@types/mkdirp": "^1.0.0",
|
||||
"@types/mocha": "^10.0.0",
|
||||
"@types/morgan": "^1.7.32",
|
||||
"@types/multer": "^1.3.3",
|
||||
@ -210,8 +212,8 @@
|
||||
"chai-xml": "^0.4.0",
|
||||
"concurrently": "^7.0.0",
|
||||
"depcheck": "^1.4.2",
|
||||
"eslint": "^8.0.0",
|
||||
"eslint-config-standard-with-typescript": "^23.0.0",
|
||||
"eslint": "8.34.0",
|
||||
"eslint-config-standard-with-typescript": "34.0.0",
|
||||
"eslint-plugin-import": "^2.20.1",
|
||||
"eslint-plugin-n": "^15.2.4",
|
||||
"eslint-plugin-node": "^11.0.0",
|
||||
@ -219,12 +221,12 @@
|
||||
"fast-xml-parser": "^4.0.0-beta.8",
|
||||
"mocha": "^10.0.0",
|
||||
"proxy": "^1.0.2",
|
||||
"resolve-tspaths": "^0.7.0",
|
||||
"resolve-tspaths": "^0.8.8",
|
||||
"socket.io-client": "^4.5.4",
|
||||
"supertest": "^6.0.1",
|
||||
"swagger-cli": "^4.0.2",
|
||||
"ts-node": "^10.8.1",
|
||||
"tsc-watch": "^5.0.3",
|
||||
"tsc-watch": "^6.0.0",
|
||||
"typescript": "~4.8"
|
||||
},
|
||||
"bundlewatch": {
|
||||
|
@ -26,7 +26,7 @@ jobsRouter.post('/pause',
|
||||
jobsRouter.post('/resume',
|
||||
authenticate,
|
||||
ensureUserHasRight(UserRight.MANAGE_JOBS),
|
||||
asyncMiddleware(resumeJobQueue)
|
||||
resumeJobQueue
|
||||
)
|
||||
|
||||
jobsRouter.get('/:state?',
|
||||
@ -55,8 +55,8 @@ async function pauseJobQueue (req: express.Request, res: express.Response) {
|
||||
return res.sendStatus(HttpStatusCode.NO_CONTENT_204)
|
||||
}
|
||||
|
||||
async function resumeJobQueue (req: express.Request, res: express.Response) {
|
||||
await JobQueue.Instance.resume()
|
||||
function resumeJobQueue (req: express.Request, res: express.Response) {
|
||||
JobQueue.Instance.resume()
|
||||
|
||||
return res.sendStatus(HttpStatusCode.NO_CONTENT_204)
|
||||
}
|
||||
|
@ -309,7 +309,7 @@ async function changeUserBlock (res: express.Response, user: MUserAccountDefault
|
||||
await user.save({ transaction: t })
|
||||
})
|
||||
|
||||
await Emailer.Instance.addUserBlockJob(user, block, reason)
|
||||
Emailer.Instance.addUserBlockJob(user, block, reason)
|
||||
|
||||
auditLogger.update(getAuditIdFromRes(res), new UserAuditView(user.toFormattedJSON()), oldUserAuditView)
|
||||
}
|
||||
|
@ -138,7 +138,9 @@ async function deleteUserSubscription (req: express.Request, res: express.Respon
|
||||
const subscription = res.locals.subscription
|
||||
|
||||
await sequelizeTypescript.transaction(async t => {
|
||||
if (subscription.state === 'accepted') await sendUndoFollow(subscription, t)
|
||||
if (subscription.state === 'accepted') {
|
||||
sendUndoFollow(subscription, t)
|
||||
}
|
||||
|
||||
return subscription.destroy({ transaction: t })
|
||||
})
|
||||
|
@ -3,8 +3,8 @@ import { CONSTRAINTS_FIELDS } from '@server/initializers/constants'
|
||||
import { ClientLogLevel, ServerLogLevel } from '@shared/models'
|
||||
import { exists } from './misc'
|
||||
|
||||
const serverLogLevels: Set<ServerLogLevel> = new Set([ 'debug', 'info', 'warn', 'error' ])
|
||||
const clientLogLevels: Set<ClientLogLevel> = new Set([ 'warn', 'error' ])
|
||||
const serverLogLevels = new Set<ServerLogLevel>([ 'debug', 'info', 'warn', 'error' ])
|
||||
const clientLogLevels = new Set<ClientLogLevel>([ 'warn', 'error' ])
|
||||
|
||||
function isValidLogLevel (value: any) {
|
||||
return exists(value) && serverLogLevels.has(value)
|
||||
|
@ -11,7 +11,7 @@ import { getImagesInfoFromObject } from './shared/object-to-model-attributes'
|
||||
|
||||
export class APActorUpdater {
|
||||
|
||||
private accountOrChannel: MAccount | MChannel
|
||||
private readonly accountOrChannel: MAccount | MChannel
|
||||
|
||||
constructor (
|
||||
private readonly actorObject: ActivityPubActor,
|
||||
|
@ -16,7 +16,7 @@ class StatsManager {
|
||||
|
||||
private readonly instanceStartDate = new Date()
|
||||
|
||||
private inboxMessages = {
|
||||
private readonly inboxMessages = {
|
||||
processed: 0,
|
||||
errors: 0,
|
||||
successes: 0,
|
||||
|
2
server/middlewares/cache/shared/api-cache.ts
vendored
2
server/middlewares/cache/shared/api-cache.ts
vendored
@ -27,7 +27,7 @@ export class ApiCache {
|
||||
private readonly options: APICacheOptions
|
||||
private readonly timers: { [ id: string ]: NodeJS.Timeout } = {}
|
||||
|
||||
private index: { all: string[] } = { all: [] }
|
||||
private readonly index: { all: string[] } = { all: [] }
|
||||
|
||||
constructor (options: APICacheOptions) {
|
||||
this.options = {
|
||||
|
@ -2,7 +2,7 @@ import { HttpStatusCode } from '../../models'
|
||||
import { OAuth2ErrorCode, ServerErrorCode } from './server-error-code.enum'
|
||||
|
||||
export interface PeerTubeProblemDocumentData {
|
||||
'invalid-params'?: Record<string, Object>
|
||||
'invalid-params'?: Record<string, object>
|
||||
|
||||
originUrl?: string
|
||||
|
||||
|
@ -201,7 +201,7 @@ export class PeerTubeServer {
|
||||
return join(root(), testDirectory, directoryName)
|
||||
}
|
||||
|
||||
async flushAndRun (configOverride?: Object, options: RunServerOptions = {}) {
|
||||
async flushAndRun (configOverride?: object, options: RunServerOptions = {}) {
|
||||
await ServersCommand.flushTests(this.internalServerNumber)
|
||||
|
||||
return this.run(configOverride, options)
|
||||
|
@ -2,7 +2,7 @@ import { ensureDir } from 'fs-extra'
|
||||
import { isGithubCI } from '@shared/core-utils'
|
||||
import { PeerTubeServer, RunServerOptions } from './server'
|
||||
|
||||
async function createSingleServer (serverNumber: number, configOverride?: Object, options: RunServerOptions = {}) {
|
||||
async function createSingleServer (serverNumber: number, configOverride?: object, options: RunServerOptions = {}) {
|
||||
const server = new PeerTubeServer({ serverNumber })
|
||||
|
||||
await server.flushAndRun(configOverride, options)
|
||||
@ -10,7 +10,7 @@ async function createSingleServer (serverNumber: number, configOverride?: Object
|
||||
return server
|
||||
}
|
||||
|
||||
function createMultipleServers (totalServers: number, configOverride?: Object, options: RunServerOptions = {}) {
|
||||
function createMultipleServers (totalServers: number, configOverride?: object, options: RunServerOptions = {}) {
|
||||
const serverPromises: Promise<PeerTubeServer>[] = []
|
||||
|
||||
for (let i = 1; i <= totalServers; i++) {
|
||||
|
@ -27,7 +27,7 @@ export type DeepPartial<T> = {
|
||||
: DeepPartial<T[P]>
|
||||
}
|
||||
|
||||
type Primitive = string | Function | number | boolean | Symbol | undefined | null
|
||||
type Primitive = string | Function | number | boolean | symbol | undefined | null
|
||||
export type DeepOmitHelper<T, K extends keyof T> = {
|
||||
[P in K]: // extra level of indirection needed to trigger homomorhic behavior
|
||||
T[P] extends infer TP // distribute over unions
|
||||
|
Loading…
Reference in New Issue
Block a user