Skip to content
  • Renée Kooi's avatar
    Console panel (#468) · 91826ab7
    Renée Kooi authored
    <!--
    Thanks for creating a Pull Request 😄 ! Before you submit, please read the following:
    - Read our CONTRIBUTING.md file before submitting a patch.
    - By making a contribution, you agree to our Developer Certificate of Origin.
    -->
    
    This is a 🙋 feature
    
    <!-- Provide a general summary of the changes in the title above -->
    
    This implements the 2nd panel for `bankai start`, showing console output from the server rendered app (don't know if there's anything else?).
    
    SSR uses a separate Console instance, injected as a global `console` variable using [require-with-global](https://github.com/goto-bus-stop/require-with-global). That `console` writes to a stream which is saved by lib/ui.js. Pressing 2 in the `bankai start` TUI will switch to the console panel, which is an [ansi-scrollbox](https://github.com/goto-bus-stop/ansi-scrollbox) that renders the saved console output. ansi-scrollbox still needs more features and optimization (it's currently probably very slow for many thousands of lines) but it does sort of work.
    
    ## Checklist
    <!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->
    - [ ] tests pass
    - [ ] tests and/or benchmarks are included
    - [ ] documentation is changed or added
    
    ## Semver Changes
    Minor
    91826ab7