mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-03 17:07:29 -08:00
15 lines
486 B
TypeScript
15 lines
486 B
TypeScript
|
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,
|
||
|
},
|
||
|
});
|
||
|
});
|
||
|
};
|