@middy/http-urlencode-path-parser 3.0.2 → 3.1.0-rc.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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2017-2022 Luciano Mammino, will Farrell and the [Middy team](https://github.com/middyjs/middy/graphs/contributors)
3
+ Copyright (c) 2017-2022 [Luciano Mammino](https://github.com/lmammino), [will Farrell](https://github.com/willfarrell) and the [Middy team](https://github.com/middyjs/middy/graphs/contributors)
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -9,8 +9,8 @@
9
9
  <a href="https://packagephobia.com/result?p=@middy/http-urlencode-path-parser">
10
10
  <img src="https://packagephobia.com/badge?p=@middy/http-urlencode-path-parser" alt="npm install size" style="max-width:100%;">
11
11
  </a>
12
- <a href="https://github.com/middyjs/middy/actions">
13
- <img src="https://github.com/middyjs/middy/workflows/Tests/badge.svg" alt="GitHub Actions test status badge" style="max-width:100%;">
12
+ <a href="https://github.com/middyjs/middy/actions/workflows/tests.yml">
13
+ <img src="https://github.com/middyjs/middy/actions/workflows/tests.yml/badge.svg?branch=main&event=push" alt="GitHub Actions CI status badge" style="max-width:100%;">
14
14
  </a>
15
15
  <br/>
16
16
  <a href="https://standardjs.com/">
@@ -33,6 +33,7 @@
33
33
  <img src="https://img.shields.io/badge/StackOverflow-[middy]-yellow" alt="Ask questions on StackOverflow" style="max-width:100%;">
34
34
  </a>
35
35
  </p>
36
+ <p>You can read the documentation at: <a href="https://middy.js.org/docs/middlewares/http-urlencode-path-parser">https://middy.js.org/docs/middlewares/http-urlencode-path-parser</a></p>
36
37
  </div>
37
38
 
38
39
  This middleware automatically parses HTTP requests with URL-encoded paths. This can happen when using path variables (ie `/{name}/`) for an endpoint and the UI `encodeURIComponent` the values before making the request.
@@ -90,7 +91,7 @@ Everyone is very welcome to contribute to this repository. Feel free to [raise i
90
91
 
91
92
  ## License
92
93
 
93
- Licensed under [MIT License](LICENSE). Copyright (c) 2017-2022 Luciano Mammino, will Farrell, and the [Middy team](https://github.com/middyjs/middy/graphs/contributors).
94
+ Licensed under [MIT License](LICENSE). Copyright (c) 2017-2022 [Luciano Mammino](https://github.com/lmammino), [will Farrell](https://github.com/willfarrell), and the [Middy team](https://github.com/middyjs/middy/graphs/contributors).
94
95
 
95
96
  <a href="https://app.fossa.io/projects/git%2Bgithub.com%2Fmiddyjs%2Fmiddy?ref=badge_large">
96
97
  <img src="https://app.fossa.io/api/projects/git%2Bgithub.com%2Fmiddyjs%2Fmiddy.svg?type=large" alt="FOSSA Status" style="max-width:100%;">
package/index.cjs CHANGED
@@ -1,3 +1,19 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;const httpUrlencodePathParserMiddlewareBefore=async request=>{if(!request.event.pathParameters)return;for(const key in request.event.pathParameters){request.event.pathParameters[key]=decodeURIComponent(request.event.pathParameters[key])}};const httpUrlencodePathParserMiddleware=()=>({before:httpUrlencodePathParserMiddlewareBefore});var _default=httpUrlencodePathParserMiddleware;exports.default=_default
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ module.exports = void 0;
6
+ const httpUrlencodePathParserMiddlewareBefore = async (request)=>{
7
+ if (!request.event.pathParameters) return;
8
+ for(const key in request.event.pathParameters){
9
+ request.event.pathParameters[key] = decodeURIComponent(request.event.pathParameters[key]);
10
+ }
11
+ };
12
+ const httpUrlencodePathParserMiddleware = ()=>({
13
+ before: httpUrlencodePathParserMiddlewareBefore
14
+ });
15
+ var _default = httpUrlencodePathParserMiddleware;
16
+ module.exports = _default;
17
+
2
18
 
3
19
  //# sourceMappingURL=index.cjs.map
package/index.js CHANGED
@@ -1,3 +1,13 @@
1
- const httpUrlencodePathParserMiddlewareBefore=async request=>{if(!request.event.pathParameters)return;for(const key in request.event.pathParameters){request.event.pathParameters[key]=decodeURIComponent(request.event.pathParameters[key])}};const httpUrlencodePathParserMiddleware=()=>({before:httpUrlencodePathParserMiddlewareBefore});export default httpUrlencodePathParserMiddleware
1
+ const httpUrlencodePathParserMiddlewareBefore = async (request)=>{
2
+ if (!request.event.pathParameters) return;
3
+ for(const key in request.event.pathParameters){
4
+ request.event.pathParameters[key] = decodeURIComponent(request.event.pathParameters[key]);
5
+ }
6
+ };
7
+ const httpUrlencodePathParserMiddleware = ()=>({
8
+ before: httpUrlencodePathParserMiddlewareBefore
9
+ });
10
+ export default httpUrlencodePathParserMiddleware;
11
+
2
12
 
3
13
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@middy/http-urlencode-path-parser",
3
- "version": "3.0.2",
3
+ "version": "3.1.0-rc.0",
4
4
  "description": "Urlencode path parser middleware for the middy framework",
5
5
  "type": "module",
6
6
  "engines": {
@@ -10,11 +10,17 @@
10
10
  "publishConfig": {
11
11
  "access": "public"
12
12
  },
13
+ "main": "./index.cjs",
13
14
  "exports": {
14
15
  ".": {
15
- "import": "./index.js",
16
- "require": "./index.cjs",
17
- "types": "./index.d.ts"
16
+ "import": {
17
+ "types": "./index.d.ts",
18
+ "default": "./index.js"
19
+ },
20
+ "require": {
21
+ "types": "./index.d.ts",
22
+ "default": "./index.cjs"
23
+ }
18
24
  }
19
25
  },
20
26
  "types": "index.d.ts",
@@ -56,7 +62,7 @@
56
62
  },
57
63
  "homepage": "https://middy.js.org",
58
64
  "devDependencies": {
59
- "@middy/core": "^3.0.2"
65
+ "@middy/core": "3.1.0-rc.0"
60
66
  },
61
- "gitHead": "983649b8359ea32a786e75dfc2953aeee8ec6052"
67
+ "gitHead": "03a8794d3cdb4319eca49ba4c55420bea5d66430"
62
68
  }