feat(desktop): ts-ify everything

This commit is contained in:
ethernet 2026-06-29 16:31:36 -04:00
parent fac85518fc
commit 39d09453f9
116 changed files with 2500 additions and 1756 deletions

View file

@ -49,7 +49,7 @@ param(
# * Hermes-Setup.exe (the signed Tauri bootstrap installer) passes
# -IncludeDesktop so a user who installed via the GUI ends up
# with a launchable desktop binary.
# * The Electron desktop's own bootstrap-runner.cjs runs install.ps1
# * The Electron desktop's own bootstrap-runner.ts runs install.ps1
# from inside an already-launched Hermes.exe; if THAT recursively
# built apps/desktop it would try to overwrite the live Hermes.exe
# on disk and fail. The recursive path omits the flag.
@ -2095,13 +2095,13 @@ function Set-PathVariable {
function Write-BootstrapMarker {
# Writes $InstallDir\.hermes-bootstrap-complete which tells the Hermes
# desktop app (apps/desktop/electron/main.cjs) "install.ps1 ran
# desktop app (apps/desktop/electron/main.ts) "install.ps1 ran
# successfully — DON'T trigger the legacy first-launch bootstrap
# runner."
#
# Schema mirrors what main.cjs's writeBootstrapMarker() / isBootstrap
# Schema mirrors what main.ts's writeBootstrapMarker() / isBootstrap
# Complete() expect. Keep this in lockstep when either side changes:
# apps/desktop/electron/main.cjs lines 1199-1222
# apps/desktop/electron/main.ts lines 1199-1222
# BOOTSTRAP_MARKER_SCHEMA_VERSION = 1 (line 187)
#
# Pinned commit/branch come from -Commit + -Branch flags (passed by
@ -2545,7 +2545,7 @@ function Get-ElectronDir {
return (Join-Path $InstallDir 'node_modules\electron')
}
# True when dist/ holds a usable Electron binary (#38673 / run-electron-builder.cjs).
# True when dist/ holds a usable Electron binary (#38673 / run-electron-builder.mjs).
function Test-ElectronDist {
param([string]$InstallDir)
$electronDir = Get-ElectronDir -InstallDir $InstallDir
@ -2828,7 +2828,7 @@ function Install-Desktop {
}
# 3b. The Hermes icon + identity are stamped onto Hermes.exe by the
# electron-builder `afterPack` hook (apps/desktop/scripts/after-pack.cjs)
# electron-builder `afterPack` hook (apps/desktop/scripts/after-pack.mjs)
# during `npm run pack` above — for every build, so the installer's
# --update rebuild stays branded too. No separate stamp step needed here.
# electron-builder's own rcedit step stays disabled (signAndEditExecutable