From 599cb24f8d8583a6a264c7ca36b292748a9409da Mon Sep 17 00:00:00 2001 From: josedario87 Date: Sun, 19 Oct 2025 03:14:14 -0600 Subject: [PATCH] Fix: Resolver todos los errores de TypeScript MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ERRORES RESUELTOS: 1. Colores de botones inválidos → colores válidos: - 'orange' → 'warning' (BackendVerificationButton) - 'purple' → 'primary' (FrontendVerificationButton) - 'red' → 'error' (CheckAuthentikAdminsButton) - 'blue' → 'info' (CheckGrupoPruebaButton) - 'green' → 'success' (CheckLvl0Button) - 'gray' → 'neutral' (CheckPublicAccessButton, UserMetadata) 2. Tipos no exportados en Nuxt UI v4: - Removidos imports: ButtonColor, ButtonVariant, ButtonSize - Reemplazados con tipos literales inline - Removido 'none' de variant (no válido en v4) 3. Subcategoria puede ser null: - FormularioMuestra: tipo cambiado a Exclude - sesion.vue: agregado ?? 'null' para key y guards para null 4. process.client no definido: - useCatacion.ts: process.client → import.meta.client (2 lugares) - Nuxt 4 usa import.meta.client en lugar de process.client 5. process.env en nuxt.config.ts: - Removido process.env.NUXT_PUBLIC_AUTHENTIK_URL - Nuxt runtimeConfig lee automáticamente de .env - Solo valor por defecto necesario 6. Propiedades no válidas en PWA manifest: - Removido: capture_links (no existe en ManifestOptions) - Removido: url_handlers (no existe en ManifestOptions) - Removido: handle_links (no existe en ManifestOptions) 7. Toast props no válidas: - Removido: timeout (no existe en Toast type) - BackendVerificationButton y FrontendVerificationButton RESULTADO: ✅ npx nuxi typecheck pasa sin errores ✅ Solo warnings de @nuxt/content (no críticos) --- nuxt4/app/components/auth/BackendVerificationButton.vue | 7 +++---- nuxt4/app/components/auth/CheckAuthentikAdminsButton.vue | 2 +- nuxt4/app/components/auth/CheckGrupoPruebaButton.vue | 2 +- nuxt4/app/components/auth/CheckLvl0Button.vue | 2 +- nuxt4/app/components/auth/CheckPublicAccessButton.vue | 2 +- nuxt4/app/components/auth/FrontendVerificationButton.vue | 7 +++---- nuxt4/app/components/auth/GroupCheckButton.vue | 8 +++----- nuxt4/app/components/auth/UserMetadata.vue | 2 +- nuxt4/app/components/cata/FormularioMuestra.vue | 4 ++-- nuxt4/app/components/cata/SelectorFamilia.vue | 2 +- nuxt4/app/composables/useCatacion.ts | 4 ++-- nuxt4/app/pages/cata/sesion.vue | 6 +++--- nuxt4/nuxt.config.ts | 9 +-------- 13 files changed, 23 insertions(+), 34 deletions(-) diff --git a/nuxt4/app/components/auth/BackendVerificationButton.vue b/nuxt4/app/components/auth/BackendVerificationButton.vue index a3cf8c0..655bd93 100644 --- a/nuxt4/app/components/auth/BackendVerificationButton.vue +++ b/nuxt4/app/components/auth/BackendVerificationButton.vue @@ -1,6 +1,6 @@