@middy/core 7.0.1 → 7.0.3
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.
- package/README.md +2 -2
- package/executionModeDurableContext.d.ts +4 -0
- package/executionModeDurableContext.js +2 -0
- package/executionModeStandard.d.ts +4 -0
- package/executionModeStandard.js +2 -0
- package/executionModeStreamifyResponse.d.ts +4 -0
- package/executionModeStreamifyResponse.js +2 -0
- package/index.d.ts +6 -3
- package/index.js +2 -4
- package/package.json +28 -1
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<p>
|
|
6
6
|
<a href="https://github.com/middyjs/middy/actions/workflows/test-unit.yml"><img src="https://github.com/middyjs/middy/actions/workflows/test-unit.yml/badge.svg" alt="GitHub Actions unit test status"></a>
|
|
7
7
|
<a href="https://github.com/middyjs/middy/actions/workflows/test-dast.yml"><img src="https://github.com/middyjs/middy/actions/workflows/test-dast.yml/badge.svg" alt="GitHub Actions dast test status"></a>
|
|
8
|
-
<a href="https://github.com/middyjs/middy/actions/workflows/test-perf.yml"><img src="https://github.com/middyjs/middy/actions/workflows/test-
|
|
8
|
+
<a href="https://github.com/middyjs/middy/actions/workflows/test-perf.yml"><img src="https://github.com/middyjs/middy/actions/workflows/test-perf.yml/badge.svg" alt="GitHub Actions perf test status"></a>
|
|
9
9
|
<a href="https://github.com/middyjs/middy/actions/workflows/test-sast.yml"><img src="https://github.com/middyjs/middy/actions/workflows/test-sast.yml/badge.svg" alt="GitHub Actions SAST test status"></a>
|
|
10
10
|
<a href="https://github.com/middyjs/middy/actions/workflows/test-lint.yml"><img src="https://github.com/middyjs/middy/actions/workflows/test-lint.yml/badge.svg" alt="GitHub Actions lint test status"></a>
|
|
11
11
|
<br/>
|
|
@@ -52,7 +52,7 @@ Everyone is very welcome to contribute to this repository. Feel free to [raise i
|
|
|
52
52
|
|
|
53
53
|
## License
|
|
54
54
|
|
|
55
|
-
Licensed under [MIT License](LICENSE). Copyright (c) 2017-
|
|
55
|
+
Licensed under [MIT License](LICENSE). Copyright (c) 2017-2026 [will Farrell](https://github.com/willfarrell), [Luciano Mammino](https://github.com/lmammino), and [Middy contributors](https://github.com/middyjs/middy/graphs/contributors).
|
|
56
56
|
|
|
57
57
|
<a href="https://app.fossa.io/projects/git%2Bgithub.com%2Fmiddyjs%2Fmiddy?ref=badge_large">
|
|
58
58
|
<img src="https://app.fossa.io/api/projects/git%2Bgithub.com%2Fmiddyjs%2Fmiddy.svg?type=large" alt="FOSSA Status" style="max-width:100%;">
|
package/executionModeStandard.js
CHANGED
package/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// Copyright 2017 - 2026 will Farrell, Luciano Mammino, and Middy contributors.
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
import type {
|
|
2
4
|
Context as LambdaContext,
|
|
3
5
|
Handler as LambdaHandler,
|
|
@@ -186,9 +188,10 @@ declare type MiddlewareHandler<
|
|
|
186
188
|
TContext extends LambdaContext | LambdaContextDurable = LambdaContext,
|
|
187
189
|
TResult = any,
|
|
188
190
|
TEvent = any,
|
|
189
|
-
> =
|
|
190
|
-
|
|
191
|
-
|
|
191
|
+
> =
|
|
192
|
+
THandler extends LambdaHandler<TEvent, TResult> // always true
|
|
193
|
+
? MiddyInputHandler<TEvent, TResult, TContext>
|
|
194
|
+
: never;
|
|
192
195
|
|
|
193
196
|
/**
|
|
194
197
|
* Middy factory function. Use it to wrap your existing handler to enable middlewares on it.
|
package/index.js
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
|
+
// Copyright 2017 - 2026 will Farrell, Luciano Mammino, and Middy contributors.
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
import { setTimeout } from "node:timers";
|
|
2
4
|
import { executionModeStandard } from "./executionModeStandard.js";
|
|
3
5
|
|
|
4
|
-
export { executionModeDurableContext } from "./executionModeDurableContext.js";
|
|
5
|
-
export { executionModeStandard } from "./executionModeStandard.js";
|
|
6
|
-
export { executionModeStreamifyResponse } from "./executionModeStreamifyResponse.js";
|
|
7
|
-
|
|
8
6
|
const defaultLambdaHandler = () => {};
|
|
9
7
|
const defaultPluginConfig = {
|
|
10
8
|
timeoutEarlyInMillis: 5,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@middy/core",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.3",
|
|
4
4
|
"description": "🛵 The stylish Node.js middleware engine for AWS Lambda (core package)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -21,14 +21,41 @@
|
|
|
21
21
|
"require": {
|
|
22
22
|
"default": "./index.js"
|
|
23
23
|
}
|
|
24
|
+
},
|
|
25
|
+
"./Standard": {
|
|
26
|
+
"import": {
|
|
27
|
+
"default": "./executionModeStandard.js"
|
|
28
|
+
},
|
|
29
|
+
"require": {
|
|
30
|
+
"default": "./executionModeStandard.js"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"./DurableContext": {
|
|
34
|
+
"import": {
|
|
35
|
+
"default": "./executionModeDurableContext.js"
|
|
36
|
+
},
|
|
37
|
+
"require": {
|
|
38
|
+
"default": "./executionModeDurableContext.js"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"./StreamifyResponse": {
|
|
42
|
+
"import": {
|
|
43
|
+
"default": "./executionModeStreamifyResponse.js"
|
|
44
|
+
},
|
|
45
|
+
"require": {
|
|
46
|
+
"default": "./executionModeStreamifyResponse.js"
|
|
47
|
+
}
|
|
24
48
|
}
|
|
25
49
|
},
|
|
26
50
|
"types": "index.d.ts",
|
|
27
51
|
"files": [
|
|
28
52
|
"index.js",
|
|
29
53
|
"executionModeStandard.js",
|
|
54
|
+
"executionModeStandard.d.ts",
|
|
30
55
|
"executionModeDurableContext.js",
|
|
56
|
+
"executionModeDurableContext.d.ts",
|
|
31
57
|
"executionModeStreamifyResponse.js",
|
|
58
|
+
"executionModeStreamifyResponse.d.ts",
|
|
32
59
|
"index.d.ts"
|
|
33
60
|
],
|
|
34
61
|
"scripts": {
|