IBM / report-toolkit

A toolkit for consumers of Node.js diagnostic Reports
https://ibm.github.io/report-toolkit
Other
84 stars 10 forks source link

formatter / transformer design #24

Closed boneskull closed 5 years ago

boneskull commented 5 years ago

I was operating under the definition that a formatter took a raw report and returned it in some specific output format, and a transformer took a raw report and output some other shape of data, and was intended to be piped through to a formatter.

But, the original transformer (numeric) was intended to essentially filter (and restructure) a report--and it can only really be used with the pipe formatter. It doesn't really make sense to use the pipe formatter outside of the numeric context unless you wanted to consume it via something like a newline-delimited readable stream.

anyhow... I'm thinking perhaps we don't need to differentiate between formatters and transformers. indeed it makes things more complex for the user. not sure.

perhaps some of these combinations could be shortcuts or prerolled configurations.

UPDATE: I've done some work here on the transformers, but there's work to re-integrate them into some of the commands:

boneskull commented 5 years ago

as part of this, pipe should be renamed to something like newline