vibora 0.1.11 → 0.1.12
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/vibora.js +7 -6
- package/package.json +1 -1
package/bin/vibora.js
CHANGED
|
@@ -703,6 +703,8 @@ async function handleHealthCommand(flags) {
|
|
|
703
703
|
import * as fs from "fs";
|
|
704
704
|
import * as path from "path";
|
|
705
705
|
import * as os from "os";
|
|
706
|
+
import { execSync } from "child_process";
|
|
707
|
+
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
706
708
|
function getClaudeSettingsPath(global) {
|
|
707
709
|
if (global) {
|
|
708
710
|
return path.join(os.homedir(), ".claude", "settings.json");
|
|
@@ -728,7 +730,8 @@ function writeClaudeSettings(settingsPath, settings) {
|
|
|
728
730
|
fs.writeFileSync(settingsPath, JSON.stringify(settings, null, 2), "utf-8");
|
|
729
731
|
}
|
|
730
732
|
function getViboraHookPath() {
|
|
731
|
-
const
|
|
733
|
+
const currentFile = fileURLToPath2(import.meta.url);
|
|
734
|
+
const scriptDir = path.dirname(currentFile);
|
|
732
735
|
const possiblePaths = [
|
|
733
736
|
path.join(scriptDir, "..", "scripts", "vibora-plan-complete-hook"),
|
|
734
737
|
path.join(scriptDir, "..", "..", "scripts", "vibora-plan-complete-hook"),
|
|
@@ -737,10 +740,8 @@ function getViboraHookPath() {
|
|
|
737
740
|
for (const p of possiblePaths) {
|
|
738
741
|
if (p === "vibora-plan-complete-hook") {
|
|
739
742
|
try {
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
return "vibora-plan-complete-hook";
|
|
743
|
-
}
|
|
743
|
+
execSync("which vibora-plan-complete-hook", { stdio: "pipe" });
|
|
744
|
+
return "vibora-plan-complete-hook";
|
|
744
745
|
} catch {
|
|
745
746
|
continue;
|
|
746
747
|
}
|
|
@@ -924,7 +925,7 @@ function parseArgs(args) {
|
|
|
924
925
|
return { positional, flags };
|
|
925
926
|
}
|
|
926
927
|
async function main() {
|
|
927
|
-
const args =
|
|
928
|
+
const args = process.argv.slice(2);
|
|
928
929
|
const { positional, flags } = parseArgs(args);
|
|
929
930
|
if (flags.pretty) {
|
|
930
931
|
setPrettyOutput(true);
|