@drakulavich/kesha-voice-kit 1.0.3 → 1.0.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drakulavich/kesha-voice-kit",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "Open-source voice toolkit for Apple Silicon. Speech-to-text, language detection. 25 languages.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,12 +1,25 @@
1
1
  #!/usr/bin/env node
2
- const { execSync } = require("child_process");
2
+ // Warn if Bun is not on PATH. Uses fs-only probing instead of
3
+ // child_process.execSync("bun --version") so that OpenClaw's
4
+ // dangerous-code scanner does not flag the plugin install.
5
+ const fs = require("fs");
6
+ const path = require("path");
3
7
 
4
- try {
5
- execSync("bun --version", { stdio: "ignore" });
6
- } catch {
8
+ const exe = process.platform === "win32" ? "bun.exe" : "bun";
9
+ const dirs = (process.env.PATH || "").split(path.delimiter).filter(Boolean);
10
+
11
+ const found = dirs.some((dir) => {
12
+ try {
13
+ return fs.existsSync(path.join(dir, exe));
14
+ } catch {
15
+ return false;
16
+ }
17
+ });
18
+
19
+ if (!found) {
7
20
  console.warn(
8
21
  "\n⚠️ Kesha Voice Kit requires Bun runtime.\n" +
9
- " Install Bun: curl -fsSL https://bun.sh/install | bash\n" +
10
- " Then run: kesha install\n"
22
+ " Install Bun: curl -fsSL https://bun.sh/install | bash\n" +
23
+ " Then run: kesha install\n",
11
24
  );
12
25
  }