@atom8n/n8n 2.4.6 → 2.5.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.
Files changed (201) hide show
  1. package/dist/build.tsbuildinfo +1 -1
  2. package/dist/commands/execute-batch.d.ts +2 -2
  3. package/dist/commands/import/credentials.d.ts +2 -2
  4. package/dist/commands/import/workflow.d.ts +2 -2
  5. package/dist/commands/ldap/reset.d.ts +2 -2
  6. package/dist/events/relays/workflow-failure-notification.event-relay.d.ts +13 -0
  7. package/dist/events/relays/workflow-failure-notification.event-relay.js +77 -0
  8. package/dist/executions/execution-data/types.d.ts +17 -0
  9. package/dist/executions/execution-data/types.js +2 -0
  10. package/dist/executions/failed-run-factory.d.ts +4 -0
  11. package/dist/executions/failed-run-factory.js +71 -0
  12. package/dist/interfaces.d.ts +1 -1
  13. package/dist/license.js +1 -1
  14. package/dist/middlewares/webview-frame-options.d.ts +2 -0
  15. package/dist/middlewares/webview-frame-options.js +22 -0
  16. package/dist/modules/chat-hub/chat-hub-extractor.d.ts +22 -0
  17. package/dist/modules/chat-hub/chat-hub-extractor.js +63 -0
  18. package/dist/modules/dynamic-credentials.ee/credential-resolvers/storage/dynamic-credential-user-entry-storage.d.ts +11 -0
  19. package/dist/modules/dynamic-credentials.ee/credential-resolvers/storage/dynamic-credential-user-entry-storage.js +58 -0
  20. package/dist/modules/dynamic-credentials.ee/database/entities/dynamic-credential-user-entry.d.ts +12 -0
  21. package/dist/modules/dynamic-credentials.ee/database/entities/dynamic-credential-user-entry.js +64 -0
  22. package/dist/modules/dynamic-credentials.ee/database/repositories/dynamic-credential-user-entry.repository.d.ts +5 -0
  23. package/dist/modules/dynamic-credentials.ee/database/repositories/dynamic-credential-user-entry.repository.js +25 -0
  24. package/dist/modules/dynamic-credentials.ee/dynamic-credentials.config.d.ts +5 -0
  25. package/dist/modules/dynamic-credentials.ee/dynamic-credentials.config.js +36 -0
  26. package/dist/modules/dynamic-credentials.ee/services/dynamic-credential-cors.service.d.ts +12 -0
  27. package/dist/modules/dynamic-credentials.ee/services/dynamic-credential-cors.service.js +69 -0
  28. package/dist/modules/dynamic-credentials.ee/services/resolver-config-expression.service.d.ts +7 -0
  29. package/dist/modules/dynamic-credentials.ee/services/resolver-config-expression.service.js +46 -0
  30. package/dist/modules/insights/database/entities/insights-metadata.js +1 -1
  31. package/dist/modules/insights/database/repositories/insights-by-period-query.helper.js +4 -1
  32. package/dist/modules/insights/database/repositories/insights-by-period.repository.d.ts +1 -1
  33. package/dist/modules/insights/insights.module.d.ts +1 -1
  34. package/dist/modules/insights/insights.service.d.ts +1 -1
  35. package/dist/modules/log-streaming.ee/database/entities/event-destination.entity.d.ts +6 -0
  36. package/dist/modules/log-streaming.ee/database/entities/event-destination.entity.js +28 -0
  37. package/dist/modules/log-streaming.ee/database/entities/index.d.ts +1 -0
  38. package/dist/modules/log-streaming.ee/database/entities/index.js +5 -0
  39. package/dist/modules/log-streaming.ee/database/repositories/event-destination.repository.d.ts +5 -0
  40. package/dist/modules/log-streaming.ee/database/repositories/event-destination.repository.js +25 -0
  41. package/dist/modules/log-streaming.ee/destinations/message-event-bus-destination-from-db.d.ts +4 -0
  42. package/dist/modules/log-streaming.ee/destinations/message-event-bus-destination-from-db.js +24 -0
  43. package/dist/modules/log-streaming.ee/destinations/message-event-bus-destination-sentry.ee.d.ts +17 -0
  44. package/dist/modules/log-streaming.ee/destinations/message-event-bus-destination-sentry.ee.js +131 -0
  45. package/dist/modules/log-streaming.ee/destinations/message-event-bus-destination-syslog.ee.d.ts +22 -0
  46. package/dist/modules/log-streaming.ee/destinations/message-event-bus-destination-syslog.ee.js +116 -0
  47. package/dist/modules/log-streaming.ee/destinations/message-event-bus-destination-webhook.ee.d.ts +35 -0
  48. package/dist/modules/log-streaming.ee/destinations/message-event-bus-destination-webhook.ee.js +328 -0
  49. package/dist/modules/log-streaming.ee/destinations/message-event-bus-destination.ee.d.ts +28 -0
  50. package/dist/modules/log-streaming.ee/destinations/message-event-bus-destination.ee.js +74 -0
  51. package/dist/modules/log-streaming.ee/log-streaming-destination.service.d.ts +32 -0
  52. package/dist/modules/log-streaming.ee/log-streaming-destination.service.js +175 -0
  53. package/dist/modules/log-streaming.ee/log-streaming.controller.d.ts +15 -0
  54. package/dist/modules/log-streaming.ee/log-streaming.controller.js +149 -0
  55. package/dist/modules/log-streaming.ee/log-streaming.module.d.ts +5 -0
  56. package/dist/modules/log-streaming.ee/log-streaming.module.js +66 -0
  57. package/dist/modules/mcp/tools/execute-workflow.tool.d.ts +6 -6
  58. package/dist/modules/source-control.ee/constants.d.ts +17 -0
  59. package/dist/modules/source-control.ee/constants.js +22 -0
  60. package/dist/modules/source-control.ee/middleware/source-control-enabled-middleware.ee.d.ts +2 -0
  61. package/dist/modules/source-control.ee/middleware/source-control-enabled-middleware.ee.js +18 -0
  62. package/dist/modules/source-control.ee/source-control-export.service.ee.d.ts +37 -0
  63. package/dist/modules/source-control.ee/source-control-export.service.ee.js +426 -0
  64. package/dist/modules/source-control.ee/source-control-git.service.ee.d.ts +59 -0
  65. package/dist/modules/source-control.ee/source-control-git.service.ee.js +427 -0
  66. package/dist/modules/source-control.ee/source-control-helper.ee.d.ts +49 -0
  67. package/dist/modules/source-control.ee/source-control-helper.ee.js +241 -0
  68. package/dist/modules/source-control.ee/source-control-import.service.ee.d.ts +110 -0
  69. package/dist/modules/source-control.ee/source-control-import.service.ee.js +957 -0
  70. package/dist/modules/source-control.ee/source-control-preferences.service.ee.d.ts +46 -0
  71. package/dist/modules/source-control.ee/source-control-preferences.service.ee.js +309 -0
  72. package/dist/modules/source-control.ee/source-control-resource-helper.d.ts +4 -0
  73. package/dist/modules/source-control.ee/source-control-resource-helper.js +20 -0
  74. package/dist/modules/source-control.ee/source-control-scoped.service.d.ts +17 -0
  75. package/dist/modules/source-control.ee/source-control-scoped.service.js +134 -0
  76. package/dist/modules/source-control.ee/source-control-status.service.ee.d.ts +90 -0
  77. package/dist/modules/source-control.ee/source-control-status.service.ee.js +596 -0
  78. package/dist/modules/source-control.ee/source-control.config.d.ts +3 -0
  79. package/dist/modules/source-control.ee/source-control.config.js +26 -0
  80. package/dist/modules/source-control.ee/source-control.controller.ee.d.ts +157 -0
  81. package/dist/modules/source-control.ee/source-control.controller.ee.js +347 -0
  82. package/dist/modules/source-control.ee/source-control.module.d.ts +4 -0
  83. package/dist/modules/source-control.ee/source-control.module.js +59 -0
  84. package/dist/modules/source-control.ee/source-control.service.ee.d.ts +125 -0
  85. package/dist/modules/source-control.ee/source-control.service.ee.js +466 -0
  86. package/dist/modules/source-control.ee/types/export-result.d.ts +10 -0
  87. package/dist/modules/source-control.ee/types/export-result.js +2 -0
  88. package/dist/modules/source-control.ee/types/exportable-credential.d.ts +14 -0
  89. package/dist/modules/source-control.ee/types/exportable-credential.js +2 -0
  90. package/dist/modules/source-control.ee/types/exportable-folders.d.ts +11 -0
  91. package/dist/modules/source-control.ee/types/exportable-folders.js +2 -0
  92. package/dist/modules/source-control.ee/types/exportable-project.d.ts +17 -0
  93. package/dist/modules/source-control.ee/types/exportable-project.js +2 -0
  94. package/dist/modules/source-control.ee/types/exportable-tags.d.ts +5 -0
  95. package/dist/modules/source-control.ee/types/exportable-tags.js +2 -0
  96. package/dist/modules/source-control.ee/types/exportable-variable.d.ts +7 -0
  97. package/dist/modules/source-control.ee/types/exportable-variable.js +2 -0
  98. package/dist/modules/source-control.ee/types/exportable-workflow.d.ts +14 -0
  99. package/dist/modules/source-control.ee/types/exportable-workflow.js +2 -0
  100. package/dist/modules/source-control.ee/types/import-result.d.ts +20 -0
  101. package/dist/modules/source-control.ee/types/import-result.js +2 -0
  102. package/dist/modules/source-control.ee/types/key-pair-type.d.ts +1 -0
  103. package/dist/modules/source-control.ee/types/key-pair-type.js +2 -0
  104. package/dist/modules/source-control.ee/types/key-pair.d.ts +4 -0
  105. package/dist/modules/source-control.ee/types/key-pair.js +2 -0
  106. package/dist/modules/source-control.ee/types/requests.d.ts +21 -0
  107. package/dist/modules/source-control.ee/types/requests.js +2 -0
  108. package/dist/modules/source-control.ee/types/resource-owner.d.ts +17 -0
  109. package/dist/modules/source-control.ee/types/resource-owner.js +2 -0
  110. package/dist/modules/source-control.ee/types/source-control-commit.d.ts +3 -0
  111. package/dist/modules/source-control.ee/types/source-control-commit.js +20 -0
  112. package/dist/modules/source-control.ee/types/source-control-context.d.ts +7 -0
  113. package/dist/modules/source-control.ee/types/source-control-context.js +16 -0
  114. package/dist/modules/source-control.ee/types/source-control-disconnect.d.ts +3 -0
  115. package/dist/modules/source-control.ee/types/source-control-disconnect.js +21 -0
  116. package/dist/modules/source-control.ee/types/source-control-generate-key-pair.d.ts +4 -0
  117. package/dist/modules/source-control.ee/types/source-control-generate-key-pair.js +21 -0
  118. package/dist/modules/source-control.ee/types/source-control-get-status.d.ts +10 -0
  119. package/dist/modules/source-control.ee/types/source-control-get-status.js +42 -0
  120. package/dist/modules/source-control.ee/types/source-control-preferences.d.ts +17 -0
  121. package/dist/modules/source-control.ee/types/source-control-preferences.js +88 -0
  122. package/dist/modules/source-control.ee/types/source-control-push.d.ts +3 -0
  123. package/dist/modules/source-control.ee/types/source-control-push.js +21 -0
  124. package/dist/modules/source-control.ee/types/source-control-set-branch.d.ts +3 -0
  125. package/dist/modules/source-control.ee/types/source-control-set-branch.js +20 -0
  126. package/dist/modules/source-control.ee/types/source-control-set-read-only.d.ts +3 -0
  127. package/dist/modules/source-control.ee/types/source-control-set-read-only.js +20 -0
  128. package/dist/modules/source-control.ee/types/source-control-stage.d.ts +5 -0
  129. package/dist/modules/source-control.ee/types/source-control-stage.js +31 -0
  130. package/dist/modules/source-control.ee/types/source-control-workflow-version-id.d.ts +12 -0
  131. package/dist/modules/source-control.ee/types/source-control-workflow-version-id.js +2 -0
  132. package/dist/modules/sso-oidc/constants.d.ts +3 -0
  133. package/dist/modules/sso-oidc/constants.js +6 -0
  134. package/dist/modules/sso-oidc/oidc.controller.ee.d.ts +23 -0
  135. package/dist/modules/sso-oidc/oidc.controller.ee.js +123 -0
  136. package/dist/modules/sso-oidc/oidc.service.ee.d.ts +56 -0
  137. package/dist/modules/sso-oidc/oidc.service.ee.js +468 -0
  138. package/dist/modules/sso-oidc/sso-oidc.module.d.ts +4 -0
  139. package/dist/modules/sso-oidc/sso-oidc.module.js +55 -0
  140. package/dist/modules/sso-saml/constants.d.ts +3 -0
  141. package/dist/modules/sso-saml/constants.js +6 -0
  142. package/dist/modules/sso-saml/errors/invalid-saml-metadata-url.error.d.ts +4 -0
  143. package/dist/modules/sso-saml/errors/invalid-saml-metadata-url.error.js +10 -0
  144. package/dist/modules/sso-saml/errors/invalid-saml-metadata.error.d.ts +4 -0
  145. package/dist/modules/sso-saml/errors/invalid-saml-metadata.error.js +10 -0
  146. package/dist/modules/sso-saml/middleware/saml-enabled-middleware.d.ts +3 -0
  147. package/dist/modules/sso-saml/middleware/saml-enabled-middleware.js +22 -0
  148. package/dist/modules/sso-saml/saml-helpers.d.ts +19 -0
  149. package/dist/modules/sso-saml/saml-helpers.js +129 -0
  150. package/dist/modules/sso-saml/saml-validator.d.ts +16 -0
  151. package/dist/modules/sso-saml/saml-validator.js +129 -0
  152. package/dist/modules/sso-saml/saml.controller.ee.d.ts +50 -0
  153. package/dist/modules/sso-saml/saml.controller.ee.js +227 -0
  154. package/dist/modules/sso-saml/saml.service.ee.d.ts +52 -0
  155. package/dist/modules/sso-saml/saml.service.ee.js +462 -0
  156. package/dist/modules/sso-saml/schema/metadata-exchange.xsd.d.ts +2 -0
  157. package/dist/modules/sso-saml/schema/metadata-exchange.xsd.js +118 -0
  158. package/dist/modules/sso-saml/schema/oasis-200401-wss-wssecurity-secext-1.0.xsd.d.ts +2 -0
  159. package/dist/modules/sso-saml/schema/oasis-200401-wss-wssecurity-secext-1.0.xsd.js +201 -0
  160. package/dist/modules/sso-saml/schema/oasis-200401-wss-wssecurity-utility-1.0.xsd.d.ts +2 -0
  161. package/dist/modules/sso-saml/schema/oasis-200401-wss-wssecurity-utility-1.0.xsd.js +114 -0
  162. package/dist/modules/sso-saml/schema/saml-schema-assertion-2.0.xsd.d.ts +2 -0
  163. package/dist/modules/sso-saml/schema/saml-schema-assertion-2.0.xsd.js +289 -0
  164. package/dist/modules/sso-saml/schema/saml-schema-metadata-2.0.xsd.d.ts +2 -0
  165. package/dist/modules/sso-saml/schema/saml-schema-metadata-2.0.xsd.js +344 -0
  166. package/dist/modules/sso-saml/schema/saml-schema-protocol-2.0.xsd.d.ts +2 -0
  167. package/dist/modules/sso-saml/schema/saml-schema-protocol-2.0.xsd.js +308 -0
  168. package/dist/modules/sso-saml/schema/ws-addr.xsd.d.ts +2 -0
  169. package/dist/modules/sso-saml/schema/ws-addr.xsd.js +143 -0
  170. package/dist/modules/sso-saml/schema/ws-authorization.xsd.d.ts +2 -0
  171. package/dist/modules/sso-saml/schema/ws-authorization.xsd.js +151 -0
  172. package/dist/modules/sso-saml/schema/ws-federation.xsd.d.ts +2 -0
  173. package/dist/modules/sso-saml/schema/ws-federation.xsd.js +476 -0
  174. package/dist/modules/sso-saml/schema/ws-securitypolicy-1.2.xsd.d.ts +2 -0
  175. package/dist/modules/sso-saml/schema/ws-securitypolicy-1.2.xsd.js +1211 -0
  176. package/dist/modules/sso-saml/schema/xenc-schema.xsd.d.ts +2 -0
  177. package/dist/modules/sso-saml/schema/xenc-schema.xsd.js +151 -0
  178. package/dist/modules/sso-saml/schema/xml.xsd.d.ts +2 -0
  179. package/dist/modules/sso-saml/schema/xml.xsd.js +123 -0
  180. package/dist/modules/sso-saml/schema/xmldsig-core-schema.xsd.d.ts +2 -0
  181. package/dist/modules/sso-saml/schema/xmldsig-core-schema.xsd.js +324 -0
  182. package/dist/modules/sso-saml/service-provider.ee.d.ts +6 -0
  183. package/dist/modules/sso-saml/service-provider.ee.js +44 -0
  184. package/dist/modules/sso-saml/sso-saml.module.d.ts +4 -0
  185. package/dist/modules/sso-saml/sso-saml.module.js +55 -0
  186. package/dist/modules/sso-saml/types.d.ts +4 -0
  187. package/dist/modules/sso-saml/types.js +2 -0
  188. package/dist/modules/sso-saml/views/init-sso-post.d.ts +2 -0
  189. package/dist/modules/sso-saml/views/init-sso-post.js +16 -0
  190. package/dist/push/index.d.ts +1 -1
  191. package/dist/services/cors-service.d.ts +7 -0
  192. package/dist/services/cors-service.js +50 -0
  193. package/dist/services/static-auth-service.d.ts +4 -0
  194. package/dist/services/static-auth-service.js +29 -0
  195. package/dist/user-management/email/templates/workflow-failure.handlebars +211 -0
  196. package/dist/utils/cors.util.d.ts +2 -0
  197. package/dist/utils/cors.util.js +17 -0
  198. package/dist/webhooks/waiting-forms.js +3 -3
  199. package/dist/webhooks/waiting-webhooks.js +2 -0
  200. package/dist/workflows/workflows.controller.d.ts +2 -2
  201. package/package.json +21 -21
