in src/http/httpProxy.ts [20:36]
export async function waitForProxyRequest(invocationId: string): Promise<http.IncomingMessage> {
return new Promise((resolve, _reject) => {
const req = requests[invocationId];
if (req) {
resolve(req);
delete requests[invocationId];
} else {
invocRequestEmitter.once(invocationId, () => {
const req = requests[invocationId];
if (req) {
resolve(req);
delete requests[invocationId];
}
});
}
});
}