Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fabric8-analytics-lsp-server

Package Overview
Dependencies
Maintainers
1
Versions
103
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fabric8-analytics-lsp-server - npm Package Compare versions

Comparing version 0.1.50 to 0.1.51

21

consumers.js

@@ -29,3 +29,3 @@ /* --------------------------------------------------------------------------------------------

class DiagnosticsPipeline {
constructor(classes, dependency, config, diags) {
constructor(classes, dependency, config, diags, uri) {
this.items = classes.map((i) => { return new i(dependency, config); });

@@ -35,2 +35,3 @@ this.dependency = dependency;

this.diagnostics = diags;
this.uri = uri;
}

@@ -40,3 +41,3 @@ run(data) {

if (item.consume(data)) {
for (let d of item.produce())
for (let d of item.produce(this.uri))
this.diagnostics.push(d);

@@ -102,3 +103,3 @@ }

}
produce() {
produce(ctx) {
if (this.item.length > 0) {

@@ -118,9 +119,15 @@ let cveList = [];

if (this.changeTo != null) {
let command = {
let codeAction = {
title: "Switch to recommended version " + this.changeTo,
command: "lsp.applyTextEdit",
arguments: [{ range: diagnostic.range, newText: this.changeTo }]
diagnostics: [diagnostic],
edit: {
changes: {}
}
};
codeAction.edit.changes[ctx] = [{
range: diagnostic.range,
newText: this.changeTo
}];
diagnostic.message += ". Recommendation: use version " + this.changeTo;
codeActionsMap[diagnostic.message] = command;
codeActionsMap[diagnostic.message] = codeAction;
}

@@ -127,0 +134,0 @@ return [diagnostic];

@@ -1,1 +0,1 @@

{"name":"fabric8-analytics-lsp-server","description":"LSP Server for Dependency Analytics","version":"0.1.50","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.51","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"}}}

@@ -223,3 +223,3 @@ /* --------------------------------------------------------------------------------------------

};
let getComponentsInfo = (request_payload, aggregator, components, diagnostics) => __awaiter(this, void 0, void 0, function* () {
let getComponentsInfo = (request_payload, aggregator, components, diagnostics, uri) => __awaiter(this, void 0, void 0, function* () {
for (let i = 0; i < request_payload.length; i += 10) {

@@ -234,3 +234,3 @@ let pck = request_payload.slice(i, i + 10);

if (r.result.data[0].version.pname[0] === com.name.value && r.result.data[0].version.version[0] === com.version.value) {
let pipeline = new consumers_1.DiagnosticsPipeline(DiagnosticsEngines, com, config, diagnostics);
let pipeline = new consumers_1.DiagnosticsPipeline(DiagnosticsEngines, com, config, diagnostics, uri);
pipeline.run(r);

@@ -260,3 +260,3 @@ aggregator.aggregate(com);

constructPayload('npm', deps).then((payload) => {
getComponentsInfo(payload, aggregator, deps, diagnostics);
getComponentsInfo(payload, aggregator, deps, diagnostics, uri);
});

@@ -278,3 +278,3 @@ });

constructPayload('maven', deps).then((payload) => {
getComponentsInfo(payload, aggregator, deps, diagnostics);
getComponentsInfo(payload, aggregator, deps, diagnostics, uri);
});

@@ -294,3 +294,3 @@ });

constructPayload('pypi', deps).then((payload) => {
getComponentsInfo(payload, aggregator, deps, diagnostics);
getComponentsInfo(payload, aggregator, deps, diagnostics, uri);
});

@@ -317,10 +317,10 @@ });

clearTimeout(checkDelay);
let commands = [];
let codeActions = [];
for (let diagnostic of params.context.diagnostics) {
let command = consumers_1.codeActionsMap[diagnostic.message];
if (command != null) {
commands.push(command);
let codeAction = consumers_1.codeActionsMap[diagnostic.message];
if (codeAction != null) {
codeActions.push(codeAction);
}
}
return commands;
return codeActions;
});

@@ -327,0 +327,0 @@ connection.onDidCloseTextDocument((params) => {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc