chore: update to tauri beta.3

This commit is contained in:
Lucas Nogueira
2024-02-19 17:05:15 -03:00
parent 8645a02aee
commit 8461cf1d1b
57 changed files with 4989 additions and 1203 deletions
+1 -1
View File
@@ -24,6 +24,6 @@
"LICENSE"
],
"dependencies": {
"@tauri-apps/api": "2.0.0-beta.0"
"@tauri-apps/api": "2.0.0-beta.1"
}
}
+1 -1
View File
@@ -23,6 +23,6 @@
"LICENSE"
],
"dependencies": {
"@tauri-apps/api": "2.0.0-beta.0"
"@tauri-apps/api": "2.0.0-beta.1"
}
}
+1 -1
View File
@@ -24,6 +24,6 @@
"LICENSE"
],
"dependencies": {
"@tauri-apps/api": "2.0.0-beta.0"
"@tauri-apps/api": "2.0.0-beta.1"
}
}
+1 -1
View File
@@ -27,6 +27,6 @@
"tslib": "2.6.0"
},
"dependencies": {
"@tauri-apps/api": "2.0.0-beta.0"
"@tauri-apps/api": "2.0.0-beta.1"
}
}
+1 -1
View File
@@ -23,6 +23,6 @@
"LICENSE"
],
"dependencies": {
"@tauri-apps/api": "2.0.0-beta.0"
"@tauri-apps/api": "2.0.0-beta.1"
}
}
+1 -1
View File
@@ -23,6 +23,6 @@
"LICENSE"
],
"dependencies": {
"@tauri-apps/api": "2.0.0-beta.0"
"@tauri-apps/api": "2.0.0-beta.1"
}
}
+2 -2
View File
@@ -10,11 +10,11 @@
"tauri": "tauri"
},
"dependencies": {
"@tauri-apps/api": "2.0.0-beta.0",
"@tauri-apps/api": "2.0.0-beta.1",
"@tauri-apps/plugin-deep-link": "2.0.0-beta.0"
},
"devDependencies": {
"@tauri-apps/cli": "2.0.0-beta.0",
"@tauri-apps/cli": "2.0.0-beta.2",
"internal-ip": "^8.0.0",
"typescript": "^5.2.2",
"vite": "^5.0.12"
@@ -2,6 +2,6 @@
# will have compiled files and executables
/target/
/capabilities/schemas
/gen/schemas
.cargo
+1 -1
View File
@@ -24,6 +24,6 @@
"LICENSE"
],
"dependencies": {
"@tauri-apps/api": "2.0.0-beta.0"
"@tauri-apps/api": "2.0.0-beta.1"
}
}
+2 -2
View File
@@ -28,5 +28,5 @@ tauri-plugin-fs = { path = "../fs", version = "2.0.0-beta.0" }
glib = "0.16"
[target."cfg(any(target_os = \"macos\", windows, target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\"))".dependencies]
rfd = { version = "=0.12.0", features = [ "gtk3", "common-controls-v6" ] }
raw-window-handle = "0.5"
rfd = { git = "https://github.com/PolyMeilex/rfd", rev = "a88718eba75a70ee24753b3fa02e08f56b21670b", features = [ "gtk3", "common-controls-v6" ] }
raw-window-handle = "0.6"
+1 -1
View File
@@ -23,6 +23,6 @@
"LICENSE"
],
"dependencies": {
"@tauri-apps/api": "2.0.0-beta.0"
"@tauri-apps/api": "2.0.0-beta.1"
}
}
+6 -4
View File
@@ -10,7 +10,7 @@
use std::path::PathBuf;
use raw_window_handle::{HasRawWindowHandle, RawWindowHandle};
use raw_window_handle::{HasWindowHandle, RawWindowHandle};
use serde::de::DeserializeOwned;
use tauri::{plugin::PluginApi, AppHandle, Runtime};
@@ -97,9 +97,11 @@ impl From<MessageDialogKind> for rfd::MessageLevel {
struct WindowHandle(RawWindowHandle);
unsafe impl HasRawWindowHandle for WindowHandle {
fn raw_window_handle(&self) -> RawWindowHandle {
self.0
impl HasWindowHandle for WindowHandle {
fn window_handle(
&self,
) -> Result<raw_window_handle::WindowHandle<'_>, raw_window_handle::HandleError> {
Ok(unsafe { raw_window_handle::WindowHandle::borrow_raw(self.0) })
}
}
+8 -4
View File
@@ -178,8 +178,10 @@ impl<R: Runtime> MessageDialogBuilder<R> {
///
/// - **Linux:** Unsupported.
#[cfg(desktop)]
pub fn parent<W: raw_window_handle::HasRawWindowHandle>(mut self, parent: &W) -> Self {
self.parent.replace(parent.raw_window_handle());
pub fn parent<W: raw_window_handle::HasWindowHandle>(mut self, parent: &W) -> Self {
if let Ok(h) = parent.window_handle() {
self.parent.replace(h.as_raw());
}
self
}
@@ -329,8 +331,10 @@ impl<R: Runtime> FileDialogBuilder<R> {
/// Sets the parent window of the dialog.
#[cfg(desktop)]
#[must_use]
pub fn set_parent<W: raw_window_handle::HasRawWindowHandle>(mut self, parent: &W) -> Self {
self.parent.replace(parent.raw_window_handle());
pub fn set_parent<W: raw_window_handle::HasWindowHandle>(mut self, parent: &W) -> Self {
if let Ok(h) = parent.window_handle() {
self.parent.replace(h.as_raw());
}
self
}
+1 -1
View File
@@ -24,6 +24,6 @@
"LICENSE"
],
"dependencies": {
"@tauri-apps/api": "2.0.0-beta.0"
"@tauri-apps/api": "2.0.0-beta.1"
}
}
+36 -36
View File
@@ -73,8 +73,8 @@ pub struct BaseOptions {
#[tauri::command]
pub fn create<R: Runtime>(
app: AppHandle<R>,
global_scope: GlobalScope<'_, Entry>,
command_scope: CommandScope<'_, Entry>,
global_scope: GlobalScope<Entry>,
command_scope: CommandScope<Entry>,
path: SafePathBuf,
options: Option<BaseOptions>,
) -> CommandResult<ResourceId> {
@@ -123,8 +123,8 @@ fn default_true() -> bool {
#[tauri::command]
pub fn open<R: Runtime>(
app: AppHandle<R>,
global_scope: GlobalScope<'_, Entry>,
command_scope: CommandScope<'_, Entry>,
global_scope: GlobalScope<Entry>,
command_scope: CommandScope<Entry>,
path: SafePathBuf,
options: Option<OpenOptions>,
) -> CommandResult<ResourceId> {
@@ -184,8 +184,8 @@ pub struct CopyFileOptions {
#[tauri::command]
pub fn copy_file<R: Runtime>(
app: AppHandle<R>,
global_scope: GlobalScope<'_, Entry>,
command_scope: CommandScope<'_, Entry>,
global_scope: GlobalScope<Entry>,
command_scope: CommandScope<Entry>,
from_path: SafePathBuf,
to_path: SafePathBuf,
options: Option<CopyFileOptions>,
@@ -226,8 +226,8 @@ pub struct MkdirOptions {
#[tauri::command]
pub fn mkdir<R: Runtime>(
app: AppHandle<R>,
global_scope: GlobalScope<'_, Entry>,
command_scope: CommandScope<'_, Entry>,
global_scope: GlobalScope<Entry>,
command_scope: CommandScope<Entry>,
path: SafePathBuf,
options: Option<MkdirOptions>,
) -> CommandResult<()> {
@@ -293,8 +293,8 @@ fn read_dir_inner<P: AsRef<Path>>(path: P) -> crate::Result<Vec<DirEntry>> {
#[tauri::command]
pub fn read_dir<R: Runtime>(
app: AppHandle<R>,
global_scope: GlobalScope<'_, Entry>,
command_scope: CommandScope<'_, Entry>,
global_scope: GlobalScope<Entry>,
command_scope: CommandScope<Entry>,
path: SafePathBuf,
options: Option<BaseOptions>,
) -> CommandResult<Vec<DirEntry>> {
@@ -332,8 +332,8 @@ pub fn read<R: Runtime>(
#[tauri::command]
pub fn read_file<R: Runtime>(
app: AppHandle<R>,
global_scope: GlobalScope<'_, Entry>,
command_scope: CommandScope<'_, Entry>,
global_scope: GlobalScope<Entry>,
command_scope: CommandScope<Entry>,
path: SafePathBuf,
options: Option<BaseOptions>,
) -> CommandResult<Vec<u8>> {
@@ -357,8 +357,8 @@ pub fn read_file<R: Runtime>(
#[tauri::command]
pub fn read_text_file<R: Runtime>(
app: AppHandle<R>,
global_scope: GlobalScope<'_, Entry>,
command_scope: CommandScope<'_, Entry>,
global_scope: GlobalScope<Entry>,
command_scope: CommandScope<Entry>,
path: SafePathBuf,
options: Option<BaseOptions>,
) -> CommandResult<String> {
@@ -382,8 +382,8 @@ pub fn read_text_file<R: Runtime>(
#[tauri::command]
pub fn read_text_file_lines<R: Runtime>(
app: AppHandle<R>,
global_scope: GlobalScope<'_, Entry>,
command_scope: CommandScope<'_, Entry>,
global_scope: GlobalScope<Entry>,
command_scope: CommandScope<Entry>,
path: SafePathBuf,
options: Option<BaseOptions>,
) -> CommandResult<ResourceId> {
@@ -438,8 +438,8 @@ pub struct RemoveOptions {
#[tauri::command]
pub fn remove<R: Runtime>(
app: AppHandle<R>,
global_scope: GlobalScope<'_, Entry>,
command_scope: CommandScope<'_, Entry>,
global_scope: GlobalScope<Entry>,
command_scope: CommandScope<Entry>,
path: SafePathBuf,
options: Option<RemoveOptions>,
) -> CommandResult<()> {
@@ -506,8 +506,8 @@ pub struct RenameOptions {
#[tauri::command]
pub fn rename<R: Runtime>(
app: AppHandle<R>,
global_scope: GlobalScope<'_, Entry>,
command_scope: CommandScope<'_, Entry>,
global_scope: GlobalScope<Entry>,
command_scope: CommandScope<Entry>,
old_path: SafePathBuf,
new_path: SafePathBuf,
options: Option<RenameOptions>,
@@ -568,8 +568,8 @@ pub fn seek<R: Runtime>(
#[tauri::command]
pub fn stat<R: Runtime>(
app: AppHandle<R>,
global_scope: GlobalScope<'_, Entry>,
command_scope: CommandScope<'_, Entry>,
global_scope: GlobalScope<Entry>,
command_scope: CommandScope<Entry>,
path: SafePathBuf,
options: Option<BaseOptions>,
) -> CommandResult<FileInfo> {
@@ -592,8 +592,8 @@ pub fn stat<R: Runtime>(
#[tauri::command]
pub fn lstat<R: Runtime>(
app: AppHandle<R>,
global_scope: GlobalScope<'_, Entry>,
command_scope: CommandScope<'_, Entry>,
global_scope: GlobalScope<Entry>,
command_scope: CommandScope<Entry>,
path: SafePathBuf,
options: Option<BaseOptions>,
) -> CommandResult<FileInfo> {
@@ -624,8 +624,8 @@ pub fn fstat<R: Runtime>(app: AppHandle<R>, rid: ResourceId) -> CommandResult<Fi
#[tauri::command]
pub fn truncate<R: Runtime>(
app: AppHandle<R>,
global_scope: GlobalScope<'_, Entry>,
command_scope: CommandScope<'_, Entry>,
global_scope: GlobalScope<Entry>,
command_scope: CommandScope<Entry>,
path: SafePathBuf,
len: Option<u64>,
options: Option<BaseOptions>,
@@ -701,8 +701,8 @@ fn default_create_value() -> bool {
fn write_file_inner<R: Runtime>(
app: AppHandle<R>,
global_scope: &GlobalScope<'_, Entry>,
command_scope: &CommandScope<'_, Entry>,
global_scope: &GlobalScope<Entry>,
command_scope: &CommandScope<Entry>,
path: SafePathBuf,
data: &[u8],
options: Option<WriteFileOptions>,
@@ -754,8 +754,8 @@ fn write_file_inner<R: Runtime>(
#[tauri::command]
pub fn write_file<R: Runtime>(
app: AppHandle<R>,
global_scope: GlobalScope<'_, Entry>,
command_scope: CommandScope<'_, Entry>,
global_scope: GlobalScope<Entry>,
command_scope: CommandScope<Entry>,
path: SafePathBuf,
data: Vec<u8>,
options: Option<WriteFileOptions>,
@@ -766,8 +766,8 @@ pub fn write_file<R: Runtime>(
#[tauri::command]
pub fn write_text_file<R: Runtime>(
app: AppHandle<R>,
global_scope: GlobalScope<'_, Entry>,
command_scope: CommandScope<'_, Entry>,
global_scope: GlobalScope<Entry>,
command_scope: CommandScope<Entry>,
path: SafePathBuf,
data: String,
options: Option<WriteFileOptions>,
@@ -785,8 +785,8 @@ pub fn write_text_file<R: Runtime>(
#[tauri::command]
pub fn exists<R: Runtime>(
app: AppHandle<R>,
global_scope: GlobalScope<'_, Entry>,
command_scope: CommandScope<'_, Entry>,
global_scope: GlobalScope<Entry>,
command_scope: CommandScope<Entry>,
path: SafePathBuf,
options: Option<BaseOptions>,
) -> CommandResult<bool> {
@@ -802,8 +802,8 @@ pub fn exists<R: Runtime>(
pub fn resolve_path<R: Runtime>(
app: &AppHandle<R>,
global_scope: &GlobalScope<'_, Entry>,
command_scope: &CommandScope<'_, Entry>,
global_scope: &GlobalScope<Entry>,
command_scope: &CommandScope<Entry>,
path: SafePathBuf,
base_dir: Option<BaseDirectory>,
) -> CommandResult<PathBuf> {
+2 -2
View File
@@ -86,8 +86,8 @@ pub async fn watch<R: Runtime>(
paths: Vec<SafePathBuf>,
options: WatchOptions,
on_event: Channel,
global_scope: GlobalScope<'_, Entry>,
command_scope: CommandScope<'_, Entry>,
global_scope: GlobalScope<Entry>,
command_scope: CommandScope<Entry>,
) -> CommandResult<ResourceId> {
let mut resolved_paths = Vec::with_capacity(paths.capacity());
for path in paths {
+1 -1
View File
@@ -23,6 +23,6 @@
"LICENSE"
],
"dependencies": {
"@tauri-apps/api": "2.0.0-beta.0"
"@tauri-apps/api": "2.0.0-beta.1"
}
}
+1 -1
View File
@@ -23,6 +23,6 @@
"LICENSE"
],
"dependencies": {
"@tauri-apps/api": "2.0.0-beta.0"
"@tauri-apps/api": "2.0.0-beta.1"
}
}
+2 -2
View File
@@ -139,8 +139,8 @@ fn attach_proxy(
pub async fn fetch<R: Runtime>(
app: AppHandle<R>,
client_config: ClientConfig,
command_scope: CommandScope<'_, Entry>,
global_scope: GlobalScope<'_, Entry>,
command_scope: CommandScope<Entry>,
global_scope: GlobalScope<Entry>,
) -> crate::Result<ResourceId> {
let ClientConfig {
method,
+1 -1
View File
@@ -24,6 +24,6 @@
"LICENSE"
],
"dependencies": {
"@tauri-apps/api": "2.0.0-beta.0"
"@tauri-apps/api": "2.0.0-beta.1"
}
}
+1 -1
View File
@@ -27,6 +27,6 @@
"tslib": "2.6.0"
},
"dependencies": {
"@tauri-apps/api": "2.0.0-beta.0"
"@tauri-apps/api": "2.0.0-beta.1"
}
}
+1 -1
View File
@@ -23,6 +23,6 @@
"LICENSE"
],
"dependencies": {
"@tauri-apps/api": "2.0.0-beta.0"
"@tauri-apps/api": "2.0.0-beta.1"
}
}
+1 -1
View File
@@ -23,6 +23,6 @@
"LICENSE"
],
"dependencies": {
"@tauri-apps/api": "2.0.0-beta.0"
"@tauri-apps/api": "2.0.0-beta.1"
}
}
+1 -1
View File
@@ -24,6 +24,6 @@
"LICENSE"
],
"dependencies": {
"@tauri-apps/api": "2.0.0-beta.0"
"@tauri-apps/api": "2.0.0-beta.1"
}
}
+1 -1
View File
@@ -23,6 +23,6 @@
"LICENSE"
],
"dependencies": {
"@tauri-apps/api": "2.0.0-beta.0"
"@tauri-apps/api": "2.0.0-beta.1"
}
}
+1 -1
View File
@@ -23,6 +23,6 @@
"LICENSE"
],
"dependencies": {
"@tauri-apps/api": "2.0.0-beta.0"
"@tauri-apps/api": "2.0.0-beta.1"
}
}
+2 -2
View File
@@ -103,8 +103,8 @@ pub fn execute<R: Runtime>(
args: ExecuteArgs,
on_event: Channel,
options: CommandOptions,
command_scope: CommandScope<'_, crate::scope::ScopeAllowedCommand>,
global_scope: GlobalScope<'_, crate::scope::ScopeAllowedCommand>,
command_scope: CommandScope<crate::scope::ScopeAllowedCommand>,
global_scope: GlobalScope<crate::scope::ScopeAllowedCommand>,
) -> crate::Result<ChildId> {
let scope = crate::scope::ShellScope {
scopes: command_scope
@@ -9,6 +9,6 @@
"author": "",
"license": "MIT",
"devDependencies": {
"@tauri-apps/cli": "2.0.0-beta.0"
"@tauri-apps/cli": "2.0.0-beta.2"
}
}
@@ -3,4 +3,4 @@
/target/
WixTools
/capabilities/schemas
/gen/schemas
+1 -1
View File
@@ -24,6 +24,6 @@
"LICENSE"
],
"dependencies": {
"@tauri-apps/api": "2.0.0-beta.0"
"@tauri-apps/api": "2.0.0-beta.1"
}
}
+1 -1
View File
@@ -24,6 +24,6 @@
"LICENSE"
],
"dependencies": {
"@tauri-apps/api": "2.0.0-beta.0"
"@tauri-apps/api": "2.0.0-beta.1"
}
}
+1 -1
View File
@@ -24,6 +24,6 @@
"LICENSE"
],
"dependencies": {
"@tauri-apps/api": "2.0.0-beta.0"
"@tauri-apps/api": "2.0.0-beta.1"
}
}
+1 -1
View File
@@ -23,6 +23,6 @@
"LICENSE"
],
"dependencies": {
"@tauri-apps/api": "2.0.0-beta.0"
"@tauri-apps/api": "2.0.0-beta.1"
}
}
+1 -1
View File
@@ -1 +1 @@
/capabilities/schemas
/gen/schemas
+1 -1
View File
@@ -24,6 +24,6 @@
"LICENSE"
],
"dependencies": {
"@tauri-apps/api": "2.0.0-beta.0"
"@tauri-apps/api": "2.0.0-beta.1"
}
}
@@ -9,7 +9,7 @@
"preview": "vite preview"
},
"devDependencies": {
"@tauri-apps/cli": "1.5.9",
"@tauri-apps/cli": "2.0.0-beta.2",
"typescript": "^5.3.3",
"vite": "^5.0.12"
},
@@ -3,7 +3,7 @@
/target/
WixTools
/capabilities/schemas
/gen/schemas
# These are backup files generated by rustfmt
**/*.rs.bk
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -23,6 +23,6 @@
"LICENSE"
],
"dependencies": {
"@tauri-apps/api": "2.0.0-beta.0"
"@tauri-apps/api": "2.0.0-beta.1"
}
}
+1 -1
View File
@@ -24,6 +24,6 @@
"LICENSE"
],
"dependencies": {
"@tauri-apps/api": "2.0.0-beta.0"
"@tauri-apps/api": "2.0.0-beta.1"
}
}