mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
utils: update parser
This commit is contained in:
1 parent
928a7f1f68
commit
be1e10d38e
5 files changed
+6
-5
No files matched your search
@@ -24,7 +24,7 @@ jobs:
|
|||||||
node-version: 14.x
|
node-version: 14.x
|
||||||
- name: Config
|
- name: Config
|
||||||
run: |
|
run: |
|
||||||
[[ ! -z $(${{secrets.NPM_TOKEN}}) ]] && echo "npmAuthToken: ${{secrets.NPM_TOKEN}}" >> .yarnrc.yml
|
[[ ! -z "${{secrets.NPM_TOKEN}}" ]] && echo "npmAuthToken: ${{secrets.NPM_TOKEN}}" >> .yarnrc.yml
|
||||||
git config --global user.name undefined
|
git config --global user.name undefined
|
||||||
git config --global user.email i@undefined.moe
|
git config --global user.email i@undefined.moe
|
||||||
- name: Install
|
- name: Install
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "hydrooj",
|
"name": "hydrooj",
|
||||||
"version": "2.28.9",
|
"version": "2.28.10",
|
||||||
"bin": "bin/hydrooj.js",
|
"bin": "bin/hydrooj.js",
|
||||||
"main": "dist/loader.js",
|
"main": "dist/loader.js",
|
||||||
"typings": "dist/loader.d.ts",
|
"typings": "dist/loader.d.ts",
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
},
|
},
|
||||||
"preferUnplugged": true,
|
"preferUnplugged": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@hydrooj/utils": "^1.0.17",
|
"@hydrooj/utils": "^1.0.19",
|
||||||
"adm-zip": "^0.5.5",
|
"adm-zip": "^0.5.5",
|
||||||
"ansi_up": "^5.0.1",
|
"ansi_up": "^5.0.1",
|
||||||
"cac": "^6.7.3",
|
"cac": "^6.7.3",
|
||||||
|
|||||||
@@ -126,6 +126,7 @@ export enum ProblemType {
|
|||||||
Default = 'default',
|
Default = 'default',
|
||||||
SubmitAnswer = 'submit_answer',
|
SubmitAnswer = 'submit_answer',
|
||||||
Interactive = 'interactive',
|
Interactive = 'interactive',
|
||||||
|
Subjective = 'subjective',
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum SubtaskType {
|
export enum SubtaskType {
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ export default async function readYamlCases(cfg: Record<string, any> = {}, check
|
|||||||
} else throw new Error('Invalid user_extra_files config.');
|
} else throw new Error('Invalid user_extra_files config.');
|
||||||
}
|
}
|
||||||
if (cfg.outputs) {
|
if (cfg.outputs) {
|
||||||
config.type = 'submit_answer';
|
config.type = 'subjective';
|
||||||
} else if (cfg.cases?.length) {
|
} else if (cfg.cases?.length) {
|
||||||
config.subtasks = [{
|
config.subtasks = [{
|
||||||
score: +cfg.score || Math.floor(100 / cfg.cases.length),
|
score: +cfg.score || Math.floor(100 / cfg.cases.length),
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@hydrooj/utils",
|
"name": "@hydrooj/utils",
|
||||||
"version": "1.0.18",
|
"version": "1.0.19",
|
||||||
"description": "hydrooj utils",
|
"description": "hydrooj utils",
|
||||||
"main": "package.json",
|
"main": "package.json",
|
||||||
"repository": "https://github.com/hydro-dev/Hydro.git",
|
"repository": "https://github.com/hydro-dev/Hydro.git",
|
||||||
|
|||||||
Reference in new issue
Block a user