@voltro/database 0.11.3 → 0.12.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.
- package/CHANGELOG.md +436 -0
- package/dist/{fileBased-BrYB2u6E.js → fileBased-DEW2BvnP.js} +110 -100
- package/dist/index.d.ts +59 -1
- package/dist/index.js +584 -573
- package/dist/sql.d.ts +13 -0
- package/dist/sql.js +4 -4
- package/package.json +2 -2
package/dist/sql.d.ts
CHANGED
|
@@ -305,6 +305,19 @@ declare interface ColumnDefinition<TsType, Type extends ColumnType = ColumnType,
|
|
|
305
305
|
* no cipher is registered.
|
|
306
306
|
*/
|
|
307
307
|
readonly encrypted?: boolean;
|
|
308
|
+
/**
|
|
309
|
+
* Wire-exposure flag, set by `.serverOnly()`. When `true` the column is
|
|
310
|
+
* SERVER-INTERNAL: server code reads it normally (an auth middleware verifying
|
|
311
|
+
* a `keyHash`, say), but it must NEVER be serialized to a client. This is the
|
|
312
|
+
* EXPOSURE axis, orthogonal to `.encrypted()` (which is storage-at-rest): a
|
|
313
|
+
* column can be either, both, or neither — a hash you never ship is serverOnly
|
|
314
|
+
* but not encrypted; a private note the owner may read is encrypted but not
|
|
315
|
+
* serverOnly. The default is exposed to BOTH server and client; `.serverOnly()`
|
|
316
|
+
* opts a column OUT of the client. The table-aware read paths (`crud.*`) strip
|
|
317
|
+
* it automatically, and the boot audit flags a wire-reachable query whose
|
|
318
|
+
* `source` table carries a serverOnly column that its output declares.
|
|
319
|
+
*/
|
|
320
|
+
readonly serverOnly?: boolean;
|
|
308
321
|
/**
|
|
309
322
|
* Data-sensitivity classification, set by `.sensitive(class)`. Declares that
|
|
310
323
|
* this column holds personal / sensitive data of a given CLASS (`'email'`,
|
package/dist/sql.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { R as e, U as t, a as n, c as r, ct as i, i as a, n as o, nt as s, r as c, t as l, z as u } from "./fileBased-
|
|
1
|
+
import { R as e, U as t, a as n, c as r, ct as i, i as a, n as o, nt as s, r as c, t as l, z as u } from "./fileBased-DEW2BvnP.js";
|
|
2
2
|
import { Effect as d } from "effect";
|
|
3
3
|
import { createLogger as f } from "@voltro/logger";
|
|
4
4
|
import { SqlClient as p } from "@effect/sql";
|
|
@@ -637,9 +637,9 @@ BEGIN
|
|
|
637
637
|
}
|
|
638
638
|
return t;
|
|
639
639
|
}, Xe = (e) => {
|
|
640
|
-
if (!e.idScheme) return e;
|
|
641
|
-
let { idScheme: t,
|
|
642
|
-
return
|
|
640
|
+
if (!e.idScheme && !e.sensitive && !e.safe) return e;
|
|
641
|
+
let { idScheme: t, sensitive: n, safe: r, ...i } = e;
|
|
642
|
+
return i;
|
|
643
643
|
}, Ze = (e) => [...e].map(Xe).sort((e, t) => e.name.localeCompare(t.name)), Qe = (e) => [...e].sort((e, t) => e.name.localeCompare(t.name)), $e = (e) => [...e].map((e) => ({
|
|
644
644
|
name: e.name,
|
|
645
645
|
columns: Ze(e.columns),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voltro/database",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
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",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@effect/sql": "^0.51.1",
|
|
46
|
-
"@voltro/logger": "0.
|
|
46
|
+
"@voltro/logger": "0.12.0",
|
|
47
47
|
"typeid-js": "^1.2.0",
|
|
48
48
|
"ulidx": "^2.4.1"
|
|
49
49
|
},
|