Decouple core Yaak logic from Tauri (#354)
10
crates-tauri/yaak-app/.gitignore
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
# Generated by Cargo
|
||||
# will have compiled files and executables
|
||||
target/
|
||||
|
||||
vendored/*
|
||||
|
||||
gen/*
|
||||
|
||||
**/permissions/autogenerated
|
||||
**/permissions/schemas
|
||||
76
crates-tauri/yaak-app/Cargo.toml
Normal file
@@ -0,0 +1,76 @@
|
||||
[package]
|
||||
name = "yaak-app"
|
||||
version = "0.0.0"
|
||||
edition = "2024"
|
||||
authors = ["Gregory Schier"]
|
||||
publish = false
|
||||
|
||||
# Produce a library for mobile support
|
||||
[lib]
|
||||
name = "tauri_app_lib"
|
||||
crate-type = ["staticlib", "cdylib", "lib"]
|
||||
|
||||
[features]
|
||||
cargo-clippy = []
|
||||
default = []
|
||||
updater = []
|
||||
license = ["yaak-license"]
|
||||
|
||||
[build-dependencies]
|
||||
tauri-build = { version = "2.5.3", features = [] }
|
||||
|
||||
[target.'cfg(target_os = "linux")'.dependencies]
|
||||
openssl-sys = { version = "0.9.105", features = ["vendored"] } # For Ubuntu installation to work
|
||||
|
||||
[dependencies]
|
||||
charset = "0.1.5"
|
||||
chrono = { workspace = true, features = ["serde"] }
|
||||
cookie = "0.18.1"
|
||||
eventsource-client = { git = "https://github.com/yaakapp/rust-eventsource-client", version = "0.14.0" }
|
||||
http = { version = "1.2.0", default-features = false }
|
||||
log = { workspace = true }
|
||||
md5 = "0.8.0"
|
||||
r2d2 = "0.8.10"
|
||||
r2d2_sqlite = "0.25.0"
|
||||
mime_guess = "2.0.5"
|
||||
rand = "0.9.0"
|
||||
reqwest = { workspace = true, features = ["multipart", "gzip", "brotli", "deflate", "json", "rustls-tls-manual-roots-no-provider", "socks", "http2"] }
|
||||
serde = { workspace = true, features = ["derive"] }
|
||||
serde_json = { workspace = true, features = ["raw_value"] }
|
||||
tauri = { workspace = true, features = ["devtools", "protocol-asset"] }
|
||||
tauri-plugin-clipboard-manager = "2.3.2"
|
||||
tauri-plugin-deep-link = "2.4.5"
|
||||
tauri-plugin-dialog = { workspace = true }
|
||||
tauri-plugin-fs = "2.4.4"
|
||||
tauri-plugin-log = { version = "2.7.1", features = ["colored"] }
|
||||
tauri-plugin-opener = "2.5.2"
|
||||
tauri-plugin-os = "2.3.2"
|
||||
tauri-plugin-shell = { workspace = true }
|
||||
tauri-plugin-single-instance = { version = "2.3.6", features = ["deep-link"] }
|
||||
tauri-plugin-updater = "2.9.0"
|
||||
tauri-plugin-window-state = "2.4.1"
|
||||
thiserror = { workspace = true }
|
||||
tokio = { workspace = true, features = ["sync"] }
|
||||
tokio-stream = "0.1.17"
|
||||
tokio-tungstenite = { version = "0.26.2", default-features = false }
|
||||
url = "2"
|
||||
tokio-util = { version = "0.7", features = ["codec"] }
|
||||
ts-rs = { workspace = true }
|
||||
uuid = "1.12.1"
|
||||
yaak-common = { workspace = true }
|
||||
yaak-tauri-utils = { workspace = true }
|
||||
yaak-core = { workspace = true }
|
||||
yaak-crypto = { workspace = true }
|
||||
yaak-fonts = { workspace = true }
|
||||
yaak-git = { workspace = true }
|
||||
yaak-grpc = { workspace = true }
|
||||
yaak-http = { workspace = true }
|
||||
yaak-license = { workspace = true, optional = true }
|
||||
yaak-mac-window = { workspace = true }
|
||||
yaak-models = { workspace = true }
|
||||
yaak-plugins = { workspace = true }
|
||||
yaak-sse = { workspace = true }
|
||||
yaak-sync = { workspace = true }
|
||||
yaak-templates = { workspace = true }
|
||||
yaak-tls = { workspace = true }
|
||||
yaak-ws = { workspace = true }
|
||||
3
crates-tauri/yaak-app/bindings/gen_watch.ts
generated
Normal file
@@ -0,0 +1,3 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type WatchResult = { unlistenEvent: string, };
|
||||
17
crates-tauri/yaak-app/bindings/index.ts
generated
Normal file
@@ -0,0 +1,17 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type PluginUpdateInfo = { name: string, currentVersion: string, latestVersion: string, };
|
||||
|
||||
export type PluginUpdateNotification = { updateCount: number, plugins: Array<PluginUpdateInfo>, };
|
||||
|
||||
export type UpdateInfo = { replyEventId: string, version: string, downloaded: boolean, };
|
||||
|
||||
export type UpdateResponse = { "type": "ack" } | { "type": "action", action: UpdateResponseAction, };
|
||||
|
||||
export type UpdateResponseAction = "install" | "skip";
|
||||
|
||||
export type WatchResult = { unlistenEvent: string, };
|
||||
|
||||
export type YaakNotification = { timestamp: string, timeout: number | null, id: string, title: string | null, message: string, color: string | null, action: YaakNotificationAction | null, };
|
||||
|
||||
export type YaakNotificationAction = { label: string, url: string, };
|
||||
5
crates-tauri/yaak-app/bindings/plugins_ext.ts
generated
Normal file
@@ -0,0 +1,5 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type PluginUpdateInfo = { name: string, currentVersion: string, latestVersion: string, };
|
||||
|
||||
export type PluginUpdateNotification = { updateCount: number, plugins: Array<PluginUpdateInfo>, };
|
||||
3
crates-tauri/yaak-app/build.rs
Normal file
@@ -0,0 +1,3 @@
|
||||
fn main() {
|
||||
tauri_build::build()
|
||||
}
|
||||
57
crates-tauri/yaak-app/capabilities/default.json
Normal file
@@ -0,0 +1,57 @@
|
||||
{
|
||||
"identifier": "default",
|
||||
"description": "Default capabilities for all build variants",
|
||||
"windows": [
|
||||
"*"
|
||||
],
|
||||
"permissions": [
|
||||
"core:app:allow-identifier",
|
||||
"core:event:allow-emit",
|
||||
"core:event:allow-listen",
|
||||
"core:event:allow-unlisten",
|
||||
"core:path:allow-resolve-directory",
|
||||
"core:path:allow-basename",
|
||||
"os:allow-os-type",
|
||||
"clipboard-manager:allow-clear",
|
||||
"clipboard-manager:allow-write-text",
|
||||
"clipboard-manager:allow-read-text",
|
||||
"dialog:allow-open",
|
||||
"dialog:allow-save",
|
||||
"fs:allow-read-dir",
|
||||
"fs:allow-read-file",
|
||||
"fs:allow-read-text-file",
|
||||
{
|
||||
"identifier": "fs:scope",
|
||||
"allow": [
|
||||
{
|
||||
"path": "$APPDATA"
|
||||
},
|
||||
{
|
||||
"path": "$APPDATA/**"
|
||||
}
|
||||
]
|
||||
},
|
||||
"clipboard-manager:allow-read-text",
|
||||
"clipboard-manager:allow-write-text",
|
||||
"core:webview:allow-set-webview-zoom",
|
||||
"core:window:allow-close",
|
||||
"core:window:allow-internal-toggle-maximize",
|
||||
"core:window:allow-is-fullscreen",
|
||||
"core:window:allow-is-maximized",
|
||||
"core:window:allow-maximize",
|
||||
"core:window:allow-minimize",
|
||||
"core:window:allow-set-decorations",
|
||||
"core:window:allow-set-title",
|
||||
"core:window:allow-show",
|
||||
"core:window:allow-start-dragging",
|
||||
"core:window:allow-theme",
|
||||
"core:window:allow-unmaximize",
|
||||
"opener:allow-default-urls",
|
||||
"opener:allow-open-path",
|
||||
"opener:allow-open-url",
|
||||
"opener:allow-reveal-item-in-dir",
|
||||
"shell:allow-open",
|
||||
"yaak-fonts:default",
|
||||
"yaak-mac-window:default"
|
||||
]
|
||||
}
|
||||
BIN
crates-tauri/yaak-app/icons/dev/128x128.png
Normal file
|
After Width: | Height: | Size: 6.1 KiB |
BIN
crates-tauri/yaak-app/icons/dev/128x128@2x.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
crates-tauri/yaak-app/icons/dev/32x32.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
crates-tauri/yaak-app/icons/dev/64x64.png
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
BIN
crates-tauri/yaak-app/icons/dev/Square107x107Logo.png
Normal file
|
After Width: | Height: | Size: 4.9 KiB |
BIN
crates-tauri/yaak-app/icons/dev/Square142x142Logo.png
Normal file
|
After Width: | Height: | Size: 6.7 KiB |
BIN
crates-tauri/yaak-app/icons/dev/Square150x150Logo.png
Normal file
|
After Width: | Height: | Size: 7.0 KiB |
BIN
crates-tauri/yaak-app/icons/dev/Square284x284Logo.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
crates-tauri/yaak-app/icons/dev/Square30x30Logo.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
crates-tauri/yaak-app/icons/dev/Square310x310Logo.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
crates-tauri/yaak-app/icons/dev/Square44x44Logo.png
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
crates-tauri/yaak-app/icons/dev/Square71x71Logo.png
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
crates-tauri/yaak-app/icons/dev/Square89x89Logo.png
Normal file
|
After Width: | Height: | Size: 4.1 KiB |
BIN
crates-tauri/yaak-app/icons/dev/StoreLogo.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 7.6 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 4.9 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 4.4 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 4.4 KiB |
|
After Width: | Height: | Size: 6.7 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 6.7 KiB |
|
After Width: | Height: | Size: 8.9 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 8.9 KiB |
BIN
crates-tauri/yaak-app/icons/dev/icon.icns
Normal file
BIN
crates-tauri/yaak-app/icons/dev/icon.ico
Normal file
|
After Width: | Height: | Size: 21 KiB |
BIN
crates-tauri/yaak-app/icons/dev/icon.png
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
crates-tauri/yaak-app/icons/dev/ios/AppIcon-20x20@1x.png
Normal file
|
After Width: | Height: | Size: 848 B |
BIN
crates-tauri/yaak-app/icons/dev/ios/AppIcon-20x20@2x-1.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
crates-tauri/yaak-app/icons/dev/ios/AppIcon-20x20@2x.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
crates-tauri/yaak-app/icons/dev/ios/AppIcon-20x20@3x.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
crates-tauri/yaak-app/icons/dev/ios/AppIcon-29x29@1x.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
crates-tauri/yaak-app/icons/dev/ios/AppIcon-29x29@2x-1.png
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
crates-tauri/yaak-app/icons/dev/ios/AppIcon-29x29@2x.png
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
crates-tauri/yaak-app/icons/dev/ios/AppIcon-29x29@3x.png
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
BIN
crates-tauri/yaak-app/icons/dev/ios/AppIcon-40x40@1x.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
crates-tauri/yaak-app/icons/dev/ios/AppIcon-40x40@2x-1.png
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
crates-tauri/yaak-app/icons/dev/ios/AppIcon-40x40@2x.png
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
crates-tauri/yaak-app/icons/dev/ios/AppIcon-40x40@3x.png
Normal file
|
After Width: | Height: | Size: 5.6 KiB |
BIN
crates-tauri/yaak-app/icons/dev/ios/AppIcon-512@2x.png
Normal file
|
After Width: | Height: | Size: 31 KiB |
BIN
crates-tauri/yaak-app/icons/dev/ios/AppIcon-60x60@2x.png
Normal file
|
After Width: | Height: | Size: 5.6 KiB |
BIN
crates-tauri/yaak-app/icons/dev/ios/AppIcon-60x60@3x.png
Normal file
|
After Width: | Height: | Size: 8.3 KiB |
BIN
crates-tauri/yaak-app/icons/dev/ios/AppIcon-76x76@1x.png
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
BIN
crates-tauri/yaak-app/icons/dev/ios/AppIcon-76x76@2x.png
Normal file
|
After Width: | Height: | Size: 7.1 KiB |
BIN
crates-tauri/yaak-app/icons/dev/ios/AppIcon-83.5x83.5@2x.png
Normal file
|
After Width: | Height: | Size: 7.8 KiB |
BIN
crates-tauri/yaak-app/icons/icon-dev.png
Normal file
|
After Width: | Height: | Size: 31 KiB |
BIN
crates-tauri/yaak-app/icons/icon.png
Normal file
|
After Width: | Height: | Size: 356 KiB |
BIN
crates-tauri/yaak-app/icons/release/128x128.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
crates-tauri/yaak-app/icons/release/128x128@2x.png
Normal file
|
After Width: | Height: | Size: 36 KiB |
BIN
crates-tauri/yaak-app/icons/release/32x32.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
crates-tauri/yaak-app/icons/release/64x64.png
Normal file
|
After Width: | Height: | Size: 5.6 KiB |
BIN
crates-tauri/yaak-app/icons/release/Square107x107Logo.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
crates-tauri/yaak-app/icons/release/Square142x142Logo.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
crates-tauri/yaak-app/icons/release/Square150x150Logo.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
crates-tauri/yaak-app/icons/release/Square284x284Logo.png
Normal file
|
After Width: | Height: | Size: 42 KiB |
BIN
crates-tauri/yaak-app/icons/release/Square30x30Logo.png
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
crates-tauri/yaak-app/icons/release/Square310x310Logo.png
Normal file
|
After Width: | Height: | Size: 48 KiB |
BIN
crates-tauri/yaak-app/icons/release/Square44x44Logo.png
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
BIN
crates-tauri/yaak-app/icons/release/Square71x71Logo.png
Normal file
|
After Width: | Height: | Size: 6.4 KiB |
BIN
crates-tauri/yaak-app/icons/release/Square89x89Logo.png
Normal file
|
After Width: | Height: | Size: 8.5 KiB |
BIN
crates-tauri/yaak-app/icons/release/StoreLogo.png
Normal file
|
After Width: | Height: | Size: 4.0 KiB |
|
After Width: | Height: | Size: 3.9 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 3.9 KiB |
|
After Width: | Height: | Size: 3.9 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 3.9 KiB |
|
After Width: | Height: | Size: 9.5 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 9.5 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 51 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 81 KiB |
|
After Width: | Height: | Size: 24 KiB |
BIN
crates-tauri/yaak-app/icons/release/icon.icns
Normal file
BIN
crates-tauri/yaak-app/icons/release/icon.ico
Normal file
|
After Width: | Height: | Size: 51 KiB |
BIN
crates-tauri/yaak-app/icons/release/icon.png
Normal file
|
After Width: | Height: | Size: 108 KiB |
BIN
crates-tauri/yaak-app/icons/release/ios/AppIcon-20x20@1x.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
crates-tauri/yaak-app/icons/release/ios/AppIcon-20x20@2x-1.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
crates-tauri/yaak-app/icons/release/ios/AppIcon-20x20@2x.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
crates-tauri/yaak-app/icons/release/ios/AppIcon-20x20@3x.png
Normal file
|
After Width: | Height: | Size: 4.8 KiB |
BIN
crates-tauri/yaak-app/icons/release/ios/AppIcon-29x29@1x.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
crates-tauri/yaak-app/icons/release/ios/AppIcon-29x29@2x-1.png
Normal file
|
After Width: | Height: | Size: 4.7 KiB |
BIN
crates-tauri/yaak-app/icons/release/ios/AppIcon-29x29@2x.png
Normal file
|
After Width: | Height: | Size: 4.7 KiB |
BIN
crates-tauri/yaak-app/icons/release/ios/AppIcon-29x29@3x.png
Normal file
|
After Width: | Height: | Size: 7.9 KiB |
BIN
crates-tauri/yaak-app/icons/release/ios/AppIcon-40x40@1x.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |