From 802d7dfee77a3f58ee14a7ef6e2454e5aae62cbb Mon Sep 17 00:00:00 2001 From: GeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com> Date: Sun, 5 Feb 2023 15:53:34 +0100 Subject: feat: Auto-generate TS bindings (#140) * feat: Initial trial to auto-generate TS bindings That way instead of manually duplicating code, we can just run `cargo test` to generate them. * fix: Update forgotten imports * refactor: Move FlightCoreVersion to autogen bind TypeScript binding autogenerated from Rust code * refactor: Move ReleaseInfo to autogen binding TypeScript binding autogenerated from Rust code * docs: Explain how to generate TS binds from Rust * feat: Check for binding changes in CI Checks for uncommitted binding changes in CI and fails if they differ * style: Formatting fixes --- src-vue/src/utils/FlightCoreVersion.d.ts | 5 ----- src-vue/src/utils/NorthstarMod.d.ts | 7 ------- src-vue/src/utils/ReleaseInfo.d.ts | 6 ------ 3 files changed, 18 deletions(-) delete mode 100644 src-vue/src/utils/FlightCoreVersion.d.ts delete mode 100644 src-vue/src/utils/NorthstarMod.d.ts delete mode 100644 src-vue/src/utils/ReleaseInfo.d.ts (limited to 'src-vue/src/utils') diff --git a/src-vue/src/utils/FlightCoreVersion.d.ts b/src-vue/src/utils/FlightCoreVersion.d.ts deleted file mode 100644 index 2516bf25..00000000 --- a/src-vue/src/utils/FlightCoreVersion.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -// derived from release_notes.rs -export interface FlightCoreVersion { - tag_name: string, - published_at: string, -} diff --git a/src-vue/src/utils/NorthstarMod.d.ts b/src-vue/src/utils/NorthstarMod.d.ts deleted file mode 100644 index 5e119683..00000000 --- a/src-vue/src/utils/NorthstarMod.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -// Matches Rust struct (in lib.rs). -export interface NorthstarMod { - name: string, - thunderstore_mod_string?: string, - enabled: bool, - directory: string, -} diff --git a/src-vue/src/utils/ReleaseInfo.d.ts b/src-vue/src/utils/ReleaseInfo.d.ts deleted file mode 100644 index 162f7917..00000000 --- a/src-vue/src/utils/ReleaseInfo.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -// Matches Rust struct (in release_notes mod). -export default interface ReleaseInfo { - name: string; - published_at: string; - body: string; -} -- cgit v1.2.3