chore: update tauri-plugin-mihomo deps

This commit is contained in:
oomeow 2025-11-13 20:24:24 +08:00
parent 0e2e919a58
commit 18b3db46b0
No known key found for this signature in database
GPG Key ID: 1E1E69B3EC8F6EA7
6 changed files with 16 additions and 26 deletions

View File

@ -76,7 +76,7 @@
"react-router": "^7.9.5", "react-router": "^7.9.5",
"react-virtuoso": "^4.14.1", "react-virtuoso": "^4.14.1",
"swr": "^2.3.6", "swr": "^2.3.6",
"tauri-plugin-mihomo-api": "git+https://github.com/clash-verge-rev/tauri-plugin-mihomo", "tauri-plugin-mihomo-api": "git+https://github.com/clash-verge-rev/tauri-plugin-mihomo#main",
"types-pac": "^1.0.3" "types-pac": "^1.0.3"
}, },
"devDependencies": { "devDependencies": {

10
pnpm-lock.yaml generated
View File

@ -129,8 +129,8 @@ importers:
specifier: ^2.3.6 specifier: ^2.3.6
version: 2.3.6(react@19.2.0) version: 2.3.6(react@19.2.0)
tauri-plugin-mihomo-api: tauri-plugin-mihomo-api:
specifier: git+https://github.com/clash-verge-rev/tauri-plugin-mihomo specifier: git+https://github.com/clash-verge-rev/tauri-plugin-mihomo#main
version: https://codeload.github.com/clash-verge-rev/tauri-plugin-mihomo/tar.gz/d0f00b33cea294cc693e177441fc897426ecbc39 version: https://codeload.github.com/clash-verge-rev/tauri-plugin-mihomo/tar.gz/1e2ada19e20c5504a2a8cef367e87c667806dd65
types-pac: types-pac:
specifier: ^1.0.3 specifier: ^1.0.3
version: 1.0.3 version: 1.0.3
@ -3978,8 +3978,8 @@ packages:
resolution: {integrity: sha512-7NyxrTE4Anh8km8iEy7o0QYPs+0JKBTj5ZaqHg6B39erLg0qYXN3BijtShwbsNSvQ+LN75+KV+C4QR/f6Gwnpg==} resolution: {integrity: sha512-7NyxrTE4Anh8km8iEy7o0QYPs+0JKBTj5ZaqHg6B39erLg0qYXN3BijtShwbsNSvQ+LN75+KV+C4QR/f6Gwnpg==}
engines: {node: '>=18'} engines: {node: '>=18'}
tauri-plugin-mihomo-api@https://codeload.github.com/clash-verge-rev/tauri-plugin-mihomo/tar.gz/d0f00b33cea294cc693e177441fc897426ecbc39: tauri-plugin-mihomo-api@https://codeload.github.com/clash-verge-rev/tauri-plugin-mihomo/tar.gz/1e2ada19e20c5504a2a8cef367e87c667806dd65:
resolution: {tarball: https://codeload.github.com/clash-verge-rev/tauri-plugin-mihomo/tar.gz/d0f00b33cea294cc693e177441fc897426ecbc39} resolution: {tarball: https://codeload.github.com/clash-verge-rev/tauri-plugin-mihomo/tar.gz/1e2ada19e20c5504a2a8cef367e87c667806dd65}
version: 0.1.0 version: 0.1.0
terser@5.44.1: terser@5.44.1:
@ -8629,7 +8629,7 @@ snapshots:
minizlib: 3.1.0 minizlib: 3.1.0
yallist: 5.0.0 yallist: 5.0.0
tauri-plugin-mihomo-api@https://codeload.github.com/clash-verge-rev/tauri-plugin-mihomo/tar.gz/d0f00b33cea294cc693e177441fc897426ecbc39: tauri-plugin-mihomo-api@https://codeload.github.com/clash-verge-rev/tauri-plugin-mihomo/tar.gz/1e2ada19e20c5504a2a8cef367e87c667806dd65:
dependencies: dependencies:
'@tauri-apps/api': 2.9.0 '@tauri-apps/api': 2.9.0

18
src-tauri/Cargo.lock generated
View File

@ -3289,7 +3289,7 @@ dependencies = [
"httpdate", "httpdate",
"itoa", "itoa",
"pin-project-lite", "pin-project-lite",
"socket2 0.5.10", "socket2 0.4.10",
"tokio", "tokio",
"tower-service", "tower-service",
"tracing", "tracing",
@ -3395,7 +3395,7 @@ dependencies = [
"libc", "libc",
"percent-encoding", "percent-encoding",
"pin-project-lite", "pin-project-lite",
"socket2 0.5.10", "socket2 0.6.1",
"system-configuration", "system-configuration",
"tokio", "tokio",
"tower-service", "tower-service",
@ -5830,7 +5830,7 @@ dependencies = [
"quinn-udp", "quinn-udp",
"rustc-hash", "rustc-hash",
"rustls", "rustls",
"socket2 0.5.10", "socket2 0.6.1",
"thiserror 2.0.17", "thiserror 2.0.17",
"tokio", "tokio",
"tracing", "tracing",
@ -5867,7 +5867,7 @@ dependencies = [
"cfg_aliases", "cfg_aliases",
"libc", "libc",
"once_cell", "once_cell",
"socket2 0.5.10", "socket2 0.6.1",
"tracing", "tracing",
"windows-sys 0.60.2", "windows-sys 0.60.2",
] ]
@ -7058,16 +7058,6 @@ dependencies = [
"winapi", "winapi",
] ]
[[package]]
name = "socket2"
version = "0.5.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678"
dependencies = [
"libc",
"windows-sys 0.52.0",
]
[[package]] [[package]]
name = "socket2" name = "socket2"
version = "0.6.1" version = "0.6.1"

View File

@ -3,7 +3,7 @@ import { useLockFn } from "ahooks";
import dayjs from "dayjs"; import dayjs from "dayjs";
import { useImperativeHandle, useState, type Ref } from "react"; import { useImperativeHandle, useState, type Ref } from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { closeConnections } from "tauri-plugin-mihomo-api"; import { closeConnection } from "tauri-plugin-mihomo-api";
import parseTraffic from "@/utils/parse-traffic"; import parseTraffic from "@/utils/parse-traffic";
@ -123,7 +123,7 @@ const InnerConnectionDetail = ({ data, closed, onClose }: InnerProps) => {
}, },
]; ];
const onDelete = useLockFn(async () => closeConnections(data.id)); const onDelete = useLockFn(async () => closeConnection(data.id));
return ( return (
<Box sx={{ userSelect: "text", color: theme.palette.text.secondary }}> <Box sx={{ userSelect: "text", color: theme.palette.text.secondary }}>

View File

@ -10,7 +10,7 @@ import {
import { useLockFn } from "ahooks"; import { useLockFn } from "ahooks";
import dayjs from "dayjs"; import dayjs from "dayjs";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { closeConnections } from "tauri-plugin-mihomo-api"; import { closeConnection } from "tauri-plugin-mihomo-api";
import parseTraffic from "@/utils/parse-traffic"; import parseTraffic from "@/utils/parse-traffic";
@ -37,7 +37,7 @@ export const ConnectionItem = (props: Props) => {
const { id, metadata, chains, start, curUpload, curDownload } = value; const { id, metadata, chains, start, curUpload, curDownload } = value;
const { t } = useTranslation(); const { t } = useTranslation();
const onDelete = useLockFn(async () => closeConnections(id)); const onDelete = useLockFn(async () => closeConnection(id));
const showTraffic = curUpload! >= 100 || curDownload! >= 100; const showTraffic = curUpload! >= 100 || curDownload! >= 100;
return ( return (

View File

@ -1,7 +1,7 @@
import { useLockFn } from "ahooks"; import { useLockFn } from "ahooks";
import { useCallback, useMemo } from "react"; import { useCallback, useMemo } from "react";
import { import {
closeConnections, closeConnection,
getConnections, getConnections,
selectNodeForGroup, selectNodeForGroup,
} from "tauri-plugin-mihomo-api"; } from "tauri-plugin-mihomo-api";
@ -16,7 +16,7 @@ const cleanupConnections = async (previousProxy: string) => {
const { connections } = await getConnections(); const { connections } = await getConnections();
const cleanupPromises = (connections ?? []) const cleanupPromises = (connections ?? [])
.filter((conn) => conn.chains.includes(previousProxy)) .filter((conn) => conn.chains.includes(previousProxy))
.map((conn) => closeConnections(conn.id)); .map((conn) => closeConnection(conn.id));
if (cleanupPromises.length > 0) { if (cleanupPromises.length > 0) {
await Promise.allSettled(cleanupPromises); await Promise.allSettled(cleanupPromises);