-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade dependency packages and clean up code (#1348)
* Modify npmmirror.com to registry.npmjs.org * Delete useless packages * Update PATCH_UP and MINOR_UP package * Upgrade dev dependency * Upgrade node-fetch to v3. See https://www.npmjs.com/package/node-fetch#installation * Upgrade html-to-text dockerode and eslint * Upgrade graphql-request * Orgnize hasura function and COS function * Orgnize hasura function and COS function * Orgnize hasura contest function and comments for user routes * Delete outdated files * Move CompilerPayload and ServerPayload to config/contest * Modify dependency * Upgrade nodejs verison * Add auto update
- Loading branch information
Showing
28 changed files
with
3,134 additions
and
4,703 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,16 @@ | ||
{ | ||
"extends": ["config:base"], | ||
"automerge": false, | ||
"automerge": true, | ||
"timezone": "Asia/Shanghai", | ||
"schedule": "after 4am and before 8am every saturday", | ||
"lockFileMaintenance": { | ||
"enabled": true, | ||
"schedule": "after 10pm on saturday" | ||
} | ||
}, | ||
"prConcurrentLimit": 0, | ||
"prHourlyLimit": 5, | ||
"rangeStrategy": "pin", | ||
"separateMajorMinor": true, | ||
"separateMinorPatch": true, | ||
"separateMultipleMajor": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
|
||
type ContestImages = { | ||
[key: string]: { | ||
COMPILER_IMAGE: string; | ||
COMPILER_TIMEOUT: string; | ||
SERVER_IMAGE: string; | ||
CLIENT_IMAGE: string; | ||
ENVOY_IMAGE: string; | ||
RUNNER_TOKEN_TIMEOUT: string | ||
}; | ||
}; | ||
|
||
export interface TeamLabelBind { | ||
team_id: string; | ||
label: string; | ||
} | ||
|
||
export interface ContestResult { // used by server docker. | ||
status: string; // value: `Finished` or `Crashed`. | ||
scores: number[]; // order is the same as `team_label_binds`. | ||
}; | ||
|
||
export interface TeamResult { // used by backend. | ||
team_id: string; | ||
score: number; | ||
}; | ||
|
||
export interface JwtCompilerPayload { | ||
code_id: string; | ||
team_id: string; | ||
contest_name: string; | ||
cos_path: string; | ||
} | ||
|
||
export interface JwtServerPayload { | ||
contest_id: string; | ||
round_id?: string; | ||
room_id: string; | ||
team_label_binds: TeamLabelBind[]; | ||
} | ||
|
||
export const contest_image_map: ContestImages = { | ||
"THUAI6": { | ||
SERVER_IMAGE: "eesast/thuai6_run", | ||
CLIENT_IMAGE: "eesast/thuai6_run", | ||
COMPILER_IMAGE: "eesast/thuai6_cpp", | ||
ENVOY_IMAGE: "envoyproxy/envoy:dev-55a95a171c1371b2402e9c8e2092f5b0ca02462d", | ||
COMPILER_TIMEOUT: "10m", | ||
RUNNER_TOKEN_TIMEOUT: "30m", | ||
}, | ||
"THUAI7": { | ||
SERVER_IMAGE: "eesast/thuai7_run_server", | ||
CLIENT_IMAGE: "eesast/thuai7_run_client", | ||
COMPILER_IMAGE: "eesast/thuai7_cpp", | ||
ENVOY_IMAGE: "envoyproxy/envoy:dev-55a95a171c1371b2402e9c8e2092f5b0ca02462d", | ||
COMPILER_TIMEOUT: "10m", | ||
RUNNER_TOKEN_TIMEOUT: "30m" | ||
} | ||
} |
Oops, something went wrong.