@almadar/runtime 6.72.0 → 6.73.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,5 +1,5 @@
|
|
|
1
|
-
import { createTickScheduler, EventBus, createUnifiedLoader, MockPersistenceAdapter, InMemoryPersistence, preprocessSchema, normalizeCallSiteConfigToValues, StateMachineManager, parseDurationString, validateEventPayload, formatPayloadValidationError, collectDeclaredConfigDefaults, collectDeclaredEntityDefaults, EffectExecutor, LIFECYCLE_EVENTS } from './chunk-
|
|
2
|
-
export { InMemoryPersistence, collectDeclaredConfigDefaults } from './chunk-
|
|
1
|
+
import { createTickScheduler, EventBus, createUnifiedLoader, MockPersistenceAdapter, InMemoryPersistence, preprocessSchema, normalizeCallSiteConfigToValues, StateMachineManager, parseDurationString, validateEventPayload, formatPayloadValidationError, collectDeclaredConfigDefaults, collectDeclaredEntityDefaults, EffectExecutor, LIFECYCLE_EVENTS } from './chunk-H7HQQVQJ.js';
|
|
2
|
+
export { InMemoryPersistence, collectDeclaredConfigDefaults } from './chunk-H7HQQVQJ.js';
|
|
3
3
|
import { isValidCronExpression } from './chunk-OU3ITB5S.js';
|
|
4
4
|
import { createContextFromBindings, checkMutationAccess, applyRowAccess, accessDeniedMessage } from './chunk-ZWAOJT6R.js';
|
|
5
5
|
import './chunk-T4VDAB4C.js';
|
|
@@ -4,7 +4,7 @@ import { seedRandom, randomArrayElement, randomInt, shuffleArray, randomPastDate
|
|
|
4
4
|
import { collectTraitRefsFromValue, collectTraitRefsFromEffects } from './chunk-SCRAHWOC.js';
|
|
5
5
|
import { createLogger, setNamespaceLevel } from '@almadar/logger';
|
|
6
6
|
import { evaluateGuard, SExpressionEvaluator } from '@almadar/evaluator';
|
|
7
|
-
import { OrbitalSchemaSchema, isInlineTrait, isEntityCall, isEntityReference, parseEntityRef, parseImportedTraitRef, isPageReference, isPageReferenceString, isPageReferenceObject, parsePageRef, parseOrbitalRef, overrideDeclaredKnobs, asTraitId, asEntityId, asPageId, asOrbitalId, deriveId, isReferenceConfigType, configRefEventKnob, normalizeCallSiteConfigToValues, resolveConfigRefEventName, isCallSiteConfigDeclaration, idPrefix, eventListPropsOf } from '@almadar/core';
|
|
7
|
+
import { OrbitalSchemaSchema, isInlineTrait, isEntityCall, isEntityReference, parseEntityRef, parseImportedTraitRef, isPageReference, isPageReferenceString, isPageReferenceObject, parsePageRef, parseOrbitalRef, overrideDeclaredKnobs, asTraitId, asEntityId, asPageId, asOrbitalId, deriveId, isReferenceConfigType, configRefEventKnob, normalizeCallSiteConfigToValues, resolveConfigRefEventName, isCallSiteConfigDeclaration, asEventId, ledgerRename, idPrefix, eventListPropsOf } from '@almadar/core';
|
|
8
8
|
export { normalizeCallSiteConfigToValues } from '@almadar/core';
|
|
9
9
|
import { sampleRowCount, sampleRow, identityEntitiesOf, roleVocabularyOf } from '@almadar/core/mock';
|
|
10
10
|
|
|
@@ -3852,6 +3852,13 @@ function resolveSentinelFields(fields, entityDef, subs, declaredNames) {
|
|
|
3852
3852
|
}
|
|
3853
3853
|
return changed;
|
|
3854
3854
|
}
|
|
3855
|
+
function resolvePayloadEntitySchema(payloadEntity, setPayloadSchema, entitiesByName) {
|
|
3856
|
+
if (!payloadEntity) return false;
|
|
3857
|
+
const entity = entitiesByName.get(payloadEntity);
|
|
3858
|
+
if (!entity) return false;
|
|
3859
|
+
setPayloadSchema(entityFieldsToPayloadFields(entity));
|
|
3860
|
+
return true;
|
|
3861
|
+
}
|
|
3855
3862
|
function resolveTraitTypeParamSentinels(trait, entityDef, entitiesByName, typesByName, typeArgs) {
|
|
3856
3863
|
const declared = trait.typeParams ?? [];
|
|
3857
3864
|
const subs = /* @__PURE__ */ new Map();
|
|
@@ -3872,6 +3879,16 @@ function resolveTraitTypeParamSentinels(trait, entityDef, entitiesByName, typesB
|
|
|
3872
3879
|
let changed = false;
|
|
3873
3880
|
for (const emit of trait.emits ?? []) {
|
|
3874
3881
|
if (!emit.payloadSchema) continue;
|
|
3882
|
+
if (resolvePayloadEntitySchema(
|
|
3883
|
+
emit.payloadEntity,
|
|
3884
|
+
(schema2) => {
|
|
3885
|
+
emit.payloadSchema = schema2;
|
|
3886
|
+
},
|
|
3887
|
+
entitiesByName
|
|
3888
|
+
)) {
|
|
3889
|
+
changed = true;
|
|
3890
|
+
continue;
|
|
3891
|
+
}
|
|
3875
3892
|
const schema = emit.payloadSchema;
|
|
3876
3893
|
if (flattenBareEntityPayload(schema, entityDef, subs)) {
|
|
3877
3894
|
changed = true;
|
|
@@ -3881,6 +3898,16 @@ function resolveTraitTypeParamSentinels(trait, entityDef, entitiesByName, typesB
|
|
|
3881
3898
|
}
|
|
3882
3899
|
for (const ev of trait.stateMachine?.events ?? []) {
|
|
3883
3900
|
if (!ev.payloadSchema) continue;
|
|
3901
|
+
if (resolvePayloadEntitySchema(
|
|
3902
|
+
ev.payloadEntity,
|
|
3903
|
+
(schema2) => {
|
|
3904
|
+
ev.payloadSchema = schema2;
|
|
3905
|
+
},
|
|
3906
|
+
entitiesByName
|
|
3907
|
+
)) {
|
|
3908
|
+
changed = true;
|
|
3909
|
+
continue;
|
|
3910
|
+
}
|
|
3884
3911
|
const schema = ev.payloadSchema;
|
|
3885
3912
|
if (flattenBareEntityPayload(schema, entityDef, subs)) {
|
|
3886
3913
|
changed = true;
|
|
@@ -4445,7 +4472,7 @@ function applyLinkedEntityRename(trait, linkedEntity, entityIds) {
|
|
|
4445
4472
|
const atomLinked = trait.linkedEntity;
|
|
4446
4473
|
const entitySubs = consumerKnownEntityRebindSubs(trait, entityIds);
|
|
4447
4474
|
if (!linkedEntity || !atomLinked || linkedEntity === atomLinked) {
|
|
4448
|
-
return rewriteEntityRefIds(trait, entitySubs, entityIds);
|
|
4475
|
+
return rewriteEntityTypedConfigValues(rewriteEntityRefIds(trait, entitySubs, entityIds), entitySubs, entityIds);
|
|
4449
4476
|
}
|
|
4450
4477
|
for (const [from, to] of staleEntityRebindSubs(trait, linkedEntity)) {
|
|
4451
4478
|
entitySubs.set(from, to);
|
|
@@ -4459,7 +4486,11 @@ function applyLinkedEntityRename(trait, linkedEntity, entityIds) {
|
|
|
4459
4486
|
linkedEntityId: entityIds.get(linkedEntity)
|
|
4460
4487
|
};
|
|
4461
4488
|
if (!sm) {
|
|
4462
|
-
return
|
|
4489
|
+
return rewriteEntityTypedConfigValues(
|
|
4490
|
+
renamePayloadEntityMarkers(rewriteEntityRefIds(rebound, entitySubs, entityIds), rename),
|
|
4491
|
+
entitySubs,
|
|
4492
|
+
entityIds
|
|
4493
|
+
);
|
|
4463
4494
|
}
|
|
4464
4495
|
const nextTransitions = (sm.transitions ?? []).map((t) => {
|
|
4465
4496
|
const nextEffects = t.effects ? renameEntityInEffects(
|
|
@@ -4475,13 +4506,17 @@ function applyLinkedEntityRename(trait, linkedEntity, entityIds) {
|
|
|
4475
4506
|
to: linkedEntity,
|
|
4476
4507
|
transitionCount: nextTransitions.length
|
|
4477
4508
|
});
|
|
4478
|
-
return
|
|
4479
|
-
|
|
4480
|
-
|
|
4481
|
-
|
|
4482
|
-
|
|
4509
|
+
return rewriteEntityTypedConfigValues(
|
|
4510
|
+
renamePayloadEntityMarkers(
|
|
4511
|
+
rewriteEntityRefIds(
|
|
4512
|
+
{ ...rebound, stateMachine: { ...sm, transitions: nextTransitions } },
|
|
4513
|
+
entitySubs,
|
|
4514
|
+
entityIds
|
|
4515
|
+
),
|
|
4516
|
+
rename
|
|
4483
4517
|
),
|
|
4484
|
-
|
|
4518
|
+
entitySubs,
|
|
4519
|
+
entityIds
|
|
4485
4520
|
);
|
|
4486
4521
|
}
|
|
4487
4522
|
function resolveEntityTokensById(trait, idIndex) {
|
|
@@ -4566,7 +4601,7 @@ function resolveConfigRefsById(trait, idIndex) {
|
|
|
4566
4601
|
});
|
|
4567
4602
|
return { ...trait, config: nextSchema };
|
|
4568
4603
|
}
|
|
4569
|
-
function applyEventRenames(trait, renames) {
|
|
4604
|
+
function applyEventRenames(trait, renames, keptFinalNames) {
|
|
4570
4605
|
if (!renames || Object.keys(renames).length === 0) return trait;
|
|
4571
4606
|
const rename = (k) => k !== void 0 && k in renames ? renames[k] : k;
|
|
4572
4607
|
const sm = trait.stateMachine;
|
|
@@ -4596,7 +4631,9 @@ function applyEventRenames(trait, renames) {
|
|
|
4596
4631
|
);
|
|
4597
4632
|
const nextListens = (trait.listens ?? []).map((l) => {
|
|
4598
4633
|
const sourced = l.source !== void 0 && l.source.kind !== "any";
|
|
4599
|
-
const
|
|
4634
|
+
const sourceTraitName = l.source && l.source.kind !== "any" ? l.source.trait : void 0;
|
|
4635
|
+
const fromThisImport = sourceTraitName !== void 0 && keptFinalNames !== void 0 && keptFinalNames.has(sourceTraitName);
|
|
4636
|
+
const nextEvent = sourced && !fromThisImport ? l.event : rename(l.event) ?? l.event;
|
|
4600
4637
|
const nextTriggers = rename(l.triggers) ?? l.triggers;
|
|
4601
4638
|
return nextEvent === l.event && nextTriggers === l.triggers ? l : { ...l, event: nextEvent, triggers: nextTriggers };
|
|
4602
4639
|
});
|
|
@@ -4759,26 +4796,73 @@ function foldCallSiteConfigOntoTrait(trait, callSiteConfig) {
|
|
|
4759
4796
|
}
|
|
4760
4797
|
return { ...trait, config: nextConfig };
|
|
4761
4798
|
}
|
|
4762
|
-
var
|
|
4799
|
+
var ROW_ALIAS_TOKEN_PREFIXES = ["@entity.", "@item.", "@row."];
|
|
4800
|
+
var ROW_ALIAS_ROOTS = /* @__PURE__ */ new Set(["@entity", "@item", "@row"]);
|
|
4801
|
+
var FIELD_NAME_MEMBER_KEYS = ["key", "name", "field"];
|
|
4763
4802
|
function rewriteEntityFieldTokensInValue(node, subs) {
|
|
4764
4803
|
if (node === null || node === void 0) return node;
|
|
4765
4804
|
if (typeof node === "string") {
|
|
4766
|
-
|
|
4767
|
-
|
|
4768
|
-
|
|
4769
|
-
|
|
4770
|
-
|
|
4771
|
-
|
|
4772
|
-
|
|
4805
|
+
for (const prefix of ROW_ALIAS_TOKEN_PREFIXES) {
|
|
4806
|
+
if (!node.startsWith(prefix)) continue;
|
|
4807
|
+
const rest = node.slice(prefix.length);
|
|
4808
|
+
const dot = rest.search(/[.[]/);
|
|
4809
|
+
const name = dot === -1 ? rest : rest.slice(0, dot);
|
|
4810
|
+
const suffix = dot === -1 ? "" : rest.slice(dot);
|
|
4811
|
+
const to = subs.get(name);
|
|
4812
|
+
return to === void 0 ? node : `${prefix}${to}${suffix}`;
|
|
4813
|
+
}
|
|
4814
|
+
return node;
|
|
4815
|
+
}
|
|
4816
|
+
if (Array.isArray(node)) {
|
|
4817
|
+
if (node.length >= 3 && node[0] === "object/get" && typeof node[1] === "string" && ROW_ALIAS_ROOTS.has(node[1]) && typeof node[2] === "string") {
|
|
4818
|
+
const to = subs.get(node[2]);
|
|
4819
|
+
if (to !== void 0) {
|
|
4820
|
+
const rewritten = node.map((item) => rewriteEntityFieldTokensInValue(item, subs));
|
|
4821
|
+
rewritten[2] = to;
|
|
4822
|
+
return rewritten;
|
|
4823
|
+
}
|
|
4824
|
+
}
|
|
4825
|
+
return node.map((item) => rewriteEntityFieldTokensInValue(item, subs));
|
|
4773
4826
|
}
|
|
4774
|
-
if (Array.isArray(node)) return node.map((item) => rewriteEntityFieldTokensInValue(item, subs));
|
|
4775
4827
|
if (typeof node !== "object") return node;
|
|
4776
4828
|
const next = {};
|
|
4777
4829
|
for (const [key, value] of Object.entries(node)) {
|
|
4830
|
+
if (FIELD_NAME_MEMBER_KEYS.includes(key) && typeof value === "string") {
|
|
4831
|
+
const to = subs.get(value);
|
|
4832
|
+
next[key] = to === void 0 ? value : to;
|
|
4833
|
+
continue;
|
|
4834
|
+
}
|
|
4778
4835
|
next[key] = rewriteEntityFieldTokensInValue(value, subs);
|
|
4779
4836
|
}
|
|
4780
4837
|
return next;
|
|
4781
4838
|
}
|
|
4839
|
+
function rewriteBareFieldNameConfigDefault(value, fieldSubs) {
|
|
4840
|
+
if (typeof value === "string") {
|
|
4841
|
+
if (value === "" || value.startsWith("@")) return value;
|
|
4842
|
+
return fieldSubs.get(value) ?? value;
|
|
4843
|
+
}
|
|
4844
|
+
if (Array.isArray(value) && value.every((v) => typeof v === "string")) {
|
|
4845
|
+
return value.map((v) => v === "" || v.startsWith("@") ? v : fieldSubs.get(v) ?? v);
|
|
4846
|
+
}
|
|
4847
|
+
return value;
|
|
4848
|
+
}
|
|
4849
|
+
function rewriteEntityFieldsInConfig(config, fieldSubs) {
|
|
4850
|
+
if (fieldSubs.size === 0 || !config) return config;
|
|
4851
|
+
const rewrite = (v) => rewriteEntityFieldTokensInValue(v, fieldSubs);
|
|
4852
|
+
const nextConfig = {};
|
|
4853
|
+
for (const [key, field] of Object.entries(config)) {
|
|
4854
|
+
if (field.default === void 0) {
|
|
4855
|
+
nextConfig[key] = field;
|
|
4856
|
+
continue;
|
|
4857
|
+
}
|
|
4858
|
+
const afterSigils = rewrite(field.default);
|
|
4859
|
+
nextConfig[key] = {
|
|
4860
|
+
...field,
|
|
4861
|
+
default: rewriteBareFieldNameConfigDefault(afterSigils, fieldSubs)
|
|
4862
|
+
};
|
|
4863
|
+
}
|
|
4864
|
+
return nextConfig;
|
|
4865
|
+
}
|
|
4782
4866
|
function rewriteEntityFieldsInTrait(trait, fieldSubs) {
|
|
4783
4867
|
if (fieldSubs.size === 0) return trait;
|
|
4784
4868
|
const rewrite = (v) => rewriteEntityFieldTokensInValue(v, fieldSubs);
|
|
@@ -4812,11 +4896,7 @@ function rewriteEntityFieldsInTrait(trait, fieldSubs) {
|
|
|
4812
4896
|
next.initialEffects = rewrite(trait.initialEffects);
|
|
4813
4897
|
}
|
|
4814
4898
|
if (trait.config) {
|
|
4815
|
-
|
|
4816
|
-
for (const [key, field] of Object.entries(trait.config)) {
|
|
4817
|
-
nextConfig[key] = field.default === void 0 ? field : { ...field, default: rewrite(field.default) };
|
|
4818
|
-
}
|
|
4819
|
-
next.config = nextConfig;
|
|
4899
|
+
next.config = rewriteEntityFieldsInConfig(trait.config, fieldSubs);
|
|
4820
4900
|
}
|
|
4821
4901
|
return next;
|
|
4822
4902
|
}
|
|
@@ -4993,12 +5073,24 @@ function renamePayloadEntity(fields, rename) {
|
|
|
4993
5073
|
}
|
|
4994
5074
|
function renamePayloadEntityMarkers(trait, rename) {
|
|
4995
5075
|
const sm = trait.stateMachine;
|
|
4996
|
-
const nextEvents = sm?.events ? sm.events.map(
|
|
4997
|
-
|
|
4998
|
-
|
|
4999
|
-
|
|
5000
|
-
|
|
5001
|
-
|
|
5076
|
+
const nextEvents = sm?.events ? sm.events.map((ev) => {
|
|
5077
|
+
const renamedEntity = ev.payloadEntity !== void 0 ? rename(ev.payloadEntity) : void 0;
|
|
5078
|
+
if (!ev.payloadSchema && renamedEntity === void 0) return ev;
|
|
5079
|
+
return {
|
|
5080
|
+
...ev,
|
|
5081
|
+
...ev.payloadSchema ? { payloadSchema: renamePayloadEntity(ev.payloadSchema, rename) } : {},
|
|
5082
|
+
...renamedEntity !== void 0 ? { payloadEntity: renamedEntity } : {}
|
|
5083
|
+
};
|
|
5084
|
+
}) : void 0;
|
|
5085
|
+
const nextEmits = trait.emits ? trait.emits.map((em) => {
|
|
5086
|
+
const renamedEntity = em.payloadEntity !== void 0 ? rename(em.payloadEntity) : void 0;
|
|
5087
|
+
if (!em.payloadSchema && renamedEntity === void 0) return em;
|
|
5088
|
+
return {
|
|
5089
|
+
...em,
|
|
5090
|
+
...em.payloadSchema ? { payloadSchema: renamePayloadEntity(em.payloadSchema, rename) } : {},
|
|
5091
|
+
...renamedEntity !== void 0 ? { payloadEntity: renamedEntity } : {}
|
|
5092
|
+
};
|
|
5093
|
+
}) : void 0;
|
|
5002
5094
|
return {
|
|
5003
5095
|
...trait,
|
|
5004
5096
|
...sm && nextEvents ? { stateMachine: { ...sm, events: nextEvents } } : {},
|
|
@@ -5012,7 +5104,7 @@ function walkEntityInPayloadMapping(payloadMapping, rename, props) {
|
|
|
5012
5104
|
}
|
|
5013
5105
|
return next;
|
|
5014
5106
|
}
|
|
5015
|
-
function renameEntitiesInTrait(trait, entitySubs) {
|
|
5107
|
+
function renameEntitiesInTrait(trait, entitySubs, entityIds) {
|
|
5016
5108
|
if (entitySubs.size === 0) return trait;
|
|
5017
5109
|
const rename = (name) => entitySubs.get(name);
|
|
5018
5110
|
const withTokens = (value) => renameEntityNameTokensInValue(value, entitySubs);
|
|
@@ -5042,16 +5134,20 @@ function renameEntitiesInTrait(trait, entitySubs) {
|
|
|
5042
5134
|
rename,
|
|
5043
5135
|
REBIND_ENTITY_PROPS
|
|
5044
5136
|
)) : trait.initialEffects;
|
|
5045
|
-
return
|
|
5046
|
-
|
|
5047
|
-
|
|
5048
|
-
|
|
5049
|
-
|
|
5050
|
-
|
|
5051
|
-
|
|
5052
|
-
|
|
5053
|
-
|
|
5054
|
-
|
|
5137
|
+
return rewriteEntityTypedConfigValues(
|
|
5138
|
+
renamePayloadEntityMarkers(
|
|
5139
|
+
{
|
|
5140
|
+
...trait,
|
|
5141
|
+
linkedEntity: nextLinked,
|
|
5142
|
+
...sm ? { stateMachine: { ...sm, transitions: nextTransitions ?? [] } } : {},
|
|
5143
|
+
...nextTicks !== void 0 ? { ticks: nextTicks } : {},
|
|
5144
|
+
...nextListens !== void 0 ? { listens: nextListens } : {},
|
|
5145
|
+
...nextInitial !== void 0 ? { initialEffects: nextInitial } : {}
|
|
5146
|
+
},
|
|
5147
|
+
rename
|
|
5148
|
+
),
|
|
5149
|
+
entitySubs,
|
|
5150
|
+
entityIds
|
|
5055
5151
|
);
|
|
5056
5152
|
}
|
|
5057
5153
|
function rewriteEntityRefIds(trait, entitySubs, entityIds) {
|
|
@@ -5064,6 +5160,19 @@ function rewriteEntityRefIds(trait, entitySubs, entityIds) {
|
|
|
5064
5160
|
}
|
|
5065
5161
|
return { ...trait, entityRefIds: out };
|
|
5066
5162
|
}
|
|
5163
|
+
function rewriteEntityTypedConfigValues(trait, entitySubs, entityIds) {
|
|
5164
|
+
if (entitySubs.size === 0 || !trait.config) return trait;
|
|
5165
|
+
let changed = false;
|
|
5166
|
+
const nextConfig = { ...trait.config };
|
|
5167
|
+
for (const [key, field] of Object.entries(trait.config)) {
|
|
5168
|
+
if (field.type !== "entity" || typeof field.default !== "string") continue;
|
|
5169
|
+
const to = entitySubs.get(field.default);
|
|
5170
|
+
if (to === void 0) continue;
|
|
5171
|
+
changed = true;
|
|
5172
|
+
nextConfig[key] = { ...field, default: to, refId: entityIds.get(to) };
|
|
5173
|
+
}
|
|
5174
|
+
return changed ? { ...trait, config: nextConfig } : trait;
|
|
5175
|
+
}
|
|
5067
5176
|
function applyAliasEntityRenames(trait, subs, entityIds) {
|
|
5068
5177
|
if (subs.size === 0) return trait;
|
|
5069
5178
|
const rename = (name) => subs.get(name);
|
|
@@ -5126,7 +5235,7 @@ function relationTargetsOfEntity(entity, candidates) {
|
|
|
5126
5235
|
for (const field of entity.fields) collectRelationTargets(field, candidates, out);
|
|
5127
5236
|
return out;
|
|
5128
5237
|
}
|
|
5129
|
-
function rewriteListenSources(trait, subs, idByName, orbitalRename) {
|
|
5238
|
+
function rewriteListenSources(trait, subs, idByName, orbitalRename, alias, listenSourceTargets) {
|
|
5130
5239
|
const listens = trait.listens;
|
|
5131
5240
|
if (!listens || listens.length === 0) return trait;
|
|
5132
5241
|
let changed = false;
|
|
@@ -5143,19 +5252,35 @@ function rewriteListenSources(trait, subs, idByName, orbitalRename) {
|
|
|
5143
5252
|
source: { kind: "trait", trait: target, ...traitId ? { traitId } : {} }
|
|
5144
5253
|
};
|
|
5145
5254
|
}
|
|
5146
|
-
if (source.kind === "orbital"
|
|
5147
|
-
|
|
5148
|
-
|
|
5149
|
-
|
|
5150
|
-
|
|
5151
|
-
|
|
5152
|
-
|
|
5153
|
-
|
|
5154
|
-
|
|
5155
|
-
|
|
5156
|
-
|
|
5157
|
-
|
|
5158
|
-
|
|
5255
|
+
if (source.kind === "orbital") {
|
|
5256
|
+
if (orbitalRename && source.orbital === orbitalRename.from) {
|
|
5257
|
+
const targetTrait = subs.get(source.trait) ?? source.trait;
|
|
5258
|
+
changed = true;
|
|
5259
|
+
const traitId = idByName.get(targetTrait);
|
|
5260
|
+
return {
|
|
5261
|
+
...listen,
|
|
5262
|
+
source: {
|
|
5263
|
+
kind: "orbital",
|
|
5264
|
+
orbital: orbitalRename.to,
|
|
5265
|
+
trait: targetTrait,
|
|
5266
|
+
...traitId ? { traitId } : {}
|
|
5267
|
+
}
|
|
5268
|
+
};
|
|
5269
|
+
}
|
|
5270
|
+
const info = alias && listenSourceTargets ? listenSourceTargets.get(siblingImportKey(alias, source.orbital)) : void 0;
|
|
5271
|
+
if (info) {
|
|
5272
|
+
const target = info.traitSubs.get(source.trait);
|
|
5273
|
+
changed = true;
|
|
5274
|
+
return {
|
|
5275
|
+
...listen,
|
|
5276
|
+
source: {
|
|
5277
|
+
kind: "orbital",
|
|
5278
|
+
orbital: info.localName,
|
|
5279
|
+
trait: target?.finalName ?? source.trait,
|
|
5280
|
+
...target?.finalId ? { traitId: target.finalId } : {}
|
|
5281
|
+
}
|
|
5282
|
+
};
|
|
5283
|
+
}
|
|
5159
5284
|
}
|
|
5160
5285
|
return listen;
|
|
5161
5286
|
});
|
|
@@ -5335,6 +5460,25 @@ function materializedPrimaryEntity(upstreamEntity, upstreamOrbitalId, ref, local
|
|
|
5335
5460
|
);
|
|
5336
5461
|
return { name, id };
|
|
5337
5462
|
}
|
|
5463
|
+
function materializedTraitSubs(upstreamId, traits, ref, localName) {
|
|
5464
|
+
const onlySet = ref.only ? new Set(ref.only) : void 0;
|
|
5465
|
+
const omitSet = new Set(ref.omit ?? []);
|
|
5466
|
+
const out = /* @__PURE__ */ new Map();
|
|
5467
|
+
for (const rt of traits) {
|
|
5468
|
+
const name = rt.trait.name;
|
|
5469
|
+
if (!name) continue;
|
|
5470
|
+
const keep = onlySet ? onlySet.has(name) : !omitSet.has(name);
|
|
5471
|
+
if (!keep) continue;
|
|
5472
|
+
out.set(name, {
|
|
5473
|
+
finalName: `${localName}${name}`,
|
|
5474
|
+
finalId: asTraitId(deriveMaterializedId(rt.trait.id, upstreamId, name, localName, "trait"))
|
|
5475
|
+
});
|
|
5476
|
+
}
|
|
5477
|
+
return out;
|
|
5478
|
+
}
|
|
5479
|
+
function siblingImportKey(alias, upstreamOrbitalName) {
|
|
5480
|
+
return `${alias}\0${upstreamOrbitalName}`;
|
|
5481
|
+
}
|
|
5338
5482
|
function applyExtendFields(entity, extend, fieldSubs, consumerEntityIds, localName) {
|
|
5339
5483
|
if (!extend || extend.length === 0) return { entity, errors: [] };
|
|
5340
5484
|
const errors = [];
|
|
@@ -6842,6 +6986,7 @@ var ReferenceResolver = class _ReferenceResolver {
|
|
|
6842
6986
|
for (const [name, id] of await this.precomputeReferenceFormPrimaryIds(schema, chain)) {
|
|
6843
6987
|
if (!consumerEntityIds.has(name)) consumerEntityIds.set(name, id);
|
|
6844
6988
|
}
|
|
6989
|
+
const listenSourceTargets = await this.precomputeReferenceFormListenTargets(schema.orbitals, chain);
|
|
6845
6990
|
const consumerRoster = identityEntitiesOf(schema.orbitals);
|
|
6846
6991
|
for (const orbital of schema.orbitals) {
|
|
6847
6992
|
if (!orbital.reference) {
|
|
@@ -6856,14 +7001,31 @@ var ReferenceResolver = class _ReferenceResolver {
|
|
|
6856
7001
|
flattened.push(orbital);
|
|
6857
7002
|
continue;
|
|
6858
7003
|
}
|
|
6859
|
-
const result = await this.resolveOrbitalRefChain(
|
|
7004
|
+
const result = await this.resolveOrbitalRefChain(
|
|
7005
|
+
orbital,
|
|
7006
|
+
void 0,
|
|
7007
|
+
chain,
|
|
7008
|
+
visiting,
|
|
7009
|
+
consumerEntityIds,
|
|
7010
|
+
consumerRoster,
|
|
7011
|
+
listenSourceTargets
|
|
7012
|
+
);
|
|
6860
7013
|
if (!result.success) {
|
|
6861
7014
|
errors.push(...result.errors);
|
|
6862
7015
|
continue;
|
|
6863
7016
|
}
|
|
7017
|
+
if (!opts?.skipTypeParamSentinels && isInlineEntity(result.data.entity)) {
|
|
7018
|
+
resolveOrbitalTypeParamSentinels(
|
|
7019
|
+
result.data.traits.filter(isInlineTrait).map((t) => ({ trait: t })),
|
|
7020
|
+
result.data.entity,
|
|
7021
|
+
(result.data.auxiliaryEntities ?? []).filter(isInlineEntity),
|
|
7022
|
+
result.data.types
|
|
7023
|
+
);
|
|
7024
|
+
}
|
|
6864
7025
|
flattened.push(result.data);
|
|
6865
7026
|
}
|
|
6866
7027
|
if (errors.length > 0) return { success: false, errors };
|
|
7028
|
+
reconcileOrbitalRefEventIdRenames(schema, flattened);
|
|
6867
7029
|
return { success: true, data: flattened, warnings: [] };
|
|
6868
7030
|
}
|
|
6869
7031
|
/**
|
|
@@ -6906,6 +7068,58 @@ var ReferenceResolver = class _ReferenceResolver {
|
|
|
6906
7068
|
}
|
|
6907
7069
|
return out;
|
|
6908
7070
|
}
|
|
7071
|
+
/**
|
|
7072
|
+
* G1 (`docs/Almadar_Compiler_Gaps.md` §82): every reference-form
|
|
7073
|
+
* orbital's OWN materialized trait set, keyed by {@link siblingImportKey}
|
|
7074
|
+
* (upstream alias + upstream orbital name), mapped to that import's local
|
|
7075
|
+
* orbital name + every kept trait's final name/id ({@link
|
|
7076
|
+
* materializedTraitSubs}). Computed order-free — WITHOUT requiring any
|
|
7077
|
+
* other orbital in `schema` to have resolved first — same precompute
|
|
7078
|
+
* shape as {@link precomputeReferenceFormPrimaryIds}, but for LISTEN-
|
|
7079
|
+
* SOURCE rewriting: consulted by {@link rewriteListenSources} so a source
|
|
7080
|
+
* naming ANY reference-form orbital of this schema resolves regardless of
|
|
7081
|
+
* declaration order. Unlike the entity-id precompute, this resolves the
|
|
7082
|
+
* upstream's OWN traits via the ordinary `this.resolve()` pass (the same
|
|
7083
|
+
* call {@link materializeOrbitalRef} makes on its own upstream, with the
|
|
7084
|
+
* same `schemaConfig` save/restore) rather than reading the raw unresolved
|
|
7085
|
+
* schema — the JS identity model has no pre-resolve declaration id for a
|
|
7086
|
+
* COMPOSED trait reference (unlike the compiled path's V4 dual-carry
|
|
7087
|
+
* `TraitReference::Reference.id`), so a shallow read would silently
|
|
7088
|
+
* under-report every composed trait's id.
|
|
7089
|
+
*
|
|
7090
|
+
* Best-effort: a reference this pre-pass cannot resolve (unknown alias,
|
|
7091
|
+
* malformed reference string, upstream orbital not found, itself still
|
|
7092
|
+
* reference-form, load/resolve failure) is silently skipped here — the
|
|
7093
|
+
* REAL `resolveOrbitalRefChain`/`materializeOrbitalRef` call moments
|
|
7094
|
+
* later still surfaces the actual error for it.
|
|
7095
|
+
*/
|
|
7096
|
+
async precomputeReferenceFormListenTargets(orbitals, chain) {
|
|
7097
|
+
const out = /* @__PURE__ */ new Map();
|
|
7098
|
+
for (const orbital of orbitals) {
|
|
7099
|
+
const ref = orbital.reference;
|
|
7100
|
+
if (!ref) continue;
|
|
7101
|
+
const parsed = parseOrbitalRef(ref.ref);
|
|
7102
|
+
if (!parsed) continue;
|
|
7103
|
+
const importsResult = await this.resolveImports(orbital.uses ?? [], void 0, chain);
|
|
7104
|
+
if (!importsResult.success) continue;
|
|
7105
|
+
const imported = importsResult.data.orbitals.get(parsed.alias);
|
|
7106
|
+
if (!imported) continue;
|
|
7107
|
+
const upstream = importedOrbitals(imported).find((o) => o.name === parsed.orbitalName);
|
|
7108
|
+
if (!upstream || upstream.reference) continue;
|
|
7109
|
+
const savedSchemaConfig = this.schemaConfig;
|
|
7110
|
+
this.schemaConfig = imported.schemaConfig;
|
|
7111
|
+
let resolvedUpstream;
|
|
7112
|
+
try {
|
|
7113
|
+
resolvedUpstream = await this.resolve(upstream, imported.sourcePath, chain);
|
|
7114
|
+
} finally {
|
|
7115
|
+
this.schemaConfig = savedSchemaConfig;
|
|
7116
|
+
}
|
|
7117
|
+
if (!resolvedUpstream.success) continue;
|
|
7118
|
+
const traitSubs = materializedTraitSubs(upstream.id, resolvedUpstream.data.traits, ref, orbital.name);
|
|
7119
|
+
out.set(siblingImportKey(parsed.alias, parsed.orbitalName), { localName: orbital.name, traitSubs });
|
|
7120
|
+
}
|
|
7121
|
+
return out;
|
|
7122
|
+
}
|
|
6909
7123
|
/**
|
|
6910
7124
|
* Resolve one reference-form orbital, recursing into the upstream first
|
|
6911
7125
|
* when IT is also reference-form ("already fully inlined because inline
|
|
@@ -6913,7 +7127,7 @@ var ReferenceResolver = class _ReferenceResolver {
|
|
|
6913
7127
|
* step 3 — the JS resolver needs its own cycle guard since it has no
|
|
6914
7128
|
* file-level inline-order pass to lean on).
|
|
6915
7129
|
*/
|
|
6916
|
-
async resolveOrbitalRefChain(orbital, sourcePath, chain, visiting, consumerEntityIds, consumerRoster) {
|
|
7130
|
+
async resolveOrbitalRefChain(orbital, sourcePath, chain, visiting, consumerEntityIds, consumerRoster, listenSourceTargets) {
|
|
6917
7131
|
const ref = orbital.reference;
|
|
6918
7132
|
if (!ref) return { success: true, data: orbital, warnings: [] };
|
|
6919
7133
|
const parsed = parseOrbitalRef(ref.ref);
|
|
@@ -6955,13 +7169,15 @@ var ReferenceResolver = class _ReferenceResolver {
|
|
|
6955
7169
|
}
|
|
6956
7170
|
visiting.add(cycleKey);
|
|
6957
7171
|
if (upstream.reference) {
|
|
7172
|
+
const nestedListenSourceTargets = await this.precomputeReferenceFormListenTargets(candidates, chain);
|
|
6958
7173
|
const nested = await this.resolveOrbitalRefChain(
|
|
6959
7174
|
upstream,
|
|
6960
7175
|
imported.sourcePath,
|
|
6961
7176
|
chain,
|
|
6962
7177
|
visiting,
|
|
6963
7178
|
consumerEntityIds,
|
|
6964
|
-
consumerRoster
|
|
7179
|
+
consumerRoster,
|
|
7180
|
+
nestedListenSourceTargets
|
|
6965
7181
|
);
|
|
6966
7182
|
if (!nested.success) {
|
|
6967
7183
|
visiting.delete(cycleKey);
|
|
@@ -6980,7 +7196,9 @@ var ReferenceResolver = class _ReferenceResolver {
|
|
|
6980
7196
|
candidates,
|
|
6981
7197
|
consumerEntityIds,
|
|
6982
7198
|
consumerRoster,
|
|
6983
|
-
imported.schemaConfig
|
|
7199
|
+
imported.schemaConfig,
|
|
7200
|
+
parsed.alias,
|
|
7201
|
+
listenSourceTargets
|
|
6984
7202
|
);
|
|
6985
7203
|
if (!materialized.success) return materialized;
|
|
6986
7204
|
const siblingTraits = orbital.traits ?? [];
|
|
@@ -7001,7 +7219,7 @@ var ReferenceResolver = class _ReferenceResolver {
|
|
|
7001
7219
|
* §4.3). JS twin of the (not-yet-landed) compiler's
|
|
7002
7220
|
* `resolve_orbital_reference`.
|
|
7003
7221
|
*/
|
|
7004
|
-
async materializeOrbitalRef(upstream, ref, localName, localId, sourcePath, chain, aliasOrbitals, consumerEntityIds, consumerRoster, importedSchemaConfig) {
|
|
7222
|
+
async materializeOrbitalRef(upstream, ref, localName, localId, sourcePath, chain, aliasOrbitals, consumerEntityIds, consumerRoster, importedSchemaConfig, alias, listenSourceTargets) {
|
|
7005
7223
|
const savedSchemaConfig = this.schemaConfig;
|
|
7006
7224
|
this.schemaConfig = importedSchemaConfig;
|
|
7007
7225
|
let resolvedUpstream;
|
|
@@ -7051,6 +7269,7 @@ var ReferenceResolver = class _ReferenceResolver {
|
|
|
7051
7269
|
let auxEntities = upstreamAuxiliaryEntities ?? [];
|
|
7052
7270
|
const subs = /* @__PURE__ */ new Map();
|
|
7053
7271
|
for (const rt of keptTraits) subs.set(rt.trait.name, `${localName}${rt.trait.name}`);
|
|
7272
|
+
const keptFinalNames = new Set(subs.values());
|
|
7054
7273
|
const { name: primaryFinalName, id: primaryId } = materializedPrimaryEntity(
|
|
7055
7274
|
upstreamEntity,
|
|
7056
7275
|
upstream.id,
|
|
@@ -7247,7 +7466,7 @@ var ReferenceResolver = class _ReferenceResolver {
|
|
|
7247
7466
|
const orbitalRename = upstream.name !== localName ? { from: upstream.name, to: localName } : void 0;
|
|
7248
7467
|
const finalTraits = materializedTraits.map((trait) => {
|
|
7249
7468
|
let next = renameTraitEmbeds(trait, subs);
|
|
7250
|
-
next = renameEntitiesInTrait(next, subs);
|
|
7469
|
+
next = renameEntitiesInTrait(next, subs, entityIds);
|
|
7251
7470
|
if (next.linkedEntity !== void 0) {
|
|
7252
7471
|
const linkedEntityId = entityIds.get(next.linkedEntity);
|
|
7253
7472
|
if (linkedEntityId !== void 0) next = { ...next, linkedEntityId };
|
|
@@ -7256,7 +7475,7 @@ var ReferenceResolver = class _ReferenceResolver {
|
|
|
7256
7475
|
next = renameSourceEntityDefinition(next, subs, entityIds);
|
|
7257
7476
|
next = rewriteRoleLiteralsInTrait(next, roleFields, ref.roles ?? {});
|
|
7258
7477
|
if (fieldSubs.size > 0) next = rewriteEntityFieldsInTrait(next, fieldSubs);
|
|
7259
|
-
next = rewriteListenSources(next, subs, idByName, orbitalRename);
|
|
7478
|
+
next = rewriteListenSources(next, subs, idByName, orbitalRename, alias, listenSourceTargets);
|
|
7260
7479
|
if (pathMap.size > 0) {
|
|
7261
7480
|
next = rewriteTraitNavigateTargets(next, pathMap);
|
|
7262
7481
|
}
|
|
@@ -7266,10 +7485,13 @@ var ReferenceResolver = class _ReferenceResolver {
|
|
|
7266
7485
|
}
|
|
7267
7486
|
next = resolveForwardedSiblingConfigFrom(next, transitiveEmbedderChain(trait.name));
|
|
7268
7487
|
next = resolveForwardedSiblingConfigFrom(next, [], foldedConfig, importedSchemaConfig);
|
|
7488
|
+
if (fieldSubs.size > 0 && next.config) {
|
|
7489
|
+
next = { ...next, config: rewriteEntityFieldsInConfig(next.config, fieldSubs) };
|
|
7490
|
+
}
|
|
7269
7491
|
if (pathMap.size > 0) {
|
|
7270
7492
|
next = rewriteTraitConfigPagePaths(next, pathMap);
|
|
7271
7493
|
}
|
|
7272
|
-
next = applyEventRenames(next, ref.events);
|
|
7494
|
+
next = applyEventRenames(next, ref.events, keptFinalNames);
|
|
7273
7495
|
return next;
|
|
7274
7496
|
});
|
|
7275
7497
|
const renamedPrimaryEntity = rewriteRoleLiteralsInEntity(
|
|
@@ -7402,6 +7624,117 @@ var ReferenceResolver = class _ReferenceResolver {
|
|
|
7402
7624
|
this.loader?.clearCache();
|
|
7403
7625
|
}
|
|
7404
7626
|
};
|
|
7627
|
+
function isInlineTraitWithStateMachine(tr) {
|
|
7628
|
+
return isInlineTrait(tr);
|
|
7629
|
+
}
|
|
7630
|
+
function reconcileOrbitalRefEventIdRenames(schema, flattened) {
|
|
7631
|
+
if (!schema.ledger) return;
|
|
7632
|
+
const renamedRefs = schema.orbitals.filter((o) => o.reference?.events && Object.keys(o.reference.events).length > 0).map((o) => ({ localName: o.name, eventSubs: o.reference.events }));
|
|
7633
|
+
if (renamedRefs.length === 0) return;
|
|
7634
|
+
const sites = [];
|
|
7635
|
+
for (const { localName, eventSubs } of renamedRefs) {
|
|
7636
|
+
const newKeys = new Set(Object.values(eventSubs));
|
|
7637
|
+
const orbital = flattened.find((o) => o.name === localName);
|
|
7638
|
+
if (!orbital) continue;
|
|
7639
|
+
for (const tr of orbital.traits) {
|
|
7640
|
+
if (!isInlineTraitWithStateMachine(tr)) continue;
|
|
7641
|
+
for (const ev of tr.stateMachine?.events ?? []) {
|
|
7642
|
+
if (!ev.id || !newKeys.has(ev.key)) continue;
|
|
7643
|
+
const entry = schema.ledger.entries[ev.id];
|
|
7644
|
+
if (!entry || entry.curName === ev.key) continue;
|
|
7645
|
+
sites.push({ orbitalName: orbital.name, traitName: tr.name, oldId: ev.id, newKey: ev.key });
|
|
7646
|
+
}
|
|
7647
|
+
}
|
|
7648
|
+
}
|
|
7649
|
+
if (sites.length === 0) return;
|
|
7650
|
+
const candidateIds = new Set(sites.map((s) => s.oldId));
|
|
7651
|
+
const owners = /* @__PURE__ */ new Map();
|
|
7652
|
+
for (const orbital of flattened) {
|
|
7653
|
+
for (const tr of orbital.traits) {
|
|
7654
|
+
if (!isInlineTraitWithStateMachine(tr)) continue;
|
|
7655
|
+
for (const ev of tr.stateMachine?.events ?? []) {
|
|
7656
|
+
if (ev.id && candidateIds.has(ev.id)) {
|
|
7657
|
+
const ownerKey = `${orbital.name}\0${tr.name}`;
|
|
7658
|
+
const set = owners.get(ev.id) ?? /* @__PURE__ */ new Set();
|
|
7659
|
+
set.add(ownerKey);
|
|
7660
|
+
owners.set(ev.id, set);
|
|
7661
|
+
}
|
|
7662
|
+
}
|
|
7663
|
+
}
|
|
7664
|
+
}
|
|
7665
|
+
const renameInPlace = /* @__PURE__ */ new Map();
|
|
7666
|
+
const deriveSites = [];
|
|
7667
|
+
const seen = /* @__PURE__ */ new Set();
|
|
7668
|
+
for (const site of sites) {
|
|
7669
|
+
const ownerCount = owners.get(site.oldId)?.size ?? 1;
|
|
7670
|
+
if (ownerCount <= 1) {
|
|
7671
|
+
renameInPlace.set(site.oldId, site.newKey);
|
|
7672
|
+
} else if (!seen.has(site.oldId)) {
|
|
7673
|
+
seen.add(site.oldId);
|
|
7674
|
+
deriveSites.push({ site, newId: asEventId(deriveId(site.oldId, site.newKey)) });
|
|
7675
|
+
}
|
|
7676
|
+
}
|
|
7677
|
+
for (const { site, newId } of deriveSites) {
|
|
7678
|
+
const orbital = flattened.find((o) => o.name === site.orbitalName);
|
|
7679
|
+
if (!orbital) continue;
|
|
7680
|
+
orbital.traits = orbital.traits.map((tr) => {
|
|
7681
|
+
if (!isInlineTraitWithStateMachine(tr) || tr.name !== site.traitName) return tr;
|
|
7682
|
+
let next = tr;
|
|
7683
|
+
if (next.stateMachine?.events) {
|
|
7684
|
+
next = {
|
|
7685
|
+
...next,
|
|
7686
|
+
stateMachine: {
|
|
7687
|
+
...next.stateMachine,
|
|
7688
|
+
events: next.stateMachine.events.map((ev) => ev.id === site.oldId ? { ...ev, id: newId } : ev),
|
|
7689
|
+
transitions: (next.stateMachine.transitions ?? []).map(
|
|
7690
|
+
(t) => t.eventId === site.oldId ? { ...t, eventId: newId } : t
|
|
7691
|
+
)
|
|
7692
|
+
}
|
|
7693
|
+
};
|
|
7694
|
+
}
|
|
7695
|
+
if (next.emits) {
|
|
7696
|
+
next = {
|
|
7697
|
+
...next,
|
|
7698
|
+
emits: next.emits.map(
|
|
7699
|
+
(e) => typeof e !== "string" && e.eventId === site.oldId ? { ...e, eventId: newId } : e
|
|
7700
|
+
)
|
|
7701
|
+
};
|
|
7702
|
+
}
|
|
7703
|
+
if (next.listens) {
|
|
7704
|
+
next = {
|
|
7705
|
+
...next,
|
|
7706
|
+
listens: next.listens.map((l) => {
|
|
7707
|
+
const eventId = l.eventId === site.oldId ? newId : l.eventId;
|
|
7708
|
+
const triggersId = l.triggersId === site.oldId ? newId : l.triggersId;
|
|
7709
|
+
return eventId === l.eventId && triggersId === l.triggersId ? l : { ...l, eventId, triggersId };
|
|
7710
|
+
})
|
|
7711
|
+
};
|
|
7712
|
+
}
|
|
7713
|
+
return next;
|
|
7714
|
+
});
|
|
7715
|
+
}
|
|
7716
|
+
const at = (/* @__PURE__ */ new Date()).toISOString();
|
|
7717
|
+
let ledger = schema.ledger;
|
|
7718
|
+
for (const [oldId, newKey] of renameInPlace) {
|
|
7719
|
+
ledger = ledgerRename(ledger, oldId, newKey, at);
|
|
7720
|
+
}
|
|
7721
|
+
for (const { site, newId } of deriveSites) {
|
|
7722
|
+
const src = ledger.entries[site.oldId];
|
|
7723
|
+
if (!src) continue;
|
|
7724
|
+
const ownerTrait = flattened.find((o) => o.name === site.orbitalName)?.traits.find((tr) => isInlineTraitWithStateMachine(tr) && tr.name === site.traitName);
|
|
7725
|
+
const newEntry = {
|
|
7726
|
+
id: newId,
|
|
7727
|
+
kind: src.kind,
|
|
7728
|
+
bakedName: src.bakedName,
|
|
7729
|
+
curName: site.newKey,
|
|
7730
|
+
renames: [...src.renames, { from: src.curName, to: site.newKey, at }],
|
|
7731
|
+
owner: src.owner,
|
|
7732
|
+
...ownerTrait?.id !== void 0 ? { parent: ownerTrait.id } : {}
|
|
7733
|
+
};
|
|
7734
|
+
ledger = { ...ledger, entries: { ...ledger.entries, [newId]: newEntry } };
|
|
7735
|
+
}
|
|
7736
|
+
schema.ledger = ledger;
|
|
7737
|
+
}
|
|
7405
7738
|
async function resolveSchema(schema, options) {
|
|
7406
7739
|
const resolver = new ReferenceResolver({ ...options, schemaConfig: schema.config });
|
|
7407
7740
|
const errors = [];
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { EffectExecutor } from './chunk-
|
|
2
|
-
export { EffectExecutor, EventBus, HANDLER_MANIFEST, InMemoryPersistence, LIFECYCLE_EVENTS, MockPersistenceAdapter, StateMachineManager, TickScheduler, buildEmitsFromTraits, collectDeclaredConfigDefaults, collectDeclaredEntityDefaults, createInitialTraitState, createMockPersistence, createTestExecutor, createTickScheduler, createUnifiedLoader, findInitialState, findTransition, formatPayloadValidationError, getIsolatedCollectionName, getNamespacedEvent, isBrowser, isElectron, isNamespacedEvent, isNode, isValidDurationString, normalizeCallSiteConfigToValues, normalizeEventKey, parseDurationString, parseNamespacedEvent, preprocessSchema, processEvent, validateEventPayload, validatePayloadShapes } from './chunk-
|
|
1
|
+
import { EffectExecutor } from './chunk-H7HQQVQJ.js';
|
|
2
|
+
export { EffectExecutor, EventBus, HANDLER_MANIFEST, InMemoryPersistence, LIFECYCLE_EVENTS, MockPersistenceAdapter, StateMachineManager, TickScheduler, buildEmitsFromTraits, collectDeclaredConfigDefaults, collectDeclaredEntityDefaults, createInitialTraitState, createMockPersistence, createTestExecutor, createTickScheduler, createUnifiedLoader, findInitialState, findTransition, formatPayloadValidationError, getIsolatedCollectionName, getNamespacedEvent, isBrowser, isElectron, isNamespacedEvent, isNode, isValidDurationString, normalizeCallSiteConfigToValues, normalizeEventKey, parseDurationString, parseNamespacedEvent, preprocessSchema, processEvent, validateEventPayload, validatePayloadShapes } from './chunk-H7HQQVQJ.js';
|
|
3
3
|
export { cronMatches, cronMinuteKey, isValidCronExpression, parseCron, parseCronField } from './chunk-OU3ITB5S.js';
|
|
4
4
|
import { createContextFromBindings, applyRowAccess, checkMutationAccess, accessDeniedMessage } from './chunk-ZWAOJT6R.js';
|
|
5
5
|
export { applyRowAccess, checkMutationAccess, containsBindings, createContextFromBindings, createMinimalContext, deferEntityBindings, extractBindings, interpolateProps, interpolateValue } from './chunk-ZWAOJT6R.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@almadar/runtime",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.73.0",
|
|
4
4
|
"description": "Interpreted runtime for Almadar orbital applications (OrbitalServerRuntime)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -57,11 +57,11 @@
|
|
|
57
57
|
"access": "public"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@almadar/core": "^10.
|
|
60
|
+
"@almadar/core": "^10.88.0",
|
|
61
61
|
"@almadar/evaluator": "^2.45.0",
|
|
62
62
|
"@almadar/logger": "^1.12.0",
|
|
63
63
|
"@almadar/server": "^2.40.0",
|
|
64
|
-
"@almadar/std": "^16.
|
|
64
|
+
"@almadar/std": "^16.209.0"
|
|
65
65
|
},
|
|
66
66
|
"peerDependencies": {
|
|
67
67
|
"express": "^5.0.0"
|