Fixed FS class logic, with full support for table fs structure. Terminal sucressfully initializes (havent checked the commands) ls broken.

This commit is contained in:
2025-12-03 08:40:40 +01:00
parent 8e0ae3dd83
commit d404f5daab
8 changed files with 130 additions and 75 deletions

View File

@@ -51,7 +51,8 @@
"ATime": "2025-11-28T11:23:51.467+01:00" "ATime": "2025-11-28T11:23:51.467+01:00"
}, },
"Interactible": false, "Interactible": false,
"Func": null "Func": null,
"Parent": null
}, },
"2": { "2": {
"Inode": 2, "Inode": 2,
@@ -86,7 +87,8 @@
"ATime": "2025-11-28T11:59:00.496+01:00" "ATime": "2025-11-28T11:59:00.496+01:00"
}, },
"Interactible": false, "Interactible": false,
"Func": null "Func": null,
"Parent": 1
}, },
"3": { "3": {
"Inode": 3, "Inode": 3,
@@ -121,7 +123,8 @@
"ATime": "2025-11-28T11:59:02.496+01:00" "ATime": "2025-11-28T11:59:02.496+01:00"
}, },
"Interactible": false, "Interactible": false,
"Func": null "Func": null,
"Parent": 1
}, },
"4": { "4": {
"Inode": 4, "Inode": 4,
@@ -156,7 +159,8 @@
"ATime": "2025-11-28T11:59:04.496+01:00" "ATime": "2025-11-28T11:59:04.496+01:00"
}, },
"Interactible": false, "Interactible": false,
"Func": null "Func": null,
"Parent": 1
}, },
"5": { "5": {
"Inode": 5, "Inode": 5,
@@ -191,7 +195,8 @@
"ATime": "2025-11-28T11:59:05.496+01:00" "ATime": "2025-11-28T11:59:05.496+01:00"
}, },
"Interactible": false, "Interactible": false,
"Func": null "Func": null,
"Parent": 1
}, },
"6": { "6": {
"Inode": 6, "Inode": 6,
@@ -226,7 +231,8 @@
"ATime": "2025-11-28T11:59:06.496+01:00" "ATime": "2025-11-28T11:59:06.496+01:00"
}, },
"Interactible": false, "Interactible": false,
"Func": null "Func": null,
"Parent": 1
}, },
"7": { "7": {
"Inode": 7, "Inode": 7,
@@ -261,7 +267,8 @@
"ATime": "2025-11-28T11:59:07.496+01:00" "ATime": "2025-11-28T11:59:07.496+01:00"
}, },
"Interactible": false, "Interactible": false,
"Func": null "Func": null,
"Parent": 1
}, },
"8": { "8": {
"Inode": 8, "Inode": 8,
@@ -296,7 +303,8 @@
"ATime": "2025-11-28T11:59:08.496+01:00" "ATime": "2025-11-28T11:59:08.496+01:00"
}, },
"Interactible": false, "Interactible": false,
"Func": null "Func": null,
"Parent": 1
}, },
"9": { "9": {
"Inode": 9, "Inode": 9,
@@ -331,7 +339,8 @@
"ATime": "2025-11-28T11:59:08.496+01:00" "ATime": "2025-11-28T11:59:08.496+01:00"
}, },
"Interactible": false, "Interactible": false,
"Func": null "Func": null,
"Parent": 1
}, },
"10": { "10": {
"Inode": 10, "Inode": 10,
@@ -366,7 +375,8 @@
"ATime": "2025-11-28T11:59:10.496+01:00" "ATime": "2025-11-28T11:59:10.496+01:00"
}, },
"Interactible": false, "Interactible": false,
"Func": null "Func": null,
"Parent": 1
}, },
"11": { "11": {
"Inode": 11, "Inode": 11,
@@ -401,7 +411,8 @@
"ATime": "2025-11-28T11:59:11.496+01:00" "ATime": "2025-11-28T11:59:11.496+01:00"
}, },
"Interactible": false, "Interactible": false,
"Func": null "Func": null,
"Parent": 1
}, },
"12": { "12": {
"Inode": 12, "Inode": 12,
@@ -438,7 +449,8 @@
"ATime": "2025-11-28T11:59:11.496+01:00" "ATime": "2025-11-28T11:59:11.496+01:00"
}, },
"Interactible": false, "Interactible": false,
"Func": null "Func": null,
"Parent": 1
}, },
"13": { "13": {
"Inode": 13, "Inode": 13,
@@ -495,7 +507,8 @@
"ATime": "2025-11-28T11:59:12.496+01:00" "ATime": "2025-11-28T11:59:12.496+01:00"
}, },
"Interactible": false, "Interactible": false,
"Func": null "Func": null,
"Parent": 12
}, },
"14": { "14": {
"Inode": 14, "Inode": 14,
@@ -503,7 +516,7 @@
"Type": 32768, "Type": 32768,
"Size": 1, "Size": 1,
"Children": null, "Children": null,
"Content": "fd336aa4-042c-4ccb-92e3-36be47be3cbd", "Content": "90bd40fe-ff53-41e4-8498-f37902b9a6ca",
"Target": null, "Target": null,
"Permission": [ "Permission": [
{ {
@@ -530,7 +543,8 @@
"ATime": "2025-11-28T11:59:21.496+01:00" "ATime": "2025-11-28T11:59:21.496+01:00"
}, },
"Interactible": false, "Interactible": false,
"Func": null "Func": null,
"Parent": 13
}, },
"15": { "15": {
"Inode": 15, "Inode": 15,
@@ -565,7 +579,8 @@
"ATime": "2025-11-28T11:59:24.496+01:00" "ATime": "2025-11-28T11:59:24.496+01:00"
}, },
"Interactible": false, "Interactible": false,
"Func": null "Func": null,
"Parent": 13
}, },
"16": { "16": {
"Inode": 16, "Inode": 16,
@@ -573,7 +588,7 @@
"Type": 32768, "Type": 32768,
"Size": 1, "Size": 1,
"Children": null, "Children": null,
"Content": "7fae2a72-899d-4f0a-ac52-017a889a3772", "Content": "42b7fe6b-3c38-4a45-9fa7-3f0253b93fa8",
"Target": null, "Target": null,
"Permission": [ "Permission": [
{ {
@@ -600,7 +615,8 @@
"ATime": "2025-11-28T11:59:25.496+01:00" "ATime": "2025-11-28T11:59:25.496+01:00"
}, },
"Interactible": false, "Interactible": false,
"Func": null "Func": null,
"Parent": 13
}, },
"17": { "17": {
"Inode": 17, "Inode": 17,
@@ -635,7 +651,8 @@
"ATime": "2025-11-28T11:59:27.496+01:00" "ATime": "2025-11-28T11:59:27.496+01:00"
}, },
"Interactible": false, "Interactible": false,
"Func": null "Func": null,
"Parent": 13
}, },
"18": { "18": {
"Inode": 18, "Inode": 18,
@@ -643,7 +660,7 @@
"Type": 32768, "Type": 32768,
"Size": 1, "Size": 1,
"Children": null, "Children": null,
"Content": "f5e72260-946c-4526-8278-93fd123e1351", "Content": "563f011c-1b79-4e19-a23a-ae5d82726b85",
"Target": null, "Target": null,
"Permission": [ "Permission": [
{ {
@@ -670,7 +687,8 @@
"ATime": "2025-11-28T11:59:27.496+01:00" "ATime": "2025-11-28T11:59:27.496+01:00"
}, },
"Interactible": false, "Interactible": false,
"Func": null "Func": null,
"Parent": 13
}, },
"19": { "19": {
"Inode": 19, "Inode": 19,
@@ -705,7 +723,8 @@
"ATime": "2025-11-28T11:59:30.496+01:00" "ATime": "2025-11-28T11:59:30.496+01:00"
}, },
"Interactible": false, "Interactible": false,
"Func": null "Func": null,
"Parent": 13
}, },
"20": { "20": {
"Inode": 20, "Inode": 20,
@@ -740,7 +759,8 @@
"ATime": "2025-11-28T11:59:31.496+01:00" "ATime": "2025-11-28T11:59:31.496+01:00"
}, },
"Interactible": false, "Interactible": false,
"Func": null "Func": null,
"Parent": 13
}, },
"21": { "21": {
"Inode": 21, "Inode": 21,
@@ -775,7 +795,8 @@
"ATime": "2025-11-28T11:59:32.496+01:00" "ATime": "2025-11-28T11:59:32.496+01:00"
}, },
"Interactible": false, "Interactible": false,
"Func": null "Func": null,
"Parent": 13
}, },
"22": { "22": {
"Inode": 22, "Inode": 22,
@@ -810,7 +831,8 @@
"ATime": "2025-11-28T11:59:33.496+01:00" "ATime": "2025-11-28T11:59:33.496+01:00"
}, },
"Interactible": false, "Interactible": false,
"Func": null "Func": null,
"Parent": 13
}, },
"23": { "23": {
"Inode": 23, "Inode": 23,
@@ -818,7 +840,7 @@
"Type": 32768, "Type": 32768,
"Size": 1, "Size": 1,
"Children": null, "Children": null,
"Content": "28fac328-68ad-4832-b9af-d8e0848fc10c", "Content": "e5a592ad-7e71-4db2-9e3b-bde19f98e9ff",
"Target": null, "Target": null,
"Permission": [ "Permission": [
{ {
@@ -845,7 +867,8 @@
"ATime": "2025-11-28T11:59:33.496+01:00" "ATime": "2025-11-28T11:59:33.496+01:00"
}, },
"Interactible": false, "Interactible": false,
"Func": null "Func": null,
"Parent": 13
}, },
"24": { "24": {
"Inode": 24, "Inode": 24,
@@ -880,7 +903,8 @@
"ATime": "2025-11-28T11:59:35.496+01:00" "ATime": "2025-11-28T11:59:35.496+01:00"
}, },
"Interactible": false, "Interactible": false,
"Func": null "Func": null,
"Parent": 13
}, },
"25": { "25": {
"Inode": 25, "Inode": 25,
@@ -915,7 +939,8 @@
"ATime": "2025-11-28T11:59:36.496+01:00" "ATime": "2025-11-28T11:59:36.496+01:00"
}, },
"Interactible": false, "Interactible": false,
"Func": null "Func": null,
"Parent": 13
}, },
"26": { "26": {
"Inode": 26, "Inode": 26,
@@ -923,7 +948,7 @@
"Type": 32768, "Type": 32768,
"Size": 1, "Size": 1,
"Children": null, "Children": null,
"Content": "0151d0eb-7bac-4b21-8d80-be4a59bfcb7a", "Content": "663086d7-d96b-421c-9fd1-45e09ba892e9",
"Target": null, "Target": null,
"Permission": [ "Permission": [
{ {
@@ -950,7 +975,8 @@
"ATime": "2025-11-28T11:59:37.496+01:00" "ATime": "2025-11-28T11:59:37.496+01:00"
}, },
"Interactible": false, "Interactible": false,
"Func": null "Func": null,
"Parent": 13
}, },
"27": { "27": {
"Inode": 27, "Inode": 27,
@@ -985,7 +1011,8 @@
"ATime": "2025-11-28T11:59:39.496+01:00" "ATime": "2025-11-28T11:59:39.496+01:00"
}, },
"Interactible": false, "Interactible": false,
"Func": null "Func": null,
"Parent": 13
}, },
"28": { "28": {
"Inode": 28, "Inode": 28,
@@ -1020,7 +1047,8 @@
"ATime": "2025-11-28T11:59:40.496+01:00" "ATime": "2025-11-28T11:59:40.496+01:00"
}, },
"Interactible": false, "Interactible": false,
"Func": null "Func": null,
"Parent": 13
}, },
"29": { "29": {
"Inode": 29, "Inode": 29,
@@ -1058,7 +1086,8 @@
"ATime": "2025-11-28T11:59:41.496+01:00" "ATime": "2025-11-28T11:59:41.496+01:00"
}, },
"Interactible": false, "Interactible": false,
"Func": null "Func": null,
"Parent": 13
}, },
"30": { "30": {
"Inode": 30, "Inode": 30,
@@ -1097,7 +1126,8 @@
"ATime": "2025-11-28T11:59:42.496+01:00" "ATime": "2025-11-28T11:59:42.496+01:00"
}, },
"Interactible": false, "Interactible": false,
"Func": null "Func": null,
"Parent": 29
}, },
"31": { "31": {
"Inode": 31, "Inode": 31,
@@ -1134,7 +1164,8 @@
"ATime": "2025-11-28T11:59:43.496+01:00" "ATime": "2025-11-28T11:59:43.496+01:00"
}, },
"Interactible": false, "Interactible": false,
"Func": null "Func": null,
"Parent": 30
}, },
"32": { "32": {
"Inode": 32, "Inode": 32,
@@ -1142,7 +1173,7 @@
"Type": 32768, "Type": 32768,
"Size": 1, "Size": 1,
"Children": null, "Children": null,
"Content": "f81ac129-72be-4b84-a359-0b1d87fe8e6e", "Content": "84c0b742-78e8-4cf4-b269-7632ec9f52cb",
"Target": null, "Target": null,
"Permission": [ "Permission": [
{ {
@@ -1169,7 +1200,8 @@
"ATime": "2025-11-28T11:59:43.496+01:00" "ATime": "2025-11-28T11:59:43.496+01:00"
}, },
"Interactible": false, "Interactible": false,
"Func": null "Func": null,
"Parent": 31
}, },
"33": { "33": {
"Inode": 33, "Inode": 33,
@@ -1206,7 +1238,8 @@
"ATime": "2025-11-28T11:59:45.496+01:00" "ATime": "2025-11-28T11:59:45.496+01:00"
}, },
"Interactible": false, "Interactible": false,
"Func": null "Func": null,
"Parent": 30
}, },
"34": { "34": {
"Inode": 34, "Inode": 34,
@@ -1214,7 +1247,7 @@
"Type": 32768, "Type": 32768,
"Size": 1, "Size": 1,
"Children": null, "Children": null,
"Content": "acf81ad0-1a21-48cf-a24e-7e5172e9e41f", "Content": "d1eb218b-41a5-4c22-851e-21058eaa13f3",
"Target": null, "Target": null,
"Permission": [ "Permission": [
{ {
@@ -1241,7 +1274,8 @@
"ATime": "2025-11-28T11:59:45.496+01:00" "ATime": "2025-11-28T11:59:45.496+01:00"
}, },
"Interactible": false, "Interactible": false,
"Func": null "Func": null,
"Parent": 33
}, },
"35": { "35": {
"Inode": 35, "Inode": 35,
@@ -1278,7 +1312,8 @@
"ATime": "2025-11-28T11:59:47.496+01:00" "ATime": "2025-11-28T11:59:47.496+01:00"
}, },
"Interactible": false, "Interactible": false,
"Func": null "Func": null,
"Parent": 30
}, },
"36": { "36": {
"Inode": 36, "Inode": 36,
@@ -1286,7 +1321,7 @@
"Type": 32768, "Type": 32768,
"Size": 1, "Size": 1,
"Children": null, "Children": null,
"Content": "5bb1d2c8-044e-4d45-a60b-61810a62842a", "Content": "6a2cb265-0b6e-4613-9f43-d379ea6fae6d",
"Target": null, "Target": null,
"Permission": [ "Permission": [
{ {
@@ -1313,7 +1348,8 @@
"ATime": "2025-11-28T11:59:47.496+01:00" "ATime": "2025-11-28T11:59:47.496+01:00"
}, },
"Interactible": false, "Interactible": false,
"Func": null "Func": null,
"Parent": 35
}, },
"37": { "37": {
"Inode": 37, "Inode": 37,
@@ -1348,7 +1384,8 @@
"ATime": "2025-11-28T11:59:49.496+01:00" "ATime": "2025-11-28T11:59:49.496+01:00"
}, },
"Interactible": false, "Interactible": false,
"Func": null "Func": null,
"Parent": 29
}, },
"38": { "38": {
"Inode": 38, "Inode": 38,
@@ -1383,7 +1420,8 @@
"ATime": "2025-11-28T11:59:50.496+01:00" "ATime": "2025-11-28T11:59:50.496+01:00"
}, },
"Interactible": false, "Interactible": false,
"Func": null "Func": null,
"Parent": 13
}, },
"39": { "39": {
"Inode": 39, "Inode": 39,
@@ -1418,7 +1456,8 @@
"ATime": "2025-11-28T11:59:51.496+01:00" "ATime": "2025-11-28T11:59:51.496+01:00"
}, },
"Interactible": false, "Interactible": false,
"Func": null "Func": null,
"Parent": 13
}, },
"40": { "40": {
"Inode": 40, "Inode": 40,
@@ -1453,7 +1492,8 @@
"ATime": "2025-11-28T11:59:52.496+01:00" "ATime": "2025-11-28T11:59:52.496+01:00"
}, },
"Interactible": false, "Interactible": false,
"Func": null "Func": null,
"Parent": 13
}, },
"41": { "41": {
"Inode": 41, "Inode": 41,
@@ -1490,7 +1530,8 @@
"ATime": "2025-11-28T11:59:53.496+01:00" "ATime": "2025-11-28T11:59:53.496+01:00"
}, },
"Interactible": false, "Interactible": false,
"Func": null "Func": null,
"Parent": 13
}, },
"42": { "42": {
"Inode": 42, "Inode": 42,
@@ -1498,7 +1539,7 @@
"Type": 32768, "Type": 32768,
"Size": 171, "Size": 171,
"Children": null, "Children": null,
"Content": "7e4699bd-98a2-4a30-87b8-83d3f187a725", "Content": "d8cf8d18-9575-4c95-9a41-ccd129188603",
"Target": null, "Target": null,
"Permission": [ "Permission": [
{ {
@@ -1525,7 +1566,8 @@
"ATime": "2025-11-28T11:59:53.496+01:00" "ATime": "2025-11-28T11:59:53.496+01:00"
}, },
"Interactible": false, "Interactible": false,
"Func": null "Func": null,
"Parent": 41
}, },
"43": { "43": {
"Inode": 43, "Inode": 43,
@@ -1560,7 +1602,8 @@
"ATime": "2025-11-28T11:59:55.496+01:00" "ATime": "2025-11-28T11:59:55.496+01:00"
}, },
"Interactible": false, "Interactible": false,
"Func": null "Func": null,
"Parent": 13
}, },
"44": { "44": {
"Inode": 44, "Inode": 44,
@@ -1595,7 +1638,8 @@
"ATime": "2025-11-28T11:43:17.496+01:00" "ATime": "2025-11-28T11:43:17.496+01:00"
}, },
"Interactible": false, "Interactible": false,
"Func": null "Func": null,
"Parent": 1
}, },
"45": { "45": {
"Inode": 45, "Inode": 45,
@@ -1630,7 +1674,8 @@
"ATime": "2025-11-28T11:43:18.496+01:00" "ATime": "2025-11-28T11:43:18.496+01:00"
}, },
"Interactible": false, "Interactible": false,
"Func": null "Func": null,
"Parent": 1
}, },
"46": { "46": {
"Inode": 46, "Inode": 46,
@@ -1665,7 +1710,8 @@
"ATime": "2025-11-28T11:43:19.496+01:00" "ATime": "2025-11-28T11:43:19.496+01:00"
}, },
"Interactible": false, "Interactible": false,
"Func": null "Func": null,
"Parent": 1
}, },
"47": { "47": {
"Inode": 47, "Inode": 47,
@@ -1700,7 +1746,8 @@
"ATime": "2025-11-28T11:43:20.496+01:00" "ATime": "2025-11-28T11:43:20.496+01:00"
}, },
"Interactible": false, "Interactible": false,
"Func": null "Func": null,
"Parent": 1
}, },
"48": { "48": {
"Inode": 48, "Inode": 48,
@@ -1735,7 +1782,8 @@
"ATime": "2025-11-28T11:43:21.496+01:00" "ATime": "2025-11-28T11:43:21.496+01:00"
}, },
"Interactible": false, "Interactible": false,
"Func": null "Func": null,
"Parent": 1
}, },
"49": { "49": {
"Inode": 49, "Inode": 49,
@@ -1770,7 +1818,8 @@
"ATime": "2025-11-28T11:43:22.496+01:00" "ATime": "2025-11-28T11:43:22.496+01:00"
}, },
"Interactible": false, "Interactible": false,
"Func": null "Func": null,
"Parent": 1
}, },
"50": { "50": {
"Inode": 50, "Inode": 50,
@@ -1805,6 +1854,7 @@
"ATime": "2025-11-28T11:43:23.496+01:00" "ATime": "2025-11-28T11:43:23.496+01:00"
}, },
"Interactible": false, "Interactible": false,
"Func": null "Func": null,
"Parent": 1
} }
} }

