lino-levan / astral

A high-level puppeteer/playwright-like library for Deno
https://jsr.io/@astral/astral
MIT License
177 stars 7 forks source link

feat: improve install progress and native unzip #18

Closed lowlighter closed 9 months ago

lowlighter commented 9 months ago

This PR removes the need of --allow-run=powershell (greatly reducing attack vectors for Windows) and --allow-run=unzip by using native JS instead.

It also add some QOL features, such as a progress bar for both downloading/inflating browser archive, along with ASTRAL_QUIET_INSTALL env var that hide Astral's console.log. Also added cleanCache() function so it's possible to add browser install to the unit tests

ezgif-3-c7aa3ea991

lino-levan commented 9 months ago

It looks like the windows test is hanging on something. Any ideas why?

lowlighter commented 9 months ago

It looks like the windows test is hanging on something. Any ideas why?

Yeah I just debugged on my laptop, for some reason chrome.exe --version actually spawns an interactive instance of the browser, so I think that's why it got stuck Pretty weird that flag doesn't exist for windows

lino-levan commented 9 months ago

That is quite strange, I've noticed a lot of inconsistencies between browsers and different operating systems.

lino-levan commented 9 months ago

Thanks for your great work!