Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export async function initClient(serverInfo: ServerInfo): Promise {
const client = new RSPClient('localhost', serverInfo.port);
await client.connect();
client.getIncomingHandler().onPromptString(event => {
return new Promise((resolve, reject) => {
vscode.window.showInputBox({ prompt: event.prompt, password: true })
.then(value => {
if (value && value.trim().length) {
resolve(value);
} else {
reject(new Error('Cancelled by user'));
}
});
});
});
client.getOutgoingHandler().registerClientCapabilities(