@middy/ssm 5.2.0 → 5.2.2
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 +17 -16
- package/package.json +4 -4
package/index.js
CHANGED
|
@@ -7,8 +7,9 @@ import {
|
|
|
7
7
|
modifyCache,
|
|
8
8
|
jsonSafeParse,
|
|
9
9
|
getInternal,
|
|
10
|
-
sanitizeKey
|
|
11
|
-
|
|
10
|
+
sanitizeKey,
|
|
11
|
+
catchInvalidSignatureException
|
|
12
|
+
} from '../util/index.js'
|
|
12
13
|
import {
|
|
13
14
|
SSMClient,
|
|
14
15
|
GetParametersCommand,
|
|
@@ -66,13 +67,13 @@ const ssmMiddleware = (opts = {}) => {
|
|
|
66
67
|
continue
|
|
67
68
|
}
|
|
68
69
|
|
|
70
|
+
const command = new GetParametersCommand({
|
|
71
|
+
Names: batchFetchKeys,
|
|
72
|
+
WithDecryption: true
|
|
73
|
+
})
|
|
69
74
|
batchReq = client
|
|
70
|
-
.send(
|
|
71
|
-
|
|
72
|
-
Names: batchFetchKeys,
|
|
73
|
-
WithDecryption: true
|
|
74
|
-
})
|
|
75
|
-
)
|
|
75
|
+
.send(command)
|
|
76
|
+
.catch((e) => catchInvalidSignatureException(e, client, command))
|
|
76
77
|
.then((resp) => {
|
|
77
78
|
// Don't sanitize key, mapped to set value in options
|
|
78
79
|
return Object.assign(
|
|
@@ -131,15 +132,15 @@ const ssmMiddleware = (opts = {}) => {
|
|
|
131
132
|
}
|
|
132
133
|
|
|
133
134
|
const fetchPath = (path, nextToken, values = {}) => {
|
|
135
|
+
const command = new GetParametersByPathCommand({
|
|
136
|
+
Path: path,
|
|
137
|
+
NextToken: nextToken,
|
|
138
|
+
Recursive: true,
|
|
139
|
+
WithDecryption: true
|
|
140
|
+
})
|
|
134
141
|
return client
|
|
135
|
-
.send(
|
|
136
|
-
|
|
137
|
-
Path: path,
|
|
138
|
-
NextToken: nextToken,
|
|
139
|
-
Recursive: true,
|
|
140
|
-
WithDecryption: true
|
|
141
|
-
})
|
|
142
|
-
)
|
|
142
|
+
.send(command)
|
|
143
|
+
.catch((e) => catchInvalidSignatureException(e, client, command))
|
|
143
144
|
.then((resp) => {
|
|
144
145
|
Object.assign(
|
|
145
146
|
values,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@middy/ssm",
|
|
3
|
-
"version": "5.2.
|
|
3
|
+
"version": "5.2.2",
|
|
4
4
|
"description": "SSM (EC2 Systems Manager) parameters middleware for the middy framework",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -60,13 +60,13 @@
|
|
|
60
60
|
"url": "https://github.com/sponsors/willfarrell"
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
|
-
"@middy/util": "5.2.
|
|
63
|
+
"@middy/util": "5.2.2"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
66
|
"@aws-sdk/client-ssm": "^3.0.0",
|
|
67
|
-
"@middy/core": "5.2.
|
|
67
|
+
"@middy/core": "5.2.2",
|
|
68
68
|
"@types/aws-lambda": "^8.10.101",
|
|
69
69
|
"aws-xray-sdk": "^3.3.3"
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "dbfe56d5dfc783fae1e19c7dddd074c0d18d5073"
|
|
72
72
|
}
|