atomservices 0.10.0-alpha.9 → 0.12.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (214) hide show
  1. package/dist/index.d.mts +33 -0
  2. package/dist/index.d.ts +33 -0
  3. package/dist/index.js +19 -0
  4. package/dist/index.js.map +1 -0
  5. package/dist/index.mjs +1 -0
  6. package/dist/index.mjs.map +1 -0
  7. package/package.json +22 -34
  8. package/LICENSE +0 -21
  9. package/README.md +0 -1
  10. package/RELEASES.md +0 -1
  11. package/lib/Commands/DispatchResult.js +0 -38
  12. package/lib/Commands/DispatchResult.js.map +0 -1
  13. package/lib/Commands/ICommandDispatcher.js +0 -3
  14. package/lib/Commands/ICommandDispatcher.js.map +0 -1
  15. package/lib/Commands/ICommandDispatchers.js +0 -3
  16. package/lib/Commands/ICommandDispatchers.js.map +0 -1
  17. package/lib/Commands/ICommandHandlers.js +0 -3
  18. package/lib/Commands/ICommandHandlers.js.map +0 -1
  19. package/lib/Commands/combineCommandDispatchers.js +0 -28
  20. package/lib/Commands/combineCommandDispatchers.js.map +0 -1
  21. package/lib/Commands/composeCommandHandlers.js +0 -31
  22. package/lib/Commands/composeCommandHandlers.js.map +0 -1
  23. package/lib/Commands/index.js +0 -9
  24. package/lib/Commands/index.js.map +0 -1
  25. package/lib/Containers/Enhancement.js +0 -3
  26. package/lib/Containers/Enhancement.js.map +0 -1
  27. package/lib/Containers/IManagedServiceContainerResult.js +0 -4
  28. package/lib/Containers/IManagedServiceContainerResult.js.map +0 -1
  29. package/lib/Containers/createContainer.js +0 -75
  30. package/lib/Containers/createContainer.js.map +0 -1
  31. package/lib/Containers/createContainerCompose.js +0 -11
  32. package/lib/Containers/createContainerCompose.js.map +0 -1
  33. package/lib/Containers/index.js +0 -7
  34. package/lib/Containers/index.js.map +0 -1
  35. package/lib/Context/Factories/ServiceConfigurateFactory.js +0 -25
  36. package/lib/Context/Factories/ServiceConfigurateFactory.js.map +0 -1
  37. package/lib/Context/Factories/ServiceIdentifierFactory.js +0 -16
  38. package/lib/Context/Factories/ServiceIdentifierFactory.js.map +0 -1
  39. package/lib/Context/Factories/index.js +0 -11
  40. package/lib/Context/Factories/index.js.map +0 -1
  41. package/lib/Context/index.js +0 -5
  42. package/lib/Context/index.js.map +0 -1
  43. package/lib/Events/IEventHandlers.js +0 -3
  44. package/lib/Events/IEventHandlers.js.map +0 -1
  45. package/lib/Events/composeEventHandlers.js +0 -31
  46. package/lib/Events/composeEventHandlers.js.map +0 -1
  47. package/lib/Events/index.js +0 -5
  48. package/lib/Events/index.js.map +0 -1
  49. package/lib/Exceptions/Constants.js +0 -28
  50. package/lib/Exceptions/Constants.js.map +0 -1
  51. package/lib/Exceptions/Core.js +0 -41
  52. package/lib/Exceptions/Core.js.map +0 -1
  53. package/lib/Exceptions/ExtendException.js +0 -15
  54. package/lib/Exceptions/ExtendException.js.map +0 -1
  55. package/lib/Exceptions/IExtendException.js +0 -3
  56. package/lib/Exceptions/IExtendException.js.map +0 -1
  57. package/lib/Exceptions/createException.js +0 -7
  58. package/lib/Exceptions/createException.js.map +0 -1
  59. package/lib/GlobalScope.js +0 -5
  60. package/lib/GlobalScope.js.map +0 -1
  61. package/lib/Identifiers/UUIDIdentifier.js +0 -10
  62. package/lib/Identifiers/UUIDIdentifier.js.map +0 -1
  63. package/lib/Identifiers/index.js +0 -5
  64. package/lib/Identifiers/index.js.map +0 -1
  65. package/lib/Notifiers/NotifyLog.js +0 -30
  66. package/lib/Notifiers/NotifyLog.js.map +0 -1
  67. package/lib/Notifiers/NotifyObject.js +0 -35
  68. package/lib/Notifiers/NotifyObject.js.map +0 -1
  69. package/lib/Notifiers/composeNotifiers.js +0 -36
  70. package/lib/Notifiers/composeNotifiers.js.map +0 -1
  71. package/lib/Notifiers/data/ContainersNotifyData.js +0 -10
  72. package/lib/Notifiers/data/ContainersNotifyData.js.map +0 -1
  73. package/lib/Notifiers/data/ServicesNotifyData.js +0 -18
  74. package/lib/Notifiers/data/ServicesNotifyData.js.map +0 -1
  75. package/lib/Notifiers/data/common/ContainersData.js +0 -9
  76. package/lib/Notifiers/data/common/ContainersData.js.map +0 -1
  77. package/lib/Notifiers/data/common/IConstantData.js +0 -3
  78. package/lib/Notifiers/data/common/IConstantData.js.map +0 -1
  79. package/lib/Notifiers/data/common/ServicesData.js +0 -17
  80. package/lib/Notifiers/data/common/ServicesData.js.map +0 -1
  81. package/lib/Notifiers/data/common/composeNotifyData.js +0 -15
  82. package/lib/Notifiers/data/common/composeNotifyData.js.map +0 -1
  83. package/lib/Notifiers/data/common/index.js +0 -9
  84. package/lib/Notifiers/data/common/index.js.map +0 -1
  85. package/lib/Notifiers/data/index.js +0 -7
  86. package/lib/Notifiers/data/index.js.map +0 -1
  87. package/lib/Notifiers/index.js +0 -13
  88. package/lib/Notifiers/index.js.map +0 -1
  89. package/lib/Reactions/IReactions.js +0 -3
  90. package/lib/Reactions/IReactions.js.map +0 -1
  91. package/lib/Reactions/composeReactions.js +0 -41
  92. package/lib/Reactions/composeReactions.js.map +0 -1
  93. package/lib/Reactions/index.js +0 -5
  94. package/lib/Reactions/index.js.map +0 -1
  95. package/lib/SFComponents/createSFComponents.js +0 -147
  96. package/lib/SFComponents/createSFComponents.js.map +0 -1
  97. package/lib/SFComponents/index.js +0 -5
  98. package/lib/SFComponents/index.js.map +0 -1
  99. package/lib/Services/core/MetadataRefiner.js +0 -31
  100. package/lib/Services/core/MetadataRefiner.js.map +0 -1
  101. package/lib/Services/core/composeEventProcess.js +0 -31
  102. package/lib/Services/core/composeEventProcess.js.map +0 -1
  103. package/lib/Services/core/composeEventReactions.js +0 -56
  104. package/lib/Services/core/composeEventReactions.js.map +0 -1
  105. package/lib/Services/core/composeEventResulting.js +0 -5
  106. package/lib/Services/core/composeEventResulting.js.map +0 -1
  107. package/lib/Services/core/composeServiceContext.js +0 -126
  108. package/lib/Services/core/composeServiceContext.js.map +0 -1
  109. package/lib/Services/core/connectStream/connectStream.js +0 -26
  110. package/lib/Services/core/connectStream/connectStream.js.map +0 -1
  111. package/lib/Services/core/connectStream/index.js +0 -5
  112. package/lib/Services/core/connectStream/index.js.map +0 -1
  113. package/lib/Services/core/connectStream/mapHandlersEvents.js +0 -9
  114. package/lib/Services/core/connectStream/mapHandlersEvents.js.map +0 -1
  115. package/lib/Services/core/connectStream/mapReactionsEvents.js +0 -5
  116. package/lib/Services/core/connectStream/mapReactionsEvents.js.map +0 -1
  117. package/lib/Services/core/createCommandDispatcher.js +0 -56
  118. package/lib/Services/core/createCommandDispatcher.js.map +0 -1
  119. package/lib/Services/core/index.js +0 -13
  120. package/lib/Services/core/index.js.map +0 -1
  121. package/lib/Services/core/operateEventProcess.js +0 -39
  122. package/lib/Services/core/operateEventProcess.js.map +0 -1
  123. package/lib/Services/createService.js +0 -111
  124. package/lib/Services/createService.js.map +0 -1
  125. package/lib/Services/index.js +0 -5
  126. package/lib/Services/index.js.map +0 -1
  127. package/lib/States/IStateHandlers.js +0 -3
  128. package/lib/States/IStateHandlers.js.map +0 -1
  129. package/lib/States/composeStateApplier.js +0 -14
  130. package/lib/States/composeStateApplier.js.map +0 -1
  131. package/lib/States/composeStateHandlers.js +0 -27
  132. package/lib/States/composeStateHandlers.js.map +0 -1
  133. package/lib/States/index.js +0 -7
  134. package/lib/States/index.js.map +0 -1
  135. package/lib/Streams/LocalDirectStream.js +0 -16
  136. package/lib/Streams/LocalDirectStream.js.map +0 -1
  137. package/lib/Streams/LocalEventStream.js +0 -47
  138. package/lib/Streams/LocalEventStream.js.map +0 -1
  139. package/lib/Streams/LocalInMemoryEventStream.js +0 -13
  140. package/lib/Streams/LocalInMemoryEventStream.js.map +0 -1
  141. package/lib/Streams/endpoints.js +0 -9
  142. package/lib/Streams/endpoints.js.map +0 -1
  143. package/lib/Streams/index.js +0 -7
  144. package/lib/Streams/index.js.map +0 -1
  145. package/lib/index.js +0 -18
  146. package/lib/index.js.map +0 -1
  147. package/typings/Commands/DispatchResult.d.ts +0 -16
  148. package/typings/Commands/ICommandDispatcher.d.ts +0 -6
  149. package/typings/Commands/ICommandDispatchers.d.ts +0 -4
  150. package/typings/Commands/ICommandHandlers.d.ts +0 -6
  151. package/typings/Commands/combineCommandDispatchers.d.ts +0 -3
  152. package/typings/Commands/composeCommandHandlers.d.ts +0 -3
  153. package/typings/Commands/index.d.ts +0 -6
  154. package/typings/Containers/Enhancement.d.ts +0 -3
  155. package/typings/Containers/IManagedServiceContainerResult.d.ts +0 -5
  156. package/typings/Containers/createContainer.d.ts +0 -4
  157. package/typings/Containers/createContainerCompose.d.ts +0 -5
  158. package/typings/Containers/index.d.ts +0 -3
  159. package/typings/Context/Factories/ServiceConfigurateFactory.d.ts +0 -4
  160. package/typings/Context/Factories/ServiceIdentifierFactory.d.ts +0 -4
  161. package/typings/Context/Factories/index.d.ts +0 -8
  162. package/typings/Context/index.d.ts +0 -1
  163. package/typings/Events/IEventHandlers.d.ts +0 -6
  164. package/typings/Events/composeEventHandlers.d.ts +0 -3
  165. package/typings/Events/index.d.ts +0 -2
  166. package/typings/Exceptions/Constants.d.ts +0 -58
  167. package/typings/Exceptions/Core.d.ts +0 -12
  168. package/typings/Exceptions/ExtendException.d.ts +0 -6
  169. package/typings/Exceptions/IExtendException.d.ts +0 -7
  170. package/typings/Exceptions/createException.d.ts +0 -5
  171. package/typings/GlobalScope.d.ts +0 -1
  172. package/typings/Identifiers/UUIDIdentifier.d.ts +0 -2
  173. package/typings/Identifiers/index.d.ts +0 -1
  174. package/typings/Notifiers/NotifyLog.d.ts +0 -14
  175. package/typings/Notifiers/NotifyObject.d.ts +0 -17
  176. package/typings/Notifiers/composeNotifiers.d.ts +0 -2
  177. package/typings/Notifiers/data/ContainersNotifyData.d.ts +0 -12
  178. package/typings/Notifiers/data/ServicesNotifyData.d.ts +0 -52
  179. package/typings/Notifiers/data/common/ContainersData.d.ts +0 -5
  180. package/typings/Notifiers/data/common/IConstantData.d.ts +0 -6
  181. package/typings/Notifiers/data/common/ServicesData.d.ts +0 -13
  182. package/typings/Notifiers/data/common/composeNotifyData.d.ts +0 -9
  183. package/typings/Notifiers/data/common/index.d.ts +0 -4
  184. package/typings/Notifiers/data/index.d.ts +0 -2
  185. package/typings/Notifiers/index.d.ts +0 -5
  186. package/typings/Reactions/IReactions.d.ts +0 -6
  187. package/typings/Reactions/composeReactions.d.ts +0 -3
  188. package/typings/Reactions/index.d.ts +0 -2
  189. package/typings/SFComponents/createSFComponents.d.ts +0 -22
  190. package/typings/SFComponents/index.d.ts +0 -1
  191. package/typings/Services/core/MetadataRefiner.d.ts +0 -13
  192. package/typings/Services/core/composeEventProcess.d.ts +0 -2
  193. package/typings/Services/core/composeEventReactions.d.ts +0 -2
  194. package/typings/Services/core/composeEventResulting.d.ts +0 -2
  195. package/typings/Services/core/composeServiceContext.d.ts +0 -5
  196. package/typings/Services/core/connectStream/connectStream.d.ts +0 -2
  197. package/typings/Services/core/connectStream/index.d.ts +0 -1
  198. package/typings/Services/core/connectStream/mapHandlersEvents.d.ts +0 -5
  199. package/typings/Services/core/connectStream/mapReactionsEvents.d.ts +0 -6
  200. package/typings/Services/core/createCommandDispatcher.d.ts +0 -3
  201. package/typings/Services/core/index.d.ts +0 -5
  202. package/typings/Services/core/operateEventProcess.d.ts +0 -5
  203. package/typings/Services/createService.d.ts +0 -2
  204. package/typings/Services/index.d.ts +0 -1
  205. package/typings/States/IStateHandlers.d.ts +0 -5
  206. package/typings/States/composeStateApplier.d.ts +0 -5
  207. package/typings/States/composeStateHandlers.d.ts +0 -3
  208. package/typings/States/index.d.ts +0 -3
  209. package/typings/Streams/LocalDirectStream.d.ts +0 -2
  210. package/typings/Streams/LocalEventStream.d.ts +0 -2
  211. package/typings/Streams/LocalInMemoryEventStream.d.ts +0 -2
  212. package/typings/Streams/endpoints.d.ts +0 -13
  213. package/typings/Streams/index.d.ts +0 -2
  214. package/typings/index.d.ts +0 -11
