cdp: make progress logging same as node

This commit is contained in:
CanadaHonk 2022-12-30 21:44:40 +00:00
parent 9b16a5ca93
commit 2dfb0cfe5a

View File

@ -45,8 +45,7 @@ export default async ({ pipe: { pipeWrite, pipeRead } = {}, port }) => {
const continualTrying = func => new Promise(resolve => {
const attempt = async () => {
try {
console.log('a');
// process.stdout.write('.');
Deno.stdout.write(new TextEncoder().encode('.'));
resolve(await func());
} catch (e) { // fail, wait 100ms and try again
await new Promise(res => setTimeout(res, 200));