upgrade deps

This commit is contained in:
undefined committed 2023-04-11 14:52:11 +08:00
1 parent c482c5fef8
commit bd87de3803
7 files changed
+17 -17

No files matched your search

+7 -7
View File
@@ -12,11 +12,11 @@
},
"preferUnplugged": true,
"dependencies": {
"@aws-sdk/client-s3": "^3.306.0",
"@aws-sdk/lib-storage": "^3.306.0",
"@aws-sdk/client-s3": "^3.309.0",
"@aws-sdk/lib-storage": "^3.309.0",
"@aws-sdk/middleware-endpoint": "^3.306.0",
"@aws-sdk/s3-presigned-post": "^3.306.0",
"@aws-sdk/s3-request-presigner": "^3.306.0",
"@aws-sdk/s3-presigned-post": "^3.309.0",
"@aws-sdk/s3-request-presigner": "^3.309.0",
"@graphql-tools/schema": "^9.0.17",
"@hydrooj/utils": "workspace:*",
"@simplewebauthn/server": "^7.2.0",
@@ -28,16 +28,16 @@
"emojis-list": "2.1.0",
"fs-extra": "^11.1.1",
"graphql": "^16.6.0",
"graphql-scalars": "1.20.4",
"graphql-scalars": "1.21.3",
"js-yaml": "^4.1.0",
"koa": "^2.14.1",
"koa-body": "^6.0.1",
"koa-compress": "^5.1.0",
"koa-compress": "^5.1.1",
"koa-proxies": "^0.12.3",
"koa-router": "^12.0.0",
"koa-static-cache": "^5.1.4",
"lodash": "^4.17.21",
"lru-cache": "7.14.1",
"lru-cache": "9.0.0",
"mime-types": "^2.1.35",
"moment-timezone": "^0.5.43",
"mongodb": "^5.2.0",
+2 -2
View File
@@ -1,5 +1,5 @@
import { Dictionary } from 'lodash';
import LRU from 'lru-cache';
import { LRUCache } from 'lru-cache';
import { Filter } from 'mongodb';
import { DomainDoc } from '../interface';
import * as bus from '../service/bus';
@@ -11,7 +11,7 @@ import UserModel, { deleteUserCache } from './user';
const coll = db.collection('domain');
const collUser = db.collection('domain.user');
const cache = new LRU<string, DomainDoc>({ max: 1000, ttl: 300 * 1000 });
const cache = new LRUCache<string, DomainDoc>({ max: 1000, ttl: 300 * 1000 });
interface DomainUserArg {
_id: number,
+2 -2
View File
@@ -1,5 +1,5 @@
import { escapeRegExp, pick, uniq } from 'lodash';
import LRU from 'lru-cache';
import { LRUCache } from 'lru-cache';
import { Collection, Filter, ObjectId } from 'mongodb';
import { LoginError, UserAlreadyExistError, UserNotFoundError } from '../error';
import {
@@ -23,7 +23,7 @@ export const coll: Collection<Udoc> = db.collection('user');
// Virtual user, only for display in contest.
export const collV: Collection<VUdoc> = db.collection('vuser');
export const collGroup: Collection<GDoc> = db.collection('user.group');
const cache = new LRU<string, User>({ max: 10000, ttl: 300 * 1000 });
const cache = new LRUCache<string, User>({ max: 10000, ttl: 300 * 1000 });
export function deleteUserCache(udoc: { _id: number, uname: string, mail: string } | string | true | undefined | null, receiver = false) {
if (!udoc) return false;