Migrate manager and wrapper to shared message types

This commit is contained in:
2026-07-20 19:10:39 +02:00
parent cdbed5e000
commit 5c56208c8b
4 changed files with 16 additions and 5 deletions
+12 -3
View File
@@ -4,6 +4,12 @@ import { loadConfig, saveConfig } from "./config";
import { ProcessManager } from "./processManager";
import { StatusReporter } from "./statusReporter";
import { QueryManager } from "./queryManager";
import {
WrapperRegisterMessage,
WrapperHeartbeatMessage,
ServerStartCommand,
ServerStopCommand
} from "server-manager-shared";
class Wrapper {
@@ -211,7 +217,7 @@ class Wrapper {
const message = {
const message: WrapperRegisterMessage = {
@@ -298,7 +304,10 @@ class Wrapper {
const command =
JSON.parse(
msg.content.toString()
);
) as ServerStartCommand | ServerStopCommand | {
type: string;
[key: string]: unknown;
};
@@ -392,7 +401,7 @@ class Wrapper {
const heartbeat = {
const heartbeat: WrapperHeartbeatMessage = {
type: