typescript-virtual-container 1.4.0 → 1.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. package/.vscode/settings.json +2 -0
  2. package/README.md +5 -1
  3. package/benchmark-virtualshell.ts +3 -11
  4. package/builds/self-standalone.js +230 -346
  5. package/builds/self-standalone.js.map +3 -3
  6. package/builds/standalone-wo-sftp.js +156 -272
  7. package/builds/standalone-wo-sftp.js.map +3 -3
  8. package/builds/standalone.js +151 -267
  9. package/builds/standalone.js.map +3 -3
  10. package/dist/VirtualPackageManager/index.d.ts.map +1 -1
  11. package/dist/VirtualPackageManager/index.js +29 -1
  12. package/dist/VirtualShell/shell.d.ts.map +1 -1
  13. package/dist/VirtualShell/shell.js +6 -10
  14. package/dist/VirtualUserManager/index.d.ts.map +1 -1
  15. package/dist/VirtualUserManager/index.js +4 -4
  16. package/dist/commands/curl.d.ts.map +1 -1
  17. package/dist/commands/curl.js +2 -1
  18. package/dist/commands/gzip.d.ts.map +1 -1
  19. package/dist/commands/gzip.js +6 -0
  20. package/dist/commands/helpers.js +1 -1
  21. package/dist/commands/history.js +2 -2
  22. package/dist/commands/man.d.ts.map +1 -1
  23. package/dist/commands/man.js +30 -136
  24. package/dist/commands/neofetch.d.ts.map +1 -1
  25. package/dist/commands/neofetch.js +6 -0
  26. package/dist/commands/wget.d.ts.map +1 -1
  27. package/dist/commands/wget.js +11 -1
  28. package/dist/modules/linuxRootfs.d.ts +1 -1
  29. package/dist/modules/linuxRootfs.d.ts.map +1 -1
  30. package/dist/modules/linuxRootfs.js +5 -5
  31. package/dist/self-standalone.js +149 -102
  32. package/package.json +2 -2
  33. package/src/VirtualPackageManager/index.ts +29 -1
  34. package/src/VirtualShell/shell.ts +6 -11
  35. package/src/VirtualUserManager/index.ts +4 -4
  36. package/src/commands/curl.ts +2 -1
  37. package/src/commands/gzip.ts +7 -0
  38. package/src/commands/helpers.ts +1 -1
  39. package/src/commands/history.ts +2 -2
  40. package/src/commands/man.ts +38 -143
  41. package/src/commands/manuals/adduser.txt +11 -0
  42. package/src/commands/manuals/apt-cache.txt +12 -0
  43. package/src/commands/manuals/apt.txt +20 -0
  44. package/src/commands/manuals/awk.txt +13 -0
  45. package/src/commands/manuals/cat.txt +14 -0
  46. package/src/commands/manuals/cd.txt +16 -0
  47. package/src/commands/manuals/chmod.txt +16 -0
  48. package/src/commands/manuals/clear.txt +10 -0
  49. package/src/commands/manuals/cp.txt +10 -0
  50. package/src/commands/manuals/curl.txt +20 -0
  51. package/src/commands/manuals/date.txt +14 -0
  52. package/src/commands/manuals/declare.txt +12 -0
  53. package/src/commands/manuals/deluser.txt +10 -0
  54. package/src/commands/manuals/df.txt +10 -0
  55. package/src/commands/manuals/dpkg-query.txt +11 -0
  56. package/src/commands/manuals/dpkg.txt +14 -0
  57. package/src/commands/manuals/du.txt +11 -0
  58. package/src/commands/manuals/echo.txt +11 -0
  59. package/src/commands/manuals/false.txt +10 -0
  60. package/src/commands/manuals/find.txt +11 -0
  61. package/src/commands/manuals/free.txt +12 -0
  62. package/src/commands/manuals/grep.txt +13 -0
  63. package/src/commands/manuals/groups.txt +10 -0
  64. package/src/commands/manuals/gzip.txt +11 -0
  65. package/src/commands/manuals/head.txt +10 -0
  66. package/src/commands/manuals/help.txt +11 -0
  67. package/src/commands/manuals/history.txt +11 -0
  68. package/src/commands/manuals/hostname.txt +10 -0
  69. package/src/commands/manuals/id.txt +10 -0
  70. package/src/commands/manuals/kill.txt +13 -0
  71. package/src/commands/manuals/ls.txt +20 -0
  72. package/src/commands/manuals/lsb_release.txt +14 -0
  73. package/src/commands/manuals/mkdir.txt +10 -0
  74. package/src/commands/manuals/mv.txt +10 -0
  75. package/src/commands/manuals/nano.txt +11 -0
  76. package/src/commands/manuals/neofetch.txt +10 -0
  77. package/src/commands/manuals/node.txt +13 -0
  78. package/src/commands/manuals/npm.txt +13 -0
  79. package/src/commands/manuals/npx.txt +13 -0
  80. package/src/commands/manuals/passwd.txt +11 -0
  81. package/src/commands/manuals/ping.txt +10 -0
  82. package/src/commands/manuals/printf.txt +11 -0
  83. package/src/commands/manuals/ps.txt +10 -0
  84. package/src/commands/manuals/pwd.txt +10 -0
  85. package/src/commands/manuals/python3.txt +13 -0
  86. package/src/commands/manuals/readlink.txt +10 -0
  87. package/src/commands/manuals/return.txt +10 -0
  88. package/src/commands/manuals/rm.txt +10 -0
  89. package/src/commands/manuals/sed.txt +11 -0
  90. package/src/commands/manuals/set.txt +11 -0
  91. package/src/commands/manuals/shift.txt +10 -0
  92. package/src/commands/manuals/sleep.txt +10 -0
  93. package/src/commands/manuals/sort.txt +12 -0
  94. package/src/commands/manuals/source.txt +11 -0
  95. package/src/commands/manuals/ssh.txt +11 -0
  96. package/src/commands/manuals/stat.txt +10 -0
  97. package/src/commands/manuals/su.txt +13 -0
  98. package/src/commands/manuals/sudo.txt +11 -0
  99. package/src/commands/manuals/tail.txt +10 -0
  100. package/src/commands/manuals/tar.txt +19 -0
  101. package/src/commands/manuals/tee.txt +10 -0
  102. package/src/commands/manuals/test.txt +11 -0
  103. package/src/commands/manuals/touch.txt +11 -0
  104. package/src/commands/manuals/tr.txt +10 -0
  105. package/src/commands/manuals/trap.txt +10 -0
  106. package/src/commands/manuals/true.txt +10 -0
  107. package/src/commands/manuals/type.txt +10 -0
  108. package/src/commands/manuals/uname.txt +12 -0
  109. package/src/commands/manuals/uniq.txt +12 -0
  110. package/src/commands/manuals/unset.txt +10 -0
  111. package/src/commands/manuals/uptime.txt +11 -0
  112. package/src/commands/manuals/wc.txt +12 -0
  113. package/src/commands/manuals/wget.txt +12 -0
  114. package/src/commands/manuals/which.txt +10 -0
  115. package/src/commands/manuals/whoami.txt +10 -0
  116. package/src/commands/manuals/xargs.txt +10 -0
  117. package/src/commands/neofetch.ts +7 -0
  118. package/src/commands/wget.ts +12 -1
  119. package/src/modules/linuxRootfs.ts +6 -6
  120. package/src/self-standalone.ts +190 -141
  121. package/tests/helpers.test.ts +3 -3
  122. package/tests/new-features.test.ts +2 -2
