Join our webinar on Wednesday, June 26, at 1pm EDTHow Chia Mitigates Risk in the Crypto Industry.Register
Socket
Socket
Sign inDemoInstall

middy

Package Overview
Dependencies
167
Maintainers
8
Versions
147
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.30.5 to 0.32.0

src/middlewares/__tests__/dbManager.js

10

middlewares.d.ts
import { SSM } from 'aws-sdk'
import { Options as AjvOptions } from 'ajv'
import { HttpError } from 'http-errors'
import Knex from 'knex'
import middy from './'

@@ -118,4 +119,13 @@

interface IDbManagerOptions {
client?: Knex | Function,
config: Knex.Config | Object,
forceNewConnection?: boolean,
secretsPath?: string,
removeSecrets?: boolean
}
declare const cache: middy.Middleware<ICacheOptions>;
declare const cors: middy.Middleware<ICorsOptions>;
declare const dbManager: middy.Middleware<IDbManagerOptions>;
declare const doNotWaitForEmptyEventLoop: middy.Middleware<IDoNotWaitForEmtpyEventLoopOptions>;

@@ -122,0 +132,0 @@ declare const httpContentNegotiation: middy.Middleware<IHTTPContentNegotiationOptions>;

3

package.json
{
"name": "middy",
"version": "0.30.5",
"version": "0.32.0",
"description": "🛵 The stylish Node.js middleware engine for AWS Lambda",

@@ -77,2 +77,3 @@ "main": "./index.js",

"json-mask": "^0.3.8",
"knex": "^0.17.3",
"negotiator": "^0.6.1",

@@ -79,0 +80,0 @@ "once": "^1.4.0",

@@ -385,3 +385,3 @@ <div align="center">

- If the last `onError` in the chain returns a promise which resolves to a value, the lambda fails and reports an unmanaged error
- If the last `onError` in the chain returns a promise which resolves to a value, the lambda fails and reports an un-mamaged error
In the example above, the lambda will fail and report the error returned by `middleware2.onError`.

@@ -408,3 +408,3 @@ - If `onError` promise resolves to a *falsy* value (`null`, `undefined`, `false` etc.), the error handling pipeline exits early and the response is returned without an error

- If `onError` promise rejects, the error handling pipeline exits early and the lambda execution fails.
- If `onError` promise rejects, the error handling pipeline exists early and the lambda execution fails.

@@ -494,3 +494,3 @@ ```javascript

In order to make middlewares configurable, they are generally exported as a function that accepts
In order to make middlewares configurable they are generally exported as a function that accepts
a configuration object. This function should then return the middleware object with `before`,

@@ -497,0 +497,0 @@ `after` and `onError` as keys.

module.exports = {
cache: require('./cache'),
cors: require('./cors'),
dbManager: require('./dbManager'),
doNotWaitForEmptyEventLoop: require('./doNotWaitForEmptyEventLoop'),

@@ -5,0 +6,0 @@ httpContentNegotiation: require('./httpContentNegotiation'),

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