@su-record/vibe 1.0.4 → 1.0.5
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/bin/vibe +49 -2
- package/package.json +1 -1
package/bin/vibe
CHANGED
|
@@ -704,10 +704,57 @@ async function update() {
|
|
|
704
704
|
copyDirContents(sourceDir, commandsDir);
|
|
705
705
|
log(' ✅ 슬래시 커맨드 업데이트 완료 (7개)\n');
|
|
706
706
|
|
|
707
|
-
//
|
|
707
|
+
// 기술 스택 감지 (update에서도)
|
|
708
|
+
const detectedStacks = detectTechStacks(projectRoot);
|
|
709
|
+
|
|
710
|
+
// config.json 업데이트 (stacks 정보 추가)
|
|
711
|
+
const configPath = path.join(vibeDir, 'config.json');
|
|
712
|
+
if (fs.existsSync(configPath)) {
|
|
713
|
+
try {
|
|
714
|
+
const config = JSON.parse(fs.readFileSync(configPath, 'utf-8'));
|
|
715
|
+
config.stacks = detectedStacks;
|
|
716
|
+
fs.writeFileSync(configPath, JSON.stringify(config, null, 2));
|
|
717
|
+
} catch (e) {}
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
// .vibe/rules/ 업데이트 (감지된 스택에 해당하는 언어 규칙만)
|
|
708
721
|
const rulesSource = path.join(__dirname, '../.vibe/rules');
|
|
709
722
|
const rulesTarget = path.join(vibeDir, 'rules');
|
|
710
|
-
|
|
723
|
+
|
|
724
|
+
// core, quality, standards, tools는 전체 복사
|
|
725
|
+
const coreDirs = ['core', 'quality', 'standards', 'tools'];
|
|
726
|
+
coreDirs.forEach(dir => {
|
|
727
|
+
const src = path.join(rulesSource, dir);
|
|
728
|
+
const dst = path.join(rulesTarget, dir);
|
|
729
|
+
if (fs.existsSync(src)) {
|
|
730
|
+
copyDirRecursive(src, dst);
|
|
731
|
+
}
|
|
732
|
+
});
|
|
733
|
+
|
|
734
|
+
// languages는 감지된 스택만 복사 (기존 불필요 파일 제거)
|
|
735
|
+
const langSource = path.join(rulesSource, 'languages');
|
|
736
|
+
const langTarget = path.join(rulesTarget, 'languages');
|
|
737
|
+
|
|
738
|
+
// 기존 languages 폴더 정리 후 필요한 것만 복사
|
|
739
|
+
if (fs.existsSync(langTarget)) {
|
|
740
|
+
removeDirRecursive(langTarget);
|
|
741
|
+
}
|
|
742
|
+
ensureDir(langTarget);
|
|
743
|
+
|
|
744
|
+
const detectedTypes = detectedStacks.map(s => s.type);
|
|
745
|
+
if (fs.existsSync(langSource)) {
|
|
746
|
+
const langFiles = fs.readdirSync(langSource);
|
|
747
|
+
langFiles.forEach(file => {
|
|
748
|
+
const langType = file.replace('.md', '');
|
|
749
|
+
if (detectedTypes.includes(langType)) {
|
|
750
|
+
fs.copyFileSync(path.join(langSource, file), path.join(langTarget, file));
|
|
751
|
+
}
|
|
752
|
+
});
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
if (detectedStacks.length > 0) {
|
|
756
|
+
log(` 🔍 감지된 기술 스택: ${detectedTypes.join(', ')}\n`);
|
|
757
|
+
}
|
|
711
758
|
log(' ✅ 코딩 규칙 업데이트 완료 (.vibe/rules/)\n');
|
|
712
759
|
|
|
713
760
|
// .claude/agents/ 업데이트
|