@pristine-ts/core 0.0.174 → 0.0.178

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 (212) hide show
  1. package/dist/lib/cjs/core.module.js +7 -4
  2. package/dist/lib/cjs/core.module.js.map +1 -1
  3. package/dist/lib/cjs/dispatchers/dispatchers.js +14 -0
  4. package/dist/lib/cjs/dispatchers/dispatchers.js.map +1 -0
  5. package/dist/lib/cjs/dispatchers/event.dispatcher.js +108 -0
  6. package/dist/lib/cjs/dispatchers/event.dispatcher.js.map +1 -0
  7. package/dist/lib/cjs/enums/enums.js +14 -0
  8. package/dist/lib/cjs/enums/enums.js.map +1 -0
  9. package/dist/lib/cjs/enums/execution-context-keyname.enum.js +11 -0
  10. package/dist/lib/cjs/enums/execution-context-keyname.enum.js.map +1 -0
  11. package/dist/lib/cjs/errors/error-response-interception-execution.error.js.map +1 -1
  12. package/dist/lib/cjs/errors/errors.js +6 -4
  13. package/dist/lib/cjs/errors/errors.js.map +1 -1
  14. package/dist/lib/cjs/errors/event-dispatcher-no-event-handlers.error.js +20 -0
  15. package/dist/lib/cjs/errors/event-dispatcher-no-event-handlers.error.js.map +1 -0
  16. package/dist/lib/cjs/errors/event-dispatching.error.js +21 -0
  17. package/dist/lib/cjs/errors/event-dispatching.error.js.map +1 -0
  18. package/dist/lib/cjs/errors/event-mapping.error.js +23 -0
  19. package/dist/lib/cjs/errors/event-mapping.error.js.map +1 -0
  20. package/dist/lib/cjs/errors/event-post-mapping-interception.error.js +22 -0
  21. package/dist/lib/cjs/errors/event-post-mapping-interception.error.js.map +1 -0
  22. package/dist/lib/cjs/errors/event-post-response-mapping-interception.error.js +22 -0
  23. package/dist/lib/cjs/errors/event-post-response-mapping-interception.error.js.map +1 -0
  24. package/dist/lib/cjs/errors/event-pre-mapping-interception.error.js +23 -0
  25. package/dist/lib/cjs/errors/event-pre-mapping-interception.error.js.map +1 -0
  26. package/dist/lib/cjs/errors/event-pre-response-mapping-interception.error.js +22 -0
  27. package/dist/lib/cjs/errors/event-pre-response-mapping-interception.error.js.map +1 -0
  28. package/dist/lib/cjs/handlers/default-event.handler.js +28 -0
  29. package/dist/lib/cjs/handlers/default-event.handler.js.map +1 -0
  30. package/dist/lib/cjs/handlers/handlers.js +14 -0
  31. package/dist/lib/cjs/handlers/handlers.js.map +1 -0
  32. package/dist/lib/cjs/interceptors/event-logging.interceptor.js +21 -12
  33. package/dist/lib/cjs/interceptors/event-logging.interceptor.js.map +1 -1
  34. package/dist/lib/cjs/interceptors/interceptors.js +0 -2
  35. package/dist/lib/cjs/interceptors/interceptors.js.map +1 -1
  36. package/dist/lib/cjs/interfaces/{request-interceptor.interface.js → event-dispatcher.interface.js} +1 -1
  37. package/dist/lib/cjs/interfaces/event-dispatcher.interface.js.map +1 -0
  38. package/dist/lib/cjs/interfaces/{response-interceptor.interface.js → event-handler.interface.js} +1 -1
  39. package/dist/lib/cjs/interfaces/event-handler.interface.js.map +1 -0
  40. package/dist/lib/cjs/interfaces/{error-response-interceptor.interface.js → event-listener.interface.js} +1 -1
  41. package/dist/lib/cjs/interfaces/event-listener.interface.js.map +1 -0
  42. package/dist/lib/cjs/interfaces/event-mapper.interface.js +3 -0
  43. package/dist/lib/cjs/interfaces/event-mapper.interface.js.map +1 -0
  44. package/dist/lib/cjs/interfaces/events-execution-options.interface.js +3 -0
  45. package/dist/lib/cjs/interfaces/events-execution-options.interface.js.map +1 -0
  46. package/dist/lib/cjs/interfaces/execution-context.interface.js +3 -0
  47. package/dist/lib/cjs/interfaces/execution-context.interface.js.map +1 -0
  48. package/dist/lib/cjs/interfaces/interfaces.js +6 -3
  49. package/dist/lib/cjs/interfaces/interfaces.js.map +1 -1
  50. package/dist/lib/cjs/kernel.js +31 -393
  51. package/dist/lib/cjs/kernel.js.map +1 -1
  52. package/dist/lib/cjs/listeners/default-event.listener.js +27 -0
  53. package/dist/lib/cjs/listeners/default-event.listener.js.map +1 -0
  54. package/dist/lib/cjs/listeners/listeners.js +14 -0
  55. package/dist/lib/cjs/listeners/listeners.js.map +1 -0
  56. package/dist/lib/cjs/mappers/default-event.mapper.js +38 -0
  57. package/dist/lib/cjs/mappers/default-event.mapper.js.map +1 -0
  58. package/dist/lib/cjs/mappers/mappers.js +14 -0
  59. package/dist/lib/cjs/mappers/mappers.js.map +1 -0
  60. package/dist/lib/cjs/models/event.js +15 -0
  61. package/dist/lib/cjs/models/event.js.map +1 -0
  62. package/dist/lib/cjs/models/event.response.js +11 -0
  63. package/dist/lib/cjs/models/event.response.js.map +1 -0
  64. package/dist/lib/cjs/models/models.js +15 -0
  65. package/dist/lib/cjs/models/models.js.map +1 -0
  66. package/dist/lib/cjs/pipelines/event.pipeline.js +282 -0
  67. package/dist/lib/cjs/pipelines/event.pipeline.js.map +1 -0
  68. package/dist/lib/cjs/pipelines/pipelines.js +14 -0
  69. package/dist/lib/cjs/pipelines/pipelines.js.map +1 -0
  70. package/dist/lib/esm/core.module.js +7 -4
  71. package/dist/lib/esm/core.module.js.map +1 -1
  72. package/dist/lib/esm/dispatchers/dispatchers.js +2 -0
  73. package/dist/lib/esm/dispatchers/dispatchers.js.map +1 -0
  74. package/dist/lib/esm/dispatchers/event.dispatcher.js +105 -0
  75. package/dist/lib/esm/dispatchers/event.dispatcher.js.map +1 -0
  76. package/dist/lib/esm/enums/enums.js +2 -0
  77. package/dist/lib/esm/enums/enums.js.map +1 -0
  78. package/dist/lib/esm/enums/execution-context-keyname.enum.js +8 -0
  79. package/dist/lib/esm/enums/execution-context-keyname.enum.js.map +1 -0
  80. package/dist/lib/esm/errors/error-response-interception-execution.error.js.map +1 -1
  81. package/dist/lib/esm/errors/errors.js +6 -4
  82. package/dist/lib/esm/errors/errors.js.map +1 -1
  83. package/dist/lib/esm/errors/event-dispatcher-no-event-handlers.error.js +16 -0
  84. package/dist/lib/esm/errors/event-dispatcher-no-event-handlers.error.js.map +1 -0
  85. package/dist/lib/esm/errors/event-dispatching.error.js +17 -0
  86. package/dist/lib/esm/errors/event-dispatching.error.js.map +1 -0
  87. package/dist/lib/esm/errors/event-mapping.error.js +19 -0
  88. package/dist/lib/esm/errors/event-mapping.error.js.map +1 -0
  89. package/dist/lib/esm/errors/event-post-mapping-interception.error.js +18 -0
  90. package/dist/lib/esm/errors/event-post-mapping-interception.error.js.map +1 -0
  91. package/dist/lib/esm/errors/event-post-response-mapping-interception.error.js +18 -0
  92. package/dist/lib/esm/errors/event-post-response-mapping-interception.error.js.map +1 -0
  93. package/dist/lib/esm/errors/event-pre-mapping-interception.error.js +19 -0
  94. package/dist/lib/esm/errors/event-pre-mapping-interception.error.js.map +1 -0
  95. package/dist/lib/esm/errors/event-pre-response-mapping-interception.error.js +18 -0
  96. package/dist/lib/esm/errors/event-pre-response-mapping-interception.error.js.map +1 -0
  97. package/dist/lib/esm/handlers/default-event.handler.js +25 -0
  98. package/dist/lib/esm/handlers/default-event.handler.js.map +1 -0
  99. package/dist/lib/esm/handlers/handlers.js +2 -0
  100. package/dist/lib/esm/handlers/handlers.js.map +1 -0
  101. package/dist/lib/esm/interceptors/event-logging.interceptor.js +21 -12
  102. package/dist/lib/esm/interceptors/event-logging.interceptor.js.map +1 -1
  103. package/dist/lib/esm/interceptors/interceptors.js +0 -2
  104. package/dist/lib/esm/interceptors/interceptors.js.map +1 -1
  105. package/dist/lib/esm/interfaces/event-dispatcher.interface.js +2 -0
  106. package/dist/lib/esm/interfaces/event-dispatcher.interface.js.map +1 -0
  107. package/dist/lib/esm/interfaces/event-handler.interface.js +2 -0
  108. package/dist/lib/esm/interfaces/event-handler.interface.js.map +1 -0
  109. package/dist/lib/esm/interfaces/event-listener.interface.js +2 -0
  110. package/dist/lib/esm/interfaces/event-listener.interface.js.map +1 -0
  111. package/dist/lib/esm/interfaces/event-mapper.interface.js +2 -0
  112. package/dist/lib/esm/interfaces/event-mapper.interface.js.map +1 -0
  113. package/dist/lib/esm/interfaces/events-execution-options.interface.js +2 -0
  114. package/dist/lib/esm/interfaces/events-execution-options.interface.js.map +1 -0
  115. package/dist/lib/esm/interfaces/execution-context.interface.js +2 -0
  116. package/dist/lib/esm/interfaces/execution-context.interface.js.map +1 -0
  117. package/dist/lib/esm/interfaces/interfaces.js +6 -3
  118. package/dist/lib/esm/interfaces/interfaces.js.map +1 -1
  119. package/dist/lib/esm/kernel.js +32 -394
  120. package/dist/lib/esm/kernel.js.map +1 -1
  121. package/dist/lib/esm/listeners/default-event.listener.js +24 -0
  122. package/dist/lib/esm/listeners/default-event.listener.js.map +1 -0
  123. package/dist/lib/esm/listeners/listeners.js +2 -0
  124. package/dist/lib/esm/listeners/listeners.js.map +1 -0
  125. package/dist/lib/esm/mappers/default-event.mapper.js +35 -0
  126. package/dist/lib/esm/mappers/default-event.mapper.js.map +1 -0
  127. package/dist/lib/esm/mappers/mappers.js +2 -0
  128. package/dist/lib/esm/mappers/mappers.js.map +1 -0
  129. package/dist/lib/esm/models/event.js +11 -0
  130. package/dist/lib/esm/models/event.js.map +1 -0
  131. package/dist/lib/esm/models/event.response.js +7 -0
  132. package/dist/lib/esm/models/event.response.js.map +1 -0
  133. package/dist/lib/esm/models/models.js +3 -0
  134. package/dist/lib/esm/models/models.js.map +1 -0
  135. package/dist/lib/esm/pipelines/event.pipeline.js +279 -0
  136. package/dist/lib/esm/pipelines/event.pipeline.js.map +1 -0
  137. package/dist/lib/esm/pipelines/pipelines.js +2 -0
  138. package/dist/lib/esm/pipelines/pipelines.js.map +1 -0
  139. package/dist/types/core.module.d.ts +7 -0
  140. package/dist/types/dispatchers/dispatchers.d.ts +1 -0
  141. package/dist/types/dispatchers/event.dispatcher.d.ts +29 -0
  142. package/dist/types/enums/enums.d.ts +1 -0
  143. package/dist/types/enums/execution-context-keyname.enum.d.ts +6 -0
  144. package/dist/types/errors/error-response-interception-execution.error.d.ts +3 -2
  145. package/dist/types/errors/errors.d.ts +6 -4
  146. package/dist/types/errors/event-dispatcher-no-event-handlers.error.d.ts +8 -0
  147. package/dist/types/errors/event-dispatching.error.d.ts +8 -0
  148. package/dist/types/errors/event-mapping.error.d.ts +8 -0
  149. package/dist/types/errors/event-post-mapping-interception.error.d.ts +8 -0
  150. package/dist/types/errors/event-post-response-mapping-interception.error.d.ts +7 -0
  151. package/dist/types/errors/event-pre-mapping-interception.error.d.ts +8 -0
  152. package/dist/types/errors/event-pre-response-mapping-interception.error.d.ts +8 -0
  153. package/dist/types/handlers/default-event.handler.d.ts +7 -0
  154. package/dist/types/handlers/handlers.d.ts +1 -0
  155. package/dist/types/interceptors/event-logging.interceptor.d.ts +7 -11
  156. package/dist/types/interceptors/interceptors.d.ts +0 -2
  157. package/dist/types/interfaces/event-dispatcher.interface.d.ts +5 -0
  158. package/dist/types/interfaces/event-handler.interface.d.ts +23 -0
  159. package/dist/types/interfaces/event-interceptor.interface.d.ts +22 -3
  160. package/dist/types/interfaces/event-listener.interface.d.ts +17 -0
  161. package/dist/types/interfaces/event-mapper.interface.d.ts +9 -0
  162. package/dist/types/interfaces/events-execution-options.interface.d.ts +5 -0
  163. package/dist/types/interfaces/execution-context.interface.d.ts +5 -0
  164. package/dist/types/interfaces/interfaces.d.ts +6 -3
  165. package/dist/types/kernel.d.ts +11 -83
  166. package/dist/types/listeners/default-event.listener.d.ts +6 -0
  167. package/dist/types/listeners/listeners.d.ts +1 -0
  168. package/dist/types/mappers/default-event.mapper.d.ts +13 -0
  169. package/dist/types/mappers/mappers.d.ts +1 -0
  170. package/dist/types/models/event.d.ts +9 -0
  171. package/dist/types/models/event.response.d.ts +6 -0
  172. package/dist/types/models/models.d.ts +2 -0
  173. package/dist/types/pipelines/event.pipeline.d.ts +61 -0
  174. package/dist/types/pipelines/pipelines.d.ts +1 -0
  175. package/package.json +7 -10
  176. package/dist/lib/cjs/errors/request-handling.error.js +0 -21
  177. package/dist/lib/cjs/errors/request-handling.error.js.map +0 -1
  178. package/dist/lib/cjs/errors/request-interception-execution.error.js +0 -22
  179. package/dist/lib/cjs/errors/request-interception-execution.error.js.map +0 -1
  180. package/dist/lib/cjs/errors/response-interception-execution.error.js +0 -23
  181. package/dist/lib/cjs/errors/response-interception-execution.error.js.map +0 -1
  182. package/dist/lib/cjs/interceptors/request-body-converter.interceptor.js +0 -89
  183. package/dist/lib/cjs/interceptors/request-body-converter.interceptor.js.map +0 -1
  184. package/dist/lib/cjs/interceptors/request-logging.interceptor.js +0 -83
  185. package/dist/lib/cjs/interceptors/request-logging.interceptor.js.map +0 -1
  186. package/dist/lib/cjs/interfaces/error-response-interceptor.interface.js.map +0 -1
  187. package/dist/lib/cjs/interfaces/request-interceptor.interface.js.map +0 -1
  188. package/dist/lib/cjs/interfaces/response-interceptor.interface.js.map +0 -1
  189. package/dist/lib/esm/errors/request-handling.error.js +0 -17
  190. package/dist/lib/esm/errors/request-handling.error.js.map +0 -1
  191. package/dist/lib/esm/errors/request-interception-execution.error.js +0 -18
  192. package/dist/lib/esm/errors/request-interception-execution.error.js.map +0 -1
  193. package/dist/lib/esm/errors/response-interception-execution.error.js +0 -19
  194. package/dist/lib/esm/errors/response-interception-execution.error.js.map +0 -1
  195. package/dist/lib/esm/interceptors/request-body-converter.interceptor.js +0 -86
  196. package/dist/lib/esm/interceptors/request-body-converter.interceptor.js.map +0 -1
  197. package/dist/lib/esm/interceptors/request-logging.interceptor.js +0 -80
  198. package/dist/lib/esm/interceptors/request-logging.interceptor.js.map +0 -1
  199. package/dist/lib/esm/interfaces/error-response-interceptor.interface.js +0 -2
  200. package/dist/lib/esm/interfaces/error-response-interceptor.interface.js.map +0 -1
  201. package/dist/lib/esm/interfaces/request-interceptor.interface.js +0 -2
  202. package/dist/lib/esm/interfaces/request-interceptor.interface.js.map +0 -1
  203. package/dist/lib/esm/interfaces/response-interceptor.interface.js +0 -2
  204. package/dist/lib/esm/interfaces/response-interceptor.interface.js.map +0 -1
  205. package/dist/types/errors/request-handling.error.d.ts +0 -8
  206. package/dist/types/errors/request-interception-execution.error.d.ts +0 -8
  207. package/dist/types/errors/response-interception-execution.error.d.ts +0 -8
  208. package/dist/types/interceptors/request-body-converter.interceptor.d.ts +0 -9
  209. package/dist/types/interceptors/request-logging.interceptor.d.ts +0 -27
  210. package/dist/types/interfaces/error-response-interceptor.interface.d.ts +0 -21
  211. package/dist/types/interfaces/request-interceptor.interface.d.ts +0 -17
  212. package/dist/types/interfaces/response-interceptor.interface.d.ts +0 -20
