chore(deps): update to upcoming tauri alpha.7

pull/303/head
Lucas Nogueira 2 years ago
parent 39b144df42
commit c9dbd9c66c
No known key found for this signature in database
GPG Key ID: 7C32FCA95C8C95D7

39
Cargo.lock generated

@ -4128,9 +4128,9 @@ checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601"
[[package]]
name = "swift-rs"
version = "1.0.3"
version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2eab55f44d02ced20ffa22fd5b4bd083ab59c940c7637d37fec4426b1a01d769"
checksum = "8fa67d647176dfa7bdc5775430a1cb339e0ea48fe24707424023a4b17eb9688e"
dependencies = [
"base64 0.21.0",
"serde",
@ -4246,9 +4246,8 @@ dependencies = [
[[package]]
name = "tauri"
version = "2.0.0-alpha.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e113835bb47f8cab6d1fb3b1a2e3d96ddd64730248638a5ab3f46a598c02a81c"
version = "2.0.0-alpha.6"
source = "git+http://github.com/tauri-apps/tauri?branch=next#f0570d9feee05792cc720d26ef32da5eaed7f797"
dependencies = [
"anyhow",
"bytes 1.4.0",
@ -4298,9 +4297,8 @@ dependencies = [
[[package]]
name = "tauri-build"
version = "2.0.0-alpha.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "383f94e1b46fb4e249e4eafbd0589ffbe02b241b49dadebd47640598a17e584e"
version = "2.0.0-alpha.3"
source = "git+http://github.com/tauri-apps/tauri?branch=next#f0570d9feee05792cc720d26ef32da5eaed7f797"
dependencies = [
"anyhow",
"cargo_toml",
@ -4318,9 +4316,8 @@ dependencies = [
[[package]]
name = "tauri-codegen"
version = "2.0.0-alpha.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5914e68c4ba4d9b761373dcce86f6721de78c2ffd84f376b1e0fee9321c0fc7e"
version = "2.0.0-alpha.3"
source = "git+http://github.com/tauri-apps/tauri?branch=next#f0570d9feee05792cc720d26ef32da5eaed7f797"
dependencies = [
"base64 0.21.0",
"brotli",
@ -4344,9 +4341,8 @@ dependencies = [
[[package]]
name = "tauri-macros"
version = "2.0.0-alpha.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "adedb0845af0d5840b54410f83135bb285ab372956678e0b12046a87999486fb"
version = "2.0.0-alpha.3"
source = "git+http://github.com/tauri-apps/tauri?branch=next#f0570d9feee05792cc720d26ef32da5eaed7f797"
dependencies = [
"heck",
"proc-macro2",
@ -4566,9 +4562,8 @@ dependencies = [
[[package]]
name = "tauri-runtime"
version = "0.13.0-alpha.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "11c9ce3ab30f6a95a09131510a624d5de24455ba9e8fcae6a6fe9e0922f833c8"
version = "0.13.0-alpha.3"
source = "git+http://github.com/tauri-apps/tauri?branch=next#f0570d9feee05792cc720d26ef32da5eaed7f797"
dependencies = [
"gtk",
"http",
@ -4588,9 +4583,8 @@ dependencies = [
[[package]]
name = "tauri-runtime-wry"
version = "0.13.0-alpha.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0e176af0987e4ced285bec0faf56eed0f13a1b3851d9176fa6758181f867cdc3"
version = "0.13.0-alpha.3"
source = "git+http://github.com/tauri-apps/tauri?branch=next#f0570d9feee05792cc720d26ef32da5eaed7f797"
dependencies = [
"cocoa",
"gtk",
@ -4609,9 +4603,8 @@ dependencies = [
[[package]]
name = "tauri-utils"
version = "2.0.0-alpha.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3a488bb0c60e2ce9efbe8283a11299675e01f55caf12304889f8639b3c35713c"
version = "2.0.0-alpha.3"
source = "git+http://github.com/tauri-apps/tauri?branch=next#f0570d9feee05792cc720d26ef32da5eaed7f797"
dependencies = [
"brotli",
"ctor",

@ -5,8 +5,8 @@ resolver = "2"
[workspace.dependencies]
serde = { version = "1", features = ["derive"] }
log = "0.4"
tauri = "2.0.0-alpha.4"
tauri-build = "2.0.0-alpha.2"
tauri = "2.0.0-alpha.6"
tauri-build = "2.0.0-alpha.3"
serde_json = "1"
thiserror = "1"
@ -15,3 +15,7 @@ edition = "2021"
authors = [ "Tauri Programme within The Commons Conservancy" ]
license = "Apache-2.0 OR MIT"
rust-version = "1.64"
[patch.crates-io]
tauri = { git = "http://github.com/tauri-apps/tauri", branch = "next" }
tauri-build = { git = "http://github.com/tauri-apps/tauri", branch = "next" }

@ -16,6 +16,7 @@ use std::{
path::{Path, PathBuf},
};
use tauri::{
path::PathExt,
plugin::{self, TauriPlugin},
Manager, Runtime,
};
@ -300,7 +301,7 @@ impl Builder {
LogTarget::LogDir => continue,
#[cfg(desktop)]
LogTarget::LogDir => {
let path = app_handle.path_resolver().app_log_dir().unwrap();
let path = app_handle.path().app_log_dir().unwrap();
if !path.exists() {
fs::create_dir_all(&path).unwrap();
}

@ -4,6 +4,7 @@
use serde::{Deserialize, Serialize};
use tauri::{
path::PathExt,
plugin::{Builder, TauriPlugin},
FsScopeEvent, Manager, Runtime,
};
@ -40,9 +41,9 @@ pub fn init<R: Runtime>() -> TauriPlugin<R> {
#[cfg(feature = "protocol-asset")]
let asset_protocol_scope = app.asset_protocol_scope();
let app = app.clone();
let app_dir = app.path_resolver().app_data_dir();
let app_dir = app.path().app_data_dir();
if let Some(app_dir) = app_dir {
if let Ok(app_dir) = app_dir {
let scope_state_path = app_dir.join(SCOPE_STATE_FILENAME);
let _ = fs_scope.forbid_file(&scope_state_path);

@ -14,6 +14,7 @@ use sqlx::{
};
use tauri::{
command,
path::PathExt,
plugin::{Builder as PluginBuilder, TauriPlugin},
AppHandle, Manager, RunEvent, Runtime, State,
};
@ -63,10 +64,7 @@ type Result<T> = std::result::Result<T, Error>;
/// Resolves the App's **file path** from the `AppHandle` context
/// object
fn app_path<R: Runtime>(app: &AppHandle<R>) -> PathBuf {
#[allow(deprecated)] // FIXME: Change to non-deprecated function in Tauri v2
app.path_resolver()
.app_dir()
.expect("No App path was found!")
app.path().app_config_dir().expect("No App path was found!")
}
#[cfg(feature = "sqlite")]

@ -10,7 +10,7 @@ use std::{
io::Write,
path::PathBuf,
};
use tauri::{AppHandle, Runtime};
use tauri::{path::PathExt, AppHandle, Runtime};
type SerializeFn = fn(&HashMap<String, JsonValue>) -> Result<Vec<u8>, Box<dyn std::error::Error>>;
type DeserializeFn = fn(&[u8]) -> Result<HashMap<String, JsonValue>, Box<dyn std::error::Error>>;
@ -171,7 +171,7 @@ impl Store {
/// Update the store from the on-disk state
pub fn load<R: Runtime>(&mut self, app: &AppHandle<R>) -> Result<(), Error> {
let app_dir = app
.path_resolver()
.path()
.app_data_dir()
.expect("failed to resolve app dir");
let store_path = app_dir.join(&self.path);
@ -186,7 +186,7 @@ impl Store {
/// Saves the store to disk
pub fn save<R: Runtime>(&self, app: &AppHandle<R>) -> Result<(), Error> {
let app_dir = app
.path_resolver()
.path()
.app_data_dir()
.expect("failed to resolve app dir");
let store_path = app_dir.join(&self.path);

@ -5,6 +5,7 @@
use bitflags::bitflags;
use serde::{Deserialize, Serialize};
use tauri::{
path::PathExt,
plugin::{Builder as PluginBuilder, TauriPlugin},
LogicalSize, Manager, Monitor, PhysicalPosition, PhysicalSize, RunEvent, Runtime, Window,
WindowEvent,
@ -69,7 +70,7 @@ pub trait AppHandleExt {
impl<R: Runtime> AppHandleExt for tauri::AppHandle<R> {
fn save_window_state(&self, flags: StateFlags) -> Result<()> {
if let Some(app_dir) = self.path_resolver().app_config_dir() {
if let Ok(app_dir) = self.path().app_config_dir() {
let state_path = app_dir.join(STATE_FILENAME);
let cache = self.state::<WindowStateCache>();
let mut state = cache.0.lock().unwrap();
@ -270,8 +271,8 @@ impl Builder {
let flags = self.state_flags;
PluginBuilder::new("window-state")
.setup(|app, _api| {
let cache: Arc<Mutex<HashMap<String, WindowState>>> = if let Some(app_dir) =
app.path_resolver().app_config_dir()
let cache: Arc<Mutex<HashMap<String, WindowState>>> = if let Ok(app_dir) =
app.path().app_config_dir()
{
let state_path = app_dir.join(STATE_FILENAME);
if state_path.exists() {

Loading…
Cancel
Save