@middy/do-not-wait-for-empty-event-loop 3.0.0-alpha.3 → 3.0.0-alpha.4

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 +11 -9
  2. package/package.json +3 -3
package/index.js CHANGED
@@ -1,21 +1,23 @@
1
-
2
1
  const defaults = {
3
2
  runOnBefore: true,
4
3
  runOnAfter: false,
5
4
  runOnError: false
6
- }
5
+ };
7
6
 
8
7
  const doNotWaitForEmptyEventLoopMiddleware = (opts = {}) => {
9
- const options = { ...defaults, ...opts }
8
+ const options = { ...defaults,
9
+ ...opts
10
+ };
10
11
 
11
- const doNotWaitForEmptyEventLoop = async (request) => {
12
- request.context.callbackWaitsForEmptyEventLoop = false
13
- }
12
+ const doNotWaitForEmptyEventLoop = async request => {
13
+ request.context.callbackWaitsForEmptyEventLoop = false;
14
+ };
14
15
 
15
16
  return {
16
17
  before: options.runOnBefore ? doNotWaitForEmptyEventLoop : undefined,
17
18
  after: options.runOnAfter ? doNotWaitForEmptyEventLoop : undefined,
18
19
  onError: options.runOnError ? doNotWaitForEmptyEventLoop : undefined
19
- }
20
- }
21
- export default doNotWaitForEmptyEventLoopMiddleware
20
+ };
21
+ };
22
+
23
+ export default doNotWaitForEmptyEventLoopMiddleware;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@middy/do-not-wait-for-empty-event-loop",
3
- "version": "3.0.0-alpha.3",
3
+ "version": "3.0.0-alpha.4",
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": "module",
6
6
  "engines": {
@@ -45,9 +45,9 @@
45
45
  "url": "https://github.com/middyjs/middy/issues"
46
46
  },
47
47
  "homepage": "https://github.com/middyjs/middy#readme",
48
- "gitHead": "1441158711580313765e6d156046ef0fade0d156",
48
+ "gitHead": "d4bea7f4e21f6a9bbb1f6f6908361169598b9e53",
49
49
  "devDependencies": {
50
- "@middy/core": "^3.0.0-alpha.3",
50
+ "@middy/core": "^3.0.0-alpha.4",
51
51
  "@types/aws-lambda": "^8.10.76"
52
52
  }
53
53
  }