mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-11-15 23:42:27 +08:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fc0d8fa2e5 |
Generated
+4
-16
@@ -4356,18 +4356,6 @@ dependencies = [
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nix"
|
||||
version = "0.32.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "77730ed34f01f4990cb2ea67fec715ecebc6fab9a6396cf83c5529b13f581bdc"
|
||||
dependencies = [
|
||||
"bitflags 2.13.2",
|
||||
"cfg-if",
|
||||
"cfg_aliases",
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nohash-hasher"
|
||||
version = "0.2.0"
|
||||
@@ -4894,7 +4882,7 @@ checksum = "9cf20a545b305cf1da722b236b5155c9bb35f1d5ceb28c048bd96ca842f41b5b"
|
||||
dependencies = [
|
||||
"android_system_properties",
|
||||
"log",
|
||||
"nix 0.31.3",
|
||||
"nix",
|
||||
"objc2",
|
||||
"objc2-foundation",
|
||||
"objc2-ui-kit",
|
||||
@@ -10138,9 +10126,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "zip"
|
||||
version = "9.6.0"
|
||||
version = "9.5.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "80cc68510ea7553c30a69c732de5278e94183f68765af6c642dbccefd6ec777e"
|
||||
checksum = "e3476fd497ac8af5b1ec7b51acab7bef380f7e8dd8e0487595bafd839417a302"
|
||||
dependencies = [
|
||||
"aes",
|
||||
"bzip2",
|
||||
@@ -10154,7 +10142,7 @@ dependencies = [
|
||||
"libc",
|
||||
"lzma-rust2",
|
||||
"memchr",
|
||||
"nix 0.32.0",
|
||||
"nix",
|
||||
"pbkdf2",
|
||||
"ppmd-rust",
|
||||
"sha1 0.11.0",
|
||||
|
||||
@@ -46,8 +46,58 @@ function run(command, args, options = {}) {
|
||||
})
|
||||
}
|
||||
|
||||
async function checkDevelopmentServiceVersion() {
|
||||
const [guiOutput, daemonOutput] = await Promise.all([
|
||||
run(
|
||||
'cargo',
|
||||
[
|
||||
'metadata',
|
||||
'--locked',
|
||||
'--format-version=1',
|
||||
'--manifest-path',
|
||||
join(repositoryRoot, 'Cargo.toml'),
|
||||
],
|
||||
{ stdio: ['inherit', 'pipe', 'inherit'] },
|
||||
),
|
||||
run(
|
||||
'cargo',
|
||||
[
|
||||
'metadata',
|
||||
'--locked',
|
||||
'--no-deps',
|
||||
'--format-version=1',
|
||||
'--manifest-path',
|
||||
serviceManifest,
|
||||
],
|
||||
{ stdio: ['inherit', 'pipe', 'inherit'] },
|
||||
),
|
||||
])
|
||||
const gui = JSON.parse(guiOutput)
|
||||
const daemon = JSON.parse(daemonOutput).packages.find(
|
||||
(pkg) => resolve(pkg.manifest_path) === serviceManifest,
|
||||
)
|
||||
const app = gui.packages.find(
|
||||
(pkg) =>
|
||||
resolve(pkg.manifest_path) ===
|
||||
join(repositoryRoot, 'src-tauri', 'Cargo.toml'),
|
||||
)
|
||||
const dependency = gui.resolve?.nodes
|
||||
.find((node) => node.id === app?.id)
|
||||
?.deps.find((dep) => dep.name === 'clash_verge_service_ipc')
|
||||
const sdk = gui.packages.find((pkg) => pkg.id === dependency?.pkg)
|
||||
if (!daemon || !sdk)
|
||||
throw new Error('Cargo did not resolve the development Service and GUI SDK')
|
||||
if (daemon.version !== sdk.version) {
|
||||
throw new Error(
|
||||
`Development Service ${daemon.version} does not match the resolved GUI SDK ${sdk.version} (${sdk.manifest_path}). ` +
|
||||
'Align the GUI dependency explicitly before starting development. Building the sibling daemon does not update the SDK.',
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export async function prepareDevelopmentService() {
|
||||
await access(serviceManifest)
|
||||
await checkDevelopmentServiceVersion()
|
||||
const output = await run(
|
||||
'cargo',
|
||||
[
|
||||
|
||||
@@ -77,7 +77,7 @@ tauri-plugin-dialog = "2.8.4"
|
||||
tauri-plugin-fs = "2.7.1"
|
||||
tauri-plugin-deep-link = "2.6.3"
|
||||
tauri-plugin-window-state = "2.5.0"
|
||||
zip = "9.6.0"
|
||||
zip = "9.5.1"
|
||||
flate2 = "1.1.11"
|
||||
reqwest_dav = "0.3.3"
|
||||
aes-gcm = { version = "0.11.1" }
|
||||
|
||||
Reference in New Issue
Block a user