When building the gui client with `TSLINK_BUILD=true`, the library
outputs using 4 spaces for indent. These are however currently checked
into git with 2 spaces per indent, which causes the Tauri workflow to
fail because it checks for a pristine git directory after the build.
Unfortunately #9383 doesn't fix this issue because it has nothing to do
with prettier in CI.
Fixes
https://github.com/firezone/firezone/actions/runs/15457631114/job/43512703266
The frontend of the GUI client is written in TypeScript and communicates
with the backend via event listeners. Currently, we only have
type-safety within either of those parts of the codebase but not across
it. The payloads of these events are JSON-encoded. Any change to this
interface therefore needs to be applied on either end.
To avoid this, we add `tslink` to the GUI client which generates
TypeScript interfaces from Rust structs. We still check those into Git
into order to make local builds easy (otherwise every dev would have to
set `TSLINK_BUILD=true` on their machine). Our Tauri CI build already
has a check to ensure the Git workspace isn't modified after building so
any changes to these generated files will fail CI.
This adds a bit more type-safety to the codebase and makes refactorings
on the GUI client easier.