n8n-atom-mcp 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.example +220 -0
- package/LICENSE +21 -0
- package/README.md +78 -0
- package/data/nodes.db +0 -0
- package/dist/community/community-node-fetcher.d.ts +118 -0
- package/dist/community/community-node-fetcher.d.ts.map +1 -0
- package/dist/community/community-node-fetcher.js +239 -0
- package/dist/community/community-node-fetcher.js.map +1 -0
- package/dist/community/community-node-service.d.ts +42 -0
- package/dist/community/community-node-service.d.ts.map +1 -0
- package/dist/community/community-node-service.js +210 -0
- package/dist/community/community-node-service.js.map +1 -0
- package/dist/community/documentation-batch-processor.d.ts +33 -0
- package/dist/community/documentation-batch-processor.d.ts.map +1 -0
- package/dist/community/documentation-batch-processor.js +156 -0
- package/dist/community/documentation-batch-processor.js.map +1 -0
- package/dist/community/documentation-generator.d.ts +65 -0
- package/dist/community/documentation-generator.d.ts.map +1 -0
- package/dist/community/documentation-generator.js +220 -0
- package/dist/community/documentation-generator.js.map +1 -0
- package/dist/community/index.d.ts +5 -0
- package/dist/community/index.d.ts.map +1 -0
- package/dist/community/index.js +14 -0
- package/dist/community/index.js.map +1 -0
- package/dist/config/n8n-api.d.ts +15 -0
- package/dist/config/n8n-api.d.ts.map +1 -0
- package/dist/config/n8n-api.js +53 -0
- package/dist/config/n8n-api.js.map +1 -0
- package/dist/constants/type-structures.d.ts +123 -0
- package/dist/constants/type-structures.d.ts.map +1 -0
- package/dist/constants/type-structures.js +654 -0
- package/dist/constants/type-structures.js.map +1 -0
- package/dist/database/database-adapter.d.ts +33 -0
- package/dist/database/database-adapter.d.ts.map +1 -0
- package/dist/database/database-adapter.js +420 -0
- package/dist/database/database-adapter.js.map +1 -0
- package/dist/database/node-repository.d.ts +152 -0
- package/dist/database/node-repository.d.ts.map +1 -0
- package/dist/database/node-repository.js +791 -0
- package/dist/database/node-repository.js.map +1 -0
- package/dist/errors/validation-service-error.d.ts +10 -0
- package/dist/errors/validation-service-error.d.ts.map +1 -0
- package/dist/errors/validation-service-error.js +26 -0
- package/dist/errors/validation-service-error.js.map +1 -0
- package/dist/http-server-single-session.d.ts +52 -0
- package/dist/http-server-single-session.d.ts.map +1 -0
- package/dist/http-server-single-session.js +1180 -0
- package/dist/http-server-single-session.js.map +1 -0
- package/dist/http-server.d.ts +9 -0
- package/dist/http-server.d.ts.map +1 -0
- package/dist/http-server.js +481 -0
- package/dist/http-server.js.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +20 -0
- package/dist/index.js.map +1 -0
- package/dist/loaders/node-loader.d.ts +11 -0
- package/dist/loaders/node-loader.d.ts.map +1 -0
- package/dist/loaders/node-loader.js +79 -0
- package/dist/loaders/node-loader.js.map +1 -0
- package/dist/mappers/docs-mapper.d.ts +7 -0
- package/dist/mappers/docs-mapper.d.ts.map +1 -0
- package/dist/mappers/docs-mapper.js +106 -0
- package/dist/mappers/docs-mapper.js.map +1 -0
- package/dist/mcp/handlers-n8n-manager.d.ts +58 -0
- package/dist/mcp/handlers-n8n-manager.d.ts.map +1 -0
- package/dist/mcp/handlers-n8n-manager.js +3299 -0
- package/dist/mcp/handlers-n8n-manager.js.map +1 -0
- package/dist/mcp/handlers-workflow-diff.d.ts +5 -0
- package/dist/mcp/handlers-workflow-diff.d.ts.map +1 -0
- package/dist/mcp/handlers-workflow-diff.js +461 -0
- package/dist/mcp/handlers-workflow-diff.js.map +1 -0
- package/dist/mcp/index.d.ts +3 -0
- package/dist/mcp/index.d.ts.map +1 -0
- package/dist/mcp/index.js +228 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/mcp/server.d.ts +82 -0
- package/dist/mcp/server.d.ts.map +1 -0
- package/dist/mcp/server.js +3006 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/mcp/stdio-wrapper.d.ts +3 -0
- package/dist/mcp/stdio-wrapper.d.ts.map +1 -0
- package/dist/mcp/stdio-wrapper.js +81 -0
- package/dist/mcp/stdio-wrapper.js.map +1 -0
- package/dist/mcp/tool-docs/configuration/get-node.d.ts +3 -0
- package/dist/mcp/tool-docs/configuration/get-node.d.ts.map +1 -0
- package/dist/mcp/tool-docs/configuration/get-node.js +90 -0
- package/dist/mcp/tool-docs/configuration/get-node.js.map +1 -0
- package/dist/mcp/tool-docs/configuration/index.d.ts +2 -0
- package/dist/mcp/tool-docs/configuration/index.d.ts.map +1 -0
- package/dist/mcp/tool-docs/configuration/index.js +6 -0
- package/dist/mcp/tool-docs/configuration/index.js.map +1 -0
- package/dist/mcp/tool-docs/discovery/index.d.ts +2 -0
- package/dist/mcp/tool-docs/discovery/index.d.ts.map +1 -0
- package/dist/mcp/tool-docs/discovery/index.js +6 -0
- package/dist/mcp/tool-docs/discovery/index.js.map +1 -0
- package/dist/mcp/tool-docs/discovery/search-nodes.d.ts +3 -0
- package/dist/mcp/tool-docs/discovery/search-nodes.d.ts.map +1 -0
- package/dist/mcp/tool-docs/discovery/search-nodes.js +70 -0
- package/dist/mcp/tool-docs/discovery/search-nodes.js.map +1 -0
- package/dist/mcp/tool-docs/guides/ai-agents-guide.d.ts +3 -0
- package/dist/mcp/tool-docs/guides/ai-agents-guide.d.ts.map +1 -0
- package/dist/mcp/tool-docs/guides/ai-agents-guide.js +739 -0
- package/dist/mcp/tool-docs/guides/ai-agents-guide.js.map +1 -0
- package/dist/mcp/tool-docs/guides/index.d.ts +2 -0
- package/dist/mcp/tool-docs/guides/index.d.ts.map +1 -0
- package/dist/mcp/tool-docs/guides/index.js +6 -0
- package/dist/mcp/tool-docs/guides/index.js.map +1 -0
- package/dist/mcp/tool-docs/index.d.ts +4 -0
- package/dist/mcp/tool-docs/index.d.ts.map +1 -0
- package/dist/mcp/tool-docs/index.js +34 -0
- package/dist/mcp/tool-docs/index.js.map +1 -0
- package/dist/mcp/tool-docs/system/index.d.ts +3 -0
- package/dist/mcp/tool-docs/system/index.d.ts.map +1 -0
- package/dist/mcp/tool-docs/system/index.js +8 -0
- package/dist/mcp/tool-docs/system/index.js.map +1 -0
- package/dist/mcp/tool-docs/system/n8n-diagnostic.d.ts +3 -0
- package/dist/mcp/tool-docs/system/n8n-diagnostic.d.ts.map +1 -0
- package/dist/mcp/tool-docs/system/n8n-diagnostic.js +99 -0
- package/dist/mcp/tool-docs/system/n8n-diagnostic.js.map +1 -0
- package/dist/mcp/tool-docs/system/n8n-health-check.d.ts +3 -0
- package/dist/mcp/tool-docs/system/n8n-health-check.d.ts.map +1 -0
- package/dist/mcp/tool-docs/system/n8n-health-check.js +102 -0
- package/dist/mcp/tool-docs/system/n8n-health-check.js.map +1 -0
- package/dist/mcp/tool-docs/system/n8n-list-available-tools.d.ts +3 -0
- package/dist/mcp/tool-docs/system/n8n-list-available-tools.d.ts.map +1 -0
- package/dist/mcp/tool-docs/system/n8n-list-available-tools.js +75 -0
- package/dist/mcp/tool-docs/system/n8n-list-available-tools.js.map +1 -0
- package/dist/mcp/tool-docs/system/tools-documentation.d.ts +3 -0
- package/dist/mcp/tool-docs/system/tools-documentation.d.ts.map +1 -0
- package/dist/mcp/tool-docs/system/tools-documentation.js +65 -0
- package/dist/mcp/tool-docs/system/tools-documentation.js.map +1 -0
- package/dist/mcp/tool-docs/templates/get-template.d.ts +3 -0
- package/dist/mcp/tool-docs/templates/get-template.d.ts.map +1 -0
- package/dist/mcp/tool-docs/templates/get-template.js +84 -0
- package/dist/mcp/tool-docs/templates/get-template.js.map +1 -0
- package/dist/mcp/tool-docs/templates/index.d.ts +3 -0
- package/dist/mcp/tool-docs/templates/index.d.ts.map +1 -0
- package/dist/mcp/tool-docs/templates/index.js +8 -0
- package/dist/mcp/tool-docs/templates/index.js.map +1 -0
- package/dist/mcp/tool-docs/templates/search-templates.d.ts +3 -0
- package/dist/mcp/tool-docs/templates/search-templates.d.ts.map +1 -0
- package/dist/mcp/tool-docs/templates/search-templates.js +143 -0
- package/dist/mcp/tool-docs/templates/search-templates.js.map +1 -0
- package/dist/mcp/tool-docs/types.d.ts +32 -0
- package/dist/mcp/tool-docs/types.d.ts.map +1 -0
- package/dist/mcp/tool-docs/types.js +3 -0
- package/dist/mcp/tool-docs/types.js.map +1 -0
- package/dist/mcp/tool-docs/validation/index.d.ts +3 -0
- package/dist/mcp/tool-docs/validation/index.d.ts.map +1 -0
- package/dist/mcp/tool-docs/validation/index.js +8 -0
- package/dist/mcp/tool-docs/validation/index.js.map +1 -0
- package/dist/mcp/tool-docs/validation/validate-node.d.ts +3 -0
- package/dist/mcp/tool-docs/validation/validate-node.d.ts.map +1 -0
- package/dist/mcp/tool-docs/validation/validate-node.js +82 -0
- package/dist/mcp/tool-docs/validation/validate-node.js.map +1 -0
- package/dist/mcp/tool-docs/validation/validate-workflow.d.ts +3 -0
- package/dist/mcp/tool-docs/validation/validate-workflow.d.ts.map +1 -0
- package/dist/mcp/tool-docs/validation/validate-workflow.js +86 -0
- package/dist/mcp/tool-docs/validation/validate-workflow.js.map +1 -0
- package/dist/mcp/tool-docs/workflow_management/index.d.ts +13 -0
- package/dist/mcp/tool-docs/workflow_management/index.d.ts.map +1 -0
- package/dist/mcp/tool-docs/workflow_management/index.js +28 -0
- package/dist/mcp/tool-docs/workflow_management/index.js.map +1 -0
- package/dist/mcp/tool-docs/workflow_management/n8n-autofix-workflow.d.ts +3 -0
- package/dist/mcp/tool-docs/workflow_management/n8n-autofix-workflow.d.ts.map +1 -0
- package/dist/mcp/tool-docs/workflow_management/n8n-autofix-workflow.js +162 -0
- package/dist/mcp/tool-docs/workflow_management/n8n-autofix-workflow.js.map +1 -0
- package/dist/mcp/tool-docs/workflow_management/n8n-create-workflow.d.ts +3 -0
- package/dist/mcp/tool-docs/workflow_management/n8n-create-workflow.d.ts.map +1 -0
- package/dist/mcp/tool-docs/workflow_management/n8n-create-workflow.js +102 -0
- package/dist/mcp/tool-docs/workflow_management/n8n-create-workflow.js.map +1 -0
- package/dist/mcp/tool-docs/workflow_management/n8n-delete-workflow.d.ts +3 -0
- package/dist/mcp/tool-docs/workflow_management/n8n-delete-workflow.d.ts.map +1 -0
- package/dist/mcp/tool-docs/workflow_management/n8n-delete-workflow.js +52 -0
- package/dist/mcp/tool-docs/workflow_management/n8n-delete-workflow.js.map +1 -0
- package/dist/mcp/tool-docs/workflow_management/n8n-deploy-template.d.ts +3 -0
- package/dist/mcp/tool-docs/workflow_management/n8n-deploy-template.d.ts.map +1 -0
- package/dist/mcp/tool-docs/workflow_management/n8n-deploy-template.js +73 -0
- package/dist/mcp/tool-docs/workflow_management/n8n-deploy-template.js.map +1 -0
- package/dist/mcp/tool-docs/workflow_management/n8n-executions.d.ts +3 -0
- package/dist/mcp/tool-docs/workflow_management/n8n-executions.d.ts.map +1 -0
- package/dist/mcp/tool-docs/workflow_management/n8n-executions.js +109 -0
- package/dist/mcp/tool-docs/workflow_management/n8n-executions.js.map +1 -0
- package/dist/mcp/tool-docs/workflow_management/n8n-get-workflow.d.ts +3 -0
- package/dist/mcp/tool-docs/workflow_management/n8n-get-workflow.d.ts.map +1 -0
- package/dist/mcp/tool-docs/workflow_management/n8n-get-workflow.js +68 -0
- package/dist/mcp/tool-docs/workflow_management/n8n-get-workflow.js.map +1 -0
- package/dist/mcp/tool-docs/workflow_management/n8n-list-workflows.d.ts +3 -0
- package/dist/mcp/tool-docs/workflow_management/n8n-list-workflows.d.ts.map +1 -0
- package/dist/mcp/tool-docs/workflow_management/n8n-list-workflows.js +57 -0
- package/dist/mcp/tool-docs/workflow_management/n8n-list-workflows.js.map +1 -0
- package/dist/mcp/tool-docs/workflow_management/n8n-test-workflow.d.ts +3 -0
- package/dist/mcp/tool-docs/workflow_management/n8n-test-workflow.d.ts.map +1 -0
- package/dist/mcp/tool-docs/workflow_management/n8n-test-workflow.js +140 -0
- package/dist/mcp/tool-docs/workflow_management/n8n-test-workflow.js.map +1 -0
- package/dist/mcp/tool-docs/workflow_management/n8n-update-full-workflow.d.ts +3 -0
- package/dist/mcp/tool-docs/workflow_management/n8n-update-full-workflow.d.ts.map +1 -0
- package/dist/mcp/tool-docs/workflow_management/n8n-update-full-workflow.js +61 -0
- package/dist/mcp/tool-docs/workflow_management/n8n-update-full-workflow.js.map +1 -0
- package/dist/mcp/tool-docs/workflow_management/n8n-update-partial-workflow.d.ts +3 -0
- package/dist/mcp/tool-docs/workflow_management/n8n-update-partial-workflow.d.ts.map +1 -0
- package/dist/mcp/tool-docs/workflow_management/n8n-update-partial-workflow.js +420 -0
- package/dist/mcp/tool-docs/workflow_management/n8n-update-partial-workflow.js.map +1 -0
- package/dist/mcp/tool-docs/workflow_management/n8n-validate-workflow.d.ts +3 -0
- package/dist/mcp/tool-docs/workflow_management/n8n-validate-workflow.d.ts.map +1 -0
- package/dist/mcp/tool-docs/workflow_management/n8n-validate-workflow.js +73 -0
- package/dist/mcp/tool-docs/workflow_management/n8n-validate-workflow.js.map +1 -0
- package/dist/mcp/tool-docs/workflow_management/n8n-workflow-versions.d.ts +3 -0
- package/dist/mcp/tool-docs/workflow_management/n8n-workflow-versions.d.ts.map +1 -0
- package/dist/mcp/tool-docs/workflow_management/n8n-workflow-versions.js +170 -0
- package/dist/mcp/tool-docs/workflow_management/n8n-workflow-versions.js.map +1 -0
- package/dist/mcp/tools-documentation.d.ts +6 -0
- package/dist/mcp/tools-documentation.d.ts.map +1 -0
- package/dist/mcp/tools-documentation.js +682 -0
- package/dist/mcp/tools-documentation.js.map +1 -0
- package/dist/mcp/tools-file-operations.d.ts +154 -0
- package/dist/mcp/tools-file-operations.d.ts.map +1 -0
- package/dist/mcp/tools-file-operations.js +213 -0
- package/dist/mcp/tools-file-operations.js.map +1 -0
- package/dist/mcp/tools-n8n-friendly.d.ts +6 -0
- package/dist/mcp/tools-n8n-friendly.d.ts.map +1 -0
- package/dist/mcp/tools-n8n-friendly.js +89 -0
- package/dist/mcp/tools-n8n-friendly.js.map +1 -0
- package/dist/mcp/tools-n8n-manager.d.ts +3 -0
- package/dist/mcp/tools-n8n-manager.d.ts.map +1 -0
- package/dist/mcp/tools-n8n-manager.js +1320 -0
- package/dist/mcp/tools-n8n-manager.js.map +1 -0
- package/dist/mcp/tools.d.ts +3 -0
- package/dist/mcp/tools.d.ts.map +1 -0
- package/dist/mcp/tools.js +424 -0
- package/dist/mcp/tools.js.map +1 -0
- package/dist/mcp/workflow-examples.d.ts +76 -0
- package/dist/mcp/workflow-examples.d.ts.map +1 -0
- package/dist/mcp/workflow-examples.js +111 -0
- package/dist/mcp/workflow-examples.js.map +1 -0
- package/dist/mcp-engine.d.ts +36 -0
- package/dist/mcp-engine.d.ts.map +1 -0
- package/dist/mcp-engine.js +77 -0
- package/dist/mcp-engine.js.map +1 -0
- package/dist/mcp-tools-engine.d.ts +47 -0
- package/dist/mcp-tools-engine.d.ts.map +1 -0
- package/dist/mcp-tools-engine.js +89 -0
- package/dist/mcp-tools-engine.js.map +1 -0
- package/dist/n8n/MCPApi.credentials.d.ts +8 -0
- package/dist/n8n/MCPApi.credentials.d.ts.map +1 -0
- package/dist/n8n/MCPApi.credentials.js +53 -0
- package/dist/n8n/MCPApi.credentials.js.map +1 -0
- package/dist/n8n/MCPNode.node.d.ts +13 -0
- package/dist/n8n/MCPNode.node.d.ts.map +1 -0
- package/dist/n8n/MCPNode.node.js +260 -0
- package/dist/n8n/MCPNode.node.js.map +1 -0
- package/dist/parsers/node-parser.d.ts +38 -0
- package/dist/parsers/node-parser.d.ts.map +1 -0
- package/dist/parsers/node-parser.js +250 -0
- package/dist/parsers/node-parser.js.map +1 -0
- package/dist/parsers/property-extractor.d.ts +11 -0
- package/dist/parsers/property-extractor.d.ts.map +1 -0
- package/dist/parsers/property-extractor.js +172 -0
- package/dist/parsers/property-extractor.js.map +1 -0
- package/dist/parsers/simple-parser.d.ts +25 -0
- package/dist/parsers/simple-parser.d.ts.map +1 -0
- package/dist/parsers/simple-parser.js +212 -0
- package/dist/parsers/simple-parser.js.map +1 -0
- package/dist/scripts/debug-http-search.d.ts +3 -0
- package/dist/scripts/debug-http-search.d.ts.map +1 -0
- package/dist/scripts/debug-http-search.js +57 -0
- package/dist/scripts/debug-http-search.js.map +1 -0
- package/dist/scripts/extract-from-docker.d.ts +3 -0
- package/dist/scripts/extract-from-docker.d.ts.map +1 -0
- package/dist/scripts/extract-from-docker.js +210 -0
- package/dist/scripts/extract-from-docker.js.map +1 -0
- package/dist/scripts/fetch-community-nodes.d.ts +3 -0
- package/dist/scripts/fetch-community-nodes.d.ts.map +1 -0
- package/dist/scripts/fetch-community-nodes.js +114 -0
- package/dist/scripts/fetch-community-nodes.js.map +1 -0
- package/dist/scripts/fetch-templates-robust.d.ts +4 -0
- package/dist/scripts/fetch-templates-robust.d.ts.map +1 -0
- package/dist/scripts/fetch-templates-robust.js +132 -0
- package/dist/scripts/fetch-templates-robust.js.map +1 -0
- package/dist/scripts/fetch-templates.d.ts +4 -0
- package/dist/scripts/fetch-templates.d.ts.map +1 -0
- package/dist/scripts/fetch-templates.js +411 -0
- package/dist/scripts/fetch-templates.js.map +1 -0
- package/dist/scripts/generate-community-docs.d.ts +3 -0
- package/dist/scripts/generate-community-docs.d.ts.map +1 -0
- package/dist/scripts/generate-community-docs.js +183 -0
- package/dist/scripts/generate-community-docs.js.map +1 -0
- package/dist/scripts/migrate-readme-columns.d.ts +2 -0
- package/dist/scripts/migrate-readme-columns.d.ts.map +1 -0
- package/dist/scripts/migrate-readme-columns.js +62 -0
- package/dist/scripts/migrate-readme-columns.js.map +1 -0
- package/dist/scripts/rebuild-database.d.ts +4 -0
- package/dist/scripts/rebuild-database.d.ts.map +1 -0
- package/dist/scripts/rebuild-database.js +95 -0
- package/dist/scripts/rebuild-database.js.map +1 -0
- package/dist/scripts/rebuild-optimized.d.ts +3 -0
- package/dist/scripts/rebuild-optimized.d.ts.map +1 -0
- package/dist/scripts/rebuild-optimized.js +198 -0
- package/dist/scripts/rebuild-optimized.js.map +1 -0
- package/dist/scripts/rebuild.d.ts +3 -0
- package/dist/scripts/rebuild.d.ts.map +1 -0
- package/dist/scripts/rebuild.js +258 -0
- package/dist/scripts/rebuild.js.map +1 -0
- package/dist/scripts/sanitize-templates.d.ts +3 -0
- package/dist/scripts/sanitize-templates.d.ts.map +1 -0
- package/dist/scripts/sanitize-templates.js +88 -0
- package/dist/scripts/sanitize-templates.js.map +1 -0
- package/dist/scripts/seed-canonical-ai-examples.d.ts +4 -0
- package/dist/scripts/seed-canonical-ai-examples.d.ts.map +1 -0
- package/dist/scripts/seed-canonical-ai-examples.js +121 -0
- package/dist/scripts/seed-canonical-ai-examples.js.map +1 -0
- package/dist/scripts/test-autofix-documentation.d.ts +3 -0
- package/dist/scripts/test-autofix-documentation.d.ts.map +1 -0
- package/dist/scripts/test-autofix-documentation.js +103 -0
- package/dist/scripts/test-autofix-documentation.js.map +1 -0
- package/dist/scripts/test-autofix-workflow.d.ts +2 -0
- package/dist/scripts/test-autofix-workflow.d.ts.map +1 -0
- package/dist/scripts/test-autofix-workflow.js +223 -0
- package/dist/scripts/test-autofix-workflow.js.map +1 -0
- package/dist/scripts/test-execution-filtering.d.ts +3 -0
- package/dist/scripts/test-execution-filtering.d.ts.map +1 -0
- package/dist/scripts/test-execution-filtering.js +206 -0
- package/dist/scripts/test-execution-filtering.js.map +1 -0
- package/dist/scripts/test-node-suggestions.d.ts +3 -0
- package/dist/scripts/test-node-suggestions.d.ts.map +1 -0
- package/dist/scripts/test-node-suggestions.js +165 -0
- package/dist/scripts/test-node-suggestions.js.map +1 -0
- package/dist/scripts/test-protocol-negotiation.d.ts +3 -0
- package/dist/scripts/test-protocol-negotiation.d.ts.map +1 -0
- package/dist/scripts/test-protocol-negotiation.js +154 -0
- package/dist/scripts/test-protocol-negotiation.js.map +1 -0
- package/dist/scripts/test-summary.d.ts +3 -0
- package/dist/scripts/test-summary.d.ts.map +1 -0
- package/dist/scripts/test-summary.js +77 -0
- package/dist/scripts/test-summary.js.map +1 -0
- package/dist/scripts/test-telemetry-mutations-verbose.d.ts +2 -0
- package/dist/scripts/test-telemetry-mutations-verbose.d.ts.map +1 -0
- package/dist/scripts/test-telemetry-mutations-verbose.js +133 -0
- package/dist/scripts/test-telemetry-mutations-verbose.js.map +1 -0
- package/dist/scripts/test-telemetry-mutations.d.ts +2 -0
- package/dist/scripts/test-telemetry-mutations.d.ts.map +1 -0
- package/dist/scripts/test-telemetry-mutations.js +129 -0
- package/dist/scripts/test-telemetry-mutations.js.map +1 -0
- package/dist/scripts/test-webhook-autofix.d.ts +3 -0
- package/dist/scripts/test-webhook-autofix.d.ts.map +1 -0
- package/dist/scripts/test-webhook-autofix.js +117 -0
- package/dist/scripts/test-webhook-autofix.js.map +1 -0
- package/dist/scripts/validate.d.ts +3 -0
- package/dist/scripts/validate.d.ts.map +1 -0
- package/dist/scripts/validate.js +121 -0
- package/dist/scripts/validate.js.map +1 -0
- package/dist/scripts/validation-summary.d.ts +3 -0
- package/dist/scripts/validation-summary.d.ts.map +1 -0
- package/dist/scripts/validation-summary.js +135 -0
- package/dist/scripts/validation-summary.js.map +1 -0
- package/dist/services/ai-node-validator.d.ts +12 -0
- package/dist/services/ai-node-validator.d.ts.map +1 -0
- package/dist/services/ai-node-validator.js +429 -0
- package/dist/services/ai-node-validator.js.map +1 -0
- package/dist/services/ai-tool-validators.d.ts +58 -0
- package/dist/services/ai-tool-validators.d.ts.map +1 -0
- package/dist/services/ai-tool-validators.js +438 -0
- package/dist/services/ai-tool-validators.js.map +1 -0
- package/dist/services/breaking-change-detector.d.ts +38 -0
- package/dist/services/breaking-change-detector.d.ts.map +1 -0
- package/dist/services/breaking-change-detector.js +184 -0
- package/dist/services/breaking-change-detector.js.map +1 -0
- package/dist/services/breaking-changes-registry.d.ts +28 -0
- package/dist/services/breaking-changes-registry.d.ts.map +1 -0
- package/dist/services/breaking-changes-registry.js +200 -0
- package/dist/services/breaking-changes-registry.js.map +1 -0
- package/dist/services/community-package-service.d.ts +69 -0
- package/dist/services/community-package-service.d.ts.map +1 -0
- package/dist/services/community-package-service.js +202 -0
- package/dist/services/community-package-service.js.map +1 -0
- package/dist/services/confidence-scorer.d.ts +24 -0
- package/dist/services/confidence-scorer.d.ts.map +1 -0
- package/dist/services/confidence-scorer.js +139 -0
- package/dist/services/confidence-scorer.js.map +1 -0
- package/dist/services/config-validator.d.ts +49 -0
- package/dist/services/config-validator.d.ts.map +1 -0
- package/dist/services/config-validator.js +724 -0
- package/dist/services/config-validator.js.map +1 -0
- package/dist/services/enhanced-config-validator.d.ts +54 -0
- package/dist/services/enhanced-config-validator.d.ts.map +1 -0
- package/dist/services/enhanced-config-validator.js +789 -0
- package/dist/services/enhanced-config-validator.js.map +1 -0
- package/dist/services/error-execution-processor.d.ts +9 -0
- package/dist/services/error-execution-processor.d.ts.map +1 -0
- package/dist/services/error-execution-processor.js +380 -0
- package/dist/services/error-execution-processor.js.map +1 -0
- package/dist/services/example-generator.d.ts +14 -0
- package/dist/services/example-generator.d.ts.map +1 -0
- package/dist/services/example-generator.js +970 -0
- package/dist/services/example-generator.js.map +1 -0
- package/dist/services/execution-processor.d.ts +8 -0
- package/dist/services/execution-processor.d.ts.map +1 -0
- package/dist/services/execution-processor.js +381 -0
- package/dist/services/execution-processor.js.map +1 -0
- package/dist/services/expression-format-validator.d.ts +33 -0
- package/dist/services/expression-format-validator.d.ts.map +1 -0
- package/dist/services/expression-format-validator.js +209 -0
- package/dist/services/expression-format-validator.js.map +1 -0
- package/dist/services/expression-validator.d.ts +27 -0
- package/dist/services/expression-validator.d.ts.map +1 -0
- package/dist/services/expression-validator.js +187 -0
- package/dist/services/expression-validator.js.map +1 -0
- package/dist/services/installed-node-sync-service.d.ts +32 -0
- package/dist/services/installed-node-sync-service.d.ts.map +1 -0
- package/dist/services/installed-node-sync-service.js +190 -0
- package/dist/services/installed-node-sync-service.js.map +1 -0
- package/dist/services/n8n-api-client.d.ts +48 -0
- package/dist/services/n8n-api-client.d.ts.map +1 -0
- package/dist/services/n8n-api-client.js +458 -0
- package/dist/services/n8n-api-client.js.map +1 -0
- package/dist/services/n8n-file-format.d.ts +58 -0
- package/dist/services/n8n-file-format.d.ts.map +1 -0
- package/dist/services/n8n-file-format.js +203 -0
- package/dist/services/n8n-file-format.js.map +1 -0
- package/dist/services/n8n-validation.d.ts +273 -0
- package/dist/services/n8n-validation.d.ts.map +1 -0
- package/dist/services/n8n-validation.js +491 -0
- package/dist/services/n8n-validation.js.map +1 -0
- package/dist/services/n8n-version.d.ts +23 -0
- package/dist/services/n8n-version.d.ts.map +1 -0
- package/dist/services/n8n-version.js +151 -0
- package/dist/services/n8n-version.js.map +1 -0
- package/dist/services/node-documentation-service.d.ts +70 -0
- package/dist/services/node-documentation-service.d.ts.map +1 -0
- package/dist/services/node-documentation-service.js +518 -0
- package/dist/services/node-documentation-service.js.map +1 -0
- package/dist/services/node-migration-service.d.ts +44 -0
- package/dist/services/node-migration-service.d.ts.map +1 -0
- package/dist/services/node-migration-service.js +231 -0
- package/dist/services/node-migration-service.js.map +1 -0
- package/dist/services/node-sanitizer.d.ts +5 -0
- package/dist/services/node-sanitizer.d.ts.map +1 -0
- package/dist/services/node-sanitizer.js +225 -0
- package/dist/services/node-sanitizer.js.map +1 -0
- package/dist/services/node-similarity-service.d.ts +51 -0
- package/dist/services/node-similarity-service.d.ts.map +1 -0
- package/dist/services/node-similarity-service.js +352 -0
- package/dist/services/node-similarity-service.js.map +1 -0
- package/dist/services/node-specific-validators.d.ts +37 -0
- package/dist/services/node-specific-validators.d.ts.map +1 -0
- package/dist/services/node-specific-validators.js +1331 -0
- package/dist/services/node-specific-validators.js.map +1 -0
- package/dist/services/node-version-service.d.ts +63 -0
- package/dist/services/node-version-service.d.ts.map +1 -0
- package/dist/services/node-version-service.js +215 -0
- package/dist/services/node-version-service.js.map +1 -0
- package/dist/services/operation-similarity-service.d.ts +32 -0
- package/dist/services/operation-similarity-service.d.ts.map +1 -0
- package/dist/services/operation-similarity-service.js +341 -0
- package/dist/services/operation-similarity-service.js.map +1 -0
- package/dist/services/post-update-validator.d.ts +59 -0
- package/dist/services/post-update-validator.d.ts.map +1 -0
- package/dist/services/post-update-validator.js +231 -0
- package/dist/services/post-update-validator.js.map +1 -0
- package/dist/services/property-dependencies.d.ts +36 -0
- package/dist/services/property-dependencies.d.ts.map +1 -0
- package/dist/services/property-dependencies.js +168 -0
- package/dist/services/property-dependencies.js.map +1 -0
- package/dist/services/property-filter.d.ts +44 -0
- package/dist/services/property-filter.d.ts.map +1 -0
- package/dist/services/property-filter.js +395 -0
- package/dist/services/property-filter.js.map +1 -0
- package/dist/services/resource-similarity-service.d.ts +33 -0
- package/dist/services/resource-similarity-service.d.ts.map +1 -0
- package/dist/services/resource-similarity-service.js +358 -0
- package/dist/services/resource-similarity-service.js.map +1 -0
- package/dist/services/sqlite-storage-service.d.ts +11 -0
- package/dist/services/sqlite-storage-service.d.ts.map +1 -0
- package/dist/services/sqlite-storage-service.js +74 -0
- package/dist/services/sqlite-storage-service.js.map +1 -0
- package/dist/services/task-templates.d.ts +27 -0
- package/dist/services/task-templates.d.ts.map +1 -0
- package/dist/services/task-templates.js +1397 -0
- package/dist/services/task-templates.js.map +1 -0
- package/dist/services/tool-variant-generator.d.ts +10 -0
- package/dist/services/tool-variant-generator.d.ts.map +1 -0
- package/dist/services/tool-variant-generator.js +93 -0
- package/dist/services/tool-variant-generator.js.map +1 -0
- package/dist/services/type-structure-service.d.ts +23 -0
- package/dist/services/type-structure-service.d.ts.map +1 -0
- package/dist/services/type-structure-service.js +109 -0
- package/dist/services/type-structure-service.js.map +1 -0
- package/dist/services/universal-expression-validator.d.ts +20 -0
- package/dist/services/universal-expression-validator.d.ts.map +1 -0
- package/dist/services/universal-expression-validator.js +192 -0
- package/dist/services/universal-expression-validator.js.map +1 -0
- package/dist/services/workflow-analytics-service.d.ts +34 -0
- package/dist/services/workflow-analytics-service.d.ts.map +1 -0
- package/dist/services/workflow-analytics-service.js +144 -0
- package/dist/services/workflow-analytics-service.js.map +1 -0
- package/dist/services/workflow-auto-fixer.d.ts +74 -0
- package/dist/services/workflow-auto-fixer.d.ts.map +1 -0
- package/dist/services/workflow-auto-fixer.js +557 -0
- package/dist/services/workflow-auto-fixer.js.map +1 -0
- package/dist/services/workflow-comparison.d.ts +13 -0
- package/dist/services/workflow-comparison.d.ts.map +1 -0
- package/dist/services/workflow-comparison.js +306 -0
- package/dist/services/workflow-comparison.js.map +1 -0
- package/dist/services/workflow-debugging-service.d.ts +62 -0
- package/dist/services/workflow-debugging-service.d.ts.map +1 -0
- package/dist/services/workflow-debugging-service.js +153 -0
- package/dist/services/workflow-debugging-service.js.map +1 -0
- package/dist/services/workflow-diff-engine.d.ts +45 -0
- package/dist/services/workflow-diff-engine.d.ts.map +1 -0
- package/dist/services/workflow-diff-engine.js +830 -0
- package/dist/services/workflow-diff-engine.js.map +1 -0
- package/dist/services/workflow-validator.d.ts +112 -0
- package/dist/services/workflow-validator.d.ts.map +1 -0
- package/dist/services/workflow-validator.js +1328 -0
- package/dist/services/workflow-validator.js.map +1 -0
- package/dist/services/workflow-versioning-service.d.ts +102 -0
- package/dist/services/workflow-versioning-service.d.ts.map +1 -0
- package/dist/services/workflow-versioning-service.js +264 -0
- package/dist/services/workflow-versioning-service.js.map +1 -0
- package/dist/telemetry/batch-processor.d.ts +34 -0
- package/dist/telemetry/batch-processor.d.ts.map +1 -0
- package/dist/telemetry/batch-processor.js +337 -0
- package/dist/telemetry/batch-processor.js.map +1 -0
- package/dist/telemetry/config-manager.d.ts +32 -0
- package/dist/telemetry/config-manager.d.ts.map +1 -0
- package/dist/telemetry/config-manager.js +289 -0
- package/dist/telemetry/config-manager.js.map +1 -0
- package/dist/telemetry/early-error-logger.d.ts +26 -0
- package/dist/telemetry/early-error-logger.d.ts.map +1 -0
- package/dist/telemetry/early-error-logger.js +187 -0
- package/dist/telemetry/early-error-logger.js.map +1 -0
- package/dist/telemetry/error-sanitization-utils.d.ts +2 -0
- package/dist/telemetry/error-sanitization-utils.d.ts.map +1 -0
- package/dist/telemetry/error-sanitization-utils.js +37 -0
- package/dist/telemetry/error-sanitization-utils.js.map +1 -0
- package/dist/telemetry/error-sanitizer.d.ts +4 -0
- package/dist/telemetry/error-sanitizer.d.ts.map +1 -0
- package/dist/telemetry/error-sanitizer.js +45 -0
- package/dist/telemetry/error-sanitizer.js.map +1 -0
- package/dist/telemetry/event-tracker.d.ts +71 -0
- package/dist/telemetry/event-tracker.d.ts.map +1 -0
- package/dist/telemetry/event-tracker.js +356 -0
- package/dist/telemetry/event-tracker.js.map +1 -0
- package/dist/telemetry/event-validator.d.ts +78 -0
- package/dist/telemetry/event-validator.d.ts.map +1 -0
- package/dist/telemetry/event-validator.js +227 -0
- package/dist/telemetry/event-validator.js.map +1 -0
- package/dist/telemetry/index.d.ts +5 -0
- package/dist/telemetry/index.d.ts.map +1 -0
- package/dist/telemetry/index.js +11 -0
- package/dist/telemetry/index.js.map +1 -0
- package/dist/telemetry/intent-classifier.d.ts +11 -0
- package/dist/telemetry/intent-classifier.d.ts.map +1 -0
- package/dist/telemetry/intent-classifier.js +141 -0
- package/dist/telemetry/intent-classifier.js.map +1 -0
- package/dist/telemetry/intent-sanitizer.d.ts +9 -0
- package/dist/telemetry/intent-sanitizer.d.ts.map +1 -0
- package/dist/telemetry/intent-sanitizer.js +103 -0
- package/dist/telemetry/intent-sanitizer.js.map +1 -0
- package/dist/telemetry/mutation-tracker.d.ts +15 -0
- package/dist/telemetry/mutation-tracker.d.ts.map +1 -0
- package/dist/telemetry/mutation-tracker.js +177 -0
- package/dist/telemetry/mutation-tracker.js.map +1 -0
- package/dist/telemetry/mutation-types.d.ts +106 -0
- package/dist/telemetry/mutation-types.d.ts.map +1 -0
- package/dist/telemetry/mutation-types.js +18 -0
- package/dist/telemetry/mutation-types.js.map +1 -0
- package/dist/telemetry/mutation-validator.d.ts +20 -0
- package/dist/telemetry/mutation-validator.d.ts.map +1 -0
- package/dist/telemetry/mutation-validator.js +144 -0
- package/dist/telemetry/mutation-validator.js.map +1 -0
- package/dist/telemetry/performance-monitor.d.ts +113 -0
- package/dist/telemetry/performance-monitor.d.ts.map +1 -0
- package/dist/telemetry/performance-monitor.js +208 -0
- package/dist/telemetry/performance-monitor.js.map +1 -0
- package/dist/telemetry/rate-limiter.d.ts +30 -0
- package/dist/telemetry/rate-limiter.d.ts.map +1 -0
- package/dist/telemetry/rate-limiter.js +103 -0
- package/dist/telemetry/rate-limiter.js.map +1 -0
- package/dist/telemetry/startup-checkpoints.d.ts +26 -0
- package/dist/telemetry/startup-checkpoints.d.ts.map +1 -0
- package/dist/telemetry/startup-checkpoints.js +65 -0
- package/dist/telemetry/startup-checkpoints.js.map +1 -0
- package/dist/telemetry/telemetry-error.d.ts +44 -0
- package/dist/telemetry/telemetry-error.d.ts.map +1 -0
- package/dist/telemetry/telemetry-error.js +153 -0
- package/dist/telemetry/telemetry-error.js.map +1 -0
- package/dist/telemetry/telemetry-manager.d.ts +130 -0
- package/dist/telemetry/telemetry-manager.d.ts.map +1 -0
- package/dist/telemetry/telemetry-manager.js +257 -0
- package/dist/telemetry/telemetry-manager.js.map +1 -0
- package/dist/telemetry/telemetry-types.d.ts +103 -0
- package/dist/telemetry/telemetry-types.d.ts.map +1 -0
- package/dist/telemetry/telemetry-types.js +29 -0
- package/dist/telemetry/telemetry-types.js.map +1 -0
- package/dist/telemetry/workflow-sanitizer.d.ts +34 -0
- package/dist/telemetry/workflow-sanitizer.d.ts.map +1 -0
- package/dist/telemetry/workflow-sanitizer.js +242 -0
- package/dist/telemetry/workflow-sanitizer.js.map +1 -0
- package/dist/templates/batch-processor.d.ts +35 -0
- package/dist/templates/batch-processor.d.ts.map +1 -0
- package/dist/templates/batch-processor.js +320 -0
- package/dist/templates/batch-processor.js.map +1 -0
- package/dist/templates/metadata-generator.d.ts +52 -0
- package/dist/templates/metadata-generator.d.ts.map +1 -0
- package/dist/templates/metadata-generator.js +252 -0
- package/dist/templates/metadata-generator.js.map +1 -0
- package/dist/templates/template-fetcher.d.ts +45 -0
- package/dist/templates/template-fetcher.d.ts.map +1 -0
- package/dist/templates/template-fetcher.js +122 -0
- package/dist/templates/template-fetcher.js.map +1 -0
- package/dist/templates/template-repository.d.ts +93 -0
- package/dist/templates/template-repository.d.ts.map +1 -0
- package/dist/templates/template-repository.js +644 -0
- package/dist/templates/template-repository.js.map +1 -0
- package/dist/templates/template-service.d.ts +79 -0
- package/dist/templates/template-service.d.ts.map +1 -0
- package/dist/templates/template-service.js +300 -0
- package/dist/templates/template-service.js.map +1 -0
- package/dist/triggers/handlers/base-handler.d.ts +21 -0
- package/dist/triggers/handlers/base-handler.d.ts.map +1 -0
- package/dist/triggers/handlers/base-handler.js +60 -0
- package/dist/triggers/handlers/base-handler.js.map +1 -0
- package/dist/triggers/handlers/chat-handler.d.ts +38 -0
- package/dist/triggers/handlers/chat-handler.d.ts.map +1 -0
- package/dist/triggers/handlers/chat-handler.js +129 -0
- package/dist/triggers/handlers/chat-handler.js.map +1 -0
- package/dist/triggers/handlers/form-handler.d.ts +35 -0
- package/dist/triggers/handlers/form-handler.d.ts.map +1 -0
- package/dist/triggers/handlers/form-handler.js +362 -0
- package/dist/triggers/handlers/form-handler.js.map +1 -0
- package/dist/triggers/handlers/webhook-handler.d.ts +38 -0
- package/dist/triggers/handlers/webhook-handler.d.ts.map +1 -0
- package/dist/triggers/handlers/webhook-handler.js +115 -0
- package/dist/triggers/handlers/webhook-handler.js.map +1 -0
- package/dist/triggers/index.d.ts +5 -0
- package/dist/triggers/index.d.ts.map +1 -0
- package/dist/triggers/index.js +14 -0
- package/dist/triggers/index.js.map +1 -0
- package/dist/triggers/trigger-detector.d.ts +6 -0
- package/dist/triggers/trigger-detector.d.ts.map +1 -0
- package/dist/triggers/trigger-detector.js +201 -0
- package/dist/triggers/trigger-detector.js.map +1 -0
- package/dist/triggers/trigger-registry.d.ts +18 -0
- package/dist/triggers/trigger-registry.d.ts.map +1 -0
- package/dist/triggers/trigger-registry.js +87 -0
- package/dist/triggers/trigger-registry.js.map +1 -0
- package/dist/triggers/types.d.ts +76 -0
- package/dist/triggers/types.d.ts.map +1 -0
- package/dist/triggers/types.js +3 -0
- package/dist/triggers/types.js.map +1 -0
- package/dist/types/index.d.ts +49 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +21 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/instance-context.d.ts +20 -0
- package/dist/types/instance-context.d.ts.map +1 -0
- package/dist/types/instance-context.js +153 -0
- package/dist/types/instance-context.js.map +1 -0
- package/dist/types/n8n-api.d.ts +376 -0
- package/dist/types/n8n-api.d.ts.map +1 -0
- package/dist/types/n8n-api.js +10 -0
- package/dist/types/n8n-api.js.map +1 -0
- package/dist/types/node-types.d.ts +19 -0
- package/dist/types/node-types.d.ts.map +1 -0
- package/dist/types/node-types.js +62 -0
- package/dist/types/node-types.js.map +1 -0
- package/dist/types/session-state.d.ts +15 -0
- package/dist/types/session-state.d.ts.map +1 -0
- package/dist/types/session-state.js +3 -0
- package/dist/types/session-state.js.map +1 -0
- package/dist/types/type-structures.d.ts +42 -0
- package/dist/types/type-structures.d.ts.map +1 -0
- package/dist/types/type-structures.js +32 -0
- package/dist/types/type-structures.js.map +1 -0
- package/dist/types/workflow-comparison.d.ts +51 -0
- package/dist/types/workflow-comparison.d.ts.map +1 -0
- package/dist/types/workflow-comparison.js +3 -0
- package/dist/types/workflow-comparison.js.map +1 -0
- package/dist/types/workflow-diff.d.ts +148 -0
- package/dist/types/workflow-diff.d.ts.map +1 -0
- package/dist/types/workflow-diff.js +15 -0
- package/dist/types/workflow-diff.js.map +1 -0
- package/dist/utils/auth.d.ts +13 -0
- package/dist/utils/auth.d.ts.map +1 -0
- package/dist/utils/auth.js +82 -0
- package/dist/utils/auth.js.map +1 -0
- package/dist/utils/bridge.d.ts +12 -0
- package/dist/utils/bridge.d.ts.map +1 -0
- package/dist/utils/bridge.js +127 -0
- package/dist/utils/bridge.js.map +1 -0
- package/dist/utils/cache-utils.d.ts +58 -0
- package/dist/utils/cache-utils.d.ts.map +1 -0
- package/dist/utils/cache-utils.js +243 -0
- package/dist/utils/cache-utils.js.map +1 -0
- package/dist/utils/console-manager.d.ts +10 -0
- package/dist/utils/console-manager.d.ts.map +1 -0
- package/dist/utils/console-manager.js +63 -0
- package/dist/utils/console-manager.js.map +1 -0
- package/dist/utils/documentation-fetcher.d.ts +2 -0
- package/dist/utils/documentation-fetcher.d.ts.map +1 -0
- package/dist/utils/documentation-fetcher.js +18 -0
- package/dist/utils/documentation-fetcher.js.map +1 -0
- package/dist/utils/enhanced-documentation-fetcher.d.ts +74 -0
- package/dist/utils/enhanced-documentation-fetcher.d.ts.map +1 -0
- package/dist/utils/enhanced-documentation-fetcher.js +521 -0
- package/dist/utils/enhanced-documentation-fetcher.js.map +1 -0
- package/dist/utils/error-handler.d.ts +24 -0
- package/dist/utils/error-handler.d.ts.map +1 -0
- package/dist/utils/error-handler.js +84 -0
- package/dist/utils/error-handler.js.map +1 -0
- package/dist/utils/example-generator.d.ts +8 -0
- package/dist/utils/example-generator.d.ts.map +1 -0
- package/dist/utils/example-generator.js +106 -0
- package/dist/utils/example-generator.js.map +1 -0
- package/dist/utils/expression-utils.d.ts +6 -0
- package/dist/utils/expression-utils.d.ts.map +1 -0
- package/dist/utils/expression-utils.js +47 -0
- package/dist/utils/expression-utils.js.map +1 -0
- package/dist/utils/fixed-collection-validator.d.ts +35 -0
- package/dist/utils/fixed-collection-validator.d.ts.map +1 -0
- package/dist/utils/fixed-collection-validator.js +358 -0
- package/dist/utils/fixed-collection-validator.js.map +1 -0
- package/dist/utils/logger.d.ts +33 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +101 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/mcp-client.d.ts +21 -0
- package/dist/utils/mcp-client.d.ts.map +1 -0
- package/dist/utils/mcp-client.js +96 -0
- package/dist/utils/mcp-client.js.map +1 -0
- package/dist/utils/n8n-errors.d.ts +27 -0
- package/dist/utils/n8n-errors.d.ts.map +1 -0
- package/dist/utils/n8n-errors.js +138 -0
- package/dist/utils/n8n-errors.js.map +1 -0
- package/dist/utils/node-classification.d.ts +5 -0
- package/dist/utils/node-classification.d.ts.map +1 -0
- package/dist/utils/node-classification.js +31 -0
- package/dist/utils/node-classification.js.map +1 -0
- package/dist/utils/node-source-extractor.d.ts +21 -0
- package/dist/utils/node-source-extractor.d.ts.map +1 -0
- package/dist/utils/node-source-extractor.js +377 -0
- package/dist/utils/node-source-extractor.js.map +1 -0
- package/dist/utils/node-type-normalizer.d.ts +17 -0
- package/dist/utils/node-type-normalizer.d.ts.map +1 -0
- package/dist/utils/node-type-normalizer.js +87 -0
- package/dist/utils/node-type-normalizer.js.map +1 -0
- package/dist/utils/node-type-utils.d.ts +12 -0
- package/dist/utils/node-type-utils.d.ts.map +1 -0
- package/dist/utils/node-type-utils.js +126 -0
- package/dist/utils/node-type-utils.js.map +1 -0
- package/dist/utils/node-utils.d.ts +4 -0
- package/dist/utils/node-utils.d.ts.map +1 -0
- package/dist/utils/node-utils.js +81 -0
- package/dist/utils/node-utils.js.map +1 -0
- package/dist/utils/npm-version-checker.d.ts +14 -0
- package/dist/utils/npm-version-checker.d.ts.map +1 -0
- package/dist/utils/npm-version-checker.js +125 -0
- package/dist/utils/npm-version-checker.js.map +1 -0
- package/dist/utils/protocol-version.d.ts +19 -0
- package/dist/utils/protocol-version.d.ts.map +1 -0
- package/dist/utils/protocol-version.js +95 -0
- package/dist/utils/protocol-version.js.map +1 -0
- package/dist/utils/simple-cache.d.ts +10 -0
- package/dist/utils/simple-cache.d.ts.map +1 -0
- package/dist/utils/simple-cache.js +42 -0
- package/dist/utils/simple-cache.js.map +1 -0
- package/dist/utils/ssrf-protection.d.ts +7 -0
- package/dist/utils/ssrf-protection.d.ts.map +1 -0
- package/dist/utils/ssrf-protection.js +118 -0
- package/dist/utils/ssrf-protection.js.map +1 -0
- package/dist/utils/template-node-resolver.d.ts +2 -0
- package/dist/utils/template-node-resolver.d.ts.map +1 -0
- package/dist/utils/template-node-resolver.js +161 -0
- package/dist/utils/template-node-resolver.js.map +1 -0
- package/dist/utils/template-sanitizer.d.ts +21 -0
- package/dist/utils/template-sanitizer.d.ts.map +1 -0
- package/dist/utils/template-sanitizer.js +126 -0
- package/dist/utils/template-sanitizer.js.map +1 -0
- package/dist/utils/url-detector.d.ts +9 -0
- package/dist/utils/url-detector.d.ts.map +1 -0
- package/dist/utils/url-detector.js +79 -0
- package/dist/utils/url-detector.js.map +1 -0
- package/dist/utils/validation-schemas.d.ts +32 -0
- package/dist/utils/validation-schemas.d.ts.map +1 -0
- package/dist/utils/validation-schemas.js +219 -0
- package/dist/utils/validation-schemas.js.map +1 -0
- package/dist/utils/version.d.ts +2 -0
- package/dist/utils/version.d.ts.map +1 -0
- package/dist/utils/version.js +18 -0
- package/dist/utils/version.js.map +1 -0
- package/package.json +178 -0
- package/package.runtime.json +24 -0
|
@@ -0,0 +1,724 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ConfigValidator = void 0;
|
|
4
|
+
const expression_utils_js_1 = require("../utils/expression-utils.js");
|
|
5
|
+
class ConfigValidator {
|
|
6
|
+
static validate(nodeType, config, properties, userProvidedKeys) {
|
|
7
|
+
if (!config || typeof config !== 'object') {
|
|
8
|
+
throw new TypeError('Config must be a non-null object');
|
|
9
|
+
}
|
|
10
|
+
if (!properties || !Array.isArray(properties)) {
|
|
11
|
+
throw new TypeError('Properties must be a non-null array');
|
|
12
|
+
}
|
|
13
|
+
const errors = [];
|
|
14
|
+
const warnings = [];
|
|
15
|
+
const suggestions = [];
|
|
16
|
+
const visibleProperties = [];
|
|
17
|
+
const hiddenProperties = [];
|
|
18
|
+
const autofix = {};
|
|
19
|
+
this.checkRequiredProperties(properties, config, errors);
|
|
20
|
+
const { visible, hidden } = this.getPropertyVisibility(properties, config);
|
|
21
|
+
visibleProperties.push(...visible);
|
|
22
|
+
hiddenProperties.push(...hidden);
|
|
23
|
+
this.validatePropertyTypes(properties, config, errors);
|
|
24
|
+
this.performNodeSpecificValidation(nodeType, config, errors, warnings, suggestions, autofix);
|
|
25
|
+
this.checkCommonIssues(nodeType, config, properties, warnings, suggestions, userProvidedKeys);
|
|
26
|
+
this.performSecurityChecks(nodeType, config, warnings);
|
|
27
|
+
return {
|
|
28
|
+
valid: errors.length === 0,
|
|
29
|
+
errors,
|
|
30
|
+
warnings,
|
|
31
|
+
suggestions,
|
|
32
|
+
visibleProperties,
|
|
33
|
+
hiddenProperties,
|
|
34
|
+
autofix: Object.keys(autofix).length > 0 ? autofix : undefined
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
static validateBatch(configs) {
|
|
38
|
+
return configs.map(({ nodeType, config, properties }) => this.validate(nodeType, config, properties));
|
|
39
|
+
}
|
|
40
|
+
static checkRequiredProperties(properties, config, errors) {
|
|
41
|
+
for (const prop of properties) {
|
|
42
|
+
if (!prop || !prop.name)
|
|
43
|
+
continue;
|
|
44
|
+
if (prop.required) {
|
|
45
|
+
const value = config[prop.name];
|
|
46
|
+
if (!(prop.name in config)) {
|
|
47
|
+
errors.push({
|
|
48
|
+
type: 'missing_required',
|
|
49
|
+
property: prop.name,
|
|
50
|
+
message: `Required property '${prop.displayName || prop.name}' is missing`,
|
|
51
|
+
fix: `Add ${prop.name} to your configuration`
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
else if (value === null || value === undefined) {
|
|
55
|
+
errors.push({
|
|
56
|
+
type: 'invalid_type',
|
|
57
|
+
property: prop.name,
|
|
58
|
+
message: `Required property '${prop.displayName || prop.name}' cannot be null or undefined`,
|
|
59
|
+
fix: `Provide a valid value for ${prop.name}`
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
else if (typeof value === 'string' && value.trim() === '') {
|
|
63
|
+
errors.push({
|
|
64
|
+
type: 'missing_required',
|
|
65
|
+
property: prop.name,
|
|
66
|
+
message: `Required property '${prop.displayName || prop.name}' cannot be empty`,
|
|
67
|
+
fix: `Provide a valid value for ${prop.name}`
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
static getPropertyVisibility(properties, config) {
|
|
74
|
+
const visible = [];
|
|
75
|
+
const hidden = [];
|
|
76
|
+
for (const prop of properties) {
|
|
77
|
+
if (this.isPropertyVisible(prop, config)) {
|
|
78
|
+
visible.push(prop.name);
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
hidden.push(prop.name);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
return { visible, hidden };
|
|
85
|
+
}
|
|
86
|
+
static evaluateCondition(condition, configValue) {
|
|
87
|
+
const cnd = condition._cnd;
|
|
88
|
+
if ('eq' in cnd)
|
|
89
|
+
return configValue === cnd.eq;
|
|
90
|
+
if ('not' in cnd)
|
|
91
|
+
return configValue !== cnd.not;
|
|
92
|
+
if ('gte' in cnd)
|
|
93
|
+
return configValue >= cnd.gte;
|
|
94
|
+
if ('lte' in cnd)
|
|
95
|
+
return configValue <= cnd.lte;
|
|
96
|
+
if ('gt' in cnd)
|
|
97
|
+
return configValue > cnd.gt;
|
|
98
|
+
if ('lt' in cnd)
|
|
99
|
+
return configValue < cnd.lt;
|
|
100
|
+
if ('between' in cnd) {
|
|
101
|
+
const between = cnd.between;
|
|
102
|
+
if (!between || typeof between.from === 'undefined' || typeof between.to === 'undefined') {
|
|
103
|
+
return false;
|
|
104
|
+
}
|
|
105
|
+
return configValue >= between.from && configValue <= between.to;
|
|
106
|
+
}
|
|
107
|
+
if ('startsWith' in cnd) {
|
|
108
|
+
return typeof configValue === 'string' && configValue.startsWith(cnd.startsWith);
|
|
109
|
+
}
|
|
110
|
+
if ('endsWith' in cnd) {
|
|
111
|
+
return typeof configValue === 'string' && configValue.endsWith(cnd.endsWith);
|
|
112
|
+
}
|
|
113
|
+
if ('includes' in cnd) {
|
|
114
|
+
return typeof configValue === 'string' && configValue.includes(cnd.includes);
|
|
115
|
+
}
|
|
116
|
+
if ('regex' in cnd) {
|
|
117
|
+
if (typeof configValue !== 'string')
|
|
118
|
+
return false;
|
|
119
|
+
try {
|
|
120
|
+
return new RegExp(cnd.regex).test(configValue);
|
|
121
|
+
}
|
|
122
|
+
catch {
|
|
123
|
+
return false;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
if ('exists' in cnd) {
|
|
127
|
+
return configValue !== undefined && configValue !== null;
|
|
128
|
+
}
|
|
129
|
+
return false;
|
|
130
|
+
}
|
|
131
|
+
static valueMatches(expectedValue, configValue) {
|
|
132
|
+
if (expectedValue && typeof expectedValue === 'object' && '_cnd' in expectedValue) {
|
|
133
|
+
return this.evaluateCondition(expectedValue, configValue);
|
|
134
|
+
}
|
|
135
|
+
return configValue === expectedValue;
|
|
136
|
+
}
|
|
137
|
+
static isPropertyVisible(prop, config) {
|
|
138
|
+
if (!prop.displayOptions)
|
|
139
|
+
return true;
|
|
140
|
+
if (prop.displayOptions.show) {
|
|
141
|
+
for (const [key, values] of Object.entries(prop.displayOptions.show)) {
|
|
142
|
+
const configValue = config[key];
|
|
143
|
+
const expectedValues = Array.isArray(values) ? values : [values];
|
|
144
|
+
const anyMatch = expectedValues.some(expected => this.valueMatches(expected, configValue));
|
|
145
|
+
if (!anyMatch) {
|
|
146
|
+
return false;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
if (prop.displayOptions.hide) {
|
|
151
|
+
for (const [key, values] of Object.entries(prop.displayOptions.hide)) {
|
|
152
|
+
const configValue = config[key];
|
|
153
|
+
const expectedValues = Array.isArray(values) ? values : [values];
|
|
154
|
+
const anyMatch = expectedValues.some(expected => this.valueMatches(expected, configValue));
|
|
155
|
+
if (anyMatch) {
|
|
156
|
+
return false;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
return true;
|
|
161
|
+
}
|
|
162
|
+
static validatePropertyTypes(properties, config, errors) {
|
|
163
|
+
for (const [key, value] of Object.entries(config)) {
|
|
164
|
+
const prop = properties.find(p => p.name === key);
|
|
165
|
+
if (!prop)
|
|
166
|
+
continue;
|
|
167
|
+
if (prop.type === 'string' && typeof value !== 'string') {
|
|
168
|
+
errors.push({
|
|
169
|
+
type: 'invalid_type',
|
|
170
|
+
property: key,
|
|
171
|
+
message: `Property '${key}' must be a string, got ${typeof value}`,
|
|
172
|
+
fix: `Change ${key} to a string value`
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
else if (prop.type === 'number' && typeof value !== 'number') {
|
|
176
|
+
errors.push({
|
|
177
|
+
type: 'invalid_type',
|
|
178
|
+
property: key,
|
|
179
|
+
message: `Property '${key}' must be a number, got ${typeof value}`,
|
|
180
|
+
fix: `Change ${key} to a number`
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
else if (prop.type === 'boolean' && typeof value !== 'boolean') {
|
|
184
|
+
errors.push({
|
|
185
|
+
type: 'invalid_type',
|
|
186
|
+
property: key,
|
|
187
|
+
message: `Property '${key}' must be a boolean, got ${typeof value}`,
|
|
188
|
+
fix: `Change ${key} to true or false`
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
else if (prop.type === 'resourceLocator') {
|
|
192
|
+
if (typeof value !== 'object' || value === null || Array.isArray(value)) {
|
|
193
|
+
const fixValue = typeof value === 'string' ? value : JSON.stringify(value);
|
|
194
|
+
errors.push({
|
|
195
|
+
type: 'invalid_type',
|
|
196
|
+
property: key,
|
|
197
|
+
message: `Property '${key}' is a resourceLocator and must be an object with 'mode' and 'value' properties, got ${typeof value}`,
|
|
198
|
+
fix: `Change ${key} to { mode: "list", value: ${JSON.stringify(fixValue)} } or { mode: "id", value: ${JSON.stringify(fixValue)} }`
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
else {
|
|
202
|
+
if (!value.mode) {
|
|
203
|
+
errors.push({
|
|
204
|
+
type: 'missing_required',
|
|
205
|
+
property: `${key}.mode`,
|
|
206
|
+
message: `resourceLocator '${key}' is missing required property 'mode'`,
|
|
207
|
+
fix: `Add mode property: { mode: "list", value: ${JSON.stringify(value.value || '')} }`
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
else if (typeof value.mode !== 'string') {
|
|
211
|
+
errors.push({
|
|
212
|
+
type: 'invalid_type',
|
|
213
|
+
property: `${key}.mode`,
|
|
214
|
+
message: `resourceLocator '${key}.mode' must be a string, got ${typeof value.mode}`,
|
|
215
|
+
fix: `Set mode to a valid string value`
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
else if (prop.modes) {
|
|
219
|
+
const modes = prop.modes;
|
|
220
|
+
if (!modes || typeof modes !== 'object') {
|
|
221
|
+
continue;
|
|
222
|
+
}
|
|
223
|
+
let allowedModes = [];
|
|
224
|
+
if (Array.isArray(modes)) {
|
|
225
|
+
allowedModes = modes
|
|
226
|
+
.map(m => (typeof m === 'object' && m !== null) ? m.name : m)
|
|
227
|
+
.filter(m => typeof m === 'string' && m.length > 0);
|
|
228
|
+
}
|
|
229
|
+
else {
|
|
230
|
+
allowedModes = Object.keys(modes).filter(k => k.length > 0);
|
|
231
|
+
}
|
|
232
|
+
if (allowedModes.length > 0 && !allowedModes.includes(value.mode)) {
|
|
233
|
+
errors.push({
|
|
234
|
+
type: 'invalid_value',
|
|
235
|
+
property: `${key}.mode`,
|
|
236
|
+
message: `resourceLocator '${key}.mode' must be one of [${allowedModes.join(', ')}], got '${value.mode}'`,
|
|
237
|
+
fix: `Change mode to one of: ${allowedModes.join(', ')}`
|
|
238
|
+
});
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
if (value.value === undefined) {
|
|
242
|
+
errors.push({
|
|
243
|
+
type: 'missing_required',
|
|
244
|
+
property: `${key}.value`,
|
|
245
|
+
message: `resourceLocator '${key}' is missing required property 'value'`,
|
|
246
|
+
fix: `Add value property to specify the ${prop.displayName || key}`
|
|
247
|
+
});
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
if (prop.type === 'options' && prop.options) {
|
|
252
|
+
const validValues = prop.options.map((opt) => typeof opt === 'string' ? opt : opt.value);
|
|
253
|
+
if (!validValues.includes(value)) {
|
|
254
|
+
errors.push({
|
|
255
|
+
type: 'invalid_value',
|
|
256
|
+
property: key,
|
|
257
|
+
message: `Invalid value for '${key}'. Must be one of: ${validValues.join(', ')}`,
|
|
258
|
+
fix: `Change ${key} to one of the valid options`
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
static performNodeSpecificValidation(nodeType, config, errors, warnings, suggestions, autofix) {
|
|
265
|
+
switch (nodeType) {
|
|
266
|
+
case 'nodes-base.httpRequest':
|
|
267
|
+
this.validateHttpRequest(config, errors, warnings, suggestions, autofix);
|
|
268
|
+
break;
|
|
269
|
+
case 'nodes-base.webhook':
|
|
270
|
+
this.validateWebhook(config, warnings, suggestions);
|
|
271
|
+
break;
|
|
272
|
+
case 'nodes-base.postgres':
|
|
273
|
+
case 'nodes-base.mysql':
|
|
274
|
+
this.validateDatabase(config, warnings, suggestions);
|
|
275
|
+
break;
|
|
276
|
+
case 'nodes-base.code':
|
|
277
|
+
this.validateCode(config, errors, warnings);
|
|
278
|
+
break;
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
static validateHttpRequest(config, errors, warnings, suggestions, autofix) {
|
|
282
|
+
if (config.url && typeof config.url === 'string') {
|
|
283
|
+
if (!(0, expression_utils_js_1.shouldSkipLiteralValidation)(config.url)) {
|
|
284
|
+
if (!config.url.startsWith('http://') && !config.url.startsWith('https://')) {
|
|
285
|
+
errors.push({
|
|
286
|
+
type: 'invalid_value',
|
|
287
|
+
property: 'url',
|
|
288
|
+
message: 'URL must start with http:// or https://',
|
|
289
|
+
fix: 'Add https:// to the beginning of your URL'
|
|
290
|
+
});
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
if (['POST', 'PUT', 'PATCH'].includes(config.method) && !config.sendBody) {
|
|
295
|
+
warnings.push({
|
|
296
|
+
type: 'missing_common',
|
|
297
|
+
property: 'sendBody',
|
|
298
|
+
message: `${config.method} requests typically send a body`,
|
|
299
|
+
suggestion: 'Set sendBody=true and configure the body content'
|
|
300
|
+
});
|
|
301
|
+
autofix.sendBody = true;
|
|
302
|
+
autofix.contentType = 'json';
|
|
303
|
+
}
|
|
304
|
+
if (!config.authentication || config.authentication === 'none') {
|
|
305
|
+
if (config.url?.includes('api.') || config.url?.includes('/api/')) {
|
|
306
|
+
warnings.push({
|
|
307
|
+
type: 'security',
|
|
308
|
+
message: 'API endpoints typically require authentication',
|
|
309
|
+
suggestion: 'Consider setting authentication if the API requires it'
|
|
310
|
+
});
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
if (config.sendBody && config.contentType === 'json' && config.jsonBody) {
|
|
314
|
+
if (!(0, expression_utils_js_1.shouldSkipLiteralValidation)(config.jsonBody)) {
|
|
315
|
+
try {
|
|
316
|
+
JSON.parse(config.jsonBody);
|
|
317
|
+
}
|
|
318
|
+
catch (e) {
|
|
319
|
+
const errorMsg = e instanceof Error ? e.message : 'Unknown parsing error';
|
|
320
|
+
errors.push({
|
|
321
|
+
type: 'invalid_value',
|
|
322
|
+
property: 'jsonBody',
|
|
323
|
+
message: `jsonBody contains invalid JSON: ${errorMsg}`,
|
|
324
|
+
fix: 'Fix JSON syntax error and ensure valid JSON format'
|
|
325
|
+
});
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
static validateWebhook(config, warnings, suggestions) {
|
|
331
|
+
if (config.responseMode === 'responseNode' && !config.responseData) {
|
|
332
|
+
suggestions.push('When using responseMode=responseNode, add a "Respond to Webhook" node to send custom responses');
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
static validateDatabase(config, warnings, suggestions) {
|
|
336
|
+
if (config.query) {
|
|
337
|
+
const query = config.query.toLowerCase();
|
|
338
|
+
if (query.includes('${') || query.includes('{{')) {
|
|
339
|
+
warnings.push({
|
|
340
|
+
type: 'security',
|
|
341
|
+
message: 'Query contains template expressions that might be vulnerable to SQL injection',
|
|
342
|
+
suggestion: 'Use parameterized queries with additionalFields.queryParams instead'
|
|
343
|
+
});
|
|
344
|
+
}
|
|
345
|
+
if (query.includes('delete') && !query.includes('where')) {
|
|
346
|
+
warnings.push({
|
|
347
|
+
type: 'security',
|
|
348
|
+
message: 'DELETE query without WHERE clause will delete all records',
|
|
349
|
+
suggestion: 'Add a WHERE clause to limit the deletion'
|
|
350
|
+
});
|
|
351
|
+
}
|
|
352
|
+
if (query.includes('select *')) {
|
|
353
|
+
suggestions.push('Consider selecting specific columns instead of * for better performance');
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
static validateCode(config, errors, warnings) {
|
|
358
|
+
const codeField = config.language === 'python' ? 'pythonCode' : 'jsCode';
|
|
359
|
+
const code = config[codeField];
|
|
360
|
+
if (!code || code.trim() === '') {
|
|
361
|
+
errors.push({
|
|
362
|
+
type: 'missing_required',
|
|
363
|
+
property: codeField,
|
|
364
|
+
message: 'Code cannot be empty',
|
|
365
|
+
fix: 'Add your code logic'
|
|
366
|
+
});
|
|
367
|
+
return;
|
|
368
|
+
}
|
|
369
|
+
if (code?.includes('eval(') || code?.includes('exec(')) {
|
|
370
|
+
warnings.push({
|
|
371
|
+
type: 'security',
|
|
372
|
+
message: 'Code contains eval/exec which can be a security risk',
|
|
373
|
+
suggestion: 'Avoid using eval/exec with untrusted input'
|
|
374
|
+
});
|
|
375
|
+
}
|
|
376
|
+
if (config.language === 'python') {
|
|
377
|
+
this.validatePythonSyntax(code, errors, warnings);
|
|
378
|
+
}
|
|
379
|
+
else {
|
|
380
|
+
this.validateJavaScriptSyntax(code, errors, warnings);
|
|
381
|
+
}
|
|
382
|
+
this.validateN8nCodePatterns(code, config.language || 'javascript', errors, warnings);
|
|
383
|
+
}
|
|
384
|
+
static checkCommonIssues(nodeType, config, properties, warnings, suggestions, userProvidedKeys) {
|
|
385
|
+
if (nodeType === 'nodes-base.code') {
|
|
386
|
+
return;
|
|
387
|
+
}
|
|
388
|
+
const visibleProps = properties.filter(p => this.isPropertyVisible(p, config));
|
|
389
|
+
const configuredKeys = Object.keys(config);
|
|
390
|
+
for (const key of configuredKeys) {
|
|
391
|
+
if (key === '@version' || key.startsWith('_')) {
|
|
392
|
+
continue;
|
|
393
|
+
}
|
|
394
|
+
if (userProvidedKeys && !userProvidedKeys.has(key)) {
|
|
395
|
+
continue;
|
|
396
|
+
}
|
|
397
|
+
const prop = properties.find(p => p.name === key);
|
|
398
|
+
if (prop && this.UI_ONLY_TYPES.includes(prop.type)) {
|
|
399
|
+
continue;
|
|
400
|
+
}
|
|
401
|
+
if (!visibleProps.find(p => p.name === key)) {
|
|
402
|
+
const visibilityReq = this.getVisibilityRequirement(prop, config);
|
|
403
|
+
warnings.push({
|
|
404
|
+
type: 'inefficient',
|
|
405
|
+
property: key,
|
|
406
|
+
message: `Property '${prop?.displayName || key}' won't be used - not visible with current settings`,
|
|
407
|
+
suggestion: visibilityReq || 'Remove this property or adjust other settings to make it visible'
|
|
408
|
+
});
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
const commonProps = ['authentication', 'errorHandling', 'timeout'];
|
|
412
|
+
for (const prop of commonProps) {
|
|
413
|
+
const propDef = properties.find(p => p.name === prop);
|
|
414
|
+
if (propDef && this.isPropertyVisible(propDef, config) && !(prop in config)) {
|
|
415
|
+
suggestions.push(`Consider setting '${prop}' for better control`);
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
static performSecurityChecks(nodeType, config, warnings) {
|
|
420
|
+
const sensitivePatterns = [
|
|
421
|
+
/api[_-]?key/i,
|
|
422
|
+
/password/i,
|
|
423
|
+
/secret/i,
|
|
424
|
+
/token/i,
|
|
425
|
+
/credential/i
|
|
426
|
+
];
|
|
427
|
+
for (const [key, value] of Object.entries(config)) {
|
|
428
|
+
if (typeof value === 'string') {
|
|
429
|
+
for (const pattern of sensitivePatterns) {
|
|
430
|
+
if (pattern.test(key) && value.length > 0 && !value.includes('{{')) {
|
|
431
|
+
warnings.push({
|
|
432
|
+
type: 'security',
|
|
433
|
+
property: key,
|
|
434
|
+
message: `Hardcoded ${key} detected`,
|
|
435
|
+
suggestion: 'Use n8n credentials or expressions instead of hardcoding sensitive values'
|
|
436
|
+
});
|
|
437
|
+
break;
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
static getVisibilityRequirement(prop, config) {
|
|
444
|
+
if (!prop || !prop.displayOptions?.show) {
|
|
445
|
+
return undefined;
|
|
446
|
+
}
|
|
447
|
+
const requirements = [];
|
|
448
|
+
for (const [field, values] of Object.entries(prop.displayOptions.show)) {
|
|
449
|
+
const expectedValues = Array.isArray(values) ? values : [values];
|
|
450
|
+
const currentValue = config[field];
|
|
451
|
+
if (!expectedValues.includes(currentValue)) {
|
|
452
|
+
const valueStr = expectedValues.length === 1
|
|
453
|
+
? `"${expectedValues[0]}"`
|
|
454
|
+
: expectedValues.map(v => `"${v}"`).join(' or ');
|
|
455
|
+
requirements.push(`${field}=${valueStr}`);
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
if (requirements.length === 0) {
|
|
459
|
+
return undefined;
|
|
460
|
+
}
|
|
461
|
+
return `Requires: ${requirements.join(', ')}`;
|
|
462
|
+
}
|
|
463
|
+
static validateJavaScriptSyntax(code, errors, warnings) {
|
|
464
|
+
const openBraces = (code.match(/\{/g) || []).length;
|
|
465
|
+
const closeBraces = (code.match(/\}/g) || []).length;
|
|
466
|
+
if (openBraces !== closeBraces) {
|
|
467
|
+
errors.push({
|
|
468
|
+
type: 'invalid_value',
|
|
469
|
+
property: 'jsCode',
|
|
470
|
+
message: 'Unbalanced braces detected',
|
|
471
|
+
fix: 'Check that all { have matching }'
|
|
472
|
+
});
|
|
473
|
+
}
|
|
474
|
+
const openParens = (code.match(/\(/g) || []).length;
|
|
475
|
+
const closeParens = (code.match(/\)/g) || []).length;
|
|
476
|
+
if (openParens !== closeParens) {
|
|
477
|
+
errors.push({
|
|
478
|
+
type: 'invalid_value',
|
|
479
|
+
property: 'jsCode',
|
|
480
|
+
message: 'Unbalanced parentheses detected',
|
|
481
|
+
fix: 'Check that all ( have matching )'
|
|
482
|
+
});
|
|
483
|
+
}
|
|
484
|
+
const stringMatches = code.match(/(["'`])(?:(?=(\\?))\2.)*?\1/g) || [];
|
|
485
|
+
const quotesInStrings = stringMatches.join('').match(/["'`]/g)?.length || 0;
|
|
486
|
+
const totalQuotes = (code.match(/["'`]/g) || []).length;
|
|
487
|
+
if ((totalQuotes - quotesInStrings) % 2 !== 0) {
|
|
488
|
+
warnings.push({
|
|
489
|
+
type: 'inefficient',
|
|
490
|
+
message: 'Possible unterminated string detected',
|
|
491
|
+
suggestion: 'Check that all strings are properly closed'
|
|
492
|
+
});
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
static validatePythonSyntax(code, errors, warnings) {
|
|
496
|
+
const lines = code.split('\n');
|
|
497
|
+
const indentTypes = new Set();
|
|
498
|
+
lines.forEach(line => {
|
|
499
|
+
const indent = line.match(/^(\s+)/);
|
|
500
|
+
if (indent) {
|
|
501
|
+
if (indent[1].includes('\t'))
|
|
502
|
+
indentTypes.add('tabs');
|
|
503
|
+
if (indent[1].includes(' '))
|
|
504
|
+
indentTypes.add('spaces');
|
|
505
|
+
}
|
|
506
|
+
});
|
|
507
|
+
if (indentTypes.size > 1) {
|
|
508
|
+
errors.push({
|
|
509
|
+
type: 'syntax_error',
|
|
510
|
+
property: 'pythonCode',
|
|
511
|
+
message: 'Mixed indentation (tabs and spaces)',
|
|
512
|
+
fix: 'Use either tabs or spaces consistently, not both'
|
|
513
|
+
});
|
|
514
|
+
}
|
|
515
|
+
const openSquare = (code.match(/\[/g) || []).length;
|
|
516
|
+
const closeSquare = (code.match(/\]/g) || []).length;
|
|
517
|
+
if (openSquare !== closeSquare) {
|
|
518
|
+
errors.push({
|
|
519
|
+
type: 'syntax_error',
|
|
520
|
+
property: 'pythonCode',
|
|
521
|
+
message: 'Unmatched bracket - missing ] or extra [',
|
|
522
|
+
fix: 'Check that all [ have matching ]'
|
|
523
|
+
});
|
|
524
|
+
}
|
|
525
|
+
const openCurly = (code.match(/\{/g) || []).length;
|
|
526
|
+
const closeCurly = (code.match(/\}/g) || []).length;
|
|
527
|
+
if (openCurly !== closeCurly) {
|
|
528
|
+
errors.push({
|
|
529
|
+
type: 'syntax_error',
|
|
530
|
+
property: 'pythonCode',
|
|
531
|
+
message: 'Unmatched bracket - missing } or extra {',
|
|
532
|
+
fix: 'Check that all { have matching }'
|
|
533
|
+
});
|
|
534
|
+
}
|
|
535
|
+
const controlStructures = /^\s*(if|elif|else|for|while|def|class|try|except|finally|with)\s+.*[^:]\s*$/gm;
|
|
536
|
+
if (controlStructures.test(code)) {
|
|
537
|
+
warnings.push({
|
|
538
|
+
type: 'inefficient',
|
|
539
|
+
message: 'Missing colon after control structure',
|
|
540
|
+
suggestion: 'Add : at the end of if/for/def/class statements'
|
|
541
|
+
});
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
static validateN8nCodePatterns(code, language, errors, warnings) {
|
|
545
|
+
const hasReturn = language === 'python'
|
|
546
|
+
? /return\s+/.test(code)
|
|
547
|
+
: /return\s+/.test(code);
|
|
548
|
+
if (!hasReturn) {
|
|
549
|
+
warnings.push({
|
|
550
|
+
type: 'missing_common',
|
|
551
|
+
message: 'No return statement found',
|
|
552
|
+
suggestion: 'Code node must return data. Example: return [{json: {result: "success"}}]'
|
|
553
|
+
});
|
|
554
|
+
}
|
|
555
|
+
if (language === 'javascript' && hasReturn) {
|
|
556
|
+
if (/return\s+items\s*;/.test(code) && !code.includes('.map') && !code.includes('json:')) {
|
|
557
|
+
warnings.push({
|
|
558
|
+
type: 'best_practice',
|
|
559
|
+
message: 'Returning items directly - ensure each item has {json: ...} structure',
|
|
560
|
+
suggestion: 'If modifying items, use: return items.map(item => ({json: {...item.json, newField: "value"}}))'
|
|
561
|
+
});
|
|
562
|
+
}
|
|
563
|
+
if (/return\s+{[^}]+}\s*;/.test(code) && !code.includes('[') && !code.includes(']')) {
|
|
564
|
+
warnings.push({
|
|
565
|
+
type: 'invalid_value',
|
|
566
|
+
message: 'Return value must be an array',
|
|
567
|
+
suggestion: 'Wrap your return object in an array: return [{json: {your: "data"}}]'
|
|
568
|
+
});
|
|
569
|
+
}
|
|
570
|
+
if (/return\s+\[['"`]/.test(code) || /return\s+\[\d/.test(code)) {
|
|
571
|
+
warnings.push({
|
|
572
|
+
type: 'invalid_value',
|
|
573
|
+
message: 'Items must be objects with json property',
|
|
574
|
+
suggestion: 'Use format: return [{json: {value: "data"}}] not return ["data"]'
|
|
575
|
+
});
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
if (language === 'python' && hasReturn) {
|
|
579
|
+
if (code.includes('result = {"data": "value"}')) {
|
|
580
|
+
console.log('DEBUG: Processing Python code with result variable');
|
|
581
|
+
console.log('DEBUG: Language:', language);
|
|
582
|
+
console.log('DEBUG: Has return:', hasReturn);
|
|
583
|
+
}
|
|
584
|
+
if (/return\s+items\s*$/.test(code) && !code.includes('json') && !code.includes('dict')) {
|
|
585
|
+
warnings.push({
|
|
586
|
+
type: 'best_practice',
|
|
587
|
+
message: 'Returning items directly - ensure each item is a dict with "json" key',
|
|
588
|
+
suggestion: 'Use: return [{"json": item.json} for item in items]'
|
|
589
|
+
});
|
|
590
|
+
}
|
|
591
|
+
if (/return\s+{['"]/.test(code) && !code.includes('[') && !code.includes(']')) {
|
|
592
|
+
warnings.push({
|
|
593
|
+
type: 'invalid_value',
|
|
594
|
+
message: 'Return value must be a list',
|
|
595
|
+
suggestion: 'Wrap your return dict in a list: return [{"json": {"your": "data"}}]'
|
|
596
|
+
});
|
|
597
|
+
}
|
|
598
|
+
if (/return\s+(?!.*\[).*{(?!.*["']json["'])/.test(code)) {
|
|
599
|
+
warnings.push({
|
|
600
|
+
type: 'invalid_value',
|
|
601
|
+
message: 'Must return array of objects with json key',
|
|
602
|
+
suggestion: 'Use format: return [{"json": {"data": "value"}}]'
|
|
603
|
+
});
|
|
604
|
+
}
|
|
605
|
+
const returnMatch = code.match(/return\s+(\w+)\s*(?:#|$)/m);
|
|
606
|
+
if (returnMatch) {
|
|
607
|
+
const varName = returnMatch[1];
|
|
608
|
+
const assignmentRegex = new RegExp(`${varName}\\s*=\\s*{[^}]+}`, 'm');
|
|
609
|
+
if (assignmentRegex.test(code) && !new RegExp(`${varName}\\s*=\\s*\\[`).test(code)) {
|
|
610
|
+
warnings.push({
|
|
611
|
+
type: 'invalid_value',
|
|
612
|
+
message: 'Must return array of objects with json key',
|
|
613
|
+
suggestion: `Wrap ${varName} in a list with json key: return [{"json": ${varName}}]`
|
|
614
|
+
});
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
if (language === 'javascript') {
|
|
619
|
+
if (!code.includes('items') && !code.includes('$input') && !code.includes('$json')) {
|
|
620
|
+
warnings.push({
|
|
621
|
+
type: 'missing_common',
|
|
622
|
+
message: 'Code doesn\'t reference input data',
|
|
623
|
+
suggestion: 'Access input with: items, $input.all(), or $json (in single-item mode)'
|
|
624
|
+
});
|
|
625
|
+
}
|
|
626
|
+
if (code.includes('$json') && !code.includes('mode')) {
|
|
627
|
+
warnings.push({
|
|
628
|
+
type: 'best_practice',
|
|
629
|
+
message: '$json only works in "Run Once for Each Item" mode',
|
|
630
|
+
suggestion: 'For all items mode, use: items[0].json or loop through items'
|
|
631
|
+
});
|
|
632
|
+
}
|
|
633
|
+
const commonVars = ['$node', '$workflow', '$execution', '$prevNode', 'DateTime', 'jmespath'];
|
|
634
|
+
const usedVars = commonVars.filter(v => code.includes(v));
|
|
635
|
+
if (code.includes('$helpers.getWorkflowStaticData')) {
|
|
636
|
+
if (/\$helpers\.getWorkflowStaticData(?!\s*\()/.test(code)) {
|
|
637
|
+
errors.push({
|
|
638
|
+
type: 'invalid_value',
|
|
639
|
+
property: 'jsCode',
|
|
640
|
+
message: 'getWorkflowStaticData requires parentheses: $helpers.getWorkflowStaticData()',
|
|
641
|
+
fix: 'Add parentheses: $helpers.getWorkflowStaticData()'
|
|
642
|
+
});
|
|
643
|
+
}
|
|
644
|
+
else {
|
|
645
|
+
warnings.push({
|
|
646
|
+
type: 'invalid_value',
|
|
647
|
+
message: '$helpers.getWorkflowStaticData() is incorrect - causes "$helpers is not defined" error',
|
|
648
|
+
suggestion: 'Use $getWorkflowStaticData() as a standalone function (no $helpers prefix)'
|
|
649
|
+
});
|
|
650
|
+
}
|
|
651
|
+
}
|
|
652
|
+
if (code.includes('$helpers') && !code.includes('typeof $helpers')) {
|
|
653
|
+
warnings.push({
|
|
654
|
+
type: 'best_practice',
|
|
655
|
+
message: '$helpers is only available in Code nodes with mode="runOnceForEachItem"',
|
|
656
|
+
suggestion: 'Check availability first: if (typeof $helpers !== "undefined" && $helpers.httpRequest) { ... }'
|
|
657
|
+
});
|
|
658
|
+
}
|
|
659
|
+
if ((code.includes('fetch(') || code.includes('Promise') || code.includes('.then(')) && !code.includes('await')) {
|
|
660
|
+
warnings.push({
|
|
661
|
+
type: 'best_practice',
|
|
662
|
+
message: 'Async operation without await - will return a Promise instead of actual data',
|
|
663
|
+
suggestion: 'Use await with async operations: const result = await fetch(...);'
|
|
664
|
+
});
|
|
665
|
+
}
|
|
666
|
+
if ((code.includes('crypto.') || code.includes('randomBytes') || code.includes('randomUUID')) && !code.includes('require')) {
|
|
667
|
+
warnings.push({
|
|
668
|
+
type: 'invalid_value',
|
|
669
|
+
message: 'Using crypto without require statement',
|
|
670
|
+
suggestion: 'Add: const crypto = require("crypto"); at the beginning (ignore editor warnings)'
|
|
671
|
+
});
|
|
672
|
+
}
|
|
673
|
+
if (code.includes('console.log')) {
|
|
674
|
+
warnings.push({
|
|
675
|
+
type: 'best_practice',
|
|
676
|
+
message: 'console.log output appears in n8n execution logs',
|
|
677
|
+
suggestion: 'Remove console.log statements in production or use them sparingly'
|
|
678
|
+
});
|
|
679
|
+
}
|
|
680
|
+
}
|
|
681
|
+
else if (language === 'python') {
|
|
682
|
+
if (!code.includes('items') && !code.includes('_input')) {
|
|
683
|
+
warnings.push({
|
|
684
|
+
type: 'missing_common',
|
|
685
|
+
message: 'Code doesn\'t reference input items',
|
|
686
|
+
suggestion: 'Access input data with: items variable'
|
|
687
|
+
});
|
|
688
|
+
}
|
|
689
|
+
if (code.includes('print(')) {
|
|
690
|
+
warnings.push({
|
|
691
|
+
type: 'best_practice',
|
|
692
|
+
message: 'print() output appears in n8n execution logs',
|
|
693
|
+
suggestion: 'Remove print statements in production or use them sparingly'
|
|
694
|
+
});
|
|
695
|
+
}
|
|
696
|
+
if (code.includes('import requests') || code.includes('import pandas')) {
|
|
697
|
+
warnings.push({
|
|
698
|
+
type: 'invalid_value',
|
|
699
|
+
message: 'External libraries not available in Code node',
|
|
700
|
+
suggestion: 'Only Python standard library is available. For HTTP requests, use JavaScript with $helpers.httpRequest'
|
|
701
|
+
});
|
|
702
|
+
}
|
|
703
|
+
}
|
|
704
|
+
if (/while\s*\(\s*true\s*\)|while\s+True:/.test(code)) {
|
|
705
|
+
warnings.push({
|
|
706
|
+
type: 'security',
|
|
707
|
+
message: 'Infinite loop detected',
|
|
708
|
+
suggestion: 'Add a break condition or use a for loop with limits'
|
|
709
|
+
});
|
|
710
|
+
}
|
|
711
|
+
if (!code.includes('try') && !code.includes('catch') && !code.includes('except')) {
|
|
712
|
+
if (code.length > 200) {
|
|
713
|
+
warnings.push({
|
|
714
|
+
type: 'best_practice',
|
|
715
|
+
message: 'No error handling found',
|
|
716
|
+
suggestion: 'Consider adding try/catch (JavaScript) or try/except (Python) for robust error handling'
|
|
717
|
+
});
|
|
718
|
+
}
|
|
719
|
+
}
|
|
720
|
+
}
|
|
721
|
+
}
|
|
722
|
+
exports.ConfigValidator = ConfigValidator;
|
|
723
|
+
ConfigValidator.UI_ONLY_TYPES = ['notice', 'callout', 'infoBox', 'info'];
|
|
724
|
+
//# sourceMappingURL=config-validator.js.map
|