voicecc 1.1.16 → 1.1.18
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
CHANGED
|
@@ -130,16 +130,7 @@ function showInfo() {
|
|
|
130
130
|
|
|
131
131
|
if (status) {
|
|
132
132
|
console.log(` Dashboard: http://localhost:${status.dashboardPort}`);
|
|
133
|
-
|
|
134
|
-
if (status.tunnelUrl) {
|
|
135
|
-
tunnelLabel = status.tunnelUrl;
|
|
136
|
-
} else if (status.tunnelError) {
|
|
137
|
-
tunnelLabel = `FAILED - ${status.tunnelError}`;
|
|
138
|
-
} else if (tunnelWanted) {
|
|
139
|
-
tunnelLabel = "starting...";
|
|
140
|
-
} else {
|
|
141
|
-
tunnelLabel = "disabled";
|
|
142
|
-
}
|
|
133
|
+
const tunnelLabel = status.tunnelUrl ?? (tunnelWanted ? "starting..." : "disabled");
|
|
143
134
|
console.log(` Tunnel: ${tunnelLabel}`);
|
|
144
135
|
} else {
|
|
145
136
|
console.log(" Server is starting up...");
|
|
@@ -351,7 +342,7 @@ function showLogs() {
|
|
|
351
342
|
process.exit(1);
|
|
352
343
|
}
|
|
353
344
|
|
|
354
|
-
const child = spawn("tail", ["-
|
|
345
|
+
const child = spawn("tail", ["-f", LOG_FILE], { stdio: "inherit" });
|
|
355
346
|
process.on("SIGINT", () => child.kill("SIGINT"));
|
|
356
347
|
child.on("exit", (code) => process.exit(code ?? 0));
|
|
357
348
|
}
|
|
@@ -587,15 +578,15 @@ startDaemon();
|
|
|
587
578
|
|
|
588
579
|
// Poll for status.json until the server is ready (dashboard + tunnel if enabled)
|
|
589
580
|
const tunnelEnabled = readFileSync(ENV_PATH, "utf-8").includes("TUNNEL_ENABLED=true");
|
|
590
|
-
const MAX_WAIT_MS = tunnelEnabled ?
|
|
581
|
+
const MAX_WAIT_MS = tunnelEnabled ? 45000 : 10000;
|
|
591
582
|
const POLL_INTERVAL_MS = 500;
|
|
592
583
|
const startTime = Date.now();
|
|
593
584
|
|
|
594
585
|
while (Date.now() - startTime < MAX_WAIT_MS) {
|
|
595
586
|
await new Promise((resolve) => setTimeout(resolve, POLL_INTERVAL_MS));
|
|
596
587
|
const status = readStatus();
|
|
597
|
-
// Status file is written early (before tunnel). Wait for tunnelUrl
|
|
598
|
-
if (status && (!tunnelEnabled || status.tunnelUrl
|
|
588
|
+
// Status file is written early (before tunnel). Wait for tunnelUrl if tunnel is enabled.
|
|
589
|
+
if (status && (!tunnelEnabled || status.tunnelUrl)) break;
|
|
599
590
|
}
|
|
600
591
|
|
|
601
592
|
showInfo();
|