mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
utils: update testcase parser
This commit is contained in:
8 files changed
+23
-31
No files matched your search
+3
-4
@@ -40,7 +40,7 @@
|
|||||||
"@types/semver": "^7.5.6",
|
"@types/semver": "^7.5.6",
|
||||||
"autocannon": "^7.14.0",
|
"autocannon": "^7.14.0",
|
||||||
"cac": "^6.7.14",
|
"cac": "^6.7.14",
|
||||||
"chai": "^4.4.0",
|
"chai": "^5.0.0",
|
||||||
"chokidar": "^3.5.3",
|
"chokidar": "^3.5.3",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
"cross-spawn": "^7.0.3",
|
"cross-spawn": "^7.0.3",
|
||||||
@@ -51,14 +51,13 @@
|
|||||||
"fs-extra": "^11.2.0",
|
"fs-extra": "^11.2.0",
|
||||||
"globby": "14.0.0",
|
"globby": "14.0.0",
|
||||||
"inspectpack": "^4.7.1",
|
"inspectpack": "^4.7.1",
|
||||||
"mongodb": "^5.9.2",
|
"mongodb-memory-server": "^9.1.6",
|
||||||
"mongodb-memory-server": "^9.1.4",
|
|
||||||
"nyc": "^15.1.0",
|
"nyc": "^15.1.0",
|
||||||
"ora": "^7.0.1",
|
"ora": "^7.0.1",
|
||||||
"package-json": "^8.1.1",
|
"package-json": "^8.1.1",
|
||||||
"semver": "^7.5.4",
|
"semver": "^7.5.4",
|
||||||
"simple-git": "^3.22.0",
|
"simple-git": "^3.22.0",
|
||||||
"supertest": "^6.3.3",
|
"supertest": "^6.3.4",
|
||||||
"typescript": "^5.3.3",
|
"typescript": "^5.3.3",
|
||||||
"wtfnode": "^0.9.1"
|
"wtfnode": "^0.9.1"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,8 +4,8 @@
|
|||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"main": "react.yaml",
|
"main": "react.yaml",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/eslint-plugin": "^6.17.0",
|
"@typescript-eslint/eslint-plugin": "^6.19.0",
|
||||||
"@typescript-eslint/parser": "^6.17.0",
|
"@typescript-eslint/parser": "^6.19.0",
|
||||||
"eslint-config-airbnb": "^19.0.4",
|
"eslint-config-airbnb": "^19.0.4",
|
||||||
"eslint-config-airbnb-typescript": "^17.1.0",
|
"eslint-config-airbnb-typescript": "^17.1.0",
|
||||||
"eslint-plugin-github": "^4.10.1",
|
"eslint-plugin-github": "^4.10.1",
|
||||||
|
|||||||
@@ -59,7 +59,7 @@
|
|||||||
"@types/adm-zip": "^0.4.34",
|
"@types/adm-zip": "^0.4.34",
|
||||||
"@types/fs-extra": "^11.0.4",
|
"@types/fs-extra": "^11.0.4",
|
||||||
"@types/js-yaml": "^4.0.9",
|
"@types/js-yaml": "^4.0.9",
|
||||||
"@types/koa": "^2.13.12",
|
"@types/koa": "^2.14.0",
|
||||||
"@types/koa-compress": "^4.0.6",
|
"@types/koa-compress": "^4.0.6",
|
||||||
"@types/koa-router": "^7.4.8",
|
"@types/koa-router": "^7.4.8",
|
||||||
"@types/koa-static-cache": "^5.1.4",
|
"@types/koa-static-cache": "^5.1.4",
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
"cli": false
|
"cli": false
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@blueprintjs/core": "^5.7.2",
|
"@blueprintjs/core": "^5.8.2",
|
||||||
"@fontsource/dm-mono": "^5.0.18",
|
"@fontsource/dm-mono": "^5.0.18",
|
||||||
"@fontsource/fira-code": "^5.0.16",
|
"@fontsource/fira-code": "^5.0.16",
|
||||||
"@fontsource/inconsolata": "^5.0.16",
|
"@fontsource/inconsolata": "^5.0.16",
|
||||||
@@ -34,14 +34,14 @@
|
|||||||
"@types/nunjucks": "^3.2.6",
|
"@types/nunjucks": "^3.2.6",
|
||||||
"@types/pickadate": "^3.5.35",
|
"@types/pickadate": "^3.5.35",
|
||||||
"@types/qrcode": "^1.5.5",
|
"@types/qrcode": "^1.5.5",
|
||||||
"@types/react": "^18.2.46",
|
"@types/react": "^18.2.47",
|
||||||
"@types/react-dom": "^18.2.18",
|
"@types/react-dom": "^18.2.18",
|
||||||
"@types/redux-logger": "^3.0.12",
|
"@types/redux-logger": "^3.0.12",
|
||||||
"@types/webpack-env": "^1.18.4",
|
"@types/webpack-env": "^1.18.4",
|
||||||
"@vscode/codicons": "^0.0.35",
|
"@vscode/codicons": "^0.0.35",
|
||||||
"ajv": "^8.12.0",
|
"ajv": "^8.12.0",
|
||||||
"allotment": "^1.19.5",
|
"allotment": "^1.20.0",
|
||||||
"autoprefixer": "^10.4.16",
|
"autoprefixer": "^10.4.17",
|
||||||
"browser-update": "^3.3.44",
|
"browser-update": "^3.3.44",
|
||||||
"chalk": "^5.3.0",
|
"chalk": "^5.3.0",
|
||||||
"classnames": "^2.5.1",
|
"classnames": "^2.5.1",
|
||||||
@@ -49,7 +49,7 @@
|
|||||||
"clipboard": "^2.0.11",
|
"clipboard": "^2.0.11",
|
||||||
"copy-webpack-plugin": "^11.0.0",
|
"copy-webpack-plugin": "^11.0.0",
|
||||||
"cordis": "2.8.8",
|
"cordis": "2.8.8",
|
||||||
"css-loader": "^6.8.1",
|
"css-loader": "^6.9.0",
|
||||||
"diff": "^5.1.0",
|
"diff": "^5.1.0",
|
||||||
"diff-dom": "^5.1.2",
|
"diff-dom": "^5.1.2",
|
||||||
"echarts": "^5.4.3",
|
"echarts": "^5.4.3",
|
||||||
@@ -69,7 +69,7 @@
|
|||||||
"jquery.easing": "^1.4.1",
|
"jquery.easing": "^1.4.1",
|
||||||
"jquery.transit": "^0.9.12",
|
"jquery.transit": "^0.9.12",
|
||||||
"matchmedia-polyfill": "^0.3.2",
|
"matchmedia-polyfill": "^0.3.2",
|
||||||
"mini-css-extract-plugin": "^2.7.6",
|
"mini-css-extract-plugin": "^2.7.7",
|
||||||
"moment": "^2.30.1",
|
"moment": "^2.30.1",
|
||||||
"monaco-editor": "0.45.0",
|
"monaco-editor": "0.45.0",
|
||||||
"monaco-editor-nls": "^3.1.0",
|
"monaco-editor-nls": "^3.1.0",
|
||||||
@@ -95,7 +95,7 @@
|
|||||||
"react-dnd-html5-backend": "^16.0.1",
|
"react-dnd-html5-backend": "^16.0.1",
|
||||||
"react-dom": "^18.2.0",
|
"react-dom": "^18.2.0",
|
||||||
"react-query": "^3.39.3",
|
"react-query": "^3.39.3",
|
||||||
"react-redux": "^9.0.4",
|
"react-redux": "^9.1.0",
|
||||||
"reconnecting-websocket": "^4.4.0",
|
"reconnecting-websocket": "^4.4.0",
|
||||||
"redux": "^5.0.1",
|
"redux": "^5.0.1",
|
||||||
"redux-logger": "^3.0.6",
|
"redux-logger": "^3.0.6",
|
||||||
@@ -105,7 +105,7 @@
|
|||||||
"schemastery": "^3.14.3",
|
"schemastery": "^3.14.3",
|
||||||
"slideout": "^1.0.1",
|
"slideout": "^1.0.1",
|
||||||
"sticky-kit": "^1.1.3",
|
"sticky-kit": "^1.1.3",
|
||||||
"style-loader": "^3.3.3",
|
"style-loader": "^3.3.4",
|
||||||
"stylus": "^0.62.0",
|
"stylus": "^0.62.0",
|
||||||
"stylus-loader": "7.1.2",
|
"stylus-loader": "7.1.2",
|
||||||
"tether": "1.4.7",
|
"tether": "1.4.7",
|
||||||
|
|||||||
@@ -35,7 +35,6 @@
|
|||||||
</h1>
|
</h1>
|
||||||
<div class="footer__category__expander"><ul class="footer__category__list">
|
<div class="footer__category__expander"><ul class="footer__category__list">
|
||||||
<li class="footer__category__item"><a href="{{ url('wiki_help') }}">{{ _('Help') }}</a></li>
|
<li class="footer__category__item"><a href="{{ url('wiki_help') }}">{{ _('Help') }}</a></li>
|
||||||
<!--<li class="footer__category__item"><a href="#">{{ _('Blog') }}</a></li>-->
|
|
||||||
<li class="footer__category__item"><a href="{{ url('wiki_about', anchor='contact') }}">{{ _('QQ Group') }}</a></li>
|
<li class="footer__category__item"><a href="{{ url('wiki_about', anchor='contact') }}">{{ _('QQ Group') }}</a></li>
|
||||||
</ul></div>
|
</ul></div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -240,10 +240,12 @@ interface MatchRule {
|
|||||||
|
|
||||||
const SubtaskMatcher: MatchRule[] = [
|
const SubtaskMatcher: MatchRule[] = [
|
||||||
{
|
{
|
||||||
regex: /^(([A-Za-z0-9._-]*?)(?:(\d*)[-_])?(\d+))\.(in|txt)$/,
|
regex: /^(([A-Za-z0-9._-]*?)(?:(\d*)[-_])?(\d+))\.(in|txt|in\.txt)$/,
|
||||||
output: [
|
output: [
|
||||||
(a) => `${a[1]}.out`,
|
(a) => `${a[1]}.out`,
|
||||||
|
(a) => `${a[1]}.out.txt`,
|
||||||
(a) => `${a[1]}.ans`,
|
(a) => `${a[1]}.ans`,
|
||||||
|
(a) => `${a[1]}.ans.txt`,
|
||||||
(a) => `${a[1]}.out`.replace(/input/g, 'output'),
|
(a) => `${a[1]}.out`.replace(/input/g, 'output'),
|
||||||
(a) => (a[1].includes('input') ? `${a[1]}.txt`.replace(/input/g, 'output') : null),
|
(a) => (a[1].includes('input') ? `${a[1]}.txt`.replace(/input/g, 'output') : null),
|
||||||
],
|
],
|
||||||
@@ -256,6 +258,8 @@ const SubtaskMatcher: MatchRule[] = [
|
|||||||
output: [
|
output: [
|
||||||
(a) => `${a[1]}.ou${a[2]}`,
|
(a) => `${a[1]}.ou${a[2]}`,
|
||||||
(a) => `${a[1]}.ou${a[2]}`.replace(/input/g, 'output'),
|
(a) => `${a[1]}.ou${a[2]}`.replace(/input/g, 'output'),
|
||||||
|
(a) => `${a[1]}.out${a[2]}`,
|
||||||
|
(a) => `${a[1]}.out${a[2]}`.replace(/input/g, 'output'),
|
||||||
],
|
],
|
||||||
id: (a) => +a[2],
|
id: (a) => +a[2],
|
||||||
subtask: () => 1,
|
subtask: () => 1,
|
||||||
|
|||||||
@@ -52,21 +52,11 @@ require.extensions['.js'] = function loader(module, filename) {
|
|||||||
const content = fs.readFileSync(filename, 'utf-8');
|
const content = fs.readFileSync(filename, 'utf-8');
|
||||||
return module._compile(content, filename);
|
return module._compile(content, filename);
|
||||||
} catch (e) { // ESM
|
} catch (e) { // ESM
|
||||||
try {
|
return module._compile(transform(filename), filename);
|
||||||
return module._compile(transform(filename), filename);
|
|
||||||
} catch (err) {
|
|
||||||
err.stack = new Error().stack;
|
|
||||||
throw err;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
require.extensions['.ts'] = require.extensions['.tsx'] = function loader(module, filename) {
|
require.extensions['.ts'] = require.extensions['.tsx'] = function loader(module, filename) {
|
||||||
try {
|
return module._compile(transform(filename), filename);
|
||||||
return module._compile(transform(filename), filename);
|
|
||||||
} catch (e) {
|
|
||||||
e.stack = new Error().stack;
|
|
||||||
throw e;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
require.extensions['.jsc'] = function loader(module, filename) {
|
require.extensions['.jsc'] = function loader(module, filename) {
|
||||||
const buf = fs.readFileSync(filename);
|
const buf = fs.readFileSync(filename);
|
||||||
@@ -101,4 +91,4 @@ if (argv.options.debug) {
|
|||||||
console.log('Debug mode enabled');
|
console.log('Debug mode enabled');
|
||||||
process.env.NODE_ENV = 'development';
|
process.env.NODE_ENV = 'development';
|
||||||
process.env.DEV = 'on';
|
process.env.DEV = 'on';
|
||||||
} else process.env.NODE_ENV = process.env.NODE_ENV || 'production';
|
} else process.env.NODE_ENV ||= 'production';
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
"preferUnplugged": true,
|
"preferUnplugged": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@hydrooj/utils": "workspace:*",
|
"@hydrooj/utils": "workspace:*",
|
||||||
"jsdom": "^23.1.0",
|
"jsdom": "^23.2.0",
|
||||||
"superagent-charset": "^1.2.0",
|
"superagent-charset": "^1.2.0",
|
||||||
"superagent-proxy": "^3.0.0"
|
"superagent-proxy": "^3.0.0"
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in new issue
Block a user