From db3b303e6ce9fefc3fa73d4af03d4a0e381cb575 Mon Sep 17 00:00:00 2001 From: C-3PO Date: Sun, 8 Jul 2018 19:15:41 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=97=91=20Remove=20debug=20output?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/cdn/funcs/saveResponse.ts | 2 -- src/ssn/getPatch.ts | 1 - src/ssn/streams/readLocalFileHeader.ts | 2 -- 3 files changed, 5 deletions(-) diff --git a/src/cdn/funcs/saveResponse.ts b/src/cdn/funcs/saveResponse.ts index 00e44bd..e7dc2a5 100644 --- a/src/cdn/funcs/saveResponse.ts +++ b/src/cdn/funcs/saveResponse.ts @@ -39,8 +39,6 @@ export default function saveResponse( } //wait until everything is written to disk, then return file name - //TODO: need to automatically delete file once it is no longer used - //TODO: need to provide methods to seek through file writeStream.end(() => { resolve(filePath); }); diff --git a/src/ssn/getPatch.ts b/src/ssn/getPatch.ts index fa64308..e006503 100644 --- a/src/ssn/getPatch.ts +++ b/src/ssn/getPatch.ts @@ -32,7 +32,6 @@ export default async function getPatch(product: Product, from: number, to: numbe //Then we need to wait for disks to finish download before we can extract individual files //TODO: we can optimize this to already extract some files as soon as their relevant parts are downloaded const diskFilenames = await Promise.all(diskFiles); - console.debug(diskFilenames); //const dvArray = bufferArray.map((buffer) => new DataView(buffer)); //TODO: Verify that downloaded files match the hash in `solidpkg.pieces` diff --git a/src/ssn/streams/readLocalFileHeader.ts b/src/ssn/streams/readLocalFileHeader.ts index 91c52f8..854cafd 100644 --- a/src/ssn/streams/readLocalFileHeader.ts +++ b/src/ssn/streams/readLocalFileHeader.ts @@ -19,10 +19,8 @@ function waitReadableLength(inputStream: stream.Readable, minLength: number): Pr export default async function readLocalFileHeader(inputStream: stream.Readable): Promise { let localFileHeader: Buffer = inputStream.read(30); if (localFileHeader === null) { - console.log('Need to wait'); //need to wait until data is ready for reading await waitReadableLength(inputStream, 30); - console.log('Ready'); localFileHeader = inputStream.read(30); }