Skip to content

Commit

Permalink
Version 2.2.3
Browse files Browse the repository at this point in the history
GitOrigin-RevId: 9cc4bc5268488fdbc839b8d1c2d0c8f6f6d598a0
  • Loading branch information
Interfaced authored and l1bbcsg committed Feb 4, 2020
1 parent 1bfa523 commit a2b2bf1
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 10 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## 2.2.3 (03.02.2020)
* Fix `inspect` command producing unnecessary uncontrollable logs.

## 2.2.2 (03.02.2020)
* Support ZombieBox 2.6
* Better logging and output
Expand Down
18 changes: 11 additions & 7 deletions cli/ares.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,21 +114,25 @@ async function launch(toolsDir, appId, deviceName) {
* @param {string} toolsDir
* @param {string} appId
* @param {string} deviceName
* @return {Promise}
* @return {Promise<string>}
*/
async function inspect(toolsDir, appId, deviceName) {
const executable = getExecutable(toolsDir, 'ares-inspect');

const subprocess = execa(
executable,
['-d', deviceName, appId],
{
all: true
}
['-d', deviceName, appId]
);

subprocess.stdout.pipe(process.stdout);
await subprocess;
return new Promise((resolve) => {
subprocess.stdout.on('data', (chunk) => {
const line = chunk.toString();
const urlMarker = 'Application Debugging - ';
if (line.startsWith(urlMarker)) {
resolve(line.slice(urlMarker.length).trim());
}
});
});
}


Expand Down
5 changes: 4 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,8 @@ class PlatformWebOS extends AbstractPlatform {
},
async ({device, appId}) => {
logger.verbose(`Starting ${appId} on ${device} with inspector`);
await inspect(toolsDir, appId, device);
const debuggerUrl = await inspect(toolsDir, appId, device);
logger.output(`Debugger url: ${debuggerUrl}`);
}
)
.command(
Expand Down Expand Up @@ -244,6 +245,8 @@ class PlatformWebOS extends AbstractPlatform {
logger.error(error.toString());
logger.debug(error.stack);
}

yargs.showHelp();
process.exit(1);
});
}
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "zombiebox-platform-webos",
"description": "LG webOS Smart TV support abstraction layer for ZombieBox framework",
"version": "2.2.2",
"version": "2.2.3",
"license": "MIT",
"author": "Interfaced (https://interfaced.tv)",
"homepage": "https://github.com/interfaced/zombiebox-platform-webos",
Expand Down

0 comments on commit a2b2bf1

Please sign in to comment.