start-vibing 2.0.31 → 2.0.32
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 +45 -0
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -132,6 +132,7 @@ async function copyClaudeSetup(targetDir, options = {}) {
|
|
|
132
132
|
import { existsSync as existsSync4, readFileSync as readFileSync4 } from "fs";
|
|
133
133
|
import { join as join4, dirname as dirname2 } from "path";
|
|
134
134
|
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
135
|
+
import { execSync as execSync3 } from "child_process";
|
|
135
136
|
|
|
136
137
|
// src/update.ts
|
|
137
138
|
import { existsSync as existsSync2, readFileSync as readFileSync2, writeFileSync as writeFileSync2, mkdirSync as mkdirSync2 } from "fs";
|
|
@@ -738,6 +739,35 @@ function getVersion() {
|
|
|
738
739
|
}
|
|
739
740
|
}
|
|
740
741
|
var VERSION = getVersion();
|
|
742
|
+
function autoCommitClaudeFiles(targetDir) {
|
|
743
|
+
try {
|
|
744
|
+
try {
|
|
745
|
+
execSync3("git rev-parse --git-dir", { cwd: targetDir, stdio: "pipe" });
|
|
746
|
+
} catch {
|
|
747
|
+
return { success: false, message: "Not a git repository" };
|
|
748
|
+
}
|
|
749
|
+
const status = execSync3("git status --porcelain .claude CLAUDE.md .claude/", {
|
|
750
|
+
cwd: targetDir,
|
|
751
|
+
encoding: "utf-8",
|
|
752
|
+
stdio: ["pipe", "pipe", "pipe"]
|
|
753
|
+
}).trim();
|
|
754
|
+
if (!status) {
|
|
755
|
+
return { success: true, message: "No changes to commit" };
|
|
756
|
+
}
|
|
757
|
+
execSync3("git add .claude/ CLAUDE.md", {
|
|
758
|
+
cwd: targetDir,
|
|
759
|
+
stdio: "pipe"
|
|
760
|
+
});
|
|
761
|
+
execSync3(`git commit --no-verify -m "chore: update Claude Code agents and skills (start-vibing v${VERSION})"`, {
|
|
762
|
+
cwd: targetDir,
|
|
763
|
+
stdio: "pipe"
|
|
764
|
+
});
|
|
765
|
+
return { success: true, message: "Changes committed" };
|
|
766
|
+
} catch (error) {
|
|
767
|
+
const errorMessage = error instanceof Error ? error.message : "Unknown error";
|
|
768
|
+
return { success: false, message: errorMessage };
|
|
769
|
+
}
|
|
770
|
+
}
|
|
741
771
|
var BANNER = `
|
|
742
772
|
_____ _ _ __ __ _ _ _
|
|
743
773
|
/ ____| | | | \\ \\ / /(_)| | (_)
|
|
@@ -846,6 +876,21 @@ async function main() {
|
|
|
846
876
|
if (result.preserved > 0) {
|
|
847
877
|
console.log(`\n Preserved ${result.preserved} custom file(s) (domains, etc.)`);
|
|
848
878
|
}
|
|
879
|
+
console.log("\n Auto-committing Claude files...");
|
|
880
|
+
const commitResult = autoCommitClaudeFiles(targetDir);
|
|
881
|
+
if (commitResult.success) {
|
|
882
|
+
if (commitResult.message === "No changes to commit") {
|
|
883
|
+
console.log(" No new changes to commit.");
|
|
884
|
+
} else {
|
|
885
|
+
console.log(" Claude files committed (--no-verify used to bypass hooks).");
|
|
886
|
+
}
|
|
887
|
+
} else {
|
|
888
|
+
if (commitResult.message === "Not a git repository") {
|
|
889
|
+
console.log(" Skipped auto-commit (not a git repository).");
|
|
890
|
+
} else {
|
|
891
|
+
console.log(" Auto-commit skipped (non-critical).");
|
|
892
|
+
}
|
|
893
|
+
}
|
|
849
894
|
const hooksResult = ensureHooksEnabled();
|
|
850
895
|
if (hooksResult.modified) {
|
|
851
896
|
console.log("\n Fixed global settings: removed disableAllHooks (hooks now enabled)");
|
package/package.json
CHANGED