Commit Graph

6 Commits

Author SHA1 Message Date
Graeme Pyle
e63ac7c071 Prevent REPL from stomping global._ (Underscore library)
The return value of last command is stored in global._ if the REPL is set to use the global context. So Underscore is no longer available to Meteor server code as global._

See http://stackoverflow.com/questions/10973968/underscore-doesnt-work-in-coffeescripts-console
2014-12-04 16:23:58 +02:00
Ben Newman
b45bc06fff Catch shell socket server errors so they don't break self-test. 2014-10-21 17:49:16 -04:00
Ben Newman
a776715dae Never print a stack trace when unlinkSocketFile fails. 2014-10-20 20:09:24 -04:00
Ben Newman
2926fdafab Tweak wording of meteor shell banner message. 2014-10-20 15:49:34 -04:00
Ben Newman
17138b0805 Remove an inaccurate comment and add a potentially helpful comment. 2014-10-20 15:05:44 -04:00
Ben Newman
830acf651c Implement a meteor shell command.
Summary:
Invoking `meteor shell` starts an interactive REPL for evaluating server-side code.

Shell commands are evaluated in the server process, so the shell's input and output have to be piped through a socket from/to the parent process that runs the `meteor shell` command. This separation accounts for most of the complexity of this diff, but the end result is pretty seamless: tab completion, history, ctlr-c and ctrl-d, etc. all work as expected.

Task: https://app.asana.com/0/15750483766338/16576093991355

Test Plan: Run `meteor run` in one terminal and `meteor shell` in another, evaluate some commands, and verify that the commands seem to be running the context of the server process. Also check tab completion and history, and ensure that the server is running simultaneously with the shell.

Reviewers: dgreenspan, avital, slava, emily, nim, sashko

CC: sashko

Differential Revision: https://phabricator.meteor.com/D837
2014-10-20 14:44:09 -04:00