privatenumber / tasuku

✅ タスク — The minimal task visualizer for Node.js
MIT License
1.91k stars 30 forks source link

Able to clear/unmount tasuku when top-level task throws error. #23

Open erictheswift opened 6 months ago

erictheswift commented 6 months ago

Is your feature request related to a problem?

When top-level task body throws, there are two issues:

Tasuku eats my stack trace Tasuku does not allow me to intercept console (https://github.com/privatenumber/tasuku/issues/16) when mounted.

Describe the solution you'd like

Not sure if I want to see the stack trace anywhere by default, but I'd love to be able to clear/unmount tasuku completely in case error happens inside top-level task and fall back to own error handling.

erictheswift commented 6 months ago

So just to summarize: in case of error it's getting bubbled out of await topLevelTask, however there's no way to handle it and display my own content instead of tasuku because tasuku redraws / eats printed content. That's why I'd love to unmount it.

My use case: tasuku as implementation of one of CLI subcommands.