From 8be8b18e217522ac3d62573632196a825afe040a Mon Sep 17 00:00:00 2001 From: Mykola Bilochub Date: Mon, 22 May 2017 14:15:54 +0300 Subject: [PATCH] cli: fix crush on event reception PR-URL: https://github.com/metarhia/JSTP/pull/173 Reviewed-By: Denys Otrishko --- tools/cli.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/cli.js b/tools/cli.js index 1599f91..2bfcd44 100755 --- a/tools/cli.js +++ b/tools/cli.js @@ -198,8 +198,10 @@ commandProcessor.connect = ( state.connection = connection; state.api = filterApiCompletions(api); // TODO: make event registering generic - connection.on('event', (data) => { - log(`Received remote event: ${jstp.stringify(data)}`); + connection.on('event', (event) => { + log(`Received remote event '${event.remoteEventName}'` + + ` in interface '${event.interfaceName}':` + + ` ${jstp.stringify(event.remoteEventArgs)}`); }); callback(); }