This commit is contained in:
2026-01-13 14:30:57 -06:00
parent 55c37b83b4
commit b08d58e262
12 changed files with 178 additions and 107 deletions

18
scripts/update-types.ts Normal file
View File

@@ -0,0 +1,18 @@
// scripts/update-types.ts
// Uso:
// bun run scripts/update-types.ts
import { $ } from "bun";
console.log("🔄 Generando tipos de Supabase...");
try {
// Ejecutamos el comando y capturamos la salida como texto
const output = await $`supabase gen types typescript --linked`.text();
// Escribimos el archivo directamente con Bun (garantiza UTF-8)
await Bun.write("src/types/supabase.ts", output);
console.log("✅ Tipos actualizados correctamente con acentos.");
} catch (error) {
console.error("❌ Error generando tipos:", error);
}