@sequenceholdings/orm 2.5.0 → 2.6.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sequenceholdings/orm",
3
- "version": "2.5.0",
3
+ "version": "2.6.1",
4
4
  "description": "Sequence ORM v2 — TypeScript-defined governed tables and persisted GraphQL operations",
5
5
  "license": "UNLICENSED",
6
6
  "repository": {
@@ -4,6 +4,7 @@
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "validate": "seq-studio orm validate",
7
+ "lint": "seq-studio orm validate",
7
8
  "generate": "seq-studio orm generate",
8
9
  "diff": "seq-studio orm diff",
9
10
  "apply": "seq-studio orm apply",
@@ -20,6 +21,7 @@
20
21
  "@graphql-codegen/typed-document-node": "^5.1.1",
21
22
  "@graphql-codegen/typescript": "^4.1.6",
22
23
  "@graphql-codegen/typescript-operations": "^4.6.1",
24
+ "@sequenceholdings/studio-cli": "^0.5.1",
23
25
  "typescript": "^5.6.0"
24
26
  },
25
27
  "engines": {
@@ -1,4 +1,6 @@
1
- import { defineEnum, defineTable, t, toMany, toOne, toPlatformUser } from '@sequenceholdings/orm/authoring'
1
+ import {
2
+ defineEnum, defineTable, t, toMany, toOne, toPlatformUser, type SeqTable,
3
+ } from '@sequenceholdings/orm/authoring'
2
4
 
3
5
  /**
4
6
  * Tables are TypeScript, but they SERIALIZE to data — the server never runs
@@ -17,7 +19,9 @@ import { defineEnum, defineTable, t, toMany, toOne, toPlatformUser } from '@sequ
17
19
  */
18
20
  export const dealStatus = defineEnum('deal_status', ['open', 'won', 'lost'])
19
21
 
20
- export const deals = defineTable(
22
+ // Tables that link to each other need an explicit `SeqTable` annotation:
23
+ // TypeScript cannot infer a type through a mutually recursive `() => table`.
24
+ export const deals: SeqTable = defineTable(
21
25
  'deals',
22
26
  {
23
27
  id: t.uuid().primaryKey().default('gen_random_uuid()'),
@@ -48,7 +52,7 @@ export const deals = defineTable(
48
52
  },
49
53
  )
50
54
 
51
- export const comments = defineTable(
55
+ export const comments: SeqTable = defineTable(
52
56
  'comments',
53
57
  {
54
58
  id: t.uuid().primaryKey().default('gen_random_uuid()'),