@middy/service-discovery 5.5.1 → 6.0.0-beta.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.js +3 -3
- package/package.json +7 -4
package/index.js
CHANGED
|
@@ -29,7 +29,7 @@ const defaults = {
|
|
|
29
29
|
const serviceDiscoveryMiddleware = (opts = {}) => {
|
|
30
30
|
const options = { ...defaults, ...opts }
|
|
31
31
|
|
|
32
|
-
const
|
|
32
|
+
const fetchRequest = (request, cachedValues = {}) => {
|
|
33
33
|
const values = {}
|
|
34
34
|
|
|
35
35
|
for (const internalKey of Object.keys(options.fetchData)) {
|
|
@@ -56,7 +56,7 @@ const serviceDiscoveryMiddleware = (opts = {}) => {
|
|
|
56
56
|
let client
|
|
57
57
|
if (canPrefetch(options)) {
|
|
58
58
|
client = createPrefetchClient(options)
|
|
59
|
-
processCache(options,
|
|
59
|
+
processCache(options, fetchRequest)
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
const serviceDiscoveryMiddlewareBefore = async (request) => {
|
|
@@ -64,7 +64,7 @@ const serviceDiscoveryMiddleware = (opts = {}) => {
|
|
|
64
64
|
client = await createClient(options, request)
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
const { value } = processCache(options,
|
|
67
|
+
const { value } = processCache(options, fetchRequest, request)
|
|
68
68
|
|
|
69
69
|
Object.assign(request.internal, value)
|
|
70
70
|
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@middy/service-discovery",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.0-beta.0",
|
|
4
4
|
"description": "Service Discovery (Cloud Map) instances middleware for the middy framework",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
7
|
-
"node": ">=
|
|
7
|
+
"node": ">=20"
|
|
8
8
|
},
|
|
9
9
|
"engineStrict": true,
|
|
10
10
|
"publishConfig": {
|
|
@@ -16,6 +16,9 @@
|
|
|
16
16
|
"import": {
|
|
17
17
|
"types": "./index.d.ts",
|
|
18
18
|
"default": "./index.js"
|
|
19
|
+
},
|
|
20
|
+
"require": {
|
|
21
|
+
"default": "./index.js"
|
|
19
22
|
}
|
|
20
23
|
}
|
|
21
24
|
},
|
|
@@ -60,11 +63,11 @@
|
|
|
60
63
|
"url": "https://github.com/sponsors/willfarrell"
|
|
61
64
|
},
|
|
62
65
|
"dependencies": {
|
|
63
|
-
"@middy/util": "
|
|
66
|
+
"@middy/util": "6.0.0-beta.0"
|
|
64
67
|
},
|
|
65
68
|
"devDependencies": {
|
|
66
69
|
"@aws-sdk/client-servicediscovery": "^3.0.0",
|
|
67
|
-
"@middy/core": "
|
|
70
|
+
"@middy/core": "6.0.0-beta.0",
|
|
68
71
|
"@types/aws-lambda": "^8.10.101",
|
|
69
72
|
"aws-xray-sdk": "^3.3.3"
|
|
70
73
|
},
|