@webos-tools/cli 3.1.1 → 3.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/CHANGELOG.md +173 -157
  2. package/LICENSES/342/200/216/LicenseRef-3rd_party_licenses.txt +1355 -0
  3. package/README.md +21 -19
  4. package/bin/ares-config.js +6 -3
  5. package/bin/ares-device.js +2 -2
  6. package/bin/ares-log.js +6 -2
  7. package/bin/ares-pull.js +1 -1
  8. package/bin/ares-push.js +1 -1
  9. package/bin/ares-setup-device.js +573 -528
  10. package/bin/ares-shell.js +1 -1
  11. package/bin/ares.js +1 -1
  12. package/files/conf/ares.json +5 -5
  13. package/files/conf/novacom-devices.json +18 -1
  14. package/files/conf-base/env/sdk-apollo.json +8 -0
  15. package/files/conf-base/profile/config-apollo.json +29 -0
  16. package/files/conf-base/profile/config-ose.json +1 -1
  17. package/files/conf-base/template-conf/apollo-sdk-templates.json +56 -0
  18. package/files/help/ares-config.help +6 -1
  19. package/files/help/ares-device.help +15 -0
  20. package/files/help/ares-generate.help +27 -1
  21. package/files/help/ares-inspect.help +6 -0
  22. package/files/help/ares-install.help +5 -0
  23. package/files/help/ares-launch.help +5 -0
  24. package/files/help/ares-server.help +5 -0
  25. package/files/help/ares-setup-device.help +40 -0
  26. package/files/help/ares.help +5 -0
  27. package/files/schema/NovacomDevices.schema +2 -1
  28. package/files/templates/apollo-sdk-templates/appinfo/appinfo.json +10 -0
  29. package/files/templates/apollo-sdk-templates/bootplate-web/index.html +88 -0
  30. package/files/templates/apollo-sdk-templates/hosted-webapp/index.html +14 -0
  31. package/files/templates/apollo-sdk-templates/icon/icon.png +0 -0
  32. package/files/templates/apollo-sdk-templates/js-service/helloclient.js +31 -0
  33. package/files/templates/apollo-sdk-templates/js-service/helloworld_webos_service.js +188 -0
  34. package/files/templates/apollo-sdk-templates/native-service/CMakeLists.txt +72 -0
  35. package/files/templates/apollo-sdk-templates/native-service/services.json +11 -0
  36. package/files/templates/apollo-sdk-templates/native-service/src/main.c +144 -0
  37. package/files/templates/apollo-sdk-templates/serviceinfo/package.json +11 -0
  38. package/files/templates/apollo-sdk-templates/serviceinfo/services.json +8 -0
  39. package/lib/base/novacom.js +1 -1
  40. package/lib/base/setup-device.js +338 -335
  41. package/lib/device.js +1 -1
  42. package/lib/generator.js +408 -377
  43. package/lib/package.js +3 -1
  44. package/lib/shell.js +1 -1
  45. package/npm-shrinkwrap.json +9242 -9242
  46. package/package.json +100 -100
  47. package/sbom-info.yaml +1758 -0
  48. package/spec/jsSpecs/ares-config.spec.js +10 -0
  49. package/spec/jsSpecs/ares-generate.spec.js +4 -4
  50. package/spec/jsSpecs/ares-log.spec.js +1 -1
  51. package/spec/test_data/ares-generate.json +18 -1
  52. package/spec/test_data/ares.json +17 -0
  53. package/webos-tools-cli-3.1.3.tgz +0 -0
package/README.md CHANGED
@@ -8,6 +8,8 @@
8
8
 
9
9
  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).
10
10
 
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
+
11
13
  ## Installation
12
14
 
13
15
  > [!IMPORTANT]
@@ -36,7 +38,7 @@ $ npm install -g @webos-tools/cli
36
38
 
37
39
  ## Profile Settings
38
40
 
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).
40
42
 
