@almadar/runtime 6.2.0 → 6.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.
@@ -1,4 +1,4 @@
1
- export { InMemoryPersistence, OrbitalServerRuntime, collectDeclaredConfigDefaults, createOrbitalServerRuntime } from './chunk-P3WRK4G3.js';
1
+ export { InMemoryPersistence, OrbitalServerRuntime, collectDeclaredConfigDefaults, createOrbitalServerRuntime } from './chunk-E2YFJ6YP.js';
2
2
  import './chunk-PZ5AY32C.js';
3
3
  //# sourceMappingURL=OrbitalServerRuntime.js.map
4
4
  //# sourceMappingURL=OrbitalServerRuntime.js.map
@@ -1208,6 +1208,7 @@ var EffectExecutor = class {
1208
1208
  this.bindings.entity = {};
1209
1209
  }
1210
1210
  this.bindings.entity[field] = value;
1211
+ this.handlers.set(entityId ?? "", field, value);
1211
1212
  this.emitSuccess(emitCfg, "success", value);
1212
1213
  break;
1213
1214
  }
@@ -4688,6 +4689,23 @@ var OrbitalServerRuntime = class {
4688
4689
  action,
4689
4690
  params
4690
4691
  );
4692
+ } else if (this.config.mode === "mock") {
4693
+ const mockId = `mock_${service}_${action}_${Math.random().toString(36).slice(2, 10)}`;
4694
+ const paramsEcho = {};
4695
+ if (params) {
4696
+ for (const [k, v] of Object.entries(params)) {
4697
+ if (v !== void 0 && (typeof v === "string" || typeof v === "number" || typeof v === "boolean" || v === null || v instanceof Date)) {
4698
+ paramsEcho[k] = v;
4699
+ }
4700
+ }
4701
+ }
4702
+ result = {
4703
+ id: mockId,
4704
+ clientSecret: `secret_${mockId}`,
4705
+ success: true,
4706
+ status: "succeeded",
4707
+ ...paramsEcho
4708
+ };
4691
4709
  } else {
4692
4710
  console.warn(
4693
4711
  `[OrbitalRuntime] call-service not configured: ${service}.${action}`
@@ -5372,5 +5390,5 @@ function buildMatcher(src, listenerOrbital) {
5372
5390
  }
5373
5391
 
5374
5392
  export { EffectExecutor, EventBus, HANDLER_MANIFEST, InMemoryPersistence, MockPersistenceAdapter, OrbitalServerRuntime, StateMachineManager, buildEmitsFromTraits, collectDeclaredConfigDefaults, containsBindings, createContextFromBindings, createInitialTraitState, createLogger, createMockPersistence, createOrbitalServerRuntime, createTestExecutor, createUnifiedLoader, extractBindings, findInitialState, findTransition, formatPayloadValidationError, getIsolatedCollectionName, getNamespacedEvent, interpolateProps, interpolateValue, isBrowser, isElectron, isNamespacedEvent, isNode, normalizeEventKey, parseNamespacedEvent, preprocessSchema, processEvent, validateEventPayload, validatePayloadShapes };
5375
- //# sourceMappingURL=chunk-P3WRK4G3.js.map
5376
- //# sourceMappingURL=chunk-P3WRK4G3.js.map
5393
+ //# sourceMappingURL=chunk-E2YFJ6YP.js.map
5394
+ //# sourceMappingURL=chunk-E2YFJ6YP.js.map