MCPcopy
hub / github.com/sindresorhus/execa / sendMessageAsync

Function sendMessageAsync

lib/ipc/send.js:34–57  ·  view source on GitHub ↗
({anyProcess, channel, methodName, isSubprocess, message, strict})

Source from the content-addressed store, hash-verified

32};
33
34const sendMessageAsync = async ({anyProcess, channel, methodName, isSubprocess, message, strict}) => {
35 const wrappedMessage = handleSendStrict({
36 anyProcess,
37 channel,
38 isSubprocess,
39 message,
40 strict,
41 });
42 const outgoingMessagesState = startSendMessage(anyProcess, wrappedMessage, strict);
43 try {
44 await sendOneMessage({
45 anyProcess,
46 methodName,
47 isSubprocess,
48 wrappedMessage,
49 message,
50 });
51 } catch (error) {
52 disconnect(anyProcess);
53 throw error;
54 } finally {
55 endSendMessage(outgoingMessagesState);
56 }
57};
58
59// Used internally by `cancelSignal`
60export const sendOneMessage = async ({anyProcess, methodName, isSubprocess, wrappedMessage, message}) => {

Callers 1

sendMessageFunction · 0.85

Calls 5

handleSendStrictFunction · 0.90
startSendMessageFunction · 0.90
disconnectFunction · 0.90
endSendMessageFunction · 0.90
sendOneMessageFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…