@syncular/typegen 0.15.2 → 0.15.4

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.
@@ -762,7 +762,10 @@ class Validator {
762
762
  }
763
763
  candidates.push({ ref, scopes: inferred });
764
764
  }
765
- const dependencies = [...new Set(refs.map((ref) => ref.table))]
765
+ const ftsOwners = new Map(this.#ir.tables.flatMap((table) => table.ftsIndexes.map((index) => [index.name, table.name])));
766
+ const dependencies = [
767
+ ...new Set(refs.map((ref) => ftsOwners.get(ref.table) ?? ref.table)),
768
+ ]
766
769
  .sort()
767
770
  .map((table) => {
768
771
  const instances = candidates.filter((item) => item.ref.table === table);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@syncular/typegen",
3
- "version": "0.15.2",
3
+ "version": "0.15.4",
4
4
  "description": "Syncular schema-to-TypeScript type generator and the `syncular` CLI",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Benjamin Kniffler",
@@ -48,7 +48,7 @@
48
48
  "!dist/**/*.test.d.ts"
49
49
  ],
50
50
  "devDependencies": {
51
- "@syncular/core": "0.15.2",
52
- "@syncular/server": "0.15.2"
51
+ "@syncular/core": "0.15.4",
52
+ "@syncular/server": "0.15.4"
53
53
  }
54
54
  }
@@ -1149,7 +1149,14 @@ class Validator {
1149
1149
  candidates.push({ ref, scopes: inferred });
1150
1150
  }
1151
1151
 
1152
- const dependencies = [...new Set(refs.map((ref) => ref.table))]
1152
+ const ftsOwners = new Map(
1153
+ this.#ir.tables.flatMap((table) =>
1154
+ table.ftsIndexes.map((index) => [index.name, table.name] as const),
1155
+ ),
1156
+ );
1157
+ const dependencies = [
1158
+ ...new Set(refs.map((ref) => ftsOwners.get(ref.table) ?? ref.table)),
1159
+ ]
1153
1160
  .sort()
1154
1161
  .map((table) => {
1155
1162
  const instances = candidates.filter((item) => item.ref.table === table);