atomservices 0.10.0-alpha.8 → 1.0.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintignore +0 -0
- package/.eslintrc.json +17 -0
- package/lib/Commands/combineCommandDispatchers.js +5 -4
- package/lib/Commands/combineCommandDispatchers.js.map +1 -1
- package/lib/Commands/composeCommandHandlers.js +3 -2
- package/lib/Commands/composeCommandHandlers.js.map +1 -1
- package/lib/Commands/index.js +1 -0
- package/lib/Commands/index.js.map +1 -1
- package/lib/Containers/composeContainerInitializer.js +34 -0
- package/lib/Containers/composeContainerInitializer.js.map +1 -0
- package/lib/Containers/createContainer.js +19 -20
- package/lib/Containers/createContainer.js.map +1 -1
- package/lib/Containers/index.js +3 -2
- package/lib/Containers/index.js.map +1 -1
- package/lib/Context/Factories/ServiceConfigurateFactory.js +3 -3
- package/lib/Context/Factories/ServiceConfigurateFactory.js.map +1 -1
- package/lib/Context/index.js +1 -0
- package/lib/Context/index.js.map +1 -1
- package/lib/Events/composeEventHandlers.js +3 -2
- package/lib/Events/composeEventHandlers.js.map +1 -1
- package/lib/Events/index.js +1 -0
- package/lib/Events/index.js.map +1 -1
- package/lib/Exceptions/Constants.js +7 -3
- package/lib/Exceptions/Constants.js.map +1 -1
- package/lib/Exceptions/Core.js +31 -12
- package/lib/Exceptions/Core.js.map +1 -1
- package/lib/Exceptions/ExtendException.js +2 -0
- package/lib/Exceptions/ExtendException.js.map +1 -1
- package/lib/Exceptions/createException.js +2 -1
- package/lib/Exceptions/createException.js.map +1 -1
- package/lib/Identifiers/UUIDIdentifier.js +0 -1
- package/lib/Identifiers/UUIDIdentifier.js.map +1 -1
- package/lib/Identifiers/index.js +1 -0
- package/lib/Identifiers/index.js.map +1 -1
- package/lib/Notifiers/NotifyLog.js +13 -0
- package/lib/Notifiers/NotifyLog.js.map +1 -1
- package/lib/Notifiers/NotifyObject.js +14 -0
- package/lib/Notifiers/NotifyObject.js.map +1 -1
- package/lib/Notifiers/composeNotifiers.js +2 -1
- package/lib/Notifiers/composeNotifiers.js.map +1 -1
- package/lib/Notifiers/data/ContainersNotifyData.js +2 -2
- package/lib/Notifiers/data/ContainersNotifyData.js.map +1 -1
- package/lib/Notifiers/data/ServicesNotifyData.js +12 -10
- package/lib/Notifiers/data/ServicesNotifyData.js.map +1 -1
- package/lib/Notifiers/data/common/ServicesData.js +10 -8
- package/lib/Notifiers/data/common/ServicesData.js.map +1 -1
- package/lib/Notifiers/data/common/composeNotifyData.js +3 -1
- package/lib/Notifiers/data/common/composeNotifyData.js.map +1 -1
- package/lib/Notifiers/data/common/index.js +1 -0
- package/lib/Notifiers/data/common/index.js.map +1 -1
- package/lib/Notifiers/data/index.js +1 -0
- package/lib/Notifiers/data/index.js.map +1 -1
- package/lib/Notifiers/index.js +1 -0
- package/lib/Notifiers/index.js.map +1 -1
- package/lib/Reactions/composeReactions.js +2 -1
- package/lib/Reactions/composeReactions.js.map +1 -1
- package/lib/Reactions/index.js +1 -0
- package/lib/Reactions/index.js.map +1 -1
- package/lib/SFComponents/common/ObjectRefiner.js +24 -0
- package/lib/SFComponents/common/ObjectRefiner.js.map +1 -0
- package/lib/SFComponents/common/typeOfValue.js +23 -0
- package/lib/SFComponents/common/typeOfValue.js.map +1 -0
- package/lib/SFComponents/createSFComponents.js +24 -12
- package/lib/SFComponents/createSFComponents.js.map +1 -1
- package/lib/SFComponents/index.js +1 -0
- package/lib/SFComponents/index.js.map +1 -1
- package/lib/Services/core/MetadataRefiner.js +13 -19
- package/lib/Services/core/MetadataRefiner.js.map +1 -1
- package/lib/Services/core/composeEventProcess.js +8 -7
- package/lib/Services/core/composeEventProcess.js.map +1 -1
- package/lib/Services/core/composeEventReactions.js +9 -10
- package/lib/Services/core/composeEventReactions.js.map +1 -1
- package/lib/Services/core/composeEventResulting.js +2 -1
- package/lib/Services/core/composeEventResulting.js.map +1 -1
- package/lib/Services/core/composeServiceContext.js +35 -26
- package/lib/Services/core/composeServiceContext.js.map +1 -1
- package/lib/Services/core/connectStream/connectStream.js +6 -5
- package/lib/Services/core/connectStream/connectStream.js.map +1 -1
- package/lib/Services/core/connectStream/index.js +1 -0
- package/lib/Services/core/connectStream/index.js.map +1 -1
- package/lib/Services/core/connectStream/mapHandlersEvents.js +2 -1
- package/lib/Services/core/connectStream/mapHandlersEvents.js.map +1 -1
- package/lib/Services/core/connectStream/mapReactionsEvents.js +2 -1
- package/lib/Services/core/connectStream/mapReactionsEvents.js.map +1 -1
- package/lib/Services/core/createCommandDispatcher.js +9 -5
- package/lib/Services/core/createCommandDispatcher.js.map +1 -1
- package/lib/Services/core/index.js +1 -0
- package/lib/Services/core/index.js.map +1 -1
- package/lib/Services/core/operateEventProcess.js +52 -20
- package/lib/Services/core/operateEventProcess.js.map +1 -1
- package/lib/Services/createService.js +12 -11
- package/lib/Services/createService.js.map +1 -1
- package/lib/Services/index.js +1 -0
- package/lib/Services/index.js.map +1 -1
- package/lib/States/composeStateApplier.js +3 -2
- package/lib/States/composeStateApplier.js.map +1 -1
- package/lib/States/composeStateHandlers.js +4 -3
- package/lib/States/composeStateHandlers.js.map +1 -1
- package/lib/States/index.js +1 -0
- package/lib/States/index.js.map +1 -1
- package/lib/Streams/LocalEventStream.js +9 -9
- package/lib/Streams/LocalEventStream.js.map +1 -1
- package/lib/Streams/index.js +1 -0
- package/lib/Streams/index.js.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/package.json +11 -11
- package/typings/Commands/ICommandDispatcher.d.ts +2 -2
- package/typings/Commands/ICommandDispatchers.d.ts +2 -2
- package/typings/Containers/composeContainerInitializer.d.ts +4 -0
- package/typings/Containers/createContainer.d.ts +2 -4
- package/typings/Containers/index.d.ts +1 -2
- package/typings/Exceptions/Constants.d.ts +12 -2
- package/typings/Exceptions/Core.d.ts +3 -1
- package/typings/Notifiers/NotifyLog.d.ts +4 -1
- package/typings/Notifiers/NotifyObject.d.ts +4 -1
- package/typings/Notifiers/data/ContainersNotifyData.d.ts +4 -0
- package/typings/Notifiers/data/ServicesNotifyData.d.ts +34 -0
- package/typings/Notifiers/data/common/ServicesData.d.ts +2 -0
- package/typings/Notifiers/data/common/composeNotifyData.d.ts +2 -0
- package/typings/SFComponents/common/ObjectRefiner.d.ts +7 -0
- package/typings/SFComponents/common/typeOfValue.d.ts +1 -0
- package/typings/SFComponents/createSFComponents.d.ts +4 -4
- package/typings/Services/core/MetadataRefiner.d.ts +2 -10
- package/typings/Services/core/composeServiceContext.d.ts +3 -2
- package/typings/States/IStateHandlers.d.ts +1 -1
- package/typings/index.d.ts +1 -1
- package/RELEASES.md +0 -1
- package/lib/Containers/Enhancement.js +0 -3
- package/lib/Containers/Enhancement.js.map +0 -1
- package/lib/Containers/IManagedServiceContainerResult.js +0 -4
- package/lib/Containers/IManagedServiceContainerResult.js.map +0 -1
- package/lib/Containers/createContainerCompose.js +0 -11
- package/lib/Containers/createContainerCompose.js.map +0 -1
- package/typings/Containers/Enhancement.d.ts +0 -3
- package/typings/Containers/IManagedServiceContainerResult.d.ts +0 -5
- package/typings/Containers/createContainerCompose.d.ts +0 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"composeStateHandlers.js","sourceRoot":"","sources":["../../src/States/composeStateHandlers.ts"],"names":[],"mappings":";;;AACA,6CAA6E;
|
|
1
|
+
{"version":3,"file":"composeStateHandlers.js","sourceRoot":"","sources":["../../src/States/composeStateHandlers.ts"],"names":[],"mappings":";;;AACA,6CAA6E;AAOtE,MAAM,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,IAAA,8CAAuC,EAAC,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;YAEzC,OAAO,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAC9B,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;AA5BT,QAAA,oBAAoB,wBA4BX;AAEtB,MAAM,CAAC,MAAM,CAAC,4BAAoB,CAAC,CAAC"}
|
package/lib/States/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.composeStateHandlers = exports.composeStateApplier = void 0;
|
|
3
4
|
var composeStateApplier_1 = require("./composeStateApplier");
|
|
4
5
|
Object.defineProperty(exports, "composeStateApplier", { enumerable: true, get: function () { return composeStateApplier_1.composeStateApplier; } });
|
|
5
6
|
var composeStateHandlers_1 = require("./composeStateHandlers");
|
package/lib/States/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/States/index.ts"],"names":[],"mappings":"
|
|
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"}
|
|
@@ -20,13 +20,13 @@ exports.LocalEventStream = Object.freeze({
|
|
|
20
20
|
StreamRegistry[Scope].push(handlers.processing);
|
|
21
21
|
const exchanges = [];
|
|
22
22
|
reactions.events.forEach((reaction) => {
|
|
23
|
-
const
|
|
24
|
-
if (StreamRegistry[
|
|
25
|
-
StreamRegistry[
|
|
23
|
+
const exchange = endpoints_1.endpoints.toExchange({ level: "Public", scope: reaction.scope, type: reaction.type });
|
|
24
|
+
if (StreamRegistry[exchange] === undefined) {
|
|
25
|
+
StreamRegistry[exchange] = [];
|
|
26
26
|
}
|
|
27
|
-
if (exchanges.indexOf(
|
|
28
|
-
StreamRegistry[
|
|
29
|
-
exchanges.push(
|
|
27
|
+
if (exchanges.indexOf(exchange) === -1) {
|
|
28
|
+
StreamRegistry[exchange].push(reactions.processes[scope]);
|
|
29
|
+
exchanges.push(exchange);
|
|
30
30
|
}
|
|
31
31
|
});
|
|
32
32
|
}
|
|
@@ -34,10 +34,10 @@ exports.LocalEventStream = Object.freeze({
|
|
|
34
34
|
publish: async ({ event, metadata, on }) => {
|
|
35
35
|
const { level, scope } = on;
|
|
36
36
|
const { type } = event;
|
|
37
|
-
const
|
|
38
|
-
if (StreamRegistry[
|
|
37
|
+
const exchange = endpoints_1.endpoints.toExchange({ level, scope, type });
|
|
38
|
+
if (StreamRegistry[exchange]) {
|
|
39
39
|
const processAck = () => { };
|
|
40
|
-
StreamRegistry[
|
|
40
|
+
StreamRegistry[exchange].forEach((stream) => stream(event, metadata, processAck));
|
|
41
41
|
}
|
|
42
42
|
},
|
|
43
43
|
subscribe: async (definition) => {
|
|
@@ -1 +1 @@
|
|
|
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;AAE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C,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;oBAC1D,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;iBAC1B;YACH,CAAC,CAAC,CAAC;SACJ;IACH,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE,EAAE,EAAE;QACzC,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC;QAC5B,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC;QACvB,MAAM,QAAQ,GAAG,qBAAS,CAAC,UAAU,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;QAE9D,IAAI,cAAc,CAAC,QAAQ,CAAC,EAAE;YAE5B,MAAM,UAAU,GAAQ,GAAG,EAAE,GAAG,CAAC,CAAC;YAClC,cAAc,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC,CAAC;SACnF;IACH,CAAC;IACD,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE;QAC9B,iBAAiB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACrC,CAAC;CACF,CAAC,CAAC"}
|
package/lib/Streams/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LocalInMemoryEventStream = exports.LocalDirectStream = void 0;
|
|
3
4
|
var LocalDirectStream_1 = require("./LocalDirectStream");
|
|
4
5
|
Object.defineProperty(exports, "LocalDirectStream", { enumerable: true, get: function () { return LocalDirectStream_1.LocalDirectStream; } });
|
|
5
6
|
var LocalInMemoryEventStream_1 = require("./LocalInMemoryEventStream");
|
package/lib/Streams/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Streams/index.ts"],"names":[],"mappings":"
|
|
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
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EventStream = exports.DispatchResult = exports.DispatchFunc = exports.GlobalScope = exports.States = exports.Services = exports.SFComponents = exports.Reactions = exports.Identifiers = exports.Events = exports.Context = exports.Containers = exports.Commands = void 0;
|
|
3
4
|
exports.Commands = require("./Commands");
|
|
4
5
|
exports.Containers = require("./Containers");
|
|
5
6
|
exports.Context = require("./Context");
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "atomservices",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0-alpha.2",
|
|
4
4
|
"description": "Providing Library Implementing Events Architecture",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"typings": "./typings/index.d.ts",
|
|
@@ -12,11 +12,11 @@
|
|
|
12
12
|
"test-cvr": "npm run cleanup && npm run test-cvr-ts",
|
|
13
13
|
"test-ts": "npm run build-ts && npm run test-all",
|
|
14
14
|
"test-cvr-ts": "npm run build-ts && npm run test-all-cvr",
|
|
15
|
-
"build-ts": "npm run
|
|
16
|
-
"build-ts-es5": "npm run
|
|
17
|
-
"build-ts-es6": "npm run
|
|
18
|
-
"
|
|
19
|
-
"
|
|
15
|
+
"build-ts": "npm run lint && tsc",
|
|
16
|
+
"build-ts-es5": "npm run lint && tsc -p _tsconfigs/es5.tsconfig.json",
|
|
17
|
+
"build-ts-es6": "npm run lint && tsc -p _tsconfigs/es6.tsconfig.json",
|
|
18
|
+
"lint": "eslint ./src --ext .ts",
|
|
19
|
+
"lint-fix": "eslint ./src --ext .ts --fix",
|
|
20
20
|
"cleanup": "node _scripts/cleanup",
|
|
21
21
|
"aftertests": "node _scripts/aftertests",
|
|
22
22
|
"test-all": "npm run test-mocha",
|
|
@@ -29,12 +29,12 @@
|
|
|
29
29
|
"license": "MIT",
|
|
30
30
|
"repository": "git+https://github.com/atomservicesjs/atom-repos",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"atomservicescore": "
|
|
33
|
-
"uuid": "8.
|
|
32
|
+
"atomservicescore": "1.0.0-alpha.2",
|
|
33
|
+
"uuid": "8.3.2"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@types/uuid": "8.
|
|
37
|
-
"archdevts": "
|
|
36
|
+
"@types/uuid": "8.3.3",
|
|
37
|
+
"archdevts": "21.12.1"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "bdac0f08bb22b947155607339d4def9f2f39a12c"
|
|
40
40
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { DispatchResult, ICommand } from "atomservicescore";
|
|
1
|
+
import { DispatchResult, ICommand, IDispatchMeta } from "atomservicescore";
|
|
2
2
|
export interface ICommandDispatcher {
|
|
3
3
|
scope: () => string;
|
|
4
4
|
type: () => string;
|
|
5
|
-
dispatch: (command: ICommand, listening?: (data: any) => void) => Promise<DispatchResult.IDispatchResult>;
|
|
5
|
+
dispatch: (command: ICommand, meta?: IDispatchMeta, listening?: (data: any) => void) => Promise<DispatchResult.IDispatchResult>;
|
|
6
6
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DispatchResult, ICommand } from "atomservicescore";
|
|
1
|
+
import { DispatchResult, ICommand, IDispatchMeta } from "atomservicescore";
|
|
2
2
|
export interface ICommandDispatchers {
|
|
3
|
-
dispatch: (type: string, command: ICommand, listening?: (data: any) => void) => Promise<DispatchResult.IDispatchResult>;
|
|
3
|
+
dispatch: (type: string, command: ICommand, meta?: IDispatchMeta, listening?: (data: any) => void) => Promise<DispatchResult.IDispatchResult>;
|
|
4
4
|
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { IServiceDispatchable, IServicesContainer, IServicesContainerInitializer } from "atomservicescore";
|
|
2
|
+
export declare const composeContainerInitializer: (container: IServicesContainer, dispatchableServices: {
|
|
3
|
+
[service: string]: IServiceDispatchable;
|
|
4
|
+
}) => IServicesContainerInitializer;
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
import { IServicesContainer } from "atomservicescore";
|
|
2
|
-
|
|
3
|
-
import { IManagedServiceContainerResult } from "./IManagedServiceContainerResult";
|
|
4
|
-
export declare const createContainer: (container: IServicesContainer, enhancement?: Enhancement<IManagedServiceContainerResult> | undefined) => IManagedServiceContainerResult;
|
|
1
|
+
import { EnhanceManagedServicesContainer, IServicesContainer } from "atomservicescore";
|
|
2
|
+
export declare const createContainer: (container: IServicesContainer, enhancement?: EnhanceManagedServicesContainer<import("atomservicescore").EnhanceManagedServicesContainerResult> | undefined) => import("atomservicescore").EnhanceManagedServicesContainerResult;
|
|
@@ -7,8 +7,10 @@ export declare const EventVersionConflictedConcurrent = "EventVersionConflictedC
|
|
|
7
7
|
export declare const CurrentVersionQueryingError = "CurrentVersionQueryingError";
|
|
8
8
|
export declare const EventStoringError = "EventStoringError";
|
|
9
9
|
export declare const EventPublishingError = "EventPublishingError";
|
|
10
|
-
export declare const
|
|
10
|
+
export declare const NotAllowedVersionEventError = "NotAllowedVersionEventError";
|
|
11
|
+
export declare const NotAllowedDynamicVersionEventError = "NotAllowedDynamicVersionEventError";
|
|
11
12
|
export declare const NoEventStoresProvided = "NoEventStoresProvided";
|
|
13
|
+
export declare const InvalidVersioningValue = "InvalidVersioningValue";
|
|
12
14
|
declare const _default: {
|
|
13
15
|
"000001_ComposeDuplicatedCommandHandlers": {
|
|
14
16
|
code: string;
|
|
@@ -46,7 +48,11 @@ declare const _default: {
|
|
|
46
48
|
code: string;
|
|
47
49
|
name: string;
|
|
48
50
|
};
|
|
49
|
-
"
|
|
51
|
+
"000107_NotAllowedVersionEventError": {
|
|
52
|
+
code: string;
|
|
53
|
+
name: string;
|
|
54
|
+
};
|
|
55
|
+
"000108_NotAllowedDynamicVersionEventError": {
|
|
50
56
|
code: string;
|
|
51
57
|
name: string;
|
|
52
58
|
};
|
|
@@ -54,5 +60,9 @@ declare const _default: {
|
|
|
54
60
|
code: string;
|
|
55
61
|
name: string;
|
|
56
62
|
};
|
|
63
|
+
"000120_InvalidVersioningValue": {
|
|
64
|
+
code: string;
|
|
65
|
+
name: string;
|
|
66
|
+
};
|
|
57
67
|
};
|
|
58
68
|
export default _default;
|
|
@@ -8,5 +8,7 @@ export declare const EventVersionConflictedConcurrentException: (event: IEvent,
|
|
|
8
8
|
export declare const CurrentVersionQueryingErrorException: (error: Error, aggregateID: any, type: string, scope: string) => import("./IExtendException").IExtendException;
|
|
9
9
|
export declare const EventStoringErrorException: (error: Error, event: IEvent, scope: string) => import("./IExtendException").IExtendException;
|
|
10
10
|
export declare const EventPublishingErrorException: (error: Error, event: IEvent, scope: string) => import("./IExtendException").IExtendException;
|
|
11
|
-
export declare const
|
|
11
|
+
export declare const NotAllowedVersioningEventErrorException: (event: IEvent, scope: string) => import("./IExtendException").IExtendException;
|
|
12
|
+
export declare const NotAllowedDynamicVersionEventErrorException: (event: IEvent, scope: string) => import("./IExtendException").IExtendException;
|
|
12
13
|
export declare const NoEventStoresProvidedException: () => import("./IExtendException").IExtendException;
|
|
14
|
+
export declare const InvalidVersioningValueException: (configs: "none" | "static", value: any) => import("./IExtendException").IExtendException;
|
|
@@ -6,9 +6,12 @@ export declare class NotifyLog implements INotifyLog {
|
|
|
6
6
|
type: string;
|
|
7
7
|
name: string;
|
|
8
8
|
};
|
|
9
|
+
readonly message: string;
|
|
9
10
|
readonly fields: {
|
|
10
11
|
[field: string]: any;
|
|
11
12
|
};
|
|
12
|
-
readonly
|
|
13
|
+
readonly meta: {
|
|
14
|
+
[key: string]: any;
|
|
15
|
+
};
|
|
13
16
|
constructor(data: INotifyData, error?: Error);
|
|
14
17
|
}
|
|
@@ -6,12 +6,15 @@ export declare class NotifyObject implements INotifyObject {
|
|
|
6
6
|
type: string;
|
|
7
7
|
name: string;
|
|
8
8
|
};
|
|
9
|
+
readonly message: string;
|
|
9
10
|
readonly fields: {
|
|
10
11
|
[field: string]: any;
|
|
11
12
|
};
|
|
12
|
-
readonly message: string;
|
|
13
13
|
readonly obj: {
|
|
14
14
|
[key: string]: any;
|
|
15
15
|
};
|
|
16
|
+
readonly meta: {
|
|
17
|
+
[key: string]: any;
|
|
18
|
+
};
|
|
16
19
|
constructor(data: INotifyData, error?: Error);
|
|
17
20
|
}
|
|
@@ -3,10 +3,14 @@ export declare const ContainersNotifyData: {
|
|
|
3
3
|
[field: string]: any;
|
|
4
4
|
} | undefined, obj?: {
|
|
5
5
|
[key: string]: any;
|
|
6
|
+
} | undefined, meta?: {
|
|
7
|
+
[key: string]: any;
|
|
6
8
|
} | undefined) => import("atomservicescore").INotifyData;
|
|
7
9
|
CONTAINER_CREATED: (name: string, fields?: {
|
|
8
10
|
[field: string]: any;
|
|
9
11
|
} | undefined, obj?: {
|
|
10
12
|
[key: string]: any;
|
|
13
|
+
} | undefined, meta?: {
|
|
14
|
+
[key: string]: any;
|
|
11
15
|
} | undefined) => import("atomservicescore").INotifyData;
|
|
12
16
|
};
|
|
@@ -3,50 +3,84 @@ export declare const ServicesNotifyData: {
|
|
|
3
3
|
[field: string]: any;
|
|
4
4
|
} | undefined, obj?: {
|
|
5
5
|
[key: string]: any;
|
|
6
|
+
} | undefined, meta?: {
|
|
7
|
+
[key: string]: any;
|
|
6
8
|
} | undefined) => import("atomservicescore").INotifyData;
|
|
7
9
|
SERVICE_COMMAND_ERROR: (name: string, fields?: {
|
|
8
10
|
[field: string]: any;
|
|
9
11
|
} | undefined, obj?: {
|
|
10
12
|
[key: string]: any;
|
|
13
|
+
} | undefined, meta?: {
|
|
14
|
+
[key: string]: any;
|
|
11
15
|
} | undefined) => import("atomservicescore").INotifyData;
|
|
12
16
|
SERVICE_COMMAND_INVALID: (name: string, fields?: {
|
|
13
17
|
[field: string]: any;
|
|
14
18
|
} | undefined, obj?: {
|
|
15
19
|
[key: string]: any;
|
|
20
|
+
} | undefined, meta?: {
|
|
21
|
+
[key: string]: any;
|
|
16
22
|
} | undefined) => import("atomservicescore").INotifyData;
|
|
17
23
|
SERVICE_COMMAND_UNHANDLED: (name: string, fields?: {
|
|
18
24
|
[field: string]: any;
|
|
19
25
|
} | undefined, obj?: {
|
|
20
26
|
[key: string]: any;
|
|
27
|
+
} | undefined, meta?: {
|
|
28
|
+
[key: string]: any;
|
|
21
29
|
} | undefined) => import("atomservicescore").INotifyData;
|
|
22
30
|
SERVICE_CONNECTED: (name: string, fields?: {
|
|
23
31
|
[field: string]: any;
|
|
24
32
|
} | undefined, obj?: {
|
|
25
33
|
[key: string]: any;
|
|
34
|
+
} | undefined, meta?: {
|
|
35
|
+
[key: string]: any;
|
|
26
36
|
} | undefined) => import("atomservicescore").INotifyData;
|
|
27
37
|
SERVICE_CREATED: (name: string, fields?: {
|
|
28
38
|
[field: string]: any;
|
|
29
39
|
} | undefined, obj?: {
|
|
30
40
|
[key: string]: any;
|
|
41
|
+
} | undefined, meta?: {
|
|
42
|
+
[key: string]: any;
|
|
31
43
|
} | undefined) => import("atomservicescore").INotifyData;
|
|
32
44
|
SERVICE_EVENT_DISPATCHED: (name: string, fields?: {
|
|
33
45
|
[field: string]: any;
|
|
34
46
|
} | undefined, obj?: {
|
|
35
47
|
[key: string]: any;
|
|
48
|
+
} | undefined, meta?: {
|
|
49
|
+
[key: string]: any;
|
|
36
50
|
} | undefined) => import("atomservicescore").INotifyData;
|
|
37
51
|
SERVICE_EVENT_HANDLED: (name: string, fields?: {
|
|
38
52
|
[field: string]: any;
|
|
39
53
|
} | undefined, obj?: {
|
|
40
54
|
[key: string]: any;
|
|
55
|
+
} | undefined, meta?: {
|
|
56
|
+
[key: string]: any;
|
|
41
57
|
} | undefined) => import("atomservicescore").INotifyData;
|
|
42
58
|
SERVICE_EVENT_REACTED: (name: string, fields?: {
|
|
43
59
|
[field: string]: any;
|
|
44
60
|
} | undefined, obj?: {
|
|
45
61
|
[key: string]: any;
|
|
62
|
+
} | undefined, meta?: {
|
|
63
|
+
[key: string]: any;
|
|
46
64
|
} | undefined) => import("atomservicescore").INotifyData;
|
|
47
65
|
SERVICE_EVENT_UNHANDLED_ERROR: (name: string, fields?: {
|
|
48
66
|
[field: string]: any;
|
|
49
67
|
} | undefined, obj?: {
|
|
50
68
|
[key: string]: any;
|
|
69
|
+
} | undefined, meta?: {
|
|
70
|
+
[key: string]: any;
|
|
71
|
+
} | undefined) => import("atomservicescore").INotifyData;
|
|
72
|
+
SERVICE_EVENT_PROCESS_ERROR: (name: string, fields?: {
|
|
73
|
+
[field: string]: any;
|
|
74
|
+
} | undefined, obj?: {
|
|
75
|
+
[key: string]: any;
|
|
76
|
+
} | undefined, meta?: {
|
|
77
|
+
[key: string]: any;
|
|
78
|
+
} | undefined) => import("atomservicescore").INotifyData;
|
|
79
|
+
SERVICE_EVENT_PROCESS_EFFECT_ERROR: (name: string, fields?: {
|
|
80
|
+
[field: string]: any;
|
|
81
|
+
} | undefined, obj?: {
|
|
82
|
+
[key: string]: any;
|
|
83
|
+
} | undefined, meta?: {
|
|
84
|
+
[key: string]: any;
|
|
51
85
|
} | undefined) => import("atomservicescore").INotifyData;
|
|
52
86
|
};
|
|
@@ -10,4 +10,6 @@ export declare const ServicesData: {
|
|
|
10
10
|
SERVICE_EVENT_HANDLED: IConstantData;
|
|
11
11
|
SERVICE_EVENT_REACTED: IConstantData;
|
|
12
12
|
SERVICE_EVENT_UNHANDLED_ERROR: IConstantData;
|
|
13
|
+
SERVICE_EVENT_PROCESS_ERROR: IConstantData;
|
|
14
|
+
SERVICE_EVENT_PROCESS_EFFECT_ERROR: IConstantData;
|
|
13
15
|
};
|
|
@@ -4,6 +4,8 @@ declare type ComposingNotifyData = (data: IConstantData) => (name: string, field
|
|
|
4
4
|
[field: string]: any;
|
|
5
5
|
}, obj?: {
|
|
6
6
|
[key: string]: any;
|
|
7
|
+
}, meta?: {
|
|
8
|
+
[key: string]: any;
|
|
7
9
|
}) => INotifyData;
|
|
8
10
|
export declare const composeNotifyData: ComposingNotifyData;
|
|
9
11
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const typeOfValue: (anyValue: any) => "string" | "number" | "bigint" | "boolean" | "symbol" | "null" | "undefined" | "object" | "function" | "date" | "array";
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import { ICommand, IEvent, ISFComponents, IServiceIdentifier, IValidationResultType, EventHandler, EventProcessType, EventStream, EventVersioning } from "atomservicescore";
|
|
3
3
|
export declare const createSFComponents: <Event_1 extends IEvent<any, any, any, any> = IEvent<any, any, any, any>, Command extends ICommand<any, any> = ICommand<Event_1["payloads"], Event_1["_createdBy"]>, ProcessResult = any>(structure: {
|
|
4
4
|
configs?: {
|
|
5
|
-
level?:
|
|
6
|
-
processType?:
|
|
7
|
-
versioning?:
|
|
5
|
+
level?: EventStream.StreamLevel | undefined;
|
|
6
|
+
processType?: EventProcessType | undefined;
|
|
7
|
+
versioning?: EventVersioning | undefined;
|
|
8
8
|
} | undefined;
|
|
9
9
|
event: {
|
|
10
10
|
name: string;
|
|
@@ -17,6 +17,6 @@ export declare const createSFComponents: <Event_1 extends IEvent<any, any, any,
|
|
|
17
17
|
transform?: ((command: Command, identifier: IServiceIdentifier<Event_1["aggregateID"], Event_1["_id"]>) => Event_1) | undefined;
|
|
18
18
|
} | undefined;
|
|
19
19
|
state?: {
|
|
20
|
-
apply
|
|
20
|
+
apply: (event: Event_1) => Promise<any>;
|
|
21
21
|
} | undefined;
|
|
22
22
|
}) => ISFComponents<Event_1, Command, any>;
|
|
@@ -1,13 +1,5 @@
|
|
|
1
1
|
import { EventStream } from "atomservicescore";
|
|
2
2
|
export declare const MetadataRefiner: {
|
|
3
|
-
consume: (metadata: EventStream.IStreamMetadata) => EventStream.IStreamMetadata
|
|
4
|
-
|
|
5
|
-
};
|
|
6
|
-
dispatch: (metadata: EventStream.IStreamMetadata) => EventStream.IStreamMetadata & {
|
|
7
|
-
__: {
|
|
8
|
-
dispatch: {
|
|
9
|
-
time: number;
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
};
|
|
3
|
+
consume: (metadata: EventStream.IStreamMetadata) => EventStream.IStreamMetadata;
|
|
4
|
+
dispatch: (metadata: EventStream.IStreamMetadata) => EventStream.IStreamMetadata;
|
|
13
5
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { IEvent, IServiceContext, IServiceDefinition } from "atomservicescore";
|
|
2
2
|
export declare const isEventVersionDefined: (event: IEvent) => boolean | 0 | undefined;
|
|
3
|
-
export declare const composeServiceContext: (definition: IServiceDefinition) => (
|
|
4
|
-
|
|
3
|
+
export declare const composeServiceContext: (definition: IServiceDefinition) => (metadata: {
|
|
4
|
+
[key: string]: any;
|
|
5
|
+
isReplay: boolean;
|
|
5
6
|
}) => IServiceContext;
|
package/typings/index.d.ts
CHANGED
|
@@ -8,4 +8,4 @@ export * as SFComponents from "./SFComponents";
|
|
|
8
8
|
export * as Services from "./Services";
|
|
9
9
|
export * as States from "./States";
|
|
10
10
|
export { GlobalScope } from "./GlobalScope";
|
|
11
|
-
export { DispatchFunc, DispatchResult, EventStream, IAtomCommand, IAtomEvent, IAtomState, ICommand, ICommandHandler, IEvent, IEventHandler, IReaction, IEventStores, IEventStream, IIdentifier, IManagedService,
|
|
11
|
+
export { DispatchFunc, DispatchResult, EventStream, IAtomCommand, IAtomEvent, IAtomState, ICommand, ICommandHandler, IEvent, IEventHandler, IReaction, IEventStores, IEventStream, IIdentifier, IManagedService, IManagedServicesContainer, INotifier, INotifyLog, INotifyObject, ISFComponents, IService, IServicesContainer, IServiceConfigs, IServiceConfigurate, IServiceContext, IServiceDefinition, IServiceIdentifier, IServiceStreamDefinition, IState, IStateApplier, IStateHandler, IValidationResultType, } from "atomservicescore";
|
package/RELEASES.md
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
v.0.9.x
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Enhancement.js","sourceRoot":"","sources":["../../src/Containers/Enhancement.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IManagedServiceContainerResult.js","sourceRoot":"","sources":["../../src/Containers/IManagedServiceContainerResult.ts"],"names":[],"mappings":";;AAKC,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createContainerCompose = void 0;
|
|
4
|
-
const createContainer_1 = require("./createContainer");
|
|
5
|
-
exports.createContainerCompose = (container, enhancement) => {
|
|
6
|
-
return async (compose) => {
|
|
7
|
-
const composed = await compose(container);
|
|
8
|
-
return createContainer_1.createContainer(composed, enhancement);
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
//# sourceMappingURL=createContainerCompose.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createContainerCompose.js","sourceRoot":"","sources":["../../src/Containers/createContainerCompose.ts"],"names":[],"mappings":";;;AACA,uDAAoD;AAMvC,QAAA,sBAAsB,GAAG,CAAC,SAA6B,EAAE,WAAyB,EAAE,EAAE;IACjG,OAAO,KAAK,EAAE,OAAgC,EAAqE,EAAE;QACnH,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,SAAS,CAAC,CAAC;QAE1C,OAAO,iCAAe,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC;IAChD,CAAC,CAAA;AACH,CAAC,CAAC"}
|
|
@@ -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 { 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>>;
|