diff --git a/Cargo.lock b/Cargo.lock index 4c436cd884..dae30b3e2a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2551,7 +2551,6 @@ name = "gitbutler-tauri" version = "0.0.0" dependencies = [ "anyhow", - "arc-swap", "backtrace", "console-subscriber", "dirs 5.0.1", @@ -2579,12 +2578,10 @@ dependencies = [ "gitbutler-watcher", "gix", "log", - "nix 0.29.0", "once_cell", - "open", + "open 5.3.0", "parking_lot 0.12.3", "pretty_assertions", - "regex", "reqwest 0.12.7", "serde", "serde_json", @@ -5345,6 +5342,16 @@ version = "11.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b410bbe7e14ab526a0e86877eb47c6996a2bd7746f027ba551028c925390e4e9" +[[package]] +name = "open" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2078c0039e6a54a0c42c28faa984e115fb4c2d5bf2208f77d1961002df8576f8" +dependencies = [ + "pathdiff", + "windows-sys 0.42.0", +] + [[package]] name = "open" version = "5.3.0" @@ -5437,16 +5444,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "os_pipe" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ffd2b0a5634335b135d5728d84c5e0fd726954b87111f7506a61c502280d982" -dependencies = [ - "libc", - "windows-sys 0.59.0", -] - [[package]] name = "overload" version = "0.1.1" @@ -6879,16 +6876,6 @@ dependencies = [ "lazy_static", ] -[[package]] -name = "shared_child" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09fa9338aed9a1df411814a5b2252f7cd206c55ae9bf2fa763f8de84603aa60c" -dependencies = [ - "libc", - "windows-sys 0.59.0", -] - [[package]] name = "shell-words" version = "1.1.0" @@ -7358,8 +7345,8 @@ dependencies = [ "indexmap 1.9.3", "objc", "once_cell", + "open 3.2.0", "os_info", - "os_pipe", "percent-encoding", "rand 0.8.5", "raw-window-handle", @@ -7371,7 +7358,6 @@ dependencies = [ "serde_json", "serde_repr", "serialize-to-javascript", - "shared_child", "state", "sys-locale", "tar", @@ -8671,6 +8657,21 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows-sys" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + [[package]] name = "windows-sys" version = "0.48.0" @@ -8744,6 +8745,12 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" + [[package]] name = "windows_aarch64_gnullvm" version = "0.48.5" @@ -8768,6 +8775,12 @@ version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec7711666096bd4096ffa835238905bb33fb87267910e154b18b44eaabb340f2" +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" + [[package]] name = "windows_aarch64_msvc" version = "0.48.5" @@ -8792,6 +8805,12 @@ version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "763fc57100a5f7042e3057e7e8d9bdd7860d330070251a73d003563a3bb49e1b" +[[package]] +name = "windows_i686_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" + [[package]] name = "windows_i686_gnu" version = "0.48.5" @@ -8822,6 +8841,12 @@ version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7bc7cbfe58828921e10a9f446fcaaf649204dcfe6c1ddd712c5eebae6bda1106" +[[package]] +name = "windows_i686_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" + [[package]] name = "windows_i686_msvc" version = "0.48.5" @@ -8846,6 +8871,12 @@ version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6868c165637d653ae1e8dc4d82c25d4f97dd6605eaa8d784b5c6e0ab2a252b65" +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" + [[package]] name = "windows_x86_64_gnu" version = "0.48.5" @@ -8858,6 +8889,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" + [[package]] name = "windows_x86_64_gnullvm" version = "0.48.5" @@ -8882,6 +8919,12 @@ version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e4d40883ae9cae962787ca76ba76390ffa29214667a111db9e0a1ad8377e809" +[[package]] +name = "windows_x86_64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" + [[package]] name = "windows_x86_64_msvc" version = "0.48.5" diff --git a/crates/gitbutler-tauri/Cargo.toml b/crates/gitbutler-tauri/Cargo.toml index d5bacb493e..a485a744df 100644 --- a/crates/gitbutler-tauri/Cargo.toml +++ b/crates/gitbutler-tauri/Cargo.toml @@ -67,16 +67,10 @@ gitbutler-diff.workspace = true gitbutler-operating-modes.workspace = true gitbutler-edit-mode.workspace = true open = "5" -regex = "1.10" -arc-swap = "1" - -[target.'cfg(unix)'.dependencies] -nix = { version = "0.29", features = ["fs"] } [dependencies.tauri] version = "1.7.0" features = [ - "shell-execute", "http-all", "os-all", "dialog-open", @@ -84,6 +78,7 @@ features = [ "path-all", "process-relaunch", "protocol-asset", + "shell-open", "window-maximize", "window-start-dragging", "window-unmaximize", diff --git a/crates/gitbutler-tauri/tauri.conf.json b/crates/gitbutler-tauri/tauri.conf.json index 5f1753c868..d70cc81c7d 100644 --- a/crates/gitbutler-tauri/tauri.conf.json +++ b/crates/gitbutler-tauri/tauri.conf.json @@ -16,15 +16,7 @@ "scope": ["$APPCACHE/archives/*", "$RESOURCE/_up_/scripts/*"] }, "shell": { - "open": false, - "execute": true, - "scope": [ - { - "name": "xdg-open", - "cmd": "xdg-open", - "args": true - } - ] + "open": "^((https://)|(http://)|(mailto:)|(vscode://)|(vscodium://)).+" }, "dialog": { "open": true diff --git a/crates/gitbutler-tauri/tauri.conf.nightly.json b/crates/gitbutler-tauri/tauri.conf.nightly.json index 2d51134b77..77021bba9a 100644 --- a/crates/gitbutler-tauri/tauri.conf.nightly.json +++ b/crates/gitbutler-tauri/tauri.conf.nightly.json @@ -8,17 +8,9 @@ "tauri": { "allowlist": { "shell": { - "open": false, - "execute": true, - "scope": [ - { - "name": "xdg-open", - "cmd": "xdg-open", - "args": true - } - ] + "open": "^((https://)|(http://)|(mailto:)|(vscode://)|(vscodium://)).+" } - }, + }, "bundle": { "identifier": "com.gitbutler.app.nightly", "icon": [ diff --git a/package.json b/package.json index 47c6565396..4925cee804 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "dev:ui": "pnpm --filter @gitbutler/ui storybook", "dev:web": "turbo run --filter @gitbutler/web dev --no-daemon", "dev:desktop": "pnpm tauri dev", - "dev:internal-tauri": "turbo watch --filter @gitbutler/desktop dev", + "dev:internal-tauri": "turbo run --filter @gitbutler/desktop dev", "test": "turbo run test --no-daemon", "test:watch": "pnpm --filter @gitbutler/desktop run test:watch", "test:e2e": "pnpm --filter @gitbutler/desktop run test:e2e",