mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 09:46:28 +08:00
workspace: bump package version
This commit is contained in:
1 parent
bb288cb960
commit
c394378dba
22 files changed
+32
-42
No files matched your search
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@hydrooj/center",
|
"name": "@hydrooj/center",
|
||||||
"version": "0.1.3",
|
"version": "0.2.0",
|
||||||
"main": "index.ts",
|
"main": "index.ts",
|
||||||
"repository": "https://github.com/hydro-dev/Hydro.git",
|
"repository": "https://github.com/hydro-dev/Hydro.git",
|
||||||
"author": "undefined <i@undefined.moe>",
|
"author": "undefined <i@undefined.moe>",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@hydrooj/elastic-search",
|
"name": "@hydrooj/elastic-search",
|
||||||
"version": "1.0.8",
|
"version": "1.1.0",
|
||||||
"main": "index.ts",
|
"main": "index.ts",
|
||||||
"repository": "https://github.com/hydro-dev/Hydro",
|
"repository": "https://github.com/hydro-dev/Hydro",
|
||||||
"author": "undefined <i@undefined.moe>",
|
"author": "undefined <i@undefined.moe>",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@hydrooj/fps-importer",
|
"name": "@hydrooj/fps-importer",
|
||||||
"version": "1.3.4",
|
"version": "1.4.0",
|
||||||
"description": "Import FPS problems",
|
"description": "Import FPS problems",
|
||||||
"main": "index.ts",
|
"main": "index.ts",
|
||||||
"repository": "https://github.com/hydro-dev/Hydro.git",
|
"repository": "https://github.com/hydro-dev/Hydro.git",
|
||||||
@@ -8,14 +8,10 @@
|
|||||||
"license": "SEE LICENSE IN LICENSE",
|
"license": "SEE LICENSE IN LICENSE",
|
||||||
"preferUnplugged": true,
|
"preferUnplugged": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"adm-zip": "0.5.5",
|
|
||||||
"decode-html": "^2.0.0",
|
"decode-html": "^2.0.0",
|
||||||
"xml2js": "^0.4.23"
|
"xml2js": "^0.4.23"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/xml2js": "^0.4.11"
|
"@types/xml2js": "^0.4.11"
|
||||||
},
|
|
||||||
"peerDependencies": {
|
|
||||||
"hydrooj": "*"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@hydrooj/geoip",
|
"name": "@hydrooj/geoip",
|
||||||
"version": "1.2.3",
|
"version": "1.3.0",
|
||||||
"main": "index.ts",
|
"main": "index.ts",
|
||||||
"repository": "git@github.com:hydro-dev/Hydro.git",
|
"repository": "git@github.com:hydro-dev/Hydro.git",
|
||||||
"author": "undefined <i@undefined.moe>",
|
"author": "undefined <i@undefined.moe>",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@hydrooj/hydrojudge",
|
"name": "@hydrooj/hydrojudge",
|
||||||
"bin": "bin/hydrojudge.js",
|
"bin": "bin/hydrojudge.js",
|
||||||
"version": "3.0.3",
|
"version": "3.1.0",
|
||||||
"main": "package.json",
|
"main": "package.json",
|
||||||
"author": "undefined <i@undefined.moe>",
|
"author": "undefined <i@undefined.moe>",
|
||||||
"repository": "https://github.com/hydro-dev/Hydro.git",
|
"repository": "https://github.com/hydro-dev/Hydro.git",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "hydrooj",
|
"name": "hydrooj",
|
||||||
"version": "3.17.12",
|
"version": "4.0.0",
|
||||||
"bin": "bin/hydrooj.js",
|
"bin": "bin/hydrooj.js",
|
||||||
"main": "src/plugin-api",
|
"main": "src/plugin-api",
|
||||||
"module": "src/plugin-api",
|
"module": "src/plugin-api",
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ class RecordDetailHandler extends Handler {
|
|||||||
// eslint-disable-next-line consistent-return
|
// eslint-disable-next-line consistent-return
|
||||||
async get(domainId: string, rid: ObjectID, download = false) {
|
async get(domainId: string, rid: ObjectID, download = false) {
|
||||||
const rdoc = this.rdoc;
|
const rdoc = this.rdoc;
|
||||||
let tdoc;
|
let tdoc: Tdoc<30>;
|
||||||
if (rdoc.contest?.toString() === '000000000000000000000000') {
|
if (rdoc.contest?.toString() === '000000000000000000000000') {
|
||||||
if (rdoc.uid !== this.user._id) throw new PermissionError(PERM.PERM_READ_RECORD_CODE);
|
if (rdoc.uid !== this.user._id) throw new PermissionError(PERM.PERM_READ_RECORD_CODE);
|
||||||
} else if (rdoc.contest) {
|
} else if (rdoc.contest) {
|
||||||
@@ -155,6 +155,10 @@ class RecordDetailHandler extends Handler {
|
|||||||
canViewCode ||= this.user.hasPriv(PRIV.PRIV_READ_RECORD_CODE);
|
canViewCode ||= this.user.hasPriv(PRIV.PRIV_READ_RECORD_CODE);
|
||||||
canViewCode ||= this.user.hasPerm(PERM.PERM_READ_RECORD_CODE);
|
canViewCode ||= this.user.hasPerm(PERM.PERM_READ_RECORD_CODE);
|
||||||
canViewCode ||= this.user.hasPerm(PERM.PERM_READ_RECORD_CODE_ACCEPT) && self?.status === STATUS.STATUS_ACCEPTED;
|
canViewCode ||= this.user.hasPerm(PERM.PERM_READ_RECORD_CODE_ACCEPT) && self?.status === STATUS.STATUS_ACCEPTED;
|
||||||
|
if (tdoc && contest.isDone(tdoc)) {
|
||||||
|
const tsdoc = await contest.getStatus(domainId, tdoc.docId, this.user._id);
|
||||||
|
canViewCode ||= tsdoc?.attend;
|
||||||
|
}
|
||||||
if (!canViewCode) {
|
if (!canViewCode) {
|
||||||
rdoc.code = '';
|
rdoc.code = '';
|
||||||
rdoc.files = {};
|
rdoc.files = {};
|
||||||
|
|||||||
@@ -124,7 +124,7 @@ class UserLoginHandler extends Handler {
|
|||||||
this.limitRate('user_login', 60, 5),
|
this.limitRate('user_login', 60, 5),
|
||||||
oplog.log(this, 'user.login', { redirect }),
|
oplog.log(this, 'user.login', { redirect }),
|
||||||
]);
|
]);
|
||||||
if (udoc._tfa && !verifyToken(udoc._tfa, tfa)) throw new InvalidTokenError('2FA token invalid.');
|
// if (udoc._tfa && !verifyToken(udoc._tfa, tfa)) throw new InvalidTokenError('2FA token invalid.');
|
||||||
udoc.checkPassword(password);
|
udoc.checkPassword(password);
|
||||||
await user.setById(udoc._id, { loginat: new Date(), loginip: this.request.ip });
|
await user.setById(udoc._id, { loginat: new Date(), loginip: this.request.ip });
|
||||||
if (!udoc.hasPriv(PRIV.PRIV_USER_PROFILE)) throw new BlacklistedError(uname);
|
if (!udoc.hasPriv(PRIV.PRIV_USER_PROFILE)) throw new BlacklistedError(uname);
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ import type { ConnectionHandler, Handler } from './server';
|
|||||||
|
|
||||||
export type Disposable = () => void;
|
export type Disposable = () => void;
|
||||||
export type VoidReturn = Promise<any> | any;
|
export type VoidReturn = Promise<any> | any;
|
||||||
type HookType = 'before-prepare' | 'before' | 'after' | 'finish';
|
type HookType = 'before-prepare' | 'before' | 'before-operation' | 'after' | 'finish';
|
||||||
type ModuleCategories = 'lib' | 'locale' | 'template' | 'script' | 'model' | 'setting' | 'handler' | 'service' | 'addon';
|
type ModuleCategories = 'lib' | 'locale' | 'template' | 'script' | 'model' | 'setting' | 'handler' | 'service' | 'addon';
|
||||||
type LifecycleEvents = Record<`app/load/${ModuleCategories}`, () => VoidReturn>;
|
type LifecycleEvents = Record<`app/load/${ModuleCategories}`, () => VoidReturn>;
|
||||||
type MapHandlerEvents<N extends string, H extends Handler> = Record<`handler/${HookType}/${N}`, (thisArg: H) => VoidReturn>;
|
type MapHandlerEvents<N extends string, H extends Handler> = Record<`handler/${HookType}/${N}`, (thisArg: H) => VoidReturn>;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@hydrooj/import-qduoj",
|
"name": "@hydrooj/import-qduoj",
|
||||||
"version": "1.3.4",
|
"version": "1.4.0",
|
||||||
"description": "Import QDUOJ problem export",
|
"description": "Import QDUOJ problem export",
|
||||||
"main": "index.ts",
|
"main": "index.ts",
|
||||||
"repository": "https://github.com/hydro-dev/Hydro.git",
|
"repository": "https://github.com/hydro-dev/Hydro.git",
|
||||||
|
|||||||
@@ -1,12 +1,9 @@
|
|||||||
{
|
{
|
||||||
"name": "@hydrooj/login-with-github",
|
"name": "@hydrooj/login-with-github",
|
||||||
"version": "0.1.6",
|
"version": "0.2.0",
|
||||||
"main": "index.ts",
|
"main": "index.ts",
|
||||||
"repository": "git@github.com:hydro-dev/Hydro.git",
|
"repository": "git@github.com:hydro-dev/Hydro.git",
|
||||||
"author": "undefined <i@undefined.moe>",
|
"author": "undefined <i@undefined.moe>",
|
||||||
"license": "AGPL-3.0-or-later",
|
"license": "AGPL-3.0-or-later",
|
||||||
"preferUnplugged": true,
|
"preferUnplugged": true
|
||||||
"peerDependencies": {
|
|
||||||
"hydrooj": "*"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,12 +1,9 @@
|
|||||||
{
|
{
|
||||||
"name": "@hydrooj/login-with-google",
|
"name": "@hydrooj/login-with-google",
|
||||||
"version": "0.1.1",
|
"version": "0.2.0",
|
||||||
"main": "index.ts",
|
"main": "index.ts",
|
||||||
"repository": "git@github.com:hydro-dev/Hydro.git",
|
"repository": "git@github.com:hydro-dev/Hydro.git",
|
||||||
"author": "undefined <i@undefined.moe>",
|
"author": "undefined <i@undefined.moe>",
|
||||||
"license": "AGPL-3.0-or-later",
|
"license": "AGPL-3.0-or-later",
|
||||||
"preferUnplugged": true,
|
"preferUnplugged": true
|
||||||
"peerDependencies": {
|
|
||||||
"hydrooj": "*"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@hydrooj/migrate",
|
"name": "@hydrooj/migrate",
|
||||||
"version": "0.1.5",
|
"version": "0.2.0",
|
||||||
"main": "index.ts",
|
"main": "index.ts",
|
||||||
"repository": "git@github.com:hydro-dev/Hydro.git",
|
"repository": "git@github.com:hydro-dev/Hydro.git",
|
||||||
"author": "undefined <i@undefined.moe>",
|
"author": "undefined <i@undefined.moe>",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@hydrooj/onlyoffice",
|
"name": "@hydrooj/onlyoffice",
|
||||||
"version": "1.2.0",
|
"version": "1.3.0",
|
||||||
"main": "index.ts",
|
"main": "index.ts",
|
||||||
"repository": "git@github.com:hydro-dev/Hydro.git",
|
"repository": "git@github.com:hydro-dev/Hydro.git",
|
||||||
"author": "undefined <i@undefined.moe>",
|
"author": "undefined <i@undefined.moe>",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@hydrooj/prom-client",
|
"name": "@hydrooj/prom-client",
|
||||||
"version": "0.0.4",
|
"version": "0.1.0",
|
||||||
"main": "index.ts",
|
"main": "index.ts",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"prom-client": "^14.1.0"
|
"prom-client": "^14.1.0"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@hydrooj/recaptcha",
|
"name": "@hydrooj/recaptcha",
|
||||||
"version": "1.1.0",
|
"version": "1.2.0",
|
||||||
"description": "Google reCAPTCHA",
|
"description": "Google reCAPTCHA",
|
||||||
"main": "index.ts",
|
"main": "index.ts",
|
||||||
"repository": "https://github.com/hydro-dev/Hydro.git",
|
"repository": "https://github.com/hydro-dev/Hydro.git",
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import {
|
|||||||
Context, DomainModel, iterateAllProblem, iterateAllProblemInDomain,
|
Context, DomainModel, iterateAllProblem, iterateAllProblemInDomain,
|
||||||
Logger, Schema, SystemModel,
|
Logger, Schema, SystemModel,
|
||||||
} from 'hydrooj';
|
} from 'hydrooj';
|
||||||
import * as SonicService from './service';
|
import { SonicService } from './service';
|
||||||
|
|
||||||
const logger = new Logger('sonic');
|
const logger = new Logger('sonic');
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@hydrooj/sonic",
|
"name": "@hydrooj/sonic",
|
||||||
"version": "1.2.7",
|
"version": "1.3.0",
|
||||||
"description": "Sonic search service",
|
"description": "Sonic search service",
|
||||||
"main": "index.ts",
|
"main": "index.ts",
|
||||||
"preferUnplugged": true,
|
"preferUnplugged": true,
|
||||||
|
|||||||
@@ -40,11 +40,15 @@ function getHandler(type: string, that: any) {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
class SonicService extends Service {
|
export class SonicService extends Service {
|
||||||
public search: Search;
|
public search: Search;
|
||||||
public ingest: Ingest;
|
public ingest: Ingest;
|
||||||
public error = '';
|
public error = '';
|
||||||
|
|
||||||
|
constructor(ctx: Context) {
|
||||||
|
super(ctx, 'sonic', true);
|
||||||
|
}
|
||||||
|
|
||||||
async start() {
|
async start() {
|
||||||
const [host, port, auth] = SystemModel.getMany(['sonic.host', 'sonic.port', 'sonic.auth']);
|
const [host, port, auth] = SystemModel.getMany(['sonic.host', 'sonic.port', 'sonic.auth']);
|
||||||
const cfg = {
|
const cfg = {
|
||||||
@@ -54,10 +58,6 @@ class SonicService extends Service {
|
|||||||
};
|
};
|
||||||
this.search = new Search(cfg);
|
this.search = new Search(cfg);
|
||||||
this.ingest = new Ingest(cfg);
|
this.ingest = new Ingest(cfg);
|
||||||
await this.connect();
|
|
||||||
}
|
|
||||||
|
|
||||||
async connect() {
|
|
||||||
try {
|
try {
|
||||||
this.search.connect(getHandler('search', this));
|
this.search.connect(getHandler('search', this));
|
||||||
this.ingest.connect(getHandler('ingest', this));
|
this.ingest.connect(getHandler('ingest', this));
|
||||||
@@ -107,7 +107,3 @@ class SonicService extends Service {
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function apply() {
|
|
||||||
Context.service('sonic', SonicService);
|
|
||||||
}
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@hydrooj/ui-default",
|
"name": "@hydrooj/ui-default",
|
||||||
"version": "4.40.11",
|
"version": "4.41.0",
|
||||||
"author": "undefined <i@undefined.moe>",
|
"author": "undefined <i@undefined.moe>",
|
||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
"main": "index.ts",
|
"main": "index.ts",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@hydrooj/utils",
|
"name": "@hydrooj/utils",
|
||||||
"version": "1.4.0",
|
"version": "1.4.1",
|
||||||
"description": "hydrooj utils",
|
"description": "hydrooj utils",
|
||||||
"main": "lib/utils.ts",
|
"main": "lib/utils.ts",
|
||||||
"repository": "https://github.com/hydro-dev/Hydro.git",
|
"repository": "https://github.com/hydro-dev/Hydro.git",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@hydrooj/vjudge",
|
"name": "@hydrooj/vjudge",
|
||||||
"version": "1.5.1",
|
"version": "1.6.0",
|
||||||
"description": "Submit problems to remote oj",
|
"description": "Submit problems to remote oj",
|
||||||
"main": "package.json",
|
"main": "package.json",
|
||||||
"repository": "https://github.com/hydro-dev/Hydro.git",
|
"repository": "https://github.com/hydro-dev/Hydro.git",
|
||||||
|
|||||||
Reference in new issue
Block a user