diff --git a/Cargo.lock b/Cargo.lock index 53e60e8bd..f084bf031 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1089,7 +1089,6 @@ dependencies = [ "async-trait", "backon", "base64 0.23.1", - "bitflags 2.13.2", "boa_engine", "bytes", "chrono", @@ -1100,7 +1099,6 @@ dependencies = [ "clash-verge-media-unlock", "clash-verge-signal", "clash_verge_service_ipc", - "criterion", "dark-light", "deelevate", "dirs 7.0.0", @@ -1119,7 +1117,6 @@ dependencies = [ "open", "parking_lot 0.13.0", "percent-encoding", - "regex", "reqwest 0.13.5", "reqwest_dav", "rfd", @@ -1149,7 +1146,6 @@ dependencies = [ "tauri-plugin-mihomo", "tauri-plugin-notification", "tauri-plugin-opener", - "tauri-plugin-process", "tauri-plugin-shell", "tauri-plugin-updater", "tauri-plugin-wdio-webdriver", @@ -1157,7 +1153,6 @@ dependencies = [ "tauri-specta", "tokio", "tokio-rustls", - "tokio-stream", "tokio-util", "tracing", "warp", @@ -4694,17 +4689,6 @@ dependencies = [ "objc2-core-foundation", ] -[[package]] -name = "objc2-open-directory" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb82bed227edf5201dfedf072bba4015a33d3d4a98519837295a90f0a23f676d" -dependencies = [ - "objc2", - "objc2-core-foundation", - "objc2-foundation", -] - [[package]] name = "objc2-osa-kit" version = "0.3.2" @@ -7055,7 +7039,6 @@ dependencies = [ "ntapi", "objc2-core-foundation", "objc2-io-kit", - "objc2-open-directory", "windows 0.62.2", ] @@ -7583,16 +7566,6 @@ dependencies = [ "zbus", ] -[[package]] -name = "tauri-plugin-process" -version = "2.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74ae3d8549ae564c0397377373e262f340908eb23a5b9fbe03f2a00007dc0038" -dependencies = [ - "tauri", - "tauri-plugin", -] - [[package]] name = "tauri-plugin-shell" version = "2.6.0" diff --git a/Cargo.toml b/Cargo.toml index 5485da278..d1379a06b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -75,7 +75,6 @@ tokio = { version = "1.54.1", features = [ ] } flexi_logger = "0.31.10" log = "0.4.35" -regex = "1.13.1" reqwest = { version = "0.13.5", features = [ "json", "cookies", @@ -90,7 +89,6 @@ smartstring = { version = "1.0.1" } serde = { version = "1.0.229" } serde_json = { version = "1.0.154" } serde_yaml_ng = { version = "0.10.0" } -bitflags = { version = "2.13.2" } socket2 = "0.6.5" # *** For Windows platform only *** diff --git a/crates/tauri-plugin-clash-verge-sysinfo/Cargo.toml b/crates/tauri-plugin-clash-verge-sysinfo/Cargo.toml index fd7fd27a1..e7d28e614 100644 --- a/crates/tauri-plugin-clash-verge-sysinfo/Cargo.toml +++ b/crates/tauri-plugin-clash-verge-sysinfo/Cargo.toml @@ -12,7 +12,7 @@ parking_lot = { workspace = true } serde = { workspace = true, features = ["derive"] } # sysinfo 0.38.2 conflicts with dark-light # see https://github.com/GuillaumeGomez/sysinfo/issues/1623 -sysinfo = { version = "0.40.1", features = ["network", "system"] } +sysinfo = { version = "0.40.1", default-features = false, features = ["network", "system"] } [target.'cfg(not(windows))'.dependencies] libc = "0.2.191" diff --git a/package.json b/package.json index 87610a28c..558052719 100644 --- a/package.json +++ b/package.json @@ -117,7 +117,6 @@ "eslint-plugin-react-refresh": "^0.5.7", "eslint-plugin-sukka": "^10.2.0", "eslint-plugin-unused-imports": "^4.4.1", - "glob": "^14.0.0", "globals": "^17.12.0", "https-proxy-agent": "^9.1.0", "husky": "^9.1.7", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 296753403..a85b8f2de 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -383,9 +383,6 @@ importers: eslint-plugin-unused-imports: specifier: ^4.4.1 version: 4.4.1(@typescript-eslint/eslint-plugin@8.70.0(@typescript-eslint/parser@8.70.0(eslint@10.11.0(jiti@2.7.0)(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3))(eslint@10.11.0(jiti@2.7.0)(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3))(eslint@10.11.0(jiti@2.7.0)(supports-color@7.2.0)) - glob: - specifier: ^14.0.0 - version: 14.0.3 globals: specifier: ^17.12.0 version: 17.12.0 @@ -1384,9 +1381,6 @@ packages: resolution: {integrity: sha512-wgm9Ehl2jpeqP3zw/7mo3kRHFp5MEDhqAdwy1fTGkHAwnkGOVsgpvQhL8B5n1qlb01jV3n/bI0ZfZp5lWA1k4w==} engines: {node: '>=18.0.0'} - '@isaacs/nonrecursive-glob-match@1.0.2': - resolution: {integrity: sha512-GJPHIgPPtFl+nLhFHyF0zZoFcOFLsZWbHFFzo+Zr+PWDXJbl9hHxb2w+9SiF2fHmLgKaXIpUzQo3SbBBZ9WObw==} - '@jest/diff-sequences@30.5.0': resolution: {integrity: sha512-OsqBjHXCn8cadasoAZBP6nWYvMsRhpMzGXTpxJ5aO04NlbdhIz+FVe3q49l0AwVhsz/cEmIpBes6gAFl1/dWQg==} engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} @@ -3590,10 +3584,6 @@ packages: resolution: {integrity: sha512-Wjlyrolmm8uDpm/ogGyXZXb1Z+Ca2B8NbJwqBVg0axK9GbBeoS7yGV6vjXnYdGm6X53iehEuxxbyiKp8QmN4Vw==} engines: {node: 18 || 20 || >=22} - glob@14.0.3: - resolution: {integrity: sha512-A1vjIwC3qpdCso45Iw127gnp7sPhqgY8lUQhDrArIs+GbmfaaVPFuoyy7WyLT9EPZCRZ7j7aLdwUhQmHWesEow==} - engines: {node: 18 || 20 || >=22} - globals@17.12.0: resolution: {integrity: sha512-cezEd/DTyyht9cvSSURyygXPfy04GtWO/5e6ZPvH7fCtjKz9PYOmuawphw1Ctd1f6C+5JypXfGD7ahNMXvevBA==} engines: {node: '>=18'} @@ -4131,10 +4121,6 @@ packages: resolution: {integrity: sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==} engines: {node: 18 || 20 || >=22} - minimatch@11.0.2: - resolution: {integrity: sha512-pWTgz5CN3tjqyZNSK2tePlSmu9IwM41q8yn8Usdqqwe9TIHh+9dEpLLjF4uApsfPEAZY71qtSiA2B2APEr+1Yw==} - engines: {node: 18 || 20 || >=22} - minipass@7.1.3: resolution: {integrity: sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==} engines: {node: '>=16 || 14 >=14.17'} @@ -4296,10 +4282,6 @@ packages: resolution: {integrity: sha512-3O/iVVsJAPsOnpwWIeD+d6z/7PmqApyQePUtCndjatj/9I5LylHvt5qluFaBT3I5h3r1ejfR056c+FCv+NnNXg==} engines: {node: 18 || 20 || >=22} - path-scurry@3.0.0: - resolution: {integrity: sha512-1pTbQqH1wIwMi/eleQ5leFTTCkzFsPcgXNjwOA8YGGW/W4/kHT3dssE7Z6NH+zuqNLOzOB0uaD61yl7cAcVhgg==} - engines: {node: 18 || 20 || >=22} - path-type@4.0.0: resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} engines: {node: '>=8'} @@ -6260,8 +6242,6 @@ snapshots: dependencies: minipass: 7.1.3 - '@isaacs/nonrecursive-glob-match@1.0.2': {} - '@jest/diff-sequences@30.5.0': {} '@jest/expect-utils@30.5.2': @@ -8393,12 +8373,6 @@ snapshots: minipass: 7.1.3 path-scurry: 2.0.2 - glob@14.0.3: - dependencies: - minimatch: 11.0.2 - minipass: 7.1.3 - path-scurry: 3.0.0 - globals@17.12.0: {} gopd@1.2.0: {} @@ -9089,11 +9063,6 @@ snapshots: dependencies: brace-expansion: 5.0.12 - minimatch@11.0.2: - dependencies: - '@isaacs/nonrecursive-glob-match': 1.0.2 - brace-expansion: 5.0.12 - minipass@7.1.3: {} minizlib@3.1.0: @@ -9294,11 +9263,6 @@ snapshots: lru-cache: 11.5.3 minipass: 7.1.3 - path-scurry@3.0.0: - dependencies: - lru-cache: 11.5.3 - minipass: 7.1.3 - path-type@4.0.0: {} pathe@2.0.3: {} diff --git a/scripts/prebuild.mjs b/scripts/prebuild.mjs index 0230668ab..d5a3476ef 100644 --- a/scripts/prebuild.mjs +++ b/scripts/prebuild.mjs @@ -6,7 +6,6 @@ import path from 'node:path' import zlib from 'node:zlib' import AdmZip from 'adm-zip' -import { glob } from 'glob' import { HttpsProxyAgent } from 'https-proxy-agent' import { extract } from 'tar' @@ -519,7 +518,7 @@ const resolveServicePermission = async () => { let hasChanges = false for (const f of serviceExecutables) { - const files = glob.sync(path.join(SERVICE_DIR, f)) + const files = fs.globSync(path.join(SERVICE_DIR, f)) for (const filePath of files) { if (fs.existsSync(filePath)) { const currentHash = await calculateFileHash(filePath) diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index e8aa5f2b0..358b02923 100755 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -55,7 +55,6 @@ serde = { workspace = true, features = ["derive"] } serde_json = { workspace = true } serde_yaml_ng = { workspace = true } smartstring = { workspace = true, features = ["serde"] } -bitflags = { workspace = true } socket2 = { workspace = true } warp = { version = "0.4.3", features = ["server"] } open = "5.4.5" @@ -67,7 +66,6 @@ chrono = { workspace = true } boa_engine = "0.22.0" percent-encoding = "2.3.2" reqwest = { workspace = true } -regex = { workspace = true } sysproxy = { git = "https://github.com/clash-verge-rev/sysproxy-rs.git", branch = "main", features = [ "guard", ] } @@ -76,7 +74,6 @@ tauri-plugin-shell = "2.6.0" tauri-plugin-opener = "2.7.2" tauri-plugin-dialog = "2.8.4" tauri-plugin-fs = "2.7.1" -tauri-plugin-process = "2.4.0" tauri-plugin-deep-link = "2.6.3" tauri-plugin-window-state = "2.5.0" zip = "9.2.2" @@ -90,7 +87,6 @@ futures = "0.3.34" gethostname = "1.1.0" scopeguard = "1.2.0" tauri-plugin-notification = "2.8.0" -tokio-stream = "0.1.19" backon = { version = "1.6.0", features = ["tokio-sleep"] } tauri-plugin-http = "2.8.3" tracing = { workspace = true } @@ -156,7 +152,6 @@ tauri-plugin-global-shortcut = "2.4.1" tauri-plugin-updater = "2.14.1" [dev-dependencies] -criterion = { workspace = true } tokio = { workspace = true, features = ["test-util"] } warp = { version = "0.4.3", features = ["test"] } diff --git a/src-tauri/capabilities/migrated.json b/src-tauri/capabilities/migrated.json index 280595c1d..c7b179d24 100644 --- a/src-tauri/capabilities/migrated.json +++ b/src-tauri/capabilities/migrated.json @@ -73,7 +73,6 @@ "global-shortcut:allow-register-all", "global-shortcut:allow-unregister", "global-shortcut:allow-unregister-all", - "process:allow-exit", "clipboard-manager:allow-read-text", "clipboard-manager:allow-write-text", "dialog:default" diff --git a/src-tauri/src/core/timer.rs b/src-tauri/src/core/timer.rs index c11bea60a..5042e4d3f 100644 --- a/src-tauri/src/core/timer.rs +++ b/src-tauri/src/core/timer.rs @@ -7,6 +7,7 @@ use crate::{ }; use anyhow::Result; use clash_verge_logging::{Type, logging, logging_error}; +use futures::StreamExt as _; use parking_lot::{Mutex, RwLock}; use smartstring::alias::String; use std::{ @@ -21,7 +22,6 @@ use tokio::{ sync::mpsc, time::{sleep, timeout}, }; -use tokio_stream::StreamExt as _; use tokio_util::time::{DelayQueue, delay_queue::Key}; enum TimerCommand { @@ -501,6 +501,7 @@ impl Timer { mod tests { use super::{TaskSchedule, Timer, run_timer_profile_update_transition}; use crate::config::{PrfItem, PrfOption}; + use futures::StreamExt as _; use parking_lot::Mutex; use smartstring::alias::String; use std::collections::HashMap; @@ -513,7 +514,6 @@ mod tests { time::Duration, }; use tokio::sync::Barrier; - use tokio_stream::StreamExt as _; use tokio_util::time::DelayQueue; struct CancellationProbe { diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs index 7e11e5c02..03eeb288d 100644 --- a/src-tauri/src/lib.rs +++ b/src-tauri/src/lib.rs @@ -54,7 +54,6 @@ mod app_init { .build(), ) .plugin(tauri_plugin_clipboard_manager::init()) - .plugin(tauri_plugin_process::init()) .plugin(tauri_plugin_global_shortcut::Builder::new().build()) .plugin(tauri_plugin_fs::init()) .plugin(tauri_plugin_dialog::init())