postgresdk 0.9.2 → 0.9.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/dist/cli.js CHANGED
@@ -602,8 +602,12 @@ function generateIncludeMethods(table, graph, opts, allTables) {
602
602
  continue;
603
603
  const [key1, edge1] = entry1;
604
604
  const [key2, edge2] = entry2;
605
- if (opts.skipJunctionTables && (edge1.target.includes("_") || edge2.target.includes("_"))) {
606
- continue;
605
+ if (opts.skipJunctionTables && allTables) {
606
+ const table1 = allTables.find((t) => t.name === edge1.target);
607
+ const table2 = allTables.find((t) => t.name === edge2.target);
608
+ if (table1 && isJunctionTable(table1) || table2 && isJunctionTable(table2)) {
609
+ continue;
610
+ }
607
611
  }
608
612
  const combinedPath = [key1, key2];
609
613
  const combinedSuffix = `With${pascal(key1)}And${pascal(key2)}`;
package/dist/index.js CHANGED
@@ -601,8 +601,12 @@ function generateIncludeMethods(table, graph, opts, allTables) {
601
601
  continue;
602
602
  const [key1, edge1] = entry1;
603
603
  const [key2, edge2] = entry2;
604
- if (opts.skipJunctionTables && (edge1.target.includes("_") || edge2.target.includes("_"))) {
605
- continue;
604
+ if (opts.skipJunctionTables && allTables) {
605
+ const table1 = allTables.find((t) => t.name === edge1.target);
606
+ const table2 = allTables.find((t) => t.name === edge2.target);
607
+ if (table1 && isJunctionTable(table1) || table2 && isJunctionTable(table2)) {
608
+ continue;
609
+ }
606
610
  }
607
611
  const combinedPath = [key1, key2];
608
612
  const combinedSuffix = `With${pascal(key1)}And${pascal(key2)}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "postgresdk",
3
- "version": "0.9.2",
3
+ "version": "0.9.3",
4
4
  "description": "Generate a typed server/client SDK from a Postgres schema (includes, Zod, Hono).",
5
5
  "type": "module",
6
6
  "bin": {