@team-semicolon/semo-cli 3.4.0 → 3.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +37 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -481,6 +481,23 @@ function detectLegacyEnvironment(cwd) {
|
|
|
481
481
|
legacyPaths.push(dir);
|
|
482
482
|
}
|
|
483
483
|
}
|
|
484
|
+
// semo-system/ 내부의 레거시 Extension 구조 확인
|
|
485
|
+
// 구버전: semo-system/biz/, semo-system/eng/, semo-system/ops/ (그룹 디렉토리)
|
|
486
|
+
// 신버전: semo-system/biz/design/, semo-system/eng/nextjs/ 등 (개별 패키지)
|
|
487
|
+
const semoSystemDir = path.join(cwd, "semo-system");
|
|
488
|
+
if (fs.existsSync(semoSystemDir)) {
|
|
489
|
+
const legacyExtGroups = ["biz", "eng", "ops"];
|
|
490
|
+
for (const group of legacyExtGroups) {
|
|
491
|
+
const groupDir = path.join(semoSystemDir, group);
|
|
492
|
+
if (fs.existsSync(groupDir) && fs.statSync(groupDir).isDirectory()) {
|
|
493
|
+
// VERSION 파일이 그룹 디렉토리에 직접 있으면 레거시 구조
|
|
494
|
+
const groupVersionFile = path.join(groupDir, "VERSION");
|
|
495
|
+
if (fs.existsSync(groupVersionFile)) {
|
|
496
|
+
legacyPaths.push(`semo-system/${group} (레거시 그룹 구조)`);
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
}
|
|
484
501
|
// .claude/ 내부의 레거시 구조 확인
|
|
485
502
|
const claudeDir = path.join(cwd, ".claude");
|
|
486
503
|
if (fs.existsSync(claudeDir)) {
|
|
@@ -563,10 +580,28 @@ async function migrateLegacyEnvironment(cwd) {
|
|
|
563
580
|
}
|
|
564
581
|
}
|
|
565
582
|
}
|
|
566
|
-
// 3.
|
|
583
|
+
// 3. semo-system/ 내부의 레거시 Extension 그룹 삭제
|
|
567
584
|
const semoSystemDir = path.join(cwd, "semo-system");
|
|
568
585
|
if (fs.existsSync(semoSystemDir)) {
|
|
569
|
-
|
|
586
|
+
const legacyExtGroups = ["biz", "eng", "ops"];
|
|
587
|
+
for (const group of legacyExtGroups) {
|
|
588
|
+
const groupDir = path.join(semoSystemDir, group);
|
|
589
|
+
const groupVersionFile = path.join(groupDir, "VERSION");
|
|
590
|
+
// VERSION 파일이 그룹 디렉토리에 직접 있으면 레거시 구조이므로 삭제
|
|
591
|
+
if (fs.existsSync(groupVersionFile)) {
|
|
592
|
+
removeRecursive(groupDir);
|
|
593
|
+
console.log(chalk_1.default.gray(` ✓ semo-system/${group}/ 삭제됨 (레거시 그룹 구조)`));
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
}
|
|
597
|
+
// 4. 기존 semo-system이 완전히 레거시인 경우에만 삭제
|
|
598
|
+
// (Standard 패키지가 없는 경우)
|
|
599
|
+
if (fs.existsSync(semoSystemDir)) {
|
|
600
|
+
const hasStandard = fs.existsSync(path.join(semoSystemDir, "semo-core"));
|
|
601
|
+
if (!hasStandard) {
|
|
602
|
+
removeRecursive(semoSystemDir);
|
|
603
|
+
console.log(chalk_1.default.gray(` ✓ semo-system/ 삭제됨 (완전 재설치)`));
|
|
604
|
+
}
|
|
570
605
|
}
|
|
571
606
|
spinner.succeed("레거시 환경 정리 완료");
|
|
572
607
|
console.log(chalk_1.default.green(" → 새 환경으로 설치를 진행합니다.\n"));
|