style: biome formatting
This commit is contained in:
@@ -17,8 +17,7 @@ let state: BrowserServerState | null = null;
|
|||||||
const log = createSubsystemLogger("browser");
|
const log = createSubsystemLogger("browser");
|
||||||
const logServer = log.child("server");
|
const logServer = log.child("server");
|
||||||
|
|
||||||
export async function startBrowserControlServerFromConfig(
|
export async function startBrowserControlServerFromConfig(): Promise<BrowserServerState | null> {
|
||||||
): Promise<BrowserServerState | null> {
|
|
||||||
if (state) return state;
|
if (state) return state;
|
||||||
|
|
||||||
const cfg = loadConfig();
|
const cfg = loadConfig();
|
||||||
@@ -70,8 +69,7 @@ export async function startBrowserControlServerFromConfig(
|
|||||||
return state;
|
return state;
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function stopBrowserControlServer(
|
export async function stopBrowserControlServer(): Promise<void> {
|
||||||
): Promise<void> {
|
|
||||||
const current = state;
|
const current = state;
|
||||||
if (!current) return;
|
if (!current) return;
|
||||||
|
|
||||||
|
|||||||
@@ -175,9 +175,7 @@ export function registerGatewayCli(program: Command) {
|
|||||||
process.removeListener("SIGINT", onSigint);
|
process.removeListener("SIGINT", onSigint);
|
||||||
|
|
||||||
if (shuttingDown) {
|
if (shuttingDown) {
|
||||||
gatewayLog.info(
|
gatewayLog.info(`received ${signal} during shutdown; exiting now`);
|
||||||
`received ${signal} during shutdown; exiting now`,
|
|
||||||
);
|
|
||||||
defaultRuntime.exit(0);
|
defaultRuntime.exit(0);
|
||||||
}
|
}
|
||||||
shuttingDown = true;
|
shuttingDown = true;
|
||||||
@@ -414,9 +412,7 @@ export function registerGatewayCli(program: Command) {
|
|||||||
process.removeListener("SIGINT", onSigint);
|
process.removeListener("SIGINT", onSigint);
|
||||||
|
|
||||||
if (shuttingDown) {
|
if (shuttingDown) {
|
||||||
gatewayLog.info(
|
gatewayLog.info(`received ${signal} during shutdown; exiting now`);
|
||||||
`received ${signal} during shutdown; exiting now`,
|
|
||||||
);
|
|
||||||
defaultRuntime.exit(0);
|
defaultRuntime.exit(0);
|
||||||
}
|
}
|
||||||
shuttingDown = true;
|
shuttingDown = true;
|
||||||
|
|||||||
@@ -569,7 +569,8 @@ function formatForLog(value: unknown): string {
|
|||||||
if (value.name) parts.push(value.name);
|
if (value.name) parts.push(value.name);
|
||||||
if (value.message) parts.push(value.message);
|
if (value.message) parts.push(value.message);
|
||||||
const code =
|
const code =
|
||||||
"code" in value && (typeof value.code === "string" || typeof value.code === "number")
|
"code" in value &&
|
||||||
|
(typeof value.code === "string" || typeof value.code === "number")
|
||||||
? String(value.code)
|
? String(value.code)
|
||||||
: "";
|
: "";
|
||||||
if (code) parts.push(`code=${code}`);
|
if (code) parts.push(`code=${code}`);
|
||||||
@@ -1480,7 +1481,9 @@ export async function startGatewayServer(
|
|||||||
running: false,
|
running: false,
|
||||||
lastError: "not configured",
|
lastError: "not configured",
|
||||||
};
|
};
|
||||||
logTelegram.info("skipping provider start (no TELEGRAM_BOT_TOKEN/config)");
|
logTelegram.info(
|
||||||
|
"skipping provider start (no TELEGRAM_BOT_TOKEN/config)",
|
||||||
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
logTelegram.info("starting provider");
|
logTelegram.info("starting provider");
|
||||||
@@ -2589,9 +2592,7 @@ export async function startGatewayServer(
|
|||||||
`wide-area DNS-SD ${result.changed ? "updated" : "unchanged"} (${WIDE_AREA_DISCOVERY_DOMAIN} → ${result.zonePath})`,
|
`wide-area DNS-SD ${result.changed ? "updated" : "unchanged"} (${WIDE_AREA_DISCOVERY_DOMAIN} → ${result.zonePath})`,
|
||||||
);
|
);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
logDiscovery.warn(
|
logDiscovery.warn(`wide-area discovery update failed: ${String(err)}`);
|
||||||
`wide-area discovery update failed: ${String(err)}`,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user