Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e195a56739 | ||
|
|
d86a5385a8 | ||
|
|
3ce1265c8a | ||
|
|
c2bf551834 | ||
|
|
785a97721a | ||
|
|
05c9d98b61 | ||
|
|
9c26d9d8bb | ||
|
|
ad7d3fd3ff | ||
|
|
f666ed57ab | ||
|
|
c0b1a6e9ce | ||
|
|
19e51e349c | ||
|
|
5d012bd637 | ||
|
|
01c7411ddc | ||
|
|
3e4d96536f | ||
|
|
4bcb2c4e89 | ||
|
|
b2b87888e4 | ||
|
|
164ef2838c | ||
|
|
ae2633800d | ||
|
|
552f0e19a4 | ||
|
|
890c84d69d | ||
|
|
ac69dee387 | ||
|
|
ac62dc17ce | ||
|
|
f2f80e7d52 | ||
|
|
10e7ff078a | ||
|
|
e677fff160 | ||
|
|
63db26611e | ||
|
|
5ec6577b5a | ||
|
|
0359742e70 | ||
|
|
b70f4074e5 | ||
|
|
a4c300407b | ||
|
|
758f64ced4 | ||
|
|
7ab803d4ca | ||
|
|
092697850d | ||
|
|
422e92dd89 | ||
|
|
a15c0fc91d | ||
|
|
358fa3ca9c | ||
|
|
10722fa217 | ||
|
|
7267fafb97 | ||
|
|
b5e95936dc | ||
|
|
047b38a41b | ||
|
|
a93fbb2ad3 | ||
|
|
0b927a3ef6 | ||
|
|
d35cf27de9 |
@@ -0,0 +1 @@
|
||||
github: leukipp
|
||||
+45
-8
@@ -29,25 +29,62 @@ If you are running Linux with a graphical user interface (Wayland or X11), you s
|
||||
### HDMI
|
||||
| Device | System | Display | Status |
|
||||
| ------------------------- | -------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | ------ |
|
||||
| Raspberry Pi 4 (arm64) | Raspberry Pi OS (64-bit), Wayland, X11 | [LAFVIN 5" Touch Display (800x480)](https://www.amazon.de/gp/product/B0BWJ8YP7S) | 🟨 |
|
||||
| Raspberry Pi 4 (arm64) | Raspberry Pi OS (64-bit), Wayland, X11 | [Waveshare 8" CAPLCD (768x1024)](https://www.waveshare.com/wiki/8inch_768x1024_LCD) | 🟨 |
|
||||
| Raspberry Pi 4 (arm64) | Raspberry Pi OS (64-bit), Wayland, X11 | [Waveshare 7" 7EP-CAPLCD (1280x800)](https://www.waveshare.com/7ep-caplcd.htm) | 🟨 |
|
||||
| Raspberry Pi 4 (arm64) | Raspberry Pi OS (64-bit), Wayland, X11 | [LAFVIN Touch Display 5" (800x480)](https://www.amazon.de/gp/product/B0BWJ8YP7S) | 🟨 |
|
||||
| Raspberry Pi 4 (arm64) | Raspberry Pi OS (64-bit), Wayland, X11 | [Waveshare 7EP-CAPLCD 7" (1280x800)](https://www.waveshare.com/7ep-caplcd.htm) | 🟨 |
|
||||
| Raspberry Pi 4 (arm64) | Raspberry Pi OS (64-bit), Wayland, X11 | [Waveshare CAPLCD 8" (768x1024)](https://www.waveshare.com/wiki/8inch_768x1024_LCD) | 🟨 |
|
||||
| Raspberry Pi 4 (arm64) | Raspberry Pi OS (64-bit), Wayland, X11 | [Hannspree HT225 21.5" (1920x1080)](https://www.hannspree.eu/product/HT-225-HPB) | 🟨 |
|
||||
| Raspberry Pi 400 (arm64) | Raspberry Pi OS (64-bit), Wayland, X11 | [UPerfect Vertical Touch 15.6" (1920x1080)](https://uperfect.com/products/uperfect-y-vertical-monitor-15-6) | 🟨 |
|
||||
| Raspberry Pi CM 4 (arm64) | Raspberry Pi OS (64-bit), Wayland, X11 | [Lenovo ThinkCentre 23.8" (1920x1080)](https://psref.lenovo.com/Detail/ThinkCentre_Tiny_In_One_24_Gen_5?M=12NBGAT1EU) | 🟨 |
|
||||
| Raspberry Pi 5 (arm64) | Raspberry Pi OS (64-bit), Wayland, X11 | [GeeekPi 10.1" Capacitive Touch (1280x800)](https://www.amazon.nl/dp/B0DHV6DZC1) | 🟨 |
|
||||
| Raspberry Pi 5 (arm64) | Raspberry Pi OS (64-bit), Wayland, X11 | [Prechen Portable Touch 18.5" FHD (1920x1080)](https://www.amazon.de/dp/B0CT2KLDBQ) | 🟨 |
|
||||
| Raspberry Pi 5 (arm64) | Raspberry Pi OS (64-bit), Wayland, X11 | [Akntzcs Portable Touch 16" HD (1920x1200)](https://www.amazon.com/dp/B0CTGW6MQ6) | 🟨 |
|
||||
| Raspberry Pi 400 (arm64) | Raspberry Pi OS (64-bit), Wayland, X11 | [UPerfect Vertical Touch 15.6" (1920x1080)](https://uperfect.com/products/uperfect-y-vertical-monitor-15-6) | 🟨 |
|
||||
| Raspberry Pi 5 (arm64) | Raspberry Pi OS (64-bit), Wayland, X11 | [GeeekPi Capacitive Touch 10.1" (1280x800)](https://www.amazon.nl/dp/B0DHV6DZC1) | 🟨 |
|
||||
| Raspberry Pi 5 (arm64) | Raspberry Pi OS (64-bit), Wayland, X11 | [ELECROW Portable Monitor 10.1" (1280x800)](https://www.amazon.co.uk/dp/B0BHHQLKPY) | 🟨 |
|
||||
| Raspberry Pi 5 (arm64) | Raspberry Pi OS (64-bit), Wayland, X11 | [Waveshare Capacitive Touch 14" (2160x1440)](https://www.waveshare.com/14inch-2160x1440-lcd.htm) | 🟨 |
|
||||
| Raspberry Pi 5 (arm64) | Raspberry Pi OS (64-bit), Wayland, X11 | [Akntzcs Portable Touch HD 16" (1920x1200)](https://www.amazon.com/dp/B0CTGW6MQ6) | 🟨 |
|
||||
| Raspberry Pi 5 (arm64) | Raspberry Pi OS (64-bit), Wayland, X11 | [Prechen Portable Touch FHD 18.5" (1920x1080)](https://www.amazon.de/dp/B0CT2KLDBQ) | 🟨 |
|
||||
| Raspberry Pi 5 (arm64) | Raspberry Pi OS (64-bit), Wayland, X11 | Generic Non-Touch | 🟨 |
|
||||
| Generic PC (x64) | Debian KDE (64-bit), Wayland, X11 | Generic Non-Touch | 🟧 |
|
||||
| Generic PC (x64) | Ubuntu XFCE (64-bit), X11 | Generic Non-Touch | 🟧 |
|
||||
| Generic PC (x64) | Ubuntu GNOME (64-bit), X11 | Generic Non-Touch | 🟧 |
|
||||
| Generic PC (x64) | Ubuntu GNOME (64-bit), Wayland | Generic Non-Touch | 🟥 |
|
||||
|
||||
## Features
|
||||
**Minimal features** are designed to run on any system without issues:
|
||||
|
||||
- A webview kiosk window launched in fullscreen mode and loading the specified `--web-url` website should not cause any problems.
|
||||
- When connecting to an internal HTTPS site with a self-signed certificate, ensure the specified FQDN matches. Using the `--ignore-certificate-errors` flag is [not recommended](https://github.com/leukipp/touchkio/issues/76) for browsing external sites.
|
||||
|
||||
**Extended features** become available when the `--mqtt-*` arguments are provided and the hardware is supported:
|
||||
|
||||
- The following commands are currently implemented to modify the display status. Make sure that one of these works for your display when you run it directly on the terminal, otherwise the MQTT switch will not work either.
|
||||
- `wlopm --[on,off] \*` (Raspberry Pi OS, Wayland)
|
||||
- `kscreen-doctor --dpms [on,off]` (Debian KDE, Wayland)
|
||||
- `xset dpms force [on,off]` (Generic, X11)
|
||||
- If your hardware is not fully compatible there should be no crashes, but you may miss some sensors.
|
||||
- On some Debian based systems (e.g. Ubuntu GNOME), the display status control is only available when using X11 (`xset`).
|
||||
- There are certain HDMI screens (e.g. Viewsonic) where the display status command doesn't work as expected.
|
||||
- The screen [immediately turns on again](https://github.com/leukipp/touchkio/issues/38), which may be caused by incompatible HDMI cables being used.
|
||||
- On Raspberry Pi OS the display command may fail with `ERROR: Setting power mode for output '[DSI-*,HDMI-*]' failed`.
|
||||
- This can happen if you have `wayvnc` running for remote access and is caused by a [known bug](https://github.com/leukipp/touchkio/issues/78).
|
||||
- Certain commands from the MQTT integration may require elevated privileges to work correctly.
|
||||
- Ensure that your local user has the [necessary permissions](https://github.com/leukipp/touchkio/issues/39) to run `sudo` without being prompted for a password.
|
||||
|
||||
Hardware support is verified during application startup and can be seen in the terminal or in the log file under the `Supported` section.
|
||||
The necessary requirements for MQTT sensors to work are listed here:
|
||||
| Name | Requirements | References |
|
||||
| -------------------- | ----------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
|
||||
| App (Update) | Requires `sudo` rights, `.deb` install and `touchkio.service` running . | [#70](https://github.com/leukipp/touchkio/issues/70), [#77](https://github.com/leukipp/touchkio/issues/77) |
|
||||
| Display (Status) | Working `wlopm`, `kscreen-doctor` or `xset` command. | [#38](https://github.com/leukipp/touchkio/issues/38), [#57](https://github.com/leukipp/touchkio/issues/57) |
|
||||
| Display (Brightness) | Device under `/sys/class/backlight/*/brightness` exists. | [#30](https://github.com/leukipp/touchkio/issues/30), [#32](https://github.com/leukipp/touchkio/issues/32) |
|
||||
| Keyboard | Raspberry Pi OS (Wayland) with `squeekboard` running. | [#7](https://github.com/leukipp/touchkio/issues/7), [#85](https://github.com/leukipp/touchkio/issues/85) |
|
||||
| Battery | Device under `/sys/class/power_supply/*/capacity` exists. | [#33](https://github.com/leukipp/touchkio/issues/33) |
|
||||
| Volume | Device (non-dummy) `pactl get-default-sink` exists. | [#82](https://github.com/leukipp/touchkio/issues/82) |
|
||||
| Reboot | Requires password-less `sudo` rights. | [#39](https://github.com/leukipp/touchkio/issues/39) |
|
||||
| Shutdown | Requires password-less `sudo` rights. | [#39](https://github.com/leukipp/touchkio/issues/39) |
|
||||
|
||||
|
||||
## Contributions
|
||||
In case your hardware is not listed above don't worry, give it a try.
|
||||
Running `touchkio --web-url=https://demo.home-assistant.io` will most likely just work.
|
||||
The only problems that may arise are when controlling the display or keyboard via the Home Assistant integration.
|
||||
The only problems that may arise are when controlling the display via the Home Assistant integration.
|
||||
|
||||
- If you encounter any problems, please create a new [issue](https://github.com/leukipp/touchkio/issues).
|
||||
- If you encounter any problems and are able to fix it yourself, feel free to create a [pull request](https://github.com/leukipp/touchkio/pulls).
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
# TouchKio
|
||||

|
||||

|
||||

|
||||

|
||||
[](https://github.com/sponsors/leukipp)
|
||||
|
||||
**TouchKio** is a Node.js application that utilizes Electron to create a kiosk mode window specifically designed for a Home Assistant dashboard.
|
||||
This tool is packaged as a **.deb** file, making it easy to launch the kiosk application on any Debian based Linux [hardware](https://github.com/leukipp/touchkio/blob/main/HARDWARE.md) (e.g. **Raspberry Pi**) equipped with a **DSI or HDMI** Touch Display.
|
||||
Additional releases for other Linux systems are available as **.zip** file.
|
||||
@@ -12,18 +18,21 @@ Moreover, the device running the **kiosk application** also offers several **Hom
|
||||
- [x] Fast and easy setup.
|
||||
- [x] Remember login credentials.
|
||||
- [x] Touch optimized web browsing.
|
||||
- [x] Dynamic window status bar layout.
|
||||
- [x] Side panel widget for kiosk control.
|
||||
- [x] Navigation bar to switch between pages.
|
||||
- [x] Configurable browser zoom and theme support.
|
||||
- [x] Adjustable browser zoom and theme support.
|
||||
- [x] Extended touch screen wake-up functionality.
|
||||
- [x] Remote controllable via MQTT.
|
||||
- [x] Manage kiosk window status.
|
||||
- [x] Toggle the on-screen keyboard.
|
||||
- [x] Touch display power and brightness.
|
||||
- [x] Manage kiosk window status and zoom.
|
||||
- [x] Show network interfaces and addresses.
|
||||
- [x] List all available system package upgrades.
|
||||
- [x] Multi-webpage switching and url navigation.
|
||||
- [x] Monitor temperature, processor and memory usage.
|
||||
- [x] Audio volume control for connected devices.
|
||||
- [x] Execute system reboot and shutdown commands.
|
||||
- [x] Show available system package upgrades.
|
||||
- [x] Monitor battery, temperature, processor and memory usage.
|
||||
|
||||
The kiosk application can be executed with command line arguments to load a **Home Assistant dashboard in fullscreen** mode.
|
||||
Additionally, a **MQTT endpoint** can be defined, allowing the application to provide controls and sensors for the Linux device and the connected Touch Display.
|
||||
@@ -69,9 +78,8 @@ systemctl --user start|stop|status|restart touchkio.service
|
||||
When connected via SSH, it's necessary to export the display variables first, as outlined in the [development](https://github.com/leukipp/touchkio?tab=readme-ov-file#development) section.
|
||||
The [install.sh](https://github.com/leukipp/touchkio/blob/main/install.sh) script mentioned above performs the following tasks (and you just have to do it manually):
|
||||
- [Download](https://github.com/leukipp/touchkio/releases/latest) the latest version file that is suitable for your architecture (arm64 or x64).
|
||||
- Debian (**deb**): Open a terminal and execute the following command to install the application, e.g:
|
||||
`sudo apt install ./touchkio_1.x.x_arm64.deb && touchkio --setup`
|
||||
- Others (**zip**): Extract the archive and run the binary, e.g: `unzip touchkio-linux-x64-1.x.x.zip && cd touchkio-linux-x64 && ./touchkio --setup`
|
||||
- Debian (**deb**): Open a terminal and execute the following command to install the application, e.g: `sudo apt install ./touchkio_1.x.x_arm64.deb && touchkio --setup`
|
||||
- Others (**zip**): Extract the archive and run the binary, e.g: `unzip touchkio-linux-x64-1.x.x.zip && cd touchkio-linux-x64 && ./touchkio --setup`
|
||||
- If you just want to load a Home Assistant dashboard without further control you are good to go, e.g: `touchkio --web-url=https://demo.home-assistant.io`
|
||||
- The `--web-url` doesn't necessarily need to be a Home Assistant url, any kind of website can be shown in kiosk mode.
|
||||
- Only when using the MQTT integration via `--mqtt-*`, a running Home Assistant instance is required.
|
||||
@@ -91,7 +99,8 @@ yarn build
|
||||
#### Update
|
||||
If you have already installed TouchKio and want to upgrade to the latest version, simply install the newer version over the existing one.
|
||||
|
||||
The [install.sh](https://github.com/leukipp/touchkio/blob/main/install.sh) script can also be run to update an existing installation to the **latest version**. The setup procedure can be skipped to use the existing default arguments from the configuration file:
|
||||
The [install.sh](https://github.com/leukipp/touchkio/blob/main/install.sh) script can also be run to update an existing installation to the **latest version**.
|
||||
The setup procedure can be skipped to use the existing default arguments from the configuration file:
|
||||
```bash
|
||||
bash <(wget -qO- https://raw.githubusercontent.com/leukipp/touchkio/main/install.sh) update
|
||||
```
|
||||
@@ -101,7 +110,7 @@ Running `touchkio --setup` will prompt you to enter arguments that will be used
|
||||
These default arguments are stored in `~/.config/touchkio/Arguments.json`, where they can also be modified.
|
||||
|
||||
### WEB
|
||||
The available arguments to control the kiosk application via terminal are as follows:
|
||||
The available arguments to control the kiosk application via terminal are as follows:
|
||||
| Name | Default | Description |
|
||||
| ------------------------- | ------- | ---------------------------------------------------------------------------------------------------------- |
|
||||
| `--web-url` (Required) | - | Url of the Home Assistant instance<a id="ref1"></a><sup><a href="#foot1">[1]</a></sup> (HTTP(S)://IP:PORT) |
|
||||
@@ -120,7 +129,7 @@ touchkio --web-url=http://192.168.1.42:8123 --web-theme=light --web-zoom=1.0
|
||||
> You can configure multiple pages by separating them with a comma:
|
||||
> `touchkio --web-url=https://demo.home-assistant.io,https://demo.immichkiosk.app`.
|
||||
|
||||
In the `~/.config/touchkio/Arguments.json` file:
|
||||
In the `~/.config/touchkio/Arguments.json` file:
|
||||
```json
|
||||
{
|
||||
"web_url": [
|
||||
@@ -188,7 +197,7 @@ To make this permanent, consider adding the export variables into the `~/.bashrc
|
||||
|
||||
<details><summary>You probably won't need this.</summary><div></br>
|
||||
|
||||
Incorporating custom extensions and external hardware (like motion sensors, ultrasonic sensors, cameras, relays and switches) via **Raspberry Pi's GPIO/USB** involves several steps.
|
||||
Incorporating custom extensions and external hardware (like motion sensors, ultrasonic sensors, cameras, relays and switches) via **Raspberry Pi's GPIO/USB** involves several steps.
|
||||
While using external sensors that directly integrate with Home Assistant and by utilizing automation's to interact with **TouchKio via MQTT** is generally easier and **recommended**, here's a rough guide on how to proceed with custom hardware integration:
|
||||
|
||||
1. **Install Node.js library**: Use Yarn to add a library that can interact with your hardware (GPIO, USB, etc.):
|
||||
@@ -215,7 +224,7 @@ While using external sensors that directly integrate with Home Assistant and by
|
||||
```javascript
|
||||
const init = async (args) => { ... }
|
||||
```
|
||||
From there, you will need to further refine your code by tinkering with sensor updates. This can be achieved through either periodic update calls or event based triggers.
|
||||
From there, you will need to further refine your code by tinkering with sensor updates. This can be achieved through either periodic update calls or event based triggers.
|
||||
|
||||
</div></details>
|
||||
|
||||
@@ -223,8 +232,8 @@ While using external sensors that directly integrate with Home Assistant and by
|
||||
|
||||
<details><summary>Don't waste your time reading this.</summary><div></br>
|
||||
|
||||
The Raspberry Pi's **build-in on-screen keyboard** named `squeekboard` (it squeaks because some *Rust* got inside), is specifically designed for Wayland environments and features a **D-Bus interface** that allows applications to show or hide the keyboard as needed.
|
||||
The kiosk application interacts with squeekboard via the `D-Bus` object path `/sm/puri/OSK0`, enabling the keyboard to be hidden or shown based on **MQTT** user input or system events.
|
||||
The Raspberry Pi's **build-in on-screen keyboard** named `squeekboard` (it squeaks because some _Rust_ got inside), is specifically designed for Wayland environments and features a **D-Bus interface** that allows applications to show or hide the keyboard as needed.
|
||||
The kiosk application interacts with squeekboard via the `D-Bus` object path `/sm/puri/OSK0`, enabling the keyboard to be hidden or shown based on **MQTT** user input or system events.
|
||||
|
||||
The Raspberry Pi's **build-in screen blanking** function uses the command `swayidle -w timeout 600 'wlopm --off \*' resume 'wlopm --on \*' &` inside `~/.config/labwc/autostart` to blank the screen after **10 minutes**.
|
||||
The `wlopm --off \*` command changes the `bl_power` value to **4**, when setting the value to **0** the screen will turn on again.
|
||||
@@ -235,7 +244,7 @@ I managed to achieve this for the `brightness` file by implementing a simple `fs
|
||||
However, I found that it **never triggered** for the `bl_power` file.
|
||||
Although the file content changes, none of the filesystem listeners where fired.
|
||||
This could be due to `swayidle`/`wlopm` performing write actions at a deeper level that are not detectable by file listeners.
|
||||
As a result, I went for a **polling solution**, checking the state of the file **every second** for any changes.
|
||||
As a result, I went for a **polling solution**, checking the state of the `brightness` and `dpms` file **every second** for any changes.
|
||||
While I understand this is not ideal, it's necessary to ensure proper functionality.
|
||||
|
||||
The display power status and brightness can be adjusted via the MQTT integration.
|
||||
@@ -249,9 +258,10 @@ Implementing stronger **security measures** would complicate the setup process a
|
||||
When using the kiosk application without initializing the default arguments, you will need to provide them with every command.
|
||||
This means that the password may be stored as plain text in various files, such as `touchkio.service`, `~/.bash_history`, etc.
|
||||
|
||||
To resolve the issue where the first **touch** on a **turned-off screen** triggers a **click event** (which could inadvertently activate Home Assistant actions), a workaround needed to be implemented.
|
||||
When the screen **turns off** the **focus** is removed from the kiosk window.
|
||||
This way, the first click only turns the screen on and focuses the window, allowing subsequent clicks to work as expected.
|
||||
To address the problem where the first **touch** on a **turned-off screen** may trigger a **click event** (which could inadvertently activate Home Assistant actions), a workaround needed to be implemented.
|
||||
When the screen **turns on/off**, the timestamps of these events are recorded.
|
||||
If a touch event is detected and the **timestamp** of the **last screen-off** is more recent than the **last screen-on** timestamp, the touch event is discarded and the screen is turned on instead.
|
||||
From that point onward, subsequent touch interactions will function normally as expected.
|
||||
|
||||
Additionally, to address the problem that scrolling only works with the **web browser scrollbar** on the right, the application is configured to **simulate a touch device** using `Emulation.setEmitTouchEventsForMouse`.
|
||||
This adjustment provides a user experience similar to that of a proper mobile device.
|
||||
@@ -259,36 +269,31 @@ This adjustment provides a user experience similar to that of a proper mobile de
|
||||
</div></details>
|
||||
|
||||
## Issues
|
||||
Please have a look into the [hardware](https://github.com/leukipp/touchkio/blob/main/HARDWARE.md) documentation if you ran into any issues.
|
||||
|
||||
**Minimal features** are designed to run on any system without issues:
|
||||
- A webview kiosk window launched in fullscreen mode and loading the specified `--web-url` website should not cause any problems.
|
||||
|
||||
**Extended features** become available when the `--mqtt-*` arguments are provided and the hardware is supported:
|
||||
- If your hardware is not fully compatible there should be no crashes, but you may miss some sensors.
|
||||
- On some Debian based systems (e.g. Ubuntu GNOME), the display status control may only be available when using X11.
|
||||
- The following commands are currently implemented to modify the display status.
|
||||
- `wlopm --[on]/[off] *` (Raspberry Pi OS, Wayland)
|
||||
- `kscreen-doctor --dpms [on]/[off]` (Debian KDE, Wayland)
|
||||
- `xset dpms force [on]/[off]` (Generic, X11)
|
||||
Please review the [hardware](https://github.com/leukipp/touchkio/blob/main/HARDWARE.md) documentation first if you encounter any problems.
|
||||
|
||||
**Known Issues** that are by-design or for which there isn't a solution so far:
|
||||
- You can use Raspberry Pi's build-in [screen blanking](https://www.raspberrypi.com/documentation/computers/configuration.html#screen-blanking-3) functionality, however, if the screen is turned on through Home Assistant after being automatically turned off, it will remain on indefinitely.
|
||||
- It's recommended to either use the built-in screen blanking feature or implement a Home Assistant automation (e.g. presence detection) to manage the screen status.
|
||||
- It's recommended to either use the built-in screen blanking feature or implement a Home Assistant [automation](https://www.home-assistant.io/docs/automation/basics) (e.g. presence detection) to manage the screen status.
|
||||
- An active VNC session can also interfere with the display state, you can find details about this in the features [section](https://github.com/leukipp/touchkio/blob/main/HARDWARE.md#features).
|
||||
- When using a Raspberry Pi, the on-screen keyboard doesn't [automatically pop-out](https://github.com/leukipp/touchkio/issues/4) when entering a text field inside the webview.
|
||||
- As a current workaround you can use the side [widget](https://github.com/leukipp/touchkio/issues/16) to toggle the keyboard visibility.
|
||||
- Certain commands from the MQTT integration may require elevated privileges to work correctly.
|
||||
- Ensure that your local user has the [necessary permissions](https://github.com/leukipp/touchkio/issues/39) to run `sudo` without being prompted for a password.
|
||||
- On the terminal you may see some *ERROR:gbm_wrapper.cc* messages.
|
||||
- This appears to be a [known issue](https://github.com/electron/electron/issues/42322) that currently lacks a fix, but the webview still works.
|
||||
- There is also an [experimental feature](https://github.com/leukipp/touchkio/issues/85) that uses a special Electron flag to address this problem.
|
||||
- On the terminal you may see some _ERROR:gbm_wrapper.cc_ messages.
|
||||
- This appears to be a [known issue](https://github.com/electron/electron/issues/42322) that currently lacks a fix, but the webview still works.
|
||||
|
||||
For debugging, stop the service and run `touchkio` directly on the terminal to view the log outputs.
|
||||
If you encounter any problems, please [create an issue](https://github.com/leukipp/touchkio/issues) and include the output of `touchkio --version` along with your system setup and any additional terminal logs.
|
||||
For debugging, stop the service and launch `touchkio` directly on the terminal to monitor the log output in real-time.
|
||||
This output is also written into `~/.config/touchkio/logs/main.log` for review.
|
||||
|
||||
If you encounter any problems, please [create an issue](https://github.com/leukipp/touchkio/issues) and include the output of `touchkio --version`, additional information's about your system (such as operating system, hardware, etc.) and any relevant log files.
|
||||
|
||||
## Credits
|
||||
[Inspired by](https://www.jeffgeerling.com/blog/2024/home-assistant-and-carplay-pi-touch-display-2) the one and only Raspberry Pi Master, Jeff Geerling ([@geerlingguy](https://github.com/geerlingguy)).
|
||||
|
||||
Thanks to Sebastian ([@pdsccode](https://github.com/pdsccode)) for his contributions on issues and [community](https://community.home-assistant.io/t/kiosk-mode-for-raspberry-pi-with-touch-display/821196) discussions.
|
||||
|
||||
[Inspired by](https://www.jeffgeerling.com/blog/2024/home-assistant-and-carplay-pi-touch-display-2) the one and only Raspberry Pi Master, Jeff Geerling ([@geerlingguy](https://github.com/geerlingguy)).
|
||||
If you are looking for hardware or a well-designed mounting solution for the Raspberry Pi Display, check out the [blog post](https://www.thestockpot.net/videos/home-assistant-wall-display) from Dillan Stock ([@TheStockPot-AU](https://www.youtube.com/channel/UCmlzNHg8QiWVutUyFOV2UdQ)).
|
||||
|
||||
[](https://www.youtube.com/watch?v=uTxURzmrVtA)
|
||||
|
||||
## License
|
||||
[MIT](https://github.com/leukipp/touchkio/blob/main/LICENSE)
|
||||
|
||||
+4
-4
@@ -62,13 +62,13 @@ module.exports = {
|
||||
for (const result of results) {
|
||||
const artifacts = [];
|
||||
for (const artifact of result.artifacts) {
|
||||
// Currently disabled for zip files as it seems to corrupt them
|
||||
if (artifact.includes(".zip") && false) {
|
||||
if (artifact.includes(".zip")) {
|
||||
const [name, platform, arch] = path.basename(artifact).split("-");
|
||||
const buildFile = path.join(`${name}-${platform}-${arch}`, "resources", "app", "build.json");
|
||||
const zip = await jszip.loadAsync(fs.readFileSync(artifact, "utf8"));
|
||||
const options = { type: "nodebuffer", compression: "DEFLATE", compressionOptions: { level: 9 } };
|
||||
const zip = await jszip.loadAsync(fs.readFileSync(artifact));
|
||||
zip.file(buildFile, generateBuildFile(platform, arch, "zip"));
|
||||
fs.writeFileSync(artifact, await zip.generateAsync({ type: "nodebuffer" }));
|
||||
fs.writeFileSync(artifact, await zip.generateAsync(options));
|
||||
}
|
||||
if (artifact.includes("amd64")) {
|
||||
const renamed = artifact.replace("amd64", "x64");
|
||||
|
||||
+17
-8
@@ -32,8 +32,8 @@
|
||||
align-items: center;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
padding: 0 30px;
|
||||
column-gap: 20px;
|
||||
padding: 0 10px;
|
||||
column-gap: 10px;
|
||||
list-style-type: none;
|
||||
border-top: 1px solid var(--border-color);
|
||||
background: var(--background-color);
|
||||
@@ -74,6 +74,7 @@
|
||||
padding: 6px 10px;
|
||||
border-radius: 4px;
|
||||
font-size: 18px;
|
||||
font-family: sans-serif;
|
||||
outline: none;
|
||||
border: none;
|
||||
cursor: text;
|
||||
@@ -132,7 +133,7 @@
|
||||
</li>
|
||||
<li class="separator"></li>
|
||||
<li class="dynamic">
|
||||
<input id="url" type="text" spellcheck="false" />
|
||||
<input id="url" type="text" spellcheck="false" readonly="true" />
|
||||
</li>
|
||||
<li class="separator"></li>
|
||||
<li>
|
||||
@@ -187,6 +188,9 @@
|
||||
});
|
||||
});
|
||||
document.querySelectorAll("input").forEach((input) => {
|
||||
input.addEventListener("blur", (e) => {
|
||||
ipcRenderer.send("input-blur", { id: e.target.id });
|
||||
});
|
||||
input.addEventListener("focus", (e) => {
|
||||
ipcRenderer.send("input-focus", { id: e.target.id });
|
||||
});
|
||||
@@ -205,16 +209,21 @@
|
||||
ipcRenderer.on("button-hidden", (e, button) => {
|
||||
document.getElementById(button.id).parentNode.classList.toggle("hidden", button.hidden);
|
||||
});
|
||||
ipcRenderer.on("input-blur", (e, input) => {
|
||||
document.getElementById(input.id).blur();
|
||||
});
|
||||
ipcRenderer.on("input-select", (e, input) => {
|
||||
document.getElementById(input.id).select();
|
||||
ipcRenderer.on("input-readonly", (e, input) => {
|
||||
document.getElementById(input.id).readOnly = input.readonly;
|
||||
});
|
||||
ipcRenderer.on("input-text", (e, input) => {
|
||||
document.getElementById(input.id).value = input.text;
|
||||
document.getElementById(input.id).placeholder = input.placeholder;
|
||||
});
|
||||
ipcRenderer.on("input-select", (e, input) => {
|
||||
window.getSelection()?.removeAllRanges();
|
||||
if (input.select) {
|
||||
document.getElementById(input.id).select();
|
||||
} else {
|
||||
document.getElementById(input.id).blur();
|
||||
}
|
||||
});
|
||||
ipcRenderer.on("data-theme", (e, data) => {
|
||||
document.documentElement.setAttribute("data-theme", data.theme);
|
||||
});
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
<head>
|
||||
<style>
|
||||
[data-theme="hidden"] {
|
||||
--primary-color: rgba(0, 0, 0, 0);
|
||||
--border-color: rgba(0, 0, 0, 0);
|
||||
--background-color: rgba(0, 0, 0, 0);
|
||||
}
|
||||
::-webkit-scrollbar {
|
||||
|
||||
@@ -0,0 +1,161 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<style>
|
||||
[data-theme="dark"] {
|
||||
--primary-color: rgba(229, 229, 229, 1);
|
||||
--background-color: rgba(66, 67, 68, 1);
|
||||
--minimize-color: rgba(52, 199, 89, 1);
|
||||
--fullscreen-color: rgba(255, 149, 0, 1);
|
||||
--terminate-color: rgba(255, 59, 48, 1);
|
||||
}
|
||||
[data-theme="light"] {
|
||||
--primary-color: rgba(26, 26, 26, 1);
|
||||
--background-color: rgba(237, 236, 235, 1);
|
||||
--minimize-color: rgba(52, 199, 89, 1);
|
||||
--fullscreen-color: rgba(255, 149, 0, 1);
|
||||
--terminate-color: rgba(255, 59, 48, 1);
|
||||
}
|
||||
::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
cursor: pointer;
|
||||
}
|
||||
body {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background: var(--background-color);
|
||||
}
|
||||
header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex: 1 1 0%;
|
||||
height: 100vh;
|
||||
-webkit-app-region: drag;
|
||||
}
|
||||
h1 {
|
||||
position: absolute;
|
||||
transform: translate(-50%, -50%);
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
font-size: 18px;
|
||||
font-weight: 500;
|
||||
font-family: sans-serif;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
text-align: center;
|
||||
user-select: none;
|
||||
color: var(--primary-color);
|
||||
}
|
||||
menu {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
flex: 0 0 auto;
|
||||
height: 100vh;
|
||||
min-width: 116px;
|
||||
padding: 0px 10px;
|
||||
column-gap: 10px;
|
||||
list-style-type: none;
|
||||
background: var(--background-color);
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
li {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
li.disabled {
|
||||
opacity: 0.5;
|
||||
cursor: not-allowed;
|
||||
pointer-events: none;
|
||||
}
|
||||
button {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
border: none;
|
||||
background-color: transparent;
|
||||
}
|
||||
svg {
|
||||
pointer-events: none;
|
||||
}
|
||||
#minimize > svg {
|
||||
fill: var(--minimize-color);
|
||||
}
|
||||
#fullscreen > svg {
|
||||
fill: var(--fullscreen-color);
|
||||
}
|
||||
#terminate > svg {
|
||||
fill: var(--terminate-color);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<h1 id="title"></h1>
|
||||
</header>
|
||||
<menu>
|
||||
<li>
|
||||
<button id="minimize">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||
<title>minus-circle</title>
|
||||
<path d="M17,13H7V11H17M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z" />
|
||||
</svg>
|
||||
</button>
|
||||
</li>
|
||||
<li>
|
||||
<button id="fullscreen">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||
<title>chevron-up-circle</title>
|
||||
<path
|
||||
d="M22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2A10,10 0 0,1 22,12M7.4,15.4L12,10.8L16.6,15.4L18,14L12,8L6,14L7.4,15.4Z"
|
||||
/>
|
||||
</svg>
|
||||
</button>
|
||||
</li>
|
||||
<li>
|
||||
<button id="terminate">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||
<title>close-circle</title>
|
||||
<path
|
||||
d="M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2,6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12,13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z"
|
||||
/>
|
||||
</svg>
|
||||
</button>
|
||||
</li>
|
||||
</menu>
|
||||
<script>
|
||||
const { ipcRenderer } = require("electron");
|
||||
|
||||
const registerSendEvents = () => {
|
||||
document.querySelectorAll("button").forEach((button) => {
|
||||
button.addEventListener("click", (e) => {
|
||||
ipcRenderer.send("button-click", { id: e.target.id });
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
const registerReceiveEvents = () => {
|
||||
ipcRenderer.on("button-disabled", (e, button) => {
|
||||
document.getElementById(button.id).parentNode.classList.toggle("disabled", button.disabled);
|
||||
});
|
||||
ipcRenderer.on("text-content", (e, text) => {
|
||||
document.getElementById(text.id).textContent = text.content;
|
||||
});
|
||||
ipcRenderer.on("data-theme", (e, data) => {
|
||||
document.documentElement.setAttribute("data-theme", data.theme);
|
||||
});
|
||||
};
|
||||
|
||||
registerSendEvents();
|
||||
registerReceiveEvents();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
+13
-13
@@ -68,16 +68,6 @@
|
||||
</head>
|
||||
<body>
|
||||
<menu>
|
||||
<li>
|
||||
<button id="keyboard">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||
<title>keyboard-close-outline</title>
|
||||
<path
|
||||
d="M12 23L16 19H8M4 3C2.9 3 2 3.9 2 5V15C2 16.1 2.9 17 4 17H20C21.1 17 22 16.1 22 15V5C22 3.9 21.1 3 20 3H4M4 5H20V15H4V5M5 6V8H7V6H5M8 6V8H10V6H8M11 6V8H13V6H11M14 6V8H16V6H14M17 6V8H19V6H17M5 9V11H7V9H5M8 9V11H10V9H8M11 9V11H13V9H11M14 9V11H16V9H14M17 9V11H19V9H17M8 12V14H16V12H8Z"
|
||||
/>
|
||||
</svg>
|
||||
</button>
|
||||
</li>
|
||||
<li>
|
||||
<button id="fullscreen">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||
@@ -89,11 +79,21 @@
|
||||
</button>
|
||||
</li>
|
||||
<li>
|
||||
<button id="minimize">
|
||||
<button id="theme">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||
<title>image-size-select-small</title>
|
||||
<title>compare</title>
|
||||
<path
|
||||
d="M23,15H21V17H23V15M23,11H21V13H23V11M23,19H21V21C22,21 23,20 23,19M15,3H13V5H15V3M23,7H21V9H23V7M21,3V5H23C23,4 22,3 21,3M3,21H11V15H1V19A2,2 0 0,0 3,21M3,7H1V9H3V7M15,19H13V21H15V19M19,3H17V5H19V3M19,19H17V21H19V19M3,3C2,3 1,4 1,5H3V3M3,11H1V13H3V11M11,3H9V5H11V3M7,3H5V5H7V3Z"
|
||||
d="M19,3H14V5H19V18L14,12V21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3M10,18H5L10,12M10,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H10V23H12V1H10V3Z"
|
||||
/>
|
||||
</svg>
|
||||
</button>
|
||||
</li>
|
||||
<li>
|
||||
<button id="keyboard">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||
<title>keyboard-close-outline</title>
|
||||
<path
|
||||
d="M12 23L16 19H8M4 3C2.9 3 2 3.9 2 5V15C2 16.1 2.9 17 4 17H20C21.1 17 22 16.1 22 15V5C22 3.9 21.1 3 20 3H4M4 5H20V15H4V5M5 6V8H7V6H5M8 6V8H10V6H8M11 6V8H13V6H11M14 6V8H16V6H14M17 6V8H19V6H17M5 9V11H7V9H5M8 9V11H10V9H8M11 9V11H13V9H11M14 9V11H16V9H14M17 9V11H19V9H17M8 12V14H16V12H8Z"
|
||||
/>
|
||||
</svg>
|
||||
</button>
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 154 KiB After Width: | Height: | Size: 152 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 78 KiB After Width: | Height: | Size: 90 KiB |
@@ -5,10 +5,13 @@ const readline = require("readline/promises");
|
||||
const integration = require("./js/integration");
|
||||
const hardware = require("./js/hardware");
|
||||
const webview = require("./js/webview");
|
||||
const log = require("electron-log");
|
||||
const { app } = require("electron");
|
||||
const Events = require("events");
|
||||
|
||||
global.APP = global.APP || {};
|
||||
global.ARGS = global.ARGS || {};
|
||||
global.EVENTS = global.EVENTS || new Events();
|
||||
|
||||
if (!process.env.DISPLAY) {
|
||||
console.error(`\n$DISPLAY variable not set to run the GUI application, are you connected via SSH?\n`);
|
||||
@@ -16,6 +19,7 @@ if (!process.env.DISPLAY) {
|
||||
console.error(` systemctl --user start touchkio.service`);
|
||||
console.error(`Alternatively export the variables first:`);
|
||||
console.error(` export DISPLAY=":0" && export WAYLAND_DISPLAY="wayland-0" && touchkio\n`);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -24,12 +28,16 @@ if (!process.env.DISPLAY) {
|
||||
* initialization tasks.
|
||||
*/
|
||||
app.whenReady().then(async () => {
|
||||
if (!(await initApp()) || !(await initArgs())) {
|
||||
if (!(await initApp()) || !(await initArgs()) || !(await initLog())) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Show used arguments
|
||||
console.log(`Arguments: ${JSON.stringify(ARGS, null, 2)}`);
|
||||
const args = Object.assign({}, ARGS);
|
||||
if ("mqtt_password" in args) {
|
||||
args.mqtt_password = "*".repeat((args.mqtt_password || "").length);
|
||||
}
|
||||
console.info(`Arguments: ${JSON.stringify(args, null, 2)}`);
|
||||
|
||||
// Chained init functions
|
||||
const chained = [webview.init, hardware.init, integration.init];
|
||||
@@ -57,6 +65,8 @@ const initApp = async () => {
|
||||
APP.title = packageJson.title;
|
||||
APP.version = app.getVersion();
|
||||
APP.path = app.getAppPath();
|
||||
APP.icon = path.join(app.getAppPath(), "img", "icon.png");
|
||||
APP.log = path.join(app.getPath("logs"), "main.log");
|
||||
APP.config = app.getPath("userData");
|
||||
|
||||
// Set additional update infos
|
||||
@@ -78,7 +88,7 @@ const initApp = async () => {
|
||||
// Request single app instance lock
|
||||
if (!app.requestSingleInstanceLock()) {
|
||||
console.error(`${APP.title} is already running`);
|
||||
return app.quit();
|
||||
return app.exit(1);
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -102,25 +112,25 @@ const initArgs = async () => {
|
||||
if (APP.build.id) {
|
||||
build = ` (${APP.build.id}), built on ${APP.build.date} (${APP.build.platform}-${APP.build.arch}-${APP.build.maker})`;
|
||||
}
|
||||
console.log(`${APP.name}-v${APP.version}${build}\n${APP.homepage}`);
|
||||
return app.quit();
|
||||
console.info(`${APP.name}-v${APP.version}${build}\n${APP.homepage}`);
|
||||
return app.exit(0);
|
||||
}
|
||||
|
||||
// Setup arguments from file path
|
||||
if ("setup" in args || (!argsProvided && !argsFileExists)) {
|
||||
if ((!argsProvided && !argsFileExists) || "setup" in args) {
|
||||
await sleep(3000);
|
||||
do {
|
||||
args = await promptArgs(process);
|
||||
} while (!Object.keys(args).length);
|
||||
writeArgs(argsFilePath, args);
|
||||
} else if (!argsProvided && argsFileExists) {
|
||||
args = readArgs(argsFilePath);
|
||||
} else if (argsFileExists) {
|
||||
args = { ...readArgs(argsFilePath), ...args };
|
||||
}
|
||||
|
||||
// Check arguments object
|
||||
if (!Object.keys(args).length) {
|
||||
console.error(`No arguments provided`);
|
||||
return app.quit();
|
||||
return app.exit(1);
|
||||
}
|
||||
|
||||
// Split url arguments
|
||||
@@ -133,6 +143,52 @@ const initArgs = async () => {
|
||||
return true;
|
||||
};
|
||||
|
||||
/**
|
||||
* Initializes the global log object.
|
||||
*
|
||||
* @returns {bool} Returns true if the initialization was successful.
|
||||
*/
|
||||
const initLog = async () => {
|
||||
try {
|
||||
if (fs.existsSync(APP.log)) {
|
||||
fs.unlinkSync(APP.log);
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("Failed to delete log file:", error.message);
|
||||
}
|
||||
|
||||
// Overwrite console log
|
||||
APP.logs = [];
|
||||
log.errorHandler.startCatching({
|
||||
showDialog: false,
|
||||
onError({ error }) {
|
||||
console.error(`Uncaught Error: ${error.message} (${error.stack})`);
|
||||
app.exit(1);
|
||||
},
|
||||
});
|
||||
log.hooks.push((message, transport, type) => {
|
||||
const text = message.data.join(" ");
|
||||
if (!text.startsWith("(node:") && type === "console") {
|
||||
APP.logs.unshift({
|
||||
time: message.date,
|
||||
level: message.level,
|
||||
text: text,
|
||||
});
|
||||
if (APP.logs.length > 10) {
|
||||
APP.logs.splice(10);
|
||||
}
|
||||
EVENTS.emit("consoleLog", APP.logs[0]);
|
||||
}
|
||||
return message;
|
||||
});
|
||||
log.transports.file.resolvePathFn = () => {
|
||||
return APP.log;
|
||||
};
|
||||
Object.assign(console, log.functions);
|
||||
|
||||
return true;
|
||||
};
|
||||
|
||||
/**
|
||||
* Parses command-line arguments from the given process object.
|
||||
*
|
||||
@@ -249,7 +305,7 @@ const promptArgs = async (proc) => {
|
||||
} catch (error) {
|
||||
console.error(`\n${error.message}`);
|
||||
args = {};
|
||||
app.quit();
|
||||
app.exit(1);
|
||||
} finally {
|
||||
read.close();
|
||||
}
|
||||
|
||||
+19
-18
@@ -1,11 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Read arguments
|
||||
ARG_EARLY=false
|
||||
ARG_UPDATE=false
|
||||
for arg in "$@"; do
|
||||
if [ "$arg" = "update" ]; then
|
||||
ARG_UPDATE=true
|
||||
fi
|
||||
case "$arg" in
|
||||
early) ARG_EARLY=true ;;
|
||||
update) ARG_UPDATE=true ;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Determine system architecture
|
||||
@@ -13,15 +15,9 @@ echo -e "Determining system architecture..."
|
||||
|
||||
BITS=$(getconf LONG_BIT)
|
||||
case "$(uname -m)" in
|
||||
aarch64)
|
||||
ARCH="arm64"
|
||||
;;
|
||||
x86_64)
|
||||
ARCH="x64"
|
||||
;;
|
||||
*)
|
||||
{ echo "Architecture $(uname -m) running $BITS-bit operating system is not supported."; exit 1; }
|
||||
;;
|
||||
x86_64) ARCH="x64" ;;
|
||||
aarch64) ARCH="arm64" ;;
|
||||
*) { echo "Architecture $(uname -m) running $BITS-bit operating system is not supported."; exit 1; } ;;
|
||||
esac
|
||||
|
||||
[ "$BITS" -eq 64 ] || { echo "Architecture $ARCH running $BITS-bit operating system is not supported."; exit 1; }
|
||||
@@ -31,12 +27,18 @@ echo "Architecture $ARCH running $BITS-bit operating system is supported."
|
||||
echo -e "\nDownloading the latest release..."
|
||||
|
||||
TMP_DIR=$(mktemp -d)
|
||||
DEB_URL=$(wget -qO- https://api.github.com/repos/leukipp/touchkio/releases/latest | \
|
||||
grep -o "\"browser_download_url\": \"[^\"]*_${ARCH}\.deb\"" | \
|
||||
sed 's/"browser_download_url": "//;s/"//g')
|
||||
DEB_PATH="${TMP_DIR}/$(basename "$DEB_URL")"
|
||||
chmod 755 "$TMP_DIR"
|
||||
|
||||
JSON=$(wget -qO- "https://api.github.com/repos/leukipp/touchkio/releases" | tr -d '\r\n')
|
||||
if $ARG_EARLY; then
|
||||
DEB_REG='"prerelease":\s*(true|false).*?"browser_download_url":\s*"\K[^\"]*_'$ARCH'\.deb'
|
||||
else
|
||||
DEB_REG='"prerelease":\s*false.*?"browser_download_url":\s*"\K[^\"]*_'$ARCH'\.deb'
|
||||
fi
|
||||
|
||||
DEB_URL=$(echo "$JSON" | grep -oP "$DEB_REG" | head -n 1)
|
||||
DEB_PATH="${TMP_DIR}/$(basename "$DEB_URL")"
|
||||
|
||||
[ -z "$DEB_URL" ] && { echo "Download url for .deb file not found."; exit 1; }
|
||||
wget --show-progress -q -O "$DEB_PATH" "$DEB_URL" || { echo "Failed to download the .deb file."; exit 1; }
|
||||
|
||||
@@ -108,8 +110,7 @@ else
|
||||
fi
|
||||
|
||||
# Start the setup mode
|
||||
echo ""
|
||||
read -p "Start touchkio setup? (Y/n) " setup
|
||||
read -p $'\nStart touchkio setup? (Y/n) ' setup
|
||||
|
||||
if [[ ${setup:-y} == [Yy]* ]]; then
|
||||
echo "/usr/bin/touchkio --setup"
|
||||
|
||||
+235
-119
@@ -3,13 +3,11 @@ const fs = require("fs");
|
||||
const path = require("path");
|
||||
const fsp = require("fs/promises");
|
||||
const cpr = require("child_process");
|
||||
const Events = require("events");
|
||||
|
||||
global.HARDWARE = global.HARDWARE || {
|
||||
initialized: false,
|
||||
events: new Events(),
|
||||
session: {},
|
||||
support: {},
|
||||
session: {},
|
||||
battery: {
|
||||
level: {
|
||||
path: null,
|
||||
@@ -30,6 +28,9 @@ global.HARDWARE = global.HARDWARE || {
|
||||
keyboard: {
|
||||
visible: null,
|
||||
},
|
||||
audio: {
|
||||
device: null,
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -39,7 +40,7 @@ global.HARDWARE = global.HARDWARE || {
|
||||
*/
|
||||
const init = async () => {
|
||||
if (!compatibleSystem()) {
|
||||
console.warn("Operating system is not supported\n");
|
||||
console.error("Operating system is not supported");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -52,66 +53,92 @@ const init = async () => {
|
||||
HARDWARE.display.status.command = getDisplayStatusCommand();
|
||||
HARDWARE.display.brightness.path = getDisplayBrightnessPath();
|
||||
HARDWARE.display.brightness.max = getDisplayBrightnessMax();
|
||||
HARDWARE.audio.device = getAudioDevice();
|
||||
HARDWARE.support = checkSupport();
|
||||
HARDWARE.initialized = true;
|
||||
|
||||
// Show supported features
|
||||
console.log(`\nSupported: ${JSON.stringify(HARDWARE.support, null, 2)}`);
|
||||
process.stdout.write("\n");
|
||||
console.info(`Supported: ${JSON.stringify(HARDWARE.support, null, 2)}`);
|
||||
|
||||
// Show session infos
|
||||
console.log("\nUser:", HARDWARE.session.user);
|
||||
console.log("Session:", HARDWARE.session.type);
|
||||
console.log("Desktop:", HARDWARE.session.desktop);
|
||||
process.stdout.write("\n");
|
||||
console.info("User:", HARDWARE.session.user);
|
||||
console.info("Session:", HARDWARE.session.type);
|
||||
console.info("Desktop:", HARDWARE.session.desktop);
|
||||
|
||||
// Show device infos
|
||||
console.log("\nModel:", getModel());
|
||||
console.log("Vendor:", getVendor());
|
||||
console.log("Serial Number:", getSerialNumber());
|
||||
console.log("Network Addresses:", getNetworkAddresses());
|
||||
console.log("Host Name:", getHostName());
|
||||
process.stdout.write("\n");
|
||||
console.info("Model:", getModel());
|
||||
console.info("Vendor:", getVendor());
|
||||
console.info("Serial Number:", getSerialNumber());
|
||||
console.info("Network Addresses:", getNetworkAddresses());
|
||||
console.info("Host Name:", getHostName());
|
||||
|
||||
// Show system infos
|
||||
console.log("\nUp Time:", getUpTime());
|
||||
console.log("Memory Size:", getMemorySize());
|
||||
console.log("Memory Usage:", getMemoryUsage());
|
||||
console.log("Processor Usage:", getProcessorUsage());
|
||||
console.log("Processor Temperature:", getProcessorTemperature());
|
||||
process.stdout.write("\n");
|
||||
console.info("Up Time:", getUpTime());
|
||||
console.info("Memory Size:", getMemorySize());
|
||||
console.info("Memory Usage:", getMemoryUsage());
|
||||
console.info("Processor Usage:", getProcessorUsage());
|
||||
console.info("Processor Temperature:", getProcessorTemperature());
|
||||
|
||||
// Show hardware infos
|
||||
process.stdout.write("\n");
|
||||
const unsupported = "unsupported";
|
||||
console.log(
|
||||
`\nBattery Level [${HARDWARE.battery.level.path || unsupported}]:`,
|
||||
`${getBatteryLevel() || unsupported}`,
|
||||
);
|
||||
console.log(
|
||||
console.info(`Battery Level [${HARDWARE.battery.level.path || unsupported}]:`, `${getBatteryLevel() || unsupported}`);
|
||||
console.info(
|
||||
`Display Status [${HARDWARE.display.status.path || unsupported}]:`,
|
||||
`${getDisplayStatus() || unsupported} (${HARDWARE.display.status.command || unsupported})`,
|
||||
);
|
||||
console.log(
|
||||
console.info(
|
||||
`Display Brightness [${HARDWARE.display.brightness.path || unsupported}]:`,
|
||||
`${getDisplayBrightness() || unsupported}`,
|
||||
);
|
||||
console.log(
|
||||
`Keyboard Visibility [${HARDWARE.support.keyboardVisibility ? "squeekboard" : unsupported}]:`,
|
||||
`${getKeyboardVisibility() || unsupported}\n`,
|
||||
console.info(
|
||||
`Audio Volume [${HARDWARE.support.audioVolume ? HARDWARE.audio.device : unsupported}]:`,
|
||||
`${getAudioVolume() || unsupported}`,
|
||||
);
|
||||
console.info(
|
||||
`Keyboard Visibility [${HARDWARE.support.keyboardVisibility ? "squeekboard" : unsupported}]:`,
|
||||
`${getKeyboardVisibility() || unsupported}`,
|
||||
);
|
||||
process.stdout.write("\n");
|
||||
|
||||
// Check for keyboard visibility
|
||||
setKeyboardVisibility("OFF", (reply, error) => {
|
||||
if (!reply || error) {
|
||||
return;
|
||||
}
|
||||
dbusMonitor("/sm/puri/OSK0", (property, error) => {
|
||||
if (!property || error) {
|
||||
// Monitor audio volume
|
||||
if (HARDWARE.support.audioVolume) {
|
||||
commandMonitor("pactl", ["subscribe"], (reply, error) => {
|
||||
if (!reply || error) {
|
||||
return;
|
||||
}
|
||||
HARDWARE.keyboard.visibility = property.Visible === "true";
|
||||
HARDWARE.events.emit("updateKeyboard");
|
||||
if (reply.includes("'change' on sink")) {
|
||||
console.info("Update Audio Volume:", getAudioVolume());
|
||||
EVENTS.emit("updateVolume");
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// Monitor keyboard visibility
|
||||
if (HARDWARE.support.keyboardVisibility) {
|
||||
setKeyboardVisibility("OFF", (reply, error) => {
|
||||
if (!reply || error) {
|
||||
return;
|
||||
}
|
||||
dbusMonitor("/sm/puri/OSK0", (property, error) => {
|
||||
if (!property || error) {
|
||||
return;
|
||||
}
|
||||
HARDWARE.keyboard.visibility = property.Visible === "true";
|
||||
console.info("Update Keyboard Visibility:", getKeyboardVisibility());
|
||||
EVENTS.emit("updateKeyboard");
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// Check for display changes
|
||||
interval(update, 1000);
|
||||
setDisplayStatus("ON", () => {
|
||||
interval(update, 1000);
|
||||
});
|
||||
|
||||
return true;
|
||||
};
|
||||
@@ -120,7 +147,7 @@ const init = async () => {
|
||||
* Updates the shared hardware properties.
|
||||
*/
|
||||
const update = async () => {
|
||||
if (!HARDWARE.initialized) {
|
||||
if (!HARDWARE.initialized || APP.exiting) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -128,9 +155,9 @@ const update = async () => {
|
||||
if (HARDWARE.support.displayStatus) {
|
||||
const status = (await fsp.readFile(`${HARDWARE.display.status.path}/dpms`, "utf8")).trim();
|
||||
if (status !== HARDWARE.display.status.value) {
|
||||
console.log("Update Display Status:", getDisplayStatus());
|
||||
console.info("Update Display Status:", getDisplayStatus());
|
||||
HARDWARE.display.status.value = status;
|
||||
HARDWARE.events.emit("updateDisplay");
|
||||
EVENTS.emit("updateDisplay");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -138,9 +165,9 @@ const update = async () => {
|
||||
if (HARDWARE.support.displayBrightness) {
|
||||
const brightness = (await fsp.readFile(`${HARDWARE.display.brightness.path}/brightness`, "utf8")).trim();
|
||||
if (brightness !== HARDWARE.display.brightness.value) {
|
||||
console.log("Update Display Brightness:", getDisplayBrightness());
|
||||
console.info("Update Display Brightness:", getDisplayBrightness());
|
||||
HARDWARE.display.brightness.value = brightness;
|
||||
HARDWARE.events.emit("updateDisplay");
|
||||
EVENTS.emit("updateDisplay");
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -206,6 +233,7 @@ const checkSupport = () => {
|
||||
const battery = HARDWARE.battery.level;
|
||||
const status = HARDWARE.display.status;
|
||||
const brightness = HARDWARE.display.brightness;
|
||||
const audio = HARDWARE.audio.device;
|
||||
const keyboard = processRuns("squeekboard");
|
||||
const service = serviceRuns(APP.name);
|
||||
const sudo = sudoRights();
|
||||
@@ -215,8 +243,9 @@ const checkSupport = () => {
|
||||
displayStatus: !!status.path && !!status.command,
|
||||
displayBrightness: sudo && !!brightness.path && !!brightness.max,
|
||||
keyboardVisibility: keyboard,
|
||||
audioVolume: !!audio,
|
||||
sudoRights: sudo,
|
||||
appUpdate: sudo && service && deb,
|
||||
appUpdate: service && sudo && deb,
|
||||
};
|
||||
};
|
||||
|
||||
@@ -369,7 +398,7 @@ const getProcessorTemperature = () => {
|
||||
continue;
|
||||
}
|
||||
const type = fs.readFileSync(typeFile, "utf8").trim();
|
||||
if (["cpu-thermal", "x86_pkg_temp", "k10temp", "acpitz"].includes(type)) {
|
||||
if (["cpu-thermal", "x86_pkg_temp", "k10temp", "acpitz", "cpu"].includes(type)) {
|
||||
return parseFloat(fs.readFileSync(tempFile, "utf8").trim()) / 1000;
|
||||
}
|
||||
}
|
||||
@@ -480,7 +509,7 @@ const getDisplayStatus = () => {
|
||||
case "xset":
|
||||
const xset = execSyncCommand("xset", ["-q"]);
|
||||
if (xset !== null) {
|
||||
const output = /Monitor is On/.test(xset);
|
||||
const output = xset.includes("Monitor is On");
|
||||
return output ? "ON" : "OFF";
|
||||
}
|
||||
break;
|
||||
@@ -596,6 +625,65 @@ const setDisplayBrightness = (brightness, callback = null) => {
|
||||
proc.stdin.end();
|
||||
};
|
||||
|
||||
/**
|
||||
* Gets the default audio device using `pactl`.
|
||||
*
|
||||
* @returns {string|null} The default audio device or null if an error occurs.
|
||||
*/
|
||||
const getAudioDevice = () => {
|
||||
if (!commandExists("pactl")) {
|
||||
return null;
|
||||
}
|
||||
const output = execSyncCommand("pactl", ["get-default-sink"]);
|
||||
if (!output) {
|
||||
return null;
|
||||
}
|
||||
return !output.includes("auto_null") ? output.trim() : null;
|
||||
};
|
||||
|
||||
/**
|
||||
* Gets the default audio device volume using `pactl`.
|
||||
*
|
||||
* @returns {number|null} The default audio device volume as a percentage or null if an error occurs.
|
||||
*/
|
||||
const getAudioVolume = () => {
|
||||
if (!HARDWARE.support.audioVolume) {
|
||||
return null;
|
||||
}
|
||||
const mute = execSyncCommand("pactl", ["get-sink-mute", "@DEFAULT_SINK@"]);
|
||||
const volume = execSyncCommand("pactl", ["get-sink-volume", "@DEFAULT_SINK@"]);
|
||||
if (!mute || !volume) {
|
||||
return null;
|
||||
}
|
||||
const match = volume.match(/\/(\s*(\d+)%)/);
|
||||
if (match) {
|
||||
return Math.max(0, Math.min(100, mute.includes("yes") ? 0 : parseInt(match[2])));
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
/**
|
||||
* Sets the default audio device volume using `pactl`.
|
||||
*
|
||||
* This function takes a volume value between 0 to 100 percent and sends it to the device.
|
||||
*
|
||||
* @param {number} volume - The desired volume level (0-100).
|
||||
* @param {Function} callback - A callback function that receives the output or error.
|
||||
*/
|
||||
const setAudioVolume = (volume, callback = null) => {
|
||||
if (!HARDWARE.support.audioVolume) {
|
||||
if (typeof callback === "function") callback(null, "Not supported");
|
||||
return;
|
||||
}
|
||||
if (typeof volume !== "number" || volume < 0 || volume > 100) {
|
||||
console.error("Volume must be a number between 0 and 100");
|
||||
if (typeof callback === "function") callback(null, "Invalid volume");
|
||||
return;
|
||||
}
|
||||
execAsyncCommand("pactl", ["set-sink-mute", "@DEFAULT_SINK@", volume === 0 ? "1" : "0"]);
|
||||
execAsyncCommand("pactl", ["set-sink-volume", "@DEFAULT_SINK@", `${volume}%`], callback);
|
||||
};
|
||||
|
||||
/**
|
||||
* Gets the keyboard visibility using global properties.
|
||||
*
|
||||
@@ -686,8 +774,8 @@ const rebootSystem = (callback = null) => {
|
||||
*/
|
||||
const sudoRights = () => {
|
||||
try {
|
||||
const output = cpr.execSync(`sudo -n true`, { encoding: "utf8" });
|
||||
return output !== null && !output.includes("password is required");
|
||||
cpr.execSync(`sudo -n true`, { encoding: "utf8", stdio: "ignore" });
|
||||
return true;
|
||||
} catch {}
|
||||
return false;
|
||||
};
|
||||
@@ -700,7 +788,8 @@ const sudoRights = () => {
|
||||
*/
|
||||
const serviceRuns = (name) => {
|
||||
try {
|
||||
return !!cpr.execSync(`systemctl --user is-active ${name}`, { encoding: "utf8" });
|
||||
cpr.execSync(`systemctl --user is-active ${name}`, { encoding: "utf8", stdio: "ignore" });
|
||||
return true;
|
||||
} catch {}
|
||||
return false;
|
||||
};
|
||||
@@ -713,7 +802,8 @@ const serviceRuns = (name) => {
|
||||
*/
|
||||
const processRuns = (name) => {
|
||||
try {
|
||||
return !!cpr.execSync(`pidof ${name}`, { encoding: "utf8" });
|
||||
cpr.execSync(`pidof ${name}`, { encoding: "utf8", stdio: "ignore" });
|
||||
return true;
|
||||
} catch {}
|
||||
return false;
|
||||
};
|
||||
@@ -726,7 +816,8 @@ const processRuns = (name) => {
|
||||
*/
|
||||
const commandExists = (name) => {
|
||||
try {
|
||||
return !!cpr.execSync(`which ${name}`, { encoding: "utf8" });
|
||||
cpr.execSync(`which ${name}`, { encoding: "utf8", stdio: "ignore" });
|
||||
return true;
|
||||
} catch {}
|
||||
return false;
|
||||
};
|
||||
@@ -738,12 +829,12 @@ const commandExists = (name) => {
|
||||
* @param {Array<string>} args - The arguments for the command.
|
||||
* @returns {string|null} The output of the command or null if an error occurs.
|
||||
*/
|
||||
const execSyncCommand = (cmd, args = []) => {
|
||||
const execSyncCommand = (cmd, args) => {
|
||||
try {
|
||||
const output = cpr.execSync([cmd, ...args].join(" "), { encoding: "utf8" });
|
||||
return output.trim().replace(/\0/g, "");
|
||||
} catch (error) {
|
||||
console.error("Execute Sync:", error.message);
|
||||
console.error(`Execute Sync: '${[cmd, ...args].join(" ")}' --> ${error.message}`);
|
||||
}
|
||||
return null;
|
||||
};
|
||||
@@ -756,7 +847,7 @@ const execSyncCommand = (cmd, args = []) => {
|
||||
* @param {Function} callback - A callback function that receives the output or error.
|
||||
* @returns {Object} The spawned process object.
|
||||
*/
|
||||
const execAsyncCommand = (cmd, args = [], callback = null) => {
|
||||
const execAsyncCommand = (cmd, args, callback = null) => {
|
||||
let errorOutput = "";
|
||||
let successOutput = "";
|
||||
let proc = cpr.spawn(cmd, args);
|
||||
@@ -771,17 +862,13 @@ const execAsyncCommand = (cmd, args = [], callback = null) => {
|
||||
}
|
||||
});
|
||||
proc.on("close", (code) => {
|
||||
try {
|
||||
if (typeof callback === "function") {
|
||||
if (code === 0) {
|
||||
callback(successOutput.trim().replace(/\0/g, ""), null);
|
||||
} else {
|
||||
callback(null, errorOutput.trim().replace(/\0/g, ""));
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("Execute Async:", error.message);
|
||||
if (typeof callback === "function") callback(null, error.message);
|
||||
const error = errorOutput.trim().replace(/\0/g, "");
|
||||
const reply = successOutput.trim().replace(/\0/g, "");
|
||||
if (code !== 0 || error) {
|
||||
console.error(`Execute Async: '${[cmd, ...args].join(" ")}' --> ${error} (${code})`);
|
||||
if (typeof callback === "function") callback(null, error);
|
||||
} else {
|
||||
if (typeof callback === "function") callback(reply, null);
|
||||
}
|
||||
});
|
||||
return proc;
|
||||
@@ -795,25 +882,25 @@ const execAsyncCommand = (cmd, args = [], callback = null) => {
|
||||
* @param {Function} callback - A callback function that receives the progress or error.
|
||||
* @returns {Object} The spawned process object.
|
||||
*/
|
||||
const execScriptCommand = (cmd, args = [], callback = null) => {
|
||||
let progress = 10;
|
||||
const execScriptCommand = (cmd, args, callback = null) => {
|
||||
let progress = 1;
|
||||
let proc = cpr.spawn(cmd, args);
|
||||
if (typeof callback === "function") callback(progress, null);
|
||||
proc.stdout.on("data", (data) => {
|
||||
if (data) {
|
||||
const lines = data.toString().trim();
|
||||
const output = lines.replace(/\n+/g, "\n").replace(/^\n+|\n+$|\0/g, "");
|
||||
if (output) {
|
||||
console.log(output);
|
||||
const output = data.toString().trim();
|
||||
const lines = output.replace(/\n+/g, "\n").replace(/^\n+|\n+$|\0/g, "");
|
||||
for (const line of lines.split("\n").filter(Boolean)) {
|
||||
console.info(line);
|
||||
}
|
||||
}
|
||||
});
|
||||
proc.stderr.on("data", (data) => {
|
||||
if (data) {
|
||||
const lines = data.toString().trim();
|
||||
const output = lines.replace(/\n+/g, "\n").replace(/^\n+|\n+$|\0/g, "");
|
||||
if (output) {
|
||||
const matches = output.match(/(\d{1,3})%/g);
|
||||
const output = data.toString().trim();
|
||||
const lines = output.replace(/\n+/g, "\n").replace(/^\n+|\n+$|\0/g, "");
|
||||
for (const line of lines.split("\n").filter(Boolean)) {
|
||||
const matches = line.match(/(\d{1,3})%/g);
|
||||
if (matches) {
|
||||
const match = Math.max(...matches.map((p) => parseInt(p)));
|
||||
const percent = Math.floor(match / 10) * 10;
|
||||
@@ -827,15 +914,84 @@ const execScriptCommand = (cmd, args = [], callback = null) => {
|
||||
});
|
||||
proc.on("close", (code) => {
|
||||
if (code !== 0) {
|
||||
console.log(`Script exited with error code ${code}.`);
|
||||
console.error(`Script exited with error code (${code}).`);
|
||||
if (typeof callback === "function") callback(null, code);
|
||||
} else {
|
||||
console.log("Script exited successfully.");
|
||||
console.info("Script exited successfully.");
|
||||
if (typeof callback === "function") callback(100, null);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Monitors a command asynchronously.
|
||||
*
|
||||
* @param {string} cmd - The command to monitor.
|
||||
* @param {Array<string>} args - The arguments for the command.
|
||||
* @param {Function} callback - A callback function that receives the output or error.
|
||||
* @returns {Object} The spawned process object.
|
||||
*/
|
||||
const commandMonitor = (cmd, args, callback) => {
|
||||
const proc = cpr.spawn(cmd, args);
|
||||
proc.stdout.on("data", (data) => {
|
||||
if (data) {
|
||||
const output = data.toString().trim().replace(/\0/g, "");
|
||||
if (typeof callback === "function") callback(output, null);
|
||||
}
|
||||
});
|
||||
proc.stderr.on("data", (data) => {
|
||||
if (data) {
|
||||
const output = data.toString().trim().replace(/\0/g, "");
|
||||
if (typeof callback === "function") callback(null, output);
|
||||
}
|
||||
});
|
||||
return proc;
|
||||
};
|
||||
|
||||
/**
|
||||
* Monitors D-Bus property changes asynchronously using `dbus-monitor`.
|
||||
*
|
||||
* @param {string} path - The D-Bus object path.
|
||||
* @param {Function} callback - A callback function that receives the changed property.
|
||||
* @returns {Object} The spawned process object.
|
||||
*/
|
||||
const dbusMonitor = (path, callback) => {
|
||||
const cmd = "dbus-monitor";
|
||||
const args = [`interface='org.freedesktop.DBus.Properties',member='PropertiesChanged',path='${path}'`];
|
||||
const proc = cpr.spawn(cmd, args);
|
||||
proc.stdout.on("data", (data) => {
|
||||
try {
|
||||
const signal = data.toString();
|
||||
if (signal.includes(`string "Visible"`)) {
|
||||
const dicts = [...signal.matchAll(/dict entry\(\s*([^)]*?)\)/g)].map((dict) => dict[1].trim());
|
||||
if (dicts.length) {
|
||||
dicts.forEach((dict) => {
|
||||
const key = dict.match(/string "(.*?)"/);
|
||||
const value = dict.match(/(?<=variant\s+)(.*)/);
|
||||
if (key && value) {
|
||||
const property = { [key[1].trim()]: value[1].trim().split(" ").pop() };
|
||||
if (typeof callback === "function") callback(property, null);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
const property = { Visible: `${HARDWARE.keyboard.visibility}` };
|
||||
if (typeof callback === "function") callback(property, null);
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("Monitor D-Bus:", error.message);
|
||||
if (typeof callback === "function") callback(null, error.message);
|
||||
}
|
||||
});
|
||||
proc.stderr.on("data", (data) => {
|
||||
if (data) {
|
||||
console.error("Monitor D-Bus:", data.toString());
|
||||
if (typeof callback === "function") callback(null, data.toString());
|
||||
}
|
||||
});
|
||||
return proc;
|
||||
};
|
||||
|
||||
/**
|
||||
* Executes a D-Bus method call synchronously using `dbus-send`.
|
||||
*
|
||||
@@ -858,48 +1014,6 @@ const dbusCall = (path, method, values, callback = null) => {
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Monitors D-Bus property changes asynchronously using `dbus-monitor`.
|
||||
*
|
||||
* @param {string} path - The D-Bus object path.
|
||||
* @param {Function} callback - A callback function that receives the changed property.
|
||||
* @returns {Object} The spawned process object.
|
||||
*/
|
||||
const dbusMonitor = (path, callback) => {
|
||||
const cmd = "dbus-monitor";
|
||||
const args = [`interface='org.freedesktop.DBus.Properties',member='PropertiesChanged',path='${path}'`];
|
||||
const proc = cpr.spawn(cmd, args);
|
||||
proc.stdout.on("data", (data) => {
|
||||
try {
|
||||
const signal = data.toString();
|
||||
if (signal.includes("member=PropertiesChanged") && signal.includes(`path=${path}`)) {
|
||||
const dicts = [...signal.matchAll(/dict entry\(\s*([^)]*?)\)/g)].map((dict) => dict[1].trim());
|
||||
if (dicts.length) {
|
||||
dicts.forEach((dict) => {
|
||||
const key = dict.match(/string "(.*?)"/);
|
||||
const value = dict.match(/(?<=variant\s+)(.*)/);
|
||||
if (key && value && typeof callback === "function") {
|
||||
callback({ [key[1].trim()]: value[1].trim().split(" ").pop() }, null);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
callback({ Visible: `${HARDWARE.keyboard.visibility}` }, null);
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("Monitor D-Bus:", error.message);
|
||||
if (typeof callback === "function") callback(null, error.message);
|
||||
}
|
||||
});
|
||||
proc.stderr.on("data", (data) => {
|
||||
if (data) {
|
||||
console.error("Monitor D-Bus:", data.toString());
|
||||
if (typeof callback === "function") callback(null, data.toString());
|
||||
}
|
||||
});
|
||||
return proc;
|
||||
};
|
||||
|
||||
/**
|
||||
* Helper function for asynchronous interval calls.
|
||||
*
|
||||
@@ -939,6 +1053,8 @@ module.exports = {
|
||||
setDisplayStatus,
|
||||
getDisplayBrightness,
|
||||
setDisplayBrightness,
|
||||
getAudioVolume,
|
||||
setAudioVolume,
|
||||
getKeyboardVisibility,
|
||||
setKeyboardVisibility,
|
||||
checkPackageUpgrades,
|
||||
|
||||
+327
-143
@@ -1,11 +1,9 @@
|
||||
const mqtt = require("mqtt");
|
||||
const hardware = require("./hardware");
|
||||
const { app } = require("electron");
|
||||
const Events = require("events");
|
||||
|
||||
global.INTEGRATION = global.INTEGRATION || {
|
||||
initialized: false,
|
||||
events: new Events(),
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -50,16 +48,22 @@ const init = async () => {
|
||||
configuration_url: APP.homepage,
|
||||
};
|
||||
|
||||
// Connection settings
|
||||
const options = user === null || password === null ? null : { username: user, password: password };
|
||||
const masked = password === null ? "null" : "*".repeat(password.length);
|
||||
console.log("MQTT Connecting:", `${user}:${masked}@${url.toString()}`);
|
||||
// Init options
|
||||
const masked = password === null ? null : "*".repeat(password.length);
|
||||
const options = user === null || password === null ? {} : { username: user, password: password };
|
||||
options.will = { topic: `${INTEGRATION.root}/kiosk/state`, payload: "Terminated", qos: 1, retain: true };
|
||||
options.rejectUnauthorized = !("ignore_certificate_errors" in ARGS);
|
||||
|
||||
// Client connect
|
||||
console.info("MQTT Connecting:", `${user}:${masked}@${url.toString()}`);
|
||||
INTEGRATION.client = mqtt.connect(url.toString(), options);
|
||||
INTEGRATION.client.setMaxListeners(20);
|
||||
|
||||
// Client connected
|
||||
INTEGRATION.client
|
||||
.once("connect", () => {
|
||||
console.log(`MQTT Connected: ${url.toString()}\n`);
|
||||
console.info(`MQTT Connected: ${url.toString()}`);
|
||||
process.stdout.write("\n");
|
||||
|
||||
// Init client controls
|
||||
initApp();
|
||||
@@ -67,7 +71,9 @@ const init = async () => {
|
||||
initReboot();
|
||||
initRefresh();
|
||||
initKiosk();
|
||||
initTheme();
|
||||
initDisplay();
|
||||
initVolume();
|
||||
initKeyboard();
|
||||
initPageNumber();
|
||||
initPageZoom();
|
||||
@@ -85,33 +91,54 @@ const init = async () => {
|
||||
initProcessorTemperature();
|
||||
initBatteryLevel();
|
||||
initPackageUpgrades();
|
||||
initHeartbeat();
|
||||
initLastActive();
|
||||
|
||||
// Init client diagnostic
|
||||
initHeartbeat();
|
||||
initErrors();
|
||||
initVersion();
|
||||
|
||||
// Integration initialized
|
||||
INTEGRATION.initialized = true;
|
||||
|
||||
// Register global events
|
||||
EVENTS.on("updateDisplay", () => {
|
||||
updateDisplay();
|
||||
updateLastActive();
|
||||
});
|
||||
EVENTS.on("updateStatus", updateKiosk);
|
||||
EVENTS.on("updateTheme", updateTheme);
|
||||
EVENTS.on("updateVolume", updateVolume);
|
||||
EVENTS.on("updateKeyboard", updateKeyboard);
|
||||
EVENTS.on("consoleLog", updateErrors);
|
||||
})
|
||||
.on("error", (error) => {
|
||||
console.error("MQTT", error.message);
|
||||
});
|
||||
|
||||
// Update sensor states from events
|
||||
HARDWARE.events.on("updateDisplay", updateDisplay);
|
||||
HARDWARE.events.on("updateKeyboard", updateKeyboard);
|
||||
|
||||
// Update time sensors periodically (30s)
|
||||
setInterval(() => {
|
||||
updateHeartbeat();
|
||||
if (APP.exiting) {
|
||||
return;
|
||||
}
|
||||
updateLastActive();
|
||||
updateHeartbeat();
|
||||
updateErrors();
|
||||
}, 30 * 1000);
|
||||
|
||||
// Update system sensors periodically (1min)
|
||||
setInterval(() => {
|
||||
if (APP.exiting) {
|
||||
return;
|
||||
}
|
||||
update();
|
||||
}, 60 * 1000);
|
||||
|
||||
// Update upgrade sensors periodically (1h)
|
||||
setInterval(() => {
|
||||
if (APP.exiting) {
|
||||
return;
|
||||
}
|
||||
updateApp();
|
||||
updatePackageUpgrades();
|
||||
}, 3600 * 1000);
|
||||
@@ -123,12 +150,11 @@ const init = async () => {
|
||||
* Updates the shared integration properties.
|
||||
*/
|
||||
const update = async () => {
|
||||
if (!INTEGRATION.initialized) {
|
||||
if (!INTEGRATION.initialized || APP.exiting) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Update client sensors
|
||||
updateKiosk();
|
||||
updatePageNumber();
|
||||
updatePageZoom();
|
||||
updatePageUrl();
|
||||
@@ -141,6 +167,22 @@ const update = async () => {
|
||||
updateBatteryLevel();
|
||||
};
|
||||
|
||||
/**
|
||||
* Removes the auto-discovery config via the mqtt connection.
|
||||
*
|
||||
* @param {string} type - The entity type name.
|
||||
* @param {Object} config - The configuration object.
|
||||
* @returns {Object} Instance of the mqtt client.
|
||||
*/
|
||||
const removeConfig = (type, config) => {
|
||||
if (type === null || config === null) {
|
||||
return INTEGRATION.client;
|
||||
}
|
||||
const path = config.unique_id.replace(`${INTEGRATION.node}_`, "");
|
||||
const root = `${INTEGRATION.discovery}/${type}/${INTEGRATION.node}/${path}/config`;
|
||||
return INTEGRATION.client.publish(root, JSON.stringify({}), { qos: 1, retain: true });
|
||||
};
|
||||
|
||||
/**
|
||||
* Publishes the auto-discovery config via the mqtt connection.
|
||||
*
|
||||
@@ -191,26 +233,31 @@ const publishState = (path, state) => {
|
||||
* Initializes the app update entity and handles the execute logic.
|
||||
*/
|
||||
const initApp = () => {
|
||||
if (!HARDWARE.support.appUpdate) {
|
||||
return;
|
||||
}
|
||||
const root = `${INTEGRATION.root}/app`;
|
||||
const config = {
|
||||
name: "App",
|
||||
unique_id: `${INTEGRATION.node}_app`,
|
||||
command_topic: `${root}/install`,
|
||||
state_topic: `${root}/version/state`,
|
||||
payload_install: "update",
|
||||
payload_install: "app_early" in ARGS ? "update early" : "update",
|
||||
device: INTEGRATION.device,
|
||||
};
|
||||
if (!HARDWARE.support.appUpdate) {
|
||||
removeConfig("update", config);
|
||||
return;
|
||||
}
|
||||
publishConfig("update", config)
|
||||
.on("message", (topic, message) => {
|
||||
if (topic === config.command_topic) {
|
||||
console.log("Update App...");
|
||||
hardware.setDisplayStatus("ON");
|
||||
const args = ["-c", `bash <(wget -qO- ${APP.scripts.install}) update`];
|
||||
hardware.execScriptCommand("bash", args, (progress, error) => {
|
||||
updateApp(progress);
|
||||
console.info("Update App...");
|
||||
hardware.setDisplayStatus("ON", () => {
|
||||
const args = ["-c", `bash <(wget -qO- ${APP.scripts.install}) ${message.toString()}`];
|
||||
hardware.execScriptCommand("bash", args, (progress, error) => {
|
||||
if (progress) {
|
||||
console.info(`Progress: ${progress}%`);
|
||||
}
|
||||
updateApp(progress);
|
||||
});
|
||||
});
|
||||
}
|
||||
})
|
||||
@@ -223,14 +270,15 @@ const initApp = () => {
|
||||
*/
|
||||
const updateApp = async (progress = 0) => {
|
||||
const latest = APP.releases.latest;
|
||||
if (!latest) {
|
||||
if (!HARDWARE.support.appUpdate || !latest || !latest.summary) {
|
||||
return;
|
||||
}
|
||||
const summary = latest.summary.length > 250 ? latest.summary.slice(0, 250) + "..." : latest.summary;
|
||||
const version = {
|
||||
title: latest.title,
|
||||
latest_version: latest.version,
|
||||
installed_version: APP.version,
|
||||
release_summary: latest.summary.slice(0, 250) + "...",
|
||||
release_summary: summary,
|
||||
release_url: latest.url,
|
||||
update_percentage: progress || null,
|
||||
in_progress: progress && progress > 0 && progress < 100,
|
||||
@@ -242,9 +290,6 @@ const updateApp = async (progress = 0) => {
|
||||
* Initializes the shutdown button and handles the execute logic.
|
||||
*/
|
||||
const initShutdown = () => {
|
||||
if (!HARDWARE.support.sudoRights) {
|
||||
return;
|
||||
}
|
||||
const root = `${INTEGRATION.root}/shutdown`;
|
||||
const config = {
|
||||
name: "Shutdown",
|
||||
@@ -253,12 +298,17 @@ const initShutdown = () => {
|
||||
icon: "mdi:power",
|
||||
device: INTEGRATION.device,
|
||||
};
|
||||
if (!HARDWARE.support.sudoRights) {
|
||||
removeConfig("button", config);
|
||||
return;
|
||||
}
|
||||
publishConfig("button", config)
|
||||
.on("message", (topic, message) => {
|
||||
if (topic === config.command_topic) {
|
||||
console.log("Shutdown system...");
|
||||
hardware.setDisplayStatus("ON");
|
||||
hardware.shutdownSystem();
|
||||
console.verbose("Shutdown system...");
|
||||
hardware.setDisplayStatus("ON", () => {
|
||||
hardware.shutdownSystem();
|
||||
});
|
||||
}
|
||||
})
|
||||
.subscribe(config.command_topic);
|
||||
@@ -268,9 +318,6 @@ const initShutdown = () => {
|
||||
* Initializes the reboot button and handles the execute logic.
|
||||
*/
|
||||
const initReboot = () => {
|
||||
if (!HARDWARE.support.sudoRights) {
|
||||
return;
|
||||
}
|
||||
const root = `${INTEGRATION.root}/reboot`;
|
||||
const config = {
|
||||
name: "Reboot",
|
||||
@@ -279,12 +326,17 @@ const initReboot = () => {
|
||||
icon: "mdi:restart",
|
||||
device: INTEGRATION.device,
|
||||
};
|
||||
if (!HARDWARE.support.sudoRights) {
|
||||
removeConfig("button", config);
|
||||
return;
|
||||
}
|
||||
publishConfig("button", config)
|
||||
.on("message", (topic, message) => {
|
||||
if (topic === config.command_topic) {
|
||||
console.log("Rebooting system...");
|
||||
hardware.setDisplayStatus("ON");
|
||||
hardware.rebootSystem();
|
||||
console.verbose("Rebooting system...");
|
||||
hardware.setDisplayStatus("ON", () => {
|
||||
hardware.rebootSystem();
|
||||
});
|
||||
}
|
||||
})
|
||||
.subscribe(config.command_topic);
|
||||
@@ -305,9 +357,10 @@ const initRefresh = () => {
|
||||
publishConfig("button", config)
|
||||
.on("message", (topic, message) => {
|
||||
if (topic === config.command_topic) {
|
||||
console.log("Refreshing webview...");
|
||||
hardware.setDisplayStatus("ON");
|
||||
WEBVIEW.events.emit("reloadView");
|
||||
console.verbose("Refreshing webview...");
|
||||
hardware.setDisplayStatus("ON", () => {
|
||||
EVENTS.emit("reloadView");
|
||||
});
|
||||
}
|
||||
})
|
||||
.subscribe(config.command_topic);
|
||||
@@ -332,32 +385,10 @@ const initKiosk = () => {
|
||||
.on("message", (topic, message) => {
|
||||
if (topic === config.command_topic) {
|
||||
const status = message.toString();
|
||||
console.log("Set Kiosk Status:", status);
|
||||
hardware.setDisplayStatus("ON");
|
||||
switch (status) {
|
||||
case "Framed":
|
||||
WEBVIEW.window.restore();
|
||||
WEBVIEW.window.unmaximize();
|
||||
WEBVIEW.window.setFullScreen(false);
|
||||
break;
|
||||
case "Fullscreen":
|
||||
WEBVIEW.window.restore();
|
||||
WEBVIEW.window.unmaximize();
|
||||
WEBVIEW.window.setFullScreen(true);
|
||||
break;
|
||||
case "Maximized":
|
||||
WEBVIEW.window.restore();
|
||||
WEBVIEW.window.setFullScreen(false);
|
||||
WEBVIEW.window.maximize();
|
||||
break;
|
||||
case "Minimized":
|
||||
WEBVIEW.window.restore();
|
||||
WEBVIEW.window.setFullScreen(false);
|
||||
WEBVIEW.window.minimize();
|
||||
break;
|
||||
case "Terminated":
|
||||
app.quit();
|
||||
}
|
||||
console.verbose("Set Kiosk Status:", status);
|
||||
hardware.setDisplayStatus("ON", () => {
|
||||
WEBVIEW.window.setStatus(status);
|
||||
});
|
||||
}
|
||||
})
|
||||
.subscribe(config.command_topic);
|
||||
@@ -368,17 +399,49 @@ const initKiosk = () => {
|
||||
* Updates the kiosk status via the mqtt connection.
|
||||
*/
|
||||
const updateKiosk = async () => {
|
||||
const kiosk = WEBVIEW.status;
|
||||
const kiosk = WEBVIEW.tracker.window.status;
|
||||
publishState("kiosk", kiosk);
|
||||
};
|
||||
|
||||
/**
|
||||
* Initializes the application theme and handles the execute logic.
|
||||
*/
|
||||
const initTheme = () => {
|
||||
const root = `${INTEGRATION.root}/theme`;
|
||||
const config = {
|
||||
name: "Theme",
|
||||
unique_id: `${INTEGRATION.node}_theme`,
|
||||
command_topic: `${root}/set`,
|
||||
state_topic: `${root}/state`,
|
||||
value_template: "{{ value }}",
|
||||
options: ["Light", "Dark"],
|
||||
icon: "mdi:compare",
|
||||
device: INTEGRATION.device,
|
||||
};
|
||||
publishConfig("select", config)
|
||||
.on("message", (topic, message) => {
|
||||
if (topic === config.command_topic) {
|
||||
const theme = message.toString();
|
||||
console.verbose("Set Application Theme:", theme);
|
||||
WEBVIEW.theme.set(theme);
|
||||
}
|
||||
})
|
||||
.subscribe(config.command_topic);
|
||||
updateTheme();
|
||||
};
|
||||
|
||||
/**
|
||||
* Updates the application theme via the mqtt connection.
|
||||
*/
|
||||
const updateTheme = async () => {
|
||||
const theme = WEBVIEW.theme.get();
|
||||
publishState("theme", theme.charAt(0).toUpperCase() + theme.slice(1));
|
||||
};
|
||||
|
||||
/**
|
||||
* Initializes the display status, brightness and handles the execute logic.
|
||||
*/
|
||||
const initDisplay = () => {
|
||||
if (!HARDWARE.support.displayStatus) {
|
||||
return;
|
||||
}
|
||||
const root = `${INTEGRATION.root}/display`;
|
||||
const config = {
|
||||
name: "Display",
|
||||
@@ -394,26 +457,30 @@ const initDisplay = () => {
|
||||
brightness_scale: 100,
|
||||
}),
|
||||
};
|
||||
if (!HARDWARE.support.displayStatus) {
|
||||
removeConfig("light", config);
|
||||
return;
|
||||
}
|
||||
publishConfig("light", config)
|
||||
.on("message", (topic, message) => {
|
||||
if (topic === config.command_topic) {
|
||||
const status = message.toString();
|
||||
console.log("Set Display Status:", status);
|
||||
console.verbose("Set Display Status:", status);
|
||||
hardware.setDisplayStatus(status, (reply, error) => {
|
||||
if (error) {
|
||||
console.warn("Failed:", error);
|
||||
} else {
|
||||
if (!error) {
|
||||
hardware.update();
|
||||
} else {
|
||||
console.warn("Command Failed:", error);
|
||||
}
|
||||
});
|
||||
} else if (topic === config.brightness_command_topic) {
|
||||
const brightness = parseInt(message, 10);
|
||||
console.log("Set Display Brightness:", brightness);
|
||||
console.verbose("Set Display Brightness:", brightness);
|
||||
hardware.setDisplayBrightness(brightness, (reply, error) => {
|
||||
if (error) {
|
||||
console.warn("Failed:", error);
|
||||
} else {
|
||||
if (!error) {
|
||||
hardware.update();
|
||||
} else {
|
||||
console.warn("Command Failed:", error);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -433,13 +500,52 @@ const updateDisplay = async () => {
|
||||
publishState("display/brightness", brightness);
|
||||
};
|
||||
|
||||
/**
|
||||
* Initializes the audio volume and handles the execute logic.
|
||||
*/
|
||||
const initVolume = () => {
|
||||
const root = `${INTEGRATION.root}/volume`;
|
||||
const config = {
|
||||
name: "Volume",
|
||||
unique_id: `${INTEGRATION.node}_volume`,
|
||||
command_topic: `${root}/set`,
|
||||
state_topic: `${root}/state`,
|
||||
value_template: "{{ value | int }}",
|
||||
mode: "slider",
|
||||
min: 0,
|
||||
max: 100,
|
||||
unit_of_measurement: "%",
|
||||
icon: "mdi:volume-high",
|
||||
device: INTEGRATION.device,
|
||||
};
|
||||
if (!HARDWARE.support.audioVolume) {
|
||||
removeConfig("number", config);
|
||||
return;
|
||||
}
|
||||
publishConfig("number", config)
|
||||
.on("message", (topic, message) => {
|
||||
if (topic === config.command_topic) {
|
||||
const volume = parseInt(message, 10);
|
||||
console.verbose("Set Audio Volume:", volume);
|
||||
hardware.setAudioVolume(volume);
|
||||
}
|
||||
})
|
||||
.subscribe(config.command_topic);
|
||||
updateVolume();
|
||||
};
|
||||
|
||||
/**
|
||||
* Updates the audio volume via the mqtt connection.
|
||||
*/
|
||||
const updateVolume = async () => {
|
||||
const volume = hardware.getAudioVolume();
|
||||
publishState("volume", volume);
|
||||
};
|
||||
|
||||
/**
|
||||
* Initializes the keyboard visibility and handles the execute logic.
|
||||
*/
|
||||
const initKeyboard = () => {
|
||||
if (!HARDWARE.support.keyboardVisibility) {
|
||||
return;
|
||||
}
|
||||
const root = `${INTEGRATION.root}/keyboard`;
|
||||
const config = {
|
||||
name: "Keyboard",
|
||||
@@ -449,24 +555,18 @@ const initKeyboard = () => {
|
||||
icon: "mdi:keyboard-close-outline",
|
||||
device: INTEGRATION.device,
|
||||
};
|
||||
if (!HARDWARE.support.keyboardVisibility) {
|
||||
removeConfig("switch", config);
|
||||
return;
|
||||
}
|
||||
publishConfig("switch", config)
|
||||
.on("message", (topic, message) => {
|
||||
if (topic === config.command_topic) {
|
||||
const status = message.toString();
|
||||
console.log("Set Keyboard Visibility:", status);
|
||||
hardware.setKeyboardVisibility(status);
|
||||
switch (status) {
|
||||
case "OFF":
|
||||
WEBVIEW.window.restore();
|
||||
WEBVIEW.window.unmaximize();
|
||||
WEBVIEW.window.setFullScreen(true);
|
||||
break;
|
||||
case "ON":
|
||||
WEBVIEW.window.restore();
|
||||
WEBVIEW.window.setFullScreen(false);
|
||||
WEBVIEW.window.maximize();
|
||||
break;
|
||||
}
|
||||
console.verbose("Set Keyboard Visibility:", status);
|
||||
hardware.setDisplayStatus("ON", () => {
|
||||
hardware.setKeyboardVisibility(status);
|
||||
});
|
||||
}
|
||||
})
|
||||
.subscribe(config.command_topic);
|
||||
@@ -485,9 +585,6 @@ const updateKeyboard = async () => {
|
||||
* Initializes the page number and handles the execute logic.
|
||||
*/
|
||||
const initPageNumber = () => {
|
||||
if (WEBVIEW.viewUrls.length <= 2) {
|
||||
return;
|
||||
}
|
||||
const root = `${INTEGRATION.root}/page_number`;
|
||||
const config = {
|
||||
name: "Page Number",
|
||||
@@ -502,13 +599,17 @@ const initPageNumber = () => {
|
||||
icon: "mdi:page-next",
|
||||
device: INTEGRATION.device,
|
||||
};
|
||||
if (WEBVIEW.viewUrls.length <= 2) {
|
||||
removeConfig("number", config);
|
||||
return;
|
||||
}
|
||||
publishConfig("number", config)
|
||||
.on("message", (topic, message) => {
|
||||
if (topic === config.command_topic) {
|
||||
const number = parseInt(message, 10);
|
||||
console.log("Set Page Number:", number);
|
||||
console.verbose("Set Page Number:", number);
|
||||
WEBVIEW.viewActive = number || 1;
|
||||
WEBVIEW.events.emit("updateView");
|
||||
EVENTS.emit("updateView");
|
||||
}
|
||||
})
|
||||
.subscribe(config.command_topic);
|
||||
@@ -519,7 +620,7 @@ const initPageNumber = () => {
|
||||
* Updates the page number via the mqtt connection.
|
||||
*/
|
||||
const updatePageNumber = async () => {
|
||||
const pageNumber = WEBVIEW.viewActive || 1;
|
||||
const pageNumber = WEBVIEW.viewUrls.length <= 2 ? null : WEBVIEW.viewActive || 1;
|
||||
publishState("page_number", pageNumber);
|
||||
};
|
||||
|
||||
@@ -534,9 +635,10 @@ const initPageZoom = () => {
|
||||
command_topic: `${root}/set`,
|
||||
state_topic: `${root}/state`,
|
||||
value_template: "{{ value | int }}",
|
||||
mode: "slider",
|
||||
mode: "box",
|
||||
min: 25,
|
||||
max: 400,
|
||||
step: 5,
|
||||
unit_of_measurement: "%",
|
||||
icon: "mdi:magnify-plus",
|
||||
device: INTEGRATION.device,
|
||||
@@ -545,9 +647,9 @@ const initPageZoom = () => {
|
||||
.on("message", (topic, message) => {
|
||||
if (topic === config.command_topic) {
|
||||
const zoom = parseInt(message, 10);
|
||||
console.log("Set Page Zoom:", zoom);
|
||||
console.verbose("Set Page Zoom:", zoom);
|
||||
WEBVIEW.views[WEBVIEW.viewActive || 1].webContents.setZoomFactor(zoom / 100.0);
|
||||
WEBVIEW.events.emit("updateView");
|
||||
EVENTS.emit("updateView");
|
||||
}
|
||||
})
|
||||
.subscribe(config.command_topic);
|
||||
@@ -581,7 +683,7 @@ const initPageUrl = () => {
|
||||
.on("message", (topic, message) => {
|
||||
if (topic === config.command_topic) {
|
||||
const url = message.toString();
|
||||
console.log("Set Page Url:", url);
|
||||
console.verbose("Set Page Url:", url);
|
||||
WEBVIEW.views[WEBVIEW.viewActive || 1].webContents.loadURL(url);
|
||||
}
|
||||
})
|
||||
@@ -715,6 +817,7 @@ const initUpTime = () => {
|
||||
name: "Up Time",
|
||||
unique_id: `${INTEGRATION.node}_up_time`,
|
||||
state_topic: `${root}/state`,
|
||||
json_attributes_topic: `${root}/attributes`,
|
||||
value_template: "{{ (value | float) | round(0) }}",
|
||||
unit_of_measurement: "min",
|
||||
icon: "mdi:timeline-clock",
|
||||
@@ -729,7 +832,11 @@ const initUpTime = () => {
|
||||
*/
|
||||
const updateUpTime = async () => {
|
||||
const upTime = hardware.getUpTime();
|
||||
const bootTime = {
|
||||
boot: new Date(new Date().getTime() - upTime * 60 * 1000),
|
||||
};
|
||||
publishState("up_time", upTime);
|
||||
publishAttributes("up_time", bootTime);
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -840,9 +947,6 @@ const updateProcessorTemperature = async () => {
|
||||
* Initializes the battery level sensor.
|
||||
*/
|
||||
const initBatteryLevel = () => {
|
||||
if (!HARDWARE.support.batteryLevel) {
|
||||
return;
|
||||
}
|
||||
const root = `${INTEGRATION.root}/battery_level`;
|
||||
const config = {
|
||||
name: "Battery Level",
|
||||
@@ -853,6 +957,10 @@ const initBatteryLevel = () => {
|
||||
icon: "mdi:battery-medium",
|
||||
device: INTEGRATION.device,
|
||||
};
|
||||
if (!HARDWARE.support.batteryLevel) {
|
||||
removeConfig("sensor", config);
|
||||
return;
|
||||
}
|
||||
publishConfig("sensor", config);
|
||||
updateBatteryLevel();
|
||||
};
|
||||
@@ -888,39 +996,14 @@ const initPackageUpgrades = () => {
|
||||
*/
|
||||
const updatePackageUpgrades = async () => {
|
||||
const packages = hardware.checkPackageUpgrades();
|
||||
const attributes = {
|
||||
total: packages.length,
|
||||
packages: packages.map((pkg) => pkg.replace(/\s*\[.*?\]\s*/g, "").trim()),
|
||||
const upgrades = {
|
||||
packages: packages.map((pkg) => {
|
||||
const [name, version] = pkg.replace(/\s*\[.*?\]\s*/g, "").split(/\s+/, 2);
|
||||
return { [name]: version };
|
||||
}),
|
||||
};
|
||||
publishState("package_upgrades", attributes.total);
|
||||
publishAttributes("package_upgrades", attributes);
|
||||
};
|
||||
|
||||
/**
|
||||
* Initializes the heartbeat sensor.
|
||||
*/
|
||||
const initHeartbeat = () => {
|
||||
const root = `${INTEGRATION.root}/heartbeat`;
|
||||
const config = {
|
||||
name: "Heartbeat",
|
||||
unique_id: `${INTEGRATION.node}_heartbeat`,
|
||||
state_topic: `${root}/state`,
|
||||
value_template: "{{ value }}",
|
||||
icon: "mdi:heart-flash",
|
||||
device: INTEGRATION.device,
|
||||
};
|
||||
publishConfig("sensor", config);
|
||||
updateHeartbeat();
|
||||
};
|
||||
|
||||
/**
|
||||
* Updates the heartbeat sensor via the mqtt connection.
|
||||
*/
|
||||
const updateHeartbeat = async () => {
|
||||
const now = new Date();
|
||||
const local = new Date(now.getTime() - now.getTimezoneOffset() * 60 * 1000);
|
||||
const heartbeat = local.toISOString().replace(/\.\d{3}Z$/, "");
|
||||
publishState("heartbeat", heartbeat);
|
||||
publishState("package_upgrades", packages.length);
|
||||
publishAttributes("package_upgrades", upgrades);
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -932,6 +1015,7 @@ const initLastActive = () => {
|
||||
name: "Last Active",
|
||||
unique_id: `${INTEGRATION.node}_last_active`,
|
||||
state_topic: `${root}/state`,
|
||||
json_attributes_topic: `${root}/attributes`,
|
||||
value_template: "{{ (value | float) | round(0) }}",
|
||||
unit_of_measurement: "min",
|
||||
icon: "mdi:gesture-tap-hold",
|
||||
@@ -946,9 +1030,109 @@ const initLastActive = () => {
|
||||
*/
|
||||
const updateLastActive = async () => {
|
||||
const now = new Date();
|
||||
const then = WEBVIEW.pointer.time;
|
||||
const lastActive = Math.abs(now - then) / (1000 * 60);
|
||||
const then = WEBVIEW.tracker.pointer.time;
|
||||
const lastActive = (now - then) / (1000 * 60);
|
||||
const tracker = {
|
||||
...WEBVIEW.tracker.pointer.position,
|
||||
...WEBVIEW.tracker.display,
|
||||
};
|
||||
publishState("last_active", lastActive);
|
||||
publishAttributes("last_active", tracker);
|
||||
};
|
||||
|
||||
/**
|
||||
* Initializes the heartbeat sensor.
|
||||
*/
|
||||
const initHeartbeat = () => {
|
||||
const root = `${INTEGRATION.root}/heartbeat`;
|
||||
const config = {
|
||||
name: "Heartbeat",
|
||||
unique_id: `${INTEGRATION.node}_heartbeat`,
|
||||
state_topic: `${root}/state`,
|
||||
json_attributes_topic: `${root}/attributes`,
|
||||
value_template: "{{ value }}",
|
||||
entity_category: "diagnostic",
|
||||
icon: "mdi:heart-flash",
|
||||
device: INTEGRATION.device,
|
||||
};
|
||||
publishConfig("sensor", config);
|
||||
updateHeartbeat();
|
||||
};
|
||||
|
||||
/**
|
||||
* Updates the heartbeat sensor via the mqtt connection.
|
||||
*/
|
||||
const updateHeartbeat = async () => {
|
||||
const now = new Date();
|
||||
const local = new Date(now.getTime() - now.getTimezoneOffset() * 60 * 1000);
|
||||
const heartbeat = local.toISOString().replace(/\.\d{3}Z$/, "");
|
||||
const attributes = { date: now };
|
||||
publishState("heartbeat", heartbeat);
|
||||
publishAttributes("heartbeat", attributes);
|
||||
};
|
||||
|
||||
/**
|
||||
* Initializes the error log sensor.
|
||||
*/
|
||||
const initErrors = () => {
|
||||
const root = `${INTEGRATION.root}/errors`;
|
||||
const config = {
|
||||
name: "Errors",
|
||||
unique_id: `${INTEGRATION.node}_errors`,
|
||||
state_topic: `${root}/state`,
|
||||
json_attributes_topic: `${root}/attributes`,
|
||||
value_template: "{{ value | int }}",
|
||||
entity_category: "diagnostic",
|
||||
icon: "mdi:alert-circle",
|
||||
device: INTEGRATION.device,
|
||||
};
|
||||
publishConfig("sensor", config);
|
||||
updateErrors();
|
||||
};
|
||||
|
||||
/**
|
||||
* Updates the error log sensor via the mqtt connection.
|
||||
*/
|
||||
const updateErrors = async () => {
|
||||
const logs = APP.logs.slice().reverse();
|
||||
const errors = logs.filter((log) => log.level === "error");
|
||||
const history = logs.reduce((acc, log) => {
|
||||
const time = log.time.toISOString().slice(0, 16);
|
||||
if (!acc[time]) {
|
||||
acc[time] = [];
|
||||
}
|
||||
acc[time].push({ [log.level.toUpperCase()]: log.text });
|
||||
return acc;
|
||||
}, {});
|
||||
publishState("errors", errors.length);
|
||||
publishAttributes("errors", history);
|
||||
};
|
||||
|
||||
/**
|
||||
* Initializes the version sensor.
|
||||
*/
|
||||
const initVersion = () => {
|
||||
const root = `${INTEGRATION.root}/version`;
|
||||
const config = {
|
||||
name: "Version",
|
||||
unique_id: `${INTEGRATION.node}_version`,
|
||||
state_topic: `${root}/state`,
|
||||
json_attributes_topic: `${root}/attributes`,
|
||||
value_template: "{{ value }}",
|
||||
entity_category: "diagnostic",
|
||||
icon: "mdi:application-braces",
|
||||
device: INTEGRATION.device,
|
||||
};
|
||||
publishConfig("sensor", config);
|
||||
updateVersion();
|
||||
};
|
||||
|
||||
/**
|
||||
* Updates the version sensor via the mqtt connection.
|
||||
*/
|
||||
const updateVersion = async () => {
|
||||
publishState("version", APP.version);
|
||||
publishAttributes("version", APP.build);
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
|
||||
+453
-183
@@ -1,17 +1,34 @@
|
||||
const path = require("path");
|
||||
const axios = require("axios");
|
||||
const https = require("https");
|
||||
const hardware = require("./hardware");
|
||||
const integration = require("./integration");
|
||||
const { app, nativeTheme, globalShortcut, ipcMain, session, BaseWindow, WebContentsView } = require("electron");
|
||||
const Events = require("events");
|
||||
const {
|
||||
app,
|
||||
nativeTheme,
|
||||
globalShortcut,
|
||||
ipcMain,
|
||||
dialog,
|
||||
screen,
|
||||
session,
|
||||
BaseWindow,
|
||||
WebContentsView,
|
||||
} = require("electron");
|
||||
|
||||
global.WEBVIEW = global.WEBVIEW || {
|
||||
initialized: false,
|
||||
events: new Events(),
|
||||
status: null,
|
||||
locked: false,
|
||||
pointer: {
|
||||
time: new Date(),
|
||||
tracker: {
|
||||
display: {},
|
||||
pointer: {
|
||||
position: {},
|
||||
time: new Date(),
|
||||
},
|
||||
window: {
|
||||
status: null,
|
||||
},
|
||||
widget: {
|
||||
focused: null,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -32,7 +49,7 @@ const init = async () => {
|
||||
session.defaultSession.clearCache();
|
||||
|
||||
// Parse arguments
|
||||
const fullscreen = ARGS.app_debug !== "true";
|
||||
const debug = "app_debug" in ARGS;
|
||||
const widget = ARGS.web_widget ? ARGS.web_widget === "true" : true;
|
||||
const zoom = !isNaN(parseFloat(ARGS.web_zoom)) ? parseFloat(ARGS.web_zoom) : 1.25;
|
||||
const theme = ["light", "dark"].includes(ARGS.web_theme) ? ARGS.web_theme : "dark";
|
||||
@@ -42,26 +59,52 @@ const init = async () => {
|
||||
WEBVIEW.viewActive = 0;
|
||||
WEBVIEW.viewUrls = urls;
|
||||
WEBVIEW.viewZoom = zoom;
|
||||
WEBVIEW.viewTheme = theme;
|
||||
WEBVIEW.statusEnabled = true;
|
||||
WEBVIEW.pagerEnabled = widget;
|
||||
WEBVIEW.widgetTheme = theme;
|
||||
WEBVIEW.widgetEnabled = widget;
|
||||
WEBVIEW.navigationTheme = theme;
|
||||
WEBVIEW.navigationEnabled = widget;
|
||||
nativeTheme.themeSource = WEBVIEW.viewTheme;
|
||||
WEBVIEW.events.on("reloadView", reloadView);
|
||||
WEBVIEW.events.on("updateView", updateView);
|
||||
|
||||
// Init global theme
|
||||
WEBVIEW.theme = {
|
||||
set: (name) => {
|
||||
nativeTheme.themeSource = name.toLowerCase();
|
||||
},
|
||||
get: () => {
|
||||
return nativeTheme.shouldUseDarkColors ? "dark" : "light";
|
||||
},
|
||||
toggle: () => {
|
||||
nativeTheme.themeSource = nativeTheme.shouldUseDarkColors ? "light" : "dark";
|
||||
},
|
||||
register: () => {
|
||||
nativeTheme.on("updated", () => {
|
||||
const theme = WEBVIEW.theme.get();
|
||||
WEBVIEW.statusTheme = theme;
|
||||
WEBVIEW.widgetTheme = theme;
|
||||
WEBVIEW.navigationTheme = theme;
|
||||
if (WEBVIEW.initialized) {
|
||||
resizeView();
|
||||
}
|
||||
EVENTS.emit("updateTheme");
|
||||
});
|
||||
},
|
||||
};
|
||||
WEBVIEW.theme.register();
|
||||
WEBVIEW.theme.set(theme);
|
||||
|
||||
// Init global root window
|
||||
WEBVIEW.display = screen.getPrimaryDisplay().workAreaSize;
|
||||
WEBVIEW.window = new BaseWindow({
|
||||
title: APP.title,
|
||||
icon: path.join(APP.path, "img", "icon.png"),
|
||||
icon: APP.icon,
|
||||
fullscreen: !debug,
|
||||
autoHideMenuBar: true,
|
||||
frame: debug || !WEBVIEW.statusEnabled,
|
||||
width: Math.floor(WEBVIEW.display.width * 0.9),
|
||||
height: Math.floor(WEBVIEW.display.height * 0.9),
|
||||
minWidth: 136,
|
||||
minHeight: 136,
|
||||
});
|
||||
WEBVIEW.window.setMenuBarVisibility(false);
|
||||
WEBVIEW.window.setFullScreen(fullscreen);
|
||||
if (!fullscreen) {
|
||||
WEBVIEW.window.maximize();
|
||||
}
|
||||
|
||||
// Init global webview
|
||||
WEBVIEW.views = [];
|
||||
@@ -105,6 +148,18 @@ const init = async () => {
|
||||
WEBVIEW.window.contentView.addChildView(WEBVIEW.widget);
|
||||
WEBVIEW.widget.webContents.loadFile(path.join(APP.path, "html", "widget.html"));
|
||||
|
||||
// Init global status
|
||||
WEBVIEW.status = new WebContentsView({
|
||||
transparent: true,
|
||||
webPreferences: {
|
||||
nodeIntegration: true,
|
||||
contextIsolation: false,
|
||||
},
|
||||
});
|
||||
WEBVIEW.status.setBackgroundColor("#00000000");
|
||||
WEBVIEW.window.contentView.addChildView(WEBVIEW.status);
|
||||
WEBVIEW.status.webContents.loadFile(path.join(APP.path, "html", "status.html"));
|
||||
|
||||
// Init global navigation
|
||||
WEBVIEW.navigation = new WebContentsView({
|
||||
transparent: true,
|
||||
@@ -117,9 +172,10 @@ const init = async () => {
|
||||
WEBVIEW.window.contentView.addChildView(WEBVIEW.navigation);
|
||||
WEBVIEW.navigation.webContents.loadFile(path.join(APP.path, "html", "navigation.html"));
|
||||
|
||||
// Register events
|
||||
// Register global events
|
||||
await windowEvents();
|
||||
await widgetEvents();
|
||||
await statusEvents();
|
||||
await navigationEvents();
|
||||
await viewEvents();
|
||||
await appEvents();
|
||||
@@ -131,20 +187,12 @@ const init = async () => {
|
||||
* Updates the shared webview properties.
|
||||
*/
|
||||
const update = async () => {
|
||||
if (!WEBVIEW.initialized) {
|
||||
if (!WEBVIEW.initialized || APP.exiting) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Update windows status
|
||||
if (WEBVIEW.window.isFullScreen()) {
|
||||
WEBVIEW.status = "Fullscreen";
|
||||
} else if (WEBVIEW.window.isMinimized()) {
|
||||
WEBVIEW.status = "Minimized";
|
||||
} else if (WEBVIEW.window.isMaximized()) {
|
||||
WEBVIEW.status = "Maximized";
|
||||
} else {
|
||||
WEBVIEW.status = "Framed";
|
||||
}
|
||||
// Update window status
|
||||
updateStatus();
|
||||
|
||||
// Update widget status
|
||||
updateWidget();
|
||||
@@ -153,7 +201,6 @@ const update = async () => {
|
||||
updateNavigation();
|
||||
|
||||
// Update integration sensor
|
||||
console.log("Update Kiosk Status:", WEBVIEW.status);
|
||||
integration.update();
|
||||
};
|
||||
|
||||
@@ -167,9 +214,13 @@ const updateView = () => {
|
||||
const url = WEBVIEW.views[WEBVIEW.viewActive].webContents.getURL();
|
||||
const host = url.startsWith("data:") ? "whoopsie" : new URL(url).host;
|
||||
const title = `${APP.title} - ${host} (${WEBVIEW.viewActive})`;
|
||||
const previous = WEBVIEW.window.getTitle();
|
||||
|
||||
// Update window title
|
||||
console.log(`Update View: ${title}`);
|
||||
if (previous !== title) {
|
||||
console.info(`Update View: ${title}`);
|
||||
}
|
||||
WEBVIEW.status.webContents.send("text-content", { id: "title", content: title });
|
||||
WEBVIEW.window.setTitle(title);
|
||||
|
||||
// Hide all other webviews and show only the active one
|
||||
@@ -179,10 +230,40 @@ const updateView = () => {
|
||||
update();
|
||||
};
|
||||
|
||||
/**
|
||||
* Updates the window status.
|
||||
*/
|
||||
const updateStatus = () => {
|
||||
const previous = WEBVIEW.tracker.window.status;
|
||||
|
||||
// Set window status
|
||||
if (WEBVIEW.window.isFullScreen()) {
|
||||
WEBVIEW.tracker.window.status = "Fullscreen";
|
||||
} else if (WEBVIEW.window.isMinimized()) {
|
||||
WEBVIEW.tracker.window.status = "Minimized";
|
||||
} else if (WEBVIEW.window.isMaximized()) {
|
||||
WEBVIEW.tracker.window.status = "Maximized";
|
||||
} else {
|
||||
WEBVIEW.tracker.window.status = "Framed";
|
||||
}
|
||||
|
||||
// Update window status
|
||||
if (previous !== WEBVIEW.tracker.window.status) {
|
||||
console.info(`Update Kiosk Status: ${WEBVIEW.tracker.window.status}`);
|
||||
}
|
||||
EVENTS.emit("updateStatus");
|
||||
};
|
||||
|
||||
/**
|
||||
* Updates the widget control.
|
||||
*/
|
||||
const updateWidget = () => {
|
||||
// Hide status button
|
||||
WEBVIEW.widget.webContents.send("button-hidden", {
|
||||
id: "fullscreen",
|
||||
hidden: !WEBVIEW.statusEnabled,
|
||||
});
|
||||
|
||||
// Hide keyboard button
|
||||
WEBVIEW.widget.webContents.send("button-hidden", {
|
||||
id: "keyboard",
|
||||
@@ -230,6 +311,10 @@ const updateNavigation = () => {
|
||||
text: currentUrl.startsWith("data:") ? "" : currentUrl,
|
||||
placeholder: defaultUrl.startsWith("data:") ? "" : defaultUrl,
|
||||
});
|
||||
WEBVIEW.navigation.webContents.send("input-readonly", {
|
||||
id: "url",
|
||||
readonly: !!HARDWARE.support.keyboardVisibility,
|
||||
});
|
||||
|
||||
// Disable zoom buttons
|
||||
WEBVIEW.navigation.webContents.send("button-disabled", {
|
||||
@@ -254,24 +339,60 @@ const updateNavigation = () => {
|
||||
|
||||
/**
|
||||
* Shows or hides the webview navigation bar.
|
||||
*
|
||||
* @param {string} force - Force the navigation bar visibility to 'ON' or 'OFF'.
|
||||
*/
|
||||
const toggleNavigation = () => {
|
||||
const toggleNavigation = (force = null) => {
|
||||
if (!WEBVIEW.navigationEnabled) {
|
||||
return;
|
||||
}
|
||||
const window = WEBVIEW.window.getBounds();
|
||||
const status = WEBVIEW.status.getBounds();
|
||||
const navigation = WEBVIEW.navigation.getBounds();
|
||||
const height = navigation.height > 0 ? 0 : 60;
|
||||
|
||||
// Calculate navigation height
|
||||
const height = force === "ON" ? 50 : force === "OFF" ? 0 : navigation.height > 0 ? 0 : 50;
|
||||
if (height === navigation.height) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Show or hide navigation based on height
|
||||
WEBVIEW.navigation.setBounds({
|
||||
x: 0,
|
||||
y: window.height - height,
|
||||
y: window.height - status.height - height,
|
||||
width: window.width,
|
||||
height: height,
|
||||
});
|
||||
if (height > 0) {
|
||||
WEBVIEW.navigation.webContents.focus();
|
||||
} else {
|
||||
WEBVIEW.views[WEBVIEW.viewActive].webContents.focus();
|
||||
|
||||
// Resize webview
|
||||
resizeView();
|
||||
};
|
||||
|
||||
/**
|
||||
* Shows or hides the webview status bar.
|
||||
*
|
||||
* @param {string} force - Force the status bar visibility to 'ON' or 'OFF'.
|
||||
*/
|
||||
const toggleStatus = (force = null) => {
|
||||
if (!WEBVIEW.statusEnabled) {
|
||||
return;
|
||||
}
|
||||
const window = WEBVIEW.window.getBounds();
|
||||
const status = WEBVIEW.status.getBounds();
|
||||
|
||||
// Calculate status height
|
||||
const height = force === "ON" ? 40 : force === "OFF" ? 0 : status.height > 0 ? 0 : 40;
|
||||
if (height === status.height) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Show or hide status based on height
|
||||
WEBVIEW.status.setBounds({
|
||||
x: 0,
|
||||
y: 0,
|
||||
width: window.width,
|
||||
height: height,
|
||||
});
|
||||
|
||||
// Resize webview
|
||||
resizeView();
|
||||
@@ -282,7 +403,8 @@ const toggleNavigation = () => {
|
||||
*/
|
||||
const zoomMinus = () => {
|
||||
const view = WEBVIEW.views[WEBVIEW.viewActive];
|
||||
view.webContents.setZoomFactor(Math.max(0.25, view.webContents.getZoomFactor() - 0.1));
|
||||
const zoom = view.webContents.getZoomFactor() - 0.1;
|
||||
view.webContents.setZoomFactor(Math.max(0.25, Math.round(zoom * 10) / 10));
|
||||
update();
|
||||
};
|
||||
|
||||
@@ -291,7 +413,8 @@ const zoomMinus = () => {
|
||||
*/
|
||||
const zoomPlus = () => {
|
||||
const view = WEBVIEW.views[WEBVIEW.viewActive];
|
||||
view.webContents.setZoomFactor(Math.min(4.0, view.webContents.getZoomFactor() + 0.1));
|
||||
const zoom = view.webContents.getZoomFactor() + 0.1;
|
||||
view.webContents.setZoomFactor(Math.min(4.0, Math.round(zoom * 10) / 10));
|
||||
update();
|
||||
};
|
||||
|
||||
@@ -339,6 +462,9 @@ const homeView = () => {
|
||||
const defaultUrl = WEBVIEW.viewUrls[WEBVIEW.viewActive];
|
||||
const currentUrl = view.webContents.getURL();
|
||||
|
||||
// Reset log history
|
||||
APP.logs = [];
|
||||
|
||||
// Reload the default url or refresh the page
|
||||
if (currentUrl != defaultUrl) {
|
||||
view.webContents.loadURL(defaultUrl);
|
||||
@@ -362,6 +488,9 @@ const reloadView = () => {
|
||||
const defaultUrl = WEBVIEW.viewUrls[WEBVIEW.viewActive];
|
||||
const currentUrl = view.webContents.getURL();
|
||||
|
||||
// Reset log history
|
||||
APP.logs = [];
|
||||
|
||||
// Reload the default url or refresh the page
|
||||
if (currentUrl.startsWith("data:")) {
|
||||
view.webContents.loadURL(defaultUrl);
|
||||
@@ -376,6 +505,7 @@ const reloadView = () => {
|
||||
*/
|
||||
const resizeView = () => {
|
||||
const window = WEBVIEW.window.getBounds();
|
||||
const status = WEBVIEW.status.getBounds();
|
||||
const navigation = WEBVIEW.navigation.getBounds();
|
||||
const pager = { width: 20, height: window.height };
|
||||
const widget = { width: 60, height: 200 };
|
||||
@@ -384,9 +514,9 @@ const resizeView = () => {
|
||||
WEBVIEW.views.forEach((view) => {
|
||||
view.setBounds({
|
||||
x: 0,
|
||||
y: 0,
|
||||
y: status.height,
|
||||
width: window.width,
|
||||
height: window.height - navigation.height,
|
||||
height: window.height - status.height - navigation.height,
|
||||
});
|
||||
});
|
||||
|
||||
@@ -394,22 +524,39 @@ const resizeView = () => {
|
||||
if (WEBVIEW.pagerEnabled) {
|
||||
WEBVIEW.pager.setBounds({
|
||||
x: window.width - pager.width,
|
||||
y: 0,
|
||||
y: status.height,
|
||||
width: pager.width,
|
||||
height: pager.height,
|
||||
height: pager.height - status.height - navigation.height,
|
||||
});
|
||||
WEBVIEW.pager.webContents.send("data-theme", {
|
||||
theme: "hidden",
|
||||
});
|
||||
WEBVIEW.pager.webContents.send("data-theme", { theme: "hidden" });
|
||||
}
|
||||
|
||||
// Update widget size
|
||||
if (WEBVIEW.widgetEnabled) {
|
||||
WEBVIEW.widget.setBounds({
|
||||
x: window.width - 20,
|
||||
y: parseInt(window.height / 2 - widget.height / 2, 10),
|
||||
x: WEBVIEW.tracker.widget.focused ? window.width - widget.width : window.width - pager.width,
|
||||
y: status.height + parseInt((window.height - status.height - widget.height) / 2, 10),
|
||||
width: widget.width,
|
||||
height: widget.height,
|
||||
});
|
||||
WEBVIEW.widget.webContents.send("data-theme", { theme: "hidden" });
|
||||
WEBVIEW.widget.webContents.send("data-theme", {
|
||||
theme: WEBVIEW.tracker.widget.focused ? WEBVIEW.widgetTheme : "hidden",
|
||||
});
|
||||
}
|
||||
|
||||
// Update status size
|
||||
if (WEBVIEW.statusEnabled) {
|
||||
WEBVIEW.status.setBounds({
|
||||
x: 0,
|
||||
y: 0,
|
||||
width: window.width,
|
||||
height: status.height,
|
||||
});
|
||||
WEBVIEW.status.webContents.send("data-theme", {
|
||||
theme: WEBVIEW.statusTheme,
|
||||
});
|
||||
}
|
||||
|
||||
// Update navigation size
|
||||
@@ -420,7 +567,9 @@ const resizeView = () => {
|
||||
width: window.width,
|
||||
height: navigation.height,
|
||||
});
|
||||
WEBVIEW.navigation.webContents.send("data-theme", { theme: WEBVIEW.navigationTheme });
|
||||
WEBVIEW.navigation.webContents.send("data-theme", {
|
||||
theme: WEBVIEW.navigationTheme,
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
@@ -433,28 +582,63 @@ const windowEvents = async () => {
|
||||
WEBVIEW.window.on("resize", resizeView);
|
||||
resizeView();
|
||||
|
||||
// Handle window focus events
|
||||
WEBVIEW.window.on("focus", () => {
|
||||
if (WEBVIEW.locked) {
|
||||
hardware.setDisplayStatus("ON");
|
||||
WEBVIEW.window.blur();
|
||||
}
|
||||
WEBVIEW.locked = false;
|
||||
});
|
||||
HARDWARE.events.on("updateDisplay", () => {
|
||||
WEBVIEW.locked = hardware.getDisplayStatus() === "OFF";
|
||||
if (WEBVIEW.locked) {
|
||||
WEBVIEW.window.blur();
|
||||
}
|
||||
});
|
||||
|
||||
// Handle window status updates
|
||||
WEBVIEW.window.on("minimize", update);
|
||||
WEBVIEW.window.on("restore", update);
|
||||
WEBVIEW.window.on("maximize", update);
|
||||
WEBVIEW.window.on("unmaximize", update);
|
||||
WEBVIEW.window.on("enter-full-screen", update);
|
||||
WEBVIEW.window.on("leave-full-screen", update);
|
||||
WEBVIEW.window.setStatus = async (status) => {
|
||||
const apply = (func, ...args) => {
|
||||
func.apply(WEBVIEW.window, args);
|
||||
return new Promise((r) => setTimeout(r, 50));
|
||||
};
|
||||
if (WEBVIEW.window.isMinimized()) {
|
||||
await apply(WEBVIEW.window.restore);
|
||||
}
|
||||
switch (status) {
|
||||
case "Framed":
|
||||
if (WEBVIEW.window.isFullScreen()) {
|
||||
await apply(WEBVIEW.window.setFullScreen, false);
|
||||
}
|
||||
if (WEBVIEW.window.isMaximized()) {
|
||||
await apply(WEBVIEW.window.unmaximize);
|
||||
}
|
||||
break;
|
||||
case "Fullscreen":
|
||||
if (!WEBVIEW.window.isMaximized()) {
|
||||
await apply(WEBVIEW.window.maximize);
|
||||
}
|
||||
if (!WEBVIEW.window.isFullScreen()) {
|
||||
await apply(WEBVIEW.window.setFullScreen, true);
|
||||
}
|
||||
break;
|
||||
case "Maximized":
|
||||
if (WEBVIEW.window.isFullScreen()) {
|
||||
await apply(WEBVIEW.window.setFullScreen, false);
|
||||
}
|
||||
if (!WEBVIEW.window.isMaximized()) {
|
||||
await apply(WEBVIEW.window.maximize);
|
||||
}
|
||||
break;
|
||||
case "Minimized":
|
||||
if (WEBVIEW.window.isFullScreen()) {
|
||||
await apply(WEBVIEW.window.setFullScreen, false);
|
||||
}
|
||||
if (!WEBVIEW.window.isMinimized()) {
|
||||
await apply(WEBVIEW.window.minimize);
|
||||
}
|
||||
break;
|
||||
case "Terminated":
|
||||
app.quit();
|
||||
break;
|
||||
}
|
||||
};
|
||||
WEBVIEW.window.onStatus = () => {
|
||||
clearTimeout(WEBVIEW.window.onStatus.timeout);
|
||||
WEBVIEW.window.onStatus.timeout = setTimeout(update, 200);
|
||||
};
|
||||
WEBVIEW.window.on("restore", WEBVIEW.window.onStatus);
|
||||
WEBVIEW.window.on("minimize", WEBVIEW.window.onStatus);
|
||||
WEBVIEW.window.on("maximize", WEBVIEW.window.onStatus);
|
||||
WEBVIEW.window.on("unmaximize", WEBVIEW.window.onStatus);
|
||||
WEBVIEW.window.on("enter-full-screen", WEBVIEW.window.onStatus);
|
||||
WEBVIEW.window.on("leave-full-screen", WEBVIEW.window.onStatus);
|
||||
|
||||
// Handle global shortcut events
|
||||
globalShortcut.register("Control+Left", () => {
|
||||
@@ -478,16 +662,19 @@ const windowEvents = async () => {
|
||||
|
||||
// Check for window touch events (1s)
|
||||
setInterval(() => {
|
||||
if (APP.exiting) {
|
||||
return;
|
||||
}
|
||||
const now = new Date();
|
||||
const then = WEBVIEW.pointer.time;
|
||||
const delta = Math.abs(now - then) / 1000;
|
||||
const then = WEBVIEW.tracker.pointer.time;
|
||||
const delta = (now - then) / 1000;
|
||||
|
||||
// Auto-hide navigation
|
||||
// Auto-hide controls
|
||||
if (delta > 60) {
|
||||
const navigation = WEBVIEW.navigation.getBounds();
|
||||
if (navigation.height > 0) {
|
||||
toggleNavigation();
|
||||
if (WEBVIEW.tracker.widget.focused) {
|
||||
WEBVIEW.views[WEBVIEW.viewActive].webContents.focus();
|
||||
}
|
||||
toggleNavigation("OFF");
|
||||
}
|
||||
}, 1000);
|
||||
};
|
||||
@@ -502,6 +689,7 @@ const widgetEvents = async () => {
|
||||
|
||||
// Handle widget focus events
|
||||
WEBVIEW.widget.webContents.on("focus", () => {
|
||||
WEBVIEW.tracker.pointer.time = new Date();
|
||||
const window = WEBVIEW.window.getBounds();
|
||||
const widget = WEBVIEW.widget.getBounds();
|
||||
|
||||
@@ -512,7 +700,10 @@ const widgetEvents = async () => {
|
||||
width: widget.width,
|
||||
height: widget.height,
|
||||
});
|
||||
WEBVIEW.widget.webContents.send("data-theme", { theme: WEBVIEW.widgetTheme });
|
||||
WEBVIEW.widget.webContents.send("data-theme", {
|
||||
theme: WEBVIEW.widgetTheme,
|
||||
});
|
||||
WEBVIEW.tracker.widget.focused = true;
|
||||
});
|
||||
|
||||
// Handle widget blur events
|
||||
@@ -527,49 +718,21 @@ const widgetEvents = async () => {
|
||||
width: widget.width,
|
||||
height: widget.height,
|
||||
});
|
||||
WEBVIEW.widget.webContents.send("data-theme", { theme: "hidden" });
|
||||
WEBVIEW.widget.webContents.send("data-theme", {
|
||||
theme: "hidden",
|
||||
});
|
||||
WEBVIEW.tracker.widget.focused = false;
|
||||
});
|
||||
|
||||
// Handle widget button click events
|
||||
ipcMain.on("button-click", (e, button) => {
|
||||
WEBVIEW.tracker.pointer.time = new Date();
|
||||
switch (button.id) {
|
||||
case "theme":
|
||||
WEBVIEW.theme.toggle();
|
||||
break;
|
||||
case "keyboard":
|
||||
const toggle = hardware.getKeyboardVisibility() === "ON" ? "OFF" : "ON";
|
||||
switch (toggle) {
|
||||
case "OFF":
|
||||
WEBVIEW.window.restore();
|
||||
WEBVIEW.window.unmaximize();
|
||||
WEBVIEW.window.setFullScreen(true);
|
||||
break;
|
||||
case "ON":
|
||||
WEBVIEW.window.restore();
|
||||
WEBVIEW.window.setFullScreen(false);
|
||||
WEBVIEW.window.maximize();
|
||||
break;
|
||||
}
|
||||
hardware.setKeyboardVisibility(toggle, () => {
|
||||
WEBVIEW.views[WEBVIEW.viewActive].webContents.focus();
|
||||
});
|
||||
break;
|
||||
case "fullscreen":
|
||||
if (WEBVIEW.window.isFullScreen()) {
|
||||
WEBVIEW.window.restore();
|
||||
WEBVIEW.window.unmaximize();
|
||||
WEBVIEW.window.setFullScreen(false);
|
||||
} else {
|
||||
WEBVIEW.window.restore();
|
||||
WEBVIEW.window.unmaximize();
|
||||
WEBVIEW.window.setFullScreen(true);
|
||||
}
|
||||
hardware.setKeyboardVisibility("OFF", () => {
|
||||
WEBVIEW.views[WEBVIEW.viewActive].webContents.focus();
|
||||
});
|
||||
break;
|
||||
case "minimize":
|
||||
WEBVIEW.window.restore();
|
||||
WEBVIEW.window.setFullScreen(false);
|
||||
WEBVIEW.window.minimize();
|
||||
hardware.setKeyboardVisibility("OFF");
|
||||
hardware.setKeyboardVisibility(hardware.getKeyboardVisibility() === "ON" ? "OFF" : "ON");
|
||||
break;
|
||||
case "navigation":
|
||||
toggleNavigation();
|
||||
@@ -578,6 +741,48 @@ const widgetEvents = async () => {
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Register status events and handler.
|
||||
*/
|
||||
const statusEvents = async () => {
|
||||
if (!WEBVIEW.statusEnabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Handle status button click events
|
||||
ipcMain.on("button-click", (e, button) => {
|
||||
WEBVIEW.tracker.pointer.time = new Date();
|
||||
switch (button.id) {
|
||||
case "fullscreen":
|
||||
WEBVIEW.window.setStatus(WEBVIEW.tracker.window.status === "Fullscreen" ? "Framed" : "Fullscreen");
|
||||
break;
|
||||
case "minimize":
|
||||
WEBVIEW.window.setStatus("Minimized");
|
||||
break;
|
||||
case "terminate":
|
||||
WEBVIEW.status.webContents.send("button-disabled", { id: "fullscreen", disabled: true });
|
||||
WEBVIEW.status.webContents.send("button-disabled", { id: "minimize", disabled: true });
|
||||
WEBVIEW.status.webContents.send("button-disabled", { id: "terminate", disabled: true });
|
||||
const button = dialog.showMessageBoxSync(WEBVIEW.window, {
|
||||
type: "question",
|
||||
title: "Confirm",
|
||||
message: `\nExit ${APP.title}?`,
|
||||
buttons: ["No", "Yes"],
|
||||
});
|
||||
switch (button) {
|
||||
case 1:
|
||||
WEBVIEW.window.setStatus("Terminated");
|
||||
break;
|
||||
default:
|
||||
WEBVIEW.status.webContents.send("button-disabled", { id: "fullscreen", disabled: false });
|
||||
WEBVIEW.status.webContents.send("button-disabled", { id: "minimize", disabled: false });
|
||||
WEBVIEW.status.webContents.send("button-disabled", { id: "terminate", disabled: false });
|
||||
}
|
||||
break;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Register navigation events and handler.
|
||||
*/
|
||||
@@ -586,37 +791,35 @@ const navigationEvents = async () => {
|
||||
return;
|
||||
}
|
||||
|
||||
// Handle navigation blur events
|
||||
let ignoreBlur = false;
|
||||
WEBVIEW.navigation.webContents.on("blur", () => {
|
||||
const visibility = hardware.getKeyboardVisibility();
|
||||
if (visibility === "ON" && !ignoreBlur) {
|
||||
WEBVIEW.window.restore();
|
||||
WEBVIEW.window.unmaximize();
|
||||
WEBVIEW.window.setFullScreen(true);
|
||||
hardware.setKeyboardVisibility("OFF");
|
||||
WEBVIEW.navigation.webContents.send("input-blur", { id: "url" });
|
||||
// Handle input blur events
|
||||
let selected = false;
|
||||
ipcMain.on("input-blur", (e, input) => {
|
||||
switch (input.id) {
|
||||
case "url":
|
||||
if (selected) {
|
||||
hardware.setKeyboardVisibility("OFF", () => {
|
||||
selected = false;
|
||||
WEBVIEW.navigation.webContents.send("input-select", { id: "url", select: selected });
|
||||
WEBVIEW.navigation.webContents.send("input-readonly", { id: "url", readonly: !selected });
|
||||
});
|
||||
}
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
||||
// Handle input focus events
|
||||
ipcMain.on("input-focus", (e, input) => {
|
||||
const visibility = hardware.getKeyboardVisibility();
|
||||
WEBVIEW.tracker.pointer.time = new Date();
|
||||
switch (input.id) {
|
||||
case "url":
|
||||
if (visibility === "OFF") {
|
||||
ignoreBlur = true;
|
||||
WEBVIEW.window.restore();
|
||||
WEBVIEW.window.setFullScreen(false);
|
||||
WEBVIEW.window.maximize();
|
||||
hardware.setKeyboardVisibility("ON", () => {
|
||||
setTimeout(() => {
|
||||
WEBVIEW.navigation.webContents.focus();
|
||||
WEBVIEW.navigation.webContents.send("input-select", { id: "url" });
|
||||
ignoreBlur = false;
|
||||
}, 500);
|
||||
});
|
||||
}
|
||||
hardware.setKeyboardVisibility("ON", () => {
|
||||
setTimeout(() => {
|
||||
selected = true;
|
||||
WEBVIEW.navigation.webContents.focus();
|
||||
WEBVIEW.navigation.webContents.send("input-select", { id: "url", select: selected });
|
||||
WEBVIEW.navigation.webContents.send("input-readonly", { id: "url", readonly: !selected });
|
||||
}, 400);
|
||||
});
|
||||
break;
|
||||
}
|
||||
});
|
||||
@@ -639,39 +842,31 @@ const navigationEvents = async () => {
|
||||
|
||||
// Handle navigation button click events
|
||||
ipcMain.on("button-click", (e, button) => {
|
||||
const view = WEBVIEW.views[WEBVIEW.viewActive];
|
||||
WEBVIEW.tracker.pointer.time = new Date();
|
||||
switch (button.id) {
|
||||
case "home":
|
||||
homeView();
|
||||
hardware.setKeyboardVisibility("OFF");
|
||||
break;
|
||||
case "refresh":
|
||||
reloadView();
|
||||
hardware.setKeyboardVisibility("OFF");
|
||||
break;
|
||||
case "previous":
|
||||
previousView();
|
||||
hardware.setKeyboardVisibility("OFF");
|
||||
break;
|
||||
case "next":
|
||||
nextView();
|
||||
hardware.setKeyboardVisibility("OFF");
|
||||
break;
|
||||
case "minus":
|
||||
zoomMinus();
|
||||
hardware.setKeyboardVisibility("OFF");
|
||||
break;
|
||||
case "plus":
|
||||
zoomPlus();
|
||||
hardware.setKeyboardVisibility("OFF");
|
||||
break;
|
||||
case "backward":
|
||||
historyBackward();
|
||||
hardware.setKeyboardVisibility("OFF");
|
||||
break;
|
||||
case "forward":
|
||||
historyForward();
|
||||
hardware.setKeyboardVisibility("OFF");
|
||||
break;
|
||||
}
|
||||
});
|
||||
@@ -710,7 +905,7 @@ const viewEvents = async () => {
|
||||
if (WEBVIEW.viewActive === 0 && ready.length === WEBVIEW.views.length) {
|
||||
nextView();
|
||||
}
|
||||
if (ARGS.app_debug === "true") {
|
||||
if ("app_debug" in ARGS) {
|
||||
setTimeout(() => {
|
||||
view.webContents.openDevTools();
|
||||
}, 2000);
|
||||
@@ -723,7 +918,14 @@ const viewEvents = async () => {
|
||||
if (WEBVIEW.viewActive === 0 && ready.length === WEBVIEW.views.length) {
|
||||
nextView();
|
||||
}
|
||||
view.webContents.loadURL(errorHtml(code, text, url));
|
||||
switch (code) {
|
||||
case -3:
|
||||
console.warn(`Load Warning: ${url}, ERR_ABORTED (${code})`);
|
||||
break;
|
||||
default:
|
||||
console.error(`Load Error: ${url}, ${text} (${code})`);
|
||||
view.webContents.loadURL(errorHtml(code, text, url, WEBVIEW.theme.get()));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -740,18 +942,38 @@ const viewEvents = async () => {
|
||||
// Handle webview mouse events
|
||||
view.webContents.on("before-mouse-event", (e, mouse) => {
|
||||
const now = new Date();
|
||||
const then = WEBVIEW.pointer.time;
|
||||
const delta = Math.abs(now - then) / 1000;
|
||||
WEBVIEW.pointer.time = now;
|
||||
const then = WEBVIEW.tracker.pointer.time;
|
||||
const delta = (now - then) / 1000;
|
||||
switch (mouse.type) {
|
||||
case "mouseMove":
|
||||
if (delta > 30) {
|
||||
console.log("Update Last Active");
|
||||
integration.update();
|
||||
const posNew = { x: mouse.globalX, y: mouse.globalY };
|
||||
if (posNew.x < 0 || posNew.y < 0) {
|
||||
break;
|
||||
}
|
||||
// Update last active on pointer position change
|
||||
const posOld = WEBVIEW.tracker.pointer.position;
|
||||
if (posOld.x !== posNew.x || posOld.y !== posNew.y) {
|
||||
WEBVIEW.tracker.pointer.time = now;
|
||||
WEBVIEW.tracker.pointer.position = posNew;
|
||||
if (delta > 30) {
|
||||
console.info("Update Last Active");
|
||||
integration.update();
|
||||
}
|
||||
}
|
||||
break;
|
||||
case "mouseDown":
|
||||
switch (mouse.button) {
|
||||
case "left":
|
||||
// Ignore touch event if display was off
|
||||
if (WEBVIEW.tracker.display.off > WEBVIEW.tracker.display.on) {
|
||||
console.verbose("Display Touch Event: Ignored");
|
||||
e.preventDefault();
|
||||
}
|
||||
// Turn display on if it was off
|
||||
if (hardware.getDisplayStatus() === "OFF") {
|
||||
hardware.setDisplayStatus("ON");
|
||||
}
|
||||
break;
|
||||
case "back":
|
||||
historyBackward();
|
||||
break;
|
||||
@@ -769,11 +991,31 @@ const viewEvents = async () => {
|
||||
* Register app events and handler.
|
||||
*/
|
||||
const appEvents = async () => {
|
||||
// Handle signal and exit events
|
||||
process.on("SIGINT", app.quit);
|
||||
app.on("before-quit", () => {
|
||||
WEBVIEW.status = "Terminated";
|
||||
integration.update();
|
||||
// Handle global events
|
||||
EVENTS.on("reloadView", reloadView);
|
||||
EVENTS.on("updateView", updateView);
|
||||
EVENTS.on("updateDisplay", () => {
|
||||
const status = hardware.getDisplayStatus();
|
||||
if (status) {
|
||||
WEBVIEW.tracker.display[status.toLowerCase()] = new Date();
|
||||
}
|
||||
});
|
||||
EVENTS.on("updateStatus", () => {
|
||||
const status = WEBVIEW.tracker.window.status;
|
||||
const visibility = hardware.getKeyboardVisibility();
|
||||
if (visibility === "ON" && ["Fullscreen", "Minimized"].includes(status)) {
|
||||
hardware.setKeyboardVisibility("OFF");
|
||||
}
|
||||
toggleStatus(["Framed", "Minimized"].includes(status) ? "ON" : "OFF");
|
||||
});
|
||||
EVENTS.on("updateKeyboard", () => {
|
||||
const status = WEBVIEW.tracker.window.status;
|
||||
const visibility = hardware.getKeyboardVisibility();
|
||||
if (visibility === "ON" && ["Fullscreen"].includes(status)) {
|
||||
WEBVIEW.window.setStatus("Maximized");
|
||||
} else if (visibility === "OFF" && ["Maximized"].includes(status)) {
|
||||
WEBVIEW.window.setStatus("Fullscreen");
|
||||
}
|
||||
});
|
||||
|
||||
// Handle multiple instances
|
||||
@@ -784,14 +1026,24 @@ const appEvents = async () => {
|
||||
WEBVIEW.window.focus();
|
||||
});
|
||||
|
||||
// Check for latest release infos (2h)
|
||||
setInterval(() => {
|
||||
latestRelease();
|
||||
}, 7200 * 1000);
|
||||
await latestRelease();
|
||||
// Handle exit events
|
||||
app.on("before-quit", () => {
|
||||
APP.exiting = true;
|
||||
console.warn(`${APP.title} Terminated`);
|
||||
});
|
||||
process.on("SIGINT", app.quit);
|
||||
|
||||
// Webview initialized
|
||||
WEBVIEW.initialized = true;
|
||||
|
||||
// Check for latest release infos (2h)
|
||||
setInterval(() => {
|
||||
if (APP.exiting) {
|
||||
return;
|
||||
}
|
||||
latestRelease();
|
||||
}, 7200 * 1000);
|
||||
await latestRelease();
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -799,17 +1051,18 @@ const appEvents = async () => {
|
||||
*/
|
||||
const latestRelease = async () => {
|
||||
try {
|
||||
const response = await axios.get(`${APP.releases.url}/latest`);
|
||||
const data = response ? response.data : null;
|
||||
if (!data || data.draft || data.prerelease) {
|
||||
return;
|
||||
const response = await axios.get(APP.releases.url, { timeout: 10000 });
|
||||
const release = response?.data?.find((item) => {
|
||||
return !item.draft && (!item.prerelease || "app_early" in ARGS);
|
||||
});
|
||||
if (release) {
|
||||
APP.releases.latest = {
|
||||
title: APP.title,
|
||||
version: (release.tag_name || " ").replace(/^v/i, ""),
|
||||
summary: release.body || " ",
|
||||
url: release.html_url || " ",
|
||||
};
|
||||
}
|
||||
APP.releases.latest = {
|
||||
title: APP.title,
|
||||
version: (data.tag_name || data.name || "").replace(/^v/i, ""),
|
||||
summary: data.body || "",
|
||||
url: data.html_url || "",
|
||||
};
|
||||
} catch (error) {
|
||||
console.warn("Github Error:", error.message);
|
||||
}
|
||||
@@ -830,7 +1083,8 @@ const onlineStatus = (url, interval = 1000, timeout = 60000) => {
|
||||
const elapsed = Date.now() - start;
|
||||
try {
|
||||
if (!url.startsWith("data:")) {
|
||||
await axios.get(url, { timeout: 10000 });
|
||||
const agent = new https.Agent({ rejectUnauthorized: !("ignore_certificate_errors" in ARGS) });
|
||||
await axios.get(url, { httpsAgent: agent, timeout: 10000 });
|
||||
}
|
||||
resolve(true);
|
||||
} catch (error) {
|
||||
@@ -838,6 +1092,9 @@ const onlineStatus = (url, interval = 1000, timeout = 60000) => {
|
||||
console.warn(`Checking Connection: ${url}`, error.message);
|
||||
}
|
||||
if (elapsed >= timeout) {
|
||||
if (error.message?.includes("certificate")) {
|
||||
console.error("Certificate Error: See https://github.com/leukipp/touchkio/issues/76");
|
||||
}
|
||||
resolve(false);
|
||||
} else {
|
||||
setTimeout(check, interval);
|
||||
@@ -897,9 +1154,14 @@ const loaderHtml = (size, speed, theme) => {
|
||||
* @param {number} code - The error code of the response.
|
||||
* @param {string} text - The error text of the response.
|
||||
* @param {string} url - The url of the requested page.
|
||||
* @param {string} theme - The theme used for text colors.
|
||||
* @returns {string} A data string with the generated html.
|
||||
*/
|
||||
const errorHtml = (code, text, url) => {
|
||||
const errorHtml = (code, text, url, theme) => {
|
||||
const color = {
|
||||
dark: { icon: "#FFA500", text: "#E5E5E5", background: "#111111" },
|
||||
light: { icon: "#FFA500", text: "#1A1A1A", background: "#FAFAFA" },
|
||||
}[theme];
|
||||
const html = `
|
||||
<html>
|
||||
<head>
|
||||
@@ -907,17 +1169,25 @@ const errorHtml = (code, text, url) => {
|
||||
body {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
justify-content: center;
|
||||
font-family: sans-serif;
|
||||
text-align: center;
|
||||
background-color: ${color.background};
|
||||
}
|
||||
.icon {
|
||||
margin: 0;
|
||||
font-size: 5rem;
|
||||
color: orange;
|
||||
color: ${color.icon};
|
||||
}
|
||||
.title {
|
||||
margin: 0;
|
||||
color: ${color.text};
|
||||
}
|
||||
.url {
|
||||
color: ${color.text};
|
||||
}
|
||||
.error {
|
||||
color: ${color.text};
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
@@ -925,8 +1195,8 @@ const errorHtml = (code, text, url) => {
|
||||
<div>
|
||||
<p class="icon">⚠</p>
|
||||
<h1 class="title">Whoopsie!</h1>
|
||||
<p><strong>Loading:</strong> ${url}</p>
|
||||
<p><strong>Error:</strong> ${text} (${code})</p>
|
||||
<p class="url"><strong>Loading:</strong> ${url}</p>
|
||||
<p class="error"><strong>Error:</strong> ${text} (${code})</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>`;
|
||||
|
||||
+9
-8
@@ -4,27 +4,28 @@
|
||||
"description": "Home Assistant Touch Kiosk",
|
||||
"homepage": "https://github.com/leukipp/touchkio",
|
||||
"author": "leukipp",
|
||||
"version": "1.3.0",
|
||||
"version": "1.4.0",
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"start": "electron . --web-url=https://demo.home-assistant.io,https://demo.immichkiosk.app --app-debug=false --trace-warnings",
|
||||
"start": "electron . --web-url=https://demo.home-assistant.io,https://demo.immichkiosk.app --trace-warnings",
|
||||
"build": "electron-forge make"
|
||||
},
|
||||
"prettier": {
|
||||
"printWidth": 120
|
||||
},
|
||||
"devDependencies": {
|
||||
"@electron-forge/cli": "^7.8.3",
|
||||
"@electron-forge/maker-deb": "^7.8.3",
|
||||
"@electron-forge/maker-zip": "^7.8.3",
|
||||
"@electron-forge/publisher-github": "^7.8.3",
|
||||
"electron": "^38.0.0",
|
||||
"@electron-forge/cli": "^7.10.0",
|
||||
"@electron-forge/maker-deb": "^7.10.0",
|
||||
"@electron-forge/maker-zip": "^7.10.0",
|
||||
"@electron-forge/publisher-github": "^7.10.0",
|
||||
"electron": "^38.2.2",
|
||||
"jszip": "^3.10.1",
|
||||
"prettier": "^3.6.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"axios": "^1.11.0",
|
||||
"axios": "^1.12.2",
|
||||
"electron-log": "^5.4.3",
|
||||
"mqtt": "^5.14.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,20 +2,22 @@
|
||||
# yarn lockfile v1
|
||||
|
||||
|
||||
"@babel/runtime@^7.28.3":
|
||||
"@babel/runtime@^7.28.4":
|
||||
version "7.28.4"
|
||||
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.28.4.tgz#a70226016fabe25c5783b2f22d3e1c9bc5ca3326"
|
||||
integrity sha512-Q/N6JNWvIvPnLDvjlE1OUBLPQHH6l3CltCEsHIujp45zQUSSh8K+gHnaEX45yAT1nyngnINhvWtzN+Nb9D8RAQ==
|
||||
|
||||
"@electron-forge/cli@^7.8.3":
|
||||
version "7.8.3"
|
||||
resolved "https://registry.yarnpkg.com/@electron-forge/cli/-/cli-7.8.3.tgz#22eb1409047f747a9f2a8b697c1e2c5f461d2d84"
|
||||
integrity sha512-BSAjGGfVf0yp3NQhXYmyCw9T//YCQHuktMv4HXfDVfo7AoV6DA1oEhqldI4Q7aHKeRob5+yBkvRRYPiu5ayCPw==
|
||||
"@electron-forge/cli@^7.10.0":
|
||||
version "7.10.0"
|
||||
resolved "https://registry.yarnpkg.com/@electron-forge/cli/-/cli-7.10.0.tgz#66edfe8bcea7d875d1944d6773d07eda2278eab3"
|
||||
integrity sha512-48lBvgQjkhj/S/TwbtvAauD0oSDrtIAqYMUZ3gyW1TgiZEMmBk4E56zbpjQ7AU0krGE7NUiLj8i8hvFpEJSljw==
|
||||
dependencies:
|
||||
"@electron-forge/core" "7.8.3"
|
||||
"@electron-forge/core-utils" "7.8.3"
|
||||
"@electron-forge/shared-types" "7.8.3"
|
||||
"@electron-forge/core" "7.10.0"
|
||||
"@electron-forge/core-utils" "7.10.0"
|
||||
"@electron-forge/shared-types" "7.10.0"
|
||||
"@electron/get" "^3.0.0"
|
||||
"@inquirer/prompts" "^6.0.1"
|
||||
"@listr2/prompt-adapter-inquirer" "^2.0.22"
|
||||
chalk "^4.0.0"
|
||||
commander "^11.1.0"
|
||||
debug "^4.3.1"
|
||||
@@ -24,12 +26,12 @@
|
||||
log-symbols "^4.0.0"
|
||||
semver "^7.2.1"
|
||||
|
||||
"@electron-forge/core-utils@7.8.3":
|
||||
version "7.8.3"
|
||||
resolved "https://registry.yarnpkg.com/@electron-forge/core-utils/-/core-utils-7.8.3.tgz#8aac92271fbf5de3e1f657179db5e027ea5dd48a"
|
||||
integrity sha512-8jhK7AvUKEqDyTMMuRhvS1TkE73YEnHYAxVvkJq35e1KdCwGbGnSRhaEs7OOqRfkKxfepdJ7BMKFSoKFeP+z0Q==
|
||||
"@electron-forge/core-utils@7.10.0":
|
||||
version "7.10.0"
|
||||
resolved "https://registry.yarnpkg.com/@electron-forge/core-utils/-/core-utils-7.10.0.tgz#e61e79721d5e63122a4bb480868167905a3e51f1"
|
||||
integrity sha512-9byO4RGuP2na3xHzzzbup3Q4jC3QyXIgmZadL4N+A2Q2QH/DIMp/rOIB/zytqV0pNsdbeDSMvee7nj4jO0PeZg==
|
||||
dependencies:
|
||||
"@electron-forge/shared-types" "7.8.3"
|
||||
"@electron-forge/shared-types" "7.10.0"
|
||||
"@electron/rebuild" "^3.7.0"
|
||||
"@malept/cross-spawn-promise" "^2.0.0"
|
||||
chalk "^4.0.0"
|
||||
@@ -37,28 +39,30 @@
|
||||
find-up "^5.0.0"
|
||||
fs-extra "^10.0.0"
|
||||
log-symbols "^4.0.0"
|
||||
parse-author "^2.0.0"
|
||||
semver "^7.2.1"
|
||||
|
||||
"@electron-forge/core@7.8.3":
|
||||
version "7.8.3"
|
||||
resolved "https://registry.yarnpkg.com/@electron-forge/core/-/core-7.8.3.tgz#d7a715e9cef80b083e898b4c6b941178276d4a36"
|
||||
integrity sha512-qX2vi/LP3HcSqSfLfzMeH2ll8SFZQnOk8VN/b3bq6XrBCbrfrSsTYYWakN6mmfalLJcQRm4jCEc6gcyuGO4i6Q==
|
||||
"@electron-forge/core@7.10.0":
|
||||
version "7.10.0"
|
||||
resolved "https://registry.yarnpkg.com/@electron-forge/core/-/core-7.10.0.tgz#dbc06244f16cd1429358783fc7aaf1b873d010c1"
|
||||
integrity sha512-jM4HZWCyJeHpqh4Oc0gjPwMj7/BpO10Dex9L3RLUrR/pxsf5RrfmNOYbezTr1LlH1E4cTWGg5ziG23XMhZDjnA==
|
||||
dependencies:
|
||||
"@electron-forge/core-utils" "7.8.3"
|
||||
"@electron-forge/maker-base" "7.8.3"
|
||||
"@electron-forge/plugin-base" "7.8.3"
|
||||
"@electron-forge/publisher-base" "7.8.3"
|
||||
"@electron-forge/shared-types" "7.8.3"
|
||||
"@electron-forge/template-base" "7.8.3"
|
||||
"@electron-forge/template-vite" "7.8.3"
|
||||
"@electron-forge/template-vite-typescript" "7.8.3"
|
||||
"@electron-forge/template-webpack" "7.8.3"
|
||||
"@electron-forge/template-webpack-typescript" "7.8.3"
|
||||
"@electron-forge/tracer" "7.8.3"
|
||||
"@electron-forge/core-utils" "7.10.0"
|
||||
"@electron-forge/maker-base" "7.10.0"
|
||||
"@electron-forge/plugin-base" "7.10.0"
|
||||
"@electron-forge/publisher-base" "7.10.0"
|
||||
"@electron-forge/shared-types" "7.10.0"
|
||||
"@electron-forge/template-base" "7.10.0"
|
||||
"@electron-forge/template-vite" "7.10.0"
|
||||
"@electron-forge/template-vite-typescript" "7.10.0"
|
||||
"@electron-forge/template-webpack" "7.10.0"
|
||||
"@electron-forge/template-webpack-typescript" "7.10.0"
|
||||
"@electron-forge/tracer" "7.10.0"
|
||||
"@electron/get" "^3.0.0"
|
||||
"@electron/packager" "^18.3.5"
|
||||
"@electron/rebuild" "^3.7.0"
|
||||
"@malept/cross-spawn-promise" "^2.0.0"
|
||||
"@vscode/sudo-prompt" "^9.3.1"
|
||||
chalk "^4.0.0"
|
||||
debug "^4.3.1"
|
||||
fast-glob "^3.2.7"
|
||||
@@ -76,60 +80,59 @@
|
||||
rechoir "^0.8.0"
|
||||
semver "^7.2.1"
|
||||
source-map-support "^0.5.13"
|
||||
sudo-prompt "^9.1.1"
|
||||
username "^5.1.0"
|
||||
|
||||
"@electron-forge/maker-base@7.8.3":
|
||||
version "7.8.3"
|
||||
resolved "https://registry.yarnpkg.com/@electron-forge/maker-base/-/maker-base-7.8.3.tgz#e500ebe3eacfa84d3f02faac2aa3b2773c27250a"
|
||||
integrity sha512-WmF66cHdziaK8Asi7IRTLxZjCZ8IqXXHr6IPl4d5oatN6s5RG+HHzG1hiJ7LzlOEntqdSpE8Wh2nB2TmyR4huQ==
|
||||
"@electron-forge/maker-base@7.10.0":
|
||||
version "7.10.0"
|
||||
resolved "https://registry.yarnpkg.com/@electron-forge/maker-base/-/maker-base-7.10.0.tgz#0c30b963f6502df1a74aa0f46fa5ab1afe56403d"
|
||||
integrity sha512-ydpwyCsNXS4xDknf5Aas7j2CyUmdGIBJRr760VemM11ts55zu3HOndvLCfsBSCBq4wpOIa6plQ4CaQQn15SrgQ==
|
||||
dependencies:
|
||||
"@electron-forge/shared-types" "7.8.3"
|
||||
"@electron-forge/shared-types" "7.10.0"
|
||||
fs-extra "^10.0.0"
|
||||
which "^2.0.2"
|
||||
|
||||
"@electron-forge/maker-deb@^7.8.3":
|
||||
version "7.8.3"
|
||||
resolved "https://registry.yarnpkg.com/@electron-forge/maker-deb/-/maker-deb-7.8.3.tgz#940427f406a107eca6bc80029c62d259833f9b9b"
|
||||
integrity sha512-GZHJU06LRFJkv1wMc3bjMVzedQhyxnyMZqgDJjE9TIlXXZkN2EqGmKLw/HxwNRA1R8yuQeA4Ih6/dEB4bZTevg==
|
||||
"@electron-forge/maker-deb@^7.10.0":
|
||||
version "7.10.0"
|
||||
resolved "https://registry.yarnpkg.com/@electron-forge/maker-deb/-/maker-deb-7.10.0.tgz#79b62e16b2d4e929116972301481d296493b3a5c"
|
||||
integrity sha512-RlzhL/NtbYqphBuNWINwCR2kuCIE0RpYvkqa1ynDdu0n/OOiR/E1dpT0T/ZzSoyTIAZLYIcX3cHXwObzvV9bHQ==
|
||||
dependencies:
|
||||
"@electron-forge/maker-base" "7.8.3"
|
||||
"@electron-forge/shared-types" "7.8.3"
|
||||
"@electron-forge/maker-base" "7.10.0"
|
||||
"@electron-forge/shared-types" "7.10.0"
|
||||
optionalDependencies:
|
||||
electron-installer-debian "^3.2.0"
|
||||
|
||||
"@electron-forge/maker-zip@^7.8.3":
|
||||
version "7.8.3"
|
||||
resolved "https://registry.yarnpkg.com/@electron-forge/maker-zip/-/maker-zip-7.8.3.tgz#450b17d6517633bbdeb82397600db61abd8461d6"
|
||||
integrity sha512-ytao285wKAjKBO6eULzLeqUDP5Zh7beQlGyHjgOMknk7FI0sNy+zGdh3CrCGIhkXSHU/DpukPwRu2SiKvIaIGA==
|
||||
"@electron-forge/maker-zip@^7.10.0":
|
||||
version "7.10.0"
|
||||
resolved "https://registry.yarnpkg.com/@electron-forge/maker-zip/-/maker-zip-7.10.0.tgz#0a2a031ce2796b57aeb1fb1f0d013a724ea79e0b"
|
||||
integrity sha512-e+NpgbEGo0xJzWxEvr2bewg/khTIVTdL75YFH2mayURKj1wia+bI8ukFdJvga5kkr842loUm38uW7dALYN3jQQ==
|
||||
dependencies:
|
||||
"@electron-forge/maker-base" "7.8.3"
|
||||
"@electron-forge/shared-types" "7.8.3"
|
||||
"@electron-forge/maker-base" "7.10.0"
|
||||
"@electron-forge/shared-types" "7.10.0"
|
||||
cross-zip "^4.0.0"
|
||||
fs-extra "^10.0.0"
|
||||
got "^11.8.5"
|
||||
|
||||
"@electron-forge/plugin-base@7.8.3":
|
||||
version "7.8.3"
|
||||
resolved "https://registry.yarnpkg.com/@electron-forge/plugin-base/-/plugin-base-7.8.3.tgz#2def4cf41aca2f63c3486e651487571efafc284b"
|
||||
integrity sha512-0CzPQlO3BGu5bLCrx2Xqo6B1yoHhA9wG9boZE58ANr8Qma1NQfAWZU3LnMmF3EdWNTX76PxpZeeb3QbPNcxSuA==
|
||||
"@electron-forge/plugin-base@7.10.0":
|
||||
version "7.10.0"
|
||||
resolved "https://registry.yarnpkg.com/@electron-forge/plugin-base/-/plugin-base-7.10.0.tgz#5588b2a1b78bb0e446affdab15d4255be6a6e3ec"
|
||||
integrity sha512-WxIwQZVhvCNHXePFvzE79OBKw7OrLzzxk4bb/PVnAyiDSHGdUyd35EzH5TAYENUACdM96B+nlIIU1PqTbPx63Q==
|
||||
dependencies:
|
||||
"@electron-forge/shared-types" "7.8.3"
|
||||
"@electron-forge/shared-types" "7.10.0"
|
||||
|
||||
"@electron-forge/publisher-base@7.8.3":
|
||||
version "7.8.3"
|
||||
resolved "https://registry.yarnpkg.com/@electron-forge/publisher-base/-/publisher-base-7.8.3.tgz#a90ef4532e2a319c2ee44de741dd1968b5b42735"
|
||||
integrity sha512-kurRKVNyLsK2JgmVl88UHu0+qSH+PysMtk/xP0YX5sYNMVxRay8+S1T10tAh6Qom94KwpF3CLYtkebvxb/fq+A==
|
||||
"@electron-forge/publisher-base@7.10.0":
|
||||
version "7.10.0"
|
||||
resolved "https://registry.yarnpkg.com/@electron-forge/publisher-base/-/publisher-base-7.10.0.tgz#06207d8bc018ea1567241cad96b7bceb13375dfa"
|
||||
integrity sha512-YAWnpTgzrf3xnjjk6pUwNfYAEMZ6YuOASEfPTKCKRo0MUpcUVvP1kB/LYlwI0LItyrGoTk0cfAw5fN/kFlB1Ng==
|
||||
dependencies:
|
||||
"@electron-forge/shared-types" "7.8.3"
|
||||
"@electron-forge/shared-types" "7.10.0"
|
||||
|
||||
"@electron-forge/publisher-github@^7.8.3":
|
||||
version "7.8.3"
|
||||
resolved "https://registry.yarnpkg.com/@electron-forge/publisher-github/-/publisher-github-7.8.3.tgz#45e51d7d91e63e8c7872217e3b5d16111fd8a3e7"
|
||||
integrity sha512-hFZMDAWXkNrvJA/dA64m2+uLVz1cVyMbX94YXqu9zbW6sMWJzT96om1Gr+c1CnK+mmj5E/ZqVu0846Rq+rcfEQ==
|
||||
"@electron-forge/publisher-github@^7.10.0":
|
||||
version "7.10.0"
|
||||
resolved "https://registry.yarnpkg.com/@electron-forge/publisher-github/-/publisher-github-7.10.0.tgz#6436438abb2bc3a4ff8ca45ec144025c336de516"
|
||||
integrity sha512-ORiEcpPxSHOqu7oR8HlEnwLrdoi/F+w/RHBBiCsCS9EXiOFsVD4g0qY7UIYL8EKSpAQ1mBd81TFoleWxoL0YPA==
|
||||
dependencies:
|
||||
"@electron-forge/publisher-base" "7.8.3"
|
||||
"@electron-forge/shared-types" "7.8.3"
|
||||
"@electron-forge/publisher-base" "7.10.0"
|
||||
"@electron-forge/shared-types" "7.10.0"
|
||||
"@octokit/core" "^5.2.1"
|
||||
"@octokit/plugin-retry" "^6.1.0"
|
||||
"@octokit/request-error" "^5.1.1"
|
||||
@@ -141,68 +144,69 @@
|
||||
log-symbols "^4.0.0"
|
||||
mime-types "^2.1.25"
|
||||
|
||||
"@electron-forge/shared-types@7.8.3":
|
||||
version "7.8.3"
|
||||
resolved "https://registry.yarnpkg.com/@electron-forge/shared-types/-/shared-types-7.8.3.tgz#0b7c54b3fa09bfdc931e22d254b70f1685744fde"
|
||||
integrity sha512-gkZtD7ALXHPDOthJo1rQYLDNfG09fdDRMWvjEgaXdF3Z69xXFfnOWPNuOkRUODNalMnuuGs6l7jDl+QFQgHlDg==
|
||||
"@electron-forge/shared-types@7.10.0":
|
||||
version "7.10.0"
|
||||
resolved "https://registry.yarnpkg.com/@electron-forge/shared-types/-/shared-types-7.10.0.tgz#61204880a895938cd505d947838e06c598ab8580"
|
||||
integrity sha512-FpLBZ1kdIQjRmo09dD/zwDAARGLTzRB2Ja4eplUx5c8ctoblCnvC+KEOYA7R5DaRpKChaW0lqpDRF3ou2W+hHA==
|
||||
dependencies:
|
||||
"@electron-forge/tracer" "7.8.3"
|
||||
"@electron-forge/tracer" "7.10.0"
|
||||
"@electron/packager" "^18.3.5"
|
||||
"@electron/rebuild" "^3.7.0"
|
||||
listr2 "^7.0.2"
|
||||
|
||||
"@electron-forge/template-base@7.8.3":
|
||||
version "7.8.3"
|
||||
resolved "https://registry.yarnpkg.com/@electron-forge/template-base/-/template-base-7.8.3.tgz#009ba783b3e214fb8a0ed23386cc2ff7c514f796"
|
||||
integrity sha512-C0tVODDNKoqhCf7T1HRONJs9DKAmjmk8Of0t8rVjT0ERDzMvLGlBByd785v5lFlKbGERyoaXsYltxPAu92G3aA==
|
||||
"@electron-forge/template-base@7.10.0":
|
||||
version "7.10.0"
|
||||
resolved "https://registry.yarnpkg.com/@electron-forge/template-base/-/template-base-7.10.0.tgz#7739164ea9266868f6e04f22e0a74a65df4a1283"
|
||||
integrity sha512-wdQc17WwBS2RR97Nmjfuo4dqopMKmwDhqVmZd3VgKrR+5iQyxupjND+nf9VMzXd8exoyZzot06hj/ZQ/BAkJOA==
|
||||
dependencies:
|
||||
"@electron-forge/core-utils" "7.8.3"
|
||||
"@electron-forge/shared-types" "7.8.3"
|
||||
"@electron-forge/core-utils" "7.10.0"
|
||||
"@electron-forge/shared-types" "7.10.0"
|
||||
"@malept/cross-spawn-promise" "^2.0.0"
|
||||
debug "^4.3.1"
|
||||
fs-extra "^10.0.0"
|
||||
semver "^7.2.1"
|
||||
username "^5.1.0"
|
||||
|
||||
"@electron-forge/template-vite-typescript@7.8.3":
|
||||
version "7.8.3"
|
||||
resolved "https://registry.yarnpkg.com/@electron-forge/template-vite-typescript/-/template-vite-typescript-7.8.3.tgz#57194eb6faa4e154118b4ac49ae6091f784eb0d3"
|
||||
integrity sha512-HJjjY9xmlpl0vx10mrXdWn2RYHExfazACxmDNNmGO1eq3eqrQk/3R+NDGyqMJ7ajBsRVbkQNt+wayH7HkRJUjA==
|
||||
"@electron-forge/template-vite-typescript@7.10.0":
|
||||
version "7.10.0"
|
||||
resolved "https://registry.yarnpkg.com/@electron-forge/template-vite-typescript/-/template-vite-typescript-7.10.0.tgz#c6a6573e0f08abfc3553629b5ab7b1d70a4d3c76"
|
||||
integrity sha512-OtLNgq2/DUV6G02ERqhJ/RPmd3QgcRiM/KQd0dIkQMtvJ+X8TBgD/WKvr0iVtlrsPH7Y4DQtGJHx1a25tofAIA==
|
||||
dependencies:
|
||||
"@electron-forge/shared-types" "7.8.3"
|
||||
"@electron-forge/template-base" "7.8.3"
|
||||
"@electron-forge/shared-types" "7.10.0"
|
||||
"@electron-forge/template-base" "7.10.0"
|
||||
fs-extra "^10.0.0"
|
||||
|
||||
"@electron-forge/template-vite@7.8.3":
|
||||
version "7.8.3"
|
||||
resolved "https://registry.yarnpkg.com/@electron-forge/template-vite/-/template-vite-7.8.3.tgz#ecc651c9641747b71becc740522ef0cf15c28bf5"
|
||||
integrity sha512-tDL5h+UO5iOzdEYNVsSu4zkUVN4RTxti5iXzcBquKd9Kgt/A/M7xHeuKj7g1Ds7Ul/n2XcFvcfgLcRmiXQeVDA==
|
||||
"@electron-forge/template-vite@7.10.0":
|
||||
version "7.10.0"
|
||||
resolved "https://registry.yarnpkg.com/@electron-forge/template-vite/-/template-vite-7.10.0.tgz#437e49427e46a996ebbe68e4d2902bd344b23602"
|
||||
integrity sha512-inSwFTo8zULrFsyXk9fLjNc6eK4xiHUj3GBaKwGt6emJzErO2mXXrUB8C6eTfWhVSDXtCHnjadkRSyNxAfgMcw==
|
||||
dependencies:
|
||||
"@electron-forge/shared-types" "7.8.3"
|
||||
"@electron-forge/template-base" "7.8.3"
|
||||
"@electron-forge/shared-types" "7.10.0"
|
||||
"@electron-forge/template-base" "7.10.0"
|
||||
fs-extra "^10.0.0"
|
||||
|
||||
"@electron-forge/template-webpack-typescript@7.8.3":
|
||||
version "7.8.3"
|
||||
resolved "https://registry.yarnpkg.com/@electron-forge/template-webpack-typescript/-/template-webpack-typescript-7.8.3.tgz#f79276aa60463a8cc45c85e17bec9c42779ac12b"
|
||||
integrity sha512-Xz3X7YJvot08Xm+0BLIS28GJH+0z9vEN9xYX76SOL4jqDcHH8lRFpNWcE2HsxxxRbCVH+s0etVmACZcWoujUrw==
|
||||
"@electron-forge/template-webpack-typescript@7.10.0":
|
||||
version "7.10.0"
|
||||
resolved "https://registry.yarnpkg.com/@electron-forge/template-webpack-typescript/-/template-webpack-typescript-7.10.0.tgz#1357bedd4279cfaaa9bdccabc6400767cf3baf0c"
|
||||
integrity sha512-9cs371U7ktuRkQUWQPRBM02nRjAVVBWAiEGYkF8eeDiDoJkHfYk1jgsmZkJufasONhNvNbX41VlxfCPJ2iDf+g==
|
||||
dependencies:
|
||||
"@electron-forge/shared-types" "7.8.3"
|
||||
"@electron-forge/template-base" "7.8.3"
|
||||
"@electron-forge/shared-types" "7.10.0"
|
||||
"@electron-forge/template-base" "7.10.0"
|
||||
fs-extra "^10.0.0"
|
||||
|
||||
"@electron-forge/template-webpack@7.8.3":
|
||||
version "7.8.3"
|
||||
resolved "https://registry.yarnpkg.com/@electron-forge/template-webpack/-/template-webpack-7.8.3.tgz#b82b47e8b5e3b2716a0afe4fa1c263b46b4c5271"
|
||||
integrity sha512-1zkji5px1kDXbigFN5959anCf3HAVBvam3bHh2VejnCScegLQP3JBjAn2Nw2ILWq6ej5JNuA/V99b1dr11hPOw==
|
||||
"@electron-forge/template-webpack@7.10.0":
|
||||
version "7.10.0"
|
||||
resolved "https://registry.yarnpkg.com/@electron-forge/template-webpack/-/template-webpack-7.10.0.tgz#10b68d8598b1540ca8dfb5ef8d37f1be0c183e9f"
|
||||
integrity sha512-sOyYDoRjxMq6g+eoy9JZsMXc8vMlY+Qc0vkWtgzYfsVbuVnWU0ktVfeHeeALxb9iwWB/dXupn6XITExChsnzzg==
|
||||
dependencies:
|
||||
"@electron-forge/shared-types" "7.8.3"
|
||||
"@electron-forge/template-base" "7.8.3"
|
||||
"@electron-forge/shared-types" "7.10.0"
|
||||
"@electron-forge/template-base" "7.10.0"
|
||||
fs-extra "^10.0.0"
|
||||
|
||||
"@electron-forge/tracer@7.8.3":
|
||||
version "7.8.3"
|
||||
resolved "https://registry.yarnpkg.com/@electron-forge/tracer/-/tracer-7.8.3.tgz#c2c27fb9b2bd770b39f02bc3ae6e254064421af6"
|
||||
integrity sha512-YVVDaPEUOvR1z+DDdj8wR/vO9OSlC91wz4/2Iqe9rqQz8sztnnQBClMAZTqu9bkDTFyHrns8j8v7tPVuVS6ULQ==
|
||||
"@electron-forge/tracer@7.10.0":
|
||||
version "7.10.0"
|
||||
resolved "https://registry.yarnpkg.com/@electron-forge/tracer/-/tracer-7.10.0.tgz#a1b7ec3f9d629ed14526613093ab331f5733760d"
|
||||
integrity sha512-Qoj8bFBcwH3etG3YwJXHVeauKO3zyiZEelXMXgOp/du2QA23fc2+Ar7mzxcjY5fWDScd/8CN7M3+LxpovcKIDA==
|
||||
dependencies:
|
||||
chrome-trace-event "^1.0.3"
|
||||
|
||||
@@ -357,6 +361,158 @@
|
||||
resolved "https://registry.yarnpkg.com/@gar/promisify/-/promisify-1.1.3.tgz#555193ab2e3bb3b6adc3d551c9c030d9e860daf6"
|
||||
integrity sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==
|
||||
|
||||
"@inquirer/checkbox@^3.0.1":
|
||||
version "3.0.1"
|
||||
resolved "https://registry.yarnpkg.com/@inquirer/checkbox/-/checkbox-3.0.1.tgz#0a57f704265f78c36e17f07e421b98efb4b9867b"
|
||||
integrity sha512-0hm2nrToWUdD6/UHnel/UKGdk1//ke5zGUpHIvk5ZWmaKezlGxZkOJXNSWsdxO/rEqTkbB3lNC2J6nBElV2aAQ==
|
||||
dependencies:
|
||||
"@inquirer/core" "^9.2.1"
|
||||
"@inquirer/figures" "^1.0.6"
|
||||
"@inquirer/type" "^2.0.0"
|
||||
ansi-escapes "^4.3.2"
|
||||
yoctocolors-cjs "^2.1.2"
|
||||
|
||||
"@inquirer/confirm@^4.0.1":
|
||||
version "4.0.1"
|
||||
resolved "https://registry.yarnpkg.com/@inquirer/confirm/-/confirm-4.0.1.tgz#9106d6bffa0b2fdd0e4f60319b6f04f2e06e6e25"
|
||||
integrity sha512-46yL28o2NJ9doViqOy0VDcoTzng7rAb6yPQKU7VDLqkmbCaH4JqK4yk4XqlzNWy9PVC5pG1ZUXPBQv+VqnYs2w==
|
||||
dependencies:
|
||||
"@inquirer/core" "^9.2.1"
|
||||
"@inquirer/type" "^2.0.0"
|
||||
|
||||
"@inquirer/core@^9.2.1":
|
||||
version "9.2.1"
|
||||
resolved "https://registry.yarnpkg.com/@inquirer/core/-/core-9.2.1.tgz#677c49dee399c9063f31e0c93f0f37bddc67add1"
|
||||
integrity sha512-F2VBt7W/mwqEU4bL0RnHNZmC/OxzNx9cOYxHqnXX3MP6ruYvZUZAW9imgN9+h/uBT/oP8Gh888J2OZSbjSeWcg==
|
||||
dependencies:
|
||||
"@inquirer/figures" "^1.0.6"
|
||||
"@inquirer/type" "^2.0.0"
|
||||
"@types/mute-stream" "^0.0.4"
|
||||
"@types/node" "^22.5.5"
|
||||
"@types/wrap-ansi" "^3.0.0"
|
||||
ansi-escapes "^4.3.2"
|
||||
cli-width "^4.1.0"
|
||||
mute-stream "^1.0.0"
|
||||
signal-exit "^4.1.0"
|
||||
strip-ansi "^6.0.1"
|
||||
wrap-ansi "^6.2.0"
|
||||
yoctocolors-cjs "^2.1.2"
|
||||
|
||||
"@inquirer/editor@^3.0.1":
|
||||
version "3.0.1"
|
||||
resolved "https://registry.yarnpkg.com/@inquirer/editor/-/editor-3.0.1.tgz#d109f21e050af6b960725388cb1c04214ed7c7bc"
|
||||
integrity sha512-VA96GPFaSOVudjKFraokEEmUQg/Lub6OXvbIEZU1SDCmBzRkHGhxoFAVaF30nyiB4m5cEbDgiI2QRacXZ2hw9Q==
|
||||
dependencies:
|
||||
"@inquirer/core" "^9.2.1"
|
||||
"@inquirer/type" "^2.0.0"
|
||||
external-editor "^3.1.0"
|
||||
|
||||
"@inquirer/expand@^3.0.1":
|
||||
version "3.0.1"
|
||||
resolved "https://registry.yarnpkg.com/@inquirer/expand/-/expand-3.0.1.tgz#aed9183cac4d12811be47a4a895ea8e82a17e22c"
|
||||
integrity sha512-ToG8d6RIbnVpbdPdiN7BCxZGiHOTomOX94C2FaT5KOHupV40tKEDozp12res6cMIfRKrXLJyexAZhWVHgbALSQ==
|
||||
dependencies:
|
||||
"@inquirer/core" "^9.2.1"
|
||||
"@inquirer/type" "^2.0.0"
|
||||
yoctocolors-cjs "^2.1.2"
|
||||
|
||||
"@inquirer/figures@^1.0.6":
|
||||
version "1.0.13"
|
||||
resolved "https://registry.yarnpkg.com/@inquirer/figures/-/figures-1.0.13.tgz#ad0afd62baab1c23175115a9b62f511b6a751e45"
|
||||
integrity sha512-lGPVU3yO9ZNqA7vTYz26jny41lE7yoQansmqdMLBEfqaGsmdg7V3W9mK9Pvb5IL4EVZ9GnSDGMO/cJXud5dMaw==
|
||||
|
||||
"@inquirer/input@^3.0.1":
|
||||
version "3.0.1"
|
||||
resolved "https://registry.yarnpkg.com/@inquirer/input/-/input-3.0.1.tgz#de63d49e516487388508d42049deb70f2cb5f28e"
|
||||
integrity sha512-BDuPBmpvi8eMCxqC5iacloWqv+5tQSJlUafYWUe31ow1BVXjW2a5qe3dh4X/Z25Wp22RwvcaLCc2siHobEOfzg==
|
||||
dependencies:
|
||||
"@inquirer/core" "^9.2.1"
|
||||
"@inquirer/type" "^2.0.0"
|
||||
|
||||
"@inquirer/number@^2.0.1":
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/@inquirer/number/-/number-2.0.1.tgz#b9863080d02ab7dc2e56e16433d83abea0f2a980"
|
||||
integrity sha512-QpR8jPhRjSmlr/mD2cw3IR8HRO7lSVOnqUvQa8scv1Lsr3xoAMMworcYW3J13z3ppjBFBD2ef1Ci6AE5Qn8goQ==
|
||||
dependencies:
|
||||
"@inquirer/core" "^9.2.1"
|
||||
"@inquirer/type" "^2.0.0"
|
||||
|
||||
"@inquirer/password@^3.0.1":
|
||||
version "3.0.1"
|
||||
resolved "https://registry.yarnpkg.com/@inquirer/password/-/password-3.0.1.tgz#2a9a9143591088336bbd573bcb05d5bf080dbf87"
|
||||
integrity sha512-haoeEPUisD1NeE2IanLOiFr4wcTXGWrBOyAyPZi1FfLJuXOzNmxCJPgUrGYKVh+Y8hfGJenIfz5Wb/DkE9KkMQ==
|
||||
dependencies:
|
||||
"@inquirer/core" "^9.2.1"
|
||||
"@inquirer/type" "^2.0.0"
|
||||
ansi-escapes "^4.3.2"
|
||||
|
||||
"@inquirer/prompts@^6.0.1":
|
||||
version "6.0.1"
|
||||
resolved "https://registry.yarnpkg.com/@inquirer/prompts/-/prompts-6.0.1.tgz#43f5c0ed35c5ebfe52f1d43d46da2d363d950071"
|
||||
integrity sha512-yl43JD/86CIj3Mz5mvvLJqAOfIup7ncxfJ0Btnl0/v5TouVUyeEdcpknfgc+yMevS/48oH9WAkkw93m7otLb/A==
|
||||
dependencies:
|
||||
"@inquirer/checkbox" "^3.0.1"
|
||||
"@inquirer/confirm" "^4.0.1"
|
||||
"@inquirer/editor" "^3.0.1"
|
||||
"@inquirer/expand" "^3.0.1"
|
||||
"@inquirer/input" "^3.0.1"
|
||||
"@inquirer/number" "^2.0.1"
|
||||
"@inquirer/password" "^3.0.1"
|
||||
"@inquirer/rawlist" "^3.0.1"
|
||||
"@inquirer/search" "^2.0.1"
|
||||
"@inquirer/select" "^3.0.1"
|
||||
|
||||
"@inquirer/rawlist@^3.0.1":
|
||||
version "3.0.1"
|
||||
resolved "https://registry.yarnpkg.com/@inquirer/rawlist/-/rawlist-3.0.1.tgz#729def358419cc929045f264131878ed379e0af3"
|
||||
integrity sha512-VgRtFIwZInUzTiPLSfDXK5jLrnpkuSOh1ctfaoygKAdPqjcjKYmGh6sCY1pb0aGnCGsmhUxoqLDUAU0ud+lGXQ==
|
||||
dependencies:
|
||||
"@inquirer/core" "^9.2.1"
|
||||
"@inquirer/type" "^2.0.0"
|
||||
yoctocolors-cjs "^2.1.2"
|
||||
|
||||
"@inquirer/search@^2.0.1":
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/@inquirer/search/-/search-2.0.1.tgz#69b774a0a826de2e27b48981d01bc5ad81e73721"
|
||||
integrity sha512-r5hBKZk3g5MkIzLVoSgE4evypGqtOannnB3PKTG9NRZxyFRKcfzrdxXXPcoJQsxJPzvdSU2Rn7pB7lw0GCmGAg==
|
||||
dependencies:
|
||||
"@inquirer/core" "^9.2.1"
|
||||
"@inquirer/figures" "^1.0.6"
|
||||
"@inquirer/type" "^2.0.0"
|
||||
yoctocolors-cjs "^2.1.2"
|
||||
|
||||
"@inquirer/select@^3.0.1":
|
||||
version "3.0.1"
|
||||
resolved "https://registry.yarnpkg.com/@inquirer/select/-/select-3.0.1.tgz#1df9ed27fb85a5f526d559ac5ce7cc4e9dc4e7ec"
|
||||
integrity sha512-lUDGUxPhdWMkN/fHy1Lk7pF3nK1fh/gqeyWXmctefhxLYxlDsc7vsPBEpxrfVGDsVdyYJsiJoD4bJ1b623cV1Q==
|
||||
dependencies:
|
||||
"@inquirer/core" "^9.2.1"
|
||||
"@inquirer/figures" "^1.0.6"
|
||||
"@inquirer/type" "^2.0.0"
|
||||
ansi-escapes "^4.3.2"
|
||||
yoctocolors-cjs "^2.1.2"
|
||||
|
||||
"@inquirer/type@^1.5.5":
|
||||
version "1.5.5"
|
||||
resolved "https://registry.yarnpkg.com/@inquirer/type/-/type-1.5.5.tgz#303ea04ce7ad2e585b921b662b3be36ef7b4f09b"
|
||||
integrity sha512-MzICLu4yS7V8AA61sANROZ9vT1H3ooca5dSmI1FjZkzq7o/koMsRfQSzRtFo+F3Ao4Sf1C0bpLKejpKB/+j6MA==
|
||||
dependencies:
|
||||
mute-stream "^1.0.0"
|
||||
|
||||
"@inquirer/type@^2.0.0":
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/@inquirer/type/-/type-2.0.0.tgz#08fa513dca2cb6264fe1b0a2fabade051444e3f6"
|
||||
integrity sha512-XvJRx+2KR3YXyYtPUUy+qd9i7p+GO9Ko6VIIpWlBrpWwXDv8WLFeHTxz35CfQFUiBMLXlGHhGzys7lqit9gWag==
|
||||
dependencies:
|
||||
mute-stream "^1.0.0"
|
||||
|
||||
"@listr2/prompt-adapter-inquirer@^2.0.22":
|
||||
version "2.0.22"
|
||||
resolved "https://registry.yarnpkg.com/@listr2/prompt-adapter-inquirer/-/prompt-adapter-inquirer-2.0.22.tgz#95f7730de62089be79a87a80aa333f5f4644f3c5"
|
||||
integrity sha512-hV36ZoY+xKL6pYOt1nPNnkciFkn89KZwqLhAFzJvYysAvL5uBQdiADZx/8bIDXIukzzwG0QlPYolgMzQUtKgpQ==
|
||||
dependencies:
|
||||
"@inquirer/type" "^1.5.5"
|
||||
|
||||
"@malept/cross-spawn-promise@^1.0.0":
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/@malept/cross-spawn-promise/-/cross-spawn-promise-1.1.1.tgz#504af200af6b98e198bce768bc1730c6936ae01d"
|
||||
@@ -570,17 +726,24 @@
|
||||
dependencies:
|
||||
"@types/node" "*"
|
||||
|
||||
"@types/node@*":
|
||||
version "24.3.1"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-24.3.1.tgz#b0a3fb2afed0ef98e8d7f06d46ef6349047709f3"
|
||||
integrity sha512-3vXmQDXy+woz+gnrTvuvNrPzekOi+Ds0ReMxw0LzBiK3a+1k0kQn9f2NWk+lgD4rJehFUmYy2gMhJ2ZI+7YP9g==
|
||||
"@types/mute-stream@^0.0.4":
|
||||
version "0.0.4"
|
||||
resolved "https://registry.yarnpkg.com/@types/mute-stream/-/mute-stream-0.0.4.tgz#77208e56a08767af6c5e1237be8888e2f255c478"
|
||||
integrity sha512-CPM9nzrCPPJHQNA9keH9CVkVI+WR5kMa+7XEs5jcGQ0VoAGnLv242w8lIVgwAEfmE4oufJRaTc9PNLQl0ioAow==
|
||||
dependencies:
|
||||
undici-types "~7.10.0"
|
||||
"@types/node" "*"
|
||||
|
||||
"@types/node@^22.7.7":
|
||||
version "22.18.1"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-22.18.1.tgz#cc85ee6999b2a2928739281d2f56ff410a140c52"
|
||||
integrity sha512-rzSDyhn4cYznVG+PCzGe1lwuMYJrcBS1fc3JqSa2PvtABwWo+dZ1ij5OVok3tqfpEBCBoaR4d7upFJk73HRJDw==
|
||||
"@types/node@*":
|
||||
version "24.7.0"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-24.7.0.tgz#a34c9f0d3401db396782e440317dd5d8373c286f"
|
||||
integrity sha512-IbKooQVqUBrlzWTi79E8Fw78l8k1RNtlDDNWsFZs7XonuQSJ8oNYfEeclhprUldXISRMLzBpILuKgPlIxm+/Yw==
|
||||
dependencies:
|
||||
undici-types "~7.14.0"
|
||||
|
||||
"@types/node@^22.5.5", "@types/node@^22.7.7":
|
||||
version "22.18.8"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-22.18.8.tgz#738d9dafa38f6e0c467687c158f8e1ca2d7d8eaa"
|
||||
integrity sha512-pAZSHMiagDR7cARo/cch1f3rXy0AEXwsVsVH09FcyeJVAzCnGgmYis7P3JidtTUjyadhTeSo8TgRPswstghDaw==
|
||||
dependencies:
|
||||
undici-types "~6.21.0"
|
||||
|
||||
@@ -598,6 +761,11 @@
|
||||
dependencies:
|
||||
"@types/node" "*"
|
||||
|
||||
"@types/wrap-ansi@^3.0.0":
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/@types/wrap-ansi/-/wrap-ansi-3.0.0.tgz#18b97a972f94f60a679fd5c796d96421b9abb9fd"
|
||||
integrity sha512-ltIpx+kM7g/MLRZfkbL7EsCEjfzCcScLpkg37eXEtx5kmrAKBkTJwd1GIAjDSL8wTpM6Hzn5YO4pSb91BEwu1g==
|
||||
|
||||
"@types/ws@^8.18.1":
|
||||
version "8.18.1"
|
||||
resolved "https://registry.yarnpkg.com/@types/ws/-/ws-8.18.1.tgz#48464e4bf2ddfd17db13d845467f6070ffea4aa9"
|
||||
@@ -612,6 +780,11 @@
|
||||
dependencies:
|
||||
"@types/node" "*"
|
||||
|
||||
"@vscode/sudo-prompt@^9.3.1":
|
||||
version "9.3.1"
|
||||
resolved "https://registry.yarnpkg.com/@vscode/sudo-prompt/-/sudo-prompt-9.3.1.tgz#c562334bc6647733649fd42afc96c0eea8de3b65"
|
||||
integrity sha512-9ORTwwS74VaTn38tNbQhsA5U44zkJfcb0BdTSyyG6frP4e8KMtHuTXYmwefe5dpL8XB1aGSIVTaLjD3BbWb5iA==
|
||||
|
||||
"@xmldom/xmldom@^0.8.8":
|
||||
version "0.8.11"
|
||||
resolved "https://registry.yarnpkg.com/@xmldom/xmldom/-/xmldom-0.8.11.tgz#b79de2d67389734c57c52595f7a7305e30c2d608"
|
||||
@@ -651,6 +824,13 @@ aggregate-error@^3.0.0:
|
||||
clean-stack "^2.0.0"
|
||||
indent-string "^4.0.0"
|
||||
|
||||
ansi-escapes@^4.3.2:
|
||||
version "4.3.2"
|
||||
resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e"
|
||||
integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==
|
||||
dependencies:
|
||||
type-fest "^0.21.3"
|
||||
|
||||
ansi-escapes@^5.0.0:
|
||||
version "5.0.0"
|
||||
resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-5.0.0.tgz#b6a0caf0eef0c41af190e9a749e0c00ec04bb2a6"
|
||||
@@ -664,9 +844,9 @@ ansi-regex@^5.0.1:
|
||||
integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==
|
||||
|
||||
ansi-regex@^6.0.1:
|
||||
version "6.2.0"
|
||||
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-6.2.0.tgz#2f302e7550431b1b7762705fffb52cf1ffa20447"
|
||||
integrity sha512-TKY5pyBkHyADOPYlRT9Lx6F544mPl0vS5Ew7BJ45hA08Q+t3GjbueLliBWN3sMICk6+y7HdyxSzC4bWS8baBdg==
|
||||
version "6.2.2"
|
||||
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-6.2.2.tgz#60216eea464d864597ce2832000738a0589650c1"
|
||||
integrity sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==
|
||||
|
||||
ansi-styles@^4.0.0, ansi-styles@^4.1.0:
|
||||
version "4.3.0"
|
||||
@@ -676,9 +856,9 @@ ansi-styles@^4.0.0, ansi-styles@^4.1.0:
|
||||
color-convert "^2.0.1"
|
||||
|
||||
ansi-styles@^6.0.0, ansi-styles@^6.1.0:
|
||||
version "6.2.1"
|
||||
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-6.2.1.tgz#0e62320cf99c21afff3b3012192546aacbfb05c5"
|
||||
integrity sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==
|
||||
version "6.2.3"
|
||||
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-6.2.3.tgz#c044d5dcc521a076413472597a1acb1f103c4041"
|
||||
integrity sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==
|
||||
|
||||
asynckit@^0.4.0:
|
||||
version "0.4.0"
|
||||
@@ -695,10 +875,10 @@ author-regex@^1.0.0:
|
||||
resolved "https://registry.yarnpkg.com/author-regex/-/author-regex-1.0.0.tgz#d08885be6b9bbf9439fe087c76287245f0a81450"
|
||||
integrity sha512-KbWgR8wOYRAPekEmMXrYYdc7BRyhn2Ftk7KWfMUnQ43hFdojWEFRxhhRUm3/OFEdPa1r0KAvTTg9YQK57xTe0g==
|
||||
|
||||
axios@^1.11.0:
|
||||
version "1.11.0"
|
||||
resolved "https://registry.yarnpkg.com/axios/-/axios-1.11.0.tgz#c2ec219e35e414c025b2095e8b8280278478fdb6"
|
||||
integrity sha512-1Lx3WLFQWm3ooKDYZD1eXmoGO9fxYQjrycfHFC8P0sCfQVXyROp0p9PFWBehewBOdCwHc+f/b8I0fMto5eSfwA==
|
||||
axios@^1.12.2:
|
||||
version "1.12.2"
|
||||
resolved "https://registry.yarnpkg.com/axios/-/axios-1.12.2.tgz#6c307390136cf7a2278d09cec63b136dfc6e6da7"
|
||||
integrity sha512-vMJzPewAlRyOgxV2dU0Cuz2O8zzzx9VYtbJOaBgXFeLc4IV/Eg50n4LowmehOOR61S8ZMpc2K5Sa7g6A4jfkUw==
|
||||
dependencies:
|
||||
follow-redirects "^1.15.6"
|
||||
form-data "^4.0.4"
|
||||
@@ -775,15 +955,15 @@ braces@^3.0.3:
|
||||
dependencies:
|
||||
fill-range "^7.1.1"
|
||||
|
||||
broker-factory@^3.1.9:
|
||||
version "3.1.9"
|
||||
resolved "https://registry.yarnpkg.com/broker-factory/-/broker-factory-3.1.9.tgz#4fcc0ae5f62595076dccda868b7500e63071ef5a"
|
||||
integrity sha512-MzvndyD6EcbkBtX4NXm/HfdO1+cOR5ONNdMCXEKfHpxGdMtuDz7+o+nJf7HMtyPH1sUVf/lEIP+DMluC5PgaBQ==
|
||||
broker-factory@^3.1.10:
|
||||
version "3.1.10"
|
||||
resolved "https://registry.yarnpkg.com/broker-factory/-/broker-factory-3.1.10.tgz#583005d7bca34c32d828dfcadc51badf5d9a376b"
|
||||
integrity sha512-BzqK5GYFhvVFvO13uzPN0SCiOsOQuhMUbsGvTXDJMA2/N4GvIlFdxEuueE+60Zk841bBU5G3+fl2cqYEo0wgGg==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.28.3"
|
||||
fast-unique-numbers "^9.0.23"
|
||||
"@babel/runtime" "^7.28.4"
|
||||
fast-unique-numbers "^9.0.24"
|
||||
tslib "^2.8.1"
|
||||
worker-factory "^7.0.45"
|
||||
worker-factory "^7.0.46"
|
||||
|
||||
buffer-crc32@~0.2.3:
|
||||
version "0.2.13"
|
||||
@@ -869,6 +1049,11 @@ chalk@^4.0.0, chalk@^4.1.0:
|
||||
ansi-styles "^4.1.0"
|
||||
supports-color "^7.1.0"
|
||||
|
||||
chardet@^0.7.0:
|
||||
version "0.7.0"
|
||||
resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e"
|
||||
integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==
|
||||
|
||||
chownr@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/chownr/-/chownr-2.0.0.tgz#15bfbe53d2eab4cf70f18a8cd68ebe5b3cb1dece"
|
||||
@@ -911,6 +1096,11 @@ cli-truncate@^3.1.0:
|
||||
slice-ansi "^5.0.0"
|
||||
string-width "^5.0.0"
|
||||
|
||||
cli-width@^4.1.0:
|
||||
version "4.1.0"
|
||||
resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-4.1.0.tgz#42daac41d3c254ef38ad8ac037672130173691c5"
|
||||
integrity sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==
|
||||
|
||||
cliui@^7.0.2:
|
||||
version "7.0.4"
|
||||
resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f"
|
||||
@@ -1041,9 +1231,9 @@ cross-zip@^4.0.0:
|
||||
integrity sha512-n63i0lZ0rvQ6FXiGQ+/JFCKAUyPFhLQYJIqKaa+tSJtfKeULF/IDNDAbdnSIxgS4NTuw2b0+lj8LzfITuq+ZxQ==
|
||||
|
||||
debug@4, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.3, debug@^4.3.4, debug@^4.4.1:
|
||||
version "4.4.1"
|
||||
resolved "https://registry.yarnpkg.com/debug/-/debug-4.4.1.tgz#e5a8bc6cbc4c6cd3e64308b0693a3d4fa550189b"
|
||||
integrity sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==
|
||||
version "4.4.3"
|
||||
resolved "https://registry.yarnpkg.com/debug/-/debug-4.4.3.tgz#c6ae432d9bd9662582fce08709b038c58e9e3d6a"
|
||||
integrity sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==
|
||||
dependencies:
|
||||
ms "^2.1.3"
|
||||
|
||||
@@ -1102,9 +1292,9 @@ deprecation@^2.0.0:
|
||||
integrity sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==
|
||||
|
||||
detect-libc@^2.0.1:
|
||||
version "2.0.4"
|
||||
resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-2.0.4.tgz#f04715b8ba815e53b4d8109655b6508a6865a7e8"
|
||||
integrity sha512-3UDv+G9CsCKO1WKMGw9fwq/SWJYbI0c5Y7LU1AXYoDdbhE2AHQ6N6Nb34sG8Fj7T5APy8qXDCKuuIHd1BR0tVA==
|
||||
version "2.1.2"
|
||||
resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-2.1.2.tgz#689c5dcdc1900ef5583a4cb9f6d7b473742074ad"
|
||||
integrity sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==
|
||||
|
||||
detect-node@^2.0.4:
|
||||
version "2.1.0"
|
||||
@@ -1164,10 +1354,15 @@ electron-installer-debian@^3.2.0:
|
||||
word-wrap "^1.2.3"
|
||||
yargs "^16.0.2"
|
||||
|
||||
electron@^38.0.0:
|
||||
version "38.0.0"
|
||||
resolved "https://registry.yarnpkg.com/electron/-/electron-38.0.0.tgz#e51803f62c8d4c368f77642a1b1b05444c687fba"
|
||||
integrity sha512-egljptiPJqbL/oamFCEY+g3RNeONWTVxZSGeyLqzK8xq106JhzuxnhJZ3sxt4DzJFaofbGyGJA37Oe9d+gVzYw==
|
||||
electron-log@^5.4.3:
|
||||
version "5.4.3"
|
||||
resolved "https://registry.yarnpkg.com/electron-log/-/electron-log-5.4.3.tgz#02a90baf4256950ca416095db6e5745268584d20"
|
||||
integrity sha512-sOUsM3LjZdugatazSQ/XTyNcw8dfvH1SYhXWiJyfYodAAKOZdHs0txPiLDXFzOZbhXgAgshQkshH2ccq0feyLQ==
|
||||
|
||||
electron@^38.2.2:
|
||||
version "38.2.2"
|
||||
resolved "https://registry.yarnpkg.com/electron/-/electron-38.2.2.tgz#117a516fa2215604e35a60f3cc2543f3f5404a16"
|
||||
integrity sha512-OXSaVNXDlonXDjMRsFNQo1j5tzTKwKXh5/m46IjAFccBcZJZMISI+EjSI07oexIuhvKM8AZLuFuihVn4YjWWrA==
|
||||
dependencies:
|
||||
"@electron/get" "^2.0.0"
|
||||
"@types/node" "^22.7.7"
|
||||
@@ -1208,9 +1403,9 @@ err-code@^2.0.2:
|
||||
integrity sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==
|
||||
|
||||
error-ex@^1.2.0:
|
||||
version "1.3.2"
|
||||
resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf"
|
||||
integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==
|
||||
version "1.3.4"
|
||||
resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.4.tgz#b3a8d8bb6f92eecc1629e3e27d3c8607a8a32414"
|
||||
integrity sha512-sqQamAnR14VgCr1A618A3sGrygcpK+HEbenA/HiEAkkUwcZIIB/tgWqHFxWgOyDh4nB4JCRimh79dR5Ywc9MDQ==
|
||||
dependencies:
|
||||
is-arrayish "^0.2.1"
|
||||
|
||||
@@ -1294,6 +1489,15 @@ exponential-backoff@^3.1.1:
|
||||
resolved "https://registry.yarnpkg.com/exponential-backoff/-/exponential-backoff-3.1.2.tgz#a8f26adb96bf78e8cd8ad1037928d5e5c0679d91"
|
||||
integrity sha512-8QxYTVXUkuy7fIIoitQkPwGonB8F3Zj8eEO8Sqg9Zv/bkI7RJAzowee4gr81Hak/dUTpA2Z7VfQgoijjPNlUZA==
|
||||
|
||||
external-editor@^3.1.0:
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.1.0.tgz#cb03f740befae03ea4d283caed2741a83f335495"
|
||||
integrity sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==
|
||||
dependencies:
|
||||
chardet "^0.7.0"
|
||||
iconv-lite "^0.4.24"
|
||||
tmp "^0.0.33"
|
||||
|
||||
extract-zip@^2.0.0, extract-zip@^2.0.1:
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/extract-zip/-/extract-zip-2.0.1.tgz#663dca56fe46df890d5f131ef4a06d22bb8ba13a"
|
||||
@@ -1316,12 +1520,12 @@ fast-glob@^3.2.7:
|
||||
merge2 "^1.3.0"
|
||||
micromatch "^4.0.8"
|
||||
|
||||
fast-unique-numbers@^9.0.23:
|
||||
version "9.0.23"
|
||||
resolved "https://registry.yarnpkg.com/fast-unique-numbers/-/fast-unique-numbers-9.0.23.tgz#d6c260a1d1d2575ae20c5b524b2771b92f1e1eba"
|
||||
integrity sha512-jcRIaHo46nfvyvKRMaFSKXmez4jALQ3Qw49gxM5F4siz8HqkyKPPEexpCOYwBSJI1HovrDr4fEedM8QAJ7oX3w==
|
||||
fast-unique-numbers@^9.0.24:
|
||||
version "9.0.24"
|
||||
resolved "https://registry.yarnpkg.com/fast-unique-numbers/-/fast-unique-numbers-9.0.24.tgz#9f86bdbfa99b1b6546239202641196c78f81fd55"
|
||||
integrity sha512-Dv0BYn4waOWse94j16rsZ5w/0zoaCa74O3q6IZjMqaXbtT92Q+Sb6pPk+phGzD8Xh+nueQmSRI3tSCaHKidzKw==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.28.3"
|
||||
"@babel/runtime" "^7.28.4"
|
||||
tslib "^2.8.1"
|
||||
|
||||
fastq@^1.6.0:
|
||||
@@ -1408,9 +1612,9 @@ fs-extra@^10.0.0, fs-extra@^10.1.0:
|
||||
universalify "^2.0.0"
|
||||
|
||||
fs-extra@^11.1.0, fs-extra@^11.1.1:
|
||||
version "11.3.1"
|
||||
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-11.3.1.tgz#ba7a1f97a85f94c6db2e52ff69570db3671d5a74"
|
||||
integrity sha512-eXvGGwZ5CL17ZSwHWd3bbgk7UUpF6IFHtP57NYYakPvHOs8GDgDe5KJI36jIJzDkJ6eJjuzRA8eBQb6SkKue0g==
|
||||
version "11.3.2"
|
||||
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-11.3.2.tgz#c838aeddc6f4a8c74dd15f85e11fe5511bfe02a4"
|
||||
integrity sha512-Xr9F6z6up6Ws+NjzMCZc6WXg2YFRlrLP9NQDO3VQrWrfiojdhS56TzueT88ze0uBdCTwEIhQ3ptnmKeWGFAe0A==
|
||||
dependencies:
|
||||
graceful-fs "^4.2.0"
|
||||
jsonfile "^6.0.1"
|
||||
@@ -1689,6 +1893,13 @@ humanize-ms@^1.2.1:
|
||||
dependencies:
|
||||
ms "^2.0.0"
|
||||
|
||||
iconv-lite@^0.4.24:
|
||||
version "0.4.24"
|
||||
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b"
|
||||
integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==
|
||||
dependencies:
|
||||
safer-buffer ">= 2.1.2 < 3"
|
||||
|
||||
iconv-lite@^0.6.2:
|
||||
version "0.6.3"
|
||||
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501"
|
||||
@@ -1824,9 +2035,9 @@ isexe@^2.0.0:
|
||||
integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==
|
||||
|
||||
jiti@^2.4.2:
|
||||
version "2.5.1"
|
||||
resolved "https://registry.yarnpkg.com/jiti/-/jiti-2.5.1.tgz#bd099c1c2be1c59bbea4e5adcd127363446759d0"
|
||||
integrity sha512-twQoecYPiVA5K/h6SxtORw/Bs3ar+mLUtoPSc7iMXzQzK8d7eJ/R09wmTwAjiamETn1cXYPGfNnu7DMoHgu12w==
|
||||
version "2.6.1"
|
||||
resolved "https://registry.yarnpkg.com/jiti/-/jiti-2.6.1.tgz#178ef2fc9a1a594248c20627cd820187a4d78d92"
|
||||
integrity sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ==
|
||||
|
||||
js-sdsl@4.3.0:
|
||||
version "4.3.0"
|
||||
@@ -2190,6 +2401,11 @@ ms@^2.0.0, ms@^2.1.3:
|
||||
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2"
|
||||
integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==
|
||||
|
||||
mute-stream@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-1.0.0.tgz#e31bd9fe62f0aed23520aa4324ea6671531e013e"
|
||||
integrity sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA==
|
||||
|
||||
negotiator@^0.6.3:
|
||||
version "0.6.4"
|
||||
resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.4.tgz#777948e2452651c570b712dd01c23e262713fff7"
|
||||
@@ -2201,9 +2417,9 @@ nice-try@^1.0.4:
|
||||
integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==
|
||||
|
||||
node-abi@^3.45.0:
|
||||
version "3.77.0"
|
||||
resolved "https://registry.yarnpkg.com/node-abi/-/node-abi-3.77.0.tgz#3ad90d5c9d45663420e5aa4ff58dbf4e3625419a"
|
||||
integrity sha512-DSmt0OEcLoK4i3NuscSbGjOf3bqiDEutejqENSplMSFA/gmB8mkED9G4pKWnPl7MDU4rSHebKPHeitpDfyH0cQ==
|
||||
version "3.78.0"
|
||||
resolved "https://registry.yarnpkg.com/node-abi/-/node-abi-3.78.0.tgz#fd0ecbd0aa89857b98da06bd3909194abb0821ba"
|
||||
integrity sha512-E2wEyrgX/CqvicaQYU3Ze1PFGjc4QYPGsjUrlYkqAE0WjHEZwgOsGMPMzkMse4LjJbDmaEuDX3CM036j5K2DSQ==
|
||||
dependencies:
|
||||
semver "^7.3.5"
|
||||
|
||||
@@ -2292,6 +2508,11 @@ ora@^5.1.0:
|
||||
strip-ansi "^6.0.0"
|
||||
wcwidth "^1.0.1"
|
||||
|
||||
os-tmpdir@~1.0.2:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274"
|
||||
integrity sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==
|
||||
|
||||
p-cancelable@^2.0.0:
|
||||
version "2.1.1"
|
||||
resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-2.1.1.tgz#aab7fbd416582fa32a3db49859c122487c5ed2cf"
|
||||
@@ -2669,7 +2890,7 @@ safe-buffer@~5.2.0:
|
||||
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6"
|
||||
integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==
|
||||
|
||||
"safer-buffer@>= 2.1.2 < 3.0.0":
|
||||
"safer-buffer@>= 2.1.2 < 3", "safer-buffer@>= 2.1.2 < 3.0.0":
|
||||
version "2.1.2"
|
||||
resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"
|
||||
integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==
|
||||
@@ -2690,9 +2911,9 @@ semver@^6.2.0:
|
||||
integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==
|
||||
|
||||
semver@^7.1.1, semver@^7.1.3, semver@^7.2.1, semver@^7.3.2, semver@^7.3.5:
|
||||
version "7.7.2"
|
||||
resolved "https://registry.yarnpkg.com/semver/-/semver-7.7.2.tgz#67d99fdcd35cec21e6f8b87a7fd515a33f982b58"
|
||||
integrity sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==
|
||||
version "7.7.3"
|
||||
resolved "https://registry.yarnpkg.com/semver/-/semver-7.7.3.tgz#4b5f4143d007633a8dc671cd0a6ef9147b8bb946"
|
||||
integrity sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==
|
||||
|
||||
serialize-error@^7.0.1:
|
||||
version "7.0.1"
|
||||
@@ -2735,6 +2956,11 @@ signal-exit@^3.0.0, signal-exit@^3.0.2:
|
||||
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9"
|
||||
integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==
|
||||
|
||||
signal-exit@^4.1.0:
|
||||
version "4.1.0"
|
||||
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-4.1.0.tgz#952188c1cbd546070e2dd20d0f41c0ae0530cb04"
|
||||
integrity sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==
|
||||
|
||||
slice-ansi@^5.0.0:
|
||||
version "5.0.0"
|
||||
resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-5.0.0.tgz#b73063c57aa96f9cd881654b15294d95d285c42a"
|
||||
@@ -2861,9 +3087,9 @@ strip-ansi@^6.0.0, strip-ansi@^6.0.1:
|
||||
ansi-regex "^5.0.1"
|
||||
|
||||
strip-ansi@^7.0.1:
|
||||
version "7.1.0"
|
||||
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45"
|
||||
integrity sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==
|
||||
version "7.1.2"
|
||||
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.2.tgz#132875abde678c7ea8d691533f2e7e22bb744dba"
|
||||
integrity sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==
|
||||
dependencies:
|
||||
ansi-regex "^6.0.1"
|
||||
|
||||
@@ -2884,11 +3110,6 @@ strip-outer@^1.0.1:
|
||||
dependencies:
|
||||
escape-string-regexp "^1.0.2"
|
||||
|
||||
sudo-prompt@^9.1.1:
|
||||
version "9.2.1"
|
||||
resolved "https://registry.yarnpkg.com/sudo-prompt/-/sudo-prompt-9.2.1.tgz#77efb84309c9ca489527a4e749f287e6bdd52afd"
|
||||
integrity sha512-Mu7R0g4ig9TUuGSxJavny5Rv0egCEtpZRNMrZaYS1vxkiIxGiGUwoezU3LazIQ+KE04hTrTfNPgxU5gzi7F5Pw==
|
||||
|
||||
sumchecker@^3.0.1:
|
||||
version "3.0.1"
|
||||
resolved "https://registry.yarnpkg.com/sumchecker/-/sumchecker-3.0.1.tgz#6377e996795abb0b6d348e9b3e1dfb24345a8e42"
|
||||
@@ -2932,6 +3153,13 @@ tmp-promise@^3.0.2:
|
||||
dependencies:
|
||||
tmp "^0.2.0"
|
||||
|
||||
tmp@^0.0.33:
|
||||
version "0.0.33"
|
||||
resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9"
|
||||
integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==
|
||||
dependencies:
|
||||
os-tmpdir "~1.0.2"
|
||||
|
||||
tmp@^0.2.0:
|
||||
version "0.2.5"
|
||||
resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.2.5.tgz#b06bcd23f0f3c8357b426891726d16015abfd8f8"
|
||||
@@ -2966,6 +3194,11 @@ type-fest@^0.13.1:
|
||||
resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.13.1.tgz#0172cb5bce80b0bd542ea348db50c7e21834d934"
|
||||
integrity sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==
|
||||
|
||||
type-fest@^0.21.3:
|
||||
version "0.21.3"
|
||||
resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37"
|
||||
integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==
|
||||
|
||||
type-fest@^1.0.2:
|
||||
version "1.4.0"
|
||||
resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-1.4.0.tgz#e9fb813fe3bf1744ec359d55d1affefa76f14be1"
|
||||
@@ -2981,10 +3214,10 @@ undici-types@~6.21.0:
|
||||
resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.21.0.tgz#691d00af3909be93a7faa13be61b3a5b50ef12cb"
|
||||
integrity sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==
|
||||
|
||||
undici-types@~7.10.0:
|
||||
version "7.10.0"
|
||||
resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-7.10.0.tgz#4ac2e058ce56b462b056e629cc6a02393d3ff350"
|
||||
integrity sha512-t5Fy/nfn+14LuOc2KNYg75vZqClpAiqscVvMygNnlsHBFpSXdJaYtXMcdNLpl/Qvc3P2cB3s6lOV51nqsFq4ag==
|
||||
undici-types@~7.14.0:
|
||||
version "7.14.0"
|
||||
resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-7.14.0.tgz#4c037b32ca4d7d62fae042174604341588bc0840"
|
||||
integrity sha512-QQiYxHuyZ9gQUIrmPo3IA+hUl4KYk8uSA7cHrcKd/l3p1OTpZcM0Tbp9x7FAtXdAYhlasd60ncPpgu6ihG6TOA==
|
||||
|
||||
unique-filename@^2.0.0:
|
||||
version "2.0.1"
|
||||
@@ -3075,44 +3308,53 @@ word-wrap@^1.2.3:
|
||||
resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.5.tgz#d2c45c6dd4fbce621a66f136cbe328afd0410b34"
|
||||
integrity sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==
|
||||
|
||||
worker-factory@^7.0.45:
|
||||
version "7.0.45"
|
||||
resolved "https://registry.yarnpkg.com/worker-factory/-/worker-factory-7.0.45.tgz#0e54ce238af035fceabb6f817b2cc7f4d3e576ee"
|
||||
integrity sha512-FFPCiSv7MD6ZDEfiik/ErM8IrIAWajaXhezLyCo3v0FjhUWud6GXnG2BiTE91jLywXGAVCT8IF48Hhr+D/omMw==
|
||||
worker-factory@^7.0.46:
|
||||
version "7.0.46"
|
||||
resolved "https://registry.yarnpkg.com/worker-factory/-/worker-factory-7.0.46.tgz#452d18cabf629aaa5c1da78ecda42004da4a8558"
|
||||
integrity sha512-Sr1hq2FMgNa04UVhYQacsw+i58BtMimzDb4+CqYphZ97OfefRpURu0UZ+JxMr/H36VVJBfuVkxTK7MytsanC3w==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.28.3"
|
||||
fast-unique-numbers "^9.0.23"
|
||||
"@babel/runtime" "^7.28.4"
|
||||
fast-unique-numbers "^9.0.24"
|
||||
tslib "^2.8.1"
|
||||
|
||||
worker-timers-broker@^8.0.10:
|
||||
version "8.0.10"
|
||||
resolved "https://registry.yarnpkg.com/worker-timers-broker/-/worker-timers-broker-8.0.10.tgz#db03254753ea3fd0a0e01552e2dbfed63a4a43f3"
|
||||
integrity sha512-xvo/9GiuduENbJNdWnvZtkriIkjBKKVbMyw7GXvrBu3n1JHemzZgxqaCcCBNlpfXnRXXF4ekqvXWLh1gb65b8w==
|
||||
worker-timers-broker@^8.0.11:
|
||||
version "8.0.11"
|
||||
resolved "https://registry.yarnpkg.com/worker-timers-broker/-/worker-timers-broker-8.0.11.tgz#70fbb7eb299c53af895eff3edd21676888c6eb5e"
|
||||
integrity sha512-uwhxKru8BI9m2tsogxr2fB6POZ8LB2xH+Pu3R0mvQnAZLPgLD6K3IX4LNKPTEgTJ/j5VsuQPB+gLI1NBNKkPlg==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.28.3"
|
||||
broker-factory "^3.1.9"
|
||||
fast-unique-numbers "^9.0.23"
|
||||
"@babel/runtime" "^7.28.4"
|
||||
broker-factory "^3.1.10"
|
||||
fast-unique-numbers "^9.0.24"
|
||||
tslib "^2.8.1"
|
||||
worker-timers-worker "^9.0.10"
|
||||
worker-timers-worker "^9.0.11"
|
||||
|
||||
worker-timers-worker@^9.0.10:
|
||||
version "9.0.10"
|
||||
resolved "https://registry.yarnpkg.com/worker-timers-worker/-/worker-timers-worker-9.0.10.tgz#1955b3d93b7d10317ea9cad8fe7a6dd041a30b9a"
|
||||
integrity sha512-cfCmAkuoN+nGGJShta/g7CQVP3h7rvQA642EQg72fOHCWP5S2P83rLxDiaGv811Hd+19Cgdqt/tpRBIZ5kj/dw==
|
||||
worker-timers-worker@^9.0.11:
|
||||
version "9.0.11"
|
||||
resolved "https://registry.yarnpkg.com/worker-timers-worker/-/worker-timers-worker-9.0.11.tgz#ec479e0067f8aacc3e42524301e3a0d0d8b844d5"
|
||||
integrity sha512-pArb5xtgHWImYpXhjg1OFv7JFG0ubmccb73TFoXHXjG830fFj+16N57q9YeBnZX52dn+itRrMoJZ9HaZBVzDaA==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.28.3"
|
||||
"@babel/runtime" "^7.28.4"
|
||||
tslib "^2.8.1"
|
||||
worker-factory "^7.0.45"
|
||||
worker-factory "^7.0.46"
|
||||
|
||||
worker-timers@^8.0.23:
|
||||
version "8.0.24"
|
||||
resolved "https://registry.yarnpkg.com/worker-timers/-/worker-timers-8.0.24.tgz#4d0ed4d99c09cebd126cfff4945719bee6693004"
|
||||
integrity sha512-Ydu/7TRHlxIRjYSGDge1F92L7y9kzInpwR4CkocRVObPE0eRqC6d+0GFh52Hm+m520RHVKiytOERtCUu5sQDVQ==
|
||||
version "8.0.25"
|
||||
resolved "https://registry.yarnpkg.com/worker-timers/-/worker-timers-8.0.25.tgz#261b1e9356fbf583c9debf28efa01a01982d6946"
|
||||
integrity sha512-X7Z5dmM6PlrEnaadtFQOyXHGD/IysPA3HZzaC2koqsU1VI+RvyGmjiiLiUBQixK8PH5R7ilkOzZupWskNRaXmA==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.28.3"
|
||||
"@babel/runtime" "^7.28.4"
|
||||
tslib "^2.8.1"
|
||||
worker-timers-broker "^8.0.10"
|
||||
worker-timers-worker "^9.0.10"
|
||||
worker-timers-broker "^8.0.11"
|
||||
worker-timers-worker "^9.0.11"
|
||||
|
||||
wrap-ansi@^6.2.0:
|
||||
version "6.2.0"
|
||||
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53"
|
||||
integrity sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==
|
||||
dependencies:
|
||||
ansi-styles "^4.0.0"
|
||||
string-width "^4.1.0"
|
||||
strip-ansi "^6.0.0"
|
||||
|
||||
wrap-ansi@^7.0.0:
|
||||
version "7.0.0"
|
||||
@@ -3205,3 +3447,8 @@ yocto-queue@^0.1.0:
|
||||
version "0.1.0"
|
||||
resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b"
|
||||
integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==
|
||||
|
||||
yoctocolors-cjs@^2.1.2:
|
||||
version "2.1.3"
|
||||
resolved "https://registry.yarnpkg.com/yoctocolors-cjs/-/yoctocolors-cjs-2.1.3.tgz#7e4964ea8ec422b7a40ac917d3a344cfd2304baa"
|
||||
integrity sha512-U/PBtDf35ff0D8X8D0jfdzHYEPFxAI7jJlxZXwCSez5M3190m+QobIfh+sWDWSHMCWWJN2AWamkegn6vr6YBTw==
|
||||
|
||||
Reference in New Issue
Block a user