@almadar/runtime 4.5.0 → 4.7.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.
@@ -1070,8 +1070,20 @@ var EffectExecutor = class {
1070
1070
  emitCfg = this.extractEmitConfig(args[2]);
1071
1071
  entityId = typeof entity?.["id"] === "string" ? entity["id"] : void 0;
1072
1072
  if (!entityId) {
1073
- effectLog.warn("set:missing-entity-id", { path });
1074
- break;
1073
+ const payload = this.bindings.payload;
1074
+ const payloadId = payload && typeof payload === "object" && "id" in payload ? payload.id : void 0;
1075
+ if (typeof payloadId === "string") {
1076
+ entityId = payloadId;
1077
+ if (!entity) {
1078
+ this.bindings.entity = { id: payloadId };
1079
+ } else {
1080
+ entity["id"] = payloadId;
1081
+ }
1082
+ effectLog.debug("set:auto-seed-entity-id", { path, id: payloadId });
1083
+ } else {
1084
+ effectLog.warn("set:missing-entity-id", { path });
1085
+ break;
1086
+ }
1075
1087
  }
1076
1088
  } else {
1077
1089
  entityId = args[0];
@@ -2832,5 +2844,5 @@ function parseNamespacedEvent(eventName) {
2832
2844
  }
2833
2845
 
2834
2846
  export { EffectExecutor, EventBus, HANDLER_MANIFEST, StateMachineManager, containsBindings, createContextFromBindings, createInitialTraitState, createTestExecutor, createUnifiedLoader, extractBindings, findInitialState, findTransition, getIsolatedCollectionName, getNamespacedEvent, interpolateProps, interpolateValue, isBrowser, isElectron, isNamespacedEvent, isNode, normalizeEventKey, parseNamespacedEvent, preprocessSchema, processEvent };
2835
- //# sourceMappingURL=chunk-32BOI7LH.js.map
2836
- //# sourceMappingURL=chunk-32BOI7LH.js.map
2847
+ //# sourceMappingURL=chunk-K36736GF.js.map
2848
+ //# sourceMappingURL=chunk-K36736GF.js.map