n8n 2.40.5 → 2.41.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/build.tsbuildinfo +1 -1
- package/dist/commands/import/credentials.js +12 -3
- package/dist/commands/import/credentials.js.map +1 -1
- package/dist/commands/import/workflow.js +4 -4
- package/dist/commands/import/workflow.js.map +1 -1
- package/dist/commands/start.js +5 -2
- package/dist/commands/start.js.map +1 -1
- package/dist/constants.d.ts +1 -0
- package/dist/constants.js +2 -1
- package/dist/constants.js.map +1 -1
- package/dist/controllers/ai-preference.controller.js +1 -1
- package/dist/controllers/ai-preference.controller.js.map +1 -1
- package/dist/controllers/ai.controller.d.ts +1 -0
- package/dist/controllers/dev.controller.d.ts +8 -0
- package/dist/controllers/dev.controller.js +35 -0
- package/dist/controllers/dev.controller.js.map +1 -0
- package/dist/controllers/me.controller.d.ts +2 -4
- package/dist/controllers/me.controller.js +9 -24
- package/dist/controllers/me.controller.js.map +1 -1
- package/dist/controllers/role.controller.js +1 -0
- package/dist/controllers/role.controller.js.map +1 -1
- package/dist/crash-journal.js +1 -1
- package/dist/crash-journal.js.map +1 -1
- package/dist/credentials/credential-dependency.service.d.ts +2 -2
- package/dist/credentials/credential-dependency.service.js +5 -4
- package/dist/credentials/credential-dependency.service.js.map +1 -1
- package/dist/credentials/credentials-finder.service.d.ts +1 -0
- package/dist/credentials/credentials.controller.d.ts +4 -0
- package/dist/credentials/credentials.controller.js +5 -0
- package/dist/credentials/credentials.controller.js.map +1 -1
- package/dist/credentials/credentials.service.d.ts +16 -3
- package/dist/credentials/credentials.service.ee.d.ts +2 -0
- package/dist/credentials/credentials.service.js +112 -30
- package/dist/credentials/credentials.service.js.map +1 -1
- package/dist/credentials/validation.d.ts +1 -0
- package/dist/credentials/validation.js +11 -0
- package/dist/credentials/validation.js.map +1 -1
- package/dist/credentials-helper.d.ts +3 -2
- package/dist/credentials-helper.js +39 -19
- package/dist/credentials-helper.js.map +1 -1
- package/dist/credentials-overwrites.js +2 -0
- package/dist/credentials-overwrites.js.map +1 -1
- package/dist/errors/response-errors/incompatible-nodes-api-version.error.d.ts +11 -0
- package/dist/errors/response-errors/incompatible-nodes-api-version.error.js +13 -0
- package/dist/errors/response-errors/incompatible-nodes-api-version.error.js.map +1 -0
- package/dist/errors/unsupported-end-user-credential-trigger.error.d.ts +4 -0
- package/dist/errors/unsupported-end-user-credential-trigger.error.js +13 -0
- package/dist/errors/unsupported-end-user-credential-trigger.error.js.map +1 -0
- package/dist/eventbus/event-message-classes/abstract-event-message.d.ts +1 -1
- package/dist/eventbus/event-message-classes/abstract-event-message.js +8 -0
- package/dist/eventbus/event-message-classes/abstract-event-message.js.map +1 -1
- package/dist/eventbus/event-message-classes/event-message-ai-node.d.ts +0 -2
- package/dist/eventbus/event-message-classes/event-message-ai-node.js +0 -8
- package/dist/eventbus/event-message-classes/event-message-ai-node.js.map +1 -1
- package/dist/eventbus/event-message-classes/event-message-audit.d.ts +1 -2
- package/dist/eventbus/event-message-classes/event-message-audit.js +0 -8
- package/dist/eventbus/event-message-classes/event-message-audit.js.map +1 -1
- package/dist/eventbus/event-message-classes/event-message-execution.d.ts +0 -2
- package/dist/eventbus/event-message-classes/event-message-execution.js +0 -8
- package/dist/eventbus/event-message-classes/event-message-execution.js.map +1 -1
- package/dist/eventbus/event-message-classes/event-message-generic.d.ts +0 -2
- package/dist/eventbus/event-message-classes/event-message-generic.js +0 -8
- package/dist/eventbus/event-message-classes/event-message-generic.js.map +1 -1
- package/dist/eventbus/event-message-classes/event-message-mcp.d.ts +0 -2
- package/dist/eventbus/event-message-classes/event-message-mcp.js +0 -8
- package/dist/eventbus/event-message-classes/event-message-mcp.js.map +1 -1
- package/dist/eventbus/event-message-classes/event-message-node.d.ts +0 -2
- package/dist/eventbus/event-message-classes/event-message-node.js +0 -8
- package/dist/eventbus/event-message-classes/event-message-node.js.map +1 -1
- package/dist/eventbus/event-message-classes/event-message-queue.d.ts +0 -2
- package/dist/eventbus/event-message-classes/event-message-queue.js +0 -8
- package/dist/eventbus/event-message-classes/event-message-queue.js.map +1 -1
- package/dist/eventbus/event-message-classes/event-message-runner.d.ts +0 -2
- package/dist/eventbus/event-message-classes/event-message-runner.js +0 -8
- package/dist/eventbus/event-message-classes/event-message-runner.js.map +1 -1
- package/dist/eventbus/event-message-classes/event-message-workflow.d.ts +1 -2
- package/dist/eventbus/event-message-classes/event-message-workflow.js +0 -8
- package/dist/eventbus/event-message-classes/event-message-workflow.js.map +1 -1
- package/dist/events/event.service.d.ts +3 -2
- package/dist/events/event.service.js.map +1 -1
- package/dist/events/maps/mcp-post-save-metrics.event-map.d.ts +7 -0
- package/dist/events/maps/mcp-post-save-metrics.event-map.js +3 -0
- package/dist/events/maps/mcp-post-save-metrics.event-map.js.map +1 -0
- package/dist/events/maps/relay.event-map.d.ts +3 -0
- package/dist/events/maps/system-task-metrics.event-map.d.ts +45 -0
- package/dist/events/maps/system-task-metrics.event-map.js +3 -0
- package/dist/events/maps/system-task-metrics.event-map.js.map +1 -0
- package/dist/events/relays/activity.event-relay.d.ts +9 -3
- package/dist/events/relays/activity.event-relay.js +33 -4
- package/dist/events/relays/activity.event-relay.js.map +1 -1
- package/dist/events/relays/telemetry.event-relay.js +34 -14
- package/dist/events/relays/telemetry.event-relay.js.map +1 -1
- package/dist/execution-lifecycle/execution-lifecycle-hooks.js +10 -6
- package/dist/execution-lifecycle/execution-lifecycle-hooks.js.map +1 -1
- package/dist/execution-lifecycle/shared/shared-hook-functions.d.ts +1 -1
- package/dist/execution-lifecycle/shared/shared-hook-functions.js +2 -1
- package/dist/execution-lifecycle/shared/shared-hook-functions.js.map +1 -1
- package/dist/executions/engine-v2-execution-reader.service.d.ts +26 -0
- package/dist/executions/engine-v2-execution-reader.service.js +58 -13
- package/dist/executions/engine-v2-execution-reader.service.js.map +1 -1
- package/dist/executions/engine-v2-mapping.d.ts +5 -0
- package/dist/executions/engine-v2-mapping.js +30 -0
- package/dist/executions/engine-v2-mapping.js.map +1 -0
- package/dist/executions/execution-cursor.d.ts +51 -0
- package/dist/executions/execution-cursor.js +39 -0
- package/dist/executions/execution-cursor.js.map +1 -0
- package/dist/executions/execution-id.js +2 -2
- package/dist/executions/execution-id.js.map +1 -1
- package/dist/executions/execution-list-v1.service.d.ts +27 -0
- package/dist/executions/execution-list-v1.service.js +98 -0
- package/dist/executions/execution-list-v1.service.js.map +1 -0
- package/dist/executions/execution-list-v2.service.d.ts +25 -0
- package/dist/executions/execution-list-v2.service.js +168 -0
- package/dist/executions/execution-list-v2.service.js.map +1 -0
- package/dist/executions/execution-list.service.d.ts +19 -0
- package/dist/executions/execution-list.service.js +67 -0
- package/dist/executions/execution-list.service.js.map +1 -0
- package/dist/executions/execution-recovery.service.d.ts +1 -2
- package/dist/executions/execution-recovery.service.js +1 -2
- package/dist/executions/execution-recovery.service.js.map +1 -1
- package/dist/executions/execution.service.d.ts +1 -34
- package/dist/executions/execution.service.js +4 -73
- package/dist/executions/execution.service.js.map +1 -1
- package/dist/executions/execution.types.d.ts +4 -2
- package/dist/executions/executions.controller.d.ts +4 -1
- package/dist/executions/executions.controller.js +12 -23
- package/dist/executions/executions.controller.js.map +1 -1
- package/dist/executions/merge-execution-pages.d.ts +10 -0
- package/dist/executions/merge-execution-pages.js +30 -0
- package/dist/executions/merge-execution-pages.js.map +1 -0
- package/dist/executions/parse-range-query.middleware.d.ts +2 -3
- package/dist/executions/parse-range-query.middleware.js +27 -21
- package/dist/executions/parse-range-query.middleware.js.map +1 -1
- package/dist/external-hooks.d.ts +6 -2
- package/dist/load-nodes-and-credentials.d.ts +3 -0
- package/dist/load-nodes-and-credentials.js +37 -15
- package/dist/load-nodes-and-credentials.js.map +1 -1
- package/dist/metrics/prometheus/constant.d.ts +1 -0
- package/dist/metrics/prometheus/constant.js +4 -1
- package/dist/metrics/prometheus/constant.js.map +1 -1
- package/dist/metrics/prometheus/mcp-post-save-metrics.service.d.ts +10 -0
- package/dist/metrics/prometheus/mcp-post-save-metrics.service.js +44 -0
- package/dist/metrics/prometheus/mcp-post-save-metrics.service.js.map +1 -0
- package/dist/metrics/prometheus/prometheus.service.d.ts +3 -1
- package/dist/metrics/prometheus/prometheus.service.js +6 -2
- package/dist/metrics/prometheus/prometheus.service.js.map +1 -1
- package/dist/metrics/prometheus/system-task-metrics.service.d.ts +12 -0
- package/dist/metrics/prometheus/system-task-metrics.service.js +157 -0
- package/dist/metrics/prometheus/system-task-metrics.service.js.map +1 -0
- package/dist/middlewares/list-query/dtos/credentials.select.dto.js +1 -0
- package/dist/middlewares/list-query/dtos/credentials.select.dto.js.map +1 -1
- package/dist/modules/agents/adapters/agents-credential-provider.d.ts +2 -1
- package/dist/modules/agents/adapters/agents-credential-provider.js +3 -1
- package/dist/modules/agents/adapters/agents-credential-provider.js.map +1 -1
- package/dist/modules/agents/agent-chat.controller.js +32 -37
- 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-conversation-state.service.d.ts +12 -0
- package/dist/modules/agents/agent-conversation-state.service.js +34 -0
- package/dist/modules/agents/agent-conversation-state.service.js.map +1 -0
- package/dist/modules/agents/agent-custom-tools.service.js +2 -2
- package/dist/modules/agents/agent-custom-tools.service.js.map +1 -1
- package/dist/modules/agents/agent-execution-orchestrator.service.d.ts +13 -6
- package/dist/modules/agents/agent-execution-orchestrator.service.js +284 -417
- package/dist/modules/agents/agent-execution-orchestrator.service.js.map +1 -1
- package/dist/modules/agents/agent-execution-recording.error.d.ts +21 -0
- package/dist/modules/agents/agent-execution-recording.error.js +17 -0
- package/dist/modules/agents/agent-execution-recording.error.js.map +1 -0
- package/dist/modules/agents/agent-execution.service.d.ts +1 -1
- package/dist/modules/agents/agent-execution.service.js +51 -20
- package/dist/modules/agents/agent-execution.service.js.map +1 -1
- package/dist/modules/agents/agent-integration-management.service.d.ts +5 -3
- package/dist/modules/agents/agent-integration-management.service.js +9 -6
- package/dist/modules/agents/agent-integration-management.service.js.map +1 -1
- package/dist/modules/agents/agent-integrations.controller.d.ts +1 -3
- package/dist/modules/agents/agent-integrations.controller.js +4 -6
- package/dist/modules/agents/agent-integrations.controller.js.map +1 -1
- package/dist/modules/agents/agent-message-mapper.d.ts +1 -1
- package/dist/modules/agents/agent-message-mapper.js +3 -0
- package/dist/modules/agents/agent-message-mapper.js.map +1 -1
- package/dist/modules/agents/agent-modification-telemetry.service.d.ts +2 -2
- package/dist/modules/agents/agent-modification-telemetry.service.js.map +1 -1
- package/dist/modules/agents/agent-publish.service.js +5 -5
- package/dist/modules/agents/agent-publish.service.js.map +1 -1
- package/dist/modules/agents/agent-runnable-state.service.js +1 -1
- package/dist/modules/agents/agent-runnable-state.service.js.map +1 -1
- package/dist/modules/agents/agent-runtime-cache.service.js +1 -1
- package/dist/modules/agents/agent-runtime-cache.service.js.map +1 -1
- package/dist/modules/agents/agent-runtime-reconstruction.service.js +1 -1
- package/dist/modules/agents/agent-runtime-reconstruction.service.js.map +1 -1
- package/dist/modules/agents/agent-skills.service.js +3 -3
- package/dist/modules/agents/agent-skills.service.js.map +1 -1
- package/dist/modules/agents/agent-sse-stream.d.ts +4 -1
- package/dist/modules/agents/agent-sse-stream.js +46 -33
- package/dist/modules/agents/agent-sse-stream.js.map +1 -1
- package/dist/modules/agents/agent-task.service.js +3 -3
- package/dist/modules/agents/agent-task.service.js.map +1 -1
- package/dist/modules/agents/agent-test-run.service.d.ts +24 -41
- package/dist/modules/agents/agent-test-run.service.js +83 -59
- package/dist/modules/agents/agent-test-run.service.js.map +1 -1
- package/dist/modules/agents/agent-turn-execution.service.d.ts +49 -0
- package/dist/modules/agents/agent-turn-execution.service.js +212 -0
- package/dist/modules/agents/agent-turn-execution.service.js.map +1 -0
- package/dist/modules/agents/agent-workflow-execution.service.d.ts +6 -3
- package/dist/modules/agents/agent-workflow-execution.service.js +77 -105
- package/dist/modules/agents/agent-workflow-execution.service.js.map +1 -1
- package/dist/modules/agents/agent-workflow-tool-resume.service.d.ts +0 -1
- package/dist/modules/agents/agent-workflow-tool-resume.service.js +46 -20
- package/dist/modules/agents/agent-workflow-tool-resume.service.js.map +1 -1
- package/dist/modules/agents/agents-config.controller.js +1 -1
- package/dist/modules/agents/agents-config.controller.js.map +1 -1
- package/dist/modules/agents/background/agent-wake.service.d.ts +3 -5
- package/dist/modules/agents/background/agent-wake.service.js +6 -10
- package/dist/modules/agents/background/agent-wake.service.js.map +1 -1
- package/dist/modules/agents/builder/agents-builder-prompts.d.ts +1 -1
- package/dist/modules/agents/builder/agents-builder-prompts.js +21 -0
- package/dist/modules/agents/builder/agents-builder-prompts.js.map +1 -1
- package/dist/modules/agents/builder/get-resource-locator-options.tool.d.ts +2 -2
- package/dist/modules/agents/builder/skills/external-services.skill.js +4 -1
- package/dist/modules/agents/builder/skills/external-services.skill.js.map +1 -1
- package/dist/modules/agents/entities/agent-checkpoint.entity.d.ts +1 -0
- package/dist/modules/agents/entities/agent-checkpoint.entity.js +10 -1
- package/dist/modules/agents/entities/agent-checkpoint.entity.js.map +1 -1
- package/dist/modules/agents/instance-ai-builder-delegate.adapter.d.ts +1 -1
- package/dist/modules/agents/instance-ai-builder-delegate.adapter.js +3 -3
- package/dist/modules/agents/instance-ai-builder-delegate.adapter.js.map +1 -1
- package/dist/modules/agents/integrations/agent-chat-bridge.d.ts +11 -24
- package/dist/modules/agents/integrations/agent-chat-bridge.js +58 -28
- package/dist/modules/agents/integrations/agent-chat-bridge.js.map +1 -1
- package/dist/modules/agents/integrations/agent-chat-hitl-resume-handler.d.ts +5 -12
- package/dist/modules/agents/integrations/agent-chat-hitl-resume-handler.js +8 -3
- package/dist/modules/agents/integrations/agent-chat-hitl-resume-handler.js.map +1 -1
- package/dist/modules/agents/integrations/agent-chat-integration.d.ts +2 -1
- package/dist/modules/agents/integrations/agent-chat-integration.js.map +1 -1
- package/dist/modules/agents/integrations/agent-chat-message-context.d.ts +4 -4
- package/dist/modules/agents/integrations/agent-chat-message-context.js +4 -37
- package/dist/modules/agents/integrations/agent-chat-message-context.js.map +1 -1
- package/dist/modules/agents/integrations/integration-message-context.d.ts +7 -0
- package/dist/modules/agents/integrations/integration-message-context.js +115 -0
- package/dist/modules/agents/integrations/integration-message-context.js.map +1 -0
- package/dist/modules/agents/integrations/integration-message-context.service.d.ts +8 -3
- package/dist/modules/agents/integrations/integration-message-context.service.js +36 -58
- package/dist/modules/agents/integrations/integration-message-context.service.js.map +1 -1
- package/dist/modules/agents/integrations/integration-tool-definitions.js +1 -1
- package/dist/modules/agents/integrations/integration-tool-definitions.js.map +1 -1
- package/dist/modules/agents/integrations/integration-tool-execution.d.ts +0 -1
- package/dist/modules/agents/integrations/integration-tool-execution.js +19 -42
- package/dist/modules/agents/integrations/integration-tool-execution.js.map +1 -1
- package/dist/modules/agents/integrations/integration-tool-factory.d.ts +0 -1
- package/dist/modules/agents/integrations/integration-tool-factory.js +1 -3
- package/dist/modules/agents/integrations/integration-tool-factory.js.map +1 -1
- package/dist/modules/agents/integrations/integration-tool-types.d.ts +13 -0
- package/dist/modules/agents/integrations/n8n-checkpoint-storage.js +4 -2
- package/dist/modules/agents/integrations/n8n-checkpoint-storage.js.map +1 -1
- package/dist/modules/agents/integrations/platforms/telegram-bridge-behavior.d.ts +2 -0
- package/dist/modules/agents/integrations/platforms/telegram-bridge-behavior.js +40 -0
- package/dist/modules/agents/integrations/platforms/telegram-bridge-behavior.js.map +1 -1
- package/dist/modules/agents/integrations/platforms/telegram-integration.d.ts +1 -0
- package/dist/modules/agents/integrations/platforms/telegram-integration.js +4 -0
- package/dist/modules/agents/integrations/platforms/telegram-integration.js.map +1 -1
- package/dist/modules/agents/repositories/agent-checkpoint.repository.d.ts +1 -1
- package/dist/modules/agents/repositories/agent-checkpoint.repository.js +2 -2
- package/dist/modules/agents/repositories/agent-checkpoint.repository.js.map +1 -1
- package/dist/modules/agents/repositories/agent-execution.repository.d.ts +2 -1
- package/dist/modules/agents/repositories/agent-execution.repository.js +7 -4
- package/dist/modules/agents/repositories/agent-execution.repository.js.map +1 -1
- package/dist/modules/agents/sub-agents/delegate-sub-agent-tool.js +3 -0
- package/dist/modules/agents/sub-agents/delegate-sub-agent-tool.js.map +1 -1
- package/dist/modules/agents/sub-agents/sub-agent-runner.d.ts +3 -4
- package/dist/modules/agents/sub-agents/sub-agent-runner.js +95 -151
- package/dist/modules/agents/sub-agents/sub-agent-runner.js.map +1 -1
- package/dist/modules/agents/tools/workflow-tool-factory.js +1 -1
- package/dist/modules/agents/tools/workflow-tool-factory.js.map +1 -1
- package/dist/modules/agents/utils/agent-credential-provider.d.ts +1 -1
- package/dist/modules/agents/utils/agent-credential-provider.js +2 -2
- package/dist/modules/agents/utils/agent-credential-provider.js.map +1 -1
- package/dist/modules/agents/utils/execution-to-message-mapper.d.ts +1 -1
- package/dist/modules/agents/utils/execution-to-message-mapper.js +3 -0
- package/dist/modules/agents/utils/execution-to-message-mapper.js.map +1 -1
- package/dist/modules/agents/utils/mcp-attribution.js +3 -1
- package/dist/modules/agents/utils/mcp-attribution.js.map +1 -1
- package/dist/modules/breaking-changes/breaking-changes.migration-registry.service.d.ts +2 -2
- package/dist/modules/breaking-changes/breaking-changes.migration-registry.service.js.map +1 -1
- package/dist/modules/breaking-changes/breaking-changes.migration.service.d.ts +4 -11
- package/dist/modules/breaking-changes/breaking-changes.migration.service.js +52 -28
- package/dist/modules/breaking-changes/breaking-changes.migration.service.js.map +1 -1
- package/dist/modules/breaking-changes/detection-report.d.ts +5 -0
- package/dist/modules/breaking-changes/detection-report.js +18 -0
- package/dist/modules/breaking-changes/detection-report.js.map +1 -0
- package/dist/modules/breaking-changes/migrations/execute-workflow-each-to-loop.migration.d.ts +2 -0
- package/dist/modules/breaking-changes/migrations/execute-workflow-each-to-loop.migration.js +159 -0
- package/dist/modules/breaking-changes/migrations/execute-workflow-each-to-loop.migration.js.map +1 -0
- package/dist/modules/breaking-changes/migrations/index.d.ts +2 -2
- package/dist/modules/breaking-changes/migrations/index.js +2 -1
- package/dist/modules/breaking-changes/migrations/index.js.map +1 -1
- package/dist/modules/breaking-changes/migrations/node-migration.d.ts +30 -1
- package/dist/modules/breaking-changes/migrations/node-migration.js +12 -0
- package/dist/modules/breaking-changes/migrations/node-migration.js.map +1 -1
- package/dist/modules/breaking-changes/rules/v2/oauth-callback-auth.rule.js +2 -1
- package/dist/modules/breaking-changes/rules/v2/oauth-callback-auth.rule.js.map +1 -1
- package/dist/modules/breaking-changes/rules/v2/pyodide-removed.rule.js +6 -12
- package/dist/modules/breaking-changes/rules/v2/pyodide-removed.rule.js.map +1 -1
- package/dist/modules/breaking-changes/rules/v3/agent-node-version.rule.js +6 -12
- package/dist/modules/breaking-changes/rules/v3/agent-node-version.rule.js.map +1 -1
- package/dist/modules/breaking-changes/rules/v3/agent-removed-modes.rule.js +7 -13
- package/dist/modules/breaking-changes/rules/v3/agent-removed-modes.rule.js.map +1 -1
- package/dist/modules/breaking-changes/rules/v3/ai-transform-deprecated.rule.js +6 -12
- package/dist/modules/breaking-changes/rules/v3/ai-transform-deprecated.rule.js.map +1 -1
- package/dist/modules/breaking-changes/rules/v3/always-output-data-multi-output.rule.js +6 -13
- package/dist/modules/breaking-changes/rules/v3/always-output-data-multi-output.rule.js.map +1 -1
- package/dist/modules/breaking-changes/rules/v3/caller-policy-default-any.rule.js +2 -1
- package/dist/modules/breaking-changes/rules/v3/caller-policy-default-any.rule.js.map +1 -1
- package/dist/modules/breaking-changes/rules/v3/chat-hub-deprecated.rule.js +2 -1
- package/dist/modules/breaking-changes/rules/v3/chat-hub-deprecated.rule.js.map +1 -1
- package/dist/modules/breaking-changes/rules/v3/chat-trigger-embedded-json.rule.js +6 -12
- package/dist/modules/breaking-changes/rules/v3/chat-trigger-embedded-json.rule.js.map +1 -1
- package/dist/modules/breaking-changes/rules/v3/compression-node-limits.rule.js +2 -1
- package/dist/modules/breaking-changes/rules/v3/compression-node-limits.rule.js.map +1 -1
- package/dist/modules/breaking-changes/rules/v3/docker-only-deployment.rule.js +2 -1
- package/dist/modules/breaking-changes/rules/v3/docker-only-deployment.rule.js.map +1 -1
- package/dist/modules/breaking-changes/rules/v3/execute-workflow-each-mode.rule.js +6 -12
- package/dist/modules/breaking-changes/rules/v3/execute-workflow-each-mode.rule.js.map +1 -1
- package/dist/modules/breaking-changes/rules/v3/execute-workflow-source-modes.rule.js +6 -12
- package/dist/modules/breaking-changes/rules/v3/execute-workflow-source-modes.rule.js.map +1 -1
- package/dist/modules/breaking-changes/rules/v3/external-secrets-project-roles-default.rule.js +3 -2
- package/dist/modules/breaking-changes/rules/v3/external-secrets-project-roles-default.rule.js.map +1 -1
- package/dist/modules/breaking-changes/rules/v3/get-paired-item.rule.js +6 -12
- package/dist/modules/breaking-changes/rules/v3/get-paired-item.rule.js.map +1 -1
- package/dist/modules/breaking-changes/rules/v3/gmail-trigger-version.rule.js +6 -12
- package/dist/modules/breaking-changes/rules/v3/gmail-trigger-version.rule.js.map +1 -1
- package/dist/modules/breaking-changes/rules/v3/in-memory-binary-data.rule.js +2 -1
- package/dist/modules/breaking-changes/rules/v3/in-memory-binary-data.rule.js.map +1 -1
- package/dist/modules/breaking-changes/rules/v3/offload-manual-executions.rule.js +2 -1
- package/dist/modules/breaking-changes/rules/v3/offload-manual-executions.rule.js.map +1 -1
- package/dist/modules/breaking-changes/rules/v3/pre-execute-error-creates-execution.rule.js +2 -1
- package/dist/modules/breaking-changes/rules/v3/pre-execute-error-creates-execution.rule.js.map +1 -1
- package/dist/modules/breaking-changes/rules/v3/ssrf-default-blocked-ranges.rule.js +2 -1
- package/dist/modules/breaking-changes/rules/v3/ssrf-default-blocked-ranges.rule.js.map +1 -1
- package/dist/modules/breaking-changes/rules/v3/task-runner-task-timeout.rule.js +2 -1
- package/dist/modules/breaking-changes/rules/v3/task-runner-task-timeout.rule.js.map +1 -1
- package/dist/modules/breaking-changes/rules/v3/unverified-packages.rule.js +2 -1
- package/dist/modules/breaking-changes/rules/v3/unverified-packages.rule.js.map +1 -1
- package/dist/modules/chat-hub/chat-hub-workflow.service.d.ts +1 -0
- package/dist/modules/chat-hub/chat-hub-workflow.service.js +7 -2
- package/dist/modules/chat-hub/chat-hub-workflow.service.js.map +1 -1
- package/dist/modules/chat-hub/chat-hub.attachment.service.js +3 -1
- package/dist/modules/chat-hub/chat-hub.attachment.service.js.map +1 -1
- package/dist/modules/community-packages/community-node-types-utils.d.ts +2 -2
- package/dist/modules/community-packages/community-node-types-utils.js +4 -2
- package/dist/modules/community-packages/community-node-types-utils.js.map +1 -1
- package/dist/modules/community-packages/community-node-types.service.d.ts +1 -0
- package/dist/modules/community-packages/community-node-types.service.js +12 -6
- package/dist/modules/community-packages/community-node-types.service.js.map +1 -1
- package/dist/modules/community-packages/community-packages.config.d.ts +1 -0
- package/dist/modules/community-packages/community-packages.config.js +2 -0
- package/dist/modules/community-packages/community-packages.config.js.map +1 -1
- package/dist/modules/community-packages/community-packages.lifecycle.service.d.ts +2 -1
- package/dist/modules/community-packages/community-packages.lifecycle.service.js +23 -18
- package/dist/modules/community-packages/community-packages.lifecycle.service.js.map +1 -1
- package/dist/modules/community-packages/community-packages.service.d.ts +1 -0
- package/dist/modules/community-packages/community-packages.service.js +33 -2
- package/dist/modules/community-packages/community-packages.service.js.map +1 -1
- package/dist/modules/engine-v2/engine-data-plane-client.d.ts +2 -1
- package/dist/modules/engine-v2/engine-data-plane-client.js +14 -0
- package/dist/modules/engine-v2/engine-data-plane-client.js.map +1 -1
- package/dist/modules/engine-v2/engine-v2.module.d.ts +1 -0
- package/dist/modules/engine-v2/engine-v2.module.js +11 -2
- package/dist/modules/engine-v2/engine-v2.module.js.map +1 -1
- package/dist/modules/engine-v2/engine-v2.runtime.d.ts +11 -2
- package/dist/modules/engine-v2/engine-v2.runtime.js +29 -11
- package/dist/modules/engine-v2/engine-v2.runtime.js.map +1 -1
- package/dist/modules/external-secrets.ee/constants.d.ts +0 -1
- package/dist/modules/external-secrets.ee/constants.js +1 -2
- package/dist/modules/external-secrets.ee/constants.js.map +1 -1
- package/dist/modules/external-secrets.ee/external-secrets-provider-connection-manager.ee.d.ts +1 -2
- package/dist/modules/external-secrets.ee/external-secrets-provider-connection-manager.ee.js +28 -29
- package/dist/modules/external-secrets.ee/external-secrets-provider-connection-manager.ee.js.map +1 -1
- package/dist/modules/external-secrets.ee/external-secrets.config.d.ts +2 -0
- package/dist/modules/external-secrets.ee/external-secrets.config.js +12 -0
- package/dist/modules/external-secrets.ee/external-secrets.config.js.map +1 -1
- package/dist/modules/external-secrets.ee/provider-lifecycle.service.js +1 -1
- package/dist/modules/external-secrets.ee/provider-lifecycle.service.js.map +1 -1
- package/dist/modules/external-secrets.ee/providers/infisical.js +6 -2
- package/dist/modules/external-secrets.ee/providers/infisical.js.map +1 -1
- package/dist/modules/external-secrets.ee/providers/vault.d.ts +1 -0
- package/dist/modules/external-secrets.ee/providers/vault.js +43 -13
- package/dist/modules/external-secrets.ee/providers/vault.js.map +1 -1
- package/dist/modules/external-secrets.ee/retry-manager.service.js +9 -1
- package/dist/modules/external-secrets.ee/retry-manager.service.js.map +1 -1
- package/dist/modules/external-secrets.ee/secrets-cache.service.d.ts +5 -2
- package/dist/modules/external-secrets.ee/secrets-cache.service.js +23 -20
- package/dist/modules/external-secrets.ee/secrets-cache.service.js.map +1 -1
- package/dist/modules/external-secrets.ee/types.d.ts +1 -0
- package/dist/modules/external-secrets.ee/types.js +7 -1
- package/dist/modules/external-secrets.ee/types.js.map +1 -1
- package/dist/modules/external-secrets.ee/with-timeout.d.ts +4 -0
- package/dist/modules/external-secrets.ee/with-timeout.js +21 -0
- package/dist/modules/external-secrets.ee/with-timeout.js.map +1 -0
- package/dist/modules/insights/database/repositories/insights-by-period.repository.d.ts +3 -2
- package/dist/modules/insights/database/repositories/insights-by-period.repository.js +4 -3
- package/dist/modules/insights/database/repositories/insights-by-period.repository.js.map +1 -1
- package/dist/modules/insights/insights-collection.service.js +10 -2
- package/dist/modules/insights/insights-collection.service.js.map +1 -1
- package/dist/modules/insights/insights.module.d.ts +1 -1
- package/dist/modules/instance-ai/computer-use-availability.d.ts +14 -0
- package/dist/modules/instance-ai/computer-use-availability.js +42 -0
- package/dist/modules/instance-ai/computer-use-availability.js.map +1 -0
- package/dist/modules/instance-ai/eval/agent-execution.service.js +1 -1
- package/dist/modules/instance-ai/eval/agent-execution.service.js.map +1 -1
- package/dist/modules/instance-ai/eval/eval-mocked-credentials-helper.d.ts +4 -2
- package/dist/modules/instance-ai/eval/eval-mocked-credentials-helper.js +17 -3
- package/dist/modules/instance-ai/eval/eval-mocked-credentials-helper.js.map +1 -1
- package/dist/modules/instance-ai/eval/execution.service.js +14 -4
- package/dist/modules/instance-ai/eval/execution.service.js.map +1 -1
- package/dist/modules/instance-ai/eval/thread-restore.service.d.ts +9 -3
- package/dist/modules/instance-ai/eval/thread-restore.service.js +75 -7
- package/dist/modules/instance-ai/eval/thread-restore.service.js.map +1 -1
- package/dist/modules/instance-ai/eval/workflow-analysis.d.ts +3 -1
- package/dist/modules/instance-ai/eval/workflow-analysis.js +16 -2
- package/dist/modules/instance-ai/eval/workflow-analysis.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai-conversation-history.service.js +1 -1
- package/dist/modules/instance-ai/instance-ai-conversation-history.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai-execution-wait.d.ts +14 -0
- package/dist/modules/instance-ai/instance-ai-execution-wait.js +66 -0
- package/dist/modules/instance-ai/instance-ai-execution-wait.js.map +1 -0
- package/dist/modules/instance-ai/instance-ai-settings.service.js +1 -4
- package/dist/modules/instance-ai/instance-ai-settings.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai-step-run.d.ts +32 -0
- package/dist/modules/instance-ai/instance-ai-step-run.js +135 -0
- package/dist/modules/instance-ai/instance-ai-step-run.js.map +1 -0
- package/dist/modules/instance-ai/instance-ai.adapter.service.d.ts +9 -2
- package/dist/modules/instance-ai/instance-ai.adapter.service.js +305 -92
- package/dist/modules/instance-ai/instance-ai.adapter.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.controller.d.ts +1 -0
- package/dist/modules/instance-ai/instance-ai.controller.js +17 -4
- package/dist/modules/instance-ai/instance-ai.controller.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.service.d.ts +4 -4
- package/dist/modules/instance-ai/instance-ai.service.js +85 -121
- package/dist/modules/instance-ai/instance-ai.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-context.service.d.ts +39 -10
- package/dist/modules/instance-ai/instance-context.service.js +283 -69
- package/dist/modules/instance-ai/instance-context.service.js.map +1 -1
- package/dist/modules/instance-ai/internal-messages.d.ts +11 -2
- package/dist/modules/instance-ai/internal-messages.js +183 -16
- package/dist/modules/instance-ai/internal-messages.js.map +1 -1
- package/dist/modules/instance-ai/message-parser.js.map +1 -1
- package/dist/modules/instance-registry/instance-registry.module.d.ts +2 -2
- package/dist/modules/instance-registry/instance-registry.module.js +5 -1
- package/dist/modules/instance-registry/instance-registry.module.js.map +1 -1
- package/dist/modules/instance-registry/stale-member-cleanup.task.d.ts +1 -1
- package/dist/modules/instance-registry/stale-member-cleanup.task.js +1 -1
- package/dist/modules/instance-registry/stale-member-cleanup.task.js.map +1 -1
- package/dist/modules/instance-registry/storage/redis-instance-storage.js +2 -10
- package/dist/modules/instance-registry/storage/redis-instance-storage.js.map +1 -1
- package/dist/modules/mcp/mcp-post-save-metrics.service.d.ts +10 -0
- package/dist/modules/mcp/mcp-post-save-metrics.service.js +40 -0
- package/dist/modules/mcp/mcp-post-save-metrics.service.js.map +1 -0
- package/dist/modules/mcp/mcp-protected-resource.d.ts +5 -2
- package/dist/modules/mcp/mcp-protected-resource.js +25 -4
- package/dist/modules/mcp/mcp-protected-resource.js.map +1 -1
- package/dist/modules/mcp/mcp-scopes.d.ts +3 -0
- package/dist/modules/mcp/mcp-scopes.js +21 -1
- package/dist/modules/mcp/mcp-scopes.js.map +1 -1
- package/dist/modules/mcp/mcp-tool-availability.d.ts +7 -0
- package/dist/modules/mcp/mcp-tool-availability.js +11 -0
- package/dist/modules/mcp/mcp-tool-availability.js.map +1 -1
- package/dist/modules/mcp/mcp.config.d.ts +1 -0
- package/dist/modules/mcp/mcp.config.js +5 -0
- package/dist/modules/mcp/mcp.config.js.map +1 -1
- package/dist/modules/mcp/mcp.constants.d.ts +6 -0
- package/dist/modules/mcp/mcp.constants.js +7 -1
- package/dist/modules/mcp/mcp.constants.js.map +1 -1
- package/dist/modules/mcp/mcp.controller.js +3 -6
- package/dist/modules/mcp/mcp.controller.js.map +1 -1
- package/dist/modules/mcp/mcp.service.d.ts +11 -7
- package/dist/modules/mcp/mcp.service.js +116 -43
- package/dist/modules/mcp/mcp.service.js.map +1 -1
- package/dist/modules/mcp/mcp.types.d.ts +0 -1
- package/dist/modules/mcp/tools/get-instance-context.tool.d.ts +29 -0
- package/dist/modules/mcp/tools/get-instance-context.tool.js +109 -0
- package/dist/modules/mcp/tools/get-instance-context.tool.js.map +1 -0
- package/dist/modules/mcp/tools/get-node-usage.tool.d.ts +13 -0
- package/dist/modules/mcp/tools/get-node-usage.tool.js +117 -0
- package/dist/modules/mcp/tools/get-node-usage.tool.js.map +1 -0
- package/dist/modules/mcp/tools/get-user-preferences.tool.d.ts +10 -0
- package/dist/modules/mcp/tools/get-user-preferences.tool.js +108 -0
- package/dist/modules/mcp/tools/get-user-preferences.tool.js.map +1 -0
- package/dist/modules/mcp/tools/instance-activity.tool.d.ts +27 -0
- package/dist/modules/mcp/tools/instance-activity.tool.js +205 -0
- package/dist/modules/mcp/tools/instance-activity.tool.js.map +1 -0
- package/dist/modules/mcp/tools/list-credentials.tool.d.ts +63 -13
- package/dist/modules/mcp/tools/list-credentials.tool.js +8 -1
- package/dist/modules/mcp/tools/list-credentials.tool.js.map +1 -1
- package/dist/modules/mcp/tools/search-executions.tool.d.ts +3 -3
- package/dist/modules/mcp/tools/search-executions.tool.js +22 -14
- package/dist/modules/mcp/tools/search-executions.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/create-workflow-from-code.tool.d.ts +8 -4
- package/dist/modules/mcp/tools/workflow-builder/create-workflow-from-code.tool.js +128 -70
- package/dist/modules/mcp/tools/workflow-builder/create-workflow-from-code.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/error-code.utils.d.ts +1 -0
- package/dist/modules/mcp/tools/workflow-builder/error-code.utils.js +22 -0
- package/dist/modules/mcp/tools/workflow-builder/error-code.utils.js.map +1 -0
- package/dist/modules/mcp/tools/workflow-builder/get-workflow-best-practices.tool.d.ts +1 -3
- package/dist/modules/mcp/tools/workflow-builder/get-workflow-best-practices.tool.js +5 -6
- 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-node-types.tool.d.ts +1 -1
- package/dist/modules/mcp/tools/workflow-builder/get-workflow-node-types.tool.js +2 -2
- package/dist/modules/mcp/tools/workflow-builder/get-workflow-node-types.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/get-workflow-sdk-reference.tool.d.ts +2 -5
- package/dist/modules/mcp/tools/workflow-builder/get-workflow-sdk-reference.tool.js +10 -16
- package/dist/modules/mcp/tools/workflow-builder/get-workflow-sdk-reference.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/install-community-node.tool.d.ts +12 -0
- package/dist/modules/mcp/tools/workflow-builder/install-community-node.tool.js +140 -0
- package/dist/modules/mcp/tools/workflow-builder/install-community-node.tool.js.map +1 -0
- package/dist/modules/mcp/tools/workflow-builder/mcp-instructions.d.ts +2 -2
- package/dist/modules/mcp/tools/workflow-builder/mcp-instructions.js +17 -9
- 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 +1 -3
- package/dist/modules/mcp/tools/workflow-builder/sdk-reference-content.js +2 -6
- package/dist/modules/mcp/tools/workflow-builder/sdk-reference-content.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/search-workflow-nodes.tool.d.ts +1 -1
- package/dist/modules/mcp/tools/workflow-builder/search-workflow-nodes.tool.js +9 -8
- package/dist/modules/mcp/tools/workflow-builder/search-workflow-nodes.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/uninstalled-node-warnings.d.ts +13 -0
- package/dist/modules/mcp/tools/workflow-builder/uninstalled-node-warnings.js +23 -0
- package/dist/modules/mcp/tools/workflow-builder/uninstalled-node-warnings.js.map +1 -0
- package/dist/modules/mcp/tools/workflow-builder/update-workflow.tool.d.ts +18 -14
- package/dist/modules/mcp/tools/workflow-builder/update-workflow.tool.js +200 -87
- 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 +1 -4
- package/dist/modules/mcp/tools/workflow-builder/validate-workflow-code.tool.js +3 -5
- 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 +1 -3
- package/dist/modules/mcp/tools/workflow-builder/workflow-operations.js +2 -2
- package/dist/modules/mcp/tools/workflow-builder/workflow-operations.js.map +1 -1
- package/dist/modules/mcp-registry/node-description-transform.js +3 -0
- package/dist/modules/mcp-registry/node-description-transform.js.map +1 -1
- package/dist/modules/mcp-registry/registry/mcp-registry-api.client.js +1 -1
- package/dist/modules/mcp-registry/registry/mcp-registry-api.client.js.map +1 -1
- package/dist/modules/mcp-registry/registry/mcp-registry-capabilities.d.ts +6 -0
- package/dist/modules/mcp-registry/registry/mcp-registry-capabilities.js +34 -0
- package/dist/modules/mcp-registry/registry/mcp-registry-capabilities.js.map +1 -0
- package/dist/modules/mcp-registry/registry/mcp-registry-server.entity.d.ts +1 -0
- package/dist/modules/mcp-registry/registry/mcp-registry-server.entity.js.map +1 -1
- package/dist/modules/mcp-registry/registry/mcp-registry.service.d.ts +4 -1
- package/dist/modules/mcp-registry/registry/mcp-registry.service.js +20 -9
- package/dist/modules/mcp-registry/registry/mcp-registry.service.js.map +1 -1
- package/dist/modules/mcp-registry/registry/mcp-registry.types.d.ts +3 -0
- package/dist/modules/mcp-registry/registry/mcp-registry.types.js +1 -0
- package/dist/modules/mcp-registry/registry/mcp-registry.types.js.map +1 -1
- package/dist/modules/n8n-packages/engine/n8n-package-parser.js +1 -1
- package/dist/modules/n8n-packages/engine/n8n-package-parser.js.map +1 -1
- package/dist/modules/n8n-packages/entities/credential/credential.serializer.js.map +1 -1
- package/dist/modules/n8n-packages/entities/variable/variable-requirements.extractor.d.ts +8 -2
- package/dist/modules/n8n-packages/entities/variable/variable-requirements.extractor.js.map +1 -1
- package/dist/modules/n8n-packages/entities/workflow/workflow-published-state.d.ts +1 -1
- package/dist/modules/n8n-packages/entities/workflow/workflow-published-state.js +2 -2
- package/dist/modules/n8n-packages/entities/workflow/workflow-published-state.js.map +1 -1
- package/dist/modules/n8n-packages/entities/workflow/workflow.serializer.d.ts +1 -2
- package/dist/modules/n8n-packages/entities/workflow/workflow.serializer.js +4 -2
- package/dist/modules/n8n-packages/entities/workflow/workflow.serializer.js.map +1 -1
- package/dist/modules/n8n-packages/io/directory/package-directory-inventory-reader.d.ts +43 -0
- package/dist/modules/n8n-packages/io/directory/package-directory-inventory-reader.js +177 -0
- package/dist/modules/n8n-packages/io/directory/package-directory-inventory-reader.js.map +1 -0
- package/dist/modules/n8n-packages/spec/serialized/workflow-metadata.schema.d.ts +3 -0
- package/dist/modules/n8n-packages/spec/serialized/workflow-metadata.schema.js +1 -0
- package/dist/modules/n8n-packages/spec/serialized/workflow-metadata.schema.js.map +1 -1
- package/dist/modules/n8n-packages/spec/serialized/workflow.schema.d.ts +0 -3
- package/dist/modules/n8n-packages/spec/serialized/workflow.schema.js +0 -1
- package/dist/modules/n8n-packages/spec/serialized/workflow.schema.js.map +1 -1
- package/dist/modules/oauth-jwe/oauth-jwe-key.service.d.ts +1 -0
- package/dist/modules/oauth-jwe/oauth-jwe-key.service.js +10 -3
- package/dist/modules/oauth-jwe/oauth-jwe-key.service.js.map +1 -1
- package/dist/modules/oauth-server/oauth-clients.controller.js +1 -1
- package/dist/modules/oauth-server/oauth-clients.controller.js.map +1 -1
- package/dist/modules/oauth-server/oauth-consent.service.d.ts +1 -0
- package/dist/modules/oauth-server/oauth-consent.service.js +21 -10
- package/dist/modules/oauth-server/oauth-consent.service.js.map +1 -1
- package/dist/modules/oauth-server/oauth-server.service.d.ts +1 -1
- package/dist/modules/oauth-server/oauth-server.service.js +2 -2
- package/dist/modules/oauth-server/oauth-server.service.js.map +1 -1
- package/dist/modules/oauth-server/oauth-token.service.d.ts +3 -1
- package/dist/modules/oauth-server/oauth-token.service.js +10 -2
- package/dist/modules/oauth-server/oauth-token.service.js.map +1 -1
- package/dist/modules/policy-infrastructure/policy-decision-audit.d.ts +1 -1
- package/dist/modules/policy-infrastructure/policy-decision-audit.js +8 -1
- package/dist/modules/policy-infrastructure/policy-decision-audit.js.map +1 -1
- package/dist/modules/policy-infrastructure/policy-decision.service.js +1 -0
- package/dist/modules/policy-infrastructure/policy-decision.service.js.map +1 -1
- package/dist/modules/promotions.ee/base-branch-files.d.ts +2 -2
- package/dist/modules/promotions.ee/base-branch-files.js +2 -3
- package/dist/modules/promotions.ee/base-branch-files.js.map +1 -1
- package/dist/modules/promotions.ee/constants.d.ts +1 -0
- package/dist/modules/promotions.ee/constants.js +2 -1
- package/dist/modules/promotions.ee/constants.js.map +1 -1
- package/dist/modules/promotions.ee/database/repositories/promotion-provider.repository.js +1 -14
- package/dist/modules/promotions.ee/database/repositories/promotion-provider.repository.js.map +1 -1
- package/dist/modules/promotions.ee/promotion-binding-preflight.service.d.ts +22 -0
- package/dist/modules/promotions.ee/promotion-binding-preflight.service.js +264 -0
- package/dist/modules/promotions.ee/promotion-binding-preflight.service.js.map +1 -0
- package/dist/modules/promotions.ee/promotion-change.service.d.ts +8 -3
- package/dist/modules/promotions.ee/promotion-change.service.js +133 -24
- package/dist/modules/promotions.ee/promotion-change.service.js.map +1 -1
- package/dist/modules/promotions.ee/promotion-changes.controller.d.ts +2 -2
- package/dist/modules/promotions.ee/promotion-changes.controller.js +10 -12
- package/dist/modules/promotions.ee/promotion-changes.controller.js.map +1 -1
- package/dist/modules/promotions.ee/promotion-connections.service.d.ts +48 -2
- package/dist/modules/promotions.ee/promotion-connections.service.js +66 -14
- package/dist/modules/promotions.ee/promotion-connections.service.js.map +1 -1
- package/dist/modules/promotions.ee/promotions-git.service.d.ts +8 -1
- package/dist/modules/promotions.ee/promotions-git.service.js +27 -9
- package/dist/modules/promotions.ee/promotions-git.service.js.map +1 -1
- package/dist/modules/promotions.ee/promotions-git.utils.d.ts +8 -2
- package/dist/modules/promotions.ee/promotions-git.utils.js +10 -0
- package/dist/modules/promotions.ee/promotions-git.utils.js.map +1 -1
- package/dist/modules/promotions.ee/promotions.service.d.ts +9 -5
- package/dist/modules/promotions.ee/promotions.service.js +78 -21
- package/dist/modules/promotions.ee/promotions.service.js.map +1 -1
- package/dist/modules/promotions.ee/promotions.types.d.ts +6 -0
- package/dist/modules/promotions.ee/promotions.types.js.map +1 -1
- package/dist/modules/token-exchange/database/repositories/token-exchange-jti.repository.js +1 -0
- package/dist/modules/token-exchange/database/repositories/token-exchange-jti.repository.js.map +1 -1
- package/dist/modules/token-exchange/services/jti-cleanup.task.d.ts +1 -1
- package/dist/modules/token-exchange/services/jti-cleanup.task.js +1 -1
- package/dist/modules/token-exchange/services/jti-cleanup.task.js.map +1 -1
- package/dist/modules/type-availability-policies/constants.d.ts +1 -0
- package/dist/modules/type-availability-policies/constants.js +2 -1
- package/dist/modules/type-availability-policies/constants.js.map +1 -1
- package/dist/modules/type-availability-policies/database/entities/type-availability-policy.entity.js +2 -1
- package/dist/modules/type-availability-policies/database/entities/type-availability-policy.entity.js.map +1 -1
- package/dist/modules/type-availability-policies/database/repositories/type-availability-policy-scope.repository.d.ts +2 -1
- package/dist/modules/type-availability-policies/database/repositories/type-availability-policy-scope.repository.js +12 -0
- package/dist/modules/type-availability-policies/database/repositories/type-availability-policy-scope.repository.js.map +1 -1
- package/dist/modules/type-availability-policies/database/repositories/type-availability-policy.repository.d.ts +5 -1
- package/dist/modules/type-availability-policies/database/repositories/type-availability-policy.repository.js +11 -2
- package/dist/modules/type-availability-policies/database/repositories/type-availability-policy.repository.js.map +1 -1
- package/dist/modules/type-availability-policies/node-type-policy.check.d.ts +17 -0
- package/dist/modules/type-availability-policies/node-type-policy.check.js +87 -0
- package/dist/modules/type-availability-policies/node-type-policy.check.js.map +1 -0
- package/dist/modules/type-availability-policies/package-resolver.d.ts +4 -0
- package/dist/modules/type-availability-policies/package-resolver.js +26 -0
- package/dist/modules/type-availability-policies/package-resolver.js.map +1 -0
- package/dist/modules/type-availability-policies/policy-evaluator.d.ts +6 -4
- package/dist/modules/type-availability-policies/policy-evaluator.js +16 -13
- package/dist/modules/type-availability-policies/policy-evaluator.js.map +1 -1
- package/dist/modules/type-availability-policies/policy-rule.types.d.ts +4 -0
- package/dist/modules/type-availability-policies/policy-shadow-lint.d.ts +2 -1
- package/dist/modules/type-availability-policies/policy-shadow-lint.js +7 -5
- package/dist/modules/type-availability-policies/policy-shadow-lint.js.map +1 -1
- package/dist/modules/type-availability-policies/type-availability-policies.module.d.ts +1 -1
- package/dist/modules/type-availability-policies/type-availability-policies.module.js +1 -0
- package/dist/modules/type-availability-policies/type-availability-policies.module.js.map +1 -1
- package/dist/modules/type-availability-policies/type-availability-policy-instance.controller.js +3 -3
- package/dist/modules/type-availability-policies/type-availability-policy-instance.controller.js.map +1 -1
- package/dist/modules/type-availability-policies/type-availability-policy.service.d.ts +33 -4
- package/dist/modules/type-availability-policies/type-availability-policy.service.js +189 -28
- package/dist/modules/type-availability-policies/type-availability-policy.service.js.map +1 -1
- package/dist/modules/workflow-index/workflow-index.service.js +5 -2
- package/dist/modules/workflow-index/workflow-index.service.js.map +1 -1
- package/dist/node-catalog/index.d.ts +1 -1
- package/dist/node-catalog/index.js.map +1 -1
- package/dist/node-catalog/node-catalog.service.d.ts +28 -4
- package/dist/node-catalog/node-catalog.service.js +202 -7
- package/dist/node-catalog/node-catalog.service.js.map +1 -1
- package/dist/node-catalog/registry-lookup.d.ts +12 -0
- package/dist/node-catalog/registry-lookup.js +68 -0
- package/dist/node-catalog/registry-lookup.js.map +1 -0
- package/dist/node-execution/execute-node.service.d.ts +72 -0
- package/dist/node-execution/execute-node.service.js +297 -0
- package/dist/node-execution/execute-node.service.js.map +1 -0
- package/dist/node-execution/index.d.ts +2 -0
- package/dist/node-execution/index.js +5 -1
- package/dist/node-execution/index.js.map +1 -1
- package/dist/oauth/dcr-managed-fields.d.ts +1 -1
- package/dist/oauth/dcr-managed-fields.js +4 -2
- package/dist/oauth/dcr-managed-fields.js.map +1 -1
- package/dist/policy/policy-enforcement-backend.d.ts +2 -1
- package/dist/policy/policy-enforcement.service.d.ts +3 -1
- package/dist/policy/policy-enforcement.service.js +9 -0
- package/dist/policy/policy-enforcement.service.js.map +1 -1
- package/dist/posthog/index.d.ts +1 -0
- package/dist/posthog/index.js +35 -14
- package/dist/posthog/index.js.map +1 -1
- package/dist/public-api/constants.d.ts +1 -0
- package/dist/public-api/constants.js +5 -0
- package/dist/public-api/constants.js.map +1 -0
- package/dist/public-api/public-api-controller.registry.d.ts +1 -0
- package/dist/public-api/public-api-controller.registry.js +15 -0
- package/dist/public-api/public-api-controller.registry.js.map +1 -1
- package/dist/public-api/types.d.ts +2 -27
- package/dist/public-api/v1/controllers/credentials.public.controller.d.ts +3 -1
- package/dist/public-api/v1/controllers/credentials.public.controller.js +52 -1
- package/dist/public-api/v1/controllers/credentials.public.controller.js.map +1 -1
- package/dist/public-api/v1/controllers/executions.public.controller.js +3 -3
- package/dist/public-api/v1/controllers/executions.public.controller.js.map +1 -1
- package/dist/public-api/v1/controllers/folders.public.controller.d.ts +10 -0
- package/dist/public-api/v1/controllers/folders.public.controller.js +121 -0
- package/dist/public-api/v1/controllers/folders.public.controller.js.map +1 -0
- package/dist/public-api/v1/controllers/index.d.ts +2 -0
- package/dist/public-api/v1/controllers/index.js +2 -0
- package/dist/public-api/v1/controllers/index.js.map +1 -1
- package/dist/public-api/v1/controllers/insights.public.controller.d.ts +9 -0
- package/dist/public-api/v1/controllers/insights.public.controller.js +69 -0
- package/dist/public-api/v1/controllers/insights.public.controller.js.map +1 -0
- package/dist/public-api/v1/controllers/node-type-policies.public.controller.d.ts +11 -5
- package/dist/public-api/v1/controllers/node-type-policies.public.controller.js +152 -4
- package/dist/public-api/v1/controllers/node-type-policies.public.controller.js.map +1 -1
- package/dist/public-api/v1/controllers/promotions.public.controller.d.ts +5 -2
- package/dist/public-api/v1/controllers/promotions.public.controller.js +60 -4
- package/dist/public-api/v1/controllers/promotions.public.controller.js.map +1 -1
- package/dist/public-api/v1/controllers/roles.public.controller.js +1 -0
- package/dist/public-api/v1/controllers/roles.public.controller.js.map +1 -1
- package/dist/public-api/v1/controllers/tags.public.controller.d.ts +3 -1
- package/dist/public-api/v1/controllers/tags.public.controller.js +61 -0
- package/dist/public-api/v1/controllers/tags.public.controller.js.map +1 -1
- package/dist/public-api/v1/handlers/credentials/credentials.utils.d.ts +3 -3
- package/dist/public-api/v1/handlers/credentials/credentials.utils.js +1 -6
- package/dist/public-api/v1/handlers/credentials/credentials.utils.js.map +1 -1
- package/dist/public-api/v1/handlers/folders/folders.handler.d.ts +0 -7
- package/dist/public-api/v1/handlers/folders/folders.handler.js +0 -29
- package/dist/public-api/v1/handlers/folders/folders.handler.js.map +1 -1
- package/dist/public-api/v1/openapi.yml +4051 -2008
- package/dist/public-api/v1/shared/middlewares/global.middleware.d.ts +1 -1
- package/dist/public-api/v1/shared/middlewares/global.middleware.js +4 -3
- package/dist/public-api/v1/shared/middlewares/global.middleware.js.map +1 -1
- package/dist/requests.d.ts +1 -0
- package/dist/scheduling/durable-job-provisioner.d.ts +10 -1
- package/dist/scheduling/durable-job-provisioner.js +26 -9
- 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 -3
- package/dist/scheduling/durable-scheduler.js.map +1 -1
- package/dist/scheduling/scheduled-job-owner-registry.d.ts +2 -1
- package/dist/scheduling/scheduled-job-owner-registry.js +2 -1
- package/dist/scheduling/scheduled-job-owner-registry.js.map +1 -1
- package/dist/scheduling/system-tasks/emit-system-task-metric.d.ts +3 -0
- package/dist/scheduling/system-tasks/emit-system-task-metric.js +11 -0
- package/dist/scheduling/system-tasks/emit-system-task-metric.js.map +1 -0
- package/dist/scheduling/system-tasks/system-task-handler.d.ts +5 -1
- package/dist/scheduling/system-tasks/system-task-handler.js +9 -8
- package/dist/scheduling/system-tasks/system-task-handler.js.map +1 -1
- package/dist/scheduling/system-tasks/system-task-job-registrar.d.ts +28 -0
- package/dist/scheduling/system-tasks/system-task-job-registrar.js +130 -0
- package/dist/scheduling/system-tasks/system-task-job-registrar.js.map +1 -0
- package/dist/scheduling/system-tasks/system-task-run-observer.d.ts +13 -0
- package/dist/scheduling/system-tasks/system-task-run-observer.js +54 -0
- package/dist/scheduling/system-tasks/system-task-run-observer.js.map +1 -0
- package/dist/scheduling/system-tasks/system-task-runner.d.ts +13 -3
- package/dist/scheduling/system-tasks/system-task-runner.js +85 -15
- package/dist/scheduling/system-tasks/system-task-runner.js.map +1 -1
- package/dist/scheduling/system-tasks/system-task-scheduled-job-owner.d.ts +13 -0
- package/dist/scheduling/system-tasks/system-task-scheduled-job-owner.js +51 -0
- package/dist/scheduling/system-tasks/system-task-scheduled-job-owner.js.map +1 -0
- package/dist/scheduling/system-tasks/system-task-timer.d.ts +3 -1
- package/dist/scheduling/system-tasks/system-task-timer.js +33 -9
- package/dist/scheduling/system-tasks/system-task-timer.js.map +1 -1
- package/dist/scheduling/system-tasks/system-task-version-stamp.d.ts +5 -0
- package/dist/scheduling/system-tasks/system-task-version-stamp.js +14 -0
- package/dist/scheduling/system-tasks/system-task-version-stamp.js.map +1 -0
- package/dist/server.d.ts +0 -1
- package/dist/server.js +4 -2
- package/dist/server.js.map +1 -1
- package/dist/services/ai-gateway.service.d.ts +2 -1
- package/dist/services/ai-gateway.service.js +7 -4
- package/dist/services/ai-gateway.service.js.map +1 -1
- package/dist/services/ai-preference.service.d.ts +29 -5
- package/dist/services/ai-preference.service.js +119 -20
- package/dist/services/ai-preference.service.js.map +1 -1
- package/dist/services/credentials-tester.service.js +12 -0
- package/dist/services/credentials-tester.service.js.map +1 -1
- package/dist/services/engine-data-plane-proxy.service.d.ts +3 -1
- package/dist/services/engine-data-plane-proxy.service.js +5 -0
- package/dist/services/engine-data-plane-proxy.service.js.map +1 -1
- package/dist/services/free-ai-credits.service.d.ts +1 -0
- package/dist/services/frontend.service.js +2 -1
- package/dist/services/frontend.service.js.map +1 -1
- package/dist/services/protected-resource.registry.d.ts +2 -1
- package/dist/services/protected-resource.registry.js.map +1 -1
- package/dist/services/role.service.js +5 -4
- package/dist/services/role.service.js.map +1 -1
- package/dist/utils/strapi-utils.d.ts +1 -0
- package/dist/utils/strapi-utils.js.map +1 -1
- package/dist/wait-tracker.d.ts +5 -0
- package/dist/wait-tracker.js +130 -20
- package/dist/wait-tracker.js.map +1 -1
- package/dist/webhooks/live-webhooks.js +2 -2
- package/dist/webhooks/live-webhooks.js.map +1 -1
- package/dist/webhooks/test-webhook-registrations.service.d.ts +3 -1
- package/dist/webhooks/test-webhook-registrations.service.js +24 -11
- package/dist/webhooks/test-webhook-registrations.service.js.map +1 -1
- package/dist/webhooks/test-webhooks.d.ts +1 -0
- package/dist/webhooks/test-webhooks.js +9 -4
- package/dist/webhooks/test-webhooks.js.map +1 -1
- package/dist/webhooks/webhook-helpers.d.ts +1 -1
- package/dist/webhooks/webhook-helpers.js +113 -92
- package/dist/webhooks/webhook-helpers.js.map +1 -1
- package/dist/workflow-helpers.d.ts +1 -1
- package/dist/workflow-helpers.js +10 -3
- package/dist/workflow-helpers.js.map +1 -1
- package/dist/workflow-runner.js +104 -7
- package/dist/workflow-runner.js.map +1 -1
- package/dist/workflows/workflow.service.d.ts +1 -1
- package/package.json +42 -36
- package/dist/controllers/instance-ai-examples.controller.d.ts +0 -31
- package/dist/controllers/instance-ai-examples.controller.js +0 -104
- package/dist/controllers/instance-ai-examples.controller.js.map +0 -1
- package/dist/instance-ai-examples.data.json +0 -277957
- package/dist/public-api/v1/handlers/credentials/credentials.handler.d.ts +0 -8
- package/dist/public-api/v1/handlers/credentials/credentials.handler.js +0 -45
- package/dist/public-api/v1/handlers/credentials/credentials.handler.js.map +0 -1
- package/dist/public-api/v1/handlers/insights/insights.handler.d.ts +0 -7
- package/dist/public-api/v1/handlers/insights/insights.handler.js +0 -62
- package/dist/public-api/v1/handlers/insights/insights.handler.js.map +0 -1
- package/dist/public-api/v1/handlers/tags/tags.handler.d.ts +0 -8
- package/dist/public-api/v1/handlers/tags/tags.handler.js +0 -46
- package/dist/public-api/v1/handlers/tags/tags.handler.js.map +0 -1
|
@@ -0,0 +1,168 @@
|
|
|
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
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.ExecutionListV2Service = void 0;
|
|
16
|
+
const api_types_1 = require("@n8n/api-types");
|
|
17
|
+
const db_1 = require("@n8n/db");
|
|
18
|
+
const di_1 = require("@n8n/di");
|
|
19
|
+
const permissions_1 = require("@n8n/permissions");
|
|
20
|
+
const node_assert_1 = __importDefault(require("node:assert"));
|
|
21
|
+
const engine_data_plane_proxy_service_1 = require("../services/engine-data-plane-proxy.service");
|
|
22
|
+
const engine_v2_execution_reader_service_1 = require("./engine-v2-execution-reader.service");
|
|
23
|
+
const execution_id_1 = require("./execution-id");
|
|
24
|
+
const execution_list_v1_service_1 = require("./execution-list-v1.service");
|
|
25
|
+
const merge_execution_pages_1 = require("./merge-execution-pages");
|
|
26
|
+
class ExecutionListCtx {
|
|
27
|
+
constructor(query, v2Reader, v2Scopes, cursor) {
|
|
28
|
+
this.query = query;
|
|
29
|
+
this.v2Reader = v2Reader;
|
|
30
|
+
this.v2Scopes = v2Scopes;
|
|
31
|
+
this.cursor = cursor;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
let ExecutionListV2Service = class ExecutionListV2Service {
|
|
35
|
+
constructor(executionListV1Service, executionRepository, executionListRepository, reader, dataPlane) {
|
|
36
|
+
this.executionListV1Service = executionListV1Service;
|
|
37
|
+
this.executionRepository = executionRepository;
|
|
38
|
+
this.executionListRepository = executionListRepository;
|
|
39
|
+
this.reader = reader;
|
|
40
|
+
this.dataPlane = dataPlane;
|
|
41
|
+
}
|
|
42
|
+
async findPageWithCount(query, cursor) {
|
|
43
|
+
const ctx = await this.buildCtx(query, cursor);
|
|
44
|
+
const result = await this.findPageMerged(ctx);
|
|
45
|
+
await this.resolveWorkflowNames(result.results);
|
|
46
|
+
return result;
|
|
47
|
+
}
|
|
48
|
+
async findCurrentAndCompleted(query) {
|
|
49
|
+
const ctx = await this.buildCtx(query);
|
|
50
|
+
const [currentMerged, completedMerged] = await Promise.all([
|
|
51
|
+
this.findCurrentMerged(ctx),
|
|
52
|
+
this.findPageMerged(ctx),
|
|
53
|
+
]);
|
|
54
|
+
const results = currentMerged.concat(completedMerged.results);
|
|
55
|
+
await this.resolveWorkflowNames(results);
|
|
56
|
+
return {
|
|
57
|
+
results,
|
|
58
|
+
nextCursor: completedMerged.nextCursor,
|
|
59
|
+
count: completedMerged.count,
|
|
60
|
+
estimated: completedMerged.estimated,
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
async findCurrentMerged(ctx) {
|
|
64
|
+
const [v1Current, v2Current] = await Promise.all([
|
|
65
|
+
this.executionListV1Service.findCurrentExecutions(ctx.query),
|
|
66
|
+
this.findCurrentExecutionsV2(ctx),
|
|
67
|
+
]);
|
|
68
|
+
return v1Current.concat(v2Current).sort((a, b) => {
|
|
69
|
+
const aRunning = a.status === 'running';
|
|
70
|
+
const bRunning = b.status === 'running';
|
|
71
|
+
if (aRunning !== bRunning)
|
|
72
|
+
return aRunning ? -1 : 1;
|
|
73
|
+
return (0, api_types_1.compareExecutionListItems)(a, b);
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
async findPageMerged(ctx) {
|
|
77
|
+
const [v1Page, v2Page] = await Promise.all([this.v1Page(ctx), this.v2Page(ctx)]);
|
|
78
|
+
const merged = (0, merge_execution_pages_1.mergeExecutionPages)([v1Page, v2Page], ctx.query.range.limit, ctx.cursor);
|
|
79
|
+
return {
|
|
80
|
+
results: merged.results,
|
|
81
|
+
nextCursor: merged.nextCursor,
|
|
82
|
+
count: v1Page.count === -1 ? -1 : v1Page.count + v2Page.total,
|
|
83
|
+
estimated: v1Page.estimated,
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
async resolveV2Scope(query) {
|
|
87
|
+
if (query.metadata?.length ||
|
|
88
|
+
query.annotationTags?.length ||
|
|
89
|
+
query.vote ||
|
|
90
|
+
query.workflowVersionId !== undefined)
|
|
91
|
+
return null;
|
|
92
|
+
const user = query.user;
|
|
93
|
+
(0, node_assert_1.default)(user);
|
|
94
|
+
if ((0, permissions_1.hasGlobalScope)(user, 'workflow:read') &&
|
|
95
|
+
!query.workflowId &&
|
|
96
|
+
!query.projectId &&
|
|
97
|
+
query.isArchived === undefined &&
|
|
98
|
+
!query.workflowBooleanSettings?.length)
|
|
99
|
+
return 'all';
|
|
100
|
+
return await this.executionListRepository.findWorkflowIdsForExecutionList(query);
|
|
101
|
+
}
|
|
102
|
+
async v1Page(ctx) {
|
|
103
|
+
const { range: _, ...countQuery } = ctx.query;
|
|
104
|
+
const [rows, executionCount] = await Promise.all([
|
|
105
|
+
this.executionRepository.findManyByRangeQuery({
|
|
106
|
+
...ctx.query,
|
|
107
|
+
range: {
|
|
108
|
+
limit: ctx.query.range.limit + 1,
|
|
109
|
+
beforeId: ctx.cursor?.v1?.id ?? ctx.query.range.beforeId,
|
|
110
|
+
},
|
|
111
|
+
}),
|
|
112
|
+
this.executionListV1Service.getExecutionsCountForQuery({ ...countQuery, kind: 'count' }),
|
|
113
|
+
]);
|
|
114
|
+
return {
|
|
115
|
+
items: rows.slice(0, ctx.query.range.limit),
|
|
116
|
+
hasMore: rows.length > ctx.query.range.limit,
|
|
117
|
+
count: executionCount.count,
|
|
118
|
+
estimated: executionCount.estimated,
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
async v2Page(ctx) {
|
|
122
|
+
if (!ctx.v2Scopes)
|
|
123
|
+
return { items: [], total: 0, hasMore: false };
|
|
124
|
+
return await ctx.v2Reader.findMany(this.toV2Query(ctx.query, ctx.cursor?.v2), ctx.v2Scopes, {
|
|
125
|
+
includeTotal: true,
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
toV2Query(query, before) {
|
|
129
|
+
return {
|
|
130
|
+
status: query.status,
|
|
131
|
+
mode: query.mode,
|
|
132
|
+
startedAfter: query.startedAfter,
|
|
133
|
+
startedBefore: query.startedBefore,
|
|
134
|
+
before,
|
|
135
|
+
limit: query.range.limit,
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
async resolveWorkflowNames(results) {
|
|
139
|
+
const v2Results = results.filter((item) => (0, execution_id_1.isExecutionIdV2)(item.id));
|
|
140
|
+
if (!v2Results.length)
|
|
141
|
+
return;
|
|
142
|
+
const uniqV2WorkflowIds = [...new Set(v2Results.map((item) => item.workflowId))];
|
|
143
|
+
const workflowNames = await this.executionListRepository.findNamesForExecutionList(uniqV2WorkflowIds);
|
|
144
|
+
const namesById = new Map(workflowNames.map((workflow) => [workflow.id, workflow.name]));
|
|
145
|
+
for (const item of v2Results)
|
|
146
|
+
item.workflowName = namesById.get(item.workflowId);
|
|
147
|
+
}
|
|
148
|
+
async findCurrentExecutionsV2(ctx) {
|
|
149
|
+
if (!ctx.v2Scopes)
|
|
150
|
+
return [];
|
|
151
|
+
const currentExecutions = await ctx.v2Reader.findMany({
|
|
152
|
+
...this.toV2Query(ctx.query, ctx.cursor?.v2),
|
|
153
|
+
status: execution_list_v1_service_1.CURRENT_STATUSES,
|
|
154
|
+
order: { top: 'running' },
|
|
155
|
+
}, ctx.v2Scopes);
|
|
156
|
+
return currentExecutions.items;
|
|
157
|
+
}
|
|
158
|
+
async buildCtx(query, cursor) {
|
|
159
|
+
(0, node_assert_1.default)(this.dataPlane.isAvailable());
|
|
160
|
+
return new ExecutionListCtx(query, this.reader, await this.resolveV2Scope(query), cursor);
|
|
161
|
+
}
|
|
162
|
+
};
|
|
163
|
+
exports.ExecutionListV2Service = ExecutionListV2Service;
|
|
164
|
+
exports.ExecutionListV2Service = ExecutionListV2Service = __decorate([
|
|
165
|
+
(0, di_1.Service)(),
|
|
166
|
+
__metadata("design:paramtypes", [execution_list_v1_service_1.ExecutionListV1Service, db_1.ExecutionRepository, db_1.ExecutionListRepository, engine_v2_execution_reader_service_1.EngineV2ExecutionReader, engine_data_plane_proxy_service_1.EngineDataPlaneProxyService])
|
|
167
|
+
], ExecutionListV2Service);
|
|
168
|
+
//# sourceMappingURL=execution-list-v2.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exec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AG,EAAE,SAAS,EAAE;SACzB,EACD,GAAG,CAAC,QAAQ,CACZ,CAAC;QAEF,OAAO,iBAAiB,CAAC,KAAK,CAAC;IAChC,CAAC;IAEO,KAAK,CAAC,QAAQ,CAAC,KAAoC,EAAE,MAAwB;QAEpF,IAAA,qBAAM,EAAC,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC,CAAC;QAErC,OAAO,IAAI,gBAAgB,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,MAAM,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,CAAC;IAC3F,CAAC;CACD,CAAA;;iCAlMY,sBAAsB;IADlC,IAAA,YAAO,GAAE;qCAGiC,kDAAsB,EACzB,wBAAmB,EACf,4BAAuB,EACxC,4DAAuB,EACpB,6DAA2B;GAN5C,sBAAsB,CAkMlC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ExecutionSummaries, User } from '@n8n/db';
|
|
2
|
+
import type { Scope } from '@n8n/permissions';
|
|
3
|
+
import { EngineDataPlaneProxyService } from '../services/engine-data-plane-proxy.service';
|
|
4
|
+
import { RoleService } from '../services/role.service';
|
|
5
|
+
import { WorkflowSharingService } from '../workflows/workflow-sharing.service';
|
|
6
|
+
import { type ExecutionCursor } from './execution-cursor';
|
|
7
|
+
import { ExecutionListV1Service, type ListExecutionsResponse } from './execution-list-v1.service';
|
|
8
|
+
export declare class ExecutionListService {
|
|
9
|
+
private readonly v1Service;
|
|
10
|
+
private readonly dataPlane;
|
|
11
|
+
private readonly workflowSharingService;
|
|
12
|
+
private readonly roleService;
|
|
13
|
+
constructor(v1Service: ExecutionListV1Service, dataPlane: EngineDataPlaneProxyService, workflowSharingService: WorkflowSharingService, roleService: RoleService);
|
|
14
|
+
listExecutionsForUI(query: ExecutionSummaries.RangeQuery, cursor?: ExecutionCursor): Promise<ListExecutionsResponse>;
|
|
15
|
+
findPageWithCount(query: ExecutionSummaries.RangeQuery, cursor?: ExecutionCursor): Promise<ListExecutionsResponse>;
|
|
16
|
+
addScopes(user: User, summaries: ExecutionSummaries.ExecutionSummaryWithScopes[]): Promise<void>;
|
|
17
|
+
buildSharingOptions(scope: Scope): Promise<ExecutionSummaries.RangeQuery['sharingOptions']>;
|
|
18
|
+
private provider;
|
|
19
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
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.ExecutionListService = void 0;
|
|
13
|
+
const di_1 = require("@n8n/di");
|
|
14
|
+
const engine_data_plane_proxy_service_1 = require("../services/engine-data-plane-proxy.service");
|
|
15
|
+
const role_service_1 = require("../services/role.service");
|
|
16
|
+
const workflow_sharing_service_1 = require("../workflows/workflow-sharing.service");
|
|
17
|
+
const execution_cursor_1 = require("./execution-cursor");
|
|
18
|
+
const execution_list_v1_service_1 = require("./execution-list-v1.service");
|
|
19
|
+
let ExecutionListService = class ExecutionListService {
|
|
20
|
+
constructor(v1Service, dataPlane, workflowSharingService, roleService) {
|
|
21
|
+
this.v1Service = v1Service;
|
|
22
|
+
this.dataPlane = dataPlane;
|
|
23
|
+
this.workflowSharingService = workflowSharingService;
|
|
24
|
+
this.roleService = roleService;
|
|
25
|
+
}
|
|
26
|
+
async listExecutionsForUI(query, cursor) {
|
|
27
|
+
const combinesCurrentAndCompleted = !query.status?.length;
|
|
28
|
+
const hasPositionInCursor = (0, execution_cursor_1.hasPosition)(cursor);
|
|
29
|
+
const pageQuery = {
|
|
30
|
+
...query,
|
|
31
|
+
order: { startedAt: 'DESC' },
|
|
32
|
+
...(combinesCurrentAndCompleted ? { status: execution_list_v1_service_1.COMPLETED_STATUSES } : {}),
|
|
33
|
+
};
|
|
34
|
+
const provider = await this.provider();
|
|
35
|
+
return combinesCurrentAndCompleted && !hasPositionInCursor
|
|
36
|
+
? await provider.findCurrentAndCompleted(pageQuery)
|
|
37
|
+
: await provider.findPageWithCount(pageQuery, cursor);
|
|
38
|
+
}
|
|
39
|
+
async findPageWithCount(query, cursor) {
|
|
40
|
+
const provider = await this.provider();
|
|
41
|
+
return await provider.findPageWithCount(query, cursor);
|
|
42
|
+
}
|
|
43
|
+
async addScopes(user, summaries) {
|
|
44
|
+
const workflowIds = [...new Set(summaries.map((s) => s.workflowId))];
|
|
45
|
+
const scopes = Object.fromEntries(await this.workflowSharingService.getSharedWorkflowScopes(workflowIds, user));
|
|
46
|
+
for (const s of summaries) {
|
|
47
|
+
s.scopes = scopes[s.workflowId] ?? [];
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
async buildSharingOptions(scope) {
|
|
51
|
+
const projectRoles = await this.roleService.rolesWithScope('project', [scope]);
|
|
52
|
+
const workflowRoles = await this.roleService.rolesWithScope('workflow', [scope]);
|
|
53
|
+
return { scopes: [scope], projectRoles, workflowRoles };
|
|
54
|
+
}
|
|
55
|
+
async provider() {
|
|
56
|
+
if (!this.dataPlane.isAvailable())
|
|
57
|
+
return this.v1Service;
|
|
58
|
+
const { ExecutionListV2Service } = await import('./execution-list-v2.service.js');
|
|
59
|
+
return di_1.Container.get(ExecutionListV2Service);
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
exports.ExecutionListService = ExecutionListService;
|
|
63
|
+
exports.ExecutionListService = ExecutionListService = __decorate([
|
|
64
|
+
(0, di_1.Service)(),
|
|
65
|
+
__metadata("design:paramtypes", [execution_list_v1_service_1.ExecutionListV1Service, engine_data_plane_proxy_service_1.EngineDataPlaneProxyService, workflow_sharing_service_1.WorkflowSharingService, role_service_1.RoleService])
|
|
66
|
+
], ExecutionListService);
|
|
67
|
+
//# sourceMappingURL=execution-list.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execution-list.service.js","sourceRoot":"","sources":["../../src/executions/execution-list.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,gCAA6C;AAG7C,gGAAyF;AACzF,0DAAsD;AACtD,mFAA8E;AAE9E,yDAAuE;AACvE,2EAIqC;AAU9B,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAChC,YACkB,SAAiC,EACjC,SAAsC,EACtC,sBAA8C,EAC9C,WAAwB;yBAHxB,SAAS;yBACT,SAAS;sCACT,sBAAsB;2BACtB,WAAW;IAC1B,CAAC;IAGJ,KAAK,CAAC,mBAAmB,CACxB,KAAoC,EACpC,MAAwB;QAMxB,MAAM,2BAA2B,GAAG,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC;QAC1D,MAAM,mBAAmB,GAAG,IAAA,8BAAW,EAAC,MAAM,CAAC,CAAC;QAIhD,MAAM,SAAS,GAAkC;YAChD,GAAG,KAAK;YACR,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE;YAC5B,GAAG,CAAC,2BAA2B,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,8CAAkB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SACtE,CAAC;QAEF,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,QAAQ,EAAE,CAAC;QAEvC,OAAO,2BAA2B,IAAI,CAAC,mBAAmB;YACzD,CAAC,CAAC,MAAM,QAAQ,CAAC,uBAAu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W,EAAE;YAAE,OAAO,IAAI,CAAC,SAAS,CAAC;QAEzD,MAAM,EAAE,sBAAsB,EAAE,GAAG,MAAM,MAAM,CAAC,gCAAgC,CAAC,CAAC;QAElF,OAAO,cAAS,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAC;IAC9C,CAAC;CACD,CAAA;;+BAlFY,oBAAoB;IADhC,IAAA,YAAO,GAAE;qCAGoB,kDAAsB,EACtB,6DAA2B,EACd,iDAAsB,EACjC,0BAAW;GAL9B,oBAAoB,CAkFhC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Logger } from '@n8n/backend-common';
|
|
2
2
|
import { ExecutionsConfig } from '@n8n/config';
|
|
3
|
-
import { type IExecutionResponse, ProjectRelationRepository } from '@n8n/db';
|
|
4
|
-
import { ExecutionRepository, WorkflowRepository } from '@n8n/db';
|
|
3
|
+
import { type IExecutionResponse, ExecutionRepository, ProjectRelationRepository, WorkflowRepository } from '@n8n/db';
|
|
5
4
|
import { InstanceSettings } from 'n8n-core';
|
|
6
5
|
import { ExecutionCrashService } from '../executions/execution-crash.service';
|
|
7
6
|
import { ExecutionPersistence } from '../executions/execution-persistence';
|
|
@@ -13,7 +13,6 @@ exports.ExecutionRecoveryService = void 0;
|
|
|
13
13
|
const backend_common_1 = require("@n8n/backend-common");
|
|
14
14
|
const config_1 = require("@n8n/config");
|
|
15
15
|
const db_1 = require("@n8n/db");
|
|
16
|
-
const db_2 = require("@n8n/db");
|
|
17
16
|
const di_1 = require("@n8n/di");
|
|
18
17
|
const permissions_1 = require("@n8n/permissions");
|
|
19
18
|
const ensure_error_1 = require("@n8n/utils/errors/ensure-error");
|
|
@@ -246,6 +245,6 @@ let ExecutionRecoveryService = class ExecutionRecoveryService {
|
|
|
246
245
|
exports.ExecutionRecoveryService = ExecutionRecoveryService;
|
|
247
246
|
exports.ExecutionRecoveryService = ExecutionRecoveryService = __decorate([
|
|
248
247
|
(0, di_1.Service)(),
|
|
249
|
-
__metadata("design:paramtypes", [backend_common_1.Logger, n8n_core_1.InstanceSettings, push_1.Push,
|
|
248
|
+
__metadata("design:paramtypes", [backend_common_1.Logger, n8n_core_1.InstanceSettings, push_1.Push, db_1.ExecutionRepository, execution_persistence_1.ExecutionPersistence, config_1.ExecutionsConfig, db_1.WorkflowRepository, user_management_mailer_1.UserManagementMailer, ownership_service_1.OwnershipService, db_1.ProjectRelationRepository, workflow_push_notifier_service_1.WorkflowPushNotifier, execution_crash_service_1.ExecutionCrashService])
|
|
250
249
|
], ExecutionRecoveryService);
|
|
251
250
|
//# sourceMappingURL=execution-recovery.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execution-recovery.service.js","sourceRoot":"","sources":["../../src/executions/execution-recovery.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,wDAA6C;AAC7C,wCAA+C;AAC/C,
|
|
1
|
+
{"version":3,"file":"execution-recovery.service.js","sourceRoot":"","sources":["../../src/executions/execution-recovery.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,wDAA6C;AAC7C,wCAA+C;AAC/C,gCAOiB;AACjB,gCAA6C;AAC7C,kDAAoF;AACpF,iEAA6D;AAC7D,4CAAyC;AAEzC,uCAA4C;AAC5C,+CAA2D;AAG3D,2CAAmD;AACnD,oEAA+D;AAC/D,4EAAuE;AACvE,+FAAkG;AAClG,kFAA6E;AAC7E,8EAA0E;AAC1E,iCAA8B;AAC9B,oEAAgE;AAChE,2FAAsF;AACtF,+FAAkF;AAElF,6EAA+F;AAMxF,IAAM,wBAAwB,GAA9B,MAAM,wBAAwB;IACpC,YACkB,MAAc,EACd,gBAAkC,EAClC,IAAU,EACV,mBAAwC,EACxC,oBAA0C,EAC1C,gBAAkC,EAClC,kBAAsC,EACtC,oBAA0C,EAC1C,gBAAkC,EAClC,yBAAoD,EACpD,oBAA0C,EAC1C,qBAA4C;sBAX5C,MAAM;gCACN,gBAAgB;oBAChB,IAAI;mCACJ,mBAAmB;oCACnB,oBAA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CAAuB,CAAC;QAC7F,MAAM,gBAAgB,GAAG,MAAM,IAAI,CAAC,yBAAyB,CAAC,IAAI,CAAC;YAClE,KAAK,EAAE;gBACN,SAAS,EAAE,OAAO,CAAC,EAAE;gBACrB,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;aACxB;YACD,SAAS,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE;SACzB,CAAC,CAAC;QAEH,IAAI,gBAAgB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACjC,OAAO,gBAAgB,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QACjC,CAAC;aAAM,CAAC;YACP,OAAO,MAAM,IAAI,CAAC,gBAAgB,CAAC,gBAAgB,EAAE,CAAC;QACvD,CAAC;IACF,CAAC;CACD,CAAA;;mCAtSY,wBAAwB;IADpC,IAAA,YAAO,GAAE;qCAGiB,uBAAM,EACI,2BAAgB,EAC5B,WAAI,EACW,wBAAmB,EAClB,4CAAoB,EACxB,yBAAgB,EACd,uBAAkB,EAChB,6CAAoB,EACxB,oCAAgB,EACP,8BAAyB,EAC9B,qDAAoB,EACnB,+CAAqB;GAblD,wBAAwB,CAsSpC"}
|
|
@@ -3,7 +3,6 @@ import { Logger } from '@n8n/backend-common';
|
|
|
3
3
|
import { GlobalConfig } from '@n8n/config';
|
|
4
4
|
import type { ExecutionSummaries, IExecutionBase, IExecutionResponse, User } from '@n8n/db';
|
|
5
5
|
import { AnnotationTagMappingRepository, ExecutionAnnotationRepository, ExecutionRepository, WorkflowHistoryRepository, WorkflowRepository } from '@n8n/db';
|
|
6
|
-
import type { Scope } from '@n8n/permissions';
|
|
7
6
|
import type { ExecutionError, ExecutionStatus, INode, IWorkflowBase, WorkflowExecuteMode } from 'n8n-workflow';
|
|
8
7
|
import { Workflow } from 'n8n-workflow';
|
|
9
8
|
import { ActiveExecutions } from '../active-executions';
|
|
@@ -14,10 +13,8 @@ import { License } from '../license';
|
|
|
14
13
|
import { NodeTypes } from '../node-types';
|
|
15
14
|
import { ExecutionStopService } from '../scaling/execution-stop.service';
|
|
16
15
|
import { OwnershipService } from '../services/ownership.service';
|
|
17
|
-
import { RoleService } from '../services/role.service';
|
|
18
16
|
import { WaitTracker } from '../wait-tracker';
|
|
19
17
|
import { WorkflowRunner } from '../workflow-runner';
|
|
20
|
-
import { WorkflowSharingService } from '../workflows/workflow-sharing.service';
|
|
21
18
|
import { EngineV2ExecutionReader } from './engine-v2-execution-reader.service';
|
|
22
19
|
import { ExecutionPersistence } from './execution-persistence';
|
|
23
20
|
import { ExecutionRedactionServiceProxy } from './execution-redaction-proxy.service';
|
|
@@ -26,30 +23,15 @@ export declare const schemaGetExecutionsQueryFilter: {
|
|
|
26
23
|
$id: string;
|
|
27
24
|
type: string;
|
|
28
25
|
properties: {
|
|
29
|
-
id: {
|
|
30
|
-
type: string;
|
|
31
|
-
};
|
|
32
|
-
finished: {
|
|
33
|
-
type: string;
|
|
34
|
-
};
|
|
35
26
|
mode: {
|
|
36
27
|
type: string;
|
|
37
28
|
};
|
|
38
|
-
retryOf: {
|
|
39
|
-
type: string;
|
|
40
|
-
};
|
|
41
|
-
retrySuccessId: {
|
|
42
|
-
type: string;
|
|
43
|
-
};
|
|
44
29
|
status: {
|
|
45
30
|
type: string;
|
|
46
31
|
items: {
|
|
47
32
|
type: string;
|
|
48
33
|
};
|
|
49
34
|
};
|
|
50
|
-
waitTill: {
|
|
51
|
-
type: string;
|
|
52
|
-
};
|
|
53
35
|
workflowId: {
|
|
54
36
|
anyOf: {
|
|
55
37
|
type: string;
|
|
@@ -118,15 +100,12 @@ export declare class ExecutionService {
|
|
|
118
100
|
private readonly workflowRunner;
|
|
119
101
|
private readonly concurrencyControl;
|
|
120
102
|
private readonly license;
|
|
121
|
-
private readonly roleService;
|
|
122
|
-
private readonly workflowSharingService;
|
|
123
103
|
private readonly eventService;
|
|
124
104
|
private readonly executionRedactionServiceProxy;
|
|
125
105
|
private readonly executionStopService;
|
|
126
106
|
private readonly ownershipService;
|
|
127
107
|
private readonly engineV2ExecutionReader;
|
|
128
|
-
constructor(globalConfig: GlobalConfig, logger: Logger, activeExecutions: ActiveExecutions, executionAnnotationRepository: ExecutionAnnotationRepository, annotationTagMappingRepository: AnnotationTagMappingRepository, executionRepository: ExecutionRepository, executionPersistence: ExecutionPersistence, workflowHistoryRepository: WorkflowHistoryRepository, workflowRepository: WorkflowRepository, nodeTypes: NodeTypes, waitTracker: WaitTracker, workflowRunner: WorkflowRunner, concurrencyControl: ConcurrencyControlService, license: License,
|
|
129
|
-
buildSharingOptions(scope: Scope): Promise<ExecutionSummaries.RangeQuery['sharingOptions']>;
|
|
108
|
+
constructor(globalConfig: GlobalConfig, logger: Logger, activeExecutions: ActiveExecutions, executionAnnotationRepository: ExecutionAnnotationRepository, annotationTagMappingRepository: AnnotationTagMappingRepository, executionRepository: ExecutionRepository, executionPersistence: ExecutionPersistence, workflowHistoryRepository: WorkflowHistoryRepository, workflowRepository: WorkflowRepository, nodeTypes: NodeTypes, waitTracker: WaitTracker, workflowRunner: WorkflowRunner, concurrencyControl: ConcurrencyControlService, license: License, eventService: EventService, executionRedactionServiceProxy: ExecutionRedactionServiceProxy, executionStopService: ExecutionStopService, ownershipService: OwnershipService, engineV2ExecutionReader: EngineV2ExecutionReader);
|
|
130
109
|
findOne(req: ExecutionRequest.GetOne | ExecutionRequest.Update, sharedWorkflowIds: string[]): Promise<IExecutionFlattedResponse | undefined>;
|
|
131
110
|
getLastSuccessfulExecution(workflowId: string, user: User, redactExecutionData?: boolean): Promise<IExecutionResponse | undefined>;
|
|
132
111
|
retry({ executionId, options, sharedWorkflowIds, user, }: {
|
|
@@ -140,19 +119,8 @@ export declare class ExecutionService {
|
|
|
140
119
|
}): Promise<Omit<IExecutionResponse, 'createdAt'>>;
|
|
141
120
|
delete(user: User, payload: DeleteExecutionsDto, sharedWorkflowIds: string[]): Promise<void>;
|
|
142
121
|
createErrorExecution(error: ExecutionError, node: INode, workflowData: IWorkflowBase, workflow: Workflow, mode: WorkflowExecuteMode): Promise<void>;
|
|
143
|
-
findRangeWithCount(query: ExecutionSummaries.RangeQuery): Promise<{
|
|
144
|
-
results: import("n8n-workflow").ExecutionSummary[];
|
|
145
|
-
count: number;
|
|
146
|
-
estimated: boolean;
|
|
147
|
-
}>;
|
|
148
|
-
findLatestCurrentAndCompleted(query: ExecutionSummaries.RangeQuery): Promise<{
|
|
149
|
-
results: import("n8n-workflow").ExecutionSummary[];
|
|
150
|
-
count: number;
|
|
151
|
-
estimated: boolean;
|
|
152
|
-
}>;
|
|
153
122
|
getConcurrentExecutionsCount(): Promise<number>;
|
|
154
123
|
private isConcurrentExecutionsCountSupported;
|
|
155
|
-
private getExecutionsCountForQuery;
|
|
156
124
|
findAllEnqueuedExecutions(): Promise<{
|
|
157
125
|
executions: IExecutionResponse[];
|
|
158
126
|
unreadableIds: string[];
|
|
@@ -163,7 +131,6 @@ export declare class ExecutionService {
|
|
|
163
131
|
private stopInRegularMode;
|
|
164
132
|
private stopInScalingMode;
|
|
165
133
|
private stopDuringRun;
|
|
166
|
-
addScopes(user: User, summaries: ExecutionSummaries.ExecutionSummaryWithScopes[]): Promise<void>;
|
|
167
134
|
annotate(executionId: string, updateData: ExecutionRequest.ExecutionUpdatePayload, sharedWorkflowIds: string[]): Promise<void>;
|
|
168
135
|
findOneInWorkflows(executionId: string, workflowIds: string[], options?: {
|
|
169
136
|
includeData?: boolean;
|
|
@@ -15,7 +15,6 @@ const backend_common_1 = require("@n8n/backend-common");
|
|
|
15
15
|
const config_1 = require("@n8n/config");
|
|
16
16
|
const db_1 = require("@n8n/db");
|
|
17
17
|
const di_1 = require("@n8n/di");
|
|
18
|
-
const typeorm_1 = require("@n8n/typeorm");
|
|
19
18
|
const ensure_error_1 = require("@n8n/utils/errors/ensure-error");
|
|
20
19
|
const flatted_1 = require("flatted");
|
|
21
20
|
const jsonschema_1 = require("jsonschema");
|
|
@@ -34,11 +33,9 @@ const license_1 = require("../license");
|
|
|
34
33
|
const node_types_1 = require("../node-types");
|
|
35
34
|
const execution_stop_service_1 = require("../scaling/execution-stop.service");
|
|
36
35
|
const ownership_service_1 = require("../services/ownership.service");
|
|
37
|
-
const role_service_1 = require("../services/role.service");
|
|
38
36
|
const wait_tracker_1 = require("../wait-tracker");
|
|
39
37
|
const workflow_runner_1 = require("../workflow-runner");
|
|
40
38
|
const utils_1 = require("../workflows/utils");
|
|
41
|
-
const workflow_sharing_service_1 = require("../workflows/workflow-sharing.service");
|
|
42
39
|
const engine_v2_execution_reader_service_1 = require("./engine-v2-execution-reader.service");
|
|
43
40
|
const missing_execution_data_error_1 = require("./execution-data/missing-execution-data.error");
|
|
44
41
|
const execution_id_1 = require("./execution-id");
|
|
@@ -48,16 +45,11 @@ exports.schemaGetExecutionsQueryFilter = {
|
|
|
48
45
|
$id: '/IGetExecutionsQueryFilter',
|
|
49
46
|
type: 'object',
|
|
50
47
|
properties: {
|
|
51
|
-
id: { type: 'string' },
|
|
52
|
-
finished: { type: 'boolean' },
|
|
53
48
|
mode: { type: 'string' },
|
|
54
|
-
retryOf: { type: 'string' },
|
|
55
|
-
retrySuccessId: { type: 'string' },
|
|
56
49
|
status: {
|
|
57
50
|
type: 'array',
|
|
58
51
|
items: { type: 'string' },
|
|
59
52
|
},
|
|
60
|
-
waitTill: { type: 'boolean' },
|
|
61
53
|
workflowId: { anyOf: [{ type: 'integer' }, { type: 'string' }] },
|
|
62
54
|
metadata: { type: 'array', items: { $ref: '#/$defs/metadata' } },
|
|
63
55
|
startedAfter: { type: 'date-time' },
|
|
@@ -86,7 +78,7 @@ exports.schemaGetExecutionsQueryFilter = {
|
|
|
86
78
|
};
|
|
87
79
|
exports.allowedExecutionsQueryFilterFields = Object.keys(exports.schemaGetExecutionsQueryFilter.properties);
|
|
88
80
|
let ExecutionService = class ExecutionService {
|
|
89
|
-
constructor(globalConfig, logger, activeExecutions, executionAnnotationRepository, annotationTagMappingRepository, executionRepository, executionPersistence, workflowHistoryRepository, workflowRepository, nodeTypes, waitTracker, workflowRunner, concurrencyControl, license,
|
|
81
|
+
constructor(globalConfig, logger, activeExecutions, executionAnnotationRepository, annotationTagMappingRepository, executionRepository, executionPersistence, workflowHistoryRepository, workflowRepository, nodeTypes, waitTracker, workflowRunner, concurrencyControl, license, eventService, executionRedactionServiceProxy, executionStopService, ownershipService, engineV2ExecutionReader) {
|
|
90
82
|
this.globalConfig = globalConfig;
|
|
91
83
|
this.logger = logger;
|
|
92
84
|
this.activeExecutions = activeExecutions;
|
|
@@ -101,19 +93,12 @@ let ExecutionService = class ExecutionService {
|
|
|
101
93
|
this.workflowRunner = workflowRunner;
|
|
102
94
|
this.concurrencyControl = concurrencyControl;
|
|
103
95
|
this.license = license;
|
|
104
|
-
this.roleService = roleService;
|
|
105
|
-
this.workflowSharingService = workflowSharingService;
|
|
106
96
|
this.eventService = eventService;
|
|
107
97
|
this.executionRedactionServiceProxy = executionRedactionServiceProxy;
|
|
108
98
|
this.executionStopService = executionStopService;
|
|
109
99
|
this.ownershipService = ownershipService;
|
|
110
100
|
this.engineV2ExecutionReader = engineV2ExecutionReader;
|
|
111
101
|
}
|
|
112
|
-
async buildSharingOptions(scope) {
|
|
113
|
-
const projectRoles = await this.roleService.rolesWithScope('project', [scope]);
|
|
114
|
-
const workflowRoles = await this.roleService.rolesWithScope('workflow', [scope]);
|
|
115
|
-
return { scopes: [scope], projectRoles, workflowRoles };
|
|
116
|
-
}
|
|
117
102
|
async findOne(req, sharedWorkflowIds) {
|
|
118
103
|
if (!sharedWorkflowIds.length)
|
|
119
104
|
return undefined;
|
|
@@ -346,37 +331,6 @@ let ExecutionService = class ExecutionService {
|
|
|
346
331
|
};
|
|
347
332
|
await this.executionPersistence.create(fullExecutionData);
|
|
348
333
|
}
|
|
349
|
-
async findRangeWithCount(query) {
|
|
350
|
-
const results = await this.executionRepository.findManyByRangeQuery(query);
|
|
351
|
-
const { range: _, ...countQuery } = query;
|
|
352
|
-
const executionCount = await this.getExecutionsCountForQuery({ ...countQuery, kind: 'count' });
|
|
353
|
-
return { results, ...executionCount };
|
|
354
|
-
}
|
|
355
|
-
async findLatestCurrentAndCompleted(query) {
|
|
356
|
-
const currentStatuses = ['new', 'running'];
|
|
357
|
-
const completedStatuses = n8n_workflow_1.ExecutionStatusList.filter((s) => !currentStatuses.includes(s));
|
|
358
|
-
const completedQuery = {
|
|
359
|
-
...query,
|
|
360
|
-
status: completedStatuses,
|
|
361
|
-
order: { startedAt: 'DESC' },
|
|
362
|
-
};
|
|
363
|
-
const { range: _, ...countQuery } = completedQuery;
|
|
364
|
-
const currentQuery = {
|
|
365
|
-
...query,
|
|
366
|
-
status: currentStatuses,
|
|
367
|
-
order: { top: 'running' },
|
|
368
|
-
};
|
|
369
|
-
const [current, completed, completedCount] = await Promise.all([
|
|
370
|
-
this.executionRepository.findManyByRangeQuery(currentQuery),
|
|
371
|
-
this.executionRepository.findManyByRangeQuery(completedQuery),
|
|
372
|
-
this.getExecutionsCountForQuery({ ...countQuery, kind: 'count' }),
|
|
373
|
-
]);
|
|
374
|
-
return {
|
|
375
|
-
results: current.concat(completed),
|
|
376
|
-
count: completedCount.count,
|
|
377
|
-
estimated: completedCount.estimated,
|
|
378
|
-
};
|
|
379
|
-
}
|
|
380
334
|
async getConcurrentExecutionsCount() {
|
|
381
335
|
if (!this.isConcurrentExecutionsCountSupported()) {
|
|
382
336
|
return -1;
|
|
@@ -391,18 +345,6 @@ let ExecutionService = class ExecutionService {
|
|
|
391
345
|
}
|
|
392
346
|
return true;
|
|
393
347
|
}
|
|
394
|
-
async getExecutionsCountForQuery(countQuery) {
|
|
395
|
-
if (this.globalConfig.database.type === 'postgresdb') {
|
|
396
|
-
const liveRows = await this.executionRepository.getLiveExecutionRowsOnPostgres();
|
|
397
|
-
if (liveRows === -1)
|
|
398
|
-
return { count: -1, estimated: false };
|
|
399
|
-
if (liveRows > 100_000) {
|
|
400
|
-
return { count: liveRows, estimated: true };
|
|
401
|
-
}
|
|
402
|
-
}
|
|
403
|
-
const count = await this.executionRepository.fetchCount(countQuery);
|
|
404
|
-
return { count, estimated: false };
|
|
405
|
-
}
|
|
406
348
|
async findAllEnqueuedExecutions() {
|
|
407
349
|
return await this.executionPersistence.findMultipleExecutionsWithUnreadable({
|
|
408
350
|
select: ['id', 'mode'],
|
|
@@ -490,13 +432,6 @@ let ExecutionService = class ExecutionService {
|
|
|
490
432
|
await this.executionPersistence.updateExistingExecution(execution.id, execution);
|
|
491
433
|
return execution;
|
|
492
434
|
}
|
|
493
|
-
async addScopes(user, summaries) {
|
|
494
|
-
const workflowIds = [...new Set(summaries.map((s) => s.workflowId))];
|
|
495
|
-
const scopes = Object.fromEntries(await this.workflowSharingService.getSharedWorkflowScopes(workflowIds, user));
|
|
496
|
-
for (const s of summaries) {
|
|
497
|
-
s.scopes = scopes[s.workflowId] ?? [];
|
|
498
|
-
}
|
|
499
|
-
}
|
|
500
435
|
async annotate(executionId, updateData, sharedWorkflowIds) {
|
|
501
436
|
const execution = await this.executionRepository.findIfAccessible(executionId, sharedWorkflowIds);
|
|
502
437
|
if (!execution) {
|
|
@@ -603,7 +538,7 @@ let ExecutionService = class ExecutionService {
|
|
|
603
538
|
await this.annotationTagMappingRepository.overwriteTags(annotation.id, tagIds);
|
|
604
539
|
}
|
|
605
540
|
catch (error) {
|
|
606
|
-
if (
|
|
541
|
+
if ((0, db_1.isForeignKeyConstraintError)(error)) {
|
|
607
542
|
throw new not_found_error_1.NotFoundError('Some tags not found');
|
|
608
543
|
}
|
|
609
544
|
throw error;
|
|
@@ -623,11 +558,7 @@ let ExecutionService = class ExecutionService {
|
|
|
623
558
|
const versionIds = await this.executionRepository.getDistinctVersionIds(workflowId);
|
|
624
559
|
if (versionIds.length === 0)
|
|
625
560
|
return [];
|
|
626
|
-
const versions = await this.workflowHistoryRepository.
|
|
627
|
-
where: { workflowId, versionId: (0, db_1.In)(versionIds) },
|
|
628
|
-
select: ['versionId', 'name', 'createdAt'],
|
|
629
|
-
order: { createdAt: 'DESC' },
|
|
630
|
-
});
|
|
561
|
+
const versions = await this.workflowHistoryRepository.findVersionSummaries(workflowId, versionIds);
|
|
631
562
|
return versions.map((v) => ({
|
|
632
563
|
versionId: v.versionId,
|
|
633
564
|
name: v.name,
|
|
@@ -638,6 +569,6 @@ let ExecutionService = class ExecutionService {
|
|
|
638
569
|
exports.ExecutionService = ExecutionService;
|
|
639
570
|
exports.ExecutionService = ExecutionService = __decorate([
|
|
640
571
|
(0, di_1.Service)(),
|
|
641
|
-
__metadata("design:paramtypes", [config_1.GlobalConfig, backend_common_1.Logger, active_executions_1.ActiveExecutions, db_1.ExecutionAnnotationRepository, db_1.AnnotationTagMappingRepository, db_1.ExecutionRepository, execution_persistence_1.ExecutionPersistence, db_1.WorkflowHistoryRepository, db_1.WorkflowRepository, node_types_1.NodeTypes, wait_tracker_1.WaitTracker, workflow_runner_1.WorkflowRunner, concurrency_control_service_1.ConcurrencyControlService, license_1.License,
|
|
572
|
+
__metadata("design:paramtypes", [config_1.GlobalConfig, backend_common_1.Logger, active_executions_1.ActiveExecutions, db_1.ExecutionAnnotationRepository, db_1.AnnotationTagMappingRepository, db_1.ExecutionRepository, execution_persistence_1.ExecutionPersistence, db_1.WorkflowHistoryRepository, db_1.WorkflowRepository, node_types_1.NodeTypes, wait_tracker_1.WaitTracker, workflow_runner_1.WorkflowRunner, concurrency_control_service_1.ConcurrencyControlService, license_1.License, event_service_1.EventService, execution_redaction_proxy_service_1.ExecutionRedactionServiceProxy, execution_stop_service_1.ExecutionStopService, ownership_service_1.OwnershipService, engine_v2_execution_reader_service_1.EngineV2ExecutionReader])
|
|
642
573
|
], ExecutionService);
|
|
643
574
|
//# sourceMappingURL=execution.service.js.map
|