@almadar/runtime 6.68.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.
@@ -63,7 +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 = false;
66
+ var NO_ROW_KEY_IS_FATAL = true;
67
67
  function needsPreprocessing(schema) {
68
68
  for (const orbital of schema.orbitals) {
69
69
  const uses = orbital.uses;
@@ -1575,7 +1575,11 @@ var OrbitalServerRuntime = class {
1575
1575
  resultData = updated || { id: updateId, ...data || {} };
1576
1576
  } else {
1577
1577
  effectLog.error("persist:no-row-key", { action, entityType: type });
1578
- if (NO_ROW_KEY_IS_FATAL) ;
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
+ }
1579
1583
  }
1580
1584
  break;
1581
1585
  case "delete": {
@@ -1594,7 +1598,11 @@ var OrbitalServerRuntime = class {
1594
1598
  resultData = { id: deleteId, deleted: true };
1595
1599
  } else {
1596
1600
  effectLog.error("persist:no-row-key", { action, entityType: type });
1597
- if (NO_ROW_KEY_IS_FATAL) ;
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
+ }
1598
1606
  }
1599
1607
  break;
1600
1608
  }
package/dist/index.js CHANGED
@@ -179,7 +179,7 @@ function createClientEffectHandlers(options) {
179
179
  }
180
180
  };
181
181
  }
182
- var NO_ROW_KEY_IS_FATAL = false;
182
+ var NO_ROW_KEY_IS_FATAL = true;
183
183
  var effectLog = createLogger("almadar:runtime:effects");
184
184
  function createServerEffectHandlers(opts) {
185
185
  const {
@@ -384,7 +384,11 @@ function createServerEffectHandlers(opts) {
384
384
  resultData = updated ?? { id: idOrFallback, ...row };
385
385
  } else {
386
386
  effectLog.error("persist:no-row-key", { action, entityType: type });
387
- if (NO_ROW_KEY_IS_FATAL) ;
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
+ }
388
392
  }
389
393
  break;
390
394
  }
@@ -403,7 +407,11 @@ function createServerEffectHandlers(opts) {
403
407
  resultData = { id: deleteId, deleted: true };
404
408
  } else {
405
409
  effectLog.error("persist:no-row-key", { action, entityType: type });
406
- if (NO_ROW_KEY_IS_FATAL) ;
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
+ }
407
415
  }
408
416
  break;
409
417
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@almadar/runtime",
3
- "version": "6.68.0",
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.78.0",
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.198.0"
64
+ "@almadar/std": "^16.199.0"
65
65
  },
66
66
  "peerDependencies": {
67
67
  "express": "^5.0.0"