@americanairlines/controller-interceptor
Advanced tools
Comparing version 1.0.3 to 1.0.4
{ | ||
"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 |
Empty package
Supply chain riskPackage does not contain any code. It may be removed, is name squatting, or the result of a faulty package publish.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
5497
3
0
2