From 41f9816767b81b5970dba7c6746594d85bdd91d5 Mon Sep 17 00:00:00 2001 From: manushak Date: Tue, 16 Jul 2024 10:50:34 +0400 Subject: [PATCH] feat(src): add logic to compose explain data when it's true --- src/if-run/index.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/if-run/index.ts b/src/if-run/index.ts index 5ffb62ded..ab4e7df01 100644 --- a/src/if-run/index.ts +++ b/src/if-run/index.ts @@ -14,6 +14,7 @@ import {debugLogger} from '../common/util/debug-logger'; import {STRINGS} from './config'; import {STRINGS as COMMON_STRINGS} from '../common/config'; +import {explain} from './lib/explain'; const {EXITING_IF, STARTING_IF} = STRINGS; const {DISCLAIMER_MESSAGE} = COMMON_STRINGS; @@ -39,6 +40,9 @@ const impactEngine = async () => { const pluginStorage = await initialize(context.initialize.plugins); const computedTree = await compute(tree, {context, pluginStorage}); const aggregatedTree = aggregate(computedTree, context.aggregation); + + envManifest.explainer && (context.explain = explain()); + await exhaust(aggregatedTree, context, outputOptions); } catch (error) { if (error instanceof Error) {