Live location tracking and playback for the game "manhunt"
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add check to ensure types are synced

Ben C e7d278b0 31ea3d90

+16 -10
+3 -9
backend/src/export_types.rs
··· 1 - use std::{borrow::Cow, path::PathBuf}; 1 + use std::borrow::Cow; 2 2 3 3 use manhunt_app_lib::mk_specta; 4 4 use specta_typescript::Typescript; ··· 6 6 pub fn main() { 7 7 let args = std::env::args().collect::<Vec<_>>(); 8 8 let path = args.get(1).expect("Usage: export-types path"); 9 - let path = PathBuf::from(path) 10 - .canonicalize() 11 - .expect("Failed to canonicalize path"); 12 9 let specta = mk_specta(); 13 10 let mut lang = Typescript::new(); 14 11 lang.header = Cow::Borrowed("/* eslint @typescript-eslint/no-unused-vars: 0 */\n/* eslint @typescript-eslint/no-explicit-any: 0 */"); 15 - specta.export(lang, &path).expect("Failed to export types"); 16 - println!( 17 - "Successfully exported type and commands to {}", 18 - path.to_str().unwrap() 19 - ); 12 + specta.export(lang, path).expect("Failed to export types"); 13 + println!("Successfully exported type and commands to {path}",); 20 14 }
+7
nix/checks/types-sync.nix
··· 1 + {pkgs, ...}: 2 + pkgs.runCommand "check-types-synced" {} '' 3 + ${pkgs.manhunt}/bin/export-types ./bindings.ts 4 + ${pkgs.prettier}/bin/prettier --write ./bindings.ts --config ${../../frontend/.prettierrc.yaml} 5 + diff bindings.ts ${../../frontend/src/bindings.ts} 6 + touch $out 7 + ''
+6 -1
nix/packages/manhunt.nix
··· 3 3 libsoup_3, 4 4 dbus, 5 5 glib, 6 + clippy, 6 7 glib-networking, 7 8 librsvg, 8 9 webkitgtk_4_1, ··· 21 22 buildFeatures = [ 22 23 "tauri/custom-protocol" 23 24 ]; 24 - doCheck = false; 25 + 26 + postCheck = '' 27 + cargo clippy --no-deps -- -D warnings 28 + ''; 25 29 26 30 nativeBuildInputs = [ 27 31 pkg-config 28 32 copyDesktopItems 29 33 wrapGAppsHook 34 + clippy 30 35 ]; 31 36 32 37 buildInputs = [