tods-competition-factory 1.9.1 → 1.9.2

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.
@@ -558,7 +558,6 @@ function handleCaughtError({
558
558
  const globalState = {
559
559
  tournamentFactoryVersion: "0.0.0",
560
560
  timers: { default: { elapsedTime: 0 } },
561
- iterators: { makeDeepCopy: 0 },
562
561
  deepCopyAttributes: {
563
562
  stringify: [],
564
563
  ignore: [],
@@ -578,9 +577,6 @@ function getDevContext(contextCriteria) {
578
577
  ) && globalState.devContext;
579
578
  }
580
579
  }
581
- function setDeepCopyIterations(value) {
582
- globalState.iterators.makeDeepCopy = value;
583
- }
584
580
  function deepCopyEnabled() {
585
581
  return {
586
582
  enabled: globalState.deepCopy,
@@ -800,13 +796,6 @@ function makeDeepCopy(sourceObject, convertExtensions, internalUse, removeExtens
800
796
  if (!deepCopy?.enabled && !internalUse || typeof sourceObject !== "object" || typeof sourceObject === "function" || sourceObject === null || typeof deepCopy?.threshold === "number" && iteration >= deepCopy.threshold) {
801
797
  return sourceObject;
802
798
  }
803
- const devContext = getDevContext({ makeDeepCopy: true });
804
- if (devContext) {
805
- setDeepCopyIterations(iteration);
806
- if (typeof devContext === "object" && (iteration > (devContext.iterationThreshold || 15) || devContext.firstIteration && iteration === 0) && devContext.log && (!devContext.notInternalUse || devContext.notInternalUse && !internalUse)) {
807
- console.log({ devContext, iteration, internalUse }, sourceObject);
808
- }
809
- }
810
799
  const targetObject = Array.isArray(sourceObject) ? [] : {};
811
800
  const sourceObjectKeys = Object.keys(sourceObject).filter(
812
801
  (key) => !internalUse || !ignore || Array.isArray(ignore) && !ignore.includes(key) || typeof ignore === "function" && !ignore(key)
@@ -11736,11 +11725,10 @@ function modifyMatchUpScore({
11736
11725
  }
11737
11726
  if (Array.isArray(defaultedProcessCodes) && inContextMatchUp && !inContextMatchUp.sides?.every(({ participantId }) => participantId)) {
11738
11727
  if (matchUpStatus === DEFAULTED) {
11739
- if (matchUp.processCodes) {
11740
- matchUp.processCodes.push(...defaultedProcessCodes);
11741
- } else {
11742
- matchUp.processCodes = defaultedProcessCodes;
11743
- }
11728
+ matchUp.processCodes = unique([
11729
+ ...matchUp.processCodes ?? [],
11730
+ ...defaultedProcessCodes
11731
+ ]);
11744
11732
  } else {
11745
11733
  for (const processCode of defaultedProcessCodes || []) {
11746
11734
  const codeIndex = processCode && matchUp?.processCodes?.lastIndexOf(processCode);