Migrate manager and wrapper to shared message types
This commit is contained in:
+12
-3
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user