MCPcopy
hub / github.com/vitejs/vite / handleMsg

Function handleMsg

playground/hmr-ssr/__tests__/hmr-ssr.spec.ts:1036–1049  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

1034 }
1035
1036 const handleMsg = (text: string) => {
1037 try {
1038 text = text.replace(/\n$/, '')
1039 logsMessages.push(text)
1040 const done = processMsg(text)
1041 if (done) {
1042 resolve()
1043 logsEmitter.off('log', handleMsg)
1044 }
1045 } catch (err) {
1046 reject(err)
1047 logsEmitter.off('log', handleMsg)
1048 }
1049 }
1050
1051 timeoutId = setTimeout(() => {
1052 const nextTarget = Array.isArray(target)

Callers

nothing calls this directly

Calls 2

offMethod · 0.65
resolveFunction · 0.50

Tested by

no test coverage detected