@smithy/hash-blob-browser 4.2.15 → 4.3.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 +5 -13
- package/dist-es/index.js +1 -8
- package/dist-types/index.d.ts +2 -5
- package/package.json +5 -34
- package/README.md +0 -17
package/dist-cjs/index.js
CHANGED
|
@@ -1,13 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const hash = new hashCtor();
|
|
7
|
-
await chunkedBlobReader.blobReader(blob, (chunk) => {
|
|
8
|
-
hash.update(chunk);
|
|
9
|
-
});
|
|
10
|
-
return hash.digest();
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
exports.blobHasher = blobHasher;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.blobHasher = void 0;
|
|
4
|
+
var checksum_1 = require("@smithy/core/checksum");
|
|
5
|
+
Object.defineProperty(exports, "blobHasher", { enumerable: true, get: function () { return checksum_1.blobHasher; } });
|
package/dist-es/index.js
CHANGED
|
@@ -1,8 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export const blobHasher = async function blobHasher(hashCtor, blob) {
|
|
3
|
-
const hash = new hashCtor();
|
|
4
|
-
await blobReader(blob, (chunk) => {
|
|
5
|
-
hash.update(chunk);
|
|
6
|
-
});
|
|
7
|
-
return hash.digest();
|
|
8
|
-
};
|
|
1
|
+
export { blobHasher } from "@smithy/core/checksum";
|
package/dist-types/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/hash-blob-browser",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.3.0",
|
|
4
4
|
"scripts": {
|
|
5
|
-
"build": "
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"build:types:downlevel": "premove dist-types/ts3.4 && downlevel-dts dist-types dist-types/ts3.4",
|
|
9
|
-
"clean": "premove dist-cjs dist-es dist-types tsconfig.cjs.tsbuildinfo tsconfig.es.tsbuildinfo tsconfig.types.tsbuildinfo",
|
|
10
|
-
"format": "prettier --config ../../prettier.config.js --ignore-path ../../.prettierignore --write \"**/*.{ts,md,json}\"",
|
|
11
|
-
"lint": "eslint -c ../../.eslintrc.js \"src/**/*.ts\"",
|
|
12
|
-
"stage-release": "premove .release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz",
|
|
13
|
-
"test": "yarn g:vitest run",
|
|
14
|
-
"test:watch": "yarn g:vitest watch"
|
|
5
|
+
"build": "yarn g:tsc -p tsconfig.cjs.json && yarn g:tsc -p tsconfig.es.json && yarn g:tsc -p tsconfig.types.json",
|
|
6
|
+
"clean": "rm -rf dist-cjs dist-es dist-types",
|
|
7
|
+
"stage-release": "rm -rf .release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz"
|
|
15
8
|
},
|
|
16
9
|
"main": "./dist-cjs/index.js",
|
|
17
10
|
"module": "./dist-es/index.js",
|
|
@@ -23,31 +16,9 @@
|
|
|
23
16
|
"license": "Apache-2.0",
|
|
24
17
|
"sideEffects": false,
|
|
25
18
|
"dependencies": {
|
|
26
|
-
"@smithy/
|
|
27
|
-
"@smithy/chunked-blob-reader-native": "^4.2.3",
|
|
28
|
-
"@smithy/types": "^4.14.1",
|
|
19
|
+
"@smithy/core": "^3.24.0",
|
|
29
20
|
"tslib": "^2.6.2"
|
|
30
21
|
},
|
|
31
|
-
"devDependencies": {
|
|
32
|
-
"@smithy/util-hex-encoding": "^4.2.2",
|
|
33
|
-
"concurrently": "7.0.0",
|
|
34
|
-
"downlevel-dts": "0.10.1",
|
|
35
|
-
"premove": "4.0.0",
|
|
36
|
-
"typedoc": "0.23.23"
|
|
37
|
-
},
|
|
38
|
-
"react-native": {
|
|
39
|
-
"@smithy/chunked-blob-reader": "@smithy/chunked-blob-reader-native"
|
|
40
|
-
},
|
|
41
|
-
"browser": {
|
|
42
|
-
"@smithy/chunked-blob-reader": "@smithy/chunked-blob-reader"
|
|
43
|
-
},
|
|
44
|
-
"typesVersions": {
|
|
45
|
-
"<4.5": {
|
|
46
|
-
"dist-types/*": [
|
|
47
|
-
"dist-types/ts3.4/*"
|
|
48
|
-
]
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
22
|
"files": [
|
|
52
23
|
"dist-*/**"
|
|
53
24
|
],
|
package/README.md
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
# @smithy/sha256-blob-browser
|
|
2
|
-
|
|
3
|
-
[](https://www.npmjs.com/package/@smithy/hash-blob-browser)
|
|
4
|
-
[](https://www.npmjs.com/package/@smithy/hash-blob-browser)
|
|
5
|
-
|
|
6
|
-
### :warning: Internal API :warning:
|
|
7
|
-
|
|
8
|
-
> This is an internal package.
|
|
9
|
-
> That means this is used as a dependency for other, public packages, but
|
|
10
|
-
> should not be taken directly as a dependency in your application's `package.json`.
|
|
11
|
-
|
|
12
|
-
> If you are updating the version of this package, for example to bring in a
|
|
13
|
-
> bug-fix, you should do so by updating your application lockfile with
|
|
14
|
-
> e.g. `npm up @scope/package` or equivalent command in another
|
|
15
|
-
> package manager, rather than taking a direct dependency.
|
|
16
|
-
|
|
17
|
-
---
|