n8n 2.23.2 → 2.25.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/active-workflow-manager.d.ts +8 -4
- package/dist/active-workflow-manager.js +26 -9
- package/dist/active-workflow-manager.js.map +1 -1
- package/dist/auth/auth.service.d.ts +1 -1
- package/dist/auth/auth.service.js +2 -1
- package/dist/auth/auth.service.js.map +1 -1
- package/dist/build.tsbuildinfo +1 -1
- package/dist/controllers/ai.controller.js +1 -1
- package/dist/controllers/ai.controller.js.map +1 -1
- package/dist/controllers/api-keys.controller.d.ts +20 -15
- package/dist/controllers/api-keys.controller.js +7 -4
- package/dist/controllers/api-keys.controller.js.map +1 -1
- package/dist/controllers/oauth/oauth1-credential.controller.d.ts +4 -2
- package/dist/controllers/oauth/oauth1-credential.controller.js +15 -5
- package/dist/controllers/oauth/oauth1-credential.controller.js.map +1 -1
- package/dist/controllers/oauth/oauth2-credential.controller.d.ts +4 -2
- package/dist/controllers/oauth/oauth2-credential.controller.js +15 -6
- package/dist/controllers/oauth/oauth2-credential.controller.js.map +1 -1
- package/dist/controllers/project.controller.d.ts +8 -0
- package/dist/controllers/project.controller.js +2 -1
- package/dist/controllers/project.controller.js.map +1 -1
- package/dist/controllers/security-settings.controller.js +18 -1
- package/dist/controllers/security-settings.controller.js.map +1 -1
- package/dist/controllers/telemetry.controller.js +4 -1
- package/dist/controllers/telemetry.controller.js.map +1 -1
- package/dist/credentials/credential-connection-status-provider.interface.d.ts +3 -0
- package/dist/credentials/credential-connection-status-proxy.d.ts +3 -0
- package/dist/credentials/credential-connection-status-proxy.js +10 -0
- package/dist/credentials/credential-connection-status-proxy.js.map +1 -1
- package/dist/credentials/credentials.controller.d.ts +6 -0
- package/dist/credentials/credentials.controller.js +39 -2
- package/dist/credentials/credentials.controller.js.map +1 -1
- package/dist/credentials/credentials.service.d.ts +29 -13
- package/dist/credentials/credentials.service.ee.d.ts +2 -0
- package/dist/credentials/credentials.service.ee.js +3 -0
- package/dist/credentials/credentials.service.ee.js.map +1 -1
- package/dist/credentials/credentials.service.js +27 -6
- package/dist/credentials/credentials.service.js.map +1 -1
- package/dist/credentials-helper.d.ts +1 -0
- package/dist/credentials-helper.js +14 -4
- package/dist/credentials-helper.js.map +1 -1
- package/dist/errors/credential-missing-id.error.d.ts +4 -0
- package/dist/errors/credential-missing-id.error.js +14 -0
- package/dist/errors/credential-missing-id.error.js.map +1 -0
- package/dist/eventbus/event-message-classes/index.d.ts +2 -2
- package/dist/eventbus/event-message-classes/index.js +3 -0
- package/dist/eventbus/event-message-classes/index.js.map +1 -1
- package/dist/events/maps/relay.event-map.d.ts +54 -2
- package/dist/events/relays/log-streaming.event-relay.d.ts +3 -0
- package/dist/events/relays/log-streaming.event-relay.js +39 -1
- 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 +74 -3
- package/dist/events/relays/telemetry.event-relay.js.map +1 -1
- package/dist/execution-lifecycle/execution-lifecycle-hooks.js +6 -5
- package/dist/execution-lifecycle/execution-lifecycle-hooks.js.map +1 -1
- package/dist/executions/execution-data/db-store.d.ts +1 -0
- package/dist/executions/execution-data/db-store.js +26 -0
- package/dist/executions/execution-data/db-store.js.map +1 -1
- package/dist/executions/execution-data/fs-store.d.ts +2 -0
- package/dist/executions/execution-data/fs-store.js +27 -0
- package/dist/executions/execution-data/fs-store.js.map +1 -1
- package/dist/executions/execution-data/types.d.ts +1 -0
- package/dist/executions/execution-persistence.d.ts +38 -4
- package/dist/executions/execution-persistence.js +127 -2
- package/dist/executions/execution-persistence.js.map +1 -1
- package/dist/expression-observability/expression-observability.provider.d.ts +3 -1
- package/dist/expression-observability/expression-observability.provider.js +48 -46
- package/dist/expression-observability/expression-observability.provider.js.map +1 -1
- package/dist/interfaces.d.ts +3 -1
- package/dist/modules/agents/agent-execution.service.d.ts +4 -2
- package/dist/modules/agents/agent-execution.service.js +3 -3
- package/dist/modules/agents/agent-execution.service.js.map +1 -1
- package/dist/modules/agents/agent-knowledge-command.service.d.ts +40 -0
- package/dist/modules/agents/agent-knowledge-command.service.js +221 -0
- package/dist/modules/agents/agent-knowledge-command.service.js.map +1 -0
- package/dist/modules/agents/agent-knowledge.service.d.ts +42 -0
- package/dist/modules/agents/agent-knowledge.service.js +300 -0
- package/dist/modules/agents/agent-knowledge.service.js.map +1 -0
- package/dist/modules/agents/agent-task.service.d.ts +52 -0
- package/dist/modules/agents/agent-task.service.js +487 -0
- package/dist/modules/agents/agent-task.service.js.map +1 -0
- package/dist/modules/agents/agent-upload.middleware.d.ts +7 -0
- package/dist/modules/agents/agent-upload.middleware.js +62 -0
- package/dist/modules/agents/agent-upload.middleware.js.map +1 -0
- package/dist/modules/agents/agents-tools.service.d.ts +1 -1
- package/dist/modules/agents/agents-tools.service.js +12 -3
- package/dist/modules/agents/agents-tools.service.js.map +1 -1
- package/dist/modules/agents/agents.controller.d.ts +138 -45
- package/dist/modules/agents/agents.controller.js +176 -48
- package/dist/modules/agents/agents.controller.js.map +1 -1
- package/dist/modules/agents/agents.module.d.ts +2 -2
- package/dist/modules/agents/agents.module.js +13 -5
- package/dist/modules/agents/agents.module.js.map +1 -1
- package/dist/modules/agents/agents.service.d.ts +43 -7
- package/dist/modules/agents/agents.service.js +341 -57
- package/dist/modules/agents/agents.service.js.map +1 -1
- package/dist/modules/agents/builder/agents-builder-prompts.d.ts +6 -5
- package/dist/modules/agents/builder/agents-builder-prompts.js +92 -18
- package/dist/modules/agents/builder/agents-builder-prompts.js.map +1 -1
- package/dist/modules/agents/builder/agents-builder-tools.service.d.ts +11 -1
- package/dist/modules/agents/builder/agents-builder-tools.service.js +164 -26
- package/dist/modules/agents/builder/agents-builder-tools.service.js.map +1 -1
- package/dist/modules/agents/builder/agents-builder.service.d.ts +3 -1
- package/dist/modules/agents/builder/agents-builder.service.js +8 -3
- package/dist/modules/agents/builder/agents-builder.service.js.map +1 -1
- package/dist/modules/agents/builder/builder-tool-names.d.ts +3 -0
- package/dist/modules/agents/builder/builder-tool-names.js +3 -0
- package/dist/modules/agents/builder/builder-tool-names.js.map +1 -1
- package/dist/modules/agents/builder/interactive/ask-credential.tool.d.ts +1 -0
- package/dist/modules/agents/builder/interactive/ask-credential.tool.js +25 -4
- package/dist/modules/agents/builder/interactive/ask-credential.tool.js.map +1 -1
- package/dist/modules/agents/builder/interactive/ask-question.tool.js +6 -5
- package/dist/modules/agents/builder/interactive/ask-question.tool.js.map +1 -1
- package/dist/modules/agents/builder/prompts/config-mutation.prompt.js +20 -5
- package/dist/modules/agents/builder/prompts/config-mutation.prompt.js.map +1 -1
- package/dist/modules/agents/builder/prompts/config-rules.prompt.js +23 -4
- package/dist/modules/agents/builder/prompts/config-rules.prompt.js.map +1 -1
- package/dist/modules/agents/builder/prompts/llm-selection.prompt.js +18 -1
- package/dist/modules/agents/builder/prompts/llm-selection.prompt.js.map +1 -1
- package/dist/modules/agents/builder/prompts/memory.prompt.d.ts +1 -1
- package/dist/modules/agents/builder/prompts/memory.prompt.js +5 -3
- package/dist/modules/agents/builder/prompts/memory.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 +11 -2
- package/dist/modules/agents/builder/prompts/tools.prompt.js.map +1 -1
- package/dist/modules/agents/builder/search-mcp-servers.tool.d.ts +6 -0
- package/dist/modules/agents/builder/search-mcp-servers.tool.js +85 -0
- package/dist/modules/agents/builder/search-mcp-servers.tool.js.map +1 -0
- package/dist/modules/agents/builder/skill-body-template.d.ts +4 -0
- package/dist/modules/agents/builder/skill-body-template.js +31 -0
- package/dist/modules/agents/builder/skill-body-template.js.map +1 -0
- package/dist/modules/agents/builder/skills/index.js +6 -1
- package/dist/modules/agents/builder/skills/index.js.map +1 -1
- package/dist/modules/agents/builder/skills/integrations.skill.js +39 -18
- package/dist/modules/agents/builder/skills/integrations.skill.js.map +1 -1
- package/dist/modules/agents/builder/skills/mcp.skill.d.ts +2 -0
- package/dist/modules/agents/builder/skills/mcp.skill.js +110 -0
- package/dist/modules/agents/builder/skills/mcp.skill.js.map +1 -0
- package/dist/modules/agents/builder/skills/research.skill.js +8 -5
- package/dist/modules/agents/builder/skills/research.skill.js.map +1 -1
- package/dist/modules/agents/builder/skills/target-skills.skill.js +41 -13
- package/dist/modules/agents/builder/skills/target-skills.skill.js.map +1 -1
- package/dist/modules/agents/builder/skills/target-tasks.skill.d.ts +2 -0
- package/dist/modules/agents/builder/skills/target-tasks.skill.js +82 -0
- package/dist/modules/agents/builder/skills/target-tasks.skill.js.map +1 -0
- package/dist/modules/agents/builder/task-objective-template.d.ts +3 -0
- package/dist/modules/agents/builder/task-objective-template.js +27 -0
- package/dist/modules/agents/builder/task-objective-template.js.map +1 -0
- package/dist/modules/agents/builder/verify-mcp-server.tool.d.ts +8 -0
- package/dist/modules/agents/builder/verify-mcp-server.tool.js +79 -0
- package/dist/modules/agents/builder/verify-mcp-server.tool.js.map +1 -0
- package/dist/modules/agents/entities/agent-execution-thread.entity.d.ts +4 -0
- package/dist/modules/agents/entities/agent-execution-thread.entity.js +26 -0
- package/dist/modules/agents/entities/agent-execution-thread.entity.js.map +1 -1
- package/dist/modules/agents/entities/agent-file.entity.d.ts +11 -0
- package/dist/modules/agents/entities/agent-file.entity.js +48 -0
- package/dist/modules/agents/entities/agent-file.entity.js.map +1 -0
- package/dist/modules/agents/entities/agent-task-run-lock.entity.d.ts +10 -0
- package/dist/modules/agents/entities/agent-task-run-lock.entity.js +54 -0
- package/dist/modules/agents/entities/agent-task-run-lock.entity.js.map +1 -0
- package/dist/modules/agents/entities/agent-task-snapshot.entity.d.ts +12 -0
- package/dist/modules/agents/entities/agent-task-snapshot.entity.js +70 -0
- package/dist/modules/agents/entities/agent-task-snapshot.entity.js.map +1 -0
- package/dist/modules/agents/entities/agent-task.entity.d.ts +11 -0
- package/dist/modules/agents/entities/agent-task.entity.js +64 -0
- package/dist/modules/agents/entities/agent-task.entity.js.map +1 -0
- package/dist/modules/agents/execution-recorder.d.ts +1 -0
- package/dist/modules/agents/execution-recorder.js +9 -5
- package/dist/modules/agents/execution-recorder.js.map +1 -1
- package/dist/modules/agents/integrations/agent-chat-bridge.d.ts +16 -4
- package/dist/modules/agents/integrations/agent-chat-bridge.js +372 -116
- package/dist/modules/agents/integrations/agent-chat-bridge.js.map +1 -1
- package/dist/modules/agents/integrations/agent-chat-integration.d.ts +27 -2
- package/dist/modules/agents/integrations/agent-chat-integration.js +5 -0
- package/dist/modules/agents/integrations/agent-chat-integration.js.map +1 -1
- package/dist/modules/agents/integrations/chat-integration.service.d.ts +15 -6
- package/dist/modules/agents/integrations/chat-integration.service.js +9 -10
- package/dist/modules/agents/integrations/chat-integration.service.js.map +1 -1
- package/dist/modules/agents/integrations/component-mapper.d.ts +14 -0
- package/dist/modules/agents/integrations/component-mapper.js +9 -1
- package/dist/modules/agents/integrations/component-mapper.js.map +1 -1
- package/dist/modules/agents/integrations/integration-action-executor.d.ts +22 -0
- package/dist/modules/agents/integrations/integration-action-executor.js +171 -0
- package/dist/modules/agents/integrations/integration-action-executor.js.map +1 -0
- package/dist/modules/agents/integrations/integration-context-query-executor.d.ts +18 -0
- package/dist/modules/agents/integrations/integration-context-query-executor.js +58 -0
- package/dist/modules/agents/integrations/integration-context-query-executor.js.map +1 -0
- package/dist/modules/agents/integrations/integration-error-codes.d.ts +13 -0
- package/dist/modules/agents/integrations/integration-error-codes.js +16 -0
- package/dist/modules/agents/integrations/integration-error-codes.js.map +1 -0
- package/dist/modules/agents/integrations/integration-helpers.d.ts +21 -0
- package/dist/modules/agents/integrations/integration-helpers.js +72 -0
- package/dist/modules/agents/integrations/integration-helpers.js.map +1 -0
- package/dist/modules/agents/integrations/integration-message-context.service.d.ts +13 -0
- package/dist/modules/agents/integrations/integration-message-context.service.js +129 -0
- package/dist/modules/agents/integrations/integration-message-context.service.js.map +1 -0
- package/dist/modules/agents/integrations/integration-tools.d.ts +205 -0
- package/dist/modules/agents/integrations/integration-tools.js +955 -0
- package/dist/modules/agents/integrations/integration-tools.js.map +1 -0
- package/dist/modules/agents/integrations/integrations-sync.d.ts +1 -1
- package/dist/modules/agents/integrations/integrations-sync.js +1 -29
- package/dist/modules/agents/integrations/integrations-sync.js.map +1 -1
- package/dist/modules/agents/integrations/n8n-memory.d.ts +2 -0
- package/dist/modules/agents/integrations/n8n-memory.js +18 -11
- package/dist/modules/agents/integrations/n8n-memory.js.map +1 -1
- package/dist/modules/agents/integrations/platforms/linear-integration.d.ts +13 -2
- package/dist/modules/agents/integrations/platforms/linear-integration.js +70 -15
- package/dist/modules/agents/integrations/platforms/linear-integration.js.map +1 -1
- package/dist/modules/agents/integrations/platforms/linear-operations.d.ts +18 -0
- package/dist/modules/agents/integrations/platforms/linear-operations.js +679 -0
- package/dist/modules/agents/integrations/platforms/linear-operations.js.map +1 -0
- package/dist/modules/agents/integrations/platforms/slack-integration.d.ts +11 -1
- package/dist/modules/agents/integrations/platforms/slack-integration.js +53 -1
- package/dist/modules/agents/integrations/platforms/slack-integration.js.map +1 -1
- package/dist/modules/agents/integrations/platforms/slack-operations.d.ts +17 -0
- package/dist/modules/agents/integrations/platforms/slack-operations.js +288 -0
- package/dist/modules/agents/integrations/platforms/slack-operations.js.map +1 -0
- package/dist/modules/agents/integrations/platforms/telegram-integration.d.ts +9 -2
- package/dist/modules/agents/integrations/platforms/telegram-integration.js +17 -0
- package/dist/modules/agents/integrations/platforms/telegram-integration.js.map +1 -1
- package/dist/modules/agents/integrations/slack-app-setup.service.js +7 -1
- package/dist/modules/agents/integrations/slack-app-setup.service.js.map +1 -1
- package/dist/modules/agents/json-config/from-json-config.d.ts +4 -2
- package/dist/modules/agents/json-config/from-json-config.js +88 -11
- package/dist/modules/agents/json-config/from-json-config.js.map +1 -1
- package/dist/modules/agents/json-config/mcp-client-factory.d.ts +16 -0
- package/dist/modules/agents/json-config/mcp-client-factory.js +155 -0
- package/dist/modules/agents/json-config/mcp-client-factory.js.map +1 -0
- package/dist/modules/agents/json-config/native-web-search-provider-tools.d.ts +8 -0
- package/dist/modules/agents/json-config/native-web-search-provider-tools.js +59 -0
- package/dist/modules/agents/json-config/native-web-search-provider-tools.js.map +1 -0
- package/dist/modules/agents/json-config/schema-text-serializer.js +12 -2
- package/dist/modules/agents/json-config/schema-text-serializer.js.map +1 -1
- package/dist/modules/agents/repositories/agent-execution-thread.repository.d.ts +1 -1
- package/dist/modules/agents/repositories/agent-execution-thread.repository.js +5 -3
- package/dist/modules/agents/repositories/agent-execution-thread.repository.js.map +1 -1
- package/dist/modules/agents/repositories/agent-file.repository.d.ts +7 -0
- package/dist/modules/agents/repositories/agent-file.repository.js +35 -0
- package/dist/modules/agents/repositories/agent-file.repository.js.map +1 -0
- package/dist/modules/agents/repositories/agent-history.repository.d.ts +2 -0
- package/dist/modules/agents/repositories/agent-history.repository.js +18 -0
- package/dist/modules/agents/repositories/agent-history.repository.js.map +1 -1
- package/dist/modules/agents/repositories/agent-task-run-lock.repository.d.ts +12 -0
- package/dist/modules/agents/repositories/agent-task-run-lock.repository.js +72 -0
- package/dist/modules/agents/repositories/agent-task-run-lock.repository.js.map +1 -0
- package/dist/modules/agents/repositories/agent-task-snapshot.repository.d.ts +11 -0
- package/dist/modules/agents/repositories/agent-task-snapshot.repository.js +45 -0
- package/dist/modules/agents/repositories/agent-task-snapshot.repository.js.map +1 -0
- package/dist/modules/agents/repositories/agent-task.repository.d.ts +7 -0
- package/dist/modules/agents/repositories/agent-task.repository.js +32 -0
- package/dist/modules/agents/repositories/agent-task.repository.js.map +1 -0
- package/dist/modules/agents/repositories/agent.repository.js +1 -2
- package/dist/modules/agents/repositories/agent.repository.js.map +1 -1
- package/dist/modules/agents/tools/knowledge/csv-helpers.d.ts +73 -0
- package/dist/modules/agents/tools/knowledge/csv-helpers.js +341 -0
- package/dist/modules/agents/tools/knowledge/csv-helpers.js.map +1 -0
- package/dist/modules/agents/tools/knowledge/csv.operation.d.ts +61 -0
- package/dist/modules/agents/tools/knowledge/csv.operation.js +207 -0
- package/dist/modules/agents/tools/knowledge/csv.operation.js.map +1 -0
- package/dist/modules/agents/tools/knowledge/file-references.d.ts +16 -0
- package/dist/modules/agents/tools/knowledge/file-references.js +35 -0
- package/dist/modules/agents/tools/knowledge/file-references.js.map +1 -0
- package/dist/modules/agents/tools/knowledge/read.operation.d.ts +8 -0
- package/dist/modules/agents/tools/knowledge/read.operation.js +38 -0
- package/dist/modules/agents/tools/knowledge/read.operation.js.map +1 -0
- package/dist/modules/agents/tools/knowledge/schemas.d.ts +1505 -0
- package/dist/modules/agents/tools/knowledge/schemas.js +441 -0
- package/dist/modules/agents/tools/knowledge/schemas.js.map +1 -0
- package/dist/modules/agents/tools/knowledge/search.operation.d.ts +9 -0
- package/dist/modules/agents/tools/knowledge/search.operation.js +332 -0
- package/dist/modules/agents/tools/knowledge/search.operation.js.map +1 -0
- package/dist/modules/agents/tools/knowledge/tool.d.ts +8 -0
- package/dist/modules/agents/tools/knowledge/tool.js +121 -0
- package/dist/modules/agents/tools/knowledge/tool.js.map +1 -0
- package/dist/modules/agents/utils/agent-memory-scope.d.ts +1 -1
- package/dist/modules/agents/utils/agent-memory-scope.js +4 -4
- package/dist/modules/agents/utils/agent-memory-scope.js.map +1 -1
- package/dist/modules/agents/utils/agent-resource-id.d.ts +1 -1
- package/dist/modules/chat-hub/chat-hub.module.d.ts +2 -2
- package/dist/modules/chat-hub/chat-hub.settings.controller.d.ts +4 -4
- package/dist/modules/chat-hub/chat-hub.types.d.ts +5 -5
- package/dist/modules/chat-hub/dto/chat-models-request.dto.d.ts +1 -1
- package/dist/modules/dynamic-credentials.ee/constants.d.ts +1 -1
- package/dist/modules/dynamic-credentials.ee/constants.js +2 -1
- package/dist/modules/dynamic-credentials.ee/constants.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/dynamic-credentials.controller.d.ts +9 -2
- package/dist/modules/dynamic-credentials.ee/dynamic-credentials.controller.js +45 -14
- package/dist/modules/dynamic-credentials.ee/dynamic-credentials.controller.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/services/credential-connection-status.service.d.ts +4 -0
- package/dist/modules/dynamic-credentials.ee/services/credential-connection-status.service.js +16 -0
- package/dist/modules/dynamic-credentials.ee/services/credential-connection-status.service.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/services/dynamic-credential.service.js +6 -2
- package/dist/modules/dynamic-credentials.ee/services/dynamic-credential.service.js.map +1 -1
- package/dist/modules/instance-ai/eval/eval-mocked-credentials-helper.d.ts +1 -0
- package/dist/modules/instance-ai/eval/eval-mocked-credentials-helper.js +21 -2
- package/dist/modules/instance-ai/eval/eval-mocked-credentials-helper.js.map +1 -1
- package/dist/modules/instance-ai/eval/execution.service.d.ts +4 -1
- package/dist/modules/instance-ai/eval/execution.service.js +118 -24
- package/dist/modules/instance-ai/eval/execution.service.js.map +1 -1
- package/dist/modules/instance-ai/eval/llm-wire-server.d.ts +8 -3
- package/dist/modules/instance-ai/eval/llm-wire-server.js +147 -50
- package/dist/modules/instance-ai/eval/llm-wire-server.js.map +1 -1
- package/dist/modules/instance-ai/eval/mock-handler.js +45 -8
- package/dist/modules/instance-ai/eval/mock-handler.js.map +1 -1
- package/dist/modules/instance-ai/eval/mock-quirks.d.ts +4 -2
- package/dist/modules/instance-ai/eval/mock-quirks.js +83 -4
- package/dist/modules/instance-ai/eval/mock-quirks.js.map +1 -1
- package/dist/modules/instance-ai/eval/openai-envelope.d.ts +8 -0
- package/dist/modules/instance-ai/eval/openai-envelope.js +121 -8
- package/dist/modules/instance-ai/eval/openai-envelope.js.map +1 -1
- package/dist/modules/instance-ai/eval/openai-responses-envelope.d.ts +11 -0
- package/dist/modules/instance-ai/eval/openai-responses-envelope.js +238 -0
- package/dist/modules/instance-ai/eval/openai-responses-envelope.js.map +1 -0
- package/dist/modules/instance-ai/eval/request-binary-redactor.d.ts +1 -0
- package/dist/modules/instance-ai/eval/request-binary-redactor.js +74 -0
- package/dist/modules/instance-ai/eval/request-binary-redactor.js.map +1 -0
- package/dist/modules/instance-ai/eval/workflow-analysis.d.ts +19 -1
- package/dist/modules/instance-ai/eval/workflow-analysis.js +159 -76
- package/dist/modules/instance-ai/eval/workflow-analysis.js.map +1 -1
- package/dist/modules/instance-ai/extract-resolved-node-parameters.d.ts +7 -0
- package/dist/modules/instance-ai/extract-resolved-node-parameters.js +221 -0
- package/dist/modules/instance-ai/extract-resolved-node-parameters.js.map +1 -0
- package/dist/modules/instance-ai/instance-ai-memory.service.d.ts +7 -1
- package/dist/modules/instance-ai/instance-ai-memory.service.js +80 -3
- package/dist/modules/instance-ai/instance-ai-memory.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai-settings.service.js +1 -16
- package/dist/modules/instance-ai/instance-ai-settings.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.adapter.service.d.ts +1 -1
- package/dist/modules/instance-ai/instance-ai.adapter.service.js +67 -7
- package/dist/modules/instance-ai/instance-ai.adapter.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.module.d.ts +1 -1
- package/dist/modules/instance-ai/instance-ai.service.d.ts +24 -1
- package/dist/modules/instance-ai/instance-ai.service.js +400 -26
- package/dist/modules/instance-ai/instance-ai.service.js.map +1 -1
- package/dist/modules/instance-ai/liveness/instance-ai-liveness.service.d.ts +1 -0
- package/dist/modules/instance-ai/liveness/instance-ai-liveness.service.js +1 -0
- package/dist/modules/instance-ai/liveness/instance-ai-liveness.service.js.map +1 -1
- package/dist/modules/instance-ai/message-parser.d.ts +2 -0
- package/dist/modules/instance-ai/message-parser.js +165 -36
- package/dist/modules/instance-ai/message-parser.js.map +1 -1
- package/dist/modules/instance-ai/repositories/instance-ai-checkpoint.repository.d.ts +2 -0
- package/dist/modules/instance-ai/repositories/instance-ai-checkpoint.repository.js +13 -0
- package/dist/modules/instance-ai/repositories/instance-ai-checkpoint.repository.js.map +1 -1
- package/dist/modules/instance-ai/repositories/instance-ai-pending-confirmation.repository.d.ts +12 -0
- package/dist/modules/instance-ai/repositories/instance-ai-pending-confirmation.repository.js +80 -0
- package/dist/modules/instance-ai/repositories/instance-ai-pending-confirmation.repository.js.map +1 -0
- package/dist/modules/instance-ai/storage/db-snapshot-storage.d.ts +1 -0
- package/dist/modules/instance-ai/storage/db-snapshot-storage.js +23 -0
- package/dist/modules/instance-ai/storage/db-snapshot-storage.js.map +1 -1
- package/dist/modules/instance-ai/storage/typeorm-agent-checkpoint-store.d.ts +10 -4
- package/dist/modules/instance-ai/storage/typeorm-agent-checkpoint-store.js +49 -37
- package/dist/modules/instance-ai/storage/typeorm-agent-checkpoint-store.js.map +1 -1
- package/dist/modules/instance-ai/web-research/index.d.ts +0 -2
- package/dist/modules/instance-ai/web-research/index.js +1 -5
- package/dist/modules/instance-ai/web-research/index.js.map +1 -1
- package/dist/modules/ldap.ee/helpers.ee.js +6 -2
- package/dist/modules/ldap.ee/helpers.ee.js.map +1 -1
- package/dist/modules/mcp/mcp.controller.js +13 -6
- package/dist/modules/mcp/mcp.controller.js.map +1 -1
- package/dist/modules/mcp/mcp.service.d.ts +10 -2
- package/dist/modules/mcp/mcp.service.js +39 -6
- package/dist/modules/mcp/mcp.service.js.map +1 -1
- package/dist/modules/mcp/mcp.settings.controller.d.ts +2 -0
- package/dist/modules/mcp/mcp.settings.service.d.ts +2 -0
- package/dist/modules/mcp/mcp.settings.service.js +6 -5
- package/dist/modules/mcp/mcp.settings.service.js.map +1 -1
- package/dist/modules/mcp/mcp.types.d.ts +6 -0
- package/dist/modules/mcp/mcp.types.js +9 -0
- package/dist/modules/mcp/mcp.types.js.map +1 -1
- package/dist/modules/mcp/tools/execute-workflow.tool.d.ts +6 -6
- package/dist/modules/mcp/tools/search-workflows.tool.d.ts +2 -1
- package/dist/modules/mcp/tools/search-workflows.tool.js +12 -4
- package/dist/modules/mcp/tools/search-workflows.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/constants.d.ts +1 -1
- package/dist/modules/mcp/tools/workflow-builder/constants.js +2 -1
- package/dist/modules/mcp/tools/workflow-builder/constants.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/mcp-instructions.js +6 -4
- package/dist/modules/mcp/tools/workflow-builder/mcp-instructions.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/update-workflow.tool.d.ts +67 -6
- package/dist/modules/mcp/tools/workflow-builder/validate-node.tool.d.ts +30 -0
- package/dist/modules/mcp/tools/workflow-builder/validate-node.tool.js +161 -0
- package/dist/modules/mcp/tools/workflow-builder/validate-node.tool.js.map +1 -0
- package/dist/modules/mcp/tools/workflow-builder/workflow-operations.d.ts +67 -6
- package/dist/modules/mcp/tools/workflow-builder/workflow-operations.js +51 -0
- package/dist/modules/mcp/tools/workflow-builder/workflow-operations.js.map +1 -1
- package/dist/modules/mcp-registry/registry/mcp-registry.types.js.map +1 -1
- package/dist/modules/mcp-registry/synthesize-type-def.d.ts +2 -0
- package/dist/modules/mcp-registry/synthesize-type-def.js +35 -0
- package/dist/modules/mcp-registry/synthesize-type-def.js.map +1 -0
- package/dist/modules/n8n-packages/engine/import-pipeline.d.ts +24 -0
- package/dist/modules/n8n-packages/engine/import-pipeline.js +206 -0
- package/dist/modules/n8n-packages/engine/import-pipeline.js.map +1 -0
- package/dist/modules/n8n-packages/entities/credential/credential-requirements.extractor.d.ts +6 -0
- package/dist/modules/n8n-packages/entities/credential/credential-requirements.extractor.js +33 -0
- package/dist/modules/n8n-packages/entities/credential/credential-requirements.extractor.js.map +1 -0
- package/dist/modules/n8n-packages/entities/credential/credential.exporter.d.ts +23 -0
- package/dist/modules/n8n-packages/entities/credential/credential.exporter.js +68 -0
- package/dist/modules/n8n-packages/entities/credential/credential.exporter.js.map +1 -0
- package/dist/modules/n8n-packages/entities/credential/credential.serializer.d.ts +5 -0
- package/dist/modules/n8n-packages/entities/credential/credential.serializer.js +25 -0
- package/dist/modules/n8n-packages/entities/credential/credential.serializer.js.map +1 -0
- package/dist/modules/n8n-packages/entities/credential/credential.types.d.ts +6 -0
- package/dist/modules/n8n-packages/entities/credential/credential.types.js +3 -0
- package/dist/modules/n8n-packages/entities/credential/credential.types.js.map +1 -0
- package/dist/modules/n8n-packages/entities/requirements-extractor.d.ts +4 -0
- package/dist/modules/n8n-packages/entities/requirements-extractor.js +3 -0
- package/dist/modules/n8n-packages/entities/requirements-extractor.js.map +1 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow.exporter.d.ts +12 -3
- package/dist/modules/n8n-packages/entities/workflow/workflow.exporter.js +11 -20
- package/dist/modules/n8n-packages/entities/workflow/workflow.exporter.js.map +1 -1
- package/dist/modules/n8n-packages/entities/workflow/workflow.serializer.d.ts +3 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow.serializer.js +10 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow.serializer.js.map +1 -1
- package/dist/modules/n8n-packages/io/package-reader.d.ts +6 -0
- package/dist/modules/n8n-packages/io/package-reader.js +3 -0
- package/dist/modules/n8n-packages/io/package-reader.js.map +1 -0
- package/dist/modules/n8n-packages/io/slug.utils.d.ts +1 -1
- package/dist/modules/n8n-packages/io/slug.utils.js +3 -3
- package/dist/modules/n8n-packages/io/slug.utils.js.map +1 -1
- package/dist/modules/n8n-packages/io/tar/tar-package-reader.d.ts +13 -0
- package/dist/modules/n8n-packages/io/tar/tar-package-reader.js +84 -0
- package/dist/modules/n8n-packages/io/tar/tar-package-reader.js.map +1 -0
- package/dist/modules/n8n-packages/io/unique-filename-allocator.d.ts +7 -0
- package/dist/modules/n8n-packages/io/unique-filename-allocator.js +27 -0
- package/dist/modules/n8n-packages/io/unique-filename-allocator.js.map +1 -0
- package/dist/modules/n8n-packages/n8n-packages.service.d.ts +7 -2
- package/dist/modules/n8n-packages/n8n-packages.service.js +21 -3
- package/dist/modules/n8n-packages/n8n-packages.service.js.map +1 -1
- package/dist/modules/n8n-packages/n8n-packages.types.d.ts +22 -0
- package/dist/modules/n8n-packages/spec/manifest.schema.d.ts +121 -4
- package/dist/modules/n8n-packages/spec/manifest.schema.js +22 -3
- package/dist/modules/n8n-packages/spec/manifest.schema.js.map +1 -1
- package/dist/modules/n8n-packages/spec/requirements.schema.d.ts +51 -0
- package/dist/modules/n8n-packages/spec/requirements.schema.js +14 -0
- package/dist/modules/n8n-packages/spec/requirements.schema.js.map +1 -0
- package/dist/modules/n8n-packages/spec/serialized/credential.schema.d.ts +15 -0
- package/dist/modules/n8n-packages/spec/serialized/credential.schema.js +12 -0
- package/dist/modules/n8n-packages/spec/serialized/credential.schema.js.map +1 -0
- package/dist/modules/n8n-packages/spec/serialized/workflow.schema.d.ts +4 -4
- package/dist/modules/n8n-packages/utils/import-package-upload.d.ts +13 -0
- package/dist/modules/n8n-packages/utils/import-package-upload.js +59 -0
- package/dist/modules/n8n-packages/utils/import-package-upload.js.map +1 -0
- package/dist/modules/otel/execution-level-tracer.js +15 -6
- package/dist/modules/otel/execution-level-tracer.js.map +1 -1
- package/dist/modules/otel/execution-level-tracer.types.d.ts +3 -0
- package/dist/modules/otel/execution-level-tracer.types.js.map +1 -1
- package/dist/modules/otel/otel-lifecycle-handler.d.ts +4 -2
- package/dist/modules/otel/otel-lifecycle-handler.js +69 -4
- package/dist/modules/otel/otel-lifecycle-handler.js.map +1 -1
- package/dist/modules/otel/otel.config.d.ts +1 -0
- package/dist/modules/otel/otel.config.js +5 -0
- package/dist/modules/otel/otel.config.js.map +1 -1
- package/dist/modules/otel/otel.constants.d.ts +2 -0
- package/dist/modules/otel/otel.constants.js +2 -0
- package/dist/modules/otel/otel.constants.js.map +1 -1
- package/dist/modules/redaction/instance-redaction-enforcement.service.d.ts +4 -0
- package/dist/modules/redaction/instance-redaction-enforcement.service.js +8 -0
- package/dist/modules/redaction/instance-redaction-enforcement.service.js.map +1 -1
- package/dist/modules/redaction/redaction-context-hook.d.ts +9 -0
- package/dist/modules/redaction/redaction-context-hook.js +57 -0
- package/dist/modules/redaction/redaction-context-hook.js.map +1 -0
- package/dist/modules/redaction/redaction.module.js +1 -0
- package/dist/modules/redaction/redaction.module.js.map +1 -1
- package/dist/modules/source-control.ee/constants.d.ts +1 -0
- package/dist/modules/source-control.ee/constants.js +2 -1
- package/dist/modules/source-control.ee/constants.js.map +1 -1
- package/dist/modules/source-control.ee/source-control-status.service.ee.js +5 -0
- package/dist/modules/source-control.ee/source-control-status.service.ee.js.map +1 -1
- package/dist/modules/source-control.ee/source-control.controller.ee.d.ts +4 -2
- package/dist/modules/source-control.ee/source-control.controller.ee.js +32 -5
- package/dist/modules/source-control.ee/source-control.controller.ee.js.map +1 -1
- package/dist/modules/source-control.ee/source-control.service.ee.js +2 -0
- package/dist/modules/source-control.ee/source-control.service.ee.js.map +1 -1
- package/dist/modules/workflow-builder/workflow-builder-session.repository.js +2 -1
- package/dist/modules/workflow-builder/workflow-builder-session.repository.js.map +1 -1
- package/dist/node-catalog/node-catalog.service.d.ts +2 -0
- package/dist/node-catalog/node-catalog.service.js +38 -2
- package/dist/node-catalog/node-catalog.service.js.map +1 -1
- package/dist/oauth/oauth-browser-binding.service.d.ts +18 -0
- package/dist/oauth/oauth-browser-binding.service.js +68 -0
- package/dist/oauth/oauth-browser-binding.service.js.map +1 -0
- package/dist/oauth/oauth.service.d.ts +10 -4
- package/dist/oauth/oauth.service.js +87 -4
- package/dist/oauth/oauth.service.js.map +1 -1
- package/dist/oauth/types.d.ts +1 -0
- package/dist/oauth/types.js.map +1 -1
- package/dist/public-api/index.js +5 -1
- package/dist/public-api/index.js.map +1 -1
- package/dist/public-api/types.d.ts +6 -0
- package/dist/public-api/v1/handlers/credentials/credentials.service.js +1 -0
- package/dist/public-api/v1/handlers/credentials/credentials.service.js.map +1 -1
- package/dist/public-api/v1/handlers/n8n-packages/n8n-packages.handler.d.ts +5 -0
- package/dist/public-api/v1/handlers/n8n-packages/n8n-packages.handler.js +22 -0
- package/dist/public-api/v1/handlers/n8n-packages/n8n-packages.handler.js.map +1 -1
- package/dist/public-api/v1/openapi.yml +207 -59
- package/dist/requests.d.ts +4 -0
- package/dist/scaling/constants.d.ts +2 -2
- package/dist/scaling/pubsub/pubsub.event-map.d.ts +5 -2
- package/dist/scaling/pubsub/pubsub.types.d.ts +2 -1
- package/dist/services/ai-workflow-builder.service.d.ts +6 -3
- package/dist/services/ai-workflow-builder.service.js +13 -5
- package/dist/services/ai-workflow-builder.service.js.map +1 -1
- package/dist/services/api-key-auth.strategy.d.ts +4 -1
- package/dist/services/api-key-auth.strategy.js +18 -2
- package/dist/services/api-key-auth.strategy.js.map +1 -1
- package/dist/services/ownership.service.d.ts +1 -0
- package/dist/services/ownership.service.js +7 -0
- package/dist/services/ownership.service.js.map +1 -1
- package/dist/services/project.service.ee.d.ts +6 -2
- package/dist/services/project.service.ee.js +30 -8
- package/dist/services/project.service.ee.js.map +1 -1
- package/dist/services/public-api-key.service.d.ts +21 -14
- package/dist/services/public-api-key.service.js +14 -9
- package/dist/services/public-api-key.service.js.map +1 -1
- package/dist/telemetry/index.d.ts +6 -9
- package/dist/telemetry/index.js +23 -9
- package/dist/telemetry/index.js.map +1 -1
- package/dist/webhooks/constants.js +5 -1
- package/dist/webhooks/constants.js.map +1 -1
- package/dist/webhooks/live-webhooks.d.ts +8 -1
- package/dist/webhooks/live-webhooks.js +37 -22
- package/dist/webhooks/live-webhooks.js.map +1 -1
- package/dist/webhooks/waiting-forms.js +8 -1
- package/dist/webhooks/waiting-forms.js.map +1 -1
- package/dist/webhooks/webhook-helpers.d.ts +1 -1
- package/dist/webhooks/webhook-helpers.js +20 -10
- package/dist/webhooks/webhook-helpers.js.map +1 -1
- package/dist/webhooks/webhook-request-handler.js +1 -1
- package/dist/webhooks/webhook-request-handler.js.map +1 -1
- package/dist/workflow-helpers.d.ts +6 -1
- package/dist/workflow-helpers.js +9 -1
- package/dist/workflow-helpers.js.map +1 -1
- package/dist/workflows/workflow-creation.service.d.ts +4 -1
- package/dist/workflows/workflow-creation.service.js +12 -3
- package/dist/workflows/workflow-creation.service.js.map +1 -1
- package/dist/workflows/workflow-execution.service.js +2 -0
- package/dist/workflows/workflow-execution.service.js.map +1 -1
- package/dist/workflows/workflow-finder.service.d.ts +1 -0
- package/dist/workflows/workflow-published-data.service.d.ts +11 -0
- package/dist/workflows/workflow-published-data.service.js +39 -0
- package/dist/workflows/workflow-published-data.service.js.map +1 -0
- package/dist/workflows/workflow-validation.service.d.ts +5 -1
- package/dist/workflows/workflow-validation.service.js +55 -2
- package/dist/workflows/workflow-validation.service.js.map +1 -1
- package/dist/workflows/workflow.service.js +4 -0
- package/dist/workflows/workflow.service.js.map +1 -1
- package/dist/workflows/workflows.controller.d.ts +8 -0
- package/package.json +45 -37
- package/templates/form-trigger-completion.handlebars +12 -1
- package/dist/modules/agents/integrations/agent-schedule.service.d.ts +0 -30
- package/dist/modules/agents/integrations/agent-schedule.service.js +0 -331
- package/dist/modules/agents/integrations/agent-schedule.service.js.map +0 -1
- package/dist/modules/instance-ai/web-research/brave-search.d.ts +0 -10
- package/dist/modules/instance-ai/web-research/brave-search.js +0 -44
- package/dist/modules/instance-ai/web-research/brave-search.js.map +0 -1
- package/dist/modules/instance-ai/web-research/searxng-search.d.ts +0 -6
- package/dist/modules/instance-ai/web-research/searxng-search.js +0 -39
- package/dist/modules/instance-ai/web-research/searxng-search.js.map +0 -1
|
@@ -0,0 +1,68 @@
|
|
|
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.CredentialExporter = void 0;
|
|
13
|
+
const di_1 = require("@n8n/di");
|
|
14
|
+
const credentials_finder_service_1 = require("../../../../credentials/credentials-finder.service");
|
|
15
|
+
const credential_serializer_1 = require("./credential.serializer");
|
|
16
|
+
const unique_filename_allocator_1 = require("../../io/unique-filename-allocator");
|
|
17
|
+
let CredentialExporter = class CredentialExporter {
|
|
18
|
+
constructor(credentialsFinder, credentialSerializer) {
|
|
19
|
+
this.credentialsFinder = credentialsFinder;
|
|
20
|
+
this.credentialSerializer = credentialSerializer;
|
|
21
|
+
}
|
|
22
|
+
async export(request) {
|
|
23
|
+
const allocator = new unique_filename_allocator_1.UniqueFilenameAllocator('credentials', 'credential');
|
|
24
|
+
const entries = [];
|
|
25
|
+
const requirements = [];
|
|
26
|
+
for (const [credentialId, { fallback, usedByWorkflows }] of this.groupByCredentialId(request.requirements)) {
|
|
27
|
+
const credential = await this.credentialsFinder.findCredentialForUser(credentialId, request.user, ['credential:read']);
|
|
28
|
+
const { id, name, type } = credential ?? {
|
|
29
|
+
id: credentialId,
|
|
30
|
+
name: fallback.credentialName,
|
|
31
|
+
type: fallback.credentialType,
|
|
32
|
+
};
|
|
33
|
+
if (credential) {
|
|
34
|
+
const target = allocator.allocate(name);
|
|
35
|
+
request.writer.writeDirectory(target);
|
|
36
|
+
request.writer.writeFile(`${target}/credential.json`, JSON.stringify(this.credentialSerializer.serialize(credential), null, '\t'));
|
|
37
|
+
entries.push({ id, name, target });
|
|
38
|
+
}
|
|
39
|
+
requirements.push({ id, name, type, usedByWorkflows });
|
|
40
|
+
}
|
|
41
|
+
return { entries, requirements };
|
|
42
|
+
}
|
|
43
|
+
groupByCredentialId(requirements) {
|
|
44
|
+
const grouped = new Map();
|
|
45
|
+
for (const requirement of requirements) {
|
|
46
|
+
const existing = grouped.get(requirement.credentialId);
|
|
47
|
+
if (existing) {
|
|
48
|
+
if (!existing.usedByWorkflows.includes(requirement.workflowId)) {
|
|
49
|
+
existing.usedByWorkflows.push(requirement.workflowId);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
grouped.set(requirement.credentialId, {
|
|
54
|
+
fallback: requirement,
|
|
55
|
+
usedByWorkflows: [requirement.workflowId],
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
return grouped;
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
exports.CredentialExporter = CredentialExporter;
|
|
63
|
+
exports.CredentialExporter = CredentialExporter = __decorate([
|
|
64
|
+
(0, di_1.Service)(),
|
|
65
|
+
__metadata("design:paramtypes", [credentials_finder_service_1.CredentialsFinderService,
|
|
66
|
+
credential_serializer_1.CredentialSerializer])
|
|
67
|
+
], CredentialExporter);
|
|
68
|
+
//# sourceMappingURL=credential.exporter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credential.exporter.js","sourceRoot":"","sources":["../../../../../src/modules/n8n-packages/entities/credential/credential.exporter.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,gCAAkC;AAElC,yFAAoF;AAEpF,mEAA+D;AAG/D,kFAA6E;AAsBtE,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAC9B,YACkB,iBAA2C,EAC3C,oBAA0C;QAD1C,sBAAiB,GAAjB,iBAAiB,CAA0B;QAC3C,yBAAoB,GAApB,oBAAoB,CAAsB;IACzD,CAAC;IAEJ,KAAK,CAAC,MAAM,CAAC,OAAgC;QAC5C,MAAM,SAAS,GAAG,IAAI,mDAAuB,CAAC,aAAa,EAAE,YAAY,CAAC,CAAC;QAC3E,MAAM,OAAO,GAAoB,EAAE,CAAC;QACpC,MAAM,YAAY,GAAmC,EAAE,CAAC;QAExD,KAAK,MAAM,CAAC,YAAY,EAAE,EAAE,QAAQ,EAAE,eAAe,EAAE,CAAC,IAAI,IAAI,CAAC,mBAAmB,CACnF,OAAO,CAAC,YAAY,CACpB,EAAE,CAAC;YACH,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,iBAAiB,CAAC,qBAAqB,CACpE,YAAY,EACZ,OAAO,CAAC,IAAI,EACZ,CAAC,iBAAiB,CAAC,CACnB,CAAC;YAGF,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,UAAU,IAAI;gBACxC,EAAE,EAAE,YAAY;gBAChB,IAAI,EAAE,QAAQ,CAAC,cAAc;gBAC7B,IAAI,EAAE,QAAQ,CAAC,cAAc;aAC7B,CAAC;YAEF,IAAI,UAAU,EAAE,CAAC;gBAChB,MAAM,MAAM,GAAG,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;gBACxC,OAAO,CAAC,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;gBACtC,OAAO,CAAC,MAAM,CAAC,SAAS,CACvB,GAAG,MAAM,kBAAkB,EAC3B,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,oBAAoB,CAAC,SAAS,CAAC,UAAU,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,CAC3E,CAAC;gBACF,OAAO,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;YACpC,CAAC;YAED,YAAY,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,eAAe,EAAE,CAAC,CAAC;QACxD,CAAC;QAED,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC;IAClC,CAAC;IAEO,mBAAmB,CAC1B,YAA6C;QAE7C,MAAM,OAAO,GAAG,IAAI,GAAG,EAA2B,CAAC;QACnD,KAAK,MAAM,WAAW,IAAI,YAAY,EAAE,CAAC;YACxC,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;YACvD,IAAI,QAAQ,EAAE,CAAC;gBACd,IAAI,CAAC,QAAQ,CAAC,eAAe,CAAC,QAAQ,CAAC,WAAW,CAAC,UAAU,CAAC,EAAE,CAAC;oBAChE,QAAQ,CAAC,eAAe,CAAC,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;gBACvD,CAAC;YACF,CAAC;iBAAM,CAAC;gBACP,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,YAAY,EAAE;oBACrC,QAAQ,EAAE,WAAW;oBACrB,eAAe,EAAE,CAAC,WAAW,CAAC,UAAU,CAAC;iBACzC,CAAC,CAAC;YACJ,CAAC;QACF,CAAC;QACD,OAAO,OAAO,CAAC;IAChB,CAAC;CACD,CAAA;AA9DY,gDAAkB;6BAAlB,kBAAkB;IAD9B,IAAA,YAAO,GAAE;qCAG4B,qDAAwB;QACrB,4CAAoB;GAHhD,kBAAkB,CA8D9B"}
|
|
@@ -0,0 +1,25 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.CredentialSerializer = void 0;
|
|
10
|
+
const di_1 = require("@n8n/di");
|
|
11
|
+
const credential_schema_1 = require("../../spec/serialized/credential.schema");
|
|
12
|
+
let CredentialSerializer = class CredentialSerializer {
|
|
13
|
+
serialize(credential) {
|
|
14
|
+
return credential_schema_1.serializedCredentialSchema.parse({
|
|
15
|
+
id: credential.id,
|
|
16
|
+
name: credential.name,
|
|
17
|
+
type: credential.type,
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
exports.CredentialSerializer = CredentialSerializer;
|
|
22
|
+
exports.CredentialSerializer = CredentialSerializer = __decorate([
|
|
23
|
+
(0, di_1.Service)()
|
|
24
|
+
], CredentialSerializer);
|
|
25
|
+
//# sourceMappingURL=credential.serializer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credential.serializer.js","sourceRoot":"","sources":["../../../../../src/modules/n8n-packages/entities/credential/credential.serializer.ts"],"names":[],"mappings":";;;;;;;;;AACA,gCAAkC;AAElC,+EAGiD;AAG1C,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAChC,SAAS,CAAC,UAA6B;QACtC,OAAO,8CAA0B,CAAC,KAAK,CAAC;YACvC,EAAE,EAAE,UAAU,CAAC,EAAE;YACjB,IAAI,EAAE,UAAU,CAAC,IAAI;YACrB,IAAI,EAAE,UAAU,CAAC,IAAI;SACrB,CAAC,CAAC;IACJ,CAAC;CACD,CAAA;AARY,oDAAoB;+BAApB,oBAAoB;IADhC,IAAA,YAAO,GAAE;GACG,oBAAoB,CAQhC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credential.types.js","sourceRoot":"","sources":["../../../../../src/modules/n8n-packages/entities/credential/credential.types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"requirements-extractor.js","sourceRoot":"","sources":["../../../../src/modules/n8n-packages/entities/requirements-extractor.ts"],"names":[],"mappings":""}
|
|
@@ -3,16 +3,25 @@ import { WorkflowFinderService } from '../../../../workflows/workflow-finder.ser
|
|
|
3
3
|
import { WorkflowSerializer } from './workflow.serializer';
|
|
4
4
|
import type { PackageWriter } from '../../io/package-writer';
|
|
5
5
|
import type { ManifestEntry } from '../../spec/manifest.schema';
|
|
6
|
+
import { CredentialRequirementsExtractor } from '../credential/credential-requirements.extractor';
|
|
7
|
+
import type { WorkflowCredentialRequirement } from '../credential/credential.types';
|
|
6
8
|
export interface WorkflowExportRequest {
|
|
7
9
|
user: User;
|
|
8
10
|
workflowIds: string[];
|
|
9
11
|
writer: PackageWriter;
|
|
10
12
|
}
|
|
13
|
+
export interface WorkflowExportRequirements {
|
|
14
|
+
credentials: WorkflowCredentialRequirement[];
|
|
15
|
+
}
|
|
16
|
+
export interface WorkflowExportResult {
|
|
17
|
+
entries: ManifestEntry[];
|
|
18
|
+
requirements: WorkflowExportRequirements;
|
|
19
|
+
}
|
|
11
20
|
export declare class WorkflowExporter {
|
|
12
21
|
private readonly workflowFinder;
|
|
13
22
|
private readonly workflowSerializer;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
23
|
+
private readonly credentialRequirementsExtractor;
|
|
24
|
+
constructor(workflowFinder: WorkflowFinderService, workflowSerializer: WorkflowSerializer, credentialRequirementsExtractor: CredentialRequirementsExtractor);
|
|
25
|
+
export(request: WorkflowExportRequest): Promise<WorkflowExportResult>;
|
|
17
26
|
private assertAllRequestedWorkflowsFound;
|
|
18
27
|
}
|
|
@@ -14,19 +14,22 @@ const di_1 = require("@n8n/di");
|
|
|
14
14
|
const n8n_workflow_1 = require("n8n-workflow");
|
|
15
15
|
const workflow_finder_service_1 = require("../../../../workflows/workflow-finder.service");
|
|
16
16
|
const workflow_serializer_1 = require("./workflow.serializer");
|
|
17
|
-
const
|
|
17
|
+
const unique_filename_allocator_1 = require("../../io/unique-filename-allocator");
|
|
18
|
+
const credential_requirements_extractor_1 = require("../credential/credential-requirements.extractor");
|
|
18
19
|
let WorkflowExporter = class WorkflowExporter {
|
|
19
|
-
constructor(workflowFinder, workflowSerializer) {
|
|
20
|
+
constructor(workflowFinder, workflowSerializer, credentialRequirementsExtractor) {
|
|
20
21
|
this.workflowFinder = workflowFinder;
|
|
21
22
|
this.workflowSerializer = workflowSerializer;
|
|
23
|
+
this.credentialRequirementsExtractor = credentialRequirementsExtractor;
|
|
22
24
|
}
|
|
23
25
|
async export(request) {
|
|
24
26
|
const workflows = await this.workflowFinder.findWorkflowsByIdsForUser(request.workflowIds, request.user, ['workflow:export'], { includeParentFolder: true });
|
|
25
27
|
this.assertAllRequestedWorkflowsFound(request.workflowIds, workflows);
|
|
26
28
|
const entries = [];
|
|
27
|
-
const
|
|
29
|
+
const credentials = [];
|
|
30
|
+
const fileNames = new unique_filename_allocator_1.UniqueFilenameAllocator('workflows');
|
|
28
31
|
for (const workflow of workflows) {
|
|
29
|
-
const target =
|
|
32
|
+
const target = fileNames.allocate(workflow.name);
|
|
30
33
|
const serialized = this.workflowSerializer.serialize(workflow);
|
|
31
34
|
request.writer.writeDirectory(target);
|
|
32
35
|
request.writer.writeFile(`${target}/workflow.json`, JSON.stringify(serialized, null, '\t'));
|
|
@@ -35,22 +38,9 @@ let WorkflowExporter = class WorkflowExporter {
|
|
|
35
38
|
name: workflow.name,
|
|
36
39
|
target,
|
|
37
40
|
});
|
|
41
|
+
credentials.push(...this.credentialRequirementsExtractor.extract(workflow));
|
|
38
42
|
}
|
|
39
|
-
return entries;
|
|
40
|
-
}
|
|
41
|
-
allocateUniqueFileName(name, used) {
|
|
42
|
-
const base = `workflows/${(0, slug_utils_1.generateSlug)(name)}`;
|
|
43
|
-
if (!used.has(base)) {
|
|
44
|
-
used.add(base);
|
|
45
|
-
return base;
|
|
46
|
-
}
|
|
47
|
-
for (let suffix = 2;; suffix++) {
|
|
48
|
-
const candidate = `${base}-${suffix}`;
|
|
49
|
-
if (!used.has(candidate)) {
|
|
50
|
-
used.add(candidate);
|
|
51
|
-
return candidate;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
43
|
+
return { entries, requirements: { credentials } };
|
|
54
44
|
}
|
|
55
45
|
assertAllRequestedWorkflowsFound(requestedWorkflowIds, foundWorkflows) {
|
|
56
46
|
const foundWorkflowIds = new Set(foundWorkflows.map(({ id }) => id));
|
|
@@ -68,6 +58,7 @@ exports.WorkflowExporter = WorkflowExporter;
|
|
|
68
58
|
exports.WorkflowExporter = WorkflowExporter = __decorate([
|
|
69
59
|
(0, di_1.Service)(),
|
|
70
60
|
__metadata("design:paramtypes", [workflow_finder_service_1.WorkflowFinderService,
|
|
71
|
-
workflow_serializer_1.WorkflowSerializer
|
|
61
|
+
workflow_serializer_1.WorkflowSerializer,
|
|
62
|
+
credential_requirements_extractor_1.CredentialRequirementsExtractor])
|
|
72
63
|
], WorkflowExporter);
|
|
73
64
|
//# sourceMappingURL=workflow.exporter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow.exporter.js","sourceRoot":"","sources":["../../../../../src/modules/n8n-packages/entities/workflow/workflow.exporter.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,gCAAkC;AAClC,+CAAyC;AAEzC,iFAA4E;AAE5E,+DAA2D;AAE3D,
|
|
1
|
+
{"version":3,"file":"workflow.exporter.js","sourceRoot":"","sources":["../../../../../src/modules/n8n-packages/entities/workflow/workflow.exporter.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import type { WorkflowEntity } from '@n8n/db';
|
|
2
2
|
import { type SerializedWorkflow } from '../../spec/serialized/workflow.schema';
|
|
3
|
+
type WorkflowPackageContent = Pick<WorkflowEntity, 'name' | 'nodes' | 'connections' | 'isArchived' | 'settings'>;
|
|
3
4
|
export declare class WorkflowSerializer {
|
|
4
5
|
serialize(workflow: WorkflowEntity): SerializedWorkflow;
|
|
6
|
+
deserialize(wire: SerializedWorkflow): WorkflowPackageContent;
|
|
5
7
|
}
|
|
8
|
+
export {};
|
|
@@ -23,6 +23,16 @@ let WorkflowSerializer = class WorkflowSerializer {
|
|
|
23
23
|
isArchived: workflow.isArchived,
|
|
24
24
|
});
|
|
25
25
|
}
|
|
26
|
+
deserialize(wire) {
|
|
27
|
+
const parsed = workflow_schema_1.serializedWorkflowSchema.parse(wire);
|
|
28
|
+
return {
|
|
29
|
+
name: parsed.name,
|
|
30
|
+
nodes: parsed.nodes,
|
|
31
|
+
connections: parsed.connections,
|
|
32
|
+
isArchived: parsed.isArchived,
|
|
33
|
+
...(parsed.settings !== undefined ? { settings: parsed.settings } : {}),
|
|
34
|
+
};
|
|
35
|
+
}
|
|
26
36
|
};
|
|
27
37
|
exports.WorkflowSerializer = WorkflowSerializer;
|
|
28
38
|
exports.WorkflowSerializer = WorkflowSerializer = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow.serializer.js","sourceRoot":"","sources":["../../../../../src/modules/n8n-packages/entities/workflow/workflow.serializer.ts"],"names":[],"mappings":";;;;;;;;;AACA,gCAAkC;
|
|
1
|
+
{"version":3,"file":"workflow.serializer.js","sourceRoot":"","sources":["../../../../../src/modules/n8n-packages/entities/workflow/workflow.serializer.ts"],"names":[],"mappings":";;;;;;;;;AACA,gCAAkC;AAGlC,2EAG+C;AASxC,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAC9B,SAAS,CAAC,QAAwB;QACjC,OAAO,0CAAwB,CAAC,KAAK,CAAC;YACrC,EAAE,EAAE,QAAQ,CAAC,EAAE;YACf,IAAI,EAAE,QAAQ,CAAC,IAAI;YACnB,KAAK,EAAE,QAAQ,CAAC,KAAK;YACrB,WAAW,EAAE,QAAQ,CAAC,WAAW;YACjC,QAAQ,EAAE,QAAQ,CAAC,QAAQ;YAC3B,SAAS,EAAE,QAAQ,CAAC,SAAS;YAC7B,cAAc,EAAE,QAAQ,CAAC,YAAY,EAAE,EAAE,IAAI,IAAI;YACjD,MAAM,EAAE,QAAQ,CAAC,eAAe,KAAK,QAAQ,CAAC,SAAS;YACvD,UAAU,EAAE,QAAQ,CAAC,UAAU;SAC/B,CAAC,CAAC;IACJ,CAAC;IAWD,WAAW,CAAC,IAAwB;QACnC,MAAM,MAAM,GAAG,0CAAwB,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAEpD,OAAO;YACN,IAAI,EAAE,MAAM,CAAC,IAAI;YACjB,KAAK,EAAE,MAAM,CAAC,KAAgB;YAC9B,WAAW,EAAE,MAAM,CAAC,WAA2B;YAC/C,UAAU,EAAE,MAAM,CAAC,UAAU;YAC7B,GAAG,CAAC,MAAM,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SACvE,CAAC;IACH,CAAC;CACD,CAAA;AAnCY,gDAAkB;6BAAlB,kBAAkB;IAD9B,IAAA,YAAO,GAAE;GACG,kBAAkB,CAmC9B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"package-reader.js","sourceRoot":"","sources":["../../../../src/modules/n8n-packages/io/package-reader.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function generateSlug(name: string): string;
|
|
1
|
+
export declare function generateSlug(name: string, fallback?: string): string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.generateSlug = generateSlug;
|
|
4
|
-
const
|
|
5
|
-
function generateSlug(name) {
|
|
4
|
+
const DEFAULT_EMPTY_SLUG_FALLBACK = 'workflow';
|
|
5
|
+
function generateSlug(name, fallback = DEFAULT_EMPTY_SLUG_FALLBACK) {
|
|
6
6
|
let slug = name;
|
|
7
7
|
slug = slug
|
|
8
8
|
.toLowerCase()
|
|
@@ -11,6 +11,6 @@ function generateSlug(name) {
|
|
|
11
11
|
.replace(/\s+/g, '-')
|
|
12
12
|
.replace(/-+/g, '-')
|
|
13
13
|
.replace(/^-|-$/g, '');
|
|
14
|
-
return slug ||
|
|
14
|
+
return slug || fallback;
|
|
15
15
|
}
|
|
16
16
|
//# sourceMappingURL=slug.utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slug.utils.js","sourceRoot":"","sources":["../../../../src/modules/n8n-packages/io/slug.utils.ts"],"names":[],"mappings":";;AAKA,oCAgBC;AArBD,MAAM,
|
|
1
|
+
{"version":3,"file":"slug.utils.js","sourceRoot":"","sources":["../../../../src/modules/n8n-packages/io/slug.utils.ts"],"names":[],"mappings":";;AAKA,oCAgBC;AArBD,MAAM,2BAA2B,GAAG,UAAU,CAAC;AAK/C,SAAgB,YAAY,CAAC,IAAY,EAAE,WAAmB,2BAA2B;IACxF,IAAI,IAAI,GAAG,IAAI,CAAC;IAChB,IAAI,GAAG,IAAI;SACT,WAAW,EAAE;SAEb,OAAO,CAAC,eAAe,EAAE,EAAE,CAAC;SAE5B,IAAI,EAAE;SAEN,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC;SAEpB,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC;SAEnB,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;IAExB,OAAO,IAAI,IAAI,QAAQ,CAAC;AACzB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { PackageManifest } from '../../spec/manifest.schema';
|
|
2
|
+
import type { PackageReader } from '../package-reader';
|
|
3
|
+
export declare class TarPackageReader implements PackageReader {
|
|
4
|
+
private readonly buffer;
|
|
5
|
+
private readonly maxUncompressedBytes;
|
|
6
|
+
private entries;
|
|
7
|
+
constructor(buffer: Buffer, maxUncompressedBytes: number);
|
|
8
|
+
readManifest(): Promise<PackageManifest>;
|
|
9
|
+
readFile(path: string): Promise<Buffer>;
|
|
10
|
+
listEntries(): Promise<string[]>;
|
|
11
|
+
private load;
|
|
12
|
+
private parse;
|
|
13
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TarPackageReader = void 0;
|
|
4
|
+
const tar_1 = require("tar");
|
|
5
|
+
const bad_request_error_1 = require("../../../../errors/response-errors/bad-request.error");
|
|
6
|
+
const MANIFEST_PATH = 'manifest.json';
|
|
7
|
+
class TarPackageReader {
|
|
8
|
+
constructor(buffer, maxUncompressedBytes) {
|
|
9
|
+
this.buffer = buffer;
|
|
10
|
+
this.maxUncompressedBytes = maxUncompressedBytes;
|
|
11
|
+
this.entries = null;
|
|
12
|
+
}
|
|
13
|
+
async readManifest() {
|
|
14
|
+
const entries = await this.load();
|
|
15
|
+
const manifest = entries.get(MANIFEST_PATH);
|
|
16
|
+
if (!manifest) {
|
|
17
|
+
throw new bad_request_error_1.BadRequestError('Package is missing manifest.json');
|
|
18
|
+
}
|
|
19
|
+
try {
|
|
20
|
+
return JSON.parse(manifest.toString('utf-8'));
|
|
21
|
+
}
|
|
22
|
+
catch {
|
|
23
|
+
throw new bad_request_error_1.BadRequestError('Package manifest is not valid JSON');
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
async readFile(path) {
|
|
27
|
+
const entries = await this.load();
|
|
28
|
+
const content = entries.get(path);
|
|
29
|
+
if (!content) {
|
|
30
|
+
throw new bad_request_error_1.BadRequestError(`Package does not contain entry: ${path}`);
|
|
31
|
+
}
|
|
32
|
+
return content;
|
|
33
|
+
}
|
|
34
|
+
async listEntries() {
|
|
35
|
+
const entries = await this.load();
|
|
36
|
+
return Array.from(entries.keys());
|
|
37
|
+
}
|
|
38
|
+
async load() {
|
|
39
|
+
if (this.entries)
|
|
40
|
+
return this.entries;
|
|
41
|
+
this.entries = await this.parse();
|
|
42
|
+
return this.entries;
|
|
43
|
+
}
|
|
44
|
+
async parse() {
|
|
45
|
+
const entries = new Map();
|
|
46
|
+
let totalUncompressedBytes = 0;
|
|
47
|
+
return await new Promise((resolve, reject) => {
|
|
48
|
+
const parser = new tar_1.Parser();
|
|
49
|
+
parser.on('entry', (entry) => {
|
|
50
|
+
if (entry.type !== 'File') {
|
|
51
|
+
entry.resume();
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
const chunks = [];
|
|
55
|
+
let entryBytes = 0;
|
|
56
|
+
entry.on('data', (chunk) => {
|
|
57
|
+
entryBytes += chunk.length;
|
|
58
|
+
if (entryBytes > this.maxUncompressedBytes) {
|
|
59
|
+
reject(new bad_request_error_1.BadRequestError(`Package entry "${entry.path}" exceeds the maximum allowed uncompressed size`));
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
chunks.push(chunk);
|
|
63
|
+
});
|
|
64
|
+
entry.on('end', () => {
|
|
65
|
+
const content = Buffer.concat(chunks);
|
|
66
|
+
totalUncompressedBytes += content.length;
|
|
67
|
+
if (totalUncompressedBytes > this.maxUncompressedBytes) {
|
|
68
|
+
reject(new bad_request_error_1.BadRequestError('Package exceeds the maximum allowed uncompressed size'));
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
entries.set(entry.path, content);
|
|
72
|
+
});
|
|
73
|
+
entry.resume();
|
|
74
|
+
});
|
|
75
|
+
parser.on('error', (error) => {
|
|
76
|
+
reject(new bad_request_error_1.BadRequestError(error instanceof Error ? error.message : 'Failed to read package archive'));
|
|
77
|
+
});
|
|
78
|
+
parser.on('end', () => resolve(entries));
|
|
79
|
+
parser.end(this.buffer);
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
exports.TarPackageReader = TarPackageReader;
|
|
84
|
+
//# sourceMappingURL=tar-package-reader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tar-package-reader.js","sourceRoot":"","sources":["../../../../../src/modules/n8n-packages/io/tar/tar-package-reader.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UniqueFilenameAllocator = void 0;
|
|
4
|
+
const slug_utils_1 = require("./slug.utils");
|
|
5
|
+
class UniqueFilenameAllocator {
|
|
6
|
+
constructor(baseDir, fallback) {
|
|
7
|
+
this.baseDir = baseDir;
|
|
8
|
+
this.fallback = fallback;
|
|
9
|
+
this.used = new Set();
|
|
10
|
+
}
|
|
11
|
+
allocate(name) {
|
|
12
|
+
const base = `${this.baseDir}/${(0, slug_utils_1.generateSlug)(name, this.fallback)}`;
|
|
13
|
+
if (!this.used.has(base)) {
|
|
14
|
+
this.used.add(base);
|
|
15
|
+
return base;
|
|
16
|
+
}
|
|
17
|
+
for (let suffix = 2;; suffix++) {
|
|
18
|
+
const candidate = `${base}-${suffix}`;
|
|
19
|
+
if (!this.used.has(candidate)) {
|
|
20
|
+
this.used.add(candidate);
|
|
21
|
+
return candidate;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
exports.UniqueFilenameAllocator = UniqueFilenameAllocator;
|
|
27
|
+
//# sourceMappingURL=unique-filename-allocator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unique-filename-allocator.js","sourceRoot":"","sources":["../../../../src/modules/n8n-packages/io/unique-filename-allocator.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAE5C,MAAa,uBAAuB;IAGnC,YACkB,OAAe,EACf,QAAiB;QADjB,YAAO,GAAP,OAAO,CAAQ;QACf,aAAQ,GAAR,QAAQ,CAAS;QAJlB,SAAI,GAAG,IAAI,GAAG,EAAU,CAAC;IAKvC,CAAC;IAEJ,QAAQ,CAAC,IAAY;QACpB,MAAM,IAAI,GAAG,GAAG,IAAI,CAAC,OAAO,IAAI,IAAA,yBAAY,EAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;QAEpE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;YAC1B,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YACpB,OAAO,IAAI,CAAC;QACb,CAAC;QAED,KAAK,IAAI,MAAM,GAAG,CAAC,GAAI,MAAM,EAAE,EAAE,CAAC;YACjC,MAAM,SAAS,GAAG,GAAG,IAAI,IAAI,MAAM,EAAE,CAAC;YACtC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC;gBAC/B,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;gBACzB,OAAO,SAAS,CAAC;YAClB,CAAC;QACF,CAAC;IACF,CAAC;CACD;AAxBD,0DAwBC"}
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import { InstanceSettings } from 'n8n-core';
|
|
2
2
|
import type { Readable } from 'node:stream';
|
|
3
|
+
import { CredentialExporter } from './entities/credential/credential.exporter';
|
|
3
4
|
import { WorkflowExporter } from './entities/workflow/workflow.exporter';
|
|
4
|
-
import
|
|
5
|
+
import { ImportPipeline } from './engine/import-pipeline';
|
|
6
|
+
import type { ExportWorkflowsRequest, ImportPackageRequest, ImportResult } from './n8n-packages.types';
|
|
5
7
|
export declare class N8nPackagesService {
|
|
6
8
|
private readonly workflowExporter;
|
|
9
|
+
private readonly credentialExporter;
|
|
7
10
|
private readonly instanceSettings;
|
|
8
|
-
|
|
11
|
+
private readonly importPipeline;
|
|
12
|
+
constructor(workflowExporter: WorkflowExporter, credentialExporter: CredentialExporter, instanceSettings: InstanceSettings, importPipeline: ImportPipeline);
|
|
9
13
|
exportWorkflows(request: ExportWorkflowsRequest): Promise<Readable>;
|
|
14
|
+
importPackage(request: ImportPackageRequest): Promise<ImportResult>;
|
|
10
15
|
}
|
|
@@ -13,37 +13,55 @@ exports.N8nPackagesService = void 0;
|
|
|
13
13
|
const di_1 = require("@n8n/di");
|
|
14
14
|
const n8n_core_1 = require("n8n-core");
|
|
15
15
|
const constants_1 = require("../../constants");
|
|
16
|
+
const credential_exporter_1 = require("./entities/credential/credential.exporter");
|
|
16
17
|
const workflow_exporter_1 = require("./entities/workflow/workflow.exporter");
|
|
18
|
+
const import_pipeline_1 = require("./engine/import-pipeline");
|
|
17
19
|
const tar_package_writer_1 = require("./io/tar/tar-package-writer");
|
|
18
20
|
const constants_2 = require("./spec/constants");
|
|
19
21
|
const manifest_schema_1 = require("./spec/manifest.schema");
|
|
20
22
|
let N8nPackagesService = class N8nPackagesService {
|
|
21
|
-
constructor(workflowExporter, instanceSettings) {
|
|
23
|
+
constructor(workflowExporter, credentialExporter, instanceSettings, importPipeline) {
|
|
22
24
|
this.workflowExporter = workflowExporter;
|
|
25
|
+
this.credentialExporter = credentialExporter;
|
|
23
26
|
this.instanceSettings = instanceSettings;
|
|
27
|
+
this.importPipeline = importPipeline;
|
|
24
28
|
}
|
|
25
29
|
async exportWorkflows(request) {
|
|
26
30
|
const writer = new tar_package_writer_1.TarPackageWriter();
|
|
27
|
-
const workflowEntries = await this.workflowExporter.export({
|
|
31
|
+
const { entries: workflowEntries, requirements: workflowRequirements } = await this.workflowExporter.export({
|
|
28
32
|
user: request.user,
|
|
29
33
|
workflowIds: request.workflowIds,
|
|
30
34
|
writer,
|
|
31
35
|
});
|
|
36
|
+
const { entries: credentialEntries, requirements: credentialRequirements } = await this.credentialExporter.export({
|
|
37
|
+
user: request.user,
|
|
38
|
+
requirements: workflowRequirements.credentials,
|
|
39
|
+
writer,
|
|
40
|
+
});
|
|
32
41
|
const manifest = manifest_schema_1.packageManifestSchema.parse({
|
|
33
42
|
packageFormatVersion: constants_2.FORMAT_VERSION,
|
|
34
43
|
exportedAt: new Date().toISOString(),
|
|
35
44
|
sourceN8nVersion: constants_1.N8N_VERSION,
|
|
36
45
|
sourceId: this.instanceSettings.instanceId,
|
|
37
46
|
workflows: workflowEntries,
|
|
47
|
+
...(credentialEntries.length > 0 ? { credentials: credentialEntries } : {}),
|
|
48
|
+
...(credentialRequirements.length > 0
|
|
49
|
+
? { requirements: { credentials: credentialRequirements } }
|
|
50
|
+
: {}),
|
|
38
51
|
});
|
|
39
52
|
writer.writeFile('manifest.json', JSON.stringify(manifest, null, '\t'));
|
|
40
53
|
return writer.finalize();
|
|
41
54
|
}
|
|
55
|
+
async importPackage(request) {
|
|
56
|
+
return await this.importPipeline.run(request);
|
|
57
|
+
}
|
|
42
58
|
};
|
|
43
59
|
exports.N8nPackagesService = N8nPackagesService;
|
|
44
60
|
exports.N8nPackagesService = N8nPackagesService = __decorate([
|
|
45
61
|
(0, di_1.Service)(),
|
|
46
62
|
__metadata("design:paramtypes", [workflow_exporter_1.WorkflowExporter,
|
|
47
|
-
|
|
63
|
+
credential_exporter_1.CredentialExporter,
|
|
64
|
+
n8n_core_1.InstanceSettings,
|
|
65
|
+
import_pipeline_1.ImportPipeline])
|
|
48
66
|
], N8nPackagesService);
|
|
49
67
|
//# sourceMappingURL=n8n-packages.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"n8n-packages.service.js","sourceRoot":"","sources":["../../../src/modules/n8n-packages/n8n-packages.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,gCAAkC;AAClC,uCAA4C;AAG5C,2CAA0C;AAE1C,6EAAyE;AACzE,oEAA+D;
|
|
1
|
+
{"version":3,"file":"n8n-packages.service.js","sourceRoot":"","sources":["../../../src/modules/n8n-packages/n8n-packages.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,gCAAkC;AAClC,uCAA4C;AAG5C,2CAA0C;AAE1C,mFAA+E;AAC/E,6EAAyE;AACzE,8DAA0D;AAC1D,oEAA+D;AAM/D,gDAAkD;AAClD,4DAA+D;AAGxD,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAC9B,YACkB,gBAAkC,EAClC,kBAAsC,EACtC,gBAAkC,EAClC,cAA8B;QAH9B,qBAAgB,GAAhB,gBAAgB,CAAkB;QAClC,uBAAkB,GAAlB,kBAAkB,CAAoB;QACtC,qBAAgB,GAAhB,gBAAgB,CAAkB;QAClC,mBAAc,GAAd,cAAc,CAAgB;IAC7C,CAAC;IAEJ,KAAK,CAAC,eAAe,CAAC,OAA+B;QACpD,MAAM,MAAM,GAAG,IAAI,qCAAgB,EAAE,CAAC;QAEtC,MAAM,EAAE,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,oBAAoB,EAAE,GACrE,MAAM,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC;YAClC,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,WAAW,EAAE,OAAO,CAAC,WAAW;YAChC,MAAM;SACN,CAAC,CAAC;QAEJ,MAAM,EAAE,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,sBAAsB,EAAE,GACzE,MAAM,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC;YACpC,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,YAAY,EAAE,oBAAoB,CAAC,WAAW;YAC9C,MAAM;SACN,CAAC,CAAC;QAEJ,MAAM,QAAQ,GAAG,uCAAqB,CAAC,KAAK,CAAC;YAC5C,oBAAoB,EAAE,0BAAc;YACpC,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACpC,gBAAgB,EAAE,uBAAW;YAC7B,QAAQ,EAAE,IAAI,CAAC,gBAAgB,CAAC,UAAU;YAC1C,SAAS,EAAE,eAAe;YAC1B,GAAG,CAAC,iBAAiB,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,iBAAiB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAC3E,GAAG,CAAC,sBAAsB,CAAC,MAAM,GAAG,CAAC;gBACpC,CAAC,CAAC,EAAE,YAAY,EAAE,EAAE,WAAW,EAAE,sBAAsB,EAAE,EAAE;gBAC3D,CAAC,CAAC,EAAE,CAAC;SACN,CAAC,CAAC;QAEH,MAAM,CAAC,SAAS,CAAC,eAAe,EAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;QACxE,OAAO,MAAM,CAAC,QAAQ,EAAE,CAAC;IAC1B,CAAC;IAED,KAAK,CAAC,aAAa,CAAC,OAA6B;QAChD,OAAO,MAAM,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IAC/C,CAAC;CACD,CAAA;AA5CY,gDAAkB;6BAAlB,kBAAkB;IAD9B,IAAA,YAAO,GAAE;qCAG2B,oCAAgB;QACd,wCAAkB;QACpB,2BAAgB;QAClB,gCAAc;GALpC,kBAAkB,CA4C9B"}
|
|
@@ -3,3 +3,25 @@ export interface ExportWorkflowsRequest {
|
|
|
3
3
|
user: User;
|
|
4
4
|
workflowIds: string[];
|
|
5
5
|
}
|
|
6
|
+
export interface ImportPackageRequest {
|
|
7
|
+
user: User;
|
|
8
|
+
projectId?: string;
|
|
9
|
+
folderId?: string;
|
|
10
|
+
packageBuffer: Buffer;
|
|
11
|
+
}
|
|
12
|
+
export interface ImportedWorkflowSummary {
|
|
13
|
+
sourceId: string;
|
|
14
|
+
localId: string;
|
|
15
|
+
name: string;
|
|
16
|
+
projectId: string;
|
|
17
|
+
parentFolderId: string | null;
|
|
18
|
+
activeVersionId: string | null;
|
|
19
|
+
}
|
|
20
|
+
export interface ImportResult {
|
|
21
|
+
package: {
|
|
22
|
+
sourceN8nVersion: string;
|
|
23
|
+
sourceId: string;
|
|
24
|
+
exportedAt: string;
|
|
25
|
+
};
|
|
26
|
+
workflows: ImportedWorkflowSummary[];
|
|
27
|
+
}
|