use node 22, update deps (#822)
Co-authored-by: riku6460 <17585784+riku6460@users.noreply.github.com>
This commit is contained in:
parent
f4ebae3956
commit
b4865fd9ae
22 changed files with 2480 additions and 2366 deletions
|
@ -34,16 +34,16 @@
|
|||
"generate-api-json": "pnpm build && node ./scripts/generate_api_json.js"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@swc/core-darwin-arm64": "1.9.1",
|
||||
"@swc/core-darwin-x64": "1.9.1",
|
||||
"@swc/core-linux-arm-gnueabihf": "1.9.1",
|
||||
"@swc/core-linux-arm64-gnu": "1.9.1",
|
||||
"@swc/core-linux-arm64-musl": "1.9.1",
|
||||
"@swc/core-linux-x64-gnu": "1.9.1",
|
||||
"@swc/core-linux-x64-musl": "1.9.1",
|
||||
"@swc/core-win32-arm64-msvc": "1.9.1",
|
||||
"@swc/core-win32-ia32-msvc": "1.9.1",
|
||||
"@swc/core-win32-x64-msvc": "1.9.1",
|
||||
"@swc/core-darwin-arm64": "1.9.3",
|
||||
"@swc/core-darwin-x64": "1.9.3",
|
||||
"@swc/core-linux-arm-gnueabihf": "1.9.3",
|
||||
"@swc/core-linux-arm64-gnu": "1.9.3",
|
||||
"@swc/core-linux-arm64-musl": "1.9.3",
|
||||
"@swc/core-linux-x64-gnu": "1.9.3",
|
||||
"@swc/core-linux-x64-musl": "1.9.3",
|
||||
"@swc/core-win32-arm64-msvc": "1.9.3",
|
||||
"@swc/core-win32-ia32-msvc": "1.9.3",
|
||||
"@swc/core-win32-x64-msvc": "1.9.3",
|
||||
"@tensorflow/tfjs": "4.22.0",
|
||||
"@tensorflow/tfjs-node": "4.22.0",
|
||||
"bufferutil": "4.0.8",
|
||||
|
@ -64,13 +64,13 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@authenio/samlify-node-xmllint": "2.0.0",
|
||||
"@aws-sdk/client-s3": "3.687.0",
|
||||
"@aws-sdk/lib-storage": "3.687.0",
|
||||
"@bull-board/api": "6.3.3",
|
||||
"@bull-board/fastify": "6.3.3",
|
||||
"@bull-board/ui": "6.3.3",
|
||||
"@aws-sdk/client-s3": "3.698.0",
|
||||
"@aws-sdk/lib-storage": "3.698.0",
|
||||
"@bull-board/api": "6.5.3",
|
||||
"@bull-board/fastify": "6.5.3",
|
||||
"@bull-board/ui": "6.5.3",
|
||||
"@discordapp/twemoji": "15.1.0",
|
||||
"@elastic/elasticsearch": "8.15.1",
|
||||
"@elastic/elasticsearch": "8.16.2",
|
||||
"@fastify/accepts": "5.0.1",
|
||||
"@fastify/cookie": "11.0.1",
|
||||
"@fastify/cors": "10.0.1",
|
||||
|
@ -78,20 +78,20 @@
|
|||
"@fastify/formbody": "8.0.1",
|
||||
"@fastify/http-proxy": "10.0.1",
|
||||
"@fastify/multipart": "9.0.1",
|
||||
"@fastify/static": "8.0.2",
|
||||
"@fastify/static": "8.0.3",
|
||||
"@fastify/view": "10.0.1",
|
||||
"@misskey-dev/sharp-read-bmp": "1.2.0",
|
||||
"@misskey-dev/summaly": "MisskeyIO/summaly#5.1.1",
|
||||
"@napi-rs/canvas": "0.1.60",
|
||||
"@nestjs/common": "10.4.7",
|
||||
"@nestjs/core": "10.4.7",
|
||||
"@nestjs/testing": "10.4.7",
|
||||
"@napi-rs/canvas": "0.1.62",
|
||||
"@nestjs/common": "10.4.8",
|
||||
"@nestjs/core": "10.4.8",
|
||||
"@nestjs/testing": "10.4.8",
|
||||
"@peertube/http-signature": "1.7.0",
|
||||
"@simplewebauthn/server": "11.0.0",
|
||||
"@sinonjs/fake-timers": "11.3.1",
|
||||
"@smithy/node-http-handler": "3.2.5",
|
||||
"@swc/cli": "0.5.0",
|
||||
"@swc/core": "1.9.1",
|
||||
"@smithy/node-http-handler": "3.3.1",
|
||||
"@swc/cli": "0.5.1",
|
||||
"@swc/core": "1.9.3",
|
||||
"@twemoji/parser": "15.1.1",
|
||||
"accepts": "1.3.8",
|
||||
"ajv": "8.17.1",
|
||||
|
@ -100,7 +100,7 @@
|
|||
"bcryptjs": "2.4.3",
|
||||
"blurhash": "2.0.5",
|
||||
"body-parser": "1.20.3",
|
||||
"bullmq": "5.25.2",
|
||||
"bullmq": "5.29.0",
|
||||
"cacheable-lookup": "7.0.0",
|
||||
"cbor": "10.0.3",
|
||||
"chalk": "5.3.0",
|
||||
|
@ -119,7 +119,7 @@
|
|||
"fluent-ffmpeg": "2.1.3",
|
||||
"form-data": "4.0.1",
|
||||
"got": "14.4.4",
|
||||
"happy-dom": "15.11.0",
|
||||
"happy-dom": "15.11.6",
|
||||
"hpagent": "1.2.0",
|
||||
"htmlescape": "1.1.1",
|
||||
"http-link-header": "1.1.3",
|
||||
|
@ -150,11 +150,11 @@
|
|||
"oauth2orize": "1.12.0",
|
||||
"oauth2orize-pkce": "0.1.2",
|
||||
"os-utils": "0.0.14",
|
||||
"otpauth": "9.3.4",
|
||||
"otpauth": "9.3.5",
|
||||
"parse5": "7.2.1",
|
||||
"pg": "8.13.1",
|
||||
"pino": "9.5.0",
|
||||
"pino-pretty": "12.0.0",
|
||||
"pino-pretty": "13.0.0",
|
||||
"pkce-challenge": "4.1.0",
|
||||
"probe-image-size": "7.2.3",
|
||||
"promise-limit": "2.7.0",
|
||||
|
@ -171,7 +171,7 @@
|
|||
"rxjs": "7.8.1",
|
||||
"samlify": "2.8.11",
|
||||
"sanitize-html": "2.13.1",
|
||||
"secure-json-parse": "2.7.0",
|
||||
"secure-json-parse": "3.0.1",
|
||||
"sharp": "0.33.5",
|
||||
"slacc": "0.0.10",
|
||||
"strict-event-emitter-types": "2.0.0",
|
||||
|
@ -193,7 +193,7 @@
|
|||
"devDependencies": {
|
||||
"@jest/globals": "29.7.0",
|
||||
"@misskey-dev/eslint-plugin": "1.0.0",
|
||||
"@nestjs/platform-express": "10.4.7",
|
||||
"@nestjs/platform-express": "10.4.8",
|
||||
"@simplewebauthn/types": "11.0.0",
|
||||
"@swc/jest": "0.2.37",
|
||||
"@types/accepts": "1.3.7",
|
||||
|
@ -212,9 +212,9 @@
|
|||
"@types/jsrsasign": "10.5.14",
|
||||
"@types/mime-types": "2.1.4",
|
||||
"@types/ms": "0.7.34",
|
||||
"@types/node": "22.9.0",
|
||||
"@types/node": "22.9.1",
|
||||
"@types/node-forge": "1.3.11",
|
||||
"@types/nodemailer": "6.4.16",
|
||||
"@types/nodemailer": "6.4.17",
|
||||
"@types/oauth": "0.9.6",
|
||||
"@types/oauth2orize": "1.11.5",
|
||||
"@types/oauth2orize-pkce": "0.1.2",
|
||||
|
|
|
@ -2,21 +2,21 @@ import { EventEmitter } from 'node:events';
|
|||
import * as Bull from 'bullmq';
|
||||
|
||||
export class Queues<DataType = any, ResultType = any, NameType extends string = string> {
|
||||
public readonly queues: ReadonlyArray<Bull.Queue<DataType, ResultType, NameType>>;
|
||||
public readonly queues: ReadonlyArray<Bull.Queue<void, void, string, DataType, ResultType, NameType>>;
|
||||
|
||||
constructor(queues: Bull.Queue<DataType, ResultType, NameType>[]) {
|
||||
constructor(queues: Bull.Queue<void, void, string, DataType, ResultType, NameType>[]) {
|
||||
if (queues.length === 0) {
|
||||
throw new Error('queues cannot be empty.');
|
||||
}
|
||||
this.queues = queues;
|
||||
}
|
||||
|
||||
getRandomQueue(): Bull.Queue<DataType, ResultType, NameType> {
|
||||
get randomQueue(): Bull.Queue<void, void, string, DataType, ResultType, NameType> {
|
||||
return this.queues[Math.floor(Math.random() * this.queues.length)];
|
||||
}
|
||||
|
||||
add(name: NameType, data: DataType, opts?: Bull.JobsOptions): Promise<Bull.Job<DataType, ResultType, NameType>> {
|
||||
return this.getRandomQueue().add(name, data, opts);
|
||||
return this.randomQueue.add(name, data, opts);
|
||||
}
|
||||
|
||||
async addBulk(jobs: { name: NameType; data: DataType; opts?: Bull.BulkJobOptions }[]): Promise<Bull.Job<DataType, ResultType, NameType>[]> {
|
||||
|
@ -30,7 +30,7 @@ export class Queues<DataType = any, ResultType = any, NameType extends string =
|
|||
}
|
||||
|
||||
async getDelayed(start?: number, end?: number): Promise<Bull.Job<DataType, ResultType, NameType>[]> {
|
||||
return (await Promise.allSettled(this.queues.map(queue => queue.getDelayed(start, end))))
|
||||
return (await Promise.allSettled(this.queues.map(queue => queue.getDelayed(start, end) as Promise<Bull.Job<DataType, ResultType, NameType>[]>)))
|
||||
.filter((value): value is PromiseFulfilledResult<Bull.Job<DataType, ResultType, NameType>[]> => value.status === 'fulfilled')
|
||||
.flatMap(value => value.value);
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ export class Queues<DataType = any, ResultType = any, NameType extends string =
|
|||
}, {} as Record<string, number>);
|
||||
}
|
||||
|
||||
once<U extends keyof Bull.QueueListener<DataType, ResultType, NameType>>(event: U, listener: Bull.QueueListener<DataType, ResultType, NameType>[U]): void {
|
||||
once<U extends keyof Bull.QueueListener<Bull.Job<DataType, ResultType, NameType>>>(event: U, listener: Bull.QueueListener<Bull.Job<DataType, ResultType, NameType>>[U]): void {
|
||||
const e = new EventEmitter();
|
||||
e.once(event, listener);
|
||||
|
||||
|
@ -62,7 +62,7 @@ export class Queues<DataType = any, ResultType = any, NameType extends string =
|
|||
}
|
||||
|
||||
async getJobs(types?: Bull.JobType[] | Bull.JobType, start?: number, end?: number, asc?: boolean): Promise<Bull.Job<DataType, ResultType, NameType>[]> {
|
||||
return (await Promise.allSettled(this.queues.map(queue => queue.getJobs(types, start, end, asc))))
|
||||
return (await Promise.allSettled(this.queues.map(queue => queue.getJobs(types, start, end, asc) as Promise<Bull.Job<DataType, ResultType, NameType>[]>)))
|
||||
.filter((value): value is PromiseFulfilledResult<Bull.Job<DataType, ResultType, NameType>[]> => value.status === 'fulfilled')
|
||||
.flatMap(value => value.value);
|
||||
}
|
||||
|
|
|
@ -95,15 +95,14 @@ describe('Webリソース', () => {
|
|||
describe.each([
|
||||
{ path: '/', type: HTML },
|
||||
{ path: '/docs/ja-JP/about', type: HTML }, // "指定されたURLに該当するページはありませんでした。"
|
||||
// fastify-static gives charset=UTF-8 instead of utf-8 and that's okay
|
||||
{ path: '/api-doc', type: 'text/html; charset=UTF-8' },
|
||||
{ path: '/api-doc', type: 'text/html; charset=utf-8' },
|
||||
{ path: '/api.json', type: JSON_UTF8 },
|
||||
{ path: '/api-console', type: HTML },
|
||||
{ path: '/_info_card_', type: HTML },
|
||||
{ path: '/bios', type: HTML },
|
||||
{ path: '/cli', type: HTML },
|
||||
{ path: '/flush', type: HTML },
|
||||
{ path: '/robots.txt', type: 'text/plain; charset=UTF-8' },
|
||||
{ path: '/robots.txt', type: 'text/plain; charset=utf-8' },
|
||||
{ path: '/favicon.ico', type: 'image/vnd.microsoft.icon' },
|
||||
{ path: '/opensearch.xml', type: 'application/opensearchdescription+xml' },
|
||||
{ path: '/apple-touch-icon.png', type: 'image/png' },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue