@middy/secrets-manager 4.3.1 → 4.4.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/index.cjs +6 -4
- package/package.json +4 -4
package/index.cjs
CHANGED
|
@@ -4,12 +4,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
});
|
|
5
5
|
Object.defineProperty(module, "exports", {
|
|
6
6
|
enumerable: true,
|
|
7
|
-
get: ()
|
|
7
|
+
get: function() {
|
|
8
|
+
return _default;
|
|
9
|
+
}
|
|
8
10
|
});
|
|
9
11
|
const _util = require("@middy/util");
|
|
10
|
-
const
|
|
12
|
+
const _clientsecretsmanager = require("@aws-sdk/client-secrets-manager");
|
|
11
13
|
const defaults = {
|
|
12
|
-
AwsClient:
|
|
14
|
+
AwsClient: _clientsecretsmanager.SecretsManagerClient,
|
|
13
15
|
awsClientOptions: {},
|
|
14
16
|
awsClientAssumeRole: undefined,
|
|
15
17
|
awsClientCapture: undefined,
|
|
@@ -28,7 +30,7 @@ const secretsManagerMiddleware = (opts = {})=>{
|
|
|
28
30
|
const values = {};
|
|
29
31
|
for (const internalKey of Object.keys(options.fetchData)){
|
|
30
32
|
if (cachedValues[internalKey]) continue;
|
|
31
|
-
values[internalKey] = client.send(new
|
|
33
|
+
values[internalKey] = client.send(new _clientsecretsmanager.GetSecretValueCommand({
|
|
32
34
|
SecretId: options.fetchData[internalKey]
|
|
33
35
|
})).then((resp)=>(0, _util.jsonSafeParse)(resp.SecretString)).catch((e)=>{
|
|
34
36
|
const value = (0, _util.getCache)(options.cacheKey).value ?? {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@middy/secrets-manager",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.4.0",
|
|
4
4
|
"description": "Secrets Manager middleware for the middy framework",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -64,13 +64,13 @@
|
|
|
64
64
|
"url": "https://github.com/sponsors/willfarrell"
|
|
65
65
|
},
|
|
66
66
|
"dependencies": {
|
|
67
|
-
"@middy/util": "4.
|
|
67
|
+
"@middy/util": "4.4.0"
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|
|
70
70
|
"@aws-sdk/client-secrets-manager": "^3.0.0",
|
|
71
|
-
"@middy/core": "4.
|
|
71
|
+
"@middy/core": "4.4.0",
|
|
72
72
|
"@types/aws-lambda": "^8.10.101",
|
|
73
73
|
"aws-xray-sdk": "^3.3.3"
|
|
74
74
|
},
|
|
75
|
-
"gitHead": "
|
|
75
|
+
"gitHead": "5b574488798c48bc74269af7deb3ff95139bcdcc"
|
|
76
76
|
}
|