Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add TerminalReporter events for outputting server logs and menus
Summary: Introduces new event types in Metro's TerminalReporter, intended for a host dev server to append logs via Metro (in particular, leveraging the internal `Terminal` API to safely display logs without colliding with bundler progress output). - `unstable_server_log`: Allows the server to emit a log message at various `level`s. Mirrors the design of `client_log`. - `unstable_server_menu_updated`: Allows the server to present/update a menu (a persistent item / interactive status line) below all other streamed output. For now, the specialised term "menu" fits well and is descriptive (I'd imagine we introduce specialised events for future flavours of persistent status). - `unstable_server_menu_cleared` This supports interactive debugger target selection in React Native. These simplified and generic event types and also will allow us to improve/align log handling to use Metro's `Terminal` abstraction in the open source dev server setup (both `dev-middleware` and `community-cli-plugin`). Changelog: ``` - **[Experimental]**: Add `unstable_server_log`, `unstable_server_menu_updated`, and `unstable_server_menu_cleared` reporter events ``` Reviewed By: hoxyq Differential Revision: D63255296 fbshipit-source-id: 9278f19fb4e6eb2b8fd0bb267f2321d52b32bb7c
- Loading branch information