bulltrackers-module 1.0.113 → 1.0.115
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.
|
@@ -532,7 +532,20 @@ async function runUnifiedComputation(dateToProcess, calculationsToRun, passName,
|
|
|
532
532
|
|
|
533
533
|
for (const calcName in state) { // calcName is already normalized
|
|
534
534
|
const calc = state[calcName];
|
|
535
|
-
|
|
535
|
+
|
|
536
|
+
// --- START FIX ---
|
|
537
|
+
// Ensure every calc from the state has a result (null by default)
|
|
538
|
+
// This prevents the "Missing dependency" error downstream
|
|
539
|
+
// if the calculation failed to initialize.
|
|
540
|
+
passResults[calcName] = null;
|
|
541
|
+
// --- END FIX ---
|
|
542
|
+
|
|
543
|
+
if (!calc || typeof calc.getResult !== 'function') {
|
|
544
|
+
if (!calc) {
|
|
545
|
+
logger.log('WARN', `[${passName}] Skipping ${calcName} for ${dateStr} because it failed to initialize (check manifest/class).`);
|
|
546
|
+
}
|
|
547
|
+
continue; // Skip to the next calculation
|
|
548
|
+
}
|
|
536
549
|
|
|
537
550
|
const category = calc.manifest.category || 'unknown';
|
|
538
551
|
|
|
@@ -671,6 +684,14 @@ async function runMetaComputation(
|
|
|
671
684
|
const calcName = normalizeName(manifestCalc.name);
|
|
672
685
|
const category = manifestCalc.category || 'unknown';
|
|
673
686
|
const CalcClass = manifestCalc.class;
|
|
687
|
+
|
|
688
|
+
// --- START FIX ---
|
|
689
|
+
// Set a default null result. This ensures that if the
|
|
690
|
+
// calculation is skipped (due to missing deps),
|
|
691
|
+
// its *own* dependents will see a 'null' value
|
|
692
|
+
// instead of a "Missing dependency" error.
|
|
693
|
+
passResults[calcName] = null;
|
|
694
|
+
// --- END FIX ---
|
|
674
695
|
|
|
675
696
|
if (typeof CalcClass !== 'function') {
|
|
676
697
|
logger.log('ERROR', `[${passName}] Invalid class in manifest for ${calcName}. Skipping.`);
|