@@ -0,0 +1,149 @@
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.EventBusController = void 0;
16
+ const decorators_1 = require("@n8n/decorators");
17
+ const express_1 = __importDefault(require("express"));
18
+ const bad_request_error_1 = require("../../errors/response-errors/bad-request.error");
19
+ const event_message_classes_1 = require("../../eventbus/event-message-classes");
20
+ const message_event_bus_1 = require("../../eventbus/message-event-bus/message-event-bus");
21
+ const message_event_bus_destination_sentry_ee_1 = require("./destinations/message-event-bus-destination-sentry.ee");
22
+ const message_event_bus_destination_syslog_ee_1 = require("./destinations/message-event-bus-destination-syslog.ee");
23
+ const message_event_bus_destination_webhook_ee_1 = require("./destinations/message-event-bus-destination-webhook.ee");
24
+ const log_streaming_destination_service_1 = require("./log-streaming-destination.service");
25
+ const isWithIdString = (candidate) => {
26
+ const o = candidate;
27
+ if (!o)
28
+ return false;
29
+ return o.id !== undefined;
30
+ };
31
+ const isMessageEventBusDestinationWebhookOptions = (candidate) => {
32
+ const o = candidate;
33
+ if (!o)
34
+ return false;
35
+ return o.url !== undefined;
36
+ };
37
+ const isMessageEventBusDestinationOptions = (candidate) => {
38
+ const o = candidate;
39
+ if (!o)
40
+ return false;
41
+ return o.__type !== undefined;
42
+ };
43
+ let EventBusController = class EventBusController {
44
+ constructor(eventBus, destinationService) {
45
+ this.eventBus = eventBus;
46
+ this.destinationService = destinationService;
47
+ }
48
+ async getEventNames() {
49
+ return event_message_classes_1.eventNamesAll;
50
+ }
51
+ async getDestination(req) {
52
+ if (isWithIdString(req.query)) {
53
+ return await this.destinationService.findDestination(req.query.id);
54
+ }
55
+ else {
56
+ return await this.destinationService.findDestination();
57
+ }
58
+ }
59
+ async postDestination(req) {
60
+ let result;
61
+ if (isMessageEventBusDestinationOptions(req.body)) {
62
+ switch (req.body.__type) {
63
+ case "$$MessageEventBusDestinationSentry":
64
+ if ((0, message_event_bus_destination_sentry_ee_1.isMessageEventBusDestinationSentryOptions)(req.body)) {
65
+ result = await this.destinationService.addDestination(new message_event_bus_destination_sentry_ee_1.MessageEventBusDestinationSentry(this.eventBus, req.body));
66
+ }
67
+ break;
68
+ case "$$MessageEventBusDestinationWebhook":
69
+ if (isMessageEventBusDestinationWebhookOptions(req.body)) {
70
+ result = await this.destinationService.addDestination(new message_event_bus_destination_webhook_ee_1.MessageEventBusDestinationWebhook(this.eventBus, req.body));
71
+ }
72
+ break;
73
+ case "$$MessageEventBusDestinationSyslog":
74
+ if ((0, message_event_bus_destination_syslog_ee_1.isMessageEventBusDestinationSyslogOptions)(req.body)) {
75
+ result = await this.destinationService.addDestination(new message_event_bus_destination_syslog_ee_1.MessageEventBusDestinationSyslog(this.eventBus, req.body));
76
+ }
77
+ break;
78
+ default:
79
+ throw new bad_request_error_1.BadRequestError(`Body is missing ${req.body.__type} options or type ${req.body.__type} is unknown`);
80
+ }
81
+ if (result) {
82
+ return {
83
+ ...result.serialize(),
84
+ eventBusInstance: undefined,
85
+ };
86
+ }
87
+ throw new bad_request_error_1.BadRequestError('There was an error adding the destination');
88
+ }
89
+ throw new bad_request_error_1.BadRequestError('Body is not configuring MessageEventBusDestinationOptions');
90
+ }
91
+ async sendTestMessage(req) {
92
+ if (isWithIdString(req.query)) {
93
+ return await this.destinationService.testDestination(req.query.id);
94
+ }
95
+ return false;
96
+ }
97
+ async deleteDestination(req) {
98
+ if (isWithIdString(req.query)) {
99
+ await this.destinationService.removeDestination(req.query.id);
100
+ }
101
+ else {
102
+ throw new bad_request_error_1.BadRequestError('Query is missing id');
103
+ }
104
+ }
105
+ };
106
+ exports.EventBusController = EventBusController;
107
+ __decorate([
108
+ (0, decorators_1.Get)('/eventnames'),
109
+ __metadata("design:type", Function),
110
+ __metadata("design:paramtypes", []),
111
+ __metadata("design:returntype", Promise)
112
+ ], EventBusController.prototype, "getEventNames", null);
113
+ __decorate([
114
+ (0, decorators_1.Licensed)('feat:logStreaming'),
115
+ (0, decorators_1.Get)('/destination'),
116
+ (0, decorators_1.GlobalScope)('eventBusDestination:list'),
117
+ __metadata("design:type", Function),
118
+ __metadata("design:paramtypes", [Object]),
119
+ __metadata("design:returntype", Promise)
120
+ ], EventBusController.prototype, "getDestination", null);
121
+ __decorate([
122
+ (0, decorators_1.Licensed)('feat:logStreaming'),
123
+ (0, decorators_1.Post)('/destination'),
124
+ (0, decorators_1.GlobalScope)('eventBusDestination:create'),
125
+ __metadata("design:type", Function),
126
+ __metadata("design:paramtypes", [Object]),
127
+ __metadata("design:returntype", Promise)
128
+ ], EventBusController.prototype, "postDestination", null);
129
+ __decorate([
130
+ (0, decorators_1.Licensed)('feat:logStreaming'),
131
+ (0, decorators_1.Get)('/testmessage'),
132
+ (0, decorators_1.GlobalScope)('eventBusDestination:test'),
133
+ __metadata("design:type", Function),
134
+ __metadata("design:paramtypes", [Object]),
135
+ __metadata("design:returntype", Promise)
136
+ ], EventBusController.prototype, "sendTestMessage", null);
137
+ __decorate([
138
+ (0, decorators_1.Licensed)('feat:logStreaming'),
139
+ (0, decorators_1.Delete)('/destination'),
140
+ (0, decorators_1.GlobalScope)('eventBusDestination:delete'),
141
+ __metadata("design:type", Function),
142
+ __metadata("design:paramtypes", [Object]),
143
+ __metadata("design:returntype", Promise)
144
+ ], EventBusController.prototype, "deleteDestination", null);
145
+ exports.EventBusController = EventBusController = __decorate([
146
+ (0, decorators_1.RestController)('/eventbus'),
147
+ __metadata("design:paramtypes", [message_event_bus_1.MessageEventBus,
148
+ log_streaming_destination_service_1.LogStreamingDestinationService])
149
+ ], EventBusController);
@@ -0,0 +1,5 @@
1
+ import type { ModuleInterface } from '@n8n/decorators';
2
+ export declare class LogStreamingModule implements ModuleInterface {
3
+ init(): Promise<void>;
4
+ entities(): Promise<typeof import("./database/entities/event-destination.entity").EventDestinations[]>;
5
+ }
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
19
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
20
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
21
+ 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;
22
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
23
+ };
24
+ var __importStar = (this && this.__importStar) || (function () {
25
+ var ownKeys = function(o) {
26
+ ownKeys = Object.getOwnPropertyNames || function (o) {
27
+ var ar = [];
28
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
29
+ return ar;
30
+ };
31
+ return ownKeys(o);
32
+ };
33
+ return function (mod) {
34
+ if (mod && mod.__esModule) return mod;
35
+ var result = {};
36
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
37
+ __setModuleDefault(result, mod);
38
+ return result;
39
+ };
40
+ })();
41
+ Object.defineProperty(exports, "__esModule", { value: true });
42
+ exports.LogStreamingModule = void 0;
43
+ const constants_1 = require("@n8n/constants");
44
+ const decorators_1 = require("@n8n/decorators");
45
+ const di_1 = require("@n8n/di");
46
+ let LogStreamingModule = class LogStreamingModule {
47
+ async init() {
48
+ await Promise.resolve().then(() => __importStar(require('./log-streaming.controller')));
49
+ const { LogStreamingDestinationService } = await Promise.resolve().then(() => __importStar(require('./log-streaming-destination.service')));
50
+ const destinationService = di_1.Container.get(LogStreamingDestinationService);
51
+ await destinationService.loadDestinationsFromDb();
52
+ await destinationService.initialize();
53
+ }
54
+ async entities() {
55
+ const { EventDestinations } = await Promise.resolve().then(() => __importStar(require('./database/entities/event-destination.entity')));
56
+ return [EventDestinations];
57
+ }
58
+ };
59
+ exports.LogStreamingModule = LogStreamingModule;
60
+ exports.LogStreamingModule = LogStreamingModule = __decorate([
61
+ (0, decorators_1.BackendModule)({
62
+ name: 'log-streaming',
63
+ licenseFlag: constants_1.LICENSE_FEATURES.LOG_STREAMING,
64
+ instanceTypes: ['main', 'worker', 'webhook'],
65
+ })
66
+ ], LogStreamingModule);
@@ -34,20 +34,20 @@ declare const inputSchema: z.ZodObject<{
34
34
  body: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
35
35
  headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
36
36
  }, "strip", z.ZodTypeAny, {
37
- method: "GET" | "DELETE" | "HEAD" | "OPTIONS" | "POST" | "PUT" | "PATCH";
37
+ method: "OPTIONS" | "DELETE" | "GET" | "HEAD" | "PATCH" | "POST" | "PUT";
38
38
  body?: Record<string, unknown> | undefined;
39
39
  query?: Record<string, string> | undefined;
40
40
  headers?: Record<string, string> | undefined;
41
41
  }, {
42
42
  body?: Record<string, unknown> | undefined;
43
- method?: "GET" | "DELETE" | "HEAD" | "OPTIONS" | "POST" | "PUT" | "PATCH" | undefined;
43
+ method?: "OPTIONS" | "DELETE" | "GET" | "HEAD" | "PATCH" | "POST" | "PUT" | undefined;
44
44
  query?: Record<string, string> | undefined;
45
45
  headers?: Record<string, string> | undefined;
46
46
  }>;
