bulltrackers-module 1.0.648 → 1.0.649
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.
|
@@ -196,9 +196,50 @@ class MetaExecutor {
|
|
|
196
196
|
seriesData
|
|
197
197
|
});
|
|
198
198
|
|
|
199
|
+
// DEBUG: Log dependency availability
|
|
200
|
+
const depNames = c.getDependencies ? c.getDependencies() : (c.dependencies || []);
|
|
201
|
+
depNames.forEach(depName => {
|
|
202
|
+
const depData = context.computed[depName];
|
|
203
|
+
if (depData) {
|
|
204
|
+
const keys = Object.keys(depData);
|
|
205
|
+
logger.log('INFO', `[MetaExecutor] ✅ Dependency '${depName}' available for ${c.name}. Keys: ${keys.length} (sample: ${keys.slice(0, 5).join(', ')})`);
|
|
206
|
+
} else {
|
|
207
|
+
logger.log('ERROR', `[MetaExecutor] ❌ Dependency '${depName}' MISSING for ${c.name} in context.computed`);
|
|
208
|
+
}
|
|
209
|
+
});
|
|
210
|
+
|
|
199
211
|
try {
|
|
200
212
|
const result = await inst.process(context);
|
|
201
|
-
|
|
213
|
+
|
|
214
|
+
// DEBUG: Log result before saving
|
|
215
|
+
if (result && typeof result === 'object') {
|
|
216
|
+
const resultKeys = Object.keys(result);
|
|
217
|
+
logger.log('INFO', `[MetaExecutor] ✅ ${c.name} computed result. Keys: ${resultKeys.length} (sample: ${resultKeys.slice(0, 10).join(', ')})`);
|
|
218
|
+
if (resultKeys.length === 0) {
|
|
219
|
+
logger.log('WARN', `[MetaExecutor] ⚠️ ${c.name} returned EMPTY result object!`);
|
|
220
|
+
}
|
|
221
|
+
} else {
|
|
222
|
+
logger.log('WARN', `[MetaExecutor] ⚠️ ${c.name} returned non-object result: ${typeof result} - ${result}`);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
// CRITICAL FIX: Do NOT overwrite this.results - the computation already sets it correctly
|
|
226
|
+
// The computation's process() method sets this.results, and getResult() returns it
|
|
227
|
+
// We only use the return value for logging/debugging
|
|
228
|
+
// inst.results should already be set by the computation's process() method
|
|
229
|
+
if (!inst.results) {
|
|
230
|
+
logger.log('WARN', `[MetaExecutor] ⚠️ ${c.name} did not set this.results - using return value as fallback`);
|
|
231
|
+
inst.results = result;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
// DEBUG: Verify what getResult() will return
|
|
235
|
+
const finalResult = await inst.getResult();
|
|
236
|
+
if (finalResult && typeof finalResult === 'object') {
|
|
237
|
+
const finalKeys = Object.keys(finalResult);
|
|
238
|
+
logger.log('INFO', `[MetaExecutor] ✅ ${c.name} getResult() will return ${finalKeys.length} keys`);
|
|
239
|
+
} else {
|
|
240
|
+
logger.log('WARN', `[MetaExecutor] ⚠️ ${c.name} getResult() returns: ${typeof finalResult}`);
|
|
241
|
+
}
|
|
242
|
+
|
|
202
243
|
state[c.name] = inst;
|
|
203
244
|
} catch (e) {
|
|
204
245
|
logger.log('ERROR', `Meta calc ${c.name} failed: ${e.message}`);
|