(socket: net.Socket)
| 196 | private static encodeDeviceId(deviceId: string): string { |
| 197 | if (!deviceId || deviceId === '.' || deviceId === '..') { |
| 198 | throw new CliError('The Hermes debugger device id must be a non-empty WebSocket path segment.'); |
| 199 | } |
| 200 | try { |
| 201 | return encodeURIComponent(deviceId); |
| 202 | } catch { |
| 203 | throw new CliError('The Hermes debugger device id contains invalid Unicode.'); |
| 204 | } |
| 205 | } |
| 206 | |
| 207 | /** |
| 208 | * Connect to the Hermes debug WebSocket for the given device context ID. |