Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Update dependencies and fix link_swift_library err #198

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
360 changes: 148 additions & 212 deletions src-tauri/Cargo.lock

Large diffs are not rendered by default.

8 changes: 3 additions & 5 deletions src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@ nostr-sdk = { version = "0.31", features = ["sqlite"] }
tokio = { version = "1", features = ["full"] }
serde_json = "1.0"
serde = { version = "1.0", features = ["derive"] }
tauri = { version = "2.0.0-beta", features = [
tauri = { version = "2.0.0-beta.22", features = [
"unstable",
"tray-icon",
"macos-private-api",
"native-tls-vendored",
"protocol-asset",
] }
tauri-plugin-clipboard-manager = "2.1.0-beta"
tauri-plugin-dialog = "2.0.0-beta"
tauri-plugin-dialog = "2.0.0-beta.8"
tauri-plugin-fs = "2.0.0-beta"
tauri-plugin-http = "2.0.0-beta"
tauri-plugin-notification = "2.0.0-beta"
tauri-plugin-notification = "2.0.0-beta.6"
tauri-plugin-os = "2.0.0-beta"
tauri-plugin-process = "2.0.0-beta"
tauri-plugin-shell = "2.0.0-beta"
Expand All @@ -38,8 +38,6 @@ tauri-plugin-decorum = "0.1.0"
webpage = { version = "2.0", features = ["serde"] }
keyring = "2"
keyring-search = "0.2.0"
specta = "=2.0.0-rc.12"
tauri-specta = { version = "=2.0.0-rc.10", features = ["typescript"] }
tauri-plugin-theme = "0.4.1"

[target.'cfg(target_os = "macos")'.dependencies]
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/gen/schemas/acl-manifests.json

Large diffs are not rendered by default.

42 changes: 42 additions & 0 deletions src-tauri/gen/schemas/desktop-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -5863,27 +5863,55 @@
"updater:allow-check"
]
},
{
"description": "updater:allow-download -> Enables the download command without any pre-configured scope.",
"type": "string",
"enum": [
"updater:allow-download"
]
},
{
"description": "updater:allow-download-and-install -> Enables the download_and_install command without any pre-configured scope.",
"type": "string",
"enum": [
"updater:allow-download-and-install"
]
},
{
"description": "updater:allow-install -> Enables the install command without any pre-configured scope.",
"type": "string",
"enum": [
"updater:allow-install"
]
},
{
"description": "updater:deny-check -> Denies the check command without any pre-configured scope.",
"type": "string",
"enum": [
"updater:deny-check"
]
},
{
"description": "updater:deny-download -> Denies the download command without any pre-configured scope.",
"type": "string",
"enum": [
"updater:deny-download"
]
},
{
"description": "updater:deny-download-and-install -> Denies the download_and_install command without any pre-configured scope.",
"type": "string",
"enum": [
"updater:deny-download-and-install"
]
},
{
"description": "updater:deny-install -> Denies the install command without any pre-configured scope.",
"type": "string",
"enum": [
"updater:deny-install"
]
},
{
"type": "string",
"enum": [
Expand Down Expand Up @@ -6261,6 +6289,13 @@
"window:allow-minimize"
]
},
{
"description": "window:allow-monitor-from-point -> Enables the monitor_from_point command without any pre-configured scope.",
"type": "string",
"enum": [
"window:allow-monitor-from-point"
]
},
{
"description": "window:allow-outer-position -> Enables the outer_position command without any pre-configured scope.",
"type": "string",
Expand Down Expand Up @@ -6695,6 +6730,13 @@
"window:deny-minimize"
]
},
{
"description": "window:deny-monitor-from-point -> Denies the monitor_from_point command without any pre-configured scope.",
"type": "string",
"enum": [
"window:deny-monitor-from-point"
]
},
{
"description": "window:deny-outer-position -> Denies the outer_position command without any pre-configured scope.",
"type": "string",
Expand Down
42 changes: 42 additions & 0 deletions src-tauri/gen/schemas/macOS-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -5863,27 +5863,55 @@
"updater:allow-check"
]
},
{
"description": "updater:allow-download -> Enables the download command without any pre-configured scope.",
"type": "string",
"enum": [
"updater:allow-download"
]
},
{
"description": "updater:allow-download-and-install -> Enables the download_and_install command without any pre-configured scope.",
"type": "string",
"enum": [
"updater:allow-download-and-install"
]
},
{
"description": "updater:allow-install -> Enables the install command without any pre-configured scope.",
"type": "string",
"enum": [
"updater:allow-install"
]
},
{
"description": "updater:deny-check -> Denies the check command without any pre-configured scope.",
"type": "string",
"enum": [
"updater:deny-check"
]
},
{
"description": "updater:deny-download -> Denies the download command without any pre-configured scope.",
"type": "string",
"enum": [
"updater:deny-download"
]
},
{
"description": "updater:deny-download-and-install -> Denies the download_and_install command without any pre-configured scope.",
"type": "string",
"enum": [
"updater:deny-download-and-install"
]
},
{
"description": "updater:deny-install -> Denies the install command without any pre-configured scope.",
"type": "string",
"enum": [
"updater:deny-install"
]
},
{
"type": "string",
"enum": [
Expand Down Expand Up @@ -6261,6 +6289,13 @@
"window:allow-minimize"
]
},
{
"description": "window:allow-monitor-from-point -> Enables the monitor_from_point command without any pre-configured scope.",
"type": "string",
"enum": [
"window:allow-monitor-from-point"
]
},
{
"description": "window:allow-outer-position -> Enables the outer_position command without any pre-configured scope.",
"type": "string",
Expand Down Expand Up @@ -6695,6 +6730,13 @@
"window:deny-minimize"
]
},
{
"description": "window:deny-monitor-from-point -> Denies the monitor_from_point command without any pre-configured scope.",
"type": "string",
"enum": [
"window:deny-monitor-from-point"
]
},
{
"description": "window:deny-outer-position -> Denies the outer_position command without any pre-configured scope.",
"type": "string",
Expand Down
1 change: 0 additions & 1 deletion src-tauri/src/commands/folder.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use std::process::Command;

#[tauri::command]
#[specta::specta]
pub async fn show_in_folder(path: String) {
#[cfg(target_os = "windows")]
{
Expand Down
6 changes: 0 additions & 6 deletions src-tauri/src/commands/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ use tauri::{LogicalPosition, LogicalSize, Manager, WebviewUrl};
use tauri_plugin_decorum::WebviewWindowExt;

#[tauri::command]
#[specta::specta]
pub fn create_column(
label: &str,
x: f32,
Expand Down Expand Up @@ -46,7 +45,6 @@ pub fn create_column(
}

#[tauri::command]
#[specta::specta]
pub fn close_column(label: &str, app_handle: tauri::AppHandle) -> Result<bool, ()> {
match app_handle.get_webview(label) {
Some(webview) => {
Expand All @@ -61,7 +59,6 @@ pub fn close_column(label: &str, app_handle: tauri::AppHandle) -> Result<bool, (
}

#[tauri::command]
#[specta::specta]
pub fn reposition_column(
label: &str,
x: f32,
Expand All @@ -81,7 +78,6 @@ pub fn reposition_column(
}

#[tauri::command]
#[specta::specta]
pub fn resize_column(
label: &str,
width: f32,
Expand All @@ -101,7 +97,6 @@ pub fn resize_column(
}

#[tauri::command]
#[specta::specta]
pub fn open_window(
label: &str,
title: &str,
Expand Down Expand Up @@ -171,7 +166,6 @@ pub fn open_window(
}

#[tauri::command]
#[specta::specta]
pub fn set_badge(count: i32) {
#[cfg(target_os = "macos")]
unsafe {
Expand Down
18 changes: 5 additions & 13 deletions src-tauri/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ pub struct Nostr {

fn main() {
let mut ctx = tauri::generate_context!();
let invoke_handler = {
let builder = tauri_specta::ts::builder().commands(tauri_specta::collect_commands![

tauri::Builder::default()
.invoke_handler(tauri::generate_handler![
nostr::relay::get_relays,
nostr::relay::connect_relay,
nostr::relay::remove_relay,
Expand Down Expand Up @@ -70,16 +71,8 @@ fn main() {
commands::window::reposition_column,
commands::window::resize_column,
commands::window::open_window,
commands::window::set_badge
]);

#[cfg(debug_assertions)]
let builder = builder.path("../packages/system/src/commands.ts");

builder.build().unwrap()
};

tauri::Builder::default()
commands::window::set_badge,
])
.setup(|app| {
let main_window = app.get_webview_window("main").unwrap();

Expand Down Expand Up @@ -147,7 +140,6 @@ fn main() {
.plugin(tauri_plugin_shell::init())
.plugin(tauri_plugin_upload::init())
.plugin(tauri_plugin_updater::Builder::new().build())
.invoke_handler(invoke_handler)
.run(ctx)
.expect("error while running tauri application")
}
8 changes: 0 additions & 8 deletions src-tauri/src/nostr/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ use std::{str::FromStr, time::Duration};
use tauri::State;

#[tauri::command]
#[specta::specta]
pub async fn get_event(id: &str, state: State<'_, Nostr>) -> Result<String, String> {
let client = &state.client;
let event_id: Option<EventId> = match Nip19::from_bech32(id) {
Expand Down Expand Up @@ -50,7 +49,6 @@ pub async fn get_event(id: &str, state: State<'_, Nostr>) -> Result<String, Stri
}

#[tauri::command]
#[specta::specta]
pub async fn get_replies(id: &str, state: State<'_, Nostr>) -> Result<Vec<String>, String> {
let client = &state.client;

Expand All @@ -68,7 +66,6 @@ pub async fn get_replies(id: &str, state: State<'_, Nostr>) -> Result<Vec<String
}

#[tauri::command]
#[specta::specta]
pub async fn get_events_by(
public_key: &str,
as_of: Option<&str>,
Expand Down Expand Up @@ -98,7 +95,6 @@ pub async fn get_events_by(
}

#[tauri::command]
#[specta::specta]
pub async fn get_local_events(
pubkeys: Vec<String>,
until: Option<&str>,
Expand Down Expand Up @@ -135,7 +131,6 @@ pub async fn get_local_events(
}

#[tauri::command]
#[specta::specta]
pub async fn get_global_events(
until: Option<&str>,
state: State<'_, Nostr>,
Expand All @@ -161,7 +156,6 @@ pub async fn get_global_events(
}

#[tauri::command]
#[specta::specta]
pub async fn get_hashtag_events(
hashtags: Vec<&str>,
until: Option<&str>,
Expand All @@ -185,7 +179,6 @@ pub async fn get_hashtag_events(
}

#[tauri::command]
#[specta::specta]
pub async fn publish(
content: &str,
tags: Vec<Vec<&str>>,
Expand All @@ -201,7 +194,6 @@ pub async fn publish(
}

#[tauri::command]
#[specta::specta]
pub async fn repost(raw: &str, state: State<'_, Nostr>) -> Result<String, String> {
let client = &state.client;
let event = Event::from_json(raw).unwrap();
Expand Down
Loading