diff --git a/Dockerfile b/Dockerfile index 7a81091..badf8c5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM oven/bun:1 AS build WORKDIR /app COPY . . -RUN bun install --frozen-lockfile +RUN bun install RUN bunx --bun vite build FROM nginx:alpine diff --git a/eslint.config.js b/eslint.config.js index 9bd9ca1..a51352b 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -124,6 +124,14 @@ export default [ }, }, - // 5. PRETTIER AL FINAL + // 5. OVERRIDE: desactivar reglas para tipos generados por supabase + { + files: ['src/types/supabase.ts'], + rules: { + '@typescript-eslint/naming-convention': 'off', + }, + }, + + // 6. PRETTIER AL FINAL eslintConfigPrettier, ] diff --git a/package.json b/package.json index fce2a72..5449226 100644 --- a/package.json +++ b/package.json @@ -19,8 +19,8 @@ "dependencies": { "@radix-ui/react-alert-dialog": "^1.1.15", "@radix-ui/react-avatar": "^1.1.11", - "@radix-ui/react-collapsible": "^1.1.12", "@radix-ui/react-checkbox": "^1.3.3", + "@radix-ui/react-collapsible": "^1.1.12", "@radix-ui/react-dialog": "^1.1.15", "@radix-ui/react-dropdown-menu": "^2.1.16", "@radix-ui/react-label": "^2.1.8", @@ -50,13 +50,15 @@ "react-dom": "^19.2.0", "tailwind-merge": "^3.4.0", "tailwindcss": "^4.0.6", - "tw-animate-css": "^1.3.6" + "tw-animate-css": "^1.3.6", + "use-debounce": "^10.1.0" }, "devDependencies": { "@tanstack/devtools-vite": "^0.3.11", "@tanstack/eslint-config": "^0.3.0", "@testing-library/dom": "^10.4.0", "@testing-library/react": "^16.2.0", + "@types/bun": "^1.3.6", "@types/node": "^22.10.2", "@types/react": "^19.2.0", "@types/react-dom": "^19.2.0", @@ -70,6 +72,7 @@ "jsdom": "^27.0.0", "prettier": "^3.5.3", "prettier-plugin-tailwindcss": "^0.7.2", + "supabase": "^2.72.2", "typescript": "^5.7.2", "vite": "^7.1.7", "vitest": "^3.0.5", diff --git a/scripts/update-types.ts b/scripts/update-types.ts new file mode 100644 index 0000000..30ad115 --- /dev/null +++ b/scripts/update-types.ts @@ -0,0 +1,19 @@ +// 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); +} diff --git a/src/components/asignaturas/wizard/PasoConfiguracionPanel.tsx b/src/components/asignaturas/wizard/PasoConfiguracionPanel.tsx index a6e8429..c81fb77 100644 --- a/src/components/asignaturas/wizard/PasoConfiguracionPanel.tsx +++ b/src/components/asignaturas/wizard/PasoConfiguracionPanel.tsx @@ -67,7 +67,7 @@ export function PasoConfiguracionPanel({ }, })) } - className="min-h-[100px]" + className="min-h-25" />
{desc}
- {file.name} + {item.file.name} +
++ {formatFileSize(item.file.size)}
-{file.size}
{desc}
+ Ocurrió un error inesperado al cargar esta sección. +
+ + {/* Opcional: Mostrar el detalle técnico en desarrollo */} +
+ {error.message}
+
+
+
+ {JSON.stringify(p, null, 2)}
+