fix: add debug logging

This commit is contained in:
Samuel Attard
2020-11-19 10:01:20 -08:00
parent 0770238718
commit 621083fe1f
6 changed files with 71 additions and 5 deletions

View File

@@ -1,7 +1,9 @@
import * as fs from 'fs-extra';
import * as crypto from 'crypto';
import { d } from './debug';
export const sha = async (filePath: string) => {
d('hashing', filePath);
const hash = crypto.createHash('sha256');
const fileStream = fs.createReadStream(filePath);
fileStream.pipe(hash);