Phase 1.5 완료: 인증 서비스 Raw Query 전환 및 테스트 완료 ✅ AuthService 전환 완료 (5개 Prisma 호출 제거): - loginPwdCheck(): Raw Query로 사용자 비밀번호 조회 - insertLoginAccessLog(): Raw Query로 로그인 로그 기록 - getUserInfo(): Raw Query로 사용자/권한/회사 정보 조회 - authority_sub_user ↔ authority_master JOIN (master_objid ↔ objid) - 3개 쿼리로 분리 (사용자, 권한, 회사) - processLogin(): 전체 로그인 플로우 통합 - processLogout(): 로그아웃 로그 기록 🧪 테스트 완료: - 단위 테스트: 30개 테스트 모두 통과 ✅ - 로그인 검증 (6개) - 사용자 정보 조회 (5개) - 로그인 로그 기록 (4개) - 전체 로그인 프로세스 (5개) - 로그아웃 (2개) - 토큰 검증 (3개) - Raw Query 전환 검증 (3개) - 성능 테스트 (2개) - 통합 테스트: 작성 완료 (auth.integration.test.ts) - 로그인 → 토큰 발급 → 인증 → 로그아웃 플로우 🔧 주요 변경사항: - Prisma import 제거 → Raw Query (query from db.ts) - authority 테이블 JOIN 수정 (auth_code → master_objid/objid) - 파라미터 바인딩으로 SQL Injection 방지 - 타입 안전성 유지 (TypeScript Generic 사용) 📊 성능: - 로그인 프로세스: < 1초 - 사용자 정보 조회: < 500ms - 모든 테스트 실행 시간: 2.016초 🎯 다음 단계: - Phase 2: 핵심 서비스 전환 (ScreenManagement, TableManagement 등) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
86 lines
2.2 KiB
JSON
86 lines
2.2 KiB
JSON
{
|
|
"name": "pms-backend-node",
|
|
"version": "1.0.0",
|
|
"description": "PLM System Backend - Node.js + TypeScript",
|
|
"main": "dist/app.js",
|
|
"scripts": {
|
|
"start": "node dist/app.js",
|
|
"dev": "nodemon src/app.ts",
|
|
"build": "tsc",
|
|
"test": "jest",
|
|
"test:watch": "jest --watch",
|
|
"lint": "eslint src/ --ext .ts",
|
|
"lint:fix": "eslint src/ --ext .ts --fix",
|
|
"format": "prettier --write src/",
|
|
"prisma:generate": "prisma generate",
|
|
"prisma:migrate": "prisma migrate dev",
|
|
"prisma:studio": "prisma studio",
|
|
"prisma:seed": "prisma db seed"
|
|
},
|
|
"keywords": [
|
|
"plm",
|
|
"nodejs",
|
|
"typescript",
|
|
"express",
|
|
"prisma"
|
|
],
|
|
"author": "",
|
|
"license": "ISC",
|
|
"dependencies": {
|
|
"@prisma/client": "^6.16.2",
|
|
"@types/mssql": "^9.1.8",
|
|
"axios": "^1.11.0",
|
|
"bcryptjs": "^2.4.3",
|
|
"compression": "^1.7.4",
|
|
"cors": "^2.8.5",
|
|
"dotenv": "^16.3.1",
|
|
"express": "^4.18.2",
|
|
"express-rate-limit": "^7.1.5",
|
|
"helmet": "^7.1.0",
|
|
"joi": "^17.11.0",
|
|
"jsonwebtoken": "^9.0.2",
|
|
"mssql": "^11.0.1",
|
|
"multer": "^1.4.5-lts.1",
|
|
"mysql2": "^3.15.0",
|
|
"node-cron": "^4.2.1",
|
|
"nodemailer": "^6.9.7",
|
|
"oracledb": "^6.9.0",
|
|
"pg": "^8.16.3",
|
|
"redis": "^4.6.10",
|
|
"winston": "^3.11.0"
|
|
},
|
|
"devDependencies": {
|
|
"@types/bcryptjs": "^2.4.6",
|
|
"@types/compression": "^1.7.5",
|
|
"@types/cors": "^2.8.17",
|
|
"@types/express": "^4.17.21",
|
|
"@types/fs-extra": "^11.0.4",
|
|
"@types/jest": "^29.5.11",
|
|
"@types/jsonwebtoken": "^9.0.5",
|
|
"@types/morgan": "^1.9.9",
|
|
"@types/multer": "^1.4.13",
|
|
"@types/node": "^20.10.5",
|
|
"@types/node-cron": "^3.0.11",
|
|
"@types/nodemailer": "^6.4.14",
|
|
"@types/oracledb": "^6.9.1",
|
|
"@types/pg": "^8.15.5",
|
|
"@types/sanitize-html": "^2.9.5",
|
|
"@types/supertest": "^6.0.3",
|
|
"@typescript-eslint/eslint-plugin": "^6.14.0",
|
|
"@typescript-eslint/parser": "^6.14.0",
|
|
"eslint": "^8.55.0",
|
|
"jest": "^29.7.0",
|
|
"nodemon": "^3.1.10",
|
|
"prettier": "^3.1.0",
|
|
"prisma": "^6.16.2",
|
|
"supertest": "^6.3.4",
|
|
"ts-jest": "^29.1.1",
|
|
"ts-node": "^10.9.2",
|
|
"typescript": "^5.3.3"
|
|
},
|
|
"engines": {
|
|
"node": ">=20.10.0",
|
|
"npm": ">=10.0.0"
|
|
}
|
|
}
|