@middy/core 7.0.3 → 7.1.1

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 (3) hide show
  1. package/README.md +1 -1
  2. package/index.js +2 -17
  3. package/package.json +5 -2
package/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  <div align="center">
2
- <h1>Middy Core</h1>
2
+ <h1>Middy `core`</h1>
3
3
  <img alt="Middy logo" src="https://raw.githubusercontent.com/middyjs/middy/main/docs/img/middy-logo.svg"/>
4
4
  <p><strong>Core component of the middy framework, the stylish Node.js middleware engine for AWS Lambda</strong></p>
5
5
  <p>
package/index.js CHANGED
@@ -129,7 +129,7 @@ const runRequest = async (
129
129
  ];
130
130
 
131
131
  // clearTimeout pattern is 10x faster than using AbortController
132
- // Note: signal.abort is slow ~6000ns
132
+ // Note: signal.abort is slow ~6_000ns
133
133
  // Required --test-force-exit to ignore unresolved timeoutPromise
134
134
  if (timeoutEarly) {
135
135
  let timeoutResolve;
@@ -153,22 +153,7 @@ const runRequest = async (
153
153
 
154
154
  if (timeoutID) {
155
155
  clearTimeout(timeoutID);
156
- } // alt varient for when abort() is faster
157
- // if (timeoutEarly) {
158
- // const timeoutPromise = setTimeoutPromise(
159
- // () => {
160
- // handlerAbort.abort();
161
- // plugin.timeoutEarlyResponse()
162
- // },
163
- // getRemainingTimeInMillis() - plugin.timeoutEarlyInMillis,
164
- // {
165
- // signal: handlerAbort.signal,
166
- // }
167
- // );
168
- // promises.push(timeoutPromise);
169
- // }
170
- // request.response = await Promise.race(promises);
171
- // handlerAbort.abort(); // abort timeout
156
+ }
172
157
 
173
158
  plugin.afterHandler?.();
174
159
  await runMiddlewares(request, afterMiddlewares, plugin);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@middy/core",
3
- "version": "7.0.3",
3
+ "version": "7.1.1",
4
4
  "description": "🛵 The stylish Node.js middleware engine for AWS Lambda (core package)",
5
5
  "type": "module",
6
6
  "engines": {
@@ -24,6 +24,7 @@
24
24
  },
25
25
  "./Standard": {
26
26
  "import": {
27
+ "types": "./executionModeStandard.d.ts",
27
28
  "default": "./executionModeStandard.js"
28
29
  },
29
30
  "require": {
@@ -32,6 +33,7 @@
32
33
  },
33
34
  "./DurableContext": {
34
35
  "import": {
36
+ "types": "./executionModeDurableContext.d.ts",
35
37
  "default": "./executionModeDurableContext.js"
36
38
  },
37
39
  "require": {
@@ -40,6 +42,7 @@
40
42
  },
41
43
  "./StreamifyResponse": {
42
44
  "import": {
45
+ "types": "./executionModeStreamifyResponse.d.ts",
43
46
  "default": "./executionModeStreamifyResponse.js"
44
47
  },
45
48
  "require": {
@@ -105,7 +108,7 @@
105
108
  "@aws/durable-execution-sdk-js": "^1.0.0",
106
109
  "@aws/durable-execution-sdk-js-testing": "^1.0.0",
107
110
  "@datastream/core": "0.0.42",
108
- "@types/aws-lambda": "^8.10.76",
111
+ "@types/aws-lambda": "^8.0.0",
109
112
  "@types/node": "^22.0.0"
110
113
  },
111
114
  "gitHead": "7a6c0fbb8ab71d6a2171e678697de9f237568431"