@almadar/runtime 6.67.0 → 6.69.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 } from './chunk-
|
|
2
|
-
export { InMemoryPersistence, collectDeclaredConfigDefaults } from './chunk-
|
|
1
|
+
import { createTickScheduler, EventBus, createUnifiedLoader, MockPersistenceAdapter, InMemoryPersistence, preprocessSchema, normalizeCallSiteConfigToValues, StateMachineManager, parseDurationString, validateEventPayload, formatPayloadValidationError, collectDeclaredConfigDefaults, collectDeclaredEntityDefaults, EffectExecutor } from './chunk-XSWRK6DN.js';
|
|
2
|
+
export { InMemoryPersistence, collectDeclaredConfigDefaults } from './chunk-XSWRK6DN.js';
|
|
3
3
|
import { isValidCronExpression } from './chunk-OU3ITB5S.js';
|
|
4
4
|
import { createContextFromBindings, checkMutationAccess, resolveCallSitePayloadCaptures, applyRowAccess, accessDeniedMessage } from './chunk-ZJ62H3ES.js';
|
|
5
5
|
import './chunk-T4VDAB4C.js';
|
|
@@ -63,6 +63,7 @@ var dynamicLog = createLogger("almadar:runtime:dynamic");
|
|
|
63
63
|
function isNodeEnv() {
|
|
64
64
|
return typeof process !== "undefined" && Boolean(process.versions?.node);
|
|
65
65
|
}
|
|
66
|
+
var NO_ROW_KEY_IS_FATAL = true;
|
|
66
67
|
function needsPreprocessing(schema) {
|
|
67
68
|
for (const orbital of schema.orbitals) {
|
|
68
69
|
const uses = orbital.uses;
|
|
@@ -1572,6 +1573,13 @@ var OrbitalServerRuntime = class {
|
|
|
1572
1573
|
await this.persistence.update(type, updateId, data || {});
|
|
1573
1574
|
const updated = await this.persistence.getById(type, updateId);
|
|
1574
1575
|
resultData = updated || { id: updateId, ...data || {} };
|
|
1576
|
+
} else {
|
|
1577
|
+
effectLog.error("persist:no-row-key", { action, entityType: type });
|
|
1578
|
+
if (NO_ROW_KEY_IS_FATAL) {
|
|
1579
|
+
throw new Error(
|
|
1580
|
+
`persist ${action} ${type} resolved no row key \u2014 the id was neither on the row being written nor on the request. Bind it before the write, e.g. (set @entity.id ?row.id) on the transition that selects it.`
|
|
1581
|
+
);
|
|
1582
|
+
}
|
|
1575
1583
|
}
|
|
1576
1584
|
break;
|
|
1577
1585
|
case "delete": {
|
|
@@ -1588,6 +1596,13 @@ var OrbitalServerRuntime = class {
|
|
|
1588
1596
|
await this.enforceOnDeleteRules(type, deleteId);
|
|
1589
1597
|
await this.persistence.delete(type, deleteId);
|
|
1590
1598
|
resultData = { id: deleteId, deleted: true };
|
|
1599
|
+
} else {
|
|
1600
|
+
effectLog.error("persist:no-row-key", { action, entityType: type });
|
|
1601
|
+
if (NO_ROW_KEY_IS_FATAL) {
|
|
1602
|
+
throw new Error(
|
|
1603
|
+
`persist ${action} ${type} resolved no row key \u2014 the id was neither on the row being written nor on the request. Bind it before the write, e.g. (set @entity.id ?row.id) on the transition that selects it.`
|
|
1604
|
+
);
|
|
1605
|
+
}
|
|
1591
1606
|
}
|
|
1592
1607
|
break;
|
|
1593
1608
|
}
|
|
@@ -5008,6 +5008,10 @@ async function preprocessSchema(schema, options) {
|
|
|
5008
5008
|
name: orbitalName,
|
|
5009
5009
|
description: resolvedOrbital.original.description,
|
|
5010
5010
|
visual_prompt: resolvedOrbital.original.visual_prompt,
|
|
5011
|
+
// The orbital's skin (registry key or inline ThemeDefinition) — dropped
|
|
5012
|
+
// by this field-by-field rebuild until 2026-09-01, so `/api/schema`
|
|
5013
|
+
// served theme-less orbitals and OrbitalThemeProvider no-opped.
|
|
5014
|
+
theme: resolvedOrbital.original.theme,
|
|
5011
5015
|
// Resolved entity (always inline now)
|
|
5012
5016
|
entity: resolvedOrbital.entity,
|
|
5013
5017
|
// Resolved traits (inline definitions)
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { EffectExecutor } from './chunk-
|
|
2
|
-
export { EffectExecutor, EventBus, HANDLER_MANIFEST, InMemoryPersistence, 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-XSWRK6DN.js';
|
|
2
|
+
export { EffectExecutor, EventBus, HANDLER_MANIFEST, InMemoryPersistence, 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-XSWRK6DN.js';
|
|
3
3
|
export { cronMatches, cronMinuteKey, isValidCronExpression, parseCron, parseCronField } from './chunk-OU3ITB5S.js';
|
|
4
4
|
import { createContextFromBindings, applyRowAccess, checkMutationAccess, accessDeniedMessage } from './chunk-ZJ62H3ES.js';
|
|
5
5
|
export { CALLSITE_PAYLOAD_PREFIX, applyRowAccess, checkMutationAccess, containsBindings, createContextFromBindings, createMinimalContext, deferEntityBindings, extractBindings, interpolateProps, interpolateValue, resolveCallSitePayloadCaptures } from './chunk-ZJ62H3ES.js';
|
|
@@ -179,6 +179,7 @@ function createClientEffectHandlers(options) {
|
|
|
179
179
|
}
|
|
180
180
|
};
|
|
181
181
|
}
|
|
182
|
+
var NO_ROW_KEY_IS_FATAL = true;
|
|
182
183
|
var effectLog = createLogger("almadar:runtime:effects");
|
|
183
184
|
function createServerEffectHandlers(opts) {
|
|
184
185
|
const {
|
|
@@ -381,6 +382,13 @@ function createServerEffectHandlers(opts) {
|
|
|
381
382
|
await persistence.update(type, idOrFallback, row);
|
|
382
383
|
const updated = await persistence.getById(type, idOrFallback);
|
|
383
384
|
resultData = updated ?? { id: idOrFallback, ...row };
|
|
385
|
+
} else {
|
|
386
|
+
effectLog.error("persist:no-row-key", { action, entityType: type });
|
|
387
|
+
if (NO_ROW_KEY_IS_FATAL) {
|
|
388
|
+
throw new Error(
|
|
389
|
+
`persist ${action} ${type} resolved no row key \u2014 the id was neither on the row being written nor on the request. Bind it before the write, e.g. (set @entity.id ?row.id) on the transition that selects it.`
|
|
390
|
+
);
|
|
391
|
+
}
|
|
384
392
|
}
|
|
385
393
|
break;
|
|
386
394
|
}
|
|
@@ -397,6 +405,13 @@ function createServerEffectHandlers(opts) {
|
|
|
397
405
|
}
|
|
398
406
|
await persistence.delete(type, deleteId);
|
|
399
407
|
resultData = { id: deleteId, deleted: true };
|
|
408
|
+
} else {
|
|
409
|
+
effectLog.error("persist:no-row-key", { action, entityType: type });
|
|
410
|
+
if (NO_ROW_KEY_IS_FATAL) {
|
|
411
|
+
throw new Error(
|
|
412
|
+
`persist ${action} ${type} resolved no row key \u2014 the id was neither on the row being written nor on the request. Bind it before the write, e.g. (set @entity.id ?row.id) on the transition that selects it.`
|
|
413
|
+
);
|
|
414
|
+
}
|
|
400
415
|
}
|
|
401
416
|
break;
|
|
402
417
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@almadar/runtime",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.69.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.79.0",
|
|
61
61
|
"@almadar/evaluator": "^2.43.0",
|
|
62
62
|
"@almadar/logger": "^1.12.0",
|
|
63
63
|
"@almadar/server": "^2.39.0",
|
|
64
|
-
"@almadar/std": "^16.
|
|
64
|
+
"@almadar/std": "^16.199.0"
|
|
65
65
|
},
|
|
66
66
|
"peerDependencies": {
|
|
67
67
|
"express": "^5.0.0"
|