@camera.ui/camera-ui-homekit 0.0.29 → 0.0.31

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/bundle.zip CHANGED
Binary file
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "displayName": "HomeKit",
3
3
  "name": "@camera.ui/camera-ui-homekit",
4
- "version": "0.0.29",
4
+ "version": "0.0.31",
5
5
  "description": "camera.ui homekit plugin",
6
6
  "author": "seydx (https://github.com/seydx/camera.ui)",
7
7
  "main": "./dist/index.js",
8
8
  "type": "commonjs",
9
9
  "scripts": {
10
10
  "build": "rimraf dist && tsc",
11
- "bundle": "npm run format && npm run lint && npm run build && cui bundle",
11
+ "bundle": "npm run format && npm run lint && npm run build && cui bundle && copyfiles -u 1 scripts/* bundle/scripts",
12
12
  "format": "prettier --write \"src/\" --ignore-unknown --no-error-on-unmatched-pattern",
13
13
  "install-updates": "npm i --save",
14
14
  "lint": "eslint .",
@@ -0,0 +1,17 @@
1
+ const { execSync } = require('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
+ }