From 991ef773bee87cfd291dbd333f2efa1ed5b20c49 Mon Sep 17 00:00:00 2001 From: choibk Date: Mon, 26 Jan 2026 10:53:43 +0900 Subject: [PATCH] [TEST] v0.4.2.10 - Update mechanism verification tag --- docs/roadmap/INTEGRATED_ROADMAP.md | 18 ++++++++++++------ package.json | 2 +- server/index.js | 16 ++-------------- server/package.json | 2 +- server/routes/system.js | 16 ++++------------ 5 files changed, 20 insertions(+), 34 deletions(-) diff --git a/docs/roadmap/INTEGRATED_ROADMAP.md b/docs/roadmap/INTEGRATED_ROADMAP.md index 7b70d61..9fc45f7 100644 --- a/docs/roadmap/INTEGRATED_ROADMAP.md +++ b/docs/roadmap/INTEGRATED_ROADMAP.md @@ -2,8 +2,8 @@ **프로젝트명:** SOKUREE Platform - Smart Integrated Management System **최초 작성일:** 2026-01-25 -**최근 업데이트:** 2026-01-25 -**버전:** v0.4.1.0 +**최근 업데이트:** 2026-01-26 +**버전:** v0.4.2.9 --- @@ -35,10 +35,16 @@ - [x] CCTV 설정 파일 DB 저장 시 username/password 필드 암호화 처리 - [x] CCTV 설정 파일 조회 시 username/password 필드 복호화 처리 - **(수정사항)**: `CameraManagementPage` 신설 및 `cryptoUtil`을 통한 RTSP 계정 정보의 DB 암호화 저장 로직 완성 (AES-256) -#### 🏷️ Tag: `v0.4.2.0` -- [ ] **라이선스 관리 오류 수정** -- [ ] **시스템 관리 기본설정 오류 수정** -- [ ] **시스템 업데이트 오류 수정** +#### 🏷️ Tag: `v0.4.2.9` +- [x] **라이선스 관리 오류 수정** + - 모듈 활성화 상태 체크 미들웨어(`requireModule`) 보강 및 라이선스 만료 감지 로직 안정화 +- [x] **시스템 관리 기본설정 오류 수정** + - 'monitoring' → 'cctv' 모듈 코드 마이그레이션 시 발생하는 중복 키 오류(`ER_DUP_ENTRY`) 완벽 해결 +- [x] **시스템 업데이트 엔진 고도화 & 인프라 보호 (Shovel-work/삽질 기록)** + - **인프라 보호 시스템(Infrastructure Shield)**: `.env.local` 우선순위 도입으로 업데이트 시 운영 서버 설정이 초기화되는 문제 근본 해결 + - **실시간 버전 동기화**: 정적 파일 대신 Git Tag를 직접 조회하도록 개선하여 업데이트 후 현재 버전 즉시 반영 + - **업데이트 안정성**: 소스 교체 전 `.env`/`.env.local` 2중 백업 및 복구 시퀀스 적용 + - **서버 가용성**: Synology NAS 등 저사양 환경에서의 블로킹 방지를 위한 `execSync` 차단 및 에러 핸들링 강화 #### 🏷️ Tag: `v0.4.3.0` diff --git a/package.json b/package.json index 6fc1a2c..d28fe32 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "smartims", "private": true, - "version": "0.4.2.8", + "version": "0.4.2.10", "type": "module", "scripts": { "dev": "vite", diff --git a/server/index.js b/server/index.js index 833d6ba..7e57ad0 100644 --- a/server/index.js +++ b/server/index.js @@ -469,25 +469,13 @@ initTables(); const packageJson = require('./package.json'); app.get('/api/health', (req, res) => { - // Dynamic version check (Light-weight) + // Light-weight health check (Read from package.json to simulate 'installed' version) const kstOffset = 9 * 60 * 60 * 1000; const kstDate = new Date(Date.now() + kstOffset); - let version = packageJson.version; - try { - const { execSync } = require('child_process'); - // Check git tag in parent directory (Project root) - version = execSync('git describe --tags --abbrev=0', { - cwd: path.join(__dirname, '..'), - stdio: ['ignore', 'pipe', 'ignore'] - }).toString().trim().replace(/^v/, ''); - } catch (e) { - // Safe fallback to package.json - } - res.json({ status: 'ok', - version: version, + version: packageJson.version, // Use static version from file node_version: process.version, platform: process.platform, arch: process.arch, diff --git a/server/package.json b/server/package.json index c8ef4ac..7095a6d 100644 --- a/server/package.json +++ b/server/package.json @@ -1,6 +1,6 @@ { "name": "server", - "version": "0.4.2.8", + "version": "0.4.2.10", "description": "", "main": "index.js", "scripts": { diff --git a/server/routes/system.js b/server/routes/system.js index 1961296..ca16aa5 100644 --- a/server/routes/system.js +++ b/server/routes/system.js @@ -505,22 +505,14 @@ const getGiteaAuth = async () => { // 5. Get Version Info (Current, Remote & History from Tags) router.get('/version/remote', isAuthenticated, hasRole('admin'), async (req, res) => { try { - // Local version detection (Dynamic & Robust) + // Local version detection (File-based for update simulation) const projectRoot = path.join(__dirname, '../..'); let currentVersion = '0.0.0.0'; try { - const { execSync } = require('child_process'); - currentVersion = execSync('git describe --tags --abbrev=0', { - cwd: projectRoot, - stdio: ['ignore', 'pipe', 'ignore'] - }).toString().trim().replace(/^v/, ''); + const rootPkg = JSON.parse(fs.readFileSync(path.join(projectRoot, 'package.json'), 'utf8')); + currentVersion = rootPkg.version; } catch (e) { - try { - const rootPkg = JSON.parse(fs.readFileSync(path.join(projectRoot, 'package.json'), 'utf8')); - currentVersion = rootPkg.version; - } catch (err) { - currentVersion = '0.4.2.8'; - } + currentVersion = '0.4.2.8'; } // Prepare git fetch command