@middy/do-not-wait-for-empty-event-loop 2.5.6 → 2.5.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +13 -9
  2. package/package.json +3 -3
package/index.js CHANGED
@@ -1,20 +1,24 @@
1
+ "use strict";
2
+
1
3
  const doNotWaitForEmptyEventLoopMiddleware = (opts = {}) => {
2
4
  const defaults = {
3
5
  runOnBefore: true,
4
6
  runOnAfter: false,
5
7
  runOnError: false
6
- }
7
-
8
- const options = { ...defaults, ...opts }
8
+ };
9
+ const options = { ...defaults,
10
+ ...opts
11
+ };
9
12
 
10
- const doNotWaitForEmptyEventLoop = async (request) => {
11
- request.context.callbackWaitsForEmptyEventLoop = false
12
- }
13
+ const doNotWaitForEmptyEventLoop = async request => {
14
+ request.context.callbackWaitsForEmptyEventLoop = false;
15
+ };
13
16
 
14
17
  return {
15
18
  before: options.runOnBefore ? doNotWaitForEmptyEventLoop : undefined,
16
19
  after: options.runOnAfter ? doNotWaitForEmptyEventLoop : undefined,
17
20
  onError: options.runOnError ? doNotWaitForEmptyEventLoop : undefined
18
- }
19
- }
20
- module.exports = doNotWaitForEmptyEventLoopMiddleware
21
+ };
22
+ };
23
+
24
+ module.exports = doNotWaitForEmptyEventLoopMiddleware;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@middy/do-not-wait-for-empty-event-loop",
3
- "version": "2.5.6",
3
+ "version": "2.5.7",
4
4
  "description": "Middleware for the middy framework that allows to easily disable the wait for empty event loop in a Lambda function",
5
5
  "type": "commonjs",
6
6
  "engines": {
@@ -43,9 +43,9 @@
43
43
  "url": "https://github.com/middyjs/middy/issues"
44
44
  },
45
45
  "homepage": "https://github.com/middyjs/middy#readme",
46
- "gitHead": "0c789f55b4adf691f977b0d9904d1a805bb3bb2b",
46
+ "gitHead": "3983c4b138e1a4d7fcb3ed805d3b8832fff06fc1",
47
47
  "devDependencies": {
48
- "@middy/core": "^2.5.6",
48
+ "@middy/core": "^2.5.7",
49
49
  "@types/aws-lambda": "^8.10.76"
50
50
  }
51
51
  }