@middy/rds-signer 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 +6 -3
- package/package.json +3 -3
package/index.js
CHANGED
|
@@ -10,12 +10,15 @@ import {
|
|
|
10
10
|
validateOptions,
|
|
11
11
|
} from "@middy/util";
|
|
12
12
|
|
|
13
|
+
const name = "rds-signer";
|
|
14
|
+
const pkg = `@middy/${name}`;
|
|
15
|
+
|
|
13
16
|
const defaults = {
|
|
14
17
|
AwsClient: Signer,
|
|
15
18
|
awsClientOptions: {},
|
|
16
19
|
fetchData: {},
|
|
17
20
|
disablePrefetch: false,
|
|
18
|
-
cacheKey:
|
|
21
|
+
cacheKey: pkg,
|
|
19
22
|
cacheKeyExpiry: {},
|
|
20
23
|
cacheExpiry: -1,
|
|
21
24
|
setToContext: false,
|
|
@@ -52,7 +55,7 @@ const optionSchema = {
|
|
|
52
55
|
};
|
|
53
56
|
|
|
54
57
|
export const rdsSignerValidateOptions = (options) =>
|
|
55
|
-
validateOptions(
|
|
58
|
+
validateOptions(pkg, optionSchema, options);
|
|
56
59
|
|
|
57
60
|
const rdsSignerMiddleware = (opts = {}) => {
|
|
58
61
|
const options = { ...defaults, ...opts };
|
|
@@ -74,7 +77,7 @@ const rdsSignerMiddleware = (opts = {}) => {
|
|
|
74
77
|
// Catch Missing token, this usually means there is something wrong with the credentials
|
|
75
78
|
if (!token.includes("X-Amz-Security-Token=")) {
|
|
76
79
|
throw new Error("X-Amz-Security-Token Missing", {
|
|
77
|
-
cause: { package:
|
|
80
|
+
cause: { package: pkg },
|
|
78
81
|
});
|
|
79
82
|
}
|
|
80
83
|
return token;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@middy/rds-signer",
|
|
3
|
-
"version": "7.3.
|
|
3
|
+
"version": "7.3.4",
|
|
4
4
|
"description": "RDS (Relational Database Service) credentials middleware for the middy framework",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -70,11 +70,11 @@
|
|
|
70
70
|
}
|
|
71
71
|
},
|
|
72
72
|
"dependencies": {
|
|
73
|
-
"@middy/util": "7.3.
|
|
73
|
+
"@middy/util": "7.3.4"
|
|
74
74
|
},
|
|
75
75
|
"devDependencies": {
|
|
76
76
|
"@aws-sdk/rds-signer": "^3.0.0",
|
|
77
|
-
"@middy/core": "7.3.
|
|
77
|
+
"@middy/core": "7.3.4",
|
|
78
78
|
"@types/aws-lambda": "^8.0.0",
|
|
79
79
|
"@types/node": "^22.0.0",
|
|
80
80
|
"aws-xray-sdk": "^3.3.3"
|