fabric8-analytics-lsp-server
Advanced tools
Comparing version 0.1.42 to 0.1.43
@@ -1,1 +0,1 @@ | ||
{"name":"fabric8-analytics-lsp-server","description":"LSP Server for Dependency Analytics","version":"0.1.42","author":"Pavel Odvody","contributors":[{"name":"Michal Srb","email":"michal@redhat.com"},{"name":"Jyasveer Gotta","email":"jgotta@redhat.com"},{"name":"Jaivardhan Kumar","email":"jakumar@redhat.com"}],"license":"Apache-2.0","engines":{"node":"*"},"keywords":["fabric8-analytics","LSP"],"repository":{"type":"git","url":"https://github.com/fabric8-analytics/fabric8-analytics-lsp-server.git"},"dependencies":{"request":"^2.79.0","stream-json":"0.4.2","vscode-languageserver":"^4.1.3","winston":"2.3.1","xml2object":"0.1.2"},"devDependencies":{"@types/node":"^6.0.52","@krux/condition-jenkins":"1.0.1","semantic-release":"8.2.0","typescript":"^2.1.4"},"scripts":{"build":"npm run clean && node node_modules/typescript/bin/tsc -p . && cp LICENSE package.json README.md output && npm run dist","clean":"rm -Rf ca-lsp-server.tar output/","dist":"cp -r node_modules output/ && cp ./package.json output/ && node -p -e \"require('./package.json').version\" > output/VERSION && rm -rf output/node_modules/typescript/ && tar cvjf ca-lsp-server.tar -C output/ .","semantic-release":"semantic-release pre && npm run build && cp -r .git output && npm publish output/ && semantic-release post"},"release":{"branch":"master","debug":false,"verifyConditions":{"path":"./node_modules/@krux/condition-jenkins"}}} | ||
{"name":"fabric8-analytics-lsp-server","description":"LSP Server for Dependency Analytics","version":"0.1.43","author":"Pavel Odvody","contributors":[{"name":"Michal Srb","email":"michal@redhat.com"},{"name":"Jyasveer Gotta","email":"jgotta@redhat.com"},{"name":"Jaivardhan Kumar","email":"jakumar@redhat.com"}],"license":"Apache-2.0","engines":{"node":"*"},"keywords":["fabric8-analytics","LSP"],"repository":{"type":"git","url":"https://github.com/fabric8-analytics/fabric8-analytics-lsp-server.git"},"dependencies":{"request":"^2.79.0","stream-json":"0.4.2","vscode-languageserver":"^4.1.3","winston":"2.3.1","xml2object":"0.1.2"},"devDependencies":{"@types/node":"^6.0.52","@krux/condition-jenkins":"1.0.1","semantic-release":"8.2.0","typescript":"^2.1.4"},"scripts":{"build":"npm run clean && node node_modules/typescript/bin/tsc -p . && cp LICENSE package.json README.md output && npm run dist","clean":"rm -Rf ca-lsp-server.tar output/","dist":"cp -r node_modules output/ && cp ./package.json output/ && node -p -e \"require('./package.json').version\" > output/VERSION && rm -rf output/node_modules/typescript/ && tar cvjf ca-lsp-server.tar -C output/ .","semantic-release":"semantic-release pre && npm run build && cp -r .git output && npm publish output/ && semantic-release post"},"release":{"branch":"master","debug":false,"verifyConditions":{"path":"./node_modules/@krux/condition-jenkins"}}} |
# Dependency Analytics LSP Server | ||
LSP Server that can analyze your dependencies specified in `package.json` and `pom.xml`. | ||
Language Server(LSP) that can analyze your dependencies specified in `package.json` and `pom.xml`. | ||
@@ -5,0 +5,0 @@ ## Build |
@@ -196,3 +196,3 @@ /* -------------------------------------------------------------------------------------------- | ||
let collector = new collector_1.DependencyCollector(null); | ||
connection.sendNotification('caNotification', 'Analyzing runtime dependencies for any security vulnerability'); | ||
connection.sendNotification('caNotification', { 'data': 'Checking for security vulnerabilities ...' }); | ||
collector.collect(stream).then((deps) => { | ||
@@ -203,7 +203,8 @@ let diagnostics = []; | ||
if (diagnostics.length > 0) { | ||
connection.sendNotification('caNotification', `Out of ${deps.length}, ${diagnostics.length} runtime dependencies have vulnerabilities`); | ||
connection.sendNotification('caNotification', { 'data': `Scanned ${deps.length} runtime dependencies. Found ${diagnostics.length} potential security vulnerability`, 'isEditAction': isEditAction }); | ||
} | ||
else { | ||
connection.sendNotification('caNotification', `Out of ${deps.length}, No runtime dependencies have vulnerabilities`); | ||
connection.sendNotification('caNotification', { 'data': `Scanned ${deps.length} runtime dependencies. No potential security vulnerability found`, 'isEditAction': isEditAction }); | ||
} | ||
isEditAction = false; | ||
connection.sendDiagnostics({ uri: uri, diagnostics: diagnostics }); | ||
@@ -232,3 +233,3 @@ }); | ||
let collector = new collector_1.PomXmlDependencyCollector(); | ||
connection.sendNotification('caNotification', 'Analyzing runtime dependencies for any security vulnerability'); | ||
connection.sendNotification('caNotification', { 'data': 'Checking for security vulnerabilities ...' }); | ||
collector.collect(stream).then((deps) => { | ||
@@ -239,7 +240,8 @@ let diagnostics = []; | ||
if (diagnostics.length > 0) { | ||
connection.sendNotification('caNotification', `Out of ${deps.length}, ${diagnostics.length} runtime dependencies have vulnerabilities`); | ||
connection.sendNotification('caNotification', { 'data': `Scanned ${deps.length} runtime dependencies. Found ${diagnostics.length} potential security vulnerability`, 'isEditAction': isEditAction }); | ||
} | ||
else { | ||
connection.sendNotification('caNotification', `Out of ${deps.length}, No runtime dependencies have vulnerabilities`); | ||
connection.sendNotification('caNotification', { 'data': `Scanned ${deps.length} runtime dependencies. No potential security vulnerability found`, 'isEditAction': isEditAction }); | ||
} | ||
isEditAction = false; | ||
connection.sendDiagnostics({ uri: uri, diagnostics: diagnostics }); | ||
@@ -285,3 +287,5 @@ }); | ||
let checkDelay; | ||
let isEditAction = false; | ||
connection.onDidSaveTextDocument((params) => { | ||
isEditAction = true; | ||
clearTimeout(checkDelay); | ||
@@ -292,2 +296,3 @@ server.handle_file_event(params.textDocument.uri, server.files.file_data[params.textDocument.uri]); | ||
/* Update internal state for code lenses */ | ||
isEditAction = true; | ||
server.files.file_data[params.textDocument.uri] = params.contentChanges[0].text; | ||
@@ -300,2 +305,3 @@ clearTimeout(checkDelay); | ||
connection.onDidOpenTextDocument((params) => { | ||
isEditAction = false; | ||
server.handle_file_event(params.textDocument.uri, params.textDocument.text); | ||
@@ -315,2 +321,3 @@ }); | ||
connection.onDidCloseTextDocument((params) => { | ||
isEditAction = false; | ||
clearTimeout(checkDelay); | ||
@@ -317,0 +324,0 @@ }); |
Sorry, the diff of this file is not supported yet
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
73316
834