@middy/ssm 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
|
@@ -19,6 +19,9 @@ import {
|
|
|
19
19
|
validateOptions,
|
|
20
20
|
} from "@middy/util";
|
|
21
21
|
|
|
22
|
+
const name = "ssm";
|
|
23
|
+
const pkg = `@middy/${name}`;
|
|
24
|
+
|
|
22
25
|
const defaults = {
|
|
23
26
|
AwsClient: SSMClient, // Allow for XRay
|
|
24
27
|
awsClientOptions: {},
|
|
@@ -26,7 +29,7 @@ const defaults = {
|
|
|
26
29
|
awsClientCapture: undefined,
|
|
27
30
|
fetchData: {}, // { contextKey: fetchKey, contextPrefix: fetchPath/ }
|
|
28
31
|
disablePrefetch: false,
|
|
29
|
-
cacheKey:
|
|
32
|
+
cacheKey: pkg,
|
|
30
33
|
cacheKeyExpiry: {},
|
|
31
34
|
cacheExpiry: -1,
|
|
32
35
|
setToContext: false,
|
|
@@ -58,7 +61,7 @@ const optionSchema = {
|
|
|
58
61
|
};
|
|
59
62
|
|
|
60
63
|
export const ssmValidateOptions = (options) =>
|
|
61
|
-
validateOptions(
|
|
64
|
+
validateOptions(pkg, optionSchema, options);
|
|
62
65
|
|
|
63
66
|
const ssmMiddleware = (opts = {}) => {
|
|
64
67
|
const options = { ...defaults, ...opts };
|
|
@@ -114,7 +117,7 @@ const ssmMiddleware = (opts = {}) => {
|
|
|
114
117
|
modifyCache(options.cacheKey, value);
|
|
115
118
|
result[fetchKey] = Promise.reject(
|
|
116
119
|
new Error(`InvalidParameter ${fetchKey}`, {
|
|
117
|
-
cause: { package:
|
|
120
|
+
cause: { package: pkg },
|
|
118
121
|
}),
|
|
119
122
|
);
|
|
120
123
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@middy/ssm",
|
|
3
|
-
"version": "7.3.
|
|
3
|
+
"version": "7.3.4",
|
|
4
4
|
"description": "SSM (EC2 Systems Manager) parameters middleware for the middy framework",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"url": "https://github.com/sponsors/willfarrell"
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
|
-
"@middy/util": "7.3.
|
|
65
|
+
"@middy/util": "7.3.4"
|
|
66
66
|
},
|
|
67
67
|
"peerDependencies": {
|
|
68
68
|
"@aws-sdk/client-ssm": "^3.0.0"
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
},
|
|
75
75
|
"devDependencies": {
|
|
76
76
|
"@aws-sdk/client-ssm": "^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"
|