@@ -9,21 +9,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  };
10
10
  import "reflect-metadata";
11
11
  import { container } from "tsyringe";
12
- import { controllerRegistry, HttpError, Request, Response, Route, Router, } from "@pristine-ts/networking";
13
- import { InternalContainerParameterEnum, moduleScopedServicesRegistry, ServiceDefinitionTagEnum, taggedProviderRegistrationsRegistry } from "@pristine-ts/common";
12
+ import { InternalContainerParameterEnum, moduleScopedServicesRegistry, taggedProviderRegistrationsRegistry } from "@pristine-ts/common";
14
13
  import { ConfigurationManager } from "@pristine-ts/configuration";
15
- import { EventDispatcher, EventTransformer } from "@pristine-ts/event";
16
- import { mergeWith } from "lodash";
17
- import { RequestHandlingError } from "./errors/request-handling.error";
18
14
  import { ProviderRegistrationError } from "./errors/provider-registration.error";
19
- import { KernelInitializationError } from "./errors/kernel-initialization.error";
20
- import { ErrorResponseInterceptionExecutionError } from "./errors/error-response-interception-execution.error";
21
- import { ResponseInterceptionExecutionError } from "./errors/response-interception-execution.error";
22
- import { RequestInterceptionExecutionError } from "./errors/request-interception-execution.error";
23
- import { EventInterceptionExecutionError } from "./errors/event-interception-execution.error";
24
15
  import { Span, SpanKeynameEnum } from "@pristine-ts/telemetry";
