Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ jobs:
- 'scripts/run-gpui-build*'
- 'scripts/sync-desktop-versions.mjs'
- 'scripts/verify-gpui-release-inputs.mjs'
- 'vendor/tauri-plugin-opener/**'
- 'Cargo.toml'
- 'Cargo.lock'
- 'bun.lock'
Expand All @@ -63,6 +64,7 @@ jobs:
- 'apps/desktop-gpui/**'
- 'crates/**'
- 'apps/desktop/src-tauri/**'
- 'vendor/tauri-plugin-opener/**'
- 'Cargo.toml'
- 'Cargo.lock'
tauri-plugins:
Expand Down Expand Up @@ -222,7 +224,7 @@ jobs:

- name: Test desktop installation and storage helpers
shell: bash
run: cargo test --locked -p cap-utils -p cap-cli-install --lib
run: cargo test --locked -p cap-utils -p cap-cli-install -p tauri-plugin-opener --lib

- name: Build desktop binaries
shell: bash
Expand Down Expand Up @@ -318,7 +320,7 @@ jobs:
run: |
node --test scripts/linux-bundle-config.test.mjs scripts/finalize-linux-appimage.test.mjs
bun run --cwd apps/desktop vitest run scripts/prepare.test.js
cargo test --locked -p cap-utils -p cap-cli-install --lib
cargo test --locked -p cap-utils -p cap-cli-install -p tauri-plugin-opener --lib
cargo test --locked -p cap --bin cap record::tests
cargo test --locked -p cap-recording --lib -- --test-threads=1
cargo test --locked -p cap-enc-ffmpeg
Expand Down
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ members = [
"apps/desktop/src-tauri",
"crates/*",
"crates/workspace-hack",
"vendor/tauri-plugin-opener",
]

[workspace.dependencies]
Expand Down Expand Up @@ -132,6 +133,7 @@ cidre = { git = "https://github.com/CapSoftware/cidre", rev = "bf84b67079a8" }
# wgpu = { git = "https://github.com/gfx-rs/wgpu", rev = "cd41a6e32a6239b65d1cecbeccde6a43a100914a" }
wgpu-hal = { path = "vendor/wgpu-hal" }
tao = { path = "vendor/tao" }
tauri-plugin-opener = { path = "vendor/tauri-plugin-opener" }

# https://github.com/CapSoftware/reqwest/commit/9b5ecbd5210a9510fde766015cabb724c1e70d2e
reqwest = { git = "https://github.com/CapSoftware/reqwest", rev = "9b5ecbd5210a9510fde766015cabb724c1e70d2e" }
Expand Down
5 changes: 3 additions & 2 deletions apps/desktop/src-tauri/src/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -548,8 +548,9 @@ pub async fn upload_diagnostic_report(app: AppHandle, report_path: String) -> Re
pub async fn reveal_diagnostic_report(app: AppHandle, report_path: String) -> Result<(), String> {
let path = validate_report_path(&app, &report_path)?;

app.opener()
.reveal_item_in_dir(&path)
tokio::task::spawn_blocking(move || app.opener().reveal_item_in_dir(&path))
.await
.map_err(|e| format!("Failed to reveal diagnostic report: {e}"))?
.map_err(|e| format!("Failed to reveal diagnostic report: {e}"))
}

Expand Down
1 change: 1 addition & 0 deletions vendor/tauri-plugin-opener/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/permissions/schemas/
33 changes: 33 additions & 0 deletions vendor/tauri-plugin-opener/CAP-CHANGES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Cap changes to tauri-plugin-opener

