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.
- package/dist/forge/generate.mjs +4 -16
- package/dist/forge/generate.mjs.map +1 -1
- package/dist/forge/query.mjs +0 -11
- package/dist/forge/query.mjs.map +1 -1
- package/dist/forge/transform.mjs +4 -16
- package/dist/forge/transform.mjs.map +1 -1
- package/dist/forge/utilities.mjs +0 -22
- package/dist/forge/utilities.mjs.map +1 -1
- package/dist/index.mjs +52 -55
- package/dist/index.mjs.map +1 -1
- package/dist/tods-competition-factory.development.cjs.js +66 -92
- 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 +7 -7
package/dist/forge/transform.mjs
CHANGED
|
@@ -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
|
-
|
|
11740
|
-
matchUp.processCodes
|
|
11741
|
-
|
|
11742
|
-
|
|
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);
|