@middy/http-content-negotiation 7.3.2 → 7.3.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/index.js +5 -2
- package/package.json +3 -3
package/index.js
CHANGED
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
3
|
import { createError, validateOptions } from "@middy/util";
|
|
4
4
|
|
|
5
|
+
const name = "http-content-negotiation";
|
|
6
|
+
const pkg = `@middy/${name}`;
|
|
7
|
+
|
|
5
8
|
const optionSchema = {
|
|
6
9
|
type: "object",
|
|
7
10
|
properties: {
|
|
@@ -29,7 +32,7 @@ const optionSchema = {
|
|
|
29
32
|
};
|
|
30
33
|
|
|
31
34
|
export const httpContentNegotiationValidateOptions = (options) =>
|
|
32
|
-
validateOptions(
|
|
35
|
+
validateOptions(pkg, optionSchema, options);
|
|
33
36
|
|
|
34
37
|
import charset from "negotiator/lib/charset.js";
|
|
35
38
|
import encoding from "negotiator/lib/encoding.js";
|
|
@@ -141,7 +144,7 @@ const parseHeader = (
|
|
|
141
144
|
`Unsupported ${type}. Acceptable values: ${availableValues.join(", ")}`,
|
|
142
145
|
{
|
|
143
146
|
cause: {
|
|
144
|
-
package:
|
|
147
|
+
package: pkg,
|
|
145
148
|
data: { [headerName]: headerValue },
|
|
146
149
|
},
|
|
147
150
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@middy/http-content-negotiation",
|
|
3
|
-
"version": "7.3.
|
|
3
|
+
"version": "7.3.4",
|
|
4
4
|
"description": "HTTP content negotiation middleware for the middy framework",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -62,11 +62,11 @@
|
|
|
62
62
|
"url": "https://github.com/sponsors/willfarrell"
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
|
-
"@middy/util": "7.3.
|
|
65
|
+
"@middy/util": "7.3.4",
|
|
66
66
|
"negotiator": "1.0.0"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
|
-
"@middy/core": "7.3.
|
|
69
|
+
"@middy/core": "7.3.4",
|
|
70
70
|
"@types/aws-lambda": "^8.0.0",
|
|
71
71
|
"@types/node": "^22.0.0"
|
|
72
72
|
}
|