tods-competition-factory 1.6.13 → 1.6.17
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 +1 -1
- package/dist/forge/generate.mjs.map +1 -1
- package/dist/forge/query.mjs +1 -1
- package/dist/forge/query.mjs.map +1 -1
- package/dist/forge/transform.mjs +1 -1
- package/dist/forge/transform.mjs.map +1 -1
- package/dist/index.mjs +8 -4
- package/dist/index.mjs.map +1 -1
- package/dist/tods-competition-factory.development.cjs.js +13 -4
- 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 +10 -11
package/dist/index.mjs
CHANGED
|
@@ -329,7 +329,7 @@ const matchUpFormatCode = {
|
|
|
329
329
|
};
|
|
330
330
|
|
|
331
331
|
function factoryVersion() {
|
|
332
|
-
return "1.6.
|
|
332
|
+
return "1.6.17";
|
|
333
333
|
}
|
|
334
334
|
|
|
335
335
|
function getObjectTieFormat(obj) {
|
|
@@ -7653,7 +7653,7 @@ function getSide({
|
|
|
7653
7653
|
sideNumber
|
|
7654
7654
|
}) {
|
|
7655
7655
|
const assignment = positionAssignments.find(
|
|
7656
|
-
(assignment2) => assignment2.drawPosition === drawPosition
|
|
7656
|
+
(assignment2) => assignment2.drawPosition && assignment2.drawPosition === drawPosition
|
|
7657
7657
|
);
|
|
7658
7658
|
const participantId = drawPositionCollectionAssignment ? drawPositionCollectionAssignment[drawPosition]?.participantId : assignment?.participantId;
|
|
7659
7659
|
const sideValue = assignment ? getSideValue$1({
|
|
@@ -60272,15 +60272,18 @@ function generateSet({
|
|
|
60272
60272
|
function completeDrawMatchUps(params) {
|
|
60273
60273
|
const {
|
|
60274
60274
|
matchUpStatusProfile,
|
|
60275
|
+
// { matchUpStatusProfile: {} } will always return only { matchUpStatus: COMPLETED }
|
|
60275
60276
|
completeAllMatchUps,
|
|
60276
60277
|
// qualifyingProfiles, // CONSIDER: allowing completionGoal per structureProfile
|
|
60277
60278
|
randomWinningSide,
|
|
60278
60279
|
tournamentRecord,
|
|
60279
|
-
drawDefinition,
|
|
60280
60280
|
completionGoal,
|
|
60281
|
-
|
|
60281
|
+
drawDefinition,
|
|
60282
60282
|
event
|
|
60283
60283
|
} = params;
|
|
60284
|
+
if (!drawDefinition)
|
|
60285
|
+
return { error: MISSING_DRAW_DEFINITION };
|
|
60286
|
+
const matchUpFormat = params.matchUpFormat || drawDefinition.matchUpFormat || event?.matchUpFormat;
|
|
60284
60287
|
const sortedStructures = drawDefinition.structures.slice().sort(structureSort);
|
|
60285
60288
|
let completedCount = 0;
|
|
60286
60289
|
const { matchUps: firstRoundDualMatchUps, matchUpsMap } = getAllDrawMatchUps({
|
|
@@ -62510,6 +62513,7 @@ const mocksGovernor = {
|
|
|
62510
62513
|
generateOutcomeFromScoreString,
|
|
62511
62514
|
generateTournamentRecord,
|
|
62512
62515
|
generateEventWithDraw,
|
|
62516
|
+
completeDrawMatchUps,
|
|
62513
62517
|
generateParticipants,
|
|
62514
62518
|
parseScoreString,
|
|
62515
62519
|
generateOutcome,
|