tods-competition-factory 0.52.2 → 0.53.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.
@@ -3767,7 +3767,7 @@ function validateTieFormat({
3767
3767
  return false;
3768
3768
  }
3769
3769
 
3770
- if (matchUpFormat && !scoreGovernor.isValidMatchUpFormat(matchUpFormat)) {
3770
+ if (matchUpFormat && !matchUpFormatCode.isValid(matchUpFormat)) {
3771
3771
  errors.push(`Invalid matchUpFormat: ${matchUpFormat}`);
3772
3772
  return false;
3773
3773
  }
@@ -27456,7 +27456,7 @@ const scheduleGovernor$1 = {
27456
27456
  };
27457
27457
 
27458
27458
  function factoryVersion() {
27459
- return '0.52.2';
27459
+ return '0.53.0';
27460
27460
  }
27461
27461
 
27462
27462
  function attachPolicies$2({
@@ -37920,7 +37920,7 @@ const namedFormats = {
37920
37920
  singles: {
37921
37921
  matchUpCount: 6,
37922
37922
  matchUpValue: 1,
37923
- matchUpFormat: 'SET3-S:6'
37923
+ matchUpFormat: 'SET3-S:6/TB7'
37924
37924
  },
37925
37925
  tieFormatName: 'COLLEGE_JUCO',
37926
37926
  valueGoal: 5
@@ -48561,12 +48561,15 @@ function generateEventWithFlights({
48561
48561
  drawProfiles = [],
48562
48562
  eventExtensions,
48563
48563
  surfaceCategory,
48564
+ tieFormatName,
48564
48565
  discipline,
48565
48566
  eventLevel,
48566
48567
  ballType,
48567
48568
  category
48568
48569
  } = eventProfile;
48569
- const tieFormat = eventProfile.tieFormat || (eventType === TEAM$2 ? tieFormatDefaults() : undefined);
48570
+ const tieFormat = eventProfile.tieFormat || (eventType === TEAM$2 ? tieFormatDefaults({
48571
+ namedFormat: tieFormatName
48572
+ }) : undefined);
48570
48573
  let targetParticipants = tournamentRecord.participants;
48571
48574
  let uniqueDrawParticipants = [];
48572
48575
 
@@ -49354,15 +49357,15 @@ function generateTournamentRecord({
49354
49357
  const isTeam = eventType === TEAM$2;
49355
49358
 
49356
49359
  if (isTeam) {
49357
- var _tieFormat$collection;
49360
+ var _tieFormat, _tieFormat$collection;
49358
49361
 
49359
49362
  let teamDoublesCount = 0,
49360
49363
  teamSinglesCount = 0;
49361
49364
  largestTeamDraw = Math.max(largestTeamDraw, drawSize + alternatesCount);
49362
- typeof tieFormat === 'object' ? tieFormat : tieFormatDefaults({
49365
+ tieFormat = typeof tieFormat === 'object' ? tieFormat : tieFormatDefaults({
49363
49366
  namedFormat: tieFormatName
49364
49367
  });
49365
- tieFormat === null || tieFormat === void 0 ? void 0 : (_tieFormat$collection = tieFormat.collectionDefinitions) === null || _tieFormat$collection === void 0 ? void 0 : _tieFormat$collection.forEach(collectionDefinition => {
49368
+ (_tieFormat = tieFormat) === null || _tieFormat === void 0 ? void 0 : (_tieFormat$collection = _tieFormat.collectionDefinitions) === null || _tieFormat$collection === void 0 ? void 0 : _tieFormat$collection.forEach(collectionDefinition => {
49366
49369
  // ensure every collectionDefinition has a collectionId
49367
49370
  if (!collectionDefinition.collectionId) collectionDefinition.collectionId = UUID();
49368
49371
 
@@ -49386,10 +49389,14 @@ function generateTournamentRecord({
49386
49389
  if (!isDoubles && !isTeam && drawSize && drawSize > largestSinglesDraw) largestSinglesDraw = drawSize + alternatesCount;
49387
49390
  };
49388
49391
 
49389
- eventProfiles === null || eventProfiles === void 0 ? void 0 : eventProfiles.forEach(({
49390
- eventType,
49391
- drawProfiles
49392
- }) => {
49392
+ eventProfiles === null || eventProfiles === void 0 ? void 0 : eventProfiles.forEach(eventProfile => {
49393
+ const {
49394
+ tieFormatName: eventTieFormatName,
49395
+ tieFormat: eventTieFormat,
49396
+ drawProfiles,
49397
+ eventType
49398
+ } = eventProfile;
49399
+
49393
49400
  if (drawProfiles) {
49394
49401
  for (const drawProfile of drawProfiles) {
49395
49402
  const {
@@ -49399,10 +49406,10 @@ function generateTournamentRecord({
49399
49406
  tieFormatName
49400
49407
  } = drawProfile;
49401
49408
  processDrawProfile({
49409
+ tieFormatName: tieFormatName || eventTieFormatName,
49410
+ tieFormat: tieFormat || eventTieFormat,
49402
49411
  alternatesCount,
49403
- tieFormatName,
49404
49412
  eventType,
49405
- tieFormat,
49406
49413
  drawSize
49407
49414
  });
49408
49415
  }