Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
});
}
msgs = msgs.map((msg) => ({
...msg,
text: msg.text.length <= MAX_MESSAGE_SIZE ? msg.text :
msg.text.slice(0, MAX_MESSAGE_SIZE) +
`\n(message too long, truncated at ${MAX_MESSAGE_SIZE} characters)`,
}));
return msgs;
}
// A global channel for storing the contents of stderr.
let stderrOutput: OutputChannel;
// A class for interacting with the Lean server protocol.
export class Server extends leanclient.Server {
transport: ProcessTransport;
executablePath: string;
hasLean: boolean = false; // have we found a usable copy of Lean yet?
workingDirectory: string;
options: string[];
statusChanged: LowPassFilter;
restarted: Event;
messages: Message[];
constructor() {
super(null); // TODO(gabriel): add support to lean-client-js
this.statusChanged = new LowPassFilter(300);
this.restarted = new Event();
this.messages = [];