@middy/rds-signer 7.1.1 → 7.1.3
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/README.md +17 -0
- package/index.d.ts +1 -1
- package/index.js +3 -2
- package/package.json +6 -7
package/README.md
CHANGED
|
@@ -30,6 +30,23 @@
|
|
|
30
30
|
<p>You can read the documentation at: <a href="https://middy.js.org/docs/middlewares/rds-signer">https://middy.js.org/docs/middlewares/rds-signer</a></p>
|
|
31
31
|
</div>
|
|
32
32
|
|
|
33
|
+
## Install
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
npm install --save @middy/rds-signer @aws-sdk/rds-signer
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
## Documentation and examples
|
|
41
|
+
|
|
42
|
+
For documentation and examples, refer to the main [Middy monorepo on GitHub](https://github.com/middyjs/middy) or [Middy official website](https://middy.js.org/docs/middlewares/rds-signer).
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
## Contributing
|
|
46
|
+
|
|
47
|
+
Everyone is very welcome to contribute to this repository. Feel free to [raise issues](https://github.com/middyjs/middy/issues) or to [submit Pull Requests](https://github.com/middyjs/middy/pulls).
|
|
48
|
+
|
|
49
|
+
|
|
33
50
|
## License
|
|
34
51
|
|
|
35
52
|
Licensed under [MIT License](LICENSE). Copyright (c) 2017-2026 [will Farrell](https://github.com/willfarrell), [Luciano Mammino](https://github.com/lmammino), and [Middy contributors](https://github.com/middyjs/middy/graphs/contributors).
|
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -23,9 +23,10 @@ const defaults = {
|
|
|
23
23
|
const rdsSignerMiddleware = (opts = {}) => {
|
|
24
24
|
const options = { ...defaults, ...opts };
|
|
25
25
|
|
|
26
|
+
const fetchDataKeys = Object.keys(options.fetchData);
|
|
26
27
|
const fetchRequest = (request, cachedValues = {}) => {
|
|
27
28
|
const values = {};
|
|
28
|
-
for (const internalKey of
|
|
29
|
+
for (const internalKey of fetchDataKeys) {
|
|
29
30
|
if (cachedValues[internalKey]) continue;
|
|
30
31
|
|
|
31
32
|
const client = new options.AwsClient({
|
|
@@ -64,7 +65,7 @@ const rdsSignerMiddleware = (opts = {}) => {
|
|
|
64
65
|
Object.assign(request.internal, value);
|
|
65
66
|
|
|
66
67
|
if (options.setToContext) {
|
|
67
|
-
const data = await getInternal(
|
|
68
|
+
const data = await getInternal(fetchDataKeys, request);
|
|
68
69
|
Object.assign(request.context, data);
|
|
69
70
|
}
|
|
70
71
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@middy/rds-signer",
|
|
3
|
-
"version": "7.1.
|
|
3
|
+
"version": "7.1.3",
|
|
4
4
|
"description": "RDS (Relational Database Service) credentials middleware for the middy framework",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -72,15 +72,14 @@
|
|
|
72
72
|
"optional": true
|
|
73
73
|
}
|
|
74
74
|
},
|
|
75
|
+
"dependencies": {
|
|
76
|
+
"@middy/util": "7.1.3"
|
|
77
|
+
},
|
|
75
78
|
"devDependencies": {
|
|
76
79
|
"@aws-sdk/rds-signer": "^3.0.0",
|
|
77
|
-
"@middy/core": "7.1.
|
|
80
|
+
"@middy/core": "7.1.3",
|
|
78
81
|
"@types/aws-lambda": "^8.0.0",
|
|
79
82
|
"@types/node": "^22.0.0",
|
|
80
83
|
"aws-xray-sdk": "^3.3.3"
|
|
81
|
-
}
|
|
82
|
-
"dependencies": {
|
|
83
|
-
"@middy/util": "7.1.1"
|
|
84
|
-
},
|
|
85
|
-
"gitHead": "7a6c0fbb8ab71d6a2171e678697de9f237568431"
|
|
84
|
+
}
|
|
86
85
|
}
|