turborepo
cda0322d - chore: Port logout to be pure Rust (#3302)

Commit
3 years ago
chore: Port logout to be pure Rust (#3302) With this PR `turbo logout` can run without jumping to Go. Notes: - Used `config-rs` for our config reading. It doesn't support writing configs to disk out of the box, but this can be solved with a wrapper struct. This can probably be abstracted to be generic over different configs, but we should hold off until that seems beneficial. - `termcolor` is used for coloring output, this is the same crate that `env_logger` uses for coloring outputs. The `UI` struct is expected to be passed into any subcommands that need pretty output. - A slight behavior change is that we no longer delete the entire config file and instead make the token null (`"token": null`). If this is unwanted, I can change it back to the old behavior, but I wanted to test out `UserConfig::set_token` before someone else tried using it. Co-authored-by: Leah <github.leah@hrmny.sh>
Parents
Loading