View File

@@ -1 +1 @@
a76385a5-03d6-409b-b06f-8641a904cf85 32aac83d-ce2b-4def-977c-dcdcb6f514ee

View File

@@ -129,9 +129,9 @@ export class Bash {
} }
} }
private appendNewResult(path: string[], output: any, cmd: string) { private appendNewResult(workingDir: number, output: any, cmd: string) {
const data: PrintData = { const data: PrintData = {
path: this.vfs.formatPath(this.vfs.pathArrayToString(path)), path: this.vfs.formatPath(this.vfs.getPathByInode(workingDir)),
output: output, output: output,
cmd: cmd cmd: cmd
}; };

View File

@@ -143,7 +143,7 @@ function result_ls(this: Bash, data: any, args: CommandArgs): HTMLElement {
if (nodes.length > 1) { if (nodes.length > 1) {
const nodePath: string = const nodePath: string =
node.name === '/' ? '/:' : `${this.getFs()._getPathToNode(node).join('/').slice(1)}:`; node.name === '/' ? '/:' : `${this.getFs().getPathByInode(node.inode).slice(1)}:`;
rows.unshift(nodePath); rows.unshift(nodePath);
rows.push('\n'); rows.push('\n');
} }

View File

@@ -98,6 +98,7 @@ export class VirtualFS {
} }
private _findChildNodeByName(node: TreeNode, name: string): number { private _findChildNodeByName(node: TreeNode, name: string): number {
console.log(name, node);
for(const childINode of node.children) { for(const childINode of node.children) {
const child = this.FsTable.get(childINode); const child = this.FsTable.get(childINode);
if(child && child.name === name) { if(child && child.name === name) {
@@ -111,6 +112,10 @@ export class VirtualFS {
return typeof path === 'string' && path.startsWith('/'); return typeof path === 'string' && path.startsWith('/');
}; };
getPathByInode(inode: number): string {
return this._iNodeToPathString(inode);
}
formatPath(path: string): string { formatPath(path: string): string {
const prefix = this._iNodeToPathString(this.home); const prefix = this._iNodeToPathString(this.home);
if (path.startsWith(prefix)) { if (path.startsWith(prefix)) {
@@ -146,7 +151,7 @@ export class VirtualFS {
return node; return node;
} }
private _getPathToNode(node: TreeNode): string[] { /* private _getPathToNode(node: TreeNode): string[] {
const path: string[] = []; const path: string[] = [];
let current = node; let current = node;
path.push(node.name); path.push(node.name);
@@ -157,5 +162,5 @@ export class VirtualFS {
} }
return path; return path;
} } */
} }

View File

@@ -10,19 +10,19 @@ export function isInitializing(): boolean {
function jsonToNodeTable(data: any, parent?: number): Map<number, TreeNode> { function jsonToNodeTable(data: any, parent?: number): Map<number, TreeNode> {
const FsTable: Map<number, TreeNode> = new Map<number, TreeNode>; const FsTable: Map<number, TreeNode> = new Map<number, TreeNode>;
const keyList = Object.keys(data); const entryList = Object.entries(data);
for(const key in keyList) { for(let i = 0; i < entryList.length; i++) {
const object = data[key]; const object: any = entryList[i][1];
const node: TreeNode = { const node: TreeNode = {
inode: object.Inode, inode: object.Inode,
name: object.Name, name: object.Name,
type: object.Type, type: object.Type,
interactible: object.Interactible, interactible: object.Interactible,
func: object.Func, func: object.Func,
children: [], children: object.Children,
content: object.Content, content: object.Content,
link: object.Link || [], link: object.Link,
permission: { permission: {
user: { user: {
r: object.Permission[0]?.Read, r: object.Permission[0]?.Read,
@@ -52,7 +52,6 @@ function jsonToNodeTable(data: any, parent?: number): Map<number, TreeNode> {
FsTable.set(object.Inode, node); FsTable.set(object.Inode, node);
} }
console.log(FsTable);
return FsTable; return FsTable;
} }

View File

@@ -99,12 +99,13 @@ export class Terminal {
getCwd(): string { getCwd(): string {
const fs: VirtualFS = this.bash.getFs(); const fs: VirtualFS = this.bash.getFs();
return fs.formatPath(fs.pathArrayToString(this.bash.getCwd())); return fs.formatPath(fs.getPathByInode(this.bash.getCwd()));
} }
userLogin(username: string, passwd: string): ExitCode { //TODO: Later reimplement the backend helper methods
/* userLogin(username: string, passwd: string): ExitCode {
return this.bash.userLogin(username, passwd); return this.bash.userLogin(username, passwd);
} } */
PrintOutput(data: PrintData) { PrintOutput(data: PrintData) {
this.callbacks.print?.(data); this.callbacks.print?.(data);

View File

@@ -64,7 +64,7 @@
terminal = await initTerminal(testUser, callbackInit); terminal = await initTerminal(testUser, callbackInit);
updateTerminal(); updateTerminal();
} catch (error) { } catch (error) {
console.error('onMount trycatch failed'); console.error('onMount trycatch failed', error);
} }
}); });
</script> </script>