n8n 2.39.4 → 2.40.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/agent-library-bundle.js +178 -11
- package/dist/auth/auth.service.d.ts +5 -0
- package/dist/auth/auth.service.js +35 -2
- package/dist/auth/auth.service.js.map +1 -1
- package/dist/binary-data/binary-data-access.service.d.ts +1 -1
- package/dist/binary-data/binary-data-access.service.js +15 -6
- package/dist/binary-data/binary-data-access.service.js.map +1 -1
- package/dist/binary-data/database.manager.js +1 -1
- package/dist/binary-data/database.manager.js.map +1 -1
- package/dist/build.tsbuildinfo +1 -1
- package/dist/commands/base-command.d.ts +1 -0
- package/dist/commands/base-command.js +11 -1
- package/dist/commands/base-command.js.map +1 -1
- package/dist/commands/execute-batch.js.map +1 -1
- package/dist/commands/list/workflow.js +1 -4
- package/dist/commands/list/workflow.js.map +1 -1
- package/dist/commands/publish/workflow.js +1 -5
- package/dist/commands/publish/workflow.js.map +1 -1
- package/dist/commands/start.js +1 -7
- package/dist/commands/start.js.map +1 -1
- package/dist/commands/ttwf/generate.js +1 -4
- package/dist/commands/ttwf/generate.js.map +1 -1
- package/dist/commands/unpublish/workflow.js +1 -5
- package/dist/commands/unpublish/workflow.js.map +1 -1
- package/dist/commands/update/workflow.js +1 -5
- package/dist/commands/update/workflow.js.map +1 -1
- package/dist/controller.registry.d.ts +1 -1
- package/dist/controller.registry.js +3 -3
- package/dist/controller.registry.js.map +1 -1
- package/dist/controllers/ai-preference.controller.d.ts +17 -0
- package/dist/controllers/ai-preference.controller.js +78 -0
- package/dist/controllers/ai-preference.controller.js.map +1 -0
- package/dist/controllers/change-email.controller.d.ts +31 -0
- package/dist/controllers/change-email.controller.js +164 -0
- package/dist/controllers/change-email.controller.js.map +1 -0
- package/dist/controllers/me.controller.d.ts +3 -2
- package/dist/controllers/me.controller.js +10 -42
- package/dist/controllers/me.controller.js.map +1 -1
- package/dist/credentials/dynamic-credentials-proxy.js.map +1 -1
- package/dist/credentials/executing-user-identifier-proxy.d.ts +7 -0
- package/dist/credentials/executing-user-identifier-proxy.js +25 -0
- package/dist/credentials/executing-user-identifier-proxy.js.map +1 -0
- package/dist/credentials/executing-user-identifier.interface.d.ts +4 -0
- package/dist/credentials/executing-user-identifier.interface.js +3 -0
- package/dist/credentials/executing-user-identifier.interface.js.map +1 -0
- package/dist/credentials/mock-node-types.d.ts +5 -0
- package/dist/credentials/mock-node-types.js +34 -0
- package/dist/credentials/mock-node-types.js.map +1 -0
- package/dist/credentials-helper.js +5 -27
- package/dist/credentials-helper.js.map +1 -1
- package/dist/deprecation/deprecation.service.js +6 -2
- package/dist/deprecation/deprecation.service.js.map +1 -1
- package/dist/encryption/key-manager.service.js +3 -1
- package/dist/encryption/key-manager.service.js.map +1 -1
- package/dist/encryption/key-rotation-flag.js +2 -1
- package/dist/encryption/key-rotation-flag.js.map +1 -1
- package/dist/errors/pre-execute-blocked.error.d.ts +6 -0
- package/dist/errors/pre-execute-blocked.error.js +15 -0
- package/dist/errors/pre-execute-blocked.error.js.map +1 -0
- package/dist/eventbus/event-message-classes/event-message-audit.js.map +1 -1
- package/dist/eventbus/event-message-classes/event-message-generic.js.map +1 -1
- package/dist/eventbus/event-message-classes/event-message-mcp.js.map +1 -1
- package/dist/eventbus/event-message-classes/event-message-workflow.js.map +1 -1
- package/dist/eventbus/event-message-classes/index.d.ts +4 -2
- package/dist/eventbus/event-message-classes/index.js +6 -1
- package/dist/eventbus/event-message-classes/index.js.map +1 -1
- package/dist/eventbus/message-event-bus/message-event-bus.d.ts +3 -1
- package/dist/eventbus/message-event-bus/message-event-bus.js +5 -3
- package/dist/eventbus/message-event-bus/message-event-bus.js.map +1 -1
- package/dist/eventbus/message-event-bus-writer/message-event-bus-log-writer.js.map +1 -1
- package/dist/events/maps/relay.event-map.d.ts +24 -2
- package/dist/events/relays/log-streaming.event-relay.d.ts +2 -0
- package/dist/events/relays/log-streaming.event-relay.js +9 -0
- package/dist/events/relays/log-streaming.event-relay.js.map +1 -1
- package/dist/events/relays/telemetry.event-relay.d.ts +6 -0
- package/dist/events/relays/telemetry.event-relay.js +88 -1
- package/dist/events/relays/telemetry.event-relay.js.map +1 -1
- package/dist/execution-lifecycle/execution-lifecycle-hooks.js +22 -10
- package/dist/execution-lifecycle/execution-lifecycle-hooks.js.map +1 -1
- package/dist/execution-lifecycle/restore-binary-data-id.js +2 -2
- package/dist/execution-lifecycle/restore-binary-data-id.js.map +1 -1
- package/dist/executions/enqueued-execution-recovery.service.d.ts +3 -3
- package/dist/executions/enqueued-execution-recovery.service.js +6 -6
- package/dist/executions/enqueued-execution-recovery.service.js.map +1 -1
- package/dist/executions/execution-crash.service.d.ts +12 -0
- package/dist/executions/execution-crash.service.js +43 -0
- package/dist/executions/execution-crash.service.js.map +1 -0
- package/dist/executions/execution-recovery.service.d.ts +3 -1
- package/dist/executions/execution-recovery.service.js +6 -4
- package/dist/executions/execution-recovery.service.js.map +1 -1
- package/dist/executions/execution.service.js.map +1 -1
- package/dist/executions/pre-execution-checks/credentials-permission-checker.d.ts +5 -2
- package/dist/executions/pre-execution-checks/credentials-permission-checker.js +20 -29
- package/dist/executions/pre-execution-checks/credentials-permission-checker.js.map +1 -1
- package/dist/executions/pre-execution-checks/index.d.ts +1 -0
- package/dist/executions/pre-execution-checks/index.js +3 -1
- package/dist/executions/pre-execution-checks/index.js.map +1 -1
- package/dist/executions/pre-execution-checks/workflow-pre-execute.d.ts +16 -0
- package/dist/executions/pre-execution-checks/workflow-pre-execute.js +96 -0
- package/dist/executions/pre-execution-checks/workflow-pre-execute.js.map +1 -0
- package/dist/instance-settings-loader/loaders/sso/provisioning.instance-settings-loader.js +25 -3
- package/dist/instance-settings-loader/loaders/sso/provisioning.instance-settings-loader.js.map +1 -1
- package/dist/license/license-renewal.task.d.ts +13 -0
- package/dist/license/license-renewal.task.js +38 -0
- package/dist/license/license-renewal.task.js.map +1 -0
- package/dist/license.d.ts +1 -2
- package/dist/license.js +5 -19
- package/dist/license.js.map +1 -1
- package/dist/load-nodes-and-credentials.d.ts +1 -0
- package/dist/load-nodes-and-credentials.js +7 -2
- package/dist/load-nodes-and-credentials.js.map +1 -1
- package/dist/metrics/prometheus/encryption-metrics.service.d.ts +10 -0
- package/dist/metrics/prometheus/encryption-metrics.service.js +55 -0
- package/dist/metrics/prometheus/encryption-metrics.service.js.map +1 -0
- package/dist/metrics/prometheus/prometheus.service.d.ts +2 -1
- package/dist/metrics/prometheus/prometheus.service.js +4 -2
- package/dist/metrics/prometheus/prometheus.service.js.map +1 -1
- package/dist/modules/agents/agent-chat.controller.d.ts +11 -2
- package/dist/modules/agents/agent-chat.controller.js +42 -2
- package/dist/modules/agents/agent-chat.controller.js.map +1 -1
- package/dist/modules/agents/agent-checkpoint-pruning.task.d.ts +14 -0
- package/dist/modules/agents/agent-checkpoint-pruning.task.js +38 -0
- package/dist/modules/agents/agent-checkpoint-pruning.task.js.map +1 -0
- package/dist/modules/agents/agent-config.service.d.ts +7 -7
- package/dist/modules/agents/agent-config.service.js +13 -3
- package/dist/modules/agents/agent-config.service.js.map +1 -1
- package/dist/modules/agents/agent-custom-tools.service.d.ts +3 -1
- package/dist/modules/agents/agent-custom-tools.service.js +6 -2
- package/dist/modules/agents/agent-custom-tools.service.js.map +1 -1
- package/dist/modules/agents/agent-execution-orchestrator.service.d.ts +34 -2
- package/dist/modules/agents/agent-execution-orchestrator.service.js +143 -16
- package/dist/modules/agents/agent-execution-orchestrator.service.js.map +1 -1
- package/dist/modules/agents/agent-execution-update-broadcaster.d.ts +6 -1
- package/dist/modules/agents/agent-execution-update-broadcaster.js +34 -2
- package/dist/modules/agents/agent-execution-update-broadcaster.js.map +1 -1
- package/dist/modules/agents/agent-execution.service.d.ts +5 -2
- package/dist/modules/agents/agent-execution.service.js +2 -1
- package/dist/modules/agents/agent-execution.service.js.map +1 -1
- package/dist/modules/agents/agent-integration-management.service.d.ts +2 -0
- package/dist/modules/agents/agent-integration-management.service.js +4 -0
- package/dist/modules/agents/agent-integration-management.service.js.map +1 -1
- package/dist/modules/agents/agent-integrations.controller.d.ts +3 -1
- package/dist/modules/agents/agent-integrations.controller.js +7 -5
- package/dist/modules/agents/agent-integrations.controller.js.map +1 -1
- package/dist/modules/agents/agent-interrupted-execution-sweeper.d.ts +3 -1
- package/dist/modules/agents/agent-interrupted-execution-sweeper.js +10 -2
- package/dist/modules/agents/agent-interrupted-execution-sweeper.js.map +1 -1
- package/dist/modules/agents/agent-knowledge-commands.js +2 -2
- package/dist/modules/agents/agent-knowledge-commands.js.map +1 -1
- package/dist/modules/agents/agent-modification-telemetry.service.d.ts +1 -0
- package/dist/modules/agents/agent-modification-telemetry.service.js.map +1 -1
- package/dist/modules/agents/agent-publish.controller.d.ts +8 -0
- package/dist/modules/agents/agent-publish.controller.js +4 -4
- package/dist/modules/agents/agent-publish.controller.js.map +1 -1
- package/dist/modules/agents/agent-publish.service.d.ts +7 -5
- package/dist/modules/agents/agent-publish.service.js +12 -6
- package/dist/modules/agents/agent-publish.service.js.map +1 -1
- package/dist/modules/agents/agent-runnable-state.service.d.ts +2 -0
- package/dist/modules/agents/agent-runnable-state.service.js +8 -0
- package/dist/modules/agents/agent-runnable-state.service.js.map +1 -1
- package/dist/modules/agents/agent-runtime-cache.service.d.ts +3 -0
- package/dist/modules/agents/agent-runtime-cache.service.js +8 -3
- package/dist/modules/agents/agent-runtime-cache.service.js.map +1 -1
- package/dist/modules/agents/agent-runtime-reconstruction.service.d.ts +7 -1
- package/dist/modules/agents/agent-runtime-reconstruction.service.js +34 -11
- package/dist/modules/agents/agent-runtime-reconstruction.service.js.map +1 -1
- package/dist/modules/agents/agent-sandbox-principal.d.ts +2 -2
- package/dist/modules/agents/agent-sandbox-principal.js +2 -2
- package/dist/modules/agents/agent-sandbox-principal.js.map +1 -1
- package/dist/modules/agents/agent-sandbox-runtime.service.js +9 -8
- package/dist/modules/agents/agent-sandbox-runtime.service.js.map +1 -1
- package/dist/modules/agents/agent-session-langsmith-export.service.js +110 -10
- package/dist/modules/agents/agent-session-langsmith-export.service.js.map +1 -1
- package/dist/modules/agents/agent-skills.service.d.ts +4 -2
- package/dist/modules/agents/agent-skills.service.js +30 -6
- package/dist/modules/agents/agent-skills.service.js.map +1 -1
- package/dist/modules/agents/agent-sse-stream.js.map +1 -1
- package/dist/modules/agents/agent-task.service.d.ts +6 -2
- package/dist/modules/agents/agent-task.service.js +79 -91
- package/dist/modules/agents/agent-task.service.js.map +1 -1
- package/dist/modules/agents/agent-tasks.controller.js +3 -0
- package/dist/modules/agents/agent-tasks.controller.js.map +1 -1
- package/dist/modules/agents/agent-test-chat.service.js +8 -1
- package/dist/modules/agents/agent-test-chat.service.js.map +1 -1
- package/dist/modules/agents/agent-test-run.service.d.ts +3 -1
- package/dist/modules/agents/agent-test-run.service.js +5 -3
- package/dist/modules/agents/agent-test-run.service.js.map +1 -1
- package/dist/modules/agents/agent-update-broadcaster.d.ts +22 -0
- package/dist/modules/agents/agent-update-broadcaster.js +74 -0
- package/dist/modules/agents/agent-update-broadcaster.js.map +1 -0
- package/dist/modules/agents/agent-validation.service.js.map +1 -1
- package/dist/modules/agents/agent-workflow-execution.service.d.ts +3 -1
- package/dist/modules/agents/agent-workflow-execution.service.js +7 -3
- package/dist/modules/agents/agent-workflow-execution.service.js.map +1 -1
- package/dist/modules/agents/agent-workflow-tool-resume.service.js +1 -0
- package/dist/modules/agents/agent-workflow-tool-resume.service.js.map +1 -1
- package/dist/modules/agents/agents-config.controller.d.ts +214 -219
- package/dist/modules/agents/agents-config.controller.js +7 -2
- package/dist/modules/agents/agents-config.controller.js.map +1 -1
- package/dist/modules/agents/agents-skills.controller.js +6 -2
- package/dist/modules/agents/agents-skills.controller.js.map +1 -1
- package/dist/modules/agents/agents.controller.d.ts +4 -0
- package/dist/modules/agents/agents.controller.js +12 -1
- package/dist/modules/agents/agents.controller.js.map +1 -1
- package/dist/modules/agents/agents.module.d.ts +2 -1
- package/dist/modules/agents/agents.module.js +25 -2
- package/dist/modules/agents/agents.module.js.map +1 -1
- package/dist/modules/agents/agents.service.d.ts +9 -4
- package/dist/modules/agents/agents.service.js +29 -7
- package/dist/modules/agents/agents.service.js.map +1 -1
- package/dist/modules/agents/background/agent-background-job.service.d.ts +16 -3
- package/dist/modules/agents/background/agent-background-job.service.js +105 -6
- package/dist/modules/agents/background/agent-background-job.service.js.map +1 -1
- package/dist/modules/agents/background/agent-wake.service.d.ts +47 -0
- package/dist/modules/agents/background/agent-wake.service.js +237 -0
- package/dist/modules/agents/background/agent-wake.service.js.map +1 -0
- package/dist/modules/agents/background/background-job-messages.d.ts +7 -0
- package/dist/modules/agents/background/background-job-messages.js +42 -0
- package/dist/modules/agents/background/background-job-messages.js.map +1 -0
- package/dist/modules/agents/background/background-job-tools.js +45 -12
- package/dist/modules/agents/background/background-job-tools.js.map +1 -1
- package/dist/modules/agents/background/sub-agent-background-runner.d.ts +1 -1
- package/dist/modules/agents/background/sub-agent-background-runner.js +3 -3
- package/dist/modules/agents/background/sub-agent-background-runner.js.map +1 -1
- package/dist/modules/agents/builder/agent-builder-preview-path.js +1 -1
- package/dist/modules/agents/builder/agent-builder-preview-path.js.map +1 -1
- package/dist/modules/agents/builder/agents-builder-tools.service.d.ts +3 -2
- package/dist/modules/agents/builder/agents-builder-tools.service.js +29 -17
- package/dist/modules/agents/builder/agents-builder-tools.service.js.map +1 -1
- package/dist/modules/agents/builder/agents-builder.service.d.ts +4 -1
- package/dist/modules/agents/builder/agents-builder.service.js +12 -3
- package/dist/modules/agents/builder/agents-builder.service.js.map +1 -1
- package/dist/modules/agents/builder/builder-model-live-lookup.service.d.ts +7 -2
- package/dist/modules/agents/builder/builder-model-live-lookup.service.js +21 -3
- package/dist/modules/agents/builder/builder-model-live-lookup.service.js.map +1 -1
- package/dist/modules/agents/builder/format-preview-context.js +3 -0
- package/dist/modules/agents/builder/format-preview-context.js.map +1 -1
- package/dist/modules/agents/builder/get-resource-locator-options.tool.d.ts +2 -2
- package/dist/modules/agents/builder/prompts/config-rules.prompt.js +2 -3
- package/dist/modules/agents/builder/prompts/config-rules.prompt.js.map +1 -1
- package/dist/modules/agents/builder/skills/external-services.skill.js +2 -2
- package/dist/modules/agents/builder/skills/external-services.skill.js.map +1 -1
- package/dist/modules/agents/builder/skills/memory.skill.js +4 -4
- package/dist/modules/agents/builder/skills/memory.skill.js.map +1 -1
- package/dist/modules/agents/builder/skills/target-skills.skill.js +4 -2
- package/dist/modules/agents/builder/skills/target-skills.skill.js.map +1 -1
- package/dist/modules/agents/entities/agent-background-job.entity.d.ts +3 -0
- package/dist/modules/agents/entities/agent-background-job.entity.js +14 -1
- package/dist/modules/agents/entities/agent-background-job.entity.js.map +1 -1
- package/dist/modules/agents/entities/agent-execution.entity.d.ts +2 -0
- package/dist/modules/agents/entities/agent-execution.entity.js +4 -0
- package/dist/modules/agents/entities/agent-execution.entity.js.map +1 -1
- package/dist/modules/agents/entities/agent-memory-entry-candidate.entity.d.ts +15 -0
- package/dist/modules/agents/entities/agent-memory-entry-candidate.entity.js +70 -0
- package/dist/modules/agents/entities/agent-memory-entry-candidate.entity.js.map +1 -0
- package/dist/modules/agents/entities/agent-memory-entry-source.entity.d.ts +2 -1
- package/dist/modules/agents/entities/agent-memory-entry-source.entity.js +11 -2
- package/dist/modules/agents/entities/agent-memory-entry-source.entity.js.map +1 -1
- package/dist/modules/agents/entities/agent-message.entity.js +2 -1
- package/dist/modules/agents/entities/agent-message.entity.js.map +1 -1
- package/dist/modules/agents/episodic-memory.d.ts +2 -2
- package/dist/modules/agents/episodic-memory.js +1 -4
- package/dist/modules/agents/episodic-memory.js.map +1 -1
- package/dist/modules/agents/execution-recorder.d.ts +6 -2
- package/dist/modules/agents/execution-recorder.js +17 -6
- package/dist/modules/agents/execution-recorder.js.map +1 -1
- package/dist/modules/agents/instance-ai-builder-delegate.adapter.d.ts +3 -1
- package/dist/modules/agents/instance-ai-builder-delegate.adapter.js +5 -4
- package/dist/modules/agents/instance-ai-builder-delegate.adapter.js.map +1 -1
- package/dist/modules/agents/integrations/agent-chat-bridge.d.ts +5 -1
- package/dist/modules/agents/integrations/agent-chat-bridge.js +53 -13
- package/dist/modules/agents/integrations/agent-chat-bridge.js.map +1 -1
- package/dist/modules/agents/integrations/agent-chat-stream-consumer.d.ts +5 -3
- package/dist/modules/agents/integrations/agent-chat-stream-consumer.js +35 -25
- package/dist/modules/agents/integrations/agent-chat-stream-consumer.js.map +1 -1
- package/dist/modules/agents/integrations/channel-rate-limit.d.ts +14 -0
- package/dist/modules/agents/integrations/channel-rate-limit.guard.d.ts +5 -0
- package/dist/modules/agents/integrations/channel-rate-limit.guard.js +40 -0
- package/dist/modules/agents/integrations/channel-rate-limit.guard.js.map +1 -0
- package/dist/modules/agents/integrations/channel-rate-limit.js +69 -0
- package/dist/modules/agents/integrations/channel-rate-limit.js.map +1 -0
- package/dist/modules/agents/integrations/chat-integration.service.js.map +1 -1
- package/dist/modules/agents/integrations/component-mapper.js.map +1 -1
- package/dist/modules/agents/integrations/cron-validation.d.ts +2 -1
- package/dist/modules/agents/integrations/cron-validation.js +10 -1
- package/dist/modules/agents/integrations/cron-validation.js.map +1 -1
- package/dist/modules/agents/integrations/integration-action-executor.d.ts +3 -1
- package/dist/modules/agents/integrations/integration-action-executor.js +20 -4
- package/dist/modules/agents/integrations/integration-action-executor.js.map +1 -1
- package/dist/modules/agents/integrations/integration-context-query-executor.d.ts +3 -1
- package/dist/modules/agents/integrations/integration-context-query-executor.js +20 -4
- package/dist/modules/agents/integrations/integration-context-query-executor.js.map +1 -1
- package/dist/modules/agents/integrations/integration-error-codes.d.ts +1 -0
- package/dist/modules/agents/integrations/integration-error-codes.js +1 -0
- package/dist/modules/agents/integrations/integration-error-codes.js.map +1 -1
- package/dist/modules/agents/integrations/integration-helpers.d.ts +1 -0
- package/dist/modules/agents/integrations/integration-helpers.js +4 -0
- package/dist/modules/agents/integrations/integration-helpers.js.map +1 -1
- package/dist/modules/agents/integrations/integration-tool-factory.js.map +1 -1
- package/dist/modules/agents/integrations/n8n-checkpoint-storage.d.ts +3 -14
- package/dist/modules/agents/integrations/n8n-checkpoint-storage.js +7 -64
- package/dist/modules/agents/integrations/n8n-checkpoint-storage.js.map +1 -1
- package/dist/modules/agents/integrations/n8n-memory.d.ts +14 -10
- package/dist/modules/agents/integrations/n8n-memory.js +119 -82
- package/dist/modules/agents/integrations/n8n-memory.js.map +1 -1
- package/dist/modules/agents/integrations/platforms/discord-integration.js +1 -1
- package/dist/modules/agents/integrations/platforms/discord-integration.js.map +1 -1
- package/dist/modules/agents/integrations/platforms/slack/slack-operations.js.map +1 -1
- package/dist/modules/agents/integrations/recording/channel-integration-recorder.js +2 -9
- package/dist/modules/agents/integrations/recording/channel-integration-recorder.js.map +1 -1
- package/dist/modules/agents/json-config/credential-field-mapping.js.map +1 -1
- package/dist/modules/agents/json-config/from-json-config.d.ts +1 -0
- package/dist/modules/agents/json-config/from-json-config.js +14 -25
- package/dist/modules/agents/json-config/from-json-config.js.map +1 -1
- package/dist/modules/agents/json-config/model-config.js.map +1 -1
- package/dist/modules/agents/json-config/sanitize-unknown-agent-credentials.js +0 -1
- package/dist/modules/agents/json-config/sanitize-unknown-agent-credentials.js.map +1 -1
- package/dist/modules/agents/model-stream-stall-options.d.ts +3 -0
- package/dist/modules/agents/model-stream-stall-options.js +21 -0
- package/dist/modules/agents/model-stream-stall-options.js.map +1 -0
- package/dist/modules/agents/repositories/agent-background-job.repository.d.ts +8 -0
- package/dist/modules/agents/repositories/agent-background-job.repository.js +44 -1
- package/dist/modules/agents/repositories/agent-background-job.repository.js.map +1 -1
- package/dist/modules/agents/repositories/agent-execution.repository.d.ts +1 -0
- package/dist/modules/agents/repositories/agent-execution.repository.js +3 -0
- package/dist/modules/agents/repositories/agent-execution.repository.js.map +1 -1
- package/dist/modules/agents/repositories/agent-memory-entry-candidate.repository.d.ts +22 -0
- package/dist/modules/agents/repositories/agent-memory-entry-candidate.repository.js +75 -0
- package/dist/modules/agents/repositories/agent-memory-entry-candidate.repository.js.map +1 -0
- package/dist/modules/agents/repositories/agent-message.repository.d.ts +1 -0
- package/dist/modules/agents/repositories/agent-message.repository.js +11 -0
- package/dist/modules/agents/repositories/agent-message.repository.js.map +1 -1
- package/dist/modules/agents/repositories/agent.repository.d.ts +2 -0
- package/dist/modules/agents/repositories/agent.repository.js +14 -0
- package/dist/modules/agents/repositories/agent.repository.js.map +1 -1
- package/dist/modules/agents/scheduling/agent-task-job-registrar.d.ts +23 -0
- package/dist/modules/agents/scheduling/agent-task-job-registrar.js +146 -0
- package/dist/modules/agents/scheduling/agent-task-job-registrar.js.map +1 -0
- package/dist/modules/agents/scheduling/agent-task-job.d.ts +7 -0
- package/dist/modules/agents/scheduling/agent-task-job.js +12 -0
- package/dist/modules/agents/scheduling/agent-task-job.js.map +1 -0
- package/dist/modules/agents/scheduling/agent-task-task-handler.d.ts +13 -0
- package/dist/modules/agents/scheduling/agent-task-task-handler.js +68 -0
- package/dist/modules/agents/scheduling/agent-task-task-handler.js.map +1 -0
- package/dist/modules/agents/scheduling/task-timezone.d.ts +2 -0
- package/dist/modules/agents/scheduling/task-timezone.js +13 -0
- package/dist/modules/agents/scheduling/task-timezone.js.map +1 -0
- package/dist/modules/agents/sub-agents/sub-agent-runner.d.ts +3 -1
- package/dist/modules/agents/sub-agents/sub-agent-runner.js +14 -5
- package/dist/modules/agents/sub-agents/sub-agent-runner.js.map +1 -1
- package/dist/modules/agents/tools/node-tool-factory.js.map +1 -1
- package/dist/modules/agents/tools/workflow-tool-factory.d.ts +1 -0
- package/dist/modules/agents/tools/workflow-tool-factory.js +35 -6
- package/dist/modules/agents/tools/workflow-tool-factory.js.map +1 -1
- package/dist/modules/agents/utils/agent-config-hash.d.ts +4 -1
- package/dist/modules/agents/utils/agent-config-hash.js +10 -3
- package/dist/modules/agents/utils/agent-config-hash.js.map +1 -1
- package/dist/modules/agents/utils/agent-memory-scope.d.ts +7 -0
- package/dist/modules/agents/utils/agent-memory-scope.js +30 -1
- package/dist/modules/agents/utils/agent-memory-scope.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 +11 -7
- package/dist/modules/agents/utils/execution-to-message-mapper.js.map +1 -1
- package/dist/modules/agents/utils/mcp-attribution.d.ts +4 -0
- package/dist/modules/agents/utils/mcp-attribution.js +34 -0
- package/dist/modules/agents/utils/mcp-attribution.js.map +1 -0
- package/dist/modules/breaking-changes/rules/index.d.ts +4 -1
- package/dist/modules/breaking-changes/rules/index.js +4 -1
- package/dist/modules/breaking-changes/rules/index.js.map +1 -1
- package/dist/modules/breaking-changes/rules/v3/chat-hub-deprecated.rule.d.ts +9 -0
- package/dist/modules/breaking-changes/rules/v3/chat-hub-deprecated.rule.js +59 -0
- package/dist/modules/breaking-changes/rules/v3/chat-hub-deprecated.rule.js.map +1 -0
- package/dist/modules/breaking-changes/rules/v3/external-secrets-project-roles-default.rule.d.ts +12 -0
- package/dist/modules/breaking-changes/rules/v3/external-secrets-project-roles-default.rule.js +70 -0
- package/dist/modules/breaking-changes/rules/v3/external-secrets-project-roles-default.rule.js.map +1 -0
- package/dist/modules/breaking-changes/rules/v3/pre-execute-error-creates-execution.rule.d.ts +9 -0
- package/dist/modules/breaking-changes/rules/v3/pre-execute-error-creates-execution.rule.js +56 -0
- package/dist/modules/breaking-changes/rules/v3/pre-execute-error-creates-execution.rule.js.map +1 -0
- package/dist/modules/breaking-changes/rules/v3/{task-runner-internal-mode.rule.d.ts → storage-path-rename.rule.d.ts} +4 -1
- package/dist/modules/breaking-changes/rules/v3/storage-path-rename.rule.js +87 -0
- package/dist/modules/breaking-changes/rules/v3/storage-path-rename.rule.js.map +1 -0
- package/dist/modules/chat-hub/chat-hub-extractor.d.ts +3 -1
- package/dist/modules/chat-hub/chat-hub-extractor.js +21 -14
- package/dist/modules/chat-hub/chat-hub-extractor.js.map +1 -1
- package/dist/modules/chat-hub/chat-hub.attachment.service.js +1 -1
- package/dist/modules/chat-hub/chat-hub.attachment.service.js.map +1 -1
- package/dist/modules/data-table/data-table-aggregate.controller.js +0 -2
- package/dist/modules/data-table/data-table-aggregate.controller.js.map +1 -1
- package/dist/modules/data-table/data-table-aggregate.service.d.ts +5 -4
- package/dist/modules/data-table/data-table-aggregate.service.js +8 -6
- package/dist/modules/data-table/data-table-aggregate.service.js.map +1 -1
- package/dist/modules/data-table/data-table-file-cleanup.service.js.map +1 -1
- package/dist/modules/data-table/data-table-rows.repository.js +6 -0
- package/dist/modules/data-table/data-table-rows.repository.js.map +1 -1
- package/dist/modules/data-table/data-table.service.js +12 -0
- package/dist/modules/data-table/data-table.service.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/n8n-identifier.d.ts +4 -1
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/n8n-identifier.js +30 -2
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/n8n-identifier.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/dynamic-credentials.controller.js +5 -9
- package/dist/modules/dynamic-credentials.ee/dynamic-credentials.controller.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/dynamic-credentials.module.js +5 -1
- package/dist/modules/dynamic-credentials.ee/dynamic-credentials.module.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/services/credential-check-proxy.service.d.ts +2 -2
- package/dist/modules/dynamic-credentials.ee/services/credential-check-proxy.service.js +2 -2
- package/dist/modules/dynamic-credentials.ee/services/credential-check-proxy.service.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/services/credential-resolver-workflow.service.d.ts +5 -2
- package/dist/modules/dynamic-credentials.ee/services/credential-resolver-workflow.service.js +9 -9
- package/dist/modules/dynamic-credentials.ee/services/credential-resolver-workflow.service.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/workflow-status.controller.js +1 -1
- package/dist/modules/dynamic-credentials.ee/workflow-status.controller.js.map +1 -1
- package/dist/modules/engine-v2/engine-control-plane-auth.middleware.d.ts +2 -1
- package/dist/modules/engine-v2/engine-control-plane-auth.middleware.js +2 -2
- package/dist/modules/engine-v2/engine-control-plane-auth.middleware.js.map +1 -1
- package/dist/modules/engine-v2/engine-control-plane-client.d.ts +2 -4
- package/dist/modules/engine-v2/engine-control-plane-client.js +4 -13
- package/dist/modules/engine-v2/engine-control-plane-client.js.map +1 -1
- package/dist/modules/engine-v2/engine-control-plane-server.d.ts +3 -1
- package/dist/modules/engine-v2/engine-control-plane-server.js +7 -6
- package/dist/modules/engine-v2/engine-control-plane-server.js.map +1 -1
- package/dist/modules/engine-v2/engine-control-plane-transport.d.ts +10 -0
- package/dist/modules/engine-v2/engine-control-plane-transport.js +38 -0
- package/dist/modules/engine-v2/engine-control-plane-transport.js.map +1 -0
- package/dist/modules/engine-v2/engine-credentials-client.d.ts +8 -0
- package/dist/modules/engine-v2/engine-credentials-client.js +47 -0
- package/dist/modules/engine-v2/engine-credentials-client.js.map +1 -0
- package/dist/modules/engine-v2/engine-credentials.contract.d.ts +1 -0
- package/dist/modules/engine-v2/engine-credentials.contract.js +7 -0
- package/dist/modules/engine-v2/engine-credentials.contract.js.map +1 -1
- package/dist/modules/engine-v2/engine-credentials.controller.d.ts +7 -0
- package/dist/modules/engine-v2/engine-credentials.controller.js +35 -0
- package/dist/modules/engine-v2/engine-credentials.controller.js.map +1 -0
- package/dist/modules/engine-v2/engine-credentials.service.d.ts +12 -0
- package/dist/modules/engine-v2/engine-credentials.service.js +95 -0
- package/dist/modules/engine-v2/engine-credentials.service.js.map +1 -0
- package/dist/modules/engine-v2/engine-data-plane-client.js.map +1 -1
- package/dist/modules/engine-v2/remote-credentials-helper.d.ts +24 -0
- package/dist/modules/engine-v2/remote-credentials-helper.js +90 -0
- package/dist/modules/engine-v2/remote-credentials-helper.js.map +1 -0
- package/dist/modules/insights/database/entities/insights-shared.d.ts +4 -2
- package/dist/modules/insights/database/entities/insights-shared.js +1 -0
- package/dist/modules/insights/database/entities/insights-shared.js.map +1 -1
- package/dist/modules/insights/database/repositories/insights-by-period.repository.d.ts +3 -3
- package/dist/modules/insights/database/repositories/insights-by-period.repository.js +8 -2
- package/dist/modules/insights/database/repositories/insights-by-period.repository.js.map +1 -1
- package/dist/modules/insights/insights-collection.service.js +8 -0
- package/dist/modules/insights/insights-collection.service.js.map +1 -1
- package/dist/modules/insights/insights-compaction.task.js +1 -2
- package/dist/modules/insights/insights-compaction.task.js.map +1 -1
- package/dist/modules/insights/insights-pruning.task.js +1 -2
- package/dist/modules/insights/insights-pruning.task.js.map +1 -1
- package/dist/modules/insights/insights.controller.js +4 -5
- package/dist/modules/insights/insights.controller.js.map +1 -1
- package/dist/modules/insights/insights.service.d.ts +12 -22
- package/dist/modules/insights/insights.service.js +49 -18
- package/dist/modules/insights/insights.service.js.map +1 -1
- package/dist/modules/instance-ai/browser/browser-local-mcp-server.js +2 -2
- package/dist/modules/instance-ai/browser/browser-local-mcp-server.js.map +1 -1
- package/dist/modules/instance-ai/drop-rejected-attachments.d.ts +1 -1
- package/dist/modules/instance-ai/entities/instance-ai-checkpoint.entity.d.ts +1 -1
- package/dist/modules/instance-ai/entities/instance-ai-thread.entity.js +2 -1
- package/dist/modules/instance-ai/entities/instance-ai-thread.entity.js.map +1 -1
- package/dist/modules/instance-ai/eval/agent-scenario-seed.js +4 -2
- package/dist/modules/instance-ai/eval/agent-scenario-seed.js.map +1 -1
- package/dist/modules/instance-ai/eval/execution.service.js.map +1 -1
- package/dist/modules/instance-ai/eval/llm-completion-mock.js +16 -19
- package/dist/modules/instance-ai/eval/llm-completion-mock.js.map +1 -1
- package/dist/modules/instance-ai/eval/mock-handler.js +3 -2
- package/dist/modules/instance-ai/eval/mock-handler.js.map +1 -1
- package/dist/modules/instance-ai/eval/mock-utils.js +2 -4
- package/dist/modules/instance-ai/eval/mock-utils.js.map +1 -1
- package/dist/modules/instance-ai/eval/openai-envelope.js.map +1 -1
- package/dist/modules/instance-ai/eval/openai-responses-envelope.js +9 -11
- package/dist/modules/instance-ai/eval/openai-responses-envelope.js.map +1 -1
- package/dist/modules/instance-ai/eval/provider-shapes.js +30 -33
- package/dist/modules/instance-ai/eval/provider-shapes.js.map +1 -1
- package/dist/modules/instance-ai/eval/request-sanitizer.js.map +1 -1
- package/dist/modules/instance-ai/eval/structured-output-conformance.js +14 -16
- package/dist/modules/instance-ai/eval/structured-output-conformance.js.map +1 -1
- package/dist/modules/instance-ai/eval/thread-restore.service.d.ts +13 -3
- package/dist/modules/instance-ai/eval/thread-restore.service.js +95 -22
- package/dist/modules/instance-ai/eval/thread-restore.service.js.map +1 -1
- package/dist/modules/instance-ai/eval/workflow-analysis.js +2 -4
- package/dist/modules/instance-ai/eval/workflow-analysis.js.map +1 -1
- package/dist/modules/instance-ai/event-bus/durable-event-log.d.ts +4 -0
- package/dist/modules/instance-ai/event-bus/durable-event-log.js +4 -0
- package/dist/modules/instance-ai/event-bus/durable-event-log.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai-checkpoint-pruning.task.d.ts +16 -0
- package/dist/modules/instance-ai/instance-ai-checkpoint-pruning.task.js +40 -0
- package/dist/modules/instance-ai/instance-ai-checkpoint-pruning.task.js.map +1 -0
- package/dist/modules/instance-ai/instance-ai-credit.service.js +12 -8
- package/dist/modules/instance-ai/instance-ai-credit.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai-memory.service.d.ts +6 -3
- package/dist/modules/instance-ai/instance-ai-memory.service.js +36 -2
- package/dist/modules/instance-ai/instance-ai-memory.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai-model.service.js +2 -2
- package/dist/modules/instance-ai/instance-ai-model.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai-pending-agent.service.d.ts +2 -0
- package/dist/modules/instance-ai/instance-ai-settings.service.js +8 -8
- package/dist/modules/instance-ai/instance-ai-settings.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai-setup-telemetry.service.js +2 -2
- package/dist/modules/instance-ai/instance-ai-setup-telemetry.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai-terminal-outcome.service.d.ts +2 -1
- package/dist/modules/instance-ai/instance-ai-terminal-outcome.service.js +1 -1
- package/dist/modules/instance-ai/instance-ai-terminal-outcome.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai-verification.service.js +3 -4
- package/dist/modules/instance-ai/instance-ai-verification.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.adapter.service.d.ts +9 -4
- package/dist/modules/instance-ai/instance-ai.adapter.service.js +194 -73
- package/dist/modules/instance-ai/instance-ai.adapter.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.controller.d.ts +7 -1
- package/dist/modules/instance-ai/instance-ai.controller.js +38 -6
- package/dist/modules/instance-ai/instance-ai.controller.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.module.d.ts +2 -1
- package/dist/modules/instance-ai/instance-ai.module.js +7 -0
- package/dist/modules/instance-ai/instance-ai.module.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.service.d.ts +15 -20
- package/dist/modules/instance-ai/instance-ai.service.js +267 -421
- package/dist/modules/instance-ai/instance-ai.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-context.service.d.ts +48 -0
- package/dist/modules/instance-ai/instance-context.service.js +388 -0
- package/dist/modules/instance-ai/instance-context.service.js.map +1 -0
- package/dist/modules/instance-ai/internal-messages.d.ts +8 -0
- package/dist/modules/instance-ai/internal-messages.js +34 -3
- package/dist/modules/instance-ai/internal-messages.js.map +1 -1
- package/dist/modules/instance-ai/message-parser.d.ts +4 -3
- package/dist/modules/instance-ai/message-parser.js.map +1 -1
- package/dist/modules/instance-ai/repositories/instance-ai-checkpoint.repository.d.ts +1 -1
- package/dist/modules/instance-ai/repositories/instance-ai-event-log.repository.d.ts +5 -1
- package/dist/modules/instance-ai/repositories/instance-ai-event-log.repository.js +16 -0
- package/dist/modules/instance-ai/repositories/instance-ai-event-log.repository.js.map +1 -1
- package/dist/modules/instance-ai/repositories/instance-ai-thread.repository.d.ts +13 -3
- package/dist/modules/instance-ai/repositories/instance-ai-thread.repository.js +59 -4
- package/dist/modules/instance-ai/repositories/instance-ai-thread.repository.js.map +1 -1
- package/dist/modules/instance-ai/sandbox/instance-ai-sandbox.service.d.ts +8 -2
- package/dist/modules/instance-ai/sandbox/instance-ai-sandbox.service.js +91 -55
- package/dist/modules/instance-ai/sandbox/instance-ai-sandbox.service.js.map +1 -1
- package/dist/modules/instance-ai/storage/typeorm-agent-checkpoint-store.d.ts +1 -1
- package/dist/modules/instance-ai/storage/typeorm-agent-memory.d.ts +7 -2
- package/dist/modules/instance-ai/storage/typeorm-agent-memory.js +53 -24
- package/dist/modules/instance-ai/storage/typeorm-agent-memory.js.map +1 -1
- package/dist/modules/instance-ai/storage/typeorm-observation-log-store.d.ts +1 -2
- package/dist/modules/instance-ai/storage/typeorm-observation-log-store.js.map +1 -1
- package/dist/modules/instance-ai/stream-transport-error.js +3 -1
- package/dist/modules/instance-ai/stream-transport-error.js.map +1 -1
- package/dist/modules/instance-ai/suspended-thread-persistence.service.js.map +1 -1
- package/dist/modules/instance-ai/web-research/fetch-and-extract.js.map +1 -1
- package/dist/modules/instance-ai/workflow-templates.service.js +3 -5
- package/dist/modules/instance-ai/workflow-templates.service.js.map +1 -1
- package/dist/modules/instance-ai/workflow-verification-obligation-service.d.ts +2 -1
- package/dist/modules/instance-ai/workflow-verification-obligation-service.js +11 -3
- package/dist/modules/instance-ai/workflow-verification-obligation-service.js.map +1 -1
- package/dist/modules/instance-registry/checks/build-check-result.d.ts +13 -0
- package/dist/modules/instance-registry/checks/build-check-result.js +19 -0
- package/dist/modules/instance-registry/checks/build-check-result.js.map +1 -0
- package/dist/modules/instance-registry/checks/hostid-clash.check.js +13 -21
- package/dist/modules/instance-registry/checks/hostid-clash.check.js.map +1 -1
- package/dist/modules/instance-registry/checks/split-brain.check.js +14 -23
- package/dist/modules/instance-registry/checks/split-brain.check.js.map +1 -1
- package/dist/modules/instance-registry/checks/version-mismatch.check.js +17 -24
- package/dist/modules/instance-registry/checks/version-mismatch.check.js.map +1 -1
- package/dist/modules/instance-reporting.ee/database/entities/instance-monitoring-report.js.map +1 -0
- package/dist/modules/{instance-reporting → instance-reporting.ee}/database/repositories/instance-monitoring-report.repository.d.ts +1 -0
- package/dist/modules/{instance-reporting → instance-reporting.ee}/database/repositories/instance-monitoring-report.repository.js +8 -0
- package/dist/modules/instance-reporting.ee/database/repositories/instance-monitoring-report.repository.js.map +1 -0
- package/dist/modules/{instance-reporting → instance-reporting.ee}/instance-reporting-scheduler.service.d.ts +6 -6
- package/dist/modules/{instance-reporting → instance-reporting.ee}/instance-reporting-scheduler.service.js +10 -18
- package/dist/modules/instance-reporting.ee/instance-reporting-scheduler.service.js.map +1 -0
- package/dist/modules/instance-reporting.ee/instance-reporting-settings.service.js.map +1 -0
- package/dist/modules/instance-reporting.ee/instance-reporting.config.js.map +1 -0
- package/dist/modules/instance-reporting.ee/instance-reporting.constants.js.map +1 -0
- package/dist/modules/instance-reporting.ee/instance-reporting.controller.d.ts +7 -0
- package/dist/modules/instance-reporting.ee/instance-reporting.controller.js +35 -0
- package/dist/modules/instance-reporting.ee/instance-reporting.controller.js.map +1 -0
- package/dist/modules/{instance-reporting → instance-reporting.ee}/instance-reporting.module.d.ts +8 -0
- package/dist/modules/instance-reporting.ee/instance-reporting.module.js +49 -0
- package/dist/modules/instance-reporting.ee/instance-reporting.module.js.map +1 -0
- package/dist/modules/{instance-reporting → instance-reporting.ee}/instance-reporting.service.d.ts +3 -1
- package/dist/modules/{instance-reporting → instance-reporting.ee}/instance-reporting.service.js +6 -2
- package/dist/modules/instance-reporting.ee/instance-reporting.service.js.map +1 -0
- package/dist/modules/ldap.ee/ldap.service.ee.js.map +1 -1
- package/dist/modules/mcp/mcp.controller.js +8 -6
- package/dist/modules/mcp/mcp.controller.js.map +1 -1
- package/dist/modules/mcp/mcp.service.d.ts +9 -2
- package/dist/modules/mcp/mcp.service.js +28 -8
- package/dist/modules/mcp/mcp.service.js.map +1 -1
- package/dist/modules/mcp/tools/agents/agent-reference.js +2 -1
- package/dist/modules/mcp/tools/agents/agent-reference.js.map +1 -1
- package/dist/modules/mcp/tools/agents/agent-tools.service.js +40 -10
- package/dist/modules/mcp/tools/agents/agent-tools.service.js.map +1 -1
- package/dist/modules/mcp/tools/data-table/get-data-table-rows.tool.d.ts +5 -5
- package/dist/modules/mcp/tools/get-workflow-details.tool.js +3 -3
- package/dist/modules/mcp/tools/get-workflow-details.tool.js.map +1 -1
- package/dist/modules/mcp/tools/get-workflow-versions-diff.tool.js +2 -2
- package/dist/modules/mcp/tools/get-workflow-versions-diff.tool.js.map +1 -1
- package/dist/modules/mcp/tools/schemas.d.ts +2 -1
- package/dist/modules/mcp/tools/schemas.js +6 -2
- package/dist/modules/mcp/tools/schemas.js.map +1 -1
- package/dist/modules/mcp/tools/webhook-utils.js +8 -6
- package/dist/modules/mcp/tools/webhook-utils.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/create-workflow-from-code.tool.js +7 -2
- package/dist/modules/mcp/tools/workflow-builder/create-workflow-from-code.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/mcp-instructions.d.ts +1 -0
- package/dist/modules/mcp/tools/workflow-builder/mcp-instructions.js +4 -3
- package/dist/modules/mcp/tools/workflow-builder/mcp-instructions.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/top-level-items-warning.d.ts +13 -0
- package/dist/modules/mcp/tools/workflow-builder/top-level-items-warning.js +24 -0
- package/dist/modules/mcp/tools/workflow-builder/top-level-items-warning.js.map +1 -0
- package/dist/modules/mcp/tools/workflow-builder/update-workflow.tool.d.ts +1 -1
- package/dist/modules/mcp/tools/workflow-builder/update-workflow.tool.js +23 -4
- package/dist/modules/mcp/tools/workflow-builder/update-workflow.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/workflow-operations.js +7 -9
- package/dist/modules/mcp/tools/workflow-builder/workflow-operations.js.map +1 -1
- package/dist/modules/mcp-registry/mcp-registry-connection.js +7 -2
- package/dist/modules/mcp-registry/mcp-registry-connection.js.map +1 -1
- package/dist/modules/mcp-registry/registry/mcp-registry.types.d.ts +32 -20
- package/dist/modules/mcp-registry/registry/mcp-registry.types.js +8 -10
- package/dist/modules/mcp-registry/registry/mcp-registry.types.js.map +1 -1
- package/dist/modules/mcp-registry/registry/mock-servers.js +2 -0
- package/dist/modules/mcp-registry/registry/mock-servers.js.map +1 -1
- package/dist/modules/n8n-packages/engine/n8n-package-parser.d.ts +1 -0
- package/dist/modules/n8n-packages/engine/n8n-package-parser.js +24 -7
- package/dist/modules/n8n-packages/engine/n8n-package-parser.js.map +1 -1
- package/dist/modules/n8n-packages/entities/folder/folder.exporter.d.ts +2 -0
- package/dist/modules/n8n-packages/entities/folder/folder.exporter.js +27 -2
- package/dist/modules/n8n-packages/entities/folder/folder.exporter.js.map +1 -1
- package/dist/modules/n8n-packages/entities/project/project.exporter.d.ts +2 -0
- package/dist/modules/n8n-packages/entities/project/project.exporter.js +28 -8
- package/dist/modules/n8n-packages/entities/project/project.exporter.js.map +1 -1
- package/dist/modules/n8n-packages/entities/workflow/auto-included-workflow.exporter.js +1 -1
- package/dist/modules/n8n-packages/entities/workflow/auto-included-workflow.exporter.js.map +1 -1
- package/dist/modules/n8n-packages/entities/workflow/workflow-import.types.d.ts +2 -1
- package/dist/modules/n8n-packages/entities/workflow/workflow-importer.js +1 -1
- package/dist/modules/n8n-packages/entities/workflow/workflow-importer.js.map +1 -1
- package/dist/modules/n8n-packages/entities/workflow/workflow-published-state.d.ts +2 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow-published-state.js +9 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow-published-state.js.map +1 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow-publishing-policy.js +2 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow-publishing-policy.js.map +1 -1
- package/dist/modules/n8n-packages/entities/workflow/workflow-publishing-policy.types.d.ts +1 -1
- package/dist/modules/n8n-packages/entities/workflow/workflow-publishing-policy.types.js.map +1 -1
- package/dist/modules/n8n-packages/entities/workflow/workflow.exporter.js +1 -1
- package/dist/modules/n8n-packages/entities/workflow/workflow.exporter.js.map +1 -1
- package/dist/modules/n8n-packages/entities/workflow/workflow.serializer.d.ts +2 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow.serializer.js +5 -1
- package/dist/modules/n8n-packages/entities/workflow/workflow.serializer.js.map +1 -1
- package/dist/modules/n8n-packages/io/entity-file-format.d.ts +1 -0
- package/dist/modules/n8n-packages/io/entity-file-format.js +7 -0
- package/dist/modules/n8n-packages/io/entity-file-format.js.map +1 -0
- package/dist/modules/n8n-packages/io/hashing-package-writer.d.ts +10 -0
- package/dist/modules/n8n-packages/io/hashing-package-writer.js +25 -0
- package/dist/modules/n8n-packages/io/hashing-package-writer.js.map +1 -0
- package/dist/modules/n8n-packages/io/manifest-entry.d.ts +38 -0
- package/dist/modules/n8n-packages/io/manifest-entry.js +26 -22
- package/dist/modules/n8n-packages/io/manifest-entry.js.map +1 -1
- package/dist/modules/n8n-packages/n8n-packages.service.d.ts +7 -3
- package/dist/modules/n8n-packages/n8n-packages.service.js +10 -3
- package/dist/modules/n8n-packages/n8n-packages.service.js.map +1 -1
- package/dist/modules/n8n-packages/n8n-packages.types.d.ts +5 -0
- package/dist/modules/n8n-packages/n8n-packages.types.js.map +1 -1
- package/dist/modules/n8n-packages/spec/constants.d.ts +1 -0
- package/dist/modules/n8n-packages/spec/constants.js +2 -1
- package/dist/modules/n8n-packages/spec/constants.js.map +1 -1
- package/dist/modules/n8n-packages/spec/serialized/workflow-metadata.schema.d.ts +9 -0
- package/dist/modules/n8n-packages/spec/serialized/workflow-metadata.schema.js +8 -0
- package/dist/modules/n8n-packages/spec/serialized/workflow-metadata.schema.js.map +1 -0
- 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.js.map +1 -1
- package/dist/modules/oauth-jwe/oauth-jwe.module.js +2 -4
- package/dist/modules/oauth-jwe/oauth-jwe.module.js.map +1 -1
- package/dist/modules/oauth-server/protected-resource-resolvers/chat-trigger-resource.base.js +2 -4
- package/dist/modules/oauth-server/protected-resource-resolvers/chat-trigger-resource.base.js.map +1 -1
- package/dist/modules/oauth-server/protected-resource-resolvers/form-trigger-resource.resolver.js +2 -4
- package/dist/modules/oauth-server/protected-resource-resolvers/form-trigger-resource.resolver.js.map +1 -1
- package/dist/modules/oauth-server/protected-resource-resolvers/form-trigger-test-resource.resolver.js +2 -4
- package/dist/modules/oauth-server/protected-resource-resolvers/form-trigger-test-resource.resolver.js.map +1 -1
- package/dist/modules/oauth-server/protected-resource-resolvers/utils.d.ts +2 -0
- package/dist/modules/oauth-server/protected-resource-resolvers/utils.js +8 -0
- package/dist/modules/oauth-server/protected-resource-resolvers/utils.js.map +1 -1
- package/dist/modules/oauth-server/protected-resource-resolvers/workflow-mcp-test-trigger-resource.resolver.js +2 -4
- package/dist/modules/oauth-server/protected-resource-resolvers/workflow-mcp-test-trigger-resource.resolver.js.map +1 -1
- package/dist/modules/oauth-server/protected-resource-resolvers/workflow-mcp-trigger-resource.resolver.js +2 -4
- package/dist/modules/oauth-server/protected-resource-resolvers/workflow-mcp-trigger-resource.resolver.js.map +1 -1
- package/dist/modules/oauth-server/protected-resource-resolvers/workflow-webhook-test-trigger-resource.resolver.js +2 -4
- package/dist/modules/oauth-server/protected-resource-resolvers/workflow-webhook-test-trigger-resource.resolver.js.map +1 -1
- package/dist/modules/oauth-server/protected-resource-resolvers/workflow-webhook-trigger-resource.resolver.js +2 -4
- package/dist/modules/oauth-server/protected-resource-resolvers/workflow-webhook-trigger-resource.resolver.js.map +1 -1
- package/dist/modules/otel/execution-level-tracer.types.js.map +1 -1
- package/dist/modules/otel/otel-lifecycle-handler.js +3 -1
- package/dist/modules/otel/otel-lifecycle-handler.js.map +1 -1
- package/dist/modules/policy-infrastructure/policy-infrastructure.module.js.map +1 -1
- package/dist/modules/promotions.ee/base-branch-files.d.ts +67 -0
- package/dist/modules/promotions.ee/base-branch-files.js +75 -0
- package/dist/modules/promotions.ee/base-branch-files.js.map +1 -0
- package/dist/modules/promotions.ee/branch-placement.d.ts +15 -0
- package/dist/modules/promotions.ee/branch-placement.js +42 -0
- package/dist/modules/promotions.ee/branch-placement.js.map +1 -0
- package/dist/modules/{git-connections.ee → promotions.ee}/constants.d.ts +7 -1
- package/dist/modules/{git-connections.ee → promotions.ee}/constants.js +5 -2
- package/dist/modules/promotions.ee/constants.js.map +1 -0
- package/dist/modules/promotions.ee/database/entities/promotion-config.entity.d.ts +11 -0
- package/dist/modules/promotions.ee/database/entities/promotion-config.entity.js +44 -0
- package/dist/modules/promotions.ee/database/entities/promotion-config.entity.js.map +1 -0
- package/dist/modules/promotions.ee/database/entities/promotion-connection-project.entity.d.ts +8 -0
- package/dist/modules/{git-connections.ee/database/entities/git-connection-project.entity.js → promotions.ee/database/entities/promotion-connection-project.entity.js} +13 -13
- package/dist/modules/promotions.ee/database/entities/promotion-connection-project.entity.js.map +1 -0
- package/dist/modules/promotions.ee/database/entities/promotion-connection.entity.d.ts +11 -0
- package/dist/modules/promotions.ee/database/entities/promotion-connection.entity.js +45 -0
- package/dist/modules/promotions.ee/database/entities/promotion-connection.entity.js.map +1 -0
- package/dist/modules/promotions.ee/database/entities/promotion-provider.entity.d.ts +9 -0
- package/dist/modules/promotions.ee/database/entities/promotion-provider.entity.js +41 -0
- package/dist/modules/promotions.ee/database/entities/promotion-provider.entity.js.map +1 -0
- package/dist/modules/promotions.ee/database/promotion-conflict.error.d.ts +6 -0
- package/dist/modules/promotions.ee/database/promotion-conflict.error.js +12 -0
- package/dist/modules/promotions.ee/database/promotion-conflict.error.js.map +1 -0
- package/dist/modules/promotions.ee/database/repositories/promotion-config.repository.d.ts +19 -0
- package/dist/modules/promotions.ee/database/repositories/promotion-config.repository.js +67 -0
- package/dist/modules/promotions.ee/database/repositories/promotion-config.repository.js.map +1 -0
- package/dist/modules/promotions.ee/database/repositories/promotion-connection-project.repository.d.ts +10 -0
- package/dist/modules/promotions.ee/database/repositories/promotion-connection-project.repository.js +54 -0
- package/dist/modules/promotions.ee/database/repositories/promotion-connection-project.repository.js.map +1 -0
- package/dist/modules/promotions.ee/database/repositories/promotion-connection.repository.d.ts +27 -0
- package/dist/modules/promotions.ee/database/repositories/promotion-connection.repository.js +77 -0
- package/dist/modules/promotions.ee/database/repositories/promotion-connection.repository.js.map +1 -0
- package/dist/modules/promotions.ee/database/repositories/promotion-provider.repository.d.ts +19 -0
- package/dist/modules/promotions.ee/database/repositories/promotion-provider.repository.js +71 -0
- package/dist/modules/promotions.ee/database/repositories/promotion-provider.repository.js.map +1 -0
- package/dist/modules/promotions.ee/diff-package-files.d.ts +13 -0
- package/dist/modules/promotions.ee/diff-package-files.js +48 -0
- package/dist/modules/promotions.ee/diff-package-files.js.map +1 -0
- package/dist/modules/promotions.ee/import-manifest-bridge.d.ts +8 -0
- package/dist/modules/promotions.ee/import-manifest-bridge.js +254 -0
- package/dist/modules/promotions.ee/import-manifest-bridge.js.map +1 -0
- package/dist/modules/promotions.ee/promotion-change.service.d.ts +14 -0
- package/dist/modules/promotions.ee/promotion-change.service.js +211 -0
- package/dist/modules/promotions.ee/promotion-change.service.js.map +1 -0
- package/dist/modules/promotions.ee/promotion-changes.controller.d.ts +9 -0
- package/dist/modules/promotions.ee/promotion-changes.controller.js +50 -0
- package/dist/modules/promotions.ee/promotion-changes.controller.js.map +1 -0
- package/dist/modules/promotions.ee/promotion-config-settings.d.ts +6 -0
- package/dist/modules/promotions.ee/promotion-config-settings.js +13 -0
- package/dist/modules/promotions.ee/promotion-config-settings.js.map +1 -0
- package/dist/modules/promotions.ee/promotion-config.resolver.d.ts +16 -0
- package/dist/modules/promotions.ee/promotion-config.resolver.js +97 -0
- package/dist/modules/promotions.ee/promotion-config.resolver.js.map +1 -0
- package/dist/modules/promotions.ee/promotion-conflicts.d.ts +1 -0
- package/dist/modules/promotions.ee/promotion-conflicts.js +16 -0
- package/dist/modules/promotions.ee/promotion-conflicts.js.map +1 -0
- package/dist/modules/promotions.ee/promotion-connections.service.d.ts +70 -0
- package/dist/modules/promotions.ee/promotion-connections.service.js +274 -0
- package/dist/modules/promotions.ee/promotion-connections.service.js.map +1 -0
- package/dist/modules/promotions.ee/promotion-providers.service.d.ts +48 -0
- package/dist/modules/promotions.ee/promotion-providers.service.js +166 -0
- package/dist/modules/promotions.ee/promotion-providers.service.js.map +1 -0
- package/dist/modules/promotions.ee/promotion-working-directory.service.d.ts +19 -0
- package/dist/modules/promotions.ee/promotion-working-directory.service.js +82 -0
- package/dist/modules/promotions.ee/promotion-working-directory.service.js.map +1 -0
- package/dist/modules/promotions.ee/promotions-git.service.d.ts +59 -0
- package/dist/modules/promotions.ee/promotions-git.service.js +402 -0
- package/dist/modules/promotions.ee/promotions-git.service.js.map +1 -0
- package/dist/modules/promotions.ee/promotions-git.utils.d.ts +16 -0
- package/dist/modules/{git-connections.ee/git-connections-git.utils.js → promotions.ee/promotions-git.utils.js} +15 -3
- package/dist/modules/promotions.ee/promotions-git.utils.js.map +1 -0
- package/dist/modules/promotions.ee/promotions.module.d.ts +5 -0
- package/dist/modules/promotions.ee/promotions.module.js +35 -0
- package/dist/modules/promotions.ee/promotions.module.js.map +1 -0
- package/dist/modules/promotions.ee/promotions.service.d.ts +43 -0
- package/dist/modules/promotions.ee/promotions.service.js +413 -0
- package/dist/modules/promotions.ee/promotions.service.js.map +1 -0
- package/dist/modules/promotions.ee/promotions.types.d.ts +61 -0
- package/dist/modules/promotions.ee/promotions.types.js +15 -0
- package/dist/modules/promotions.ee/promotions.types.js.map +1 -0
- package/dist/modules/promotions.ee/working-copy-updater.d.ts +53 -0
- package/dist/modules/promotions.ee/working-copy-updater.js +487 -0
- package/dist/modules/promotions.ee/working-copy-updater.js.map +1 -0
- package/dist/modules/redaction/dynamic-credentials-context-hook.d.ts +13 -0
- package/dist/modules/redaction/dynamic-credentials-context-hook.js +68 -0
- package/dist/modules/redaction/dynamic-credentials-context-hook.js.map +1 -0
- package/dist/modules/redaction/executions/execution-redaction.service.js +11 -1
- package/dist/modules/redaction/executions/execution-redaction.service.js.map +1 -1
- package/dist/modules/redaction/instance-redaction-enforcement.service.js.map +1 -1
- package/dist/modules/redaction/redaction.module.js +2 -1
- package/dist/modules/redaction/redaction.module.js.map +1 -1
- package/dist/modules/runtime-credentials/runtime-credentials.module.js +2 -4
- package/dist/modules/runtime-credentials/runtime-credentials.module.js.map +1 -1
- package/dist/modules/source-control.ee/source-control-git.service.ee.js +7 -4
- package/dist/modules/source-control.ee/source-control-git.service.ee.js.map +1 -1
- package/dist/modules/source-control.ee/source-control-helper.ee.js +3 -6
- package/dist/modules/source-control.ee/source-control-helper.ee.js.map +1 -1
- package/dist/modules/source-control.ee/source-control-import.service.ee.d.ts +7 -4
- package/dist/modules/source-control.ee/source-control-import.service.ee.js +40 -9
- package/dist/modules/source-control.ee/source-control-import.service.ee.js.map +1 -1
- package/dist/modules/sso-oidc/oidc.service.ee.js.map +1 -1
- package/dist/modules/sso-saml/saml-helpers.js.map +1 -1
- package/dist/modules/sso-saml/saml.service.ee.js.map +1 -1
- package/dist/modules/token-exchange/services/jwks-resolver.js.map +1 -1
- package/dist/modules/token-exchange/token-exchange.module.js +3 -5
- package/dist/modules/token-exchange/token-exchange.module.js.map +1 -1
- package/dist/modules/type-availability-policies/available-types.controller.d.ts +10 -0
- package/dist/modules/type-availability-policies/available-types.controller.js +57 -0
- package/dist/modules/type-availability-policies/available-types.controller.js.map +1 -0
- package/dist/modules/type-availability-policies/constants.d.ts +1 -0
- package/dist/modules/type-availability-policies/constants.js +5 -0
- package/dist/modules/type-availability-policies/constants.js.map +1 -0
- package/dist/modules/type-availability-policies/database/repositories/type-availability-policy-scope.repository.d.ts +1 -0
- package/dist/modules/type-availability-policies/database/repositories/type-availability-policy-scope.repository.js +11 -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 +2 -1
- package/dist/modules/type-availability-policies/database/repositories/type-availability-policy.repository.js +18 -5
- package/dist/modules/type-availability-policies/database/repositories/type-availability-policy.repository.js.map +1 -1
- package/dist/modules/type-availability-policies/policy-evaluator.d.ts +15 -1
- package/dist/modules/type-availability-policies/policy-evaluator.js +74 -5
- package/dist/modules/type-availability-policies/policy-evaluator.js.map +1 -1
- package/dist/modules/type-availability-policies/policy-rule.types.d.ts +2 -13
- package/dist/modules/type-availability-policies/type-availability-policies.module.js +7 -1
- 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.d.ts +5 -8
- package/dist/modules/type-availability-policies/type-availability-policy-instance.controller.js +10 -13
- package/dist/modules/type-availability-policies/type-availability-policy-instance.controller.js.map +1 -1
- package/dist/modules/type-availability-policies/type-availability-policy-project.controller.d.ts +25 -0
- package/dist/modules/type-availability-policies/type-availability-policy-project.controller.js +67 -0
- package/dist/modules/type-availability-policies/type-availability-policy-project.controller.js.map +1 -0
- package/dist/modules/type-availability-policies/type-availability-policy.service.d.ts +7 -0
- package/dist/modules/type-availability-policies/type-availability-policy.service.js +78 -6
- package/dist/modules/type-availability-policies/type-availability-policy.service.js.map +1 -1
- package/dist/node-execution/ephemeral-node-executor.js.map +1 -1
- package/dist/node-types.js +9 -6
- package/dist/node-types.js.map +1 -1
- package/dist/posthog/index.js +2 -1
- package/dist/posthog/index.js.map +1 -1
- package/dist/public-api/public-api-controller.registry.js +17 -10
- package/dist/public-api/public-api-controller.registry.js.map +1 -1
- package/dist/public-api/public-api-route-resolver.d.ts +11 -1
- package/dist/public-api/public-api-route-resolver.js +17 -2
- package/dist/public-api/public-api-route-resolver.js.map +1 -1
- package/dist/public-api/public-api-validation-error.d.ts +1 -1
- package/dist/public-api/public-api-validation-error.js.map +1 -1
- package/dist/public-api/types.d.ts +1 -29
- package/dist/public-api/v1/controllers/credentials.public.controller.d.ts +18 -2
- package/dist/public-api/v1/controllers/credentials.public.controller.js +210 -5
- package/dist/public-api/v1/controllers/credentials.public.controller.js.map +1 -1
- package/dist/public-api/v1/controllers/executions.public.controller.js +6 -17
- package/dist/public-api/v1/controllers/executions.public.controller.js.map +1 -1
- package/dist/public-api/v1/controllers/index.d.ts +4 -1
- package/dist/public-api/v1/controllers/index.js +4 -1
- package/dist/public-api/v1/controllers/index.js.map +1 -1
- package/dist/public-api/v1/controllers/node-type-policies.public.controller.d.ts +13 -0
- package/dist/public-api/v1/controllers/node-type-policies.public.controller.js +141 -0
- package/dist/public-api/v1/controllers/node-type-policies.public.controller.js.map +1 -0
- package/dist/public-api/v1/controllers/projects.public.controller.d.ts +19 -0
- package/dist/public-api/v1/controllers/projects.public.controller.js +231 -0
- package/dist/public-api/v1/controllers/projects.public.controller.js.map +1 -0
- package/dist/public-api/v1/controllers/promotions.public.controller.d.ts +33 -0
- package/dist/public-api/v1/controllers/promotions.public.controller.js +503 -0
- package/dist/public-api/v1/controllers/promotions.public.controller.js.map +1 -0
- package/dist/public-api/v1/controllers/role-mapping-rules.public.controller.js +3 -3
- package/dist/public-api/v1/controllers/role-mapping-rules.public.controller.js.map +1 -1
- package/dist/public-api/v1/controllers/roles.public.controller.d.ts +3 -3
- package/dist/public-api/v1/controllers/roles.public.controller.js +14 -14
- package/dist/public-api/v1/controllers/roles.public.controller.js.map +1 -1
- package/dist/public-api/v1/controllers/source-control.public.controller.d.ts +5 -2
- package/dist/public-api/v1/controllers/source-control.public.controller.js +50 -4
- package/dist/public-api/v1/controllers/source-control.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 +56 -6
- package/dist/public-api/v1/controllers/tags.public.controller.js.map +1 -1
- package/dist/public-api/v1/controllers/variables.public.controller.d.ts +12 -0
- package/dist/public-api/v1/controllers/variables.public.controller.js +127 -0
- package/dist/public-api/v1/controllers/variables.public.controller.js.map +1 -0
- package/dist/public-api/v1/controllers/workflows.public.controller.d.ts +1 -1
- package/dist/public-api/v1/controllers/workflows.public.controller.js +20 -29
- package/dist/public-api/v1/controllers/workflows.public.controller.js.map +1 -1
- package/dist/public-api/v1/handlers/credentials/credentials.handler.d.ts +0 -4
- package/dist/public-api/v1/handlers/credentials/credentials.handler.js +0 -159
- package/dist/public-api/v1/handlers/credentials/credentials.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/credentials/credentials.utils.d.ts +6 -0
- package/dist/public-api/v1/handlers/credentials/credentials.utils.js +30 -0
- package/dist/public-api/v1/handlers/credentials/credentials.utils.js.map +1 -1
- package/dist/public-api/v1/handlers/tags/tags.handler.d.ts +0 -2
- package/dist/public-api/v1/handlers/tags/tags.handler.js +0 -27
- package/dist/public-api/v1/handlers/tags/tags.handler.js.map +1 -1
- package/dist/public-api/v1/openapi-gen/decorator-routes.js +3 -2
- package/dist/public-api/v1/openapi-gen/decorator-routes.js.map +1 -1
- package/dist/public-api/v1/openapi.yml +4712 -2646
- package/dist/public-api/v1/shared/project.mapper.d.ts +3 -0
- package/dist/public-api/v1/shared/project.mapper.js +20 -0
- package/dist/public-api/v1/shared/project.mapper.js.map +1 -0
- package/dist/push/abstract.push.d.ts +3 -1
- package/dist/push/abstract.push.js +2 -2
- package/dist/push/abstract.push.js.map +1 -1
- package/dist/push/index.d.ts +3 -1
- package/dist/push/index.js +2 -2
- package/dist/push/index.js.map +1 -1
- package/dist/requests.d.ts +0 -8
- package/dist/scaling/constants.d.ts +2 -2
- package/dist/scaling/constants.js +3 -0
- package/dist/scaling/constants.js.map +1 -1
- package/dist/scaling/job-processor.d.ts +2 -0
- package/dist/scaling/job-processor.js +54 -9
- package/dist/scaling/job-processor.js.map +1 -1
- package/dist/scaling/pubsub/pubsub.event-map.d.ts +13 -0
- package/dist/scaling/pubsub/pubsub.types.d.ts +4 -1
- package/dist/scaling/scaling.service.d.ts +3 -1
- package/dist/scaling/scaling.service.js +5 -3
- package/dist/scaling/scaling.service.js.map +1 -1
- package/dist/scheduling/poll-trigger-node/poll-trigger-task.d.ts +2 -5
- package/dist/scheduling/poll-trigger-node/poll-trigger-task.js +2 -3
- package/dist/scheduling/poll-trigger-node/poll-trigger-task.js.map +1 -1
- package/dist/scheduling/schedule-trigger-node/schedule-trigger-task-handler.js.map +1 -1
- package/dist/scheduling/schedule-trigger-node/schedule-trigger-task.d.ts +2 -5
- package/dist/scheduling/schedule-trigger-node/schedule-trigger-task.js +2 -3
- package/dist/scheduling/schedule-trigger-node/schedule-trigger-task.js.map +1 -1
- package/dist/scheduling/system-tasks/main-system-tasks.d.ts +2 -1
- package/dist/scheduling/system-tasks/main-system-tasks.js +19 -2
- package/dist/scheduling/system-tasks/main-system-tasks.js.map +1 -1
- package/dist/scheduling/system-tasks/system-task-runner.js +3 -3
- package/dist/scheduling/system-tasks/system-task-runner.js.map +1 -1
- package/dist/scheduling/workflow-node-task-payload.d.ts +5 -0
- package/dist/scheduling/workflow-node-task-payload.js +7 -0
- package/dist/scheduling/workflow-node-task-payload.js.map +1 -0
- package/dist/server.d.ts +2 -0
- package/dist/server.js +2 -0
- package/dist/server.js.map +1 -1
- package/dist/services/ai-preference.service.d.ts +46 -0
- package/dist/services/ai-preference.service.js +336 -0
- package/dist/services/ai-preference.service.js.map +1 -0
- package/dist/services/annotation-tag.service.ee.js.map +1 -1
- package/dist/services/credentials-tester.service.js +2 -24
- package/dist/services/credentials-tester.service.js.map +1 -1
- package/dist/services/dynamic-node-parameters.service.js +3 -1
- package/dist/services/dynamic-node-parameters.service.js.map +1 -1
- package/dist/services/email-change.service.d.ts +21 -0
- package/dist/services/email-change.service.js +84 -0
- package/dist/services/email-change.service.js.map +1 -0
- package/dist/services/engine-v2-dispatcher.service.js +1 -1
- package/dist/services/engine-v2-dispatcher.service.js.map +1 -1
- package/dist/services/engine-v2-payload-guard.service.d.ts +13 -0
- package/dist/services/engine-v2-payload-guard.service.js +49 -0
- package/dist/services/engine-v2-payload-guard.service.js.map +1 -0
- package/dist/services/ownership-transfer/ownership-transfer.manifest.json +8 -3
- package/dist/services/project.service.ee.js +2 -0
- package/dist/services/project.service.ee.js.map +1 -1
- package/dist/services/pruning/execution-pruning-soft-delete.task.d.ts +14 -0
- package/dist/services/pruning/execution-pruning-soft-delete.task.js +38 -0
- package/dist/services/pruning/execution-pruning-soft-delete.task.js.map +1 -0
- package/dist/services/pruning/executions-pruning.service.d.ts +0 -2
- package/dist/services/pruning/executions-pruning.service.js +5 -11
- package/dist/services/pruning/executions-pruning.service.js.map +1 -1
- package/dist/services/pruning/workflow-history-compaction-optimize.task.d.ts +14 -0
- package/dist/services/pruning/workflow-history-compaction-optimize.task.js +38 -0
- package/dist/services/pruning/workflow-history-compaction-optimize.task.js.map +1 -0
- package/dist/services/pruning/workflow-history-compaction-trim.task.d.ts +12 -0
- package/dist/services/pruning/workflow-history-compaction-trim.task.js +40 -0
- package/dist/services/pruning/workflow-history-compaction-trim.task.js.map +1 -0
- package/dist/services/pruning/workflow-history-compaction.service.d.ts +7 -10
- package/dist/services/pruning/workflow-history-compaction.service.js +41 -59
- package/dist/services/pruning/workflow-history-compaction.service.js.map +1 -1
- package/dist/services/workflow-statistics.service.d.ts +6 -0
- package/dist/services/workflow-statistics.service.js +40 -30
- package/dist/services/workflow-statistics.service.js.map +1 -1
- package/dist/task-runners/task-broker/task-broker-ws-server.js.map +1 -1
- package/dist/task-runners/task-broker/task-broker.service.js.map +1 -1
- package/dist/task-runners/task-managers/local-task-requester.js.map +1 -1
- package/dist/task-runners/task-runner-module.js.map +1 -1
- package/dist/user-management/email/interfaces.d.ts +11 -0
- package/dist/user-management/email/templates/email-change-completed.handlebars +183 -0
- package/dist/user-management/email/templates/email-change-requested.handlebars +206 -0
- package/dist/user-management/email/user-management-mailer.d.ts +4 -2
- package/dist/user-management/email/user-management-mailer.js +20 -0
- package/dist/user-management/email/user-management-mailer.js.map +1 -1
- package/dist/utils/is-billable-execution.d.ts +5 -0
- package/dist/utils/is-billable-execution.js +32 -0
- package/dist/utils/is-billable-execution.js.map +1 -0
- package/dist/utils/object-to-error.js.map +1 -1
- package/dist/webhooks/engine-v2-webhooks.d.ts +4 -7
- package/dist/webhooks/engine-v2-webhooks.js +6 -24
- package/dist/webhooks/engine-v2-webhooks.js.map +1 -1
- package/dist/webhooks/webhook-helpers.js +9 -2
- package/dist/webhooks/webhook-helpers.js.map +1 -1
- package/dist/workflow-execute-additional-data.js +9 -2
- package/dist/workflow-execute-additional-data.js.map +1 -1
- package/dist/workflow-runner.d.ts +7 -3
- package/dist/workflow-runner.js +54 -29
- package/dist/workflow-runner.js.map +1 -1
- package/dist/workflows/publication/published-workflow-trigger-deactivator.d.ts +1 -0
- package/dist/workflows/publication/published-workflow-trigger-deactivator.js +12 -4
- package/dist/workflows/publication/published-workflow-trigger-deactivator.js.map +1 -1
- package/dist/workflows/publication/trigger-diff.d.ts +4 -1
- package/dist/workflows/publication/trigger-diff.js +12 -2
- package/dist/workflows/publication/trigger-diff.js.map +1 -1
- package/dist/workflows/publication/workflow-publication-applier.js +3 -1
- package/dist/workflows/publication/workflow-publication-applier.js.map +1 -1
- package/dist/workflows/publication/workflow-publication-lifecycle-lock.d.ts +7 -1
- package/dist/workflows/publication/workflow-publication-lifecycle-lock.js +18 -4
- package/dist/workflows/publication/workflow-publication-lifecycle-lock.js.map +1 -1
- package/dist/workflows/publication/workflow-publication-outbox-cleanup.service.d.ts +3 -10
- package/dist/workflows/publication/workflow-publication-outbox-cleanup.service.js +4 -49
- package/dist/workflows/publication/workflow-publication-outbox-cleanup.service.js.map +1 -1
- package/dist/workflows/publication/workflow-publication-outbox-cleanup.task.d.ts +15 -0
- package/dist/workflows/publication/workflow-publication-outbox-cleanup.task.js +38 -0
- package/dist/workflows/publication/workflow-publication-outbox-cleanup.task.js.map +1 -0
- package/dist/workflows/publication/workflow-publication-outbox-consumer.d.ts +2 -0
- package/dist/workflows/publication/workflow-publication-outbox-consumer.js +62 -27
- package/dist/workflows/publication/workflow-publication-outbox-consumer.js.map +1 -1
- package/dist/workflows/publication/workflow-publication-reconciler.service.d.ts +1 -0
- package/dist/workflows/publication/workflow-publication-reconciler.service.js +21 -8
- package/dist/workflows/publication/workflow-publication-reconciler.service.js.map +1 -1
- package/dist/workflows/triggers/engine-v2-active-triggers.d.ts +16 -0
- package/dist/workflows/triggers/engine-v2-active-triggers.js +39 -0
- package/dist/workflows/triggers/engine-v2-active-triggers.js.map +1 -0
- package/dist/workflows/triggers/trigger-execution-context.factory.d.ts +4 -1
- package/dist/workflows/triggers/trigger-execution-context.factory.js +41 -6
- package/dist/workflows/triggers/trigger-execution-context.factory.js.map +1 -1
- package/dist/workflows/workflow-execution.service.d.ts +8 -3
- package/dist/workflows/workflow-execution.service.js +44 -5
- package/dist/workflows/workflow-execution.service.js.map +1 -1
- package/dist/workflows/workflow-finder.service.d.ts +1 -0
- package/dist/workflows/workflow-finder.service.js +6 -2
- package/dist/workflows/workflow-finder.service.js.map +1 -1
- package/dist/workflows/workflow-history/workflow-history.service.js.map +1 -1
- package/package.json +49 -57
- package/dist/modules/agents/entities/agent-memory-entry-cursor.entity.d.ts +0 -7
- package/dist/modules/agents/entities/agent-memory-entry-cursor.entity.js +0 -38
- package/dist/modules/agents/entities/agent-memory-entry-cursor.entity.js.map +0 -1
- package/dist/modules/agents/repositories/agent-memory-entry-cursor.repository.d.ts +0 -5
- package/dist/modules/agents/repositories/agent-memory-entry-cursor.repository.js +0 -26
- package/dist/modules/agents/repositories/agent-memory-entry-cursor.repository.js.map +0 -1
- package/dist/modules/breaking-changes/rules/v3/task-runner-internal-mode.rule.js +0 -51
- package/dist/modules/breaking-changes/rules/v3/task-runner-internal-mode.rule.js.map +0 -1
- package/dist/modules/git-connections.ee/constants.js.map +0 -1
- package/dist/modules/git-connections.ee/database/entities/git-connection-project.entity.d.ts +0 -8
- package/dist/modules/git-connections.ee/database/entities/git-connection-project.entity.js.map +0 -1
- package/dist/modules/git-connections.ee/database/entities/git-connection.entity.d.ts +0 -14
- package/dist/modules/git-connections.ee/database/entities/git-connection.entity.js +0 -61
- package/dist/modules/git-connections.ee/database/entities/git-connection.entity.js.map +0 -1
- package/dist/modules/git-connections.ee/database/repositories/git-connection-project.repository.d.ts +0 -11
- package/dist/modules/git-connections.ee/database/repositories/git-connection-project.repository.js +0 -58
- package/dist/modules/git-connections.ee/database/repositories/git-connection-project.repository.js.map +0 -1
- package/dist/modules/git-connections.ee/database/repositories/git-connection.repository.d.ts +0 -12
- package/dist/modules/git-connections.ee/database/repositories/git-connection.repository.js +0 -37
- package/dist/modules/git-connections.ee/database/repositories/git-connection.repository.js.map +0 -1
- package/dist/modules/git-connections.ee/git-connections-git.service.d.ts +0 -60
- package/dist/modules/git-connections.ee/git-connections-git.service.js +0 -281
- package/dist/modules/git-connections.ee/git-connections-git.service.js.map +0 -1
- package/dist/modules/git-connections.ee/git-connections-git.utils.d.ts +0 -13
- package/dist/modules/git-connections.ee/git-connections-git.utils.js.map +0 -1
- package/dist/modules/git-connections.ee/git-connections.module.d.ts +0 -5
- package/dist/modules/git-connections.ee/git-connections.module.js +0 -32
- package/dist/modules/git-connections.ee/git-connections.module.js.map +0 -1
- package/dist/modules/git-connections.ee/git-connections.service.d.ts +0 -70
- package/dist/modules/git-connections.ee/git-connections.service.js +0 -476
- package/dist/modules/git-connections.ee/git-connections.service.js.map +0 -1
- package/dist/modules/insights/whole-seconds.d.ts +0 -1
- package/dist/modules/insights/whole-seconds.js +0 -7
- package/dist/modules/insights/whole-seconds.js.map +0 -1
- package/dist/modules/instance-reporting/database/entities/instance-monitoring-report.js.map +0 -1
- package/dist/modules/instance-reporting/database/repositories/instance-monitoring-report.repository.js.map +0 -1
- package/dist/modules/instance-reporting/instance-reporting-scheduler.service.js.map +0 -1
- package/dist/modules/instance-reporting/instance-reporting-settings.service.js.map +0 -1
- package/dist/modules/instance-reporting/instance-reporting.config.js.map +0 -1
- package/dist/modules/instance-reporting/instance-reporting.constants.js.map +0 -1
- package/dist/modules/instance-reporting/instance-reporting.module.js +0 -26
- package/dist/modules/instance-reporting/instance-reporting.module.js.map +0 -1
- package/dist/modules/instance-reporting/instance-reporting.service.js.map +0 -1
- package/dist/modules/type-availability-policies/dto/create-policy-document.dto.d.ts +0 -80
- package/dist/modules/type-availability-policies/dto/create-policy-document.dto.js +0 -11
- package/dist/modules/type-availability-policies/dto/create-policy-document.dto.js.map +0 -1
- package/dist/modules/type-availability-policies/dto/policy-rule.schema.d.ts +0 -108
- package/dist/modules/type-availability-policies/dto/policy-rule.schema.js +0 -30
- package/dist/modules/type-availability-policies/dto/policy-rule.schema.js.map +0 -1
- package/dist/modules/type-availability-policies/dto/policy-selector.schema.d.ts +0 -20
- package/dist/modules/type-availability-policies/dto/policy-selector.schema.js +0 -9
- package/dist/modules/type-availability-policies/dto/policy-selector.schema.js.map +0 -1
- package/dist/modules/type-availability-policies/dto/put-instance-policy.dto.d.ts +0 -85
- package/dist/modules/type-availability-policies/dto/put-instance-policy.dto.js +0 -14
- package/dist/modules/type-availability-policies/dto/put-instance-policy.dto.js.map +0 -1
- package/dist/modules/type-availability-policies/dto/replace-attachments.dto.d.ts +0 -97
- package/dist/modules/type-availability-policies/dto/replace-attachments.dto.js +0 -36
- package/dist/modules/type-availability-policies/dto/replace-attachments.dto.js.map +0 -1
- package/dist/modules/type-availability-policies/dto/update-policy-document.dto.d.ts +0 -83
- package/dist/modules/type-availability-policies/dto/update-policy-document.dto.js +0 -13
- package/dist/modules/type-availability-policies/dto/update-policy-document.dto.js.map +0 -1
- package/dist/public-api/v1/controllers/git-connections.public.controller.d.ts +0 -21
- package/dist/public-api/v1/controllers/git-connections.public.controller.js +0 -302
- package/dist/public-api/v1/controllers/git-connections.public.controller.js.map +0 -1
- package/dist/public-api/v1/handlers/credentials/credentials.mapper.d.ts +0 -6
- package/dist/public-api/v1/handlers/credentials/credentials.mapper.js +0 -19
- package/dist/public-api/v1/handlers/credentials/credentials.mapper.js.map +0 -1
- package/dist/public-api/v1/handlers/credentials/credentials.middleware.d.ts +0 -6
- package/dist/public-api/v1/handlers/credentials/credentials.middleware.js +0 -91
- package/dist/public-api/v1/handlers/credentials/credentials.middleware.js.map +0 -1
- package/dist/public-api/v1/handlers/projects/projects.handler.d.ts +0 -31
- package/dist/public-api/v1/handlers/projects/projects.handler.js +0 -165
- package/dist/public-api/v1/handlers/projects/projects.handler.js.map +0 -1
- package/dist/public-api/v1/handlers/source-control/source-control.handler.d.ts +0 -7
- package/dist/public-api/v1/handlers/source-control/source-control.handler.js +0 -46
- package/dist/public-api/v1/handlers/source-control/source-control.handler.js.map +0 -1
- package/dist/public-api/v1/handlers/variables/variables.handler.d.ts +0 -15
- package/dist/public-api/v1/handlers/variables/variables.handler.js +0 -56
- package/dist/public-api/v1/handlers/variables/variables.handler.js.map +0 -1
- /package/dist/modules/{instance-reporting → instance-reporting.ee}/database/entities/instance-monitoring-report.d.ts +0 -0
- /package/dist/modules/{instance-reporting → instance-reporting.ee}/database/entities/instance-monitoring-report.js +0 -0
- /package/dist/modules/{instance-reporting → instance-reporting.ee}/instance-reporting-settings.service.d.ts +0 -0
- /package/dist/modules/{instance-reporting → instance-reporting.ee}/instance-reporting-settings.service.js +0 -0
- /package/dist/modules/{instance-reporting → instance-reporting.ee}/instance-reporting.config.d.ts +0 -0
- /package/dist/modules/{instance-reporting → instance-reporting.ee}/instance-reporting.config.js +0 -0
- /package/dist/modules/{instance-reporting → instance-reporting.ee}/instance-reporting.constants.d.ts +0 -0
- /package/dist/modules/{instance-reporting → instance-reporting.ee}/instance-reporting.constants.js +0 -0
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.readLeftoverManifest = readLeftoverManifest;
|
|
40
|
+
exports.writeImportManifest = writeImportManifest;
|
|
41
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
42
|
+
const fs = __importStar(require("node:fs/promises"));
|
|
43
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
44
|
+
const constants_1 = require("../../constants");
|
|
45
|
+
const constants_2 = require("../../modules/n8n-packages/spec/constants");
|
|
46
|
+
const manifest_schema_1 = require("../../modules/n8n-packages/spec/manifest.schema");
|
|
47
|
+
const SNAPSHOT_FILES = {
|
|
48
|
+
'project.json': 'projects',
|
|
49
|
+
'folder.json': 'folders',
|
|
50
|
+
'workflow.json': 'workflows',
|
|
51
|
+
'credential.json': 'credentials',
|
|
52
|
+
'data-table.json': 'dataTables',
|
|
53
|
+
'tag.json': 'tags',
|
|
54
|
+
};
|
|
55
|
+
async function readLeftoverManifest(exportFolder) {
|
|
56
|
+
let raw;
|
|
57
|
+
try {
|
|
58
|
+
raw = await fs.readFile(node_path_1.default.join(exportFolder, constants_2.MANIFEST_FILE), 'utf-8');
|
|
59
|
+
}
|
|
60
|
+
catch {
|
|
61
|
+
return undefined;
|
|
62
|
+
}
|
|
63
|
+
try {
|
|
64
|
+
const parsed = manifest_schema_1.packageManifestSchema.safeParse((0, n8n_workflow_1.jsonParse)(raw));
|
|
65
|
+
return parsed.success ? parsed.data : undefined;
|
|
66
|
+
}
|
|
67
|
+
catch {
|
|
68
|
+
return undefined;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
function dropSelectedRequirementUsers(leftover, selectedWorkflowIds) {
|
|
72
|
+
if (leftover?.requirements === undefined || selectedWorkflowIds.length === 0) {
|
|
73
|
+
return leftover;
|
|
74
|
+
}
|
|
75
|
+
const selected = new Set(selectedWorkflowIds);
|
|
76
|
+
const requirements = compactRequirements({
|
|
77
|
+
credentials: dropSelectedUsers(leftover.requirements.credentials, selected),
|
|
78
|
+
dataTables: dropSelectedUsers(leftover.requirements.dataTables, selected),
|
|
79
|
+
workflows: dropSelectedUsers(leftover.requirements.workflows, selected),
|
|
80
|
+
variables: dropSelectedUsers(leftover.requirements.variables, selected),
|
|
81
|
+
tags: dropSelectedUsers(leftover.requirements.tags, selected),
|
|
82
|
+
nodeTypes: dropSelectedUsers(leftover.requirements.nodeTypes, selected),
|
|
83
|
+
});
|
|
84
|
+
return { ...leftover, ...(requirements ? { requirements } : { requirements: undefined }) };
|
|
85
|
+
}
|
|
86
|
+
function dropSelectedUsers(rows, selectedWorkflowIds) {
|
|
87
|
+
if (rows === undefined)
|
|
88
|
+
return undefined;
|
|
89
|
+
const kept = rows
|
|
90
|
+
.map((row) => ({
|
|
91
|
+
...row,
|
|
92
|
+
usedByWorkflows: row.usedByWorkflows.filter((id) => !selectedWorkflowIds.has(id)),
|
|
93
|
+
}))
|
|
94
|
+
.filter((row) => row.usedByWorkflows.length > 0);
|
|
95
|
+
return kept.length > 0 ? kept : undefined;
|
|
96
|
+
}
|
|
97
|
+
async function writeImportManifest(options) {
|
|
98
|
+
const { exportFolder, staging, sourceId, selectedWorkflowIds = [] } = options;
|
|
99
|
+
const selected = [...selectedWorkflowIds, ...(staging.workflows ?? []).map((entry) => entry.id)];
|
|
100
|
+
const leftover = dropSelectedRequirementUsers(await readLeftoverManifest(exportFolder), selected);
|
|
101
|
+
const collections = await walkSnapshotCollections(exportFolder);
|
|
102
|
+
const remainingWorkflowIds = new Set((collections.workflows ?? []).map((entry) => entry.id));
|
|
103
|
+
const selectedSet = new Set(selected);
|
|
104
|
+
const variables = await collectVariables(exportFolder, leftover, staging);
|
|
105
|
+
const manifest = manifest_schema_1.packageManifestSchema.parse({
|
|
106
|
+
packageFormatVersion: '1',
|
|
107
|
+
exportedAt: new Date().toISOString(),
|
|
108
|
+
sourceN8nVersion: constants_1.N8N_VERSION,
|
|
109
|
+
sourceId,
|
|
110
|
+
...collections,
|
|
111
|
+
...(variables.length > 0 ? { variables } : {}),
|
|
112
|
+
...requirementsBlock(leftover, staging, remainingWorkflowIds, selectedSet),
|
|
113
|
+
});
|
|
114
|
+
await fs.writeFile(node_path_1.default.join(exportFolder, constants_2.MANIFEST_FILE), JSON.stringify(manifest, null, '\t'));
|
|
115
|
+
}
|
|
116
|
+
async function walkSnapshotCollections(exportFolder) {
|
|
117
|
+
const state = {
|
|
118
|
+
projects: [],
|
|
119
|
+
folders: [],
|
|
120
|
+
workflows: [],
|
|
121
|
+
credentials: [],
|
|
122
|
+
dataTables: [],
|
|
123
|
+
tags: [],
|
|
124
|
+
};
|
|
125
|
+
const walk = async (absDir) => {
|
|
126
|
+
const entries = await fs.readdir(absDir, { withFileTypes: true });
|
|
127
|
+
for (const entry of entries) {
|
|
128
|
+
const fullPath = node_path_1.default.join(absDir, entry.name);
|
|
129
|
+
if (entry.isDirectory()) {
|
|
130
|
+
await walk(fullPath);
|
|
131
|
+
continue;
|
|
132
|
+
}
|
|
133
|
+
if (!entry.isFile())
|
|
134
|
+
continue;
|
|
135
|
+
const kind = SNAPSHOT_FILES[entry.name];
|
|
136
|
+
if (kind === undefined)
|
|
137
|
+
continue;
|
|
138
|
+
const relativeFile = node_path_1.default.relative(exportFolder, fullPath).split(node_path_1.default.sep).join('/');
|
|
139
|
+
const target = node_path_1.default.posix.dirname(relativeFile);
|
|
140
|
+
const item = await readIdNameFile(fullPath, target);
|
|
141
|
+
if (item)
|
|
142
|
+
state[kind].push(item);
|
|
143
|
+
}
|
|
144
|
+
};
|
|
145
|
+
await walk(exportFolder);
|
|
146
|
+
return {
|
|
147
|
+
...(state.projects.length > 0 ? { projects: state.projects } : {}),
|
|
148
|
+
...(state.folders.length > 0 ? { folders: state.folders } : {}),
|
|
149
|
+
...(state.workflows.length > 0 ? { workflows: state.workflows } : {}),
|
|
150
|
+
...(state.credentials.length > 0 ? { credentials: state.credentials } : {}),
|
|
151
|
+
...(state.dataTables.length > 0 ? { dataTables: state.dataTables } : {}),
|
|
152
|
+
...(state.tags.length > 0 ? { tags: state.tags } : {}),
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
async function readIdNameFile(file, target) {
|
|
156
|
+
let parsed;
|
|
157
|
+
try {
|
|
158
|
+
parsed = (0, n8n_workflow_1.jsonParse)(await fs.readFile(file, 'utf-8'));
|
|
159
|
+
}
|
|
160
|
+
catch {
|
|
161
|
+
return undefined;
|
|
162
|
+
}
|
|
163
|
+
if (typeof parsed !== 'object' ||
|
|
164
|
+
parsed === null ||
|
|
165
|
+
typeof parsed.id !== 'string' ||
|
|
166
|
+
typeof parsed.name !== 'string') {
|
|
167
|
+
return undefined;
|
|
168
|
+
}
|
|
169
|
+
return { id: parsed.id, name: parsed.name, target };
|
|
170
|
+
}
|
|
171
|
+
async function collectVariables(exportFolder, leftover, staging) {
|
|
172
|
+
const byId = new Map();
|
|
173
|
+
for (const entry of leftover?.variables ?? []) {
|
|
174
|
+
byId.set(entry.id, entry);
|
|
175
|
+
}
|
|
176
|
+
for (const entry of staging.variables ?? []) {
|
|
177
|
+
byId.set(entry.id, entry);
|
|
178
|
+
}
|
|
179
|
+
const kept = [];
|
|
180
|
+
for (const entry of byId.values()) {
|
|
181
|
+
const file = resolveContainedFile(exportFolder, entry.target, 'variable.json');
|
|
182
|
+
if (file === undefined)
|
|
183
|
+
continue;
|
|
184
|
+
try {
|
|
185
|
+
const info = await fs.lstat(file);
|
|
186
|
+
if (!info.isFile())
|
|
187
|
+
continue;
|
|
188
|
+
kept.push(entry);
|
|
189
|
+
}
|
|
190
|
+
catch {
|
|
191
|
+
continue;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
return kept;
|
|
195
|
+
}
|
|
196
|
+
function resolveContainedFile(exportFolder, target, fileName) {
|
|
197
|
+
const segments = target.split(/[\\/]/).filter(Boolean);
|
|
198
|
+
if (segments.length === 0 || segments.some((segment) => segment === '.' || segment === '..')) {
|
|
199
|
+
return undefined;
|
|
200
|
+
}
|
|
201
|
+
const resolvedBase = node_path_1.default.resolve(exportFolder);
|
|
202
|
+
const resolvedDir = node_path_1.default.resolve(exportFolder, ...segments);
|
|
203
|
+
if (resolvedDir !== resolvedBase && !resolvedDir.startsWith(resolvedBase + node_path_1.default.sep)) {
|
|
204
|
+
return undefined;
|
|
205
|
+
}
|
|
206
|
+
return node_path_1.default.join(resolvedDir, fileName);
|
|
207
|
+
}
|
|
208
|
+
function requirementsBlock(leftover, staging, remainingWorkflowIds, selectedWorkflowIds) {
|
|
209
|
+
const requirements = compactRequirements({
|
|
210
|
+
credentials: mergeRequirementRows(leftover?.requirements?.credentials, staging.requirements?.credentials, remainingWorkflowIds, selectedWorkflowIds, (row) => row.id),
|
|
211
|
+
dataTables: mergeRequirementRows(leftover?.requirements?.dataTables, staging.requirements?.dataTables, remainingWorkflowIds, selectedWorkflowIds, (row) => row.id),
|
|
212
|
+
workflows: mergeRequirementRows(leftover?.requirements?.workflows, staging.requirements?.workflows, remainingWorkflowIds, selectedWorkflowIds, (row) => row.id),
|
|
213
|
+
variables: mergeRequirementRows(leftover?.requirements?.variables, staging.requirements?.variables, remainingWorkflowIds, selectedWorkflowIds, (row) => row.name),
|
|
214
|
+
tags: mergeRequirementRows(leftover?.requirements?.tags, staging.requirements?.tags, remainingWorkflowIds, selectedWorkflowIds, (row) => row.id),
|
|
215
|
+
nodeTypes: mergeRequirementRows(leftover?.requirements?.nodeTypes, staging.requirements?.nodeTypes, remainingWorkflowIds, selectedWorkflowIds, (row) => `${row.type}@${row.typeVersion}`),
|
|
216
|
+
});
|
|
217
|
+
return requirements ? { requirements } : {};
|
|
218
|
+
}
|
|
219
|
+
function mergeRequirementRows(leftover, staging, remainingWorkflowIds, selectedWorkflowIds, keyOf) {
|
|
220
|
+
const byKey = new Map();
|
|
221
|
+
for (const row of leftover ?? []) {
|
|
222
|
+
const usedByWorkflows = remainingUsers(row.usedByWorkflows.filter((id) => !selectedWorkflowIds.has(id)), remainingWorkflowIds);
|
|
223
|
+
if (usedByWorkflows.length === 0)
|
|
224
|
+
continue;
|
|
225
|
+
byKey.set(keyOf(row), { ...row, usedByWorkflows });
|
|
226
|
+
}
|
|
227
|
+
for (const row of staging ?? []) {
|
|
228
|
+
const key = keyOf(row);
|
|
229
|
+
const usedByWorkflows = remainingUsers([...(byKey.get(key)?.usedByWorkflows ?? []), ...row.usedByWorkflows], remainingWorkflowIds);
|
|
230
|
+
if (usedByWorkflows.length === 0) {
|
|
231
|
+
byKey.delete(key);
|
|
232
|
+
continue;
|
|
233
|
+
}
|
|
234
|
+
byKey.set(key, { ...row, usedByWorkflows });
|
|
235
|
+
}
|
|
236
|
+
const rows = [...byKey.values()];
|
|
237
|
+
return rows.length > 0 ? rows : undefined;
|
|
238
|
+
}
|
|
239
|
+
function remainingUsers(ids, remainingWorkflowIds) {
|
|
240
|
+
return [...new Set(ids.filter((id) => remainingWorkflowIds.has(id)))].sort();
|
|
241
|
+
}
|
|
242
|
+
function compactRequirements(input) {
|
|
243
|
+
const { credentials, dataTables, workflows, variables, tags, nodeTypes } = input;
|
|
244
|
+
const requirements = {
|
|
245
|
+
...(credentials?.length ? { credentials } : {}),
|
|
246
|
+
...(dataTables?.length ? { dataTables } : {}),
|
|
247
|
+
...(workflows?.length ? { workflows } : {}),
|
|
248
|
+
...(variables?.length ? { variables } : {}),
|
|
249
|
+
...(tags?.length ? { tags } : {}),
|
|
250
|
+
...(nodeTypes?.length ? { nodeTypes } : {}),
|
|
251
|
+
};
|
|
252
|
+
return Object.keys(requirements).length > 0 ? requirements : undefined;
|
|
253
|
+
}
|
|
254
|
+
//# sourceMappingURL=import-manifest-bridge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"import-manifest-bridge.js","sourceRoot":"","sources":["../../../src/modules/promotions.ee/import-manifest-bridge.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAyC;AACzC,MAAY,EAAE,6CAAyB;AACvC,0DAA6B;AAE7B,2CAA0C;AAC1C,qEAAsE;AAEtE,iFAAoF;AAWpF,MAAM,cAAc,GAAG;IACtB,cAAc,EAAE,UAAU;IAC1B,aAAa,EAAE,SAAS;IACxB,eAAe,EAAE,WAAW;IAC5B,iBAAiB,EAAE,aAAa;IAChC,iBAAiB,EAAE,YAAY;IAC/B,UAAU,EAAE,MAAM;CACT,CAAC;AAIJ,KAAK,+BAC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CAAC;QAC/C,GAAG,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC7C,GAAG,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC3C,GAAG,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC3C,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACjC,GAAG,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAC3C,CAAC;IACF,OAAO,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,CAAC;AACxE,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { PromotableResource } from '@n8n/api-types';
|
|
2
|
+
import { Logger } from '@n8n/backend-common';
|
|
3
|
+
import { WorkflowRepository, type User } from '@n8n/db';
|
|
4
|
+
import { N8nPackagesService } from '../../modules/n8n-packages/n8n-packages.service';
|
|
5
|
+
import { PromotionsService } from './promotions.service';
|
|
6
|
+
export declare class PromotionChangeService {
|
|
7
|
+
private readonly promotionsService;
|
|
8
|
+
private readonly packagesService;
|
|
9
|
+
private readonly workflowRepository;
|
|
10
|
+
private readonly logger;
|
|
11
|
+
constructor(promotionsService: PromotionsService, packagesService: N8nPackagesService, workflowRepository: WorkflowRepository, logger: Logger);
|
|
12
|
+
getChanges(user: User, projectId: string): Promise<PromotableResource[]>;
|
|
13
|
+
private exportDesiredSnapshot;
|
|
14
|
+
}
|
|
@@ -0,0 +1,211 @@
|
|
|
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.PromotionChangeService = void 0;
|
|
13
|
+
const backend_common_1 = require("@n8n/backend-common");
|
|
14
|
+
const db_1 = require("@n8n/db");
|
|
15
|
+
const di_1 = require("@n8n/di");
|
|
16
|
+
const permissions_1 = require("@n8n/permissions");
|
|
17
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
18
|
+
const node_crypto_1 = require("node:crypto");
|
|
19
|
+
const forbidden_error_1 = require("../../errors/response-errors/forbidden.error");
|
|
20
|
+
const hashing_package_writer_1 = require("../../modules/n8n-packages/io/hashing-package-writer");
|
|
21
|
+
const manifest_entry_1 = require("../../modules/n8n-packages/io/manifest-entry");
|
|
22
|
+
const slug_utils_1 = require("../../modules/n8n-packages/io/slug.utils");
|
|
23
|
+
const n8n_packages_service_1 = require("../../modules/n8n-packages/n8n-packages.service");
|
|
24
|
+
const n8n_packages_types_1 = require("../../modules/n8n-packages/n8n-packages.types");
|
|
25
|
+
const check_access_1 = require("../../permissions.ee/check-access");
|
|
26
|
+
const base_branch_files_1 = require("./base-branch-files");
|
|
27
|
+
const constants_1 = require("./constants");
|
|
28
|
+
const diff_package_files_1 = require("./diff-package-files");
|
|
29
|
+
const promotions_service_1 = require("./promotions.service");
|
|
30
|
+
const DEPENDENCY_COLLECTIONS = {
|
|
31
|
+
credentials: 'credentials',
|
|
32
|
+
dataTables: 'dataTables',
|
|
33
|
+
variables: 'variables',
|
|
34
|
+
tags: 'tags',
|
|
35
|
+
workflows: 'workflows',
|
|
36
|
+
nodeTypes: null,
|
|
37
|
+
};
|
|
38
|
+
let PromotionChangeService = class PromotionChangeService {
|
|
39
|
+
constructor(promotionsService, packagesService, workflowRepository, logger) {
|
|
40
|
+
this.promotionsService = promotionsService;
|
|
41
|
+
this.packagesService = packagesService;
|
|
42
|
+
this.workflowRepository = workflowRepository;
|
|
43
|
+
this.logger = logger;
|
|
44
|
+
this.logger = this.logger.scoped('promotions');
|
|
45
|
+
}
|
|
46
|
+
async getChanges(user, projectId) {
|
|
47
|
+
if (!(0, permissions_1.hasGlobalScope)(user, 'gitConnection:push') ||
|
|
48
|
+
!(await (0, check_access_1.userHasScopes)(user, ['project:export'], false, { projectId }))) {
|
|
49
|
+
throw new forbidden_error_1.ForbiddenError('Change preview requires project export and promotion push permissions. Ask an administrator for access.');
|
|
50
|
+
}
|
|
51
|
+
const base = await this.promotionsService.listBaseBranchFiles(projectId);
|
|
52
|
+
const previewId = (0, node_crypto_1.randomUUID)();
|
|
53
|
+
const { files: desired, manifest, archiveState, } = await this.exportDesiredSnapshot(user, projectId);
|
|
54
|
+
const changes = (0, diff_package_files_1.diffPackageFiles)(base, desired);
|
|
55
|
+
const changedIds = new Set();
|
|
56
|
+
const renamedIds = new Set();
|
|
57
|
+
const modifiedIds = new Set();
|
|
58
|
+
const changedPaths = new Set();
|
|
59
|
+
for (const fileChange of changes) {
|
|
60
|
+
if (fileChange.change !== 'added')
|
|
61
|
+
changedPaths.add(fileChange.base.path);
|
|
62
|
+
if (fileChange.change !== 'deleted')
|
|
63
|
+
changedPaths.add(fileChange.desired.path);
|
|
64
|
+
const file = fileChange.change === 'deleted' ? fileChange.base : fileChange.desired;
|
|
65
|
+
if (file.type === 'workflow') {
|
|
66
|
+
changedIds.add(file.entityId);
|
|
67
|
+
if (fileChange.change === 'renamed' || fileChange.change === 'renamed-and-modified') {
|
|
68
|
+
renamedIds.add(file.entityId);
|
|
69
|
+
}
|
|
70
|
+
if (fileChange.change !== 'renamed')
|
|
71
|
+
modifiedIds.add(file.entityId);
|
|
72
|
+
}
|
|
73
|
+
this.logger.debug('Promotion file change', { previewId, projectId, ...fileChange });
|
|
74
|
+
}
|
|
75
|
+
const { affectedWorkflowIds, dependencyCounts } = calculateDependencyImpact({
|
|
76
|
+
base,
|
|
77
|
+
manifest,
|
|
78
|
+
changedPaths,
|
|
79
|
+
projectId,
|
|
80
|
+
});
|
|
81
|
+
for (const workflowId of affectedWorkflowIds) {
|
|
82
|
+
changedIds.add(workflowId);
|
|
83
|
+
modifiedIds.add(workflowId);
|
|
84
|
+
}
|
|
85
|
+
const desiredWorkflows = new Map(manifest.workflows?.map((entry) => [entry.id, entry]));
|
|
86
|
+
this.logger.debug('Promotion change preview', {
|
|
87
|
+
previewId,
|
|
88
|
+
projectId,
|
|
89
|
+
baseFileCount: base.length,
|
|
90
|
+
desiredFileCount: desired.length,
|
|
91
|
+
fileChangeCount: changes.length,
|
|
92
|
+
workflowIds: [...changedIds],
|
|
93
|
+
});
|
|
94
|
+
const metadata = await this.workflowRepository.findByIds([...changedIds].filter((id) => desiredWorkflows.has(id)), { fields: ['updatedAt', 'versionCounter'] });
|
|
95
|
+
return buildPromotableResources({
|
|
96
|
+
base,
|
|
97
|
+
desiredWorkflows,
|
|
98
|
+
archiveState,
|
|
99
|
+
changedIds,
|
|
100
|
+
renamedIds,
|
|
101
|
+
modifiedIds,
|
|
102
|
+
metadata,
|
|
103
|
+
dependencyCounts,
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
async exportDesiredSnapshot(user, projectId) {
|
|
107
|
+
const writer = new hashing_package_writer_1.HashingPackageWriter();
|
|
108
|
+
const archiveState = new Map();
|
|
109
|
+
const { manifest } = await this.packagesService.exportPackageToWriter({
|
|
110
|
+
user,
|
|
111
|
+
projectIds: [projectId],
|
|
112
|
+
includeArchivedWorkflows: true,
|
|
113
|
+
includeTags: true,
|
|
114
|
+
includeVariableValues: true,
|
|
115
|
+
workflowVersionPolicy: n8n_packages_types_1.WorkflowVersionPolicy.Latest,
|
|
116
|
+
missingWorkflowDependencyPolicy: n8n_packages_types_1.MissingWorkflowDependencyPolicy.ReferenceOnly,
|
|
117
|
+
}, {
|
|
118
|
+
writeDirectory: (path) => writer.writeDirectory(path),
|
|
119
|
+
writeFile(path, content) {
|
|
120
|
+
writer.writeFile(path, content);
|
|
121
|
+
if (path.endsWith(`/${manifest_entry_1.PACKAGE_ENTITY_LAYOUT.workflows.fileName}`)) {
|
|
122
|
+
const workflow = (0, n8n_workflow_1.jsonParse)(String(content));
|
|
123
|
+
archiveState.set(path, workflow.isArchived);
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
});
|
|
127
|
+
const files = (0, base_branch_files_1.parsePackageFiles)(writer.finalize().map((file) => ({
|
|
128
|
+
...file,
|
|
129
|
+
path: `${constants_1.PACKAGE_SUBFOLDER}/${file.path}`,
|
|
130
|
+
})), { exportRoot: constants_1.PACKAGE_SUBFOLDER, projectId });
|
|
131
|
+
return { files, manifest, archiveState };
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
exports.PromotionChangeService = PromotionChangeService;
|
|
135
|
+
exports.PromotionChangeService = PromotionChangeService = __decorate([
|
|
136
|
+
(0, di_1.Service)(),
|
|
137
|
+
__metadata("design:paramtypes", [promotions_service_1.PromotionsService, n8n_packages_service_1.N8nPackagesService, db_1.WorkflowRepository, backend_common_1.Logger])
|
|
138
|
+
], PromotionChangeService);
|
|
139
|
+
function calculateDependencyImpact({ base, manifest, changedPaths, projectId, }) {
|
|
140
|
+
const baseDependencies = new Map();
|
|
141
|
+
for (const file of base) {
|
|
142
|
+
const key = JSON.stringify([
|
|
143
|
+
file.fileName,
|
|
144
|
+
file.type === 'variable' ? file.slug : file.entityId,
|
|
145
|
+
]);
|
|
146
|
+
const group = baseDependencies.get(key) ?? [];
|
|
147
|
+
group.push(file);
|
|
148
|
+
baseDependencies.set(key, group);
|
|
149
|
+
}
|
|
150
|
+
const affectedWorkflowIds = new Set();
|
|
151
|
+
const dependencyCounts = new Map();
|
|
152
|
+
for (const collection of Object.values(DEPENDENCY_COLLECTIONS)) {
|
|
153
|
+
if (collection === null)
|
|
154
|
+
continue;
|
|
155
|
+
const entries = new Map(manifest[collection]?.map((entry) => [
|
|
156
|
+
collection === 'variables' ? entry.name : entry.id,
|
|
157
|
+
entry,
|
|
158
|
+
]));
|
|
159
|
+
for (const requirement of manifest.requirements?.[collection] ?? []) {
|
|
160
|
+
const key = 'id' in requirement ? requirement.id : requirement.name;
|
|
161
|
+
const entry = entries.get(key);
|
|
162
|
+
const baseKey = collection === 'variables' ? (0, slug_utils_1.generateSlug)(key, 'variable') : key;
|
|
163
|
+
const group = baseDependencies.get(JSON.stringify([manifest_entry_1.PACKAGE_ENTITY_LAYOUT[collection].fileName, baseKey])) ?? [];
|
|
164
|
+
const projectFiles = group.filter((file) => file.projectId === projectId);
|
|
165
|
+
const scopedFiles = projectFiles.length ? projectFiles : group;
|
|
166
|
+
const sameId = entry ? scopedFiles.filter(({ entityId }) => entityId === entry.id) : [];
|
|
167
|
+
const previous = sameId.length ? sameId : scopedFiles;
|
|
168
|
+
const currentPath = entry
|
|
169
|
+
? `${constants_1.PACKAGE_SUBFOLDER}/${(0, manifest_entry_1.entityFilePath)(collection, entry.target)}`
|
|
170
|
+
: undefined;
|
|
171
|
+
const dependencyChanged = collection !== 'workflows' &&
|
|
172
|
+
(previous.some(({ path }) => changedPaths.has(path)) ||
|
|
173
|
+
(currentPath !== undefined && changedPaths.has(currentPath)));
|
|
174
|
+
for (const workflowId of requirement.usedByWorkflows) {
|
|
175
|
+
dependencyCounts.set(workflowId, (dependencyCounts.get(workflowId) ?? 0) + 1);
|
|
176
|
+
if (dependencyChanged)
|
|
177
|
+
affectedWorkflowIds.add(workflowId);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
return { affectedWorkflowIds, dependencyCounts };
|
|
182
|
+
}
|
|
183
|
+
function buildPromotableResources({ base, desiredWorkflows, archiveState, changedIds, renamedIds, modifiedIds, metadata, dependencyCounts, }) {
|
|
184
|
+
const metadataById = new Map(metadata.map((workflow) => [workflow.id, workflow]));
|
|
185
|
+
const baseWorkflowSlugs = new Map(base.filter(({ type }) => type === 'workflow').map(({ entityId, slug }) => [entityId, slug]));
|
|
186
|
+
return [...changedIds].map((id) => {
|
|
187
|
+
const entry = desiredWorkflows.get(id);
|
|
188
|
+
const workflow = metadataById.get(id);
|
|
189
|
+
let status = 'modified';
|
|
190
|
+
if (!entry)
|
|
191
|
+
status = 'deleted';
|
|
192
|
+
else if (!baseWorkflowSlugs.has(id))
|
|
193
|
+
status = 'new';
|
|
194
|
+
else if (archiveState.get((0, manifest_entry_1.entityFilePath)('workflows', entry.target)))
|
|
195
|
+
status = 'archived';
|
|
196
|
+
else if (renamedIds.has(id)) {
|
|
197
|
+
status = modifiedIds.has(id) ? 'renamed-and-modified' : 'renamed';
|
|
198
|
+
}
|
|
199
|
+
return {
|
|
200
|
+
id,
|
|
201
|
+
name: entry?.name ?? baseWorkflowSlugs.get(id) ?? id,
|
|
202
|
+
type: 'workflow',
|
|
203
|
+
status,
|
|
204
|
+
version: workflow?.versionCounter ?? null,
|
|
205
|
+
updatedAt: workflow?.updatedAt.toISOString() ?? null,
|
|
206
|
+
updatedBy: null,
|
|
207
|
+
dependencyCount: dependencyCounts.get(id) ?? 0,
|
|
208
|
+
};
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
//# sourceMappingURL=promotion-change.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"promotion-change.service.js","sourceRoot":"","sources":["../../../src/modules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AAC,CAAC,EAAE,EAAE,EAAE;QACjC,MAAM,KAAK,GAAG,gBAAgB,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QACvC,MAAM,QAAQ,GAAG,YAAY,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QACtC,IAAI,MAAM,GAAiC,UAAU,CAAC;QACtD,IAAI,CAAC,KAAK;YAAE,MAAM,GAAG,SAAS,CAAC;aAC1B,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,EAAE,CAAC;YAAE,MAAM,GAAG,KAAK,CAAC;aAC/C,IAAI,YAAY,CAAC,GAAG,CAAC,IAAA,+BAAc,EAAC,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;YAAE,MAAM,GAAG,UAAU,CAAC;aACrF,IAAI,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC;YAC7B,MAAM,GAAG,WAAW,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,SAAS,CAAC;QACnE,CAAC;QACD,OAAO;YACN,EAAE;YACF,IAAI,EAAE,KAAK,EAAE,IAAI,IAAI,iBAAiB,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,EAAE;YACpD,IAAI,EAAE,UAAU;YAChB,MAAM;YACN,OAAO,EAAE,QAAQ,EAAE,cAAc,IAAI,IAAI;YACzC,SAAS,EAAE,QAAQ,EAAE,SAAS,CAAC,WAAW,EAAE,IAAI,IAAI;YACpD,SAAS,EAAE,IAAI;YACf,eAAe,EAAE,gBAAgB,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC;SAC9C,CAAC;IACH,CAAC,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PromotionChangesQueryDto, type PromotableResource } from '@n8n/api-types';
|
|
2
|
+
import { AuthenticatedRequest } from '@n8n/db';
|
|
3
|
+
import type { Response } from 'express';
|
|
4
|
+
import { PromotionChangeService } from './promotion-change.service';
|
|
5
|
+
export declare class PromotionChangesController {
|
|
6
|
+
private readonly changeService;
|
|
7
|
+
constructor(changeService: PromotionChangeService);
|
|
8
|
+
getChanges(req: AuthenticatedRequest, _res: Response, projectId: string, query: PromotionChangesQueryDto): Promise<PromotableResource[]>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
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 __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.PromotionChangesController = void 0;
|
|
16
|
+
const api_types_1 = require("@n8n/api-types");
|
|
17
|
+
const constants_1 = require("@n8n/constants");
|
|
18
|
+
const decorators_1 = require("@n8n/decorators");
|
|
19
|
+
const promotion_change_service_1 = require("./promotion-change.service");
|
|
20
|
+
let PromotionChangesController = class PromotionChangesController {
|
|
21
|
+
constructor(changeService) {
|
|
22
|
+
this.changeService = changeService;
|
|
23
|
+
}
|
|
24
|
+
async getChanges(req, _res, projectId, query) {
|
|
25
|
+
const changes = await this.changeService.getChanges(req.user, projectId);
|
|
26
|
+
const search = query.search?.toLowerCase();
|
|
27
|
+
return changes
|
|
28
|
+
.filter(({ name }) => !search || name.toLowerCase().includes(search))
|
|
29
|
+
.sort((a, b) => {
|
|
30
|
+
const comparison = (a[query.sort] ?? '').localeCompare(b[query.sort] ?? '');
|
|
31
|
+
return (query.order === 'desc' ? -comparison : comparison) || a.id.localeCompare(b.id);
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
exports.PromotionChangesController = PromotionChangesController;
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, decorators_1.Get)('/:projectId/changes'),
|
|
38
|
+
(0, decorators_1.ProjectScope)('project:export'),
|
|
39
|
+
(0, decorators_1.Licensed)(constants_1.LICENSE_FEATURES.GIT_CONNECTIONS),
|
|
40
|
+
__param(2, (0, decorators_1.Param)('projectId')),
|
|
41
|
+
__param(3, decorators_1.Query),
|
|
42
|
+
__metadata("design:type", Function),
|
|
43
|
+
__metadata("design:paramtypes", [Object, Object, String, api_types_1.PromotionChangesQueryDto]),
|
|
44
|
+
__metadata("design:returntype", Promise)
|
|
45
|
+
], PromotionChangesController.prototype, "getChanges", null);
|
|
46
|
+
exports.PromotionChangesController = PromotionChangesController = __decorate([
|
|
47
|
+
(0, decorators_1.RestController)('/promotions'),
|
|
48
|
+
__metadata("design:paramtypes", [promotion_change_service_1.PromotionChangeService])
|
|
49
|
+
], PromotionChangesController);
|
|
50
|
+
//# sourceMappingURL=promotion-changes.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"promotion-changes.controller.js","sourceRoot":"","sources":["../../../src/modules/promotions.ee/promotion-changes.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,8CAAmF;AACnF,8CAAkD;AAElD,gDAA4F;AAG5F,yEAAoE;AAG7D,IAAM,0BAA0B,GAAhC,MAAM,0BAA0B;IACtC,YAA6B,aAAqC;6BAArC,aAAa;IAA2B,CAAC;IAKhE,AAAN,KAAK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from '@n8n/api-types';
|
|
2
|
+
import type { ResolvedPromotionConfig } from './promotions.types';
|
|
3
|
+
export declare function resolveStoredConfig(row: {
|
|
4
|
+
direction: PromotionDirection;
|
|
5
|
+
settings: unknown;
|
|
6
|
+
}): ResolvedPromotionConfig | null;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.resolveStoredConfig = resolveStoredConfig;
|
|
4
|
+
const api_types_1 = require("@n8n/api-types");
|
|
5
|
+
function resolveStoredConfig(row) {
|
|
6
|
+
if (row.direction === 'apply') {
|
|
7
|
+
const parsed = api_types_1.promotionGitApplySettingsSchema.safeParse(row.settings);
|
|
8
|
+
return parsed.success ? { direction: 'apply', settings: parsed.data } : null;
|
|
9
|
+
}
|
|
10
|
+
const parsed = api_types_1.promotionGitPromoteSettingsSchema.safeParse(row.settings);
|
|
11
|
+
return parsed.success ? { direction: 'promote', settings: parsed.data } : null;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=promotion-config-settings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"promotion-config-settings.js","sourceRoot":"","sources":["../../../src/modules/promotions.ee/promotion-config-settings.ts"],"names":[],"mappings":";;;AACA,8CAAoG;AASpG,6BAAoC,GAGnC;IACA,IAAI,GAAG,CAAC,SAAS,KAAK,OAAO,EAAE,CAAC;QAC/B,MAAM,MAAM,GAAG,2CAA+B,CAAC,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QACvE,OAAO,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;IAC9E,CAAC;IACD,MAAM,MAAM,GAAG,6CAAiC,CAAC,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IACzE,OAAO,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;AAChF,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { PromotionDirection } from '@n8n/api-types';
|
|
2
|
+
import { ProjectRepository } from '@n8n/db';
|
|
3
|
+
import { PromotionConfigRepository } from './database/repositories/promotion-config.repository';
|
|
4
|
+
import { PromotionConnectionProjectRepository } from './database/repositories/promotion-connection-project.repository';
|
|
5
|
+
import { PromotionConnectionRepository } from './database/repositories/promotion-connection.repository';
|
|
6
|
+
import type { PromotionOperationInput } from './promotions.types';
|
|
7
|
+
export declare class PromotionConfigResolver {
|
|
8
|
+
private readonly configRepository;
|
|
9
|
+
private readonly connectionRepository;
|
|
10
|
+
private readonly linkRepository;
|
|
11
|
+
private readonly projectRepository;
|
|
12
|
+
constructor(configRepository: PromotionConfigRepository, connectionRepository: PromotionConnectionRepository, linkRepository: PromotionConnectionProjectRepository, projectRepository: ProjectRepository);
|
|
13
|
+
resolveForConnection(connectionId: string, direction: PromotionDirection): Promise<PromotionOperationInput>;
|
|
14
|
+
resolveForProject(projectId: string, direction: PromotionDirection): Promise<PromotionOperationInput>;
|
|
15
|
+
private toOperationInput;
|
|
16
|
+
}
|