mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-13 23:14:53 +09:00
Ctl's commands.ts was starting to grow rather big, and future features and refactors are only going to make it bigger. Split it up into separate modules grouped by which category of commands it serves.
12 lines
452 B
TypeScript
12 lines
452 B
TypeScript
import * as lib from "@clusterio/lib";
|
|
import type { Control } from "../ctl";
|
|
|
|
export const debugCommands = new lib.CommandTree({ name: "debug", description: "Debugging utilities" });
|
|
debugCommands.add(new lib.Command({
|
|
definition: ["dump-ws", "Dump WebSocket messages sent and received by controller"],
|
|
handler: async function(args: object, control: Control) {
|
|
await control.send(new lib.DebugDumpWsRequest());
|
|
control.keepOpen = true;
|
|
},
|
|
}));
|