@voltro/database 0.62.2 → 0.62.3

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.
package/CHANGELOG.md CHANGED
@@ -39,6 +39,19 @@ _Changes staged for the next release accumulate here (rolled up from
39
39
 
40
40
  ---
41
41
 
42
+ ## [0.62.3] — 2026-09-03
43
+
44
+ ### Added
45
+
46
+ - **@voltro/runtime** — `EffectStore` now exposes the complete Promise-store mutation surface plus transactions that roll back while preserving an inner Effect Cause. `defineSubscriber` accepts `eachReplica: true` so local per-replica work can state its topology explicitly; it cannot be combined with `once`.
47
+
48
+ ### Fixed
49
+
50
+ - **@voltro/cli** — `voltro build` no longer starts Vite's HMR WebSocket while pre-rendering. A `RedirectError` from a static loader is now emitted as redirect metadata and served by `voltro start` with its exact status and `Location`; unrelated loader errors still fail the build.
51
+ - **@voltro/cli, @voltro/database, @voltro/plugin-storage** — `voltro doctor` now resolves grouped event bindings and narrows its hand-roll, junction, ownership, nullable-write, singleton-read, and UI reachability checks to evidence they can actually prove. Ids owned by external systems can be declared with `.externalId()`; plugin references and non-FK asset references carry that metadata automatically.
52
+
53
+ ---
54
+
42
55
  ## [0.62.2] — 2026-09-03
43
56
 
44
57
  ### Added
@@ -38,6 +38,13 @@ var r = (e) => {
38
38
  nullable: !0
39
39
  });
40
40
  }
