diff --git a/.changes/notification-init-script.md b/.changes/notification-init-script.md new file mode 100644 index 00000000..fce58ba4 --- /dev/null +++ b/.changes/notification-init-script.md @@ -0,0 +1,5 @@ +--- +"notification": patch +--- + +Use `window.__TAURI_INVOKE__` instead of `window.__TAURI__` in init.js, fixes usage in apps without `withGlobalTauri` enabled. diff --git a/.changes/os-plugin-refactor.md b/.changes/os-plugin-refactor.md new file mode 100644 index 00000000..63cd5bdd --- /dev/null +++ b/.changes/os-plugin-refactor.md @@ -0,0 +1,11 @@ +--- +"os": minor +"os-js": minor +--- + +The os plugin is recieving a few changes to improve consistency and add new features: + +- Renamed `Kind` enum to `OsType` and `kind()` function to `os_type()`. +- Added `family()`,`exe_extension()`, and `hostname()` functions and their equivalents for JS. +- Removed `tempdir()` function and its equivalent on JS, use `std::env::temp_dir` instead of `temp_dir` from `tauri::path::PathResolver::temp_dir` and `path.tempDir` on JS. +- Modified `platform()` implementation to return `windows` instead of `win32` and `macos` instead of `darwin` to align with Rust's `std::env::consts::OS` diff --git a/.changes/pre.json b/.changes/pre.json index 94ca7d1f..a95db7bb 100644 --- a/.changes/pre.json +++ b/.changes/pre.json @@ -1,4 +1,9 @@ { "tag": "alpha", - "changes": [".changes/persisted-scope-fix-oom.md", ".changes/v2-alpha.md"] + "changes": [ + ".changes/notification-init-script.md", + ".changes/notification-sound.md", + ".changes/stronghold-constructor.md", + ".changes/v2-alpha.md" + ] } diff --git a/.changes/stronghold-constructor.md b/.changes/stronghold-constructor.md new file mode 100644 index 00000000..99966095 --- /dev/null +++ b/.changes/stronghold-constructor.md @@ -0,0 +1,5 @@ +--- +"stronghold-js": minor +--- + +Added `Stronghold.load` and removed its constructor. diff --git a/.changes/window-state-decorated.md b/.changes/window-state-decorated.md new file mode 100644 index 00000000..191ec5c2 --- /dev/null +++ b/.changes/window-state-decorated.md @@ -0,0 +1,5 @@ +--- +"window-state": "patch" +--- + +Correctly set decoration state if no saved state xists diff --git a/.changes/window-state-promise.md b/.changes/window-state-promise.md new file mode 100644 index 00000000..f97c43df --- /dev/null +++ b/.changes/window-state-promise.md @@ -0,0 +1,5 @@ +--- +"window-state-js": "patch" +--- + +Correctly propagate the promise inside `saveWindowState`, `restoreState` and `restoreStateCurrent` so callers can choose to `await` them. diff --git a/.npmrc b/.npmrc new file mode 100644 index 00000000..f87a0443 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +auto-install-peers=true \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index a08c6186..abfb1abb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -217,7 +217,7 @@ checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8" [[package]] name = "api" -version = "2.0.0-alpha.0" +version = "2.0.0-alpha.1" dependencies = [ "log", "serde", @@ -1834,6 +1834,16 @@ dependencies = [ "winapi", ] +[[package]] +name = "gethostname" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0176e0459c2e4a1fe232f984bca6890e681076abb9934f6cea7c326f3fc47818" +dependencies = [ + "libc", + "windows-targets 0.48.0", +] + [[package]] name = "getrandom" version = "0.1.16" @@ -3804,9 +3814,9 @@ checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" [[package]] name = "proc-macro2" -version = "1.0.59" +version = "1.0.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6aeca18b86b413c660b781aa319e4e2648a3e6f9eadc9b47e9038e6fe9f3451b" +checksum = "dec2b086b7a862cf4de201096214fa870344cf922b2b30c167badb3af3195406" dependencies = [ "unicode-ident", ] @@ -4989,8 +4999,9 @@ checksum = "fd1ba337640d60c3e96bc6f0638a939b9c9a7f2c316a1598c279828b3d1dc8c5" [[package]] name = "tauri" -version = "2.0.0-alpha.9" -source = "git+https://github.com/tauri-apps/tauri?branch=chore/merge-from-dev#650439fd00ec9df867406ac6f712e46d8552dd6a" +version = "2.0.0-alpha.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e18377a75e314aa1d476896af881ed63f57a78ca84889fe63e69067f0de158d" dependencies = [ "anyhow", "bytes 1.4.0", @@ -5039,8 +5050,9 @@ dependencies = [ [[package]] name = "tauri-build" -version = "2.0.0-alpha.5" -source = "git+https://github.com/tauri-apps/tauri?branch=chore/merge-from-dev#650439fd00ec9df867406ac6f712e46d8552dd6a" +version = "2.0.0-alpha.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a52990870fd043f1d3bd6719ae713ef2e0c50431334d7249f6ae8509d1b8c326" dependencies = [ "anyhow", "cargo_toml", @@ -5059,8 +5071,9 @@ dependencies = [ [[package]] name = "tauri-codegen" -version = "2.0.0-alpha.5" -source = "git+https://github.com/tauri-apps/tauri?branch=chore/merge-from-dev#650439fd00ec9df867406ac6f712e46d8552dd6a" +version = "2.0.0-alpha.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c1f1611ab0896f2693163ba4e8f3e39c02a1b70cdca4314286b5e365a5e08c6" dependencies = [ "base64 0.21.2", "brotli", @@ -5084,8 +5097,9 @@ dependencies = [ [[package]] name = "tauri-macros" -version = "2.0.0-alpha.5" -source = "git+https://github.com/tauri-apps/tauri?branch=chore/merge-from-dev#650439fd00ec9df867406ac6f712e46d8552dd6a" +version = "2.0.0-alpha.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22752425c6dd6f3a058f376db7371f1d5bac250e340d40ba6c97ecf7182eef29" dependencies = [ "heck 0.4.1", "proc-macro2", @@ -5251,7 +5265,7 @@ dependencies = [ [[package]] name = "tauri-plugin-notification" -version = "2.0.0-alpha.0" +version = "2.0.0-alpha.1" dependencies = [ "log", "notify-rust", @@ -5271,6 +5285,7 @@ dependencies = [ name = "tauri-plugin-os" version = "2.0.0-alpha.0" dependencies = [ + "gethostname 0.4.3", "log", "os_info", "serde", @@ -5468,8 +5483,9 @@ dependencies = [ [[package]] name = "tauri-runtime" -version = "0.13.0-alpha.5" -source = "git+https://github.com/tauri-apps/tauri?branch=chore/merge-from-dev#650439fd00ec9df867406ac6f712e46d8552dd6a" +version = "0.13.0-alpha.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7ce19f1309299bbc38ee9236307fad4943bd8fb09dd3fea5e9dd93c1d0898d6" dependencies = [ "gtk", "http", @@ -5488,8 +5504,9 @@ dependencies = [ [[package]] name = "tauri-runtime-wry" -version = "0.13.0-alpha.5" -source = "git+https://github.com/tauri-apps/tauri?branch=chore/merge-from-dev#650439fd00ec9df867406ac6f712e46d8552dd6a" +version = "0.13.0-alpha.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1231be42085f3a8b150e615601f8a070bd16bf579771a5dafe2931970a05b518" dependencies = [ "cocoa", "gtk", @@ -5508,12 +5525,14 @@ dependencies = [ [[package]] name = "tauri-utils" -version = "2.0.0-alpha.5" -source = "git+https://github.com/tauri-apps/tauri?branch=chore/merge-from-dev#650439fd00ec9df867406ac6f712e46d8552dd6a" +version = "2.0.0-alpha.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e2812e0cdfffb892c654555b2f1b8c84a035b4c56eb1646cb3eb5a9d8164d8e" dependencies = [ "aes-gcm 0.10.2", "brotli", "ctor", + "dunce", "getrandom 0.2.9", "glob", "heck 0.4.1", @@ -6877,7 +6896,7 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "592b4883219f345e712b3209c62654ebda0bb50887f330cbd018d0f654bfd507" dependencies = [ - "gethostname", + "gethostname 0.2.3", "nix 0.24.3", "winapi", "winapi-wsapoll", diff --git a/Cargo.toml b/Cargo.toml index bcbe9449..fce72255 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,8 +5,8 @@ resolver = "2" [workspace.dependencies] serde = { version = "1", features = ["derive"] } log = "0.4" -tauri = { git = "https://github.com/tauri-apps/tauri", branch = "chore/merge-from-dev" } -tauri-build = { git = "https://github.com/tauri-apps/tauri", branch = "chore/merge-from-dev" } +tauri = "2.0.0-alpha.10" +tauri-build = "2.0.0-alpha.6" serde_json = "1" thiserror = "1" diff --git a/examples/api/index.html b/examples/api/index.html index 3b39b0f6..81b6f92e 100644 --- a/examples/api/index.html +++ b/examples/api/index.html @@ -2,7 +2,10 @@
- +