Socket
Socket
Sign inDemoInstall

@contrast/reporter

Package Overview
Dependencies
Maintainers
11
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@contrast/reporter - npm Package Compare versions

Comparing version 1.20.0 to 1.20.1

1

lib/reporters/contrast-ui/endpoints/traces/index.d.ts

@@ -15,2 +15,3 @@ import { AxiosInstance } from 'axios';

store: RequestStore;
timestamp: number;
};

@@ -17,0 +18,0 @@ export default class Traces extends NgEndpoint {

@@ -52,2 +52,4 @@ "use strict";

})(States = exports.States || (exports.States = {}));
const REQ_DURRATION_TIMEOUT_MS = 3000;
const COMPLETE_WAIT_MS = 3000;
class Traces extends ng_endpoint_1.default {

@@ -110,2 +112,9 @@ constructor(core, uiReporter) {

}, this.core.events.lifecycle);
setInterval(() => {
for (const [store, accum] of this.accumMap.entries()) {
if (accum.timestamp - Date.now() > REQ_DURRATION_TIMEOUT_MS) {
this.accumMap.delete(store);
}
}
}, 1000).unref();
}

@@ -128,2 +137,3 @@ getStore(msg) {

store,
timestamp: Date.now(),
};

@@ -137,3 +147,3 @@ this.accumMap.set(store, meta);

accum.state = States.COMPLETE;
}, 3000).unref();
}, COMPLETE_WAIT_MS).unref();
}

@@ -140,0 +150,0 @@ async put() {

2

lib/reporters/contrast-ui/endpoints/v1-endpoint.js

@@ -30,3 +30,3 @@ "use strict";

this.serverPath = (0, utils_1.base64EncodeUnpadded)(core.appInfo.app_dir);
this.serverType = (0, utils_1.base64EncodeUnpadded)(`node.js ${core.appInfo.node_version}`);
this.serverType = (0, utils_1.base64EncodeUnpadded)(core.appInfo.serverType);
this.appLanguage = (0, utils_1.base64EncodeUnpadded)('Node');

@@ -33,0 +33,0 @@ this.appName = (0, utils_1.base64EncodeUnpadded)(core.appInfo.name);

@@ -91,3 +91,3 @@ "use strict";

'Server-Path': base64Encode(core.appInfo.app_dir),
'Server-Type': base64Encode(`node.js ${core.appInfo.node_version}`),
'Server-Type': base64Encode(core.appInfo.serverType),
'X-Contrast-Agent': `Node ${core.agentVersion}`,

@@ -94,0 +94,0 @@ 'X-Contrast-Header-Encoding': 'base64',

{
"name": "@contrast/reporter",
"version": "1.20.0",
"version": "1.20.1",
"description": "Subscribes to agent messages and reports them",

@@ -21,3 +21,3 @@ "license": "SEE LICENSE IN LICENSE",

"dependencies": {
"@contrast/common": "1.15.0",
"@contrast/common": "1.15.1",
"axios": "^0.27.2",

@@ -24,0 +24,0 @@ "crc-32": "^1.2.2",

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

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