@@ -1 +0,0 @@
1
- {"version":3,"file":"operateEventProcess.js","sourceRoot":"","sources":["../../../src/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,CAAC,IAAI;SACjB,EAAE;YACD,KAAK;SACN,CAAC,EAAE,KAAK,CAAC,CAAC;KACZ;AACH,CAAC,CAAC"}
@@ -1,111 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createService = void 0;
4
- const ServiceConfigurateFactory_1 = require("../Context/Factories/ServiceConfigurateFactory");
5
- const ServiceIdentifierFactory_1 = require("../Context/Factories/ServiceIdentifierFactory");
6
- const GlobalScope_1 = require("../GlobalScope");
7
- const UUIDIdentifier_1 = require("../Identifiers/UUIDIdentifier");
8
- const Notifiers_1 = require("../Notifiers");
9
- const Streams_1 = require("../Streams");
10
- const composeServiceContext_1 = require("./core/composeServiceContext");
11
- const connectStream_1 = require("./core/connectStream");
12
- const createCommandDispatcher_1 = require("./core/createCommandDispatcher");
13
- exports.createService = (service, container) => ((SERVICE, CONTAINER) => {
14
- const { CommandHandlers = [], EventHandlers = [], SFC = {}, StateHandlers = [], Reactions = [], EventStores = (CONTAINER && CONTAINER.EventStores), EventStream = (CONTAINER && CONTAINER.EventStream) || Streams_1.LocalInMemoryEventStream, Identifier = (CONTAINER && CONTAINER.Identifier) || UUIDIdentifier_1.UUIDIdentifier, configs = {}, scope = (CONTAINER && CONTAINER.scope) || GlobalScope_1.GlobalScope, type, } = SERVICE;
15
- const ContainerNotifiers = (CONTAINER && CONTAINER.Notifiers) || [];
16
- const ServiceNotifiers = SERVICE.Notifiers || [];
17
- const NOTIFIERS = Notifiers_1.composeNotifiers(...ServiceNotifiers, ...ContainerNotifiers);
18
- let definition = {
19
- CommandHandlers,
20
- EventHandlers,
21
- EventStores,
22
- EventStream,
23
- Notifiers: NOTIFIERS,
24
- Reactions,
25
- ServiceConfigurate: ServiceConfigurateFactory_1.ServiceConfigurateFactory.create(configs),
26
- ServiceIdentifier: ServiceIdentifierFactory_1.ServiceIdentifierFactory.create(Identifier, type),
27
- StateHandlers,
28
- configs,
29
- scope,
30
- type,
31
- };
32
- definition = Object.keys(SFC).reduce((result, key) => {
33
- const { Configs, CommandHandler, EventHandler, StateHandler } = SFC[key];
34
- if (definition.configs.events) {
35
- definition.configs.events[EventHandler.name] = Configs;
36
- }
37
- else {
38
- definition.configs.events = {
39
- [EventHandler.name]: Configs,
40
- };
41
- }
42
- definition.CommandHandlers.push(CommandHandler);
43
- definition.EventHandlers.push(EventHandler);
44
- definition.StateHandlers.push(StateHandler);
45
- return result;
46
- }, definition);
47
- const CommandDispatcher = createCommandDispatcher_1.createCommandDispatcher(definition);
48
- const Service = {
49
- connect: async () => {
50
- connectStream_1.connectStream(definition);
51
- NOTIFIERS.emit(Notifiers_1.ServicesNotifyData.SERVICE_CONNECTED(SERVICE.type));
52
- },
53
- context: (options) => composeServiceContext_1.composeServiceContext(definition)(options),
54
- dispatch: async (command, listening) => {
55
- NOTIFIERS.emit(Notifiers_1.ServicesNotifyData.SERVICE_COMMAND_DISPATCHING(SERVICE.type, {
56
- scope: SERVICE.scope,
57
- type: SERVICE.type,
58
- name: command.name,
59
- }, {
60
- command,
61
- }));
62
- const result = await CommandDispatcher.dispatch(command, listening);
63
- if (!result.accept) {
64
- if (result.status === "error") {
65
- NOTIFIERS.error(Notifiers_1.ServicesNotifyData.SERVICE_COMMAND_ERROR(SERVICE.type, {
66
- scope: SERVICE.scope,
67
- type: SERVICE.type,
68
- name: command.name,
69
- }, {
70
- command,
71
- }), result.error);
72
- }
73
- if (result.status === "invalid") {
74
- NOTIFIERS.emit(Notifiers_1.ServicesNotifyData.SERVICE_COMMAND_INVALID(SERVICE.type, {
75
- scope: SERVICE.scope,
76
- type: SERVICE.type,
77
- name: command.name,
78
- invalidAttributes: result.invalidAttributes,
79
- }, {
80
- command,
81
- }));
82
- }
83
- if (result.status === "unhandled") {
84
- NOTIFIERS.emit(Notifiers_1.ServicesNotifyData.SERVICE_COMMAND_UNHANDLED(SERVICE.type, {
85
- scope: SERVICE.scope,
86
- type: SERVICE.type,
87
- name: command.name,
88
- }, {
89
- command,
90
- }));
91
- }
92
- }
93
- return result;
94
- },
95
- scope: () => scope,
96
- type: () => type,
97
- };
98
- Object.freeze(Service);
99
- NOTIFIERS.emit(Notifiers_1.ServicesNotifyData.SERVICE_CREATED(type, {
100
- scope: SERVICE.scope,
101
- type: SERVICE.type,
102
- configs: SERVICE.configs,
103
- defined: {
104
- EventStores: (SERVICE.EventStores && true) || false,
105
- EventStream: (SERVICE.EventStream && true) || false,
106
- Identifier: (SERVICE.Identifier && true) || false,
107
- },
108
- }));
109
- return Service;
110
- })(service, container);
111
- //# sourceMappingURL=createService.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"createService.js","sourceRoot":"","sources":["../../src/Services/createService.ts"],"names":[],"mappings":";;;AACA,8FAA2F;AAC3F,4FAAyF;AACzF,gDAA6C;AAC7C,kEAA+D;AAC/D,4CAAoE;AACpE,wCAAsD;AACtD,wEAAqE;AACrE,wDAAqD;AACrD,4EAAyE;AAE5D,QAAA,aAAa,GAAG,CAAC,OAAiB,EAAE,SAA8B,EAAmB,EAAE,CAAC,CAAC,CAAC,OAAO,EAAE,SAAS,EAAmB,EAAE;IAC5I,MAAM,EACJ,eAAe,GAAG,EAAE,EACpB,aAAa,GAAG,EAAE,EAClB,GAAG,GAAG,EAAE,EACR,aAAa,GAAG,EAAE,EAClB,SAAS,GAAG,EAAE,EACd,WAAW,GAAG,CAAC,SAAS,IAAI,SAAS,CAAC,WAAW,CAAC,EAClD,WAAW,GAAG,CAAC,SAAS,IAAI,SAAS,CAAC,WAAW,CAAC,IAAI,kCAAwB,EAC9E,UAAU,GAAG,CAAC,SAAS,IAAI,SAAS,CAAC,UAAU,CAAC,IAAI,+BAAc,EAClE,OAAO,GAAG,EAAE,EACZ,KAAK,GAAG,CAAC,SAAS,IAAI,SAAS,CAAC,KAAK,CAAC,IAAI,yBAAW,EACrD,IAAI,GACL,GAAG,OAAO,CAAC;IACZ,MAAM,kBAAkB,GAAG,CAAC,SAAS,IAAI,SAAS,CAAC,SAAS,CAAC,IAAI,EAAE,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= require("./createService");
4
- Object.defineProperty(exports, "createService", { enumerable: true, get: function () { return createService_1.createService; } });
5
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Services/index.ts"],"names":[],"mappings":";;AAAA,iDAAgD;AAAvC,8GAAA,aAAa,OAAA"}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=IStateHandlers.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IStateHandlers.js","sourceRoot":"","sources":["../../src/States/IStateHandlers.ts"],"names":[],"mappings":""}
@@ -1,14 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.composeStateApplier = void 0;
4
- exports.composeStateApplier = (props) => (({ StateHandlers }) => {
5
- const Applier = {
6
- apply: async (event) => {
7
- StateHandlers.apply(event);
8
- },
9
- };
10
- Object.freeze(Applier);
11
- return Applier;
12
- })(props);
13
- Object.freeze(exports.composeStateApplier);
14
- //# sourceMappingURL=composeStateApplier.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"composeStateApplier.js","sourceRoot":"","sources":["../../src/States/composeStateApplier.ts"],"names":[],"mappings":";;;AAGa,QAAA,mBAAmB,GAAG,CAAC,KAAyC,EAAE,EAAE,CAC/E,CAAC,CAAC,EAAE,aAAa,EAAE,EAAiB,EAAE;IACpC,MAAM,OAAO,GAAkB;QAC7B,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE;YACrB,aAAa,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAC7B,CAAC;KACF,CAAC;IAEF,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAEvB,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;AAEZ,MAAM,CAAC,MAAM,CAAC,2BAAmB,CAAC,CAAC"}
@@ -1,27 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.composeStateHandlers = void 0;
4
- const Core_1 = require("../Exceptions/Core");
5
- exports.composeStateHandlers = (...stateHandlers) => (type) => ((StateHandlers) => {
6
- const HANDLERS_MAP = StateHandlers.reduce((result, handler) => {
7
- const { name } = handler;
8
- if (result[name] === undefined) {
9
- result[name] = handler;
10
- }
11
- else {
12
- throw Core_1.ComposeDuplicatedStateHandlersException(type, name);
13
- }
14
- return result;
15
- }, {});
16
- const HANDLERS = {
17
- apply: async (event) => {
18
- const handler = HANDLERS_MAP[event.name];
19
- await handler.apply(event);
20
- },
21
- type: () => type,
22
- };
23
- Object.freeze(HANDLERS);
24
- return HANDLERS;
25
- })(stateHandlers);
26
- Object.freeze(exports.composeStateHandlers);
27
- //# sourceMappingURL=composeStateHandlers.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"composeStateHandlers.js","sourceRoot":"","sources":["../../src/States/composeStateHandlers.ts"],"names":[],"mappings":";;;AACA,6CAA6E;AAOhE,QAAA,oBAAoB,GAAG,CAAC,GAAG,aAA8B,EAAE,EAAE,CACxE,CAAC,IAAY,EAAkB,EAAE,CAC/B,CAAC,CAAC,aAA8B,EAAkB,EAAE;IAClD,MAAM,YAAY,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC,MAAyB,EAAE,OAAO,EAAE,EAAE;QAC/E,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC;QAEzB,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,SAAS,EAAE;YAC9B,MAAM,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC;SACxB;aAAM;YACL,MAAM,8CAAuC,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;SAC3D;QAED,OAAO,MAAM,CAAC;IAChB,CAAC,EAAE,EAAuB,CAAC,CAAC;IAE5B,MAAM,QAAQ,GAAmB;QAC/B,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE;YACrB,MAAM,OAAO,GAAG,YAAY,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YACzC,MAAM,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAC7B,CAAC;QACD,IAAI,EAAE,GAAG,EAAE,CACT,IAAI;KACP,CAAC;IAEF,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAExB,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC;AAEtB,MAAM,CAAC,MAAM,CAAC,4BAAoB,CAAC,CAAC"}
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var composeStateApplier_1 = require("./composeStateApplier");
4
- Object.defineProperty(exports, "composeStateApplier", { enumerable: true, get: function () { return composeStateApplier_1.composeStateApplier; } });
5
- var composeStateHandlers_1 = require("./composeStateHandlers");
6
- Object.defineProperty(exports, "composeStateHandlers", { enumerable: true, get: function () { return composeStateHandlers_1.composeStateHandlers; } });
7
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/States/index.ts"],"names":[],"mappings":";;AAAA,6DAA4D;AAAnD,0HAAA,mBAAmB,OAAA;AAC5B,+DAA8D;AAArD,4HAAA,oBAAoB,OAAA"}
@@ -1,16 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.LocalDirectStream = void 0;
4
- const DirectingStream = {};
5
- exports.LocalDirectStream = Object.freeze({
6
- directTo: async (ref, data) => {
7
- if (DirectingStream[ref]) {
8
- DirectingStream[ref](data);
9
- delete DirectingStream[ref];
10
- }
11
- },
12
- listenTo: async (ref, listener) => {
13
- DirectingStream[ref] = listener;
14
- },
15
- });
16
- //# sourceMappingURL=LocalDirectStream.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LocalDirectStream.js","sourceRoot":"","sources":["../../src/Streams/LocalDirectStream.ts"],"names":[],"mappings":";;;AAEA,MAAM,eAAe,GAAQ,EAAE,CAAC;AAEnB,QAAA,iBAAiB,GAAgC,MAAM,CAAC,MAAM,CAAC;IAC1E,QAAQ,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;QAC5B,IAAI,eAAe,CAAC,GAAG,CAAC,EAAE;YACxB,eAAe,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC;YAC3B,OAAO,eAAe,CAAC,GAAG,CAAC,CAAC;SAC7B;IACH,CAAC;IACD,QAAQ,EAAE,KAAK,EAAE,GAAG,EAAE,QAAQ,EAAE,EAAE;QAChC,eAAe,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC;IAClC,CAAC;CACF,CAAC,CAAC"}
@@ -1,47 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.LocalEventStream = void 0;
4
- const endpoints_1 = require("./endpoints");
5
- const StreamDefinitions = [];
6
- const StreamRegistry = {};
7
- exports.LocalEventStream = Object.freeze({
8
- connect: async () => {
9
- for (const definition of StreamDefinitions) {
10
- const { handlers, reactions, scope, type } = definition;
11
- const Public = endpoints_1.endpoints.toExchange({ level: "Public", scope, type });
12
- const Scope = endpoints_1.endpoints.toExchange({ level: "Scope", scope, type });
13
- if (StreamRegistry[Public] === undefined) {
14
- StreamRegistry[Public] = [];
15
- }
16
- if (StreamRegistry[Scope] === undefined) {
17
- StreamRegistry[Scope] = [];
18
- }
19
- StreamRegistry[Public].push(handlers.processing);
20
- StreamRegistry[Scope].push(handlers.processing);
21
- const exchanges = [];
22
- reactions.events.forEach((reaction) => {
23
- const ex = endpoints_1.endpoints.toExchange({ level: "Public", scope: reaction.scope, type: reaction.type });
24
- if (StreamRegistry[ex] === undefined) {
25
- StreamRegistry[ex] = [];
26
- }
27
- if (exchanges.indexOf(ex) === -1) {
28
- StreamRegistry[ex].push(reactions.processes[scope]);
29
- exchanges.push(ex);
30
- }
31
- });
32
- }
33
- },
34
- publish: async ({ event, metadata, on }) => {
35
- const { level, scope } = on;
36
- const { type } = event;
37
- const ex = endpoints_1.endpoints.toExchange({ level, scope, type });
38
- if (StreamRegistry[ex]) {
39
- const processAck = () => { };
40
- StreamRegistry[ex].forEach((each) => each(event, metadata, processAck));
41
- }
42
- },
43
- subscribe: async (definition) => {
44
- StreamDefinitions.push(definition);
45
- },
46
- });
47
- //# sourceMappingURL=LocalEventStream.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LocalEventStream.js","sourceRoot":"","sources":["../../src/Streams/LocalEventStream.ts"],"names":[],"mappings":";;;AACA,2CAAwC;AAExC,MAAM,iBAAiB,GAA+B,EAAE,CAAC;AACzD,MAAM,cAAc,GAEhB,EAAE,CAAC;AAEM,QAAA,gBAAgB,GAAiE,MAAM,CAAC,MAAM,CAAC;IAC1G,OAAO,EAAE,KAAK,IAAI,EAAE;QAClB,KAAK,MAAM,UAAU,IAAI,iBAAiB,EAAE;YAC1C,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,UAAU,CAAC;YACxD,MAAM,MAAM,GAAG,qBAAS,CAAC,UAAU,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;YACtE,MAAM,KAAK,GAAG,qBAAS,CAAC,UAAU,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;YAEpE,IAAI,cAAc,CAAC,MAAM,CAAC,KAAK,SAAS,EAAE;gBACxC,cAAc,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC;aAC7B;YAED,IAAI,cAAc,CAAC,KAAK,CAAC,KAAK,SAAS,EAAE;gBACvC,cAAc,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC;aAC5B;YAED,cAAc,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;YACjD,cAAc,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,QAAQ,CA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SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE;QAC9B,iBAAiB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACrC,CAAC;CACF,CAAC,CAAC"}
@@ -1,13 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.LocalInMemoryEventStream = void 0;
4
- const LocalDirectStream_1 = require("./LocalDirectStream");
5
- const LocalEventStream_1 = require("./LocalEventStream");
6
- exports.LocalInMemoryEventStream = Object.freeze({
7
- connect: LocalEventStream_1.LocalEventStream.connect,
8
- directTo: LocalDirectStream_1.LocalDirectStream.directTo,
9
- listenTo: LocalDirectStream_1.LocalDirectStream.listenTo,
10
- publish: LocalEventStream_1.LocalEventStream.publish,
11
- subscribe: LocalEventStream_1.LocalEventStream.subscribe,
12
- });
13
- //# sourceMappingURL=LocalInMemoryEventStream.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LocalInMemoryEventStream.js","sourceRoot":"","sources":["../../src/Streams/LocalInMemoryEventStream.ts"],"names":[],"mappings":";;;AACA,2DAAwD;AACxD,yDAAsD;AAEzC,QAAA,wBAAwB,GAAiB,MAAM,CAAC,MAAM,CAAC;IAClE,OAAO,EAAE,mCAAgB,CAAC,OAAO;IACjC,QAAQ,EAAE,qCAAiB,CAAC,QAAQ;IACpC,QAAQ,EAAE,qCAAiB,CAAC,QAAQ;IACpC,OAAO,EAAE,mCAAgB,CAAC,OAAO;IACjC,SAAS,EAAE,mCAAgB,CAAC,SAAS;CACtC,CAAC,CAAC"}
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.endpoints = void 0;
4
- exports.endpoints = {
5
- toExchange: (on) => `${on.scope}:${on.type}::${on.level}`,
6
- toQueue: (to) => `${to.scope}:${to.type}::${to.channel}`,
7
- };
8
- Object.freeze(exports.endpoints);
9
- //# sourceMappingURL=endpoints.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"endpoints.js","sourceRoot":"","sources":["../../src/Streams/endpoints.ts"],"names":[],"mappings":";;;AAEa,QAAA,SAAS,GAAG;IACvB,UAAU,EAAE,CAAC,EAAoE,EAAE,EAAE,CACnF,GAAG,EAAE,CAAC,KAAK,IAAI,EAAE,CAAC,IAAI,KAAK,EAAE,CAAC,KAAK,EAAE;IACvC,OAAO,EAAE,CAAC,EAAuE,EAAE,EAAE,CACnF,GAAG,EAAE,CAAC,KAAK,IAAI,EAAE,CAAC,IAAI,KAAK,EAAE,CAAC,OAAO,EAAE;CAC1C,CAAC;AAEF,MAAM,CAAC,MAAM,CAAC,iBAAS,CAAC,CAAC"}
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var LocalDirectStream_1 = require("./LocalDirectStream");
4
- Object.defineProperty(exports, "LocalDirectStream", { enumerable: true, get: function () { return LocalDirectStream_1.LocalDirectStream; } });
5
- var LocalInMemoryEventStream_1 = require("./LocalInMemoryEventStream");
6
- Object.defineProperty(exports, "LocalInMemoryEventStream", { enumerable: true, get: function () { return LocalInMemoryEventStream_1.LocalInMemoryEventStream; } });
7
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Streams/index.ts"],"names":[],"mappings":";;AAAA,yDAAwD;AAA/C,sHAAA,iBAAiB,OAAA;AAC1B,uEAAsE;AAA7D,oIAAA,wBAAwB,OAAA"}
package/lib/index.js DELETED
@@ -1,18 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Commands = require("./Commands");
4
- exports.Containers = require("./Containers");
5
- exports.Context = require("./Context");
6
- exports.Events = require("./Events");
7
- exports.Identifiers = require("./Identifiers");
8
- exports.Reactions = require("./Reactions");
9
- exports.SFComponents = require("./SFComponents");
10
- exports.Services = require("./Services");
11
- exports.States = require("./States");
12
- var GlobalScope_1 = require("./GlobalScope");
13
- Object.defineProperty(exports, "GlobalScope", { enumerable: true, get: function () { return GlobalScope_1.GlobalScope; } });
14
- var atomservicescore_1 = require("atomservicescore");
15
- Object.defineProperty(exports, "DispatchFunc", { enumerable: true, get: function () { return atomservicescore_1.DispatchFunc; } });
16
- Object.defineProperty(exports, "DispatchResult", { enumerable: true, get: function () { return atomservicescore_1.DispatchResult; } });
17
- Object.defineProperty(exports, "EventStream", { enumerable: true, get: function () { return atomservicescore_1.EventStream; } });
18
- //# sourceMappingURL=index.js.map
package/lib/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAAA,yCAAuC;AACvC,6CAA2C;AAC3C,uCAAqC;AACrC,qCAAmC;AACnC,+CAA6C;AAC7C,2CAAyC;AACzC,iDAA+C;AAC/C,yCAAuC;AACvC,qCAAmC;AAEnC,6CAA4C;AAAnC,0GAAA,WAAW,OAAA;AAEpB,qDAiC0B;AAhCxB,gHAAA,YAAY,OAAA;AACZ,kHAAA,cAAc,OAAA;AACd,+GAAA,WAAW,OAAA"}
@@ -1,16 +0,0 @@
1
- import { DispatchResult as DispatchResultType } from "atomservicescore";
2
- export declare const DispatchResult: {
3
- accept: (ref: {
4
- _createdAt: Date;
5
- _id: any;
6
- _version: number | undefined;
7
- aggregateID: any;
8
- name: string;
9
- type: string;
10
- }, ext?: {
11
- [key: string]: any;
12
- }) => DispatchResultType.IAcceptDispatchResult;
13
- error: (type: string, name: string, error: Error) => DispatchResultType.IErrorDispatchResult;
14
- invalid: (invalidAttributes: any) => DispatchResultType.IInvalidDispatchResult;
15
- unhandled: (type: string, name: string) => DispatchResultType.IUnhandledDispatchResult;
16
- };
@@ -1,6 +0,0 @@
1
- import { DispatchResult, ICommand } from "atomservicescore";
2
- export interface ICommandDispatcher {
3
- scope: () => string;
4
- type: () => string;
5
- dispatch: (command: ICommand, listening?: (data: any) => void) => Promise<DispatchResult.IDispatchResult>;
6
- }
@@ -1,4 +0,0 @@
1
- import { DispatchResult, ICommand } from "atomservicescore";
2
- export interface ICommandDispatchers {
3
- dispatch: (type: string, command: ICommand, listening?: (data: any) => void) => Promise<DispatchResult.IDispatchResult>;
4
- }
@@ -1,6 +0,0 @@
1
- import { ICommand, ICommandHandler } from "atomservicescore";
2
- export interface ICommandHandlers {
3
- type: () => string;
4
- resolve: (command: ICommand) => ICommandHandler | undefined;
5
- forEach: (callback: (handler: ICommandHandler) => void) => number;
6
- }
@@ -1,3 +0,0 @@
1
- import { ICommandDispatcher } from "./ICommandDispatcher";
2
- import { ICommandDispatchers } from "./ICommandDispatchers";
3
- export declare const combineCommandDispatchers: (scope: string, ...dispatchers: ICommandDispatcher[]) => ICommandDispatchers;
@@ -1,3 +0,0 @@
1
- import { ICommandHandler } from "atomservicescore";
2
- import { ICommandHandlers } from "./ICommandHandlers";
3
- export declare const composeCommandHandlers: (...commandHandlers: ICommandHandler[]) => (type: string) => ICommandHandlers;
@@ -1,6 +0,0 @@
1
- export { combineCommandDispatchers } from "./combineCommandDispatchers";
2
- export { composeCommandHandlers } from "./composeCommandHandlers";
3
- export { DispatchResult } from "./DispatchResult";
4
- export { ICommandDispatcher } from "./ICommandDispatcher";
5
- export { ICommandDispatchers } from "./ICommandDispatchers";
6
- export { ICommandHandlers } from "./ICommandHandlers";
@@ -1,3 +0,0 @@
1
- import { IManagedServiceContainer } from "atomservicescore";
2
- import { IManagedServiceContainerResult } from "./IManagedServiceContainerResult";
3
- export declare type Enhancement<T extends IManagedServiceContainerResult = IManagedServiceContainerResult> = (container: IManagedServiceContainer) => T;
@@ -1,5 +0,0 @@
1
- import { IManagedServiceContainer } from "atomservicescore";
2
- export interface IManagedServiceContainerResult {
3
- Container: IManagedServiceContainer;
4
- [key: string]: any;
5
- }
@@ -1,4 +0,0 @@
1
- import { IServicesContainer } from "atomservicescore";
2
- import { Enhancement } from "./Enhancement";
3
- import { IManagedServiceContainerResult } from "./IManagedServiceContainerResult";
4
- export declare const createContainer: (container: IServicesContainer, enhancement?: Enhancement<IManagedServiceContainerResult> | undefined) => IManagedServiceContainerResult;
@@ -1,5 +0,0 @@
1
- import { IServicesContainer } from "atomservicescore";
2
- import { Enhancement } from "./Enhancement";
3
- import { IManagedServiceContainerResult } from "./IManagedServiceContainerResult";
4
- export declare type ComposeServiceContainer = (container: IServicesContainer) => Promise<IServicesContainer>;
5
- export declare const createContainerCompose: (container: IServicesContainer, enhancement?: Enhancement<IManagedServiceContainerResult> | undefined) => (compose: ComposeServiceContainer) => Promise<IManagedServiceContainerResult | ReturnType<Enhancement>>;
@@ -1,3 +0,0 @@
1
- export { createContainer } from "./createContainer";
2
- export { createContainerCompose } from "./createContainerCompose";
3
- export { Enhancement } from "./Enhancement";
@@ -1,4 +0,0 @@
1
- import { IServiceConfigs, IServiceConfigurate } from "atomservicescore";
2
- export declare const ServiceConfigurateFactory: {
3
- create: (configs: IServiceConfigs) => IServiceConfigurate;
4
- };
@@ -1,4 +0,0 @@
1
- import { IIdentifier, IServiceIdentifier } from "atomservicescore";
2
- export declare const ServiceIdentifierFactory: {
3
- create: (identifier: IIdentifier, type: string) => IServiceIdentifier;
4
- };
@@ -1,8 +0,0 @@
1
- export declare const Factories: {
2
- ServiceConfigurateFactory: {
3
- create: (configs: import("atomservicescore").IServiceConfigs) => import("atomservicescore").IServiceConfigurate;
4
- };
5
- ServiceIdentifierFactory: {
6
- create: (identifier: import("atomservicescore").IIdentifier<any, any>, type: string) => import("atomservicescore").IServiceIdentifier<any, any>;
7
- };
8
- };
@@ -1 +0,0 @@
1
- export { Factories } from "./Factories";
@@ -1,6 +0,0 @@
1
- import { IEvent, IEventHandler } from "atomservicescore";
2
- export interface IEventHandlers {
3
- type: () => string;
4
- resolve: (event: IEvent) => IEventHandler;
5
- forEach: (callback: (handler: IEventHandler) => void) => number;
6
- }
@@ -1,3 +0,0 @@
1
- import { IEventHandler } from "atomservicescore";
2
- import { IEventHandlers } from "./IEventHandlers";
3
- export declare const composeEventHandlers: (...eventHandlers: IEventHandler[]) => (type: string) => IEventHandlers;
@@ -1,2 +0,0 @@
1
- export { composeEventHandlers } from "./composeEventHandlers";
2
- export { IEventHandlers } from "./IEventHandlers";
@@ -1,58 +0,0 @@
1
- export declare const ComposeDuplicatedCommandHandlers = "ComposeDuplicatedCommandHandlers";
2
- export declare const ComposeDuplicatedEventHandlers = "ComposeDuplicatedEventHandlers";
3
- export declare const ComposeDuplicatedStateHandlers = "ComposeDuplicatedStateHandlers";
4
- export declare const CombineDuplicatedCommandDispatchers = "CombineDuplicatedCommandDispatchers";
5
- export declare const CombineInvalidScopeCommandDispatchers = "CombineInvalidScopeCommandDispatchers";
6
- export declare const EventVersionConflictedConcurrent = "EventVersionConflictedConcurrent";
7
- export declare const CurrentVersionQueryingError = "CurrentVersionQueryingError";
8
- export declare const EventStoringError = "EventStoringError";
9
- export declare const EventPublishingError = "EventPublishingError";
10
- export declare const NotAllowedDynamicVersionError = "NotAllowedDynamicVersionError";
11
- export declare const NoEventStoresProvided = "NoEventStoresProvided";
12
- declare const _default: {
13
- "000001_ComposeDuplicatedCommandHandlers": {
14
- code: string;
15
- name: string;
16
- };
17
- "000002_ComposeDuplicatedEventHandlers": {
18
- code: string;
19
- name: string;
20
- };
21
- "000003_ComposeDuplicatedStateHandlers": {
22
- code: string;
23
- name: string;
24
- };
25
- "000004_CombineDuplicatedCommandDispatchers": {
26
- code: string;
27
- name: string;
28
- };
29
- "000005_CombineInvalidScopeCommandDispatchers": {
30
- code: string;
31
- name: string;
32
- };
33
- "000100_EventVersionConflictedConcurrent": {
34
- code: string;
35
- name: string;
36
- };
37
- "000101_CurrentVersionQueryingError": {
38
- code: string;
39
- name: string;
40
- };
41
- "000102_EventStoringError": {
42
- code: string;
43
- name: string;
44
- };
45
- "000103_EventPublishingError": {
46
- code: string;
47
- name: string;
48
- };
49
- "000108_NotAllowedDynamicVersionError": {
50
- code: string;
51
- name: string;
52
- };
53
- "000110_NoEventStoresProvided": {
54
- code: string;
55
- name: string;
56
- };
57
- };
58
- export default _default;
@@ -1,12 +0,0 @@
1
- import { IEvent } from "atomservicescore";
2
- export declare const ComposeDuplicatedCommandHandlersException: (type: string, name: string) => import("./IExtendException").IExtendException;
3
- export declare const ComposeDuplicatedEventHandlersException: (type: string, name: string) => import("./IExtendException").IExtendException;
4
- export declare const ComposeDuplicatedStateHandlersException: (type: string, name: string) => import("./IExtendException").IExtendException;
5
- export declare const CombineDuplicatedCommandDispatcherException: (type: string) => import("./IExtendException").IExtendException;
6
- export declare const CombineInvalidScopeCommandDispatcherException: (scope: string) => import("./IExtendException").IExtendException;
7
- export declare const EventVersionConflictedConcurrentException: (event: IEvent, currentVersion: number, scope: string) => import("./IExtendException").IExtendException;
8
- export declare const CurrentVersionQueryingErrorException: (error: Error, aggregateID: any, type: string, scope: string) => import("./IExtendException").IExtendException;
9
- export declare const EventStoringErrorException: (error: Error, event: IEvent, scope: string) => import("./IExtendException").IExtendException;
10
- export declare const EventPublishingErrorException: (error: Error, event: IEvent, scope: string) => import("./IExtendException").IExtendException;
11
- export declare const NotAllowedDynamicVersionErrorException: (event: IEvent, scope: string) => import("./IExtendException").IExtendException;
12
- export declare const NoEventStoresProvidedException: () => import("./IExtendException").IExtendException;
@@ -1,6 +0,0 @@
1
- import { IExtendException } from "./IExtendException";
2
- export declare class ExtendException extends Error implements IExtendException {
3
- code: string;
4
- description: string;
5
- constructor(code: string, name: string, description: string, ext?: object);
6
- }
@@ -1,7 +0,0 @@
1
- export interface IExtendException {
2
- code: string;
3
- name: string;
4
- description: string;
5
- message: string;
6
- [key: string]: any;
7
- }
@@ -1,5 +0,0 @@
1
- import { IExtendException } from "./IExtendException";
2
- export declare const createException: (composed: {
3
- code: string;
4
- name: string;
5
- }, description: string, ext?: object) => IExtendException;
@@ -1 +0,0 @@
1
- export declare const GlobalScope = "GLOBAL";
@@ -1,2 +0,0 @@
1
- import { IIdentifier } from "atomservicescore";
2
- export declare const UUIDIdentifier: IIdentifier<string, string>;
@@ -1 +0,0 @@
1
- export { UUIDIdentifier } from "./UUIDIdentifier";
@@ -1,14 +0,0 @@
1
- import { INotifyData, INotifyLog } from "atomservicescore";
2
- export declare class NotifyLog implements INotifyLog {
3
- readonly action: string;
4
- readonly level: string;
5
- readonly component: {
6
- type: string;
7
- name: string;
8
- };
9
- readonly fields: {
10
- [field: string]: any;
11
- };
12
- readonly message: string;
13
- constructor(data: INotifyData, error?: Error);
14
- }