Skip to content

Commit f7688df

Browse files
committed
1 parent d1887a6 commit f7688df

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

adminforth/commands/callTsProxy.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ export function callTsProxy(tsCode, silent=false) {
3939
child.on("close", (code) => {
4040
if (code === 0) {
4141
try {
42-
const tsProxyResult = stdoutLogs.find(log => log.includes('>>>>>>> <-- found this in stream start reading'));
43-
const preparedStdout = tsProxyResult.slice(tsProxyResult.indexOf('>>>>>>> <-- found this in stream start reading') + 46, tsProxyResult.lastIndexOf('<<<<<<< <-- found end'));
44-
const preparedStdoutLogs = stdoutLogs.filter(log => !log.includes('>>>>>>> <-- found this in stream start reading'));
42+
const tsProxyResult = stdoutLogs.find(log => log.includes('>>>>>>>'));
43+
const preparedStdout = tsProxyResult.slice(tsProxyResult.indexOf('>>>>>>>') + 46, tsProxyResult.lastIndexOf('<<<<<<<'));
44+
const preparedStdoutLogs = stdoutLogs.filter(log => !log.includes('>>>>>>>'));
4545
for (const log of preparedStdoutLogs) {
4646
console.log(log);
4747
}

adminforth/commands/proxy.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,25 +42,25 @@ import path from 'path';
4242
// Restore original console.log
4343
console.log = origLog;
4444
console.log(
45-
">>>>>>> <-- found this in stream start reading"+
45+
">>>>>>>"+
4646
JSON.stringify({
4747
result,
4848
capturedLogs,
4949
error: null
5050
})
51-
+"<<<<<<< <-- found end"
51+
+"<<<<<<<"
5252
);
5353
} catch (error: any) {
5454
// Restore original console.log
5555
console.log = origLog;
5656
console.log(
57-
">>>>>>> <-- found this in stream start reading"+
57+
">>>>>>>"+
5858
JSON.stringify({
5959
error: error.message,
6060
stack: error.stack,
6161
capturedLogs
6262
})
63-
+"<<<<<<< <-- found end"
63+
+"<<<<<<<"
6464
);
6565
} finally {
6666
await unlink(tmpFile).catch(() => {});

0 commit comments

Comments
 (0)