@@ -0,0 +1,11 @@
1
+ NANO(1) User Commands NANO(1)
2
+
3
+ NAME
4
+ nano - simple terminal text editor
5
+
6
+ SYNOPSIS
7
+ nano FILE
8
+
9
+ DESCRIPTION
10
+ Open FILE in an interactive editor.
11
+ Save with Ctrl+O, exit with Ctrl+X.
@@ -0,0 +1,10 @@
1
+ NEOFETCH(1) User Commands NEOFETCH(1)
2
+
3
+ NAME
4
+ neofetch - display system information
5
+
6
+ SYNOPSIS
7
+ neofetch
8
+
9
+ DESCRIPTION
10
+ Print OS, kernel, uptime, package count, and related system details.
@@ -0,0 +1,13 @@
1
+ NODE(1) User Commands NODE(1)
2
+
3
+ NAME
4
+ node - virtual JavaScript runtime entry point
5
+
6
+ SYNOPSIS
7
+ node [--version] [-e SCRIPT] [-p EXPR]
8
+
9
+ DESCRIPTION
10
+ Execute JavaScript snippets in the virtual runtime.
11
+
12
+ NOTES
13
+ Requires package installation: apt install nodejs.
@@ -0,0 +1,13 @@
1
+ NPM(1) User Commands NPM(1)
2
+
3
+ NAME
4
+ npm - virtual Node.js package manager interface
5
+
6
+ SYNOPSIS
7
+ npm [--version] [COMMAND]
8
+
9
+ DESCRIPTION
10
+ Manage packages and run scripts in the virtual environment.
11
+
12
+ NOTES
13
+ Requires package installation: apt install npm.
@@ -0,0 +1,13 @@
1
+ NPX(1) User Commands NPX(1)
2
+
3
+ NAME
4
+ npx - execute package binaries from npm
5
+
6
+ SYNOPSIS
7
+ npx [--version] <command>
8
+
9
+ DESCRIPTION
10
+ Run package executables in the virtual environment.
11
+
12
+ NOTES
13
+ Requires package installation: apt install npm.
@@ -0,0 +1,11 @@
1
+ PASSWD(1) User Commands PASSWD(1)
2
+
3
+ NAME
4
+ passwd - change user password
5
+
6
+ SYNOPSIS
7
+ passwd [USER]
8
+
9
+ DESCRIPTION
10
+ Update the authentication token (password) for USER.
11
+ Without USER, change the current user's password.
@@ -0,0 +1,10 @@
1
+ PING(8) User Commands PING(8)
2
+
3
+ NAME
4
+ ping - send ICMP ECHO_REQUEST to network hosts
5
+
6
+ SYNOPSIS
7
+ ping [-c COUNT] DESTINATION
8
+
9
+ OPTIONS
10
+ -c COUNT stop after sending COUNT packets
@@ -0,0 +1,11 @@
1
+ PRINTF(1) User Commands PRINTF(1)
2
+
3
+ NAME
4
+ printf - format and print data
5
+
6
+ SYNOPSIS
7
+ printf FORMAT [ARGUMENT]...
8
+
9
+ DESCRIPTION
10
+ Print ARGUMENT(s) according to FORMAT.
11
+ Supports common conversions like %s, %d, %f, %x and escapes like \n.
@@ -0,0 +1,10 @@
1
+ PS(1) User Commands PS(1)
2
+
3
+ NAME
4
+ ps - report a snapshot of current processes
5
+
6
+ SYNOPSIS
7
+ ps [OPTION]
8
+
9
+ DESCRIPTION
10
+ Show process information for active sessions and commands.
@@ -0,0 +1,10 @@
1
+ PWD(1) User Commands PWD(1)
2
+
3
+ NAME
4
+ pwd - print name of current working directory
5
+
6
+ SYNOPSIS
7
+ pwd
8
+
9
+ DESCRIPTION
10
+ Print the absolute path of the current directory.
@@ -0,0 +1,13 @@
1
+ PYTHON3(1) User Commands PYTHON3(1)
2
+
3
+ NAME
4
+ python3 - virtual Python 3 interpreter entry point
5
+
6
+ SYNOPSIS
7
+ python3 [--version] [-V] [-c COMMAND]
8
+
9
+ DESCRIPTION
10
+ Execute Python snippets in the virtual runtime.
11
+
12
+ NOTES
13
+ Requires package installation: apt install python3.
@@ -0,0 +1,10 @@
1
+ READLINK(1) User Commands READLINK(1)
2
+
3
+ NAME
4
+ readlink - print resolved symbolic links or canonical file names
5
+
6
+ SYNOPSIS
7
+ readlink [OPTION]... FILE
8
+
9
+ OPTIONS
10
+ -f canonicalize by following every symlink in every component
@@ -0,0 +1,10 @@
1
+ RETURN(1) Shell Builtins RETURN(1)
2
+
3
+ NAME
4
+ return - return from a shell function
5
+
6
+ SYNOPSIS
7
+ return [N]
8
+
9
+ DESCRIPTION
10
+ Cause a function to exit with status N (default: last status).
@@ -0,0 +1,10 @@
1
+ RM(1) User Commands RM(1)
2
+
3
+ NAME
4
+ rm - remove files or directories
5
+
6
+ SYNOPSIS
7
+ rm [OPTION]... FILE...
8
+
9
+ OPTIONS
10
+ -r remove directories and their contents recursively
@@ -0,0 +1,11 @@
1
+ SED(1) User Commands SED(1)
2
+
3
+ NAME
4
+ sed - stream editor for filtering and transforming text
5
+
6
+ SYNOPSIS
7
+ sed [OPTION]... {-e script} [FILE]...
8
+
9
+ OPTIONS
10
+ -e SCRIPT add SCRIPT to commands to be executed
11
+ -i edit files in place
@@ -0,0 +1,11 @@
1
+ SET(1) Shell Builtins SET(1)
2
+
3
+ NAME
4
+ set - set or unset shell options and positional parameters
5
+
6
+ SYNOPSIS
7
+ set [OPTION]... [ARG]...
8
+ set [NAME=VALUE]...
9
+
10
+ DESCRIPTION
11
+ Display or modify shell variable state.
@@ -0,0 +1,10 @@
1
+ SHIFT(1) Shell Builtins SHIFT(1)
2
+
3
+ NAME
4
+ shift - shift positional parameters
5
+
6
+ SYNOPSIS
7
+ shift [N]
8
+
9
+ DESCRIPTION
10
+ Rename positional parameters by discarding the first N arguments.
@@ -0,0 +1,10 @@
1
+ SLEEP(1) User Commands SLEEP(1)
2
+
3
+ NAME
4
+ sleep - delay for a specified amount of time
5
+
6
+ SYNOPSIS
7
+ sleep NUMBER
8
+
9
+ DESCRIPTION
10
+ Pause execution for NUMBER seconds.
@@ -0,0 +1,12 @@
1
+ SORT(1) User Commands SORT(1)
2
+
3
+ NAME
4
+ sort - sort lines of text files
5
+
6
+ SYNOPSIS
7
+ sort [OPTION]... [FILE]...
8
+
9
+ OPTIONS
10
+ -r reverse the result of comparisons
11
+ -n compare according to string numerical value
12
+ -u output only the first of an equal run
@@ -0,0 +1,11 @@
1
+ SOURCE(1) Shell Builtins SOURCE(1)
2
+
3
+ NAME
4
+ source - execute commands from a file in the current shell
5
+
6
+ SYNOPSIS
7
+ source FILE
8
+ . FILE
9
+
10
+ DESCRIPTION
11
+ Read and execute commands from FILE in the current shell context.
@@ -0,0 +1,11 @@
1
+ SSH(1) OpenSSH SSH(1)
2
+
3
+ NAME
4
+ ssh - OpenSSH remote login client
5
+
6
+ SYNOPSIS
7
+ ssh [-p port] [user@]hostname [command]
8
+
9
+ DESCRIPTION
10
+ ssh (SSH client) is a program for logging into a remote machine and
11
+ for executing commands on a remote machine.
@@ -0,0 +1,10 @@
1
+ STAT(1) User Commands STAT(1)
2
+
3
+ NAME
4
+ stat - display file status
5
+
6
+ SYNOPSIS
7
+ stat [OPTION]... FILE...
8
+
9
+ OPTIONS
10
+ -c, --format=FORMAT use the specified output format
@@ -0,0 +1,13 @@
1
+ SU(1) User Commands SU(1)
2
+
3
+ NAME
4
+ su - run a command with substitute user and group ID
5
+
6
+ SYNOPSIS
7
+ su [OPTION]... [USER]
8
+
9
+ OPTIONS
10
+ - start a login shell
11
+
12
+ DESCRIPTION
13
+ Switch to another user account in the current session.
@@ -0,0 +1,11 @@
1
+ SUDO(8) User Commands SUDO(8)
2
+
3
+ NAME
4
+ sudo - execute a command as another user
5
+
6
+ SYNOPSIS
7
+ sudo [OPTION]... COMMAND [ARG]...
8
+
9
+ OPTIONS
10
+ -i run login shell as target user
11
+ -u USER run command as USER
@@ -0,0 +1,10 @@
1
+ TAIL(1) User Commands TAIL(1)
2
+
3
+ NAME
4
+ tail - output the last part of files
5
+
6
+ SYNOPSIS
7
+ tail [OPTION]... [FILE]...
8
+
9
+ OPTIONS
10
+ -n, --lines=[+]NUM output the last NUM lines
@@ -0,0 +1,19 @@
1
+ TAR(1) GNU tar Manual TAR(1)
2
+
3
+ NAME
4
+ tar - an archiving utility
5
+
6
+ SYNOPSIS
7
+ tar [OPTION...] [FILE]...
8
+
9
+ DESCRIPTION
10
+ tar saves many files together into a single tape or disk archive,
11
+ and can restore individual files from the archive.
12
+
13
+ OPTIONS
14
+ -c, --create create a new archive
15
+ -x, --extract extract files from an archive
16
+ -z, --gzip filter the archive through gzip
17
+ -f, --file=ARCHIVE use archive file or device ARCHIVE
18
+ -v, --verbose verbosely list files processed
19
+ -t, --list list the contents of an archive
@@ -0,0 +1,10 @@
1
+ TEE(1) User Commands TEE(1)
2
+
3
+ NAME
4
+ tee - read from standard input and write to standard output and files
5
+
6
+ SYNOPSIS
7
+ tee [OPTION]... [FILE]...
8
+
9
+ OPTIONS
10
+ -a append to the given FILEs, do not overwrite
@@ -0,0 +1,11 @@
1
+ TEST(1) Shell Builtins TEST(1)
2
+
3
+ NAME
4
+ test - check file types and compare values
5
+
6
+ SYNOPSIS
7
+ test EXPRESSION
8
+ [ EXPRESSION ]
9
+
10
+ DESCRIPTION
11
+ Evaluate conditional expressions for scripts and shell logic.
@@ -0,0 +1,11 @@
1
+ TOUCH(1) User Commands TOUCH(1)
2
+
3
+ NAME
4
+ touch - change file timestamps / create file
5
+
6
+ SYNOPSIS
7
+ touch FILE...
8
+
9
+ DESCRIPTION
10
+ Update access and modification times.
11
+ If FILE does not exist, create an empty file.
@@ -0,0 +1,10 @@
1
+ TR(1) User Commands TR(1)
2
+
3
+ NAME
4
+ tr - translate or delete characters
5
+
6
+ SYNOPSIS
7
+ tr [OPTION]... SET1 [SET2]
8
+
9
+ OPTIONS
10
+ -d delete characters in SET1 instead of translating
@@ -0,0 +1,10 @@
1
+ TRAP(1) Shell Builtins TRAP(1)
2
+
3
+ NAME
4
+ trap - trap signals and other events
5
+
6
+ SYNOPSIS
7
+ trap [ACTION] [SIGNAL]...
8
+
9
+ DESCRIPTION
10
+ Define or clear handlers for shell signals and EXIT.
@@ -0,0 +1,10 @@
1
+ TRUE(1) User Commands TRUE(1)
2
+
3
+ NAME
4
+ true - do nothing, successfully
5
+
6
+ SYNOPSIS
7
+ true
8
+
9
+ DESCRIPTION
10
+ Exit with a status code indicating success (0).
@@ -0,0 +1,10 @@
1
+ TYPE(1) Shell Builtins TYPE(1)
2
+
3
+ NAME
4
+ type - display how a command name is interpreted
5
+
6
+ SYNOPSIS
7
+ type NAME...
8
+
9
+ DESCRIPTION
10
+ Indicate whether NAME is a shell builtin, alias, or found in PATH.
@@ -0,0 +1,12 @@
1
+ UNAME(1) User Commands UNAME(1)
2
+
3
+ NAME
4
+ uname - print system information
5
+
6
+ SYNOPSIS
7
+ uname [OPTION]...
8
+
9
+ OPTIONS
10
+ -a print all information
11
+ -r print kernel release
12
+ -m print machine hardware name
@@ -0,0 +1,12 @@
1
+ UNIQ(1) User Commands UNIQ(1)
2
+
3
+ NAME
4
+ uniq - report or omit repeated lines
5
+
6
+ SYNOPSIS
7
+ uniq [OPTION]... [INPUT [OUTPUT]]
8
+
9
+ OPTIONS
10
+ -c prefix lines by the number of occurrences
11
+ -d only print duplicate lines
12
+ -u only print unique lines
@@ -0,0 +1,10 @@
1
+ UNSET(1) Shell Builtins UNSET(1)
2
+
3
+ NAME
4
+ unset - unset values and attributes of shell variables
5
+
6
+ SYNOPSIS
7
+ unset NAME...
8
+
9
+ DESCRIPTION
10
+ Remove one or more shell variables from the current environment.
@@ -0,0 +1,11 @@
1
+ UPTIME(1) User Commands UPTIME(1)
2
+
3
+ NAME
4
+ uptime - tell how long the system has been running
5
+
6
+ SYNOPSIS
7
+ uptime [OPTION]
8
+
9
+ OPTIONS
10
+ -p show uptime in a pretty format
11
+ -s show system up since time
@@ -0,0 +1,12 @@
1
+ WC(1) User Commands WC(1)
2
+
3
+ NAME
4
+ wc - print newline, word, and byte counts for each file
5
+
6
+ SYNOPSIS
7
+ wc [OPTION]... [FILE]...
8
+
9
+ OPTIONS
10
+ -l print the newline counts
11
+ -w print the word counts
12
+ -c print the byte counts
@@ -0,0 +1,12 @@
1
+ WGET(1) User Commands WGET(1)
2
+
3
+ NAME
4
+ wget - non-interactive network downloader
5
+
6
+ SYNOPSIS
7
+ wget [OPTION]... [URL]...
8
+
9
+ OPTIONS
10
+ -O FILE write documents to FILE
11
+ -P DIR save files to DIR
12
+ -q quiet mode
@@ -0,0 +1,10 @@
1
+ WHICH(1) User Commands WHICH(1)
2
+
3
+ NAME
4
+ which - locate a command
5
+
6
+ SYNOPSIS
7
+ which COMMAND...
8
+
9
+ DESCRIPTION
10
+ Print the path of COMMAND found in $PATH.
@@ -0,0 +1,10 @@
1
+ WHOAMI(1) User Commands WHOAMI(1)
2
+
3
+ NAME
4
+ whoami - print effective user name
5
+
6
+ SYNOPSIS
7
+ whoami
8
+
9
+ DESCRIPTION
10
+ Print the user name associated with the current effective user ID.
@@ -0,0 +1,10 @@
1
+ XARGS(1) User Commands XARGS(1)
2
+
3
+ NAME
4
+ xargs - build and execute command lines from standard input
5
+
6
+ SYNOPSIS
7
+ xargs [COMMAND [INITIAL-ARGS]]
8
+
9
+ DESCRIPTION
10
+ Read items from stdin and execute COMMAND with those items as arguments.
@@ -13,6 +13,13 @@ export const neofetchCommand: ShellModule = {
13
13
  category: "system",
14
14
  params: ["[--off]"],
15
15
  run: ({ args, authUser, hostname, shell, env }) => {
16
+ if (!shell.packageManager.isInstalled("neofetch")) {
17
+ return {
18
+ stderr:
19
+ "bash: neofetch: command not found\nHint: install it with: apt install neofetch\n",
20
+ exitCode: 127,
21
+ };
22
+ }
16
23
  if (ifFlag(args, "--help")) {
17
24
  return {
18
25
  stdout: "Usage: neofetch [--off]",
@@ -49,7 +49,18 @@ export const wgetCommand: ShellModule = {
49
49
  };
50
50
  }
51
51
 
52
- const url = positionals[0];
52
+ const urlWithoutProtocol = positionals[0];
53
+ if (!urlWithoutProtocol) {
54
+ return {
55
+ stderr: "wget: missing URL\nUsage: wget [OPTION]... [URL]...",
56
+ exitCode: 1,
57
+ };
58
+ }
59
+
60
+ const url = urlWithoutProtocol.startsWith("http://") ||
61
+ urlWithoutProtocol.startsWith("https://")
62
+ ? urlWithoutProtocol
63
+ : `http://${urlWithoutProtocol}`;
53
64
  if (!url)
54
65
  return {
55
66
  stderr: "wget: missing URL\nUsage: wget [OPTION]... [URL]...",
@@ -8,8 +8,8 @@
8
8
  */
9
9
 
10
10
  import * as os from "node:os";
11
- import type { ShellProperties } from "../VirtualShell";
12
11
  import type VirtualFileSystem from "../VirtualFileSystem";
12
+ import type { ShellProperties } from "../VirtualShell";
13
13
  import type { VirtualUserManager } from "../VirtualUserManager";
14
14
 
15
15
  // ─── helpers ────────────────────────────────────────────────────────────────
@@ -584,7 +584,7 @@ function bootstrapRoot(vfs: VirtualFileSystem): void {
584
584
  ensureDir(vfs, "/root", 0o700);
585
585
  ensureFile(
586
586
  vfs,
587
- "/root/.bashrc",
587
+ "/home/root/.bashrc",
588
588
  `${[
589
589
  "# root .bashrc",
590
590
  "export PS1='\\[\\033[0;31m\\]\\u@\\h\\[\\033[0m\\]:\\[\\033[0;34m\\]\\w\\[\\033[0m\\]# '",
@@ -593,11 +593,11 @@ function bootstrapRoot(vfs: VirtualFileSystem): void {
593
593
  "alias la='ls -A'",
594
594
  ].join("\n")}\n`,
595
595
  );
596
- ensureFile(vfs, "/root/.profile", "[ -f ~/.bashrc ] && . ~/.bashrc\n");
596
+ ensureFile(vfs, "/home/root/.profile", "[ -f ~/.bashrc ] && . ~/.bashrc\n");
597
597
  // Fix: /home/root should map to /root for root user
598
- if (!vfs.exists("/home/root")) {
599
- vfs.symlink("/root", "/home/root");
600
- }
598
+ // if (!vfs.exists("/home/root")) {
599
+ // vfs.symlink("/root", "/home/root");
600
+ // }
601
601
  }
602
602
 
603
603
  // ─── /opt + /srv + /mnt + /media ─────────────────────────────────────────────