chore(lint): apply biome fixes

This commit is contained in:
Peter Steinberger
2026-01-04 19:08:22 +01:00
parent e005dcb8e7
commit 0716a624a8
5 changed files with 19 additions and 9 deletions

View File

@@ -51,13 +51,13 @@ describe("cli program", () => {
expect(statusCommand).toHaveBeenCalled();
});
it("runs config alias as configure", async () => {
it("runs config alias as configure", async () => {
const program = buildProgram();
await program.parseAsync(["config"], { from: "user" });
expect(configureCommand).toHaveBeenCalled();
});
it("runs nodes list and calls node.pair.list", async () => {
it("runs nodes list and calls node.pair.list", async () => {
callGateway.mockResolvedValue({ pending: [], paired: [] });
const program = buildProgram();
runtime.log.mockClear();

View File

@@ -455,7 +455,8 @@ export async function runConfigureWizard(
const localUrl = "ws://127.0.0.1:18789";
const localProbe = await probeGatewayReachable({
url: localUrl,
token: baseConfig.gateway?.auth?.token ?? process.env.CLAWDBOT_GATEWAY_TOKEN,
token:
baseConfig.gateway?.auth?.token ?? process.env.CLAWDBOT_GATEWAY_TOKEN,
password:
baseConfig.gateway?.auth?.password ??
process.env.CLAWDBOT_GATEWAY_PASSWORD,

View File

@@ -97,7 +97,11 @@ async function isWSL(): Promise<boolean> {
wslCached = false;
return wslCached;
}
if (process.env.WSL_INTEROP || process.env.WSL_DISTRO_NAME || process.env.WSLENV) {
if (
process.env.WSL_INTEROP ||
process.env.WSL_DISTRO_NAME ||
process.env.WSLENV
) {
wslCached = true;
return wslCached;
}
@@ -118,7 +122,9 @@ type BrowserOpenCommand = {
async function resolveBrowserOpenCommand(): Promise<BrowserOpenCommand> {
const platform = process.platform;
const hasDisplay = Boolean(process.env.DISPLAY || process.env.WAYLAND_DISPLAY);
const hasDisplay = Boolean(
process.env.DISPLAY || process.env.WAYLAND_DISPLAY,
);
const isSsh =
Boolean(process.env.SSH_CLIENT) ||
Boolean(process.env.SSH_TTY) ||
@@ -172,7 +178,9 @@ export function formatControlUiSshHint(params: {
const basePath = normalizeControlUiBasePath(params.basePath);
const uiPath = basePath ? `${basePath}/` : "/";
const localUrl = `http://localhost:${params.port}${uiPath}`;
const tokenParam = params.token ? `?token=${encodeURIComponent(params.token)}` : "";
const tokenParam = params.token
? `?token=${encodeURIComponent(params.token)}`
: "";
const authedUrl = params.token ? `${localUrl}${tokenParam}` : undefined;
const sshTarget = resolveSshTargetHint();
return [

View File

@@ -92,7 +92,8 @@ export async function callGateway<T = unknown>(
client.stop();
stop(err as Error);
}
}, onClose: (code, reason) => {
},
onClose: (code, reason) => {
if (settled || ignoreClose) return;
ignoreClose = true;
client.stop();

View File

@@ -131,8 +131,8 @@ export const chatHandlers: GatewayRequestHandlers = {
params,
respond,
context,
client,
isWebchatConnect,
client: _client,
isWebchatConnect: _isWebchatConnect,
}) => {
if (!validateChatSendParams(params)) {
respond(