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

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

15 lines
486 B
TypeScript
Raw Normal View History

import config from '@/config';
import { ErrorReporterProxy, ExpressionEvaluatorProxy } from 'n8n-workflow';
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,
},
});
});
};