Skip to content

Commit

Permalink
feat(src): add logic to compose explain data when it's true
Browse files Browse the repository at this point in the history
  • Loading branch information
manushak committed Jul 16, 2024
1 parent 3a9023a commit 41f9816
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/if-run/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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) {
Expand Down

0 comments on commit 41f9816

Please sign in to comment.