homebridge-melcloud-control 4.4.1-beta.28 → 4.4.1-beta.29
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/package.json +2 -3
- package/src/functions.js +11 -11
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"displayName": "MELCloud Control",
|
|
3
3
|
"name": "homebridge-melcloud-control",
|
|
4
|
-
"version": "4.4.1-beta.
|
|
4
|
+
"version": "4.4.1-beta.29",
|
|
5
5
|
"description": "Homebridge plugin to control Mitsubishi Air Conditioner, Heat Pump and Energy Recovery Ventilation.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "grzegorz914",
|
|
@@ -40,8 +40,7 @@
|
|
|
40
40
|
"axios": "^1.13.2",
|
|
41
41
|
"express": "^5.2.1",
|
|
42
42
|
"puppeteer": "^24.33.0",
|
|
43
|
-
"ws": "^8.18.3"
|
|
44
|
-
"crypto": "^1.0.1"
|
|
43
|
+
"ws": "^8.18.3"
|
|
45
44
|
},
|
|
46
45
|
"keywords": [
|
|
47
46
|
"homebridge",
|
package/src/functions.js
CHANGED
|
@@ -88,10 +88,7 @@ class Functions extends EventEmitter {
|
|
|
88
88
|
|
|
89
89
|
/* ===================== macOS ===================== */
|
|
90
90
|
if (isMac) {
|
|
91
|
-
const macCandidates = [
|
|
92
|
-
'/Applications/Google Chrome.app/Contents/MacOS/Google Chrome',
|
|
93
|
-
'/Applications/Chromium.app/Contents/MacOS/Chromium'
|
|
94
|
-
];
|
|
91
|
+
const macCandidates = ['/Applications/Google Chrome.app/Contents/MacOS/Google Chrome', '/Applications/Chromium.app/Contents/MacOS/Chromium'];
|
|
95
92
|
for (const path of macCandidates) {
|
|
96
93
|
try {
|
|
97
94
|
await access(path, fs.constants.X_OK);
|
|
@@ -138,7 +135,6 @@ class Functions extends EventEmitter {
|
|
|
138
135
|
/* ===================== Linux ARM ===================== */
|
|
139
136
|
if (isLinux && isARM) {
|
|
140
137
|
const armCandidates = ['/usr/bin/chromium-browser', '/usr/bin/chromium', '/snap/bin/chromium'];
|
|
141
|
-
|
|
142
138
|
for (const path of armCandidates) {
|
|
143
139
|
try {
|
|
144
140
|
await access(path, fs.constants.X_OK);
|
|
@@ -151,8 +147,7 @@ class Functions extends EventEmitter {
|
|
|
151
147
|
if (!isDocker) {
|
|
152
148
|
try {
|
|
153
149
|
await execPromise('sudo apt update -y');
|
|
154
|
-
await execPromise('sudo apt install -y chromium chromium-browser chromium-codecs-ffmpeg');
|
|
155
|
-
await execPromise('sudo apt install -y libnspr4 libnss3 libx11-6 libxcomposite1 libxdamage1 libxrandr2 libatk1.0-0 libcups2 libdrm2 libgbm1 libasound2');
|
|
150
|
+
await execPromise('sudo apt install -y chromium chromium-browser chromium-codecs-ffmpeg libnspr4 libnss3 libx11-6 libxcomposite1 libxdamage1 libxrandr2 libatk1.0-0 libcups2 libdrm2 libgbm1 libasound2');
|
|
156
151
|
} catch (error) {
|
|
157
152
|
if (this.logError) this.emit('error', `Install package for Linux ARM error: ${error}`);
|
|
158
153
|
}
|
|
@@ -192,13 +187,18 @@ class Functions extends EventEmitter {
|
|
|
192
187
|
if (isDocker) {
|
|
193
188
|
try {
|
|
194
189
|
await execPromise('apt update -y && apt install -y chromium');
|
|
195
|
-
await access('/usr/bin/chromium', fs.constants.X_OK);
|
|
196
|
-
result.path = '/usr/bin/chromium';
|
|
197
|
-
result.system = 'Linux Docker';
|
|
198
|
-
return result;
|
|
199
190
|
} catch (error) {
|
|
200
191
|
if (this.logError) this.emit('error', `Install package for Linux Docker error: ${error}`);
|
|
201
192
|
}
|
|
193
|
+
|
|
194
|
+
for (const path of linuxCandidates) {
|
|
195
|
+
try {
|
|
196
|
+
await access(path, fs.constants.X_OK);
|
|
197
|
+
result.path = path;
|
|
198
|
+
result.system = 'Linux Docker';
|
|
199
|
+
return result;
|
|
200
|
+
} catch { }
|
|
201
|
+
}
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
204
|
|