@webos-tools/cli 3.0.3 → 3.0.4
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.
- package/CHANGELOG.md +5 -0
- package/lib/base/cli-appdata.js +1 -12
- package/npm-shrinkwrap.json +2 -2
- package/package.json +4 -1
- package/scripts/postinstall.js +24 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
## 3.0.4 (March 30, 2024)
|
|
2
|
+
### Common
|
|
3
|
+
* Fixed a bug that always requires sudo permission when exec ares commands
|
|
4
|
+
|
|
5
|
+
|
|
1
6
|
## 3.0.3 (March 29, 2024)
|
|
2
7
|
### ares-setup-device
|
|
3
8
|
* Fixed a bug that the ares-setup-device of existing TV CLI is not working, after adding new target from CLI v3.0.2. If error is occurs again, please reset device list via "ares-setup-device -R" and add it again.
|
package/lib/base/cli-appdata.js
CHANGED
|
@@ -101,18 +101,7 @@ const Cli = (function() {
|
|
|
101
101
|
if (this.config.simulatorConfig) {
|
|
102
102
|
this.simulatorConfigPath = path.join(workDir, this.config.simulatorConfig);
|
|
103
103
|
}
|
|
104
|
-
|
|
105
|
-
// grant -rw permission to configuration files in case of installing with root on [macos, linux]
|
|
106
|
-
try {
|
|
107
|
-
if (["darwin", "linux"].includes(process.platform)) {
|
|
108
|
-
shelljs.exec(`sudo chmod 777 ${path.join(__dirname, "../../files/conf")}`);
|
|
109
|
-
shelljs.exec(`sudo chmod 666 ${path.join(__dirname, "../../files/conf", "query/*")}`);
|
|
110
|
-
shelljs.exec(`sudo chmod 666 ${this.configFile}`);
|
|
111
|
-
shelljs.exec(`sudo chmod 666 ${this.deviceListFile}`);
|
|
112
|
-
}
|
|
113
|
-
} catch (error) {
|
|
114
|
-
log.verbose("cli-appdata#init()", "error when give -rw permission for config files", error);
|
|
115
|
-
}
|
|
104
|
+
|
|
116
105
|
return true;
|
|
117
106
|
}
|
|
118
107
|
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webos-tools/cli",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.4",
|
|
4
4
|
"lockfileVersion": 2,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@webos-tools/cli",
|
|
9
|
-
"version": "3.0.
|
|
9
|
+
"version": "3.0.4",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"os": [
|
|
12
12
|
"darwin",
|
package/package.json
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webos-tools/cli",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.4",
|
|
4
4
|
"description": "Command Line Interface for development webOS application and service",
|
|
5
5
|
"main": "APIs.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"postinstall": "[ \"$OSTYPE\" != \"msys\" ] && [ \"$OSTYPE\" != \"cygwin\" ] && [ \"$OSTYPE\" != \"win32\" ] && node scripts/postinstall.js"
|
|
8
|
+
},
|
|
6
9
|
"author": "ye.kim",
|
|
7
10
|
"repository": {
|
|
8
11
|
"type": "git",
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
const fs = require('fs');
|
|
3
|
+
const path = require('path');
|
|
4
|
+
|
|
5
|
+
if (process.platform === 'darwin' || process.platform === 'linux') {
|
|
6
|
+
const confPath = path.resolve('files/conf');
|
|
7
|
+
const files = [
|
|
8
|
+
path.join(confPath, 'ares.json'),
|
|
9
|
+
path.join(confPath, 'command-service.json'),
|
|
10
|
+
path.join(confPath, 'config.json'),
|
|
11
|
+
path.join(confPath, 'ipk.json'),
|
|
12
|
+
path.join(confPath, 'novacom-devices.json'),
|
|
13
|
+
path.join(confPath, 'sdk.json'),
|
|
14
|
+
path.join(confPath, 'template.json'),
|
|
15
|
+
path.join(confPath, 'query/query-app.json'),
|
|
16
|
+
path.join(confPath, 'query/query-hosted.json'),
|
|
17
|
+
path.join(confPath, 'query/query-package.json'),
|
|
18
|
+
path.join(confPath, 'query/query-service.json')
|
|
19
|
+
];
|
|
20
|
+
|
|
21
|
+
files.forEach(file => {
|
|
22
|
+
fs.chmodSync(file, 0o666);
|
|
23
|
+
});
|
|
24
|
+
}
|