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

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 +9 -13
  2. package/package.json +3 -3
package/index.js CHANGED
@@ -1,24 +1,20 @@
1
- "use strict";
2
-
3
1
  const doNotWaitForEmptyEventLoopMiddleware = (opts = {}) => {
4
2
  const defaults = {
5
3
  runOnBefore: true,
6
4
  runOnAfter: false,
7
5
  runOnError: false
8
- };
9
- const options = { ...defaults,
10
- ...opts
11
- };
6
+ }
7
+
8
+ const options = { ...defaults, ...opts }
12
9
 
13
- const doNotWaitForEmptyEventLoop = async request => {
14
- request.context.callbackWaitsForEmptyEventLoop = false;
15
- };
10
+ const doNotWaitForEmptyEventLoop = async (request) => {
11
+ request.context.callbackWaitsForEmptyEventLoop = false
12
+ }
16
13
 
17
14
  return {
18
15
  before: options.runOnBefore ? doNotWaitForEmptyEventLoop : undefined,
19
16
  after: options.runOnAfter ? doNotWaitForEmptyEventLoop : undefined,
20
17
  onError: options.runOnError ? doNotWaitForEmptyEventLoop : undefined
21
- };
22
- };
23
-
24
- module.exports = doNotWaitForEmptyEventLoopMiddleware;
18
+ }
19
+ }
20
+ 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.2",
3
+ "version": "2.5.6",
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": "a2bb757a7a13638ae64277f8eecfcf11c1af17d4",
46
+ "gitHead": "0c789f55b4adf691f977b0d9904d1a805bb3bb2b",
47
47
  "devDependencies": {
48
- "@middy/core": "^2.5.2",
48
+ "@middy/core": "^2.5.6",
49
49
  "@types/aws-lambda": "^8.10.76"
50
50
  }
51
51
  }