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