41
+ externalId() {
42
+ if (this.rejectIfRaw("externalId"), this.definition.type === "reference" || this.definition.type === "id") throw Error(`.externalId() requires a scalar non-primary-key column (got ${this.definition.type}) — \`reference()\` is local by definition and \`id()\` identifies this row.`);
43
+ return new e({
44
+ ...this.definition,
45
+ externalId: !0
46
+ });
47
+ }
41
48
  encrypted() {
42
49
  return this.rejectIfRaw("encrypted"), new e({
43
50
  ...this.definition,
package/dist/index.d.ts CHANGED
@@ -946,6 +946,13 @@ export declare class ColumnBuilder<TsType, Type extends ColumnType, HasDefault e
946
946
  */
947
947
  private rejectIfRaw;
948
948
  nullable(): ColumnBuilder<TsType | null, Type, HasDefault>;
949
+ /**
950
+ * Declare that this scalar id points outside the app's local database graph.
951
+ * Use it for provider, gateway, hardware, polymorphic, or cross-installation
952
+ * identifiers that intentionally must not become `reference()` columns.
953
+ * This is schema metadata only and does not change the SQL column.
954
+ */
955
+ externalId(): this;
949
956
  /**
950
957
  * Encrypt this column's value at rest (AES-256-GCM). The runtime
951
958
  * store middleware transparently encrypts on write + decrypts on
@@ -1382,6 +1389,12 @@ export declare interface ColumnDefinition<TsType, Type extends ColumnType = Colu
1382
1389
  * overhead.
1383
1390
  */
1384
1391
  readonly fkAutoIndex?: boolean;
1392
+ /**
1393
+ * This id-shaped scalar names something outside the local relational graph.
1394
+ * Set by `.externalId()` so schema audits do not guess a local FK from the
1395
+ * column name. Metadata only; it emits no constraint or DDL.
1396
+ */
1397
+ readonly externalId?: boolean;
1385
1398
  readonly jsonType?: unknown;
1386
1399
  /**
1387
1400
  * Closed value set, set by `text().oneOf([...])`. When present:
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as e, $t as t, A as n, At as r, B as i, Bt as a, C as o, Ct as s, D as c, Dt as l, E as u, Et as d, F as f, Ft as p, G as m, Gt as h, H as g, Ht as _, I as ee, It as te, J as ne, Jt as v, K as y, Kt as re, L as b, Lt as ie, M as ae, Mt as oe, N as x, Nt as se, O as ce, Ot as le, P as ue, Pt as de, Q as fe, Qt as pe, R as me, Rt as he, S as ge, St as _e, T as ve, Tt as ye, U as be, Ut as S, V as xe, Vt as Se, W as Ce, Wt as we, X as Te, Xt as Ee, Y as De, Yt as Oe, Z as ke, Zt as Ae, _ as je, _t as Me, a as Ne, at as Pe, b as Fe, bt as Ie, c as Le, ct as Re, d as ze, dt as Be, en as C, et as Ve, f as He, ft as Ue, g as We, gt as Ge, h as w, ht as Ke, it as T, j as qe, jt as Je, k as Ye, kt as Xe, l as Ze, lt as Qe, m as $e, mt as et, n as tt, nt, o as rt, ot as it, p as at, pt as ot, q as E, qt as st, r as ct, rt as lt, s as ut, st as dt, t as ft, tn as pt, tt as mt, u as ht, ut as gt, v as _t, vt, w as yt, wt as bt, x as xt, xt as St, y as Ct, yt as wt, z as Tt, zt as Et } from "./frameworkLiveTables-CwDemhjW.js";
1
+ import { $ as e, $t as t, A as n, At as r, B as i, Bt as a, C as o, Ct as s, D as c, Dt as l, E as u, Et as d, F as f, Ft as p, G as m, Gt as h, H as g, Ht as _, I as ee, It as te, J as ne, Jt as v, K as y, Kt as re, L as b, Lt as ie, M as ae, Mt as oe, N as x, Nt as se, O as ce, Ot as le, P as ue, Pt as de, Q as fe, Qt as pe, R as me, Rt as he, S as ge, St as _e, T as ve, Tt as ye, U as be, Ut as S, V as xe, Vt as Se, W as Ce, Wt as we, X as Te, Xt as Ee, Y as De, Yt as Oe, Z as ke, Zt as Ae, _ as je, _t as Me, a as Ne, at as Pe, b as Fe, bt as Ie, c as Le, ct as Re, d as ze, dt as Be, en as C, et as Ve, f as He, ft as Ue, g as We, gt as Ge, h as w, ht as Ke, it as T, j as qe, jt as Je, k as Ye, kt as Xe, l as Ze, lt as Qe, m as $e, mt as et, n as tt, nt, o as rt, ot as it, p as at, pt as ot, q as E, qt as st, r as ct, rt as lt, s as ut, st as dt, t as ft, tn as pt, tt as mt, u as ht, ut as gt, v as _t, vt, w as yt, wt as bt, x as xt, xt as St, y as Ct, yt as wt, z as Tt, zt as Et } from "./frameworkLiveTables-CewCJ809.js";
2
2
  import { timestampMs as Dt, timestampMsOrNull as Ot } from "./wire.js";
3
3
  import { Cause as kt, Chunk as At, Data as jt, Effect as D, Exit as Mt, Metric as O, MetricBoundaries as Nt, Option as k, Runtime as Pt, Schedule as Ft, Schema as A, Stream as It } from "effect";
4
4
  import { createHash as Lt } from "node:crypto";
package/dist/sql.d.ts CHANGED
@@ -428,6 +428,12 @@ declare interface ColumnDefinition<TsType, Type extends ColumnType = ColumnType,
428
428
  * overhead.
429
429
  */
430
430
  readonly fkAutoIndex?: boolean;
431
+ /**
432
+ * This id-shaped scalar names something outside the local relational graph.
433
+ * Set by `.externalId()` so schema audits do not guess a local FK from the
434
+ * column name. Metadata only; it emits no constraint or DDL.
435
+ */
436
+ readonly externalId?: boolean;
431
437
  readonly jsonType?: unknown;
432
438
  /**
433
439
  * Closed value set, set by `text().oneOf([...])`. When present:
package/dist/sql.js CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as e, $t as t, Ht as n, Ut as r, a as i, at as a, c as o, d as s, en as c, et as l, g as u, h as d, i as f, it as p, o as m, r as h, s as g, tt as _, u as v, vt as y, wt as b, y as x } from "./frameworkLiveTables-CwDemhjW.js";
1
+ import { $ as e, $t as t, Ht as n, Ut as r, a as i, at as a, c as o, d as s, en as c, et as l, g as u, h as d, i as f, it as p, o as m, r as h, s as g, tt as _, u as v, vt as y, wt as b, y as x } from "./frameworkLiveTables-CewCJ809.js";
2
2
  import { Effect as S, Schedule as C } from "effect";
3
3
  import { createHash as w } from "node:crypto";
4
4
  import { createLogger as T } from "@voltro/logger";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voltro/database",
3
- "version": "0.62.2",
3
+ "version": "0.62.3",
4
4
  "description": "Browser-safe schema DSL, query builder, and cross-dialect migration planner for Voltro — one schema, every SQL backend.",
5
5
  "keywords": [
6
6
  "voltro",
@@ -44,7 +44,7 @@
44
44
  },
45
45
  "dependencies": {
46
46
  "@effect/sql": "^0.52.0",
47
- "@voltro/logger": "0.62.2",
47
+ "@voltro/logger": "0.62.3",
48
48
  "typeid-js": "^1.2.0",
49
49
  "ulidx": "^2.4.1"
50
50
  },