mirror of
https://github.com/czlonkowski/n8n-mcp.git
synced 2026-02-06 05:23:08 +00:00
Added: - Support for all 12 _cnd operators in displayOptions validation (eq, not, gte, lte, gt, lt, between, startsWith, endsWith, includes, regex, exists) - Version-based visibility checking with @version in config - 42 new unit tests for _cnd operators Fixed: - n8n 2.0+ breaking change: executeWorkflowTrigger now recognized as activatable trigger - Removed outdated validation blocking Execute Workflow Trigger workflows 🤖 Generated with [Claude Code](https://claude.com/claude-code) Conceived by Romuald Członkowski - https://www.aiadvisors.pl/en Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
49 lines
1.8 KiB
TypeScript
49 lines
1.8 KiB
TypeScript
export interface ValidationResult {
|
|
valid: boolean;
|
|
errors: ValidationError[];
|
|
warnings: ValidationWarning[];
|
|
suggestions: string[];
|
|
visibleProperties: string[];
|
|
hiddenProperties: string[];
|
|
autofix?: Record<string, any>;
|
|
}
|
|
export interface ValidationError {
|
|
type: 'missing_required' | 'invalid_type' | 'invalid_value' | 'incompatible' | 'invalid_configuration' | 'syntax_error';
|
|
property: string;
|
|
message: string;
|
|
fix?: string;
|
|
suggestion?: string;
|
|
}
|
|
export interface ValidationWarning {
|
|
type: 'missing_common' | 'deprecated' | 'inefficient' | 'security' | 'best_practice' | 'invalid_value';
|
|
property?: string;
|
|
message: string;
|
|
suggestion?: string;
|
|
}
|
|
export declare class ConfigValidator {
|
|
private static readonly UI_ONLY_TYPES;
|
|
static validate(nodeType: string, config: Record<string, any>, properties: any[], userProvidedKeys?: Set<string>): ValidationResult;
|
|
static validateBatch(configs: Array<{
|
|
nodeType: string;
|
|
config: Record<string, any>;
|
|
properties: any[];
|
|
}>): ValidationResult[];
|
|
private static checkRequiredProperties;
|
|
private static getPropertyVisibility;
|
|
private static evaluateCondition;
|
|
private static valueMatches;
|
|
static isPropertyVisible(prop: any, config: Record<string, any>): boolean;
|
|
private static validatePropertyTypes;
|
|
private static performNodeSpecificValidation;
|
|
private static validateHttpRequest;
|
|
private static validateWebhook;
|
|
private static validateDatabase;
|
|
private static validateCode;
|
|
private static checkCommonIssues;
|
|
private static performSecurityChecks;
|
|
private static getVisibilityRequirement;
|
|
private static validateJavaScriptSyntax;
|
|
private static validatePythonSyntax;
|
|
private static validateN8nCodePatterns;
|
|
}
|
|
//# sourceMappingURL=config-validator.d.ts.map
|