nestjs-request-context
Advanced tools
Comparing version 2.0.1 to 2.1.0
import { NestMiddleware } from '@nestjs/common'; | ||
import { Request, Response } from 'express'; | ||
export declare class RequestContextMiddleware implements NestMiddleware<Request, Response> { | ||
export declare class RequestContextMiddleware<Request = any, Response = any> implements NestMiddleware<Request, Response> { | ||
use(req: Request, res: Response, next: () => void): void; | ||
} |
/// <reference types="node" /> | ||
import { AsyncLocalStorage } from 'async_hooks'; | ||
import { Request, Response } from 'express'; | ||
export declare class RequestContext { | ||
readonly req: Request; | ||
readonly res: Response; | ||
static cls: AsyncLocalStorage<RequestContext>; | ||
static get currentContext(): RequestContext; | ||
constructor(req: Request, res: Response); | ||
export declare class RequestContext<TRequest = any, TResponse = any> { | ||
readonly req: TRequest; | ||
readonly res: TResponse; | ||
static cls: AsyncLocalStorage<RequestContext<any, any>>; | ||
static get currentContext(): RequestContext<any, any>; | ||
constructor(req: TRequest, res: TResponse); | ||
} |
{ | ||
"name": "nestjs-request-context", | ||
"version": "2.0.1", | ||
"version": "2.1.0", | ||
"description": "Helper library for accessing request from singleton services", | ||
@@ -22,5 +22,3 @@ "main": "dist/index.js", | ||
"peerDependencies": { | ||
"@nestjs/common": "^9.0.5", | ||
"@nestjs/platform-express": "^9.0.5", | ||
"express": "^4.17.1" | ||
"@nestjs/common": "^9.0.5" | ||
}, | ||
@@ -32,6 +30,4 @@ "devDependencies": { | ||
"@nestjs/testing": "^9.0.5", | ||
"@types/express": "^4.17.3", | ||
"@types/jest": "^26.0.14", | ||
"@types/supertest": "^2.0.10", | ||
"express": "^4.17.1", | ||
"jest": "^26.4.2", | ||
@@ -38,0 +34,0 @@ "prettier": "^2.1.2", |
@@ -45,1 +45,6 @@ # NestJS request-context | ||
Updated NestJs peer dependencies to `9.x` | ||
### 2.1.0 | ||
- Removed express from peer dependencies | ||
- Added minimal generic support |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9654
1
16
15
49
1
93