Files
hjjeong 9ff61cf2f9 개발관리>BOM CSV Import — RFC4180 파서 적용 + 누락 시퀀스 5종 생성
CSV 파싱 함정 정정:
사용자 검증 중 운영판 wace 에서 3건만 파싱되는 CSV 가 RPS 에서 4건으로 파싱되며 4번째
행이 깨진 채 들어가는 문제 발견. 단순 line.split(",") 로는 RFC4180 따옴표 처리 실패.

backend-node:
- csv-parse ^6.2.1 추가
- devBomExcelImportService.parseAndValidate :
    text.split(/\r\n|\r|\n/).map(line => line.split(",")) 단순 split  →
    parseCsvSync(text, { relax_quotes, relax_column_count, skip_empty_lines: false })
    · 따옴표 내부 콤마/줄바꿈, "" 이스케이프 모두 안전 처리
    · 운영판 사용자가 만든 비정형 quote 도 relax_quotes 로 관대 처리
    · 1차 스캔(자품번 수집) 도 동일 allRows 재사용
- getCsvValue 헬퍼는 보존 (csv-parse 후에도 안전 trim/quote-strip 으로 유지)

시퀀스 누락 (별 함정):
저장 시 "relation seq_bom_qty does not exist" 에러 발생. wace 매퍼에서 사용하는
nextval('seq_*') 시퀀스 5종 중 RPS DB 에 seq_ecr_no 만 존재. 나머지 4종 신규 생성.

02_sequences.sql (data-sync 디렉토리에 보존):
- seq_bom_qty   200,000  (운영 179,258 + 여유)
- seq_as_no       1,000  (운영       109 + 여유)
- seq_comm_code  10,000  (운영     1,839 + 여유)
- seq_eo_no       1,000  (운영        62 + 여유)
- seq_ecr_no              (RPS 기존 보존, 운영 33)

운영 last_value 보다 충분히 큰 값으로 setval — 향후 운영 데이터 sync 시 PK 충돌 방지.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-12 18:51:19 +09:00

104 lines
2.7 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/"
},
"keywords": [
"plm",
"nodejs",
"typescript",
"express",
"postgresql"
],
"author": "",
"license": "ISC",
"dependencies": {
"@types/mssql": "^9.1.8",
"axios": "^1.11.0",
"bcryptjs": "^2.4.3",
"bwip-js": "^4.8.0",
"cheerio": "^1.2.0",
"compression": "^1.7.4",
"cors": "^2.8.5",
"csv-parse": "^6.2.1",
"docx": "^9.5.1",
"dotenv": "^16.3.1",
"express": "^4.18.2",
"express-async-errors": "^3.1.1",
"express-rate-limit": "^7.1.5",
"helmet": "^7.1.0",
"html-to-docx": "^1.8.0",
"http-proxy-middleware": "^3.0.5",
"iconv-lite": "^0.7.0",
"imap": "^0.8.19",
"imapflow": "^1.2.18",
"joi": "^17.11.0",
"jsonwebtoken": "^9.0.2",
"mailparser": "^3.7.5",
"mssql": "^11.0.1",
"multer": "^1.4.5-lts.1",
"mysql2": "^3.15.0",
"node-cron": "^4.2.1",
"node-fetch": "^2.7.0",
"node-pop3": "^0.11.0",
"nodemailer": "^6.10.1",
"oracledb": "^6.9.0",
"pdf-lib": "^1.17.1",
"pg": "^8.16.3",
"quill": "^2.0.3",
"react-quill": "^2.0.0",
"redis": "^4.6.10",
"socket.io": "^4.8.3",
"uuid": "^13.0.0",
"winston": "^3.11.0",
"xlsx": "^0.18.5"
},
"devDependencies": {
"@types/bcryptjs": "^2.4.6",
"@types/bwip-js": "^3.2.3",
"@types/compression": "^1.7.5",
"@types/cors": "^2.8.17",
"@types/express": "^4.17.21",
"@types/fs-extra": "^11.0.4",
"@types/imap": "^0.8.42",
"@types/jest": "^29.5.11",
"@types/jsonwebtoken": "^9.0.5",
"@types/mailparser": "^3.4.6",
"@types/morgan": "^1.9.9",
"@types/multer": "^1.4.13",
"@types/node": "^20.10.5",
"@types/node-cron": "^3.0.11",
"@types/node-fetch": "^2.6.13",
"@types/nodemailer": "^6.4.20",
"@types/oracledb": "^6.9.1",
"@types/pg": "^8.15.5",
"@types/sanitize-html": "^2.9.5",
"@types/supertest": "^6.0.3",
"@types/uuid": "^10.0.0",
"@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",
"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"
}
}