ddd-node 16.2.0 → 16.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -14,7 +14,7 @@ export declare class StateAggregateBase<P extends Props> extends AggregateBase<P
|
|
|
14
14
|
events(): AnyEvent[];
|
|
15
15
|
protected recordEvent<E extends AnyEvent>(event: E): void;
|
|
16
16
|
protected recordEvent<E extends AnyEvent>(eventClass: EventClass<E>, props: PropsOf<E>): void;
|
|
17
|
-
publishEvents(eventPublisher: IEventPublisher): void
|
|
17
|
+
publishEvents(eventPublisher: IEventPublisher): Promise<void>;
|
|
18
18
|
clearEvents(): void;
|
|
19
19
|
}
|
|
20
20
|
export type AnyStateAggregate = StateAggregateBase<Props>;
|
|
@@ -32,8 +32,8 @@ class StateAggregateBase extends base_1.AggregateBase {
|
|
|
32
32
|
}
|
|
33
33
|
this._events.push(event);
|
|
34
34
|
}
|
|
35
|
-
publishEvents(eventPublisher) {
|
|
36
|
-
eventPublisher.publishAll(this.events());
|
|
35
|
+
async publishEvents(eventPublisher) {
|
|
36
|
+
await eventPublisher.publishAll(this.events());
|
|
37
37
|
this.clearEvents();
|
|
38
38
|
}
|
|
39
39
|
clearEvents() {
|
package/dist/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"ddd-node","version":"16.
|
|
1
|
+
{"name":"ddd-node","version":"16.3.0","description":"Domain Driven Design base for NodeJs","type":"commonjs","main":"index.js","types":"index.d.ts","files":["dist"],"repository":{"type":"git","url":"https://github.com/nqd881/ddd-node"},"keywords":["ddd","ddd-node","ddd-base","ddd-ts","ddd-js"],"author":"Quoc Dai","license":"ISC","devDependencies":{"@types/chai":"^4.3.16","@types/lodash":"^4.14.200","@types/mocha":"^10.0.6","@types/uuid":"^9.0.6","chai":"^5.1.1","chai-deep-match":"^1.2.1","ddd-node":"file:dist","mocha":"^10.4.0","ts-node":"^10.9.1","tsconfig-paths":"^4.2.0","typescript":"^5.2.2"},"dependencies":{"lodash":"^4.17.21","nodejs-snowflake":"^2.0.1","reflect-metadata":"^0.1.13","tsc-alias":"^1.8.8","type-fest":"^4.15.0","uuid":"^9.0.1"}}
|