Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return new Promise(async (resolve, reject) => {
const uuid = uuidgen()
debug('delegating to proxy websocket', command, uuid)
const channel = await getSessionForTab(args.tab)
const msg = {
type: 'request',
cmdline: command,
uuid,
cwd: process.env.PWD,
execOptions: execOptionsForInvoke
}
channel.send(JSON.stringify(msg))
const MARKER = '\n'
let raw = ''
const onMessage = (data: string) => {
// debug('raw', uuid, data)
raw += data