Support for providing commands to run from external source
I've implemented a minor, but useful enhancement to react-console, which allows an input command to be provided from an external source, through a new public method "handleInput(commandText:string)". This makes it possible to do things like add other input elements (e.g. button, anchor) that when interacted with run a command. It also makes it possible to "script" a sequence of inputs, without requiring user interaction.
To the extent possible, I have preserved the existing structure and style of the original code. There were not existing automated unit tests to update for this project, but I've tested this manually with a variety of use cases and to ensure that existing behavior continues to work as expected. No changes to the props/state of the ReactConsole component were needed. The new functionality works with existing history mechanisms as well as input validation.