@almadar/runtime 6.24.0 → 6.25.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.
|
@@ -3,8 +3,8 @@ import { createLogger, setNamespaceLevel } from '@almadar/logger';
|
|
|
3
3
|
import { resolveBinding, evaluate, createMinimalContext, evaluateGuard } from '@almadar/evaluator';
|
|
4
4
|
export { createMinimalContext } from '@almadar/evaluator';
|
|
5
5
|
import { isKnownStdOperator } from '@almadar/std/registry';
|
|
6
|
+
import { isCallSiteConfigDeclaration, OrbitalSchemaSchema, isInlineTrait, isEntityCall, isEntityReference, parseEntityRef, parseImportedTraitRef, isPageReference, isPageReferenceString, isPageReferenceObject, parsePageRef } from '@almadar/core';
|
|
6
7
|
import { faker } from '@faker-js/faker';
|
|
7
|
-
import { OrbitalSchemaSchema, isInlineTrait, isEntityCall, isEntityReference, parseEntityRef, parseImportedTraitRef, isPageReference, isPageReferenceString, isPageReferenceObject, parsePageRef } from '@almadar/core';
|
|
8
8
|
|
|
9
9
|
var log = createLogger("almadar:runtime:eventbus");
|
|
10
10
|
var EventBus = class {
|
|
@@ -1935,8 +1935,6 @@ function buildEmitsFromTraits(traits, explicitEmits) {
|
|
|
1935
1935
|
}
|
|
1936
1936
|
return result;
|
|
1937
1937
|
}
|
|
1938
|
-
|
|
1939
|
-
// src/config-defaults.ts
|
|
1940
1938
|
function collectDeclaredConfigDefaults(trait) {
|
|
1941
1939
|
if (!trait) return void 0;
|
|
1942
1940
|
const schema = trait.config;
|
|
@@ -1954,6 +1952,21 @@ function collectDeclaredConfigDefaults(trait) {
|
|
|
1954
1952
|
}
|
|
1955
1953
|
return hasAny ? defaults : void 0;
|
|
1956
1954
|
}
|
|
1955
|
+
function normalizeCallSiteConfigToValues(config) {
|
|
1956
|
+
if (config === void 0) {
|
|
1957
|
+
return void 0;
|
|
1958
|
+
}
|
|
1959
|
+
const out = {};
|
|
1960
|
+
let hasAny = false;
|
|
1961
|
+
for (const [key, entry] of Object.entries(config)) {
|
|
1962
|
+
const value = isCallSiteConfigDeclaration(entry) ? entry.default : entry;
|
|
1963
|
+
if (value !== void 0) {
|
|
1964
|
+
out[key] = value;
|
|
1965
|
+
hasAny = true;
|
|
1966
|
+
}
|
|
1967
|
+
}
|
|
1968
|
+
return hasAny ? out : void 0;
|
|
1969
|
+
}
|
|
1957
1970
|
function collectDeclaredEntityDefaults(entity) {
|
|
1958
1971
|
if (!entity) return void 0;
|
|
1959
1972
|
const defaults = {};
|
|
@@ -3887,6 +3900,6 @@ var InMemoryPersistence = class {
|
|
|
3887
3900
|
}
|
|
3888
3901
|
};
|
|
3889
3902
|
|
|
3890
|
-
export { EffectExecutor, EventBus, HANDLER_MANIFEST, InMemoryPersistence, MockPersistenceAdapter, StateMachineManager, TickScheduler, buildEmitsFromTraits, collectDeclaredConfigDefaults, collectDeclaredEntityDefaults, containsBindings, createContextFromBindings, createInitialTraitState, createMockPersistence, createTestExecutor, createTickScheduler, createUnifiedLoader, extractBindings, findInitialState, findTransition, formatPayloadValidationError, getIsolatedCollectionName, getNamespacedEvent, interpolateProps, interpolateValue, isBrowser, isElectron, isNamespacedEvent, isNode, isValidDurationString, normalizeEventKey, parseDurationString, parseNamespacedEvent, preprocessSchema, processEvent, validateEventPayload, validatePayloadShapes };
|
|
3891
|
-
//# sourceMappingURL=chunk-
|
|
3892
|
-
//# sourceMappingURL=chunk-
|
|
3903
|
+
export { EffectExecutor, EventBus, HANDLER_MANIFEST, InMemoryPersistence, MockPersistenceAdapter, StateMachineManager, TickScheduler, buildEmitsFromTraits, collectDeclaredConfigDefaults, collectDeclaredEntityDefaults, containsBindings, createContextFromBindings, createInitialTraitState, createMockPersistence, createTestExecutor, createTickScheduler, createUnifiedLoader, extractBindings, findInitialState, findTransition, formatPayloadValidationError, getIsolatedCollectionName, getNamespacedEvent, interpolateProps, interpolateValue, isBrowser, isElectron, isNamespacedEvent, isNode, isValidDurationString, normalizeCallSiteConfigToValues, normalizeEventKey, parseDurationString, parseNamespacedEvent, preprocessSchema, processEvent, validateEventPayload, validatePayloadShapes };
|
|
3904
|
+
//# sourceMappingURL=chunk-NTKEAKYI.js.map
|
|
3905
|
+
//# sourceMappingURL=chunk-NTKEAKYI.js.map
|