MCPcopy Create free account
hub / github.com/ChromeDevTools/chrome-devtools-mcp / assertValidSessionId

Function assertValidSessionId

src/daemon/utils.ts:24–31  ·  view source on GitHub ↗
(sessionId: string)

Source from the content-addressed store, hash-verified

22export const DAEMON_CLIENT_NAME = 'chrome-devtools-cli-daemon';
23
24export function assertValidSessionId(sessionId: string): void {
25 if (!sessionId) {
26 return;
27 }
28 if (!/^[a-fA-F0-9-]+$/.test(sessionId)) {
29 throw new Error(`Invalid sessionId: ${sessionId}`);
30 }
31}
32
33// Using these paths due to strict limits on the POSIX socket path length.
34export function getSocketPath(sessionId: string): string {

Callers 8

daemon.tsFile · 0.85
getSocketPathFunction · 0.85
getRuntimeHomeFunction · 0.85
getPidFilePathFunction · 0.85
getDaemonPidFunction · 0.85
isDaemonRunningFunction · 0.85
chrome-devtools.tsFile · 0.85
utils.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected