chore: ⬆️ up deps (properly)
This commit is contained in:
parent
a75a19cd17
commit
2fb65cdd86
5 changed files with 668 additions and 686 deletions
11
package.json
11
package.json
|
@ -38,18 +38,17 @@
|
|||
"chokidar": "^3.3.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@bull-board/api": "5.7.2",
|
||||
"@bull-board/ui": "5.7.2",
|
||||
"@bull-board/api": "5.8.0",
|
||||
"@bull-board/ui": "5.8.0",
|
||||
"@napi-rs/cli": "^2.16.2",
|
||||
"@tensorflow/tfjs": "^3.21.0",
|
||||
"@tensorflow/tfjs": "^4.10.0",
|
||||
"js-yaml": "4.1.0",
|
||||
"seedrandom": "^3.0.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/gulp": "4.0.13",
|
||||
"@types/gulp-rename": "2.0.2",
|
||||
"@types/node": "20.4.9",
|
||||
"chalk": "4.1.2",
|
||||
"@types/node": "20.5.8",
|
||||
"cross-env": "7.0.3",
|
||||
"cypress": "10.11.0",
|
||||
"execa": "5.1.1",
|
||||
|
@ -61,6 +60,6 @@
|
|||
"install-peers": "^1.0.4",
|
||||
"rome": "^12.1.3",
|
||||
"start-server-and-test": "1.15.2",
|
||||
"typescript": "5.1.6"
|
||||
"typescript": "5.2.2"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,9 +26,9 @@
|
|||
"@tensorflow/tfjs-node": "3.21.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@bull-board/api": "5.7.2",
|
||||
"@bull-board/koa": "5.7.2",
|
||||
"@bull-board/ui": "5.7.2",
|
||||
"@bull-board/api": "5.8.0",
|
||||
"@bull-board/koa": "5.8.0",
|
||||
"@bull-board/ui": "5.8.0",
|
||||
"@discordapp/twemoji": "14.1.2",
|
||||
"@elastic/elasticsearch": "7.17.0",
|
||||
"@koa/cors": "3.4.3",
|
||||
|
@ -41,17 +41,16 @@
|
|||
"@tensorflow/tfjs": "^4.2.0",
|
||||
"adm-zip": "^0.5.10",
|
||||
"ajv": "8.12.0",
|
||||
"archiver": "5.3.1",
|
||||
"argon2": "^0.30.3",
|
||||
"archiver": "6.0.0",
|
||||
"argon2": "^0.31.1",
|
||||
"autolinker": "4.0.0",
|
||||
"autwh": "0.1.0",
|
||||
"aws-sdk": "2.1413.0",
|
||||
"axios": "^1.4.0",
|
||||
"bcryptjs": "2.4.3",
|
||||
"blurhash": "2.0.5",
|
||||
"bull": "4.11.2",
|
||||
"bull": "4.11.3",
|
||||
"cacheable-lookup": "TheEssem/cacheable-lookup",
|
||||
"cbor": "8.1.0",
|
||||
"chalk": "5.3.0",
|
||||
"chalk-template": "0.4.0",
|
||||
"chokidar": "^3.5.3",
|
||||
|
@ -63,19 +62,19 @@
|
|||
"deep-email-validator": "0.1.21",
|
||||
"escape-regexp": "0.0.1",
|
||||
"feed": "4.2.2",
|
||||
"file-type": "17.1.6",
|
||||
"file-type": "18.5.0",
|
||||
"firefish-js": "workspace:*",
|
||||
"fluent-ffmpeg": "2.1.2",
|
||||
"got": "12.5.3",
|
||||
"got": "13.0.0",
|
||||
"gunzip-maybe": "^1.4.2",
|
||||
"hpagent": "0.1.2",
|
||||
"hpagent": "1.2.0",
|
||||
"ioredis": "5.3.2",
|
||||
"ip-cidr": "3.1.0",
|
||||
"is-svg": "4.3.2",
|
||||
"is-svg": "5.0.0",
|
||||
"js-yaml": "4.1.0",
|
||||
"jsdom": "20.0.3",
|
||||
"jsdom": "22.1.0",
|
||||
"json5": "2.2.3",
|
||||
"jsonld": "8.2.0",
|
||||
"jsonld": "8.2.1",
|
||||
"jsrsasign": "10.8.6",
|
||||
"koa": "2.14.2",
|
||||
"koa-body": "^6.0.1",
|
||||
|
@ -89,10 +88,10 @@
|
|||
"koa-slow": "2.1.0",
|
||||
"koa-views": "7.0.2",
|
||||
"megalodon": "workspace:*",
|
||||
"meilisearch": "0.33.0",
|
||||
"meilisearch": "0.34.1",
|
||||
"mfm-js": "0.23.3",
|
||||
"mime-types": "2.1.35",
|
||||
"msgpackr": "1.9.6",
|
||||
"msgpackr": "1.9.7",
|
||||
"multer": "1.4.4-lts.1",
|
||||
"native-utils": "link:native-utils",
|
||||
"nested-property": "4.0.0",
|
||||
|
@ -104,19 +103,18 @@
|
|||
"os-utils": "0.0.14",
|
||||
"otpauth": "^9.1.4",
|
||||
"parse5": "7.1.2",
|
||||
"pg": "8.11.2",
|
||||
"private-ip": "2.3.4",
|
||||
"pg": "8.11.3",
|
||||
"private-ip": "3.0.1",
|
||||
"probe-image-size": "7.2.3",
|
||||
"promise-limit": "2.7.0",
|
||||
"punycode": "2.3.0",
|
||||
"pureimage": "0.3.15",
|
||||
"pureimage": "0.4.8",
|
||||
"qrcode": "1.5.3",
|
||||
"qs": "6.11.2",
|
||||
"random-seed": "0.3.0",
|
||||
"ratelimiter": "3.4.1",
|
||||
"re2": "1.20.1",
|
||||
"redis-lock": "0.1.4",
|
||||
"redis-semaphore": "5.4.0",
|
||||
"re2": "1.20.3",
|
||||
"redis-semaphore": "5.5.0",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rename": "1.0.4",
|
||||
"rndstr": "1.0.0",
|
||||
|
@ -124,12 +122,12 @@
|
|||
"sanitize-html": "2.11.0",
|
||||
"seedrandom": "^3.0.5",
|
||||
"semver": "7.5.4",
|
||||
"sharp": "0.32.4",
|
||||
"sharp": "0.32.5",
|
||||
"sonic-channel": "^1.3.1",
|
||||
"stringz": "2.1.0",
|
||||
"summaly": "2.7.0",
|
||||
"syslog-pro": "1.0.0",
|
||||
"systeminformation": "5.18.13",
|
||||
"systeminformation": "5.21.3",
|
||||
"tar-stream": "^3.1.6",
|
||||
"tesseract.js": "^4.1.1",
|
||||
"tinycolor2": "1.6.0",
|
||||
|
@ -138,7 +136,7 @@
|
|||
"typeorm": "0.3.17",
|
||||
"ulid": "2.3.0",
|
||||
"uuid": "9.0.0",
|
||||
"web-push": "3.6.4",
|
||||
"web-push": "3.6.5",
|
||||
"websocket": "1.0.34",
|
||||
"xev": "3.0.2"
|
||||
},
|
||||
|
@ -147,7 +145,6 @@
|
|||
"@swc/core": "^1.3.75",
|
||||
"@types/adm-zip": "^0.5.0",
|
||||
"@types/bcryptjs": "2.4.2",
|
||||
"@types/cbor": "6.0.0",
|
||||
"@types/escape-regexp": "0.0.1",
|
||||
"@types/fluent-ffmpeg": "2.1.21",
|
||||
"@types/js-yaml": "4.0.5",
|
||||
|
|
|
@ -1,33 +1,40 @@
|
|||
import { redisClient } from "../db/redis.js";
|
||||
import { promisify } from "node:util";
|
||||
import redisLock from "redis-lock";
|
||||
import { Mutex } from "redis-semaphore";
|
||||
|
||||
/**
|
||||
* Retry delay (ms) for lock acquisition
|
||||
*/
|
||||
const retryDelay = 100;
|
||||
|
||||
const lock: (key: string, timeout?: number) => Promise<() => void> = redisClient
|
||||
? promisify(redisLock(redisClient, retryDelay))
|
||||
: async () => () => {};
|
||||
|
||||
/**
|
||||
* Get AP Object lock
|
||||
* @param uri AP object ID
|
||||
* @param timeout Lock timeout (ms), The timeout releases previous lock.
|
||||
* @returns Unlock function
|
||||
*/
|
||||
export function getApLock(uri: string, timeout = 30 * 1000) {
|
||||
return lock(`ap-object:${uri}`, timeout);
|
||||
export async function getApLock(uri: string, timeout = 30 * 1000) {
|
||||
const lock = new Mutex(redisClient, `ap-object:${uri}`, {
|
||||
lockTimeout: timeout,
|
||||
retryInterval: retryDelay,
|
||||
});
|
||||
await lock.acquire();
|
||||
}
|
||||
|
||||
export function getFetchInstanceMetadataLock(
|
||||
export async function getFetchInstanceMetadataLock(
|
||||
host: string,
|
||||
timeout = 30 * 1000,
|
||||
) {
|
||||
return lock(`instance:${host}`, timeout);
|
||||
const lock = new Mutex(redisClient, `instance:${host}`, {
|
||||
lockTimeout: timeout,
|
||||
retryInterval: retryDelay,
|
||||
});
|
||||
await lock.acquire();
|
||||
}
|
||||
|
||||
export function getChartInsertLock(lockKey: string, timeout = 30 * 1000) {
|
||||
return lock(`chart-insert:${lockKey}`, timeout);
|
||||
export async function getChartInsertLock(lockKey: string, timeout = 30 * 1000) {
|
||||
const lock = new Mutex(redisClient, `chart-insert:${lockKey}`, {
|
||||
lockTimeout: timeout,
|
||||
retryInterval: retryDelay,
|
||||
});
|
||||
await lock.acquire();
|
||||
}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import { promisify } from "node:util";
|
||||
import * as cbor from "cbor";
|
||||
import { decode } from "msgpackr";
|
||||
import define from "../../../define.js";
|
||||
import {
|
||||
UserProfiles,
|
||||
|
@ -12,7 +11,6 @@ import { procedures, hash } from "../../../2fa.js";
|
|||
import { publishMainStream } from "@/services/stream.js";
|
||||
import { comparePassword } from "@/misc/password.js";
|
||||
|
||||
const cborDecodeFirst = promisify(cbor.decodeFirst) as any;
|
||||
const rpIdHashReal = hash(Buffer.from(config.hostname, "utf-8"));
|
||||
|
||||
export const meta = {
|
||||
|
@ -64,7 +62,7 @@ export default define(meta, paramDef, async (ps, user) => {
|
|||
|
||||
const clientDataJSONHash = hash(Buffer.from(ps.clientDataJSON, "utf-8"));
|
||||
|
||||
const attestation = await cborDecodeFirst(ps.attestationObject);
|
||||
const attestation = decode(Buffer.from(ps.attestationObject, "utf-8"));
|
||||
|
||||
const rpIdHash = attestation.authData.slice(0, 32);
|
||||
if (!rpIdHashReal.equals(rpIdHash)) {
|
||||
|
@ -81,7 +79,7 @@ export default define(meta, paramDef, async (ps, user) => {
|
|||
const credentialIdLength = authData.readUInt16BE(53);
|
||||
const credentialId = authData.slice(55, 55 + credentialIdLength);
|
||||
const publicKeyData = authData.slice(55 + credentialIdLength);
|
||||
const publicKey: Map<number, any> = await cborDecodeFirst(publicKeyData);
|
||||
const publicKey: Map<number, any> = decode(publicKeyData);
|
||||
if (publicKey.get(3) !== -7) {
|
||||
throw new Error("alg mismatch");
|
||||
}
|
||||
|
|
1257
pnpm-lock.yaml
1257
pnpm-lock.yaml
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue