Previously, the width (or "columns") for the readline shell was being obtained on the server. This causes problems for clients which are connecting to the server which are sized differently.
The client will still have problems if they resize AFTER they are connected to the REPL, but at least they have the option of being a different size.
A more complete solution would be to have the client listen on process.stdout "resize" and pass that to the server when it occurs, but I'm not sure of an easy way to do that with the current communication (perhaps pause-reconfigure-unpause?).
Fixesmeteor/meteor#5346
This will make it much easier to fix bugs and make improvements going
forward, since they won't have to wait for the next release of Meteor.
One functional change: when the parent process exits, it no longer forces
all connected shell clients to disconnect, which is actually a more
convenient behavior, because it gives the clients a chance to reconnect
when/if the server starts up again, and it's easy enough to kill the
clients if that's what you want.
This commit makes possible but but doesn't fully solve the problem of
using `meteor shell` within shell scripts. See #5055 for more
details.
Closes#5056
Since this file ends up getting copied into the server bundle, along with
files like boot.js, it makes sense to keep it with those files.
Renamed tools/shell/client.js to tools/shell-client.js for symmetry.