bump version

This commit is contained in:
undefined committed 2025-11-12 05:10:49 +08:00
1 parent 828ba556ae
commit ae43ee16de
26 files changed
+136 -81

No files matched your search

+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@hydrooj/common",
"main": "./index.ts",
"version": "0.0.5",
"version": "0.0.6",
"repository": "https://github.com/hydro-dev/Hydro",
"sideEffects": false,
"dependencies": {
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@hydrooj/components",
"version": "1.0.0-beta.7",
"version": "1.0.0-beta.8",
"main": "./frontend/index.ts",
"repository": "https://github.com/hydro-dev/Hydro",
"sideEffects": [
@@ -21,7 +21,7 @@
"@types/diff": "^8.0.0",
"@types/js-yaml": "^4.0.9",
"@types/lodash": "^4.17.20",
"sass": "^1.93.2"
"sass": "^1.94.0"
},
"peerDependencies": {
"react": "*",
+1 -1
View File
@@ -6,7 +6,7 @@
"author": "undefined <i@undefined.moe>",
"license": "AGPL-3.0-or-later",
"dependencies": {
"@elastic/elasticsearch": "^9.1.1"
"@elastic/elasticsearch": "^9.2.0"
},
"engines": {
"hydrooj": ">=5.0.0-alpha.1"
+1 -1
View File
@@ -6,7 +6,7 @@
"author": "undefined <i@undefined.moe>",
"license": "AGPL-3.0-or-later",
"dependencies": {
"maxmind": "^5.0.0"
"maxmind": "^5.0.1"
},
"preferUnplugged": true
}
+3 -3
View File
@@ -1,17 +1,17 @@
{
"name": "@hydrooj/hydrojudge",
"bin": "bin/hydrojudge.js",
"version": "3.5.0-beta.9",
"version": "3.5.0-beta.10",
"main": "./src/index.ts",
"author": "undefined <i@undefined.moe>",
"repository": "https://github.com/hydro-dev/Hydro.git",
"dependencies": {
"@hydrooj/common": "workspace:^",
"@hydrooj/utils": "workspace:^",
"@zip.js/zip.js": "^2.8.8",
"@zip.js/zip.js": "^2.8.10",
"cac": "^6.7.14",
"p-queue": "^9.0.0",
"schemastery": "^3.17.1",
"schemastery": "^3.17.2",
"semver": "^7.7.3",
"shell-quote": "^1.8.3",
"superagent": "^10.2.3",
+4 -4
View File
@@ -1,6 +1,6 @@
{
"name": "hydrooj",
"version": "5.0.0-beta.11",
"version": "5.0.0-beta.12",
"bin": "bin/hydrooj.js",
"main": "src/plugin-api",
"module": "src/plugin-api",
@@ -24,7 +24,7 @@
"@mongodb-js/saslprep": "^1.3.2",
"@simplewebauthn/server": "13.2.2",
"@undefined-moe/require-resolve-hook": "^1.1.0",
"@zip.js/zip.js": "^2.8.8",
"@zip.js/zip.js": "^2.8.10",
"adm-zip": "0.5.16",
"cac": "^6.7.14",
"cordis": "4.0.0-beta.5",
@@ -39,14 +39,14 @@
"lru-cache": "^11.2.2",
"mime-types": "^3.0.1",
"moment-timezone": "^0.6.0",
"mongodb": "^6.20.0",
"mongodb": "^7.0.0",
"mongodb-uri": "^0.9.7",
"nanoid": "^5.1.6",
"nodemailer": "^7.0.10",
"notp": "^2.0.3",
"p-queue": "^9.0.0",
"sanitize-filename": "^1.6.3",
"schemastery": "^3.17.1",
"schemastery": "^3.17.2",
"semver": "^7.7.3",
"shorty.js": "^1.0.1",
"superagent": "^10.2.3",
+1
View File
@@ -25,6 +25,7 @@ function provideModule<T extends keyof ModuleInterfaces>(type: T, id: string, mo
}
export type Fiber = cordis.Fiber<Context>;
export const Fiber = cordis.Fiber;
export { Disposable, FiberState, Plugin } from 'cordis';
+1 -1
View File
@@ -124,7 +124,7 @@ export class ProblemMainHandler extends Handler {
const category = parsed.category || [];
const text = (parsed.text || []).join(' ');
if (parsed.difficulty?.every((i) => Number.isSafeInteger(+i))) {
query.difficulty = { $in: parsed.difficulty.map(Number) };
query.difficulty = { $in: parsed.difficulty.flatMap((i) => +i === 0 ? [0, undefined] : [+i]) };
}
if (category.length) query.$and = category.map((tag) => ({ tag }));
if (parsed.namespace?.length) {
+20 -7
View File
@@ -19,6 +19,7 @@ import { sleep, unwrapExports } from './utils';
import { PRIV } from './model/builtin';
import { getAddons } from './options';
import Schema from 'schemastery';
import { isEqual } from 'lodash';
const argv = cac().parse();
const logger = new Logger('loader');
@@ -93,35 +94,47 @@ export class Loader extends Service {
}
}
async resolveConfig(plugin: any, configScope: string) {
async resolveConfig(plugin: any, configScope: string, dynamic = true) {
const schema = plugin['Config'] || plugin['schema'];
if (!schema) return {};
if (!schema) return Object.freeze({});
const schemaRequest = configScope ? Schema.object({
[configScope]: schema,
}) : schema;
await this.ctx.setting._tryMigrateConfig(schemaRequest);
const res = this.ctx.setting.requestConfig(schemaRequest);
const res = this.ctx.setting.requestConfig(schemaRequest, dynamic);
return configScope ? res[configScope] : res;
}
async reloadPlugin(key: string, configScope: string) {
const plugin = this.resolvePlugin(key);
if (!plugin) return;
const config = await this.resolveConfig(plugin, configScope);
// currently cordis validates config and converts proxy to plain object
// must do a full reload once config changed
const config = await this.resolveConfig(plugin, configScope, false);
let fork = this.state[key];
const displayPath = key.includes('node_modules')
? key.split('node_modules').pop()
: path.relative(process.cwd(), key);
logger.info(
`%s plugin %c${configScope ? ' with scope %c' : ''}`,
fork ? 'reload' : 'apply', displayPath, configScope,
fork ? 'update' : 'apply', displayPath, configScope,
);
if (fork) {
fork.update(config);
fork.update(config, true);
} else {
fork = this.ctx.plugin(plugin, config);
if (!fork) return;
this.state[key] = fork;
const inner = Object.getPrototypeOf(fork) !== Fiber.prototype
? Object.getPrototypeOf(fork) : fork;
this.state[key] = inner;
}
if (!Object.isFrozen(config)) {
fork.ctx.on('system/setting', async () => {
if (!fork.uid || !this.state[key]) return;
const resolved = await this.resolveConfig(plugin, configScope, false);
if (isEqual(this.state[key].config, resolved)) return;
this.reloadPlugin(key, configScope);
});
}
return fork;
}
+11 -10
View File
@@ -150,16 +150,16 @@ export class SettingService extends Service {
}
requestConfig<T, S>(s: Schema<T, S>, dynamic = true): S {
if (dynamic) {
this.ctx.effect(() => {
this.settings.push(s);
this.ctx.effect(() => {
logger.debug('Loading config', s);
this.settings.push(s);
this._applySchema();
return () => {
logger.debug('Unloading config', s);
this.settings = this.settings.filter((v) => v !== s);
this._applySchema();
return () => {
this.settings = this.settings.filter((v) => v !== s);
this._applySchema();
};
});
}
};
});
let curValue = s(this.systemConfig);
if (!dynamic) return curValue;
this.ctx.on('system/setting', () => {
@@ -175,7 +175,8 @@ export class SettingService extends Service {
if (path.some((p) => SettingService.blacklist.includes(p.toString()))) throw new Error(`Invalid path: ${path.join('.')}`);
let currentValue = curValue;
for (const p of path) currentValue = currentValue[p];
if (typeof currentValue !== 'object' || !currentValue || Array.isArray(currentValue)) return currentValue;
if ((typeof currentValue !== 'object') || !currentValue || Array.isArray(currentValue)) return currentValue;
if (path.some((p) => typeof p === 'symbol')) return currentValue;
return new Proxy(currentValue, {
get(self, key: string) {
return getAccess(path.concat(key));
+1 -1
View File
@@ -458,7 +458,7 @@ export const coreScripts: MigrationScript[] = [
return await iterateAllDomain(async ({ _id }) => {
const cursor = discussion.getMulti(_id, { parentType: document.TYPE_CONTEST });
for await (const ddoc of cursor) {
const parentId = new ObjectId(ddoc.parentId);
const parentId = new ObjectId(ddoc.parentId as string);
await discussion.edit(_id, ddoc.docId, { parentId });
try {
await contest.get(_id, parentId);
+4 -4
View File
@@ -1,18 +1,18 @@
{
"name": "@hydrooj/migrate",
"version": "0.5.0-beta.5",
"version": "0.5.0-beta.6",
"main": "index.ts",
"repository": "git@github.com:hydro-dev/Hydro.git",
"author": "undefined <i@undefined.moe>",
"license": "AGPL-3.0-or-later",
"dependencies": {
"mariadb": "^3.4.5",
"mongodb": "^6.20.0",
"turndown": "^7.2.1",
"mongodb": "^7.0.0",
"turndown": "^7.2.2",
"xml2js": "^0.6.2"
},
"devDependencies": {
"@types/turndown": "^5.0.5",
"@types/turndown": "^5.0.6",
"@types/xml2js": "^0.4.14"
}
}
+3 -3
View File
@@ -1,16 +1,16 @@
{
"name": "@hydrooj/scoreboard-xcpcio",
"license": "AGPL-3.0-or-later",
"version": "0.0.5-beta.4",
"version": "0.0.5-beta.5",
"main": "index.ts",
"repository": "https://github.com/hydro-dev/Hydro.git",
"scripts": {
"postinstall": "node -r @hydrooj/register install.ts"
},
"dependencies": {
"@xcpcio/board-app": "^0.74.1"
"@xcpcio/board-app": "^0.75.1"
},
"devDependencies": {
"@xcpcio/types": "^0.74.1"
"@xcpcio/types": "^0.75.1"
}
}
@@ -11,7 +11,7 @@
window.DATA_HOST = "/";
window.DATA_REGION = "Hydro";
window.DEFAULT_LANG = "{{ 'zh-CN' if _('__id').startsWith('zh') else 'en' }}";
window.DATA_SOURCE = "{{ dataSource }}";
window.DATA_SOURCE = "{{ dataSource|safe }}";
if (document.documentElement.classList.contains("theme--dark")) document.documentElement.classList.toggle("dark", !0);
setInterval(() => {
const location = window.location.href;
+1
View File
@@ -18,6 +18,7 @@ export { default as _ } from 'lodash';
export { default as React } from 'react';
export { default as ReactDOM } from 'react-dom/client';
export * as redux from 'react-redux';
export { default as jsxRuntime } from 'react/jsx-runtime';
import { load } from './lazyload';
export default load;
+13 -13
View File
@@ -1,6 +1,6 @@
{
"name": "@hydrooj/ui-default",
"version": "4.58.0-beta.10",
"version": "4.58.0-beta.11",
"author": "undefined <i@undefined.moe>",
"license": "AGPL-3.0",
"main": "index.ts",
@@ -20,10 +20,10 @@
"@fontsource/source-code-pro": "^5.2.7",
"@fontsource/ubuntu-mono": "^5.2.8",
"@hydrooj/utils": "workspace:^",
"@mantine/core": "^8.3.6",
"@mantine/hooks": "^8.3.6",
"@mantine/notifications": "^8.3.6",
"@sentry/browser": "^10.22.0",
"@mantine/core": "^8.3.7",
"@mantine/hooks": "^8.3.7",
"@mantine/notifications": "^8.3.7",
"@sentry/browser": "^10.25.0",
"@sentry/webpack-plugin": "^4.6.0",
"@simplewebauthn/browser": "13.2.2",
"@svgr/webpack": "^8.1.0",
@@ -36,15 +36,15 @@
"@types/nunjucks": "^3.2.6",
"@types/pickadate": "^3.5.35",
"@types/qrcode": "^1.5.6",
"@types/react": "^19.2.2",
"@types/react": "^19.2.3",
"@types/react-dom": "^19.2.2",
"@types/redux-logger": "^3.0.13",
"@types/uuid": "^11.0.0",
"@types/webpack-env": "^1.18.8",
"@vscode/codicons": "^0.0.41",
"@vscode/codicons": "^0.0.42",
"ajv": "^8.17.1",
"allotment": "^1.20.4",
"autoprefixer": "^10.4.21",
"autoprefixer": "^10.4.22",
"browser-update": "^3.3.63",
"chalk": "^5.6.2",
"classnames": "^2.5.1",
@@ -67,9 +67,9 @@
"jquery-scroll-lock": "^3.1.3",
"jquery.easing": "^1.4.1",
"jquery.transit": "^0.9.12",
"mantine-contextmenu": "^8.2.0",
"mantine-contextmenu": "^8.3.7",
"matchmedia-polyfill": "^0.3.2",
"md-editor-rt": "^6.1.0",
"md-editor-rt": "^6.1.1",
"mini-css-extract-plugin": "^2.9.4",
"moment": "^2.30.1",
"monaco-editor": "0.52.2",
@@ -101,16 +101,16 @@
"redux-promise-middleware": "^6.2.0",
"redux-thunk": "^3.1.0",
"rupture": "^0.7.1",
"sass": "^1.93.3",
"sass": "^1.94.0",
"sass-loader": "^16.0.6",
"schemastery": "^3.17.1",
"schemastery": "^3.17.2",
"shorty.js": "^1.0.1",
"slideout": "^1.0.1",
"sticky-kit": "^1.1.3",
"style-loader": "^4.0.0",
"stylus": "^0.64.0",
"stylus-loader": "7.1.2",
"svgtofont": "^6.4.1",
"svgtofont": "^6.5.0",
"tether": "1.4.7",
"tether-drop": "^1.4.2",
"timeago-react": "^3.0.7",
@@ -8,7 +8,7 @@
<div>
<ol class="menu">
{% if mode == 'contest' or mode == 'correction' %}
{% if page_name == 'contest_detail_problem' %}
{% if page_name == 'contest_detail_problem' and handler.ctx.setting.get('ui-default.enableScratchpad') %} %}
<li class="menu__item scratchpad--hide nojs--hide"><a class="menu__link highlight" name="problem-sidebar__open-scratchpad" href="javascript:;" data-global-hotkey="alt+e">
<span class="icon icon-enlarge"></span> {{ _('Open Scratchpad') }} (Alt+E)
</a></li>
@@ -8,7 +8,7 @@
<div>
<ol class="menu">
{% if model.contest.isOngoing(tdoc, tsdoc) or model.contest.isExtended(tdoc, tsdoc) %}
{% if page_name == 'homework_detail_problem' %}
{% if page_name == 'homework_detail_problem' and handler.ctx.setting.get('ui-default.enableScratchpad') %}
<li class="menu__item scratchpad--hide nojs--hide"><a class="menu__link highlight" name="problem-sidebar__open-scratchpad" href="javascript:;" data-global-hotkey="alt+e">
<span class="icon icon-enlarge"></span> {{ _('Open Scratchpad') }} (Alt+E)
</a></li>
+7 -7
View File
@@ -8,14 +8,14 @@
"preview": "vite preview"
},
"dependencies": {
"@vitejs/plugin-react": "^5.0.4",
"react": "^18.3.1",
"react-dom": "^18.3.1"
"@vitejs/plugin-react": "^5.1.0",
"react": "^19.2.0",
"react-dom": "^19.2.0"
},
"devDependencies": {
"@types/react": "^18.3.26",
"@types/react-dom": "^18.3.7",
"@vitejs/plugin-react-swc": "^4.1.0",
"vite": "^7.1.10"
"@types/react": "^19.2.3",
"@types/react-dom": "^19.2.2",
"@vitejs/plugin-react-swc": "^4.2.1",
"vite": "^7.2.2"
}
}
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@hydrooj/vjudge",
"version": "1.10.0-beta.4",
"version": "1.10.0-beta.5",
"description": "Submit problems to remote oj",
"main": "./src/index.ts",
"repository": "https://github.com/hydro-dev/Hydro.git",
@@ -9,7 +9,7 @@
"preferUnplugged": true,
"dependencies": {
"@hydrooj/utils": "workspace:^",
"jsdom": "^27.0.1",
"jsdom": "^27.1.0",
"superagent-charset": "^1.2.0",
"superagent-proxy": "^3.0.0"
},