25
16
  import { CoreModuleKeyname } from "./core.module.keyname";
26
17
  import { v4 as uuidv4 } from 'uuid';
18
+ import { EventPipeline } from "./pipelines/event.pipeline";
19
+ import { KernelInitializationError } from "./errors/kernel-initialization.error";
27
20
  /**
28
21
  * This is the central class that manages the lifecyle of this library.
29
22
  */
@@ -50,12 +43,12 @@ export class Kernel {
50
43
  this.instantiationId = uuidv4();
51
44
  }
52
45
  /**
53
- * This function is the entry point of the library. It initializes the module for your application (AppModule) as well as its the dependencies,
46
+ * This function is the entry point of the Kernel. It initializes the module for your application (AppModule) as well as its the dependencies,
54
47
  * it registers the services, registers the configurations and runs the afterInit for each module.
55
48
  * @param module
56
49
  * @param moduleConfigurationValues
57
50
  */
58
- init(module, moduleConfigurationValues) {
51
+ start(module, moduleConfigurationValues) {
59
52
  return __awaiter(this, void 0, void 0, function* () {
60
53
  this.initializationSpan = new Span(SpanKeynameEnum.KernelInitialization);
61
54
  // Register the InstantiationId in the container.
@@ -64,6 +57,9 @@ export class Kernel {
64
57
  });
65
58
  // Inits the application module and its dependencies.
66
59
  const initializedModuleSpans = yield this.initModule(module);
60
+ if (this.initializationSpan === undefined) {
61
+ throw new KernelInitializationError("The InitializationSpan is undefined and shouldn't be.");
62
+ }
67
63
  // Add every spans as a child of the Initialization Span
68
64
  initializedModuleSpans.forEach(span => this.initializationSpan.addChild(span));
69
65
  // Register all the service tags in the container.
@@ -198,404 +194,46 @@ export class Kernel {
198
194
  });
199
195
  }
200
196
  /**
201
- * This method executes all the RequestInterceptors and returns the request updated by the interceptors.
202
- *
203
- * @param request
204
- * @param container
205
- * @private
206
- */
207
- executeRequestInterceptors(request, container) {
208
- return __awaiter(this, void 0, void 0, function* () {
209
- // Execute all the request interceptors
210
- let interceptedRequest = request;
211
- // Check first if there are any RequestInterceptors
212
- if (container.isRegistered(ServiceDefinitionTagEnum.RequestInterceptor, true)) {
213
- const interceptors = container.resolveAll(ServiceDefinitionTagEnum.RequestInterceptor);
214
- for (const interceptor of interceptors) {
215
- // We don't have a guarantee that the request interceptors will implement the Interface, even though we specify it should.
216
- // So, we have to verify that the method exists, and if it doesn't we throw
217
- if (typeof interceptor.interceptRequest === "undefined") {
218
- throw new RequestInterceptionExecutionError("The Request Interceptor doesn't have the 'interceptRequest' method. RequestInterceptors should implement the RequestInterceptor interface.", request, this);
219
- }
220
- interceptedRequest = yield Promise.resolve(interceptor.interceptRequest(interceptedRequest));
221
- }
222
- }
223
- return interceptedRequest;
224
- });
225
- }
226
- /**
227
- * This method executes all the EventInterceptors and returns the event updated by the interceptors.
228
- *
229
- * @param event
230
- * @param container
197
+ * This method loops through the service tag decorators defined in the taggedProviderRegistrationsRegistry and simply add
198
+ * all the entry to the container.
231
199
  * @private
232
200
  */
233
- executeRawEventInterceptors(event) {
234
- return __awaiter(this, void 0, void 0, function* () {
235
- // Execute all the event interceptors
236
- let interceptedEvent = event;
237
- // Check first if there are any EventInterceptors
238
- if (this.container.isRegistered(ServiceDefinitionTagEnum.EventInterceptor, true)) {
239
- const interceptors = this.container.resolveAll(ServiceDefinitionTagEnum.EventInterceptor);
240
- for (const interceptor of interceptors) {
241
- // We don't have a guarantee that the event interceptors will implement the Interface, even though we specify it should.
242
- // So, we have to verify that the method exists, and if it doesn't we throw
243
- if (typeof interceptor.interceptRawEvent === "undefined") {
244
- throw new EventInterceptionExecutionError("The Event Interceptor doesn't have the 'interceptRawEvent' method. EventInterceptors should implement the EventInterceptor interface.", event, this);
245
- }
246
- try {
247
- // https://stackoverflow.com/a/27760489/684101
248
- interceptedEvent = yield Promise.resolve(interceptor.interceptRawEvent(interceptedEvent));
249
- }
250
- catch (error) {
251
- throw new EventInterceptionExecutionError("There was an exception thrown while executing the 'interceptRawEvent' method of the EventInterceptor.", event, this, error);
252
- }
253
- }
201
+ registerServiceTags() {
202
+ taggedProviderRegistrationsRegistry.forEach((taggedRegistrationType) => {
203
+ // Verify that if the constructor is moduleScoped, we only load it if its corresponding module is initialized.
204
+ // If the module is not initialized, we do not load the tagged service.
205
+ // This is to prevent that classes that are only imported get registered event if the module is not initialized.
206
+ const moduleScopedRegistration = moduleScopedServicesRegistry[taggedRegistrationType.constructor];
207
+ if (moduleScopedRegistration && this.instantiatedModules.hasOwnProperty(moduleScopedRegistration.moduleKeyname) === false) {
208
+ return;
254
209
  }
255
- return interceptedEvent;
210
+ this.registerProviderRegistration(taggedRegistrationType.providerRegistration);
256
211
  });
257
212
  }
258
213
  /**
259
- * This method executes all the EventInterceptors and returns the event updated by the interceptors.
260
214
  *
261
215
  * @param event
262
- * @param container
263
- * @private
264
- */
265
- executeEventInterceptors(event, container) {
266
- return __awaiter(this, void 0, void 0, function* () {
267
- // Execute all the event interceptors
268
- let interceptedEvent = event;
269
- // Check first if there are any EventInterceptor
270
- if (container.isRegistered(ServiceDefinitionTagEnum.EventInterceptor, true)) {
271
- const interceptors = container.resolveAll(ServiceDefinitionTagEnum.EventInterceptor);
272
- for (const interceptor of interceptors) {
273
- // We don't have a guarantee that the event interceptors will implement the Interface, even though we specify it should.
274
- // So, we have to verify that the method exists, and if it doesn't we throw
275
- if (typeof interceptor.interceptEvent === "undefined") {
276
- throw new EventInterceptionExecutionError("The Event Interceptor doesn't have the 'interceptEvent' method. EventInterceptors should implement the EventInterceptor interface.", event, this);
277
- }
278
- try {
279
- // https://stackoverflow.com/a/27760489/684101
280
- interceptedEvent = yield Promise.resolve(interceptor.interceptEvent(interceptedEvent));
281
- }
282
- catch (error) {
283
- throw new EventInterceptionExecutionError("There was an exception thrown while executing the 'interceptRawEvent' method of the EventInterceptor.", event, this, error);
284
- }
285
- }
286
- }
287
- return interceptedEvent;
288
- });
289
- }
290
- /**
291
- * This method executes all the response interceptors and returns the response updated by the interceptors.
292
- *
293
- * @param response
294
- * @param request
295
- * @param container
296
- * @private
297
- */
298
- executeResponseInterceptors(response, request, container) {
299
- return __awaiter(this, void 0, void 0, function* () {
300
- // Execute all the request interceptors
301
- let interceptedResponse = response;
302
- // Check first if there are any RequestInterceptors
303
- if (container.isRegistered(ServiceDefinitionTagEnum.ResponseInterceptor, true)) {
304
- const interceptors = container.resolveAll(ServiceDefinitionTagEnum.ResponseInterceptor);
305
- for (const interceptor of interceptors) {
306
- // We don't have a guarantee that the request interceptors will implement the Interface, even though we specify it should.
307
- // So, we have to verify that the method exists, and if it doesn't we throw
308
- if (typeof interceptor.interceptResponse === "undefined") {
309
- throw new ResponseInterceptionExecutionError("The Response Interceptor doesn't have the 'interceptResponse' method. ResponseInterceptors should implement the ResponseInterceptor interface.", request, response, interceptor);
310
- }
311
- interceptedResponse = yield Promise.resolve(interceptor.interceptResponse(interceptedResponse, request));
312
- }
313
- }
314
- return interceptedResponse;
315
- });
316
- }
317
- /**
318
- * This method executes all the error response interceptors and returns the response updated by the interceptors.
319
- *
320
- * @param error
321
- * @param request
322
- * @param container
323
- * @private
324
- */
325
- executeErrorResponseInterceptors(error, request, container) {
326
- return __awaiter(this, void 0, void 0, function* () {
327
- // Execute all the request interceptors
328
- let interceptedErrorResponse = new Response();
329
- interceptedErrorResponse.request = request;
330
- interceptedErrorResponse.body = {
331
- name: error.name,
332
- message: error.message,
333
- };
334
- if (error instanceof HttpError) {
335
- const httpError = error;
336
- interceptedErrorResponse.status = httpError.httpStatus;
337
- if (httpError.errors) {
338
- interceptedErrorResponse.body.errors = httpError.errors;
339
- }
340
- }
341
- else {
342
- interceptedErrorResponse.status = 500;
343
- }
344
- // Check first if there are any RequestInterceptors
345
- if (container.isRegistered(ServiceDefinitionTagEnum.ErrorResponseInterceptor, true)) {
346
- const interceptors = container.resolveAll(ServiceDefinitionTagEnum.ErrorResponseInterceptor);
347
- for (const interceptor of interceptors) {
348
- // We don't have a guarantee that the request interceptors will implement the Interface, even though we specify it should.
349
- // So, we have to verify that the method exists, and if it doesn't we throw
350
- if (typeof interceptor.interceptError === "undefined") {
351
- throw new ErrorResponseInterceptionExecutionError("The Error Response Interceptor doesn't have the 'interceptError' method. ErrorResponseInterceptors should implement the ErrorResponseInterceptor interface.", error, request, interceptor);
352
- }
353
- try {
354
- // https://stackoverflow.com/a/27760489/684101
355
- interceptedErrorResponse = yield Promise.resolve(interceptor.interceptError(error, request, interceptedErrorResponse));
356
- }
357
- catch (e) {
358
- throw new ErrorResponseInterceptionExecutionError("There was an exception thrown while executing the 'interceptError' method of the ErrorResponseInterceptors", error, request, interceptor, e);
359
- }
360
- }
361
- }
362
- return interceptedErrorResponse;
363
- });
364
- }
365
- /**
366
- * This method can be used to test if a raw event is supported or not.
367
- * @param rawEvent
368
- */
369
- isRawEventSupported(rawEvent) {
370
- // Start by creating a child container and we will use this container to instantiate the dependencies for this event
371
- const childContainer = this.container.createChildContainer();
372
- const eventTransformer = childContainer.resolve(EventTransformer);
373
- return eventTransformer.isSupported(rawEvent);
374
- }
375
- /**
376
- * This method takes the raw Event, transforms it into an array of Event object and then dispatches it to the Event Listeners.
377
- * It completes when all the Event Listeners have settle, and does not return a response.
378
- *
379
- * @param rawEvent
216
+ * @param executionContext
380
217
  */
381
- handleRawEvent(rawEvent) {
382
- return __awaiter(this, void 0, void 0, function* () {
383
- const logHandler = this.container.resolve("LogHandlerInterface");
384
- const tracingManager = this.container.resolve("TracingManagerInterface");
385
- tracingManager.startTracing();
386
- const eventInitializationSpan = tracingManager.startSpan(SpanKeynameEnum.EventInitialization);
387
- this.initializationSpan.addChild(eventInitializationSpan);
388
- logHandler.debug("Executing the Raw Event Interceptors", { rawEvent }, CoreModuleKeyname);
389
- const interceptedRawEvent = yield this.executeRawEventInterceptors(rawEvent);
390
- logHandler.debug("Completed execution of the Raw Event Interceptors", { interceptedRawEvent }, CoreModuleKeyname);
391
- const eventTransformer = this.container.resolve(EventTransformer);
392
- // Transform the raw event into an array of Event object
393
- logHandler.debug("Transforming the Raw Events into an array of Events", { interceptedRawEvent }, CoreModuleKeyname);
394
- let events = eventTransformer.transform(interceptedRawEvent);
395
- logHandler.debug("Completed the transformation of the Raw Events into Events", { events }, CoreModuleKeyname);
396
- eventInitializationSpan.end();
397
- // Handle all of the parsed events
398
- const promises = [];
399
- for (let event of events) {
400
- promises.push(this.handleParsedEvent(event, eventInitializationSpan));
401
- }
402
- return new Promise(resolve => {
403
- Promise.allSettled(promises).then(results => {
404
- results.forEach(result => {
405
- if (result.status === 'fulfilled') {
406
- logHandler.debug("Event was successfully handled", { result }, CoreModuleKeyname);
407
- }
408
- else {
409
- logHandler.error("There was an error handling the event.", {
410
- result: {
411
- status: result.status,
412
- reason: result.reason + "",
413
- }
414
- }, CoreModuleKeyname);
415
- }
416
- });
417
- return resolve();
418
- });
419
- });
420
- });
421
- }
422
- /**
423
- * This method takes a parsed Event, executes the interceptors and dispatches it to the Event Listeners
424
- *
425
- * @param rawEvent
426
- */
427
- handleParsedEvent(parsedEvent, rawEventInitializationSpan) {
218
+ handle(event, executionContext) {
428
219
  var _a, _b;
429
220
  return __awaiter(this, void 0, void 0, function* () {
430
- // Start by creating a child container and we will use this container to instantiate the dependencies for this event
431
- const childContainer = this.container.createChildContainer();
432
- const tracingManager = childContainer.resolve("TracingManagerInterface");
221
+ // Start the tracing
222
+ const tracingManager = this.container.resolve("TracingManagerInterface");
433
223
  tracingManager.startTracing();
434
- (_b = (_a = tracingManager.trace) === null || _a === void 0 ? void 0 : _a.rootSpan) === null || _b === void 0 ? void 0 : _b.addChild(this.initializationSpan);
435
- tracingManager.addSpan(this.initializationSpan);
436
- this.initializationSpan.end();
437
- const eventSpan = tracingManager.startSpan(SpanKeynameEnum.EventExecution);
438
- const logHandler = childContainer.resolve("LogHandlerInterface");
439
- const eventDispatcher = childContainer.resolve(EventDispatcher);
440
- try {
441
- logHandler.debug("Starting the handling of the parsed event", { parsedEvent }, CoreModuleKeyname);
442
- logHandler.debug("Executing the event interceptors", { parsedEvent }, CoreModuleKeyname);
443
- // Execute the interceptors
444
- parsedEvent = yield this.executeEventInterceptors(parsedEvent, childContainer);
445
- logHandler.debug("The event interceptors were successfully executed.", { parsedEvent }, CoreModuleKeyname);
446
- logHandler.debug("Dispatching the parsed event", { parsedEvent }, CoreModuleKeyname);
447
- // Dispatch the Event to the EventListeners
448
- yield eventDispatcher.dispatch(parsedEvent);
449
- logHandler.debug("The parsed Event was successfully dispatched.", { parsedEvent }, CoreModuleKeyname);
450
- }
451
- catch (error) {
452
- logHandler.error("Thee was an error handling the parsed event", { error }, CoreModuleKeyname);
453
- throw error;
454
- }
455
- finally {
456
- eventSpan.end();
457
- tracingManager.endTrace();
458
- }
459
- });
460
- }
461
- /**
462
- * This method receives a requestInterface, calls the router to execute the request and returns the response. This method
463
- * calls all the interceptors. This should be the only point with the outside world when dealing with requests.
464
- *
465
- * @param requestInterface
466
- */
467
- handleRequest(requestInterface) {
468
- return __awaiter(this, void 0, void 0, function* () {
469
- const routerSetupSpan = new Span(SpanKeynameEnum.RouterSetup);
470
- // Setup the router
471
- this.setupRouter();
472
- routerSetupSpan.endDate = Date.now();
473
- this.initializationSpan.addChild(routerSetupSpan);
474
- const request = new Request(requestInterface);
475
- return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () {
476
- var _a, _b;
477
- // Check for the router to not be undefined.
478
- if (this.router === undefined) {
479
- throw new RequestHandlingError("The Router is undefined", request, this);
480
- }
481
- // Start by creating a child container and we will use this container to instantiate the dependencies for this request
482
- const childContainerCreationSpan = new Span(SpanKeynameEnum.ChildContainerCreation);
483
- const childContainer = this.container.createChildContainer();
484
- childContainerCreationSpan.endDate = Date.now();
485
- this.initializationSpan.addChild(childContainerCreationSpan);
486
- // Start the tracing
487
- const tracingManager = childContainer.resolve("TracingManagerInterface");
488
- tracingManager.startTracing();
224
+ if (this.initializationSpan) {
489
225
  (_b = (_a = tracingManager.trace) === null || _a === void 0 ? void 0 : _a.rootSpan) === null || _b === void 0 ? void 0 : _b.addChild(this.initializationSpan);
490
226
  tracingManager.addSpan(this.initializationSpan);
491
227
  // End the spans
492
228
  this.initializationSpan.end();
493
- routerSetupSpan.end();
494
- const requestSpan = tracingManager.startSpan(SpanKeynameEnum.RequestExecution);
495
- try {
496
- // Execute all the request interceptors
497
- const requestInterceptorsSpan = tracingManager.startSpan(SpanKeynameEnum.RequestInterceptors, requestSpan.keyname);
498
- const interceptedRequest = yield this.executeRequestInterceptors(request, childContainer);
499
- requestInterceptorsSpan.end();
500
- // Execute the actual request.
501
- const response = yield this.router.execute(interceptedRequest, childContainer);
502
- // Execute all the response interceptors
503
- const responseInterceptorsSpan = tracingManager.startSpan(SpanKeynameEnum.ResponseInterceptors, requestSpan.keyname);
504
- const interceptedResponse = yield this.executeResponseInterceptors(response, request, childContainer);
505
- responseInterceptorsSpan.end();
506
- // End the tracing
507
- requestSpan.end();
508
- tracingManager.endTrace();
509
- return resolve(interceptedResponse);
510
- }
511
- catch (error) {
512
- // Transform the error into a response object
513
- const errorResponseInterceptorsSpan = tracingManager.startSpan(SpanKeynameEnum.ErrorResponseInterceptors, requestSpan.keyname);
514
- const errorResponse = yield this.executeErrorResponseInterceptors(error, request, childContainer);
515
- errorResponseInterceptorsSpan.end();
516
- // Execute all the response interceptors
517
- const responseInterceptorsSpan = tracingManager.startSpan(SpanKeynameEnum.ResponseInterceptors, requestSpan.keyname);
518
- const interceptedResponse = yield this.executeResponseInterceptors(errorResponse, request, childContainer);
519
- responseInterceptorsSpan.end();
520
- // End the tracing
521
- requestSpan.end();
522
- tracingManager.endTrace();
523
- return resolve(interceptedResponse);
524
- }
525
- }));
526
- });
527
- }
528
- /**
529
- * This method loops through the all the classes decorated with @controller, loops through all the methods decorated
530
- * with @route and builds the dependency tree of all the routes.
531
- *
532
- * @private
533
- */
534
- setupRouter() {
535
- if (this.router) {
536
- return;
537
- }
538
- this.router = this.container.resolve(Router);
539
- // Init the controllers
540
- controllerRegistry.forEach(controller => {
541
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
542
- if (this.router === undefined) {
543
- throw new KernelInitializationError("The Router is undefined");
544
- }
545
- if (controller.hasOwnProperty("__metadata__") === false) {
546
- return;
547
- }
548
- let basePath = (_b = (_a = controller.__metadata__) === null || _a === void 0 ? void 0 : _a.controller) === null || _b === void 0 ? void 0 : _b.basePath;
549
- // Clean the base path by removing trailing slashes.
550
- if (basePath.endsWith("/")) {
551
- basePath = basePath.slice(0, basePath.length - 1);
552
- }
553
- for (const methodPropertyKey in (_c = controller.__metadata__) === null || _c === void 0 ? void 0 : _c.methods) {
554
- if (((_e = (_d = controller.__metadata__) === null || _d === void 0 ? void 0 : _d.methods) === null || _e === void 0 ? void 0 : _e.hasOwnProperty(methodPropertyKey)) === false) {
555
- continue;
556
- }
557
- const method = (_f = controller.__metadata__) === null || _f === void 0 ? void 0 : _f.methods[methodPropertyKey];
558
- if (method.hasOwnProperty("route") === false) {
559
- continue;
560
- }
561
- // Retrieve the "RouteMethodDecorator" object assigned by the @route decorator at .route
562
- const routeMethodDecorator = method.route;
563
- // Build the Route object that will be used the the router to dispatch a request to
564
- // the appropriate controller method
565
- const route = new Route(controller.constructor, routeMethodDecorator.methodKeyname);
566
- route.methodArguments = (_g = method.arguments) !== null && _g !== void 0 ? _g : [];
567
- route.context = mergeWith({}, (_j = (_h = controller.__metadata__) === null || _h === void 0 ? void 0 : _h.controller) === null || _j === void 0 ? void 0 : _j.__routeContext__, method.__routeContext__);
568
- // Build the proper path
569
- let path = routeMethodDecorator.path;
570
- // Clean the path by removing the first and trailing slashes.
571
- if (path.startsWith("/")) {
572
- path = path.slice(1, path.length);
573
- }
574
- if (path.endsWith("/")) {
575
- path = path.slice(0, path.length - 1);
576
- }
577
- // Build the proper path
578
- const routePath = basePath + "/" + path;
579
- // Register the route
580
- this.router.register(routePath, routeMethodDecorator.httpMethod, route);
581
- }
582
- });
583
- }
584
- /**
585
- * This method loops through the service tag decorators defined in the taggedProviderRegistrationsRegistry and simply add
586
- * all the entry to the container.
587
- * @private
588
- */
589
- registerServiceTags() {
590
- taggedProviderRegistrationsRegistry.forEach((taggedRegistrationType) => {
591
- // Verify that if the constructor is moduleScoped, we only load it if its corresponding module is initialized.
592
- // If the module is not initialized, we do not load the tagged service.
593
- // This is to prevent that classes that are only imported get registered event if the module is not initialized.
594
- const moduleScopedRegistration = moduleScopedServicesRegistry[taggedRegistrationType.constructor];
595
- if (moduleScopedRegistration && this.instantiatedModules.hasOwnProperty(moduleScopedRegistration.moduleKeyname) === false) {
596
- return;
597
- }
598
- this.registerProviderRegistration(taggedRegistrationType.providerRegistration);
229
+ // We set the initialization span to undefined since we will only add it to the Trace once
230
+ this.initializationSpan = undefined;
231
+ }
232
+ // Retrieve the EventPipeline. It's the class responsible for executing all the events successfully.
233
+ const eventPipeline = this.container.resolve(EventPipeline);
234
+ const response = yield eventPipeline.execute(event, executionContext, this.container);
235
+ tracingManager.endTrace();
236
+ return response;
599
237
  });
600
238
  }
601
239
  }
@@ -1 +1 @@
1
- {"version":3,"file":"kernel.js","sourceRoot":"","sources":["../../../src/kernel.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAC,SAAS,EAAsB,MAAM,UAAU,CAAC;AACxD,OAAO,EACH,kBAAkB,EAClB,SAAS,EACT,OAAO,EACP,QAAQ,EACR,KAAK,EAEL,MAAM,GAET,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACH,8BAA8B,EAE9B,4BAA4B,EAG5B,wBAAwB,EACxB,mCAAmC,EAEtC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAC,oBAAoB,EAA2B,MAAM,4BAA4B,CAAC;AAC1F,OAAO,EAAQ,eAAe,EAAE,gBAAgB,EAAC,MAAM,oBAAoB,CAAC;AAI5E,OAAO,EAAC,SAAS,EAAC,MAAM,QAAQ,CAAA;AAChC,OAAO,EAAC,oBAAoB,EAAC,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAC,yBAAyB,EAAC,MAAM,sCAAsC,CAAC;AAC/E,OAAO,EAAC,yBAAyB,EAAC,MAAM,sCAAsC,CAAC;AAC/E,OAAO,EAAC,uCAAuC,EAAC,MAAM,sDAAsD,CAAC;AAC7G,OAAO,EAAC,kCAAkC,EAAC,MAAM,gDAAgD,CAAC;AAClG,OAAO,EAAC,iCAAiC,EAAC,MAAM,+CAA+C,CAAC;AAChG,OAAO,EAAC,+BAA+B,EAAC,MAAM,6CAA6C,CAAC;AAE5F,OAAO,EAAC,IAAI,EAAE,eAAe,EAA0B,MAAM,wBAAwB,CAAC;AAEtF,OAAO,EAAC,iBAAiB,EAAC,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM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AAC;YAE9B,IAAG,IAAI,CAAC,kBAAkB,EAAE;gBACxB,MAAA,MAAA,cAAc,CAAC,KAAK,0CAAE,QAAQ,0CAAE,QAAQ,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAA;gBACjE,cAAc,CAAC,OAAO,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;gBAEhD,gBAAgB;gBAChB,IAAI,CAAC,kBAAkB,CAAC,GAAG,EAAE,CAAC;gBAE9B,0FAA0F;gBAC1F,IAAI,CAAC,kBAAkB,GAAG,SAAS,CAAC;aACvC;YAED,oGAAoG;YACpG,MAAM,aAAa,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;YAE5D,MAAM,QAAQ,GAAG,MAAM,aAAa,CAAC,OAAO,CAAC,KAAK,EAAE,gBAAgB,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;YAEtF,cAAc,CAAC,QAAQ,EAAE,CAAC;YAE1B,OAAO,QAAQ,CAAC;;KACnB;CAEJ"}
@@ -0,0 +1,24 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ 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;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { moduleScoped, ServiceDefinitionTagEnum, tag } from "@pristine-ts/common";
8
+ import { CoreModuleKeyname } from "../core.module.keyname";
9
+ import { injectable } from "tsyringe";
10
+ let DefaultEventListener = class DefaultEventListener {
11
+ execute(event) {
12
+ return Promise.resolve();
13
+ }
14
+ supports(event) {
15
+ return false;
16
+ }
17
+ };
18
+ DefaultEventListener = __decorate([
19
+ tag(ServiceDefinitionTagEnum.EventListener),
20
+ moduleScoped(CoreModuleKeyname),
21
+ injectable()
22
+ ], DefaultEventListener);
23
+ export { DefaultEventListener };
24
+ //# sourceMappingURL=default-event.listener.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"default-event.listener.js","sourceRoot":"","sources":["../../../../src/listeners/default-event.listener.ts"],"names":[],"mappings":";;;;;;AACA,OAAO,EAAC,YAAY,EAAE,wBAAwB,EAAE,GAAG,EAAC,MAAM,qBAAqB,CAAC;AAChF,OAAO,EAAC,iBAAiB,EAAC,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAC,UAAU,EAAC,MAAM,UAAU,CAAC;AAMpC,IAAa,oBAAoB,GAAjC,MAAa,oBAAoB;IAC7B,OAAO,CAAe,KAA0B;QAC5C,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IAC7B,CAAC;IAED,QAAQ,CAAI,KAAe;QACvB,OAAO,KAAK,CAAC;IACjB,CAAC;CACJ,CAAA;AARY,oBAAoB;IAHhC,GAAG,CAAC,wBAAwB,CAAC,aAAa,CAAC;IAC3C,YAAY,CAAC,iBAAiB,CAAC;IAC/B,UAAU,EAAE;GACA,oBAAoB,CAQhC;SARY,oBAAoB"}
@@ -0,0 +1,2 @@
1
+ export * from "./default-event.listener";
2
+ //# sourceMappingURL=listeners.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"listeners.js","sourceRoot":"","sources":["../../../../src/listeners/listeners.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC"}
@@ -0,0 +1,35 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ 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;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { moduleScoped, ServiceDefinitionTagEnum, tag } from "@pristine-ts/common";
8
+ import { injectable } from "tsyringe";
9
+ import { CoreModuleKeyname } from "../core.module.keyname";
10
+ /**
11
+ * We need a default mapper, else the container will complain when we do injectAll
12
+ */
13
+ let DefaultEventMapper = class DefaultEventMapper {
14
+ map(event, executionContext) {
15
+ return {
16
+ events: [],
17
+ executionOrder: 'sequential',
18
+ };
19
+ }
20
+ reverseMap(eventResponse, response, executionContext) {
21
+ }
22
+ supportsMapping(event, executionContext) {
23
+ return false;
24
+ }
25
+ supportsReverseMapping(eventResponse, response, executionContext) {
26
+ return false;
27
+ }
28
+ };
29
+ DefaultEventMapper = __decorate([
30
+ moduleScoped(CoreModuleKeyname),
31
+ tag(ServiceDefinitionTagEnum.EventMapper),
32
+ injectable()
33
+ ], DefaultEventMapper);
34
+ export { DefaultEventMapper };
35
+ //# sourceMappingURL=default-event.mapper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"default-event.mapper.js","sourceRoot":"","sources":["../../../../src/mappers/default-event.mapper.ts"],"names":[],"mappings":";;;;;;AACA,OAAO,EAAC,YAAY,EAAE,wBAAwB,EAAE,GAAG,EAAC,MAAM,qBAAqB,CAAC;AAChF,OAAO,EAAC,UAAU,EAAC,MAAM,UAAU,CAAC;AACpC,OAAO,EAAC,iBAAiB,EAAC,MAAM,wBAAwB,CAAC;AAKzD;;GAEG;AAKH,IAAa,kBAAkB,GAA/B,MAAa,kBAAkB;IAC3B,GAAG,CAAC,KAAa,EAAE,gBAAgD;QAC/D,OAAO;YACH,MAAM,EAAE,EAAE;YACV,cAAc,EAAE,YAAY;SAC/B,CAAC;IACN,CAAC;IAED,UAAU,CAAC,aAAsC,EAAE,QAAgB,EAAE,gBAAgD;IACrH,CAAC;IAED,eAAe,CAAC,KAAa,EAAE,gBAAgD;QAC3E,OAAO,KAAK,CAAC;IACjB,CAAC;IAED,sBAAsB,CAAC,aAAsC,EAAE,QAAgB,EAAE,gBAAgD;QAC7H,OAAO,KAAK,CAAC;IACjB,CAAC;CAEJ,CAAA;AAnBY,kBAAkB;IAH9B,YAAY,CAAC,iBAAiB,CAAC;IAC/B,GAAG,CAAC,wBAAwB,CAAC,WAAW,CAAC;IACzC,UAAU,EAAE;GACA,kBAAkB,CAmB9B;SAnBY,kBAAkB"}
@@ -0,0 +1,2 @@
1
+ export * from "./default-event.mapper";
2
+ //# sourceMappingURL=mappers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mappers.js","sourceRoot":"","sources":["../../../../src/mappers/mappers.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * This model defines what an Event is in the Pristine library.
3
+ * Once an event parsed, this should be the only object that will be handle inside the library.
4
+ */
5
+ export class Event {
6
+ constructor(type, payload) {
7
+ this.type = type;
8
+ this.payload = payload;
9
+ }
10
+ }
11
+ //# sourceMappingURL=event.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event.js","sourceRoot":"","sources":["../../../../src/models/event.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,OAAO,KAAK;IACd,YAAmB,IAAY,EAAS,OAAgB;QAArC,SAAI,GAAJ,IAAI,CAAQ;QAAS,YAAO,GAAP,OAAO,CAAS;IACxD,CAAC;CACJ"}
@@ -0,0 +1,7 @@
1
+ export class EventResponse {
2
+ constructor(event, response) {
3
+ this.event = event;
4
+ this.response = response;
5
+ }
6
+ }
7
+ //# sourceMappingURL=event.response.js.map