47
47
  }, "strip", z.ZodTypeAny, {
48
48
  type: "webhook";
49
49
  webhookData: {
50
- method: "GET" | "DELETE" | "HEAD" | "OPTIONS" | "POST" | "PUT" | "PATCH";
50
+ method: "OPTIONS" | "DELETE" | "GET" | "HEAD" | "PATCH" | "POST" | "PUT";
51
51
  body?: Record<string, unknown> | undefined;
52
52
  query?: Record<string, string> | undefined;
53
53
  headers?: Record<string, string> | undefined;
@@ -56,7 +56,7 @@ declare const inputSchema: z.ZodObject<{
56
56
  type: "webhook";
57
57
  webhookData: {
58
58
  body?: Record<string, unknown> | undefined;
59
- method?: "GET" | "DELETE" | "HEAD" | "OPTIONS" | "POST" | "PUT" | "PATCH" | undefined;
59
+ method?: "OPTIONS" | "DELETE" | "GET" | "HEAD" | "PATCH" | "POST" | "PUT" | undefined;
60
60
  query?: Record<string, string> | undefined;
61
61
  headers?: Record<string, string> | undefined;
62
62
  };
@@ -72,7 +72,7 @@ declare const inputSchema: z.ZodObject<{
72
72
  } | {
73
73
  type: "webhook";
74
74
  webhookData: {
75
- method: "GET" | "DELETE" | "HEAD" | "OPTIONS" | "POST" | "PUT" | "PATCH";
75
+ method: "OPTIONS" | "DELETE" | "GET" | "HEAD" | "PATCH" | "POST" | "PUT";
76
76
  body?: Record<string, unknown> | undefined;
77
77
  query?: Record<string, string> | undefined;
78
78
  headers?: Record<string, string> | undefined;
@@ -90,7 +90,7 @@ declare const inputSchema: z.ZodObject<{
90
90
  type: "webhook";
91
91
  webhookData: {
92
92
  body?: Record<string, unknown> | undefined;
93
- method?: "GET" | "DELETE" | "HEAD" | "OPTIONS" | "POST" | "PUT" | "PATCH" | undefined;
93
+ method?: "OPTIONS" | "DELETE" | "GET" | "HEAD" | "PATCH" | "POST" | "PUT" | undefined;
94
94
  query?: Record<string, string> | undefined;
95
95
  headers?: Record<string, string> | undefined;
96
96
  };
@@ -0,0 +1,17 @@
1
+ export declare const SOURCE_CONTROL_PREFERENCES_DB_KEY = "features.sourceControl";
2
+ export declare const SOURCE_CONTROL_GIT_FOLDER = "git";
3
+ export declare const SOURCE_CONTROL_GIT_KEY_COMMENT = "n8n deploy key";
4
+ export declare const SOURCE_CONTROL_WORKFLOW_EXPORT_FOLDER = "workflows";
5
+ export declare const SOURCE_CONTROL_PROJECT_EXPORT_FOLDER = "projects";
6
+ export declare const SOURCE_CONTROL_CREDENTIAL_EXPORT_FOLDER = "credential_stubs";
7
+ export declare const SOURCE_CONTROL_VARIABLES_EXPORT_FILE = "variable_stubs.json";
8
+ export declare const SOURCE_CONTROL_TAGS_EXPORT_FILE = "tags.json";
9
+ export declare const SOURCE_CONTROL_FOLDERS_EXPORT_FILE = "folders.json";
10
+ export declare const SOURCE_CONTROL_OWNERS_EXPORT_FILE = "workflow_owners.json";
11
+ export declare const SOURCE_CONTROL_SSH_FOLDER = "ssh";
12
+ export declare const SOURCE_CONTROL_SSH_KEY_NAME = "key";
13
+ export declare const SOURCE_CONTROL_DEFAULT_BRANCH = "main";
14
+ export declare const SOURCE_CONTROL_ORIGIN = "origin";
15
+ export declare const SOURCE_CONTROL_README = "\n# n8n Source Control\n";
16
+ export declare const SOURCE_CONTROL_DEFAULT_NAME = "n8n user";
17
+ export declare const SOURCE_CONTROL_DEFAULT_EMAIL = "n8n@example.com";
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SOURCE_CONTROL_DEFAULT_EMAIL = exports.SOURCE_CONTROL_DEFAULT_NAME = exports.SOURCE_CONTROL_README = exports.SOURCE_CONTROL_ORIGIN = exports.SOURCE_CONTROL_DEFAULT_BRANCH = exports.SOURCE_CONTROL_SSH_KEY_NAME = exports.SOURCE_CONTROL_SSH_FOLDER = exports.SOURCE_CONTROL_OWNERS_EXPORT_FILE = exports.SOURCE_CONTROL_FOLDERS_EXPORT_FILE = exports.SOURCE_CONTROL_TAGS_EXPORT_FILE = exports.SOURCE_CONTROL_VARIABLES_EXPORT_FILE = exports.SOURCE_CONTROL_CREDENTIAL_EXPORT_FOLDER = exports.SOURCE_CONTROL_PROJECT_EXPORT_FOLDER = exports.SOURCE_CONTROL_WORKFLOW_EXPORT_FOLDER = exports.SOURCE_CONTROL_GIT_KEY_COMMENT = exports.SOURCE_CONTROL_GIT_FOLDER = exports.SOURCE_CONTROL_PREFERENCES_DB_KEY = void 0;
4
+ exports.SOURCE_CONTROL_PREFERENCES_DB_KEY = 'features.sourceControl';
5
+ exports.SOURCE_CONTROL_GIT_FOLDER = 'git';
6
+ exports.SOURCE_CONTROL_GIT_KEY_COMMENT = 'n8n deploy key';
7
+ exports.SOURCE_CONTROL_WORKFLOW_EXPORT_FOLDER = 'workflows';
8
+ exports.SOURCE_CONTROL_PROJECT_EXPORT_FOLDER = 'projects';
9
+ exports.SOURCE_CONTROL_CREDENTIAL_EXPORT_FOLDER = 'credential_stubs';
10
+ exports.SOURCE_CONTROL_VARIABLES_EXPORT_FILE = 'variable_stubs.json';
11
+ exports.SOURCE_CONTROL_TAGS_EXPORT_FILE = 'tags.json';
12
+ exports.SOURCE_CONTROL_FOLDERS_EXPORT_FILE = 'folders.json';
13
+ exports.SOURCE_CONTROL_OWNERS_EXPORT_FILE = 'workflow_owners.json';
14
+ exports.SOURCE_CONTROL_SSH_FOLDER = 'ssh';
15
+ exports.SOURCE_CONTROL_SSH_KEY_NAME = 'key';
16
+ exports.SOURCE_CONTROL_DEFAULT_BRANCH = 'main';
17
+ exports.SOURCE_CONTROL_ORIGIN = 'origin';
18
+ exports.SOURCE_CONTROL_README = `
19
+ # n8n Source Control
20
+ `;
21
+ exports.SOURCE_CONTROL_DEFAULT_NAME = 'n8n user';
22
+ exports.SOURCE_CONTROL_DEFAULT_EMAIL = 'n8n@example.com';
@@ -0,0 +1,2 @@
1
+ import type { RequestHandler } from 'express';
2
+ export declare const sourceControlEnabledMiddleware: RequestHandler;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.sourceControlEnabledMiddleware = void 0;
4
+ const di_1 = require("@n8n/di");
5
+ const source_control_preferences_service_ee_1 = require("../source-control-preferences.service.ee");
6
+ const sourceControlEnabledMiddleware = (_req, res, next) => {
7
+ const sourceControlPreferencesService = di_1.Container.get(source_control_preferences_service_ee_1.SourceControlPreferencesService);
8
+ if (sourceControlPreferencesService.isSourceControlConnected()) {
9
+ next();
10
+ }
11
+ else {
12
+ res.status(412).json({
13
+ status: 'error',
14
+ message: 'source_control_not_connected',
15
+ });
16
+ }
17
+ };
18
+ exports.sourceControlEnabledMiddleware = sourceControlEnabledMiddleware;
@@ -0,0 +1,37 @@
1
+ import type { SourceControlledFile } from '@n8n/api-types';
2
+ import { Logger } from '@n8n/backend-common';
3
+ import { FolderRepository, ProjectRepository, SharedCredentialsRepository, SharedWorkflowRepository, TagRepository, WorkflowRepository, WorkflowTagMappingRepository } from '@n8n/db';
4
+ import { InstanceSettings } from 'n8n-core';
5
+ import { SourceControlScopedService } from './source-control-scoped.service';
6
+ import { VariablesService } from '../../environments.ee/variables/variables.service.ee';
7
+ import type { ExportResult } from './types/export-result';
8
+ import type { SourceControlContext } from './types/source-control-context';
9
+ export declare class SourceControlExportService {
10
+ private readonly logger;
11
+ private readonly variablesService;
12
+ private readonly tagRepository;
13
+ private readonly projectRepository;
14
+ private readonly sharedCredentialsRepository;
15
+ private readonly sharedWorkflowRepository;
16
+ private readonly workflowRepository;
17
+ private readonly workflowTagMappingRepository;
18
+ private readonly folderRepository;
19
+ private readonly sourceControlScopedService;
20
+ private gitFolder;
21
+ private workflowExportFolder;
22
+ private projectExportFolder;
23
+ private credentialExportFolder;
24
+ constructor(logger: Logger, variablesService: VariablesService, tagRepository: TagRepository, projectRepository: ProjectRepository, sharedCredentialsRepository: SharedCredentialsRepository, sharedWorkflowRepository: SharedWorkflowRepository, workflowRepository: WorkflowRepository, workflowTagMappingRepository: WorkflowTagMappingRepository, folderRepository: FolderRepository, sourceControlScopedService: SourceControlScopedService, instanceSettings: InstanceSettings);
25
+ getWorkflowPath(workflowId: string): string;
26
+ getCredentialsPath(credentialsId: string): string;
27
+ deleteRepositoryFolder(): Promise<void>;
28
+ rmFilesFromExportFolder(filesToBeDeleted: Set<string>): Set<string>;
29
+ private writeExportableWorkflowsToExportFolder;
30
+ exportWorkflowsToWorkFolder(candidates: SourceControlledFile[]): Promise<ExportResult>;
31
+ exportGlobalVariablesToWorkFolder(): Promise<ExportResult>;
32
+ exportFoldersToWorkFolder(context: SourceControlContext): Promise<ExportResult>;
33
+ exportTagsToWorkFolder(context: SourceControlContext): Promise<ExportResult>;
34
+ private replaceCredentialData;
35
+ exportCredentialsToWorkFolder(candidates: SourceControlledFile[]): Promise<ExportResult>;
36
+ exportTeamProjectsToWorkFolder(candidates: SourceControlledFile[]): Promise<ExportResult>;
37
+ }