diff --git a/lively.shell/client-command.js b/lively.shell/client-command.js index fa5aed6c5f..d323625117 100644 --- a/lively.shell/client-command.js +++ b/lively.shell/client-command.js @@ -4,6 +4,9 @@ import { signal } from 'lively.bindings'; let debug = false; +let _commands; +_commands = _commands || []; + export default class ClientCommand extends CommandInterface { static installLively2LivelyServices (l2lClient) { Object.keys(L2LServices).forEach(name => // eslint-disable-line no-use-before-define @@ -11,6 +14,10 @@ export default class ClientCommand extends CommandInterface { async (tracker, msg, ackFn) => L2LServices[name](tracker, msg, ackFn))); // eslint-disable-line no-use-before-define } + static get commands () { + return _commands; + } + constructor (l2lClient) { super(); this.debug = debug; diff --git a/lively.shell/server-command.js b/lively.shell/server-command.js index 4abbdf7bb7..731735d621 100644 --- a/lively.shell/server-command.js +++ b/lively.shell/server-command.js @@ -50,6 +50,9 @@ function pkillKill (pid, signal, thenDo) { }); } +let _commands; +_commands = _commands || []; + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- // var c = new Command(); // c.spawn({command: "ls"}) @@ -61,6 +64,10 @@ export default class ServerCommand extends CommandInterface { async (tracker, msg, ackFn) => L2LServices[name](tracker, msg, ackFn))); // eslint-disable-line no-use-before-define } + static get commands () { + return _commands; + } + constructor () { super(); this.debug = debug;