@nestjs/cqrs 8.0.4 → 9.0.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.
package/dist/command-bus.js
CHANGED
|
@@ -37,7 +37,7 @@ let CommandBus = class CommandBus extends observable_bus_1.ObservableBus {
|
|
|
37
37
|
if (!handler) {
|
|
38
38
|
throw new command_not_found_exception_1.CommandHandlerNotFoundException(commandId);
|
|
39
39
|
}
|
|
40
|
-
this.
|
|
40
|
+
this._publisher.publish(command);
|
|
41
41
|
return handler.execute(command);
|
|
42
42
|
}
|
|
43
43
|
bind(handler, id) {
|
|
@@ -17,7 +17,7 @@ const uuid_1 = require("uuid");
|
|
|
17
17
|
const EventsHandler = (...events) => {
|
|
18
18
|
return (target) => {
|
|
19
19
|
events.forEach((event) => {
|
|
20
|
-
if (!Reflect.
|
|
20
|
+
if (!Reflect.hasOwnMetadata(constants_1.EVENT_METADATA, event)) {
|
|
21
21
|
Reflect.defineMetadata(constants_1.EVENT_METADATA, { id: (0, uuid_1.v4)() }, event);
|
|
22
22
|
}
|
|
23
23
|
});
|
package/dist/event-bus.js
CHANGED
|
@@ -53,7 +53,7 @@ let EventBus = EventBus_1 = class EventBus extends utils_1.ObservableBus {
|
|
|
53
53
|
bind(handler, id) {
|
|
54
54
|
const stream$ = id ? this.ofEventId(id) : this.subject$;
|
|
55
55
|
const subscription = stream$
|
|
56
|
-
.pipe((0, operators_1.mergeMap)((event) => (0, rxjs_1.from)(handler.handle(event))))
|
|
56
|
+
.pipe((0, operators_1.mergeMap)((event) => (0, rxjs_1.from)(Promise.resolve(handler.handle(event)))))
|
|
57
57
|
.subscribe({
|
|
58
58
|
error: (error) => {
|
|
59
59
|
this._logger.error(`"${handler.constructor.name}" has thrown an error.`, error);
|
package/dist/query-bus.js
CHANGED
|
@@ -47,7 +47,7 @@ let QueryBus = class QueryBus extends observable_bus_1.ObservableBus {
|
|
|
47
47
|
if (!handler) {
|
|
48
48
|
throw new exceptions_1.QueryHandlerNotFoundException(queryId);
|
|
49
49
|
}
|
|
50
|
-
this.
|
|
50
|
+
this._publisher.publish(query);
|
|
51
51
|
const result = yield handler.execute(query);
|
|
52
52
|
return result;
|
|
53
53
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nestjs/cqrs",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "9.0.1",
|
|
4
4
|
"description": "A lightweight CQRS module for Nest framework (node.js)",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"url": "https://github.com/nestjs/cqrs#readme",
|
|
@@ -20,30 +20,30 @@
|
|
|
20
20
|
"uuid": "8.3.2"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"@commitlint/cli": "
|
|
24
|
-
"@commitlint/config-angular": "
|
|
25
|
-
"@nestjs/common": "
|
|
26
|
-
"@nestjs/core": "
|
|
27
|
-
"@types/node": "16.11.
|
|
28
|
-
"@types/jest": "
|
|
29
|
-
"@typescript-eslint/eslint-plugin": "5.
|
|
30
|
-
"@typescript-eslint/parser": "5.
|
|
31
|
-
"eslint": "8.
|
|
23
|
+
"@commitlint/cli": "17.0.3",
|
|
24
|
+
"@commitlint/config-angular": "17.0.3",
|
|
25
|
+
"@nestjs/common": "9.0.1",
|
|
26
|
+
"@nestjs/core": "9.0.1",
|
|
27
|
+
"@types/node": "16.11.43",
|
|
28
|
+
"@types/jest": "28.1.4",
|
|
29
|
+
"@typescript-eslint/eslint-plugin": "5.30.5",
|
|
30
|
+
"@typescript-eslint/parser": "5.30.5",
|
|
31
|
+
"eslint": "8.19.0",
|
|
32
32
|
"eslint-config-prettier": "8.5.0",
|
|
33
33
|
"eslint-plugin-import": "2.26.0",
|
|
34
|
-
"husky": "
|
|
35
|
-
"jest": "28.
|
|
36
|
-
"lint-staged": "
|
|
37
|
-
"prettier": "2.
|
|
34
|
+
"husky": "8.0.1",
|
|
35
|
+
"jest": "28.1.2",
|
|
36
|
+
"lint-staged": "13.0.3",
|
|
37
|
+
"prettier": "2.7.1",
|
|
38
38
|
"reflect-metadata": "0.1.13",
|
|
39
|
-
"release-it": "15.
|
|
39
|
+
"release-it": "15.1.1",
|
|
40
40
|
"rxjs": "7.5.5",
|
|
41
|
-
"ts-jest": "28.0.
|
|
42
|
-
"typescript": "4.
|
|
41
|
+
"ts-jest": "28.0.5",
|
|
42
|
+
"typescript": "4.7.4"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
|
-
"@nestjs/common": "^
|
|
46
|
-
"@nestjs/core": "^
|
|
45
|
+
"@nestjs/common": "^9.0.0",
|
|
46
|
+
"@nestjs/core": "^9.0.0",
|
|
47
47
|
"reflect-metadata": "0.1.13",
|
|
48
48
|
"rxjs": "^7.2.0"
|
|
49
49
|
},
|