tods-competition-factory 1.6.30 → 1.7.1

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.mjs CHANGED
@@ -308,11 +308,15 @@ function isValid(matchUpFormat) {
308
308
  if (typeof matchUpFormat !== "string")
309
309
  return false;
310
310
  const parsedFormat = parse(matchUpFormat);
311
- const setParts = matchUpFormat.match(/-S:(\d+)+\/TB(\d+)@?(\d*)*/);
311
+ const setParts = matchUpFormat.match(
312
+ /-S:([1-9])+\/TB([0-9]{1,2})@?([1-9]?)*/
313
+ );
312
314
  const setsTo = setParts?.[1];
313
315
  const tiebreakTo = setParts?.[2];
314
316
  const tiebreakAt = setParts?.[3];
315
- const finalSetParts = matchUpFormat.match(/-F:(\d+)+\/TB(\d+)@?(\d*)*/);
317
+ const finalSetParts = matchUpFormat.match(
318
+ /-F:([1-9])+\/TB([0-9]{1,2})@?([1-9]?)*/
319
+ );
316
320
  const finalSetTo = finalSetParts?.[1];
317
321
  const finalSetTiebreakTo = finalSetParts?.[2];
318
322
  const finalTiebreakAt = finalSetParts?.[3];
@@ -329,7 +333,7 @@ const matchUpFormatCode = {
329
333
  };
330
334
 
331
335
  function factoryVersion() {
332
- return "1.6.30";
336
+ return "1.7.1";
333
337
  }
334
338
 
335
339
  function getObjectTieFormat(obj) {
@@ -60522,7 +60526,7 @@ function anonymizeTournamentRecord({
60522
60526
  idMap[tournamentRecord.tournamentId] = newTournamentId;
60523
60527
  tournamentRecord.tournamentId = newTournamentId;
60524
60528
  tournamentRecord.createdAt = (/* @__PURE__ */ new Date()).toISOString();
60525
- tournamentRecord.tournamentName = tournamentName || `Anonymized: ${formatDate( new Date())}`;
60529
+ tournamentRecord.tournamentName = tournamentName || `Anonymized: ${formatDate(/* @__PURE__ */ new Date())}`;
60526
60530
  delete tournamentRecord.parentOrganisation;
60527
60531
  for (const participant of tournamentRecord.participants || []) {
60528
60532
  const newParticipantId = UUID();