@aws-sdk/body-checksum-node 3.714.0 → 3.731.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/dist-cjs/index.js +4 -4
- package/package.json +11 -11
package/dist-cjs/index.js
CHANGED
|
@@ -35,8 +35,8 @@ async function bodyChecksumGenerator(request, options) {
|
|
|
35
35
|
const treeHash = new import_sha256_tree_hash.TreeHash(options.sha256, options.utf8Decoder);
|
|
36
36
|
const { body } = request;
|
|
37
37
|
if (typeof body === "string" || ArrayBuffer.isView(body) || (0, import_is_array_buffer.isArrayBuffer)(body)) {
|
|
38
|
-
contentHash
|
|
39
|
-
treeHash
|
|
38
|
+
contentHash?.update((0, import_util_utf8.toUint8Array)(body));
|
|
39
|
+
treeHash?.update((0, import_util_utf8.toUint8Array)(body));
|
|
40
40
|
} else {
|
|
41
41
|
if (typeof body.path !== "string") {
|
|
42
42
|
throw new Error("Unable to calculate checksums for non-file streams.");
|
|
@@ -46,8 +46,8 @@ async function bodyChecksumGenerator(request, options) {
|
|
|
46
46
|
end: body.end
|
|
47
47
|
});
|
|
48
48
|
await (0, import_chunked_stream_reader_node.streamReader)(bodyTee, (chunk) => {
|
|
49
|
-
contentHash
|
|
50
|
-
treeHash
|
|
49
|
+
contentHash?.update((0, import_util_utf8.toUint8Array)(chunk));
|
|
50
|
+
treeHash?.update((0, import_util_utf8.toUint8Array)(chunk));
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
53
|
return [(0, import_util_hex_encoding.toHex)(await contentHash.digest()), (0, import_util_hex_encoding.toHex)(await treeHash.digest())];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/body-checksum-node",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.731.0",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
6
6
|
"build:cjs": "node ../../scripts/compilation/inline body-checksum-node",
|
|
@@ -21,14 +21,14 @@
|
|
|
21
21
|
},
|
|
22
22
|
"license": "Apache-2.0",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@aws-sdk/chunked-stream-reader-node": "3.
|
|
25
|
-
"@aws-sdk/sha256-tree-hash": "3.
|
|
26
|
-
"@aws-sdk/types": "3.
|
|
27
|
-
"@smithy/is-array-buffer": "^
|
|
28
|
-
"@smithy/protocol-http": "^
|
|
29
|
-
"@smithy/types": "^
|
|
30
|
-
"@smithy/util-hex-encoding": "^
|
|
31
|
-
"@smithy/util-utf8": "^
|
|
24
|
+
"@aws-sdk/chunked-stream-reader-node": "3.723.0",
|
|
25
|
+
"@aws-sdk/sha256-tree-hash": "3.731.0",
|
|
26
|
+
"@aws-sdk/types": "3.731.0",
|
|
27
|
+
"@smithy/is-array-buffer": "^4.0.0",
|
|
28
|
+
"@smithy/protocol-http": "^5.0.0",
|
|
29
|
+
"@smithy/types": "^4.0.0",
|
|
30
|
+
"@smithy/util-hex-encoding": "^4.0.0",
|
|
31
|
+
"@smithy/util-utf8": "^4.0.0",
|
|
32
32
|
"tslib": "^2.6.2"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
@@ -37,10 +37,10 @@
|
|
|
37
37
|
"concurrently": "7.0.0",
|
|
38
38
|
"downlevel-dts": "0.10.1",
|
|
39
39
|
"rimraf": "3.0.2",
|
|
40
|
-
"typescript": "~
|
|
40
|
+
"typescript": "~5.2.2"
|
|
41
41
|
},
|
|
42
42
|
"engines": {
|
|
43
|
-
"node": ">=
|
|
43
|
+
"node": ">=18.0.0"
|
|
44
44
|
},
|
|
45
45
|
"typesVersions": {
|
|
46
46
|
"<4.0": {
|