- SapSessionService: una sesión para todos; un solo login aunque lleguen peticiones concurrentes o 401 simultáneos (loginInFlight); logout al apagar. - SapClientService: proxy con reintento único ante 401, errores SAP traducidos (SapHttpException) y fallos de red/TLS mapeados a 502/504. Un login rechazado se informa como 502, nunca 401 (el frontend lo toma como sesión web expirada). - Confianza TLS: SAPB1_SL_CA_FILE opcional (autofirmado de SAP o CA de firewall) sumado a las CA del sistema; VERIFY_SSL=true por defecto y no se puede apagar en producción. - SAPB1_SL_MAX_CONCURRENCY (default 1): medido en SAP10, más de ~2 peticiones en paralelo retrasan ~7 s cada una extra; en serie ~60 ms. - GET /api/health/sap, tests unitarios (MockAgent) y e2e opcional contra SAP real (SAP_LIVE=1). apps/api/certs documentado; *.pem/*.cer ignorados. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
53 lines
1.5 KiB
JSON
53 lines
1.5 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",
|
|
"reflect-metadata": "^0.2.2",
|
|
"rxjs": "^7.8.1",
|
|
"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/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"
|
|
}
|
|
}
|