Update server dependencies

This commit is contained in:
Chocobozzz 2024-06-21 14:32:25 +02:00
parent 4ff7880584
commit a722194809
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
7 changed files with 2988 additions and 2702 deletions

View File

@ -93,14 +93,14 @@
"@node-oauth/oauth2-server": "^5.1.0",
"@opentelemetry/api": "^1.1.0",
"@opentelemetry/exporter-jaeger": "^1.15.1",
"@opentelemetry/exporter-prometheus": "~0.48.0",
"@opentelemetry/instrumentation": "^0.48.0",
"@opentelemetry/instrumentation-dns": "^0.33.0",
"@opentelemetry/instrumentation-express": "^0.35.0",
"@opentelemetry/instrumentation-fs": "^0.9.0",
"@opentelemetry/instrumentation-http": "^0.48.0",
"@opentelemetry/instrumentation-ioredis": "^0.37.0",
"@opentelemetry/instrumentation-pg": "^0.38.0",
"@opentelemetry/exporter-prometheus": "~0.52.1",
"@opentelemetry/instrumentation": "^0.52.1",
"@opentelemetry/instrumentation-dns": "^0.37.0",
"@opentelemetry/instrumentation-express": "^0.40.1",
"@opentelemetry/instrumentation-fs": "^0.13.0",
"@opentelemetry/instrumentation-http": "^0.52.1",
"@opentelemetry/instrumentation-ioredis": "^0.41.0",
"@opentelemetry/instrumentation-pg": "^0.42.0",
"@opentelemetry/resources": "^1.15.1",
"@opentelemetry/sdk-metrics": "^1.15.1",
"@opentelemetry/sdk-trace-base": "^1.15.1",
@ -108,10 +108,10 @@
"@opentelemetry/semantic-conventions": "^1.15.1",
"@peertube/feed": "^5.1.3",
"@peertube/http-signature": "^1.7.0",
"@smithy/node-http-handler": "^2.1.7",
"@smithy/node-http-handler": "^3.1.0",
"@uploadx/core": "^6.0.0",
"archiver": "^6.0.1",
"async-mutex": "^0.4.0",
"archiver": "^7.0.1",
"async-mutex": "^0.5.0",
"bcrypt": "5.1.1",
"bencode": "^4.0.0",
"bittorrent-tracker": "^11.0.1",
@ -126,7 +126,7 @@
"create-torrent": "^6.0.15",
"deep-object-diff": "^1.1.0",
"email-templates": "^11.0.3",
"execa": "^8.0.1",
"execa": "^9.2.0",
"express": "^4.18.1",
"express-rate-limit": "^7.1.1",
"express-validator": "^7.0.1",
@ -139,7 +139,7 @@
"http-problem-details": "^0.1.5",
"ioredis": "^5.2.3",
"ip-anonymize": "^0.1.0",
"ipaddr.js": "2.1.0",
"ipaddr.js": "2.2.0",
"iso-639-3": "3.0.1",
"jimp": "^0.22.4",
"js-yaml": "^4.0.0",
@ -157,7 +157,7 @@
"multer": "^1.4.5-lts.1",
"node-media-server": "^2.1.4",
"nodemailer": "^6.0.0",
"opentelemetry-instrumentation-sequelize": "^0.40.0",
"opentelemetry-instrumentation-sequelize": "^0.41.0",
"otpauth": "^9.0.2",
"p-queue": "^8.0.1",
"parse-torrent": "^11.0.14",
@ -169,10 +169,10 @@
"pug": "^3.0.0",
"reflect-metadata": "^0.2.1",
"sanitize-html": "2.x",
"sequelize": "6.33.0",
"sequelize": "6.37.3",
"sequelize-typescript": "^2.0.0-beta.1",
"short-uuid": "^4.2.0",
"sitemap": "^7.0.0",
"short-uuid": "^5.2.0",
"sitemap": "^8.0.0",
"socket.io": "^4.5.4",
"sql-formatter": "^15.2.0",
"srt-to-vtt": "^1.1.2",
@ -181,7 +181,7 @@
"validator": "^13.0.0",
"webfinger.js": "^2.6.6",
"webtorrent": "^2.1.27",
"winston": "3.11.0",
"winston": "3.13.0",
"ws": "^8.0.0",
"yauzl": "^3.1.0"
},
@ -204,7 +204,7 @@
"@types/fs-extra": "^11.0.1",
"@types/jsonld": "^1.5.9",
"@types/jsonwebtoken": "^9.0.5",
"@types/linkify-it": "^3.0.5",
"@types/linkify-it": "^5.0.0",
"@types/lodash-es": "^4.17.8",
"@types/magnet-uri": "^5.1.1",
"@types/maildev": "^0.0.7",
@ -226,7 +226,7 @@
"chai-xml": "^0.4.0",
"concurrently": "^8.0.1",
"depcheck": "^1.4.2",
"esbuild": "^0.20.1",
"esbuild": "^0.21.5",
"eslint": "8.56.0",
"eslint-config-standard-with-typescript": "43.0.1",
"eslint-plugin-import": "^2.20.1",
@ -244,7 +244,7 @@
"swagger-cli": "^4.0.2",
"tsc-watch": "^6.0.0",
"tsx": "^4.7.1",
"typescript": "~5.2"
"typescript": "~5.5.2"
},
"bundlewatch": {
"files": [

View File

@ -7,10 +7,10 @@ import {
setAccessTokensToServers,
waitJobs
} from '@peertube/peertube-server-commands'
import { isMainThread } from 'worker_threads'
import Piscina from 'piscina'
import { fileURLToPath } from 'url'
import { dirname, join } from 'path'
import { Piscina } from 'piscina'
import { fileURLToPath } from 'url'
import { isMainThread } from 'worker_threads'
const THOUSAND_VIEWERS = 2
const TOTAL_THREADS = 20

View File

@ -1,5 +1,4 @@
import { context } from '@opentelemetry/api'
import { getSpanContext } from '@opentelemetry/api/build/src/trace/context-utils.js'
import { context, trace } from '@opentelemetry/api'
import { omit } from '@peertube/peertube-core-utils'
import { stat } from 'fs/promises'
import { join } from 'path'
@ -62,9 +61,9 @@ function buildLogger (labelSuffix?: string) {
return createLogger({
level: process.env.LOGGER_LEVEL ?? CONFIG.LOG.LEVEL,
defaultMeta: {
get traceId () { return getSpanContext(context.active())?.traceId },
get spanId () { return getSpanContext(context.active())?.spanId },
get traceFlags () { return getSpanContext(context.active())?.traceFlags }
get traceId () { return trace.getSpanContext(context.active())?.traceId },
get spanId () { return trace.getSpanContext(context.active())?.spanId },
get traceFlags () { return trace.getSpanContext(context.active())?.traceFlags }
},
format: format.combine(
labelFormatter(labelSuffix),

View File

@ -1,4 +1,4 @@
import { execa, NodeOptions as ExecaNodeOptions } from 'execa'
import { execa, Options as ExecaNodeOptions } from 'execa'
import { ensureDir, pathExists } from 'fs-extra/esm'
import { writeFile } from 'fs/promises'
import { OptionsOfBufferResponseBody } from 'got'
@ -9,6 +9,8 @@ import { logger, loggerTagsFactory } from '../logger.js'
import { getProxy, isProxyEnabled } from '../proxy.js'
import { isBinaryResponse, peertubeGot } from '../requests.js'
type ProcessOptions = Pick<ExecaNodeOptions, 'cwd' | 'maxBuffer'>
const lTags = loggerTagsFactory('youtube-dl')
const youtubeDLBinaryPath = join(CONFIG.STORAGE.BIN_DIR, CONFIG.IMPORT.VIDEOS.HTTP.YOUTUBE_DL_RELEASE.NAME)
@ -111,7 +113,7 @@ export class YoutubeDLCLI {
url: string
format: string
output: string
processOptions: ExecaNodeOptions
processOptions: ProcessOptions
timeout?: number
additionalYoutubeDLArgs?: string[]
}) {
@ -129,7 +131,7 @@ export class YoutubeDLCLI {
async getInfo (options: {
url: string
format: string
processOptions: ExecaNodeOptions
processOptions: ProcessOptions
additionalYoutubeDLArgs?: string[]
}) {
const { url, format, additionalYoutubeDLArgs = [], processOptions } = options
@ -149,7 +151,7 @@ export class YoutubeDLCLI {
async getListInfo (options: {
url: string
latestVideosCount?: number
processOptions: ExecaNodeOptions
processOptions: ProcessOptions
}): Promise<{ upload_date: string, webpage_url: string }[]> {
const additionalYoutubeDLArgs = [ '--skip-download', '--playlist-reverse' ]
@ -178,7 +180,7 @@ export class YoutubeDLCLI {
async getSubs (options: {
url: string
format: 'vtt'
processOptions: ExecaNodeOptions
processOptions: ProcessOptions
}) {
const { url, format, processOptions } = options
@ -204,7 +206,7 @@ export class YoutubeDLCLI {
url: string
args: string[]
timeout?: number
processOptions: ExecaNodeOptions
processOptions: ProcessOptions
}) {
const { url, args, timeout, processOptions } = options
@ -216,7 +218,7 @@ export class YoutubeDLCLI {
const subProcess = execa(PYTHON_PATH, [ youtubeDLBinaryPath, ...completeArgs, url ], processOptions)
if (timeout) {
setTimeout(() => subProcess.cancel(), timeout)
setTimeout(() => subProcess.kill(), timeout)
}
const output = await subProcess

View File

@ -10,7 +10,7 @@ import { Transaction } from 'sequelize'
const lTags = loggerTagsFactory('automatic-tags')
const linkifyit = Linkifyit()
const linkifyit = new Linkifyit()
export class AutomaticTagger {

View File

@ -1,5 +1,5 @@
import { join } from 'path'
import Piscina from 'piscina'
import { Piscina } from 'piscina'
import { JOB_CONCURRENCY, WORKER_THREADS } from '@server/initializers/constants.js'
import type httpBroadcast from './workers/http-broadcast.js'
import type downloadImage from './workers/image-downloader.js'

5613
yarn.lock

File diff suppressed because it is too large Load Diff