Open-source Xbox-inspired desktop launcher for Xodus on Linux
TypeScript
feat(runtime): define managed-family component API contract
domsvobodada3cf8222f03
diff --git a/src/preload/index.cts b/src/preload/index.ctsindex a54286b..8e43551 100644--- a/src/preload/index.cts+++ b/src/preload/index.cts@@ -85,6 +85,8 @@ const api: LauncherApi = {refreshRuntime: () => ipcRenderer.invoke('runtime-refresh'),getRuntimeFamilies: () => ipcRenderer.invoke('runtime-families'),checkRuntimeUpdate: () => ipcRenderer.invoke('runtime-check-update'),+ checkManagedRuntime: (family: string, options: {allowCachyos:boolean;allowPrerelease:boolean}) => ipcRenderer.invoke('runtime-family-check', family, options),+ installManagedRuntime: (family: string, expectedCandidateSha256: string, options: {allowCachyos:boolean;allowPrerelease:boolean}) => ipcRenderer.invoke('runtime-family-install', family, expectedCandidateSha256, options),checkNexusRuntime: () => ipcRenderer.invoke('runtime-check-nexus'),installRuntime: () => ipcRenderer.invoke('runtime-install'),installNexusRuntime: () => ipcRenderer.invoke('runtime-install-nexus'),diff --git a/src/shared/types.ts b/src/shared/types.tsindex 44323cf..4006f18 100644--- a/src/shared/types.ts+++ b/src/shared/types.ts@@ -1,4 +1,4 @@-import type {GameRuntimeSelection,InstalledRuntimeFamily,RuntimeBuildApproval,RuntimePrefixAnchors} from './runtime-selection.js';+import type {RuntimeFamily,GameRuntimeSelection,InstalledRuntimeFamily,RuntimeBuildApproval,RuntimePrefixAnchors} from './runtime-selection.js';export type Page = 'home' | 'store' | 'library' | 'downloads' | 'settings' | 'social';export interface BackendCapabilities {@@ -80,7 +80,19 @@ export interface BackendStatus {phase?: string;}+export interface ManagedRuntimeOptions {allowCachyos:boolean;allowPrerelease:boolean;}+export interface ManagedFamilyStatus {+ id:RuntimeFamily;installed?:InstalledRuntimeFamily;version?:string;+ available?:{version:string;candidateSha256:string;sourceCommit:string;archiveName:string;requiresBackendVersion:string;requiresLauncherVersion:string};+ checking:boolean;installing:boolean;phase?:string;error?:string;+}+export interface ManagedFamilyInstallResult {+ family:RuntimeFamily;success:boolean;committed:boolean;buildId?:string;+ durability:'confirmed'|'unknown'|'not-committed';error?:string;+}export interface RuntimeStatus {+ managedFamilies?:ManagedFamilyStatus[];+ managedRevision?:number;variants?: InstalledRuntimeFamily[];installed: boolean;checking: boolean;@@ -588,6 +600,8 @@ export interface LauncherApi {refreshRuntime(): Promise<RuntimeStatus>;getRuntimeFamilies(): Promise<InstalledRuntimeFamily[]>;checkRuntimeUpdate(): Promise<RuntimeStatus>;+ checkManagedRuntime(family:RuntimeFamily,options:ManagedRuntimeOptions):Promise<ManagedFamilyStatus>;+ installManagedRuntime(family:RuntimeFamily,expectedCandidateSha256:string,options:ManagedRuntimeOptions):Promise<ManagedFamilyInstallResult>;checkNexusRuntime(): Promise<RuntimeStatus>;installRuntime(): Promise<void>;installNexusRuntime(): Promise<void>;