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 91b7e051..d5c3a540 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -206,7 +206,7 @@ checksum = "7de8ce5e0f9f8d88245311066a578d72b7af3e7088f32783804676302df237e4" [[package]] name = "api" -version = "2.0.0-alpha.0" +version = "2.0.0-alpha.1" dependencies = [ "log", "serde", @@ -376,7 +376,7 @@ checksum = "0e97ce7de6cf12de5d7226c73f5ba9811622f4db3a5b91b55c53e987e5f91cba" dependencies = [ "proc-macro2", "quote", - "syn 2.0.13", + "syn 2.0.18", ] [[package]] @@ -398,7 +398,7 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.13", + "syn 2.0.18", ] [[package]] @@ -415,7 +415,7 @@ checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" dependencies = [ "proc-macro2", "quote", - "syn 2.0.13", + "syn 2.0.18", ] [[package]] @@ -1196,7 +1196,7 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn 2.0.13", + "syn 2.0.18", ] [[package]] @@ -1213,14 +1213,14 @@ checksum = "2345488264226bf682893e25de0769f3360aac9957980ec49361b083ddaa5bc5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.13", + "syn 2.0.18", ] [[package]] name = "darling" -version = "0.14.4" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" +checksum = "0558d22a7b463ed0241e993f76f09f30b126687447751a8638587b864e4b3944" dependencies = [ "darling_core", "darling_macro", @@ -1228,27 +1228,27 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.14.4" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" +checksum = "ab8bfa2e259f8ee1ce5e97824a3c55ec4404a0d772ca7fa96bf19f0752a046eb" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", "strsim", - "syn 1.0.109", + "syn 2.0.18", ] [[package]] name = "darling_macro" -version = "0.14.4" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" +checksum = "29a358ff9f12ec09c3e61fef9b5a9902623a695a46a917b07f269bff1445611a" dependencies = [ "darling_core", "quote", - "syn 1.0.109", + "syn 2.0.18", ] [[package]] @@ -1449,7 +1449,7 @@ checksum = "5e9a1f9f7d83e59740248a6e14ecf93929ade55027844dfcea78beafccc15745" dependencies = [ "proc-macro2", "quote", - "syn 2.0.13", + "syn 2.0.18", ] [[package]] @@ -1693,7 +1693,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.13", + "syn 2.0.18", ] [[package]] @@ -1854,6 +1854,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" @@ -3351,7 +3361,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.13", + "syn 2.0.18", ] [[package]] @@ -3824,9 +3834,9 @@ checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" [[package]] name = "proc-macro2" -version = "1.0.56" +version = "1.0.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b63bdb0cd06f1f4dedf69b254734f9b45af66e4a031e42a7480257d9898b435" +checksum = "dec2b086b7a862cf4de201096214fa870344cf922b2b30c167badb3af3195406" dependencies = [ "unicode-ident", ] @@ -3857,9 +3867,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.26" +version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc" +checksum = "1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488" dependencies = [ "proc-macro2", ] @@ -4351,7 +4361,7 @@ checksum = "4c614d17805b093df4b147b51339e7e44bf05ef59fba1e45d83500bcfb4d8585" dependencies = [ "proc-macro2", "quote", - "syn 2.0.13", + "syn 2.0.18", ] [[package]] @@ -4373,7 +4383,7 @@ checksum = "bcec881020c684085e55a25f7fd888954d56609ef363479dc5a1305eb0d40cab" dependencies = [ "proc-macro2", "quote", - "syn 2.0.13", + "syn 2.0.18", ] [[package]] @@ -4399,11 +4409,11 @@ dependencies = [ [[package]] name = "serde_with" -version = "2.3.2" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "331bb8c3bf9b92457ab7abecf07078c13f7d270ba490103e84e8b014490cd0b0" +checksum = "9f02d8aa6e3c385bf084924f660ce2a3a6bd333ba55b35e8590b321f35d88513" dependencies = [ - "base64 0.13.1", + "base64 0.21.0", "chrono", "hex", "indexmap", @@ -4415,14 +4425,14 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "2.3.2" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "859011bddcc11f289f07f467cc1fe01c7a941daa4d8f6c40d4d1c92eb6d9319c" +checksum = "edc7d5d3932fb12ce722ee5e64dd38c504efba37567f0c402f6ca728c3b8b070" dependencies = [ "darling", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.18", ] [[package]] @@ -4892,9 +4902,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.13" +version = "2.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c9da457c5285ac1f936ebd076af6dac17a61cfe7826f2076b4d015cf47bc8ec" +checksum = "32d41677bcbe24c20c52e7c70b0d8db04134c5d1066bf98662e2871ad200ea3e" dependencies = [ "proc-macro2", "quote", @@ -4997,8 +5007,9 @@ dependencies = [ [[package]] name = "tauri" -version = "2.0.0-alpha.9" -source = "git+https://github.com/tauri-apps/tauri?branch=next#1ed2600da67715908af857255305eaeb293d8791" +version = "2.0.0-alpha.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e18377a75e314aa1d476896af881ed63f57a78ca84889fe63e69067f0de158d" dependencies = [ "anyhow", "bytes 1.4.0", @@ -5047,8 +5058,9 @@ dependencies = [ [[package]] name = "tauri-build" -version = "2.0.0-alpha.5" -source = "git+https://github.com/tauri-apps/tauri?branch=next#1ed2600da67715908af857255305eaeb293d8791" +version = "2.0.0-alpha.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a52990870fd043f1d3bd6719ae713ef2e0c50431334d7249f6ae8509d1b8c326" dependencies = [ "anyhow", "cargo_toml", @@ -5067,8 +5079,9 @@ dependencies = [ [[package]] name = "tauri-codegen" -version = "2.0.0-alpha.5" -source = "git+https://github.com/tauri-apps/tauri?branch=next#1ed2600da67715908af857255305eaeb293d8791" +version = "2.0.0-alpha.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c1f1611ab0896f2693163ba4e8f3e39c02a1b70cdca4314286b5e365a5e08c6" dependencies = [ "base64 0.21.0", "brotli", @@ -5092,8 +5105,9 @@ dependencies = [ [[package]] name = "tauri-macros" -version = "2.0.0-alpha.5" -source = "git+https://github.com/tauri-apps/tauri?branch=next#1ed2600da67715908af857255305eaeb293d8791" +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", @@ -5259,7 +5273,7 @@ dependencies = [ [[package]] name = "tauri-plugin-notification" -version = "2.0.0-alpha.0" +version = "2.0.0-alpha.1" dependencies = [ "log", "notify-rust", @@ -5279,6 +5293,7 @@ dependencies = [ name = "tauri-plugin-os" version = "2.0.0-alpha.0" dependencies = [ + "gethostname 0.4.3", "log", "os_info", "serde", @@ -5476,8 +5491,9 @@ dependencies = [ [[package]] name = "tauri-runtime" -version = "0.13.0-alpha.5" -source = "git+https://github.com/tauri-apps/tauri?branch=next#1ed2600da67715908af857255305eaeb293d8791" +version = "0.13.0-alpha.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7ce19f1309299bbc38ee9236307fad4943bd8fb09dd3fea5e9dd93c1d0898d6" dependencies = [ "gtk", "http", @@ -5496,8 +5512,9 @@ dependencies = [ [[package]] name = "tauri-runtime-wry" -version = "0.13.0-alpha.5" -source = "git+https://github.com/tauri-apps/tauri?branch=next#1ed2600da67715908af857255305eaeb293d8791" +version = "0.13.0-alpha.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1231be42085f3a8b150e615601f8a070bd16bf579771a5dafe2931970a05b518" dependencies = [ "cocoa", "gtk", @@ -5516,12 +5533,14 @@ dependencies = [ [[package]] name = "tauri-utils" -version = "2.0.0-alpha.5" -source = "git+https://github.com/tauri-apps/tauri?branch=next#1ed2600da67715908af857255305eaeb293d8791" +version = "2.0.0-alpha.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e2812e0cdfffb892c654555b2f1b8c84a035b4c56eb1646cb3eb5a9d8164d8e" dependencies = [ "aes-gcm 0.10.1", "brotli", "ctor", + "dunce", "getrandom 0.2.9", "glob", "heck 0.4.1", @@ -5621,7 +5640,7 @@ checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.13", + "syn 2.0.18", ] [[package]] @@ -6879,7 +6898,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", @@ -6996,7 +7015,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.13", + "syn 2.0.18", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index c70e53f1..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 = "next" } -tauri-build = { git = "https://github.com/tauri-apps/tauri", branch = "next" } +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 @@ - + Svelte + Vite App diff --git a/examples/api/package.json b/examples/api/package.json index 74272660..d6cc383d 100644 --- a/examples/api/package.json +++ b/examples/api/package.json @@ -9,8 +9,7 @@ "serve": "vite preview" }, "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.4", - "@zerodevx/svelte-json-view": "0.2.1", + "@tauri-apps/api": "2.0.0-alpha.5", "@tauri-apps/plugin-app": "2.0.0-alpha.0", "@tauri-apps/plugin-cli": "2.0.0-alpha.0", "@tauri-apps/plugin-clipboard-manager": "2.0.0-alpha.0", @@ -23,16 +22,18 @@ "@tauri-apps/plugin-process": "2.0.0-alpha.0", "@tauri-apps/plugin-shell": "2.0.0-alpha.0", "@tauri-apps/plugin-updater": "2.0.0-alpha.0", - "@tauri-apps/plugin-window": "2.0.0-alpha.0" + "@tauri-apps/plugin-window": "2.0.0-alpha.0", + "@zerodevx/svelte-json-view": "1.0.5" }, "devDependencies": { - "@iconify-json/codicon": "^1.1.10", - "@iconify-json/ph": "^1.1.1", - "@sveltejs/vite-plugin-svelte": "^1.0.1", - "@tauri-apps/cli": "2.0.0-alpha.9", - "internal-ip": "^7.0.0", - "svelte": "^3.49.0", - "unocss": "^0.39.3", - "vite": "^3.0.9" + "@iconify-json/codicon": "^1.1.26", + "@iconify-json/ph": "^1.1.5", + "@sveltejs/vite-plugin-svelte": "^2.4.1", + "@tauri-apps/cli": "2.0.0-alpha.10", + "@unocss/extractor-svelte": "^0.53.1", + "internal-ip": "^8.0.0", + "svelte": "^3.59.1", + "unocss": "^0.53.1", + "vite": "^4.3.9" } } diff --git a/examples/api/src-tauri/CHANGELOG.md b/examples/api/src-tauri/CHANGELOG.md index 4da28c4f..22d9cf7a 100644 --- a/examples/api/src-tauri/CHANGELOG.md +++ b/examples/api/src-tauri/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## \[2.0.0-alpha.1] + +### Dependencies + +- Updated to latest `notification` + ## \[2.0.0-alpha.0] ### Dependencies diff --git a/examples/api/src-tauri/Cargo.toml b/examples/api/src-tauri/Cargo.toml index 06428b8e..2431dc2f 100644 --- a/examples/api/src-tauri/Cargo.toml +++ b/examples/api/src-tauri/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "api" publish = false -version = "2.0.0-alpha.0" +version = "2.0.0-alpha.1" description = "An example Tauri Application showcasing the api" edition = "2021" rust-version = "1.65" diff --git a/examples/api/src/App.svelte b/examples/api/src/App.svelte index 1b3c9b71..dd0df993 100644 --- a/examples/api/src/App.svelte +++ b/examples/api/src/App.svelte @@ -354,7 +354,7 @@