serverless-offline 13.5.1 → 13.6.0
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
|
@@ -31,6 +31,7 @@ export const supportedRuntimesArchitecture = {
|
|
|
31
31
|
provided: [X86_64],
|
|
32
32
|
dotnet6: [ARM64, X86_64],
|
|
33
33
|
"provided.al2": [ARM64, X86_64],
|
|
34
|
+
"provided.al2023": [ARM64, X86_64],
|
|
34
35
|
}
|
|
35
36
|
|
|
36
37
|
// GO
|
|
@@ -48,7 +49,11 @@ export const supportedNodejs = new Set([
|
|
|
48
49
|
])
|
|
49
50
|
|
|
50
51
|
// PROVIDED
|
|
51
|
-
export const supportedProvided = new Set([
|
|
52
|
+
export const supportedProvided = new Set([
|
|
53
|
+
"provided",
|
|
54
|
+
"provided.al2",
|
|
55
|
+
"provided.al2023",
|
|
56
|
+
])
|
|
52
57
|
|
|
53
58
|
// PYTHON
|
|
54
59
|
export const supportedPython = new Set([
|
package/src/utils/index.js
CHANGED
|
@@ -21,13 +21,20 @@ export { generateAlbHapiPath } from "./generateHapiPath.js"
|
|
|
21
21
|
const { isArray } = Array
|
|
22
22
|
const { keys } = Object
|
|
23
23
|
|
|
24
|
+
const possibleBinaryContentTypes = [
|
|
25
|
+
"application/octet-stream",
|
|
26
|
+
"multipart/form-data",
|
|
27
|
+
]
|
|
28
|
+
|
|
24
29
|
// Detect the toString encoding from the request headers content-type
|
|
25
30
|
// enhance if further content types need to be non utf8 encoded.
|
|
26
31
|
export function detectEncoding(request) {
|
|
27
32
|
const contentType = request.headers["content-type"]
|
|
28
33
|
|
|
29
34
|
return typeof contentType === "string" &&
|
|
30
|
-
|
|
35
|
+
possibleBinaryContentTypes.some((possibleBinaryContentType) =>
|
|
36
|
+
contentType.includes(possibleBinaryContentType),
|
|
37
|
+
)
|
|
31
38
|
? "binary"
|
|
32
39
|
: "utf8"
|
|
33
40
|
}
|