serverless-offline 14.7.3 → 14.7.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.
package/package.json
CHANGED
|
@@ -25,6 +25,7 @@ export const supportedRuntimesArchitecture = {
|
|
|
25
25
|
"ruby3.2": [ARM64, X86_64],
|
|
26
26
|
"ruby3.3": [ARM64, X86_64],
|
|
27
27
|
"ruby3.4": [ARM64, X86_64],
|
|
28
|
+
"ruby4.0": [ARM64, X86_64],
|
|
28
29
|
java8: [X86_64],
|
|
29
30
|
"java8.al2": [ARM64, X86_64],
|
|
30
31
|
java11: [ARM64, X86_64],
|
|
@@ -74,6 +75,7 @@ export const supportedRuby = new Set([
|
|
|
74
75
|
"ruby3.2",
|
|
75
76
|
"ruby3.3",
|
|
76
77
|
"ruby3.4",
|
|
78
|
+
"ruby4.0",
|
|
77
79
|
])
|
|
78
80
|
|
|
79
81
|
export const supportedRuntimes = new Set([
|
|
@@ -98,9 +98,19 @@ export default class HandlerRunner {
|
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
// () => Promise<void>
|
|
101
|
-
cleanup() {
|
|
101
|
+
async cleanup() {
|
|
102
102
|
// TODO console.log('handler runner cleanup')
|
|
103
|
-
|
|
103
|
+
const runner = this.#runner
|
|
104
|
+
|
|
105
|
+
// drop the reference so the next run() lazily recreates a fresh runner.
|
|
106
|
+
// this is essential after a timeout: the worker thread is terminated by
|
|
107
|
+
// cleanup() but the (now dead) runner would otherwise be reused, wedging
|
|
108
|
+
// every subsequent invocation. see https://github.com/dherault/serverless-offline/issues/1896
|
|
109
|
+
this.#runner = null
|
|
110
|
+
|
|
111
|
+
if (runner != null) {
|
|
112
|
+
await runner.cleanup()
|
|
113
|
+
}
|
|
104
114
|
}
|
|
105
115
|
|
|
106
116
|
async run(event, context) {
|