terminal initializes successfully, scuffed intro visuals, termianl still visible with the login form, user temporarily locked to gornodox only. all algorithms work for now, needs to check for bugs and merge to master befpre build. SIDE NOTE - *Make domain builds only from the* master *branch.*
This commit is contained in:
@@ -8,9 +8,8 @@ import { GROUP, type Group } from './etc/groupData';
|
||||
|
||||
export type BashInitArgs = {
|
||||
io?: Terminal;
|
||||
instanceId: number;
|
||||
fs: Map<number, TreeNode>;
|
||||
user: {username: string, password: string};
|
||||
fs?: VirtualFS;
|
||||
};
|
||||
|
||||
export type Result = {
|
||||
@@ -20,7 +19,6 @@ export type Result = {
|
||||
};
|
||||
|
||||
export class Bash {
|
||||
private readonly _instanceId: number;
|
||||
private vfs: VirtualFS;
|
||||
private _passwd: User[];
|
||||
private _userInstances: Stack<User>;
|
||||
@@ -30,7 +28,6 @@ export class Bash {
|
||||
private readonly _commands: Record<string, ICommand>;
|
||||
|
||||
constructor(args: BashInitArgs) {
|
||||
this._instanceId = args.instanceId
|
||||
this._commands = COMMANDS;
|
||||
this._passwd = PASSWD;
|
||||
this._group = GROUP;
|
||||
@@ -46,7 +43,7 @@ export class Bash {
|
||||
|
||||
|
||||
this.user = this._userInstances.peek()!
|
||||
this.vfs = this._terminal.fileSystem;
|
||||
this.vfs = new VirtualFS({ fs: args.fs, user: this.user});
|
||||
}
|
||||
|
||||
private _initNewUserSession(user: User): User {
|
||||
@@ -63,7 +60,7 @@ export class Bash {
|
||||
output: output,
|
||||
cmd: cmd
|
||||
};
|
||||
console.log(data);
|
||||
console.log(this.vfs.formatPath(this.vfs.getPathByInode(inode)), "TEST TEST !@#");
|
||||
this._terminal.PrintOutput(data);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user