mirror of
https://github.com/MCSManager/MCSManager.git
synced 2025-04-06 17:10:29 +08:00
Optimize: Comment Code
This commit is contained in:
parent
069f6d078d
commit
ef63996eac
@ -12,7 +12,6 @@ import StopCommand from "../entity/commands/stop";
|
||||
import SendCommand from "../entity/commands/cmd";
|
||||
import KillCommand from "../entity/commands/kill";
|
||||
import { IInstanceDetail, IJson } from "../service/interfaces";
|
||||
import { QueryMapWrapper } from "common";
|
||||
import ProcessInfoCommand from "../entity/commands/process_info";
|
||||
import FileManager from "../service/system_file";
|
||||
import { ProcessConfig } from "../entity/instance/process_config";
|
||||
@ -30,7 +29,6 @@ routerApp.use((event, ctx, data, next) => {
|
||||
if (event === "instance/query_asynchronous") return next();
|
||||
if (event === "instance/stop_asynchronous") return next();
|
||||
if (event.startsWith("instance")) {
|
||||
// class AOP
|
||||
if (data.instanceUuids) return next();
|
||||
const instanceUuid = data.instanceUuid;
|
||||
if (!InstanceSubsystem.exists(instanceUuid)) {
|
||||
|
@ -9,7 +9,6 @@ import {
|
||||
import InstanceSubsystem from "../service/system_instance";
|
||||
import SendCommand from "../entity/commands/cmd";
|
||||
import { IGNORE } from "../const";
|
||||
import logger from "../service/log";
|
||||
|
||||
// Authorization authentication middleware
|
||||
routerApp.use(async (event, ctx, data, next) => {
|
||||
@ -83,7 +82,6 @@ routerApp.on("stream/input", async (ctx, data) => {
|
||||
await instance?.exec(new SendCommand(command));
|
||||
} catch (error: any) {
|
||||
// Ignore potential high frequency exceptions here
|
||||
// protocol.responseError(ctx, error);
|
||||
}
|
||||
});
|
||||
|
||||
@ -97,11 +95,10 @@ routerApp.on("stream/write", async (ctx, data) => {
|
||||
if (instance?.process) instance.process.write(buf);
|
||||
} catch (error: any) {
|
||||
// Ignore potential high frequency exceptions here
|
||||
// protocol.responseError(ctx, error);
|
||||
}
|
||||
});
|
||||
|
||||
// handle terminal resize
|
||||
// Handle terminal resize
|
||||
// interface IResizeOptions {
|
||||
// h: number;
|
||||
// w: number;
|
||||
@ -118,6 +115,6 @@ routerApp.on("stream/resize", async (ctx, data) => {
|
||||
});
|
||||
if (instance) await instance.execPreset("resize");
|
||||
} catch (error: any) {
|
||||
// protocol.responseError(ctx, error);
|
||||
// Ignore potential high frequency exceptions here
|
||||
}
|
||||
});
|
||||
|
@ -1,6 +1,5 @@
|
||||
import RouterContext from "../entity/ctx";
|
||||
|
||||
// task interface
|
||||
interface IMission {
|
||||
name: string;
|
||||
parameter: any;
|
||||
|
@ -1,7 +0,0 @@
|
||||
import { globalConfiguration } from "../entity/config";
|
||||
|
||||
export function initApiKey() {
|
||||
// Initialize the global configuration service
|
||||
globalConfiguration.load();
|
||||
const config = globalConfiguration.config;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user