bump version

This commit is contained in:
undefined committed 2023-03-03 18:19:19 +08:00
1 parent 476b17153a
commit 44a579878b
21 files changed
+58 -40

No files matched your search

+1 -1
View File
@@ -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';
+3 -3
View File
@@ -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 -2
View File
@@ -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();
+1 -1
View File
@@ -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 -1
View File
@@ -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 -1
View File
@@ -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';
+2 -2
View File
@@ -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,
+2 -3
View File
@@ -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 -1
View File
@@ -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 -2
View File
@@ -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;