start-vibing 2.0.17 → 2.0.18
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/cli.js +42 -8
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -129,8 +129,8 @@ async function copyClaudeSetup(targetDir, options = {}) {
|
|
|
129
129
|
}
|
|
130
130
|
|
|
131
131
|
// src/cli.ts
|
|
132
|
-
import { existsSync as
|
|
133
|
-
import { join as
|
|
132
|
+
import { existsSync as existsSync4, readFileSync as readFileSync4 } from "fs";
|
|
133
|
+
import { join as join4, dirname as dirname2 } from "path";
|
|
134
134
|
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
135
135
|
|
|
136
136
|
// src/update.ts
|
|
@@ -317,6 +317,9 @@ function getUpdateCommand() {
|
|
|
317
317
|
|
|
318
318
|
// src/claude.ts
|
|
319
319
|
import { spawn, execSync as execSync2, spawnSync } from "child_process";
|
|
320
|
+
import { existsSync as existsSync3, readFileSync as readFileSync3, writeFileSync as writeFileSync3 } from "fs";
|
|
321
|
+
import { join as join3 } from "path";
|
|
322
|
+
import { homedir } from "os";
|
|
320
323
|
function isClaudeInstalled() {
|
|
321
324
|
return commandExists("claude");
|
|
322
325
|
}
|
|
@@ -432,6 +435,33 @@ function launchClaude(cwd) {
|
|
|
432
435
|
process.exit(code || 0);
|
|
433
436
|
});
|
|
434
437
|
}
|
|
438
|
+
function ensureHooksEnabled() {
|
|
439
|
+
try {
|
|
440
|
+
const home = homedir();
|
|
441
|
+
const globalSettingsPath = join3(home, ".claude", "settings.json");
|
|
442
|
+
if (!existsSync3(globalSettingsPath)) {
|
|
443
|
+
return { modified: false };
|
|
444
|
+
}
|
|
445
|
+
const content = readFileSync3(globalSettingsPath, "utf-8");
|
|
446
|
+
let settings;
|
|
447
|
+
try {
|
|
448
|
+
settings = JSON.parse(content);
|
|
449
|
+
} catch {
|
|
450
|
+
return { modified: false };
|
|
451
|
+
}
|
|
452
|
+
if ("disableAllHooks" in settings) {
|
|
453
|
+
delete settings["disableAllHooks"];
|
|
454
|
+
writeFileSync3(globalSettingsPath, JSON.stringify(settings, null, "\t"), "utf-8");
|
|
455
|
+
return { modified: true };
|
|
456
|
+
}
|
|
457
|
+
return { modified: false };
|
|
458
|
+
} catch (error) {
|
|
459
|
+
return {
|
|
460
|
+
modified: false,
|
|
461
|
+
error: error instanceof Error ? error.message : "Unknown error"
|
|
462
|
+
};
|
|
463
|
+
}
|
|
464
|
+
}
|
|
435
465
|
|
|
436
466
|
// src/mcp.ts
|
|
437
467
|
import { spawnSync as spawnSync2, spawn as spawn2 } from "child_process";
|
|
@@ -693,12 +723,12 @@ var __dirname3 = dirname2(__filename3);
|
|
|
693
723
|
function getVersion() {
|
|
694
724
|
try {
|
|
695
725
|
const paths = [
|
|
696
|
-
|
|
697
|
-
|
|
726
|
+
join4(__dirname3, "..", "package.json"),
|
|
727
|
+
join4(__dirname3, "..", "..", "package.json")
|
|
698
728
|
];
|
|
699
729
|
for (const pkgPath of paths) {
|
|
700
|
-
if (
|
|
701
|
-
const pkg = JSON.parse(
|
|
730
|
+
if (existsSync4(pkgPath)) {
|
|
731
|
+
const pkg = JSON.parse(readFileSync4(pkgPath, "utf-8"));
|
|
702
732
|
return pkg.version || "1.0.0";
|
|
703
733
|
}
|
|
704
734
|
}
|
|
@@ -800,8 +830,8 @@ async function main() {
|
|
|
800
830
|
console.log(" Then just run: start-vibing");
|
|
801
831
|
console.log("");
|
|
802
832
|
}
|
|
803
|
-
const claudeDir =
|
|
804
|
-
if (
|
|
833
|
+
const claudeDir = join4(targetDir, ".claude");
|
|
834
|
+
if (existsSync4(claudeDir) && !force) {
|
|
805
835
|
console.log(" Found existing .claude/ folder.");
|
|
806
836
|
console.log(" Will preserve your custom domains and merge with new files.\n");
|
|
807
837
|
}
|
|
@@ -816,6 +846,10 @@ async function main() {
|
|
|
816
846
|
if (result.preserved > 0) {
|
|
817
847
|
console.log(`\n Preserved ${result.preserved} custom file(s) (domains, etc.)`);
|
|
818
848
|
}
|
|
849
|
+
const hooksResult = ensureHooksEnabled();
|
|
850
|
+
if (hooksResult.modified) {
|
|
851
|
+
console.log("\n Fixed global settings: removed disableAllHooks (hooks now enabled)");
|
|
852
|
+
}
|
|
819
853
|
if (!skipClaude) {
|
|
820
854
|
console.log("");
|
|
821
855
|
console.log(" ========================================");
|
package/package.json
CHANGED