MCPcopy Create free account
hub / github.com/gnmyt/Nexterm / processOutput

Method processOutput

server/lib/ScriptLayer.js:78–85  ·  view source on GitHub ↗
(output)

Source from the content-addressed store, hash-verified

76 onData(data) { this.processOutput(data.toString()); }
77
78 processOutput(output) {
79 const sudo = checkSudoPrompt(output);
80 if (sudo) { this.pending = sudo; this.broadcast(MSG.PROMPT, { inputType: "password", ...sudo }); return; }
81 this.buffer += output;
82 const lines = this.buffer.split("\n");
83 this.buffer = lines.pop() || "";
84 lines.forEach(l => this.processLine(l));
85 }
86
87 processLine(line) {
88 if (this.suppressOutput) {

Callers 1

onDataMethod · 0.95

Calls 3

broadcastMethod · 0.95
processLineMethod · 0.95
checkSudoPromptFunction · 0.85

Tested by

no test coverage detected