rules_cue
rules_cue copied to clipboard
cue_export: Support "text" output format in addition to JSON and YAML
As of this writing, the cue export command's --out flag accepts three values:
- json
- text
- yaml
By contrast, the cue_export Bazel rule accepts only "json" and "yaml" as valid choices for its "output_format" attribute. Augment the accepted set to also accept the "text" format, in order to allow emitting content that is neither JSON nor YAML.
I considered just trying to emit a top-level string value, but in JSON format, that value will be wrapped in quotation marks and have internal newlines escaped. YAML might fare better, but these are unnecessary workarounds. The intention of this package was likely to expose the full suite of cue export's capabilities.