mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
bump version
This commit is contained in:
21 files changed
+58
-40
No files matched your search
@@ -1,14 +1,13 @@
|
||||
{
|
||||
"name": "@hydrooj/hydrojudge",
|
||||
"bin": "bin/hydrojudge.js",
|
||||
"version": "3.1.18",
|
||||
"version": "3.1.19",
|
||||
"main": "package.json",
|
||||
"author": "undefined <i@undefined.moe>",
|
||||
"repository": "https://github.com/hydro-dev/Hydro.git",
|
||||
"dependencies": {
|
||||
"@hydrooj/utils": "workspace:*",
|
||||
"cac": "^6.7.14",
|
||||
"fs-extra": "^11.1.0",
|
||||
"mongodb": "^5.1.0",
|
||||
"p-queue": "^7.3.4",
|
||||
"schemastery": "^3.7.1",
|
||||
@@ -19,7 +18,6 @@
|
||||
"preferUnplugged": true,
|
||||
"license": "AGPL-3.0-or-later",
|
||||
"devDependencies": {
|
||||
"@types/fs-extra": "^11.0.1",
|
||||
"@types/shell-quote": "^1.7.1",
|
||||
"@types/ws": "^8.5.4"
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ import './utils';
|
||||
|
||||
import path from 'path';
|
||||
import cac from 'cac';
|
||||
import fs from 'fs-extra';
|
||||
import { fs } from '@hydrooj/utils';
|
||||
import { getConfig } from './config';
|
||||
import { Logger } from './log';
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/* eslint-disable no-await-in-loop */
|
||||
import path from 'path';
|
||||
import fs from 'fs-extra';
|
||||
import {
|
||||
changeErrorType, fs, normalizeSubtasks, readSubtasksFromFiles, yaml,
|
||||
} from '@hydrooj/utils';
|
||||
import readYamlCases, { convertIniConfig } from '@hydrooj/utils/lib/cases';
|
||||
import { normalizeSubtasks, readSubtasksFromFiles } from '@hydrooj/utils/lib/common';
|
||||
import { changeErrorType, yaml } from '@hydrooj/utils/lib/utils';
|
||||
import { ProblemConfigFile } from 'hydrooj';
|
||||
import { getConfig } from './config';
|
||||
import { FormatError, SystemError } from './error';
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
import os from 'os';
|
||||
import path from 'path';
|
||||
import cac from 'cac';
|
||||
import fs from 'fs-extra';
|
||||
import Schema from 'schemastery';
|
||||
import { yaml } from '@hydrooj/utils';
|
||||
import { fs, yaml } from '@hydrooj/utils';
|
||||
|
||||
const argv = cac().parse();
|
||||
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
~ */
|
||||
import './utils';
|
||||
|
||||
import fs from 'fs-extra';
|
||||
import PQueue from 'p-queue';
|
||||
import { fs } from '@hydrooj/utils';
|
||||
import { getConfig } from './config';
|
||||
import HydroHost from './hosts/hydro';
|
||||
import log from './log';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Hydro Integration
|
||||
/* eslint-disable no-await-in-loop */
|
||||
import path from 'path';
|
||||
import fs from 'fs-extra';
|
||||
import { fs } from '@hydrooj/utils';
|
||||
import {
|
||||
JudgeResultBody, RecordModel, SettingModel,
|
||||
StorageModel, SystemModel, TaskModel,
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
/* eslint-disable no-await-in-loop */
|
||||
import path from 'path';
|
||||
import fs from 'fs-extra';
|
||||
import { ObjectId } from 'mongodb';
|
||||
import PQueue from 'p-queue';
|
||||
import superagent from 'superagent';
|
||||
import WebSocket from 'ws';
|
||||
import { fs } from '@hydrooj/utils';
|
||||
import { LangConfig } from '@hydrooj/utils/lib/lang';
|
||||
import * as sysinfo from '@hydrooj/utils/lib/sysinfo';
|
||||
import type { JudgeResultBody } from 'hydrooj';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* eslint-disable no-sequences */
|
||||
import { unlinkSync } from 'fs';
|
||||
import { basename } from 'path';
|
||||
import { fs } from '@hydrooj/utils';
|
||||
import { STATUS } from '@hydrooj/utils/lib/status';
|
||||
import checkers from '../checkers';
|
||||
import compile, { compileChecker, compileValidator } from '../compile';
|
||||
@@ -26,7 +26,7 @@ export async function judge(ctx: Context) {
|
||||
compileValidator(session.getLang, config.validator, judgeExtraFiles).then(markCleanup),
|
||||
ctx.session.fetchFile(ctx.files.hack),
|
||||
]);
|
||||
ctx.clean.push(async () => unlinkSync(input));
|
||||
ctx.clean.push(() => fs.unlink(input));
|
||||
ctx.next({ status: STATUS.STATUS_JUDGING, progress: 0 });
|
||||
const validateResult = await run(
|
||||
validator.execute,
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import assert from 'assert';
|
||||
import { readFile } from 'fs-extra';
|
||||
import { yaml } from '@hydrooj/utils';
|
||||
import { fs, yaml } from '@hydrooj/utils';
|
||||
import { STATUS } from '@hydrooj/utils/lib/status';
|
||||
import { FormatError } from '../error';
|
||||
import { Context } from './interface';
|
||||
@@ -10,7 +9,7 @@ export async function judge({
|
||||
}: Context) {
|
||||
next({ status: STATUS.STATUS_JUDGING, progress: 0 });
|
||||
const answer = ('src' in code)
|
||||
? await readFile(code.src, 'utf-8')
|
||||
? await fs.readFile(code.src, 'utf-8')
|
||||
: ('content' in code)
|
||||
? code.content.toString().replace(/\r/g, '')
|
||||
: '';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { basename } from 'path';
|
||||
import { readFile } from 'fs-extra';
|
||||
import { fs } from '@hydrooj/utils';
|
||||
import { STATUS } from '@hydrooj/utils/lib/status';
|
||||
import checkers from '../checkers';
|
||||
import { compileChecker } from '../compile';
|
||||
@@ -13,7 +13,7 @@ function judgeCase(c: NormalizedCase) {
|
||||
const chars = /[a-zA-Z0-9_.-]/;
|
||||
const name = (ctx.config.filename && /^[a-zA-Z0-9-_#.]+$/.test(ctx.config.filename))
|
||||
? ctx.config.filename.replace('#', c.id.toString())
|
||||
: await readFile(c.input, 'utf-8').then((res) => res.trim().split('').filter((i) => chars.test(i)).join(''));
|
||||
: await fs.readFile(c.input, 'utf-8').then((res) => res.trim().split('').filter((i) => chars.test(i)).join(''));
|
||||
let file = ctx.code;
|
||||
let status = STATUS.STATUS_ACCEPTED;
|
||||
let message: any = '';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import fs from 'fs-extra';
|
||||
import { fs } from '@hydrooj/utils';
|
||||
import { LangConfig } from '@hydrooj/utils/lib/lang';
|
||||
import { STATUS } from '@hydrooj/utils/lib/status';
|
||||
import type {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import path from 'path';
|
||||
import fs from 'fs-extra';
|
||||
import { parse } from 'shell-quote';
|
||||
import { sleep } from '@hydrooj/utils/lib/utils';
|
||||
import { fs, sleep } from '@hydrooj/utils';
|
||||
import { FormatError } from './error';
|
||||
|
||||
const EMPTY_STR = /^[ \r\n\t]*$/i;
|
||||
|
||||
Reference in new issue
Block a user