@koalarx/nest 3.1.32 → 3.1.34
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.
|
@@ -9,9 +9,10 @@ export declare class EventQueue {
|
|
|
9
9
|
static register(callback: EventJobCallback, handlerClassName: string, eventClassName: string): void;
|
|
10
10
|
static clearHandlers(): void;
|
|
11
11
|
static clearMarkedAggregates(): void;
|
|
12
|
+
static findMarkedAggregateByID(id: IComparableId): EventJob<any> | undefined;
|
|
13
|
+
static getMarkedAggregates(): EventJob<any>[];
|
|
12
14
|
private static dispatchAggregateEvents;
|
|
13
15
|
private static removeAggregateFromMarkedDispatchList;
|
|
14
|
-
private static findMarkedAggregateByID;
|
|
15
16
|
private static dispatch;
|
|
16
17
|
}
|
|
17
18
|
export {};
|
|
@@ -34,6 +34,12 @@ class EventQueue {
|
|
|
34
34
|
static clearMarkedAggregates() {
|
|
35
35
|
this.markedAggregates = [];
|
|
36
36
|
}
|
|
37
|
+
static findMarkedAggregateByID(id) {
|
|
38
|
+
return this.markedAggregates.find((aggregate) => aggregate._id === id);
|
|
39
|
+
}
|
|
40
|
+
static getMarkedAggregates() {
|
|
41
|
+
return this.markedAggregates;
|
|
42
|
+
}
|
|
37
43
|
static dispatchAggregateEvents(aggregate) {
|
|
38
44
|
aggregate.eventQueue.forEach((event) => this.dispatch(event));
|
|
39
45
|
}
|
|
@@ -41,9 +47,6 @@ class EventQueue {
|
|
|
41
47
|
const index = this.markedAggregates.findIndex((a) => a._id === aggregate._id);
|
|
42
48
|
this.markedAggregates.splice(index, 1);
|
|
43
49
|
}
|
|
44
|
-
static findMarkedAggregateByID(id) {
|
|
45
|
-
return this.markedAggregates.find((aggregate) => aggregate._id === id);
|
|
46
|
-
}
|
|
47
50
|
static dispatch(event) {
|
|
48
51
|
const eventJobHandlers = this.markedAggregates.find((a) => a.eventQueue.find((e) => e === event));
|
|
49
52
|
const eventHandler = Object.keys(this.handlersMap).find((handlerName) => eventJobHandlers
|
|
@@ -325,7 +325,10 @@ class RepositoryBase {
|
|
|
325
325
|
getSourceByName: (sourceName) => auto_mapping_list_1.AutoMappingList.getSourceByName(sourceName),
|
|
326
326
|
getListEntityType: (sourceEntity, propName) => {
|
|
327
327
|
const list = new sourceEntity()[propName];
|
|
328
|
-
|
|
328
|
+
if (list instanceof list_1.List) {
|
|
329
|
+
return list.entityType;
|
|
330
|
+
}
|
|
331
|
+
return null;
|
|
329
332
|
},
|
|
330
333
|
getIdOnEntity: (currentEntity, value) => this.getIdOnEntity(currentEntity, value),
|
|
331
334
|
createEntity: (sourceEntity) => new sourceEntity(),
|