Skip to content

Commit 90e779b

Browse files
authored
Merge pull request #13 from webos-tools/develop
Integrated CLI commands for the Apollo platform
2 parents 606ebad + bb33857 commit 90e779b

39 files changed

Lines changed: 679 additions & 49 deletions

CHANGELOG.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
2+
## 3.1.2 (August 07, 2024)
3+
### ares-config
4+
* Added a new apollo profile for apollo platform.
5+
6+
### common
7+
* Integrated CLI commands for apollo platform.
8+
9+
110
## 3.1.1 (July 15, 2024)
211
### ares-inspect
312
* Fixed a bug that ares-inspect --service display error message on webOS TV 4.5 or lower
@@ -11,7 +20,7 @@
1120
* Enhance usability of --add option.
1221
* Enhance emulator remove usability
1322
* Change default device information of TV profile (user: prisoner, port:9922)
14-
* Change devie name validation logic that accepts all characters except "$" & "%"
23+
* Change device name validation logic that accepts all characters except "$" & "%"
1524

1625
### common
1726
* Upgrade node modules: shelljs(v0.8.5), async(v3.2.5), ssh2(v1.15.0), tar(v6.2.0).

README.md

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99
We are releasing a single CLI that supports both webOS OSE and webOS TV through this released CLI (v3.0.0). You can switch to CLI for OSE or TV by installing one CLI and changing only the profile. For more details, see [Profile Settings](#profile-settings).
1010

11+
From the released CLI (v3.1.2) we integrated CLI commands for webOS APOLLO. You can switch to CLI for APOLLO by changing only the profile to apollo.
12+
1113
## Installation
1214

1315
> [!IMPORTANT]
@@ -36,7 +38,7 @@ $ npm install -g @webos-tools/cli
3638
3739
## Profile Settings
3840

39-
You can change the profile to `tv` or `ose`. The default profile is `tv` (webOS TV).
41+
You can change the profile to `tv`, `ose` or `apollo`. The default profile is `tv` (webOS TV).
4042

4143
``` shell
4244
$ ares-config --profile ose
@@ -58,23 +60,23 @@ If you want to use previous version of CLI, check the compatibility table for ea
5860

5961
The following table shows a list supported commands. For more details, refer to user guides in [Documentation](#documentation).
6062

61-
| Command | Description | OSE | TV |
62-
|-------------------|--------------------------------------------------------------------------------|:---:|:--:|
63-
| ares-config | Configures webOS CLI. | v | v |
64-
| ares | Displays the help information for ares commands. | v | v |
65-
| ares-generate | Creates a webOS app or service from templates. | v | v |
66-
| ares-package | Packages the app or services into a package file. | v | v |
67-
| ares-setup-device | Manages the target devices. | v | v |
68-
| ares-novacom | Command Line Tool to control the device. | | v |
69-
| ares-install | Installs the app or service on the target device. | v | v |
70-
| ares-launch | Launches or terminates the app. | v | v |
71-
| ares-inspect | Enables Web Inspector or Node's Inspector for debugging web app or JS service. | v | v |
72-
| ares-server | Runs the Web server for testing local app file. | v | v |
73-
| ares-shell | Executes shell commands in the target device. | v | |
74-
| ares-push | Pushes file(s) from a host machine to a target device. | v | |
75-
| ares-pull | Pulls file(s) from a target device to a host machine. | v | |
76-
| ares-device | Displays the device information. | v | v |
77-
| ares-log | Shows or saves logs of webOS apps and services. | v | |
63+
| Command | Description | OSE | TV | APOLLO |
64+
|-------------------|--------------------------------------------------------------------------------|:---:|:--:|:------:|
65+
| ares-config | Configures webOS CLI. | v | v | v |
66+
| ares | Displays the help information for ares commands. | v | v | v |
67+
| ares-generate | Creates a webOS app or service from templates. | v | v | v |
68+
| ares-package | Packages the app or services into a package file. | v | v | v |
69+
| ares-setup-device | Manages the target devices. | v | v | v |
70+
| ares-novacom | Command Line Tool to control the device. | | v | |
71+
| ares-install | Installs the app or service on the target device. | v | v | v |
72+
| ares-launch | Launches or terminates the app. | v | v | v |
73+
| ares-inspect | Enables Web Inspector or Node's Inspector for debugging web app or JS service. | v | v | v |
74+
| ares-server | Runs the Web server for testing local app file. | v | v | v |
75+
| ares-shell | Executes shell commands in the target device. | v | | v |
76+
| ares-push | Pushes file(s) from a host machine to a target device. | v | | v |
77+
| ares-pull | Pulls file(s) from a target device to a host machine. | v | | v |
78+
| ares-device | Displays the device information. | v | v | v |
79+
| ares-log | Shows or saves logs of webOS apps and services. | v | | v |
7880

7981
## Documentation
8082

@@ -215,4 +217,4 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
215217
See the License for the specific language governing permissions and
216218
limitations under the License.
217219

218-
SPDX-License-Identifier: Apache-2.0
220+
SPDX-License-Identifier: Apache-2.0

bin/ares-config.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,17 +78,20 @@ const options = {
7878

7979
const configFiles = {
8080
"ose": "files/conf-base/profile/config-ose.json",
81-
"tv": "files/conf-base/profile/config-tv.json"
81+
"tv": "files/conf-base/profile/config-tv.json",
82+
"apollo": "files/conf-base/profile/config-apollo.json"
8283
};
8384

8485
const envFiles = {
8586
"ose": "files/conf-base/env/sdk-ose.json",
86-
"tv": "files/conf-base/env/sdk-tv.json"
87+
"tv": "files/conf-base/env/sdk-tv.json",
88+
"apollo": "files/conf-base/env/sdk-apollo.json"
8789
};
8890

8991
const templateFiles = {
9092
"ose": "files/conf-base/template-conf/ose-templates.json",
9193
"tv": "files/conf-base/template-conf/tv-sdk-templates.json",
94+
"apollo": "files/conf-base/template-conf/apollo-sdk-templates.json"
9295
};
9396

9497
const queryPaths = {
@@ -196,4 +199,4 @@ function finish(err, value) {
196199
}
197200
cliControl.end();
198201
}
199-
}
202+
}

bin/ares-device.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ function deviceList() {
141141
}
142142

143143
function getDeviceInfo() {
144-
if (curConfigData.profile === "ose") {
144+
if (curConfigData.profile === "ose"|| curConfigData.profile === "apollo") {
145145
deviceLib.systemInfo(options, finish);
146146
} else if (curConfigData.profile === "tv") {
147147
deviceLib.tvSystemInfo(options, finish);
@@ -188,7 +188,7 @@ function getResourceMonitor() {
188188
}
189189

190190
function captureScreen() {
191-
if (curConfigData.profile !== "ose") {
191+
if ( !["ose", "apollo"].includes(curConfigData.profile)) {
192192
return finish(errHndl.getErrMsg("NOT_SUPPORT_OPTION", curConfigData.profile));
193193
}
194194
deviceLib.captureScreen(options, finish);

bin/ares-log.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ log.level = argv.level || 'warn';
102102
log.verbose("argv", argv);
103103

104104
const curConfigData = appdata.getConfig(true);
105-
if (curConfigData.profile !== "ose") {
105+
if (!["ose","apollo"].includes(curConfigData.profile)) {
106106
return finish(errHndl.getErrMsg("NOT_SUPPORT_COMMOND", curConfigData.profile));
107107
}
108108

@@ -194,6 +194,10 @@ function checkCurrentDaemon() {
194194
function switchDaemon() {
195195
log.info("switchDaemon()");
196196

197+
if (curConfigData.profile === "apollo") {
198+
return finish(errHndl.getErrMsg("NOT_SUPPORT_OPTION", curConfigData.profile));
199+
}
200+
197201
if (argv['switch-daemon'] !== "journald" && argv['switch-daemon'] !== "pmlogd") {
198202
return finish(errHndl.getErrMsg("NOT_EXIST_LOGDAEMON"));
199203
}
@@ -252,4 +256,4 @@ function finish(err, value) {
252256
}
253257
cliControl.end();
254258
}
255-
}
259+
}

bin/ares-pull.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ if (argv.level) {
7575
}
7676

7777
const curConfigData = appdata.getConfig(true);
78-
if (curConfigData.profile !== "ose") {
78+
if (curConfigData.profile !== "ose" && curConfigData.profile !== "apollo") {
7979
return finish(errHndl.getErrMsg("NOT_SUPPORT_COMMOND", curConfigData.profile));
8080
}
8181

bin/ares-push.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ if (argv.level) {
7575
}
7676

7777
const curConfigData = appdata.getConfig(true);
78-
if (curConfigData.profile !== "ose") {
78+
if (!["ose", "apollo"].includes(curConfigData.profile)) {
7979
return finish(errHndl.getErrMsg("NOT_SUPPORT_COMMOND", curConfigData.profile));
8080
}
8181

bin/ares-shell.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ log.level = argv.level || 'warn';
5454
log.verbose("argv", argv);
5555

5656
const curConfigData = appdata.getConfig(true);
57-
if (curConfigData.profile !== "ose") {
57+
if (!["ose", "apollo"].includes(curConfigData.profile)) {
5858
return finish(errHndl.getErrMsg("NOT_SUPPORT_COMMOND", curConfigData.profile));
5959
}
6060

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"SDKPATH_ENV_NAME": "LG_WEBOS_APOLLO_SDK_HOME",
3+
"BROWSER_PATH_IN_SDK": {
4+
"win32": "/IDE/chromium/chrome.exe",
5+
"darwin": "/IDE/chromium/Chromium.app",
6+
"linux": "/IDE/chromium/chrome"
7+
}
8+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"profile": "apollo",
3+
"defaultAppInfo": {
4+
"id": "com.yourdomain.app",
5+
"type": "web",
6+
"title": "new app",
7+
"version": "1.0.0",
8+
"main": {
9+
"web": "index.html",
10+
"native": "executable"
11+
}
12+
},
13+
"defaultDeviceInfo": {
14+
"ipAddress": "127.0.0.1",
15+
"port": "22",
16+
"user": "root",
17+
"description": "new device description",
18+
"files": "stream",
19+
"default": false
20+
},
21+
"logFilePath": "/media/developer/log/devlog",
22+
"install": {
23+
"tempDirForIpk": "/media/developer/temp",
24+
"changeTempDir": true,
25+
"removeIpkAfterInst": true
26+
},
27+
"dataDir":".webos/apollo",
28+
"logDaemon": "journald"
29+
}

0 commit comments

Comments
 (0)