@rayondigital/nest-dapr 0.9.51 → 0.9.52
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export interface DaprActorOnEventMetadata<T> {
|
|
2
2
|
event: DaprActorEventType;
|
|
3
|
-
actorId: (payload: T) => string | string[];
|
|
3
|
+
actorId: (payload: T) => string | string[] | undefined;
|
|
4
4
|
ignoreErrors?: boolean;
|
|
5
5
|
}
|
|
6
6
|
export type DaprActorEventType = string | symbol | string[] | symbol[];
|
|
7
|
-
export declare function DaprActorOnEvent<T>(event: DaprActorEventType, actorId: (payload: T) => string | string[], ignoreErrors?: boolean): MethodDecorator;
|
|
7
|
+
export declare function DaprActorOnEvent<T>(event: DaprActorEventType, actorId: (payload: T) => string | string[] | undefined, ignoreErrors?: boolean): MethodDecorator;
|
|
@@ -70,9 +70,15 @@ let DaprEventSubscriberLoader = class DaprEventSubscriberLoader {
|
|
|
70
70
|
var _a;
|
|
71
71
|
try {
|
|
72
72
|
let actorIds = eventMetadata.actorId(data);
|
|
73
|
+
if (actorIds === undefined) {
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
73
76
|
if (!Array.isArray(actorIds)) {
|
|
74
77
|
actorIds = [actorIds];
|
|
75
78
|
}
|
|
79
|
+
if (actorIds.length === 0) {
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
76
82
|
for (const id of actorIds) {
|
|
77
83
|
const actorType = (_a = actorMetadata.interfaceType.name) !== null && _a !== void 0 ? _a : actorMetadata.interfaceType.constructor.name;
|
|
78
84
|
const actor = this.actorClient.getActorByTypeName(actorType, id);
|
package/package.json
CHANGED