@flowfuse/nr-launcher
Advanced tools
Comparing version 2.6.1-44d0b7e-202407101152.0 to 2.6.1-d92228c-202407261025.0
@@ -635,2 +635,27 @@ const fs = require('fs') | ||
}) | ||
let stderrBuffer = '' | ||
this.proc.stderr.on('data', (data) => { | ||
// Do not assume `data` is a complete log record. | ||
// Parse until newline | ||
stderrBuffer = stderrBuffer + data | ||
let linebreak = stderrBuffer.indexOf('\n') | ||
while (linebreak > -1) { | ||
const line = stderrBuffer.substring(0, linebreak) | ||
if (line.length > 0) { | ||
if (line[0] === '{' && line[line.length - 1] === '}') { | ||
// In case something console.log's directly, we can't assume the line is JSON | ||
// from our logger | ||
try { | ||
this.logBuffer.add(JSON.parse(line)) | ||
} catch (err) { | ||
this.logBuffer.add({ msg: line }) | ||
} | ||
} else { | ||
this.logBuffer.add({ msg: line }) | ||
} | ||
} | ||
stderrBuffer = stderrBuffer.substring(linebreak + 1) | ||
linebreak = stderrBuffer.indexOf('\n') | ||
} | ||
}) | ||
} | ||
@@ -637,0 +662,0 @@ |
{ | ||
"name": "@flowfuse/nr-launcher", | ||
"version": "2.6.1-44d0b7e-202407101152.0", | ||
"version": "2.6.1-d92228c-202407261025.0", | ||
"description": "FlowFuse Launcher for running Node-RED", | ||
@@ -5,0 +5,0 @@ "exports": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
559176
3373
372