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

@gravity-ui/expresskit

Package Overview
Dependencies
Maintainers
0
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gravity-ui/expresskit - npm Package Compare versions

Comparing version 2.1.0 to 2.2.0

8

dist/base-middleware.js

@@ -9,2 +9,3 @@ "use strict";

expressApp.use((req, res, next) => {
var _a, _b;
try {

@@ -17,3 +18,3 @@ req.id = (req.headers[constants_1.DEFAULT_REQUEST_ID_HEADER] || (0, uuid_1.v4)());

const startTime = Date.now();
const userAgent = req.get('user-agent');
const userAgent = (_a = req.get('user-agent')) !== null && _a !== void 0 ? _a : 'unknown';
const parentSpanContext = ctx.extractSpanContext(req.headers);

@@ -23,2 +24,3 @@ req.originalContext = req.ctx = ctx.create(`Express ${req.method}`, {

loggerPostfix: `[${req.id}]`,
spanKind: 1, // SERVER
});

@@ -31,3 +33,3 @@ req.ctx.set(nodekit_1.REQUEST_ID_PARAM_NAME, req.id);

req.ctx.setTag('referer', ctx.utils.redactSensitiveQueryParams(req.get('referer')));
req.ctx.setTag('remote_ip', req.ip);
req.ctx.setTag('remote_ip', (_b = req.ip) !== null && _b !== void 0 ? _b : 'unknown');
req.ctx.setTag('request_id', req.id);

@@ -43,3 +45,3 @@ req.ctx.setTag('user_agent', userAgent);

method: req.method,
url: ctx.utils.redactSensitiveQueryParams(req.url),
url: ctx.utils.redactSensitiveQueryParams(req.path),
});

@@ -46,0 +48,0 @@ const requestStartedExtra = ctx.config.appDevMode

{
"name": "@gravity-ui/expresskit",
"version": "2.1.0",
"version": "2.2.0",
"description": "Express.js wrapper for NodeKit-based apps",

@@ -29,2 +29,3 @@ "main": "dist/index.js",

"@gravity-ui/eslint-config": "^3.2.0",
"@gravity-ui/nodekit": "^2.0.0",
"@gravity-ui/prettier-config": "^1.1.0",

@@ -59,3 +60,3 @@ "@gravity-ui/tsconfig": "^1.0.0",

"peerDependencies": {
"@gravity-ui/nodekit": "^1.6.0"
"@gravity-ui/nodekit": "^1.6.0 || ^2.0.0"
},

@@ -62,0 +63,0 @@ "nano-staged": {

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