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
4
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.4.25 to 0.4.26

2

dist/config.js

@@ -21,2 +21,4 @@ /* --------------------------------------------------------------------------------------------

this.golang_executable = process.env.GOLANG_EXECUTABLE || 'go';
this.utm_source = process.env.UTM_SOURCE || "";
this.telemetry_id = process.env.TELEMETRY_ID || "";
}

@@ -23,0 +25,0 @@ }

@@ -40,2 +40,4 @@ /* --------------------------------------------------------------------------------------------

const fs = __importStar(require("fs"));
const uuid = __importStar(require("uuid"));
const crypto = __importStar(require("crypto"));
const vscode_languageserver_1 = require("vscode-languageserver");

@@ -169,3 +171,3 @@ const node_fetch_1 = __importDefault(require("node-fetch"));

/* Fetch Vulnerabilities by component-analysis batch api-call */
const fetchVulnerabilities = (reqData) => __awaiter(void 0, void 0, void 0, function* () {
const fetchVulnerabilities = (reqData, manifestHash, requestId) => __awaiter(void 0, void 0, void 0, function* () {
let url = config_1.config.server_url;

@@ -181,6 +183,14 @@ if (config_1.config.three_scale_user_token) {

'Authorization': 'Bearer ' + config_1.config.api_token,
'X-Request-Id': requestId,
};
url += `&utm_content=${manifestHash}`;
if (config_1.config.utm_source) {
url += `&utm_source=${config_1.config.utm_source}`;
}
if (config_1.config.uuid) {
headers['uuid'] = config_1.config.uuid;
}
if (config_1.config.telemetry_id) {
headers['X-Telemetry-Id'] = config_1.config.telemetry_id;
}
try {

@@ -273,2 +283,4 @@ const response = yield node_fetch_1.default(url, {

const start = new Date().getTime();
const manifestHash = crypto.createHash("sha256").update(diagnosticFilePath).digest("hex");
const requestId = uuid.v4();
// Closure which captures common arg to runPipeline.

@@ -291,3 +303,3 @@ const pipeline = response => runPipeline(response, diagnostics, packageAggregator, diagnosticFilePath, pkgMap, totalCount);

const allRequests = slicePayload(requestPayload, batchSize, ecosystem).
map(request => fetchVulnerabilities(request).then(cacheAndRunPipeline));
map(request => fetchVulnerabilities(request, manifestHash, requestId).then(cacheAndRunPipeline));
yield Promise.allSettled(allRequests);

@@ -294,0 +306,0 @@ const end = new Date().getTime();

3

package.json
{
"name": "fabric8-analytics-lsp-server",
"description": "LSP Server for Dependency Analytics",
"version": "0.4.25",
"version": "0.4.26",
"author": "Pavel Odvody",

@@ -50,2 +50,3 @@ "contributors": [

"@types/node-fetch": "^2.5.7",
"@types/uuid": "^8.3.0",
"chai": "^4.2.0",

@@ -52,0 +53,0 @@ "fake-exec": "^1.1.0",

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