mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-02-25 18:55:32 -06:00
Update server dependencies
This commit is contained in:
@@ -24,6 +24,7 @@ const contextStore: { [ id in ContextType ]: (string | { [ id: string ]: string
|
||||
subtitleLanguage: 'sc:subtitleLanguage',
|
||||
sensitive: 'as:sensitive',
|
||||
language: 'sc:inLanguage',
|
||||
identifier: 'sc:identifier',
|
||||
|
||||
// TODO: remove in a few versions, introduced in 4.2
|
||||
icons: 'as:icon',
|
||||
|
||||
@@ -2,8 +2,8 @@ import { readdir } from 'fs-extra'
|
||||
import { constants, PerformanceObserver } from 'perf_hooks'
|
||||
import * as process from 'process'
|
||||
import { Meter, ObservableResult } from '@opentelemetry/api-metrics'
|
||||
import { ExplicitBucketHistogramAggregation } from '@opentelemetry/sdk-metrics-base'
|
||||
import { View } from '@opentelemetry/sdk-metrics-base/build/src/view/View'
|
||||
import { ExplicitBucketHistogramAggregation } from '@opentelemetry/sdk-metrics'
|
||||
import { View } from '@opentelemetry/sdk-metrics/build/src/view/View'
|
||||
import { logger } from '@server/helpers/logger'
|
||||
|
||||
// Thanks to https://github.com/siimon/prom-client
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Application, Request, Response } from 'express'
|
||||
import { Meter, metrics } from '@opentelemetry/api-metrics'
|
||||
import { PrometheusExporter } from '@opentelemetry/exporter-prometheus'
|
||||
import { MeterProvider } from '@opentelemetry/sdk-metrics-base'
|
||||
import { MeterProvider } from '@opentelemetry/sdk-metrics'
|
||||
import { logger } from '@server/helpers/logger'
|
||||
import { CONFIG } from '@server/initializers/config'
|
||||
import { MVideoImmutable } from '@server/types/models'
|
||||
|
||||
@@ -169,11 +169,11 @@ describe('Test resumable upload', function () {
|
||||
it('Should not accept more chunks than expected with an invalid content length/content range', async function () {
|
||||
const uploadId = await prepareUpload({ size: 1500 })
|
||||
|
||||
// Content length check seems to have changed in v16
|
||||
if (process.version.startsWith('v16')) {
|
||||
// Content length check can be different depending on the node version
|
||||
try {
|
||||
await sendChunks({ pathUploadId: uploadId, expectedStatus: HttpStatusCode.CONFLICT_409, contentLength: 1000 })
|
||||
await checkFileSize(uploadId, 1000)
|
||||
} else {
|
||||
await checkFileSize(uploadId, 0)
|
||||
} catch {
|
||||
await sendChunks({ pathUploadId: uploadId, expectedStatus: HttpStatusCode.BAD_REQUEST_400, contentLength: 1000 })
|
||||
await checkFileSize(uploadId, 0)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user