@su-record/vibe 1.0.9 → 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 +34 -11
- 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/
|