@middy/http-urlencode-path-parser 6.1.6 → 6.2.1
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.d.ts +7 -7
- package/index.js +10 -10
- package/package.json +67 -70
package/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import middy from
|
|
2
|
-
import { APIGatewayEvent } from
|
|
3
|
-
import { JsonValue } from
|
|
1
|
+
import type middy from "@middy/core";
|
|
2
|
+
import type { APIGatewayEvent } from "aws-lambda";
|
|
3
|
+
import type { JsonValue } from "type-fest";
|
|
4
4
|
|
|
5
5
|
export type Event = APIGatewayEvent & {
|
|
6
|
-
|
|
7
|
-
}
|
|
6
|
+
body: JsonValue;
|
|
7
|
+
};
|
|
8
8
|
|
|
9
|
-
declare function urlEncodePathParser
|
|
9
|
+
declare function urlEncodePathParser(): middy.MiddlewareObj<Event>;
|
|
10
10
|
|
|
11
|
-
export default urlEncodePathParser
|
|
11
|
+
export default urlEncodePathParser;
|
package/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
const httpUrlencodePathParserMiddlewareBefore = async (request) => {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
2
|
+
if (!request.event.pathParameters) return;
|
|
3
|
+
for (const key in request.event.pathParameters) {
|
|
4
|
+
request.event.pathParameters[key] = decodeURIComponent(
|
|
5
|
+
request.event.pathParameters[key],
|
|
6
|
+
);
|
|
7
|
+
}
|
|
8
|
+
};
|
|
9
9
|
|
|
10
10
|
const httpUrlencodePathParserMiddleware = () => ({
|
|
11
|
-
|
|
12
|
-
})
|
|
13
|
-
export default httpUrlencodePathParserMiddleware
|
|
11
|
+
before: httpUrlencodePathParserMiddlewareBefore,
|
|
12
|
+
});
|
|
13
|
+
export default httpUrlencodePathParserMiddleware;
|
package/package.json
CHANGED
|
@@ -1,72 +1,69 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
"type-fest": "^4.0.0"
|
|
70
|
-
},
|
|
71
|
-
"gitHead": "7a6c0fbb8ab71d6a2171e678697de9f237568431"
|
|
2
|
+
"name": "@middy/http-urlencode-path-parser",
|
|
3
|
+
"version": "6.2.1",
|
|
4
|
+
"description": "Urlencode path parser middleware for the middy framework",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"engines": {
|
|
7
|
+
"node": ">=20"
|
|
8
|
+
},
|
|
9
|
+
"engineStrict": true,
|
|
10
|
+
"publishConfig": {
|
|
11
|
+
"access": "public"
|
|
12
|
+
},
|
|
13
|
+
"module": "./index.js",
|
|
14
|
+
"exports": {
|
|
15
|
+
".": {
|
|
16
|
+
"import": {
|
|
17
|
+
"types": "./index.d.ts",
|
|
18
|
+
"default": "./index.js"
|
|
19
|
+
},
|
|
20
|
+
"require": {
|
|
21
|
+
"default": "./index.js"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"types": "index.d.ts",
|
|
26
|
+
"files": ["index.js", "index.d.ts"],
|
|
27
|
+
"scripts": {
|
|
28
|
+
"test": "npm run test:unit && npm run test:fuzz",
|
|
29
|
+
"test:unit": "node --test",
|
|
30
|
+
"test:fuzz": "node --test index.fuzz.js",
|
|
31
|
+
"test:perf": "node --test index.perf.js"
|
|
32
|
+
},
|
|
33
|
+
"license": "MIT",
|
|
34
|
+
"keywords": [
|
|
35
|
+
"Lambda",
|
|
36
|
+
"Middleware",
|
|
37
|
+
"Serverless",
|
|
38
|
+
"Framework",
|
|
39
|
+
"AWS",
|
|
40
|
+
"AWS Lambda",
|
|
41
|
+
"Middy",
|
|
42
|
+
"HTTP",
|
|
43
|
+
"API",
|
|
44
|
+
"Urlencode",
|
|
45
|
+
"Path Parser"
|
|
46
|
+
],
|
|
47
|
+
"author": {
|
|
48
|
+
"name": "Middy contributors",
|
|
49
|
+
"url": "https://github.com/middyjs/middy/graphs/contributors"
|
|
50
|
+
},
|
|
51
|
+
"repository": {
|
|
52
|
+
"type": "git",
|
|
53
|
+
"url": "git+https://github.com/middyjs/middy.git",
|
|
54
|
+
"directory": "packages/http-urlencode-path-parser"
|
|
55
|
+
},
|
|
56
|
+
"bugs": {
|
|
57
|
+
"url": "https://github.com/middyjs/middy/issues"
|
|
58
|
+
},
|
|
59
|
+
"homepage": "https://middy.js.org",
|
|
60
|
+
"funding": {
|
|
61
|
+
"type": "github",
|
|
62
|
+
"url": "https://github.com/sponsors/willfarrell"
|
|
63
|
+
},
|
|
64
|
+
"devDependencies": {
|
|
65
|
+
"@types/aws-lambda": "^8.10.101",
|
|
66
|
+
"type-fest": "^4.0.0"
|
|
67
|
+
},
|
|
68
|
+
"gitHead": "7a6c0fbb8ab71d6a2171e678697de9f237568431"
|
|
72
69
|
}
|