hashed logs

pull/531/head
Frostebite 2023-08-14 22:19:26 +01:00
parent 174bda8060
commit debe4730fa
3 changed files with 17 additions and 3 deletions

7
dist/index.js generated vendored
View File

@ -4712,7 +4712,9 @@ class CloudRunnerSystem {
return lineValues[lineValues.length - 1]; return lineValues[lineValues.length - 1];
}); });
} }
static async Run(command, suppressError = false, suppressLogs = false) { static async Run(command, suppressError = false, suppressLogs = false,
// eslint-disable-next-line no-unused-vars
outputCallback) {
for (const element of command.split(`\n`)) { for (const element of command.split(`\n`)) {
if (!suppressLogs) { if (!suppressLogs) {
remote_client_logger_1.RemoteClientLogger.log(element); remote_client_logger_1.RemoteClientLogger.log(element);
@ -4733,6 +4735,9 @@ class CloudRunnerSystem {
output += diagnosticOutput; output += diagnosticOutput;
} }
const outputChunk = `${stdout}`; const outputChunk = `${stdout}`;
if (outputCallback) {
outputCallback(outputChunk);
}
output += outputChunk; output += outputChunk;
}); });
child.on('close', (code) => { child.on('close', (code) => {

2
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long

View File

@ -16,7 +16,13 @@ export class CloudRunnerSystem {
}); });
} }
public static async Run(command: string, suppressError = false, suppressLogs = false) { public static async Run(
command: string,
suppressError = false,
suppressLogs = false,
// eslint-disable-next-line no-unused-vars
outputCallback?: (output: string) => void,
) {
for (const element of command.split(`\n`)) { for (const element of command.split(`\n`)) {
if (!suppressLogs) { if (!suppressLogs) {
RemoteClientLogger.log(element); RemoteClientLogger.log(element);
@ -38,6 +44,9 @@ export class CloudRunnerSystem {
output += diagnosticOutput; output += diagnosticOutput;
} }
const outputChunk = `${stdout}`; const outputChunk = `${stdout}`;
if (outputCallback) {
outputCallback(outputChunk);
}
output += outputChunk; output += outputChunk;
}); });
child.on('close', (code) => { child.on('close', (code) => {