fixes
This commit is contained in:
@@ -37,15 +37,16 @@
|
|||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "rollup -c && ./fixup",
|
"build": "rollup -c && ./fixup",
|
||||||
|
"build_win": "rollup -c && mingw64 ./fixup",
|
||||||
"test": "jest",
|
"test": "jest",
|
||||||
"prepublish": "rollup -c --silent && ./fixup"
|
"prepublish": "rollup -c --silent && ./fixup"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@stablelib/xchacha20poly1305": "^1.0.1",
|
"@stablelib/xchacha20poly1305": "^1.0.1",
|
||||||
"blake2b": "^2.1.4",
|
"blake2b": "^2.1.4",
|
||||||
"int64-buffer": "^1.0.0",
|
"int64-buffer": "^1.1.0",
|
||||||
"text-encoding": "^0.7.0",
|
"text-encoding": "^0.7.0",
|
||||||
"uuid": "^8.3.2"
|
"uuid": "^11.0.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.14.3",
|
"@babel/core": "^7.14.3",
|
||||||
|
|||||||
@@ -14,7 +14,9 @@ const calculate_sha256 = (path) => {
|
|||||||
const hash = blake2b(32);
|
const hash = blake2b(32);
|
||||||
|
|
||||||
fs.createReadStream(path)
|
fs.createReadStream(path)
|
||||||
.on('data', (data) => hash.update(data))
|
.on('data', (data) => {
|
||||||
|
return hash.update(new Uint8Array(data));
|
||||||
|
})
|
||||||
.on('error', (err) => reject(err))
|
.on('error', (err) => reject(err))
|
||||||
.on('end', () => {
|
.on('end', () => {
|
||||||
const h = hash.digest('hex');
|
const h = hash.digest('hex');
|
||||||
|
|||||||
Reference in New Issue
Block a user