From 83002a823465fe03a8d82833cb2e073a383405a8 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 22 May 2023 17:04:39 +0200 Subject: Update server dependencies --- server/lib/activitypub/videos/shared/object-to-model-attributes.ts | 4 ++-- server/lib/auth/tokens-cache.ts | 2 +- server/lib/local-actor.ts | 2 +- server/lib/video-tokens-manager.ts | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) (limited to 'server/lib') diff --git a/server/lib/activitypub/videos/shared/object-to-model-attributes.ts b/server/lib/activitypub/videos/shared/object-to-model-attributes.ts index 86699c5b8..8fd0a816c 100644 --- a/server/lib/activitypub/videos/shared/object-to-model-attributes.ts +++ b/server/lib/activitypub/videos/shared/object-to-model-attributes.ts @@ -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) } diff --git a/server/lib/auth/tokens-cache.ts b/server/lib/auth/tokens-cache.ts index 43efc7d02..e7b12159b 100644 --- a/server/lib/auth/tokens-cache.ts +++ b/server/lib/auth/tokens-cache.ts @@ -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' diff --git a/server/lib/local-actor.ts b/server/lib/local-actor.ts index 8c10ed700..16dc265a3 100644 --- a/server/lib/local-actor.ts +++ b/server/lib/local-actor.ts @@ -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' diff --git a/server/lib/video-tokens-manager.ts b/server/lib/video-tokens-manager.ts index 17aa29cdd..660533528 100644 --- a/server/lib/video-tokens-manager.ts +++ b/server/lib/video-tokens-manager.ts @@ -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' -- cgit v1.2.3