@xcpcio/core 0.50.1 → 0.50.3
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 +3 -3
- package/dist/index.mjs +3 -3
- package/package.json +2 -2
- package/src/submission.ts +1 -1
- package/src/team.ts +4 -2
package/dist/index.cjs
CHANGED
|
@@ -1244,8 +1244,8 @@ function createTeam(teamJSON) {
|
|
|
1244
1244
|
t.name = teamJSON.name ?? teamJSON.team_name ?? "";
|
|
1245
1245
|
t.organization = teamJSON.organization ?? "";
|
|
1246
1246
|
t.badge = teamJSON.badge;
|
|
1247
|
-
t.group = teamJSON.group ?? [];
|
|
1248
|
-
t.tag = teamJSON.
|
|
1247
|
+
t.group = ___default.cloneDeep(teamJSON.group ?? []);
|
|
1248
|
+
t.tag = ___default.cloneDeep(teamJSON.tag ?? []);
|
|
1249
1249
|
t.coach = teamJSON.coach;
|
|
1250
1250
|
t.members = teamJSON.members;
|
|
1251
1251
|
if (Boolean(teamJSON.official) === true) {
|
|
@@ -1346,7 +1346,7 @@ class Submission {
|
|
|
1346
1346
|
get timestampDisplayFormatWithMilliSecond() {
|
|
1347
1347
|
let res = this.timestampDisplayFormatWithSecond;
|
|
1348
1348
|
if (this.timestampUnit === "millisecond") {
|
|
1349
|
-
const fl = (this.timestamp % 1e3).toString().
|
|
1349
|
+
const fl = (this.timestamp % 1e3).toString().padStart(3, "0");
|
|
1350
1350
|
res += `.${fl}`;
|
|
1351
1351
|
}
|
|
1352
1352
|
return res;
|
package/dist/index.mjs
CHANGED
|
@@ -1211,8 +1211,8 @@ function createTeam(teamJSON) {
|
|
|
1211
1211
|
t.name = teamJSON.name ?? teamJSON.team_name ?? "";
|
|
1212
1212
|
t.organization = teamJSON.organization ?? "";
|
|
1213
1213
|
t.badge = teamJSON.badge;
|
|
1214
|
-
t.group = teamJSON.group ?? [];
|
|
1215
|
-
t.tag = teamJSON.
|
|
1214
|
+
t.group = _.cloneDeep(teamJSON.group ?? []);
|
|
1215
|
+
t.tag = _.cloneDeep(teamJSON.tag ?? []);
|
|
1216
1216
|
t.coach = teamJSON.coach;
|
|
1217
1217
|
t.members = teamJSON.members;
|
|
1218
1218
|
if (Boolean(teamJSON.official) === true) {
|
|
@@ -1313,7 +1313,7 @@ class Submission {
|
|
|
1313
1313
|
get timestampDisplayFormatWithMilliSecond() {
|
|
1314
1314
|
let res = this.timestampDisplayFormatWithSecond;
|
|
1315
1315
|
if (this.timestampUnit === "millisecond") {
|
|
1316
|
-
const fl = (this.timestamp % 1e3).toString().
|
|
1316
|
+
const fl = (this.timestamp % 1e3).toString().padStart(3, "0");
|
|
1317
1317
|
res += `.${fl}`;
|
|
1318
1318
|
}
|
|
1319
1319
|
return res;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xcpcio/core",
|
|
3
|
-
"version": "0.50.
|
|
3
|
+
"version": "0.50.3",
|
|
4
4
|
"description": "XCPCIO Core",
|
|
5
5
|
"author": "Dup4 <lyuzhi.pan@gmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"papaparse": "^5.4.1",
|
|
50
50
|
"string-width": "^6.1.0",
|
|
51
51
|
"xlsx-js-style": "^1.2.0",
|
|
52
|
-
"@xcpcio/types": "0.50.
|
|
52
|
+
"@xcpcio/types": "0.50.3"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@babel/types": "^7.22.4",
|
package/src/submission.ts
CHANGED
|
@@ -98,7 +98,7 @@ export class Submission {
|
|
|
98
98
|
let res = this.timestampDisplayFormatWithSecond;
|
|
99
99
|
|
|
100
100
|
if (this.timestampUnit === "millisecond") {
|
|
101
|
-
const fl = (this.timestamp % 1000).toString().
|
|
101
|
+
const fl = (this.timestamp % 1000).toString().padStart(3, "0");
|
|
102
102
|
res += `.${fl}`;
|
|
103
103
|
}
|
|
104
104
|
|
package/src/team.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import _ from "lodash";
|
|
2
|
+
|
|
1
3
|
import type { Team as ITeam, Teams as ITeams, Image } from "@xcpcio/types";
|
|
2
4
|
|
|
3
5
|
import type { Problem, TeamProblemStatistics } from "./problem";
|
|
@@ -284,8 +286,8 @@ export function createTeam(teamJSON: ITeam): Team {
|
|
|
284
286
|
t.organization = teamJSON.organization ?? "";
|
|
285
287
|
t.badge = teamJSON.badge;
|
|
286
288
|
|
|
287
|
-
t.group = teamJSON.group ?? [];
|
|
288
|
-
t.tag = teamJSON.
|
|
289
|
+
t.group = _.cloneDeep(teamJSON.group ?? []);
|
|
290
|
+
t.tag = _.cloneDeep(teamJSON.tag ?? []);
|
|
289
291
|
|
|
290
292
|
t.coach = teamJSON.coach;
|
|
291
293
|
t.members = teamJSON.members;
|