Vendored from the crates.io `tauri-plugin-opener` 2.5.0 archive, SHA-256
`786156aa8e89e03d271fbd3fe642207da8e65f3c961baa9e2930f332bf80a1f5`.
The archive identifies upstream commit
`2371804172fa852ef3c127b2398c54bc35f74950` in
[tauri-apps/plugins-workspace](https://github.com/tauri-apps/plugins-workspace/tree/2371804172fa852ef3c127b2398c54bc35f74950/plugins/opener).

The async `reveal_item_in_dir` IPC command previously called the synchronous
reveal implementation on a Tokio worker. On Linux, blocking zbus can enter
its own Tokio runtime and panic. The command now awaits a blocking worker
and propagates both backend errors and worker failures. Its name, arguments,
permission definitions, path canonicalization, and native backends are unchanged.
All existing JavaScript callers retain the same IPC and permission boundary.

Tests cover both Tokio runtime flavors, exact path forwarding, backend errors,
worker panics, validation of all paths, and the real Linux zbus backend with the
Tokio feature enabled. The Linux test permits a missing session bus or file
manager; it does not establish successful graphical file selection.

The workspace uses this source through `[patch.crates-io]`. The crate is also a
workspace member so Cargo can run its regression tests. Dev dependencies reuse
versions already in the workspace lockfile. No runtime dependency was upgraded.

Packaging omits the upstream lockfile, original workspace manifest, npm build
configuration, and guest TypeScript sources. The shipped JavaScript bundles are
retained with formatting only. One trailing space in the Android build file is
removed. Rust source is rustfmt-formatted, and
the build regenerates the ignored permission schema. Both upstream licenses and
all platform source files are retained.

Current upstream still has the direct synchronous command call. Revisit this
patch when upstream supplies an equivalent async boundary and retain the tests.
59 changes: 59 additions & 0 deletions vendor/tauri-plugin-opener/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Changelog

## \[2.5.0]

### enhance

- [`b8056f48`](https://github.com/tauri-apps/plugins-workspace/commit/b8056f484c7144af095d4d6ded1e8adbb9b8a865) ([#2897](https://github.com/tauri-apps/plugins-workspace/pull/2897) by [@petersamokhin](https://github.com/tauri-apps/plugins-workspace/../../petersamokhin)) Allow reveal multiple items in the file explorer.

## \[2.4.0]

- [`f209b2f2`](https://github.com/tauri-apps/plugins-workspace/commit/f209b2f23cb29133c97ad5961fb46ef794dbe063) ([#2804](https://github.com/tauri-apps/plugins-workspace/pull/2804) by [@renovate](https://github.com/tauri-apps/plugins-workspace/../../renovate)) Updated tauri to 2.6

## \[2.3.1]

### feat

- [`2aec8ff4`](https://github.com/tauri-apps/plugins-workspace/commit/2aec8ff4c41d178ea9804f7b6eff343c726be015) ([#2803](https://github.com/tauri-apps/plugins-workspace/pull/2803) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Add `inAppBrowser` option to open URLs in an in-app browser on Android and iOS.

## \[2.3.0]

- [`ce9888a2`](https://github.com/tauri-apps/plugins-workspace/commit/ce9888a2d4c9b449bd2a306f0fa6c76507fd46d3) ([#2762](https://github.com/tauri-apps/plugins-workspace/pull/2762)) Similar to the `fs` plugin the `opener` plugin now supports a `requireLiteralLeadingDot` configuration in `tauri.conf.json`.

## \[2.2.7]

- [`6c9e08dc`](https://github.com/tauri-apps/plugins-workspace/commit/6c9e08dccb3ac99fccfce586fa2b69717ba81b52) ([#2695](https://github.com/tauri-apps/plugins-workspace/pull/2695) by [@ShaunSHamilton](https://github.com/tauri-apps/plugins-workspace/../../ShaunSHamilton)) Adjust `open_url` url type to allow `URL`
- [`dde6f3c3`](https://github.com/tauri-apps/plugins-workspace/commit/dde6f3c31c1b79942abb556be31757dc583f509e) ([#2549](https://github.com/tauri-apps/plugins-workspace/pull/2549) by [@renovate](https://github.com/tauri-apps/plugins-workspace/../../renovate)) Update `windows` crate to 0.61 to align with Tauri 2.5

## \[2.2.6]

- [`1a984659`](https://github.com/tauri-apps/plugins-workspace/commit/1a9846599b6a71faf330845847a30f6bf9735898) ([#2469](https://github.com/tauri-apps/plugins-workspace/pull/2469) by [@FabianLars](https://github.com/tauri-apps/plugins-workspace/../../FabianLars)) Update `objc2` crate to 0.6. No user facing changes.
- [`71f95c9f`](https://github.com/tauri-apps/plugins-workspace/commit/71f95c9f05b29cf1be586849614c0b007757c15d) ([#2445](https://github.com/tauri-apps/plugins-workspace/pull/2445) by [@renovate](https://github.com/tauri-apps/plugins-workspace/../../renovate)) Updated `windows` crate to 0.60 to match Tauri 2.3.0. No user facing changes.

## \[2.2.5]

- [`5b821181`](https://github.com/tauri-apps/plugins-workspace/commit/5b8211815825ddae2dcc0c00520e0cfdff002763) ([#2332](https://github.com/tauri-apps/plugins-workspace/pull/2332) by [@betamos](https://github.com/tauri-apps/plugins-workspace/../../betamos)) Fix broken JS commands `opener.openPath` and `opener.openUrl` on mobile.

## \[2.2.4]

- [`da5c59e2`](https://github.com/tauri-apps/plugins-workspace/commit/da5c59e2fe879d177e3cfd52fcacce85440423cb) ([#2271](https://github.com/tauri-apps/plugins-workspace/pull/2271) by [@renovate](https://github.com/tauri-apps/plugins-workspace/../../renovate)) Updated `zbus` dependency to version 5. No API changes.

## \[2.2.3]

- [`a9ac1e3c`](https://github.com/tauri-apps/plugins-workspace/commit/a9ac1e3c939cec4338a9422ef02323c1d4dde6cd) ([#2253](https://github.com/tauri-apps/plugins-workspace/pull/2253) by [@betamos](https://github.com/tauri-apps/plugins-workspace/../../betamos)) Return an error in `open_path` if the file does not exist when opening with default application.

## \[2.2.2]

- [`ee0f65de`](https://github.com/tauri-apps/plugins-workspace/commit/ee0f65de5c645c244c5f0b638e0e0aab687cb9bf) ([#2207](https://github.com/tauri-apps/plugins-workspace/pull/2207) by [@universalappfactory](https://github.com/tauri-apps/plugins-workspace/../../universalappfactory)) Fixed OpenerPlugin packagename for android

## \[2.2.1]

- [`18dffc9d`](https://github.com/tauri-apps/plugins-workspace/commit/18dffc9dfecaf0c900e233e041d9ca36c92834b5) ([#2189](https://github.com/tauri-apps/plugins-workspace/pull/2189) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Fix usage on iOS.

## \[2.2.0]

- [`3a79266b`](https://github.com/tauri-apps/plugins-workspace/commit/3a79266b8cf96a55b1ae6339d725567d45a44b1d) ([#2173](https://github.com/tauri-apps/plugins-workspace/pull/2173) by [@FabianLars](https://github.com/tauri-apps/plugins-workspace/../../FabianLars)) Bumped all plugins to `v2.2.0`. From now, the versions for the Rust and JavaScript packages of each plugin will be in sync with each other.

## \[2.0.0]

- [`383e636a`](https://github.com/tauri-apps/plugins-workspace/commit/383e636a8e595aec1300999a8aeb7d9bf8c14632) ([#2019](https://github.com/tauri-apps/plugins-workspace/pull/2019) by [@amrbashir](https://github.com/tauri-apps/plugins-workspace/../../amrbashir)) Initial Release
135 changes: 135 additions & 0 deletions vendor/tauri-plugin-opener/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
[package]
edition = "2021"
name = "tauri-plugin-opener"
version = "2.5.0"
authors = ["Tauri Programme within The Commons Conservancy"]
build = "build.rs"
links = "tauri-plugin-opener"
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Open files and URLs using their default application."
readme = "README.md"
license = "Apache-2.0 OR MIT"
repository = "https://github.com/tauri-apps/plugins-workspace"

[package.metadata.docs.rs]
rustc-args = [
"--cfg",
"docsrs",
]
rustdoc-args = [
"--cfg",
"docsrs",
]

[package.metadata.platforms.support.android]
level = "partial"
notes = "Only allows to open URLs via `open`"

[package.metadata.platforms.support.ios]
level = "partial"
notes = "Only allows to open URLs via `open`"

[package.metadata.platforms.support.linux]
level = "full"
notes = ""

[package.metadata.platforms.support.macos]
level = "full"
notes = ""

[package.metadata.platforms.support.windows]
level = "full"
notes = ""

[lib]
name = "tauri_plugin_opener"
path = "src/lib.rs"

[dependencies.dunce]
version = "1"

[dependencies.glob]
version = "0.3"

[dependencies.open]
version = "5"
features = ["shellexecute-on-windows"]

[dependencies.serde]
version = "1"
features = ["derive"]

[dependencies.serde_json]
version = "1"

[dependencies.tauri]
version = "2.8.2"
default-features = false

[dependencies.thiserror]
version = "2"

[build-dependencies.schemars]
version = "0.8"

[build-dependencies.serde]
version = "1"
features = ["derive"]

[build-dependencies.tauri-plugin]
version = "2.4"
features = ["build"]

[target.'cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "netbsd", target_os = "openbsd"))'.dependencies.url]
version = "2"

[target.'cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "netbsd", target_os = "openbsd"))'.dependencies.zbus]
version = "5.9"

[target.'cfg(target_os = "ios")'.dependencies.tauri]
version = "2.8.2"
features = ["wry"]
default-features = false

[target.'cfg(target_os = "macos")'.dependencies.objc2-app-kit]
version = "0.3"
features = [
"std",
"NSWorkspace",
]
default-features = false

[target.'cfg(target_os = "macos")'.dependencies.objc2-foundation]
version = "0.3"
features = [
"std",
"NSURL",
"NSArray",
"NSString",
]
default-features = false

[target."cfg(windows)".dependencies.windows]
version = "0.61"
features = [
"Win32_Foundation",
"Win32_UI_Shell_Common",
"Win32_UI_WindowsAndMessaging",
"Win32_System_Com",
"Win32_System_Registry",
]

[dev-dependencies.tokio]
version = "1"
features = ["macros", "rt-multi-thread"]

[dev-dependencies.tempfile]
version = "3"

[target.'cfg(target_os = "linux")'.dev-dependencies.zbus]
version = "5.9"
features = ["tokio"]
20 changes: 20 additions & 0 deletions vendor/tauri-plugin-opener/LICENSE.spdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
SPDXVersion: SPDX-2.1
DataLicense: CC0-1.0
PackageName: tauri
DataFormat: SPDXRef-1
PackageSupplier: Organization: The Tauri Programme in the Commons Conservancy
PackageHomePage: https://tauri.app
PackageLicenseDeclared: Apache-2.0
PackageLicenseDeclared: MIT
PackageCopyrightText: 2019-2022, The Tauri Programme in the Commons Conservancy
PackageSummary: <text>Tauri is a rust project that enables developers to make secure
and small desktop applications using a web frontend.
</text>
PackageComment: <text>The package includes the following libraries; see
Relationship information.
</text>
Created: 2019-05-20T09:00:00Z
PackageDownloadLocation: git://github.com/tauri-apps/tauri
PackageDownloadLocation: git+https://github.com/tauri-apps/tauri.git
PackageDownloadLocation: git+ssh://github.com/tauri-apps/tauri.git
Creator: Person: Daniel Thompson-Yvetot
Loading
Loading