- SQLite (better-sqlite3 + TypeORM, WAL) con tabla menu_permissions (usuario web, patrón de ruta); archivo fuera del repo. - GET /api/user/menu para el frontend; GET/PUT/DELETE /api/permissions solo para administradores (acceso "*"). - ADMIN_WEB_USERS garantiza el acceso total al arrancar; no se puede quitar el "*" al último administrador (409, dentro de una transacción). - Patrones validados (`*`, `/modulo/ruta`, `/modulo/*`). A diferencia del frontend anterior, `/inventario/*` ya no habilita `/inventario-x`. - Helper de e2e compartido (SAP simulado, SQLite en memoria). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
57 lines
1.6 KiB
JSON
57 lines
1.6 KiB
JSON
{
|
|
"name": "api",
|
|
"version": "0.0.1",
|
|
"description": "",
|
|
"author": "",
|
|
"private": true,
|
|
"license": "UNLICENSED",
|
|
"type": "module",
|
|
"scripts": {
|
|
"build": "nest build",
|
|
"deploy": "nest deploy",
|
|
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
|
|
"start": "nest start",
|
|
"start:dev": "nest start --watch",
|
|
"start:debug": "nest start --debug --watch",
|
|
"start:prod": "node dist/main",
|
|
"lint": "oxlint --type-aware src/ test/",
|
|
"test": "vitest run",
|
|
"test:watch": "vitest",
|
|
"test:cov": "vitest run --coverage",
|
|
"test:debug": "vitest --inspect-brk --no-file-parallelism",
|
|
"test:e2e": "vitest run --config ./vitest.config.e2e.ts"
|
|
},
|
|
"dependencies": {
|
|
"@nestjs/common": "^12.0.1",
|
|
"@nestjs/config": "^12.0.1",
|
|
"@nestjs/core": "^12.0.1",
|
|
"@nestjs/platform-express": "^12.0.1",
|
|
"@nestjs/typeorm": "^12.0.2",
|
|
"better-sqlite3": "^12.11.1",
|
|
"reflect-metadata": "^0.2.2",
|
|
"rxjs": "^7.8.1",
|
|
"typeorm": "^1.1.2",
|
|
"undici": "^6.20.1",
|
|
"zod": "^4.6.7"
|
|
},
|
|
"devDependencies": {
|
|
"@nestjs/cli": "^12.0.0",
|
|
"@nestjs/mau": "^0.2.6",
|
|
"@nestjs/schematics": "^12.0.0",
|
|
"@nestjs/testing": "^12.0.1",
|
|
"@types/better-sqlite3": "^9.6.0",
|
|
"@types/express": "^5.0.0",
|
|
"@types/node": "^24.0.0",
|
|
"@types/supertest": "^7.0.0",
|
|
"@vitest/coverage-v8": "^4.1.2",
|
|
"oxlint": "^1.58.0",
|
|
"oxlint-tsgolint": "^7.0.2001",
|
|
"prettier": "^3.4.2",
|
|
"source-map-support": "^0.5.21",
|
|
"supertest": "^7.0.0",
|
|
"typescript": "^6.0.2",
|
|
"vite-tsconfig-paths": "^5.1.4",
|
|
"vitest": "^4.1.2"
|
|
}
|
|
}
|