n8n/packages/cli/src/expression-evaluator.ts

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
487 B
TypeScript
Raw Normal View History

import { ErrorReporterProxy, ExpressionEvaluatorProxy } from 'n8n-workflow';
import config from '@/config';
export const initExpressionEvaluator = () => {
ExpressionEvaluatorProxy.setEvaluator(config.getEnv('expression.evaluator'));
ExpressionEvaluatorProxy.setDifferEnabled(config.getEnv('expression.reportDifference'));
ExpressionEvaluatorProxy.setDiffReporter((expr) => {
ErrorReporterProxy.warn('Expression difference', {
extra: {
expression: expr,
},
});
});
};