voicecc 1.1.2 → 1.1.3
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/voicecc.js +33 -17
- package/dashboard/dist/assets/{index-BSLjaEDe.js → index-CFgwcS6r.js} +5 -5
- package/dashboard/dist/index.html +1 -1
- package/dashboard/routes/auth.ts +4 -2
- package/dashboard/routes/browser-call.ts +9 -5
- package/dashboard/routes/integrations.ts +14 -7
- package/dashboard/routes/tunnel.ts +4 -6
- package/dashboard/routes/twilio.ts +8 -5
- package/package.json +1 -1
- package/server/index.ts +17 -27
package/bin/voicecc.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* - Spawns the dashboard server
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
import { spawn } from "node:child_process";
|
|
11
|
+
import { spawn, execSync } from "node:child_process";
|
|
12
12
|
import { copyFileSync, existsSync } from "node:fs";
|
|
13
13
|
import { writeFile, readFile } from "node:fs/promises";
|
|
14
14
|
import { createInterface } from "node:readline";
|
|
@@ -40,6 +40,21 @@ function ask(rl, question) {
|
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
+
/**
|
|
44
|
+
* Check if a command exists on the system PATH.
|
|
45
|
+
*
|
|
46
|
+
* @param cmd - the command name to look up
|
|
47
|
+
* @returns true if the command is found
|
|
48
|
+
*/
|
|
49
|
+
function commandExists(cmd) {
|
|
50
|
+
try {
|
|
51
|
+
execSync(`which ${cmd}`, { stdio: "ignore" });
|
|
52
|
+
return true;
|
|
53
|
+
} catch {
|
|
54
|
+
return false;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
43
58
|
/**
|
|
44
59
|
* Generate a cryptographically random password (24 URL-safe characters).
|
|
45
60
|
*
|
|
@@ -104,21 +119,23 @@ async function runSetupWizard() {
|
|
|
104
119
|
await ask(rl, "Have you saved the password? Press Enter to continue. ");
|
|
105
120
|
}
|
|
106
121
|
|
|
107
|
-
//
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
+
// Claude CLI
|
|
123
|
+
if (!commandExists("claude")) {
|
|
124
|
+
console.log("");
|
|
125
|
+
console.log("Claude Code CLI not found. It will be installed globally now.");
|
|
126
|
+
await ask(rl, "Press Enter to continue. ");
|
|
127
|
+
console.log("Installing @anthropic-ai/claude-code globally...");
|
|
128
|
+
try {
|
|
129
|
+
execSync("npm install -g @anthropic-ai/claude-code", { stdio: "inherit" });
|
|
130
|
+
console.log("Claude CLI installed.");
|
|
131
|
+
} catch {
|
|
132
|
+
console.log("");
|
|
133
|
+
console.log("Failed to install Claude CLI. Install it manually:");
|
|
134
|
+
console.log(" npm install -g @anthropic-ai/claude-code");
|
|
135
|
+
console.log("");
|
|
136
|
+
rl.close();
|
|
137
|
+
process.exit(1);
|
|
138
|
+
}
|
|
122
139
|
}
|
|
123
140
|
|
|
124
141
|
rl.close();
|
|
@@ -127,7 +144,6 @@ async function runSetupWizard() {
|
|
|
127
144
|
const lines = [];
|
|
128
145
|
if (apiKey) lines.push(`ELEVENLABS_API_KEY=${apiKey}`);
|
|
129
146
|
if (password) lines.push(`DASHBOARD_PASSWORD=${password}`);
|
|
130
|
-
lines.push(`TUNNEL_ENABLED=${tunnelEnabled}`);
|
|
131
147
|
await writeFile(ENV_PATH, lines.join("\n") + "\n", "utf-8");
|
|
132
148
|
|
|
133
149
|
console.log("All done! Starting VoiceCC...");
|