@aws-sdk/body-checksum-node 3.54.0 → 3.58.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/CHANGELOG.md +24 -0
- package/dist-cjs/index.js +4 -4
- package/package.json +10 -10
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,30 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [3.58.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.57.0...v3.58.0) (2022-03-28)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @aws-sdk/body-checksum-node
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [3.55.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.54.1...v3.55.0) (2022-03-21)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @aws-sdk/body-checksum-node
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## [3.54.1](https://github.com/aws/aws-sdk-js-v3/compare/v3.54.0...v3.54.1) (2022-03-15)
|
|
23
|
+
|
|
24
|
+
**Note:** Version bump only for package @aws-sdk/body-checksum-node
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
6
30
|
# [3.54.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.53.1...v3.54.0) (2022-03-11)
|
|
7
31
|
|
|
8
32
|
**Note:** Version bump only for package @aws-sdk/body-checksum-node
|
package/dist-cjs/index.js
CHANGED
|
@@ -10,7 +10,7 @@ async function bodyChecksumGenerator(request, options) {
|
|
|
10
10
|
const contentHash = new options.sha256();
|
|
11
11
|
const treeHash = new sha256_tree_hash_1.TreeHash(options.sha256, options.utf8Decoder);
|
|
12
12
|
const { body } = request;
|
|
13
|
-
if (typeof body === "string" || ArrayBuffer.isView(body) || is_array_buffer_1.isArrayBuffer(body)) {
|
|
13
|
+
if (typeof body === "string" || ArrayBuffer.isView(body) || (0, is_array_buffer_1.isArrayBuffer)(body)) {
|
|
14
14
|
contentHash === null || contentHash === void 0 ? void 0 : contentHash.update(body);
|
|
15
15
|
treeHash === null || treeHash === void 0 ? void 0 : treeHash.update(body);
|
|
16
16
|
}
|
|
@@ -18,15 +18,15 @@ async function bodyChecksumGenerator(request, options) {
|
|
|
18
18
|
if (typeof body.path !== "string") {
|
|
19
19
|
throw new Error("Unable to calculate checksums for non-file streams.");
|
|
20
20
|
}
|
|
21
|
-
const bodyTee = fs_1.createReadStream(body.path, {
|
|
21
|
+
const bodyTee = (0, fs_1.createReadStream)(body.path, {
|
|
22
22
|
start: body.start,
|
|
23
23
|
end: body.end,
|
|
24
24
|
});
|
|
25
|
-
await chunked_stream_reader_node_1.streamReader(bodyTee, (chunk) => {
|
|
25
|
+
await (0, chunked_stream_reader_node_1.streamReader)(bodyTee, (chunk) => {
|
|
26
26
|
contentHash === null || contentHash === void 0 ? void 0 : contentHash.update(chunk);
|
|
27
27
|
treeHash === null || treeHash === void 0 ? void 0 : treeHash.update(chunk);
|
|
28
28
|
});
|
|
29
29
|
}
|
|
30
|
-
return [util_hex_encoding_1.toHex(await contentHash.digest()), util_hex_encoding_1.toHex(await treeHash.digest())];
|
|
30
|
+
return [(0, util_hex_encoding_1.toHex)(await contentHash.digest()), (0, util_hex_encoding_1.toHex)(await treeHash.digest())];
|
|
31
31
|
}
|
|
32
32
|
exports.bodyChecksumGenerator = bodyChecksumGenerator;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/body-checksum-node",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.58.0",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
6
6
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|
|
@@ -19,23 +19,23 @@
|
|
|
19
19
|
},
|
|
20
20
|
"license": "Apache-2.0",
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@aws-sdk/chunked-stream-reader-node": "3.
|
|
23
|
-
"@aws-sdk/is-array-buffer": "3.
|
|
24
|
-
"@aws-sdk/protocol-http": "3.
|
|
25
|
-
"@aws-sdk/sha256-tree-hash": "3.
|
|
26
|
-
"@aws-sdk/types": "3.
|
|
27
|
-
"@aws-sdk/util-hex-encoding": "3.
|
|
28
|
-
"tslib": "^2.3.
|
|
22
|
+
"@aws-sdk/chunked-stream-reader-node": "3.55.0",
|
|
23
|
+
"@aws-sdk/is-array-buffer": "3.55.0",
|
|
24
|
+
"@aws-sdk/protocol-http": "3.58.0",
|
|
25
|
+
"@aws-sdk/sha256-tree-hash": "3.58.0",
|
|
26
|
+
"@aws-sdk/types": "3.55.0",
|
|
27
|
+
"@aws-sdk/util-hex-encoding": "3.58.0",
|
|
28
|
+
"tslib": "^2.3.1"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@aws-crypto/sha256-js": "2.0.0",
|
|
32
|
-
"@aws-sdk/util-utf8-node": "3.
|
|
32
|
+
"@aws-sdk/util-utf8-node": "3.55.0",
|
|
33
33
|
"@tsconfig/recommended": "1.0.1",
|
|
34
34
|
"concurrently": "7.0.0",
|
|
35
35
|
"downlevel-dts": "0.7.0",
|
|
36
36
|
"rimraf": "3.0.2",
|
|
37
37
|
"typedoc": "0.19.2",
|
|
38
|
-
"typescript": "~4.
|
|
38
|
+
"typescript": "~4.6.2"
|
|
39
39
|
},
|
|
40
40
|
"engines": {
|
|
41
41
|
"node": ">= 12.0.0"
|