@middy/http-header-normalizer 7.2.2 → 7.3.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.
Files changed (3) hide show
  1. package/index.d.ts +4 -0
  2. package/index.js +11 -0
  3. package/package.json +2 -5
package/index.d.ts CHANGED
@@ -12,4 +12,8 @@ declare function httpHeaderNormalizer(
12
12
  options?: Options,
13
13
  ): middy.MiddlewareObj<unknown, unknown, Error>;
14
14
 
15
+ export declare function httpHeaderNormalizerValidateOptions(
16
+ options?: Record<string, unknown>,
17
+ ): void;
18
+
15
19
  export default httpHeaderNormalizer;
package/index.js CHANGED
@@ -1,5 +1,16 @@
1
1
  // Copyright 2017 - 2026 will Farrell, Luciano Mammino, and Middy contributors.
2
2
  // SPDX-License-Identifier: MIT
3
+ import { validateOptions } from "@middy/util";
4
+
5
+ const optionSchema = {
6
+ canonical: "boolean?",
7
+ defaultHeaders: "object?",
8
+ normalizeHeaderKey: "function?",
9
+ };
10
+
11
+ export const httpHeaderNormalizerValidateOptions = (options) =>
12
+ validateOptions("@middy/http-header-normalizer", optionSchema, options);
13
+
3
14
  const exceptionsList = [
4
15
  "ALPN",
5
16
  "C-PEP",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@middy/http-header-normalizer",
3
- "version": "7.2.2",
3
+ "version": "7.3.0",
4
4
  "description": "HTTP header normalizer middleware for the middy framework",
5
5
  "type": "module",
6
6
  "engines": {
@@ -17,9 +17,6 @@
17
17
  "import": {
18
18
  "types": "./index.d.ts",
19
19
  "default": "./index.js"
20
- },
21
- "require": {
22
- "default": "./index.js"
23
20
  }
24
21
  }
25
22
  },
@@ -67,7 +64,7 @@
67
64
  "url": "https://github.com/sponsors/willfarrell"
68
65
  },
69
66
  "devDependencies": {
70
- "@middy/core": "7.2.2",
67
+ "@middy/core": "7.3.0",
71
68
  "@types/node": "^22.0.0"
72
69
  }
73
70
  }