n8n 2.32.5 → 2.33.0
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/dist/active-workflow-manager.d.ts +4 -1
- package/dist/active-workflow-manager.js +18 -16
- package/dist/active-workflow-manager.js.map +1 -1
- package/dist/build.tsbuildinfo +1 -1
- package/dist/collaboration/collaboration.service.d.ts +1 -0
- package/dist/collaboration/collaboration.service.js +12 -1
- package/dist/collaboration/collaboration.service.js.map +1 -1
- package/dist/commands/base-command.d.ts +3 -2
- package/dist/commands/base-command.js +31 -23
- package/dist/commands/base-command.js.map +1 -1
- package/dist/commands/db/revert.js.map +1 -1
- package/dist/commands/import/credentials.d.ts +1 -1
- package/dist/commands/import/credentials.js +91 -25
- package/dist/commands/import/credentials.js.map +1 -1
- package/dist/commands/ldap/reset.js.map +1 -1
- package/dist/commands/start.d.ts +1 -0
- package/dist/commands/start.js +3 -1
- package/dist/commands/start.js.map +1 -1
- package/dist/commands/user-management/reset.js +1 -5
- package/dist/commands/user-management/reset.js.map +1 -1
- package/dist/commands/webhook.d.ts +1 -0
- package/dist/commands/webhook.js +1 -1
- package/dist/commands/webhook.js.map +1 -1
- package/dist/commands/worker.d.ts +1 -0
- package/dist/commands/worker.js +1 -1
- package/dist/commands/worker.js.map +1 -1
- package/dist/constants.js +19 -0
- package/dist/constants.js.map +1 -1
- package/dist/controllers/ai.controller.d.ts +4 -5
- package/dist/controllers/ai.controller.js +5 -22
- package/dist/controllers/ai.controller.js.map +1 -1
- package/dist/controllers/e2e.controller.d.ts +15 -2
- package/dist/controllers/e2e.controller.js +25 -2
- package/dist/controllers/e2e.controller.js.map +1 -1
- package/dist/controllers/oauth/oauth2-credential.controller.js +5 -1
- package/dist/controllers/oauth/oauth2-credential.controller.js.map +1 -1
- package/dist/controllers/project.controller.js.map +1 -1
- package/dist/controllers/role.controller.d.ts +2 -2
- package/dist/controllers/role.controller.js +4 -3
- package/dist/controllers/role.controller.js.map +1 -1
- package/dist/controllers/users.controller.d.ts +5 -0
- package/dist/controllers/users.controller.js +1 -0
- package/dist/controllers/users.controller.js.map +1 -1
- package/dist/credentials/credential-connection-status-proxy.js.map +1 -1
- package/dist/credentials/credential-dependency.service.js.map +1 -1
- package/dist/credentials/credentials-finder.service.d.ts +7 -2
- package/dist/credentials/credentials-finder.service.js +33 -8
- package/dist/credentials/credentials-finder.service.js.map +1 -1
- package/dist/credentials/credentials.controller.d.ts +6 -0
- package/dist/credentials/credentials.controller.js +44 -5
- package/dist/credentials/credentials.controller.js.map +1 -1
- package/dist/credentials/credentials.service.d.ts +38 -5
- package/dist/credentials/credentials.service.ee.d.ts +4 -2
- package/dist/credentials/credentials.service.ee.js +8 -7
- package/dist/credentials/credentials.service.ee.js.map +1 -1
- package/dist/credentials/credentials.service.js +227 -21
- package/dist/credentials/credentials.service.js.map +1 -1
- package/dist/credentials/instance-credential-broker.d.ts +24 -0
- package/dist/credentials/instance-credential-broker.js +80 -0
- package/dist/credentials/instance-credential-broker.js.map +1 -0
- package/dist/credentials/instance-credential-use.registry.d.ts +14 -0
- package/dist/credentials/instance-credential-use.registry.js +43 -0
- package/dist/credentials/instance-credential-use.registry.js.map +1 -0
- package/dist/credentials-helper.js +4 -0
- package/dist/credentials-helper.js.map +1 -1
- package/dist/credentials-overwrites.js +2 -1
- package/dist/credentials-overwrites.js.map +1 -1
- package/dist/errors/response-errors/workflow-deactivation-bad-request.error.d.ts +9 -0
- package/dist/errors/response-errors/workflow-deactivation-bad-request.error.js +13 -0
- package/dist/errors/response-errors/workflow-deactivation-bad-request.error.js.map +1 -0
- package/dist/evaluation.ee/evaluation-collection.service.d.ts +12 -2
- package/dist/evaluation.ee/evaluation-collection.service.js +132 -20
- package/dist/evaluation.ee/evaluation-collection.service.js.map +1 -1
- package/dist/evaluation.ee/evaluation-collections.controller.ee.d.ts +12 -0
- package/dist/evaluation.ee/evaluation-collections.controller.ee.js +12 -0
- package/dist/evaluation.ee/evaluation-collections.controller.ee.js.map +1 -1
- package/dist/evaluation.ee/insights/eval-insights.service.d.ts +11 -4
- package/dist/evaluation.ee/insights/eval-insights.service.js +136 -30
- package/dist/evaluation.ee/insights/eval-insights.service.js.map +1 -1
- package/dist/evaluation.ee/insights/insights-context-builder.d.ts +59 -0
- package/dist/evaluation.ee/insights/insights-context-builder.js +179 -0
- package/dist/evaluation.ee/insights/insights-context-builder.js.map +1 -0
- package/dist/evaluation.ee/insights/insights-model-resolver.d.ts +16 -0
- package/dist/evaluation.ee/insights/insights-model-resolver.js +65 -0
- package/dist/evaluation.ee/insights/insights-model-resolver.js.map +1 -0
- package/dist/evaluation.ee/metric-scales.d.ts +4 -0
- package/dist/evaluation.ee/metric-scales.js +13 -0
- package/dist/evaluation.ee/metric-scales.js.map +1 -0
- package/dist/evaluation.ee/test-runner/test-runner.service.ee.d.ts +5 -0
- package/dist/evaluation.ee/test-runner/test-runner.service.ee.js +40 -4
- package/dist/evaluation.ee/test-runner/test-runner.service.ee.js.map +1 -1
- package/dist/evaluation.ee/test-runner/workflow-compiler.service.d.ts +6 -1
- package/dist/evaluation.ee/test-runner/workflow-compiler.service.js +53 -4
- package/dist/evaluation.ee/test-runner/workflow-compiler.service.js.map +1 -1
- package/dist/evaluation.ee/test-runs.controller.ee.d.ts +4 -2
- package/dist/evaluation.ee/test-runs.controller.ee.js +26 -6
- package/dist/evaluation.ee/test-runs.controller.ee.js.map +1 -1
- package/dist/eventbus/message-event-bus/message-event-bus.js.map +1 -1
- package/dist/events/maps/workflow-publication-metrics.event-map.d.ts +2 -0
- package/dist/events/relays/telemetry.event-relay.js +5 -0
- package/dist/events/relays/telemetry.event-relay.js.map +1 -1
- package/dist/executions/execution-data/execution-data-json-store.d.ts +6 -4
- package/dist/executions/execution-data/execution-data-json-store.js +17 -5
- package/dist/executions/execution-data/execution-data-json-store.js.map +1 -1
- package/dist/executions/pre-execution-checks/credentials-permission-checker.d.ts +1 -0
- package/dist/executions/pre-execution-checks/credentials-permission-checker.js +17 -5
- package/dist/executions/pre-execution-checks/credentials-permission-checker.js.map +1 -1
- package/dist/external-hooks.d.ts +18 -9
- package/dist/external-hooks.js +13 -0
- package/dist/external-hooks.js.map +1 -1
- package/dist/license.d.ts +2 -0
- package/dist/license.js +13 -1
- package/dist/license.js.map +1 -1
- package/dist/metrics/prometheus/workflow-info-metrics.service.d.ts +4 -1
- package/dist/metrics/prometheus/workflow-info-metrics.service.js +27 -8
- package/dist/metrics/prometheus/workflow-info-metrics.service.js.map +1 -1
- package/dist/metrics/prometheus/workflow-publication-metrics.service.js +11 -1
- package/dist/metrics/prometheus/workflow-publication-metrics.service.js.map +1 -1
- package/dist/modules/agents/agent-chat.controller.js +10 -2
- package/dist/modules/agents/agent-chat.controller.js.map +1 -1
- package/dist/modules/agents/agent-config.service.js +1 -1
- package/dist/modules/agents/agent-config.service.js.map +1 -1
- package/dist/modules/agents/agent-execution-orchestrator.service.d.ts +7 -1
- package/dist/modules/agents/agent-execution-orchestrator.service.js +84 -43
- package/dist/modules/agents/agent-execution-orchestrator.service.js.map +1 -1
- package/dist/modules/agents/agent-execution.service.d.ts +12 -1
- package/dist/modules/agents/agent-execution.service.js +82 -7
- package/dist/modules/agents/agent-execution.service.js.map +1 -1
- package/dist/modules/agents/agent-integration-persistence.service.js +2 -2
- package/dist/modules/agents/agent-integration-persistence.service.js.map +1 -1
- package/dist/modules/agents/agent-integrations.controller.js +4 -2
- package/dist/modules/agents/agent-integrations.controller.js.map +1 -1
- package/dist/modules/agents/agent-knowledge-sandbox.service.js +5 -3
- package/dist/modules/agents/agent-knowledge-sandbox.service.js.map +1 -1
- package/dist/modules/agents/agent-knowledge.service.d.ts +0 -1
- package/dist/modules/agents/agent-knowledge.service.js +2 -9
- package/dist/modules/agents/agent-knowledge.service.js.map +1 -1
- package/dist/modules/agents/agent-model-catalog.service.js +1 -1
- package/dist/modules/agents/agent-model-catalog.service.js.map +1 -1
- package/dist/modules/agents/agent-publish.controller.js +2 -2
- package/dist/modules/agents/agent-publish.controller.js.map +1 -1
- package/dist/modules/agents/agent-publish.service.d.ts +7 -3
- package/dist/modules/agents/agent-publish.service.js +31 -8
- package/dist/modules/agents/agent-publish.service.js.map +1 -1
- package/dist/modules/agents/agent-run-tracing.service.d.ts +30 -0
- package/dist/modules/agents/agent-run-tracing.service.js +63 -0
- package/dist/modules/agents/agent-run-tracing.service.js.map +1 -0
- package/dist/modules/agents/agent-runtime-instrumentation.d.ts +26 -0
- package/dist/{blob-storage/types.js → modules/agents/agent-runtime-instrumentation.js} +1 -1
- package/dist/modules/agents/agent-runtime-instrumentation.js.map +1 -0
- package/dist/modules/agents/agent-runtime-reconstruction.service.d.ts +3 -1
- package/dist/modules/agents/agent-runtime-reconstruction.service.js +31 -8
- package/dist/modules/agents/agent-runtime-reconstruction.service.js.map +1 -1
- package/dist/modules/agents/agent-sse-stream.js +31 -6
- package/dist/modules/agents/agent-sse-stream.js.map +1 -1
- package/dist/modules/agents/agent-validation.service.d.ts +2 -1
- package/dist/modules/agents/agent-validation.service.js +21 -6
- package/dist/modules/agents/agent-validation.service.js.map +1 -1
- package/dist/modules/agents/agent-workflow-execution.service.d.ts +5 -3
- package/dist/modules/agents/agent-workflow-execution.service.js +31 -9
- package/dist/modules/agents/agent-workflow-execution.service.js.map +1 -1
- package/dist/modules/agents/agents-tools.service.js +12 -0
- package/dist/modules/agents/agents-tools.service.js.map +1 -1
- package/dist/modules/agents/agents.module.js +13 -0
- package/dist/modules/agents/agents.module.js.map +1 -1
- package/dist/modules/agents/agents.service.d.ts +3 -1
- package/dist/modules/agents/agents.service.js +5 -2
- package/dist/modules/agents/agents.service.js.map +1 -1
- package/dist/modules/agents/builder/agents-builder-model-recommendations.js +6 -4
- package/dist/modules/agents/builder/agents-builder-model-recommendations.js.map +1 -1
- package/dist/modules/agents/builder/agents-builder-prompts.d.ts +5 -4
- package/dist/modules/agents/builder/agents-builder-prompts.js +109 -34
- package/dist/modules/agents/builder/agents-builder-prompts.js.map +1 -1
- package/dist/modules/agents/builder/agents-builder-tools.service.d.ts +16 -2
- package/dist/modules/agents/builder/agents-builder-tools.service.js +201 -39
- package/dist/modules/agents/builder/agents-builder-tools.service.js.map +1 -1
- package/dist/modules/agents/builder/agents-builder.service.js +7 -2
- package/dist/modules/agents/builder/agents-builder.service.js.map +1 -1
- package/dist/modules/agents/builder/builder-config-telemetry.d.ts +12 -0
- package/dist/modules/agents/builder/builder-config-telemetry.js +67 -0
- package/dist/modules/agents/builder/builder-config-telemetry.js.map +1 -0
- package/dist/modules/agents/builder/builder-tool-names.d.ts +2 -0
- package/dist/modules/agents/builder/builder-tool-names.js +2 -0
- package/dist/modules/agents/builder/builder-tool-names.js.map +1 -1
- package/dist/modules/agents/builder/interactive/ask-credential.tool.d.ts +3 -0
- package/dist/modules/agents/builder/interactive/ask-credential.tool.js +35 -7
- package/dist/modules/agents/builder/interactive/ask-credential.tool.js.map +1 -1
- package/dist/modules/agents/builder/interactive/ask-questions.tool.d.ts +4 -1
- package/dist/modules/agents/builder/interactive/ask-questions.tool.js +13 -1
- package/dist/modules/agents/builder/interactive/ask-questions.tool.js.map +1 -1
- package/dist/modules/agents/builder/interactive/configure-channel.tool.d.ts +2 -0
- package/dist/modules/agents/builder/interactive/configure-channel.tool.js +7 -1
- package/dist/modules/agents/builder/interactive/configure-channel.tool.js.map +1 -1
- package/dist/modules/agents/builder/interactive/finish-setup.tool.d.ts +17 -0
- package/dist/modules/agents/builder/interactive/finish-setup.tool.js +316 -0
- package/dist/modules/agents/builder/interactive/finish-setup.tool.js.map +1 -0
- package/dist/modules/agents/builder/interactive/index.d.ts +1 -0
- package/dist/modules/agents/builder/interactive/index.js +3 -1
- package/dist/modules/agents/builder/interactive/index.js.map +1 -1
- package/dist/modules/agents/builder/interactive/resolve-llm.tool.d.ts +8 -0
- package/dist/modules/agents/builder/interactive/resolve-llm.tool.js +87 -6
- package/dist/modules/agents/builder/interactive/resolve-llm.tool.js.map +1 -1
- package/dist/modules/agents/builder/prompts/config-mutation.prompt.js +6 -5
- package/dist/modules/agents/builder/prompts/config-mutation.prompt.js.map +1 -1
- package/dist/modules/agents/builder/prompts/config-rules.prompt.js +6 -5
- package/dist/modules/agents/builder/prompts/config-rules.prompt.js.map +1 -1
- package/dist/modules/agents/builder/prompts/initial-build.prompt.d.ts +2 -0
- package/dist/modules/agents/builder/prompts/initial-build.prompt.js +56 -0
- package/dist/modules/agents/builder/prompts/initial-build.prompt.js.map +1 -0
- package/dist/modules/agents/builder/prompts/llm-selection.prompt.js +6 -3
- package/dist/modules/agents/builder/prompts/llm-selection.prompt.js.map +1 -1
- package/dist/modules/agents/builder/prompts/memory.prompt.d.ts +1 -1
- package/dist/modules/agents/builder/prompts/memory.prompt.js +2 -2
- package/dist/modules/agents/builder/prompts/memory.prompt.js.map +1 -1
- package/dist/modules/agents/builder/prompts/planner-todos.prompt.d.ts +2 -0
- package/dist/modules/agents/builder/prompts/planner-todos.prompt.js +22 -0
- package/dist/modules/agents/builder/prompts/planner-todos.prompt.js.map +1 -0
- package/dist/modules/agents/builder/prompts/tools.prompt.d.ts +1 -1
- package/dist/modules/agents/builder/prompts/tools.prompt.js +12 -12
- package/dist/modules/agents/builder/resolve-integration.tool.js +1 -1
- package/dist/modules/agents/builder/resolve-integration.tool.js.map +1 -1
- package/dist/modules/agents/builder/skills/external-services.skill.d.ts +2 -0
- package/dist/modules/agents/builder/skills/external-services.skill.js +361 -0
- package/dist/modules/agents/builder/skills/external-services.skill.js.map +1 -0
- package/dist/modules/agents/builder/skills/index.js +2 -6
- package/dist/modules/agents/builder/skills/index.js.map +1 -1
- package/dist/modules/agents/builder/skills/memory.skill.js +2 -1
- package/dist/modules/agents/builder/skills/memory.skill.js.map +1 -1
- package/dist/modules/agents/builder/skills/resource-locators.skill.js +17 -3
- package/dist/modules/agents/builder/skills/resource-locators.skill.js.map +1 -1
- package/dist/modules/agents/builder/skills/target-skills.skill.js +12 -9
- package/dist/modules/agents/builder/skills/target-skills.skill.js.map +1 -1
- package/dist/modules/agents/builder/skills/target-tasks.skill.js +14 -10
- package/dist/modules/agents/builder/skills/target-tasks.skill.js.map +1 -1
- package/dist/modules/agents/builder/verify-mcp-server.tool.d.ts +4 -0
- package/dist/modules/agents/builder/verify-mcp-server.tool.js +30 -5
- package/dist/modules/agents/builder/verify-mcp-server.tool.js.map +1 -1
- package/dist/modules/agents/entities/agent-execution.entity.d.ts +2 -1
- package/dist/modules/agents/entities/agent-execution.entity.js +4 -0
- package/dist/modules/agents/entities/agent-execution.entity.js.map +1 -1
- package/dist/modules/agents/execution-log/agent-execution-log-store.d.ts +17 -0
- package/dist/modules/agents/execution-log/agent-execution-log-store.js +58 -0
- package/dist/modules/agents/execution-log/agent-execution-log-store.js.map +1 -0
- package/dist/modules/agents/execution-log/agent-execution-log-write.error.d.ts +5 -0
- package/dist/modules/agents/execution-log/agent-execution-log-write.error.js +11 -0
- package/dist/modules/agents/execution-log/agent-execution-log-write.error.js.map +1 -0
- package/dist/modules/agents/execution-log/corrupted-agent-execution-log.error.d.ts +5 -0
- package/dist/modules/agents/execution-log/corrupted-agent-execution-log.error.js +11 -0
- package/dist/modules/agents/execution-log/corrupted-agent-execution-log.error.js.map +1 -0
- package/dist/modules/agents/instance-ai-builder-delegate.adapter.d.ts +1 -1
- package/dist/modules/agents/instance-ai-builder-delegate.adapter.js +4 -2
- package/dist/modules/agents/instance-ai-builder-delegate.adapter.js.map +1 -1
- package/dist/modules/agents/integrations/agent-chat-bridge.js +8 -4
- package/dist/modules/agents/integrations/agent-chat-bridge.js.map +1 -1
- package/dist/modules/agents/integrations/agent-chat-stream-consumer.d.ts +4 -2
- package/dist/modules/agents/integrations/agent-chat-stream-consumer.js +62 -6
- package/dist/modules/agents/integrations/agent-chat-stream-consumer.js.map +1 -1
- package/dist/modules/agents/integrations/integration-tool-factory.d.ts +7 -7
- package/dist/modules/agents/integrations/integration-tool-factory.js +13 -10
- package/dist/modules/agents/integrations/integration-tool-factory.js.map +1 -1
- package/dist/modules/agents/integrations/integration-tool-schema.d.ts +7 -7
- package/dist/modules/agents/integrations/integration-tool-schema.js +7 -7
- package/dist/modules/agents/integrations/integration-tool-schema.js.map +1 -1
- package/dist/modules/agents/integrations/slack-app-setup.service.js +2 -1
- package/dist/modules/agents/integrations/slack-app-setup.service.js.map +1 -1
- package/dist/modules/agents/json-config/from-json-config.d.ts +21 -0
- package/dist/modules/agents/json-config/from-json-config.js +16 -4
- package/dist/modules/agents/json-config/from-json-config.js.map +1 -1
- package/dist/modules/agents/json-config/mcp-client-factory.d.ts +4 -0
- package/dist/modules/agents/json-config/mcp-client-factory.js +6 -1
- package/dist/modules/agents/json-config/mcp-client-factory.js.map +1 -1
- package/dist/modules/agents/json-config/sanitize-unknown-agent-credentials.js +14 -1
- package/dist/modules/agents/json-config/sanitize-unknown-agent-credentials.js.map +1 -1
- package/dist/modules/agents/{builder/interactive/llm-provider-defaults.d.ts → llm-provider-defaults.d.ts} +1 -0
- package/dist/modules/agents/{builder/interactive/llm-provider-defaults.js → llm-provider-defaults.js} +14 -1
- package/dist/modules/agents/llm-provider-defaults.js.map +1 -0
- package/dist/modules/agents/repositories/agent-execution.repository.d.ts +4 -0
- package/dist/modules/agents/repositories/agent-execution.repository.js +31 -0
- package/dist/modules/agents/repositories/agent-execution.repository.js.map +1 -1
- package/dist/modules/agents/sub-agents/delegate-sub-agent-tool.js +1 -0
- package/dist/modules/agents/sub-agents/delegate-sub-agent-tool.js.map +1 -1
- package/dist/modules/agents/sub-agents/sub-agent-foreground-runner.d.ts +4 -1
- package/dist/modules/agents/sub-agents/sub-agent-foreground-runner.js +7 -1
- package/dist/modules/agents/sub-agents/sub-agent-foreground-runner.js.map +1 -1
- package/dist/modules/agents/tools/node-tool-factory.d.ts +2 -0
- package/dist/modules/agents/tools/node-tool-factory.js +8 -0
- package/dist/modules/agents/tools/node-tool-factory.js.map +1 -1
- package/dist/modules/agents/tools/workflow-tool-factory.d.ts +3 -1
- package/dist/modules/agents/tools/workflow-tool-factory.js +9 -3
- package/dist/modules/agents/tools/workflow-tool-factory.js.map +1 -1
- package/dist/modules/agents/utils/execution-to-message-mapper.js +4 -2
- package/dist/modules/agents/utils/execution-to-message-mapper.js.map +1 -1
- package/dist/modules/agents/utils/node-tool-validation.js +6 -0
- package/dist/modules/agents/utils/node-tool-validation.js.map +1 -1
- package/dist/modules/breaking-changes/rules/index.d.ts +3 -0
- package/dist/modules/breaking-changes/rules/index.js +3 -0
- package/dist/modules/breaking-changes/rules/index.js.map +1 -1
- package/dist/modules/breaking-changes/rules/v3/chat-trigger-embedded-json.rule.d.ts +10 -0
- package/dist/modules/breaking-changes/rules/v3/chat-trigger-embedded-json.rule.js +58 -0
- package/dist/modules/breaking-changes/rules/v3/chat-trigger-embedded-json.rule.js.map +1 -0
- package/dist/modules/breaking-changes/rules/v3/removed-nodes-with-replacements.rule.d.ts +239 -0
- package/dist/modules/breaking-changes/rules/v3/removed-nodes-with-replacements.rule.js +445 -0
- package/dist/modules/breaking-changes/rules/v3/removed-nodes-with-replacements.rule.js.map +1 -0
- package/dist/modules/breaking-changes/rules/v3/removed-nodes.rule.d.ts +11 -0
- package/dist/modules/breaking-changes/rules/v3/removed-nodes.rule.js +61 -0
- package/dist/modules/breaking-changes/rules/v3/removed-nodes.rule.js.map +1 -0
- package/dist/modules/community-packages/installed-nodes.entity.js +1 -1
- package/dist/modules/community-packages/installed-nodes.entity.js.map +1 -1
- package/dist/modules/data-table/data-table-proxy.service.js +13 -0
- package/dist/modules/data-table/data-table-proxy.service.js.map +1 -1
- package/dist/modules/data-table/data-table.controller.js +1 -1
- package/dist/modules/data-table/data-table.controller.js.map +1 -1
- package/dist/modules/data-table/data-table.service.d.ts +1 -1
- package/dist/modules/data-table/data-table.service.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/database/repositories/dynamic-credential-user-entry.repository.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/services/credential-resolver-workflow.service.js.map +1 -1
- package/dist/modules/instance-ai/eval/agent-execution.service.d.ts +26 -0
- package/dist/modules/instance-ai/eval/agent-execution.service.js +508 -0
- package/dist/modules/instance-ai/eval/agent-execution.service.js.map +1 -0
- package/dist/modules/instance-ai/eval/agent-model-turn-recorder.d.ts +9 -0
- package/dist/modules/instance-ai/eval/agent-model-turn-recorder.js +110 -0
- package/dist/modules/instance-ai/eval/agent-model-turn-recorder.js.map +1 -0
- package/dist/modules/instance-ai/eval/agent-scenario-seed.d.ts +14 -0
- package/dist/modules/instance-ai/eval/agent-scenario-seed.js +98 -0
- package/dist/modules/instance-ai/eval/agent-scenario-seed.js.map +1 -0
- package/dist/modules/instance-ai/eval/execution.service.js +3 -3
- package/dist/modules/instance-ai/eval/execution.service.js.map +1 -1
- package/dist/modules/instance-ai/eval/mcp-mock-fetch.d.ts +28 -0
- package/dist/modules/instance-ai/eval/mcp-mock-fetch.js +265 -0
- package/dist/modules/instance-ai/eval/mcp-mock-fetch.js.map +1 -0
- package/dist/modules/instance-ai/eval/mock-utils.d.ts +4 -0
- package/dist/modules/instance-ai/eval/mock-utils.js +41 -0
- package/dist/modules/instance-ai/eval/mock-utils.js.map +1 -0
- package/dist/modules/instance-ai/eval/request-sanitizer.d.ts +1 -0
- package/dist/modules/instance-ai/eval/request-sanitizer.js +26 -0
- package/dist/modules/instance-ai/eval/request-sanitizer.js.map +1 -1
- package/dist/modules/instance-ai/eval/web-search-mock.d.ts +26 -0
- package/dist/modules/instance-ai/eval/web-search-mock.js +122 -0
- package/dist/modules/instance-ai/eval/web-search-mock.js.map +1 -0
- package/dist/modules/instance-ai/event-bus/interrupted-run-sweeper.d.ts +8 -0
- package/dist/modules/instance-ai/event-bus/interrupted-run-sweeper.js +85 -11
- package/dist/modules/instance-ai/event-bus/interrupted-run-sweeper.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai-error-reporter.service.js +13 -0
- package/dist/modules/instance-ai/instance-ai-error-reporter.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai-memory.service.d.ts +3 -3
- package/dist/modules/instance-ai/instance-ai-memory.service.js +5 -11
- package/dist/modules/instance-ai/instance-ai-memory.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai-settings.service.d.ts +42 -14
- package/dist/modules/instance-ai/instance-ai-settings.service.js +650 -174
- package/dist/modules/instance-ai/instance-ai-settings.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai-test.controller.js +4 -1
- package/dist/modules/instance-ai/instance-ai-test.controller.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.adapter.service.d.ts +2 -1
- package/dist/modules/instance-ai/instance-ai.adapter.service.js +26 -2
- package/dist/modules/instance-ai/instance-ai.adapter.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.controller.d.ts +14 -6
- package/dist/modules/instance-ai/instance-ai.controller.js +84 -29
- package/dist/modules/instance-ai/instance-ai.controller.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.module.js +9 -2
- package/dist/modules/instance-ai/instance-ai.module.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.service.d.ts +10 -1
- package/dist/modules/instance-ai/instance-ai.service.js +146 -45
- package/dist/modules/instance-ai/instance-ai.service.js.map +1 -1
- package/dist/modules/instance-ai/repositories/instance-ai-event-log.repository.d.ts +1 -1
- package/dist/modules/instance-ai/repositories/instance-ai-event-log.repository.js +6 -5
- package/dist/modules/instance-ai/repositories/instance-ai-event-log.repository.js.map +1 -1
- package/dist/modules/instance-ai/sandbox/instance-ai-sandbox.service.d.ts +6 -2
- package/dist/modules/instance-ai/sandbox/instance-ai-sandbox.service.js +55 -14
- package/dist/modules/instance-ai/sandbox/instance-ai-sandbox.service.js.map +1 -1
- package/dist/modules/mcp/mcp-protected-resource.d.ts +1 -0
- package/dist/modules/mcp/mcp-protected-resource.js +4 -0
- package/dist/modules/mcp/mcp-protected-resource.js.map +1 -1
- package/dist/modules/mcp/mcp-server-middleware.service.js +2 -1
- package/dist/modules/mcp/mcp-server-middleware.service.js.map +1 -1
- package/dist/modules/mcp/mcp.controller.d.ts +3 -1
- package/dist/modules/mcp/mcp.controller.js +15 -11
- package/dist/modules/mcp/mcp.controller.js.map +1 -1
- package/dist/modules/mcp/mcp.service.d.ts +7 -2
- package/dist/modules/mcp/mcp.service.js +63 -43
- package/dist/modules/mcp/mcp.service.js.map +1 -1
- package/dist/modules/mcp/mcp.types.d.ts +1 -0
- package/dist/modules/mcp/tools/execution-utils.d.ts +3 -1
- package/dist/modules/mcp/tools/execution-utils.js +6 -4
- package/dist/modules/mcp/tools/execution-utils.js.map +1 -1
- package/dist/modules/mcp/tools/get-workflow-details.tool.d.ts +3 -2
- package/dist/modules/mcp/tools/get-workflow-details.tool.js +6 -6
- package/dist/modules/mcp/tools/get-workflow-details.tool.js.map +1 -1
- package/dist/modules/mcp/tools/get-workflow-version.tool.d.ts +3 -2
- package/dist/modules/mcp/tools/get-workflow-version.tool.js +1 -1
- package/dist/modules/mcp/tools/get-workflow-version.tool.js.map +1 -1
- package/dist/modules/mcp/tools/schemas.d.ts +34 -32
- package/dist/modules/mcp/tools/schemas.js +14 -2
- package/dist/modules/mcp/tools/schemas.js.map +1 -1
- package/dist/modules/mcp/tools/test-workflow.tool.d.ts +4 -1
- package/dist/modules/mcp/tools/test-workflow.tool.js +13 -5
- package/dist/modules/mcp/tools/test-workflow.tool.js.map +1 -1
- package/dist/modules/mcp/tools/webhook-utils.d.ts +3 -3
- package/dist/modules/mcp/tools/webhook-utils.js +17 -6
- package/dist/modules/mcp/tools/webhook-utils.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/create-workflow-from-code.tool.d.ts +4 -1
- package/dist/modules/mcp/tools/workflow-builder/create-workflow-from-code.tool.js +5 -1
- package/dist/modules/mcp/tools/workflow-builder/create-workflow-from-code.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/get-workflow-best-practices.tool.d.ts +3 -1
- package/dist/modules/mcp/tools/workflow-builder/get-workflow-best-practices.tool.js +16 -3
- package/dist/modules/mcp/tools/workflow-builder/get-workflow-best-practices.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/get-workflow-sdk-reference.tool.d.ts +5 -2
- package/dist/modules/mcp/tools/workflow-builder/get-workflow-sdk-reference.tool.js +17 -10
- package/dist/modules/mcp/tools/workflow-builder/get-workflow-sdk-reference.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/mcp-instructions.d.ts +6 -1
- package/dist/modules/mcp/tools/workflow-builder/mcp-instructions.js +8 -2
- package/dist/modules/mcp/tools/workflow-builder/mcp-instructions.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/sdk-reference-content.d.ts +4 -2
- package/dist/modules/mcp/tools/workflow-builder/sdk-reference-content.js +8 -1
- package/dist/modules/mcp/tools/workflow-builder/sdk-reference-content.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/update-workflow.tool.d.ts +280 -2
- package/dist/modules/mcp/tools/workflow-builder/update-workflow.tool.js +54 -17
- package/dist/modules/mcp/tools/workflow-builder/update-workflow.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/validate-workflow-code.tool.d.ts +4 -1
- package/dist/modules/mcp/tools/workflow-builder/validate-workflow-code.tool.js +58 -1
- package/dist/modules/mcp/tools/workflow-builder/validate-workflow-code.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/workflow-operations.d.ts +51 -5
- package/dist/modules/mcp/tools/workflow-builder/workflow-operations.js +414 -233
- package/dist/modules/mcp/tools/workflow-builder/workflow-operations.js.map +1 -1
- package/dist/modules/mcp-registry/mcp-registry-test.controller.js +2 -2
- package/dist/modules/mcp-registry/mcp-registry-test.controller.js.map +1 -1
- package/dist/modules/mcp-registry/mcp-registry.module.js +1 -1
- package/dist/modules/mcp-registry/mcp-registry.module.js.map +1 -1
- package/dist/modules/n8n-packages/engine/import-orchestrator.d.ts +11 -1
- package/dist/modules/n8n-packages/engine/import-orchestrator.js +36 -7
- package/dist/modules/n8n-packages/engine/import-orchestrator.js.map +1 -1
- package/dist/modules/n8n-packages/engine/import-result.d.ts +3 -2
- package/dist/modules/n8n-packages/engine/import-result.js +2 -1
- package/dist/modules/n8n-packages/engine/import-result.js.map +1 -1
- package/dist/modules/n8n-packages/engine/import-telemetry.d.ts +2 -0
- package/dist/modules/n8n-packages/engine/import-telemetry.js +11 -0
- package/dist/modules/n8n-packages/engine/import-telemetry.js.map +1 -1
- package/dist/modules/n8n-packages/engine/project-package-importer.js +11 -0
- package/dist/modules/n8n-packages/engine/project-package-importer.js.map +1 -1
- package/dist/modules/n8n-packages/engine/workflow-package-importer.js +10 -1
- package/dist/modules/n8n-packages/engine/workflow-package-importer.js.map +1 -1
- package/dist/modules/n8n-packages/entities/requirements.types.d.ts +2 -0
- package/dist/modules/n8n-packages/entities/requirements.types.js +1 -0
- package/dist/modules/n8n-packages/entities/requirements.types.js.map +1 -1
- package/dist/modules/n8n-packages/entities/variable/variable-importer.d.ts +9 -0
- package/dist/modules/n8n-packages/entities/variable/variable-importer.js +55 -0
- package/dist/modules/n8n-packages/entities/variable/variable-importer.js.map +1 -0
- package/dist/modules/n8n-packages/entities/variable/variable-missing-mode.d.ts +3 -0
- package/dist/modules/n8n-packages/entities/variable/variable-missing-mode.js +12 -0
- package/dist/modules/n8n-packages/entities/variable/variable-missing-mode.js.map +1 -0
- package/dist/modules/n8n-packages/entities/variable/variable.types.d.ts +14 -0
- package/dist/modules/n8n-packages/entities/variable/variable.types.js +7 -0
- package/dist/modules/n8n-packages/entities/variable/variable.types.js.map +1 -1
- package/dist/modules/n8n-packages/entities/workflow/auto-included-workflow-resolver.d.ts +37 -0
- package/dist/modules/n8n-packages/entities/workflow/auto-included-workflow-resolver.js +165 -0
- package/dist/modules/n8n-packages/entities/workflow/auto-included-workflow-resolver.js.map +1 -0
- package/dist/modules/n8n-packages/entities/workflow/auto-included-workflow.exporter.d.ts +39 -0
- package/dist/modules/n8n-packages/entities/workflow/auto-included-workflow.exporter.js +198 -0
- package/dist/modules/n8n-packages/entities/workflow/auto-included-workflow.exporter.js.map +1 -0
- package/dist/modules/n8n-packages/entities/workflow/missing-node-type-mode.d.ts +7 -0
- package/dist/modules/n8n-packages/entities/workflow/missing-node-type-mode.js +30 -0
- package/dist/modules/n8n-packages/entities/workflow/missing-node-type-mode.js.map +1 -0
- package/dist/modules/n8n-packages/entities/workflow/node-type-usage.d.ts +11 -0
- package/dist/modules/n8n-packages/entities/workflow/node-type-usage.js +27 -0
- package/dist/modules/n8n-packages/entities/workflow/node-type-usage.js.map +1 -0
- package/dist/modules/n8n-packages/entities/workflow/static-sub-workflow-id.d.ts +2 -0
- package/dist/modules/n8n-packages/entities/workflow/static-sub-workflow-id.js +23 -0
- package/dist/modules/n8n-packages/entities/workflow/static-sub-workflow-id.js.map +1 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow-import.types.d.ts +2 -2
- package/dist/modules/n8n-packages/entities/workflow/workflow-importer.js +1 -1
- package/dist/modules/n8n-packages/entities/workflow/workflow-importer.js.map +1 -1
- package/dist/modules/n8n-packages/entities/workflow/workflow-publisher.d.ts +2 -2
- package/dist/modules/n8n-packages/entities/workflow/workflow-publisher.js +5 -4
- package/dist/modules/n8n-packages/entities/workflow/workflow-publisher.js.map +1 -1
- package/dist/modules/n8n-packages/entities/workflow/workflow-publishing-policy.types.d.ts +1 -1
- package/dist/modules/n8n-packages/entities/workflow/workflow-requirements.extractor.js +2 -2
- package/dist/modules/n8n-packages/entities/workflow/workflow-requirements.extractor.js.map +1 -1
- package/dist/modules/n8n-packages/entities/workflow/workflow.exporter.js +3 -1
- package/dist/modules/n8n-packages/entities/workflow/workflow.exporter.js.map +1 -1
- package/dist/modules/n8n-packages/io/unique-filename-allocator.d.ts +1 -0
- package/dist/modules/n8n-packages/io/unique-filename-allocator.js +9 -0
- package/dist/modules/n8n-packages/io/unique-filename-allocator.js.map +1 -1
- package/dist/modules/n8n-packages/n8n-packages.service.d.ts +8 -4
- package/dist/modules/n8n-packages/n8n-packages.service.js +81 -36
- package/dist/modules/n8n-packages/n8n-packages.service.js.map +1 -1
- package/dist/modules/n8n-packages/n8n-packages.types.d.ts +40 -3
- package/dist/modules/n8n-packages/n8n-packages.types.js +9 -1
- package/dist/modules/n8n-packages/n8n-packages.types.js.map +1 -1
- package/dist/modules/n8n-packages/spec/manifest.schema.d.ts +51 -0
- package/dist/modules/n8n-packages/spec/requirements.schema.d.ts +45 -0
- package/dist/modules/n8n-packages/spec/requirements.schema.js +10 -1
- package/dist/modules/n8n-packages/spec/requirements.schema.js.map +1 -1
- package/dist/modules/n8n-packages/spec/serialized/workflow.schema.js +1 -1
- package/dist/modules/n8n-packages/spec/serialized/workflow.schema.js.map +1 -1
- package/dist/modules/oauth-server/database/repositories/oauth-access-token.repository.d.ts +10 -2
- package/dist/modules/oauth-server/database/repositories/oauth-access-token.repository.js +5 -1
- package/dist/modules/oauth-server/database/repositories/oauth-access-token.repository.js.map +1 -1
- package/dist/modules/oauth-server/database/repositories/oauth-refresh-token.repository.d.ts +14 -2
- package/dist/modules/oauth-server/database/repositories/oauth-refresh-token.repository.js +16 -1
- package/dist/modules/oauth-server/database/repositories/oauth-refresh-token.repository.js.map +1 -1
- package/dist/modules/oauth-server/oauth-token.service.d.ts +3 -2
- package/dist/modules/oauth-server/oauth-token.service.js +13 -33
- package/dist/modules/oauth-server/oauth-token.service.js.map +1 -1
- package/dist/modules/oauth-server/oauth.controller.d.ts +3 -0
- package/dist/modules/oauth-server/oauth.controller.js +45 -1
- package/dist/modules/oauth-server/oauth.controller.js.map +1 -1
- package/dist/modules/oauth-server/oauth.helpers.d.ts +1 -0
- package/dist/modules/oauth-server/oauth.helpers.js +7 -0
- package/dist/modules/oauth-server/oauth.helpers.js.map +1 -1
- package/dist/modules/otel/otel-settings.controller.d.ts +2 -2
- package/dist/modules/otel/otel-settings.controller.js +1 -1
- package/dist/modules/otel/otel-settings.controller.js.map +1 -1
- package/dist/modules/redaction/redaction-context-hook.js +4 -2
- package/dist/modules/redaction/redaction-context-hook.js.map +1 -1
- package/dist/modules/source-control.ee/source-control-export.service.ee.js +3 -3
- package/dist/modules/source-control.ee/source-control-export.service.ee.js.map +1 -1
- package/dist/modules/source-control.ee/source-control-import.service.ee.d.ts +1 -0
- package/dist/modules/source-control.ee/source-control-import.service.ee.js +51 -22
- package/dist/modules/source-control.ee/source-control-import.service.ee.js.map +1 -1
- package/dist/modules/source-control.ee/source-control-scoped.service.js +1 -1
- package/dist/modules/source-control.ee/source-control-scoped.service.js.map +1 -1
- package/dist/modules/source-control.ee/types/exportable-credential.d.ts +2 -0
- package/dist/modules/workflow-index/workflow-dependency-query.service.js +1 -1
- package/dist/modules/workflow-index/workflow-dependency-query.service.js.map +1 -1
- package/dist/modules/workflow-reviews.ee/workflow-review-request.service.d.ts +44 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-request.service.js +373 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-request.service.js.map +1 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-requests.controller.d.ts +14 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-requests.controller.js +97 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-requests.controller.js.map +1 -0
- package/dist/modules/workflow-reviews.ee/workflow-reviews.module.d.ts +4 -0
- package/dist/modules/workflow-reviews.ee/workflow-reviews.module.js +24 -0
- package/dist/modules/workflow-reviews.ee/workflow-reviews.module.js.map +1 -0
- package/dist/node-execution/ephemeral-node-executor.d.ts +5 -1
- package/dist/node-execution/ephemeral-node-executor.js +7 -4
- package/dist/node-execution/ephemeral-node-executor.js.map +1 -1
- package/dist/node-execution/index.d.ts +1 -0
- package/dist/node-execution/index.js +4 -1
- package/dist/node-execution/index.js.map +1 -1
- package/dist/node-execution/node-tool-operation-support.d.ts +2 -0
- package/dist/node-execution/node-tool-operation-support.js +12 -0
- package/dist/node-execution/node-tool-operation-support.js.map +1 -0
- package/dist/node-types.d.ts +5 -1
- package/dist/node-types.js +53 -20
- package/dist/node-types.js.map +1 -1
- package/dist/oauth/oauth.service.d.ts +5 -1
- package/dist/oauth/oauth.service.js +57 -28
- package/dist/oauth/oauth.service.js.map +1 -1
- package/dist/permissions.ee/check-access.js +18 -0
- package/dist/permissions.ee/check-access.js.map +1 -1
- package/dist/posthog/index.js +6 -0
- package/dist/posthog/index.js.map +1 -1
- package/dist/public-api/index.d.ts +1 -1
- package/dist/public-api/index.js +40 -11
- package/dist/public-api/index.js.map +1 -1
- package/dist/public-api/types.d.ts +7 -1
- package/dist/public-api/v1/controllers/index.d.ts +2 -0
- package/dist/public-api/v1/controllers/index.js +5 -0
- package/dist/public-api/v1/controllers/index.js.map +1 -0
- package/dist/public-api/v1/controllers/workflows.public.controller.d.ts +9 -0
- package/dist/public-api/v1/controllers/workflows.public.controller.js +81 -0
- package/dist/public-api/v1/controllers/workflows.public.controller.js.map +1 -0
- package/dist/public-api/v1/handlers/credentials/credentials.handler.js +1 -0
- package/dist/public-api/v1/handlers/credentials/credentials.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/credentials/credentials.service.d.ts +1 -0
- package/dist/public-api/v1/handlers/credentials/credentials.service.js +9 -2
- package/dist/public-api/v1/handlers/credentials/credentials.service.js.map +1 -1
- package/dist/public-api/v1/handlers/discover/discover.service.d.ts +1 -0
- package/dist/public-api/v1/handlers/discover/discover.service.js +39 -34
- package/dist/public-api/v1/handlers/discover/discover.service.js.map +1 -1
- package/dist/public-api/v1/handlers/executions/executions.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/n8n-packages/n8n-packages.handler.js +8 -3
- package/dist/public-api/v1/handlers/n8n-packages/n8n-packages.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/otel/otel.handler.d.ts +9 -0
- package/dist/public-api/v1/handlers/otel/otel.handler.js +57 -0
- package/dist/public-api/v1/handlers/otel/otel.handler.js.map +1 -0
- package/dist/public-api/v1/handlers/otel/otel.mapper.d.ts +3 -0
- package/dist/public-api/v1/handlers/otel/otel.mapper.js +18 -0
- package/dist/public-api/v1/handlers/otel/otel.mapper.js.map +1 -0
- package/dist/public-api/v1/handlers/tags/tags.handler.d.ts +0 -1
- package/dist/public-api/v1/handlers/tags/tags.handler.js +0 -8
- package/dist/public-api/v1/handlers/tags/tags.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/users/users.service.ee.js.map +1 -1
- package/dist/public-api/v1/handlers/workflows/workflows.handler.d.ts +2 -0
- package/dist/public-api/v1/handlers/workflows/workflows.handler.js +47 -34
- package/dist/public-api/v1/handlers/workflows/workflows.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/workflows/workflows.service.js +6 -0
- package/dist/public-api/v1/handlers/workflows/workflows.service.js.map +1 -1
- package/dist/public-api/v1/openapi.yml +491 -19
- package/dist/public-api/v1/shared/middlewares/global.middleware.d.ts +4 -0
- package/dist/public-api/v1/shared/middlewares/global.middleware.js +9 -1
- package/dist/public-api/v1/shared/middlewares/global.middleware.js.map +1 -1
- package/dist/public-api/v1/shared/public-api-scope-lookup.d.ts +5 -0
- package/dist/public-api/v1/shared/public-api-scope-lookup.js +60 -0
- package/dist/public-api/v1/shared/public-api-scope-lookup.js.map +1 -0
- package/dist/scaling/constants.d.ts +2 -2
- package/dist/scaling/pubsub/pubsub.event-map.d.ts +1 -0
- package/dist/scaling/pubsub/pubsub.types.d.ts +2 -1
- package/dist/scheduling/durable-job-provisioner.d.ts +1 -0
- package/dist/scheduling/durable-job-provisioner.js +2 -0
- package/dist/scheduling/durable-job-provisioner.js.map +1 -1
- package/dist/scheduling/durable-scheduler.d.ts +2 -1
- package/dist/scheduling/durable-scheduler.js +4 -2
- package/dist/scheduling/durable-scheduler.js.map +1 -1
- package/dist/scheduling/poll-trigger-node/poll-job-provider.d.ts +11 -0
- package/dist/scheduling/poll-trigger-node/poll-job-provider.js +41 -0
- package/dist/scheduling/poll-trigger-node/poll-job-provider.js.map +1 -0
- package/dist/scheduling/poll-trigger-node/poll-trigger-job-registrar.d.ts +19 -0
- package/dist/scheduling/poll-trigger-node/poll-trigger-job-registrar.js +111 -0
- package/dist/scheduling/poll-trigger-node/poll-trigger-job-registrar.js.map +1 -0
- package/dist/scheduling/poll-trigger-node/poll-trigger-task-handler.d.ts +16 -0
- package/dist/scheduling/poll-trigger-node/poll-trigger-task-handler.js +100 -0
- package/dist/scheduling/poll-trigger-node/poll-trigger-task-handler.js.map +1 -0
- package/dist/scheduling/poll-trigger-node/poll-trigger-task.d.ts +6 -0
- package/dist/scheduling/poll-trigger-node/poll-trigger-task.js +8 -0
- package/dist/scheduling/poll-trigger-node/poll-trigger-task.js.map +1 -0
- package/dist/scheduling/schedule-trigger-node/schedule-trigger-job-registrar.d.ts +1 -0
- package/dist/scheduling/schedule-trigger-node/schedule-trigger-job-registrar.js +7 -1
- package/dist/scheduling/schedule-trigger-node/schedule-trigger-job-registrar.js.map +1 -1
- package/dist/security-audit/risk-reporters/credentials-risk-reporter.d.ts +4 -6
- package/dist/security-audit/risk-reporters/credentials-risk-reporter.js +17 -23
- package/dist/security-audit/risk-reporters/credentials-risk-reporter.js.map +1 -1
- package/dist/security-audit/security-audit.repository.js.map +1 -1
- package/dist/services/export.service.js.map +1 -1
- package/dist/services/folder-finder.service.d.ts +1 -0
- package/dist/services/folder-finder.service.js +30 -0
- package/dist/services/folder-finder.service.js.map +1 -1
- package/dist/services/folder.service.js.map +1 -1
- package/dist/services/free-ai-credits.service.d.ts +32 -0
- package/dist/services/free-ai-credits.service.js +55 -0
- package/dist/services/free-ai-credits.service.js.map +1 -0
- package/dist/services/frontend.service.js +2 -0
- package/dist/services/frontend.service.js.map +1 -1
- package/dist/services/hooks.service.js.map +1 -1
- package/dist/services/import.service.js +3 -1
- package/dist/services/import.service.js.map +1 -1
- package/dist/services/ownership-transfer/ownership-transfer-handler.registry.js.map +1 -1
- package/dist/services/ownership-transfer/ownership-transfer.manifest.json +5 -0
- package/dist/services/project.service.ee.d.ts +1 -0
- package/dist/services/project.service.ee.js +6 -1
- package/dist/services/project.service.ee.js.map +1 -1
- package/dist/services/public-api-key.service.js.map +1 -1
- package/dist/services/role.service.d.ts +2 -1
- package/dist/services/role.service.js +21 -3
- package/dist/services/role.service.js.map +1 -1
- package/dist/services/tag.service.js.map +1 -1
- package/dist/telemetry/index.d.ts +3 -2
- package/dist/telemetry/index.js +7 -1
- package/dist/telemetry/index.js.map +1 -1
- package/dist/utils.d.ts +1 -0
- package/dist/utils.js +4 -0
- package/dist/utils.js.map +1 -1
- package/dist/webhooks/live-webhooks.js +1 -1
- package/dist/webhooks/live-webhooks.js.map +1 -1
- package/dist/webhooks/waiting-forms.js +2 -7
- package/dist/webhooks/waiting-forms.js.map +1 -1
- package/dist/webhooks/waiting-webhooks.d.ts +7 -2
- package/dist/webhooks/waiting-webhooks.js +32 -2
- package/dist/webhooks/waiting-webhooks.js.map +1 -1
- package/dist/workflow-helpers.js +8 -62
- package/dist/workflow-helpers.js.map +1 -1
- package/dist/workflows/publication/workflow-publication-reconciler.service.d.ts +10 -3
- package/dist/workflows/publication/workflow-publication-reconciler.service.js +49 -13
- package/dist/workflows/publication/workflow-publication-reconciler.service.js.map +1 -1
- package/dist/workflows/triggers/non-webhook-trigger-registrar.d.ts +3 -1
- package/dist/workflows/triggers/non-webhook-trigger-registrar.js +5 -2
- package/dist/workflows/triggers/non-webhook-trigger-registrar.js.map +1 -1
- package/dist/workflows/triggers/trigger-execution-context.factory.d.ts +13 -4
- package/dist/workflows/triggers/trigger-execution-context.factory.js +62 -4
- package/dist/workflows/triggers/trigger-execution-context.factory.js.map +1 -1
- package/dist/workflows/workflow-creation.service.js +8 -2
- package/dist/workflows/workflow-creation.service.js.map +1 -1
- package/dist/workflows/workflow-finder.service.js +1 -0
- package/dist/workflows/workflow-finder.service.js.map +1 -1
- package/dist/workflows/workflow-history/workflow-history.service.js.map +1 -1
- package/dist/workflows/workflow-sharing.service.js.map +1 -1
- package/dist/workflows/workflow-validation.service.js +1 -1
- package/dist/workflows/workflow-validation.service.js.map +1 -1
- package/dist/workflows/workflow.service.d.ts +5 -2
- package/dist/workflows/workflow.service.ee.js +1 -0
- package/dist/workflows/workflow.service.ee.js.map +1 -1
- package/dist/workflows/workflow.service.js +54 -12
- package/dist/workflows/workflow.service.js.map +1 -1
- package/dist/workflows/workflows.controller.js.map +1 -1
- package/package.json +36 -35
- package/dist/blob-storage/azure-byte-store.ee.d.ts +0 -10
- package/dist/blob-storage/azure-byte-store.ee.js +0 -42
- package/dist/blob-storage/azure-byte-store.ee.js.map +0 -1
- package/dist/blob-storage/fs-byte-store.d.ts +0 -14
- package/dist/blob-storage/fs-byte-store.js +0 -96
- package/dist/blob-storage/fs-byte-store.js.map +0 -1
- package/dist/blob-storage/json-store.d.ts +0 -18
- package/dist/blob-storage/json-store.js +0 -128
- package/dist/blob-storage/json-store.js.map +0 -1
- package/dist/blob-storage/s3-byte-store.ee.d.ts +0 -10
- package/dist/blob-storage/s3-byte-store.ee.js +0 -37
- package/dist/blob-storage/s3-byte-store.ee.js.map +0 -1
- package/dist/blob-storage/skipped-entry-deletion.error.d.ts +0 -5
- package/dist/blob-storage/skipped-entry-deletion.error.js +0 -13
- package/dist/blob-storage/skipped-entry-deletion.error.js.map +0 -1
- package/dist/blob-storage/types.d.ts +0 -23
- package/dist/blob-storage/types.js.map +0 -1
- package/dist/modules/agents/builder/interactive/llm-provider-defaults.js.map +0 -1
- package/dist/modules/agents/builder/skills/integrations.skill.d.ts +0 -2
- package/dist/modules/agents/builder/skills/integrations.skill.js +0 -128
- package/dist/modules/agents/builder/skills/integrations.skill.js.map +0 -1
- package/dist/modules/agents/builder/skills/mcp.skill.d.ts +0 -2
- package/dist/modules/agents/builder/skills/mcp.skill.js +0 -172
- package/dist/modules/agents/builder/skills/mcp.skill.js.map +0 -1
- package/dist/modules/agents/builder/skills/node-tools.skill.d.ts +0 -2
- package/dist/modules/agents/builder/skills/node-tools.skill.js +0 -90
- package/dist/modules/agents/builder/skills/node-tools.skill.js.map +0 -1
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.AutoIncludedWorkflowExporter = void 0;
|
|
13
|
+
const di_1 = require("@n8n/di");
|
|
14
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
15
|
+
const workflow_serializer_1 = require("./workflow.serializer");
|
|
16
|
+
const unique_filename_allocator_1 = require("../../io/unique-filename-allocator");
|
|
17
|
+
const credential_requirements_extractor_1 = require("../credential/credential-requirements.extractor");
|
|
18
|
+
const data_table_requirements_extractor_1 = require("../data-table/data-table-requirements.extractor");
|
|
19
|
+
const folder_serializer_1 = require("../folder/folder.serializer");
|
|
20
|
+
const project_serializer_1 = require("../project/project.serializer");
|
|
21
|
+
const variable_requirements_extractor_1 = require("../variable/variable-requirements.extractor");
|
|
22
|
+
let AutoIncludedWorkflowExporter = class AutoIncludedWorkflowExporter {
|
|
23
|
+
constructor(workflowSerializer, folderSerializer, projectSerializer, credentialRequirementsExtractor, dataTableRequirementsExtractor, variableRequirementsExtractor) {
|
|
24
|
+
this.workflowSerializer = workflowSerializer;
|
|
25
|
+
this.folderSerializer = folderSerializer;
|
|
26
|
+
this.projectSerializer = projectSerializer;
|
|
27
|
+
this.credentialRequirementsExtractor = credentialRequirementsExtractor;
|
|
28
|
+
this.dataTableRequirementsExtractor = dataTableRequirementsExtractor;
|
|
29
|
+
this.variableRequirementsExtractor = variableRequirementsExtractor;
|
|
30
|
+
}
|
|
31
|
+
export(request) {
|
|
32
|
+
const allocators = {
|
|
33
|
+
workflows: new Map(),
|
|
34
|
+
folders: new Map(),
|
|
35
|
+
project: new unique_filename_allocator_1.UniqueFilenameAllocator('projects', 'project'),
|
|
36
|
+
};
|
|
37
|
+
const workflowEntriesById = new Map(request.existingWorkflowEntries.map((entry) => [entry.id, entry]));
|
|
38
|
+
const folderEntriesById = new Map(request.existingFolderEntries.map((entry) => [entry.id, entry]));
|
|
39
|
+
const projectEntriesById = new Map(request.existingProjectEntries.map((entry) => [entry.id, entry]));
|
|
40
|
+
const projectTargetsById = new Map(request.projectTargetsById);
|
|
41
|
+
for (const entry of request.existingWorkflowEntries) {
|
|
42
|
+
allocatorFor(allocators.workflows, parentDir(entry.target), 'workflow').reservePath(entry.target);
|
|
43
|
+
}
|
|
44
|
+
for (const entry of request.existingFolderEntries) {
|
|
45
|
+
allocatorFor(allocators.folders, parentDir(entry.target), 'folder').reservePath(entry.target);
|
|
46
|
+
}
|
|
47
|
+
for (const entry of request.existingProjectEntries) {
|
|
48
|
+
allocators.project.reservePath(entry.target);
|
|
49
|
+
projectTargetsById.set(entry.id, entry.target);
|
|
50
|
+
}
|
|
51
|
+
const workflowEntries = [];
|
|
52
|
+
const folderEntries = [];
|
|
53
|
+
const projectEntries = [];
|
|
54
|
+
const credentials = [];
|
|
55
|
+
const dataTables = [];
|
|
56
|
+
const variables = [];
|
|
57
|
+
const nodeTypes = [];
|
|
58
|
+
for (const included of request.workflows) {
|
|
59
|
+
if (workflowEntriesById.has(included.workflow.id))
|
|
60
|
+
continue;
|
|
61
|
+
const baseDir = this.resolveWorkflowBaseDir({
|
|
62
|
+
included,
|
|
63
|
+
writer: request.writer,
|
|
64
|
+
folderEntriesById,
|
|
65
|
+
projectEntriesById,
|
|
66
|
+
projectTargetsById,
|
|
67
|
+
folderEntries,
|
|
68
|
+
projectEntries,
|
|
69
|
+
allocators,
|
|
70
|
+
});
|
|
71
|
+
const entry = this.writeWorkflow(included.workflow, baseDir, request.writer, allocators.workflows);
|
|
72
|
+
workflowEntries.push(entry);
|
|
73
|
+
workflowEntriesById.set(entry.id, entry);
|
|
74
|
+
credentials.push(...this.credentialRequirementsExtractor.extract(included.workflow));
|
|
75
|
+
dataTables.push(...this.dataTableRequirementsExtractor.extract(included.workflow));
|
|
76
|
+
variables.push(...this.variableRequirementsExtractor.extract(included.workflow));
|
|
77
|
+
nodeTypes.push({
|
|
78
|
+
workflowId: included.workflow.id,
|
|
79
|
+
nodes: included.workflow.nodes ?? [],
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
return {
|
|
83
|
+
workflowEntries,
|
|
84
|
+
folderEntries,
|
|
85
|
+
projectEntries,
|
|
86
|
+
requirements: { credentials, dataTables, variables, nodeTypes },
|
|
87
|
+
projectTargetsById,
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
resolveWorkflowBaseDir(options) {
|
|
91
|
+
const { included } = options;
|
|
92
|
+
if (included.placement === 'project') {
|
|
93
|
+
const projectTarget = this.ensureProjectShell({
|
|
94
|
+
project: included.ownerProject,
|
|
95
|
+
writer: options.writer,
|
|
96
|
+
projectEntriesById: options.projectEntriesById,
|
|
97
|
+
projectTargetsById: options.projectTargetsById,
|
|
98
|
+
projectEntries: options.projectEntries,
|
|
99
|
+
allocator: options.allocators.project,
|
|
100
|
+
});
|
|
101
|
+
if (included.folderChain.length === 0) {
|
|
102
|
+
return `${projectTarget}/workflows`;
|
|
103
|
+
}
|
|
104
|
+
const folderTarget = this.ensureFolderChain({
|
|
105
|
+
chain: included.folderChain,
|
|
106
|
+
baseDir: `${projectTarget}/folders`,
|
|
107
|
+
writer: options.writer,
|
|
108
|
+
folderEntriesById: options.folderEntriesById,
|
|
109
|
+
folderEntries: options.folderEntries,
|
|
110
|
+
allocators: options.allocators.folders,
|
|
111
|
+
});
|
|
112
|
+
return `${folderTarget}/workflows`;
|
|
113
|
+
}
|
|
114
|
+
if (included.placement === 'folder' && included.folderChain.length > 0) {
|
|
115
|
+
const folderTarget = this.ensureFolderChain({
|
|
116
|
+
chain: included.folderChain,
|
|
117
|
+
baseDir: 'folders',
|
|
118
|
+
writer: options.writer,
|
|
119
|
+
folderEntriesById: options.folderEntriesById,
|
|
120
|
+
folderEntries: options.folderEntries,
|
|
121
|
+
allocators: options.allocators.folders,
|
|
122
|
+
});
|
|
123
|
+
return `${folderTarget}/workflows`;
|
|
124
|
+
}
|
|
125
|
+
return 'workflows';
|
|
126
|
+
}
|
|
127
|
+
ensureProjectShell(options) {
|
|
128
|
+
const existing = options.projectEntriesById.get(options.project.id);
|
|
129
|
+
if (existing)
|
|
130
|
+
return existing.target;
|
|
131
|
+
const target = options.allocator.allocate(options.project.name);
|
|
132
|
+
const serialized = this.projectSerializer.serialize(options.project);
|
|
133
|
+
options.writer.writeDirectory(target);
|
|
134
|
+
options.writer.writeFile(`${target}/project.json`, JSON.stringify(serialized, null, '\t'));
|
|
135
|
+
const entry = { id: options.project.id, name: options.project.name, target };
|
|
136
|
+
options.projectEntries.push(entry);
|
|
137
|
+
options.projectEntriesById.set(entry.id, entry);
|
|
138
|
+
options.projectTargetsById.set(entry.id, entry.target);
|
|
139
|
+
return target;
|
|
140
|
+
}
|
|
141
|
+
ensureFolderChain(options) {
|
|
142
|
+
let parentTarget;
|
|
143
|
+
let effectiveParentId = null;
|
|
144
|
+
for (const folder of options.chain) {
|
|
145
|
+
const existing = options.folderEntriesById.get(folder.id);
|
|
146
|
+
if (existing) {
|
|
147
|
+
parentTarget = existing.target;
|
|
148
|
+
effectiveParentId = folder.id;
|
|
149
|
+
continue;
|
|
150
|
+
}
|
|
151
|
+
const allocator = allocatorFor(options.allocators, parentTarget ?? options.baseDir, 'folder');
|
|
152
|
+
if (parentTarget)
|
|
153
|
+
allocator.reserve('workflows');
|
|
154
|
+
const target = allocator.allocate(folder.name);
|
|
155
|
+
const serialized = this.folderSerializer.serialize(folder, effectiveParentId);
|
|
156
|
+
options.writer.writeDirectory(target);
|
|
157
|
+
options.writer.writeFile(`${target}/folder.json`, JSON.stringify(serialized, null, '\t'));
|
|
158
|
+
const entry = { id: folder.id, name: folder.name, target };
|
|
159
|
+
options.folderEntries.push(entry);
|
|
160
|
+
options.folderEntriesById.set(entry.id, entry);
|
|
161
|
+
parentTarget = target;
|
|
162
|
+
effectiveParentId = folder.id;
|
|
163
|
+
}
|
|
164
|
+
if (!parentTarget) {
|
|
165
|
+
throw new n8n_workflow_1.UnexpectedError('Cannot place workflow in an empty folder chain', {
|
|
166
|
+
extra: {
|
|
167
|
+
baseDir: options.baseDir,
|
|
168
|
+
folderIds: options.chain.map((folder) => folder.id),
|
|
169
|
+
},
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
return parentTarget;
|
|
173
|
+
}
|
|
174
|
+
writeWorkflow(workflow, baseDir, writer, allocators) {
|
|
175
|
+
const target = allocatorFor(allocators, baseDir, 'workflow').allocate(workflow.name);
|
|
176
|
+
const serialized = this.workflowSerializer.serialize(workflow);
|
|
177
|
+
writer.writeDirectory(target);
|
|
178
|
+
writer.writeFile(`${target}/workflow.json`, JSON.stringify(serialized, null, '\t'));
|
|
179
|
+
return { id: workflow.id, name: workflow.name, target };
|
|
180
|
+
}
|
|
181
|
+
};
|
|
182
|
+
exports.AutoIncludedWorkflowExporter = AutoIncludedWorkflowExporter;
|
|
183
|
+
exports.AutoIncludedWorkflowExporter = AutoIncludedWorkflowExporter = __decorate([
|
|
184
|
+
(0, di_1.Service)(),
|
|
185
|
+
__metadata("design:paramtypes", [workflow_serializer_1.WorkflowSerializer, folder_serializer_1.FolderSerializer, project_serializer_1.ProjectSerializer, credential_requirements_extractor_1.CredentialRequirementsExtractor, data_table_requirements_extractor_1.DataTableRequirementsExtractor, variable_requirements_extractor_1.VariableRequirementsExtractor])
|
|
186
|
+
], AutoIncludedWorkflowExporter);
|
|
187
|
+
function parentDir(path) {
|
|
188
|
+
return path.split('/').slice(0, -1).join('/');
|
|
189
|
+
}
|
|
190
|
+
function allocatorFor(allocators, baseDir, fallback) {
|
|
191
|
+
const existing = allocators.get(baseDir);
|
|
192
|
+
if (existing)
|
|
193
|
+
return existing;
|
|
194
|
+
const allocator = new unique_filename_allocator_1.UniqueFilenameAllocator(baseDir, fallback);
|
|
195
|
+
allocators.set(baseDir, allocator);
|
|
196
|
+
return allocator;
|
|
197
|
+
}
|
|
198
|
+
//# sourceMappingURL=auto-included-workflow.exporter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auto-included-workflow.exporter.js","sourceRoot":"","sources":["../../../../../src/modules/n8n-packages/entities/workflow/auto-included-workflow.exporter.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,gCAAkC;AAClC,+CAA+C;AAI/C,+DAA2D;AAE3D,kFAA6E;AAE7E,uGAAkG;AAElG,uGAAiG;AAEjG,mEAA+D;AAC/D,sEAAkE;AAElE,iGAA4F;AA+BrF,IAAM,4BAA4B,GAAlC,MAAM,4BAA4B;IACxC,YACkB,kBAAsC,EACtC,gBAAkC,EAClC,iBAAoC,EACpC,+BAAgE,EAChE,8BAA8D,EAC9D,6BAA4D;kCAL5D,kBAAkB;gCAClB,gBAAgB;iCAChB,iBAAiB;+CACjB,+BAA+B;8CAC/B,8BAA8B;6CAC9B,6BAA6B;IAC5C,CAAC;IAEJ,MAAM,CAAC,OAA0C;QAChD,MAAM,UAAU,GAAqB;YACpC,SAAS,EAAE,IAAI,GAAG,EAAE;YACpB,OAAO,EAAE,IAAI,GAAG,EAAE;YAClB,OAAO,EAAE,IAAI,mDAAuB,CAAC,UAAU,EAAE,SAAS,CAAC;SAC3D,CAAC;QAEF,MAAM,mBAAmB,GAAG,IAAI,GAAG,CAClC,OAAO,CAAC,uBAAuB,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC,CACjE,CAAC;QACF,MAAM,iBA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A6B;GAPlE,4BAA4B,CA8NxC;AAED,SAAS,SAAS,CAAC,IAAY;IAC9B,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC/C,CAAC;AAED,SAAS,YAAY,CACpB,UAAgD,EAChD,OAAe,EACf,QAAgB;IAEhB,MAAM,QAAQ,GAAG,UAAU,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IACzC,IAAI,QAAQ;QAAE,OAAO,QAAQ,CAAC;IAE9B,MAAM,SAAS,GAAG,IAAI,mDAAuB,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;IACjE,UAAU,CAAC,GAAG,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;IACnC,OAAO,SAAS,CAAC;AAClB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type NodeTypeUsage } from './node-type-usage';
|
|
2
|
+
import type { PreparedWorkflow } from './workflow-import.types';
|
|
3
|
+
import type { MissingNodeTypeMode } from '../../n8n-packages.types';
|
|
4
|
+
export type MissingNodeTypeRequirement = NodeTypeUsage;
|
|
5
|
+
export declare function collectMissingNodeTypes(workflows: PreparedWorkflow[], getSupportedVersions: (nodeType: string) => number[] | undefined): MissingNodeTypeRequirement[];
|
|
6
|
+
export declare function missingNodeTypeBlockingFailures(mode: MissingNodeTypeMode, missing: MissingNodeTypeRequirement[]): MissingNodeTypeRequirement[];
|
|
7
|
+
export declare function workflowsWithMissingNodeTypes(missing: MissingNodeTypeRequirement[]): Set<string>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.collectMissingNodeTypes = collectMissingNodeTypes;
|
|
4
|
+
exports.missingNodeTypeBlockingFailures = missingNodeTypeBlockingFailures;
|
|
5
|
+
exports.workflowsWithMissingNodeTypes = workflowsWithMissingNodeTypes;
|
|
6
|
+
const node_type_usage_1 = require("./node-type-usage");
|
|
7
|
+
function collectMissingNodeTypes(workflows, getSupportedVersions) {
|
|
8
|
+
const usage = (0, node_type_usage_1.collectNodeTypeUsage)(workflows.map(({ entity, sourceWorkflowId }) => ({
|
|
9
|
+
workflowId: sourceWorkflowId,
|
|
10
|
+
nodes: entity.nodes,
|
|
11
|
+
})));
|
|
12
|
+
const supportedByType = new Map();
|
|
13
|
+
return usage.filter(({ type, typeVersion }) => {
|
|
14
|
+
if (!supportedByType.has(type)) {
|
|
15
|
+
supportedByType.set(type, getSupportedVersions(type));
|
|
16
|
+
}
|
|
17
|
+
return !supportedByType.get(type)?.includes(typeVersion);
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
const BLOCKING_FAILURES = {
|
|
21
|
+
fail: (missing) => missing,
|
|
22
|
+
'import-anyway': () => [],
|
|
23
|
+
};
|
|
24
|
+
function missingNodeTypeBlockingFailures(mode, missing) {
|
|
25
|
+
return BLOCKING_FAILURES[mode](missing);
|
|
26
|
+
}
|
|
27
|
+
function workflowsWithMissingNodeTypes(missing) {
|
|
28
|
+
return new Set(missing.flatMap(({ usedByWorkflows }) => usedByWorkflows));
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=missing-node-type-mode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"missing-node-type-mode.js","sourceRoot":"","sources":["../../../../../src/modules/n8n-packages/entities/workflow/missing-node-type-mode.ts"],"names":[],"mappings":";;;;;AAAA,uDAA6E;AAW7E,iCACC,SAA6B,EAC7B,oBAAgE;IAEhE,MAAM,KAAK,GAAG,IAAA,sCAAoB,EACjC,SAAS,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,gBAAgB,EAAE,EAAE,EAAE,CAAC,CAAC;QAChD,UAAU,EAAE,gBAAgB;QAC5B,KAAK,EAAE,MAAM,CAAC,KAAK;KACnB,CAAC,CAAC,CACH,CAAC;IAEF,MAAM,eAAe,GAAG,IAAI,GAAG,EAAgC,CAAC;IAChE,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,EAAE;QAC7C,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;YAChC,eAAe,CAAC,GAAG,CAAC,IAAI,EAAE,oBAAoB,CAAC,IAAI,CAAC,CAAC,CAAC;QACvD,CAAC;QACD,OAAO,CAAC,eAAe,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,QAAQ,CAAC,WAAW,CAAC,CAAC;IAC1D,CAAC,CAAC,CAAC;AACJ,CAAC;AAGD,MAAM,iBAAiB,GAGnB;IACH,IAAI,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO;IAC1B,eAAe,EAAE,GAAG,EAAE,CAAC,EAAE;CACzB,CAAC;AAGF,yCACC,IAAyB,EACzB,OAAqC;IAErC,OAAO,iBAAiB,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC;AACzC,CAAC;AAGD,uCAA8C,OAAqC;IAClF,OAAO,IAAI,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,EAAE,eAAe,EAAE,EAAE,EAAE,CAAC,eAAe,CAAC,CAAC,CAAC;AAC3E,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { INode } from 'n8n-workflow';
|
|
2
|
+
export interface WorkflowNodeTypeSource {
|
|
3
|
+
workflowId: string;
|
|
4
|
+
nodes: INode[];
|
|
5
|
+
}
|
|
6
|
+
export interface NodeTypeUsage {
|
|
7
|
+
type: string;
|
|
8
|
+
typeVersion: number;
|
|
9
|
+
usedByWorkflows: string[];
|
|
10
|
+
}
|
|
11
|
+
export declare function collectNodeTypeUsage(workflows: WorkflowNodeTypeSource[]): NodeTypeUsage[];
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.collectNodeTypeUsage = collectNodeTypeUsage;
|
|
4
|
+
function collectNodeTypeUsage(workflows) {
|
|
5
|
+
const usage = new Map();
|
|
6
|
+
for (const { workflowId, nodes } of workflows) {
|
|
7
|
+
for (const node of nodes) {
|
|
8
|
+
const key = `${node.type}@${node.typeVersion}`;
|
|
9
|
+
const entry = usage.get(key);
|
|
10
|
+
if (entry) {
|
|
11
|
+
entry.workflowIds.add(workflowId);
|
|
12
|
+
continue;
|
|
13
|
+
}
|
|
14
|
+
usage.set(key, {
|
|
15
|
+
type: node.type,
|
|
16
|
+
typeVersion: node.typeVersion,
|
|
17
|
+
workflowIds: new Set([workflowId]),
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
return [...usage.values()].map(({ type, typeVersion, workflowIds }) => ({
|
|
22
|
+
type,
|
|
23
|
+
typeVersion,
|
|
24
|
+
usedByWorkflows: [...workflowIds],
|
|
25
|
+
}));
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=node-type-usage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node-type-usage.js","sourceRoot":"","sources":["../../../../../src/modules/n8n-packages/entities/workflow/node-type-usage.ts"],"names":[],"mappings":";;;AAoBA,8BAAqC,SAAmC;IACvE,MAAM,KAAK,GAAG,IAAI,GAAG,EAA2E,CAAC;IAEjG,KAAK,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,IAAI,SAAS,EAAE,CAAC;QAC/C,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YAC1B,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;YAC/C,MAAM,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YAC7B,IAAI,KAAK,EAAE,CAAC;gBACX,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;gBAClC,SAAS;YACV,CAAC;YAED,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE;gBACd,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,WAAW,EAAE,IAAI,CAAC,WAAW;gBAC7B,WAAW,EAAE,IAAI,GAAG,CAAC,CAAC,UAAU,CAAC,CAAC;aAClC,CAAC,CAAC;QACJ,CAAC;IACF,CAAC;IAED,OAAO,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC,CAAC;QACvE,IAAI;QACJ,WAAW;QACX,eAAe,EAAE,CAAC,GAAG,WAAW,CAAC;KACjC,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getStaticSubworkflowId = getStaticSubworkflowId;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
function getStaticSubworkflowId(node) {
|
|
6
|
+
if (!(0, n8n_workflow_1.isNodeWithWorkflowSelector)(node))
|
|
7
|
+
return undefined;
|
|
8
|
+
const { source = 'database' } = node.parameters;
|
|
9
|
+
if (source !== 'database')
|
|
10
|
+
return undefined;
|
|
11
|
+
const { workflowId: storedWorkflowId } = node.parameters;
|
|
12
|
+
const workflowId = (0, n8n_workflow_1.getSubworkflowId)(node) ?? storedWorkflowId;
|
|
13
|
+
return toStaticId(workflowId);
|
|
14
|
+
}
|
|
15
|
+
function toStaticId(value) {
|
|
16
|
+
if (typeof value !== 'string')
|
|
17
|
+
return undefined;
|
|
18
|
+
const trimmed = value.trim();
|
|
19
|
+
if (trimmed === '' || trimmed.startsWith('='))
|
|
20
|
+
return undefined;
|
|
21
|
+
return trimmed;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=static-sub-workflow-id.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"static-sub-workflow-id.js","sourceRoot":"","sources":["../../../../../src/modules/n8n-packages/entities/workflow/static-sub-workflow-id.ts"],"names":[],"mappings":";;;AAAA,+CAAwF;AAQxF,gCAAuC,IAAW;IACjD,IAAI,CAAC,IAAA,yCAA0B,EAAC,IAAI,CAAC;QAAE,OAAO,SAAS,CAAC;IAIxD,MAAM,EAAE,MAAM,GAAG,UAAU,EAAE,GAAG,IAAI,CAAC,UAAU,CAAC;IAChD,IAAI,MAAM,KAAK,UAAU;QAAE,OAAO,SAAS,CAAC;IAI5C,MAAM,EAAE,UAAU,EAAE,gBAAgB,EAAE,GAAG,IAAI,CAAC,UAAU,CAAC;IACzD,MAAM,UAAU,GAAG,IAAA,+BAAgB,EAAC,IAAI,CAAC,IAAI,gBAAgB,CAAC;IAE9D,OAAO,UAAU,CAAC,UAAU,CAAC,CAAC;AAC/B,CAAC;AAED,SAAS,UAAU,CAAC,KAAc;IACjC,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,SAAS,CAAC;IAChD,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;IAE7B,IAAI,OAAO,KAAK,EAAE,IAAI,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC;QAAE,OAAO,SAAS,CAAC;IAChE,OAAO,OAAO,CAAC;AAChB,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { WorkflowEntity } from '@n8n/db';
|
|
2
2
|
import type { WorkflowIdConflict } from './workflow-import-match.service';
|
|
3
|
-
import type { WorkflowPublishingOutcome, WorkflowPublishingPolicy } from './workflow-publishing-policy.types';
|
|
3
|
+
import type { WorkflowPublishingBlockedReason, WorkflowPublishingOutcome, WorkflowPublishingPolicy } from './workflow-publishing-policy.types';
|
|
4
4
|
import type { ImportContext } from '../../n8n-packages.types';
|
|
5
5
|
export interface WorkflowImportContext extends ImportContext {
|
|
6
6
|
publishingPolicy: WorkflowPublishingPolicy;
|
|
7
|
-
|
|
7
|
+
publishBlocked: ReadonlyMap<string, WorkflowPublishingBlockedReason>;
|
|
8
8
|
}
|
|
9
9
|
export interface PreparedWorkflow {
|
|
10
10
|
entity: WorkflowEntity;
|
|
@@ -100,7 +100,7 @@ let WorkflowImporter = class WorkflowImporter {
|
|
|
100
100
|
};
|
|
101
101
|
}
|
|
102
102
|
const savedWorkflow = await this.persistWorkflow(context, item, bindings);
|
|
103
|
-
const { workflow, publishing } = await this.workflowPublisher.apply(context.user, item, savedWorkflow, context.publishingPolicy, context.
|
|
103
|
+
const { workflow, publishing } = await this.workflowPublisher.apply(context.user, item, savedWorkflow, context.publishingPolicy, context.publishBlocked);
|
|
104
104
|
workflow.parentFolder =
|
|
105
105
|
workflow.parentFolder ??
|
|
106
106
|
savedWorkflow.parentFolder ??
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-importer.js","sourceRoot":"","sources":["../../../../../src/modules/n8n-packages/entities/workflow/workflow-importer.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,gCAAyC;AACzC,gCAAkC;AAElC,qFAAgF;AAChF,mEAA+D;AAE/D,yEAA0E;AAC1E,6DAAwD;AACxD,mFAGyC;AAYzC,6DAAyD;AAmBlD,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IAC5B,YACkB,0BAAsD,EACtD,uBAAgD,EAChD,eAAgC,EAChC,iBAAoC;0CAHpC,0BAA0B;uCAC1B,uBAAuB;+BACvB,eAAe;iCACf,iBAAiB;IAChC,CAAC;IAEJ,KAAK,CAAC,IAAI,CACT,OAAsB,EACtB,QAA4B,EAC5B,OAAiC;QAEjC,MAAM,0BAA0B,GAC/B,MAAM,IAAI,CAAC,0BAA0B,CAAC,uBAAuB,CAC5D,OAAO,CAAC,SAAS,EACjB,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,gBAAgB,EAAE,EAAE,EAAE,CAAC,gBAAgB,CAAC,CACxD,CAAC;QAEH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C,OAAO,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC;YAC9D,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YAEvB,gBAAgB,CAAC,GAAG,CAAC,OAAO,CAAC,gBAAgB,EAAE,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;QACrE,CAAC;QAED,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,GAAG,QAAQ,EAAE,SAAS,EAAE,gBAAgB,EAAE,EAAE,CAAC;IAC7E,CAAC;IAEO,KAAK,CAAC,SAAS,CACtB,OAA8B,EAC9B,IAAsB,EACtB,QAA+B;QAE/B,IAAI,IAAI,CAAC,MAAM,KAAK,MAAM,EAAE,CAAC;YAC5B,OAAO;gBACN,MAAM,EAAE,SAAS;gBACjB,QAAQ,EAAE,IAAI,CAAC,QAAQ;gBACvB,gBAAgB,EAAE,IAAI,CAAC,gBAAgB;gBACvC,UAAU,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE;aAClC,CAAC;QACH,CAAC;QAED,MAAM,aAAa,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,OAAO,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC;QAC1E,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAG,MAAM,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAClE,OAAO,CAAC,IAAI,EACZ,IAAI,EACJ,aAAa,EACb,OAAO,CAAC,gBAAgB,EACxB,OAAO,CAAC
|
|
1
|
+
{"version":3,"file":"workflow-importer.js","sourceRoot":"","sources":["../../../../../src/modules/n8n-packages/entities/workflow/workflow-importer.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,gCAAyC;AACzC,gCAAkC;AAElC,qFAAgF;AAChF,mEAA+D;AAE/D,yEAA0E;AAC1E,6DAAwD;AACxD,mFAGyC;AAYzC,6DAAyD;AAmBlD,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IAC5B,YACkB,0BAAsD,EACtD,u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IAAI,QAAQ,KAAK,IAAI,EAAE,CAAC;QACvB,OAAO;YACN,MAAM,EAAE,QAAQ;YAChB,SAAS,EAAE,IAAA,qCAAgB,EAAC,QAAQ,EAAE,QAAQ,CAAC,gBAAgB,CAAC;YAChE,GAAG,QAAQ;SACX,CAAC;IACH,CAAC;IAED,QAAQ,MAAM,EAAE,CAAC;QAChB,KAAK,QAAQ;YACZ,OAAO,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,QAAQ,EAAE,CAAC;QAC1C,KAAK,MAAM;YACV,OAAO,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,QAAQ,EAAE,CAAC;QAC1C,KAAK,QAAQ;YAEZ,OAAO;gBACN,MAAM;gBACN,SAAS,EAAE,IAAA,qCAAgB,EAAC,QAAQ,EAAE,QAAQ,CAAC,gBAAgB,CAAC;gBAChE,GAAG,QAAQ;aACX,CAAC;IACJ,CAAC;AACF,CAAC"}
|
|
@@ -4,7 +4,7 @@ import { ProjectRepository } from '@n8n/db';
|
|
|
4
4
|
import { ProjectService } from '../../../../services/project.service.ee';
|
|
5
5
|
import { WorkflowService } from '../../../../workflows/workflow.service';
|
|
6
6
|
import type { PersistedWorkflowPlanItem } from './workflow-import.types';
|
|
7
|
-
import { WorkflowPublishingPolicy, type WorkflowPublishingOutcome } from './workflow-publishing-policy.types';
|
|
7
|
+
import { WorkflowPublishingPolicy, type WorkflowPublishingBlockedReason, type WorkflowPublishingOutcome } from './workflow-publishing-policy.types';
|
|
8
8
|
export interface WorkflowPublishingResult {
|
|
9
9
|
workflow: WorkflowEntity;
|
|
10
10
|
publishing: WorkflowPublishingOutcome;
|
|
@@ -16,5 +16,5 @@ export declare class WorkflowPublisher {
|
|
|
16
16
|
private readonly workflowService;
|
|
17
17
|
constructor(logger: Logger, projectRepository: ProjectRepository, projectService: ProjectService, workflowService: WorkflowService);
|
|
18
18
|
assertCanPublish(user: User, projectId: string, policy: WorkflowPublishingPolicy, projectPendingCreation?: boolean): Promise<void>;
|
|
19
|
-
apply(user: User, item: PersistedWorkflowPlanItem, workflow: WorkflowEntity, policy: WorkflowPublishingPolicy,
|
|
19
|
+
apply(user: User, item: PersistedWorkflowPlanItem, workflow: WorkflowEntity, policy: WorkflowPublishingPolicy, publishBlocked: ReadonlyMap<string, WorkflowPublishingBlockedReason>): Promise<WorkflowPublishingResult>;
|
|
20
20
|
}
|
|
@@ -45,24 +45,25 @@ let WorkflowPublisher = class WorkflowPublisher {
|
|
|
45
45
|
}
|
|
46
46
|
throw new forbidden_error_1.ForbiddenError('You do not have permission to publish workflows in this project.');
|
|
47
47
|
}
|
|
48
|
-
async apply(user, item, workflow, policy,
|
|
48
|
+
async apply(user, item, workflow, policy, publishBlocked) {
|
|
49
49
|
const action = (0, workflow_publishing_policy_1.decideWorkflowPublishingAction)(policy, toPublishingContext(item, workflow));
|
|
50
50
|
if (action === 'noop') {
|
|
51
51
|
return { workflow, publishing: { state: 'unchanged' } };
|
|
52
52
|
}
|
|
53
|
-
|
|
53
|
+
const blockedReason = publishBlocked.get(item.sourceWorkflowId);
|
|
54
|
+
if (action === 'publish' && blockedReason) {
|
|
54
55
|
if (workflow.activeVersionId) {
|
|
55
56
|
return {
|
|
56
57
|
workflow,
|
|
57
58
|
publishing: {
|
|
58
59
|
state: 'unchanged',
|
|
59
|
-
skippedPublishReason:
|
|
60
|
+
skippedPublishReason: blockedReason,
|
|
60
61
|
},
|
|
61
62
|
};
|
|
62
63
|
}
|
|
63
64
|
return {
|
|
64
65
|
workflow,
|
|
65
|
-
publishing: { state: 'blocked', blockedReason
|
|
66
|
+
publishing: { state: 'blocked', blockedReason },
|
|
66
67
|
};
|
|
67
68
|
}
|
|
68
69
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-publisher.js","sourceRoot":"","sources":["../../../../../src/modules/n8n-packages/entities/workflow/workflow-publisher.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,wDAA6C;AAE7C,gCAA4C;AAC5C,gCAAkC;AAClC,iEAA6D;AAE7D,8EAA0E;AAC1E,8EAAyE;AACzE,sEAA+D;AAC/D,mEAA+D;AAG/D,6EAA8E;AAC9E,
|
|
1
|
+
{"version":3,"file":"workflow-publisher.js","sourceRoot":"","sources":["../../../../../src/modules/n8n-packages/entities/workflow/workflow-publisher.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,wDAA6C;AAE7C,gCAA4C;AAC5C,gCAAkC;AAClC,iEAA6D;AAE7D,8EAA0E;AAC1E,8EAAyE;AACzE,sEAA+D;AAC/D,mEAA+D;AAG/D,6EAA8E;AAC9E,yFAK4C;AAarC,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAC7B,YACkB,MAAc,EACd,iBAAoC,EACpC,cAA8B,EAC9B,eAAgC;sBAHhC,MAAM;iCACN,iBAAiB;8BACjB,cAAc;+BACd,eAAe;IAC9B,CAAC;IAWJ,KAAK,CAAC,gBAAgB,CACrB,IAAU,EACV,SAAiB,EACjB,MAAgC,EAChC,sBAAsB,GAAG,KAAK;QAE9B,IAAI,MAAM,KAAK,2DAAwB,CAAC,UAAU,EAAE,CAAC;YACpD,OAAO;QACR,CAAC;QAED,IAAI,sBAAsB,EAAE,CAAC;YAC5B,OAAO;QACR,CAAC;QAED,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,mBAAmB,CAAC,IAAI,EAAE,SAAS,EAAE;YAC9E,kBAAkB;SAClB,CAAC,CAAC;QACH,IAAI,OAAO,EAAE,CAAC;YACb,OAAO;QACR,CAAC;QAED,IAAI,CAAC,CAAC,MAAM,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,SAAS,EAAE,CAAC,CAAC,EAAE,CAAC;YACjE,MAAM,IAAI,+BAAa,CAAC,sBAAsB,SAAS,EAAE,CAAC,CAAC;QAC5D,CAAC;QACD,MAAM,IAAI,gCAAc,CAAC,kEAAkE,CAAC,CAAC;IAC9F,CAAC;IAMD,KAAK,CAA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,EAAE,KAAK,EAAE,aAAa,EAAE;aACpC,CAAC;QACH,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAIhB,MAAM,OAAO,GAAG,IAAA,0BAAW,EAAC,KAAK,CAAC,CAAC,OAAO,CAAC;YAC3C,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,wDAAwD,EAAE;gBAC1E,UAAU,EAAE,QAAQ,CAAC,EAAE;gBACvB,MAAM;gBACN,KAAK,EAAE,OAAO;aACd,CAAC,CAAC;YACH,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,CAAC;QACtE,CAAC;IACF,CAAC;CACD,CAAA;;4BA/GY,iBAAiB;IAD7B,IAAA,YAAO,GAAE;qCAGiB,uBAAM,EACK,sBAAiB,EACpB,mCAAc,EACb,kCAAe;GALtC,iBAAiB,CA+G7B;AAED,SAAS,mBAAmB,CAC3B,IAA+B,EAC/B,QAAwB;IAExB,OAAO;QACN,MAAM,EAAE,IAAI,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS;QACxD,eAAe,EAAE,IAAI,CAAC,eAAe;QACrC,kBAAkB,EAAE,CAAC,CAAC,QAAQ,CAAC,eAAe;QAC9C,UAAU,EAAE,QAAQ,CAAC,UAAU;KAC/B,CAAC;AACH,CAAC"}
|
|
@@ -7,7 +7,7 @@ export declare const WorkflowPublishingPolicy: {
|
|
|
7
7
|
export type WorkflowPublishingPolicy = (typeof WorkflowPublishingPolicy)[keyof typeof WorkflowPublishingPolicy];
|
|
8
8
|
export type PublishingAction = 'publish' | 'unpublish' | 'noop';
|
|
9
9
|
export type WorkflowPublishingOutcomeState = 'published' | 'unpublished' | 'unchanged' | 'blocked' | 'failed';
|
|
10
|
-
export type WorkflowPublishingBlockedReason = 'stub-credential';
|
|
10
|
+
export type WorkflowPublishingBlockedReason = 'stub-credential' | 'missing-node-type';
|
|
11
11
|
export interface WorkflowPublishingOutcome {
|
|
12
12
|
state: WorkflowPublishingOutcomeState;
|
|
13
13
|
error?: string;
|
|
@@ -8,7 +8,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.WorkflowRequirementsExtractor = void 0;
|
|
10
10
|
const di_1 = require("@n8n/di");
|
|
11
|
-
const
|
|
11
|
+
const static_sub_workflow_id_1 = require("./static-sub-workflow-id");
|
|
12
12
|
let WorkflowRequirementsExtractor = class WorkflowRequirementsExtractor {
|
|
13
13
|
extract(workflow) {
|
|
14
14
|
const byId = new Map();
|
|
@@ -21,7 +21,7 @@ let WorkflowRequirementsExtractor = class WorkflowRequirementsExtractor {
|
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
23
|
for (const node of workflow.nodes ?? []) {
|
|
24
|
-
addRequirement((0,
|
|
24
|
+
addRequirement((0, static_sub_workflow_id_1.getStaticSubworkflowId)(node));
|
|
25
25
|
}
|
|
26
26
|
addRequirement(this.getErrorWorkflowId(workflow));
|
|
27
27
|
return [...byId.values()];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-requirements.extractor.js","sourceRoot":"","sources":["../../../../../src/modules/n8n-packages/entities/workflow/workflow-requirements.extractor.ts"],"names":[],"mappings":";;;;;;;;;AACA,gCAAkC;
|
|
1
|
+
{"version":3,"file":"workflow-requirements.extractor.js","sourceRoot":"","sources":["../../../../../src/modules/n8n-packages/entities/workflow/workflow-requirements.extractor.ts"],"names":[],"mappings":";;;;;;;;;AACA,gCAAkC;AAGlC,qEAAkE;AAI3D,IAAM,6BAA6B,GAAnC,MAAM,6BAA6B;IAGzC,OAAO,CAAC,QAAwB;QAC/B,MAAM,IAAI,GAAG,IAAI,GAAG,EAA0C,CAAC;QAE/D,MAAM,cAAc,GAAG,CAAC,oBAAwC,EAAE,EAAE;YACnE,IAAI,CAAC,oBAAoB,IAAI,IAAI,CAAC,GAAG,CAAC,oBAAoB,CAAC;gBAAE,OAAO;YAEpE,IAAI,CAAC,GAAG,CAAC,oBAAoB,EAAE;gBAC9B,UAAU,EAAE,QAAQ,CAAC,EAAE;gBACvB,oBAAoB;aACpB,CAAC,CAAC;QACJ,CAAC,CAAC;QAEF,KAAK,MAAM,IAAI,IAAI,QAAQ,CAAC,KAAK,IAAI,EAAE,EAAE,CAAC;YACzC,cAAc,CAAC,IAAA,+CAAsB,EAAC,IAAI,CAAC,CAAC,CAAC;QAC9C,CAAC;QAED,cAAc,CAAC,IAAI,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC,CAAC;QAElD,OAAO,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;IAC3B,CAAC;IAEO,kBAAkB,CAAC,QAAwB;QAClD,MAAM,aAAa,GAAG,QAAQ,CAAC,QAAQ,EAAE,aAAa,CAAC;QAKvD,IAAI,CAAC,aAAa,IAAI,aAAa,KAAK,SAAS,IAAI,aAAa,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;YACpF,OAAO,SAAS,CAAC;QAClB,CAAC;QAED,OAAO,aAAa,CAAC;IACtB,CAAC;CACD,CAAA;;wCApCY,6BAA6B;IADzC,IAAA,YAAO,GAAE;GACG,6BAA6B,CAoCzC"}
|
|
@@ -34,6 +34,7 @@ let WorkflowExporter = class WorkflowExporter {
|
|
|
34
34
|
const credentials = [];
|
|
35
35
|
const dataTables = [];
|
|
36
36
|
const variables = [];
|
|
37
|
+
const nodeTypes = [];
|
|
37
38
|
const fileNames = new unique_filename_allocator_1.UniqueFilenameAllocator(request.basePrefix ? `${request.basePrefix}/workflows` : 'workflows', 'workflow');
|
|
38
39
|
for (const workflow of workflowsForExport) {
|
|
39
40
|
const target = fileNames.allocate(workflow.name);
|
|
@@ -48,8 +49,9 @@ let WorkflowExporter = class WorkflowExporter {
|
|
|
48
49
|
credentials.push(...this.credentialRequirementsExtractor.extract(workflow));
|
|
49
50
|
dataTables.push(...this.dataTableRequirementsExtractor.extract(workflow));
|
|
50
51
|
variables.push(...this.variableRequirementsExtractor.extract(workflow));
|
|
52
|
+
nodeTypes.push({ workflowId: workflow.id, nodes: workflow.nodes ?? [] });
|
|
51
53
|
}
|
|
52
|
-
return { entries, requirements: { credentials, dataTables, variables } };
|
|
54
|
+
return { entries, requirements: { credentials, dataTables, variables, nodeTypes } };
|
|
53
55
|
}
|
|
54
56
|
orderWorkflowsByRequest(workflowIds, workflows) {
|
|
55
57
|
const workflowsById = new Map(workflows.map((workflow) => [workflow.id, workflow]));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow.exporter.js","sourceRoot":"","sources":["../../../../../src/modules/n8n-packages/entities/workflow/workflow.exporter.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,gCAAkC;AAElC,iFAA4E;AAE5E,+DAA2D;AAE3D,kFAA6E;AAE7E,uGAAkG;AAElG,uGAAiG;
|
|
1
|
+
{"version":3,"file":"workflow.exporter.js","sourceRoot":"","sources":["../../../../../src/modules/n8n-packages/entities/workflow/workflow.exporter.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,gCAAkC;AAElC,iFAA4E;AAE5E,+DAA2D;AAE3D,kFAA6E;AAE7E,uGAAkG;AAElG,uGAAiG;AAGjG,oEAAgF;AAEhF,iGAA4F;AAkBrF,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IAC5B,YACkB,cAAqC,EACrC,kBAAsC,EACtC,+BAAgE,EAChE,8BAA8D,EAC9D,6BAA4D;8BAJ5D,cAAc;kCACd,kBAAkB;+CAClB,+BAA+B;8CAC/B,8BAA8B;6CAC9B,6BAA6B;IAC5C,CAAC;IAEJ,KAAK,CAAC,MAAM,CAAC,OAA8B;QAC1C,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,yBAAyB,CACpE,OAAO,CAAC,WAAW,EACnB,OAAO,CAAC,IAAI,EACZ,CAAC,iBAAiB,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C;CACD,CAAA;;2BA7EY,gBAAgB;IAD5B,IAAA,YAAO,GAAE;qCAGyB,+CAAqB,EACjB,wCAAkB,EACL,mEAA+B,EAChC,kEAA8B,EAC/B,+DAA6B;GANlE,gBAAgB,CA6E5B"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.UniqueFilenameAllocator = void 0;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
4
5
|
const slug_utils_1 = require("./slug.utils");
|
|
5
6
|
class UniqueFilenameAllocator {
|
|
6
7
|
constructor(baseDir, fallback) {
|
|
@@ -11,6 +12,14 @@ class UniqueFilenameAllocator {
|
|
|
11
12
|
reserve(segment) {
|
|
12
13
|
this.used.add(`${this.baseDir}/${segment}`);
|
|
13
14
|
}
|
|
15
|
+
reservePath(path) {
|
|
16
|
+
if (!path.startsWith(`${this.baseDir}/`)) {
|
|
17
|
+
throw new n8n_workflow_1.UnexpectedError('Cannot reserve a path outside the allocator base directory', {
|
|
18
|
+
extra: { path, baseDir: this.baseDir },
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
this.used.add(path);
|
|
22
|
+
}
|
|
14
23
|
allocate(name) {
|
|
15
24
|
const base = `${this.baseDir}/${(0, slug_utils_1.generateSlug)(name, this.fallback)}`;
|
|
16
25
|
if (!this.used.has(base)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unique-filename-allocator.js","sourceRoot":"","sources":["../../../../src/modules/n8n-packages/io/unique-filename-allocator.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAE5C;IAGC,YACkB,OAAe,EACf,QAAgB;QADhB,YAAO,GAAP,OAAO,CAAQ;QACf,aAAQ,GAAR,QAAQ,CAAQ;QAJjB,SAAI,GAAG,IAAI,GAAG,EAAU,CAAC;IAKvC,CAAC;IAEJ,OAAO,CAAC,OAAe;QACtB,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,OAAO,IAAI,OAAO,EAAE,CAAC,CAAC;IAC7C,CAAC;IAED,QAAQ,CAAC,IAAY;QACpB,MAAM,IAAI,GAAG,GAAG,IAAI,CAAC,OAAO,IAAI,IAAA,yBAAY,EAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;QAEpE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;YAC1B,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YACpB,OAAO,IAAI,CAAC;QACb,CAAC;QAED,KAAK,IAAI,MAAM,GAAG,CAAC,GAAI,MAAM,EAAE,EAAE,CAAC;YACjC,MAAM,SAAS,GAAG,GAAG,IAAI,IAAI,MAAM,EAAE,CAAC;YACtC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC;gBAC/B,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;gBACzB,OAAO,SAAS,CAAC;YAClB,CAAC;QACF,CAAC;IACF,CAAC;CACD"}
|
|
1
|
+
{"version":3,"file":"unique-filename-allocator.js","sourceRoot":"","sources":["../../../../src/modules/n8n-packages/io/unique-filename-allocator.ts"],"names":[],"mappings":";;;AAAA,+CAA+C;AAE/C,6CAA4C;AAE5C;IAGC,YACkB,OAAe,EACf,QAAgB;QADhB,YAAO,GAAP,OAAO,CAAQ;QACf,aAAQ,GAAR,QAAQ,CAAQ;QAJjB,SAAI,GAAG,IAAI,GAAG,EAAU,CAAC;IAKvC,CAAC;IAEJ,OAAO,CAAC,OAAe;QACtB,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,OAAO,IAAI,OAAO,EAAE,CAAC,CAAC;IAC7C,CAAC;IAED,WAAW,CAAC,IAAY;QAIvB,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,IAAI,CAAC,OAAO,GAAG,CAAC,EAAE,CAAC;YAC1C,MAAM,IAAI,8BAAe,CAAC,4DAA4D,EAAE;gBACvF,KAAK,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE;aACtC,CAAC,CAAC;QACJ,CAAC;QACD,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACrB,CAAC;IAED,QAAQ,CAAC,IAAY;QACpB,MAAM,IAAI,GAAG,GAAG,IAAI,CAAC,OAAO,IAAI,IAAA,yBAAY,EAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;QAEpE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;YAC1B,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YACpB,OAAO,IAAI,CAAC;QACb,CAAC;QAED,KAAK,IAAI,MAAM,GAAG,CAAC,GAAI,MAAM,EAAE,EAAE,CAAC;YACjC,MAAM,SAAS,GAAG,GAAG,IAAI,IAAI,MAAM,EAAE,CAAC;YACtC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC;gBAC/B,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;gBACzB,OAAO,SAAS,CAAC;YAClB,CAAC;QACF,CAAC;IACF,CAAC;CACD"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { InstanceSettings } from 'n8n-core';
|
|
2
|
-
import type { Readable } from 'node:stream';
|
|
3
2
|
import { EventService } from '../../events/event.service';
|
|
4
3
|
import { N8nPackageParser } from './engine/n8n-package-parser';
|
|
5
4
|
import { ProjectPackageImporter } from './engine/project-package-importer';
|
|
@@ -9,11 +8,13 @@ import { DataTableExporter } from './entities/data-table/data-table.exporter';
|
|
|
9
8
|
import { FolderExporter } from './entities/folder/folder.exporter';
|
|
10
9
|
import { ProjectExporter } from './entities/project/project.exporter';
|
|
11
10
|
import { VariableExporter } from './entities/variable/variable.exporter';
|
|
11
|
+
import { AutoIncludedWorkflowResolver } from './entities/workflow/auto-included-workflow-resolver';
|
|
12
|
+
import { AutoIncludedWorkflowExporter } from './entities/workflow/auto-included-workflow.exporter';
|
|
12
13
|
import { WorkflowDependencyResolver } from './entities/workflow/workflow-dependency-resolver';
|
|
13
14
|
import { WorkflowRequirementExporter } from './entities/workflow/workflow-requirement.exporter';
|
|
14
15
|
import { WorkflowExporter } from './entities/workflow/workflow.exporter';
|
|
15
16
|
import { PackageImportConfig } from './n8n-packages.config';
|
|
16
|
-
import { type ExportPackageRequest, type ImportPackageRequest, type ImportResult } from './n8n-packages.types';
|
|
17
|
+
import { type ExportPackageRequest, type ExportPackageResult, type ImportPackageRequest, type ImportResult } from './n8n-packages.types';
|
|
17
18
|
import { type ManifestEntry } from './spec/manifest.schema';
|
|
18
19
|
export declare class N8nPackagesService {
|
|
19
20
|
private readonly projectExporter;
|
|
@@ -30,9 +31,12 @@ export declare class N8nPackagesService {
|
|
|
30
31
|
private readonly eventService;
|
|
31
32
|
private readonly workflowRequirementExporter;
|
|
32
33
|
private readonly workflowDependencyResolver;
|
|
33
|
-
|
|
34
|
-
|
|
34
|
+
private readonly autoIncludedWorkflowResolver;
|
|
35
|
+
private readonly autoIncludedWorkflowExporter;
|
|
36
|
+
constructor(projectExporter: ProjectExporter, workflowExporter: WorkflowExporter, folderExporter: FolderExporter, credentialExporter: CredentialExporter, dataTableExporter: DataTableExporter, variableExporter: VariableExporter, instanceSettings: InstanceSettings, packageParser: N8nPackageParser, packageImportConfig: PackageImportConfig, projectPackageImporter: ProjectPackageImporter, workflowPackageImporter: WorkflowPackageImporter, eventService: EventService, workflowRequirementExporter: WorkflowRequirementExporter, workflowDependencyResolver: WorkflowDependencyResolver, autoIncludedWorkflowResolver: AutoIncludedWorkflowResolver, autoIncludedWorkflowExporter: AutoIncludedWorkflowExporter);
|
|
37
|
+
exportPackage(request: ExportPackageRequest): Promise<ExportPackageResult>;
|
|
35
38
|
importPackage(request: ImportPackageRequest): Promise<ImportResult>;
|
|
36
39
|
filterWorkflowsAlreadyInFolders(workflowsInFolders: ManifestEntry[] | undefined, workflowIds: string[]): string[];
|
|
40
|
+
private dedupeManifestEntries;
|
|
37
41
|
private buildManifestRequirements;
|
|
38
42
|
}
|