tods-competition-factory 1.9.1 → 1.9.3
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 +22 -25
- 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 +228 -222
- package/dist/index.mjs.map +1 -1
- package/dist/tods-competition-factory.development.cjs.js +323 -349
- 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/utilities.mjs
CHANGED
|
@@ -306,7 +306,6 @@ function handleCaughtError({
|
|
|
306
306
|
const globalState = {
|
|
307
307
|
tournamentFactoryVersion: "0.0.0",
|
|
308
308
|
timers: { default: { elapsedTime: 0 } },
|
|
309
|
-
iterators: { makeDeepCopy: 0 },
|
|
310
309
|
deepCopyAttributes: {
|
|
311
310
|
stringify: [],
|
|
312
311
|
ignore: [],
|
|
@@ -315,20 +314,6 @@ const globalState = {
|
|
|
315
314
|
deepCopy: true
|
|
316
315
|
};
|
|
317
316
|
let _globalStateProvider = syncGlobalState$1;
|
|
318
|
-
function getDevContext(contextCriteria) {
|
|
319
|
-
if (!contextCriteria || typeof contextCriteria !== "object") {
|
|
320
|
-
return globalState.devContext ?? false;
|
|
321
|
-
} else {
|
|
322
|
-
if (typeof globalState.devContext !== "object")
|
|
323
|
-
return false;
|
|
324
|
-
return Object.keys(contextCriteria).every(
|
|
325
|
-
(key) => globalState.devContext?.[key] === contextCriteria[key]
|
|
326
|
-
) && globalState.devContext;
|
|
327
|
-
}
|
|
328
|
-
}
|
|
329
|
-
function setDeepCopyIterations(value) {
|
|
330
|
-
globalState.iterators.makeDeepCopy = value;
|
|
331
|
-
}
|
|
332
317
|
function deepCopyEnabled() {
|
|
333
318
|
return {
|
|
334
319
|
enabled: globalState.deepCopy,
|
|
@@ -361,13 +346,6 @@ function makeDeepCopy(sourceObject, convertExtensions, internalUse, removeExtens
|
|
|
361
346
|
if (!deepCopy?.enabled && !internalUse || typeof sourceObject !== "object" || typeof sourceObject === "function" || sourceObject === null || typeof deepCopy?.threshold === "number" && iteration >= deepCopy.threshold) {
|
|
362
347
|
return sourceObject;
|
|
363
348
|
}
|
|
364
|
-
const devContext = getDevContext({ makeDeepCopy: true });
|
|
365
|
-
if (devContext) {
|
|
366
|
-
setDeepCopyIterations(iteration);
|
|
367
|
-
if (typeof devContext === "object" && (iteration > (devContext.iterationThreshold || 15) || devContext.firstIteration && iteration === 0) && devContext.log && (!devContext.notInternalUse || devContext.notInternalUse && !internalUse)) {
|
|
368
|
-
console.log({ devContext, iteration, internalUse }, sourceObject);
|
|
369
|
-
}
|
|
370
|
-
}
|
|
371
349
|
const targetObject = Array.isArray(sourceObject) ? [] : {};
|
|
372
350
|
const sourceObjectKeys = Object.keys(sourceObject).filter(
|
|
373
351
|
(key) => !internalUse || !ignore || Array.isArray(ignore) && !ignore.includes(key) || typeof ignore === "function" && !ignore(key)
|