refactor-864370: REBASE small changed
output-901602: Have Output.promise resolve with itself

Previously there was a nasty thing where requisition.exec() returned an
output object, directly. output.promise resolved when the command was
complete, but with undefined, and the data stored on the output object.
This was for historical reasons, but now output.promise resolves with
itself, and all uses of requisition.exec() use the output object using
the 'then' function rather than directly in the return value.

Signed-off-by: Joe Walker <jwalker@mozilla.com>
refactor-864370: Move server/index into gcli.js

No need for Mozilla review.

Signed-off-by: Joe Walker <jwalker@mozilla.com>
output-901602: exec should return a promise not an output

Now that output.promise resolves with itself, we can return a promise
directly from requisition.exec()

Signed-off-by: Joe Walker <jwalker@mozilla.com>
output-901602: Don't reject output on error - resolve

Previously when a command failed it rejected the promise, since the
bot reject and resolve both used an Output object, and the Output object
contained an error field we don't need reject, and it's actually
annoying because we generally want to do that same thing (i.e. display
the data) both ways.

Signed-off-by: Joe Walker <jwalker@mozilla.com>
refactor-864370: Simplify NodeJS start script

No need for Mozilla review. Basic tidy up of top level gcli.js

Signed-off-by: Joe Walker <jwalker@mozilla.com>
jshint-901598: Fix JSHint issues

Signed-off-by: Joe Walker <jwalker@mozilla.com>
refactor-864370: Remove functions unused GCLI web

Signed-off-by: Joe Walker <jwalker@mozilla.com>
shortparam-659269: Add basic support for short parameters

Turned out to be as easy as updating isKnownAs to recognise the short
version of a parameter, and adding parts to pass the 'short' property
around.

Signed-off-by: Joe Walker <jwalker@mozilla.com>
shortparam-659269: Add unit tests for short params

Signed-off-by: Joe Walker <jwalker@mozilla.com>
shortparam-659269: Add short params to connect command

Signed-off-by: Joe Walker <jwalker@mozilla.com>
shortparam-659269: Display short params in help output

Signed-off-by: Joe Walker <jwalker@mozilla.com>
refactor-864370: null protect valueEquals

Previously, conversion.valueEquals wasn't null-safe (i.e.
conversion.valueEquals(null) would fail) so callers would have to null
check. This moves the check into valueEquals and simplifies a calling
site in requisition._setAssignmentInternal.

Signed-off-by: Joe Walker <jwalker@mozilla.com>
refactor-864370: null protect assignment.conversion

assignment.conversion can be null, so check for that before using it.

Signed-off-by: Joe Walker <jwalker@mozilla.com>
multiparam-903852: Prevent parameters being specified twice

Previously we wouldn't complain at >> git commit -m "first" -m "second"
But now we will.

Signed-off-by: Joe Walker <jwalker@mozilla.com>
shortparam-659269: Add checks for duplicate short params

You can't have 2 parameters with the same short version. This enforces
that check.

Signed-off-by: Joe Walker <jwalker@mozilla.com>
refactor-864370: Move UP/DOWN/ENTER/TAB into functions

Inputter had a large handleKeyUp() function that needed breaking down.
This does that, and it does a minor adjustment to the TAB case by moving
the _complete.then handler inside the 'if' check for action. Since
_complete is setup inside this 'if' we shouldn't use it outside.

Signed-off-by: Joe Walker <jwalker@mozilla.com>
nodeinout-796921: Extract createEmptyNodeList

We're going to need this in more place than one, so make it a function
in gcli/util.

Signed-off-by: Joe Walker <jwalker@mozilla.com>
nodeinout-796921: Fire onLeave/onEnter/onChange events

Inputter will now keep an type in an assignment up to date with the
values in the thing pointed to by the cursor.

Signed-off-by: Joe Walker <jwalker@mozilla.com>
nodeinout-796921: Add enter/leave/change support to node type

This makes NodeType and NodeListType support the onEnter, onLeave and
onChange events to call into a revised host.Highlighter class to
highlight the selected nodes as they are typed.

Something in this change breaks the tests being run in PhantomJS, but
they still work fine in Chrome and Firefox, so I'm assuming the problem
is with Phantom, and not running the test there.

Signed-off-by: Joe Walker <jwalker@mozilla.com>