(ws: WebSocket)
| 2268 | }; |
| 2269 | } |
| 2270 | function emitFullGraph(ws: WebSocket) { |
| 2271 | try { |
| 2272 | if (verbose) { |
| 2273 | try { |
| 2274 | const payload = fullGraphPayload(); |
| 2275 | console.log('[hmr-ws][graph] emitFullGraph version', payload.version, 'modules=', payload.modules.length); |
| 2276 | if (payload.modules.length) { |
| 2277 | console.log( |
| 2278 | '[hmr-ws][graph] sample module ids', |
| 2279 | payload.modules.slice(0, 5).map((m: any) => m.id), |
| 2280 | ); |
| 2281 | } |
| 2282 | } catch {} |
| 2283 | } |
| 2284 | ws.send(JSON.stringify(fullGraphPayload())); |
| 2285 | } catch {} |
| 2286 | } |
| 2287 | function emitDelta(changed: GraphModule[], removed: string[]) { |
| 2288 | if (!wss) return; |
| 2289 | // Record this version's txn batch order |
no test coverage detected