voicecc 1.1.12 → 1.1.14
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 +6 -3
- package/dashboard/dist/assets/index-CU8yYWl3.js +11 -0
- package/dashboard/dist/index.html +1 -1
- package/dashboard/routes/auth.ts +19 -5
- package/package.json +1 -1
- package/server/index.ts +7 -5
- package/server/services/tunnel.ts +17 -2
- package/server/voice/browser-server.ts +125 -46
- package/server/voice/twilio-server.ts +56 -42
- package/dashboard/dist/assets/index-CBwXmenh.js +0 -11
package/bin/voicecc.js
CHANGED
|
@@ -120,6 +120,7 @@ function readStatus() {
|
|
|
120
120
|
*/
|
|
121
121
|
function showInfo() {
|
|
122
122
|
const status = readStatus();
|
|
123
|
+
const tunnelWanted = existsSync(ENV_PATH) && readFileSync(ENV_PATH, "utf-8").includes("TUNNEL_ENABLED=true");
|
|
123
124
|
|
|
124
125
|
console.log("");
|
|
125
126
|
console.log("========================================");
|
|
@@ -129,7 +130,8 @@ function showInfo() {
|
|
|
129
130
|
|
|
130
131
|
if (status) {
|
|
131
132
|
console.log(` Dashboard: http://localhost:${status.dashboardPort}`);
|
|
132
|
-
|
|
133
|
+
const tunnelLabel = status.tunnelUrl ?? (tunnelWanted ? "starting..." : "disabled");
|
|
134
|
+
console.log(` Tunnel: ${tunnelLabel}`);
|
|
133
135
|
} else {
|
|
134
136
|
console.log(" Server is starting up...");
|
|
135
137
|
console.log(" Run 'voicecc' again in a few seconds to see details.");
|
|
@@ -574,15 +576,16 @@ if (isRunning()) {
|
|
|
574
576
|
// Start the daemon
|
|
575
577
|
startDaemon();
|
|
576
578
|
|
|
577
|
-
// Poll for status.json until the server is ready
|
|
579
|
+
// Poll for status.json until the server is ready (dashboard + tunnel if enabled)
|
|
578
580
|
const tunnelEnabled = readFileSync(ENV_PATH, "utf-8").includes("TUNNEL_ENABLED=true");
|
|
579
|
-
const MAX_WAIT_MS = tunnelEnabled ?
|
|
581
|
+
const MAX_WAIT_MS = tunnelEnabled ? 45000 : 10000;
|
|
580
582
|
const POLL_INTERVAL_MS = 500;
|
|
581
583
|
const startTime = Date.now();
|
|
582
584
|
|
|
583
585
|
while (Date.now() - startTime < MAX_WAIT_MS) {
|
|
584
586
|
await new Promise((resolve) => setTimeout(resolve, POLL_INTERVAL_MS));
|
|
585
587
|
const status = readStatus();
|
|
588
|
+
// Status file is written early (before tunnel). Wait for tunnelUrl if tunnel is enabled.
|
|
586
589
|
if (status && (!tunnelEnabled || status.tunnelUrl)) break;
|
|
587
590
|
}
|
|
588
591
|
|