Socket
Socket
Sign inDemoInstall

@americanairlines/controller-interceptor

Package Overview
Dependencies
12
Maintainers
4
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.3 to 1.0.4

6

package.json
{
"name": "@americanairlines/controller-interceptor",
"version": "1.0.3",
"version": "1.0.4",
"description": "A simple interceptor for ExpressJs for logging/tracing purposes.",
"types": "lib/index.d.ts",
"main": "./lib/index.js",
"files": ["lib/*/**"],
"scripts": {

@@ -12,3 +14,3 @@ "test": "echo \"Error: no test specified\" && exit 1",

"prettier": "prettier -l \"src/*.ts\"",
"prepare": "husky install"
"prepare": "tsc"
},

@@ -15,0 +17,0 @@ "repository": {

@@ -5,3 +5,3 @@ # Controller Interceptor

Controller Interceptor is a small Typescript package that allows for the interception of requests made to an ExpressJS service. Controller interceptor also attaches a trace id to the request headers. The trace id is implemented synchronously and does **not** use async-storage. This is to avoid the performance impact caused by calling async storage.
Controller Interceptor is a small Typescript package that allows for the interception of requests made to an ExpressJS service. Controller interceptor also attaches a TraceId to the request headers. The TraceId is implemented synchronously and does **not** use async-storage. This is to avoid the performance impact caused by calling async storage each request.

@@ -19,3 +19,3 @@ # Usage

```javascript
const interceptor = require("controller-interceptor");
const interceptor = require("@americanairlines/controller-interceptor");

@@ -62,3 +62,3 @@ function beforeController(requestInfo) {

The trace ids are of the format `X-Trace-Id`. The instanceId is generated when the server starts, and the requestId is generated when the route is called. This allows for tracaing calls to specific routes as well as tracing requests to a specific instance of a service.
The trace ids are of the format `X-Trace-Id`. The instanceId is generated when the server starts, and the requestId is generated when the route is called. This allows for tracing calls to specific routes as well as tracing requests to a specific instance of a service.

@@ -82,3 +82,3 @@ ### requestInfo

These functions are not passed the actual body or headers objects, just copies of them. You are **not** able to mutate these fields in the handler functions.
These functions are not passed the actual body or header objects, just copies of them. You are **not** able to mutate these fields in the handler functions.

@@ -85,0 +85,0 @@ ### Options

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc