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

Function invoke

packages/vite/src/shared/moduleRunnerTransport.ts:49–63  ·  view source on GitHub ↗
(name, data)

Source from the content-addressed store, hash-verified

47 return {
48 ...transport,
49 async invoke(name, data) {
50 const result = await transport.invoke!({
51 type: 'custom',
52 event: 'vite:invoke',
53 data: {
54 id: 'send',
55 name,
56 data,
57 } satisfies InvokeSendData,
58 } satisfies CustomPayload)
59 if ('error' in result) {
60 throw reviveInvokeError(result.error)
61 }
62 return result.result
63 },
64 }
65 }
66

Callers

nothing calls this directly

Calls 6

promiseWithResolversFunction · 0.90
reviveInvokeErrorFunction · 0.85
deleteMethod · 0.80
unrefMethod · 0.80
invokeMethod · 0.65
setMethod · 0.45

Tested by

no test coverage detected