@aws-sdk/body-checksum-node
Advanced tools
Comparing version 3.29.0 to 3.32.0
@@ -6,2 +6,10 @@ # Change Log | ||
# [3.32.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.31.0...v3.32.0) (2021-09-17) | ||
**Note:** Version bump only for package @aws-sdk/body-checksum-node | ||
# [3.29.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.28.0...v3.29.0) (2021-09-02) | ||
@@ -8,0 +16,0 @@ |
@@ -13,3 +13,3 @@ "use strict"; | ||
const { body } = request; | ||
if (typeof body === "string" || ArrayBuffer.isView(body) || (0, is_array_buffer_1.isArrayBuffer)(body)) { | ||
if (typeof body === "string" || ArrayBuffer.isView(body) || is_array_buffer_1.isArrayBuffer(body)) { | ||
contentHash === null || contentHash === void 0 ? void 0 : contentHash.update(body); | ||
@@ -22,7 +22,7 @@ treeHash === null || treeHash === void 0 ? void 0 : treeHash.update(body); | ||
} | ||
const bodyTee = (0, fs_1.createReadStream)(body.path, { | ||
const bodyTee = fs_1.createReadStream(body.path, { | ||
start: body.start, | ||
end: body.end, | ||
}); | ||
await (0, chunked_stream_reader_node_1.streamReader)(bodyTee, (chunk) => { | ||
await chunked_stream_reader_node_1.streamReader(bodyTee, (chunk) => { | ||
contentHash === null || contentHash === void 0 ? void 0 : contentHash.update(chunk); | ||
@@ -32,5 +32,5 @@ treeHash === null || treeHash === void 0 ? void 0 : treeHash.update(chunk); | ||
} | ||
return [(0, util_hex_encoding_1.toHex)(await contentHash.digest()), (0, util_hex_encoding_1.toHex)(await treeHash.digest())]; | ||
return [util_hex_encoding_1.toHex(await contentHash.digest()), util_hex_encoding_1.toHex(await treeHash.digest())]; | ||
} | ||
exports.bodyChecksumGenerator = bodyChecksumGenerator; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJ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5kOiAoYm9keSBhcyBhbnkpLmVuZCxcbiAgICB9KTtcblxuICAgIGF3YWl0IHN0cmVhbVJlYWRlcihib2R5VGVlLCAoY2h1bms6IGFueSkgPT4ge1xuICAgICAgY29udGVudEhhc2g/LnVwZGF0ZShjaHVuayk7XG4gICAgICB0cmVlSGFzaD8udXBkYXRlKGNodW5rKTtcbiAgICB9KTtcbiAgfVxuXG4gIHJldHVybiBbdG9IZXgoYXdhaXQgY29udGVudEhhc2guZGlnZXN0KCkpLCB0b0hleChhd2FpdCB0cmVlSGFzaC5kaWdlc3QoKSldO1xufVxuIl19 |
{ | ||
"name": "@aws-sdk/body-checksum-node", | ||
"version": "3.29.0", | ||
"version": "3.32.0", | ||
"scripts": { | ||
@@ -20,8 +20,8 @@ "build:cjs": "tsc -p tsconfig.cjs.json", | ||
"dependencies": { | ||
"@aws-sdk/chunked-stream-reader-node": "3.29.0", | ||
"@aws-sdk/is-array-buffer": "3.29.0", | ||
"@aws-sdk/protocol-http": "3.29.0", | ||
"@aws-sdk/sha256-tree-hash": "3.29.0", | ||
"@aws-sdk/types": "3.29.0", | ||
"@aws-sdk/util-hex-encoding": "3.29.0", | ||
"@aws-sdk/chunked-stream-reader-node": "3.32.0", | ||
"@aws-sdk/is-array-buffer": "3.32.0", | ||
"@aws-sdk/protocol-http": "3.32.0", | ||
"@aws-sdk/sha256-tree-hash": "3.32.0", | ||
"@aws-sdk/types": "3.32.0", | ||
"@aws-sdk/util-hex-encoding": "3.32.0", | ||
"tslib": "^2.3.0" | ||
@@ -31,6 +31,6 @@ }, | ||
"@aws-crypto/sha256-js": "^1.0.0", | ||
"@aws-sdk/util-utf8-node": "3.29.0", | ||
"@aws-sdk/util-utf8-node": "3.32.0", | ||
"@types/jest": "^26.0.4", | ||
"jest": "^26.1.0", | ||
"typescript": "~4.4.2" | ||
"typescript": "~4.3.5" | ||
}, | ||
@@ -37,0 +37,0 @@ "engines": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
43142
+ Added@aws-sdk/chunked-stream-reader-node@3.32.0(transitive)
+ Added@aws-sdk/is-array-buffer@3.32.0(transitive)
+ Added@aws-sdk/protocol-http@3.32.0(transitive)
+ Added@aws-sdk/sha256-tree-hash@3.32.0(transitive)
+ Added@aws-sdk/types@3.32.0(transitive)
+ Added@aws-sdk/util-hex-encoding@3.32.0(transitive)
- Removed@aws-sdk/chunked-stream-reader-node@3.29.0(transitive)
- Removed@aws-sdk/is-array-buffer@3.29.0(transitive)
- Removed@aws-sdk/protocol-http@3.29.0(transitive)
- Removed@aws-sdk/sha256-tree-hash@3.29.0(transitive)
- Removed@aws-sdk/types@3.29.0(transitive)
- Removed@aws-sdk/util-hex-encoding@3.29.0(transitive)
Updated@aws-sdk/types@3.32.0