@schemic/surrealdb 0.1.0-alpha.0 → 0.1.0-alpha.2

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/lib/index.js CHANGED
@@ -250,6 +250,8 @@ var SFieldBase = class {
250
250
  this.schema = schema;
251
251
  this.native = native2;
252
252
  }
253
+ schema;
254
+ native;
253
255
  // --- Field-level codec (raw, on `this.schema`): `decode` reads (wire -> app), `encode`
254
256
  // writes (app -> wire). Create-shaping is a table concept, so these are NOT create-shaped —
255
257
  // e.g. `s.datetime().decode(dbDateTime) -> Date`, `s.uuid().encode("…") -> Uuid`. ---
@@ -733,6 +735,8 @@ var RecordIdField = class _RecordIdField extends SField {
733
735
  this.tables = tables;
734
736
  this.valueType = valueType;
735
737
  }
738
+ tables;
739
+ valueType;
736
740
  // The base `this`-returning wrappers (refine/superRefine/check/…) construct via `rebuild`. SField's
737
741
  // rebuild makes a plain SField, which would make `this` (typed RecordIdField) a LIE at runtime —
738
742
  // `s.recordId("x").refine(p).for(id)` would crash. Override so those chains stay a RecordIdField
@@ -1087,6 +1091,9 @@ var TableDef = class _TableDef {
1087
1091
  }
1088
1092
  this.object = z.object(zshape);
1089
1093
  }
1094
+ name;
1095
+ fields;
1096
+ config;
1090
1097
  /** Zod object over the inner schemas — drives validation, encode/decode, types. */
1091
1098
  object;
1092
1099
  get kind() {
@@ -1336,6 +1343,7 @@ var SystemView = class {
1336
1343
  for (const [k, f] of Object.entries(fields)) zshape[k] = f.schema;
1337
1344
  this.object = z.object(zshape);
1338
1345
  }
1346
+ fields;
1339
1347
  /** Zod object over ALL fields (internal included). */
1340
1348
  object;
1341
1349
  /** DB wire row -> app object (internal fields kept). */
@@ -1489,6 +1497,10 @@ var RelationDef = class _RelationDef extends TableDef {
1489
1497
  this.toNames = toNames;
1490
1498
  this.isEnforced = isEnforced;
1491
1499
  }
1500
+ edge;
1501
+ fromNames;
1502
+ toNames;
1503
+ isEnforced;
1492
1504
  /** Restrict the source endpoint(s) (`in`). */
1493
1505
  from(ref) {
1494
1506
  return new _RelationDef(
@@ -1537,6 +1549,10 @@ var EventDef = class {
1537
1549
  this.when = when;
1538
1550
  this.then = then;
1539
1551
  }
1552
+ table;
1553
+ name;
1554
+ when;
1555
+ then;
1540
1556
  kind = "event";
1541
1557
  };
1542
1558
  function defineEvent(table, name, spec) {
@@ -1549,6 +1565,9 @@ var FunctionDef = class _FunctionDef {
1549
1565
  this.args = args;
1550
1566
  this.config = config;
1551
1567
  }
1568
+ name;
1569
+ args;
1570
+ config;
1552
1571
  kind = "function";
1553
1572
  withConfig(c) {
1554
1573
  return new _FunctionDef(this.name, this.args, { ...this.config, ...c });
@@ -1583,6 +1602,8 @@ var AccessDef = class _AccessDef {
1583
1602
  this.name = name;
1584
1603
  this.config = config;
1585
1604
  }
1605
+ name;
1606
+ config;
1586
1607
  kind = "access";
1587
1608
  withConfig(c) {
1588
1609
  return new _AccessDef(this.name, { ...this.config, ...c });
@@ -1630,6 +1651,8 @@ var AnalyzerDef = class {
1630
1651
  this.name = name;
1631
1652
  this.config = config;
1632
1653
  }
1654
+ name;
1655
+ config;
1633
1656
  kind = "analyzer";
1634
1657
  };
1635
1658
  function defineAnalyzer(name, config) {