WIP: new abstraction layer, file system now a singleton, shell should be too

This commit is contained in:
2026-05-13 17:56:19 +02:00
parent 106abd851a
commit 619de5e1f8
24 changed files with 628 additions and 302 deletions
+1
View File
@@ -8,6 +8,7 @@ declare global {
// interface PageState {}
// interface Platform {}
}
namespace TermOS {}
}
export {};
+28 -26
View File
@@ -1,12 +1,17 @@
import { VirtualFS, type TreeNode } from './fs';
import { Terminal, type PrintData } from '../terminal/terminal';
import { Stack } from '../stack';
import { PASSWD, type User } from './etc/userData';
import { ExitCode } from './metadata';
import { COMMANDS, type CommandArgs, type CommandResultData, type ICommand } from './commandRegistry';
import { Terminal, type PrintData } from '../terminal/terminal';
import {
COMMANDS,
type CommandArgs,
type CommandResultData,
type ICommand
} from './commandRegistry';
import { GROUP, type Group } from './etc/groupData';
import { Process } from './process';
import { PASSWD, type User } from './etc/userData';
import { VirtualFS, type TreeNode } from './fs';
import type { KeybindInhibitor } from './keybindInhibitor';
import { ExitCode } from './metadata';
import { Process } from './process';
export enum Signal {
SIGINT,
@@ -16,7 +21,7 @@ export enum Signal {
export type BashInitArgs = {
io?: Terminal;
fs: Map<number, TreeNode>;
user: {username: string, password: string};
user: { username: string; password: string };
};
export type Result = {
@@ -37,7 +42,6 @@ export class Bash {
private user: User;
private _process?: Process;
constructor(args: BashInitArgs) {
this._commands = COMMANDS;
this._passwd = PASSWD;
@@ -50,29 +54,25 @@ export class Bash {
this._terminal.throwExeption(
`Failed to initialize bash instance - access denied for user ${args.user.username}`,
ExitCode.ERROR
)
);
this.user = this._userInstances.peek()!
this.user = this._userInstances.peek()!;
this.vfs = new VirtualFS({ fs: args.fs, user: this.user });
}
private _initNewUserSession(user: User): User {
if (!this._passwd.includes(user))
this._terminal.throwExeption(`user not found under the name ${user.username}`, ExitCode.ERROR)
this._terminal.throwExeption(
`user not found under the name ${user.username}`,
ExitCode.ERROR
);
this._userInstances.push(user);
return user
return user;
}
private async _initNewProcess(command: ICommand, args: CommandArgs) {
this._process = new Process(
this,
this.user.uid,
'TEMP PROCESS NAME',
command,
args
);
this._process = new Process(this, this.user.uid, 'TEMP PROCESS NAME', command, args);
//this._terminal.isProcessActive = true;
}
@@ -83,7 +83,7 @@ export class Bash {
output: output,
cmd: cmd
};
console.log(this.vfs.formatPath(this.vfs.getPathByInode(inode)), "TEST TEST !@#");
console.log(this.vfs.formatPath(this.vfs.getPathByInode(inode)), 'TEST TEST !@#');
this._terminal.PrintOutput(data);
}
@@ -127,8 +127,7 @@ export class Bash {
getProcessKeybindInhibitor(): KeybindInhibitor | null {
if (this._process) {
return this._process.getKeybindInhibitor();
}
else return null;
} else return null;
}
getTerminalWidth(): number {
@@ -140,7 +139,7 @@ export class Bash {
}
hasSudoPerms(uid: number): boolean {
return this._group[1].members.includes(uid);
return this._group[0].members.includes(uid);
}
async executeCommand(commandName: string, args: CommandArgs): Promise<Result> {
@@ -170,6 +169,10 @@ export class Bash {
return out;
}
static testMethod() {
//
}
throwError(result: Result): void {
switch (result.exitCode) {
default: {
@@ -188,8 +191,7 @@ export class Bash {
}
userLogin(username: string, passwd: string): ExitCode {
const user: User | undefined =
this._passwd.find((user) => user.username === username);
const user: User | undefined = this._passwd.find((user) => user.username === username);
if (user && user.passwd === passwd) {
this._initNewUserSession(user);
+9 -9
View File
@@ -1,10 +1,10 @@
import { isBuildCommand } from "typescript";
import type { KeyBind } from "../terminal/keybindRegistry";
import type { Bash, Result } from "./bash";
import { cd } from "./commands/cd";
import { clear } from "./commands/clear";
import { ls } from "./commands/ls";
import { testProcess } from "./commands/testAsync";
import { WebG } from '$lib/shimagic/renderer/web_g_engine';
import type { KeyBind } from '../terminal/keybindRegistry';
import type { Bash, Result } from './bash';
import { cd } from './commands/cd';
import { clear } from './commands/clear';
import { ls } from './commands/ls';
import { testProcess } from './commands/testAsync';
export type ICommand = {
method: (this: Bash, args: CommandArgs) => Result;
@@ -25,8 +25,6 @@ export type CommandResultData = {
args?: CommandArgs;
};
TermOS.Shell.Command.
export const COMMANDS = {
cd,
ls,
@@ -34,6 +32,8 @@ export const COMMANDS = {
testProcess
} as const satisfies Record<string, ICommand>;
WebG.
/* //export const commands {
return: {
method: this.cmd_return,
+1
View File
@@ -22,6 +22,7 @@ export const cmd_cd = function (this: Bash, args: CommandArgs): Result {
if (args.args[0] === '-') {
[this.getFs().cwd, this.getFs().pwd] = [this.getFs().pwd, this.getFs().cwd];
result.exitCode = ExitCode.SUCCESS;
return result;
}
-6
View File
@@ -9,9 +9,3 @@ export enum ExitCode {
SUCCESS = 0,
ERROR = 1
}
export type Permission = {
r: boolean;
w: boolean;
x: boolean;
};
+8 -12
View File
@@ -1,10 +1,9 @@
import type { Bash, Result } from "./bash";
import type { CommandArgs, ICommand } from "./commandRegistry";
import { KeybindInhibitor } from "./keybindInhibitor";
import { ExitCode } from "./metadata";
import type { Bash, Result } from './bash';
import type { CommandArgs, ICommand } from './commandRegistry';
import { KeybindInhibitor } from './keybindInhibitor';
import { ExitCode } from './metadata';
export class Process {
private _bash: Bash;
private _result: Result;
private _uid: number;
@@ -21,7 +20,7 @@ export class Process {
args: CommandArgs
) {
this._bash = _bashInstance;
this._result = { exitCode: ExitCode.ERROR, path: this._bash.getCwd() }
this._result = { exitCode: ExitCode.ERROR, path: this._bash.getCwd() };
this._uid = uid;
this._name = name;
this._initTimestamp = new Date();
@@ -37,8 +36,7 @@ export class Process {
public getKeybindInhibitor(): KeybindInhibitor | null {
if (this._keybindInhibitor) {
return this._keybindInhibitor;
}
else {
} else {
return null;
}
}
@@ -47,7 +45,7 @@ export class Process {
this._abortController.abort();
callback();
return ExitCode.SUCCESS //Only temp, need to add ExitCode.INT
return ExitCode.SUCCESS; //Only temp, need to add ExitCode.INT
}
public getUid(): number {
@@ -67,8 +65,6 @@ export class Process {
}
private async _Run(command: ICommand, bashInstance: Bash, args: CommandArgs) {
this._result = command.method.call(
bashInstance, args);
this._result = command.method.call(bashInstance, args);
}
}
+5 -8
View File
@@ -1,4 +1,3 @@
import { TermOS } from '$lib/termos/termos';
import type { TreeNode } from '../bash/fs';
//import { type ILocale } from './localeRegistry';
import { Terminal, type PageCallbacks, type TermInitArgs } from './terminal';
@@ -9,7 +8,7 @@ export function isInitializing(): boolean {
return initializing;
}
function jsonToNodeTable(data: any): Map<number, TreeNode> {
function jsonToNodeTable(data: JSON): Map<number, TreeNode> {
const FsTable: Map<number, TreeNode> = new Map<number, TreeNode>();
const entryList = Object.entries(data);
@@ -24,7 +23,7 @@ function jsonToNodeTable(data: any): Map<number, TreeNode> {
func: object.Func,
children: object.Children,
content: object.Content,
link: object.Link,
link: object.Target,
permission: {
user: {
r: object.Permission[0]?.Read,
@@ -57,7 +56,7 @@ function jsonToNodeTable(data: any): Map<number, TreeNode> {
return FsTable;
}
async function fetchFsJson(sig: string): Promise<any> {
async function fetchFsJson(sig: string): Promise<JSON> {
const signature: string | null = localStorage.getItem('signature');
if (signature !== sig || signature === null || localStorage.getItem('fs') === null) {
@@ -108,16 +107,14 @@ async function fetchLocale(id: string): Promise<any> {
return data;
}
TermOS.Shell.Bash;
export async function initTerminal(
user: { username: string; password: string },
callbackInit: PageCallbacks,
localeId: string
): Promise<Terminal> {
): Promise<Shell> {
try {
const sig = await fetchFsSignature('/src/lib/assets/fs/signature');
const fsJson = await fetchFsJson(sig);
const fsJson: JSON = await fetchFsJson(sig);
const fs: Map<number, TreeNode> = jsonToNodeTable(fsJson);
/* const locale: ILocale = {
id: localeId,
+2
View File
@@ -33,6 +33,8 @@ export type PageCallbacks = {
getFontSize: () => number;
};
TermOS.Shell;
export class Terminal {
private _bash: Bash;
private _callbacks: Partial<PageCallbacks> = {};
+3
View File
@@ -0,0 +1,3 @@
import { Command } from '../shell/command';
export class cd extends Command {}
+322
View File
@@ -0,0 +1,322 @@
import type { User } from '../shell/shell';
export class FileSystem {
static #instance: FileSystem;
private _fs: Map<number, TreeNode>;
private _root: number;
private constructor() {
const
this._fs = this._jsonToNodeTable();
this._root = this._fs.values().next().value!.inode;
if (!this._root) throw new Error('First entry in the filesystem map empty!');
}
private async _fetchFsSignature(path: string): Promise<any> {
try {
const response = await fetch(path);
if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`);
}
const data = await response.text();
return data.slice(0, 36); //32 characters of uuid + 4 dashes
} catch (error) {
console.error('Failed to fetch the file system signature', error);
}
}
private async _fetchFileSystem(path: string): Promise<any> {
const response = await fetch(path);
if (!response.ok) throw new Error('Failed to fetch the file system json');
const data = await response.json();
return data;
}
private async fetchFsJson(sig: string): Promise<JSON> {
const signature: string | null = localStorage.getItem('signature');
if (signature !== sig || signature === null || localStorage.getItem('fs') === null) {
const fs: JSON = await this._fetchFileSystem('/src/lib/assets/fs/fs.json');
localStorage.setItem('signature', sig);
localStorage.setItem('fs', JSON.stringify(fs));
console.info('FS fetched from file, new sinature:', sig);
return fs;
} else {
const fs: string | null = localStorage.getItem('fs');
if (fs === null) throw new Error('FS in LocalStorage is null!');
console.info('FS fetched from localStorage with signature:', sig);
return JSON.parse(fs);
}
}
private _jsonToNodeTable(data: JSON): Map<number, TreeNode> {
const FsTable: Map<number, TreeNode> = new Map<number, TreeNode>();
const entryList = Object.entries(data);
for (let i = 0; i < entryList.length; i++) {
const object: any = entryList[i][1];
const node: TreeNode = {
inode: object.Inode,
name: object.Name,
type: object.Type,
size: object.Size,
interactible: object.Interactible,
func: object.Func,
children: object.Children,
content: object.Content,
link: object.Target,
permission: {
user: {
r: object.Permission[0]?.Read,
w: object.Permission[0]?.Write,
x: object.Permission[0]?.Exec
},
group: {
r: object.Permission[1]?.Read,
w: object.Permission[1]?.Write,
x: object.Permission[1]?.Exec
},
other: {
r: object.Permission[2]?.Read,
w: object.Permission[2]?.Write,
x: object.Permission[2]?.Exec
}
},
owner: object.Owner,
group: object.Group,
timestamps: {
modified: new Date(object.TimeStamps.MTime),
changed: new Date(object.TimeStamps.CTime),
accessed: new Date(object.TimeStamps.ATime)
},
parent: object.Parent
};
FsTable.set(object.Inode, node);
}
return FsTable;
}
private _createNode(name: string, type: Type, path: number, user: User): void {
const currTime: Date = new Date();
const node: TreeNode = {
parent: path,
inode: this._fs.size + 1,
name: name,
type: type,
size: 4096,
children: [],
content: '',
link: -1,
permission: {
user: {
r: true,
w: true,
x: false
},
group: {
r: true,
w: false,
x: false
},
other: {
r: true,
w: false,
x: false
}
},
owner: user.uid,
group: user.gid,
timestamps: {
modified: currTime,
changed: currTime,
accessed: currTime
},
interactible: false,
func: null
};
this._fs.set(this._fs.size + 1, node);
}
private _deleteNode(inode: number): void {
this._fs.delete(inode);
}
private _iNodeToPathString(inode: number): string | null {
const currentNode = this._fs.get(inode);
if (!currentNode) return null;
if (!currentNode.parent || currentNode.inode === this._root) return '/';
const parentPath: string | null = this._iNodeToPathString(currentNode.parent);
if (!parentPath) return null;
return parentPath === '/' ? `/${currentNode.name}` : `${parentPath}/${currentNode.name}`;
}
private _pathStringToNode(path: string): TreeNode | null {
// Truncates all slatshes at the start and end of the string
const normalizedPath: string = path.replace(/^\/+|\/+$/g, '');
// Splits the path to node names and filters them out from empty strings
const pathComponents: string[] = normalizedPath.split('/').filter((node) => node.length > 0);
let currentNode: TreeNode | undefined = this._fs.get(this._root);
if (!currentNode) return null;
if (pathComponents.length === 0) return currentNode;
for (const component of pathComponents) {
const childINode: number | undefined = this._getChildNodeByName(
currentNode!,
component
)?.inode;
if (!childINode) return null;
const nextNode = this._fs.get(childINode);
if (!nextNode) return null;
currentNode = nextNode;
}
return currentNode;
}
private _getChildNodeByName(node: TreeNode, name: string): TreeNode | null {
for (const inode of node.children) {
const child = this._fs.get(inode);
if (child && child.name === name) return child;
}
return null;
}
private _isAbsolutePath = (path: string): boolean => {
return typeof path === 'string' && path.startsWith('/');
};
public getPathByINode(inode: number): string | null {
return this._iNodeToPathString(inode);
}
public formatPath(path: string, user: User): string {
if (path.startsWith(user.home)) return path.replace(user.home, '~');
return path;
}
public resolvePath(path: string, user: User): TreeNode | null {
if (path === '/') return this._fs.get(this._root)!;
let parsedPath: string = path;
if (!this._isAbsolutePath(path)) {
const trail = this._iNodeToPathString(user.cwd!);
if (!trail)
throw new Error('Somehow the current user has his cwd set to a nonexistant directory', {
cause: 'iNodeToPathString returned null from user.cwd'
});
parsedPath = `${trail}/${path}`;
}
if (path.startsWith('~')) {
const trail = user.home;
if (!trail)
throw new Error('User has his home directory set to a nonexistant one or is undefined', {
cause: 'iNodeToPathString returned null from user.home'
});
parsedPath = `${trail}/${path.replace('~', '')}`;
}
return this._pathStringToNode(parsedPath);
}
public recursiveTraversalPre(
node: TreeNode,
callback: (param: TreeNode) => void,
childIndex?: number[],
depthIndex?: number
): void | null {
if (!depthIndex) depthIndex = 0;
if (!childIndex) childIndex = [0];
if (node.type != Type.File && node.children[childIndex[depthIndex]]) {
let unNode = this._fs.get(node.children[childIndex[depthIndex]]);
if (!unNode) return null;
node = unNode;
depthIndex++;
if (!childIndex[depthIndex]) childIndex[depthIndex] = 0;
callback(node);
} else {
let unNode = this._fs.get(node.parent);
if (!unNode) return null;
node = unNode;
childIndex[depthIndex] = 0;
depthIndex--;
childIndex[depthIndex]++;
}
if (depthIndex < 0) return;
this.recursiveTraversalPre(node, callback, childIndex, depthIndex);
}
public static get instance(): FileSystem {
if(!FileSystem.#instance) {
FileSystem.#instance = new FileSystem();
}
return FileSystem.instance;
}
}
export type TreeNode = {
inode: number;
parent: number;
name: string;
type: Type;
size: number; //Size in Bytes
children: number[];
content: string; // GUID of the cache file that contains the file contents.
link: number; // Links
permission: NodePermission;
owner: number;
group: number;
timestamps: TimeStamps;
interactible: boolean;
func: any;
};
export enum Type {
Directory = 16384,
File = 32768,
SymbolicLink = 40960
}
export type NodePermission = {
user: Permission;
group: Permission;
other: Permission;
};
export type Permission = {
r: boolean;
w: boolean;
x: boolean;
};
export type TimeStamps = {
modified: Date;
changed: Date;
accessed: Date;
};
-1
View File
@@ -1 +0,0 @@
declare namespace FileSystem {}
-7
View File
@@ -1,7 +0,0 @@
namespace TermOS {
export namespace Shell {
export class Bash {
private readonly _fs: TermOS.
}
}
}
-27
View File
@@ -1,27 +0,0 @@
namespace TermOS {
export namespace Shell {
export abstract class Command {
public abstract readonly _flags: CommandFlag[];
public abstract readonly _root: boolean;
public abstract readonly _keybinds?: Map<KeyBind, () => any>;
public abstract readonly _help: string; //TODO: Dont know where to pull the help text from yet
public abstract result: CommandResult = { bin: this.constructor.name };
public abstract Main(this: Bash, flags: CommandFlag[], args: string[]) {}
}
export type CommandFlag = {
flag: string;
values?: string[];
};
export type CommandResult = {
bin: string;
flags?: CommandFlag[];
args?: string[];
path: number;
exitcode: ExitCode;
data?: any;
};
}
}
+23
View File
@@ -0,0 +1,23 @@
export abstract class Command {
public abstract readonly _flags: CommandFlag[];
public abstract readonly _root: boolean;
//public abstract readonly _keybinds?: Map<KeyBind, () => any>;
public abstract readonly _help: string; //TODO: Dont know where to pull the help text from yet
public abstract result: CommandResult;
public abstract Main(this: Shell, flags: CommandFlag[], args: string[]): void;
}
export type CommandFlag = {
flag: string;
values?: string[];
};
export type CommandResult = {
bin: string;
flags?: CommandFlag[];
args?: string[];
path: number;
exitcode: ExitCode;
data?: any;
};
@@ -1,30 +1,30 @@
import type { CommandArgs } from "$lib/stores/bash/commandRegistry";
import type { KeybindInhibitor } from "$lib/stores/bash/keybindInhibitor";
import type { ExitCode } from "$lib/stores/bash/metadata";
import type { Command, CommandResult } from "./command";
namespace TermOS {
export namespace Shell {
export class Process {
private _bash: Bash;
private _shell: Shell;
private _uid: number;
private _name: string;
private _timestamp: Date;
private _keybindInhibitor?: KeybindInhibitor;
//private _keybindInhibitor?: KeybindInhibitor;
private _abortController: AbortController;
private _result: CommandResult;
constructor(
bash: Bash,
bash: Shell,
uid: number,
name: string,
command: Command,
args: CommandArgs
) {
this._bash = bash;
this._shell = shell;
this._uid = uid;
this._name = name;
this._timestamp = new Date();
this._abortController = new AbortController();
this._result: CommandResult = { exitCode: ExitCode.ERROR, path: this._bash.getCwd() }
if(command._keybinds) {
this._keybindInhibitor = new KeybindInhibitor(command.keybinds)
}
@@ -57,7 +57,11 @@ namespace TermOS {
return this._name
}
public async get Result(): Promise<CommandResult>
public async get Result(): Promise<CommandResult> {
return this._result;
}
private async _Exec(command: Command, shell: Shell, flags: CommandFlag[], args: string[]) {
this._result = Command.
}
}
+44
View File
@@ -0,0 +1,44 @@
import type { Stack } from '$lib/stores/stack';
import { FileSystem } from '../filesystem/filesystem';
export class Shell {
private readonly _fs: FileSystem;
private _passwd: User[];
private _group: Group[];
private _commands: Command[];
private _userSessions: Stack<User>;
private user: User;
private _process?: Process;
constructor() {
this._fs = new FileSystem();
}
}
export enum ExitCode {
OK = 0,
ERR = 1,
INT = 2
}
export type User = {
username: string;
password: string;
readonly uid: number;
readonly gid: number;
home: string;
accessible: boolean;
history: string;
cwd?: number;
pwd?: number;
};
export type Group = {
groupname: string;
gid: number;
members: number[];
};
+11
View File
@@ -0,0 +1,11 @@
export namespace IO {
//const _io: HTMLElement = document.getElementById('output-wrapper');
export function PrintOutput(): void {}
export function ClearOutput(): void {
console.log('clear');
}
}
export {};
+9 -50
View File
@@ -1,33 +1,12 @@
declare namespace TermOS {
import { Shell } from "./shell/shell";
import FileSystem
export async function Initialize() {}
export declare namespace Shell {
async function _init() {}
export type User = {
username: string;
password: string;
readonly uid: number;
readonly gid: number;
home: string;
accessible: boolean;
history: string;
cwd?: number;
pwd?: number;
};
export type Group = {
groupname: string;
gid: number;
members: number[];
};
export enum ExitCode {
OK = 0,
ERR = 1,
INT = 2
}
}
export const CommandRegistry: Record<string, Command> = {
cd
} as const satisfies Record<string, Command>;
export declare namespace Terminal {
async function _init() {}
@@ -75,7 +54,6 @@ declare namespace TermOS {
}
export declare namespace FileSystem {}
}
/*
namespace TermOS {
@@ -230,22 +208,7 @@ namespace TermOS {
}
}
type TreeNode = {
inode: number;
parent: number;
name: string;
type: Type;
size: number; //Size in Bytes
children: number[];
content: string; // GUID of the cache file that contains the file contents.
link: number; // Links
permission: NodePermission;
owner: number;
group: number;
timestamps: TimeStamps;
interactible: boolean;
func: any;
}
enum Type {
Directory = 16384,
@@ -259,11 +222,7 @@ namespace TermOS {
other: Permission;
}
type TimeStamps = {
modified: Date;
changed: Date;
accessed: Date;
}
// TODO: Finish this
enum ExitCode {
View File
View File
View File
+13 -11
View File
@@ -1,11 +1,9 @@
<script lang="ts">
import { Terminal, type PrintData } from '$lib/stores/terminal/terminal';
import { onMount } from 'svelte';
import Input from './terminal/Input.svelte';
import { initTerminal, isInitializing } from '$lib/stores/terminal/init.svelte';
import { clear, print } from '$lib/stores/terminal/stdio/io';
import type { User } from '$lib/stores/bash/etc/userData';
import { ExitCode } from '$lib/stores/bash/metadata';
import { initTerminal } from '$lib/stores/terminal/init.svelte';
import { clear, print } from '$lib/stores/terminal/stdio/io';
import { Terminal, type PrintData } from '$lib/stores/terminal/terminal';
import Input from './terminal/Input.svelte';
const clearTerminal = (): void => clear();
@@ -34,8 +32,10 @@
throw new Error('cant get width of the teminal element. Its null');
}
//gets an int from padding property value (which is a string) by cutting last 2 letters "px" and parsing to int
const padding: number = parseInt(window.getComputedStyle(e, null).getPropertyValue('padding').slice(0, -2));
return e.clientWidth - (padding * 2);
const padding: number = parseInt(
window.getComputedStyle(e, null).getPropertyValue('padding').slice(0, -2)
);
return e.clientWidth - padding * 2;
}
function getFontSize() {
@@ -111,11 +111,13 @@
//let isProcessActive = $state(false);
let inputValue = $state<string>('');
</script>
<label for="input" onkeydowncapture={(event) => inputHandler(event)} class="w-11/12">
<div id="terminal" class=" transition-discrete terminal-window shadow-() h-full w-full rounded-md shadow-bg">
<div
id="terminal"
class=" terminal-window shadow-() h-full w-full rounded-md shadow-bg transition-discrete"
>
<div
class="terminal-bar flex h-9 w-full flex-row items-center rounded-t-md bg-bg-dark text-center font-terminal text-sm font-bold text-primary-dark light:bg-bg-dark-light light:text-primary-light"
>
@@ -124,7 +126,7 @@
<button class="size-2.5 cursor-pointer rounded-full p-0" title=""></button>
<button class="size-2.5 cursor-pointer rounded-full p-0" title=""></button>
</div>
<div class=" flex mr-2 grow">
<div class=" mr-2 flex grow">
<h5>{username}</h5>
<!-- prettier-ignore -->
<h5 class=" mr-2">@terminal: </h5>