n8n 2.34.3 → 2.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/active-workflow-manager.js +2 -14
- package/dist/active-workflow-manager.js.map +1 -1
- package/dist/agent-library-bundle.js +6 -6
- package/dist/build.tsbuildinfo +1 -1
- package/dist/controllers/ai.controller.js +3 -0
- package/dist/controllers/ai.controller.js.map +1 -1
- package/dist/controllers/role.controller.d.ts +0 -1
- package/dist/controllers/role.controller.js +6 -14
- package/dist/controllers/role.controller.js.map +1 -1
- package/dist/credentials/credentials.controller.d.ts +1 -1
- package/dist/credentials/credentials.controller.js +7 -1
- package/dist/credentials/credentials.controller.js.map +1 -1
- package/dist/credentials/credentials.service.d.ts +2 -1
- package/dist/credentials/credentials.service.js +24 -0
- package/dist/credentials/credentials.service.js.map +1 -1
- package/dist/credentials-helper.js +4 -7
- package/dist/credentials-helper.js.map +1 -1
- package/dist/deprecation/deprecation.service.js +5 -0
- package/dist/deprecation/deprecation.service.js.map +1 -1
- package/dist/eventbus/event-message-classes/index.js.map +1 -1
- package/dist/events/maps/relay.event-map.d.ts +9 -0
- package/dist/events/relays/telemetry.event-relay.d.ts +4 -2
- package/dist/events/relays/telemetry.event-relay.js +23 -7
- package/dist/events/relays/telemetry.event-relay.js.map +1 -1
- package/dist/execution-lifecycle/execute-error-workflow.js +19 -5
- package/dist/execution-lifecycle/execute-error-workflow.js.map +1 -1
- package/dist/execution-lifecycle/execution-lifecycle-hooks.js.map +1 -1
- package/dist/executions/execution-persistence.d.ts +6 -4
- package/dist/executions/execution-persistence.js +7 -14
- package/dist/executions/execution-persistence.js.map +1 -1
- package/dist/executions/execution.service.d.ts +31 -2
- package/dist/executions/execution.service.js +108 -1
- package/dist/executions/execution.service.js.map +1 -1
- package/dist/middlewares/body-parser.js +3 -2
- package/dist/middlewares/body-parser.js.map +1 -1
- package/dist/middlewares/cors.js +1 -1
- package/dist/middlewares/cors.js.map +1 -1
- package/dist/modules/agent-evals/agent-eval-rating.service.d.ts +12 -15
- package/dist/modules/agent-evals/agent-eval-rating.service.js +33 -46
- package/dist/modules/agent-evals/agent-eval-rating.service.js.map +1 -1
- package/dist/modules/agent-evals/agent-eval-record-mappers.d.ts +3 -2
- package/dist/modules/agent-evals/agent-eval-record-mappers.js +13 -0
- package/dist/modules/agent-evals/agent-eval-record-mappers.js.map +1 -1
- package/dist/modules/agent-evals/agent-eval-runner.service.js +15 -7
- package/dist/modules/agent-evals/agent-eval-runner.service.js.map +1 -1
- package/dist/modules/agent-evals/agent-eval.service.d.ts +8 -3
- package/dist/modules/agent-evals/agent-eval.service.js +6 -6
- package/dist/modules/agent-evals/agent-eval.service.js.map +1 -1
- package/dist/modules/agent-evals/agent-evals-required-modules.js +2 -2
- package/dist/modules/agent-evals/agent-evals-required-modules.js.map +1 -1
- package/dist/modules/agent-evals/agent-evals.controller.d.ts +12 -4
- package/dist/modules/agent-evals/agent-evals.controller.js +50 -9
- package/dist/modules/agent-evals/agent-evals.controller.js.map +1 -1
- package/dist/modules/agents/agent-chat.controller.d.ts +3 -5
- package/dist/modules/agents/agent-chat.controller.js +19 -25
- package/dist/modules/agents/agent-chat.controller.js.map +1 -1
- package/dist/modules/agents/agent-config.service.d.ts +5 -1
- package/dist/modules/agents/agent-config.service.js +10 -3
- package/dist/modules/agents/agent-config.service.js.map +1 -1
- package/dist/modules/agents/agent-credential-index.listener.d.ts +11 -0
- package/dist/modules/agents/agent-credential-index.listener.js +55 -0
- package/dist/modules/agents/agent-credential-index.listener.js.map +1 -0
- package/dist/modules/agents/agent-credential-index.service.d.ts +14 -0
- package/dist/modules/agents/agent-credential-index.service.js +57 -0
- package/dist/modules/agents/agent-credential-index.service.js.map +1 -0
- package/dist/modules/agents/agent-execution-orchestrator.service.d.ts +5 -0
- package/dist/modules/agents/agent-execution-orchestrator.service.js +89 -23
- package/dist/modules/agents/agent-execution-orchestrator.service.js.map +1 -1
- package/dist/modules/agents/agent-execution-update-broadcaster.d.ts +20 -0
- package/dist/modules/agents/agent-execution-update-broadcaster.js +65 -0
- package/dist/modules/agents/agent-execution-update-broadcaster.js.map +1 -0
- package/dist/modules/agents/agent-execution.service.d.ts +30 -4
- package/dist/modules/agents/agent-execution.service.js +217 -46
- package/dist/modules/agents/agent-execution.service.js.map +1 -1
- package/dist/modules/agents/agent-integration-management.service.d.ts +33 -0
- package/dist/modules/agents/agent-integration-management.service.js +80 -0
- package/dist/modules/agents/agent-integration-management.service.js.map +1 -0
- package/dist/modules/agents/agent-integration-persistence.service.d.ts +3 -1
- package/dist/modules/agents/agent-integration-persistence.service.js +6 -2
- package/dist/modules/agents/agent-integration-persistence.service.js.map +1 -1
- package/dist/modules/agents/agent-integrations.controller.d.ts +4 -24
- package/dist/modules/agents/agent-integrations.controller.js +28 -114
- package/dist/modules/agents/agent-integrations.controller.js.map +1 -1
- package/dist/modules/agents/agent-interrupted-execution-sweeper.d.ts +11 -0
- package/dist/modules/agents/agent-interrupted-execution-sweeper.js +63 -0
- package/dist/modules/agents/agent-interrupted-execution-sweeper.js.map +1 -0
- package/dist/modules/agents/agent-model-catalog.service.d.ts +1 -0
- package/dist/modules/agents/agent-model-catalog.service.js +37 -8
- package/dist/modules/agents/agent-model-catalog.service.js.map +1 -1
- package/dist/modules/agents/agent-publish.service.d.ts +3 -1
- package/dist/modules/agents/agent-publish.service.js +8 -2
- package/dist/modules/agents/agent-publish.service.js.map +1 -1
- package/dist/modules/agents/agent-run-tracing.service.d.ts +1 -0
- package/dist/modules/agents/agent-run-tracing.service.js +4 -1
- package/dist/modules/agents/agent-run-tracing.service.js.map +1 -1
- package/dist/modules/agents/agent-runtime-cache.service.js +1 -1
- package/dist/modules/agents/agent-runtime-cache.service.js.map +1 -1
- package/dist/modules/agents/agent-runtime-reconstruction.service.d.ts +3 -1
- package/dist/modules/agents/agent-runtime-reconstruction.service.js +14 -8
- package/dist/modules/agents/agent-runtime-reconstruction.service.js.map +1 -1
- package/dist/modules/agents/agent-slack-integrations.controller.d.ts +23 -0
- package/dist/modules/agents/agent-slack-integrations.controller.js +98 -0
- package/dist/modules/agents/agent-slack-integrations.controller.js.map +1 -0
- package/dist/modules/agents/agent-test-run.service.d.ts +134 -0
- package/dist/modules/agents/agent-test-run.service.js +240 -0
- package/dist/modules/agents/agent-test-run.service.js.map +1 -0
- package/dist/modules/agents/agent-validation.service.d.ts +1 -0
- package/dist/modules/agents/agent-validation.service.js +32 -13
- package/dist/modules/agents/agent-validation.service.js.map +1 -1
- package/dist/modules/agents/agent-workflow-execution.service.d.ts +5 -1
- package/dist/modules/agents/agent-workflow-execution.service.js +137 -64
- package/dist/modules/agents/agent-workflow-execution.service.js.map +1 -1
- package/dist/modules/agents/agents-config.controller.d.ts +8 -0
- package/dist/modules/agents/agents.module.d.ts +3 -1
- package/dist/modules/agents/agents.module.js +35 -1
- package/dist/modules/agents/agents.module.js.map +1 -1
- package/dist/modules/agents/agents.service.d.ts +4 -2
- package/dist/modules/agents/agents.service.js +6 -2
- package/dist/modules/agents/agents.service.js.map +1 -1
- package/dist/modules/agents/attachable-workflows.service.d.ts +1 -0
- package/dist/modules/agents/attachable-workflows.service.js +2 -1
- package/dist/modules/agents/attachable-workflows.service.js.map +1 -1
- package/dist/modules/agents/builder/agents-builder-prompts.d.ts +2 -2
- package/dist/modules/agents/builder/agents-builder-prompts.js +26 -7
- package/dist/modules/agents/builder/agents-builder-prompts.js.map +1 -1
- package/dist/modules/agents/builder/agents-builder-tools.service.d.ts +4 -2
- package/dist/modules/agents/builder/agents-builder-tools.service.js +130 -2
- package/dist/modules/agents/builder/agents-builder-tools.service.js.map +1 -1
- package/dist/modules/agents/builder/builder-model-live-lookup.service.d.ts +16 -1
- package/dist/modules/agents/builder/builder-model-live-lookup.service.js +69 -22
- package/dist/modules/agents/builder/builder-model-live-lookup.service.js.map +1 -1
- package/dist/modules/agents/builder/builder-tool-names.d.ts +1 -0
- package/dist/modules/agents/builder/builder-tool-names.js +1 -0
- package/dist/modules/agents/builder/builder-tool-names.js.map +1 -1
- package/dist/modules/agents/builder/get-resource-locator-options.tool.d.ts +2 -2
- package/dist/modules/agents/builder/interactive/finish-setup.tool.d.ts +1 -0
- package/dist/modules/agents/builder/interactive/finish-setup.tool.js +4 -2
- package/dist/modules/agents/builder/interactive/finish-setup.tool.js.map +1 -1
- package/dist/modules/agents/builder/interactive/resolve-llm.tool.js +68 -2
- package/dist/modules/agents/builder/interactive/resolve-llm.tool.js.map +1 -1
- package/dist/modules/agents/builder/prompts/llm-selection.prompt.js +1 -0
- package/dist/modules/agents/builder/prompts/llm-selection.prompt.js.map +1 -1
- package/dist/modules/agents/builder/prompts/tools.prompt.d.ts +1 -1
- package/dist/modules/agents/builder/prompts/tools.prompt.js +5 -2
- package/dist/modules/agents/builder/prompts/tools.prompt.js.map +1 -1
- package/dist/modules/agents/builder/skills/external-services.skill.js +26 -2
- package/dist/modules/agents/builder/skills/external-services.skill.js.map +1 -1
- package/dist/modules/agents/entities/agent-credential-dependency.entity.d.ts +9 -0
- package/dist/modules/agents/entities/agent-credential-dependency.entity.js +40 -0
- package/dist/modules/agents/entities/agent-credential-dependency.entity.js.map +1 -0
- package/dist/modules/agents/entities/agent-execution.entity.d.ts +1 -1
- package/dist/modules/agents/entities/agent-execution.entity.js +2 -1
- package/dist/modules/agents/entities/agent-execution.entity.js.map +1 -1
- package/dist/modules/agents/execution-recorder.d.ts +7 -1
- package/dist/modules/agents/execution-recorder.js +64 -8
- package/dist/modules/agents/execution-recorder.js.map +1 -1
- package/dist/modules/agents/instance-ai-builder-delegate.adapter.d.ts +6 -2
- package/dist/modules/agents/instance-ai-builder-delegate.adapter.js +24 -3
- package/dist/modules/agents/instance-ai-builder-delegate.adapter.js.map +1 -1
- package/dist/modules/agents/integrations/agent-chat-bridge.d.ts +3 -2
- package/dist/modules/agents/integrations/agent-chat-bridge.js +30 -13
- package/dist/modules/agents/integrations/agent-chat-bridge.js.map +1 -1
- package/dist/modules/agents/integrations/agent-chat-hitl-resume-handler.d.ts +3 -2
- package/dist/modules/agents/integrations/agent-chat-hitl-resume-handler.js +25 -12
- package/dist/modules/agents/integrations/agent-chat-hitl-resume-handler.js.map +1 -1
- package/dist/modules/agents/integrations/agent-chat-integration.d.ts +38 -6
- package/dist/modules/agents/integrations/agent-chat-integration.js.map +1 -1
- package/dist/modules/agents/integrations/agent-chat-message-context.js +13 -6
- package/dist/modules/agents/integrations/agent-chat-message-context.js.map +1 -1
- package/dist/modules/agents/integrations/agent-chat-stream-consumer.js +7 -1
- package/dist/modules/agents/integrations/agent-chat-stream-consumer.js.map +1 -1
- package/dist/modules/agents/integrations/callback-store.d.ts +13 -4
- package/dist/modules/agents/integrations/callback-store.js +44 -18
- package/dist/modules/agents/integrations/callback-store.js.map +1 -1
- package/dist/modules/agents/integrations/chat-integration.service.d.ts +7 -3
- package/dist/modules/agents/integrations/chat-integration.service.js +59 -22
- package/dist/modules/agents/integrations/chat-integration.service.js.map +1 -1
- package/dist/modules/agents/integrations/component-mapper.d.ts +1 -1
- package/dist/modules/agents/integrations/component-mapper.js +1 -1
- package/dist/modules/agents/integrations/component-mapper.js.map +1 -1
- package/dist/modules/agents/integrations/esm-loader.d.ts +1 -0
- package/dist/modules/agents/integrations/esm-loader.js +4 -0
- package/dist/modules/agents/integrations/esm-loader.js.map +1 -1
- package/dist/modules/agents/integrations/integration-action-executor.d.ts +2 -0
- package/dist/modules/agents/integrations/integration-action-executor.js +74 -20
- package/dist/modules/agents/integrations/integration-action-executor.js.map +1 -1
- package/dist/modules/agents/integrations/integration-tool-definitions.js +35 -2
- package/dist/modules/agents/integrations/integration-tool-definitions.js.map +1 -1
- package/dist/modules/agents/integrations/integration-tool-execution.js +10 -5
- package/dist/modules/agents/integrations/integration-tool-execution.js.map +1 -1
- package/dist/modules/agents/integrations/integration-tool-schema.js +8 -2
- package/dist/modules/agents/integrations/integration-tool-schema.js.map +1 -1
- package/dist/modules/agents/integrations/integration-tool-types.d.ts +2 -0
- package/dist/modules/agents/integrations/n8n-memory.js +6 -7
- package/dist/modules/agents/integrations/n8n-memory.js.map +1 -1
- package/dist/modules/agents/integrations/platforms/discord-gateway.d.ts +32 -0
- package/dist/modules/agents/integrations/platforms/discord-gateway.js +138 -0
- package/dist/modules/agents/integrations/platforms/discord-gateway.js.map +1 -0
- package/dist/modules/agents/integrations/platforms/discord-integration.d.ts +73 -0
- package/dist/modules/agents/integrations/platforms/discord-integration.js +364 -0
- package/dist/modules/agents/integrations/platforms/discord-integration.js.map +1 -0
- package/dist/modules/agents/integrations/platforms/discord-operations.d.ts +64 -0
- package/dist/modules/agents/integrations/platforms/discord-operations.js +176 -0
- package/dist/modules/agents/integrations/platforms/discord-operations.js.map +1 -0
- package/dist/modules/agents/integrations/platforms/{slack-bridge-behavior.d.ts → slack/slack-bridge-behavior.d.ts} +3 -3
- package/dist/modules/agents/integrations/platforms/slack/slack-bridge-behavior.js.map +1 -0
- package/dist/modules/agents/integrations/platforms/{slack-integration.d.ts → slack/slack-integration.d.ts} +11 -6
- package/dist/modules/agents/integrations/platforms/{slack-integration.js → slack/slack-integration.js} +32 -23
- package/dist/modules/agents/integrations/platforms/slack/slack-integration.js.map +1 -0
- package/dist/modules/agents/integrations/platforms/slack/slack-manual-setup.service.d.ts +35 -0
- package/dist/modules/agents/integrations/platforms/slack/slack-manual-setup.service.js +150 -0
- package/dist/modules/agents/integrations/platforms/slack/slack-manual-setup.service.js.map +1 -0
- package/dist/modules/agents/integrations/platforms/slack/slack-methods.service.d.ts +36 -0
- package/dist/modules/agents/integrations/platforms/slack/slack-methods.service.js +193 -0
- package/dist/modules/agents/integrations/platforms/slack/slack-methods.service.js.map +1 -0
- package/dist/modules/agents/integrations/platforms/slack/slack-operations.d.ts +10 -0
- package/dist/modules/agents/integrations/platforms/{slack-operations.js → slack/slack-operations.js} +1 -57
- package/dist/modules/agents/integrations/platforms/slack/slack-operations.js.map +1 -0
- package/dist/modules/agents/integrations/platforms/telegram-bridge-behavior.js +6 -36
- package/dist/modules/agents/integrations/platforms/telegram-bridge-behavior.js.map +1 -1
- package/dist/modules/agents/integrations/platforms/telegram-integration.d.ts +3 -2
- package/dist/modules/agents/integrations/platforms/telegram-integration.js +14 -5
- package/dist/modules/agents/integrations/platforms/telegram-integration.js.map +1 -1
- package/dist/modules/agents/integrations/platforms/typing-indicator.d.ts +9 -0
- package/dist/modules/agents/integrations/platforms/typing-indicator.js +42 -0
- package/dist/modules/agents/integrations/platforms/typing-indicator.js.map +1 -0
- package/dist/modules/agents/integrations/recording/recording-adapter.js +11 -0
- package/dist/modules/agents/integrations/recording/recording-adapter.js.map +1 -1
- package/dist/modules/agents/json-config/node-tool-ai-gateway.service.d.ts +9 -0
- package/dist/modules/agents/json-config/node-tool-ai-gateway.service.js +34 -0
- package/dist/modules/agents/json-config/node-tool-ai-gateway.service.js.map +1 -0
- package/dist/modules/agents/json-config/reconcile-node-tool-gateway-credentials.d.ts +4 -0
- package/dist/modules/agents/json-config/reconcile-node-tool-gateway-credentials.js +152 -0
- package/dist/modules/agents/json-config/reconcile-node-tool-gateway-credentials.js.map +1 -0
- package/dist/modules/agents/repositories/agent-credential-dependency.repository.d.ts +12 -0
- package/dist/modules/agents/repositories/agent-credential-dependency.repository.js +92 -0
- package/dist/modules/agents/repositories/agent-credential-dependency.repository.js.map +1 -0
- package/dist/modules/agents/repositories/agent-execution.repository.d.ts +7 -0
- package/dist/modules/agents/repositories/agent-execution.repository.js +20 -0
- package/dist/modules/agents/repositories/agent-execution.repository.js.map +1 -1
- package/dist/modules/agents/repositories/agent.repository.d.ts +2 -0
- package/dist/modules/agents/repositories/agent.repository.js +18 -0
- package/dist/modules/agents/repositories/agent.repository.js.map +1 -1
- package/dist/modules/agents/sub-agents/sub-agent-foreground-runner.d.ts +2 -0
- package/dist/modules/agents/sub-agents/sub-agent-foreground-runner.js +69 -5
- package/dist/modules/agents/sub-agents/sub-agent-foreground-runner.js.map +1 -1
- package/dist/modules/agents/tools/node-tool-factory.js +5 -1
- package/dist/modules/agents/tools/node-tool-factory.js.map +1 -1
- package/dist/modules/agents/tools/workflow-tool-factory.d.ts +7 -4
- package/dist/modules/agents/tools/workflow-tool-factory.js +86 -41
- package/dist/modules/agents/tools/workflow-tool-factory.js.map +1 -1
- package/dist/modules/agents/tools/workflow-tool-workflow-loader.service.d.ts +14 -0
- package/dist/modules/agents/tools/workflow-tool-workflow-loader.service.js +50 -0
- package/dist/modules/agents/tools/workflow-tool-workflow-loader.service.js.map +1 -0
- package/dist/modules/agents/tools/workflow-tool-workflow-resolver.d.ts +3 -3
- package/dist/modules/agents/tools/workflow-tool-workflow-resolver.js +28 -23
- package/dist/modules/agents/tools/workflow-tool-workflow-resolver.js.map +1 -1
- package/dist/modules/agents/utils/extract-agent-credential-ids.d.ts +1 -0
- package/dist/modules/agents/utils/extract-agent-credential-ids.js +41 -0
- package/dist/modules/agents/utils/extract-agent-credential-ids.js.map +1 -0
- package/dist/modules/agents/utils/node-tool-validation.js +2 -2
- package/dist/modules/agents/utils/node-tool-validation.js.map +1 -1
- package/dist/modules/breaking-changes/rules/v3/unverified-packages.rule.d.ts +6 -2
- package/dist/modules/breaking-changes/rules/v3/unverified-packages.rule.js +26 -3
- package/dist/modules/breaking-changes/rules/v3/unverified-packages.rule.js.map +1 -1
- package/dist/modules/data-table/data-table-permissions.d.ts +5 -0
- package/dist/modules/data-table/data-table-permissions.js +14 -0
- package/dist/modules/data-table/data-table-permissions.js.map +1 -0
- package/dist/modules/data-table/data-table-proxy.service.js +2 -0
- package/dist/modules/data-table/data-table-proxy.service.js.map +1 -1
- package/dist/modules/data-table/data-table.controller.d.ts +1 -1
- package/dist/modules/data-table/data-table.controller.js +7 -19
- package/dist/modules/data-table/data-table.controller.js.map +1 -1
- package/dist/modules/data-table/data-table.service.d.ts +3 -0
- package/dist/modules/data-table/data-table.service.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/services/credential-check-proxy.service.d.ts +1 -0
- package/dist/modules/dynamic-credentials.ee/services/credential-check-proxy.service.js +8 -0
- package/dist/modules/dynamic-credentials.ee/services/credential-check-proxy.service.js.map +1 -1
- package/dist/modules/external-secrets.ee/providers/azure-key-vault/azure-key-vault.d.ts +1 -0
- package/dist/modules/external-secrets.ee/providers/azure-key-vault/azure-key-vault.js +100 -3
- package/dist/modules/external-secrets.ee/providers/azure-key-vault/azure-key-vault.js.map +1 -1
- package/dist/modules/external-secrets.ee/providers/azure-key-vault/types.d.ts +4 -0
- package/dist/modules/insights/database/repositories/insights-by-period-query.helper.d.ts +2 -1
- package/dist/modules/insights/database/repositories/insights-by-period-query.helper.js +11 -5
- package/dist/modules/insights/database/repositories/insights-by-period-query.helper.js.map +1 -1
- package/dist/modules/insights/database/repositories/insights-by-period.repository.d.ts +6 -3
- package/dist/modules/insights/database/repositories/insights-by-period.repository.js +31 -11
- package/dist/modules/insights/database/repositories/insights-by-period.repository.js.map +1 -1
- package/dist/modules/insights/insights.controller.js +13 -7
- package/dist/modules/insights/insights.controller.js.map +1 -1
- package/dist/modules/insights/insights.service.d.ts +6 -3
- package/dist/modules/insights/insights.service.js +6 -3
- package/dist/modules/insights/insights.service.js.map +1 -1
- package/dist/modules/instance-ai/eval/agent-execution.service.js +10 -3
- package/dist/modules/instance-ai/eval/agent-execution.service.js.map +1 -1
- package/dist/modules/instance-ai/eval/execution.service.d.ts +1 -0
- package/dist/modules/instance-ai/eval/execution.service.js +37 -3
- package/dist/modules/instance-ai/eval/execution.service.js.map +1 -1
- package/dist/modules/instance-ai/eval/thread-restore.service.d.ts +5 -1
- package/dist/modules/instance-ai/eval/thread-restore.service.js +67 -9
- package/dist/modules/instance-ai/eval/thread-restore.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai-model-catalog.service.d.ts +15 -0
- package/dist/modules/instance-ai/instance-ai-model-catalog.service.js +130 -0
- package/dist/modules/instance-ai/instance-ai-model-catalog.service.js.map +1 -0
- package/dist/modules/instance-ai/instance-ai-settings.service.d.ts +17 -1
- package/dist/modules/instance-ai/instance-ai-settings.service.js +234 -24
- package/dist/modules/instance-ai/instance-ai-settings.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai-verification.service.d.ts +20 -0
- package/dist/modules/instance-ai/instance-ai-verification.service.js +232 -0
- package/dist/modules/instance-ai/instance-ai-verification.service.js.map +1 -0
- package/dist/modules/instance-ai/instance-ai.adapter.service.d.ts +4 -0
- package/dist/modules/instance-ai/instance-ai.adapter.service.js +78 -4
- package/dist/modules/instance-ai/instance-ai.adapter.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.controller.d.ts +9 -2
- package/dist/modules/instance-ai/instance-ai.controller.js +84 -2
- package/dist/modules/instance-ai/instance-ai.controller.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.module.d.ts +1 -0
- package/dist/modules/instance-ai/instance-ai.module.js +3 -7
- package/dist/modules/instance-ai/instance-ai.module.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.service.d.ts +5 -1
- package/dist/modules/instance-ai/instance-ai.service.js +231 -60
- package/dist/modules/instance-ai/instance-ai.service.js.map +1 -1
- package/dist/modules/instance-ai/node-definition-resolver.d.ts +0 -1
- package/dist/modules/instance-ai/node-definition-resolver.js +0 -19
- package/dist/modules/instance-ai/node-definition-resolver.js.map +1 -1
- package/dist/modules/instance-ai/sandbox/instance-ai-sandbox.service.d.ts +1 -0
- package/dist/modules/instance-ai/sandbox/instance-ai-sandbox.service.js +37 -2
- package/dist/modules/instance-ai/sandbox/instance-ai-sandbox.service.js.map +1 -1
- package/dist/modules/instance-ai/storage/typeorm-observation-log-store.js +6 -6
- package/dist/modules/instance-ai/storage/typeorm-observation-log-store.js.map +1 -1
- package/dist/modules/instance-ai/suspended-run-restorer.service.d.ts +1 -1
- package/dist/modules/instance-ai/suspended-run-restorer.service.js +9 -0
- package/dist/modules/instance-ai/suspended-run-restorer.service.js.map +1 -1
- package/dist/modules/mcp/mcp-protected-resource.d.ts +3 -4
- package/dist/modules/mcp/mcp-protected-resource.js +4 -4
- package/dist/modules/mcp/mcp-protected-resource.js.map +1 -1
- package/dist/modules/mcp/mcp-scopes.js +2 -0
- package/dist/modules/mcp/mcp-scopes.js.map +1 -1
- package/dist/modules/mcp/mcp-server-middleware.service.js +1 -0
- package/dist/modules/mcp/mcp-server-middleware.service.js.map +1 -1
- package/dist/modules/mcp/mcp.constants.d.ts +4 -0
- package/dist/modules/mcp/mcp.constants.js +5 -1
- package/dist/modules/mcp/mcp.constants.js.map +1 -1
- package/dist/modules/mcp/mcp.controller.js +14 -14
- package/dist/modules/mcp/mcp.controller.js.map +1 -1
- package/dist/modules/mcp/mcp.service.d.ts +4 -3
- package/dist/modules/mcp/mcp.service.js +49 -34
- package/dist/modules/mcp/mcp.service.js.map +1 -1
- package/dist/modules/mcp/mcp.types.d.ts +31 -5
- package/dist/modules/mcp/mcp.types.js.map +1 -1
- package/dist/modules/mcp/mcp.utils.d.ts +1 -0
- package/dist/modules/mcp/mcp.utils.js +22 -5
- package/dist/modules/mcp/mcp.utils.js.map +1 -1
- package/dist/modules/mcp/tool-schema.util.d.ts +3 -0
- package/dist/modules/mcp/tool-schema.util.js +32 -0
- package/dist/modules/mcp/tool-schema.util.js.map +1 -0
- package/dist/modules/mcp/tools/agents/agent-reference.d.ts +1 -1
- package/dist/modules/mcp/tools/agents/agent-reference.js +17 -6
- package/dist/modules/mcp/tools/agents/agent-reference.js.map +1 -1
- package/dist/modules/mcp/tools/agents/agent-tools.service.d.ts +9 -8
- package/dist/modules/mcp/tools/agents/agent-tools.service.js +207 -52
- package/dist/modules/mcp/tools/agents/agent-tools.service.js.map +1 -1
- package/dist/modules/mcp/tools/execute-workflow.tool.js +1 -1
- package/dist/modules/mcp/tools/execute-workflow.tool.js.map +1 -1
- package/dist/modules/mcp/tools/get-workflow-details.tool.d.ts +4 -1
- package/dist/modules/mcp/tools/get-workflow-details.tool.js +60 -23
- package/dist/modules/mcp/tools/get-workflow-details.tool.js.map +1 -1
- package/dist/modules/mcp/tools/list-credentials.tool.js +1 -1
- package/dist/modules/mcp/tools/list-credentials.tool.js.map +1 -1
- package/dist/modules/mcp/tools/schemas.d.ts +81 -40
- package/dist/modules/mcp/tools/schemas.js +31 -11
- package/dist/modules/mcp/tools/schemas.js.map +1 -1
- package/dist/modules/mcp/tools/search-workflows.tool.js +1 -9
- package/dist/modules/mcp/tools/search-workflows.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/credentials-auto-assign.d.ts +1 -1
- package/dist/modules/mcp/tools/workflow-builder/credentials-auto-assign.js +2 -7
- package/dist/modules/mcp/tools/workflow-builder/credentials-auto-assign.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/get-workflow-best-practices.tool.js +2 -11
- package/dist/modules/mcp/tools/workflow-builder/get-workflow-best-practices.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/mcp-instructions.js +2 -2
- package/dist/modules/mcp/tools/workflow-builder/sdk-reference-content.js +2 -1
- package/dist/modules/mcp/tools/workflow-builder/sdk-reference-content.js.map +1 -1
- package/dist/modules/mcp-registry/registry/mcp-registry-search.d.ts +1 -0
- package/dist/modules/mcp-registry/registry/mcp-registry-search.js +17 -5
- package/dist/modules/mcp-registry/registry/mcp-registry-search.js.map +1 -1
- package/dist/modules/n8n-packages/engine/import-blocked.error.js +2 -0
- package/dist/modules/n8n-packages/engine/import-blocked.error.js.map +1 -1
- package/dist/modules/n8n-packages/engine/import-gates.d.ts +3 -4
- package/dist/modules/n8n-packages/engine/import-gates.js +10 -8
- package/dist/modules/n8n-packages/engine/import-gates.js.map +1 -1
- package/dist/modules/n8n-packages/engine/import-orchestrator.d.ts +6 -2
- package/dist/modules/n8n-packages/engine/import-orchestrator.js +36 -8
- package/dist/modules/n8n-packages/engine/import-orchestrator.js.map +1 -1
- package/dist/modules/n8n-packages/engine/import-result.d.ts +2 -0
- package/dist/modules/n8n-packages/engine/import-result.js +13 -2
- package/dist/modules/n8n-packages/engine/import-result.js.map +1 -1
- package/dist/modules/n8n-packages/engine/import-telemetry.js +8 -2
- package/dist/modules/n8n-packages/engine/import-telemetry.js.map +1 -1
- package/dist/modules/n8n-packages/engine/n8n-package-parser.d.ts +3 -0
- package/dist/modules/n8n-packages/engine/n8n-package-parser.js +29 -0
- package/dist/modules/n8n-packages/engine/n8n-package-parser.js.map +1 -1
- package/dist/modules/n8n-packages/engine/package-layout.d.ts +18 -1
- package/dist/modules/n8n-packages/engine/package-layout.js +36 -7
- package/dist/modules/n8n-packages/engine/package-layout.js.map +1 -1
- package/dist/modules/n8n-packages/engine/project-package-importer.js +28 -16
- package/dist/modules/n8n-packages/engine/project-package-importer.js.map +1 -1
- package/dist/modules/n8n-packages/engine/workflow-package-importer.js +12 -12
- package/dist/modules/n8n-packages/engine/workflow-package-importer.js.map +1 -1
- package/dist/modules/n8n-packages/entities/project/project-conflict-policy.d.ts +7 -0
- package/dist/modules/n8n-packages/entities/project/project-conflict-policy.js +12 -0
- package/dist/modules/n8n-packages/entities/project/project-conflict-policy.js.map +1 -0
- package/dist/modules/n8n-packages/entities/project/project-import.types.d.ts +13 -3
- package/dist/modules/n8n-packages/entities/project/project-importer.d.ts +3 -3
- package/dist/modules/n8n-packages/entities/project/project-importer.js +58 -29
- package/dist/modules/n8n-packages/entities/project/project-importer.js.map +1 -1
- package/dist/modules/n8n-packages/entities/tag/tag-import-decision.d.ts +4 -1
- package/dist/modules/n8n-packages/entities/tag/tag-import-decision.js +10 -3
- package/dist/modules/n8n-packages/entities/tag/tag-import-decision.js.map +1 -1
- package/dist/modules/n8n-packages/entities/tag/tag-importer.d.ts +1 -4
- package/dist/modules/n8n-packages/entities/tag/tag-importer.js +22 -10
- package/dist/modules/n8n-packages/entities/tag/tag-importer.js.map +1 -1
- package/dist/modules/n8n-packages/entities/tag/tag.types.d.ts +13 -0
- package/dist/modules/n8n-packages/entities/tag/tag.types.js +36 -0
- package/dist/modules/n8n-packages/entities/tag/tag.types.js.map +1 -1
- package/dist/modules/n8n-packages/entities/variable/variable-importer.d.ts +6 -5
- package/dist/modules/n8n-packages/entities/variable/variable-importer.js +85 -21
- package/dist/modules/n8n-packages/entities/variable/variable-importer.js.map +1 -1
- package/dist/modules/n8n-packages/entities/variable/variable-missing-mode.d.ts +1 -0
- package/dist/modules/n8n-packages/entities/variable/variable-missing-mode.js +8 -3
- package/dist/modules/n8n-packages/entities/variable/variable-missing-mode.js.map +1 -1
- package/dist/modules/n8n-packages/entities/variable/variable.exporter.d.ts +1 -0
- package/dist/modules/n8n-packages/entities/variable/variable.exporter.js +18 -23
- package/dist/modules/n8n-packages/entities/variable/variable.exporter.js.map +1 -1
- package/dist/modules/n8n-packages/entities/variable/variable.types.d.ts +21 -2
- package/dist/modules/n8n-packages/entities/variable/variable.types.js +15 -0
- package/dist/modules/n8n-packages/entities/variable/variable.types.js.map +1 -1
- package/dist/modules/n8n-packages/entities/workflow/workflow-publisher.d.ts +6 -2
- package/dist/modules/n8n-packages/entities/workflow/workflow-publisher.js +33 -11
- package/dist/modules/n8n-packages/entities/workflow/workflow-publisher.js.map +1 -1
- package/dist/modules/n8n-packages/n8n-packages.types.d.ts +35 -3
- package/dist/modules/n8n-packages/n8n-packages.types.js +12 -1
- package/dist/modules/n8n-packages/n8n-packages.types.js.map +1 -1
- package/dist/modules/n8n-packages/spec/manifest.schema.d.ts +0 -11
- package/dist/modules/n8n-packages/spec/requirements.schema.d.ts +0 -10
- package/dist/modules/n8n-packages/spec/requirements.schema.js +0 -1
- package/dist/modules/n8n-packages/spec/requirements.schema.js.map +1 -1
- package/dist/modules/n8n-packages/spec/serialized/variable.schema.d.ts +3 -3
- package/dist/modules/n8n-packages/spec/serialized/variable.schema.js +3 -2
- package/dist/modules/n8n-packages/spec/serialized/variable.schema.js.map +1 -1
- package/dist/modules/oauth-server/oauth-server.service.js +2 -2
- package/dist/modules/oauth-server/oauth-server.service.js.map +1 -1
- package/dist/modules/otel/execution-level-tracer.d.ts +2 -0
- package/dist/modules/otel/execution-level-tracer.js +4 -0
- package/dist/modules/otel/execution-level-tracer.js.map +1 -1
- package/dist/modules/redaction/redaction-context-hook.d.ts +3 -1
- package/dist/modules/redaction/redaction-context-hook.js +9 -2
- package/dist/modules/redaction/redaction-context-hook.js.map +1 -1
- package/dist/modules/source-control.ee/source-control-import.service.ee.d.ts +4 -1
- package/dist/modules/source-control.ee/source-control-import.service.ee.js +26 -6
- package/dist/modules/source-control.ee/source-control-import.service.ee.js.map +1 -1
- package/dist/modules/workflow-index/workflow-dependency-query.service.d.ts +8 -1
- package/dist/modules/workflow-index/workflow-dependency-query.service.js +76 -18
- package/dist/modules/workflow-index/workflow-dependency-query.service.js.map +1 -1
- package/dist/modules/workflow-reviews.ee/workflow-review-auto-close.service.d.ts +16 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-auto-close.service.js +95 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-auto-close.service.js.map +1 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-decision-eligibility.service.d.ts +15 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-decision-eligibility.service.js +52 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-decision-eligibility.service.js.map +1 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-inbox.service.d.ts +3 -1
- package/dist/modules/workflow-reviews.ee/workflow-review-inbox.service.js +10 -4
- package/dist/modules/workflow-reviews.ee/workflow-review-inbox.service.js.map +1 -1
- package/dist/modules/workflow-reviews.ee/workflow-review-publish-guard.service.js +1 -1
- package/dist/modules/workflow-reviews.ee/workflow-review-publish-guard.service.js.map +1 -1
- package/dist/modules/workflow-reviews.ee/workflow-review-request.service.d.ts +9 -5
- package/dist/modules/workflow-reviews.ee/workflow-review-request.service.js +71 -40
- package/dist/modules/workflow-reviews.ee/workflow-review-request.service.js.map +1 -1
- package/dist/modules/workflow-reviews.ee/workflow-reviews.module.js +3 -0
- package/dist/modules/workflow-reviews.ee/workflow-reviews.module.js.map +1 -1
- package/dist/node-execution/ephemeral-node-executor.js +20 -13
- package/dist/node-execution/ephemeral-node-executor.js.map +1 -1
- package/dist/oauth/dcr-managed-fields.d.ts +6 -0
- package/dist/oauth/dcr-managed-fields.js +13 -0
- package/dist/oauth/dcr-managed-fields.js.map +1 -0
- package/dist/oauth/oauth.service.d.ts +1 -0
- package/dist/oauth/oauth.service.js +24 -25
- package/dist/oauth/oauth.service.js.map +1 -1
- package/dist/posthog/index.d.ts +2 -0
- package/dist/posthog/index.js +19 -0
- package/dist/posthog/index.js.map +1 -1
- package/dist/public-api/public-api-controller.registry.d.ts +1 -0
- package/dist/public-api/public-api-controller.registry.js +36 -35
- package/dist/public-api/public-api-controller.registry.js.map +1 -1
- package/dist/public-api/public-api-route-resolver.d.ts +38 -0
- package/dist/public-api/public-api-route-resolver.js +136 -0
- package/dist/public-api/public-api-route-resolver.js.map +1 -0
- package/dist/public-api/types.d.ts +3 -6
- package/dist/public-api/v1/controllers/index.d.ts +1 -0
- package/dist/public-api/v1/controllers/index.js +1 -0
- package/dist/public-api/v1/controllers/index.js.map +1 -1
- package/dist/public-api/v1/controllers/roles.public.controller.d.ts +11 -0
- package/dist/public-api/v1/controllers/roles.public.controller.js +65 -0
- package/dist/public-api/v1/controllers/roles.public.controller.js.map +1 -0
- package/dist/public-api/v1/controllers/tags.public.controller.js +9 -2
- package/dist/public-api/v1/controllers/tags.public.controller.js.map +1 -1
- package/dist/public-api/v1/controllers/workflows.public.controller.d.ts +10 -2
- package/dist/public-api/v1/controllers/workflows.public.controller.js +132 -4
- package/dist/public-api/v1/controllers/workflows.public.controller.js.map +1 -1
- package/dist/public-api/v1/handlers/data-tables/data-tables.rows.handler.js +7 -15
- package/dist/public-api/v1/handlers/data-tables/data-tables.rows.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/decorator-routed.handler.d.ts +2 -0
- package/dist/public-api/v1/handlers/decorator-routed.handler.js +10 -0
- package/dist/public-api/v1/handlers/decorator-routed.handler.js.map +1 -0
- package/dist/public-api/v1/handlers/discover/discover.service.js +54 -49
- package/dist/public-api/v1/handlers/discover/discover.service.js.map +1 -1
- package/dist/public-api/v1/handlers/executions/executions.handler.js +25 -65
- package/dist/public-api/v1/handlers/executions/executions.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/n8n-packages/n8n-packages.handler.js +2 -0
- package/dist/public-api/v1/handlers/n8n-packages/n8n-packages.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/workflows/workflows.handler.d.ts +0 -1
- package/dist/public-api/v1/handlers/workflows/workflows.handler.js +44 -122
- package/dist/public-api/v1/handlers/workflows/workflows.handler.js.map +1 -1
- package/dist/public-api/v1/openapi-gen/decorator-routes.d.ts +18 -0
- package/dist/public-api/v1/openapi-gen/decorator-routes.js +160 -0
- package/dist/public-api/v1/openapi-gen/decorator-routes.js.map +1 -0
- package/dist/public-api/v1/openapi-gen/generate.d.ts +25 -0
- package/dist/public-api/v1/openapi-gen/generate.js +149 -0
- package/dist/public-api/v1/openapi-gen/generate.js.map +1 -0
- package/dist/public-api/v1/openapi-gen/zod-extend.d.ts +1 -0
- package/dist/public-api/v1/openapi-gen/zod-extend.js +6 -0
- package/dist/public-api/v1/openapi-gen/zod-extend.js.map +1 -0
- package/dist/public-api/v1/openapi.yml +625 -166
- package/dist/public-api/v1/shared/middlewares/global.middleware.d.ts +1 -3
- package/dist/public-api/v1/shared/middlewares/global.middleware.js.map +1 -1
- package/dist/scaling/constants.d.ts +2 -2
- package/dist/scaling/constants.js +1 -0
- package/dist/scaling/constants.js.map +1 -1
- package/dist/scaling/pubsub/pubsub.event-map.d.ts +5 -1
- package/dist/scaling/pubsub/pubsub.types.d.ts +2 -1
- package/dist/server.js +1 -0
- package/dist/server.js.map +1 -1
- package/dist/{modules/mcp/tools/workflow-builder → services}/ai-gateway-eligibility.d.ts +1 -0
- package/dist/{modules/mcp/tools/workflow-builder → services}/ai-gateway-eligibility.js +7 -1
- package/dist/services/ai-gateway-eligibility.js.map +1 -0
- package/dist/services/ai-gateway.service.d.ts +2 -0
- package/dist/services/ai-gateway.service.js +17 -3
- package/dist/services/ai-gateway.service.js.map +1 -1
- package/dist/services/cache/cache.service.d.ts +2 -0
- package/dist/services/cache/cache.service.js +21 -0
- package/dist/services/cache/cache.service.js.map +1 -1
- package/dist/services/cache/redis.cache-manager.d.ts +1 -0
- package/dist/services/cache/redis.cache-manager.js +6 -0
- package/dist/services/cache/redis.cache-manager.js.map +1 -1
- package/dist/services/credentials-tester.service.d.ts +5 -1
- package/dist/services/credentials-tester.service.js +9 -3
- package/dist/services/credentials-tester.service.js.map +1 -1
- package/dist/services/folder.service.js.map +1 -1
- package/dist/services/free-ai-credits.service.js +1 -1
- package/dist/services/free-ai-credits.service.js.map +1 -1
- package/dist/services/frontend.service.js +3 -1
- package/dist/services/frontend.service.js.map +1 -1
- package/dist/services/node-resource-explorer.service.d.ts +13 -0
- package/dist/services/node-resource-explorer.service.js +117 -0
- package/dist/services/node-resource-explorer.service.js.map +1 -1
- package/dist/services/ownership-transfer/ownership-transfer.manifest.json +1 -1
- package/dist/services/project.service.ee.d.ts +3 -3
- package/dist/services/project.service.ee.js +4 -7
- package/dist/services/project.service.ee.js.map +1 -1
- package/dist/services/role-authorization.d.ts +3 -0
- package/dist/services/role-authorization.js +14 -0
- package/dist/services/role-authorization.js.map +1 -0
- package/dist/services/tag.service.d.ts +5 -2
- package/dist/services/tag.service.js +9 -2
- package/dist/services/tag.service.js.map +1 -1
- package/dist/task-runners/task-broker/auth/task-broker-auth.controller.d.ts +1 -0
- package/dist/task-runners/task-broker/auth/task-broker-auth.controller.js +2 -2
- package/dist/task-runners/task-broker/auth/task-broker-auth.controller.js.map +1 -1
- package/dist/task-runners/task-broker/auth/task-broker-auth.service.d.ts +6 -2
- package/dist/task-runners/task-broker/auth/task-broker-auth.service.js +8 -4
- package/dist/task-runners/task-broker/auth/task-broker-auth.service.js.map +1 -1
- package/dist/task-runners/task-broker/task-broker-server.d.ts +1 -0
- package/dist/task-runners/task-broker/task-broker-server.js +13 -3
- package/dist/task-runners/task-broker/task-broker-server.js.map +1 -1
- package/dist/task-runners/task-broker/task-broker-ws-server.d.ts +1 -0
- package/dist/task-runners/task-broker/task-broker-ws-server.js +8 -5
- package/dist/task-runners/task-broker/task-broker-ws-server.js.map +1 -1
- package/dist/task-runners/task-broker/task-broker.service.js +2 -9
- package/dist/task-runners/task-broker/task-broker.service.js.map +1 -1
- package/dist/task-runners/task-runner-lifecycle-events.d.ts +0 -1
- package/dist/task-runners/task-runner-process-base.d.ts +2 -2
- package/dist/task-runners/task-runner-process-base.js +14 -10
- package/dist/task-runners/task-runner-process-base.js.map +1 -1
- package/dist/task-runners/task-runner-process-js.d.ts +1 -2
- package/dist/task-runners/task-runner-process-js.js +4 -4
- package/dist/task-runners/task-runner-process-js.js.map +1 -1
- package/dist/task-runners/task-runner-process-py.d.ts +1 -2
- package/dist/task-runners/task-runner-process-py.js +2 -2
- package/dist/task-runners/task-runner-process-py.js.map +1 -1
- package/dist/utils/node-definition-dirs.d.ts +1 -0
- package/dist/utils/node-definition-dirs.js +24 -0
- package/dist/utils/node-definition-dirs.js.map +1 -0
- package/dist/webhooks/constants.d.ts +1 -0
- package/dist/webhooks/constants.js +2 -1
- package/dist/webhooks/constants.js.map +1 -1
- package/dist/webhooks/live-webhooks.d.ts +4 -2
- package/dist/webhooks/live-webhooks.js +25 -4
- package/dist/webhooks/live-webhooks.js.map +1 -1
- package/dist/webhooks/webhook-execution-context.d.ts +5 -2
- package/dist/webhooks/webhook-execution-context.js +10 -0
- package/dist/webhooks/webhook-execution-context.js.map +1 -1
- package/dist/webhooks/webhook-helpers.js +9 -8
- package/dist/webhooks/webhook-helpers.js.map +1 -1
- package/dist/webhooks/webhook.service.d.ts +5 -1
- package/dist/webhooks/webhook.service.js +52 -9
- package/dist/webhooks/webhook.service.js.map +1 -1
- package/dist/workflow-runner.js.map +1 -1
- package/dist/workflows/triggers/trigger-execution-context.factory.d.ts +3 -0
- package/dist/workflows/triggers/trigger-execution-context.factory.js +43 -38
- package/dist/workflows/triggers/trigger-execution-context.factory.js.map +1 -1
- package/dist/workflows/triggers/webhook-trigger-registrar.d.ts +0 -1
- package/dist/workflows/triggers/webhook-trigger-registrar.js +1 -16
- package/dist/workflows/triggers/webhook-trigger-registrar.js.map +1 -1
- package/dist/workflows/workflow-finder.service.d.ts +20 -31
- package/dist/workflows/workflow-finder.service.js +42 -9
- package/dist/workflows/workflow-finder.service.js.map +1 -1
- package/dist/workflows/workflow-mutation-hooks-proxy.service.d.ts +14 -0
- package/dist/workflows/workflow-mutation-hooks-proxy.service.js +35 -0
- package/dist/workflows/workflow-mutation-hooks-proxy.service.js.map +1 -0
- package/dist/workflows/workflow-sharing.service.d.ts +4 -1
- package/dist/workflows/workflow-sharing.service.js +14 -2
- package/dist/workflows/workflow-sharing.service.js.map +1 -1
- package/dist/workflows/workflow.service.d.ts +9 -6
- package/dist/workflows/workflow.service.ee.d.ts +3 -3
- package/dist/workflows/workflow.service.ee.js +20 -7
- package/dist/workflows/workflow.service.ee.js.map +1 -1
- package/dist/workflows/workflow.service.js +33 -9
- package/dist/workflows/workflow.service.js.map +1 -1
- package/package.json +43 -39
- package/templates/form-shell.handlebars +418 -0
- package/templates/form-trigger.handlebars +30 -1
- package/dist/modules/agents/integrations/platforms/slack-bridge-behavior.js.map +0 -1
- package/dist/modules/agents/integrations/platforms/slack-integration.js.map +0 -1
- package/dist/modules/agents/integrations/platforms/slack-operations.d.ts +0 -17
- package/dist/modules/agents/integrations/platforms/slack-operations.js.map +0 -1
- package/dist/modules/agents/integrations/platforms/slack-tool-definitions.d.ts +0 -48
- package/dist/modules/agents/integrations/platforms/slack-tool-definitions.js +0 -42
- package/dist/modules/agents/integrations/platforms/slack-tool-definitions.js.map +0 -1
- package/dist/modules/agents/integrations/slack-app-setup.service.d.ts +0 -54
- package/dist/modules/agents/integrations/slack-app-setup.service.js +0 -326
- package/dist/modules/agents/integrations/slack-app-setup.service.js.map +0 -1
- package/dist/modules/mcp/tools/workflow-builder/ai-gateway-eligibility.js.map +0 -1
- package/dist/public-api/v1/handlers/executions/executions.service.d.ts +0 -14
- package/dist/public-api/v1/handlers/executions/executions.service.js +0 -49
- package/dist/public-api/v1/handlers/executions/executions.service.js.map +0 -1
- package/dist/public-api/v1/handlers/workflows/workflows.service.d.ts +0 -13
- package/dist/public-api/v1/handlers/workflows/workflows.service.js +0 -98
- package/dist/public-api/v1/handlers/workflows/workflows.service.js.map +0 -1
- /package/dist/modules/agents/integrations/platforms/{slack-bridge-behavior.js → slack/slack-bridge-behavior.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TagRef, TagRename, TagResolutionFailure, TagResolutionFailureKind } from './tag.types';
|
|
1
|
+
import type { TagReconcile, TagRef, TagRename, TagResolutionFailure, TagResolutionFailureKind } from './tag.types';
|
|
2
2
|
import { TagConflictPolicy, TagMissingMode } from '../../n8n-packages.types';
|
|
3
3
|
export type TagDecisionFailure = Omit<TagResolutionFailure, 'kind' | 'sourceId' | 'name' | 'usedByWorkflows'> & {
|
|
4
4
|
kind: Exclude<TagResolutionFailureKind, 'permission-denied'>;
|
|
@@ -14,6 +14,9 @@ export type TagEffect = {
|
|
|
14
14
|
} | {
|
|
15
15
|
action: 'rename';
|
|
16
16
|
rename: TagRename;
|
|
17
|
+
} | {
|
|
18
|
+
action: 'reconcile';
|
|
19
|
+
reconcile: TagReconcile;
|
|
17
20
|
} | {
|
|
18
21
|
action: 'drop';
|
|
19
22
|
tag: TagRef;
|
|
@@ -4,7 +4,7 @@ exports.decideTagImportAction = decideTagImportAction;
|
|
|
4
4
|
const n8n_packages_types_1 = require("../../n8n-packages.types");
|
|
5
5
|
const TAG_NAME_MAX_LENGTH = 24;
|
|
6
6
|
const TAG_ID_MAX_LENGTH = 36;
|
|
7
|
-
const
|
|
7
|
+
const FORBIDDEN_CHARS = /[\p{Cc}\p{Cs}]/u;
|
|
8
8
|
function decideTagImportAction(requirement, targetTagWithSameId, nameHolder, missingMode, conflictPolicy) {
|
|
9
9
|
const sourceId = requirement.id;
|
|
10
10
|
const name = requirement.name.trim();
|
|
@@ -44,6 +44,12 @@ function decideForAbsentId(sourceId, name, nameHolder, missingMode, conflictPoli
|
|
|
44
44
|
if (conflictPolicy === n8n_packages_types_1.TagConflictPolicy.Skip) {
|
|
45
45
|
return { action: 'drop', tag: { id: sourceId, name } };
|
|
46
46
|
}
|
|
47
|
+
if (conflictPolicy === n8n_packages_types_1.TagConflictPolicy.Rename) {
|
|
48
|
+
return (invalidId(sourceId, name) ?? {
|
|
49
|
+
action: 'reconcile',
|
|
50
|
+
reconcile: { id: sourceId, name, oldId: nameHolder.id },
|
|
51
|
+
});
|
|
52
|
+
}
|
|
47
53
|
return {
|
|
48
54
|
action: 'fail',
|
|
49
55
|
failure: { kind: 'name-collision', sourceId, name, existingTagId: nameHolder.id },
|
|
@@ -53,7 +59,7 @@ function decideForAbsentId(sourceId, name, nameHolder, missingMode, conflictPoli
|
|
|
53
59
|
invalidId(sourceId, name) ?? { action: 'create', tag: { id: sourceId, name } });
|
|
54
60
|
}
|
|
55
61
|
function invalidName(name, sourceId) {
|
|
56
|
-
if (
|
|
62
|
+
if (FORBIDDEN_CHARS.test(name)) {
|
|
57
63
|
return { action: 'fail', failure: { kind: 'invalid-name', sourceId, name } };
|
|
58
64
|
}
|
|
59
65
|
const length = [...name].length;
|
|
@@ -62,8 +68,9 @@ function invalidName(name, sourceId) {
|
|
|
62
68
|
return { action: 'fail', failure: { kind: 'invalid-name', sourceId, name } };
|
|
63
69
|
}
|
|
64
70
|
function invalidId(sourceId, name) {
|
|
65
|
-
if (sourceId.length <= TAG_ID_MAX_LENGTH)
|
|
71
|
+
if (sourceId.length <= TAG_ID_MAX_LENGTH && !FORBIDDEN_CHARS.test(sourceId)) {
|
|
66
72
|
return undefined;
|
|
73
|
+
}
|
|
67
74
|
return { action: 'fail', failure: { kind: 'invalid-id', sourceId, name } };
|
|
68
75
|
}
|
|
69
76
|
//# sourceMappingURL=tag-import-decision.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tag-import-decision.js","sourceRoot":"","sources":["../../../../../src/modules/n8n-packages/entities/tag/tag-import-decision.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"tag-import-decision.js","sourceRoot":"","sources":["../../../../../src/modules/n8n-packages/entities/tag/tag-import-decision.ts"],"names":[],"mappings":";;;AAOA,iEAA6E;AAsB7E,MAAM,mBAAmB,GAAG,EAAE,CAAC;AAI/B,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAM7B,MAAM,eAAe,GAAG,iBAAiB,CAAC;AAU1C,+BACC,WAAmB,EACnB,mBAAuC,EACvC,UAA8B,EAC9B,WAA2B,EAC3B,cAAiC;IAEjC,MAAM,QAAQ,GAAG,WAAW,CAAC,EAAE,CAAC;IAChC,MAAM,IAAI,GAAG,WAAW,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;IAErC,IAAI,mBAAmB,EAAE,CAAC;QACzB,OAAO,kBAAkB,CAAC,QAAQ,EAAE,IAAI,EAAE,mBAAmB,EAAE,UAAU,EAAE,cAAc,CAAC,CAAC;IAC5F,CAAC;IAED,OAAO,iBAAiB,CAAC,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,WAAW,EAAE,cAAc,CAAC,CAAC;AACnF,CAAC;AAGD,SAAS,kBAAkB,CAC1B,QAAgB,EAChB,IAAY,EACZ,SAAiB,EACjB,UAA8B,EAC9B,cAAiC;IAEjC,IAAI,SAAS,CAAC,IAAI,KAAK,IAAI;QAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;IAE5E,IAAI,cAAc,KAAK,sCAAiB,CAAC,IAAI,EAAE,CAAC;QAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,CAAC;IACxD,CAAC;IAED,IAAI,cAAc,KAAK,sCAAiB,CAAC,MAAM,IAAI,CAAC,UAAU,EAAE,CAAC;QAChE,OAAO,CACN,WAAW,CAAC,IAAI,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
|
|
1
1
|
import { GlobalConfig } from '@n8n/config';
|
|
2
2
|
import { TagService } from '../../../../services/tag.service';
|
|
3
|
-
import type { TagImportPlan, TagImportRequest } from './tag.types';
|
|
3
|
+
import type { ReferencingWorkflow, TagImportPlan, TagImportRequest } from './tag.types';
|
|
4
4
|
import type { ImportContext } from '../../n8n-packages.types';
|
|
5
|
-
import type { PreparedWorkflow } from '../workflow/workflow-import.types';
|
|
6
|
-
type ReferencingWorkflow = Pick<PreparedWorkflow, 'sourceWorkflowId' | 'tagIds'>;
|
|
7
5
|
export declare class TagImporter {
|
|
8
6
|
private readonly tagService;
|
|
9
7
|
private readonly globalConfig;
|
|
@@ -11,4 +9,3 @@ export declare class TagImporter {
|
|
|
11
9
|
plan(context: ImportContext, request: TagImportRequest, appliedWorkflows: ReferencingWorkflow[]): Promise<TagImportPlan>;
|
|
12
10
|
apply(context: ImportContext, plan: TagImportPlan): Promise<void>;
|
|
13
11
|
}
|
|
14
|
-
export {};
|
|
@@ -17,6 +17,7 @@ const n8n_workflow_1 = require("n8n-workflow");
|
|
|
17
17
|
const forbidden_error_1 = require("../../../../errors/response-errors/forbidden.error");
|
|
18
18
|
const tag_service_1 = require("../../../../services/tag.service");
|
|
19
19
|
const tag_import_decision_1 = require("./tag-import-decision");
|
|
20
|
+
const tag_types_1 = require("./tag.types");
|
|
20
21
|
let TagImporter = class TagImporter {
|
|
21
22
|
constructor(tagService, globalConfig) {
|
|
22
23
|
this.tagService = tagService;
|
|
@@ -27,6 +28,7 @@ let TagImporter = class TagImporter {
|
|
|
27
28
|
matched: [],
|
|
28
29
|
creations: [],
|
|
29
30
|
renames: [],
|
|
31
|
+
reconciles: [],
|
|
30
32
|
dropped: [],
|
|
31
33
|
failures: [],
|
|
32
34
|
};
|
|
@@ -56,6 +58,8 @@ let TagImporter = class TagImporter {
|
|
|
56
58
|
plan.creations.push(effect.tag);
|
|
57
59
|
else if (effect.action === 'rename')
|
|
58
60
|
plan.renames.push(effect.rename);
|
|
61
|
+
else if (effect.action === 'reconcile')
|
|
62
|
+
plan.reconciles.push(effect.reconcile);
|
|
59
63
|
else if (effect.action === 'drop')
|
|
60
64
|
plan.dropped.push(effect.tag);
|
|
61
65
|
else
|
|
@@ -67,28 +71,32 @@ let TagImporter = class TagImporter {
|
|
|
67
71
|
.map(({ sourceWorkflowId }) => sourceWorkflowId);
|
|
68
72
|
plan.failures = decisionFailures.map((failure) => ({
|
|
69
73
|
...failure,
|
|
70
|
-
usedByWorkflows: sortedUnique(sourceWorkflowIdsReferencing(failure.sourceId)),
|
|
74
|
+
usedByWorkflows: (0, tag_types_1.sortedUnique)(sourceWorkflowIdsReferencing(failure.sourceId)),
|
|
71
75
|
}));
|
|
72
76
|
if (plan.creations.length > 0 && !(0, permissions_1.hasGlobalScope)(context.user, 'tag:create')) {
|
|
73
77
|
plan.failures.push(permissionFailure('tag:create', plan.creations.map(({ id }) => id), sourceWorkflowIdsReferencing));
|
|
74
78
|
}
|
|
75
|
-
|
|
76
|
-
|
|
79
|
+
const updatedTagIds = [...plan.renames, ...plan.reconciles].map(({ id }) => id);
|
|
80
|
+
if (updatedTagIds.length > 0 && !(0, permissions_1.hasGlobalScope)(context.user, 'tag:update')) {
|
|
81
|
+
plan.failures.push(permissionFailure('tag:update', updatedTagIds, sourceWorkflowIdsReferencing));
|
|
77
82
|
}
|
|
78
83
|
return plan;
|
|
79
84
|
}
|
|
80
85
|
async apply(context, plan) {
|
|
81
|
-
if (plan.creations.length === 0 && plan.renames.length === 0)
|
|
86
|
+
if (plan.creations.length === 0 && plan.renames.length === 0 && plan.reconciles.length === 0) {
|
|
82
87
|
return;
|
|
88
|
+
}
|
|
83
89
|
if (plan.creations.length > 0 && !(0, permissions_1.hasGlobalScope)(context.user, 'tag:create')) {
|
|
84
90
|
throw new forbidden_error_1.ForbiddenError('User is missing a scope required to create a tag');
|
|
85
91
|
}
|
|
86
|
-
if (plan.renames.length > 0
|
|
87
|
-
|
|
92
|
+
if ((plan.renames.length > 0 || plan.reconciles.length > 0) &&
|
|
93
|
+
!(0, permissions_1.hasGlobalScope)(context.user, 'tag:update')) {
|
|
94
|
+
throw new forbidden_error_1.ForbiddenError('User is missing a scope required to rename or reconcile a tag');
|
|
88
95
|
}
|
|
89
96
|
const existingById = new Map((await this.tagService.getByIds([
|
|
90
97
|
...plan.creations.map(({ id }) => id),
|
|
91
98
|
...plan.renames.map(({ id }) => id),
|
|
99
|
+
...plan.reconciles.flatMap(({ id, oldId }) => [id, oldId]),
|
|
92
100
|
])).map((tag) => [tag.id, tag]));
|
|
93
101
|
for (const creation of plan.creations) {
|
|
94
102
|
if (existingById.has(creation.id))
|
|
@@ -101,6 +109,13 @@ let TagImporter = class TagImporter {
|
|
|
101
109
|
continue;
|
|
102
110
|
await this.tagService.save(this.tagService.toEntity({ id: rename.id, name: rename.to }), 'update');
|
|
103
111
|
}
|
|
112
|
+
for (const reconcile of plan.reconciles) {
|
|
113
|
+
if (existingById.has(reconcile.id))
|
|
114
|
+
continue;
|
|
115
|
+
if (!existingById.has(reconcile.oldId))
|
|
116
|
+
continue;
|
|
117
|
+
await this.tagService.reconcileTagId(reconcile.oldId, reconcile.id);
|
|
118
|
+
}
|
|
104
119
|
}
|
|
105
120
|
};
|
|
106
121
|
exports.TagImporter = TagImporter;
|
|
@@ -111,9 +126,6 @@ exports.TagImporter = TagImporter = __decorate([
|
|
|
111
126
|
function toTagRef(tag) {
|
|
112
127
|
return { id: tag.id, name: tag.name };
|
|
113
128
|
}
|
|
114
|
-
function sortedUnique(values) {
|
|
115
|
-
return [...new Set(values)].sort();
|
|
116
|
-
}
|
|
117
129
|
function duplicateWrittenNameFailures(plan) {
|
|
118
130
|
const nameCounts = new Map();
|
|
119
131
|
const writtenNames = [
|
|
@@ -136,7 +148,7 @@ function permissionFailure(missingScope, tagIds, sourceWorkflowIdsReferencing) {
|
|
|
136
148
|
return {
|
|
137
149
|
kind: 'permission-denied',
|
|
138
150
|
missingScope,
|
|
139
|
-
usedByWorkflows: sortedUnique(tagIds.flatMap(sourceWorkflowIdsReferencing)),
|
|
151
|
+
usedByWorkflows: (0, tag_types_1.sortedUnique)(tagIds.flatMap(sourceWorkflowIdsReferencing)),
|
|
140
152
|
};
|
|
141
153
|
}
|
|
142
154
|
//# sourceMappingURL=tag-importer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tag-importer.js","sourceRoot":"","sources":["../../../../../src/modules/n8n-packages/entities/tag/tag-importer.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,wCAA2C;AAC3C,gCAAkC;AAClC,kDAAkD;AAClD,+CAAyC;AAEzC,8EAA0E;AAC1E,wDAAoD;AAEpD,+DAA8D;
|
|
1
|
+
{"version":3,"file":"tag-importer.js","sourceRoot":"","sources":["../../../../../src/modules/n8n-packages/entities/tag/tag-importer.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,wCAA2C;AAC3C,gCAAkC;AAClC,kDAAkD;AAClD,+CAAyC;AAEzC,8EAA0E;AAC1E,wDAAoD;AAEpD,+DAA8D;AAE9D,2CAA2C;AAWpC,IAAM,WAAW,GAAjB,MAAM,WAAW;IACvB,YACkB,UAAsB,EACtB,YAA0B;0BAD1B,UAAU;4BACV,YAAY;IAC3B,CAAC;IAQJ,KAAK,CAAC,IAAI,CACT,OAAsB,EACtB,OAAyB,EACzB,gBAAuC;QAEvC,MAAM,IAAI,GAAkB;YAC3B,OAAO,EAAE,EAAE;YACX,SAAS,EAAE,EAAE;YACb,OAAO,EAAE,EAAE;YACX,UAAU,EAAE,EAAE;YACd,OAAO,EAAE,EAAE;YACX,QAAQ,EAAE,EAAE;SACZ,CAAC;QAEF,IAAI,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,QAAQ;YAAE,OAAO,IAAI,CAAC;QAEjD,MAAM,gBAAgB,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,MAAM,IAA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QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CACxF;KACF,CAAC;AACH,CAAC;AAED,SAAS,iBAAiB,CACzB,YAAyC,EACzC,MAAgB,EAChB,4BAAyD;IAEzD,OAAO;QACN,IAAI,EAAE,mBAAmB;QACzB,YAAY;QACZ,eAAe,EAAE,IAAA,wBAAY,EAAC,MAAM,CAAC,OAAO,CAAC,4BAA4B,CAAC,CAAC;KAC3E,CAAC;AACH,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { TagConflictPolicy, TagMissingMode } from '../../n8n-packages.types';
|
|
2
2
|
import type { PackageTagRequirement } from '../../spec/requirements.schema';
|
|
3
|
+
import type { PreparedWorkflow } from '../workflow/workflow-import.types';
|
|
3
4
|
export interface WorkflowTagUsage {
|
|
4
5
|
workflowId: string;
|
|
5
6
|
tag: {
|
|
@@ -23,6 +24,11 @@ export interface TagRename {
|
|
|
23
24
|
from: string;
|
|
24
25
|
to: string;
|
|
25
26
|
}
|
|
27
|
+
export interface TagReconcile {
|
|
28
|
+
id: string;
|
|
29
|
+
name: string;
|
|
30
|
+
oldId: string;
|
|
31
|
+
}
|
|
26
32
|
export type TagResolutionFailureKind = 'rename-drift' | 'name-collision' | 'invalid-name' | 'invalid-id' | 'permission-denied';
|
|
27
33
|
export type TagResolutionFailure = {
|
|
28
34
|
kind: TagResolutionFailureKind;
|
|
@@ -42,7 +48,14 @@ export interface TagImportPlan {
|
|
|
42
48
|
matched: TagRef[];
|
|
43
49
|
creations: TagRef[];
|
|
44
50
|
renames: TagRename[];
|
|
51
|
+
reconciles: TagReconcile[];
|
|
45
52
|
dropped: TagRef[];
|
|
46
53
|
failures: TagResolutionFailure[];
|
|
47
54
|
}
|
|
55
|
+
export type ReferencingWorkflow = Pick<PreparedWorkflow, 'sourceWorkflowId' | 'tagIds'>;
|
|
48
56
|
export declare function droppedTagIds(plan: TagImportPlan): ReadonlySet<string>;
|
|
57
|
+
export declare function sortedUnique(values: string[]): string[];
|
|
58
|
+
export declare function contestedReconcileTargetFailures(scopes: Array<{
|
|
59
|
+
tagPlan: TagImportPlan;
|
|
60
|
+
workflows: ReferencingWorkflow[];
|
|
61
|
+
}>): TagResolutionFailure[];
|
|
@@ -2,9 +2,45 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.compareTagsByName = void 0;
|
|
4
4
|
exports.droppedTagIds = droppedTagIds;
|
|
5
|
+
exports.sortedUnique = sortedUnique;
|
|
6
|
+
exports.contestedReconcileTargetFailures = contestedReconcileTargetFailures;
|
|
5
7
|
const compareTagsByName = (a, b) => a.name.localeCompare(b.name, 'en') || a.id.localeCompare(b.id, 'en');
|
|
6
8
|
exports.compareTagsByName = compareTagsByName;
|
|
7
9
|
function droppedTagIds(plan) {
|
|
8
10
|
return new Set(plan.dropped.map(({ id }) => id));
|
|
9
11
|
}
|
|
12
|
+
function sortedUnique(values) {
|
|
13
|
+
return [...new Set(values)].sort();
|
|
14
|
+
}
|
|
15
|
+
function contestedReconcileTargetFailures(scopes) {
|
|
16
|
+
const reconcilesByKey = new Map();
|
|
17
|
+
for (const { tagPlan } of scopes) {
|
|
18
|
+
for (const reconcile of tagPlan.reconciles) {
|
|
19
|
+
reconcilesByKey.set(JSON.stringify([reconcile.id, reconcile.oldId]), reconcile);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
if (reconcilesByKey.size === 0)
|
|
23
|
+
return [];
|
|
24
|
+
const reconciles = [...reconcilesByKey.values()];
|
|
25
|
+
const claimedTargetIds = new Set(scopes.flatMap(({ tagPlan }) => [
|
|
26
|
+
...tagPlan.matched.map(({ id }) => id),
|
|
27
|
+
...tagPlan.renames.map(({ id }) => id),
|
|
28
|
+
]));
|
|
29
|
+
const oldIdCounts = new Map();
|
|
30
|
+
for (const { oldId } of reconciles) {
|
|
31
|
+
oldIdCounts.set(oldId, (oldIdCounts.get(oldId) ?? 0) + 1);
|
|
32
|
+
}
|
|
33
|
+
const sourceWorkflowIdsReferencing = (tagId) => scopes.flatMap(({ workflows }) => workflows
|
|
34
|
+
.filter(({ tagIds }) => tagIds?.includes(tagId))
|
|
35
|
+
.map(({ sourceWorkflowId }) => sourceWorkflowId));
|
|
36
|
+
return reconciles
|
|
37
|
+
.filter(({ oldId }) => claimedTargetIds.has(oldId) || (oldIdCounts.get(oldId) ?? 0) > 1)
|
|
38
|
+
.map(({ id, name, oldId }) => ({
|
|
39
|
+
kind: 'name-collision',
|
|
40
|
+
sourceId: id,
|
|
41
|
+
name,
|
|
42
|
+
existingTagId: oldId,
|
|
43
|
+
usedByWorkflows: sortedUnique(sourceWorkflowIdsReferencing(id)),
|
|
44
|
+
}));
|
|
45
|
+
}
|
|
10
46
|
//# sourceMappingURL=tag.types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tag.types.js","sourceRoot":"","sources":["../../../../../src/modules/n8n-packages/entities/tag/tag.types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tag.types.js","sourceRoot":"","sources":["../../../../../src/modules/n8n-packages/entities/tag/tag.types.ts"],"names":[],"mappings":";;;;;;AAUO,MAAM,iBAAiB,GAAG,CAChC,CAA+B,EAC/B,CAA+B,EAC9B,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;AAH7D,QAAA,iBAAiB,GAAjB,iBAAiB,CAG4C;AAkE1E,uBAA8B,IAAmB;IAChD,OAAO,IAAI,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AAClD,CAAC;AAED,sBAA6B,MAAgB;IAC5C,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,MAAM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E,EAAE,EAAE,CAChC,SAAS;SACP,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC;SAC/C,GAAG,CAAC,CAAC,EAAE,gBAAgB,EAAE,EAAE,EAAE,CAAC,gBAAgB,CAAC,CACjD,CAAC;IAEH,OAAO,UAAU;SACf,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,gBAAgB,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;SACvF,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC;QAC9B,IAAI,EAAE,gBAAgB;QACtB,QAAQ,EAAE,EAAE;QACZ,IAAI;QACJ,aAAa,EAAE,KAAK;QACpB,eAAe,EAAE,YAAY,CAAC,4BAA4B,CAAC,EAAE,CAAC,CAAC;KAC/D,CAAC,CAAC,CAAC;AACN,CAAC"}
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { VariablesService } from '../../../../environments.ee/variables/variables.service.ee';
|
|
2
|
-
import type { VariableApplyResult, VariableCreation, VariableImportPlan, VariableImportRequest, VariableLimitFailure, VariableResolutionFailure } from './variable.types';
|
|
2
|
+
import type { VariableApplyResult, VariableConflict, VariableCreation, VariableImportPlan, VariableImportRequest, VariableLimitFailure, VariableOverwrite, VariableResolutionFailure } from './variable.types';
|
|
3
3
|
import type { ImportContext } from '../../n8n-packages.types';
|
|
4
4
|
export declare class VariableImporter {
|
|
5
5
|
private readonly variablesService;
|
|
6
6
|
constructor(variablesService: VariablesService);
|
|
7
|
-
plan(context: ImportContext, request: VariableImportRequest
|
|
8
|
-
projectPendingCreation?: boolean;
|
|
9
|
-
}): Promise<VariableImportPlan>;
|
|
7
|
+
plan(context: ImportContext, request: VariableImportRequest): Promise<VariableImportPlan>;
|
|
10
8
|
quotaFailure(creations: VariableCreation[]): Promise<VariableLimitFailure | undefined>;
|
|
11
9
|
blockingFailures(request: VariableImportRequest, plan: VariableImportPlan): VariableResolutionFailure[];
|
|
10
|
+
blockingConflicts(request: VariableImportRequest, plan: VariableImportPlan): VariableConflict[];
|
|
12
11
|
apply(context: ImportContext, plan: VariableImportPlan): Promise<VariableApplyResult>;
|
|
13
12
|
private variableExistsAtDestination;
|
|
14
|
-
private
|
|
13
|
+
private targetScopes;
|
|
14
|
+
assertCanCreate(context: ImportContext, creations: VariableCreation[], projectPendingCreation: boolean): Promise<void>;
|
|
15
|
+
assertCanUpdate(context: ImportContext, overwrites: VariableOverwrite[]): Promise<void>;
|
|
15
16
|
}
|
|
@@ -19,14 +19,16 @@ const variable_count_limit_reached_error_1 = require("../../../../errors/variabl
|
|
|
19
19
|
const check_access_1 = require("../../../../permissions.ee/check-access");
|
|
20
20
|
const variable_missing_mode_1 = require("./variable-missing-mode");
|
|
21
21
|
const variable_types_1 = require("./variable.types");
|
|
22
|
+
const n8n_packages_types_1 = require("../../n8n-packages.types");
|
|
22
23
|
let VariableImporter = class VariableImporter {
|
|
23
24
|
constructor(variablesService) {
|
|
24
25
|
this.variablesService = variablesService;
|
|
25
26
|
}
|
|
26
|
-
async plan(context, request
|
|
27
|
+
async plan(context, request) {
|
|
27
28
|
const requirements = request.requirements ?? [];
|
|
28
|
-
if (requirements.length === 0)
|
|
29
|
-
return { matched: [], missing: [], creations: [] };
|
|
29
|
+
if (requirements.length === 0) {
|
|
30
|
+
return { matched: [], missing: [], creations: [], conflicts: [], overwrites: [] };
|
|
31
|
+
}
|
|
30
32
|
const allVariables = await this.variablesService.getAllCached();
|
|
31
33
|
const variablesByKey = new Map();
|
|
32
34
|
for (const variable of allVariables) {
|
|
@@ -39,26 +41,46 @@ let VariableImporter = class VariableImporter {
|
|
|
39
41
|
const matched = [];
|
|
40
42
|
const missing = [];
|
|
41
43
|
const creations = [];
|
|
42
|
-
const
|
|
44
|
+
const conflicts = [];
|
|
45
|
+
const overwrites = [];
|
|
46
|
+
const createsMissing = (0, variable_missing_mode_1.variableMissingModeCreates)(request.missingMode);
|
|
47
|
+
const usesPackageValue = (0, variable_missing_mode_1.variableMissingModeUsesPackageValue)(request.missingMode);
|
|
48
|
+
const comparesValues = request.conflictPolicy !== n8n_packages_types_1.VariableConflictPolicy.KeepExisting;
|
|
49
|
+
const overwritesConflicts = request.conflictPolicy === n8n_packages_types_1.VariableConflictPolicy.Overwrite;
|
|
43
50
|
for (const requirement of requirements) {
|
|
44
51
|
const picked = (0, n8n_workflow_1.pickVariableForProject)(variablesByKey.get(requirement.name) ?? [], requirement.name, context.projectId);
|
|
45
52
|
if (picked) {
|
|
46
53
|
matched.push(requirement.name);
|
|
54
|
+
const packageValue = requirement.packageValue;
|
|
55
|
+
if (!comparesValues || !packageValue || packageValue === picked.value) {
|
|
56
|
+
continue;
|
|
57
|
+
}
|
|
58
|
+
const scope = picked.project ? { projectId: picked.project.id } : {};
|
|
59
|
+
const usedByWorkflows = [...new Set(requirement.usedByWorkflows)].sort();
|
|
60
|
+
conflicts.push({ name: requirement.name, ...scope, usedByWorkflows });
|
|
61
|
+
if (overwritesConflicts) {
|
|
62
|
+
overwrites.push({
|
|
63
|
+
variableId: picked.id,
|
|
64
|
+
name: requirement.name,
|
|
65
|
+
...scope,
|
|
66
|
+
value: packageValue,
|
|
67
|
+
usedByWorkflows,
|
|
68
|
+
});
|
|
69
|
+
}
|
|
47
70
|
continue;
|
|
48
71
|
}
|
|
49
72
|
missing.push((0, variable_types_1.createFailure)(requirement));
|
|
50
|
-
if (
|
|
73
|
+
if (createsMissing) {
|
|
74
|
+
const value = usesPackageValue ? requirement.packageValue : undefined;
|
|
51
75
|
creations.push({
|
|
52
76
|
name: requirement.name,
|
|
53
77
|
...(requirement.globalPlacement ? {} : { projectId: context.projectId }),
|
|
78
|
+
...(value !== undefined ? { value } : {}),
|
|
54
79
|
usedByWorkflows: [...new Set(requirement.usedByWorkflows)].sort(),
|
|
55
80
|
});
|
|
56
81
|
}
|
|
57
82
|
}
|
|
58
|
-
|
|
59
|
-
await this.assertCanCreate(context, creations, options.projectPendingCreation ?? false);
|
|
60
|
-
}
|
|
61
|
-
return { matched, missing, creations };
|
|
83
|
+
return { matched, missing, creations, conflicts, overwrites };
|
|
62
84
|
}
|
|
63
85
|
async quotaFailure(creations) {
|
|
64
86
|
if (creations.length === 0)
|
|
@@ -68,10 +90,13 @@ let VariableImporter = class VariableImporter {
|
|
|
68
90
|
blockingFailures(request, plan) {
|
|
69
91
|
return (0, variable_missing_mode_1.variableBlockingFailures)(request.missingMode, plan);
|
|
70
92
|
}
|
|
93
|
+
blockingConflicts(request, plan) {
|
|
94
|
+
return request.conflictPolicy === n8n_packages_types_1.VariableConflictPolicy.Fail ? plan.conflicts : [];
|
|
95
|
+
}
|
|
71
96
|
async apply(context, plan) {
|
|
97
|
+
const created = [];
|
|
72
98
|
const stubbed = [];
|
|
73
99
|
const skippedExisting = [];
|
|
74
|
-
let createdCount = 0;
|
|
75
100
|
for (const creation of plan.creations) {
|
|
76
101
|
if (await this.variableExistsAtDestination(creation)) {
|
|
77
102
|
skippedExisting.push(creation.name);
|
|
@@ -81,11 +106,15 @@ let VariableImporter = class VariableImporter {
|
|
|
81
106
|
await this.variablesService.create(context.user, {
|
|
82
107
|
key: creation.name,
|
|
83
108
|
type: 'string',
|
|
84
|
-
value: '',
|
|
109
|
+
value: creation.value ?? '',
|
|
85
110
|
...(creation.projectId ? { projectId: creation.projectId } : {}),
|
|
86
111
|
});
|
|
87
|
-
|
|
88
|
-
|
|
112
|
+
if (creation.value) {
|
|
113
|
+
created.push(creation.name);
|
|
114
|
+
}
|
|
115
|
+
else {
|
|
116
|
+
stubbed.push(creation.name);
|
|
117
|
+
}
|
|
89
118
|
}
|
|
90
119
|
catch (error) {
|
|
91
120
|
if (error instanceof variable_count_limit_reached_error_1.VariableCountLimitReachedError &&
|
|
@@ -96,10 +125,21 @@ let VariableImporter = class VariableImporter {
|
|
|
96
125
|
throw error;
|
|
97
126
|
}
|
|
98
127
|
}
|
|
128
|
+
const updated = [];
|
|
129
|
+
for (const overwrite of plan.overwrites) {
|
|
130
|
+
const current = await this.variablesService.getCached(overwrite.variableId);
|
|
131
|
+
if (!current || current.value === overwrite.value)
|
|
132
|
+
continue;
|
|
133
|
+
await this.variablesService.update(context.user, overwrite.variableId, {
|
|
134
|
+
value: overwrite.value,
|
|
135
|
+
});
|
|
136
|
+
updated.push(overwrite.name);
|
|
137
|
+
}
|
|
99
138
|
return {
|
|
139
|
+
created: [...new Set(created)],
|
|
100
140
|
stubbed: [...new Set(stubbed)],
|
|
101
141
|
skippedExisting: [...new Set(skippedExisting)],
|
|
102
|
-
|
|
142
|
+
updated: [...new Set(updated)],
|
|
103
143
|
};
|
|
104
144
|
}
|
|
105
145
|
async variableExistsAtDestination(creation) {
|
|
@@ -107,21 +147,45 @@ let VariableImporter = class VariableImporter {
|
|
|
107
147
|
const allVariables = await this.variablesService.getAllCached();
|
|
108
148
|
return allVariables.some((variable) => (0, variable_types_1.destinationKey)({ name: variable.key, projectId: variable.project?.id }) === destination);
|
|
109
149
|
}
|
|
150
|
+
targetScopes(targets, skipProjectId) {
|
|
151
|
+
const projectIds = new Set();
|
|
152
|
+
for (const { projectId } of targets) {
|
|
153
|
+
if (projectId && projectId !== skipProjectId)
|
|
154
|
+
projectIds.add(projectId);
|
|
155
|
+
}
|
|
156
|
+
return {
|
|
157
|
+
touchesGlobal: targets.some(({ projectId }) => !projectId),
|
|
158
|
+
projectIds,
|
|
159
|
+
};
|
|
160
|
+
}
|
|
110
161
|
async assertCanCreate(context, creations, projectPendingCreation) {
|
|
111
|
-
const
|
|
112
|
-
|
|
113
|
-
if (needsGlobal && !(0, permissions_1.hasGlobalScope)(context.user, 'variable:create')) {
|
|
162
|
+
const { touchesGlobal, projectIds } = this.targetScopes(creations, projectPendingCreation ? context.projectId : undefined);
|
|
163
|
+
if (touchesGlobal && !(0, permissions_1.hasGlobalScope)(context.user, 'variable:create')) {
|
|
114
164
|
throw new forbidden_error_1.ForbiddenError('You are not allowed to create global variables');
|
|
115
165
|
}
|
|
116
|
-
|
|
117
|
-
const
|
|
118
|
-
projectId
|
|
166
|
+
for (const projectId of projectIds) {
|
|
167
|
+
const projectVariableCreationAllowed = await (0, check_access_1.userHasScopes)(context.user, ['projectVariable:create'], false, {
|
|
168
|
+
projectId,
|
|
119
169
|
});
|
|
120
|
-
if (!
|
|
170
|
+
if (!projectVariableCreationAllowed) {
|
|
121
171
|
throw new forbidden_error_1.ForbiddenError('You are not allowed to create variables in this project');
|
|
122
172
|
}
|
|
123
173
|
}
|
|
124
174
|
}
|
|
175
|
+
async assertCanUpdate(context, overwrites) {
|
|
176
|
+
const { touchesGlobal, projectIds } = this.targetScopes(overwrites);
|
|
177
|
+
if (touchesGlobal && !(0, permissions_1.hasGlobalScope)(context.user, 'variable:update')) {
|
|
178
|
+
throw new forbidden_error_1.ForbiddenError('You are not allowed to update global variables');
|
|
179
|
+
}
|
|
180
|
+
for (const projectId of projectIds) {
|
|
181
|
+
const projectVariableUpdateAllowed = await (0, check_access_1.userHasScopes)(context.user, ['projectVariable:update'], false, {
|
|
182
|
+
projectId,
|
|
183
|
+
});
|
|
184
|
+
if (!projectVariableUpdateAllowed) {
|
|
185
|
+
throw new forbidden_error_1.ForbiddenError('You are not allowed to update variables in this project');
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
}
|
|
125
189
|
};
|
|
126
190
|
exports.VariableImporter = VariableImporter;
|
|
127
191
|
exports.VariableImporter = VariableImporter = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"variable-importer.js","sourceRoot":"","sources":["../../../../../src/modules/n8n-packages/entities/variable/variable-importer.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,gCAAkC;AAClC,kDAAkD;AAClD,+CAAsD;AAEtD,2FAAoF;AACpF,8EAA0E;AAC1E,oGAA6F;AAC7F,gEAA8D;AAE9D,
|
|
1
|
+
{"version":3,"file":"variable-importer.js","sourceRoot":"","sources":["../../../../../src/modules/n8n-packages/entities/variable/variable-importer.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,gCAAkC;AAClC,kDAAkD;AAClD,+CAAsD;AAEtD,2FAAoF;AACpF,8EAA0E;AAC1E,oGAA6F;AAC7F,gEAA8D;AAE9D,mEAIiC;AACjC,qDAK0B;AAW1B,iEAAkE;AAI3D,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IAC5B,YAA6B,gBAAkC;gCAAlC,gBAAgB;IAAqB,CAAC;IAGnE,KAAK,CAAC,IAAI,CAAC,OAAsB,EAAE,OAA8B;QAChE,MAAM,YAAY,GAAG,OAAO,CAAC,YAAY,IAAI,EAAE,CAAC;QAChD,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC/B,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC;QACnF,CAAC;QAED,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,YAAY,EAAE,CAAC;QAChE,MAAM,cAAc,GAAG,IAAI,GAAG,EAA+B,CAAC;QAC9D,KAAK,MAAM,QAAQ,IAAI,YAAY,EAAE,CAAC;YACrC,MAAM,MAAM,GAAG,cAAc,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;YAChD,IAAI,MAAM;gBAAE,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;;gBAC7B,cAAc,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;QACnD,CAAC;QAED,MAAM,OAAO,GAAa,EAAE,CAAC;QAC7B,MAAM,OAAO,GAAgC,EAAE,CAAC;QAChD,MAAM,S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1B,KAAK,EACL;gBACC,SAAS;aACT,CACD,CAAC;YACF,IAAI,CAAC,8BAA8B,EAAE,CAAC;gBACrC,MAAM,IAAI,gCAAc,CAAC,yDAAyD,CAAC,CAAC;YACrF,CAAC;QACF,CAAC;IACF,CAAC;IAED,KAAK,CAAC,eAAe,CAAC,OAAsB,EAAE,UAA+B;QAC5E,MAAM,EAAE,aAAa,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC;QAEpE,IAAI,aAAa,IAAI,CAAC,IAAA,4BAAc,EAAC,OAAO,CAAC,IAAI,EAAE,iBAAiB,CAAC,EAAE,CAAC;YACvE,MAAM,IAAI,gCAAc,CAAC,gDAAgD,CAAC,CAAC;QAC5E,CAAC;QAED,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;YACpC,MAAM,4BAA4B,GAAG,MAAM,IAAA,4BAAa,EACvD,OAAO,CAAC,IAAI,EACZ,CAAC,wBAAwB,CAAC,EAC1B,KAAK,EACL;gBACC,SAAS;aACT,CACD,CAAC;YACF,IAAI,CAAC,4BAA4B,EAAE,CAAC;gBACnC,MAAM,IAAI,gCAAc,CAAC,yDAAyD,CAAC,CAAC;YACrF,CAAC;QACF,CAAC;IACF,CAAC;CACD,CAAA;;2BArOY,gBAAgB;IAD5B,IAAA,YAAO,GAAE;qCAEsC,uCAAgB;GADnD,gBAAgB,CAqO5B"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { VariableImportPlan, VariableResolutionFailure } from './variable.types';
|
|
2
2
|
import { VariableMissingMode } from '../../n8n-packages.types';
|
|
3
3
|
export declare function variableMissingModeCreates(mode: VariableMissingMode): boolean;
|
|
4
|
+
export declare function variableMissingModeUsesPackageValue(mode: VariableMissingMode): boolean;
|
|
4
5
|
export declare function variableBlockingFailures(mode: VariableMissingMode, plan: VariableImportPlan): VariableResolutionFailure[];
|
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.variableMissingModeCreates = variableMissingModeCreates;
|
|
4
|
+
exports.variableMissingModeUsesPackageValue = variableMissingModeUsesPackageValue;
|
|
4
5
|
exports.variableBlockingFailures = variableBlockingFailures;
|
|
5
6
|
const n8n_packages_types_1 = require("../../n8n-packages.types");
|
|
6
7
|
const ON_MISSING_VARIABLE = {
|
|
7
|
-
[n8n_packages_types_1.VariableMissingMode.DoNothing]: { creates: false, blocks: false },
|
|
8
|
-
[n8n_packages_types_1.VariableMissingMode.MustPreexist]: { creates: false, blocks: true },
|
|
9
|
-
[n8n_packages_types_1.VariableMissingMode.CreateStub]: { creates: true, blocks: false },
|
|
8
|
+
[n8n_packages_types_1.VariableMissingMode.DoNothing]: { creates: false, usesPackageValue: false, blocks: false },
|
|
9
|
+
[n8n_packages_types_1.VariableMissingMode.MustPreexist]: { creates: false, usesPackageValue: false, blocks: true },
|
|
10
|
+
[n8n_packages_types_1.VariableMissingMode.CreateStub]: { creates: true, usesPackageValue: false, blocks: false },
|
|
11
|
+
[n8n_packages_types_1.VariableMissingMode.CreateWithValue]: { creates: true, usesPackageValue: true, blocks: false },
|
|
10
12
|
};
|
|
11
13
|
function variableMissingModeCreates(mode) {
|
|
12
14
|
return ON_MISSING_VARIABLE[mode].creates;
|
|
13
15
|
}
|
|
16
|
+
function variableMissingModeUsesPackageValue(mode) {
|
|
17
|
+
return ON_MISSING_VARIABLE[mode].usesPackageValue;
|
|
18
|
+
}
|
|
14
19
|
function variableBlockingFailures(mode, plan) {
|
|
15
20
|
return ON_MISSING_VARIABLE[mode].blocks ? plan.missing : [];
|
|
16
21
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"variable-missing-mode.js","sourceRoot":"","sources":["../../../../../src/modules/n8n-packages/entities/variable/variable-missing-mode.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"variable-missing-mode.js","sourceRoot":"","sources":["../../../../../src/modules/n8n-packages/entities/variable/variable-missing-mode.ts"],"names":[],"mappings":";;;;;AACA,iEAA+D;AAO/D,MAAM,mBAAmB,GAAuD;IAC/E,CAAC,wCAAmB,CAAC,SAAS,CAAC,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE;IAC3F,CAAC,wCAAmB,CAAC,YAAY,CAAC,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE;IAC7F,CAAC,wCAAmB,CAAC,UAAU,CAAC,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE;IAC3F,CAAC,wCAAmB,CAAC,eAAe,CAAC,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE;CAC/F,CAAC;AAGF,oCAA2C,IAAyB;IACnE,OAAO,mBAAmB,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC;AAC1C,CAAC;AAGD,6CAAoD,IAAyB;IAC5E,OAAO,mBAAmB,CAAC,IAAI,CAAC,CAAC,gBAAgB,CAAC;AACnD,CAAC;AAGD,kCACC,IAAyB,EACzB,IAAwB;IAExB,OAAO,mBAAmB,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC;AAC7D,CAAC"}
|
|
@@ -8,6 +8,7 @@ export declare class VariableExporter {
|
|
|
8
8
|
private readonly variableSerializer;
|
|
9
9
|
constructor(variablesService: VariablesService, sharedWorkflowRepository: SharedWorkflowRepository, variableSerializer: VariableSerializer);
|
|
10
10
|
export(request: VariableExportRequest): Promise<VariableExportResult>;
|
|
11
|
+
private serializeOrBlock;
|
|
11
12
|
private resolveRequirements;
|
|
12
13
|
private resolveBaseDir;
|
|
13
14
|
private resolveWorkflowProjects;
|