@almadar/runtime 5.9.0 → 5.9.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
|
-
export { InMemoryPersistence, OrbitalServerRuntime, collectDeclaredConfigDefaults, createOrbitalServerRuntime } from './chunk-
|
|
1
|
+
export { InMemoryPersistence, OrbitalServerRuntime, collectDeclaredConfigDefaults, createOrbitalServerRuntime } from './chunk-RONUCODN.js';
|
|
2
2
|
import './chunk-PZ5AY32C.js';
|
|
3
3
|
//# sourceMappingURL=OrbitalServerRuntime.js.map
|
|
4
4
|
//# sourceMappingURL=OrbitalServerRuntime.js.map
|
|
@@ -4903,15 +4903,27 @@ var OrbitalServerRuntime = class {
|
|
|
4903
4903
|
user
|
|
4904
4904
|
// @user bindings from Firebase auth
|
|
4905
4905
|
};
|
|
4906
|
-
const
|
|
4907
|
-
|
|
4908
|
-
);
|
|
4906
|
+
const traitDef = registered.traits.find((t) => t.name === traitName);
|
|
4907
|
+
const declaredDefaults = collectDeclaredConfigDefaults(traitDef);
|
|
4909
4908
|
const callSiteOverride = registered.configByTrait.get(traitName);
|
|
4910
4909
|
if (declaredDefaults || callSiteOverride) {
|
|
4911
4910
|
bindings.config = { ...declaredDefaults ?? {}, ...callSiteOverride ?? {} };
|
|
4912
4911
|
}
|
|
4912
|
+
if (traitDef?.scope === "collection" && entityType && !entityId) {
|
|
4913
|
+
try {
|
|
4914
|
+
const all = await this.persistence.list(entityType);
|
|
4915
|
+
if (Array.isArray(all) && all.length > 0) {
|
|
4916
|
+
const merged = Object.assign(
|
|
4917
|
+
[...all],
|
|
4918
|
+
all[0]
|
|
4919
|
+
);
|
|
4920
|
+
bindings.entity = merged;
|
|
4921
|
+
}
|
|
4922
|
+
} catch {
|
|
4923
|
+
}
|
|
4924
|
+
}
|
|
4913
4925
|
if (entityType) {
|
|
4914
|
-
bindings[entityType] = entityData;
|
|
4926
|
+
bindings[entityType] = bindings.entity ?? entityData;
|
|
4915
4927
|
}
|
|
4916
4928
|
bindingsRef = bindings;
|
|
4917
4929
|
const context = {
|
|
@@ -5324,5 +5336,5 @@ function buildMatcher(src, listenerOrbital) {
|
|
|
5324
5336
|
}
|
|
5325
5337
|
|
|
5326
5338
|
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 };
|
|
5327
|
-
//# sourceMappingURL=chunk-
|
|
5328
|
-
//# sourceMappingURL=chunk-
|
|
5339
|
+
//# sourceMappingURL=chunk-RONUCODN.js.map
|
|
5340
|
+
//# sourceMappingURL=chunk-RONUCODN.js.map
|