observablehq / framework

A static site generator for data apps, dashboards, reports, and more. Observable Framework combines JavaScript on the front-end for interactive graphics with any language on the back-end for data analysis.
https://observablehq.com/framework/
ISC License
2.13k stars 85 forks source link

Add option to disable spinner during deploys #1446

Closed mootari closed 2 days ago

mootari commented 2 weeks ago

When an application logs the output of the deploy command, the spinner output "Server processing deploy" will appear in logs as displayed in the examples below. Without a progress bar (see #687) there is arguably not much value to it, and even with a progress status it may not be desirable to log the output in such detail.

A solution could be to add a --no-progress option to the deploy command (or globally) that would suppress any spinner output except for the .stop() message.

Output examples

Docker container logs:

◒  Server processing deploy
◐  Server processing deploy
<SNIP>
◑  Server processing deploy.
◒  Server processing deploy.
<SNIP>
◒  Server processing deploy..
◐  Server processing deploy...
◓  Server processing deploy...
◑  Server processing deploy...
◇  Deploy complete\n

GitHub action logs:

◒  Server processing deploy◐  Server processing deploy◓  Server processing deploy◑  Server processing deploy◒  Server processing deploy◐  Server processing deploy◓  Server processing deploy◑  Server processing deploy◒  Server processing deploy.◐  Server processing deploy.◓  <SNIP> Server processing deploy..◐  Server processing deploy..◇  Deploy complete
mbostock commented 2 weeks ago

I don’t think we should add a command-line flag for this. We should just fix #1447 by checking for a TTY before showing the spinner.