@influxdata/flux-lsp-cli
Advanced tools
Comparing version 0.4.0 to 0.4.1
{ | ||
"name": "@influxdata/flux-lsp-cli", | ||
"version": "0.4.0", | ||
"version": "0.4.1", | ||
"description": "Flux cli LSP server", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -36,3 +36,3 @@ #!/usr/bin/env node | ||
const server = new Server(argv['disable-folding']) | ||
let server = new Server(argv['disable-folding']) | ||
@@ -71,15 +71,21 @@ const respond = (data) => { | ||
const handleIPC = (data) => { | ||
const input = `\n\n${JSON.stringify(data)}` | ||
log(`REQUEST: ${input}\n`) | ||
const resp = server.process(input) | ||
try { | ||
const input = `\n\n${JSON.stringify(data)}` | ||
log(`REQUEST: ${input}\n`) | ||
const resp = server.process(input) | ||
const msg = resp.get_message() | ||
if (msg) { | ||
log(`RESPONSE: ${msg}\n`) | ||
respondIPC(msg) | ||
} | ||
const msg = resp.get_message() | ||
if (msg) { | ||
log(`RESPONSE: ${msg}\n`) | ||
respondIPC(msg) | ||
} | ||
const err = resp.get_error() | ||
if (err) { | ||
log(`ERROR: ${err}\n`) | ||
const err = resp.get_error() | ||
if (err) { | ||
log(`ERROR: ${err}\n`) | ||
} | ||
} catch (ex) { | ||
log('Caught unknown error') | ||
server = new Server(argv['disable-folding']) | ||
respondIPC('') | ||
} | ||
@@ -86,0 +92,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
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
2189295
17
6239