mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
judge: add yargs to dep
This commit is contained in:
1 parent
cf6e314071
commit
aad53cf51e
2 files changed
+6
-3
No files matched your search
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@hydrooj/hydrojudge",
|
"name": "@hydrooj/hydrojudge",
|
||||||
"bin": "bin/hydrojudge.js",
|
"bin": "bin/hydrojudge.js",
|
||||||
"version": "2.1.1",
|
"version": "2.1.2",
|
||||||
"main": "package.json",
|
"main": "package.json",
|
||||||
"author": "masnn",
|
"author": "masnn",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@@ -13,7 +13,8 @@
|
|||||||
"p-queue": "^6.6.1",
|
"p-queue": "^6.6.1",
|
||||||
"shell-quote": "^1.7.2",
|
"shell-quote": "^1.7.2",
|
||||||
"supports-color": "^7.2.0",
|
"supports-color": "^7.2.0",
|
||||||
"systeminformation": "^4.27.11"
|
"systeminformation": "^4.27.11",
|
||||||
|
"yargs": "^16.1.0"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"hydrooj": "^2.13.3"
|
"hydrooj": "^2.13.3"
|
||||||
|
|||||||
@@ -7,7 +7,9 @@ import { compilerText } from './utils';
|
|||||||
export = async function compile(
|
export = async function compile(
|
||||||
lang: string, code: string, target: string, copyIn: any, next?: Function,
|
lang: string, code: string, target: string, copyIn: any, next?: Function,
|
||||||
) {
|
) {
|
||||||
const LANGS = yaml.safeLoad(await global.Hydro.model.system.get('hydrojudge.langs'));
|
const LANGS = global.Hydro
|
||||||
|
? yaml.safeLoad(await global.Hydro.model.system.get('hydrojudge.langs'))
|
||||||
|
: require('./config').LANGS;
|
||||||
if (!LANGS[lang]) throw new SystemError(`不支持的语言:${lang}`);
|
if (!LANGS[lang]) throw new SystemError(`不支持的语言:${lang}`);
|
||||||
const info = LANGS[lang];
|
const info = LANGS[lang];
|
||||||
target = info.target || target;
|
target = info.target || target;
|
||||||
|
|||||||
Reference in new issue
Block a user