tods-competition-factory 1.7.12 → 1.7.14
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 +11 -9
- package/dist/forge/generate.mjs.map +1 -1
- package/dist/forge/query.d.ts +2 -1
- package/dist/forge/query.mjs +8 -7
- package/dist/forge/query.mjs.map +1 -1
- package/dist/forge/transform.mjs +6 -5
- package/dist/forge/transform.mjs.map +1 -1
- package/dist/index.mjs +614 -321
- package/dist/index.mjs.map +1 -1
- package/dist/tods-competition-factory.development.cjs.js +619 -320
- 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 +4 -4
package/dist/forge/query.d.ts
CHANGED
|
@@ -1691,12 +1691,13 @@ type FindMatchUpType = {
|
|
|
1691
1691
|
drawId?: string;
|
|
1692
1692
|
event?: Event;
|
|
1693
1693
|
};
|
|
1694
|
-
|
|
1694
|
+
type FindMatchUpResult = {
|
|
1695
1695
|
drawDefinition?: DrawDefinition;
|
|
1696
1696
|
matchUp?: HydratedMatchUp;
|
|
1697
1697
|
structure?: Structure;
|
|
1698
1698
|
error?: ErrorType;
|
|
1699
1699
|
};
|
|
1700
|
+
declare function findMatchUp({ participantsProfile, afterRecoveryTimes, tournamentRecord, contextContent, contextProfile, drawDefinition, matchUpId, inContext, eventId, drawId, event, }: FindMatchUpType): FindMatchUpResult;
|
|
1700
1701
|
|
|
1701
1702
|
type GetPositionAssignmentsArgs = {
|
|
1702
1703
|
structureId?: string;
|
package/dist/forge/query.mjs
CHANGED
|
@@ -1053,8 +1053,9 @@ function decorateResult({
|
|
|
1053
1053
|
if (result && Array.isArray(result?.stack) && typeof stack === "string") {
|
|
1054
1054
|
result.stack.push(stack);
|
|
1055
1055
|
}
|
|
1056
|
-
if (
|
|
1057
|
-
result.
|
|
1056
|
+
if (result && info) {
|
|
1057
|
+
result.info = info;
|
|
1058
|
+
}
|
|
1058
1059
|
if (result && typeof context === "object" && Object.keys(context).length) {
|
|
1059
1060
|
Object.assign(result, definedAttributes(context));
|
|
1060
1061
|
}
|
|
@@ -8496,7 +8497,7 @@ function findMatchUp({
|
|
|
8496
8497
|
if (typeof matchUpId !== "string")
|
|
8497
8498
|
return { error: MISSING_MATCHUP_ID };
|
|
8498
8499
|
if (!drawDefinition || !event) {
|
|
8499
|
-
const matchUps = allTournamentMatchUps({ tournamentRecord }).matchUps
|
|
8500
|
+
const matchUps = allTournamentMatchUps({ tournamentRecord }).matchUps ?? [];
|
|
8500
8501
|
const inContextMatchUp = matchUps.find(
|
|
8501
8502
|
(matchUp2) => matchUp2.matchUpId === matchUpId
|
|
8502
8503
|
);
|
|
@@ -8514,11 +8515,11 @@ function findMatchUp({
|
|
|
8514
8515
|
if (contextProfile && !contextContent)
|
|
8515
8516
|
contextContent = getContextContent({ tournamentRecord, contextProfile });
|
|
8516
8517
|
const additionalContext = {
|
|
8517
|
-
surfaceCategory: event?.surfaceCategory
|
|
8518
|
-
indoorOutDoor: event?.indoorOutdoor
|
|
8519
|
-
endDate: event?.endDate
|
|
8518
|
+
surfaceCategory: event?.surfaceCategory ?? tournamentRecord.surfaceCategory,
|
|
8519
|
+
indoorOutDoor: event?.indoorOutdoor ?? tournamentRecord.indoorOutdoor,
|
|
8520
|
+
endDate: event?.endDate ?? tournamentRecord.endDate,
|
|
8520
8521
|
tournamentId: tournamentRecord.tournamentId,
|
|
8521
|
-
eventId: eventId
|
|
8522
|
+
eventId: eventId ?? event?.eventId,
|
|
8522
8523
|
drawId
|
|
8523
8524
|
};
|
|
8524
8525
|
const { participants: tournamentParticipants = [] } = hydrateParticipants({
|