This commit is contained in:
Louis Lam
2023-12-20 01:48:20 +08:00
parent 80e885e85d
commit 0f79b46769
28 changed files with 471 additions and 135 deletions

View File

@@ -2,10 +2,11 @@ import { Socket } from "socket.io";
import { Terminal } from "./terminal";
import { randomBytes } from "crypto";
import { log } from "./log";
import { ERROR_TYPE_VALIDATION } from "./util-common";
import { ERROR_TYPE_VALIDATION } from "../common/util-common";
import { R } from "redbean-node";
import { verifyPassword } from "./password-hash";
import fs from "fs";
import { DockgeInstanceManager } from "./dockge-instance-manager";
export interface JWTDecoded {
username : string;
@@ -15,6 +16,9 @@ export interface JWTDecoded {
export interface DockgeSocket extends Socket {
userID: number;
consoleTerminal? : Terminal;
instanceManager : DockgeInstanceManager;
endpoint : string;
emitAgent : (eventName : string, ...args : unknown[]) => void;
}
// For command line arguments, so they are nullable