Complete shared message type migration

This commit is contained in:
2026-07-20 19:27:36 +02:00
parent e93524c403
commit 3827f803c5
4 changed files with 14 additions and 11 deletions
+4 -2
View File
@@ -1,3 +1,5 @@
import { WrapperStatusMessage } from "server-manager-shared";
export interface ServerInfo { export interface ServerInfo {
@@ -230,7 +232,7 @@ export class ServerRegistry {
} }
syncWrapperStatus(data:any){ syncWrapperStatus(data: WrapperStatusMessage){
if(!data.servers) if(!data.servers)
return; return;
@@ -240,7 +242,7 @@ export class ServerRegistry {
const runningServerIds = const runningServerIds =
new Set( new Set(
data.servers.map( data.servers.map(
(srv:any)=>srv.id srv => srv.id
) )
); );
-7
View File
@@ -15,10 +15,3 @@ export interface Wrapper {
} }
export interface Message {
type: string;
[key:string]: any;
}
+4 -2
View File
@@ -1,3 +1,5 @@
import { WrapperStatusMessage } from "server-manager-shared";
export interface WrapperInfo { export interface WrapperInfo {
id:string; id:string;
@@ -19,7 +21,7 @@ export interface WrapperInfo {
lastHeartbeat:number; lastHeartbeat:number;
servers:string[]; servers: WrapperStatusMessage["servers"];
} }
@@ -152,7 +154,7 @@ export class WrapperRegistry {
} }
updateStatus(data:any){ updateStatus(data: WrapperStatusMessage){
const wrapper = const wrapper =
+6
View File
@@ -28,3 +28,9 @@ export interface WrapperStatusMessage {
}>; }>;
ramFree: number; ramFree: number;
} }
export interface WrapperRegisteredMessage {
type: "wrapper.registered";
wrapperId: string;
commandQueue: string;
}