@xcpcio/core 0.15.0 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +4 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.mjs +4 -0
- package/package.json +2 -2
- package/src/submission-status.ts +1 -0
- package/src/team.ts +6 -0
package/dist/index.cjs
CHANGED
|
@@ -141,6 +141,7 @@ function isPending(status) {
|
|
|
141
141
|
const pendingArray = [
|
|
142
142
|
types.SubmissionStatus.PENDING,
|
|
143
143
|
types.SubmissionStatus.WAITING,
|
|
144
|
+
types.SubmissionStatus.COMPILING,
|
|
144
145
|
types.SubmissionStatus.JUDGING,
|
|
145
146
|
types.SubmissionStatus.FROZEN
|
|
146
147
|
];
|
|
@@ -994,6 +995,9 @@ function createTeam(teamJSON) {
|
|
|
994
995
|
}
|
|
995
996
|
t.group = [...new Set(t.group)];
|
|
996
997
|
t.group.sort();
|
|
998
|
+
if (teamJSON.location) {
|
|
999
|
+
t.location = teamJSON.location;
|
|
1000
|
+
}
|
|
997
1001
|
return t;
|
|
998
1002
|
}
|
|
999
1003
|
function createTeams(teamsJSON) {
|
package/dist/index.d.ts
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -111,6 +111,7 @@ function isPending(status) {
|
|
|
111
111
|
const pendingArray = [
|
|
112
112
|
SubmissionStatus.PENDING,
|
|
113
113
|
SubmissionStatus.WAITING,
|
|
114
|
+
SubmissionStatus.COMPILING,
|
|
114
115
|
SubmissionStatus.JUDGING,
|
|
115
116
|
SubmissionStatus.FROZEN
|
|
116
117
|
];
|
|
@@ -964,6 +965,9 @@ function createTeam(teamJSON) {
|
|
|
964
965
|
}
|
|
965
966
|
t.group = [...new Set(t.group)];
|
|
966
967
|
t.group.sort();
|
|
968
|
+
if (teamJSON.location) {
|
|
969
|
+
t.location = teamJSON.location;
|
|
970
|
+
}
|
|
967
971
|
return t;
|
|
968
972
|
}
|
|
969
973
|
function createTeams(teamsJSON) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xcpcio/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0",
|
|
4
4
|
"description": "XCPCIO Core",
|
|
5
5
|
"author": "Dup4 <lyuzhi.pan@gmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"lodash": "^4.17.21",
|
|
45
45
|
"string-width": "^6.1.0",
|
|
46
46
|
"xlsx-js-style": "^1.2.0",
|
|
47
|
-
"@xcpcio/types": "0.
|
|
47
|
+
"@xcpcio/types": "0.16.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@babel/types": "^7.22.4",
|
package/src/submission-status.ts
CHANGED
package/src/team.ts
CHANGED
|
@@ -51,6 +51,8 @@ export class Team {
|
|
|
51
51
|
|
|
52
52
|
awards: MedalType[];
|
|
53
53
|
|
|
54
|
+
location?: string;
|
|
55
|
+
|
|
54
56
|
constructor() {
|
|
55
57
|
this.id = "";
|
|
56
58
|
this.name = "";
|
|
@@ -244,6 +246,10 @@ export function createTeam(teamJSON: ITeam): Team {
|
|
|
244
246
|
t.group = [...new Set(t.group)];
|
|
245
247
|
t.group.sort();
|
|
246
248
|
|
|
249
|
+
if (teamJSON.location) {
|
|
250
|
+
t.location = teamJSON.location;
|
|
251
|
+
}
|
|
252
|
+
|
|
247
253
|
return t;
|
|
248
254
|
}
|
|
249
255
|
|