Update server dependencies

pull/5817/head
Chocobozzz 2023-05-22 17:04:39 +02:00
parent 57c318653e
commit 83002a8234
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
16 changed files with 1943 additions and 1821 deletions

View File

@ -73,9 +73,6 @@
"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",
@ -84,14 +81,14 @@
"@node-oauth/oauth2-server": "^4.2.0",
"@opentelemetry/api": "^1.1.0",
"@opentelemetry/exporter-jaeger": "^1.3.1",
"@opentelemetry/exporter-prometheus": "~0.35.1",
"@opentelemetry/instrumentation": "^0.35.1",
"@opentelemetry/exporter-prometheus": "~0.39.1",
"@opentelemetry/instrumentation": "^0.39.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/instrumentation-http": "^0.39.1",
"@opentelemetry/instrumentation-ioredis": "^0.34.2",
"@opentelemetry/instrumentation-pg": "^0.35.2",
"@opentelemetry/resources": "^1.3.1",
"@opentelemetry/sdk-metrics": "^1.8.0",
"@opentelemetry/sdk-trace-base": "^1.3.1",
@ -104,7 +101,7 @@
"async-mutex": "^0.4.0",
"bcrypt": "5.1.0",
"bencode": "^2.0.2",
"bittorrent-tracker": "^9.0.0",
"bittorrent-tracker": "^9",
"bluebird": "^3.5.0",
"bullmq": "^3.6.6",
"bytes": "^3.0.0",
@ -113,18 +110,18 @@
"config": "^3.0.0",
"cookie-parser": "^1.4.3",
"cors": "^2.8.1",
"create-torrent": "^5.0.0",
"create-torrent": "^5",
"deep-object-diff": "^1.1.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",
"express-validator": "^7.0.1",
"flat": "^5.0.0",
"fluent-ffmpeg": "^2.1.0",
"fs-extra": "^11.1.0",
"got": "^11.8.2",
"helmet": "^6.0.0",
"helmet": "^7.0.0",
"hpagent": "^1.0.0",
"http-problem-details": "^0.1.5",
"ioredis": "^5.2.3",
@ -134,10 +131,10 @@
"iso-639-3": "2.2.0",
"jimp": "^0.22.4",
"js-yaml": "^4.0.0",
"jsonld": "~8.1.0",
"jsonld": "~8.2.0",
"lodash": "^4.17.21",
"lru-cache": "^7.13.0",
"magnet-uri": "^6.1.0",
"lru-cache": "^9.1.1",
"magnet-uri": "^6",
"markdown-it": "^13.0.1",
"markdown-it-emoji": "^2.0.0",
"maxmind": "^4.3.6",
@ -146,10 +143,10 @@
"multer": "^1.4.5-lts.1",
"node-media-server": "^2.1.4",
"nodemailer": "^6.0.0",
"opentelemetry-instrumentation-sequelize": "^0.34.0",
"opentelemetry-instrumentation-sequelize": "^0.35.0",
"otpauth": "^9.0.2",
"p-queue": "^6",
"parse-torrent": "^9.1.0",
"parse-torrent": "^9",
"password-generator": "^2.0.2",
"pg": "^8.2.1",
"piscina": "^3.2.0",
@ -158,7 +155,7 @@
"pug": "^3.0.0",
"reflect-metadata": "^0.1.12",
"sanitize-html": "2.x",
"sequelize": "6.29.0",
"sequelize": "6.31.1",
"sequelize-typescript": "^2.0.0-beta.1",
"short-uuid": "^4.2.0",
"sitemap": "^7.0.0",
@ -170,7 +167,7 @@
"useragent": "^2.3.0",
"validator": "^13.0.0",
"webfinger.js": "^2.6.6",
"webtorrent": "^1.0.0",
"webtorrent": "^1.9",
"winston": "3.8.2",
"ws": "^8.0.0"
},
@ -209,12 +206,12 @@
"chai": "^4.1.1",
"chai-json-schema": "^1.5.0",
"chai-xml": "^0.4.0",
"concurrently": "^7.0.0",
"concurrently": "^8.0.1",
"depcheck": "^1.4.2",
"eslint": "8.34.0",
"eslint-config-standard-with-typescript": "34.0.0",
"eslint": "8.41.0",
"eslint-config-standard-with-typescript": "34.0.1",
"eslint-plugin-import": "^2.20.1",
"eslint-plugin-n": "^15.2.4",
"eslint-plugin-n": "^16.0.0",
"eslint-plugin-node": "^11.0.0",
"eslint-plugin-promise": "^6.0.0",
"fast-xml-parser": "^4.0.0-beta.8",
@ -222,14 +219,14 @@
"mocha": "^10.0.0",
"pixelmatch": "^5.3.0",
"pngjs": "^7.0.0",
"proxy": "^1.0.2",
"proxy": "^2.1.1",
"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": "^6.0.0",
"typescript": "~4.8"
"typescript": "~5.0.4"
},
"bundlewatch": {
"files": [

View File

@ -1,7 +1,7 @@
import { Server as TrackerServer } from 'bittorrent-tracker'
import express from 'express'
import { createServer } from 'http'
import LRUCache from 'lru-cache'
import { LRUCache } from 'lru-cache'
import proxyAddr from 'proxy-addr'
import { WebSocketServer } from 'ws'
import { logger } from '../helpers/logger'

View File

@ -1,5 +1,5 @@
import { UploadFilesForCheck } from 'express'
import magnetUtil from 'magnet-uri'
import { decode as magnetUriDecode } from 'magnet-uri'
import validator from 'validator'
import { VideoFilter, VideoInclude, VideoPrivacy, VideoRateType } from '@shared/models'
import {
@ -137,7 +137,7 @@ function isVideoFileSizeValid (value: string) {
function isVideoMagnetUriValid (value: string) {
if (!exists(value)) return false
const parsed = magnetUtil.decode(value)
const parsed = magnetUriDecode(value)
return parsed && isVideoFileInfoHashValid(parsed.infoHash)
}

View File

@ -1,6 +1,7 @@
import { copy, readFile, remove, rename } from 'fs-extra'
import Jimp, { read as jimpRead } from 'jimp'
import { join } from 'path'
import { ColorActionName } from '@jimp/plugin-color'
import { getLowercaseExtension } from '@shared/core-utils'
import { buildUUID } from '@shared/extra-utils'
import { convertWebPToJPG, generateThumbnailFromVideo, processGIF } from './ffmpeg'
@ -131,7 +132,7 @@ async function autoResize (options: {
if (sourceIsPortrait && !destIsPortraitOrSquare) {
const baseImage = sourceImage.cloneQuiet().cover(newSize.width, newSize.height)
.color([ { apply: 'shade', params: [ 50 ] } ])
.color([ { apply: ColorActionName.SHADE, params: [ 50 ] } ])
const topImage = sourceImage.cloneQuiet().contain(newSize.width, newSize.height)

View File

@ -1,7 +1,7 @@
import { decode, encode } from 'bencode'
import createTorrent from 'create-torrent'
import { createWriteStream, ensureDir, pathExists, readFile, remove, writeFile } from 'fs-extra'
import magnetUtil from 'magnet-uri'
import { encode as magnetUriEncode } from 'magnet-uri'
import parseTorrent from 'parse-torrent'
import { dirname, join } from 'path'
import { pipeline } from 'stream'
@ -185,7 +185,7 @@ function generateMagnetUri (
name: video.name
}
return magnetUtil.encode(magnetHash)
return magnetUriEncode(magnetHash)
}
// ---------------------------------------------------------------------------

View File

@ -1,5 +1,5 @@
import { maxBy, minBy } from 'lodash'
import magnetUtil from 'magnet-uri'
import { decode as magnetUriDecode } from 'magnet-uri'
import { basename } from 'path'
import { isAPVideoFileUrlMetadataObject } from '@server/helpers/custom-validators/activitypub/videos'
import { isVideoFileInfoHashValid } from '@server/helpers/custom-validators/videos'
@ -62,7 +62,7 @@ function getFileAttributesFromUrl (
if (!magnet) throw new Error('Cannot find associated magnet uri for file ' + fileUrl.href)
const parsed = magnetUtil.decode(magnet.href)
const parsed = magnetUriDecode(magnet.href)
if (!parsed || isVideoFileInfoHashValid(parsed.infoHash) === false) {
throw new Error('Cannot parse magnet URI ' + magnet.href)
}

View File

@ -1,4 +1,4 @@
import LRUCache from 'lru-cache'
import { LRUCache } from 'lru-cache'
import { MOAuthTokenUser } from '@server/types/models'
import { LRU_CACHE } from '../../initializers/constants'

View File

@ -1,5 +1,5 @@
import { remove } from 'fs-extra'
import LRUCache from 'lru-cache'
import { LRUCache } from 'lru-cache'
import { join } from 'path'
import { Transaction } from 'sequelize/types'
import { ActorModel } from '@server/models/actor/actor'

View File

@ -1,4 +1,4 @@
import LRUCache from 'lru-cache'
import { LRUCache } from 'lru-cache'
import { LRU_CACHE } from '@server/initializers/constants'
import { MUserAccountUrl } from '@server/types/models'
import { pick } from '@shared/core-utils'

View File

@ -1,6 +1,6 @@
import express from 'express'
import { query } from 'express-validator'
import LRUCache from 'lru-cache'
import { LRUCache } from 'lru-cache'
import { basename, dirname } from 'path'
import { exists, isSafePeerTubeFilenameWithoutExtension, isUUIDValid, toBooleanOrNull } from '@server/helpers/custom-validators/misc'
import { logger } from '@server/helpers/logger'

View File

@ -54,7 +54,7 @@ describe('Test upload quota', function () {
})
it('Should fail with a registered user having too many videos with resumable upload', async function () {
this.timeout(30000)
this.timeout(120000)
const user = { username: 'registered' + randomInt(1, 1500), password: 'password' }
await server.registrations.register(user)

View File

@ -2,7 +2,7 @@
import { expect } from 'chai'
import { readdir } from 'fs-extra'
import magnetUtil from 'magnet-uri'
import { decode as magnetUriDecode } from 'magnet-uri'
import { basename, join } from 'path'
import { checkSegmentHash, checkVideoFilesWereRemoved, saveVideoInServers } from '@server/tests/shared'
import { wait } from '@shared/core-utils'
@ -29,7 +29,7 @@ let servers: PeerTubeServer[] = []
let video1Server2: VideoDetails
async function checkMagnetWebseeds (file: VideoFile, baseWebseeds: string[], server: PeerTubeServer) {
const parsed = magnetUtil.decode(file.magnetUri)
const parsed = magnetUriDecode(file.magnetUri)
for (const ws of baseWebseeds) {
const found = parsed.urlList.find(url => url === `${ws}${basename(file.fileUrl)}`)

View File

@ -1,6 +1,6 @@
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await,@typescript-eslint/no-floating-promises */
import magnetUtil from 'magnet-uri'
import { decode as magnetUriDecode, encode as magnetUriEncode } from 'magnet-uri'
import WebTorrent from 'webtorrent'
import { cleanupTests, createSingleServer, killallServers, PeerTubeServer, setAccessTokensToServers } from '@shared/server-commands'
@ -19,10 +19,10 @@ describe('Test tracker', function () {
const video = await server.videos.get({ id: uuid })
goodMagnet = video.files[0].magnetUri
const parsed = magnetUtil.decode(goodMagnet)
const parsed = magnetUriDecode(goodMagnet)
parsed.infoHash = '010597bb88b1968a5693a4fa8267c592ca65f2e9'
badMagnet = magnetUtil.encode(parsed)
badMagnet = magnetUriEncode(parsed)
}
})

View File

@ -189,7 +189,7 @@ describe('Test VOD transcoding in peertube-runner program', function () {
})
it('Should transcode videos on manual run', async function () {
this.timeout(360000)
this.timeout(120000)
await servers[0].config.disableTranscoding()

View File

@ -1,5 +1,5 @@
import { createServer, Server } from 'http'
import proxy from 'proxy'
import { createProxy } from 'proxy'
import { getPort, terminateServer } from './shared'
class MockProxy {
@ -7,7 +7,7 @@ class MockProxy {
initialize () {
return new Promise<number>(res => {
this.server = proxy(createServer())
this.server = createProxy(createServer())
this.server.listen(0, () => res(getPort(this.server)))
})
}

3674
yarn.lock

File diff suppressed because it is too large Load Diff