From 040004a6b9fbb89161d1b5764d79428dfe693776 Mon Sep 17 00:00:00 2001 From: Jason Tsai Date: Tue, 12 Mar 2024 21:20:56 +0800 Subject: [PATCH 1/8] chore(shell): change schema property name `command` to `cmd` (#1069) * chore: fix shell plugin `command` property in schema * chore: add changelog --- .changes/shell-fix-schema-command-property-name.md | 5 +++++ plugins/shell/src/scope_entry.rs | 1 + 2 files changed, 6 insertions(+) create mode 100644 .changes/shell-fix-schema-command-property-name.md diff --git a/.changes/shell-fix-schema-command-property-name.md b/.changes/shell-fix-schema-command-property-name.md new file mode 100644 index 0000000000..836368a18b --- /dev/null +++ b/.changes/shell-fix-schema-command-property-name.md @@ -0,0 +1,5 @@ +--- +"shell": "patch" +--- + +Change shell's schema property name `command` to `cmd`. diff --git a/plugins/shell/src/scope_entry.rs b/plugins/shell/src/scope_entry.rs index aac8e695f9..ff94a3a785 100644 --- a/plugins/shell/src/scope_entry.rs +++ b/plugins/shell/src/scope_entry.rs @@ -22,6 +22,7 @@ pub struct Entry { /// `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$APP`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, /// `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`. // use default just so the schema doesn't flag it as required + #[serde(rename = "cmd")] pub command: PathBuf, /// The allowed arguments for the command execution. From a3b5396113ca93912274f6890d9ef5b1a409587a Mon Sep 17 00:00:00 2001 From: Tony <68118705+Legend-Master@users.noreply.github.com> Date: Tue, 12 Mar 2024 23:47:22 +0800 Subject: [PATCH 2/8] refactor!(updater): migrate run updater using powershell to `ShellExecute` (#1054) * Migrate to ShellExecute * Add change file * Revert cargo.toml style * Remove unused imports * Migrate to windows-sys * Use open instead of runas * Use encode_wide instead of hstring * small cleanup --- .changes/fix-updater-powershell-flashing.md | 5 + Cargo.lock | 57 +++---- plugins/updater/Cargo.toml | 1 + .../updater/permissions/schemas/schema.json | 10 +- plugins/updater/src/updater.rs | 150 +++++------------- 5 files changed, 82 insertions(+), 141 deletions(-) create mode 100644 .changes/fix-updater-powershell-flashing.md diff --git a/.changes/fix-updater-powershell-flashing.md b/.changes/fix-updater-powershell-flashing.md new file mode 100644 index 0000000000..a23b5b06c5 --- /dev/null +++ b/.changes/fix-updater-powershell-flashing.md @@ -0,0 +1,5 @@ +--- +"updater": patch +--- + +Fix Windows powershell window flashing on update diff --git a/Cargo.lock b/Cargo.lock index fad46e8b54..9dee2ec478 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1039,7 +1039,7 @@ dependencies = [ "num-traits", "serde", "wasm-bindgen", - "windows-targets 0.52.0", + "windows-targets 0.52.4", ] [[package]] @@ -6793,6 +6793,7 @@ dependencies = [ "time", "tokio", "url", + "windows-sys 0.52.0", "zip", ] @@ -8092,7 +8093,7 @@ dependencies = [ "windows-core 0.52.0", "windows-implement", "windows-interface", - "windows-targets 0.52.0", + "windows-targets 0.52.4", ] [[package]] @@ -8110,7 +8111,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.0", + "windows-targets 0.52.4", ] [[package]] @@ -8172,7 +8173,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.0", + "windows-targets 0.52.4", ] [[package]] @@ -8207,17 +8208,17 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.0" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +checksum = "7dd37b7e5ab9018759f893a1952c9420d060016fc19a472b4bb20d1bdd694d1b" dependencies = [ - "windows_aarch64_gnullvm 0.52.0", - "windows_aarch64_msvc 0.52.0", - "windows_i686_gnu 0.52.0", - "windows_i686_msvc 0.52.0", - "windows_x86_64_gnu 0.52.0", - "windows_x86_64_gnullvm 0.52.0", - "windows_x86_64_msvc 0.52.0", + "windows_aarch64_gnullvm 0.52.4", + "windows_aarch64_msvc 0.52.4", + "windows_i686_gnu 0.52.4", + "windows_i686_msvc 0.52.4", + "windows_x86_64_gnu 0.52.4", + "windows_x86_64_gnullvm 0.52.4", + "windows_x86_64_msvc 0.52.4", ] [[package]] @@ -8226,7 +8227,7 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75aa004c988e080ad34aff5739c39d0312f4684699d6d71fc8a198d057b8b9b4" dependencies = [ - "windows-targets 0.52.0", + "windows-targets 0.52.4", ] [[package]] @@ -8243,9 +8244,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.0" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" +checksum = "bcf46cf4c365c6f2d1cc93ce535f2c8b244591df96ceee75d8e83deb70a9cac9" [[package]] name = "windows_aarch64_msvc" @@ -8267,9 +8268,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.0" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" +checksum = "da9f259dd3bcf6990b55bffd094c4f7235817ba4ceebde8e6d11cd0c5633b675" [[package]] name = "windows_i686_gnu" @@ -8291,9 +8292,9 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.0" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" +checksum = "b474d8268f99e0995f25b9f095bc7434632601028cf86590aea5c8a5cb7801d3" [[package]] name = "windows_i686_msvc" @@ -8315,9 +8316,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.0" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" +checksum = "1515e9a29e5bed743cb4415a9ecf5dfca648ce85ee42e15873c3cd8610ff8e02" [[package]] name = "windows_x86_64_gnu" @@ -8339,9 +8340,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.0" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" +checksum = "5eee091590e89cc02ad514ffe3ead9eb6b660aedca2183455434b93546371a03" [[package]] name = "windows_x86_64_gnullvm" @@ -8357,9 +8358,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.0" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" +checksum = "77ca79f2451b49fa9e2af39f0747fe999fcda4f5e241b2898624dca97a1f2177" [[package]] name = "windows_x86_64_msvc" @@ -8381,9 +8382,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.0" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" +checksum = "32b752e52a2da0ddfbdbcc6fceadfeede4c939ed16d13e648833a61dfb611ed8" [[package]] name = "winnow" diff --git a/plugins/updater/Cargo.toml b/plugins/updater/Cargo.toml index 2440a6eccb..6159feb269 100644 --- a/plugins/updater/Cargo.toml +++ b/plugins/updater/Cargo.toml @@ -37,6 +37,7 @@ tar = "0.4" [target."cfg(target_os = \"windows\")".dependencies] zip = { version = "0.6", default-features = false } +windows-sys = { version = "0.52.0", features = ["Win32_Foundation", "Win32_UI_WindowsAndMessaging"] } [target."cfg(any(target_os = \"macos\", target_os = \"linux\"))".dependencies] flate2 = "1.0.27" diff --git a/plugins/updater/permissions/schemas/schema.json b/plugins/updater/permissions/schemas/schema.json index 6d6a3c211b..6913597674 100644 --- a/plugins/updater/permissions/schemas/schema.json +++ b/plugins/updater/permissions/schemas/schema.json @@ -139,14 +139,10 @@ }, "platforms": { "description": "Target platforms this permission applies. By default all platforms are affected by this permission.", - "default": [ - "linux", - "macOS", - "windows", - "android", - "iOS" + "type": [ + "array", + "null" ], - "type": "array", "items": { "$ref": "#/definitions/Target" } diff --git a/plugins/updater/src/updater.rs b/plugins/updater/src/updater.rs index 52b33e217b..4ba744358c 100644 --- a/plugins/updater/src/updater.rs +++ b/plugins/updater/src/updater.rs @@ -512,7 +512,11 @@ impl Update { // Update server can provide a custom EXE (installer) who can run any task. #[cfg(windows)] fn install_inner(&self, bytes: Vec) -> Result<()> { - use std::{fs, process::Command}; + use std::fs; + use windows_sys::{ + w, + Win32::UI::{Shell::ShellExecuteW, WindowsAndMessaging::SW_SHOW}, + }; // FIXME: We need to create a memory buffer with the MSI and then run it. // (instead of extracting the MSI to a temp path) @@ -521,131 +525,54 @@ impl Update { // shouldn't drop but we should be able to pass the reference so we can drop it once the installation // is done, otherwise we have a huge memory leak. - let archive = Cursor::new(bytes); - let tmp_dir = tempfile::Builder::new().tempdir()?.into_path(); - - // extract the buffer to the tmp_dir - // we extract our signed archive into our final directory without any temp file + let archive = Cursor::new(bytes); let mut extractor = zip::ZipArchive::new(archive)?; - - // extract the msi extractor.extract(&tmp_dir)?; let paths = fs::read_dir(&tmp_dir)?; - let system_root = std::env::var("SYSTEMROOT"); - let powershell_path = system_root.as_ref().map_or_else( - |_| "powershell.exe".to_string(), - |p| format!("{p}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe"), - ); - let install_mode = self .config .windows .as_ref() .map(|w| w.install_mode.clone()) .unwrap_or_default(); + let mut installer_args = self + .installer_args + .iter() + .map(|a| OsStr::new(a)) + .collect::>(); for path in paths { let found_path = path?.path(); // we support 2 type of files exe & msi for now - // If it's an `exe` we expect an installer not a runtime. + // If it's an `exe` we expect an NSIS installer. if found_path.extension() == Some(OsStr::new("exe")) { - // we need to wrap the installer path in quotes for Start-Process - let mut installer_path = std::ffi::OsString::new(); - installer_path.push("\""); - installer_path.push(&found_path); - installer_path.push("\""); - - let installer_args = [ - install_mode - .nsis_args() - .iter() - .map(OsStr::new) - .collect::>(), - self.installer_args - .iter() - .map(|a| a.as_os_str()) - .collect::>(), - ] - .concat(); - - // Run the installer - let mut cmd = Command::new(powershell_path); - - cmd.args(["-NoProfile", "-WindowStyle", "Hidden"]) - .args(["Start-Process"]) - .arg(installer_path); - - if !installer_args.is_empty() { - cmd.arg("-ArgumentList") - .arg(installer_args.join(OsStr::new(", "))); - } - cmd.spawn().expect("installer failed to start"); - - std::process::exit(0); + installer_args.extend(install_mode.nsis_args().iter().map(OsStr::new)); } else if found_path.extension() == Some(OsStr::new("msi")) { - // we need to wrap the current exe path in quotes for Start-Process - let mut current_exe_arg = std::ffi::OsString::new(); - current_exe_arg.push("\""); - current_exe_arg.push(current_exe()?); - current_exe_arg.push("\""); - - let mut msi_path = std::ffi::OsString::new(); - msi_path.push("\"\"\""); - msi_path.push(&found_path); - msi_path.push("\"\"\""); - - let installer_args = [ - install_mode - .msiexec_args() - .iter() - .map(OsStr::new) - .collect::>(), - self.installer_args - .iter() - .map(|a| a.as_os_str()) - .collect::>(), - ] - .concat(); - - // run the installer and relaunch the application - let powershell_install_res = Command::new(powershell_path) - .args(["-NoProfile", "-WindowStyle", "Hidden"]) - .args([ - "Start-Process", - "-Wait", - "-FilePath", - "$Env:SYSTEMROOT\\System32\\msiexec.exe", - "-ArgumentList", - ]) - .arg("/i,") - .arg(&msi_path) - .arg(format!( - ", {}, /promptrestart;", - installer_args.join(OsStr::new(", ")).to_string_lossy() - )) - .arg("Start-Process") - .arg(current_exe_arg) - .spawn(); - if powershell_install_res.is_err() { - // fallback to running msiexec directly - relaunch won't be available - // we use this here in case powershell fails in an older machine somehow - let msiexec_path = system_root.as_ref().map_or_else( - |_| "msiexec.exe".to_string(), - |p| format!("{p}\\System32\\msiexec.exe"), - ); - let _ = Command::new(msiexec_path) - .arg("/i") - .arg(msi_path) - .args(installer_args) - .arg("/promptrestart") - .spawn(); - } + installer_args.extend(install_mode.msiexec_args().iter().map(OsStr::new)); + installer_args.push(OsStr::new("/promptrestart")); + } else { + continue; + } - std::process::exit(0); + let file = encode_wide(found_path.as_os_str()); + let parameters = encode_wide(installer_args.join(OsStr::new(" ")).as_os_str()); + let ret = unsafe { + ShellExecuteW( + 0, + w!("open"), + file.as_ptr(), + parameters.as_ptr(), + std::ptr::null(), + SW_SHOW, + ) + }; + if ret <= 32 { + return Err(Error::Io(std::io::Error::last_os_error())); } + std::process::exit(0); } Ok(()) @@ -944,3 +871,14 @@ fn base64_to_string(base64_string: &str) -> Result { .to_string(); Ok(result) } + +#[cfg(target_os = "windows")] +fn encode_wide(string: impl AsRef) -> Vec { + use std::os::windows::ffi::OsStrExt; + + string + .as_ref() + .encode_wide() + .chain(std::iter::once(0)) + .collect() +} From 14c858391d12e2bbb64c6d46788c9788863bddd6 Mon Sep 17 00:00:00 2001 From: DK Liao Date: Wed, 13 Mar 2024 17:36:59 +0800 Subject: [PATCH 3/8] docs: Update positioner readme (#1072) --- plugins/positioner/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/positioner/README.md b/plugins/positioner/README.md index e6b25170ad..ad22ffacde 100644 --- a/plugins/positioner/README.md +++ b/plugins/positioner/README.md @@ -73,9 +73,9 @@ fn main() { Afterwards all the plugin's APIs are available through the JavaScript guest bindings: ```javascript -import { move_window, Position } from "@tauri-apps/plugin-positioner"; +import { moveWindow, Position } from "@tauri-apps/plugin-positioner"; -move_window(Position.TopRight); +moveWindow(Position.TopRight); ``` If you only intend on moving the window from rust code, you can import the Window trait extension instead of registering the plugin: From 35ea5956d060f0bdafd140f2541c607bb811805b Mon Sep 17 00:00:00 2001 From: Fabian-Lars Date: Wed, 13 Mar 2024 14:41:23 +0100 Subject: [PATCH 4/8] fix(dialog): Create dialogs on main thread (#1073) fixes https://github.com/tauri-apps/tauri/issues/6301 --- .changes/dialog-main-thread.md | 5 ++ .../src-tauri/gen/schemas/desktop-schema.json | 8 ++-- plugins/dialog/src/desktop.rs | 48 ++++++++++++------- .../updater/permissions/schemas/schema.json | 10 ++-- 4 files changed, 46 insertions(+), 25 deletions(-) create mode 100644 .changes/dialog-main-thread.md diff --git a/.changes/dialog-main-thread.md b/.changes/dialog-main-thread.md new file mode 100644 index 0000000000..c4388bc641 --- /dev/null +++ b/.changes/dialog-main-thread.md @@ -0,0 +1,5 @@ +--- +dialog: patch +--- + +Fixed an issue where the dialog apis panicked when they were called with no application windows open. diff --git a/examples/api/src-tauri/gen/schemas/desktop-schema.json b/examples/api/src-tauri/gen/schemas/desktop-schema.json index 52ed8e229c..a01af2486f 100644 --- a/examples/api/src-tauri/gen/schemas/desktop-schema.json +++ b/examples/api/src-tauri/gen/schemas/desktop-schema.json @@ -2362,7 +2362,7 @@ "type": "object", "required": [ "args", - "command", + "cmd", "name", "sidecar" ], @@ -2375,7 +2375,7 @@ } ] }, - "command": { + "cmd": { "description": "The command name. It can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$APP`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.", "type": "string" }, @@ -2397,7 +2397,7 @@ "type": "object", "required": [ "args", - "command", + "cmd", "name", "sidecar" ], @@ -2410,7 +2410,7 @@ } ] }, - "command": { + "cmd": { "description": "The command name. It can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$APP`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.", "type": "string" }, diff --git a/plugins/dialog/src/desktop.rs b/plugins/dialog/src/desktop.rs index 5d98952df3..606a933f6b 100644 --- a/plugins/dialog/src/desktop.rs +++ b/plugins/dialog/src/desktop.rs @@ -42,18 +42,6 @@ impl Dialog { } } -macro_rules! run_dialog { - ($e:expr, $h: expr) => {{ - std::thread::spawn(move || $h(tauri::async_runtime::block_on($e))); - }}; -} - -macro_rules! run_file_dialog { - ($e:expr, $h: ident) => {{ - std::thread::spawn(move || $h(tauri::async_runtime::block_on($e))); - }}; -} - impl From for rfd::MessageLevel { fn from(kind: MessageDialogKind) -> Self { match kind { @@ -132,7 +120,11 @@ pub fn pick_file) + Send + 'static>( f: F, ) { let f = |path: Option| f(path.map(|p| p.path().to_path_buf())); - run_file_dialog!(AsyncFileDialog::from(dialog).pick_file(), f) + let handle = dialog.dialog.app_handle().to_owned(); + let _ = handle.run_on_main_thread(move || { + let dialog = AsyncFileDialog::from(dialog).pick_file(); + std::thread::spawn(move || f(tauri::async_runtime::block_on(dialog))); + }); } pub fn pick_files>) + Send + 'static>( @@ -142,7 +134,11 @@ pub fn pick_files>) + Send + 'static>( let f = |paths: Option>| { f(paths.map(|list| list.into_iter().map(|p| p.path().to_path_buf()).collect())) }; - run_file_dialog!(AsyncFileDialog::from(dialog).pick_files(), f) + let handle = dialog.dialog.app_handle().to_owned(); + let _ = handle.run_on_main_thread(move || { + let dialog = AsyncFileDialog::from(dialog).pick_files(); + std::thread::spawn(move || f(tauri::async_runtime::block_on(dialog))); + }); } pub fn pick_folder) + Send + 'static>( @@ -150,7 +146,11 @@ pub fn pick_folder) + Send + 'static>( f: F, ) { let f = |path: Option| f(path.map(|p| p.path().to_path_buf())); - run_file_dialog!(AsyncFileDialog::from(dialog).pick_folder(), f) + let handle = dialog.dialog.app_handle().to_owned(); + let _ = handle.run_on_main_thread(move || { + let dialog = AsyncFileDialog::from(dialog).pick_folder(); + std::thread::spawn(move || f(tauri::async_runtime::block_on(dialog))); + }); } pub fn pick_folders>) + Send + 'static>( @@ -160,7 +160,11 @@ pub fn pick_folders>) + Send + 'static let f = |paths: Option>| { f(paths.map(|list| list.into_iter().map(|p| p.path().to_path_buf()).collect())) }; - run_file_dialog!(AsyncFileDialog::from(dialog).pick_folders(), f) + let handle = dialog.dialog.app_handle().to_owned(); + let _ = handle.run_on_main_thread(move || { + let dialog = AsyncFileDialog::from(dialog).pick_folders(); + std::thread::spawn(move || f(tauri::async_runtime::block_on(dialog))); + }); } pub fn save_file) + Send + 'static>( @@ -168,7 +172,11 @@ pub fn save_file) + Send + 'static>( f: F, ) { let f = |path: Option| f(path.map(|p| p.path().to_path_buf())); - run_file_dialog!(AsyncFileDialog::from(dialog).save_file(), f) + let handle = dialog.dialog.app_handle().to_owned(); + let _ = handle.run_on_main_thread(move || { + let dialog = AsyncFileDialog::from(dialog).save_file(); + std::thread::spawn(move || f(tauri::async_runtime::block_on(dialog))); + }); } /// Shows a message dialog @@ -187,5 +195,9 @@ pub fn show_message_dialog( }); }; - run_dialog!(AsyncMessageDialog::from(dialog).show(), f); + let handle = dialog.dialog.app_handle().to_owned(); + let _ = handle.run_on_main_thread(move || { + let dialog = AsyncMessageDialog::from(dialog).show(); + std::thread::spawn(move || f(tauri::async_runtime::block_on(dialog))); + }); } diff --git a/plugins/updater/permissions/schemas/schema.json b/plugins/updater/permissions/schemas/schema.json index 6913597674..6d6a3c211b 100644 --- a/plugins/updater/permissions/schemas/schema.json +++ b/plugins/updater/permissions/schemas/schema.json @@ -139,10 +139,14 @@ }, "platforms": { "description": "Target platforms this permission applies. By default all platforms are affected by this permission.", - "type": [ - "array", - "null" + "default": [ + "linux", + "macOS", + "windows", + "android", + "iOS" ], + "type": "array", "items": { "$ref": "#/definitions/Target" } From 1d7dc86ec3da382e0b2f23cbd052c6ce77173848 Mon Sep 17 00:00:00 2001 From: Tony <68118705+Legend-Master@users.noreply.github.com> Date: Wed, 13 Mar 2024 22:12:21 +0800 Subject: [PATCH 5/8] fix(updater): run cleanup before exit on Windows (#1070) --- .changes/fix-updater-cleanup-md | 5 +++++ plugins/updater/src/lib.rs | 5 +++++ plugins/updater/src/updater.rs | 31 ++++++++++++++++++++++++------- 3 files changed, 34 insertions(+), 7 deletions(-) create mode 100644 .changes/fix-updater-cleanup-md diff --git a/.changes/fix-updater-cleanup-md b/.changes/fix-updater-cleanup-md new file mode 100644 index 0000000000..fe69a0049c --- /dev/null +++ b/.changes/fix-updater-cleanup-md @@ -0,0 +1,5 @@ +--- +"updater": patch +--- + +Add a `on_before_exit` hook for cleanup before spawning the updater on Windows, defaults to `app.cleanup_before_exit` when used through `UpdaterExt` diff --git a/plugins/updater/src/lib.rs b/plugins/updater/src/lib.rs index e060827d2c..37198150da 100644 --- a/plugins/updater/src/lib.rs +++ b/plugins/updater/src/lib.rs @@ -98,6 +98,11 @@ impl> UpdaterExt for T { } } + let app_handle = app.app_handle().clone(); + builder = builder.on_before_exit(move || { + app_handle.cleanup_before_exit(); + }); + builder } diff --git a/plugins/updater/src/updater.rs b/plugins/updater/src/updater.rs index 4ba744358c..27749bc377 100644 --- a/plugins/updater/src/updater.rs +++ b/plugins/updater/src/updater.rs @@ -8,6 +8,7 @@ use std::{ io::{Cursor, Read}, path::{Path, PathBuf}, str::FromStr, + sync::Arc, time::Duration, }; @@ -88,6 +89,8 @@ impl RemoteRelease { } } +pub type OnBeforeExit = Arc; + pub struct UpdaterBuilder { current_version: Version, config: Config, @@ -99,6 +102,7 @@ pub struct UpdaterBuilder { timeout: Option, proxy: Option, installer_args: Vec, + on_before_exit: Option, } impl UpdaterBuilder { @@ -118,6 +122,7 @@ impl UpdaterBuilder { headers: Default::default(), timeout: None, proxy: None, + on_before_exit: None, } } @@ -197,6 +202,11 @@ impl UpdaterBuilder { self } + pub fn on_before_exit(mut self, f: F) -> Self { + self.on_before_exit.replace(Arc::new(f)); + self + } + pub fn build(self) -> Result { let endpoints = self .endpoints @@ -236,6 +246,7 @@ impl UpdaterBuilder { json_target, headers: self.headers, extract_path, + on_before_exit: self.on_before_exit, }) } } @@ -256,6 +267,7 @@ pub struct Updater { json_target: String, headers: HeaderMap, extract_path: PathBuf, + on_before_exit: Option, } impl Updater { @@ -354,6 +366,7 @@ impl Updater { let update = if should_update { Some(Update { config: self.config.clone(), + on_before_exit: self.on_before_exit.clone(), current_version: self.current_version.to_string(), target: self.target.clone(), extract_path: self.extract_path.clone(), @@ -375,9 +388,11 @@ impl Updater { } } -#[derive(Debug, Clone)] +#[derive(Clone)] pub struct Update { config: Config, + #[allow(unused)] + on_before_exit: Option, /// Update description pub body: Option, /// Version used to check for update @@ -490,7 +505,7 @@ impl Update { } #[cfg(mobile)] - fn install_inner(&self, bytes: Vec) -> Result<()> { + fn install_inner(&self, _bytes: Vec) -> Result<()> { Ok(()) } @@ -541,7 +556,7 @@ impl Update { let mut installer_args = self .installer_args .iter() - .map(|a| OsStr::new(a)) + .map(OsStr::new) .collect::>(); for path in paths { @@ -557,9 +572,13 @@ impl Update { continue; } + if let Some(on_before_exit) = self.on_before_exit.as_ref() { + on_before_exit(); + } + let file = encode_wide(found_path.as_os_str()); let parameters = encode_wide(installer_args.join(OsStr::new(" ")).as_os_str()); - let ret = unsafe { + unsafe { ShellExecuteW( 0, w!("open"), @@ -569,9 +588,7 @@ impl Update { SW_SHOW, ) }; - if ret <= 32 { - return Err(Error::Io(std::io::Error::last_os_error())); - } + std::process::exit(0); } From cb96aa06277f7b864952827ec9fb1e74c8a1f761 Mon Sep 17 00:00:00 2001 From: i-c-b <133848861+i-c-b@users.noreply.github.com> Date: Sat, 16 Mar 2024 20:01:49 +1000 Subject: [PATCH 6/8] fix(fs): rename `dir` field to `base_dir` in `WatchOptions`, fixes #1081 (#1082) * fix(fs): rename `dir` field to `base_dir` in `WatchOptions`, fixes #1081 * Create fix-fs-watcher-basedir.md --- .changes/fix-fs-watcher-basedir.md | 5 +++++ plugins/fs/src/watcher.rs | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changes/fix-fs-watcher-basedir.md diff --git a/.changes/fix-fs-watcher-basedir.md b/.changes/fix-fs-watcher-basedir.md new file mode 100644 index 0000000000..031056b7dc --- /dev/null +++ b/.changes/fix-fs-watcher-basedir.md @@ -0,0 +1,5 @@ +--- +"fs": patch +--- + +Fixes `watch` and `watchImmediate` which previously ignored the `baseDir` parameter. diff --git a/plugins/fs/src/watcher.rs b/plugins/fs/src/watcher.rs index d83262a2d3..0795aa49e0 100644 --- a/plugins/fs/src/watcher.rs +++ b/plugins/fs/src/watcher.rs @@ -75,7 +75,7 @@ fn watch_debounced(on_event: Channel, rx: Receiver) { #[derive(Deserialize)] #[serde(rename_all = "camelCase")] pub struct WatchOptions { - dir: Option, + base_dir: Option, recursive: bool, delay_ms: Option, } @@ -96,7 +96,7 @@ pub async fn watch( &global_scope, &command_scope, path, - options.dir, + options.base_dir, )?); } From 7b9fa6607bdcf9161b097e95ad68651a8db0bcb6 Mon Sep 17 00:00:00 2001 From: Fabian-Lars Date: Mon, 18 Mar 2024 09:40:37 +0100 Subject: [PATCH 7/8] chore(template): Replace {{name}} with PLUGIN_NAME (#1088) fixes #1052 --- shared/template/Cargo.toml | 4 ++-- shared/template/README.md | 20 ++++++++++---------- shared/template/package.json | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/shared/template/Cargo.toml b/shared/template/Cargo.toml index be8472bc08..1a2deb3fba 100644 --- a/shared/template/Cargo.toml +++ b/shared/template/Cargo.toml @@ -1,10 +1,10 @@ [package] -name = "tauri-plugin-{{name}}" +name = "tauri-plugin-PLUGIN_NAME" version = "1.0.0" edition = { workspace = true } authors = { workspace = true } license = { workspace = true } -links = "tauri-plugin-{{name}}" +links = "tauri-plugin-PLUGIN_NAME" [package.metadata.docs.rs] rustc-args = [ "--cfg", "docsrs" ] diff --git a/shared/template/README.md b/shared/template/README.md index 920f5f8ccd..0bd82b5647 100644 --- a/shared/template/README.md +++ b/shared/template/README.md @@ -1,4 +1,4 @@ -![{{plugin-name}}](https://github.com/tauri-apps/plugins-workspace/raw/v2/plugins/{{plugin-name}}/banner.png) +![PLUGIN_NAME](https://github.com/tauri-apps/plugins-workspace/raw/v2/plugins/PLUGIN_NAME/banner.png) @@ -18,9 +18,9 @@ Install the Core plugin by adding the following to your `Cargo.toml` file: ```toml [dependencies] -tauri-plugin-{{plugin-name}} = "2.0.0-beta" +tauri-plugin-PLUGIN_NAME = "2.0.0-beta" # alternatively with Git: -tauri-plugin-{{plugin-name}} = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" } +tauri-plugin-PLUGIN_NAME = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" } ``` You can install the JavaScript Guest bindings using your preferred JavaScript package manager: @@ -30,18 +30,18 @@ You can install the JavaScript Guest bindings using your preferred JavaScript pa ```sh -pnpm add @tauri-apps/plugin-{{plugin-name}} +pnpm add @tauri-apps/plugin-PLUGIN_NAME # or -npm add @tauri-apps/plugin-{{plugin-name}} +npm add @tauri-apps/plugin-PLUGIN_NAME # or -yarn add @tauri-apps/plugin-{{plugin-name}} +yarn add @tauri-apps/plugin-PLUGIN_NAME # alternatively with Git: -pnpm add https://github.com/tauri-apps/tauri-plugin-{{plugin-name}}#v2 +pnpm add https://github.com/tauri-apps/tauri-plugin-PLUGIN_NAME#v2 # or -npm add https://github.com/tauri-apps/tauri-plugin-{{plugin-name}}#v2 +npm add https://github.com/tauri-apps/tauri-plugin-PLUGIN_NAME#v2 # or -yarn add https://github.com/tauri-apps/tauri-plugin-{{plugin-name}}#v2 +yarn add https://github.com/tauri-apps/tauri-plugin-PLUGIN_NAME#v2 ``` ## Usage @@ -53,7 +53,7 @@ First you need to register the core plugin with Tauri: ```rust fn main() { tauri::Builder::default() - .plugin(tauri_plugin_{{plugin-name}}::init()) + .plugin(tauri_plugin_PLUGIN_NAME::init()) .run(tauri::generate_context!()) .expect("error while running tauri application"); } diff --git a/shared/template/package.json b/shared/template/package.json index caf348a4c9..542a1cb6b1 100644 --- a/shared/template/package.json +++ b/shared/template/package.json @@ -1,5 +1,5 @@ { - "name": "@tauri-apps/plugin-{{name}}", + "name": "@tauri-apps/plugin-PLUGIN_NAME", "version": "1.0.0", "license": "MIT or APACHE-2.0", "authors": [ From 9dec9605ed1ce19dbef697e55debddf9008ecba1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=98=BF=E8=89=AF=E4=BB=94?= <32487868+cijiugechu@users.noreply.github.com> Date: Tue, 19 Mar 2024 20:35:37 +0800 Subject: [PATCH 8/8] feat(clipboard): support `readImage` & `writeImage` (#845) * feat(clipboard): support `read_image` & `write_image` * fix plugin name * platform specific bahavior * remove unnecessary BufWriter * improvement * update example * update example * format * header, fix change file * use image from tauri * fix ci * update tauri, fix read * image crate only on desktop [skip ci] * Update plugins/authenticator/src/u2f_crate/protocol.rs [skip ci] Co-authored-by: Amr Bashir * Update plugins/authenticator/src/u2f_crate/protocol.rs [skip ci] Co-authored-by: Amr Bashir * update deps, address code review * fix mobile [skip ci] --------- Co-authored-by: Lucas Nogueira Co-authored-by: Lucas Nogueira Co-authored-by: Amr Bashir --- .changes/clipboard-manager-image.md | 6 + .changes/clipboard-text-command-rename.md | 5 + Cargo.lock | 547 ++++++++++-------- Cargo.toml | 6 +- examples/api/package.json | 4 +- examples/api/src-tauri/capabilities/base.json | 7 +- .../src-tauri/gen/schemas/desktop-schema.json | 207 +++++-- .../src-tauri/gen/schemas/mobile-schema.json | 253 +++++++- examples/api/src-tauri/src/tray.rs | 5 +- examples/api/src/lib/utils.js | 15 + examples/api/src/views/Clipboard.svelte | 52 +- examples/api/src/views/FileSystem.svelte | 19 +- plugins/authenticator/package.json | 2 +- .../permissions/schemas/schema.json | 10 +- .../authenticator/src/u2f_crate/protocol.rs | 6 +- plugins/autostart/package.json | 2 +- .../autostart/permissions/schemas/schema.json | 10 +- plugins/barcode-scanner/package.json | 2 +- .../permissions/schemas/schema.json | 10 +- plugins/biometric/package.json | 2 +- .../biometric/permissions/schemas/schema.json | 10 +- plugins/cli/package.json | 2 +- plugins/cli/permissions/schemas/schema.json | 10 +- plugins/clipboard-manager/Cargo.toml | 1 + .../android/src/main/java/ClipboardPlugin.kt | 4 +- plugins/clipboard-manager/build.rs | 9 +- plugins/clipboard-manager/guest-js/index.ts | 57 +- .../ios/Sources/ClipboardPlugin.swift | 4 +- plugins/clipboard-manager/package.json | 2 +- .../autogenerated/commands/clear.toml | 13 + .../autogenerated/commands/read.toml | 13 - .../autogenerated/commands/read_image.toml | 13 + .../autogenerated/commands/read_text.toml | 13 + .../autogenerated/commands/write.toml | 13 - .../autogenerated/commands/write_html.toml | 13 + .../autogenerated/commands/write_image.toml | 13 + .../autogenerated/commands/write_text.toml | 13 + .../permissions/autogenerated/reference.md | 16 +- .../permissions/schemas/schema.json | 82 ++- plugins/clipboard-manager/src/api-iife.js | 2 +- plugins/clipboard-manager/src/commands.rs | 30 +- plugins/clipboard-manager/src/desktop.rs | 53 +- plugins/clipboard-manager/src/error.rs | 6 + plugins/clipboard-manager/src/lib.rs | 8 +- plugins/clipboard-manager/src/mobile.rs | 17 +- plugins/clipboard-manager/src/models.rs | 16 +- plugins/deep-link/examples/app/package.json | 4 +- plugins/deep-link/package.json | 2 +- .../deep-link/permissions/schemas/schema.json | 10 +- plugins/dialog/package.json | 2 +- .../dialog/permissions/schemas/schema.json | 10 +- plugins/fs/package.json | 2 +- plugins/fs/permissions/schemas/schema.json | 10 +- plugins/global-shortcut/package.json | 2 +- .../permissions/schemas/schema.json | 10 +- plugins/http/package.json | 2 +- plugins/http/permissions/schemas/schema.json | 10 +- plugins/log/package.json | 2 +- plugins/log/permissions/schemas/schema.json | 10 +- plugins/nfc/package.json | 2 +- plugins/nfc/permissions/schemas/schema.json | 10 +- plugins/notification/Cargo.toml | 1 - plugins/notification/package.json | 2 +- .../permissions/schemas/schema.json | 10 +- plugins/os/package.json | 2 +- plugins/os/permissions/schemas/schema.json | 10 +- plugins/positioner/package.json | 2 +- .../permissions/schemas/schema.json | 10 +- plugins/process/package.json | 2 +- .../process/permissions/schemas/schema.json | 10 +- plugins/shell/package.json | 2 +- plugins/shell/permissions/schemas/schema.json | 10 +- .../examples/vanilla/package.json | 2 +- plugins/sql/package.json | 2 +- plugins/sql/permissions/schemas/schema.json | 10 +- plugins/store/package.json | 2 +- plugins/store/permissions/schemas/schema.json | 10 +- plugins/stronghold/package.json | 2 +- .../permissions/schemas/schema.json | 10 +- plugins/updater/package.json | 2 +- .../updater/permissions/schemas/schema.json | 10 +- plugins/upload/package.json | 2 +- .../upload/permissions/schemas/schema.json | 10 +- .../websocket/examples/tauri-app/package.json | 2 +- plugins/websocket/package.json | 2 +- .../websocket/permissions/schemas/schema.json | 10 +- plugins/window-state/package.json | 2 +- .../permissions/schemas/schema.json | 10 +- plugins/window-state/src/api-iife.js | 2 +- pnpm-lock.yaml | 280 ++++----- shared/template/package.json | 2 +- 91 files changed, 1330 insertions(+), 794 deletions(-) create mode 100644 .changes/clipboard-manager-image.md create mode 100644 .changes/clipboard-text-command-rename.md create mode 100644 examples/api/src/lib/utils.js create mode 100644 plugins/clipboard-manager/permissions/autogenerated/commands/clear.toml delete mode 100644 plugins/clipboard-manager/permissions/autogenerated/commands/read.toml create mode 100644 plugins/clipboard-manager/permissions/autogenerated/commands/read_image.toml create mode 100644 plugins/clipboard-manager/permissions/autogenerated/commands/read_text.toml delete mode 100644 plugins/clipboard-manager/permissions/autogenerated/commands/write.toml create mode 100644 plugins/clipboard-manager/permissions/autogenerated/commands/write_html.toml create mode 100644 plugins/clipboard-manager/permissions/autogenerated/commands/write_image.toml create mode 100644 plugins/clipboard-manager/permissions/autogenerated/commands/write_text.toml diff --git a/.changes/clipboard-manager-image.md b/.changes/clipboard-manager-image.md new file mode 100644 index 0000000000..9151d108b1 --- /dev/null +++ b/.changes/clipboard-manager-image.md @@ -0,0 +1,6 @@ +--- +"clipboard-manager": "minor" +"clipboard-manager-js": "minor" +--- + +Add support for `read_image` and `write_image` to the clipboard plugin (desktop). diff --git a/.changes/clipboard-text-command-rename.md b/.changes/clipboard-text-command-rename.md new file mode 100644 index 0000000000..53ec3888db --- /dev/null +++ b/.changes/clipboard-text-command-rename.md @@ -0,0 +1,5 @@ +--- +"clipboard-manager": patch +--- + +The `write` and `read` commands are now called `write_text` and `read_text` so the permission name was changed. diff --git a/Cargo.lock b/Cargo.lock index 9dee2ec478..e4e67de7d3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -83,7 +83,7 @@ dependencies = [ "aes 0.8.4", "cipher 0.4.4", "ctr 0.9.2", - "ghash 0.5.0", + "ghash 0.5.1", "subtle", ] @@ -100,9 +100,9 @@ dependencies = [ [[package]] name = "ahash" -version = "0.8.8" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42cd52102d3df161c77a887b608d7a4897d7cc112886a9537b738a887a03aaff" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", "getrandom 0.2.12", @@ -176,9 +176,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.12" +version = "0.6.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96b09b5178381e0874812a9b157f7fe84982617e48f71f4e3235482775e5b540" +checksum = "d96bd03f33fe50a863e394ee9718a706f988b9079b20c3784fb726e7678b62fb" dependencies = [ "anstyle", "anstyle-parse", @@ -271,9 +271,9 @@ dependencies = [ [[package]] name = "arboard" -version = "3.3.1" +version = "3.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1faa3c733d9a3dd6fbaf85da5d162a2e03b2e0033a90dceb0e2a90fdd1e5380a" +checksum = "a2041f1943049c7978768d84e6d0fd95de98b76d6c4727b09e78ec253d29fa58" dependencies = [ "clipboard-win", "core-graphics 0.23.1", @@ -345,7 +345,7 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "258b52a1aa741b9f09783b2d86cf0aeeb617bbf847f6933340a39644227acbdb" dependencies = [ - "event-listener 5.1.0", + "event-listener 5.2.0", "event-listener-strategy 0.5.0", "futures-core", "pin-project-lite", @@ -358,7 +358,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f28243a43d821d11341ab73c80bed182dc015c514b951616cf79bd4af39af0c3" dependencies = [ "concurrent-queue", - "event-listener 5.1.0", + "event-listener 5.2.0", "event-listener-strategy 0.5.0", "futures-core", "pin-project-lite", @@ -454,7 +454,7 @@ dependencies = [ "async-signal", "blocking", "cfg-if", - "event-listener 5.1.0", + "event-listener 5.2.0", "futures-lite", "rustix", "windows-sys 0.52.0", @@ -468,7 +468,7 @@ checksum = "5fd55a5ba1179988837d24ab4c7cc8ed6efdeff578ede0416b4225a5fca35bd0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.49", + "syn 2.0.52", ] [[package]] @@ -503,7 +503,7 @@ checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.49", + "syn 2.0.52", ] [[package]] @@ -546,11 +546,11 @@ checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "atomic-write-file" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edcdbedc2236483ab103a53415653d6b4442ea6141baf1ffa85df29635e88436" +checksum = "a8204db279bf648d64fe845bd8840f78b39c8132ed4d6a4194c3b10d4b4cfb0b" dependencies = [ - "nix 0.27.1", + "nix 0.28.0", "rand 0.8.5", ] @@ -742,9 +742,9 @@ dependencies = [ [[package]] name = "borsh" -version = "1.3.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26d4d6dafc1a3bb54687538972158f07b2c948bc57d5890df22c0739098b3028" +checksum = "f58b559fd6448c6e2fd0adb5720cd98a2506594cafa4737ff98c396f3e82f667" dependencies = [ "borsh-derive", "cfg_aliases 0.1.1", @@ -752,15 +752,15 @@ dependencies = [ [[package]] name = "borsh-derive" -version = "1.3.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4918709cc4dd777ad2b6303ed03cb37f3ca0ccede8c1b0d28ac6db8f4710e0" +checksum = "7aadb5b6ccbd078890f6d7003694e33816e6b784358f18e15e7e6d9f065a57cd" dependencies = [ "once_cell", - "proc-macro-crate 2.0.2", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.49", + "syn 2.0.52", "syn_derive", ] @@ -787,9 +787,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.15.0" +version = "3.15.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d32a994c2b3ca201d9b263612a374263f05e7adde37c4707f693dcd375076d1f" +checksum = "7ff69b9dd49fd426c69a0db9fc04dd934cdb6645ff000864d98f7e2af8830eaa" [[package]] name = "byte-unit" @@ -841,7 +841,7 @@ checksum = "965ab7eb5f8f97d2a083c799f3a1b994fc397b2fe2da5d1da1626ce15a39f2b1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.49", + "syn 2.0.52", ] [[package]] @@ -944,14 +944,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a969e13a7589e9e3e4207e153bae624ade2b5622fb4684a4923b23ec3d57719" dependencies = [ "serde", - "toml 0.8.2", + "toml 0.8.10", ] [[package]] name = "cc" -version = "1.0.83" +version = "1.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +checksum = "8cd6604a82acf3039f1144f54b8eb34e91ffba622051189e71b781822d5ee1f5" dependencies = [ "jobserver", "libc", @@ -1029,9 +1029,9 @@ dependencies = [ [[package]] name = "chrono" -version = "0.4.34" +version = "0.4.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bc015644b92d5890fab7489e49d21f879d5c990186827d42ec511919404f38b" +checksum = "8eaf5903dcbc0a39312feb77df2ff4c76387d591b9fc7b04a238dcf8bb62639a" dependencies = [ "android-tzdata", "iana-time-zone", @@ -1069,18 +1069,18 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.1" +version = "4.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c918d541ef2913577a0f9566e9ce27cb35b6df072075769e0b26cb5a554520da" +checksum = "b230ab84b0ffdf890d5a10abdbc8b83ae1c4918275daea1ab8801f71536b2651" dependencies = [ "clap_builder", ] [[package]] name = "clap_builder" -version = "4.5.1" +version = "4.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f3e7391dad68afb0c2ede1bf619f579a3dc9c2ec67f089baa397123a2f3d1eb" +checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" dependencies = [ "anstream", "anstyle", @@ -1096,9 +1096,9 @@ checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" [[package]] name = "clipboard-win" -version = "5.1.0" +version = "5.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ec832972fefb8cf9313b45a0d1945e29c9c251f1d4c6eafc5fe2124c02d2e81" +checksum = "12f9a0700e0127ba15d1d52dd742097f821cd9c65939303a44d970465040a297" dependencies = [ "error-code", ] @@ -1352,9 +1352,9 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.5.11" +version = "0.5.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "176dc175b78f56c0f321911d9c8eb2b77a78a4860b9c19db83835fea1a46649b" +checksum = "ab3db02a9c5b5121e1e42fbdb1aeb65f5e02624cc58c43f2884c6ccac0b82f95" dependencies = [ "crossbeam-utils", ] @@ -1434,17 +1434,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331" dependencies = [ "quote", - "syn 2.0.49", + "syn 2.0.52", ] [[package]] name = "ctor" -version = "0.2.6" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30d2b3721e861707777e3195b0158f950ae6dc4a27e4d02ff9f67e3eb3de199e" +checksum = "ad291aa74992b9b7a7e88c38acbbf6ad7e107f1d90ee8775b7bc1fc3394f485c" dependencies = [ "quote", - "syn 2.0.49", + "syn 2.0.52", ] [[package]] @@ -1480,9 +1480,9 @@ dependencies = [ [[package]] name = "darling" -version = "0.20.6" +version = "0.20.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c376d08ea6aa96aafe61237c7200d1241cb177b7d3a542d791f2d118e9cbb955" +checksum = "54e36fcd13ed84ffdfda6f5be89b31287cbb80c439841fe69e04841435464391" dependencies = [ "darling_core", "darling_macro", @@ -1490,27 +1490,27 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.20.6" +version = "0.20.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33043dcd19068b8192064c704b3f83eb464f91f1ff527b44a4e2b08d9cdb8855" +checksum = "9c2cf1c23a687a1feeb728783b993c4e1ad83d99f351801977dd809b48d0a70f" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", "strsim 0.10.0", - "syn 2.0.49", + "syn 2.0.52", ] [[package]] name = "darling_macro" -version = "0.20.6" +version = "0.20.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5a91391accf613803c2a9bf9abccdbaa07c54b4244a5b64883f9c3c137c86be" +checksum = "a668eda54683121533a393014d8692171709ff57a7d61f187b6e782719f8933f" dependencies = [ "darling_core", "quote", - "syn 2.0.49", + "syn 2.0.52", ] [[package]] @@ -1665,7 +1665,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "330c60081dcc4c72131f8eb70510f1ac07223e5d4163db481a04a0befcffa412" dependencies = [ - "libloading 0.8.1", + "libloading 0.8.3", ] [[package]] @@ -1688,7 +1688,7 @@ checksum = "f2b99bf03862d7f545ebc28ddd33a665b50865f4dfd84031a393823879bd4c54" dependencies = [ "proc-macro2", "quote", - "syn 2.0.49", + "syn 2.0.52", ] [[package]] @@ -1765,9 +1765,9 @@ checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" [[package]] name = "dyn-clone" -version = "1.0.16" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "545b22097d44f8a9581187cdf93de7a71e4722bf51200cfaba810865b49a495d" +checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125" [[package]] name = "ed25519-zebra" @@ -1794,16 +1794,16 @@ dependencies = [ [[package]] name = "embed-resource" -version = "2.4.1" +version = "2.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bde55e389bea6a966bd467ad1ad7da0ae14546a5bc794d16d1e55e7fca44881" +checksum = "c6985554d0688b687c5cb73898a34fbe3ad6c24c58c238a4d91d5e840670ee9d" dependencies = [ "cc", "memchr", "rustc_version", - "toml 0.8.2", + "toml 0.8.10", "vswhom", - "winreg 0.51.0", + "winreg 0.52.0", ] [[package]] @@ -1836,7 +1836,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.49", + "syn 2.0.52", ] [[package]] @@ -1857,7 +1857,7 @@ checksum = "5c785274071b1b420972453b306eeca06acf4633829db4223b58a2a8c5953bc4" dependencies = [ "proc-macro2", "quote", - "syn 2.0.49", + "syn 2.0.52", ] [[package]] @@ -1891,9 +1891,9 @@ dependencies = [ [[package]] name = "error-code" -version = "3.0.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "281e452d3bad4005426416cdba5ccfd4f5c1280e10099e21db27f7c1c28347fc" +checksum = "a0474425d51df81997e2f90a21591180b38eccf27292d755f3e30750225c175b" [[package]] name = "etcetera" @@ -1925,9 +1925,9 @@ dependencies = [ [[package]] name = "event-listener" -version = "5.1.0" +version = "5.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7ad6fd685ce13acd6d9541a30f6db6567a7a24c9ffd4ba2955d29e3f22c8b27" +checksum = "2b5fb89194fa3cad959b833185b3063ba881dbfc7030680b314250779fb4cc91" dependencies = [ "concurrent-queue", "parking", @@ -1950,7 +1950,7 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "feedafcaa9b749175d5ac357452a9d41ea2911da598fde46ce1fe02c37751291" dependencies = [ - "event-listener 5.1.0", + "event-listener 5.2.0", "pin-project-lite", ] @@ -2086,7 +2086,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn 2.0.49", + "syn 2.0.52", ] [[package]] @@ -2215,7 +2215,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.49", + "syn 2.0.52", ] [[package]] @@ -2425,19 +2425,19 @@ dependencies = [ [[package]] name = "ghash" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d930750de5717d2dd0b8c0d42c076c0e884c81a73e6cab859bbd2339c71e3e40" +checksum = "f0d8a4362ccb29cb0b265253fb0a2728f592895ee6854fd9bc13f2ffda266ff1" dependencies = [ "opaque-debug", - "polyval 0.6.1", + "polyval 0.6.2", ] [[package]] name = "gif" -version = "0.12.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80792593675e051cf94a4b111980da2ba60d4a83e43e0048c5693baab3977045" +checksum = "3fb2d69b19215e18bb912fa30f7ce15846e301408695e44e0ef719f1da9e19f2" dependencies = [ "color_quant", "weezl", @@ -2561,11 +2561,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0bb0228f477c0900c880fd78c8759b95c7636dbd7842707f49e132378aa2acdc" dependencies = [ "heck", - "proc-macro-crate 2.0.2", + "proc-macro-crate 2.0.0", "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.49", + "syn 2.0.52", ] [[package]] @@ -2679,7 +2679,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.49", + "syn 2.0.52", ] [[package]] @@ -2693,8 +2693,8 @@ dependencies = [ "futures-core", "futures-sink", "futures-util", - "http 0.2.11", - "indexmap 2.2.3", + "http 0.2.12", + "indexmap 2.2.5", "slab", "tokio", "tokio-util", @@ -2710,7 +2710,7 @@ dependencies = [ "bytes", "fastrand", "futures-util", - "http 0.2.11", + "http 0.2.12", "pin-project-lite", "tokio", "tracing", @@ -2733,9 +2733,9 @@ dependencies = [ [[package]] name = "half" -version = "2.3.1" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc52e53916c08643f1b56ec082790d1e86a32e58dc5268f897f313fbae7b4872" +checksum = "b5eceaaeec696539ddaf7b333340f1af35a5aa87ae3e4f3ead0532f72affab2e" dependencies = [ "cfg-if", "crunchy", @@ -2756,7 +2756,7 @@ version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" dependencies = [ - "ahash 0.8.8", + "ahash 0.8.11", "allocator-api2", ] @@ -2789,9 +2789,9 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.3.6" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd5256b483761cd23699d0da46cc6fd2ee3be420bbe6d020ae4a091e70b7e9fd" +checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" [[package]] name = "hex" @@ -2853,9 +2853,9 @@ dependencies = [ [[package]] name = "http" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" dependencies = [ "bytes", "fnv", @@ -2864,9 +2864,9 @@ dependencies = [ [[package]] name = "http" -version = "1.0.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b32afd38673a8016f7c9ae69e5af41a58f81b1d31689040f2f1959594ce194ea" +checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" dependencies = [ "bytes", "fnv", @@ -2880,7 +2880,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ "bytes", - "http 0.2.11", + "http 0.2.12", "pin-project-lite", ] @@ -2919,7 +2919,7 @@ dependencies = [ "futures-core", "futures-util", "h2", - "http 0.2.11", + "http 0.2.12", "http-body", "httparse", "httpdate", @@ -2939,7 +2939,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ "futures-util", - "http 0.2.11", + "http 0.2.12", "hyper", "rustls 0.21.10", "tokio", @@ -3030,9 +3030,9 @@ dependencies = [ [[package]] name = "image" -version = "0.24.8" +version = "0.24.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "034bbe799d1909622a74d1193aa50147769440040ff36cb2baa947609b0a4e23" +checksum = "5690139d2f55868e080017335e4b94cb7414274c74f1669c84fb5feba2c9f69d" dependencies = [ "bytemuck", "byteorder", @@ -3059,9 +3059,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.3" +version = "2.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "233cf39063f058ea2caae4091bf4a3ef70a653afbc026f5c4a4135d114e3c177" +checksum = "7b0b929d511467233429c45a44ac1dcaa21ba0f5ba11e4879e6ed28ddb4f9df4" dependencies = [ "equivalent", "hashbrown 0.14.3", @@ -3201,7 +3201,7 @@ version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" dependencies = [ - "hermit-abi 0.3.6", + "hermit-abi 0.3.9", "libc", "windows-sys 0.52.0", ] @@ -3302,9 +3302,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.68" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "406cda4b368d531c842222cf9d2600a9a4acce8d29423695379c6868a143a9ee" +checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" dependencies = [ "wasm-bindgen", ] @@ -3433,12 +3433,12 @@ dependencies = [ [[package]] name = "libloading" -version = "0.8.1" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c571b676ddfc9a8c12f1f3d3085a7b163966a8fd8098a90640953ce5f6170161" +checksum = "0c2a198fb6b0eada2a8df47933734e6d35d350665a33a3593d7164fa52c75c19" dependencies = [ "cfg-if", - "windows-sys 0.48.0", + "windows-targets 0.52.4", ] [[package]] @@ -3723,9 +3723,9 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.10" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" +checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" dependencies = [ "libc", "log", @@ -3753,9 +3753,9 @@ dependencies = [ [[package]] name = "muda" -version = "0.11.5" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c47e7625990fc1af2226ea4f34fb2412b03c12639fcb91868581eb3a6893453" +checksum = "3e27c56b8cb9b3214d196556227b0eaa12db8393b4f919a0a93ffb67ed17d185" dependencies = [ "cocoa 0.25.0", "crossbeam-channel", @@ -3836,12 +3836,13 @@ dependencies = [ [[package]] name = "nix" -version = "0.27.1" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053" +checksum = "ab2156c4fce2f8df6c499cc1c763e4394b7482525bf2a9701c9d79d215f519e4" dependencies = [ "bitflags 2.4.2", "cfg-if", + "cfg_aliases 0.1.1", "libc", "memoffset 0.9.0", ] @@ -3965,7 +3966,7 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.3.6", + "hermit-abi 0.3.9", "libc", ] @@ -4055,9 +4056,9 @@ checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "opaque-debug" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" [[package]] name = "open" @@ -4072,9 +4073,9 @@ dependencies = [ [[package]] name = "openssl" -version = "0.10.63" +version = "0.10.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15c9d69dd87a29568d4d017cfe8ec518706046a05184e5aea92d0af890b803c8" +checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" dependencies = [ "bitflags 2.4.2", "cfg-if", @@ -4093,7 +4094,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.49", + "syn 2.0.52", ] [[package]] @@ -4113,9 +4114,9 @@ dependencies = [ [[package]] name = "openssl-sys" -version = "0.9.99" +version = "0.9.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22e1bf214306098e4832460f797824c05d25aacdf896f64a985fb0fd992454ae" +checksum = "dda2b0f344e78efc2facf7d195d098df0dd72151b26ab98da807afc26c198dff" dependencies = [ "cc", "libc", @@ -4369,7 +4370,7 @@ dependencies = [ "phf_shared 0.11.2", "proc-macro2", "quote", - "syn 2.0.49", + "syn 2.0.52", ] [[package]] @@ -4456,7 +4457,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5699cc8a63d1aa2b1ee8e12b9ad70ac790d65788cd36101fa37f87ea46c4cef" dependencies = [ "base64 0.21.7", - "indexmap 2.2.3", + "indexmap 2.2.5", "line-wrap", "quick-xml 0.31.0", "serde", @@ -4515,9 +4516,9 @@ dependencies = [ [[package]] name = "polyval" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d52cff9d1d4dee5fe6d03729099f4a310a41179e0a10dbf542039873f2e826fb" +checksum = "9d1fe60d06143b2430aa532c94cfe9e29783047f06c0d7fd359a9a51b729fa25" dependencies = [ "cfg-if", "cpufeatures", @@ -4555,12 +4556,20 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "2.0.2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b00f26d3400549137f92511a46ac1cd8ce37cb5598a96d382381458b992a5d24" +checksum = "7e8366a6159044a37876a2b9817124296703c586a5c92e2c53751fa06d8d43e8" dependencies = [ - "toml_datetime", - "toml_edit 0.20.2", + "toml_edit 0.20.7", +] + +[[package]] +name = "proc-macro-crate" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" +dependencies = [ + "toml_edit 0.21.1", ] [[package]] @@ -4829,9 +4838,9 @@ checksum = "42a9830a0e1b9fb145ebb365b8bc4ccd75f290f98c0247deafbbe2c75cefb544" [[package]] name = "rayon" -version = "1.8.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa7237101a77a10773db45d62004a272517633fbcc3df19d96455ede1122e051" +checksum = "e4963ed1bc86e4f3ee217022bd855b297cef07fb9eac5dfa1f788b220b49b3bd" dependencies = [ "either", "rayon-core", @@ -4886,7 +4895,7 @@ checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.5", + "regex-automata 0.4.6", "regex-syntax 0.8.2", ] @@ -4901,9 +4910,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bb987efffd3c6d0d8f5f89510bb458559eab11e4f869acb20bf845e016259cd" +checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" dependencies = [ "aho-corasick", "memchr", @@ -4949,7 +4958,7 @@ dependencies = [ "h2", "h3", "h3-quinn", - "http 0.2.11", + "http 0.2.12", "http-body", "hyper", "hyper-rustls", @@ -5218,9 +5227,9 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.3.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "048a63e5b3ac996d78d402940b5fa47973d2d080c6c6fffa1d0f19c4445310b7" +checksum = "5ede67b28608b4c60685c7d54122d4400d90f62b40caee7700e700380a390fa8" [[package]] name = "rustls-webpki" @@ -5399,22 +5408,22 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.196" +version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "870026e60fa08c69f064aa766c10f10b1d62db9ccd4d0abb206472bee0ce3b32" +checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.196" +version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67" +checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.49", + "syn 2.0.52", ] [[package]] @@ -5430,9 +5439,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.113" +version = "1.0.114" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69801b70b1c3dac963ecb03a364ba0ceda9cf60c71cfe475e99864759c8b8a79" +checksum = "c5f09b1bd632ef549eaa9f60a1f8de742bdbc698e6cee2095fc84dde5f549ae0" dependencies = [ "itoa 1.0.10", "ryu", @@ -5447,7 +5456,7 @@ checksum = "0b2e6b945e9d3df726b65d6ee24060aff8e3533d431f677a9695db04eff9dfdb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.49", + "syn 2.0.52", ] [[package]] @@ -5481,7 +5490,7 @@ dependencies = [ "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.2.3", + "indexmap 2.2.5", "serde", "serde_derive", "serde_json", @@ -5498,7 +5507,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.49", + "syn 2.0.52", ] [[package]] @@ -5658,12 +5667,12 @@ checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" [[package]] name = "socket2" -version = "0.5.5" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" +checksum = "05ffd9c0a93b7543e062e759284fcf5f5e3b098501104bfbdde4d404db792871" dependencies = [ "libc", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -5778,7 +5787,7 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d84b0a3c3739e220d94b3239fd69fb1f74bc36e16643423bd99de3b43c21bfbd" dependencies = [ - "ahash 0.8.8", + "ahash 0.8.11", "atoi", "byteorder", "bytes", @@ -5794,7 +5803,7 @@ dependencies = [ "futures-util", "hashlink", "hex", - "indexmap 2.2.3", + "indexmap 2.2.5", "log", "memchr", "once_cell", @@ -6121,9 +6130,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.49" +version = "2.0.52" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "915aea9e586f80826ee59f8453c1101f9d1c4b3964cd2460185ee8e299ada496" +checksum = "b699d15b36d1f02c3e7c69f8ffef53de37aefae075d8488d4ba1a7788d574a07" dependencies = [ "proc-macro2", "quote", @@ -6139,7 +6148,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.49", + "syn 2.0.52", ] [[package]] @@ -6187,15 +6196,15 @@ dependencies = [ "cfg-expr", "heck", "pkg-config", - "toml 0.8.2", + "toml 0.8.10", "version-compare", ] [[package]] name = "tao" -version = "0.26.0" +version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29d9325da2dd7ebd48a8a433c64240079b15dbe1249da04c72557611bcd08d1c" +checksum = "ccba570365293ca309d60f30fdac2c5271b732dc762e6154e59c85d2c762a0a1" dependencies = [ "bitflags 1.3.2", "cocoa 0.25.0", @@ -6261,15 +6270,15 @@ dependencies = [ [[package]] name = "target-lexicon" -version = "0.12.13" +version = "0.12.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69758bda2e78f098e4ccb393021a0963bb3442eac05f135c30f61b7370bbafae" +checksum = "e1fc403891a21bcfb7c37834ba66a547a8f402146eba7265b5a6d88059c9ff2f" [[package]] name = "tauri" -version = "2.0.0-beta.9" +version = "2.0.0-beta.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "353a521566bd41164a05887f40fe93b375c82b82000726f63c66237955dfb4f5" +checksum = "c33d0026c6146b73322833bc8e51fc4ee400a814c4cbfe489e3c2aa92cfedcec" dependencies = [ "anyhow", "bytes", @@ -6281,10 +6290,9 @@ dependencies = [ "glob", "gtk", "heck", - "http 0.2.11", + "http 0.2.12", "http-range", - "ico", - "infer", + "image", "jni", "libc", "log", @@ -6292,7 +6300,6 @@ dependencies = [ "muda", "objc", "percent-encoding", - "png", "raw-window-handle 0.6.0", "reqwest", "serde", @@ -6310,6 +6317,7 @@ dependencies = [ "tokio", "tray-icon", "url", + "urlpattern", "uuid", "webkit2gtk", "webview2-com", @@ -6319,9 +6327,9 @@ dependencies = [ [[package]] name = "tauri-build" -version = "2.0.0-beta.7" +version = "2.0.0-beta.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50887f06d343b6ede0260d29abb4edd57f40d8aac538f6e34d801c9a4fa1c6b8" +checksum = "1e851a54f222a49babb6b8b94869307e0bf95be086ed92983c42a56d5ed92132" dependencies = [ "anyhow", "cargo_toml", @@ -6337,15 +6345,15 @@ dependencies = [ "tauri-codegen", "tauri-utils", "tauri-winres", - "toml 0.8.2", + "toml 0.8.10", "walkdir", ] [[package]] name = "tauri-codegen" -version = "2.0.0-beta.7" +version = "2.0.0-beta.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10c676621ba42f97d349ee1a835cfac8a268d8843c8b81fa7663ebac2854786a" +checksum = "3ff9b1089989eecc839680cb6b52f6e7ee4733d09fa31861fc4a855996006fe5" dependencies = [ "base64 0.22.0", "brotli", @@ -6359,7 +6367,7 @@ dependencies = [ "serde", "serde_json", "sha2 0.10.8", - "syn 2.0.49", + "syn 2.0.52", "tauri-utils", "thiserror", "time", @@ -6370,23 +6378,23 @@ dependencies = [ [[package]] name = "tauri-macros" -version = "2.0.0-beta.7" +version = "2.0.0-beta.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd5e87dc692a359ee99662616639fe35681e3ce9929e1ec2447b2e3853b6bda6" +checksum = "a4b56c7b752b2b70b74299ff5421795e0e287b6748dd7ec8d44ae8e1637216a7" dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.49", + "syn 2.0.52", "tauri-codegen", "tauri-utils", ] [[package]] name = "tauri-plugin" -version = "2.0.0-beta.7" +version = "2.0.0-beta.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b84ccc2181a81c66f2b203775b6b67590cc357bc477c57f0fac844c31dd5c474" +checksum = "233d4ed7ba51ff398831204ed6c8971b9565c91077e3fdef4711fe7b7715b23a" dependencies = [ "anyhow", "glob", @@ -6395,7 +6403,7 @@ dependencies = [ "serde", "serde_json", "tauri-utils", - "toml 0.8.2", + "toml 0.8.10", "walkdir", ] @@ -6477,6 +6485,7 @@ name = "tauri-plugin-clipboard-manager" version = "2.0.0-beta.2" dependencies = [ "arboard", + "image", "log", "serde", "serde_json", @@ -6551,7 +6560,7 @@ name = "tauri-plugin-http" version = "2.0.0-beta.2" dependencies = [ "data-url", - "http 0.2.11", + "http 0.2.12", "regex", "reqwest", "schemars", @@ -6569,7 +6578,7 @@ dependencies = [ name = "tauri-plugin-localhost" version = "2.0.0-beta.2" dependencies = [ - "http 1.0.0", + "http 1.1.0", "log", "serde", "serde_json", @@ -6618,7 +6627,6 @@ dependencies = [ "color-backtrace", "ctor", "env_logger", - "image", "lazy_static", "log", "mac-notification-sys", @@ -6777,7 +6785,7 @@ dependencies = [ "dirs-next", "flate2", "futures-util", - "http 0.2.11", + "http 0.2.12", "minisign-verify", "mockito", "percent-encoding", @@ -6819,7 +6827,7 @@ name = "tauri-plugin-websocket" version = "2.0.0-beta.2" dependencies = [ "futures-util", - "http 1.0.0", + "http 1.1.0", "log", "rand 0.8.5", "serde", @@ -6847,12 +6855,12 @@ dependencies = [ [[package]] name = "tauri-runtime" -version = "2.0.0-beta.7" +version = "2.0.0-beta.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fc1ebe2a720c1b62a9980ebf44f27db4f8a475e1465917959ce3940d6903307" +checksum = "34ddcf3c08632714e854e38105b39260ec239edd05a77ffcf5f4b3a51f97b119" dependencies = [ "gtk", - "http 0.2.11", + "http 0.2.12", "jni", "raw-window-handle 0.6.0", "serde", @@ -6865,13 +6873,13 @@ dependencies = [ [[package]] name = "tauri-runtime-wry" -version = "2.0.0-beta.7" +version = "2.0.0-beta.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0e853c02137e908589e9f0c684f10bb49d0dedf9e86ad734a18e42ce9bbd2ab" +checksum = "e2694f090a001c55536bbafb45f813229f06e461b3878a5c8280a98e52abb501" dependencies = [ "cocoa 0.25.0", "gtk", - "http 0.2.11", + "http 0.2.12", "jni", "log", "percent-encoding", @@ -6889,9 +6897,9 @@ dependencies = [ [[package]] name = "tauri-utils" -version = "2.0.0-beta.7" +version = "2.0.0-beta.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1973b15065cb63868f5fba789d54ef04232d7e0229fb2230d1f557480a5ceea" +checksum = "ef6a9ec42c3429fac6d46f4af147c765963a6fca18062dd73833032d812231af" dependencies = [ "aes-gcm 0.10.3", "brotli", @@ -6910,6 +6918,7 @@ dependencies = [ "phf 0.11.2", "proc-macro2", "quote", + "regex", "schemars", "semver", "serde", @@ -6918,8 +6927,9 @@ dependencies = [ "serialize-to-javascript", "swift-rs", "thiserror", - "toml 0.8.2", + "toml 0.8.10", "url", + "urlpattern", "walkdir", ] @@ -6945,9 +6955,9 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.10.0" +version = "3.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a365e8cd18e44762ef95d87f284f4b5cd04107fec2ff3052bd6a3e6069669e67" +checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" dependencies = [ "cfg-if", "fastrand", @@ -6998,14 +7008,14 @@ checksum = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81" dependencies = [ "proc-macro2", "quote", - "syn 2.0.49", + "syn 2.0.52", ] [[package]] name = "thread_local" -version = "1.1.7" +version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" +checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" dependencies = [ "cfg-if", "once_cell", @@ -7063,7 +7073,7 @@ checksum = "d4098d49269baa034a8d1eae9bd63e9fa532148d772121dace3bcd6a6c98eb6d" dependencies = [ "as-raw-xcb-connection", "ctor", - "libloading 0.8.1", + "libloading 0.8.3", "tracing", ] @@ -7225,21 +7235,21 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.2" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "185d8ab0dfbb35cf1399a6344d8484209c088f75f8f68230da55d48d95d43e3d" +checksum = "9a9aad4a3066010876e8dcf5a8a06e70a558751117a145c6ce2b82c2e2054290" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.20.2", + "toml_edit 0.22.6", ] [[package]] name = "toml_datetime" -version = "0.6.3" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" +checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" dependencies = [ "serde", ] @@ -7250,24 +7260,46 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.2.3", + "indexmap 2.2.5", "serde", "serde_spanned", "toml_datetime", - "winnow", + "winnow 0.5.40", ] [[package]] name = "toml_edit" -version = "0.20.2" +version = "0.20.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" +checksum = "70f427fce4d84c72b5b732388bf4a9f4531b53f74e2887e3ecb2481f68f66d81" dependencies = [ - "indexmap 2.2.3", + "indexmap 2.2.5", + "toml_datetime", + "winnow 0.5.40", +] + +[[package]] +name = "toml_edit" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" +dependencies = [ + "indexmap 2.2.5", + "toml_datetime", + "winnow 0.5.40", +] + +[[package]] +name = "toml_edit" +version = "0.22.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c1b5fd4128cc8d3e0cb74d4ed9a9cc7c7284becd4df68f5f940e1ad123606f6" +dependencies = [ + "indexmap 2.2.5", "serde", "serde_spanned", "toml_datetime", - "winnow", + "winnow 0.6.5", ] [[package]] @@ -7296,7 +7328,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.49", + "syn 2.0.52", ] [[package]] @@ -7340,9 +7372,9 @@ dependencies = [ [[package]] name = "tray-icon" -version = "0.11.3" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a4d9ddd4a7c0f3b6862af1c4911b529a49db4ee89310d3a258859c2f5053fdd" +checksum = "454035ff34b8430638c894e6197748578d6b4d449c6edaf8ea854d94e2dd862b" dependencies = [ "cocoa 0.25.0", "core-graphics 0.23.1", @@ -7428,7 +7460,7 @@ dependencies = [ "byteorder", "bytes", "data-encoding", - "http 1.0.0", + "http 1.1.0", "httparse", "log", "native-tls", @@ -7522,9 +7554,9 @@ checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" -version = "0.1.22" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" dependencies = [ "tinyvec", ] @@ -7692,9 +7724,9 @@ dependencies = [ [[package]] name = "walkdir" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" dependencies = [ "same-file", "winapi-util", @@ -7721,11 +7753,17 @@ version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +[[package]] +name = "wasite" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8dad83b4f25e74f184f64c43b150b91efe7647395b42289f38e50566d82855b" + [[package]] name = "wasm-bindgen" -version = "0.2.91" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1e124130aee3fb58c5bdd6b639a0509486b0338acaaae0c84a5124b0f588b7f" +checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -7733,24 +7771,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.91" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9e7e1900c352b609c8488ad12639a311045f40a35491fb69ba8c12f758af70b" +checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.49", + "syn 2.0.52", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.41" +version = "0.4.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877b9c3f61ceea0e56331985743b13f3d25c406a7098d45180fb5f09bc19ed97" +checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" dependencies = [ "cfg-if", "js-sys", @@ -7760,9 +7798,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.91" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b30af9e2d358182b5c7449424f017eba305ed32a7010509ede96cdc4696c46ed" +checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -7770,22 +7808,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.91" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "642f325be6301eb8107a83d12a8ac6c1e1c54345a7ef1a9261962dfefda09e66" +checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.49", + "syn 2.0.52", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.91" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f186bd2dcf04330886ce82d6f33dd75a7bfcf69ecf5763b89fcde53b6ac9838" +checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" [[package]] name = "wasm-streams" @@ -7851,9 +7889,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.68" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96565907687f7aceb35bc5fc03770a8a0471d82e479f25832f54a0e3f4b28446" +checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" dependencies = [ "js-sys", "wasm-bindgen", @@ -7954,7 +7992,7 @@ checksum = "ac1345798ecd8122468840bcdf1b95e5dc6d2206c5e4b0eafa078d061f59c9bc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.49", + "syn 2.0.52", ] [[package]] @@ -7976,9 +8014,13 @@ checksum = "53a85b86a771b1c87058196170769dd264f66c0782acf1ae6cc51bfd64b39082" [[package]] name = "whoami" -version = "1.4.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22fc3756b8a9133049b26c7f61ab35416c130e8c09b660f5b3958b446f52cc50" +checksum = "0fec781d48b41f8163426ed18e8fc2864c12937df9ce54c88ede7bd47270893e" +dependencies = [ + "redox_syscall", + "wasite", +] [[package]] name = "widestring" @@ -8122,7 +8164,7 @@ checksum = "12168c33176773b86799be25e2a2ba07c7aab9968b37541f1094dbd7a60c8946" dependencies = [ "proc-macro2", "quote", - "syn 2.0.49", + "syn 2.0.52", ] [[package]] @@ -8133,7 +8175,7 @@ checksum = "9d8dc32e0095a7eeccebd0e3f09e9509365ecb3fc6ac4d6f5f14a3f6392942d1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.49", + "syn 2.0.52", ] [[package]] @@ -8395,6 +8437,15 @@ dependencies = [ "memchr", ] +[[package]] +name = "winnow" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dffa400e67ed5a4dd237983829e66475f0a4a26938c4b04c21baede6262215b8" +dependencies = [ + "memchr", +] + [[package]] name = "winreg" version = "0.10.1" @@ -8416,9 +8467,9 @@ dependencies = [ [[package]] name = "winreg" -version = "0.51.0" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "937f3df7948156640f46aacef17a70db0de5917bda9c92b0f751f3a955b588fc" +checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5" dependencies = [ "cfg-if", "windows-sys 0.48.0", @@ -8440,7 +8491,7 @@ dependencies = [ "gdkx11", "gtk", "html5ever", - "http 0.2.11", + "http 0.2.12", "javascriptcore-rs", "jni", "kuchikiki", @@ -8508,7 +8559,7 @@ dependencies = [ "as-raw-xcb-connection", "gethostname", "libc", - "libloading 0.8.1", + "libloading 0.8.3", "once_cell", "rustix", "x11rb-protocol", @@ -8554,9 +8605,9 @@ dependencies = [ [[package]] name = "zbus" -version = "4.0.1" +version = "4.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b8e3d6ae3342792a6cc2340e4394334c7402f3d793b390d2c5494a4032b3030" +checksum = "c9ff46f2a25abd690ed072054733e0bc3157e3d4c45f41bd183dce09c2ff8ab9" dependencies = [ "async-broadcast", "async-executor", @@ -8570,12 +8621,12 @@ dependencies = [ "blocking", "derivative", "enumflags2", - "event-listener 5.1.0", + "event-listener 5.2.0", "futures-core", "futures-sink", "futures-util", "hex", - "nix 0.27.1", + "nix 0.28.0", "ordered-stream", "rand 0.8.5", "serde", @@ -8594,11 +8645,11 @@ dependencies = [ [[package]] name = "zbus_macros" -version = "4.0.1" +version = "4.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7a3e850ff1e7217a3b7a07eba90d37fe9bb9e89a310f718afcde5885ca9b6d7" +checksum = "4e0e3852c93dcdb49c9462afe67a2a468f7bd464150d866e861eaf06208633e0" dependencies = [ - "proc-macro-crate 1.3.1", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", "regex", @@ -8634,7 +8685,7 @@ checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.49", + "syn 2.0.52", ] [[package]] @@ -8654,7 +8705,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.49", + "syn 2.0.52", ] [[package]] @@ -8717,9 +8768,9 @@ dependencies = [ [[package]] name = "zvariant" -version = "4.0.0" +version = "4.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e09e8be97d44eeab994d752f341e67b3b0d80512a8b315a0671d47232ef1b65" +checksum = "2c1b3ca6db667bfada0f1ebfc94b2b1759ba25472ee5373d4551bb892616389a" dependencies = [ "endi", "enumflags2", @@ -8731,11 +8782,11 @@ dependencies = [ [[package]] name = "zvariant_derive" -version = "4.0.0" +version = "4.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72a5857e2856435331636a9fbb415b09243df4521a267c5bedcd5289b4d5799e" +checksum = "b7a4b236063316163b69039f77ce3117accb41a09567fd24c168e43491e521bc" dependencies = [ - "proc-macro-crate 1.3.1", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", "syn 1.0.109", diff --git a/Cargo.toml b/Cargo.toml index 5f2dae3bc7..b1db0153ee 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,9 +10,9 @@ resolver = "2" [workspace.dependencies] serde = { version = "1", features = ["derive"] } log = "0.4" -tauri = "2.0.0-beta.9" -tauri-build = "2.0.0-beta.7" -tauri-plugin = "2.0.0-beta.7" +tauri = "2.0.0-beta.12" +tauri-build = "2.0.0-beta.10" +tauri-plugin = "2.0.0-beta.10" serde_json = "1" thiserror = "1" url = "2" diff --git a/examples/api/package.json b/examples/api/package.json index 10858549c9..9c238503d7 100644 --- a/examples/api/package.json +++ b/examples/api/package.json @@ -9,7 +9,7 @@ "serve": "vite preview" }, "dependencies": { - "@tauri-apps/api": "2.0.0-beta.4", + "@tauri-apps/api": "2.0.0-beta.6", "@tauri-apps/plugin-barcode-scanner": "2.0.0-beta.2", "@tauri-apps/plugin-biometric": "2.0.0-beta.2", "@tauri-apps/plugin-cli": "2.0.0-beta.2", @@ -30,7 +30,7 @@ "@iconify-json/codicon": "^1.1.37", "@iconify-json/ph": "^1.1.8", "@sveltejs/vite-plugin-svelte": "^3.0.1", - "@tauri-apps/cli": "2.0.0-beta.7", + "@tauri-apps/cli": "2.0.0-beta.9", "@unocss/extractor-svelte": "^0.58.0", "internal-ip": "^8.0.0", "svelte": "^4.2.8", diff --git a/examples/api/src-tauri/capabilities/base.json b/examples/api/src-tauri/capabilities/base.json index f34be5ec16..486615b4a5 100644 --- a/examples/api/src-tauri/capabilities/base.json +++ b/examples/api/src-tauri/capabilities/base.json @@ -21,6 +21,7 @@ "tray:default", "event:default", "window:default", + "image:default", "notification:default", "os:allow-platform", "dialog:allow-open", @@ -54,8 +55,10 @@ }, "shell:allow-kill", "shell:allow-stdin-write", - "clipboard-manager:allow-read", - "clipboard-manager:allow-write", + "clipboard-manager:allow-read-text", + "clipboard-manager:allow-write-text", + "clipboard-manager:allow-read-image", + "clipboard-manager:allow-write-image", "fs:allow-rename", "fs:allow-mkdir", "fs:allow-remove", diff --git a/examples/api/src-tauri/gen/schemas/desktop-schema.json b/examples/api/src-tauri/gen/schemas/desktop-schema.json index a01af2486f..14558fd003 100644 --- a/examples/api/src-tauri/gen/schemas/desktop-schema.json +++ b/examples/api/src-tauri/gen/schemas/desktop-schema.json @@ -41,8 +41,7 @@ "type": "object", "required": [ "identifier", - "permissions", - "windows" + "permissions" ], "properties": { "identifier": { @@ -93,14 +92,10 @@ }, "platforms": { "description": "Target platforms this capability applies. By default all platforms are affected by this capability.", - "default": [ - "linux", - "macOS", - "windows", - "android", - "iOS" + "type": [ + "array", + "null" ], - "type": "array", "items": { "$ref": "#/definitions/Target" } @@ -115,7 +110,7 @@ ], "properties": { "urls": { - "description": "Remote domains this capability refers to. Can use glob patterns.", + "description": "Remote domains this capability refers to using the [URLPattern standard](https://urlpattern.spec.whatwg.org/).\n\n# Examples\n\n- \"https://*.mydomain.dev\": allows subdomains of mydomain.dev - \"https://mydomain.dev/api/*\": allows any subpath of mydomain.dev/api", "type": "array", "items": { "type": "string" @@ -2297,6 +2292,12 @@ "properties": { "identifier": { "oneOf": [ + { + "type": "string", + "enum": [ + "shell:default" + ] + }, { "description": "shell:allow-execute -> Enables the execute command without any pre-configured scope.", "type": "string", @@ -2532,31 +2533,99 @@ ] }, { - "description": "clipboard-manager:allow-read -> Enables the read command without any pre-configured scope.", "type": "string", "enum": [ - "clipboard-manager:allow-read" + "clipboard-manager:default" + ] + }, + { + "description": "clipboard-manager:allow-clear -> Enables the clear command without any pre-configured scope.", + "type": "string", + "enum": [ + "clipboard-manager:allow-clear" + ] + }, + { + "description": "clipboard-manager:allow-read-image -> Enables the read_image command without any pre-configured scope.", + "type": "string", + "enum": [ + "clipboard-manager:allow-read-image" + ] + }, + { + "description": "clipboard-manager:allow-read-text -> Enables the read_text command without any pre-configured scope.", + "type": "string", + "enum": [ + "clipboard-manager:allow-read-text" + ] + }, + { + "description": "clipboard-manager:allow-write-html -> Enables the write_html command without any pre-configured scope.", + "type": "string", + "enum": [ + "clipboard-manager:allow-write-html" + ] + }, + { + "description": "clipboard-manager:allow-write-image -> Enables the write_image command without any pre-configured scope.", + "type": "string", + "enum": [ + "clipboard-manager:allow-write-image" ] }, { - "description": "clipboard-manager:allow-write -> Enables the write command without any pre-configured scope.", + "description": "clipboard-manager:allow-write-text -> Enables the write_text command without any pre-configured scope.", "type": "string", "enum": [ - "clipboard-manager:allow-write" + "clipboard-manager:allow-write-text" ] }, { - "description": "clipboard-manager:deny-read -> Denies the read command without any pre-configured scope.", + "description": "clipboard-manager:deny-clear -> Denies the clear command without any pre-configured scope.", "type": "string", "enum": [ - "clipboard-manager:deny-read" + "clipboard-manager:deny-clear" ] }, { - "description": "clipboard-manager:deny-write -> Denies the write command without any pre-configured scope.", + "description": "clipboard-manager:deny-read-image -> Denies the read_image command without any pre-configured scope.", "type": "string", "enum": [ - "clipboard-manager:deny-write" + "clipboard-manager:deny-read-image" + ] + }, + { + "description": "clipboard-manager:deny-read-text -> Denies the read_text command without any pre-configured scope.", + "type": "string", + "enum": [ + "clipboard-manager:deny-read-text" + ] + }, + { + "description": "clipboard-manager:deny-write-html -> Denies the write_html command without any pre-configured scope.", + "type": "string", + "enum": [ + "clipboard-manager:deny-write-html" + ] + }, + { + "description": "clipboard-manager:deny-write-image -> Denies the write_image command without any pre-configured scope.", + "type": "string", + "enum": [ + "clipboard-manager:deny-write-image" + ] + }, + { + "description": "clipboard-manager:deny-write-text -> Denies the write_text command without any pre-configured scope.", + "type": "string", + "enum": [ + "clipboard-manager:deny-write-text" + ] + }, + { + "type": "string", + "enum": [ + "dialog:default" ] }, { @@ -4680,6 +4749,12 @@ "fs:write-files" ] }, + { + "type": "string", + "enum": [ + "global-shortcut:default" + ] + }, { "description": "global-shortcut:allow-is-registered -> Enables the is_registered command without any pre-configured scope.", "type": "string", @@ -4827,13 +4902,6 @@ "image:allow-from-bytes" ] }, - { - "description": "image:allow-from-ico-bytes -> Enables the from_ico_bytes command without any pre-configured scope.", - "type": "string", - "enum": [ - "image:allow-from-ico-bytes" - ] - }, { "description": "image:allow-from-path -> Enables the from_path command without any pre-configured scope.", "type": "string", @@ -4841,20 +4909,6 @@ "image:allow-from-path" ] }, - { - "description": "image:allow-from-png-bytes -> Enables the from_png_bytes command without any pre-configured scope.", - "type": "string", - "enum": [ - "image:allow-from-png-bytes" - ] - }, - { - "description": "image:allow-height -> Enables the height command without any pre-configured scope.", - "type": "string", - "enum": [ - "image:allow-height" - ] - }, { "description": "image:allow-new -> Enables the new command without any pre-configured scope.", "type": "string", @@ -4870,10 +4924,10 @@ ] }, { - "description": "image:allow-width -> Enables the width command without any pre-configured scope.", + "description": "image:allow-size -> Enables the size command without any pre-configured scope.", "type": "string", "enum": [ - "image:allow-width" + "image:allow-size" ] }, { @@ -4883,13 +4937,6 @@ "image:deny-from-bytes" ] }, - { - "description": "image:deny-from-ico-bytes -> Denies the from_ico_bytes command without any pre-configured scope.", - "type": "string", - "enum": [ - "image:deny-from-ico-bytes" - ] - }, { "description": "image:deny-from-path -> Denies the from_path command without any pre-configured scope.", "type": "string", @@ -4897,20 +4944,6 @@ "image:deny-from-path" ] }, - { - "description": "image:deny-from-png-bytes -> Denies the from_png_bytes command without any pre-configured scope.", - "type": "string", - "enum": [ - "image:deny-from-png-bytes" - ] - }, - { - "description": "image:deny-height -> Denies the height command without any pre-configured scope.", - "type": "string", - "enum": [ - "image:deny-height" - ] - }, { "description": "image:deny-new -> Denies the new command without any pre-configured scope.", "type": "string", @@ -4926,10 +4959,10 @@ ] }, { - "description": "image:deny-width -> Denies the width command without any pre-configured scope.", + "description": "image:deny-size -> Denies the size command without any pre-configured scope.", "type": "string", "enum": [ - "image:deny-width" + "image:deny-size" ] }, { @@ -5317,6 +5350,12 @@ "notification:deny-request-permission" ] }, + { + "type": "string", + "enum": [ + "os:default" + ] + }, { "description": "os:allow-arch -> Enables the arch command without any pre-configured scope.", "type": "string", @@ -5548,6 +5587,12 @@ "path:deny-resolve-directory" ] }, + { + "type": "string", + "enum": [ + "process:default" + ] + }, { "description": "process:allow-exit -> Enables the exit command without any pre-configured scope.", "type": "string", @@ -5597,6 +5642,12 @@ "resources:deny-close" ] }, + { + "type": "string", + "enum": [ + "shell:default" + ] + }, { "description": "shell:allow-execute -> Enables the execute command without any pre-configured scope.", "type": "string", @@ -5660,6 +5711,13 @@ "tray:default" ] }, + { + "description": "tray:allow-get-by-id -> Enables the get_by_id command without any pre-configured scope.", + "type": "string", + "enum": [ + "tray:allow-get-by-id" + ] + }, { "description": "tray:allow-new -> Enables the new command without any pre-configured scope.", "type": "string", @@ -5667,6 +5725,13 @@ "tray:allow-new" ] }, + { + "description": "tray:allow-remove-by-id -> Enables the remove_by_id command without any pre-configured scope.", + "type": "string", + "enum": [ + "tray:allow-remove-by-id" + ] + }, { "description": "tray:allow-set-icon -> Enables the set_icon command without any pre-configured scope.", "type": "string", @@ -5723,6 +5788,13 @@ "tray:allow-set-visible" ] }, + { + "description": "tray:deny-get-by-id -> Denies the get_by_id command without any pre-configured scope.", + "type": "string", + "enum": [ + "tray:deny-get-by-id" + ] + }, { "description": "tray:deny-new -> Denies the new command without any pre-configured scope.", "type": "string", @@ -5730,6 +5802,13 @@ "tray:deny-new" ] }, + { + "description": "tray:deny-remove-by-id -> Denies the remove_by_id command without any pre-configured scope.", + "type": "string", + "enum": [ + "tray:deny-remove-by-id" + ] + }, { "description": "tray:deny-set-icon -> Denies the set_icon command without any pre-configured scope.", "type": "string", diff --git a/examples/api/src-tauri/gen/schemas/mobile-schema.json b/examples/api/src-tauri/gen/schemas/mobile-schema.json index 6262fabb99..29d8bf4ea2 100644 --- a/examples/api/src-tauri/gen/schemas/mobile-schema.json +++ b/examples/api/src-tauri/gen/schemas/mobile-schema.json @@ -11,6 +11,13 @@ } ] }, + { + "description": "A list of capabilities.", + "type": "array", + "items": { + "$ref": "#/definitions/Capability" + } + }, { "description": "A list of capabilities.", "type": "object", @@ -34,8 +41,7 @@ "type": "object", "required": [ "identifier", - "permissions", - "windows" + "permissions" ], "properties": { "identifier": { @@ -86,14 +92,10 @@ }, "platforms": { "description": "Target platforms this capability applies. By default all platforms are affected by this capability.", - "default": [ - "linux", - "macOS", - "windows", - "android", - "iOS" + "type": [ + "array", + "null" ], - "type": "array", "items": { "$ref": "#/definitions/Target" } @@ -108,7 +110,7 @@ ], "properties": { "urls": { - "description": "Remote domains this capability refers to. Can use glob patterns.", + "description": "Remote domains this capability refers to using the [URLPattern standard](https://urlpattern.spec.whatwg.org/).\n\n# Examples\n\n- \"https://*.mydomain.dev\": allows subdomains of mydomain.dev - \"https://mydomain.dev/api/*\": allows any subpath of mydomain.dev/api", "type": "array", "items": { "type": "string" @@ -2290,6 +2292,12 @@ "properties": { "identifier": { "oneOf": [ + { + "type": "string", + "enum": [ + "shell:default" + ] + }, { "description": "shell:allow-execute -> Enables the execute command without any pre-configured scope.", "type": "string", @@ -2503,6 +2511,12 @@ "app:deny-version" ] }, + { + "type": "string", + "enum": [ + "barcode-scanner:default" + ] + }, { "description": "barcode-scanner:allow-cancel -> Enables the cancel command without any pre-configured scope.", "type": "string", @@ -2587,6 +2601,12 @@ "barcode-scanner:deny-vibrate" ] }, + { + "type": "string", + "enum": [ + "biometric:default" + ] + }, { "description": "biometric:allow-authenticate -> Enables the authenticate command without any pre-configured scope.", "type": "string", @@ -2616,31 +2636,99 @@ ] }, { - "description": "clipboard-manager:allow-read -> Enables the read command without any pre-configured scope.", "type": "string", "enum": [ - "clipboard-manager:allow-read" + "clipboard-manager:default" ] }, { - "description": "clipboard-manager:allow-write -> Enables the write command without any pre-configured scope.", + "description": "clipboard-manager:allow-clear -> Enables the clear command without any pre-configured scope.", "type": "string", "enum": [ - "clipboard-manager:allow-write" + "clipboard-manager:allow-clear" ] }, { - "description": "clipboard-manager:deny-read -> Denies the read command without any pre-configured scope.", + "description": "clipboard-manager:allow-read-image -> Enables the read_image command without any pre-configured scope.", "type": "string", "enum": [ - "clipboard-manager:deny-read" + "clipboard-manager:allow-read-image" ] }, { - "description": "clipboard-manager:deny-write -> Denies the write command without any pre-configured scope.", + "description": "clipboard-manager:allow-read-text -> Enables the read_text command without any pre-configured scope.", "type": "string", "enum": [ - "clipboard-manager:deny-write" + "clipboard-manager:allow-read-text" + ] + }, + { + "description": "clipboard-manager:allow-write-html -> Enables the write_html command without any pre-configured scope.", + "type": "string", + "enum": [ + "clipboard-manager:allow-write-html" + ] + }, + { + "description": "clipboard-manager:allow-write-image -> Enables the write_image command without any pre-configured scope.", + "type": "string", + "enum": [ + "clipboard-manager:allow-write-image" + ] + }, + { + "description": "clipboard-manager:allow-write-text -> Enables the write_text command without any pre-configured scope.", + "type": "string", + "enum": [ + "clipboard-manager:allow-write-text" + ] + }, + { + "description": "clipboard-manager:deny-clear -> Denies the clear command without any pre-configured scope.", + "type": "string", + "enum": [ + "clipboard-manager:deny-clear" + ] + }, + { + "description": "clipboard-manager:deny-read-image -> Denies the read_image command without any pre-configured scope.", + "type": "string", + "enum": [ + "clipboard-manager:deny-read-image" + ] + }, + { + "description": "clipboard-manager:deny-read-text -> Denies the read_text command without any pre-configured scope.", + "type": "string", + "enum": [ + "clipboard-manager:deny-read-text" + ] + }, + { + "description": "clipboard-manager:deny-write-html -> Denies the write_html command without any pre-configured scope.", + "type": "string", + "enum": [ + "clipboard-manager:deny-write-html" + ] + }, + { + "description": "clipboard-manager:deny-write-image -> Denies the write_image command without any pre-configured scope.", + "type": "string", + "enum": [ + "clipboard-manager:deny-write-image" + ] + }, + { + "description": "clipboard-manager:deny-write-text -> Denies the write_text command without any pre-configured scope.", + "type": "string", + "enum": [ + "clipboard-manager:deny-write-text" + ] + }, + { + "type": "string", + "enum": [ + "dialog:default" ] }, { @@ -4827,6 +4915,83 @@ "http:deny-fetch-send" ] }, + { + "description": "image:default -> Default permissions for the plugin.", + "type": "string", + "enum": [ + "image:default" + ] + }, + { + "description": "image:allow-from-bytes -> Enables the from_bytes command without any pre-configured scope.", + "type": "string", + "enum": [ + "image:allow-from-bytes" + ] + }, + { + "description": "image:allow-from-path -> Enables the from_path command without any pre-configured scope.", + "type": "string", + "enum": [ + "image:allow-from-path" + ] + }, + { + "description": "image:allow-new -> Enables the new command without any pre-configured scope.", + "type": "string", + "enum": [ + "image:allow-new" + ] + }, + { + "description": "image:allow-rgba -> Enables the rgba command without any pre-configured scope.", + "type": "string", + "enum": [ + "image:allow-rgba" + ] + }, + { + "description": "image:allow-size -> Enables the size command without any pre-configured scope.", + "type": "string", + "enum": [ + "image:allow-size" + ] + }, + { + "description": "image:deny-from-bytes -> Denies the from_bytes command without any pre-configured scope.", + "type": "string", + "enum": [ + "image:deny-from-bytes" + ] + }, + { + "description": "image:deny-from-path -> Denies the from_path command without any pre-configured scope.", + "type": "string", + "enum": [ + "image:deny-from-path" + ] + }, + { + "description": "image:deny-new -> Denies the new command without any pre-configured scope.", + "type": "string", + "enum": [ + "image:deny-new" + ] + }, + { + "description": "image:deny-rgba -> Denies the rgba command without any pre-configured scope.", + "type": "string", + "enum": [ + "image:deny-rgba" + ] + }, + { + "description": "image:deny-size -> Denies the size command without any pre-configured scope.", + "type": "string", + "enum": [ + "image:deny-size" + ] + }, { "description": "log:default -> Allows the log command", "type": "string", @@ -5163,6 +5328,12 @@ "menu:deny-text" ] }, + { + "type": "string", + "enum": [ + "nfc:default" + ] + }, { "description": "nfc:allow-is-available -> Enables the is_available command without any pre-configured scope.", "type": "string", @@ -5254,6 +5425,12 @@ "notification:deny-request-permission" ] }, + { + "type": "string", + "enum": [ + "os:default" + ] + }, { "description": "os:allow-arch -> Enables the arch command without any pre-configured scope.", "type": "string", @@ -5485,6 +5662,12 @@ "path:deny-resolve-directory" ] }, + { + "type": "string", + "enum": [ + "process:default" + ] + }, { "description": "process:allow-exit -> Enables the exit command without any pre-configured scope.", "type": "string", @@ -5534,6 +5717,12 @@ "resources:deny-close" ] }, + { + "type": "string", + "enum": [ + "shell:default" + ] + }, { "description": "shell:allow-execute -> Enables the execute command without any pre-configured scope.", "type": "string", @@ -5597,6 +5786,13 @@ "tray:default" ] }, + { + "description": "tray:allow-get-by-id -> Enables the get_by_id command without any pre-configured scope.", + "type": "string", + "enum": [ + "tray:allow-get-by-id" + ] + }, { "description": "tray:allow-new -> Enables the new command without any pre-configured scope.", "type": "string", @@ -5604,6 +5800,13 @@ "tray:allow-new" ] }, + { + "description": "tray:allow-remove-by-id -> Enables the remove_by_id command without any pre-configured scope.", + "type": "string", + "enum": [ + "tray:allow-remove-by-id" + ] + }, { "description": "tray:allow-set-icon -> Enables the set_icon command without any pre-configured scope.", "type": "string", @@ -5660,6 +5863,13 @@ "tray:allow-set-visible" ] }, + { + "description": "tray:deny-get-by-id -> Denies the get_by_id command without any pre-configured scope.", + "type": "string", + "enum": [ + "tray:deny-get-by-id" + ] + }, { "description": "tray:deny-new -> Denies the new command without any pre-configured scope.", "type": "string", @@ -5667,6 +5877,13 @@ "tray:deny-new" ] }, + { + "description": "tray:deny-remove-by-id -> Denies the remove_by_id command without any pre-configured scope.", + "type": "string", + "enum": [ + "tray:deny-remove-by-id" + ] + }, { "description": "tray:deny-set-icon -> Denies the set_icon command without any pre-configured scope.", "type": "string", diff --git a/examples/api/src-tauri/src/tray.rs b/examples/api/src-tauri/src/tray.rs index 74863c0ae3..bd700fdb34 100644 --- a/examples/api/src-tauri/src/tray.rs +++ b/examples/api/src-tauri/src/tray.rs @@ -80,9 +80,10 @@ pub fn create_tray(app: &tauri::AppHandle) -> tauri::Result<()> { i @ "icon-1" | i @ "icon-2" => { if let Some(tray) = app.tray_by_id("tray-1") { let _ = tray.set_icon(Some(if i == "icon-1" { - tauri::Image::from_ico_bytes(include_bytes!("../icons/icon.ico")).unwrap() + tauri::image::Image::from_bytes(include_bytes!("../icons/icon.ico")) + .unwrap() } else { - tauri::Image::from_png_bytes(include_bytes!( + tauri::image::Image::from_bytes(include_bytes!( "../icons/tray_icon_with_transparency.png" )) .unwrap() diff --git a/examples/api/src/lib/utils.js b/examples/api/src/lib/utils.js new file mode 100644 index 0000000000..442052c2c9 --- /dev/null +++ b/examples/api/src/lib/utils.js @@ -0,0 +1,15 @@ +// Copyright 2019-2023 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + +export function arrayBufferToBase64(buffer, callback) { + const blob = new Blob([buffer], { + type: "application/octet-binary", + }); + const reader = new FileReader(); + reader.onload = function (evt) { + const dataurl = evt.target.result; + callback(dataurl.substr(dataurl.indexOf(",") + 1)); + }; + reader.readAsDataURL(blob); +} diff --git a/examples/api/src/views/Clipboard.svelte b/examples/api/src/views/Clipboard.svelte index f571b2eef0..c86282d909 100644 --- a/examples/api/src/views/Clipboard.svelte +++ b/examples/api/src/views/Clipboard.svelte @@ -1,23 +1,59 @@ @@ -27,6 +63,8 @@ placeholder="Text to write to the clipboard" bind:value={text} /> - + + + diff --git a/examples/api/src/views/FileSystem.svelte b/examples/api/src/views/FileSystem.svelte index dce83663e8..f7222ef87c 100644 --- a/examples/api/src/views/FileSystem.svelte +++ b/examples/api/src/views/FileSystem.svelte @@ -1,6 +1,7 @@