Files
moyosapp_beta.0.0.3.3_beta1/package.json
moyoza 5d8a72b0a5 feat: Add handler validation script to prevent undefined function errors
- Create validate-handlers.js script to check for undefined event handlers
- Add npm run validate:handlers command
- Add prebuild hook to run validation before builds
- Add ESLint no-undef rule to catch undefined references
- Add documentation in scripts/README-validation.md

Prevents issues like 'ReferenceError: handleSaveEditGuestbook is not defined'
by validating all onClick/onChange/onSubmit handlers are defined before use.

The script:
- Scans all React components for event handlers
- Verifies functions are defined in component scope
- Excludes props and imported functions
- Runs automatically before builds
- Can be run manually: npm run validate:handlers
2026-01-22 17:30:22 +02:00

150 lines
4.9 KiB
JSON

{
"name": "moyosapp",
"version": "0.0.3.3_beta",
"private": true,
"scripts": {
"dev": "prisma generate && next dev",
"build": "prisma generate && next build",
"start": "next start",
"lint": "eslint",
"typecheck": "tsc --noEmit",
"test": "jest",
"test:watch": "jest --watch",
"test:coverage": "jest --coverage",
"test:e2e": "playwright test",
"test:e2e:ui": "playwright test --ui",
"analyze": "ANALYZE=true npm run build",
"security:audit": "npm audit --audit-level high",
"security:audit:fix": "npm audit fix",
"security:snyk": "snyk test",
"security:snyk:monitor": "snyk monitor",
"build:security": "next build && npm run security:audit",
"facts": "tsx scripts/inventory.ts --out conductor/artifacts/facts.json",
"regressions": "tsx scripts/assert-regressions.ts",
"postinstall": "prisma generate",
"db:push": "prisma db push",
"db:migrate": "prisma migrate deploy",
"prisma:seed": "tsx prisma/seed.ts",
"db:seed": "tsx prisma/seed.ts",
"db:studio": "prisma studio",
"db:reset": "prisma migrate reset",
"admin:reset-password": "tsx scripts/reset-admin-password.ts",
"admin:set-password": "tsx scripts/set-admin-password.ts",
"admin:quick-set": "tsx scripts/quick-set-password.ts",
"admin:create-user": "tsx scripts/create-admin-user.ts",
"test:redis": "tsx scripts/test-redis.ts",
"redis:populate": "tsx scripts/populate-redis-test.ts",
"redis:populate-app": "tsx scripts/populate-app-redis.ts",
"redis:cleanup": "tsx scripts/cleanup-redis-test.ts",
"validate:handlers": "node scripts/validate-handlers.js",
"prebuild": "npm run validate:handlers"
},
"prisma": {
"schema": "prisma/schema.prisma"
},
"dependencies": {
"@babel/preset-env": "^7.28.5",
"@babel/preset-react": "^7.28.5",
"@babel/preset-typescript": "^7.28.5",
"@dnd-kit/core": "^6.3.1",
"@dnd-kit/sortable": "^10.0.0",
"@dnd-kit/utilities": "^3.2.2",
"@hookform/resolvers": "^5.2.2",
"@next/bundle-analyzer": "^16.1.1",
"@next/third-parties": "^16.1.1",
"@prisma/adapter-pg": "^7.2.0",
"@prisma/client": "^7.2.0",
"@radix-ui/react-accordion": "^1.2.12",
"@radix-ui/react-alert-dialog": "^1.1.15",
"@radix-ui/react-avatar": "^1.1.11",
"@radix-ui/react-checkbox": "^1.3.3",
"@radix-ui/react-collapsible": "^1.1.12",
"@radix-ui/react-context-menu": "^2.2.16",
"@radix-ui/react-dialog": "^1.1.15",
"@radix-ui/react-dropdown-menu": "^2.1.16",
"@radix-ui/react-label": "^2.1.8",
"@radix-ui/react-navigation-menu": "^1.2.14",
"@radix-ui/react-popover": "^1.1.15",
"@radix-ui/react-progress": "^1.1.8",
"@radix-ui/react-radio-group": "^1.3.8",
"@radix-ui/react-select": "^2.2.6",
"@radix-ui/react-separator": "^1.1.8",
"@radix-ui/react-slot": "^1.2.4",
"@radix-ui/react-switch": "^1.2.6",
"@radix-ui/react-tabs": "^1.1.13",
"@radix-ui/react-tooltip": "^1.2.8",
"@sentry/nextjs": "^10.32.1",
"@supabase/ssr": "^0.8.0",
"@supabase/supabase-js": "^2.90.1",
"@tailwindcss/postcss": "^4",
"@types/bcryptjs": "^2.4.6",
"@types/jspdf": "^1.3.3",
"@types/node": "^20",
"@types/pg": "^8.11.6",
"@types/qrcode": "^1.5.6",
"@types/react": "^19",
"@types/react-dom": "^19",
"@types/speakeasy": "^2.0.10",
"@use-gesture/react": "^10.3.1",
"bcryptjs": "^3.0.3",
"canvas-confetti": "^1.9.4",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"cmdk": "^1.1.1",
"date-fns": "^4.1.0",
"eslint": "^9",
"eslint-config-next": "16.0.10",
"exceljs": "^4.4.0",
"fast-glob": "^3.3.3",
"framer-motion": "^12.23.26",
"html2canvas": "^1.4.1",
"ioredis": "^5.9.0",
"iron-session": "^8.0.4",
"jspdf": "^4.0.0",
"jspdf-autotable": "^5.0.7",
"lottie-react": "^2.4.1",
"lucide-react": "^0.561.0",
"next": "^16.1.1",
"node-addon-api": "^8.5.0",
"pathe": "^2.0.3",
"pg": "^8.11.3",
"prisma": "^7.2.0",
"qrcode": "^1.5.4",
"qrcode.react": "^4.2.0",
"react": "19.2.1",
"react-day-picker": "^9.13.0",
"react-dom": "19.2.1",
"react-easy-crop": "^5.5.6",
"react-hook-form": "^7.70.0",
"resend": "^6.7.0",
"server-only": "^0.0.1",
"sharp": "^0.34.5",
"snyk": "^1.1301.2",
"sonner": "^2.0.7",
"speakeasy": "^2.0.0",
"supabase": "^2.72.1",
"swr": "^2.3.8",
"tailwind-merge": "^3.4.0",
"tailwindcss": "^4",
"tsx": "^4.21.0",
"tw-animate-css": "^1.4.0",
"twilio": "^5.11.2",
"typescript": "^5",
"valibot": "^1.2.0",
"zod": "^4.3.5"
},
"devDependencies": {
"@playwright/test": "^1.57.0",
"@testing-library/jest-dom": "^6.9.1",
"@testing-library/react": "^16.3.1",
"@testing-library/user-event": "^14.6.1",
"@types/jest": "^30.0.0",
"babel-jest": "^30.2.0",
"dotenv": "^16.4.5",
"jest": "^30.2.0",
"jest-environment-jsdom": "^30.2.0",
"node-gyp": "^12.1.0",
"playwright": "^1.57.0"
}
}