@su-record/vibe 1.0.8 → 1.0.10
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 +36 -31
- package/package.json +1 -1
package/bin/vibe
CHANGED
|
@@ -315,16 +315,29 @@ function setupCollaboratorAutoInstall(projectRoot) {
|
|
|
315
315
|
modified = true;
|
|
316
316
|
}
|
|
317
317
|
|
|
318
|
-
// scripts에 postinstall
|
|
318
|
+
// scripts에 prepare 추가 (postinstall 대신 - CI에서는 실행 안됨)
|
|
319
319
|
if (!pkg.scripts) {
|
|
320
320
|
pkg.scripts = {};
|
|
321
321
|
}
|
|
322
|
-
|
|
323
|
-
|
|
322
|
+
// postinstall에서 prepare로 변경 (npm install --production에서 스킵됨)
|
|
323
|
+
if (pkg.scripts.postinstall && pkg.scripts.postinstall.includes('vibe update')) {
|
|
324
|
+
// 기존 postinstall에서 vibe update 제거
|
|
325
|
+
pkg.scripts.postinstall = pkg.scripts.postinstall
|
|
326
|
+
.replace(/\s*&&\s*npx @su-record\/vibe update --silent/g, '')
|
|
327
|
+
.replace(/npx @su-record\/vibe update --silent\s*&&\s*/g, '')
|
|
328
|
+
.replace(/npx @su-record\/vibe update --silent/g, '')
|
|
329
|
+
.trim();
|
|
330
|
+
if (!pkg.scripts.postinstall) {
|
|
331
|
+
delete pkg.scripts.postinstall;
|
|
332
|
+
}
|
|
333
|
+
modified = true;
|
|
334
|
+
}
|
|
335
|
+
// prepare에 vibe update 추가 (devDependency 설치 시에만 실행)
|
|
336
|
+
if (!pkg.scripts.prepare) {
|
|
337
|
+
pkg.scripts.prepare = 'npx @su-record/vibe update --silent 2>/dev/null || true';
|
|
324
338
|
modified = true;
|
|
325
|
-
} else if (!pkg.scripts.
|
|
326
|
-
|
|
327
|
-
pkg.scripts.postinstall = `${pkg.scripts.postinstall} && npx @su-record/vibe update --silent`;
|
|
339
|
+
} else if (!pkg.scripts.prepare.includes('vibe update')) {
|
|
340
|
+
pkg.scripts.prepare = `${pkg.scripts.prepare} && npx @su-record/vibe update --silent 2>/dev/null || true`;
|
|
328
341
|
modified = true;
|
|
329
342
|
}
|
|
330
343
|
|
|
@@ -823,17 +836,27 @@ async function update() {
|
|
|
823
836
|
const vibeDir = path.join(projectRoot, '.vibe');
|
|
824
837
|
const claudeDir = path.join(projectRoot, '.claude');
|
|
825
838
|
|
|
839
|
+
// CI/프로덕션 환경에서는 스킵 (NODE_ENV=production 또는 CI=true)
|
|
840
|
+
if (process.env.NODE_ENV === 'production' || process.env.CI === 'true') {
|
|
841
|
+
return;
|
|
842
|
+
}
|
|
843
|
+
|
|
826
844
|
if (!fs.existsSync(vibeDir)) {
|
|
827
|
-
|
|
845
|
+
// silent 모드에서는 에러 출력하지 않음
|
|
846
|
+
if (!options.silent) {
|
|
847
|
+
console.log('❌ vibe 프로젝트가 아닙니다. 먼저 vibe init을 실행하세요.');
|
|
848
|
+
}
|
|
828
849
|
return;
|
|
829
850
|
}
|
|
830
851
|
|
|
831
852
|
log('🔄 vibe 업데이트 중...\n');
|
|
832
853
|
|
|
833
|
-
// 최신 버전 확인 및 자동 업그레이드
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
854
|
+
// 최신 버전 확인 및 자동 업그레이드 (silent 모드에서는 스킵)
|
|
855
|
+
if (!options.silent) {
|
|
856
|
+
const wasUpgraded = await checkAndUpgradeVibe();
|
|
857
|
+
if (wasUpgraded) {
|
|
858
|
+
return; // 새 버전에서 재실행됨
|
|
859
|
+
}
|
|
837
860
|
}
|
|
838
861
|
|
|
839
862
|
// 마이그레이션: .agent/rules/ → .vibe/rules/
|
|
@@ -1022,25 +1045,8 @@ async function update() {
|
|
|
1022
1045
|
// 협업자 자동 설치 설정 (update에서도 실행)
|
|
1023
1046
|
setupCollaboratorAutoInstall(projectRoot);
|
|
1024
1047
|
|
|
1025
|
-
// MCP 서버 등록 확인
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
// 1. hi-ai MCP
|
|
1029
|
-
const mcpPath = path.join(__dirname, '..', 'node_modules', '@su-record', 'hi-ai', 'dist', 'index.js');
|
|
1030
|
-
try {
|
|
1031
|
-
execSync(`claude mcp add vibe node "${mcpPath}"`, { stdio: 'pipe' });
|
|
1032
|
-
log(' ✅ vibe MCP 등록 완료\n');
|
|
1033
|
-
} catch (e) {
|
|
1034
|
-
// 이미 등록됨 - silent
|
|
1035
|
-
}
|
|
1036
|
-
|
|
1037
|
-
// 2. Context7 MCP
|
|
1038
|
-
try {
|
|
1039
|
-
execSync('claude mcp add context7 -- npx -y @upstash/context7-mcp@latest', { stdio: 'pipe' });
|
|
1040
|
-
log(' ✅ Context7 MCP 등록 완료\n');
|
|
1041
|
-
} catch (e) {
|
|
1042
|
-
// 이미 등록됨 - silent
|
|
1043
|
-
}
|
|
1048
|
+
// MCP 서버 등록 확인 (update에서는 스킵 - init에서만 등록)
|
|
1049
|
+
// update는 파일만 업데이트하고, MCP는 이미 등록되어 있다고 가정
|
|
1044
1050
|
|
|
1045
1051
|
const packageJson = require('../package.json');
|
|
1046
1052
|
log(`
|
|
@@ -1051,7 +1057,6 @@ async function update() {
|
|
|
1051
1057
|
- 코딩 규칙 (.vibe/rules/)
|
|
1052
1058
|
- 서브에이전트 (.claude/agents/)
|
|
1053
1059
|
- Hooks 설정
|
|
1054
|
-
- MCP 서버
|
|
1055
1060
|
|
|
1056
1061
|
외부 LLM (선택적):
|
|
1057
1062
|
vibe gpt <api-key> GPT 활성화 (아키텍처/디버깅)
|