mirror of
https://github.com/czlonkowski/n8n-mcp.git
synced 2026-03-23 02:43:08 +00:00
feat: n8n_deploy_template deploy-first with auto-fix (v2.27.2) (#457)
* feat: n8n_deploy_template deploy-first with auto-fix (v2.27.2) Improved template deployment to deploy first, then automatically fix common issues. This dramatically improves deployment success rates for templates with expression format issues. Key Changes: - Deploy-first behavior: templates deployed before validation - Auto-fix runs automatically after deployment (configurable via `autoFix`) - Returns `fixesApplied` array showing all corrections made - Fixed expression validator "nested expressions" false positive - Fixed Zod schema missing `typeversion-upgrade` and `version-migration` fix types Testing: 87% deployment success rate across 15 diverse templates 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> Conceived by Romuald Członkowski - https://www.aiadvisors.pl/en * fix: address code review findings for deploy template Code review fixes: - CRITICAL: Update test schema to use `autoFix` instead of old `validate` parameter - WARNING: Add `AppliedFix` and `AutofixResultData` interfaces for type safety - WARNING: Add `autoFixStatus` field to response (success/failed/skipped) - WARNING: Report auto-fix failure in response message Changes: - tests/unit/mcp/handlers-deploy-template.test.ts: Fixed schema and test cases - src/mcp/handlers-n8n-manager.ts: Added type definitions, autoFixStatus tracking - src/mcp/tool-docs/workflow_management/n8n-deploy-template.ts: Updated docs 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
committed by
GitHub
parent
7d9b456887
commit
ddf9556759
@@ -97,12 +97,12 @@ export class ExpressionValidator {
|
||||
errors.push('Unmatched expression brackets {{ }}');
|
||||
}
|
||||
|
||||
// Check for nested expressions (not supported in n8n)
|
||||
if (expression.includes('{{') && expression.includes('{{', expression.indexOf('{{') + 2)) {
|
||||
const match = expression.match(/\{\{.*\{\{/);
|
||||
if (match) {
|
||||
errors.push('Nested expressions are not supported');
|
||||
}
|
||||
// Check for truly nested expressions (not supported in n8n)
|
||||
// This means {{ inside another {{ }}, like {{ {{ $json }} }}
|
||||
// NOT multiple expressions like {{ $json.a }} text {{ $json.b }} (which is valid)
|
||||
const nestedPattern = /\{\{[^}]*\{\{/;
|
||||
if (nestedPattern.test(expression)) {
|
||||
errors.push('Nested expressions are not supported (expression inside another expression)');
|
||||
}
|
||||
|
||||
// Check for empty expressions
|
||||
|
||||
Reference in New Issue
Block a user