You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
consttsProxyResult=stdoutLogs.find(log=>log.includes('>>>>>>> <-- found this in stream start reading'));
43
+
constpreparedStdout=tsProxyResult.slice(tsProxyResult.indexOf('>>>>>>> <-- found this in stream start reading')+46,tsProxyResult.lastIndexOf('<<<<<<< <-- found end'));
44
+
constpreparedStdoutLogs=stdoutLogs.filter(log=>!log.includes('>>>>>>> <-- found this in stream start reading'));
45
+
for(constlogofpreparedStdoutLogs){
46
+
console.log(log);
47
+
}
43
48
constparsed=JSON.parse(preparedStdout);
44
49
if(!silent){
45
50
parsed.capturedLogs.forEach((log)=>{
@@ -52,10 +57,10 @@ export function callTsProxy(tsCode, silent=false) {
52
57
}
53
58
resolve(parsed.result);
54
59
}catch(e){
55
-
reject(newError("Invalid JSON from tsproxy: "+stdout));
60
+
reject(newError("Invalid JSON from tsproxy: "+preparedStdout));
56
61
}
57
62
}else{
58
-
console.error(`tsproxy exited with non-0, this should never happen, stdout: ${stdout}, stderr: ${stderr}`);
63
+
console.error(`tsproxy exited with non-0, this should never happen, stdout: ${preparedStdout}, stderr: ${stderr}`);
0 commit comments