@supawatch/target-supabase-types 0.8.0 → 0.9.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.
Files changed (2) hide show
  1. package/dist/index.js +3 -1
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -20,6 +20,8 @@ function tsType(runtime, jsonRef) {
20
20
  return el.includes("|") ? `(${el})[]` : `${el}[]`;
21
21
  }
22
22
  case "enum":
23
+ if (runtime.labels.length === 0)
24
+ return "never";
23
25
  return runtime.labels.map((l) => JSON.stringify(l)).join(" | ");
24
26
  }
25
27
  }
@@ -174,7 +176,7 @@ export class SupabaseTypesTarget {
174
176
  }
175
177
  lines.push(" Enums: {");
176
178
  for (const e of enums) {
177
- lines.push(` ${tsKey(e.name)}: ${e.labels.map((l) => JSON.stringify(l)).join(" | ")};`);
179
+ lines.push(` ${tsKey(e.name)}: ${e.labels.length === 0 ? "never" : e.labels.map((l) => JSON.stringify(l)).join(" | ")};`);
178
180
  }
179
181
  lines.push(" };");
180
182
  lines.push(" CompositeTypes: {");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@supawatch/target-supabase-types",
3
- "version": "0.8.0",
3
+ "version": "0.9.0",
4
4
  "description": "A supabase-js compatible Database interface generated from live Postgres by supawatch, foreign-key relationships included.",
5
5
  "keywords": [
6
6
  "supabase",
@@ -33,7 +33,7 @@
33
33
  "dist"
34
34
  ],
35
35
  "dependencies": {
36
- "@supawatch/core": "0.8.0"
36
+ "@supawatch/core": "0.9.0"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@types/node": "^22.20.1",