This commit is contained in:
tamaina 2023-01-25 14:02:11 +00:00
parent 71a55fe9e8
commit 1b09e182a7
4 changed files with 66 additions and 140 deletions

View File

@ -5,7 +5,7 @@ import * as stream from 'node:stream';
import * as util from 'node:util';
import { Inject, Injectable } from '@nestjs/common';
import { FSWatcher } from 'chokidar';
import { fileTypeFromFile, fileTypeFromStream } from 'file-type';
import { fileTypeFromFile } from 'file-type';
import FFmpeg from 'fluent-ffmpeg';
import isSvg from 'is-svg';
import probeImageSize from 'probe-image-size';
@ -15,8 +15,6 @@ import { encode } from 'blurhash';
import { createTempDir } from '@/misc/create-temp.js';
import { AiService } from '@/core/AiService.js';
import { bindThis } from '@/decorators.js';
import { Response } from 'undici';
import { StatusError } from '@/misc/status-error.js';
const pipeline = util.promisify(stream.pipeline);
@ -41,7 +39,7 @@ const TYPE_OCTET_STREAM = {
ext: null,
};
export const TYPE_SVG = {
const TYPE_SVG = {
mime: 'image/svg+xml',
ext: 'svg',
};
@ -308,9 +306,9 @@ export class FileInfoService {
*/
@bindThis
public async detectType(path: string): Promise<{
mime: string;
ext: string | null;
}> {
mime: string;
ext: string | null;
}> {
// Check 0 byte
const fileSize = await this.getFileSize(path);
if (fileSize === 0) {
@ -340,47 +338,6 @@ export class FileInfoService {
return TYPE_OCTET_STREAM;
}
/**
* Detect MIME Type and extension by stream and path for performance
*/
@bindThis
public async detectResponseType(_response: Response, path?: string, fileSavingPromise: Promise<any> = Promise.resolve()): Promise<{
mime: string;
ext: string | null;
}> {
const response = _response.clone();
if (!response.body) {
throw new StatusError('No Body', 400, 'No Body');
}
const type = await fileTypeFromStream(stream.Readable.fromWeb(response.body));
if (type) {
// XMLはSVGかもしれない
if (path && type.mime === 'application/xml') {
await fileSavingPromise;
if (await this.checkSvg(path)) {
return TYPE_SVG;
}
}
return {
mime: type.mime,
ext: type.ext,
};
}
// 種類が不明でもSVGかもしれない
if (path) {
await fileSavingPromise;
if (await this.checkSvg(path)) return TYPE_SVG;
}
// 種類が不明なら application/octet-stream にする
return TYPE_OCTET_STREAM;
}
/**
* Check the file is SVG or not
*/
@ -389,7 +346,7 @@ export class FileInfoService {
try {
const size = await this.getFileSize(path);
if (size > 1 * 1024 * 1024) return false;
return isSvg(await fs.promises.readFile(path));
return isSvg(fs.readFileSync(path));
} catch {
return false;
}

View File

@ -2,7 +2,6 @@ import { Inject, Injectable } from '@nestjs/common';
import sharp from 'sharp';
import { DI } from '@/di-symbols.js';
import type { Config } from '@/config.js';
import { Readable } from 'node:stream';
export type IImage = {
data: Buffer;
@ -11,7 +10,7 @@ export type IImage = {
};
export type IImageStream = {
data: NodeJS.ReadableStream;
data: Readable;
ext: string | null;
type: string;
};
@ -28,6 +27,7 @@ export const webpDefault: sharp.WebpOptions = {
};
import { bindThis } from '@/decorators.js';
import { Readable } from 'node:stream';
@Injectable()
export class ImageProcessingService {
@ -71,31 +71,6 @@ export class ImageProcessingService {
* Convert to WebP
* with resize, remove metadata, resolve orientation, stop animation
*/
@bindThis
public convertSharpToWebpStream(sharp: sharp.Sharp, width: number, height: number, options: sharp.WebpOptions = webpDefault): sharp.Sharp {
return sharp
.resize(width, height, {
fit: 'inside',
withoutEnlargement: true,
})
.rotate()
.webp(options);
}
@bindThis
public convertSharpToWebpStreamObj(sharp: sharp.Sharp, width: number, height: number, options: sharp.WebpOptions = webpDefault): IImageStream {
return {
data: this.convertSharpToWebpStream(sharp, width, height, options),
ext: 'webp',
type: 'image/webp',
}
}
@bindThis
public convertToWebpFromReadable(readable: Readable, width: number, height: number, options: sharp.WebpOptions = webpDefault): IImageStream {
return this.convertSharpToWebpStreamObj(readable.pipe(sharp()), width, height, options);
}
@bindThis
public async convertToWebp(path: string, width: number, height: number, options: sharp.WebpOptions = webpDefault): Promise<IImage> {
return this.convertSharpToWebp(await sharp(path), width, height, options);
@ -103,7 +78,14 @@ export class ImageProcessingService {
@bindThis
public async convertSharpToWebp(sharp: sharp.Sharp, width: number, height: number, options: sharp.WebpOptions = webpDefault): Promise<IImage> {
const data = await this.convertSharpToWebpStream(sharp, width, height, options).toBuffer();
const data = await sharp
.resize(width, height, {
fit: 'inside',
withoutEnlargement: true,
})
.rotate()
.webp(options)
.toBuffer();
return {
data,

View File

@ -11,12 +11,12 @@ import { createTemp } from '@/misc/create-temp.js';
import { FILE_TYPE_BROWSERSAFE } from '@/const.js';
import { StatusError } from '@/misc/status-error.js';
import type Logger from '@/logger.js';
import { DownloadService, NonNullBodyResponse } from '@/core/DownloadService.js';
import { DownloadService } from '@/core/DownloadService.js';
import { IImageStreamable, ImageProcessingService, webpDefault } from '@/core/ImageProcessingService.js';
import { VideoProcessingService } from '@/core/VideoProcessingService.js';
import { InternalStorageService } from '@/core/InternalStorageService.js';
import { contentDisposition } from '@/misc/content-disposition.js';
import { FileInfoService, TYPE_SVG } from '@/core/FileInfoService.js';
import { FileInfoService } from '@/core/FileInfoService.js';
import { LoggerService } from '@/core/LoggerService.js';
import { bindThis } from '@/decorators.js';
import type { FastifyInstance, FastifyRequest, FastifyReply, FastifyPluginOptions } from 'fastify';
@ -139,13 +139,12 @@ export class FileServerService {
const convertFile = async () => {
if (file.fileRole === 'thumbnail') {
if (['image/jpeg', 'image/webp', 'image/avif', 'image/png', 'image/svg+xml'].includes(file.mime)) {
return this.imageProcessingService.convertToWebpFromReadable(
file.stream,
return this.imageProcessingService.convertToWebp(
file.path,
498,
280
);
} else if (file.mime.startsWith('video/')) {
await file.fileSaving;
return await this.videoProcessingService.generateVideoThumbnail(file.path);
}
}
@ -153,8 +152,8 @@ export class FileServerService {
if (file.fileRole === 'webpublic') {
if (['image/svg+xml'].includes(file.mime)) {
return {
data: this.imageProcessingService.convertToWebpFromReadable(
file.stream,
data: this.imageProcessingService.convertToWebp(
file.path,
2048,
2048,
{ ...webpDefault, lossless: true }
@ -166,7 +165,7 @@ export class FileServerService {
}
return {
data: file.stream,
data: fs.createReadStream(file.path),
ext: file.ext,
type: file.mime,
};
@ -187,13 +186,14 @@ export class FileServerService {
reply.header('Content-Type', FILE_TYPE_BROWSERSAFE.includes(file.mime) ? file.mime : 'application/octet-stream');
reply.header('Cache-Control', 'max-age=31536000, immutable');
reply.header('Content-Disposition', contentDisposition('inline', filename));
return file.stream;
return fs.createReadStream(file.path);
} else {
file.stream.on('error', this.commonReadableHandlerGenerator(reply));
const stream = fs.createReadStream(file.path);
stream.on('error', this.commonReadableHandlerGenerator(reply));
reply.header('Content-Type', FILE_TYPE_BROWSERSAFE.includes(file.file.type) ? file.file.type : 'application/octet-stream');
reply.header('Cache-Control', 'max-age=31536000, immutable');
reply.header('Content-Disposition', contentDisposition('inline', file.file.name));
return file.stream;
return stream;
}
} finally {
if ('cleanup' in file) file.cleanup();
@ -231,26 +231,18 @@ export class FileServerService {
if ('emoji' in request.query && isConvertibleImage) {
if (!isAnimationConvertibleImage && !('static' in request.query)) {
image = {
data: file.stream,
data: fs.createReadStream(file.path),
ext: file.ext,
type: file.mime,
};
} else {
const data = pipeline(
file.stream,
sharp({ animated: !('static' in request.query) })
const data = sharp(file.path, { animated: !('static' in request.query) })
.resize({
height: 128,
withoutEnlargement: true,
})
.webp(webpDefault),
err => {
if (err) {
this.logger.error('Sharp pipeline error (emoji)', err);
throw new StatusError('Internal Error occured (in emoji pipeline, MediaProxy)', 500, 'Internal Error occured');
}
}
);
.webp(webpDefault)
.toBuffer();
image = {
data,
@ -259,25 +251,16 @@ export class FileServerService {
};
}
} else if ('static' in request.query && isConvertibleImage) {
image = this.imageProcessingService.convertToWebpFromReadable(file.stream, 498, 280);
image = this.imageProcessingService.convertToWebp(file.path, 498, 280);
} else if ('preview' in request.query && isConvertibleImage) {
image = this.imageProcessingService.convertToWebpFromReadable(file.stream, 200, 200);
image = this.imageProcessingService.convertToWebp(file.path, 200, 200);
} else if ('badge' in request.query) {
if (!isConvertibleImage) {
// 画像でないなら404でお茶を濁す
throw new StatusError('Unexpected mime', 404);
}
const path = await (async () => {
if (file.state === 'stored_internal') {
return file.path;
} else {
await file.fileSaving;
return file.path;
}
})();
const mask = sharp(path)
const mask = sharp(file.path)
.resize(96, 96, {
fit: 'inside',
withoutEnlargement: false,
@ -307,14 +290,14 @@ export class FileServerService {
type: 'image/png',
};
} else if (file.mime === 'image/svg+xml') {
image = this.imageProcessingService.convertToWebpFromReadable(file.stream, 2048, 2048);
image = this.imageProcessingService.convertToWebp(file.path, 2048, 2048);
} else if (!file.mime.startsWith('image/') || !FILE_TYPE_BROWSERSAFE.includes(file.mime)) {
throw new StatusError('Rejected type', 403, 'Rejected type');
}
if (!image) {
image = {
data: file.stream,
data: fs.createReadStream(file.path),
ext: file.ext,
type: file.mime,
};
@ -330,8 +313,8 @@ export class FileServerService {
@bindThis
private async getStreamAndTypeFromUrl(url: string): Promise<
{ state: 'remote'; fileRole?: 'thumbnail' | 'webpublic' | 'original'; file?: DriveFile; stream: Readable; mime: string; ext: string | null; path: string; cleanup: () => void; fileSaving: Promise<any> }
| { state: 'stored_internal'; fileRole: 'thumbnail' | 'webpublic' | 'original'; file: DriveFile; stream: Readable; mime: string; ext: string | null; path: string; }
{ state: 'remote'; fileRole?: 'thumbnail' | 'webpublic' | 'original'; file?: DriveFile; mime: string; ext: string | null; path: string; cleanup: () => void; }
| { state: 'stored_internal'; fileRole: 'thumbnail' | 'webpublic' | 'original'; file: DriveFile; mime: string; ext: string | null; path: string; }
| '404'
| '204'
> {
@ -347,21 +330,18 @@ export class FileServerService {
@bindThis
private async downloadAndDetectTypeFromUrl(url: string): Promise<
{ state: 'remote' ; stream: Readable; mime: string; ext: string | null; path: string; cleanup: () => void; fileSaving: Promise<any> }
{ state: 'remote' ; mime: string; ext: string | null; path: string; cleanup: () => void; }
> {
const [path, cleanup] = await createTemp();
try {
const response = await this.downloadService.fetchUrl(url);
const fileSaving = this.downloadService.pipeRequestToFile(response, path);
const { mime, ext } = await this.fileInfoService.detectResponseType(response, path, fileSaving);
const response = await this.downloadService.downloadUrl(url, path);
const { mime, ext } = await this.fileInfoService.detectType(path);
return {
state: 'remote',
stream: Readable.fromWeb(response.body),
mime, ext,
path, cleanup,
fileSaving,
}
} catch (e) {
cleanup();
@ -371,8 +351,8 @@ export class FileServerService {
@bindThis
private async getFileFromKey(key: string): Promise<
{ state: 'remote'; fileRole: 'thumbnail' | 'webpublic' | 'original'; file: DriveFile; stream: Readable; mime: string; ext: string | null; path: string; cleanup: () => void; fileSaving: Promise<any> }
| { state: 'stored_internal'; fileRole: 'thumbnail' | 'webpublic' | 'original'; file: DriveFile; stream: Readable; mime: string; ext: string | null; path: string; }
{ state: 'remote'; fileRole: 'thumbnail' | 'webpublic' | 'original'; file: DriveFile; mime: string; ext: string | null; path: string; cleanup: () => void; }
| { state: 'stored_internal'; fileRole: 'thumbnail' | 'webpublic' | 'original'; file: DriveFile; mime: string; ext: string | null; path: string; }
| '404'
| '204'
> {
@ -406,7 +386,6 @@ export class FileServerService {
state: 'stored_internal',
fileRole: isThumbnail ? 'thumbnail' : 'webpublic',
file,
stream: this.internalStorageService.read(key),
mime, ext,
path,
};
@ -416,7 +395,6 @@ export class FileServerService {
state: 'stored_internal',
fileRole: 'original',
file,
stream: this.internalStorageService.read(file.accessKey!),
mime: file.type,
ext: null,
path,

View File

@ -249,6 +249,7 @@ importers:
file-type: 18.2.0
fluent-ffmpeg: 2.1.2
form-data: 4.0.0
got: 12.5.3
hpagent: 1.2.0
ioredis: 4.28.5
ip-cidr: 3.0.11
@ -368,7 +369,6 @@ importers:
eslint: 8.32.0
eslint-plugin-import: 2.27.5_6savw6y3b7jng6f64kgkyoij64
execa: 6.1.0
got: 12.5.3
jest: 29.3.1_@types+node@18.11.18
jest-mock: 29.3.1
@ -2127,7 +2127,7 @@ packages:
/@sindresorhus/is/5.3.0:
resolution: {integrity: sha512-CX6t4SYQ37lzxicAqsBtxA3OseeoVrh9cSJ5PFYam0GksYlupRfy1A+Q4aYD3zvcfECLc0zO2u+ZnR2UYKvCrw==}
engines: {node: '>=14.16'}
dev: true
dev: false
/@sinonjs/commons/1.8.6:
resolution: {integrity: sha512-Ky+XkAkqPZSm3NLBeUng77EBQl3cmeJhITaGHdYH8kjVB+aun3S4XBRti2zt17mtt0mIUDiNxYeoJm6drVvBJQ==}
@ -2317,7 +2317,7 @@ packages:
engines: {node: '>=14.16'}
dependencies:
defer-to-connect: 2.0.1
dev: true
dev: false
/@tabler/icons-webfont/2.0.0:
resolution: {integrity: sha512-ApVVupe7WKZOJzK6T2iw15/k6VrTALsL5YzAmvgvcriuX8sRCKlcWaRljcf2sZMUrqyY+Yq6xiOpL2p2NHgQBQ==}
@ -2600,6 +2600,7 @@ packages:
/@types/http-cache-semantics/4.0.1:
resolution: {integrity: sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ==}
dev: false
/@types/ioredis/4.28.10:
resolution: {integrity: sha512-69LyhUgrXdgcNDv7ogs1qXZomnfOEnSmrmMFqKgt1XMJxmoOSG/u3wYy13yACIfKuMJ8IhKgHafDO3sx19zVQQ==}
@ -4268,7 +4269,7 @@ packages:
/cacheable-lookup/7.0.0:
resolution: {integrity: sha512-+qJyx4xiKra8mZrcwhjMRMUhD5NR1R8esPkzIYxX96JiecFoxAXFuz/GpR3+ev4PE1WamHip78wV0vcmPQtp8w==}
engines: {node: '>=14.16'}
dev: true
dev: false
/cacheable-request/10.2.5:
resolution: {integrity: sha512-5RwYYCfzjNPsyJxb/QpaM0bfzx+kw5/YpDhZPm9oMIDntHFQ9YXeyV47ZvzlTE0XrrrbyO2UITJH4GF9eRLdXQ==}
@ -4281,7 +4282,7 @@ packages:
mimic-response: 4.0.0
normalize-url: 8.0.0
responselike: 3.0.0
dev: true
dev: false
/cacheable-request/2.1.4:
resolution: {integrity: sha512-vag0O2LKZ/najSoUwDbVlnlCFvhBE/7mGTY2B5FgCBDcRD+oVV1HYTOwM6JZfMg/hIcM6IwnTZ1uQQL5/X3xIQ==}
@ -5267,6 +5268,7 @@ packages:
engines: {node: '>=10'}
dependencies:
mimic-response: 3.1.0
dev: false
/decompress-tar/4.1.1:
resolution: {integrity: sha512-JdJMaCrGpB5fESVyxwpCx4Jdj2AagLmv3y58Qy4GE6HMVjWz1FeVQk1Ct4Kye7PftcdOo/7U7UKzYBJgqnGeUQ==}
@ -5367,6 +5369,7 @@ packages:
/defer-to-connect/2.0.1:
resolution: {integrity: sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==}
engines: {node: '>=10'}
dev: false
/define-properties/1.1.4:
resolution: {integrity: sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==}
@ -7001,7 +7004,7 @@ packages:
/form-data-encoder/2.1.4:
resolution: {integrity: sha512-yDYSgNMraqvnxiEXO4hi88+YZxaHC6QKzb5N84iRCTDeRO7ZALpir/lVmf/uXUhnwUr2O4HU8s/n6x+yNjQkHw==}
engines: {node: '>= 14.17'}
dev: true
dev: false
/form-data/2.3.3:
resolution: {integrity: sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==}
@ -7467,7 +7470,7 @@ packages:
lowercase-keys: 3.0.0
p-cancelable: 3.0.0
responselike: 3.0.0
dev: true
dev: false
/got/8.3.2:
resolution: {integrity: sha512-qjUJ5U/hawxosMryILofZCkm3C84PLJS/0grRIpjAwu+Lkxxj5cxeCU25BG0/3mDSpXKTyZr8oh8wIgLaH0QCw==}
@ -7784,6 +7787,7 @@ packages:
/http-cache-semantics/4.1.0:
resolution: {integrity: sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==}
dev: false
/http-errors/1.8.1:
resolution: {integrity: sha512-Kpk9Sm7NmI+RHhnj6OIWDI1d6fIoFAtFt9RLaTMRlg/8w49juAStsrBgp0Dp4OdxdVbRIeKhtCUvoi/RuAhO4g==}
@ -7850,7 +7854,7 @@ packages:
dependencies:
quick-lru: 5.1.1
resolve-alpn: 1.2.1
dev: true
dev: false
/http_ece/1.1.0:
resolution: {integrity: sha512-bptAfCDdPJxOs5zYSe7Y3lpr772s1G346R4Td5LgRUeCwIGpCGDUTJxRrhTNcAXbx37spge0kWEIH7QAYWNTlA==}
@ -9134,6 +9138,7 @@ packages:
/json-buffer/3.0.1:
resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==}
dev: false
/json-parse-even-better-errors/2.3.1:
resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==}
@ -9271,6 +9276,7 @@ packages:
resolution: {integrity: sha512-5MHbFaKn8cNSmVW7BYnijeAVlE4cYA/SVkifVgrh7yotnfhKmjuXpDKjrABLnT0SfHWV21P8ow07OGfRrNDg8g==}
dependencies:
json-buffer: 3.0.1
dev: false
/kind-of/3.2.2:
resolution: {integrity: sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==}
@ -9615,7 +9621,7 @@ packages:
/lowercase-keys/3.0.0:
resolution: {integrity: sha512-ozCC6gdQ+glXOQsveKD0YsDy8DSQFjDTz4zyzEHNV5+JP5D62LmfDZ6o1cycFx9ouG940M5dE8C8CTewdj2YWQ==}
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
dev: true
dev: false
/lru-cache/4.1.5:
resolution: {integrity: sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==}
@ -9819,11 +9825,12 @@ packages:
/mimic-response/3.1.0:
resolution: {integrity: sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==}
engines: {node: '>=10'}
dev: false
/mimic-response/4.0.0:
resolution: {integrity: sha512-e5ISH9xMYU0DzrT+jl8q2ze9D6eWBto+I8CNpe+VI+K2J/F/k3PdkdTdz4wvGVH4NTpo+NRYTVIuMQEMMcsLqg==}
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
dev: true
dev: false
/minimalistic-assert/1.0.1:
resolution: {integrity: sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==}
@ -10279,7 +10286,7 @@ packages:
/normalize-url/8.0.0:
resolution: {integrity: sha512-uVFpKhj5MheNBJRTiMZ9pE/7hD1QTeEvugSJW/OmLzAp78PB5O6adfMNTvmfKhXBkvCzC+rqifWcVYpGFwTjnw==}
engines: {node: '>=14.16'}
dev: true
dev: false
/now-and-later/2.0.1:
resolution: {integrity: sha512-KGvQ0cB70AQfg107Xvs/Fbu+dGmZoTRJp2TaPwcwQm3/7PteUyN2BCgk8KBMPGBUXZdVwyWS8fDCGFygBm19UQ==}
@ -10581,7 +10588,7 @@ packages:
/p-cancelable/3.0.0:
resolution: {integrity: sha512-mlVgR3PGuzlo0MmTdk4cXqXWlwQDLnONTAg6sm62XkMJEiRxN3GL3SffkYvqwonbkJBcrI7Uvv5Zh9yjvn2iUw==}
engines: {node: '>=12.20'}
dev: true
dev: false
/p-event/2.3.1:
resolution: {integrity: sha512-NQCqOFhbpVTMX4qMe8PF8lbGtzZ+LCiN7pcNrb/413Na7+TRoe1xkKUzuWa/YEJdGQ0FvKtj35EEbDoVPO2kbA==}
@ -11624,6 +11631,7 @@ packages:
/quick-lru/5.1.1:
resolution: {integrity: sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==}
engines: {node: '>=10'}
dev: false
/random-seed/0.3.0:
resolution: {integrity: sha512-y13xtn3kcTlLub3HKWXxJNeC2qK4mB59evwZ5EkeRlolx+Bp2ztF7LbcZmyCnOqlHQrLnfuNbi1sVmm9lPDlDA==}
@ -11970,6 +11978,7 @@ packages:
/resolve-alpn/1.2.1:
resolution: {integrity: sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==}
dev: false
/resolve-cwd/3.0.0:
resolution: {integrity: sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==}
@ -12038,7 +12047,7 @@ packages:
engines: {node: '>=14.16'}
dependencies:
lowercase-keys: 3.0.0
dev: true
dev: false
/restore-cursor/3.1.0:
resolution: {integrity: sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==}