[TEST] v0.4.2.10 - Update mechanism verification tag

This commit is contained in:
choibk 2026-01-26 10:53:43 +09:00
parent 4f7da76304
commit 991ef773be
5 changed files with 20 additions and 34 deletions

View File

@ -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`

View File

@ -1,7 +1,7 @@
{
"name": "smartims",
"private": true,
"version": "0.4.2.8",
"version": "0.4.2.10",
"type": "module",
"scripts": {
"dev": "vite",

View File

@ -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,

View File

@ -1,6 +1,6 @@
{
"name": "server",
"version": "0.4.2.8",
"version": "0.4.2.10",
"description": "",
"main": "index.js",
"scripts": {

View File

@ -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