diff --git a/.changes/config.json b/.changes/config.json index 870c62356741..4298f31a2ce1 100644 --- a/.changes/config.json +++ b/.changes/config.json @@ -72,7 +72,7 @@ ], "assets": [ { - "path": "${ pkg.path }/target/package/${ pkg.pkg }-${ pkgFile.version }.crate", + "path": "./target/package/${ pkg.pkg }-${ pkgFile.version }.crate", "name": "${ pkg.pkg }-${ pkgFile.version }.crate" } ] diff --git a/Cargo.lock b/Cargo.lock index b65a60490be2..bab6a8118da1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4021,7 +4021,7 @@ checksum = "e1fc403891a21bcfb7c37834ba66a547a8f402146eba7265b5a6d88059c9ff2f" [[package]] name = "tauri" -version = "1.6.4" +version = "1.6.5" dependencies = [ "anyhow", "base64 0.21.7", diff --git a/tooling/webdriver/CHANGELOG.md b/tooling/webdriver/CHANGELOG.md index 8d9e5733628c..111d25369975 100644 --- a/tooling/webdriver/CHANGELOG.md +++ b/tooling/webdriver/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## \[0.1.4] + +### New Features + +- [`435d7513`](https://www.github.com/tauri-apps/tauri/commit/435d7513e45eab8b512e9a7e695a1adef8a98a46)([#8609](https://www.github.com/tauri-apps/tauri/pull/8609)) Added `webviewOptions` object to the `tauri:options` capability to configure the [Edge webview options](https://learn.microsoft.com/en-us/microsoft-edge/webdriver-chromium/capabilities-edge-options#webviewoptions-object) on Windows. + ## \[0.1.3] ### What's Changed diff --git a/tooling/webdriver/Cargo.lock b/tooling/webdriver/Cargo.lock index 9fcf9c9d1782..987d56ec7210 100644 --- a/tooling/webdriver/Cargo.lock +++ b/tooling/webdriver/Cargo.lock @@ -234,9 +234,9 @@ checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "libc" -version = "0.2.147" +version = "0.2.153" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" +checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" [[package]] name = "memchr" @@ -255,9 +255,9 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.8" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" +checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" dependencies = [ "libc", "wasi", @@ -421,7 +421,7 @@ dependencies = [ [[package]] name = "tauri-driver" -version = "0.1.3" +version = "0.1.4" dependencies = [ "anyhow", "futures", diff --git a/tooling/webdriver/Cargo.toml b/tooling/webdriver/Cargo.toml index 922053a993a1..52793fac1902 100644 --- a/tooling/webdriver/Cargo.toml +++ b/tooling/webdriver/Cargo.toml @@ -2,7 +2,7 @@ workspace = { } [package] name = "tauri-driver" -version = "0.1.3" +version = "0.1.4" authors = [ "Tauri Programme within The Commons Conservancy" ] categories = [ "gui", "web-programming" ] license = "Apache-2.0 OR MIT" diff --git a/tooling/webdriver/README.md b/tooling/webdriver/README.md index b49f65f6a33f..b3867bbf5489 100644 --- a/tooling/webdriver/README.md +++ b/tooling/webdriver/README.md @@ -9,13 +9,15 @@ native WebDriver server for you behind the scenes. It requires two separate ports to be used since two distinct [WebDriver Remote Ends] run. You can configure the ports used with arguments when starting the binary: -* `--port` (default: `4444`) -* `--native-port` (default: `4445`) + +- `--port` (default: `4444`) +- `--native-port` (default: `4445`) Supported platforms: -* **[pre-alpha]** Linux w/ `WebKitWebDriver` -* **[pre-alpha]** Windows w/ [Microsoft Edge Driver] -* **[Todo]** macOS w/ [Appium Mac2 Driver] (probably) + +- **[pre-alpha]** Linux w/ `WebKitWebDriver` +- **[pre-alpha]** Windows w/ [Microsoft Edge Driver] +- **[Todo]** macOS w/ [Appium Mac2 Driver] (probably) _note: the (probably) items haven't been proof-of-concept'd yet, and if it is not possible to use the listed native webdriver, then a custom implementation diff --git a/tooling/webdriver/src/cli.rs b/tooling/webdriver/src/cli.rs index 6d9a372e2976..f8e81b46fba7 100644 --- a/tooling/webdriver/src/cli.rs +++ b/tooling/webdriver/src/cli.rs @@ -1,4 +1,4 @@ -// Copyright 2019-2023 Tauri Programme within The Commons Conservancy +// Copyright 2019-2024 Tauri Programme within The Commons Conservancy // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT diff --git a/tooling/webdriver/src/main.rs b/tooling/webdriver/src/main.rs index a76bf3676934..2a39a09e3487 100644 --- a/tooling/webdriver/src/main.rs +++ b/tooling/webdriver/src/main.rs @@ -1,7 +1,18 @@ -// Copyright 2019-2023 Tauri Programme within The Commons Conservancy +// Copyright 2019-2024 Tauri Programme within The Commons Conservancy // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT +//! [![](https://github.com/tauri-apps/tauri/raw/dev/.github/splash.png)](https://tauri.app) +//! +//! Cross-platform WebDriver server for Tauri applications. +//! +//! This is a [WebDriver Intermediary Node](https://www.w3.org/TR/webdriver/#dfn-intermediary-nodes) that wraps the native WebDriver server for platforms that [Tauri](https://github.com/tauri-apps/tauri) supports. Your WebDriver client will connect to the running `tauri-driver` server, and `tauri-driver` will handle starting the native WebDriver server for you behind the scenes. It requires two separate ports to be used since two distinct [WebDriver Remote Ends](https://www.w3.org/TR/webdriver/#dfn-remote-ends) run. + +#![doc( + html_logo_url = "https://github.com/tauri-apps/tauri/raw/dev/app-icon.png", + html_favicon_url = "https://github.com/tauri-apps/tauri/raw/dev/app-icon.png" +)] + mod cli; mod server; mod webdriver; diff --git a/tooling/webdriver/src/server.rs b/tooling/webdriver/src/server.rs index 5ddbd22a76f2..97daf8ccb179 100644 --- a/tooling/webdriver/src/server.rs +++ b/tooling/webdriver/src/server.rs @@ -1,4 +1,4 @@ -// Copyright 2019-2023 Tauri Programme within The Commons Conservancy +// Copyright 2019-2024 Tauri Programme within The Commons Conservancy // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT @@ -20,10 +20,14 @@ type HttpClient = Client; const TAURI_OPTIONS: &str = "tauri:options"; #[derive(Debug, Deserialize)] +#[serde(rename_all = "camelCase")] struct TauriOptions { application: PathBuf, #[serde(default)] args: Vec, + #[cfg(target_os = "windows")] + #[serde(default)] + webview_options: Option, } impl TauriOptions { @@ -44,7 +48,7 @@ impl TauriOptions { map.insert("browserName".into(), json!("webview2")); map.insert( "ms:edgeOptions".into(), - json!({"binary": self.application, "args": self.args}), + json!({"binary": self.application, "args": self.args, "webviewOptions": self.webview_options}), ); map } diff --git a/tooling/webdriver/src/webdriver.rs b/tooling/webdriver/src/webdriver.rs index cbdda96efc18..9fb5ccf33cd9 100644 --- a/tooling/webdriver/src/webdriver.rs +++ b/tooling/webdriver/src/webdriver.rs @@ -1,4 +1,4 @@ -// Copyright 2019-2023 Tauri Programme within The Commons Conservancy +// Copyright 2019-2024 Tauri Programme within The Commons Conservancy // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT