From 85166d3bee9f08c29e7393f4ac1ff7366588ab6c Mon Sep 17 00:00:00 2001 From: Zachary Date: Wed, 5 Jun 2024 16:13:39 +0800 Subject: [PATCH] feat: update tauri allow list --- src-tauri/Cargo.lock | 46 +++++++++++++++++++++++++++++---------- src-tauri/Cargo.toml | 9 +++++++- src-tauri/tauri.conf.json | 21 +++++++++--------- 3 files changed, 53 insertions(+), 23 deletions(-) diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 8beae6a..239e4fd 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -2588,9 +2588,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-src" -version = "300.3.0+3.3.0" +version = "300.3.1+3.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eba8804a1c5765b18c4b3f907e6897ebabeedebc9830e1a0046c4a4cf44663e1" +checksum = "7259953d42a81bf137fbbd73bd30a8e1914d6dce43c2b90ed575783a22608b91" dependencies = [ "cc", ] @@ -2618,6 +2618,16 @@ dependencies = [ "pin-project-lite", ] +[[package]] +name = "os_pipe" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57119c3b893986491ec9aa85056780d3a0f3cf4da7cc09dd3650dbd6c6738fb9" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + [[package]] name = "overload" version = "0.1.1" @@ -3549,6 +3559,16 @@ dependencies = [ "lazy_static", ] +[[package]] +name = "shared_child" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0d94659ad3c2137fef23ae75b03d5241d633f8acded53d672decfa0e6e0caef" +dependencies = [ + "libc", + "winapi", +] + [[package]] name = "shlex" version = "1.3.0" @@ -3729,9 +3749,9 @@ dependencies = [ [[package]] name = "strum_macros" -version = "0.26.3" +version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7993a8e3a9e88a00351486baae9522c91b123a088f76469e5bd5cc17198ea87" +checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" dependencies = [ "heck 0.5.0", "proc-macro2", @@ -4010,9 +4030,9 @@ dependencies = [ [[package]] name = "tar" -version = "0.4.40" +version = "0.4.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b16afcea1f22891c49a00c751c7b63b2233284064f11a200fc624137c51e2ddb" +checksum = "cb797dad5fb5b76fcf519e702f4a589483b5ef06567f160c392832c1f5e44909" dependencies = [ "filetime", "libc", @@ -4027,9 +4047,9 @@ checksum = "e1fc403891a21bcfb7c37834ba66a547a8f402146eba7265b5a6d88059c9ff2f" [[package]] name = "tauri" -version = "1.6.7" +version = "1.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67c7177b6be45bbb875aa239578f5adc982a1b3d5ea5b315ccd100aeb0043374" +checksum = "77567d2b3b74de4588d544147142d02297f3eaa171a25a065252141d8597a516" dependencies = [ "anyhow", "base64 0.21.7", @@ -4052,9 +4072,11 @@ dependencies = [ "minisign-verify", "objc", "once_cell", + "os_pipe", "percent-encoding", "rand 0.8.5", "raw-window-handle", + "regex", "reqwest", "rfd", "semver", @@ -4062,6 +4084,7 @@ dependencies = [ "serde_json", "serde_repr", "serialize-to-javascript", + "shared_child", "state", "tar", "tauri-macros", @@ -4113,6 +4136,7 @@ dependencies = [ "png", "proc-macro2", "quote", + "regex", "semver", "serde", "serde_json", @@ -4141,7 +4165,7 @@ dependencies = [ [[package]] name = "tauri-plugin-autostart" version = "0.0.0" -source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v1#10a4d76fb3e76dc0fe240dcb4530886985c45135" +source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v1#49f2b4c666da9c544fd8d049e054e73e02478783" dependencies = [ "auto-launch", "log", @@ -4154,7 +4178,7 @@ dependencies = [ [[package]] name = "tauri-plugin-single-instance" version = "0.0.0" -source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v1#10a4d76fb3e76dc0fe240dcb4530886985c45135" +source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v1#49f2b4c666da9c544fd8d049e054e73e02478783" dependencies = [ "log", "serde", @@ -4168,7 +4192,7 @@ dependencies = [ [[package]] name = "tauri-plugin-store" version = "0.0.0" -source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v1#10a4d76fb3e76dc0fe240dcb4530886985c45135" +source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v1#49f2b4c666da9c544fd8d049e054e73e02478783" dependencies = [ "log", "serde", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 50ef419..b70bcae 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -9,7 +9,14 @@ edition = "2021" tauri-build = { version = "1", features = [] } [dependencies] -tauri = { version = "1", features = [ "updater", "system-tray", "path-all"] } +tauri = { version = "1", features = [ + "window-all", + "shell-execute", + "process-exit", + "updater", + "process-relaunch", + "system-tray", +] } specta = "2.0.0-rc.7" tauri-specta = { version = "=2.0.0-rc.4", features = ["typescript"] } diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index be7bc88..37e496d 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -23,21 +23,20 @@ }, "allowlist": { "all": false, - "path": { + "process": { + "exit": true, + "relaunch": true + }, + "shell": { + "execute": true + }, + "window": { "all": true } }, - "windows": [ - { - "title": "Dashboard", - "label": "Dashboard", - "width": 600, - "height": 800, - "visible": false - } - ], + "windows": [], "security": { - "csp": null + "csp": "default-src blob: data: filesystem: ws: wss: http: https: tauri: asset: 'unsafe-eval' 'unsafe-inline' 'self';" }, "bundle": { "active": true,