@middy/core
Advanced tools
Comparing version 5.2.3 to 5.2.4
import { | ||
Callback as LambdaCallback, | ||
Context as LambdaContext, | ||
@@ -62,2 +61,10 @@ Handler as LambdaHandler | ||
export interface MiddyHandlerObject { | ||
/** | ||
* An abort signal that will be canceled just before the lambda times out. | ||
* @see timeoutEarlyInMillis | ||
*/ | ||
signal: AbortSignal | ||
} | ||
// The AWS provided Handler type uses void | Promise<TResult> so we have no choice but to follow and suppress the linter warning | ||
@@ -72,3 +79,3 @@ // eslint-disable-next-line @typescript-eslint/no-invalid-void-type | ||
context: TContext, | ||
callback: LambdaCallback<TResult> | ||
opts: MiddyHandlerObject, | ||
) => // eslint-disable-next-line @typescript-eslint/no-invalid-void-type | ||
@@ -89,3 +96,3 @@ void | Promise<TResult> | TResult | ||
> extends MiddyInputHandler<TEvent, TResult, TContext>, | ||
MiddyInputPromiseHandler<TEvent, TResult, TContext> { | ||
MiddyInputPromiseHandler<TEvent, TResult, TContext> { | ||
use: UseFn<TEvent, TResult, TErr, TContext, TInternal> | ||
@@ -97,4 +104,4 @@ before: AttachMiddlewareFn<TEvent, TResult, TErr, TContext, TInternal> | ||
handler: MiddlewareHandler< | ||
LambdaHandler<TEvent & TAdditional, TResult>, | ||
TContext | ||
LambdaHandler<TEvent & TAdditional, TResult>, | ||
TContext | ||
> | ||
@@ -133,15 +140,15 @@ ) => MiddyfiedHandler<TEvent, TResult, TErr, TContext, TInternal> | ||
) => TMiddleware extends MiddlewareObj< | ||
infer TMiddlewareEvent, | ||
any, | ||
Error, | ||
infer TMiddlewareContext, | ||
infer TMiddlewareInternal | ||
infer TMiddlewareEvent, | ||
any, | ||
Error, | ||
infer TMiddlewareContext, | ||
infer TMiddlewareInternal | ||
> | ||
? MiddyfiedHandler< | ||
TMiddlewareEvent & TEvent, | ||
TResult, | ||
TErr, | ||
TMiddlewareContext & TContext, | ||
TMiddlewareInternal & TInternal | ||
> // always true | ||
TMiddlewareEvent & TEvent, | ||
TResult, | ||
TErr, | ||
TMiddlewareContext & TContext, | ||
TMiddlewareInternal & TInternal | ||
> // always true | ||
: never | ||
@@ -167,6 +174,6 @@ | ||
TInternal extends Record<string, unknown> = {} | ||
>( | ||
> ( | ||
handler?: | ||
| MiddlewareHandler<LambdaHandler<TEvent, TResult>, TContext> | ||
| PluginObject, | ||
| MiddlewareHandler<LambdaHandler<TEvent, TResult>, TContext> | ||
| PluginObject, | ||
plugin?: PluginObject | ||
@@ -173,0 +180,0 @@ ): MiddyfiedHandler<TEvent, TResult, TErr, TContext, TInternal> |
{ | ||
"name": "@middy/core", | ||
"version": "5.2.3", | ||
"version": "5.2.4", | ||
"description": "🛵 The stylish Node.js middleware engine for AWS Lambda (core package)", | ||
@@ -63,3 +63,3 @@ "type": "module", | ||
}, | ||
"gitHead": "5fa384cca11e64e8a8c3b4113b5896cf8b5b229e", | ||
"gitHead": "3e0ac4067c2f3123adea90dc4216655b7a3f76e3", | ||
"dependencies": { | ||
@@ -66,0 +66,0 @@ "@datastream/core": "0.0.35" |
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
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
18290
383