@almadar/runtime 5.8.6 → 5.8.7

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-GYPBWCOD.js';
1
+ export { InMemoryPersistence, OrbitalServerRuntime, collectDeclaredConfigDefaults, createOrbitalServerRuntime } from './chunk-7SMGB3XY.js';
2
2
  import './chunk-PZ5AY32C.js';
3
3
  //# sourceMappingURL=OrbitalServerRuntime.js.map
4
4
  //# sourceMappingURL=OrbitalServerRuntime.js.map
@@ -4651,6 +4651,24 @@ var OrbitalServerRuntime = class {
4651
4651
  }
4652
4652
  } else {
4653
4653
  let entities = await this.persistence.list(fetchEntityType);
4654
+ if (options?.filter !== void 0 && options.filter !== null) {
4655
+ const predicate = options.filter;
4656
+ entities = entities.filter((entity) => {
4657
+ const ctx = createContextFromBindings(
4658
+ { entity, payload: bindingsRef?.payload, current: entity },
4659
+ false
4660
+ );
4661
+ try {
4662
+ return Boolean(evaluate(predicate, ctx));
4663
+ } catch (err) {
4664
+ console.error(
4665
+ `[OrbitalServerRuntime] fetch filter eval error for ${fetchEntityType}:`,
4666
+ err
4667
+ );
4668
+ return false;
4669
+ }
4670
+ });
4671
+ }
4654
4672
  if (options?.offset && options.offset > 0) {
4655
4673
  entities = entities.slice(options.offset);
4656
4674
  }
@@ -5283,5 +5301,5 @@ function buildMatcher(src, listenerOrbital) {
5283
5301
  }
5284
5302
 
5285
5303
  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 };
5286
- //# sourceMappingURL=chunk-GYPBWCOD.js.map
5287
- //# sourceMappingURL=chunk-GYPBWCOD.js.map
5304
+ //# sourceMappingURL=chunk-7SMGB3XY.js.map
5305
+ //# sourceMappingURL=chunk-7SMGB3XY.js.map