aboutsummaryrefslogtreecommitdiff
path: root/src-tauri
diff options
context:
space:
mode:
Diffstat (limited to 'src-tauri')
-rw-r--r--src-tauri/Cargo.lock32
-rw-r--r--src-tauri/Cargo.toml4
-rw-r--r--src-tauri/bindings/FlightCoreVersion.ts3
-rw-r--r--src-tauri/bindings/NorthstarMod.ts3
-rw-r--r--src-tauri/bindings/ReleaseInfo.ts3
-rw-r--r--src-tauri/src/github/release_notes.rs7
-rw-r--r--src-tauri/src/lib.rs4
-rw-r--r--src-tauri/tauri.conf.json2
8 files changed, 52 insertions, 6 deletions
diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock
index 0376d592..5a0a5256 100644
--- a/src-tauri/Cargo.lock
+++ b/src-tauri/Cargo.lock
@@ -3,6 +3,12 @@
version = 3
[[package]]
+name = "Inflector"
+version = "0.11.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3"
+
+[[package]]
name = "addr2line"
version = "0.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -81,7 +87,7 @@ checksum = "216261ddc8289130e551ddcd5ce8a064710c0d064a4d2895c67151c92b5443f6"
[[package]]
name = "app"
-version = "1.6.0"
+version = "1.6.1"
dependencies = [
"anyhow",
"async-recursion",
@@ -100,6 +106,7 @@ dependencies = [
"tauri-build",
"tauri-plugin-store",
"tokio",
+ "ts-rs",
"zip",
]
@@ -4167,6 +4174,29 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642"
[[package]]
+name = "ts-rs"
+version = "6.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4added4070a4fdf9df03457206cd2e4b12417c8560a2954d91ffcbe60177a56a"
+dependencies = [
+ "thiserror",
+ "ts-rs-macros",
+]
+
+[[package]]
+name = "ts-rs-macros"
+version = "6.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9f807fdb3151fee75df7485b901a89624358cd07a67a8fb1a5831bf5a07681ff"
+dependencies = [
+ "Inflector",
+ "proc-macro2",
+ "quote",
+ "syn",
+ "termcolor",
+]
+
+[[package]]
name = "typenum"
version = "1.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml
index dcdf8d3b..9c0ad2b8 100644
--- a/src-tauri/Cargo.toml
+++ b/src-tauri/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "app"
-version = "1.6.0"
+version = "1.6.1"
description = "A Tauri App"
authors = ["you"]
license = ""
@@ -44,6 +44,8 @@ async-recursion = "1.0.0"
game-scanner = "1.1.4"
# For parsing timestamps
chrono = "0.4.23"
+# TypeScript bindings
+ts-rs = "6.1"
[features]
# by default Tauri runs in production mode
diff --git a/src-tauri/bindings/FlightCoreVersion.ts b/src-tauri/bindings/FlightCoreVersion.ts
new file mode 100644
index 00000000..9017a840
--- /dev/null
+++ b/src-tauri/bindings/FlightCoreVersion.ts
@@ -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 interface FlightCoreVersion { tag_name: string, published_at: string, } \ No newline at end of file
diff --git a/src-tauri/bindings/NorthstarMod.ts b/src-tauri/bindings/NorthstarMod.ts
new file mode 100644
index 00000000..ed9d9297
--- /dev/null
+++ b/src-tauri/bindings/NorthstarMod.ts
@@ -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 interface NorthstarMod { name: string, thunderstore_mod_string: string | null, enabled: boolean, directory: string, } \ No newline at end of file
diff --git a/src-tauri/bindings/ReleaseInfo.ts b/src-tauri/bindings/ReleaseInfo.ts
new file mode 100644
index 00000000..249f986e
--- /dev/null
+++ b/src-tauri/bindings/ReleaseInfo.ts
@@ -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 interface ReleaseInfo { name: string, published_at: string, body: string, } \ No newline at end of file
diff --git a/src-tauri/src/github/release_notes.rs b/src-tauri/src/github/release_notes.rs
index 758f7ace..6dee4576 100644
--- a/src-tauri/src/github/release_notes.rs
+++ b/src-tauri/src/github/release_notes.rs
@@ -1,15 +1,18 @@
use crate::constants::APP_USER_AGENT;
use serde::{Deserialize, Serialize};
use std::vec::Vec;
+use ts_rs::TS;
-#[derive(Serialize, Deserialize, Debug, Clone)]
+#[derive(Serialize, Deserialize, Debug, Clone, TS)]
+#[ts(export)]
pub struct ReleaseInfo {
pub name: String,
pub published_at: String,
pub body: String,
}
-#[derive(Serialize, Deserialize, Debug, Clone)]
+#[derive(Serialize, Deserialize, Debug, Clone, TS)]
+#[ts(export)]
pub struct FlightCoreVersion {
tag_name: String,
published_at: String,
diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs
index 62cc07ae..e43e5935 100644
--- a/src-tauri/src/lib.rs
+++ b/src-tauri/src/lib.rs
@@ -13,6 +13,7 @@ use platform_specific::linux;
use serde::{Deserialize, Serialize};
use sysinfo::SystemExt;
+use ts_rs::TS;
use zip::ZipArchive;
use northstar::get_northstar_version_number;
@@ -31,7 +32,8 @@ pub struct GameInstall {
pub install_type: InstallType,
}
-#[derive(Serialize, Deserialize, Debug, Clone)]
+#[derive(Serialize, Deserialize, Debug, Clone, TS)]
+#[ts(export)]
pub struct NorthstarMod {
pub name: String,
pub thunderstore_mod_string: Option<String>,
diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json
index ca5ec9c3..13c745a5 100644
--- a/src-tauri/tauri.conf.json
+++ b/src-tauri/tauri.conf.json
@@ -8,7 +8,7 @@
},
"package": {
"productName": "FlightCore",
- "version": "1.6.0"
+ "version": "1.6.1"
},
"tauri": {
"allowlist": {