@almadar/runtime 6.4.0 → 6.4.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-ODKFBOQG.js';
|
|
2
2
|
import './chunk-PZ5AY32C.js';
|
|
3
3
|
//# sourceMappingURL=OrbitalServerRuntime.js.map
|
|
4
4
|
//# sourceMappingURL=OrbitalServerRuntime.js.map
|
|
@@ -145,40 +145,44 @@ function interpolateProps(props, ctx) {
|
|
|
145
145
|
const typeBindingRaw = props["type"];
|
|
146
146
|
const patternType = typeof typeBindingRaw === "string" ? typeBindingRaw : void 0;
|
|
147
147
|
if (typeof entityBindingRaw === "string") {
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
148
|
+
renderLog.debug("interpolateProps:entity", () => {
|
|
149
|
+
const resolvedEntity = result["entity"];
|
|
150
|
+
const resolvedRow = resolvedEntity !== null && typeof resolvedEntity === "object" && !Array.isArray(resolvedEntity) ? resolvedEntity : null;
|
|
151
|
+
const ctxRow = ctx.payload["row"];
|
|
152
|
+
const ctxPayloadKeys = Object.keys(ctx.payload).join(",");
|
|
153
|
+
const payloadDataRaw = ctx.payload["data"];
|
|
154
|
+
const payloadDataLen = Array.isArray(payloadDataRaw) ? payloadDataRaw.length : null;
|
|
155
|
+
const ctxEntityRaw = ctx.entity;
|
|
156
|
+
const ctxEntityLen = Array.isArray(ctxEntityRaw) ? ctxEntityRaw.length : null;
|
|
157
|
+
const resolvedLen = Array.isArray(resolvedEntity) ? resolvedEntity.length : null;
|
|
158
|
+
return {
|
|
159
|
+
patternType,
|
|
160
|
+
entityBinding: entityBindingRaw,
|
|
161
|
+
resolvedIsObject: resolvedRow !== null,
|
|
162
|
+
resolvedIsArray: Array.isArray(resolvedEntity),
|
|
163
|
+
resolvedLen,
|
|
164
|
+
resolvedEqualsCtxRow: ctxRow !== void 0 && resolvedRow !== null && resolvedRow === ctxRow,
|
|
165
|
+
resolvedRowId: resolvedRow?.id,
|
|
166
|
+
ctxPayloadKeys,
|
|
167
|
+
ctxPayloadDataLen: payloadDataLen,
|
|
168
|
+
ctxEntityIsArray: Array.isArray(ctxEntityRaw),
|
|
169
|
+
ctxEntityLen
|
|
170
|
+
};
|
|
169
171
|
});
|
|
170
172
|
}
|
|
171
173
|
if (patternType === "form-section" || patternType === "form") {
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
174
|
+
bindLog.debug("form-binding", () => {
|
|
175
|
+
const modeRaw = result["mode"];
|
|
176
|
+
const submitRaw = result["submitEvent"];
|
|
177
|
+
const cancelRaw = result["cancelEvent"];
|
|
178
|
+
return {
|
|
179
|
+
patternType,
|
|
180
|
+
mode: typeof modeRaw === "string" ? modeRaw : void 0,
|
|
181
|
+
submitEvent: typeof submitRaw === "string" ? submitRaw : void 0,
|
|
182
|
+
cancelEvent: typeof cancelRaw === "string" ? cancelRaw : void 0,
|
|
183
|
+
entity: JSON.stringify(result["entity"] ?? null),
|
|
184
|
+
fields: JSON.stringify(result["fields"] ?? null)
|
|
185
|
+
};
|
|
182
186
|
});
|
|
183
187
|
}
|
|
184
188
|
return anyChanged ? result : props;
|
|
@@ -234,13 +238,13 @@ function interpolateArray(value, ctx) {
|
|
|
234
238
|
}
|
|
235
239
|
if (isSExpression(value)) {
|
|
236
240
|
const result = evaluate(value, ctx);
|
|
237
|
-
bindLog.
|
|
241
|
+
bindLog.debug("sexpr:eval", () => ({
|
|
238
242
|
operator: typeof value[0] === "string" ? value[0] : "<non-string>",
|
|
239
243
|
argCount: value.length - 1,
|
|
240
244
|
inputJson: JSON.stringify(value).slice(0, 300),
|
|
241
245
|
resultType: typeof result,
|
|
242
246
|
resultJson: typeof result === "object" && result !== null ? JSON.stringify(result).slice(0, 2e3) : String(result)
|
|
243
|
-
});
|
|
247
|
+
}));
|
|
244
248
|
return result;
|
|
245
249
|
}
|
|
246
250
|
const mapped = [];
|
|
@@ -1789,7 +1793,7 @@ var MockPersistenceAdapter = class {
|
|
|
1789
1793
|
updatedAt: typeof item.updatedAt === "string" ? item.updatedAt : ""
|
|
1790
1794
|
});
|
|
1791
1795
|
}
|
|
1792
|
-
mockLog.debug("mock:seed", { entityName, count, idsAndTimestamps: JSON.stringify(generated) });
|
|
1796
|
+
mockLog.debug("mock:seed", () => ({ entityName, count, idsAndTimestamps: JSON.stringify(generated) }));
|
|
1793
1797
|
}
|
|
1794
1798
|
/**
|
|
1795
1799
|
* Generate a single mock item based on field schemas.
|
|
@@ -4323,7 +4327,7 @@ var OrbitalServerRuntime = class {
|
|
|
4323
4327
|
payloadRowId: typeof payloadRowId === "string" || typeof payloadRowId === "number" ? payloadRowId : void 0,
|
|
4324
4328
|
entityId: request.entityId
|
|
4325
4329
|
});
|
|
4326
|
-
busLog.debug("bus:incoming", {
|
|
4330
|
+
busLog.debug("bus:incoming", () => ({
|
|
4327
4331
|
orbital: orbitalName,
|
|
4328
4332
|
event: request.event,
|
|
4329
4333
|
payload: JSON.stringify(request.payload ?? null),
|
|
@@ -4334,15 +4338,15 @@ var OrbitalServerRuntime = class {
|
|
|
4334
4338
|
currentState: state.currentState
|
|
4335
4339
|
}))
|
|
4336
4340
|
)
|
|
4337
|
-
});
|
|
4338
|
-
xOrbitalLog.info("processOrbitalEvent:enter", {
|
|
4341
|
+
}));
|
|
4342
|
+
xOrbitalLog.info("processOrbitalEvent:enter", () => ({
|
|
4339
4343
|
orbital: orbitalName,
|
|
4340
4344
|
event: request.event,
|
|
4341
4345
|
traitsInOrbital: registered.traits.map((t) => t.name).join(","),
|
|
4342
4346
|
payloadActiveTraits: JSON.stringify(
|
|
4343
4347
|
request.payload?.["_activeTraits"] ?? null
|
|
4344
4348
|
)
|
|
4345
|
-
});
|
|
4349
|
+
}));
|
|
4346
4350
|
const { event, payload, entityId, user } = request;
|
|
4347
4351
|
const validationFailures = [];
|
|
4348
4352
|
for (const trait of registered.traits) {
|
|
@@ -4673,7 +4677,7 @@ var OrbitalServerRuntime = class {
|
|
|
4673
4677
|
},
|
|
4674
4678
|
fetch: async (fetchEntityType, options) => {
|
|
4675
4679
|
try {
|
|
4676
|
-
xOrbitalLog.info("fetch:enter", {
|
|
4680
|
+
xOrbitalLog.info("fetch:enter", () => ({
|
|
4677
4681
|
entityType: fetchEntityType,
|
|
4678
4682
|
hasOptions: options !== void 0 && options !== null,
|
|
4679
4683
|
optionsKeys: options ? Object.keys(options).join(",") : "",
|
|
@@ -4681,7 +4685,7 @@ var OrbitalServerRuntime = class {
|
|
|
4681
4685
|
filterIsArray: Array.isArray(options?.filter),
|
|
4682
4686
|
filterJson: JSON.stringify(options?.filter ?? null).slice(0, 300),
|
|
4683
4687
|
payloadJson: JSON.stringify(bindingsRef?.payload ?? null).slice(0, 300)
|
|
4684
|
-
});
|
|
4688
|
+
}));
|
|
4685
4689
|
let result = null;
|
|
4686
4690
|
let total = 0;
|
|
4687
4691
|
if (options?.id) {
|
|
@@ -5333,5 +5337,5 @@ function buildMatcher(src, listenerOrbital) {
|
|
|
5333
5337
|
}
|
|
5334
5338
|
|
|
5335
5339
|
export { EffectExecutor, EventBus, HANDLER_MANIFEST, InMemoryPersistence, MockPersistenceAdapter, OrbitalServerRuntime, StateMachineManager, buildEmitsFromTraits, collectDeclaredConfigDefaults, containsBindings, createContextFromBindings, createInitialTraitState, createMockPersistence, createOrbitalServerRuntime, createTestExecutor, createUnifiedLoader, extractBindings, findInitialState, findTransition, formatPayloadValidationError, getIsolatedCollectionName, getNamespacedEvent, interpolateProps, interpolateValue, isBrowser, isElectron, isNamespacedEvent, isNode, normalizeEventKey, parseNamespacedEvent, preprocessSchema, processEvent, validateEventPayload, validatePayloadShapes };
|
|
5336
|
-
//# sourceMappingURL=chunk-
|
|
5337
|
-
//# sourceMappingURL=chunk-
|
|
5340
|
+
//# sourceMappingURL=chunk-ODKFBOQG.js.map
|
|
5341
|
+
//# sourceMappingURL=chunk-ODKFBOQG.js.map
|