sandworm-hq / sandworm-audit

Security & License Compliance For Your App's Dependencies 🪱
https://sandworm.dev
MIT License
471 stars 5 forks source link

Show tips while building dep graph #87

Closed gabidobo closed 1 year ago

gabidobo commented 1 year ago

This PR adds displaying Sandworm usage tips while the dependency graph is loading. Tips can be turned off by setting the --show-tips=false command line option, or by using the showTips key in the config file. Tips consist of a message, an example, and an URL. They are rotated every 10s.

2023-03-24 23 25 09

Closes #86

andreimarinescu commented 1 year ago

@gabidobo: while testing, the progress indicator is now rotating, but the whole section (including the newly added tips) are flickering quite badly (I guess while refreshing the text). I guess it's something solvable since I don't see this with other CLIs I'm using?

One idea would be to selectively refresh and only update the download progress instead of the entire block (that part flickering would not be a problem IMHO).

andreimarinescu commented 1 year ago

Screencast from 2023-03-25 19-12-23.webm

Screencast of how it looks.

gabidobo commented 1 year ago

@andreimarinescu thanks for catching this, the flicker is almost non-existent on my machine. I've pushed an update fixing it by writing the tips text only once. Cycling through tips was getting a bit complicated with this new setup though, so I'm taking it out for now.