aboutsummaryrefslogtreecommitdiff
path: root/src/daemon/bridge.ts
diff options
context:
space:
mode:
authoramankumarsingh77 <amankumarsingh7702@gmail.com>2026-07-28 20:34:49 +0530
committerAman Kumar <145339995+amankumarsingh77@users.noreply.github.com>2026-08-02 19:12:46 +0530
commita9bdbd8590801cd9c2fa0cda6203948ac19a779c (patch)
tree060ced4709815f9415fc1172842ed25d97de545f /src/daemon/bridge.ts
parent34e5cfdcbe29bbb5f2f46ba54eb67903abd9274d (diff)
refactor: tidy the whitespace the comment removal left behind
Drops leading blank lines where a file header was removed, collapses double blank lines, and closes the empty catch/handler blocks whose only content had been a comment. Whitespace only. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'src/daemon/bridge.ts')
-rw-r--r--src/daemon/bridge.ts8
1 files changed, 0 insertions, 8 deletions
diff --git a/src/daemon/bridge.ts b/src/daemon/bridge.ts
index bc162a7..95f6888 100644
--- a/src/daemon/bridge.ts
+++ b/src/daemon/bridge.ts
@@ -1,4 +1,3 @@
-
import WebSocket from "ws";
import { discoverWsUrl } from "../cdp/discovery";
import { isCdpRawMessage } from "../cdp/types";
@@ -7,7 +6,6 @@ import type { WireRequest, WireResponse, WireEvent } from "./protocol";
import { CDP_CONNECT_TIMEOUT_MS, CDP_COMMAND_TIMEOUT_MS } from "./protocol";
import { asString, isRecord } from "../util/guards";
-
export type SendToClient = (clientId: string, msg: WireResponse | WireEvent) => void;
export type EventHandler = (event: WireEvent, targetClientIds: string[]) => void;
@@ -27,7 +25,6 @@ export type CdpBridge = {
onClose(handler: CloseHandler): void;
};
-
interface PendingEntry {
clientId: string;
localId: number;
@@ -63,7 +60,6 @@ class IdMultiplexer {
}
}
-
class EventRouter {
private owners = new Map<string, string>();
private clientSessions = new Map<string, Set<string>>();
@@ -108,7 +104,6 @@ class EventRouter {
}
}
-
export const createCdpBridge = (): CdpBridge => {
let ws: WebSocket | null = null;
let wsUrl: string | null = null;
@@ -125,7 +120,6 @@ export const createCdpBridge = (): CdpBridge => {
isAttach: boolean;
}>();
-
const onChromeMessage = (raw: string): void => {
let parsed: unknown;
try { parsed = JSON.parse(raw); } catch { return; }
@@ -184,8 +178,6 @@ export const createCdpBridge = (): CdpBridge => {
}
};
-
-
let reconnectTimer: ReturnType<typeof setTimeout> | null = null;
let reconnectAttempt = 0;
let stopped = false;