tasuku icon indicating copy to clipboard operation
tasuku copied to clipboard

Configurable renderers?

Open mmkal opened this issue 9 months ago • 0 comments

Is your feature request related to a problem?

Hi, I want to add listr2/tasuku-like support to a migration library I maintain, umzug. The default behaviour of tasuku is perfect for running it from a dev machine/via CLI. But an important use case for umzug is also calling it via API, for example in a server hosted in the cloud. For those cases right now, umzug accepts a logger as input, so you can pass in a JSON logger (or any logger) to control what is output.

I'm trying to figure out whether it would be possible to integrate tasuku without that being the only way logs can be emitted.

Describe the solution you'd like

listr2 supports custom renderers - I think that's roughly what I'm looking for.

Describe alternatives you've considered

I'm not sure - maybe I'm thinking about this in the wrong way?

Additional context

I think that running migrations using tasuku to control the output will involve tasuku being pretty deeply integrated into the umzug codebase, but maybe there's a lighter-touch way of doing things?

mmkal avatar May 11 '24 14:05 mmkal