ae8fecb538
Die duenne Strecke Skript -> Abbild -> API beweisen (D-08, D-10): - desktop-collect.sh sammelt AppImage/exe ein, schreibt manifest.json (Version, Kanal, Commit, Groesse, SHA-256) ohne Secrets - apps/api/src/desktop/: neues Modul mit GET /desktop/latest und GET /desktop/download/:platform, beide @Public(); Plattform-Whitelist vor jedem Dateisystemzugriff, Dateiname ausschliesslich aus dem Manifest (T-18-01, T-18-02) - packages/shared: DesktopPlatform/-Manifest(File)/-Latest(Response) Typen - Dockerfile kopiert desktop-dist/ in die runner-Stufe; desktop-dist/ per .gitkeep + .gitignore versioniert (leeres Verzeichnis, Pakete bleiben ungetrackt) - HTTP-Durchstich-Spec (8 Tests) via NestFactory, kein fs-Mock; echtes Temp-Verzeichnis + unabhaengig berechneter SHA-256 Abweichung: DesktopController braucht @Inject(DesktopService) explizit — Vitest transpiliert ueber esbuild, das emitDecoratorMetadata nicht abbildet, sonst bleibt desktopService bei einem echten NestFactory-Bau undefined (Rule 3, Blocker). Lokal bewiesen: neu gebautes API-Abbild liefert /desktop/latest (200) und /desktop/download/linux (200, attachment) aus, auch ueber /api-proxy/ des Web-Containers. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
54 lines
1.3 KiB
TypeScript
54 lines
1.3 KiB
TypeScript
export const APP_NAME = "Tessera";
|
|
|
|
export interface HealthResponse {
|
|
status: string;
|
|
timestamp: string;
|
|
}
|
|
|
|
/**
|
|
* Antwort von `GET /health/version` (quick-260914-ku1).
|
|
* `channel` ist in der Praxis `beta` | `live` | `dev`; die Wahrheit der
|
|
* Version ist der Git-Tag (`git describe`), nicht eine package.json.
|
|
*/
|
|
export interface VersionResponse {
|
|
name: string;
|
|
version: string;
|
|
channel: string;
|
|
commit: string;
|
|
buildTime: string;
|
|
}
|
|
|
|
/**
|
|
* Desktop-Pakete (Phase 18, D-08): Quelle ist ausschliesslich `manifest.json`,
|
|
* geschrieben nur von `.gitea/scripts/desktop-collect.sh` im CI. `platform` ist
|
|
* ein geschlossener Wertevorrat -- eine dritte Plattform waere eine bewusste
|
|
* Erweiterung hier und an der Konstante `PLATFORMS` im API-Dienst.
|
|
*/
|
|
export type DesktopPlatform = 'windows' | 'linux';
|
|
|
|
export interface DesktopManifestFile {
|
|
name: string;
|
|
size: number;
|
|
sha256: string;
|
|
}
|
|
|
|
export interface DesktopManifest {
|
|
version: string;
|
|
channel: string;
|
|
commit: string;
|
|
buildTime: string;
|
|
files: Partial<Record<DesktopPlatform, DesktopManifestFile>>;
|
|
}
|
|
|
|
export interface DesktopLatestFile extends DesktopManifestFile {
|
|
url: string;
|
|
}
|
|
|
|
export interface DesktopLatestResponse {
|
|
version: string;
|
|
channel: string;
|
|
commit: string;
|
|
buildTime: string;
|
|
files: Partial<Record<DesktopPlatform, DesktopLatestFile>>;
|
|
}
|