@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 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
@@ -163,6 +163,7 @@ declare class Team {
163
163
  submissions: Submissions;
164
164
  placeChartPoints: Array<PlaceChartPointData>;
165
165
  awards: MedalType[];
166
+ location?: string;
166
167
  constructor();
167
168
  reset(): void;
168
169
  get penaltyToMinute(): number;
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.15.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.15.0"
47
+ "@xcpcio/types": "0.16.0"
48
48
  },
49
49
  "devDependencies": {
50
50
  "@babel/types": "^7.22.4",
@@ -128,6 +128,7 @@ export function isPending(status: SubmissionStatus): boolean {
128
128
  const pendingArray = [
129
129
  SubmissionStatus.PENDING,
130
130
  SubmissionStatus.WAITING,
131
+ SubmissionStatus.COMPILING,
131
132
  SubmissionStatus.JUDGING,
132
133
  SubmissionStatus.FROZEN,
133
134
  ];
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