n8n 2.36.5 → 2.37.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/README.md +4 -4
- package/dist/auth/auth.service.js.map +1 -1
- package/dist/build.tsbuildinfo +1 -1
- package/dist/commands/start.js +3 -2
- package/dist/commands/start.js.map +1 -1
- package/dist/constants/oauth2-triggers.d.ts +1 -1
- package/dist/constants/oauth2-triggers.js +3 -3
- package/dist/constants/workflow-reviews.d.ts +0 -3
- package/dist/constants/workflow-reviews.js +1 -10
- package/dist/constants/workflow-reviews.js.map +1 -1
- package/dist/constants.d.ts +2 -0
- package/dist/constants.js +4 -1
- package/dist/constants.js.map +1 -1
- package/dist/controller.registry.js +11 -1
- package/dist/controller.registry.js.map +1 -1
- package/dist/controllers/e2e.controller.d.ts +2 -0
- package/dist/controllers/e2e.controller.js +7 -1
- package/dist/controllers/e2e.controller.js.map +1 -1
- package/dist/controllers/project.controller.js +3 -3
- package/dist/controllers/project.controller.js.map +1 -1
- package/dist/controllers/role.controller.d.ts +0 -1
- package/dist/controllers/role.controller.js +24 -17
- package/dist/controllers/role.controller.js.map +1 -1
- package/dist/controllers/security-settings.controller.js +1 -2
- package/dist/controllers/security-settings.controller.js.map +1 -1
- package/dist/credentials/credential-resolution-provider.interface.d.ts +1 -1
- package/dist/credentials/dynamic-credentials-proxy.d.ts +1 -1
- package/dist/credentials/dynamic-credentials-proxy.js +2 -2
- package/dist/credentials/dynamic-credentials-proxy.js.map +1 -1
- package/dist/credentials-helper.js +12 -1
- package/dist/credentials-helper.js.map +1 -1
- package/dist/errors/response-errors/unsupported-media-type.error.d.ts +4 -0
- package/dist/errors/response-errors/unsupported-media-type.error.js +11 -0
- package/dist/errors/response-errors/unsupported-media-type.error.js.map +1 -0
- package/dist/eventbus/event-message-classes/event-message-audit.d.ts +1 -1
- package/dist/eventbus/event-message-classes/event-message-mcp.d.ts +2 -0
- package/dist/eventbus/event-message-classes/event-message-mcp.js.map +1 -1
- package/dist/eventbus/event-message-classes/index.d.ts +2 -2
- package/dist/eventbus/event-message-classes/index.js +7 -0
- package/dist/eventbus/event-message-classes/index.js.map +1 -1
- package/dist/events/maps/poll-trigger-metrics.event-map.d.ts +3 -0
- package/dist/events/maps/relay.event-map.d.ts +42 -2
- package/dist/events/relays/log-streaming.event-relay.d.ts +4 -0
- package/dist/events/relays/log-streaming.event-relay.js +72 -1
- package/dist/events/relays/log-streaming.event-relay.js.map +1 -1
- package/dist/events/relays/telemetry.event-relay.d.ts +5 -0
- package/dist/events/relays/telemetry.event-relay.js +55 -1
- package/dist/events/relays/telemetry.event-relay.js.map +1 -1
- package/dist/executions/execution-data/db-store.d.ts +1 -1
- package/dist/executions/execution-data/db-store.js +3 -2
- package/dist/executions/execution-data/db-store.js.map +1 -1
- package/dist/executions/execution-data/types.d.ts +4 -2
- package/dist/executions/execution-data/types.js +4 -0
- package/dist/executions/execution-data/types.js.map +1 -1
- package/dist/executions/execution-data/unreadable-run-data.error.d.ts +5 -0
- package/dist/executions/execution-data/unreadable-run-data.error.js +11 -0
- package/dist/executions/execution-data/unreadable-run-data.error.js.map +1 -0
- package/dist/executions/execution-persistence.d.ts +3 -1
- package/dist/executions/execution-persistence.js +23 -10
- package/dist/executions/execution-persistence.js.map +1 -1
- package/dist/executions/execution.service.d.ts +4 -1
- package/dist/executions/execution.service.js +9 -7
- package/dist/executions/execution.service.js.map +1 -1
- package/dist/executions/execution.types.d.ts +1 -7
- package/dist/executions/executions.controller.d.ts +4 -1
- package/dist/executions/executions.controller.js +8 -3
- package/dist/executions/executions.controller.js.map +1 -1
- package/dist/executions/pre-execution-checks/credentials-permission-checker.js +3 -21
- package/dist/executions/pre-execution-checks/credentials-permission-checker.js.map +1 -1
- package/dist/metrics/prometheus/poll-trigger-metrics.service.js +8 -0
- package/dist/metrics/prometheus/poll-trigger-metrics.service.js.map +1 -1
- package/dist/modules/agents/agent-config.service.js +1 -1
- package/dist/modules/agents/agent-config.service.js.map +1 -1
- package/dist/modules/agents/agent-custom-tools.service.js +2 -2
- package/dist/modules/agents/agent-custom-tools.service.js.map +1 -1
- package/dist/modules/agents/agent-execution.service.d.ts +5 -1
- package/dist/modules/agents/agent-execution.service.js +33 -5
- package/dist/modules/agents/agent-execution.service.js.map +1 -1
- package/dist/modules/agents/agent-integration-management.service.d.ts +1 -0
- package/dist/modules/agents/agent-integration-management.service.js +16 -4
- package/dist/modules/agents/agent-integration-management.service.js.map +1 -1
- package/dist/modules/agents/agent-publish.service.d.ts +1 -1
- package/dist/modules/agents/agent-publish.service.js +56 -20
- package/dist/modules/agents/agent-publish.service.js.map +1 -1
- package/dist/modules/agents/agent-sandbox-principal.d.ts +2 -2
- package/dist/modules/agents/agent-sandbox-principal.js +2 -2
- package/dist/modules/agents/agent-sandbox-principal.js.map +1 -1
- package/dist/modules/agents/agent-sandbox-runtime.service.js +2 -2
- package/dist/modules/agents/agent-sandbox-runtime.service.js.map +1 -1
- package/dist/modules/agents/agent-skills.service.js +3 -3
- package/dist/modules/agents/agent-skills.service.js.map +1 -1
- package/dist/modules/agents/agent-task.service.d.ts +2 -0
- package/dist/modules/agents/agent-task.service.js +45 -10
- package/dist/modules/agents/agent-task.service.js.map +1 -1
- package/dist/modules/agents/agent-threads.controller.d.ts +3 -4
- package/dist/modules/agents/agent-threads.controller.js +10 -4
- package/dist/modules/agents/agent-threads.controller.js.map +1 -1
- package/dist/modules/agents/agent-validation.service.d.ts +2 -6
- package/dist/modules/agents/agent-validation.service.js +5 -9
- package/dist/modules/agents/agent-validation.service.js.map +1 -1
- package/dist/modules/agents/agent-workflow-execution.service.d.ts +3 -2
- package/dist/modules/agents/agent-workflow-execution.service.js +31 -14
- package/dist/modules/agents/agent-workflow-execution.service.js.map +1 -1
- package/dist/modules/agents/agents-config.controller.d.ts +9 -0
- package/dist/modules/agents/agents.module.js +0 -3
- package/dist/modules/agents/agents.module.js.map +1 -1
- package/dist/modules/agents/builder/agents-builder-tools.service.js +5 -2
- package/dist/modules/agents/builder/agents-builder-tools.service.js.map +1 -1
- package/dist/modules/agents/builder/agents-builder.service.d.ts +2 -0
- package/dist/modules/agents/builder/agents-builder.service.js +18 -5
- package/dist/modules/agents/builder/agents-builder.service.js.map +1 -1
- package/dist/modules/agents/builder/builder-model-live-lookup.service.d.ts +4 -3
- package/dist/modules/agents/builder/builder-model-live-lookup.service.js +11 -10
- package/dist/modules/agents/builder/builder-model-live-lookup.service.js.map +1 -1
- package/dist/modules/agents/builder/get-resource-locator-options.tool.d.ts +2 -2
- package/dist/modules/agents/builder/skills/target-tasks.skill.js +3 -0
- package/dist/modules/agents/builder/skills/target-tasks.skill.js.map +1 -1
- package/dist/modules/agents/entities/agent-execution.entity.d.ts +2 -0
- package/dist/modules/agents/entities/agent-execution.entity.js +4 -0
- package/dist/modules/agents/entities/agent-execution.entity.js.map +1 -1
- package/dist/modules/agents/entities/agent-task-snapshot.entity.d.ts +1 -0
- package/dist/modules/agents/entities/agent-task-snapshot.entity.js +10 -1
- package/dist/modules/agents/entities/agent-task-snapshot.entity.js.map +1 -1
- package/dist/modules/agents/entities/agent-task.entity.d.ts +1 -0
- package/dist/modules/agents/entities/agent-task.entity.js +10 -1
- package/dist/modules/agents/entities/agent-task.entity.js.map +1 -1
- package/dist/modules/agents/entities/agent.entity.d.ts +1 -0
- package/dist/modules/agents/entities/agent.entity.js +4 -0
- package/dist/modules/agents/entities/agent.entity.js.map +1 -1
- package/dist/modules/agents/instance-ai-builder-delegate.adapter.js +1 -0
- package/dist/modules/agents/instance-ai-builder-delegate.adapter.js.map +1 -1
- package/dist/modules/agents/integrations/agent-chat-bridge.d.ts +1 -0
- package/dist/modules/agents/integrations/agent-chat-bridge.js +22 -8
- package/dist/modules/agents/integrations/agent-chat-bridge.js.map +1 -1
- package/dist/modules/agents/integrations/agent-chat-integration.d.ts +13 -2
- package/dist/modules/agents/integrations/agent-chat-integration.js +1 -1
- package/dist/modules/agents/integrations/agent-chat-integration.js.map +1 -1
- package/dist/modules/agents/integrations/agent-chat-message-context.d.ts +2 -1
- package/dist/modules/agents/integrations/agent-chat-message-context.js +15 -0
- package/dist/modules/agents/integrations/agent-chat-message-context.js.map +1 -1
- package/dist/modules/agents/integrations/chat-integration.service.d.ts +14 -1
- package/dist/modules/agents/integrations/chat-integration.service.js +128 -11
- package/dist/modules/agents/integrations/chat-integration.service.js.map +1 -1
- package/dist/modules/agents/integrations/integration-action-executor.d.ts +1 -0
- package/dist/modules/agents/integrations/integration-action-executor.js +20 -6
- package/dist/modules/agents/integrations/integration-action-executor.js.map +1 -1
- package/dist/modules/agents/integrations/integration-message-context.service.d.ts +8 -1
- package/dist/modules/agents/integrations/integration-message-context.service.js +87 -3
- package/dist/modules/agents/integrations/integration-message-context.service.js.map +1 -1
- package/dist/modules/agents/integrations/integration-tool-execution.js +7 -0
- package/dist/modules/agents/integrations/integration-tool-execution.js.map +1 -1
- package/dist/modules/agents/integrations/integration-tool-types.d.ts +8 -0
- package/dist/modules/agents/integrations/leader-channel-relay.service.d.ts +25 -0
- package/dist/modules/agents/integrations/leader-channel-relay.service.js +123 -0
- package/dist/modules/agents/integrations/leader-channel-relay.service.js.map +1 -0
- package/dist/modules/agents/integrations/platforms/slack/slack-bridge-behavior.js +8 -4
- package/dist/modules/agents/integrations/platforms/slack/slack-bridge-behavior.js.map +1 -1
- package/dist/modules/agents/integrations/platforms/slack/slack-integration.d.ts +12 -2
- package/dist/modules/agents/integrations/platforms/slack/slack-integration.js +34 -2
- package/dist/modules/agents/integrations/platforms/slack/slack-integration.js.map +1 -1
- package/dist/modules/agents/integrations/platforms/slack/slack-methods.service.d.ts +4 -1
- package/dist/modules/agents/integrations/platforms/slack/slack-methods.service.js +37 -9
- package/dist/modules/agents/integrations/platforms/slack/slack-methods.service.js.map +1 -1
- package/dist/modules/agents/integrations/platforms/telegram-integration.d.ts +3 -1
- package/dist/modules/agents/integrations/platforms/telegram-integration.js +2 -2
- package/dist/modules/agents/integrations/platforms/telegram-integration.js.map +1 -1
- package/dist/modules/agents/json-config/agent-config-composition.d.ts +1 -1
- package/dist/modules/agents/json-config/agent-config-composition.js +3 -10
- package/dist/modules/agents/json-config/agent-config-composition.js.map +1 -1
- package/dist/modules/agents/repositories/agent-execution-thread.repository.d.ts +5 -1
- package/dist/modules/agents/repositories/agent-execution-thread.repository.js +89 -8
- package/dist/modules/agents/repositories/agent-execution-thread.repository.js.map +1 -1
- package/dist/modules/agents/repositories/agent-execution.repository.d.ts +5 -2
- package/dist/modules/agents/repositories/agent-execution.repository.js +41 -2
- package/dist/modules/agents/repositories/agent-execution.repository.js.map +1 -1
- package/dist/modules/agents/repositories/agent-task-snapshot.repository.d.ts +1 -1
- package/dist/modules/agents/repositories/agent.repository.d.ts +6 -1
- package/dist/modules/agents/repositories/agent.repository.js +38 -0
- package/dist/modules/agents/repositories/agent.repository.js.map +1 -1
- package/dist/modules/agents/sub-agents/sub-agent-cleanup.service.d.ts +1 -0
- package/dist/modules/agents/sub-agents/sub-agent-cleanup.service.js +20 -7
- package/dist/modules/agents/sub-agents/sub-agent-cleanup.service.js.map +1 -1
- package/dist/modules/agents/tools/workflow-tool-factory.d.ts +11 -0
- package/dist/modules/agents/tools/workflow-tool-factory.js +109 -40
- package/dist/modules/agents/tools/workflow-tool-factory.js.map +1 -1
- package/dist/modules/agents/utils/agent-draft.utils.d.ts +4 -0
- package/dist/modules/agents/utils/agent-draft.utils.js +9 -0
- package/dist/modules/agents/utils/agent-draft.utils.js.map +1 -1
- package/dist/modules/agents/utils/agent-memory-scope.d.ts +1 -0
- package/dist/modules/agents/utils/agent-memory-scope.js +4 -0
- package/dist/modules/agents/utils/agent-memory-scope.js.map +1 -1
- package/dist/modules/agents/utils/execution-failure-summary.d.ts +23 -0
- package/dist/modules/agents/utils/execution-failure-summary.js +54 -0
- package/dist/modules/agents/utils/execution-failure-summary.js.map +1 -0
- package/dist/modules/agents/workflow-agent-stream.d.ts +41 -0
- package/dist/modules/agents/workflow-agent-stream.js +132 -0
- package/dist/modules/agents/workflow-agent-stream.js.map +1 -0
- package/dist/modules/breaking-changes/breaking-changes.service.js +1 -1
- package/dist/modules/breaking-changes/breaking-changes.service.js.map +1 -1
- package/dist/modules/breaking-changes/rules/index.d.ts +4 -0
- package/dist/modules/breaking-changes/rules/index.js +4 -0
- package/dist/modules/breaking-changes/rules/index.js.map +1 -1
- package/dist/modules/breaking-changes/rules/v3/agent-node-mode.d.ts +4 -0
- package/dist/modules/breaking-changes/rules/v3/agent-node-mode.js +26 -0
- package/dist/modules/breaking-changes/rules/v3/agent-node-mode.js.map +1 -0
- package/dist/modules/breaking-changes/rules/v3/agent-node-version.rule.d.ts +10 -0
- package/dist/modules/breaking-changes/rules/v3/agent-node-version.rule.js +53 -0
- package/dist/modules/breaking-changes/rules/v3/agent-node-version.rule.js.map +1 -0
- package/dist/modules/breaking-changes/rules/v3/agent-removed-modes.rule.d.ts +10 -0
- package/dist/modules/breaking-changes/rules/v3/agent-removed-modes.rule.js +56 -0
- package/dist/modules/breaking-changes/rules/v3/agent-removed-modes.rule.js.map +1 -0
- package/dist/modules/breaking-changes/rules/v3/caller-policy-any-removed.rule.d.ts +10 -0
- package/dist/modules/breaking-changes/rules/v3/caller-policy-any-removed.rule.js +54 -0
- package/dist/modules/breaking-changes/rules/v3/caller-policy-any-removed.rule.js.map +1 -0
- package/dist/modules/breaking-changes/rules/v3/caller-policy-default-any.rule.d.ts +10 -0
- package/dist/modules/breaking-changes/rules/v3/caller-policy-default-any.rule.js +63 -0
- package/dist/modules/breaking-changes/rules/v3/caller-policy-default-any.rule.js.map +1 -0
- package/dist/modules/chat-hub/chat-hub.models.service.js +1 -69
- package/dist/modules/chat-hub/chat-hub.models.service.js.map +1 -1
- package/dist/modules/community-packages/community-packages.lifecycle.service.js +4 -14
- package/dist/modules/community-packages/community-packages.lifecycle.service.js.map +1 -1
- package/dist/modules/community-packages/community-packages.service.d.ts +8 -6
- package/dist/modules/community-packages/community-packages.service.js +263 -177
- package/dist/modules/community-packages/community-packages.service.js.map +1 -1
- package/dist/modules/data-table/data-table-size-validator.service.js +2 -2
- package/dist/modules/data-table/data-table-size-validator.service.js.map +1 -1
- package/dist/modules/data-table/multer-upload-middleware.js +2 -2
- package/dist/modules/data-table/multer-upload-middleware.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/identifier-interface.d.ts +1 -1
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/n8n-identifier.d.ts +13 -2
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/n8n-identifier.js +33 -3
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/n8n-identifier.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/oauth2-introspection-identifier.d.ts +3 -0
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/oauth2-introspection-identifier.js +14 -16
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/oauth2-introspection-identifier.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/oauth2-metadata-http-client.d.ts +2 -1
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/oauth2-metadata-http-client.js +2 -2
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/oauth2-metadata-http-client.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/oauth2-userinfo-identifier.d.ts +12 -0
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/oauth2-userinfo-identifier.js +135 -19
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/oauth2-userinfo-identifier.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/oauth2-utils.d.ts +6 -0
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/oauth2-utils.js +29 -1
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/oauth2-utils.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/n8n-credential-resolver.d.ts +5 -5
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/n8n-credential-resolver.js +12 -12
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/n8n-credential-resolver.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/oauth-credential-resolver.d.ts +15 -4
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/oauth-credential-resolver.js +8 -0
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/oauth-credential-resolver.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/services/dynamic-credential.service.d.ts +1 -1
- package/dist/modules/dynamic-credentials.ee/services/dynamic-credential.service.js +3 -3
- package/dist/modules/dynamic-credentials.ee/services/dynamic-credential.service.js.map +1 -1
- package/dist/modules/engine-v2/engine-data-plane-client.d.ts +15 -0
- package/dist/modules/engine-v2/engine-data-plane-client.js +76 -0
- package/dist/modules/engine-v2/engine-data-plane-client.js.map +1 -0
- package/dist/modules/engine-v2/engine-v2.module.d.ts +5 -0
- package/dist/modules/engine-v2/engine-v2.module.js +48 -0
- package/dist/modules/engine-v2/engine-v2.module.js.map +1 -0
- package/dist/modules/engine-v2/engine-v2.runtime.d.ts +20 -0
- package/dist/modules/engine-v2/engine-v2.runtime.js +164 -0
- package/dist/modules/engine-v2/engine-v2.runtime.js.map +1 -0
- package/dist/modules/external-secrets.ee/providers/aws-secrets-manager.js +1 -1
- package/dist/modules/external-secrets.ee/providers/aws-secrets-manager.js.map +1 -1
- package/dist/modules/git-connections.ee/constants.d.ts +7 -0
- package/dist/modules/git-connections.ee/constants.js +11 -0
- package/dist/modules/git-connections.ee/constants.js.map +1 -0
- package/dist/modules/git-connections.ee/database/entities/git-connection-project.entity.d.ts +8 -0
- package/dist/modules/git-connections.ee/database/entities/git-connection-project.entity.js +36 -0
- package/dist/modules/git-connections.ee/database/entities/git-connection-project.entity.js.map +1 -0
- package/dist/modules/git-connections.ee/database/entities/git-connection.entity.d.ts +14 -0
- package/dist/modules/git-connections.ee/database/entities/git-connection.entity.js +61 -0
- package/dist/modules/git-connections.ee/database/entities/git-connection.entity.js.map +1 -0
- package/dist/modules/git-connections.ee/database/repositories/git-connection-project.repository.d.ts +9 -0
- package/dist/modules/git-connections.ee/database/repositories/git-connection-project.repository.js +46 -0
- package/dist/modules/git-connections.ee/database/repositories/git-connection-project.repository.js.map +1 -0
- package/dist/modules/git-connections.ee/database/repositories/git-connection.repository.d.ts +12 -0
- package/dist/modules/git-connections.ee/database/repositories/git-connection.repository.js +37 -0
- package/dist/modules/git-connections.ee/database/repositories/git-connection.repository.js.map +1 -0
- package/dist/modules/git-connections.ee/git-connections-git.service.d.ts +33 -0
- package/dist/modules/git-connections.ee/git-connections-git.service.js +191 -0
- package/dist/modules/git-connections.ee/git-connections-git.service.js.map +1 -0
- package/dist/modules/git-connections.ee/git-connections-git.utils.d.ts +13 -0
- package/dist/modules/git-connections.ee/git-connections-git.utils.js +49 -0
- package/dist/modules/git-connections.ee/git-connections-git.utils.js.map +1 -0
- package/dist/modules/git-connections.ee/git-connections.module.d.ts +5 -0
- package/dist/modules/git-connections.ee/git-connections.module.js +32 -0
- package/dist/modules/git-connections.ee/git-connections.module.js.map +1 -0
- package/dist/modules/git-connections.ee/git-connections.service.d.ts +64 -0
- package/dist/modules/git-connections.ee/git-connections.service.js +331 -0
- package/dist/modules/git-connections.ee/git-connections.service.js.map +1 -0
- package/dist/modules/instance-ai/browser/browser-use-ws.constants.d.ts +2 -0
- package/dist/modules/instance-ai/browser/browser-use-ws.constants.js +10 -1
- package/dist/modules/instance-ai/browser/browser-use-ws.constants.js.map +1 -1
- package/dist/modules/instance-ai/browser/instance-ai-browser-session.service.d.ts +2 -0
- package/dist/modules/instance-ai/browser/instance-ai-browser-session.service.js +19 -2
- package/dist/modules/instance-ai/browser/instance-ai-browser-session.service.js.map +1 -1
- package/dist/modules/instance-ai/event-bus/durable-event-log.d.ts +2 -0
- package/dist/modules/instance-ai/event-bus/durable-event-log.js +30 -1
- package/dist/modules/instance-ai/event-bus/durable-event-log.js.map +1 -1
- package/dist/modules/instance-ai/event-bus/in-process-event-bus.d.ts +3 -1
- package/dist/modules/instance-ai/event-bus/in-process-event-bus.js +33 -23
- package/dist/modules/instance-ai/event-bus/in-process-event-bus.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai-memory.service.js +49 -7
- package/dist/modules/instance-ai/instance-ai-memory.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai-terminal-outcome.service.js +1 -1
- package/dist/modules/instance-ai/instance-ai-terminal-outcome.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai-verification.service.js +3 -2
- package/dist/modules/instance-ai/instance-ai-verification.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.adapter.service.d.ts +4 -0
- package/dist/modules/instance-ai/instance-ai.adapter.service.js +91 -32
- package/dist/modules/instance-ai/instance-ai.adapter.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.module.js +5 -0
- package/dist/modules/instance-ai/instance-ai.module.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.service.d.ts +1 -1
- package/dist/modules/instance-ai/instance-ai.service.js +36 -87
- package/dist/modules/instance-ai/instance-ai.service.js.map +1 -1
- package/dist/modules/instance-ai/liveness/instance-ai-liveness.service.d.ts +3 -1
- package/dist/modules/instance-ai/liveness/instance-ai-liveness.service.js +14 -6
- package/dist/modules/instance-ai/liveness/instance-ai-liveness.service.js.map +1 -1
- package/dist/modules/instance-ai/mcp/instance-ai-mcp-connection.controller.d.ts +3 -2
- package/dist/modules/instance-ai/mcp/instance-ai-mcp-connection.controller.js +10 -0
- package/dist/modules/instance-ai/mcp/instance-ai-mcp-connection.controller.js.map +1 -1
- package/dist/modules/instance-ai/mcp/instance-ai-mcp-registry.service.d.ts +4 -2
- package/dist/modules/instance-ai/mcp/instance-ai-mcp-registry.service.js +47 -4
- package/dist/modules/instance-ai/mcp/instance-ai-mcp-registry.service.js.map +1 -1
- package/dist/modules/instance-ai/repositories/instance-ai-event-log.repository.d.ts +9 -1
- package/dist/modules/instance-ai/repositories/instance-ai-event-log.repository.js +34 -2
- package/dist/modules/instance-ai/repositories/instance-ai-event-log.repository.js.map +1 -1
- package/dist/modules/instance-ai/repositories/instance-ai-run-snapshot.repository.d.ts +4 -0
- package/dist/modules/instance-ai/repositories/instance-ai-run-snapshot.repository.js +14 -0
- package/dist/modules/instance-ai/repositories/instance-ai-run-snapshot.repository.js.map +1 -1
- package/dist/modules/instance-ai/run-trace-metadata.js +2 -1
- package/dist/modules/instance-ai/run-trace-metadata.js.map +1 -1
- package/dist/modules/instance-ai/sandbox/instance-ai-sandbox.service.js +5 -0
- package/dist/modules/instance-ai/sandbox/instance-ai-sandbox.service.js.map +1 -1
- package/dist/modules/instance-ai/storage/db-snapshot-storage.d.ts +4 -1
- package/dist/modules/instance-ai/storage/db-snapshot-storage.js +2 -5
- package/dist/modules/instance-ai/storage/db-snapshot-storage.js.map +1 -1
- package/dist/modules/instance-ai/storage/typeorm-agent-memory.d.ts +2 -0
- package/dist/modules/instance-ai/storage/typeorm-agent-memory.js +6 -2
- package/dist/modules/instance-ai/storage/typeorm-agent-memory.js.map +1 -1
- package/dist/modules/instance-ai/tracing/index.d.ts +1 -1
- package/dist/modules/instance-ai/tracing/instance-ai-tracing.service.d.ts +9 -6
- package/dist/modules/instance-ai/tracing/instance-ai-tracing.service.js +18 -3
- package/dist/modules/instance-ai/tracing/instance-ai-tracing.service.js.map +1 -1
- package/dist/modules/mcp/mcp-api-key.service.js +1 -1
- package/dist/modules/mcp/mcp-api-key.service.js.map +1 -1
- package/dist/modules/mcp/mcp-server-middleware.service.js +1 -1
- package/dist/modules/mcp/mcp-server-middleware.service.js.map +1 -1
- package/dist/modules/mcp/mcp.controller.js +7 -3
- package/dist/modules/mcp/mcp.controller.js.map +1 -1
- package/dist/modules/mcp/mcp.service.d.ts +3 -3
- package/dist/modules/mcp/mcp.service.js +7 -5
- package/dist/modules/mcp/mcp.service.js.map +1 -1
- package/dist/modules/mcp/mcp.types.d.ts +14 -1
- package/dist/modules/mcp/mcp.types.js.map +1 -1
- package/dist/modules/mcp/tool-schema.util.js +2 -3
- package/dist/modules/mcp/tool-schema.util.js.map +1 -1
- package/dist/modules/mcp/tools/agents/agent-reference.d.ts +1 -1
- package/dist/modules/mcp/tools/agents/agent-reference.js +2 -0
- package/dist/modules/mcp/tools/agents/agent-reference.js.map +1 -1
- package/dist/modules/mcp/tools/agents/agent-tools.service.js +1 -0
- package/dist/modules/mcp/tools/agents/agent-tools.service.js.map +1 -1
- package/dist/modules/mcp/tools/search-folders.tool.js +1 -1
- package/dist/modules/mcp/tools/search-folders.tool.js.map +1 -1
- package/dist/modules/mcp/tools/search-workflows.tool.d.ts +5 -2
- package/dist/modules/mcp/tools/search-workflows.tool.js +58 -7
- package/dist/modules/mcp/tools/search-workflows.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/create-workflow-from-code.tool.js +1 -1
- package/dist/modules/mcp/tools/workflow-builder/create-workflow-from-code.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/credential-validation.js +2 -21
- package/dist/modules/mcp/tools/workflow-builder/credential-validation.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/update-workflow.tool.js +2 -2
- package/dist/modules/mcp/tools/workflow-builder/update-workflow.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/validate-workflow-code.tool.js +3 -25
- package/dist/modules/mcp/tools/workflow-builder/validate-workflow-code.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/workflow-operations.js +62 -13
- package/dist/modules/mcp/tools/workflow-builder/workflow-operations.js.map +1 -1
- package/dist/modules/n8n-packages/engine/import-orchestrator.d.ts +13 -3
- package/dist/modules/n8n-packages/engine/import-orchestrator.js +33 -3
- package/dist/modules/n8n-packages/engine/import-orchestrator.js.map +1 -1
- package/dist/modules/n8n-packages/engine/import-result.d.ts +3 -1
- package/dist/modules/n8n-packages/engine/import-result.js +2 -0
- package/dist/modules/n8n-packages/engine/import-result.js.map +1 -1
- package/dist/modules/n8n-packages/engine/import-telemetry.d.ts +2 -2
- package/dist/modules/n8n-packages/engine/import-telemetry.js +9 -0
- package/dist/modules/n8n-packages/engine/import-telemetry.js.map +1 -1
- package/dist/modules/n8n-packages/engine/n8n-package-parser.d.ts +6 -1
- package/dist/modules/n8n-packages/engine/n8n-package-parser.js +16 -2
- package/dist/modules/n8n-packages/engine/n8n-package-parser.js.map +1 -1
- package/dist/modules/n8n-packages/engine/project-package-importer.d.ts +2 -2
- package/dist/modules/n8n-packages/engine/project-package-importer.js +11 -0
- package/dist/modules/n8n-packages/engine/project-package-importer.js.map +1 -1
- package/dist/modules/n8n-packages/engine/workflow-package-importer.d.ts +2 -2
- package/dist/modules/n8n-packages/engine/workflow-package-importer.js +2 -0
- package/dist/modules/n8n-packages/engine/workflow-package-importer.js.map +1 -1
- package/dist/modules/n8n-packages/entities/credential/credential-export-policy.d.ts +4 -0
- package/dist/modules/n8n-packages/entities/credential/credential-export-policy.js +43 -0
- package/dist/modules/n8n-packages/entities/credential/credential-export-policy.js.map +1 -0
- package/dist/modules/n8n-packages/entities/credential/credential.exporter.d.ts +2 -0
- package/dist/modules/n8n-packages/entities/credential/credential.exporter.js +5 -2
- package/dist/modules/n8n-packages/entities/credential/credential.exporter.js.map +1 -1
- package/dist/modules/n8n-packages/entities/credential/credential.serializer.d.ts +4 -2
- package/dist/modules/n8n-packages/entities/credential/credential.serializer.js +2 -1
- package/dist/modules/n8n-packages/entities/credential/credential.serializer.js.map +1 -1
- package/dist/modules/n8n-packages/entities/data-table/data-table.exporter.js +2 -2
- package/dist/modules/n8n-packages/entities/data-table/data-table.exporter.js.map +1 -1
- package/dist/modules/n8n-packages/entities/folder/folder-conflict-policy.d.ts +5 -1
- package/dist/modules/n8n-packages/entities/folder/folder-conflict-policy.js +24 -0
- package/dist/modules/n8n-packages/entities/folder/folder-conflict-policy.js.map +1 -1
- package/dist/modules/n8n-packages/entities/folder/folder-removal.types.d.ts +11 -0
- package/dist/modules/n8n-packages/entities/folder/folder-removal.types.js +3 -0
- package/dist/modules/n8n-packages/entities/folder/folder-removal.types.js.map +1 -0
- package/dist/modules/n8n-packages/entities/folder/folder-remover.d.ts +14 -0
- package/dist/modules/n8n-packages/entities/folder/folder-remover.js +110 -0
- package/dist/modules/n8n-packages/entities/folder/folder-remover.js.map +1 -0
- package/dist/modules/n8n-packages/entities/folder/folder.exporter.js +4 -4
- package/dist/modules/n8n-packages/entities/folder/folder.exporter.js.map +1 -1
- package/dist/modules/n8n-packages/entities/project/project.exporter.js +4 -4
- package/dist/modules/n8n-packages/entities/project/project.exporter.js.map +1 -1
- package/dist/modules/n8n-packages/entities/tag/tag.exporter.d.ts +1 -1
- package/dist/modules/n8n-packages/entities/tag/tag.exporter.js +3 -3
- package/dist/modules/n8n-packages/entities/tag/tag.exporter.js.map +1 -1
- package/dist/modules/n8n-packages/entities/variable/variable.exporter.js +2 -2
- package/dist/modules/n8n-packages/entities/variable/variable.exporter.js.map +1 -1
- package/dist/modules/n8n-packages/entities/workflow/auto-included-workflow.exporter.d.ts +1 -1
- package/dist/modules/n8n-packages/entities/workflow/auto-included-workflow.exporter.js +16 -16
- package/dist/modules/n8n-packages/entities/workflow/auto-included-workflow.exporter.js.map +1 -1
- package/dist/modules/n8n-packages/entities/workflow/workflow-removal.types.d.ts +21 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow-removal.types.js +3 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow-removal.types.js.map +1 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow-remover.d.ts +12 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow-remover.js +109 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow-remover.js.map +1 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow.exporter.js +2 -2
- package/dist/modules/n8n-packages/entities/workflow/workflow.exporter.js.map +1 -1
- package/dist/modules/n8n-packages/entities/workflow/workflow.serializer.d.ts +1 -1
- package/dist/modules/n8n-packages/entities/workflow/workflow.serializer.js +2 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow.serializer.js.map +1 -1
- package/dist/modules/n8n-packages/io/directory/directory-package-writer.d.ts +9 -0
- package/dist/modules/n8n-packages/io/directory/directory-package-writer.js +39 -0
- package/dist/modules/n8n-packages/io/directory/directory-package-writer.js.map +1 -0
- package/dist/modules/n8n-packages/io/package-writer.d.ts +2 -4
- package/dist/modules/n8n-packages/n8n-packages.service.d.ts +5 -1
- package/dist/modules/n8n-packages/n8n-packages.service.js +41 -16
- package/dist/modules/n8n-packages/n8n-packages.service.js.map +1 -1
- package/dist/modules/n8n-packages/n8n-packages.types.d.ts +57 -4
- package/dist/modules/n8n-packages/n8n-packages.types.js +10 -1
- package/dist/modules/n8n-packages/n8n-packages.types.js.map +1 -1
- package/dist/modules/n8n-packages/spec/serialized/credential.schema.d.ts +8 -0
- package/dist/modules/n8n-packages/spec/serialized/credential.schema.js +12 -1
- package/dist/modules/n8n-packages/spec/serialized/credential.schema.js.map +1 -1
- package/dist/modules/n8n-packages/spec/serialized/workflow.schema.d.ts +28 -0
- package/dist/modules/n8n-packages/spec/serialized/workflow.schema.js +7 -0
- package/dist/modules/n8n-packages/spec/serialized/workflow.schema.js.map +1 -1
- package/dist/modules/oauth-server/oauth-token.service.d.ts +1 -0
- package/dist/modules/oauth-server/oauth-token.service.js +12 -1
- package/dist/modules/oauth-server/oauth-token.service.js.map +1 -1
- package/dist/modules/oauth-server/protected-resource-resolvers/form-trigger-resource.resolver.js +0 -4
- package/dist/modules/oauth-server/protected-resource-resolvers/form-trigger-resource.resolver.js.map +1 -1
- package/dist/modules/oauth-server/protected-resource-resolvers/form-trigger-test-resource.resolver.js +0 -4
- package/dist/modules/oauth-server/protected-resource-resolvers/form-trigger-test-resource.resolver.js.map +1 -1
- package/dist/modules/policy-infrastructure/policy-check-failed.error.d.ts +10 -0
- package/dist/modules/policy-infrastructure/policy-check-failed.error.js +14 -0
- package/dist/modules/policy-infrastructure/policy-check-failed.error.js.map +1 -0
- package/dist/modules/policy-infrastructure/policy-decision.service.d.ts +14 -0
- package/dist/modules/policy-infrastructure/policy-decision.service.js +121 -0
- package/dist/modules/policy-infrastructure/policy-decision.service.js.map +1 -0
- package/dist/modules/policy-infrastructure/policy-infrastructure.module.d.ts +4 -0
- package/dist/modules/policy-infrastructure/policy-infrastructure.module.js +23 -0
- package/dist/modules/policy-infrastructure/policy-infrastructure.module.js.map +1 -0
- package/dist/modules/provisioning.ee/constants.d.ts +1 -0
- package/dist/modules/provisioning.ee/constants.js +3 -1
- package/dist/modules/provisioning.ee/constants.js.map +1 -1
- package/dist/modules/provisioning.ee/errors/sso-access-denied.error.d.ts +4 -0
- package/dist/modules/provisioning.ee/errors/sso-access-denied.error.js +11 -0
- package/dist/modules/provisioning.ee/errors/sso-access-denied.error.js.map +1 -0
- package/dist/modules/provisioning.ee/provisioning.service.ee.js +4 -4
- package/dist/modules/provisioning.ee/provisioning.service.ee.js.map +1 -1
- package/dist/modules/provisioning.ee/role-mapping-rule.controller.ee.d.ts +1 -3
- package/dist/modules/provisioning.ee/role-mapping-rule.controller.ee.js +16 -23
- package/dist/modules/provisioning.ee/role-mapping-rule.controller.ee.js.map +1 -1
- package/dist/modules/provisioning.ee/role-mapping-rule.service.ee.d.ts +17 -5
- package/dist/modules/provisioning.ee/role-mapping-rule.service.ee.js +31 -9
- package/dist/modules/provisioning.ee/role-mapping-rule.service.ee.js.map +1 -1
- package/dist/modules/source-control.ee/source-control-export.service.ee.js +1 -0
- package/dist/modules/source-control.ee/source-control-export.service.ee.js.map +1 -1
- package/dist/modules/source-control.ee/source-control-git.service.ee.js +7 -19
- package/dist/modules/source-control.ee/source-control-git.service.ee.js.map +1 -1
- package/dist/modules/source-control.ee/source-control-helper.ee.d.ts +3 -5
- package/dist/modules/source-control.ee/source-control-helper.ee.js +10 -40
- package/dist/modules/source-control.ee/source-control-helper.ee.js.map +1 -1
- package/dist/modules/source-control.ee/source-control-import.service.ee.js +7 -2
- package/dist/modules/source-control.ee/source-control-import.service.ee.js.map +1 -1
- package/dist/modules/source-control.ee/source-control-status.service.ee.js +1 -1
- package/dist/modules/source-control.ee/source-control-status.service.ee.js.map +1 -1
- package/dist/modules/source-control.ee/types/exportable-workflow.d.ts +1 -0
- package/dist/modules/source-control.ee/types/source-control-workflow-version-id.d.ts +1 -0
- package/dist/modules/sso-oidc/oidc.controller.ee.js +23 -7
- package/dist/modules/sso-oidc/oidc.controller.ee.js.map +1 -1
- package/dist/modules/sso-saml/saml.controller.ee.js +5 -0
- package/dist/modules/sso-saml/saml.controller.ee.js.map +1 -1
- package/dist/modules/type-availability-policies/policy-evaluator.d.ts +2 -0
- package/dist/modules/type-availability-policies/policy-evaluator.js +28 -0
- package/dist/modules/type-availability-policies/policy-evaluator.js.map +1 -0
- package/dist/modules/type-availability-policies/policy-rule.types.d.ts +23 -0
- package/dist/modules/type-availability-policies/policy-rule.types.js +3 -0
- package/dist/modules/type-availability-policies/policy-rule.types.js.map +1 -0
- package/dist/modules/type-availability-policies/type-availability-policies.module.d.ts +4 -0
- package/dist/modules/type-availability-policies/type-availability-policies.module.js +18 -0
- package/dist/modules/type-availability-policies/type-availability-policies.module.js.map +1 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-access.service.d.ts +4 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-access.service.js +25 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-access.service.js.map +1 -1
- package/dist/modules/workflow-reviews.ee/workflow-review-activity.service.d.ts +5 -2
- package/dist/modules/workflow-reviews.ee/workflow-review-activity.service.js +14 -2
- package/dist/modules/workflow-reviews.ee/workflow-review-activity.service.js.map +1 -1
- package/dist/modules/workflow-reviews.ee/workflow-review-eligibility.service.js +9 -9
- package/dist/modules/workflow-reviews.ee/workflow-review-eligibility.service.js.map +1 -1
- package/dist/modules/workflow-reviews.ee/workflow-review-feature-gate.service.js +1 -2
- package/dist/modules/workflow-reviews.ee/workflow-review-feature-gate.service.js.map +1 -1
- package/dist/modules/workflow-reviews.ee/workflow-review-inbox.service.d.ts +2 -3
- package/dist/modules/workflow-reviews.ee/workflow-review-inbox.service.js +5 -5
- package/dist/modules/workflow-reviews.ee/workflow-review-inbox.service.js.map +1 -1
- package/dist/modules/workflow-reviews.ee/workflow-review-lifecycle.service.d.ts +30 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-lifecycle.service.js +256 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-lifecycle.service.js.map +1 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-request.service.d.ts +6 -6
- package/dist/modules/workflow-reviews.ee/workflow-review-request.service.js +61 -52
- package/dist/modules/workflow-reviews.ee/workflow-review-request.service.js.map +1 -1
- package/dist/modules/workflow-reviews.ee/workflow-review.mapper.d.ts +3 -2
- package/dist/modules/workflow-reviews.ee/workflow-review.mapper.js +24 -1
- package/dist/modules/workflow-reviews.ee/workflow-review.mapper.js.map +1 -1
- package/dist/modules/workflow-reviews.ee/workflow-reviews.module.js +2 -5
- package/dist/modules/workflow-reviews.ee/workflow-reviews.module.js.map +1 -1
- package/dist/oauth/dcr-managed-fields.d.ts +1 -0
- package/dist/oauth/dcr-managed-fields.js +9 -1
- package/dist/oauth/dcr-managed-fields.js.map +1 -1
- package/dist/policy/policy-cleared.d.ts +20 -0
- package/dist/policy/policy-cleared.js +22 -0
- package/dist/policy/policy-cleared.js.map +1 -0
- package/dist/policy/policy-enforcement-backend.d.ts +15 -0
- package/dist/policy/policy-enforcement-backend.js +3 -0
- package/dist/policy/policy-enforcement-backend.js.map +1 -0
- package/dist/policy/policy-enforcement.service.d.ts +21 -0
- package/dist/policy/policy-enforcement.service.js +87 -0
- package/dist/policy/policy-enforcement.service.js.map +1 -0
- package/dist/policy/policy-violation.error.d.ts +13 -0
- package/dist/policy/policy-violation.error.js +22 -0
- package/dist/policy/policy-violation.error.js.map +1 -0
- package/dist/posthog/index.js +1 -1
- package/dist/posthog/index.js.map +1 -1
- package/dist/public-api/public-api-controller.registry.js +7 -1
- package/dist/public-api/public-api-controller.registry.js.map +1 -1
- package/dist/public-api/public-api-media-type.d.ts +1 -0
- package/dist/public-api/public-api-media-type.js +36 -0
- package/dist/public-api/public-api-media-type.js.map +1 -0
- package/dist/public-api/public-api-route-resolver.d.ts +6 -2
- package/dist/public-api/public-api-route-resolver.js +5 -0
- package/dist/public-api/public-api-route-resolver.js.map +1 -1
- package/dist/public-api/public-api-validation-error.d.ts +2 -0
- package/dist/public-api/public-api-validation-error.js +17 -0
- package/dist/public-api/public-api-validation-error.js.map +1 -0
- package/dist/public-api/types.d.ts +2 -9
- package/dist/public-api/v1/controllers/git-connections.public.controller.d.ts +20 -0
- package/dist/public-api/v1/controllers/git-connections.public.controller.js +278 -0
- package/dist/public-api/v1/controllers/git-connections.public.controller.js.map +1 -0
- 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/role-mapping-rules.public.controller.d.ts +6 -1
- package/dist/public-api/v1/controllers/role-mapping-rules.public.controller.js +117 -11
- package/dist/public-api/v1/controllers/role-mapping-rules.public.controller.js.map +1 -1
- package/dist/public-api/v1/controllers/roles.public.controller.d.ts +2 -1
- package/dist/public-api/v1/controllers/roles.public.controller.js +46 -2
- package/dist/public-api/v1/controllers/roles.public.controller.js.map +1 -1
- package/dist/public-api/v1/controllers/tags.public.controller.js +1 -18
- package/dist/public-api/v1/controllers/tags.public.controller.js.map +1 -1
- package/dist/public-api/v1/controllers/workflows.public.controller.d.ts +16 -3
- package/dist/public-api/v1/controllers/workflows.public.controller.js +170 -21
- package/dist/public-api/v1/controllers/workflows.public.controller.js.map +1 -1
- package/dist/public-api/v1/handlers/executions/executions.handler.js +3 -1
- package/dist/public-api/v1/handlers/executions/executions.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/n8n-packages/n8n-packages.handler.d.ts +1 -0
- 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/projects/projects.handler.js +3 -3
- package/dist/public-api/v1/handlers/projects/projects.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/workflows/workflows.handler.d.ts +0 -6
- package/dist/public-api/v1/handlers/workflows/workflows.handler.js +0 -72
- package/dist/public-api/v1/handlers/workflows/workflows.handler.js.map +1 -1
- package/dist/public-api/v1/openapi-gen/decorator-routes.d.ts +32 -0
- package/dist/public-api/v1/openapi-gen/decorator-routes.js +41 -8
- package/dist/public-api/v1/openapi-gen/decorator-routes.js.map +1 -1
- package/dist/public-api/v1/openapi.yml +5209 -1871
- package/dist/public-api/v1/shared/services/pagination.service.d.ts +8 -0
- package/dist/public-api/v1/shared/services/pagination.service.js +20 -0
- package/dist/public-api/v1/shared/services/pagination.service.js.map +1 -1
- package/dist/push/index.js +3 -3
- package/dist/push/index.js.map +1 -1
- package/dist/response-helper.js +1 -2
- package/dist/response-helper.js.map +1 -1
- package/dist/scaling/constants.d.ts +2 -2
- package/dist/scaling/constants.js +2 -0
- package/dist/scaling/constants.js.map +1 -1
- package/dist/scaling/pubsub/pubsub.event-map.d.ts +19 -0
- package/dist/scaling/pubsub/pubsub.types.d.ts +3 -1
- package/dist/scaling/pubsub/subscriber.service.d.ts +1 -0
- package/dist/scaling/pubsub/subscriber.service.js +24 -4
- package/dist/scaling/pubsub/subscriber.service.js.map +1 -1
- package/dist/scheduling/durable-job-provisioner.js +1 -1
- package/dist/scheduling/durable-job-provisioner.js.map +1 -1
- package/dist/scheduling/durable-scheduler.js +9 -0
- package/dist/scheduling/durable-scheduler.js.map +1 -1
- package/dist/scheduling/poll-trigger-node/durable-poller-chain.d.ts +2 -0
- package/dist/scheduling/poll-trigger-node/durable-poller-chain.js +9 -0
- package/dist/scheduling/poll-trigger-node/durable-poller-chain.js.map +1 -0
- package/dist/scheduling/poll-trigger-node/poll-job-provider.d.ts +1 -3
- package/dist/scheduling/poll-trigger-node/poll-job-provider.js +4 -8
- package/dist/scheduling/poll-trigger-node/poll-job-provider.js.map +1 -1
- package/dist/scheduling/poll-trigger-node/poll-trigger-job-registrar.d.ts +3 -1
- package/dist/scheduling/poll-trigger-node/poll-trigger-job-registrar.js +9 -3
- package/dist/scheduling/poll-trigger-node/poll-trigger-job-registrar.js.map +1 -1
- package/dist/scheduling/poll-trigger-node/poll-trigger-task-handler.d.ts +8 -3
- package/dist/scheduling/poll-trigger-node/poll-trigger-task-handler.js +86 -7
- package/dist/scheduling/poll-trigger-node/poll-trigger-task-handler.js.map +1 -1
- package/dist/services/engine-data-plane-proxy.service.d.ts +10 -0
- package/dist/services/engine-data-plane-proxy.service.js +33 -0
- package/dist/services/engine-data-plane-proxy.service.js.map +1 -0
- package/dist/services/engine-v2-dispatcher.service.d.ts +14 -0
- package/dist/services/engine-v2-dispatcher.service.js +93 -0
- package/dist/services/engine-v2-dispatcher.service.js.map +1 -0
- package/dist/services/folder-finder.service.d.ts +1 -0
- package/dist/services/folder-finder.service.js +9 -0
- package/dist/services/folder-finder.service.js.map +1 -1
- package/dist/services/folder.service.d.ts +5 -0
- package/dist/services/folder.service.js +7 -0
- package/dist/services/folder.service.js.map +1 -1
- package/dist/services/frontend.service.d.ts +3 -4
- package/dist/services/frontend.service.js +5 -13
- package/dist/services/frontend.service.js.map +1 -1
- package/dist/services/node-resource-explorer.service.d.ts +1 -0
- package/dist/services/node-resource-explorer.service.js +72 -13
- package/dist/services/node-resource-explorer.service.js.map +1 -1
- package/dist/services/oauth-token-verifier-proxy.service.d.ts +11 -1
- package/dist/services/oauth-token-verifier-proxy.service.js +6 -0
- package/dist/services/oauth-token-verifier-proxy.service.js.map +1 -1
- package/dist/services/ownership-transfer/ownership-transfer.manifest.json +5 -0
- package/dist/services/role-authorization.d.ts +11 -2
- package/dist/services/role-authorization.js +15 -6
- package/dist/services/role-authorization.js.map +1 -1
- package/dist/services/role.service.d.ts +5 -1
- package/dist/services/role.service.js +7 -2
- package/dist/services/role.service.js.map +1 -1
- package/dist/utils/ai-service-retry.js +3 -4
- package/dist/utils/ai-service-retry.js.map +1 -1
- package/dist/webhooks/webhook-blank-file-inputs.d.ts +4 -0
- package/dist/webhooks/webhook-blank-file-inputs.js +32 -0
- package/dist/webhooks/webhook-blank-file-inputs.js.map +1 -0
- package/dist/webhooks/webhook-form-data.js +29 -15
- package/dist/webhooks/webhook-form-data.js.map +1 -1
- package/dist/webhooks/webhook-helpers.js +2 -2
- package/dist/webhooks/webhook-helpers.js.map +1 -1
- package/dist/webhooks/webhook-request-sanitizer.js +10 -4
- package/dist/webhooks/webhook-request-sanitizer.js.map +1 -1
- package/dist/workflow-execute-additional-data.d.ts +2 -2
- package/dist/workflow-execute-additional-data.js +17 -6
- package/dist/workflow-execute-additional-data.js.map +1 -1
- package/dist/workflow-helpers.d.ts +2 -7
- package/dist/workflow-helpers.js +3 -34
- package/dist/workflow-helpers.js.map +1 -1
- package/dist/workflow-runner.d.ts +3 -1
- package/dist/workflow-runner.js +7 -2
- package/dist/workflow-runner.js.map +1 -1
- package/dist/workflows/publication/heal-node-ids.d.ts +26 -0
- package/dist/workflows/publication/heal-node-ids.js +65 -0
- package/dist/workflows/publication/heal-node-ids.js.map +1 -0
- package/dist/workflows/publication/publication-result.d.ts +1 -1
- package/dist/workflows/publication/publication-status-reporter.js +8 -3
- package/dist/workflows/publication/publication-status-reporter.js.map +1 -1
- package/dist/workflows/publication/workflow-publication-applier.d.ts +10 -1
- package/dist/workflows/publication/workflow-publication-applier.js +56 -3
- package/dist/workflows/publication/workflow-publication-applier.js.map +1 -1
- package/dist/workflows/publication/workflow-publication-outbox-consumer.js +1 -1
- package/dist/workflows/publication/workflow-publication-outbox-consumer.js.map +1 -1
- package/dist/workflows/triggers/enabled-trigger-nodes.d.ts +2 -1
- package/dist/workflows/triggers/enabled-trigger-nodes.js +5 -1
- package/dist/workflows/triggers/enabled-trigger-nodes.js.map +1 -1
- package/dist/workflows/triggers/poll-backoff-policy.d.ts +15 -0
- package/dist/workflows/triggers/poll-backoff-policy.js +78 -0
- package/dist/workflows/triggers/poll-backoff-policy.js.map +1 -0
- package/dist/workflows/triggers/poll-backoff.service.d.ts +30 -0
- package/dist/workflows/triggers/poll-backoff.service.js +121 -0
- package/dist/workflows/triggers/poll-backoff.service.js.map +1 -0
- package/dist/workflows/triggers/poll-cursor.service.d.ts +7 -5
- package/dist/workflows/triggers/poll-cursor.service.js +14 -6
- package/dist/workflows/triggers/poll-cursor.service.js.map +1 -1
- package/dist/workflows/triggers/workflow-trigger-activator.d.ts +1 -0
- package/dist/workflows/triggers/workflow-trigger-activator.js +31 -3
- package/dist/workflows/triggers/workflow-trigger-activator.js.map +1 -1
- package/dist/workflows/workflow-creation.service.d.ts +3 -1
- package/dist/workflows/workflow-creation.service.js +9 -2
- package/dist/workflows/workflow-creation.service.js.map +1 -1
- package/dist/workflows/workflow-finder.service.d.ts +8 -0
- package/dist/workflows/workflow-finder.service.js +20 -0
- package/dist/workflows/workflow-finder.service.js.map +1 -1
- package/dist/workflows/workflow-mutation-hooks-proxy.service.d.ts +16 -6
- package/dist/workflows/workflow-mutation-hooks-proxy.service.js +9 -6
- package/dist/workflows/workflow-mutation-hooks-proxy.service.js.map +1 -1
- package/dist/workflows/workflow-validation.service.js +2 -5
- package/dist/workflows/workflow-validation.service.js.map +1 -1
- package/dist/workflows/workflow.service.d.ts +15 -1
- package/dist/workflows/workflow.service.ee.d.ts +3 -1
- package/dist/workflows/workflow.service.ee.js +12 -6
- package/dist/workflows/workflow.service.ee.js.map +1 -1
- package/dist/workflows/workflow.service.js +77 -25
- package/dist/workflows/workflow.service.js.map +1 -1
- package/package.json +64 -62
- package/templates/form-shell.handlebars +92 -7
- package/templates/form-trigger-completion.handlebars +5 -3
- package/templates/form-trigger.handlebars +11 -4
- package/templates/partials/formHostNavigation.handlebars +44 -0
- package/dist/modules/agents/builder/agents-builder-settings.controller.d.ts +0 -10
- package/dist/modules/agents/builder/agents-builder-settings.controller.js +0 -52
- package/dist/modules/agents/builder/agents-builder-settings.controller.js.map +0 -1
- package/dist/modules/agents/builder/agents-builder-settings.service.d.ts +0 -38
- package/dist/modules/agents/builder/agents-builder-settings.service.js +0 -174
- package/dist/modules/agents/builder/agents-builder-settings.service.js.map +0 -1
- package/dist/modules/data-table/utils/size-utils.d.ts +0 -2
- package/dist/modules/data-table/utils/size-utils.js +0 -19
- package/dist/modules/data-table/utils/size-utils.js.map +0 -1
- package/dist/modules/workflow-reviews.ee/workflow-review-auto-close.service.d.ts +0 -18
- package/dist/modules/workflow-reviews.ee/workflow-review-auto-close.service.js +0 -114
- package/dist/modules/workflow-reviews.ee/workflow-review-auto-close.service.js.map +0 -1
- package/dist/workflows/triggers/durable-poller-gate.service.d.ts +0 -19
- package/dist/workflows/triggers/durable-poller-gate.service.js +0 -78
- package/dist/workflows/triggers/durable-poller-gate.service.js.map +0 -1
|
@@ -0,0 +1,37 @@
|
|
|
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.GitConnectionRepository = void 0;
|
|
13
|
+
const di_1 = require("@n8n/di");
|
|
14
|
+
const typeorm_1 = require("@n8n/typeorm");
|
|
15
|
+
const git_connection_entity_1 = require("../entities/git-connection.entity");
|
|
16
|
+
let GitConnectionRepository = class GitConnectionRepository extends typeorm_1.Repository {
|
|
17
|
+
constructor(dataSource) {
|
|
18
|
+
super(git_connection_entity_1.GitConnection, dataSource.manager);
|
|
19
|
+
}
|
|
20
|
+
async getManyAndCount(options) {
|
|
21
|
+
if (options.take <= 0) {
|
|
22
|
+
return { count: await this.count(), data: [] };
|
|
23
|
+
}
|
|
24
|
+
const [data, count] = await this.findAndCount({
|
|
25
|
+
order: { id: 'ASC' },
|
|
26
|
+
skip: options.skip,
|
|
27
|
+
take: options.take,
|
|
28
|
+
});
|
|
29
|
+
return { count, data };
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
exports.GitConnectionRepository = GitConnectionRepository;
|
|
33
|
+
exports.GitConnectionRepository = GitConnectionRepository = __decorate([
|
|
34
|
+
(0, di_1.Service)(),
|
|
35
|
+
__metadata("design:paramtypes", [typeorm_1.DataSource])
|
|
36
|
+
], GitConnectionRepository);
|
|
37
|
+
//# sourceMappingURL=git-connection.repository.js.map
|
package/dist/modules/git-connections.ee/database/repositories/git-connection.repository.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"git-connection.repository.js","sourceRoot":"","sources":["../../../../../src/modules/git-connections.ee/database/repositories/git-connection.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,gCAAkC;AAClC,0CAAsD;AAEtD,6EAAkE;AAG3D,IAAM,uBAAuB,GAA7B,MAAM,uBAAwB,SAAQ,oBAAyB;IACrE,YAAY,UAAsB;QACjC,KAAK,CAAC,qCAAa,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;IAC1C,CAAC;IAED,KAAK,CAAC,eAAe,CAAC,OAAuC;QAG5D,IAAI,OAAO,CAAC,IAAI,IAAI,CAAC,EAAE,CAAC;YACvB,OAAO,EAAE,KAAK,EAAE,MAAM,IAAI,CAAC,KAAK,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC;QAChD,CAAC;QAED,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC;YAC7C,KAAK,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE;YACpB,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,IAAI,EAAE,OAAO,CAAC,IAAI;SAClB,CAAC,CAAC;QACH,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;IACxB,CAAC;CACD,CAAA;;kCAnBY,uBAAuB;IADnC,IAAA,YAAO,GAAE;qCAEe,oBAAU;GADtB,uBAAuB,CAmBnC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { GitConnectionType, GitKeyGeneratorType } from '@n8n/api-types';
|
|
2
|
+
import { Logger } from '@n8n/backend-common';
|
|
3
|
+
import type { GitConnection } from './database/entities/git-connection.entity';
|
|
4
|
+
type PlainCredentials = {
|
|
5
|
+
type: 'ssh';
|
|
6
|
+
privateKey: string;
|
|
7
|
+
} | {
|
|
8
|
+
type: 'https';
|
|
9
|
+
username: string;
|
|
10
|
+
password: string;
|
|
11
|
+
};
|
|
12
|
+
export declare class GitConnectionsGitService {
|
|
13
|
+
private readonly logger;
|
|
14
|
+
constructor(logger: Logger);
|
|
15
|
+
validateRepositoryUrl(repositoryUrl: string, connectionType: GitConnectionType): void;
|
|
16
|
+
private validateHttpsRepositoryUrl;
|
|
17
|
+
private validateSshRepositoryUrl;
|
|
18
|
+
validateBranchName(branchName: string): Promise<void>;
|
|
19
|
+
generateSshKeyPair(keyType: GitKeyGeneratorType): Promise<{
|
|
20
|
+
publicKey: string;
|
|
21
|
+
privateKey: string;
|
|
22
|
+
}>;
|
|
23
|
+
clone({ connection, credentials, branchName, rootFolder, }: {
|
|
24
|
+
connection: GitConnection;
|
|
25
|
+
credentials: PlainCredentials;
|
|
26
|
+
branchName: string;
|
|
27
|
+
rootFolder: string;
|
|
28
|
+
}): Promise<void>;
|
|
29
|
+
resetWorkingCopy(rootFolder: string): Promise<void>;
|
|
30
|
+
cleanup(rootFolder: string): Promise<void>;
|
|
31
|
+
private withGit;
|
|
32
|
+
}
|
|
33
|
+
export {};
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.GitConnectionsGitService = void 0;
|
|
16
|
+
const backend_common_1 = require("@n8n/backend-common");
|
|
17
|
+
const di_1 = require("@n8n/di");
|
|
18
|
+
const promises_1 = require("node:fs/promises");
|
|
19
|
+
const node_os_1 = require("node:os");
|
|
20
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
21
|
+
const bad_request_error_1 = require("../../errors/response-errors/bad-request.error");
|
|
22
|
+
const constants_1 = require("./constants");
|
|
23
|
+
const git_connections_git_utils_1 = require("./git-connections-git.utils");
|
|
24
|
+
let GitConnectionsGitService = class GitConnectionsGitService {
|
|
25
|
+
constructor(logger) {
|
|
26
|
+
this.logger = logger;
|
|
27
|
+
this.logger = this.logger.scoped('git-connections');
|
|
28
|
+
}
|
|
29
|
+
validateRepositoryUrl(repositoryUrl, connectionType) {
|
|
30
|
+
for (const char of repositoryUrl) {
|
|
31
|
+
const code = char.charCodeAt(0);
|
|
32
|
+
if (code < 32 || code === 127) {
|
|
33
|
+
throw new bad_request_error_1.BadRequestError('Repository URL must not contain control characters');
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
if (connectionType === 'https') {
|
|
37
|
+
this.validateHttpsRepositoryUrl(repositoryUrl);
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
this.validateSshRepositoryUrl(repositoryUrl);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
validateHttpsRepositoryUrl(repositoryUrl) {
|
|
44
|
+
let url;
|
|
45
|
+
try {
|
|
46
|
+
url = new URL(repositoryUrl);
|
|
47
|
+
}
|
|
48
|
+
catch {
|
|
49
|
+
throw new bad_request_error_1.BadRequestError('Repository URL must be a valid HTTP or HTTPS URL');
|
|
50
|
+
}
|
|
51
|
+
if (!['http:', 'https:'].includes(url.protocol)) {
|
|
52
|
+
throw new bad_request_error_1.BadRequestError('HTTPS connections require an HTTP or HTTPS repository URL');
|
|
53
|
+
}
|
|
54
|
+
if (url.username || url.password) {
|
|
55
|
+
throw new bad_request_error_1.BadRequestError('Repository URL must not contain credentials');
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
validateSshRepositoryUrl(repositoryUrl) {
|
|
59
|
+
const error = new bad_request_error_1.BadRequestError('SSH connections require an ssh:// or user@host:path repository URL');
|
|
60
|
+
if (repositoryUrl.startsWith('-') || repositoryUrl.includes('::'))
|
|
61
|
+
throw error;
|
|
62
|
+
const scheme = /^([a-zA-Z][a-zA-Z0-9+.-]*):\/\//.exec(repositoryUrl);
|
|
63
|
+
if (scheme) {
|
|
64
|
+
if (scheme[1].toLowerCase() !== 'ssh')
|
|
65
|
+
throw error;
|
|
66
|
+
let url;
|
|
67
|
+
try {
|
|
68
|
+
url = new URL(repositoryUrl);
|
|
69
|
+
}
|
|
70
|
+
catch {
|
|
71
|
+
throw error;
|
|
72
|
+
}
|
|
73
|
+
if (url.password)
|
|
74
|
+
throw new bad_request_error_1.BadRequestError('Repository URL must not contain credentials');
|
|
75
|
+
if (!url.hostname || !url.pathname || url.pathname === '/')
|
|
76
|
+
throw error;
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
if (process.platform === 'win32' && /^[a-zA-Z]:/.test(repositoryUrl))
|
|
80
|
+
throw error;
|
|
81
|
+
const isScpLike = /^(?:[a-zA-Z0-9_.-]+@)?[a-zA-Z0-9._][a-zA-Z0-9._-]*:[^\s]+$/.test(repositoryUrl);
|
|
82
|
+
if (!isScpLike)
|
|
83
|
+
throw error;
|
|
84
|
+
}
|
|
85
|
+
async validateBranchName(branchName) {
|
|
86
|
+
const { simpleGit } = await import('simple-git');
|
|
87
|
+
try {
|
|
88
|
+
await simpleGit().raw(['check-ref-format', '--branch', branchName]);
|
|
89
|
+
}
|
|
90
|
+
catch {
|
|
91
|
+
throw new bad_request_error_1.BadRequestError(`Invalid Git branch name: ${branchName}`);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
async generateSshKeyPair(keyType) {
|
|
95
|
+
return await (0, git_connections_git_utils_1.generateSshKeyPair)(keyType, constants_1.GIT_KEY_COMMENT);
|
|
96
|
+
}
|
|
97
|
+
async clone({ connection, credentials, branchName, rootFolder, }) {
|
|
98
|
+
await this.validateBranchName(branchName);
|
|
99
|
+
await (0, promises_1.mkdir)(rootFolder, { recursive: true });
|
|
100
|
+
const repositoryFolder = node_path_1.default.join(rootFolder, 'repository');
|
|
101
|
+
const nextRepositoryFolder = node_path_1.default.join(rootFolder, 'repository-next');
|
|
102
|
+
await (0, promises_1.rm)(nextRepositoryFolder, { recursive: true, force: true });
|
|
103
|
+
try {
|
|
104
|
+
await this.withGit({ connection, credentials, baseDir: rootFolder }, async (git) => {
|
|
105
|
+
const remoteRefs = await git.listRemote([
|
|
106
|
+
'--heads',
|
|
107
|
+
connection.repositoryUrl,
|
|
108
|
+
`refs/heads/${branchName}`,
|
|
109
|
+
]);
|
|
110
|
+
if (!remoteRefs.trim()) {
|
|
111
|
+
throw new bad_request_error_1.BadRequestError(`Remote branch does not exist: ${branchName}`);
|
|
112
|
+
}
|
|
113
|
+
await git.clone(connection.repositoryUrl, nextRepositoryFolder, [
|
|
114
|
+
'--branch',
|
|
115
|
+
branchName,
|
|
116
|
+
'--single-branch',
|
|
117
|
+
'--no-tags',
|
|
118
|
+
'--progress',
|
|
119
|
+
]);
|
|
120
|
+
await (0, promises_1.rm)(repositoryFolder, { recursive: true, force: true });
|
|
121
|
+
await (0, promises_1.rename)(nextRepositoryFolder, repositoryFolder);
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
catch (error) {
|
|
125
|
+
await (0, promises_1.rm)(nextRepositoryFolder, { recursive: true, force: true });
|
|
126
|
+
if (error instanceof bad_request_error_1.BadRequestError)
|
|
127
|
+
throw error;
|
|
128
|
+
this.logger.warn('Failed to connect to Git repository', {
|
|
129
|
+
connectionId: connection.id,
|
|
130
|
+
branchName,
|
|
131
|
+
});
|
|
132
|
+
throw new bad_request_error_1.BadRequestError('Could not connect to the Git repository');
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
async resetWorkingCopy(rootFolder) {
|
|
136
|
+
await (0, promises_1.rm)(node_path_1.default.join(rootFolder, 'repository'), { recursive: true, force: true });
|
|
137
|
+
await (0, promises_1.rm)(node_path_1.default.join(rootFolder, 'repository-next'), { recursive: true, force: true });
|
|
138
|
+
}
|
|
139
|
+
async cleanup(rootFolder) {
|
|
140
|
+
await (0, promises_1.rm)(rootFolder, { recursive: true, force: true });
|
|
141
|
+
}
|
|
142
|
+
async withGit({ connection, credentials, baseDir, }, operation) {
|
|
143
|
+
await (0, promises_1.mkdir)(baseDir, { recursive: true });
|
|
144
|
+
const options = {
|
|
145
|
+
baseDir,
|
|
146
|
+
binary: 'git',
|
|
147
|
+
maxConcurrentProcesses: 1,
|
|
148
|
+
trimmed: false,
|
|
149
|
+
timeout: { block: constants_1.GIT_COMMAND_STALL_TIMEOUT_MS },
|
|
150
|
+
};
|
|
151
|
+
const { simpleGit } = await import('simple-git');
|
|
152
|
+
let temporaryFolder;
|
|
153
|
+
try {
|
|
154
|
+
let git;
|
|
155
|
+
if (credentials.type === 'https') {
|
|
156
|
+
const config = (0, git_connections_git_utils_1.buildHttpsGitConfig)(connection.repositoryUrl, credentials);
|
|
157
|
+
git = simpleGit({
|
|
158
|
+
...options,
|
|
159
|
+
config,
|
|
160
|
+
unsafe: { allowUnsafeCredentialHelper: true },
|
|
161
|
+
}).env('GIT_TERMINAL_PROMPT', '0');
|
|
162
|
+
}
|
|
163
|
+
else {
|
|
164
|
+
temporaryFolder = await (0, promises_1.mkdtemp)(node_path_1.default.join((0, node_os_1.tmpdir)(), 'n8n-git-connection-'));
|
|
165
|
+
const privateKeyPath = node_path_1.default.join(temporaryFolder, 'private-key');
|
|
166
|
+
await (0, promises_1.writeFile)(privateKeyPath, credentials.privateKey, { mode: 0o600 });
|
|
167
|
+
await (0, promises_1.chmod)(privateKeyPath, 0o600);
|
|
168
|
+
const sshFolder = node_path_1.default.join(baseDir, '.ssh');
|
|
169
|
+
await (0, promises_1.mkdir)(sshFolder, { recursive: true });
|
|
170
|
+
const sshCommand = (0, git_connections_git_utils_1.buildSshCommand)({
|
|
171
|
+
privateKeyPath,
|
|
172
|
+
knownHostsPath: node_path_1.default.join(sshFolder, 'known_hosts'),
|
|
173
|
+
});
|
|
174
|
+
git = simpleGit({ ...options, unsafe: { allowUnsafeSshCommand: true } })
|
|
175
|
+
.env('GIT_SSH_COMMAND', sshCommand)
|
|
176
|
+
.env('GIT_TERMINAL_PROMPT', '0');
|
|
177
|
+
}
|
|
178
|
+
return await operation(git);
|
|
179
|
+
}
|
|
180
|
+
finally {
|
|
181
|
+
if (temporaryFolder)
|
|
182
|
+
await (0, promises_1.rm)(temporaryFolder, { recursive: true, force: true });
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
};
|
|
186
|
+
exports.GitConnectionsGitService = GitConnectionsGitService;
|
|
187
|
+
exports.GitConnectionsGitService = GitConnectionsGitService = __decorate([
|
|
188
|
+
(0, di_1.Service)(),
|
|
189
|
+
__metadata("design:paramtypes", [backend_common_1.Logger])
|
|
190
|
+
], GitConnectionsGitService);
|
|
191
|
+
//# sourceMappingURL=git-connections-git.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"git-connections-git.service.js","sourceRoot":"","sources":["../../../src/modules/git-connections.ee/git-connections-git.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,wDAA6C;AAC7C,gCAAkC;AAClC,+CAAgF;AAChF,qCAAiC;AACjC,0DAA6B;AAG7B,kFAA6E;AAE7E,2CAA4E;AAE5E,2EAIqC;AAO9B,IAAM,wBAAwB,GAA9B,MAAM,wBAAwB;IACpC,YAA6B,MAAc;sBAAd,MAAM;QAClC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC;IACrD,CAAC;IAED,qBAAqB,CAAC,aAAqB,EAAE,cAAiC;QAG7E,KAAK,MAAM,IAAI,IAAI,aAAa,EAAE,CAAC;YAClC,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;YAChC,IAAI,IAAI,GAAG,EAAE,IAAI,IAAI,KAAK,GAAG,EAAE,CAAC;gBAC/B,MAAM,IAAI,mCAAe,CAAC,oDAAoD,CAAC,CAAC;YACjF,CAAC;QACF,CAAC;QACD,IAAI,cAAc,KAAK,OAAO,EAAE,CAAC;YAChC,IAAI,CAAC,0BAA0B,CAAC,aAAa,CAAC,CAAC;QAChD,CAAC;aAAM,CAAC;YACP,IAAI,CAAC,wBAAwB,CAAC,aAAa,CAAC,CAAC;QAC9C,CAAC;IACF,C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AAE,CAAC,CAAC;QAClF,CAAC;IACF,CAAC;CACD,CAAA;;mCAlOY,wBAAwB;IADpC,IAAA,YAAO,GAAE;qCAE4B,uBAAM;GAD/B,wBAAwB,CAkOpC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { GitKeyGeneratorType } from '@n8n/api-types';
|
|
2
|
+
export declare function buildHttpsGitConfig(repositoryUrl: string, credentials: {
|
|
3
|
+
username: string;
|
|
4
|
+
password: string;
|
|
5
|
+
}): string[];
|
|
6
|
+
export declare function buildSshCommand(paths: {
|
|
7
|
+
privateKeyPath: string;
|
|
8
|
+
knownHostsPath: string;
|
|
9
|
+
}): string;
|
|
10
|
+
export declare function generateSshKeyPair(keyType: GitKeyGeneratorType, comment: string): Promise<{
|
|
11
|
+
publicKey: string;
|
|
12
|
+
privateKey: string;
|
|
13
|
+
}>;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildHttpsGitConfig = buildHttpsGitConfig;
|
|
4
|
+
exports.buildSshCommand = buildSshCommand;
|
|
5
|
+
exports.generateSshKeyPair = generateSshKeyPair;
|
|
6
|
+
const backend_network_1 = require("@n8n/backend-network");
|
|
7
|
+
const node_crypto_1 = require("node:crypto");
|
|
8
|
+
const constants_1 = require("./constants");
|
|
9
|
+
const quoteShellArg = (value) => `'${value.replace(/'/g, "'\"'\"'")}'`;
|
|
10
|
+
function buildHttpsGitConfig(repositoryUrl, credentials) {
|
|
11
|
+
const helper = `!f() { echo username=${quoteShellArg(credentials.username)}; echo password=${quoteShellArg(credentials.password)}; }; f`;
|
|
12
|
+
const config = [
|
|
13
|
+
`credential.helper=${helper}`,
|
|
14
|
+
'credential.useHttpPath=true',
|
|
15
|
+
`http.lowSpeedLimit=${constants_1.HTTP_LOW_SPEED_LIMIT_BYTES}`,
|
|
16
|
+
`http.lowSpeedTime=${constants_1.HTTP_LOW_SPEED_TIME_SECONDS}`,
|
|
17
|
+
];
|
|
18
|
+
const proxyUrl = (0, backend_network_1.resolveProxyUrl)(repositoryUrl);
|
|
19
|
+
if (proxyUrl)
|
|
20
|
+
config.push(`http.proxy=${proxyUrl}`);
|
|
21
|
+
return config;
|
|
22
|
+
}
|
|
23
|
+
function buildSshCommand(paths) {
|
|
24
|
+
const normalizeAndQuote = (value) => quoteShellArg(value.split(/[/\\]/).join('/'));
|
|
25
|
+
const timeouts = `-o ConnectTimeout=${constants_1.SSH_CONNECT_TIMEOUT_SECONDS} -o ServerAliveInterval=${constants_1.SSH_SERVER_ALIVE_INTERVAL_SECONDS} -o ServerAliveCountMax=${constants_1.SSH_SERVER_ALIVE_COUNT_MAX}`;
|
|
26
|
+
return `ssh ${timeouts} -o UserKnownHostsFile=${normalizeAndQuote(paths.knownHostsPath)} -o StrictHostKeyChecking=accept-new -i ${normalizeAndQuote(paths.privateKeyPath)}`;
|
|
27
|
+
}
|
|
28
|
+
async function generateSshKeyPair(keyType, comment) {
|
|
29
|
+
const { default: sshpk } = await import('sshpk');
|
|
30
|
+
const generated = keyType === 'ed25519'
|
|
31
|
+
? (0, node_crypto_1.generateKeyPairSync)('ed25519', {
|
|
32
|
+
privateKeyEncoding: { format: 'pem', type: 'pkcs8' },
|
|
33
|
+
publicKeyEncoding: { format: 'pem', type: 'spki' },
|
|
34
|
+
})
|
|
35
|
+
: (0, node_crypto_1.generateKeyPairSync)('rsa', {
|
|
36
|
+
modulusLength: 4096,
|
|
37
|
+
privateKeyEncoding: { format: 'pem', type: 'pkcs8' },
|
|
38
|
+
publicKeyEncoding: { format: 'pem', type: 'spki' },
|
|
39
|
+
});
|
|
40
|
+
const publicKey = sshpk.parseKey(generated.publicKey, 'pem');
|
|
41
|
+
publicKey.comment = comment;
|
|
42
|
+
const privateKey = sshpk.parsePrivateKey(generated.privateKey, 'pem');
|
|
43
|
+
privateKey.comment = comment;
|
|
44
|
+
return {
|
|
45
|
+
publicKey: publicKey.toString('ssh'),
|
|
46
|
+
privateKey: privateKey.toString('ssh-private'),
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=git-connections-git.utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"git-connections-git.utils.js","sourceRoot":"","sources":["../../../src/modules/git-connections.ee/git-connections-git.utils.ts"],"names":[],"mappings":";;;;;AACA,0DAAuD;AACvD,6CAAkD;AAElD,2CAMqB;AAGrB,MAAM,aAAa,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,SAAS,CAAC,GAAG,CAAC;AAQ/E,6BACC,aAAqB,EACrB,WAAmD;IAEnD,MAAM,MAAM,GAAG,wBAAwB,aAAa,CAAC,WAAW,CAAC,QAAQ,CAAC,mBAAmB,aAAa,CAAC,WAAW,CAAC,QAAQ,CAAC,QAAQ,CAAC;IACzI,MAAM,MAAM,GAAG;QACd,qBAAqB,MAAM,EAAE;QAC7B,6BAA6B;QAC7B,sBAAsB,sCAA0B,EAAE;QAClD,qBAAqB,uCAA2B,EAAE;KAClD,CAAC;IAEF,MAAM,QAAQ,GAAG,IAAA,iCAAe,EAAC,aAAa,CAAC,CAAC;IAChD,IAAI,QAAQ;QAAE,MAAM,CAAC,IAAI,CAAC,cAAc,QAAQ,EAAE,CAAC,CAAC;IACpD,OAAO,MAAM,CAAC;AACf,CAAC;AAGD,yBAAgC,KAAyD;IACxF,MAAM,iBAAiB,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IAC3F,MAAM,QAAQ,GAAG,qBAAqB,uCAA2B,2BAA2B,6CAAiC,2BAA2B,sCAA0B,EAAE,CAAC;IACrL,OAAO,OAAO,QAAQ,0BAA0B,iBAAiB,CAAC,KAAK,CAAC,cAAc,CAAC,2CAA2C,iBAAiB,CAAC,KAAK,CAAC,cAAc,CAAC,EAAE,CAAC;AAC7K,CAAC;AAGM,KAAK,6BAA6B,OAA4B,EAAE,OAAe;IAErF,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC,CAAC;IACjD,MAAM,SAAS,GACd,OAAO,KAAK,SAAS;QACpB,CAAC,CAAC,IAAA,iCAAmB,EAAC,SAAS,EAAE;YAC/B,kBAAkB,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE;YACpD,iBAAiB,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE;SAClD,CAAC;QACH,CAAC,CAAC,IAAA,iCAAmB,EAAC,KAAK,EAAE;YAC3B,aAAa,EAAE,IAAI;YACnB,kBAAkB,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE;YACpD,iBAAiB,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE;SAClD,CAAC,CAAC;IACN,MAAM,SAAS,GAAG,KAAK,CAAC,QAAQ,CAAC,SAAS,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;IAC7D,SAAS,CAAC,OAAO,GAAG,OAAO,CAAC;IAC5B,MAAM,UAAU,GAAG,KAAK,CAAC,eAAe,CAAC,SAAS,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;IACtE,UAAU,CAAC,OAAO,GAAG,OAAO,CAAC;IAC7B,OAAO;QACN,SAAS,EAAE,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC;QACpC,UAAU,EAAE,UAAU,CAAC,QAAQ,CAAC,aAAa,CAAC;KAC9C,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ModuleInterface } from '@n8n/decorators';
|
|
2
|
+
export declare class GitConnectionsModule implements ModuleInterface {
|
|
3
|
+
init(): Promise<void>;
|
|
4
|
+
entities(): Promise<(typeof import("./database/entities/git-connection.entity.js").GitConnection | typeof import("./database/entities/git-connection-project.entity.js").GitConnectionProject)[]>;
|
|
5
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
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.GitConnectionsModule = void 0;
|
|
10
|
+
const constants_1 = require("@n8n/constants");
|
|
11
|
+
const decorators_1 = require("@n8n/decorators");
|
|
12
|
+
const di_1 = require("@n8n/di");
|
|
13
|
+
let GitConnectionsModule = class GitConnectionsModule {
|
|
14
|
+
async init() {
|
|
15
|
+
const { GitConnectionsService } = await import('./git-connections.service.js');
|
|
16
|
+
di_1.Container.get(GitConnectionsService);
|
|
17
|
+
}
|
|
18
|
+
async entities() {
|
|
19
|
+
const { GitConnection } = await import('./database/entities/git-connection.entity.js');
|
|
20
|
+
const { GitConnectionProject } = await import('./database/entities/git-connection-project.entity.js');
|
|
21
|
+
return [GitConnection, GitConnectionProject];
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
exports.GitConnectionsModule = GitConnectionsModule;
|
|
25
|
+
exports.GitConnectionsModule = GitConnectionsModule = __decorate([
|
|
26
|
+
(0, decorators_1.BackendModule)({
|
|
27
|
+
name: 'git-connections',
|
|
28
|
+
licenseFlag: constants_1.LICENSE_FEATURES.GIT_CONNECTIONS,
|
|
29
|
+
instanceTypes: ['main'],
|
|
30
|
+
})
|
|
31
|
+
], GitConnectionsModule);
|
|
32
|
+
//# sourceMappingURL=git-connections.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"git-connections.module.js","sourceRoot":"","sources":["../../../src/modules/git-connections.ee/git-connections.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,8CAAkD;AAElD,gDAAgD;AAChD,gCAAoC;AAO7B,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAChC,KAAK,CAAC,IAAI;QACT,MAAM,EAAE,qBAAqB,EAAE,GAAG,MAAM,MAAM,CAAC,8BAA8B,CAAC,CAAC;QAC/E,cAAS,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;IACtC,CAAC;IAED,KAAK,CAAC,QAAQ;QACb,MAAM,EAAE,aAAa,EAAE,GAAG,MAAM,MAAM,CAAC,8CAA8C,CAAC,CAAC;QACvF,MAAM,EAAE,oBAAoB,EAAE,GAAG,MAAM,MAAM,CAC5C,sDAAsD,CACtD,CAAC;QACF,OAAO,CAAC,aAAa,EAAE,oBAAoB,CAAC,CAAC;IAC9C,CAAC;CACD,CAAA;;+BAbY,oBAAoB;IALhC,IAAA,0BAAa,EAAC;QACd,IAAI,EAAE,iBAAiB;QACvB,WAAW,EAAE,4BAAgB,CAAC,eAAe;QAC7C,aAAa,EAAE,CAAC,MAAM,CAAC;KACvB,CAAC;GACW,oBAAoB,CAahC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { type CreateGitConnectionDto, GitConnectionProjectListPublicDto, GitConnectionProjectPublicDto, type GitConnectionPublicDto, type GitConnectionPushResultDto, type UpdateGitConnectionDto } from '@n8n/api-types';
|
|
2
|
+
import { Logger } from '@n8n/backend-common';
|
|
3
|
+
import type { User } from '@n8n/db';
|
|
4
|
+
import { ProjectRepository } from '@n8n/db';
|
|
5
|
+
import { Cipher, InstanceSettings } from 'n8n-core';
|
|
6
|
+
import { N8nPackagesService } from '../../modules/n8n-packages/n8n-packages.service';
|
|
7
|
+
import { GitConnectionProjectRepository } from './database/repositories/git-connection-project.repository';
|
|
8
|
+
import { GitConnectionRepository } from './database/repositories/git-connection.repository';
|
|
9
|
+
import { GitConnectionsGitService } from './git-connections-git.service';
|
|
10
|
+
type ManageProjectLinkOptions = {
|
|
11
|
+
user: User;
|
|
12
|
+
connectionId: string;
|
|
13
|
+
projectId: string;
|
|
14
|
+
};
|
|
15
|
+
export declare class GitConnectionsService {
|
|
16
|
+
private readonly repository;
|
|
17
|
+
private readonly gitConnectionProjectRepository;
|
|
18
|
+
private readonly projectRepository;
|
|
19
|
+
private readonly gitService;
|
|
20
|
+
private readonly n8nPackagesService;
|
|
21
|
+
private readonly cipher;
|
|
22
|
+
private readonly instanceSettings;
|
|
23
|
+
private readonly logger;
|
|
24
|
+
constructor(repository: GitConnectionRepository, gitConnectionProjectRepository: GitConnectionProjectRepository, projectRepository: ProjectRepository, gitService: GitConnectionsGitService, n8nPackagesService: N8nPackagesService, cipher: Cipher, instanceSettings: InstanceSettings, logger: Logger);
|
|
25
|
+
create(input: CreateGitConnectionDto): Promise<GitConnectionPublicDto>;
|
|
26
|
+
findOne(id: string): Promise<GitConnectionPublicDto>;
|
|
27
|
+
list(offset: number, limit: number): Promise<{
|
|
28
|
+
count: number;
|
|
29
|
+
data: {
|
|
30
|
+
id: string;
|
|
31
|
+
name: string;
|
|
32
|
+
repositoryUrl: string;
|
|
33
|
+
branchName: string | null;
|
|
34
|
+
connectionType: "https" | "ssh";
|
|
35
|
+
keyGeneratorType: "ed25519" | "rsa" | null;
|
|
36
|
+
baseCommit: string | null;
|
|
37
|
+
createdAt: string;
|
|
38
|
+
updatedAt: string;
|
|
39
|
+
}[];
|
|
40
|
+
}>;
|
|
41
|
+
update(id: string, input: UpdateGitConnectionDto): Promise<GitConnectionPublicDto>;
|
|
42
|
+
clone(id: string, branchName?: string): Promise<GitConnectionPublicDto>;
|
|
43
|
+
disconnect(id: string): Promise<GitConnectionPublicDto>;
|
|
44
|
+
delete(id: string): Promise<void>;
|
|
45
|
+
push(connectionId: string, actor: User): Promise<GitConnectionPushResultDto>;
|
|
46
|
+
private exportProjectsToRepository;
|
|
47
|
+
addProject({ user, connectionId, projectId, }: ManageProjectLinkOptions): Promise<GitConnectionProjectPublicDto>;
|
|
48
|
+
removeProject({ user, connectionId, projectId }: ManageProjectLinkOptions): Promise<void>;
|
|
49
|
+
listProjects(id: string): Promise<GitConnectionProjectListPublicDto>;
|
|
50
|
+
private assertProjectAccess;
|
|
51
|
+
private assertProjectCanBeAdded;
|
|
52
|
+
private toLinkPublic;
|
|
53
|
+
private applyNewAuthentication;
|
|
54
|
+
private applyUpdatedAuthentication;
|
|
55
|
+
private validateHttpsCredentials;
|
|
56
|
+
private decryptCredentials;
|
|
57
|
+
private getEntity;
|
|
58
|
+
private rootFolder;
|
|
59
|
+
private resetWorkingCopy;
|
|
60
|
+
private purge;
|
|
61
|
+
private toPublic;
|
|
62
|
+
private toSummary;
|
|
63
|
+
}
|
|
64
|
+
export {};
|