@middy/s3 4.6.2 → 4.6.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.cjs +2 -5
- package/index.js +2 -5
- package/package.json +4 -4
package/index.cjs
CHANGED
|
@@ -32,12 +32,9 @@ const s3Middleware = (opts = {})=>{
|
|
|
32
32
|
const values = {};
|
|
33
33
|
for (const internalKey of Object.keys(options.fetchData)){
|
|
34
34
|
if (cachedValues[internalKey]) continue;
|
|
35
|
-
values[internalKey] = client.send(new _clients3.GetObjectCommand({
|
|
36
|
-
...options.fetchData[internalKey],
|
|
37
|
-
ChecksumMode: true
|
|
38
|
-
})).then(async (resp)=>{
|
|
35
|
+
values[internalKey] = client.send(new _clients3.GetObjectCommand(options.fetchData[internalKey])).then(async (resp)=>{
|
|
39
36
|
let value = await resp.Body.transformToString();
|
|
40
|
-
if (contentTypePattern.test(resp.
|
|
37
|
+
if (contentTypePattern.test(resp.ContentType)) {
|
|
41
38
|
value = (0, _util.jsonSafeParse)(value);
|
|
42
39
|
}
|
|
43
40
|
return value;
|
package/index.js
CHANGED
|
@@ -22,12 +22,9 @@ const s3Middleware = (opts = {})=>{
|
|
|
22
22
|
const values = {};
|
|
23
23
|
for (const internalKey of Object.keys(options.fetchData)){
|
|
24
24
|
if (cachedValues[internalKey]) continue;
|
|
25
|
-
values[internalKey] = client.send(new GetObjectCommand({
|
|
26
|
-
...options.fetchData[internalKey],
|
|
27
|
-
ChecksumMode: true
|
|
28
|
-
})).then(async (resp)=>{
|
|
25
|
+
values[internalKey] = client.send(new GetObjectCommand(options.fetchData[internalKey])).then(async (resp)=>{
|
|
29
26
|
let value = await resp.Body.transformToString();
|
|
30
|
-
if (contentTypePattern.test(resp.
|
|
27
|
+
if (contentTypePattern.test(resp.ContentType)) {
|
|
31
28
|
value = jsonSafeParse(value);
|
|
32
29
|
}
|
|
33
30
|
return value;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@middy/s3",
|
|
3
|
-
"version": "4.6.
|
|
3
|
+
"version": "4.6.4",
|
|
4
4
|
"description": "S3 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.6.
|
|
67
|
+
"@middy/util": "4.6.4"
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|
|
70
70
|
"@aws-sdk/client-s3": "^3.0.0",
|
|
71
|
-
"@middy/core": "4.6.
|
|
71
|
+
"@middy/core": "4.6.4",
|
|
72
72
|
"@types/aws-lambda": "^8.10.101",
|
|
73
73
|
"aws-xray-sdk": "^3.3.3"
|
|
74
74
|
},
|
|
75
|
-
"gitHead": "
|
|
75
|
+
"gitHead": "706ec39ce569407d51007200b995542ad3d7af2b"
|
|
76
76
|
}
|