update .npmignore

This commit is contained in:
undefined committed 2020-07-18 13:27:39 +08:00
1 parent 9efcdf9441
commit 9dd370fa72
4 files changed
+16 -40

No files matched your search

+12 -12
View File
@@ -1,15 +1,15 @@
node_modules
node_modules/
ui/
config.yaml
config.json
docker-compose.yml
Dockerfile
.cache/
*.cache
__*
*.log
*.hydro
locales
templates
wiki
.vscode
.github
public/
templates
ui
locales
module
hydro
build
tool
.build/install.js
examples
+2 -25
View File
@@ -13,31 +13,10 @@ import {
Route, Handler, Connection, ConnectionHandler, Types, param,
} from '../service/server';
interface _PostJudgeBody {
status: number,
domainId: string,
uid: number,
_id: ObjectID,
pid: number,
score: number,
rejudged: boolean,
}
interface PostJudgeBodyContest extends _PostJudgeBody {
tid: ObjectID,
ttype: number,
}
type PostJudgeBody = _PostJudgeBody | PostJudgeBodyContest;
function _isWithContest(v: PostJudgeBody): v is PostJudgeBodyContest {
return !!((v as PostJudgeBodyContest).tid);
}
async function _postJudge(rdoc: PostJudgeBody) {
async function _postJudge(rdoc: Rdoc) {
const accept = rdoc.status === builtin.STATUS.STATUS_ACCEPTED;
const tasks = [];
if (_isWithContest(rdoc)) {
if (rdoc.tid) {
tasks.push(
contest.updateStatus(
rdoc.domainId, rdoc.tid, rdoc.uid,
@@ -58,7 +37,6 @@ async function _postJudge(rdoc: PostJudgeBody) {
export async function next(body: JudgeResultBody) {
if (body.rid) body.rid = new ObjectID(body.rid);
if (body.tid) body.tid = new ObjectID(body.tid);
let rdoc = await record.get(body.domainId, body.rid);
const $set: any = {};
const $push: any = {};
@@ -90,7 +68,6 @@ export async function next(body: JudgeResultBody) {
export async function end(body: JudgeResultBody) {
if (body.rid) body.rid = new ObjectID(body.rid);
if (body.tid) body.tid = new ObjectID(body.tid);
let rdoc = await record.get(body.domainId, body.rid);
const $set: any = {};
const $push: any = {};
-1
View File
@@ -203,7 +203,6 @@ export interface JudgeResultBody {
domainId: string,
rid: ObjectID,
judger?: number,
tid?: ObjectID,
progress?: number
case?: {
status: number,
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "hydrooj",
"version": "2.8.2",
"version": "2.8.5",
"main": "hydro/loader.ts",
"repository": "https://github.com/hydro-dev/Hydro.git",
"author": "masnn",
@@ -96,4 +96,4 @@
]
},
"snyk": true
}
}