MCPcopy Create free account
hub / github.com/Snapchat/Valdi / constructor

Method constructor

npm_modules/cli/src/utils/hermesClient.ts:198–205  ·  view source on GitHub ↗
(socket: net.Socket)

Source from the content-addressed store, hash-verified

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.

Callers

nothing calls this directly

Calls 3

onDataMethod · 0.95
rejectAllMethod · 0.95
onMethod · 0.65

Tested by

no test coverage detected