1
0
Fork 0

Update server dependencies

This commit is contained in:
Chocobozzz 2023-02-16 11:56:58 +01:00
parent 5bfe684e76
commit e65ef81cf5
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
16 changed files with 2045 additions and 1776 deletions

View File

@ -104,7 +104,26 @@
"@typescript-eslint/require-await": "error", "@typescript-eslint/require-await": "error",
// bugged but useful // 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": [ "ignorePatterns": [
"node_modules/" "node_modules/"

View File

@ -22,7 +22,7 @@ function afterLocalSuite () {
} }
async function beforeLocalSession (config: { baseUrl: string }, capabilities: { browserName: string }) { async function beforeLocalSession (config: { baseUrl: string }, capabilities: { browserName: string }) {
await createScreenshotsDirectory() createScreenshotsDirectory()
appInstance = capabilities['browserName'] === 'chrome' appInstance = capabilities['browserName'] === 'chrome'
? 1 ? 1

View File

@ -21,7 +21,7 @@ const debugLogger = debug('peertube:main:DeferLoadingDirective')
export class DeferLoadingDirective implements AfterViewInit, OnDestroy { export class DeferLoadingDirective implements AfterViewInit, OnDestroy {
@ContentChild(TemplateRef) template: TemplateRef<any> @ContentChild(TemplateRef) template: TemplateRef<any>
@Output() loaded: EventEmitter<any> = new EventEmitter() @Output() loaded = new EventEmitter()
view: EmbeddedViewRef<any> view: EmbeddedViewRef<any>

View File

@ -74,6 +74,9 @@
"client-report": "bash ./scripts/client-report.sh", "client-report": "bash ./scripts/client-report.sh",
"swagger-cli": "swagger-cli" "swagger-cli": "swagger-cli"
}, },
"resolutions": {
"eslint/esquery": "1.4.0"
},
"dependencies": { "dependencies": {
"@aws-sdk/client-s3": "^3.190.0", "@aws-sdk/client-s3": "^3.190.0",
"@aws-sdk/lib-storage": "^3.190.0", "@aws-sdk/lib-storage": "^3.190.0",
@ -82,14 +85,14 @@
"@node-oauth/oauth2-server": "^4.2.0", "@node-oauth/oauth2-server": "^4.2.0",
"@opentelemetry/api": "^1.1.0", "@opentelemetry/api": "^1.1.0",
"@opentelemetry/exporter-jaeger": "^1.3.1", "@opentelemetry/exporter-jaeger": "^1.3.1",
"@opentelemetry/exporter-prometheus": "~0.34.0", "@opentelemetry/exporter-prometheus": "~0.35.1",
"@opentelemetry/instrumentation": "^0.34.0", "@opentelemetry/instrumentation": "^0.35.1",
"@opentelemetry/instrumentation-dns": "^0.30.0", "@opentelemetry/instrumentation-dns": "^0.31.2",
"@opentelemetry/instrumentation-express": "^0.31.0", "@opentelemetry/instrumentation-express": "^0.32.1",
"@opentelemetry/instrumentation-fs": "^0.5.0", "@opentelemetry/instrumentation-fs": "^0.7.0",
"@opentelemetry/instrumentation-http": "^0.34.0", "@opentelemetry/instrumentation-http": "^0.35.1",
"@opentelemetry/instrumentation-ioredis": "^0.32.2", "@opentelemetry/instrumentation-ioredis": "^0.33.2",
"@opentelemetry/instrumentation-pg": "^0.32.0", "@opentelemetry/instrumentation-pg": "^0.34.1",
"@opentelemetry/resources": "^1.3.1", "@opentelemetry/resources": "^1.3.1",
"@opentelemetry/sdk-metrics": "^1.8.0", "@opentelemetry/sdk-metrics": "^1.8.0",
"@opentelemetry/sdk-trace-base": "^1.3.1", "@opentelemetry/sdk-trace-base": "^1.3.1",
@ -107,20 +110,20 @@
"bullmq": "^1.87.0", "bullmq": "^1.87.0",
"bytes": "^3.0.0", "bytes": "^3.0.0",
"chokidar": "^3.4.2", "chokidar": "^3.4.2",
"commander": "^9.0.0", "commander": "^10.0.0",
"config": "^3.0.0", "config": "^3.0.0",
"cookie-parser": "^1.4.3", "cookie-parser": "^1.4.3",
"cors": "^2.8.1", "cors": "^2.8.1",
"create-torrent": "^5.0.0", "create-torrent": "^5.0.0",
"deep-object-diff": "^1.1.0", "deep-object-diff": "^1.1.0",
"email-templates": "^10.0.0", "email-templates": "^11.0.3",
"execa": "^5.1.1", "execa": "^5.1.1",
"express": "^4.18.1", "express": "^4.18.1",
"express-rate-limit": "^6.1.0", "express-rate-limit": "^6.1.0",
"express-validator": "^6.4.0", "express-validator": "^6.4.0",
"flat": "^5.0.0", "flat": "^5.0.0",
"fluent-ffmpeg": "^2.1.0", "fluent-ffmpeg": "^2.1.0",
"fs-extra": "^10.0.0", "fs-extra": "^11.1.0",
"got": "^11.8.2", "got": "^11.8.2",
"helmet": "^6.0.0", "helmet": "^6.0.0",
"hpagent": "^1.0.0", "hpagent": "^1.0.0",
@ -130,7 +133,7 @@
"ipaddr.js": "2.0.1", "ipaddr.js": "2.0.1",
"is-cidr": "^4.0.0", "is-cidr": "^4.0.0",
"iso-639-3": "2.2.0", "iso-639-3": "2.2.0",
"jimp": "^0.16.2", "jimp": "^0.22.4",
"js-yaml": "^4.0.0", "js-yaml": "^4.0.0",
"jsonld": "~8.1.0", "jsonld": "~8.1.0",
"lodash": "^4.17.10", "lodash": "^4.17.10",
@ -144,7 +147,7 @@
"multer": "^1.4.5-lts.1", "multer": "^1.4.5-lts.1",
"node-media-server": "^2.1.4", "node-media-server": "^2.1.4",
"nodemailer": "^6.0.0", "nodemailer": "^6.0.0",
"opentelemetry-instrumentation-sequelize": "^0.32.0", "opentelemetry-instrumentation-sequelize": "^0.34.0",
"otpauth": "^9.0.2", "otpauth": "^9.0.2",
"p-queue": "^6", "p-queue": "^6",
"parse-torrent": "^9.1.0", "parse-torrent": "^9.1.0",
@ -186,12 +189,11 @@
"@types/create-torrent": "^5.0.0", "@types/create-torrent": "^5.0.0",
"@types/express": "4.17.9", "@types/express": "4.17.9",
"@types/fluent-ffmpeg": "^2.1.16", "@types/fluent-ffmpeg": "^2.1.16",
"@types/fs-extra": "^9.0.1", "@types/fs-extra": "^11.0.1",
"@types/lodash": "^4.14.64", "@types/lodash": "^4.14.64",
"@types/magnet-uri": "^5.1.1", "@types/magnet-uri": "^5.1.1",
"@types/maildev": "^0.0.3", "@types/maildev": "^0.0.4",
"@types/memoizee": "^0.4.2", "@types/memoizee": "^0.4.2",
"@types/mkdirp": "^1.0.0",
"@types/mocha": "^10.0.0", "@types/mocha": "^10.0.0",
"@types/morgan": "^1.7.32", "@types/morgan": "^1.7.32",
"@types/multer": "^1.3.3", "@types/multer": "^1.3.3",
@ -210,8 +212,8 @@
"chai-xml": "^0.4.0", "chai-xml": "^0.4.0",
"concurrently": "^7.0.0", "concurrently": "^7.0.0",
"depcheck": "^1.4.2", "depcheck": "^1.4.2",
"eslint": "^8.0.0", "eslint": "8.34.0",
"eslint-config-standard-with-typescript": "^23.0.0", "eslint-config-standard-with-typescript": "34.0.0",
"eslint-plugin-import": "^2.20.1", "eslint-plugin-import": "^2.20.1",
"eslint-plugin-n": "^15.2.4", "eslint-plugin-n": "^15.2.4",
"eslint-plugin-node": "^11.0.0", "eslint-plugin-node": "^11.0.0",
@ -219,12 +221,12 @@
"fast-xml-parser": "^4.0.0-beta.8", "fast-xml-parser": "^4.0.0-beta.8",
"mocha": "^10.0.0", "mocha": "^10.0.0",
"proxy": "^1.0.2", "proxy": "^1.0.2",
"resolve-tspaths": "^0.7.0", "resolve-tspaths": "^0.8.8",
"socket.io-client": "^4.5.4", "socket.io-client": "^4.5.4",
"supertest": "^6.0.1", "supertest": "^6.0.1",
"swagger-cli": "^4.0.2", "swagger-cli": "^4.0.2",
"ts-node": "^10.8.1", "ts-node": "^10.8.1",
"tsc-watch": "^5.0.3", "tsc-watch": "^6.0.0",
"typescript": "~4.8" "typescript": "~4.8"
}, },
"bundlewatch": { "bundlewatch": {

View File

@ -26,7 +26,7 @@ jobsRouter.post('/pause',
jobsRouter.post('/resume', jobsRouter.post('/resume',
authenticate, authenticate,
ensureUserHasRight(UserRight.MANAGE_JOBS), ensureUserHasRight(UserRight.MANAGE_JOBS),
asyncMiddleware(resumeJobQueue) resumeJobQueue
) )
jobsRouter.get('/:state?', jobsRouter.get('/:state?',
@ -55,8 +55,8 @@ async function pauseJobQueue (req: express.Request, res: express.Response) {
return res.sendStatus(HttpStatusCode.NO_CONTENT_204) return res.sendStatus(HttpStatusCode.NO_CONTENT_204)
} }
async function resumeJobQueue (req: express.Request, res: express.Response) { function resumeJobQueue (req: express.Request, res: express.Response) {
await JobQueue.Instance.resume() JobQueue.Instance.resume()
return res.sendStatus(HttpStatusCode.NO_CONTENT_204) return res.sendStatus(HttpStatusCode.NO_CONTENT_204)
} }

View File

@ -309,7 +309,7 @@ async function changeUserBlock (res: express.Response, user: MUserAccountDefault
await user.save({ transaction: t }) 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) auditLogger.update(getAuditIdFromRes(res), new UserAuditView(user.toFormattedJSON()), oldUserAuditView)
} }

View File

@ -138,7 +138,9 @@ async function deleteUserSubscription (req: express.Request, res: express.Respon
const subscription = res.locals.subscription const subscription = res.locals.subscription
await sequelizeTypescript.transaction(async t => { 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 }) return subscription.destroy({ transaction: t })
}) })

View File

@ -3,8 +3,8 @@ import { CONSTRAINTS_FIELDS } from '@server/initializers/constants'
import { ClientLogLevel, ServerLogLevel } from '@shared/models' import { ClientLogLevel, ServerLogLevel } from '@shared/models'
import { exists } from './misc' import { exists } from './misc'
const serverLogLevels: Set<ServerLogLevel> = new Set([ 'debug', 'info', 'warn', 'error' ]) const serverLogLevels = new Set<ServerLogLevel>([ 'debug', 'info', 'warn', 'error' ])
const clientLogLevels: Set<ClientLogLevel> = new Set([ 'warn', 'error' ]) const clientLogLevels = new Set<ClientLogLevel>([ 'warn', 'error' ])
function isValidLogLevel (value: any) { function isValidLogLevel (value: any) {
return exists(value) && serverLogLevels.has(value) return exists(value) && serverLogLevels.has(value)

View File

@ -11,7 +11,7 @@ import { getImagesInfoFromObject } from './shared/object-to-model-attributes'
export class APActorUpdater { export class APActorUpdater {
private accountOrChannel: MAccount | MChannel private readonly accountOrChannel: MAccount | MChannel
constructor ( constructor (
private readonly actorObject: ActivityPubActor, private readonly actorObject: ActivityPubActor,

View File

@ -16,7 +16,7 @@ class StatsManager {
private readonly instanceStartDate = new Date() private readonly instanceStartDate = new Date()
private inboxMessages = { private readonly inboxMessages = {
processed: 0, processed: 0,
errors: 0, errors: 0,
successes: 0, successes: 0,

View File

@ -27,7 +27,7 @@ export class ApiCache {
private readonly options: APICacheOptions private readonly options: APICacheOptions
private readonly timers: { [ id: string ]: NodeJS.Timeout } = {} private readonly timers: { [ id: string ]: NodeJS.Timeout } = {}
private index: { all: string[] } = { all: [] } private readonly index: { all: string[] } = { all: [] }
constructor (options: APICacheOptions) { constructor (options: APICacheOptions) {
this.options = { this.options = {

View File

@ -2,7 +2,7 @@ import { HttpStatusCode } from '../../models'
import { OAuth2ErrorCode, ServerErrorCode } from './server-error-code.enum' import { OAuth2ErrorCode, ServerErrorCode } from './server-error-code.enum'
export interface PeerTubeProblemDocumentData { export interface PeerTubeProblemDocumentData {
'invalid-params'?: Record<string, Object> 'invalid-params'?: Record<string, object>
originUrl?: string originUrl?: string

View File

@ -201,7 +201,7 @@ export class PeerTubeServer {
return join(root(), testDirectory, directoryName) return join(root(), testDirectory, directoryName)
} }
async flushAndRun (configOverride?: Object, options: RunServerOptions = {}) { async flushAndRun (configOverride?: object, options: RunServerOptions = {}) {
await ServersCommand.flushTests(this.internalServerNumber) await ServersCommand.flushTests(this.internalServerNumber)
return this.run(configOverride, options) return this.run(configOverride, options)

View File

@ -2,7 +2,7 @@ import { ensureDir } from 'fs-extra'
import { isGithubCI } from '@shared/core-utils' import { isGithubCI } from '@shared/core-utils'
import { PeerTubeServer, RunServerOptions } from './server' 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 }) const server = new PeerTubeServer({ serverNumber })
await server.flushAndRun(configOverride, options) await server.flushAndRun(configOverride, options)
@ -10,7 +10,7 @@ async function createSingleServer (serverNumber: number, configOverride?: Object
return server return server
} }
function createMultipleServers (totalServers: number, configOverride?: Object, options: RunServerOptions = {}) { function createMultipleServers (totalServers: number, configOverride?: object, options: RunServerOptions = {}) {
const serverPromises: Promise<PeerTubeServer>[] = [] const serverPromises: Promise<PeerTubeServer>[] = []
for (let i = 1; i <= totalServers; i++) { for (let i = 1; i <= totalServers; i++) {

View File

@ -27,7 +27,7 @@ export type DeepPartial<T> = {
: DeepPartial<T[P]> : 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> = { export type DeepOmitHelper<T, K extends keyof T> = {
[P in K]: // extra level of indirection needed to trigger homomorhic behavior [P in K]: // extra level of indirection needed to trigger homomorhic behavior
T[P] extends infer TP // distribute over unions T[P] extends infer TP // distribute over unions

3722
yarn.lock

File diff suppressed because it is too large Load Diff