mirror of
https://github.com/n8n-io/n8n.git
synced 2026-11-04 07:06:14 +08:00
16 lines
546 B
TypeScript
16 lines
546 B
TypeScript
import type { INodeTypeDescription } from 'n8n-workflow';
|
|
|
|
import type { SimpleWorkflow } from '@/types';
|
|
import { validateParameters } from '@/validation/checks';
|
|
import type { SingleEvaluatorResult } from '@/validation/types';
|
|
|
|
import { calcSingleEvaluatorScore } from '../score';
|
|
|
|
export function evaluateParameters(
|
|
workflow: SimpleWorkflow,
|
|
nodeTypes: INodeTypeDescription[],
|
|
): SingleEvaluatorResult {
|
|
const violations = validateParameters(workflow, nodeTypes);
|
|
return { violations, score: calcSingleEvaluatorScore({ violations }) };
|
|
}
|