@camera.ui/camera-ui-homekit 0.0.8 → 0.0.9
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"displayName": "HomeKit",
|
|
3
3
|
"name": "@camera.ui/camera-ui-homekit",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.9",
|
|
5
5
|
"description": "camera.ui homekit plugin",
|
|
6
6
|
"author": "seydx (https://github.com/seydx/camera.ui)",
|
|
7
7
|
"main": "./dist/index.js",
|
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
"lint": "eslint --fix --ext .js,.ts .",
|
|
13
13
|
"update": "updates --update ./",
|
|
14
14
|
"install-updates": "npm i --save",
|
|
15
|
-
"prepublishOnly": "npm i --package-lock-only && npm run lint && npm run format && npm run build"
|
|
15
|
+
"prepublishOnly": "npm i --package-lock-only && npm run lint && npm run format && npm run build",
|
|
16
|
+
"postinstall": "node scripts/install-optional-deps.js"
|
|
16
17
|
},
|
|
17
18
|
"dependencies": {
|
|
18
19
|
"hap-nodejs": "^1.1.0",
|
|
@@ -20,13 +21,10 @@
|
|
|
20
21
|
"rxjs": "^7.8.1",
|
|
21
22
|
"werift": "^0.19.6"
|
|
22
23
|
},
|
|
23
|
-
"optionalDependencies": {
|
|
24
|
-
"chacha": "^2.1.0"
|
|
25
|
-
},
|
|
26
24
|
"devDependencies": {
|
|
27
25
|
"@camera.ui/types": "^0.0.57",
|
|
28
26
|
"@rushstack/eslint-patch": "^1.10.4",
|
|
29
|
-
"@types/node": "^22.4.
|
|
27
|
+
"@types/node": "^22.4.2",
|
|
30
28
|
"@types/ws": "^8.5.12",
|
|
31
29
|
"@typescript-eslint/eslint-plugin": "^8.2.0",
|
|
32
30
|
"@typescript-eslint/parser": "^8.2.0",
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { execSync } from 'child_process';
|
|
2
|
+
|
|
3
|
+
function isElectron() {
|
|
4
|
+
return process.env.CAMERA_UI_RUNMODE === 'electron';
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
if (isElectron()) {
|
|
8
|
+
console.log('Running in Electron environment. Installing chacha...');
|
|
9
|
+
try {
|
|
10
|
+
execSync('npm install chacha@^2.1.0', { stdio: 'inherit' });
|
|
11
|
+
console.log('chacha installed successfully.');
|
|
12
|
+
} catch (error) {
|
|
13
|
+
console.error('Failed to install chacha:', error);
|
|
14
|
+
}
|
|
15
|
+
} else {
|
|
16
|
+
console.log('Not running in Electron environment. Skipping chacha installation.');
|
|
17
|
+
}
|