@almadar/runtime 3.0.2 → 3.1.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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EventBus, createUnifiedLoader, preprocessSchema, StateMachineManager, createContextFromBindings, EffectExecutor } from './chunk-
|
|
1
|
+
import { EventBus, createUnifiedLoader, preprocessSchema, StateMachineManager, createContextFromBindings, EffectExecutor } from './chunk-GU35X5AW.js';
|
|
2
2
|
import './chunk-PZ5AY32C.js';
|
|
3
3
|
import { Router } from 'express';
|
|
4
4
|
import * as fs from 'fs';
|
|
@@ -943,9 +943,14 @@ var OrbitalServerRuntime = class {
|
|
|
943
943
|
}
|
|
944
944
|
}
|
|
945
945
|
}
|
|
946
|
+
const raw = event.payload;
|
|
947
|
+
const mapped = mappedPayload;
|
|
948
|
+
const pickId = (field) => mapped?.[field] ?? raw?.[field];
|
|
949
|
+
const forwardedEntityId = pickId("entityId") ?? pickId("orbitalName");
|
|
946
950
|
await this.processOrbitalEvent(orbitalName, {
|
|
947
951
|
event: listener.triggers,
|
|
948
|
-
payload: mappedPayload
|
|
952
|
+
payload: mappedPayload,
|
|
953
|
+
entityId: forwardedEntityId
|
|
949
954
|
});
|
|
950
955
|
});
|
|
951
956
|
this.listenerCleanups.push(cleanup);
|