Socket
Socket
Sign inDemoInstall

middy

Package Overview
Dependencies
Maintainers
8
Versions
147
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

middy - npm Package Compare versions

Comparing version 0.29.0 to 0.30.1

26

index.d.ts

@@ -27,7 +27,7 @@ import {

declare namespace middy {
interface Middy<T, R> extends Handler<T, R> {
use: <C extends MiddlewareObject<T, R>>(middleware: C) => Middy<T, R>;
before: (callbackFn: MiddlewareFunction<T, R>) => Middy<T, R>;
after: (callbackFn: MiddlewareFunction<T, R>) => Middy<T, R>;
onError: (callbackFn: MiddlewareFunction<T, R>) => Middy<T, R>;
interface Middy<T, R, C extends Context = Context> extends Handler<T, R> {
use: <M extends MiddlewareObject<T, R, C>>(middleware: M) => Middy<T, R, C>;
before: (callbackFn: MiddlewareFunction<T, R, C>) => Middy<T, R, C>;
after: (callbackFn: MiddlewareFunction<T, R, C>) => Middy<T, R, C>;
onError: (callbackFn: MiddlewareFunction<T, R, C>) => Middy<T, R, C>;
}

@@ -37,18 +37,18 @@

interface MiddlewareObject<T, R> {
before?: MiddlewareFunction<T, R>;
after?: MiddlewareFunction<T, R>;
onError?: MiddlewareFunction<T, R>;
interface MiddlewareObject<T, R, C extends Context = Context> {
before?: MiddlewareFunction<T, R, C>;
after?: MiddlewareFunction<T, R, C>;
onError?: MiddlewareFunction<T, R, C>;
}
type MiddlewareFunction<T, R> = (handler: HandlerLambda<T, R>, next: NextFunction) => void | Promise<any>;
type MiddlewareFunction<T, R, C extends Context = Context> = (handler: HandlerLambda<T, R, C>, next: NextFunction) => void | Promise<any>;
type NextFunction = (error?: any) => void;
interface HandlerLambda<T = any, V = {}> {
interface HandlerLambda<T = any, V = any, C extends Context = Context> {
event: T;
context: Context;
context: C;
response: V;
error: Error;
callback: Callback<T>;
callback: Callback<V>;
}

@@ -55,0 +55,0 @@ }

{
"name": "middy",
"version": "0.29.0",
"version": "0.30.1",
"description": "🛵 The stylish Node.js middleware engine for AWS Lambda",

@@ -5,0 +5,0 @@ "main": "./index.js",

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