tods-competition-factory 1.8.9 → 1.8.10
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/forge/generate.mjs +6 -15
- package/dist/forge/generate.mjs.map +1 -1
- package/dist/forge/query.d.ts +2 -2
- package/dist/forge/query.mjs +6 -15
- package/dist/forge/query.mjs.map +1 -1
- package/dist/forge/transform.mjs +2 -2
- package/dist/forge/transform.mjs.map +1 -1
- package/dist/forge/utilities.mjs.map +1 -1
- package/dist/index.mjs +7 -17
- package/dist/index.mjs.map +1 -1
- package/dist/tods-competition-factory.development.cjs.js +41 -50
- package/dist/tods-competition-factory.development.cjs.js.map +1 -1
- package/dist/tods-competition-factory.production.cjs.min.js +1 -1
- package/dist/tods-competition-factory.production.cjs.min.js.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -913,10 +913,6 @@ const INVALID_SCALE_ITEM = {
|
|
|
913
913
|
message: "Invalid scaleItem",
|
|
914
914
|
code: "ERR_INVALID_SCALE_ITEM"
|
|
915
915
|
};
|
|
916
|
-
const SCALE_ITEM_NOT_FOUND = {
|
|
917
|
-
message: "No scaleItem found",
|
|
918
|
-
code: "ERR_NOT_FOUND_SCALE_ITEM"
|
|
919
|
-
};
|
|
920
916
|
const MODIFICATIONS_FAILED = {
|
|
921
917
|
message: "Modifications failed",
|
|
922
918
|
code: "ERR_FAILURE_MODIFICATIONS"
|
|
@@ -1174,7 +1170,6 @@ const errorConditionConstants = {
|
|
|
1174
1170
|
PENALTY_NOT_FOUND,
|
|
1175
1171
|
POLICY_NOT_ATTACHED,
|
|
1176
1172
|
POLICY_NOT_FOUND,
|
|
1177
|
-
SCALE_ITEM_NOT_FOUND,
|
|
1178
1173
|
SCHEDULE_NOT_CLEARED,
|
|
1179
1174
|
SCHEDULED_MATCHUPS,
|
|
1180
1175
|
SEEDSCOUNT_GREATER_THAN_DRAW_SIZE,
|
|
@@ -2380,7 +2375,7 @@ const matchUpFormatCode = {
|
|
|
2380
2375
|
};
|
|
2381
2376
|
|
|
2382
2377
|
function factoryVersion() {
|
|
2383
|
-
return "1.8.
|
|
2378
|
+
return "1.8.10";
|
|
2384
2379
|
}
|
|
2385
2380
|
|
|
2386
2381
|
function getObjectTieFormat(obj) {
|
|
@@ -4470,7 +4465,7 @@ function getPolicyDefinitions({
|
|
|
4470
4465
|
if (policy)
|
|
4471
4466
|
policyDefinitions[policyType] = policy;
|
|
4472
4467
|
}
|
|
4473
|
-
return Object.keys(policyDefinitions).length ? { policyDefinitions } : {
|
|
4468
|
+
return Object.keys(policyDefinitions).length ? { policyDefinitions } : { info: POLICY_NOT_FOUND.message };
|
|
4474
4469
|
}
|
|
4475
4470
|
|
|
4476
4471
|
const WALKOVER$1 = "WALKOVER";
|
|
@@ -4587,7 +4582,7 @@ function findPolicy({
|
|
|
4587
4582
|
structure,
|
|
4588
4583
|
event
|
|
4589
4584
|
});
|
|
4590
|
-
return appliedPolicies?.[policyType] ? { policy: appliedPolicies[policyType] } : {
|
|
4585
|
+
return appliedPolicies?.[policyType] ? { policy: appliedPolicies[policyType] } : { info: POLICY_NOT_FOUND?.message };
|
|
4591
4586
|
}
|
|
4592
4587
|
|
|
4593
4588
|
function getMatchUpCompetitiveProfile({
|
|
@@ -26700,7 +26695,7 @@ function participantScaleItem({
|
|
|
26700
26695
|
return { error: INVALID_VALUES };
|
|
26701
26696
|
if (!participant.timeItems)
|
|
26702
26697
|
participant.timeItems = [];
|
|
26703
|
-
if (
|
|
26698
|
+
if (Array.isArray(participant.timeItems)) {
|
|
26704
26699
|
const { accessor, scaleType, eventType, scaleName } = scaleAttributes;
|
|
26705
26700
|
const filterType = [SCALE$1, scaleType, eventType, scaleName].join(".");
|
|
26706
26701
|
const filteredTimeItems = participant.timeItems.filter((timeItem2) => timeItem2?.itemType === filterType).filter((timeItem2) => !requireTimeStamp || timeItem2?.itemDate).sort(
|
|
@@ -26720,12 +26715,10 @@ function participantScaleItem({
|
|
|
26720
26715
|
scaleName: scaleName2,
|
|
26721
26716
|
scaleType: scaleType2
|
|
26722
26717
|
};
|
|
26723
|
-
return { scaleItem };
|
|
26724
|
-
} else {
|
|
26725
|
-
return { error: SCALE_ITEM_NOT_FOUND };
|
|
26718
|
+
return { ...SUCCESS, scaleItem };
|
|
26726
26719
|
}
|
|
26727
26720
|
}
|
|
26728
|
-
return {
|
|
26721
|
+
return { ...SUCCESS, scaleItem: void 0 };
|
|
26729
26722
|
}
|
|
26730
26723
|
|
|
26731
26724
|
function getEventSeedAssignments({
|
|
@@ -27188,8 +27181,6 @@ function getParticipantEntries(params) {
|
|
|
27188
27181
|
participantMap,
|
|
27189
27182
|
withPotentialMatchUps,
|
|
27190
27183
|
withRankingProfile,
|
|
27191
|
-
withScheduleTimes,
|
|
27192
|
-
withScheduleItems,
|
|
27193
27184
|
scheduleAnalysis,
|
|
27194
27185
|
withTeamMatchUps,
|
|
27195
27186
|
withStatistics,
|
|
@@ -27199,8 +27190,7 @@ function getParticipantEntries(params) {
|
|
|
27199
27190
|
withEvents,
|
|
27200
27191
|
withDraws
|
|
27201
27192
|
} = params;
|
|
27202
|
-
|
|
27203
|
-
console.log({ withScheduleItems });
|
|
27193
|
+
const withScheduleTimes = params.withScheduleTimes ?? params.withScheduleItems;
|
|
27204
27194
|
const targetParticipantIds = participantFilters?.participantIds;
|
|
27205
27195
|
const getRelevantParticipantIds = (participantId) => {
|
|
27206
27196
|
const relevantParticipantIds = [participantId];
|