minor improvements

This commit is contained in:
MasterGordon 2025-10-26 00:52:56 +02:00
parent 77329562ec
commit efaf30a863
2 changed files with 4 additions and 4 deletions

View File

@ -79,7 +79,7 @@ async function isProcessRunning(pid: number): Promise<boolean> {
async function isServerResponsive(port: number): Promise<boolean> {
try {
const response = await fetch(`http://localhost:${port}/`, {
signal: AbortSignal.timeout(2000),
signal: AbortSignal.timeout(50),
});
return response.ok || response.status === 404; // Server is up if it responds at all
} catch {
@ -109,8 +109,8 @@ async function startServer(): Promise<number> {
const proc = Bun.spawn(
["dotnet", "csharpier", "server", "--server-port", String(SERVER_PORT)],
{
stdout: "inherit",
stderr: "inherit",
stdout: null,
stderr: null,
},
);

View File

@ -1,6 +1,6 @@
{
"name": "csharpierd",
"version": "1.0.2",
"version": "1.0.3",
"description": "A persistent CSharpier formatting daemon with automatic server management and idle timeout",
"module": "index.ts",
"type": "module",