41
43
  ``` shell
42
44
  $ ares-config --profile ose
@@ -58,23 +60,23 @@ If you want to use previous version of CLI, check the compatibility table for ea
58
60
 
59
61
  The following table shows a list supported commands. For more details, refer to user guides in [Documentation](#documentation).
60
62
 
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 |
78
80
 
79
81
  ## Documentation
80
82
 
@@ -215,4 +217,4 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
215
217
  See the License for the specific language governing permissions and
216
218
  limitations under the License.
217
219
 
218
- SPDX-License-Identifier: Apache-2.0
220
+ SPDX-License-Identifier: Apache-2.0
@@ -78,17 +78,20 @@ const options = {
78
78
 
79
79
  const configFiles = {
80
80
  "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"
82
83
  };
83
84
 
84
85
  const envFiles = {
85
86
  "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"
87
89
  };
88
90
 
89
91
  const templateFiles = {
90
92
  "ose": "files/conf-base/template-conf/ose-templates.json",
91
93
  "tv": "files/conf-base/template-conf/tv-sdk-templates.json",
94
+ "apollo": "files/conf-base/template-conf/apollo-sdk-templates.json"
92
95
  };
93
96
 
94
97
  const queryPaths = {
@@ -196,4 +199,4 @@ function finish(err, value) {
196
199
  }
197
200
  cliControl.end();
198
201
  }
199
- }
202
+ }
@@ -141,7 +141,7 @@ function deviceList() {
141
141
  }
142
142
 
143
143
  function getDeviceInfo() {
144
- if (curConfigData.profile === "ose") {
144
+ if (curConfigData.profile === "ose"|| curConfigData.profile === "apollo") {
145
145
  deviceLib.systemInfo(options, finish);
146
146
  } else if (curConfigData.profile === "tv") {
147
147
  deviceLib.tvSystemInfo(options, finish);
@@ -188,7 +188,7 @@ function getResourceMonitor() {
188
188
  }
189
189
 
190
190
  function captureScreen() {
191
- if (curConfigData.profile !== "ose") {
191
+ if ( !["ose", "apollo"].includes(curConfigData.profile)) {
192
192
  return finish(errHndl.getErrMsg("NOT_SUPPORT_OPTION", curConfigData.profile));
193
193
  }
194
194
  deviceLib.captureScreen(options, finish);
package/bin/ares-log.js CHANGED
@@ -102,7 +102,7 @@ log.level = argv.level || 'warn';
102
102
  log.verbose("argv", argv);
103
103
 
104
104
  const curConfigData = appdata.getConfig(true);
105
- if (curConfigData.profile !== "ose") {
105
+ if (!["ose","apollo"].includes(curConfigData.profile)) {
106
106
  return finish(errHndl.getErrMsg("NOT_SUPPORT_COMMOND", curConfigData.profile));
107
107
  }
108
108
 
@@ -194,6 +194,10 @@ function checkCurrentDaemon() {
194
194
  function switchDaemon() {
195
195
  log.info("switchDaemon()");
196
196
 
197
+ if (curConfigData.profile === "apollo") {
198
+ return finish(errHndl.getErrMsg("NOT_SUPPORT_OPTION", curConfigData.profile));
199
+ }
200
+
197
201
  if (argv['switch-daemon'] !== "journald" && argv['switch-daemon'] !== "pmlogd") {
198
202
  return finish(errHndl.getErrMsg("NOT_EXIST_LOGDAEMON"));
199
203
  }
@@ -252,4 +256,4 @@ function finish(err, value) {
252
256
  }
253
257
  cliControl.end();
254
258
  }
255
- }
259
+ }
package/bin/ares-pull.js CHANGED
@@ -75,7 +75,7 @@ if (argv.level) {
75
75
  }
76
76
 
77
77
  const curConfigData = appdata.getConfig(true);
78
- if (curConfigData.profile !== "ose") {
78
+ if (curConfigData.profile !== "ose" && curConfigData.profile !== "apollo") {
79
79
  return finish(errHndl.getErrMsg("NOT_SUPPORT_COMMOND", curConfigData.profile));
80
80
  }
81
81
 
package/bin/ares-push.js CHANGED
@@ -75,7 +75,7 @@ if (argv.level) {
75
75
  }
76
76
 
77
77
  const curConfigData = appdata.getConfig(true);
78
- if (curConfigData.profile !== "ose") {
78
+ if (!["ose", "apollo"].includes(curConfigData.profile)) {
79
79
  return finish(errHndl.getErrMsg("NOT_SUPPORT_COMMOND", curConfigData.profile));
80
80
  }
81
81