typescript-virtual-container 1.4.4 → 1.4.6
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.
- package/README.md +1 -1
- package/builds/self-standalone.js +321 -272
- package/builds/self-standalone.js.map +4 -4
- package/builds/standalone-wo-sftp.js +262 -212
- package/builds/standalone-wo-sftp.js.map +4 -4
- package/builds/standalone.cjs +491 -0
- package/builds/standalone.cjs.map +7 -0
- package/builds/standalone.js +266 -216
- package/builds/standalone.js.map +4 -4
- package/builds/web-full-api.min.js +5 -5
- package/builds/web-full-api.min.js.map +3 -3
- package/builds/web.min.js +5 -5
- package/builds/web.min.js.map +3 -3
- package/bun.lock +97 -0
- package/dist/Honeypot/index.d.ts.map +1 -0
- package/dist/Honeypot/index.js +299 -0
- package/dist/Honeypot/index.js.map +1 -0
- package/dist/SSHClient/index.d.ts.map +1 -0
- package/dist/SSHClient/index.js +238 -0
- package/dist/SSHClient/index.js.map +1 -0
- package/dist/SSHMimic/exec.d.ts.map +1 -0
- package/dist/SSHMimic/exec.js +28 -0
- package/dist/SSHMimic/exec.js.map +1 -0
- package/dist/SSHMimic/executor.d.ts.map +1 -0
- package/dist/SSHMimic/executor.js +161 -0
- package/dist/SSHMimic/executor.js.map +1 -0
- package/dist/SSHMimic/hostKey.d.ts.map +1 -0
- package/dist/SSHMimic/hostKey.js +18 -0
- package/dist/SSHMimic/hostKey.js.map +1 -0
- package/dist/SSHMimic/index.d.ts.map +1 -0
- package/dist/SSHMimic/index.js +250 -0
- package/dist/SSHMimic/index.js.map +1 -0
- package/dist/SSHMimic/loginBanner.d.ts.map +1 -0
- package/dist/SSHMimic/loginBanner.js +23 -0
- package/dist/SSHMimic/loginBanner.js.map +1 -0
- package/dist/SSHMimic/loginFormat.d.ts.map +1 -0
- package/dist/SSHMimic/loginFormat.js +11 -0
- package/dist/SSHMimic/loginFormat.js.map +1 -0
- package/dist/SSHMimic/prompt.d.ts.map +1 -0
- package/dist/SSHMimic/prompt.js +10 -0
- package/dist/SSHMimic/prompt.js.map +1 -0
- package/dist/SSHMimic/sftp.d.ts.map +1 -0
- package/dist/SSHMimic/sftp.js +620 -0
- package/dist/SSHMimic/sftp.js.map +1 -0
- package/dist/VirtualFileSystem/binaryPack.d.ts.map +1 -0
- package/dist/VirtualFileSystem/binaryPack.js +217 -0
- package/dist/VirtualFileSystem/binaryPack.js.map +1 -0
- package/dist/VirtualFileSystem/index.d.ts.map +1 -0
- package/dist/VirtualFileSystem/index.js +690 -0
- package/dist/VirtualFileSystem/index.js.map +1 -0
- package/dist/VirtualFileSystem/internalTypes.d.ts.map +1 -0
- package/dist/VirtualFileSystem/internalTypes.js +1 -0
- package/dist/VirtualFileSystem/internalTypes.js.map +1 -0
- package/dist/VirtualFileSystem/path.d.ts.map +1 -0
- package/dist/VirtualFileSystem/path.js +50 -0
- package/dist/VirtualFileSystem/path.js.map +1 -0
- package/dist/VirtualPackageManager/index.d.ts.map +1 -0
- package/dist/VirtualPackageManager/index.js +854 -0
- package/dist/VirtualPackageManager/index.js.map +1 -0
- package/dist/VirtualShell/index.d.ts.map +1 -0
- package/dist/VirtualShell/index.js +285 -0
- package/dist/VirtualShell/index.js.map +1 -0
- package/dist/VirtualShell/shell.d.ts.map +1 -0
- package/dist/VirtualShell/shell.js +503 -0
- package/dist/VirtualShell/shell.js.map +1 -0
- package/dist/VirtualShell/shellParser.d.ts.map +1 -0
- package/dist/VirtualShell/shellParser.js +266 -0
- package/dist/VirtualShell/shellParser.js.map +1 -0
- package/dist/VirtualUserManager/index.d.ts.map +1 -0
- package/dist/VirtualUserManager/index.js +608 -0
- package/dist/VirtualUserManager/index.js.map +1 -0
- package/dist/commands/adduser.d.ts.map +1 -0
- package/dist/commands/adduser.js +90 -0
- package/dist/commands/adduser.js.map +1 -0
- package/dist/commands/alias.d.ts.map +1 -0
- package/dist/commands/alias.js +69 -0
- package/dist/commands/alias.js.map +1 -0
- package/dist/commands/apt.d.ts.map +1 -0
- package/dist/commands/apt.js +211 -0
- package/dist/commands/apt.js.map +1 -0
- package/dist/commands/awk.d.ts.map +1 -0
- package/dist/commands/awk.js +170 -0
- package/dist/commands/awk.js.map +1 -0
- package/dist/commands/base64.d.ts.map +1 -0
- package/dist/commands/base64.js +29 -0
- package/dist/commands/base64.js.map +1 -0
- package/dist/commands/cat.d.ts.map +1 -0
- package/dist/commands/cat.js +45 -0
- package/dist/commands/cat.js.map +1 -0
- package/dist/commands/cd.d.ts.map +1 -0
- package/dist/commands/cd.js +22 -0
- package/dist/commands/cd.js.map +1 -0
- package/dist/commands/chmod.d.ts.map +1 -0
- package/dist/commands/chmod.js +88 -0
- package/dist/commands/chmod.js.map +1 -0
- package/dist/commands/clear.d.ts.map +1 -0
- package/dist/commands/clear.js +14 -0
- package/dist/commands/clear.js.map +1 -0
- package/dist/commands/command-helpers.d.ts.map +1 -0
- package/dist/commands/command-helpers.js +222 -0
- package/dist/commands/command-helpers.js.map +1 -0
- package/dist/commands/cp.d.ts.map +1 -0
- package/dist/commands/cp.js +76 -0
- package/dist/commands/cp.js.map +1 -0
- package/dist/commands/curl.d.ts.map +1 -0
- package/dist/commands/curl.js +128 -0
- package/dist/commands/curl.js.map +1 -0
- package/dist/commands/cut.d.ts.map +1 -0
- package/dist/commands/cut.js +35 -0
- package/dist/commands/cut.js.map +1 -0
- package/dist/commands/date.d.ts.map +1 -0
- package/dist/commands/date.js +29 -0
- package/dist/commands/date.js.map +1 -0
- package/dist/commands/declare.d.ts.map +1 -0
- package/dist/commands/declare.js +45 -0
- package/dist/commands/declare.js.map +1 -0
- package/dist/commands/deluser.d.ts.map +1 -0
- package/dist/commands/deluser.js +84 -0
- package/dist/commands/deluser.js.map +1 -0
- package/dist/commands/df.d.ts.map +1 -0
- package/dist/commands/df.js +22 -0
- package/dist/commands/df.js.map +1 -0
- package/dist/commands/diff.d.ts.map +1 -0
- package/dist/commands/diff.js +46 -0
- package/dist/commands/diff.js.map +1 -0
- package/dist/commands/dpkg.d.ts.map +1 -0
- package/dist/commands/dpkg.js +162 -0
- package/dist/commands/dpkg.js.map +1 -0
- package/dist/commands/du.d.ts.map +1 -0
- package/dist/commands/du.js +51 -0
- package/dist/commands/du.js.map +1 -0
- package/dist/commands/echo.d.ts.map +1 -0
- package/dist/commands/echo.js +46 -0
- package/dist/commands/echo.js.map +1 -0
- package/dist/commands/env.d.ts.map +1 -0
- package/dist/commands/env.js +21 -0
- package/dist/commands/env.js.map +1 -0
- package/dist/commands/exit.d.ts.map +1 -0
- package/dist/commands/exit.js +17 -0
- package/dist/commands/exit.js.map +1 -0
- package/dist/commands/export.d.ts.map +1 -0
- package/dist/commands/export.js +34 -0
- package/dist/commands/export.js.map +1 -0
- package/dist/commands/find.d.ts.map +1 -0
- package/dist/commands/find.js +56 -0
- package/dist/commands/find.js.map +1 -0
- package/dist/commands/free.d.ts.map +1 -0
- package/dist/commands/free.js +44 -0
- package/dist/commands/free.js.map +1 -0
- package/dist/commands/grep.d.ts.map +1 -0
- package/dist/commands/grep.js +121 -0
- package/dist/commands/grep.js.map +1 -0
- package/dist/commands/groups.d.ts.map +1 -0
- package/dist/commands/groups.js +18 -0
- package/dist/commands/groups.js.map +1 -0
- package/dist/commands/gzip.d.ts.map +1 -0
- package/dist/commands/gzip.js +83 -0
- package/dist/commands/gzip.js.map +1 -0
- package/dist/commands/head.d.ts.map +1 -0
- package/dist/commands/head.js +47 -0
- package/dist/commands/head.js.map +1 -0
- package/dist/commands/help.d.ts.map +1 -0
- package/dist/commands/help.js +124 -0
- package/dist/commands/help.js.map +1 -0
- package/dist/commands/helpers.d.ts.map +1 -0
- package/dist/commands/helpers.js +167 -0
- package/dist/commands/helpers.js.map +1 -0
- package/dist/commands/history.d.ts.map +1 -0
- package/dist/commands/history.js +27 -0
- package/dist/commands/history.js.map +1 -0
- package/dist/commands/hostname.d.ts.map +1 -0
- package/dist/commands/hostname.js +13 -0
- package/dist/commands/hostname.js.map +1 -0
- package/dist/commands/htop.d.ts.map +1 -0
- package/dist/commands/htop.js +18 -0
- package/dist/commands/htop.js.map +1 -0
- package/dist/commands/id.d.ts.map +1 -0
- package/dist/commands/id.js +18 -0
- package/dist/commands/id.js.map +1 -0
- package/dist/commands/index.d.ts.map +1 -0
- package/dist/commands/index.js +3 -0
- package/dist/commands/index.js.map +1 -0
- package/dist/commands/kill.d.ts.map +1 -0
- package/dist/commands/kill.js +19 -0
- package/dist/commands/kill.js.map +1 -0
- package/dist/commands/ln.d.ts.map +1 -0
- package/dist/commands/ln.js +67 -0
- package/dist/commands/ln.js.map +1 -0
- package/dist/commands/ls.d.ts.map +1 -0
- package/dist/commands/ls.js +201 -0
- package/dist/commands/ls.js.map +1 -0
- package/dist/commands/lsb-release.d.ts.map +1 -0
- package/dist/commands/lsb-release.js +62 -0
- package/dist/commands/lsb-release.js.map +1 -0
- package/dist/commands/man.d.ts.map +1 -0
- package/dist/commands/man.js +50 -0
- package/dist/commands/man.js.map +1 -0
- package/dist/commands/mkdir.d.ts.map +1 -0
- package/dist/commands/mkdir.js +29 -0
- package/dist/commands/mkdir.js.map +1 -0
- package/dist/commands/mv.d.ts.map +1 -0
- package/dist/commands/mv.js +43 -0
- package/dist/commands/mv.js.map +1 -0
- package/dist/commands/nano.d.ts.map +1 -0
- package/dist/commands/nano.js +35 -0
- package/dist/commands/nano.js.map +1 -0
- package/dist/commands/neofetch.d.ts.map +1 -0
- package/dist/commands/neofetch.js +49 -0
- package/dist/commands/neofetch.js.map +1 -0
- package/dist/commands/node.d.ts.map +1 -0
- package/dist/commands/node.js +317 -0
- package/dist/commands/node.js.map +1 -0
- package/dist/commands/npm.d.ts.map +1 -0
- package/dist/commands/npm.js +110 -0
- package/dist/commands/npm.js.map +1 -0
- package/dist/commands/passwd.d.ts.map +1 -0
- package/dist/commands/passwd.js +45 -0
- package/dist/commands/passwd.js.map +1 -0
- package/dist/commands/ping.d.ts.map +1 -0
- package/dist/commands/ping.js +29 -0
- package/dist/commands/ping.js.map +1 -0
- package/dist/commands/printf.d.ts.map +1 -0
- package/dist/commands/printf.js +145 -0
- package/dist/commands/printf.js.map +1 -0
- package/dist/commands/ps.d.ts.map +1 -0
- package/dist/commands/ps.js +47 -0
- package/dist/commands/ps.js.map +1 -0
- package/dist/commands/pwd.d.ts.map +1 -0
- package/dist/commands/pwd.js +8 -0
- package/dist/commands/pwd.js.map +1 -0
- package/dist/commands/python.d.ts.map +1 -0
- package/dist/commands/python.js +2059 -0
- package/dist/commands/python.js.map +1 -0
- package/dist/commands/read.d.ts.map +1 -0
- package/dist/commands/read.js +40 -0
- package/dist/commands/read.js.map +1 -0
- package/dist/commands/registry.d.ts.map +1 -0
- package/dist/commands/registry.js +235 -0
- package/dist/commands/registry.js.map +1 -0
- package/dist/commands/rm.d.ts.map +1 -0
- package/dist/commands/rm.js +37 -0
- package/dist/commands/rm.js.map +1 -0
- package/dist/commands/runtime.d.ts.map +1 -0
- package/dist/commands/runtime.js +286 -0
- package/dist/commands/runtime.js.map +1 -0
- package/dist/commands/sed.d.ts.map +1 -0
- package/dist/commands/sed.js +61 -0
- package/dist/commands/sed.js.map +1 -0
- package/dist/commands/seq.d.ts.map +1 -0
- package/dist/commands/seq.js +51 -0
- package/dist/commands/seq.js.map +1 -0
- package/dist/commands/set.d.ts.map +1 -0
- package/dist/commands/set.js +27 -0
- package/dist/commands/set.js.map +1 -0
- package/dist/commands/sh.d.ts.map +1 -0
- package/dist/commands/sh.js +432 -0
- package/dist/commands/sh.js.map +1 -0
- package/dist/commands/shift.d.ts.map +1 -0
- package/dist/commands/shift.js +63 -0
- package/dist/commands/shift.js.map +1 -0
- package/dist/commands/sleep.d.ts.map +1 -0
- package/dist/commands/sleep.js +19 -0
- package/dist/commands/sleep.js.map +1 -0
- package/dist/commands/sort.d.ts.map +1 -0
- package/dist/commands/sort.js +45 -0
- package/dist/commands/sort.js.map +1 -0
- package/dist/commands/source.d.ts.map +1 -0
- package/dist/commands/source.js +40 -0
- package/dist/commands/source.js.map +1 -0
- package/dist/commands/stat.d.ts.map +1 -0
- package/dist/commands/stat.js +57 -0
- package/dist/commands/stat.js.map +1 -0
- package/dist/commands/su.d.ts.map +1 -0
- package/dist/commands/su.js +58 -0
- package/dist/commands/su.js.map +1 -0
- package/dist/commands/sudo.d.ts.map +1 -0
- package/dist/commands/sudo.js +55 -0
- package/dist/commands/sudo.js.map +1 -0
- package/dist/commands/tail.d.ts.map +1 -0
- package/dist/commands/tail.js +48 -0
- package/dist/commands/tail.js.map +1 -0
- package/dist/commands/tar.d.ts.map +1 -0
- package/dist/commands/tar.js +103 -0
- package/dist/commands/tar.js.map +1 -0
- package/dist/commands/tee.d.ts.map +1 -0
- package/dist/commands/tee.js +37 -0
- package/dist/commands/tee.js.map +1 -0
- package/dist/commands/test.d.ts.map +1 -0
- package/dist/commands/test.js +115 -0
- package/dist/commands/test.js.map +1 -0
- package/dist/commands/touch.d.ts.map +1 -0
- package/dist/commands/touch.js +26 -0
- package/dist/commands/touch.js.map +1 -0
- package/dist/commands/tr.d.ts.map +1 -0
- package/dist/commands/tr.js +62 -0
- package/dist/commands/tr.js.map +1 -0
- package/dist/commands/tree.d.ts.map +1 -0
- package/dist/commands/tree.js +19 -0
- package/dist/commands/tree.js.map +1 -0
- package/dist/commands/true.d.ts.map +1 -0
- package/dist/commands/true.js +25 -0
- package/dist/commands/true.js.map +1 -0
- package/dist/commands/type.d.ts.map +1 -0
- package/dist/commands/type.js +40 -0
- package/dist/commands/type.js.map +1 -0
- package/dist/commands/uname.d.ts.map +1 -0
- package/dist/commands/uname.js +30 -0
- package/dist/commands/uname.js.map +1 -0
- package/dist/commands/uniq.d.ts.map +1 -0
- package/dist/commands/uniq.js +39 -0
- package/dist/commands/uniq.js.map +1 -0
- package/dist/commands/unset.d.ts.map +1 -0
- package/dist/commands/unset.js +17 -0
- package/dist/commands/unset.js.map +1 -0
- package/dist/commands/uptime.d.ts.map +1 -0
- package/dist/commands/uptime.js +49 -0
- package/dist/commands/uptime.js.map +1 -0
- package/dist/commands/wc.d.ts.map +1 -0
- package/dist/commands/wc.js +56 -0
- package/dist/commands/wc.js.map +1 -0
- package/dist/commands/wget.d.ts.map +1 -0
- package/dist/commands/wget.js +127 -0
- package/dist/commands/wget.js.map +1 -0
- package/dist/commands/which.d.ts.map +1 -0
- package/dist/commands/which.js +33 -0
- package/dist/commands/which.js.map +1 -0
- package/dist/commands/who.d.ts.map +1 -0
- package/dist/commands/who.js +23 -0
- package/dist/commands/who.js.map +1 -0
- package/dist/commands/whoami.d.ts.map +1 -0
- package/dist/commands/whoami.js +13 -0
- package/dist/commands/whoami.js.map +1 -0
- package/dist/commands/xargs.d.ts.map +1 -0
- package/dist/commands/xargs.js +22 -0
- package/dist/commands/xargs.js.map +1 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -0
- package/dist/modules/linuxRootfs.d.ts.map +1 -0
- package/dist/modules/linuxRootfs.js +620 -0
- package/dist/modules/linuxRootfs.js.map +1 -0
- package/dist/modules/neofetch.d.ts.map +1 -0
- package/dist/modules/neofetch.js +285 -0
- package/dist/modules/neofetch.js.map +1 -0
- package/dist/modules/shellInteractive.d.ts.map +1 -0
- package/dist/modules/shellInteractive.js +27 -0
- package/dist/modules/shellInteractive.js.map +1 -0
- package/dist/modules/shellRuntime.d.ts.map +1 -0
- package/dist/modules/shellRuntime.js +53 -0
- package/dist/modules/shellRuntime.js.map +1 -0
- package/dist/self-standalone.d.ts.map +1 -0
- package/dist/self-standalone.js +420 -0
- package/dist/self-standalone.js.map +1 -0
- package/dist/standalone-wo-sftp.d.ts.map +1 -0
- package/dist/standalone-wo-sftp.js +31 -0
- package/dist/standalone-wo-sftp.js.map +1 -0
- package/dist/standalone.d.ts.map +1 -0
- package/dist/standalone.js +40 -0
- package/dist/standalone.js.map +1 -0
- package/dist/types/commands.d.ts.map +1 -0
- package/dist/types/commands.js +1 -0
- package/dist/types/commands.js.map +1 -0
- package/dist/types/pipeline.d.ts.map +1 -0
- package/dist/types/pipeline.js +1 -0
- package/dist/types/pipeline.js.map +1 -0
- package/dist/types/streams.d.ts.map +1 -0
- package/dist/types/streams.js +1 -0
- package/dist/types/streams.js.map +1 -0
- package/dist/types/vfs.d.ts.map +1 -0
- package/dist/types/vfs.js +1 -0
- package/dist/types/vfs.js.map +1 -0
- package/dist/utils/expand.d.ts.map +1 -0
- package/dist/utils/expand.js +477 -0
- package/dist/utils/expand.js.map +1 -0
- package/dist/utils/perfLogger.d.ts.map +1 -0
- package/dist/utils/perfLogger.js +50 -0
- package/dist/utils/perfLogger.js.map +1 -0
- package/dist/utils/tokenize.d.ts.map +1 -0
- package/dist/utils/tokenize.js +115 -0
- package/dist/utils/tokenize.js.map +1 -0
- package/dist/utils/vfsDiff.d.ts.map +1 -0
- package/dist/utils/vfsDiff.js +178 -0
- package/dist/utils/vfsDiff.js.map +1 -0
- package/dist/web-api.d.ts.map +1 -0
- package/dist/web-api.js +47 -0
- package/dist/web-api.js.map +1 -0
- package/dist/web-full.d.ts.map +1 -0
- package/dist/web-full.js +9 -0
- package/dist/web-full.js.map +1 -0
- package/dist/web.d.ts.map +1 -0
- package/dist/web.js +774 -0
- package/dist/web.js.map +1 -0
- package/docs/.nojekyll +1 -0
- package/docs/assets/hierarchy.js +1 -0
- package/docs/assets/highlight.css +162 -0
- package/docs/assets/icons.js +18 -0
- package/docs/assets/icons.svg +1 -0
- package/docs/assets/main.js +60 -0
- package/docs/assets/navigation.js +1 -0
- package/docs/assets/search.js +1 -0
- package/docs/assets/style.css +1633 -0
- package/docs/classes/HoneyPot.html +31 -0
- package/docs/classes/SshClient.html +66 -0
- package/docs/classes/VirtualFileSystem.html +262 -0
- package/docs/classes/VirtualPackageManager.html +63 -0
- package/docs/classes/VirtualSftpServer.html +169 -0
- package/docs/classes/VirtualShell.html +265 -0
- package/docs/classes/VirtualSshServer.html +177 -0
- package/docs/classes/VirtualUserManager.html +276 -0
- package/docs/functions/assertDiff.html +6 -0
- package/docs/functions/diffSnapshots.html +7 -0
- package/docs/functions/formatDiff.html +6 -0
- package/docs/functions/getArg.html +13 -0
- package/docs/functions/getFlag.html +15 -0
- package/docs/functions/ifFlag.html +11 -0
- package/docs/hierarchy.html +1 -0
- package/docs/index.html +1842 -0
- package/docs/interfaces/AuditLogEntry.html +6 -0
- package/docs/interfaces/CommandContext.html +22 -0
- package/docs/interfaces/CommandResult.html +26 -0
- package/docs/interfaces/ExecStream.html +11 -0
- package/docs/interfaces/HoneyPotStats.html +14 -0
- package/docs/interfaces/InstalledPackage.html +20 -0
- package/docs/interfaces/NanoEditorSession.html +8 -0
- package/docs/interfaces/PackageDefinition.html +30 -0
- package/docs/interfaces/PackageFile.html +8 -0
- package/docs/interfaces/RemoveOptions.html +4 -0
- package/docs/interfaces/ShellEnv.html +6 -0
- package/docs/interfaces/ShellModule.html +14 -0
- package/docs/interfaces/ShellProperties.html +14 -0
- package/docs/interfaces/ShellStream.html +11 -0
- package/docs/interfaces/SudoChallenge.html +24 -0
- package/docs/interfaces/VfsBaseNode.html +12 -0
- package/docs/interfaces/VfsDiff.html +10 -0
- package/docs/interfaces/VfsDiffEntry.html +6 -0
- package/docs/interfaces/VfsDiffModified.html +10 -0
- package/docs/interfaces/VfsDirectoryNode.html +15 -0
- package/docs/interfaces/VfsFileNode.html +17 -0
- package/docs/interfaces/VfsOptions.html +12 -0
- package/docs/interfaces/VfsSnapshot.html +3 -0
- package/docs/interfaces/VfsSnapshotBaseNode.html +8 -0
- package/docs/interfaces/VfsSnapshotDirectoryNode.html +10 -0
- package/docs/interfaces/VfsSnapshotFileNode.html +12 -0
- package/docs/interfaces/WriteFileOptions.html +6 -0
- package/docs/media/LICENSE +21 -0
- package/docs/modules.html +1 -0
- package/docs/types/CommandMode.html +2 -0
- package/docs/types/CommandOutcome.html +2 -0
- package/docs/types/VfsNodeStats.html +2 -0
- package/docs/types/VfsNodeType.html +2 -0
- package/docs/types/VfsPersistenceMode.html +5 -0
- package/docs/types/VfsSnapshotNode.html +2 -0
- package/examples/web.min.js +5 -5
- package/package.json +6 -4
- package/src/commands/man.ts +1 -1
- package/src/self-standalone.ts +1 -1
- package/src/standalone.ts +8 -3
- package/tsconfig.json +7 -2
- package/src/Honeypot/index.d.ts.map +0 -1
- package/src/Honeypot/index.js +0 -298
- package/src/SSHClient/index.d.ts.map +0 -1
- package/src/SSHClient/index.js +0 -237
- package/src/SSHMimic/exec.d.ts.map +0 -1
- package/src/SSHMimic/exec.js +0 -27
- package/src/SSHMimic/executor.d.ts.map +0 -1
- package/src/SSHMimic/executor.js +0 -160
- package/src/SSHMimic/hostKey.d.ts.map +0 -1
- package/src/SSHMimic/hostKey.js +0 -17
- package/src/SSHMimic/index.d.ts.map +0 -1
- package/src/SSHMimic/index.js +0 -249
- package/src/SSHMimic/loginBanner.d.ts.map +0 -1
- package/src/SSHMimic/loginBanner.js +0 -22
- package/src/SSHMimic/loginFormat.d.ts.map +0 -1
- package/src/SSHMimic/loginFormat.js +0 -10
- package/src/SSHMimic/prompt.d.ts.map +0 -1
- package/src/SSHMimic/prompt.js +0 -9
- package/src/SSHMimic/sftp.d.ts.map +0 -1
- package/src/SSHMimic/sftp.js +0 -619
- package/src/VirtualFileSystem/binaryPack.d.ts.map +0 -1
- package/src/VirtualFileSystem/binaryPack.js +0 -216
- package/src/VirtualFileSystem/index.d.ts.map +0 -1
- package/src/VirtualFileSystem/index.js +0 -689
- package/src/VirtualFileSystem/internalTypes.d.ts.map +0 -1
- package/src/VirtualFileSystem/internalTypes.js +0 -0
- package/src/VirtualFileSystem/path.d.ts.map +0 -1
- package/src/VirtualFileSystem/path.js +0 -49
- package/src/VirtualPackageManager/index.d.ts.map +0 -1
- package/src/VirtualPackageManager/index.js +0 -853
- package/src/VirtualShell/index.d.ts.map +0 -1
- package/src/VirtualShell/index.js +0 -284
- package/src/VirtualShell/shell.d.ts.map +0 -1
- package/src/VirtualShell/shell.js +0 -502
- package/src/VirtualShell/shellParser.d.ts.map +0 -1
- package/src/VirtualShell/shellParser.js +0 -265
- package/src/VirtualUserManager/index.d.ts.map +0 -1
- package/src/VirtualUserManager/index.js +0 -607
- package/src/commands/adduser.d.ts.map +0 -1
- package/src/commands/adduser.js +0 -89
- package/src/commands/alias.d.ts.map +0 -1
- package/src/commands/alias.js +0 -68
- package/src/commands/apt.d.ts.map +0 -1
- package/src/commands/apt.js +0 -210
- package/src/commands/awk.d.ts.map +0 -1
- package/src/commands/awk.js +0 -169
- package/src/commands/base64.d.ts.map +0 -1
- package/src/commands/base64.js +0 -28
- package/src/commands/cat.d.ts.map +0 -1
- package/src/commands/cat.js +0 -44
- package/src/commands/cd.d.ts.map +0 -1
- package/src/commands/cd.js +0 -21
- package/src/commands/chmod.d.ts.map +0 -1
- package/src/commands/chmod.js +0 -87
- package/src/commands/clear.d.ts.map +0 -1
- package/src/commands/clear.js +0 -13
- package/src/commands/command-helpers.d.ts.map +0 -1
- package/src/commands/command-helpers.js +0 -221
- package/src/commands/cp.d.ts.map +0 -1
- package/src/commands/cp.js +0 -75
- package/src/commands/curl.d.ts.map +0 -1
- package/src/commands/curl.js +0 -127
- package/src/commands/cut.d.ts.map +0 -1
- package/src/commands/cut.js +0 -34
- package/src/commands/date.d.ts.map +0 -1
- package/src/commands/date.js +0 -28
- package/src/commands/declare.d.ts.map +0 -1
- package/src/commands/declare.js +0 -44
- package/src/commands/deluser.d.ts.map +0 -1
- package/src/commands/deluser.js +0 -83
- package/src/commands/df.d.ts.map +0 -1
- package/src/commands/df.js +0 -21
- package/src/commands/diff.d.ts.map +0 -1
- package/src/commands/diff.js +0 -45
- package/src/commands/dpkg.d.ts.map +0 -1
- package/src/commands/dpkg.js +0 -161
- package/src/commands/du.d.ts.map +0 -1
- package/src/commands/du.js +0 -50
- package/src/commands/echo.d.ts.map +0 -1
- package/src/commands/echo.js +0 -45
- package/src/commands/env.d.ts.map +0 -1
- package/src/commands/env.js +0 -20
- package/src/commands/exit.d.ts.map +0 -1
- package/src/commands/exit.js +0 -16
- package/src/commands/export.d.ts.map +0 -1
- package/src/commands/export.js +0 -33
- package/src/commands/find.d.ts.map +0 -1
- package/src/commands/find.js +0 -55
- package/src/commands/free.d.ts.map +0 -1
- package/src/commands/free.js +0 -43
- package/src/commands/grep.d.ts.map +0 -1
- package/src/commands/grep.js +0 -120
- package/src/commands/groups.d.ts.map +0 -1
- package/src/commands/groups.js +0 -17
- package/src/commands/gzip.d.ts.map +0 -1
- package/src/commands/gzip.js +0 -82
- package/src/commands/head.d.ts.map +0 -1
- package/src/commands/head.js +0 -46
- package/src/commands/help.d.ts.map +0 -1
- package/src/commands/help.js +0 -123
- package/src/commands/helpers.d.ts.map +0 -1
- package/src/commands/helpers.js +0 -166
- package/src/commands/history.d.ts.map +0 -1
- package/src/commands/history.js +0 -26
- package/src/commands/hostname.d.ts.map +0 -1
- package/src/commands/hostname.js +0 -12
- package/src/commands/htop.d.ts.map +0 -1
- package/src/commands/htop.js +0 -17
- package/src/commands/id.d.ts.map +0 -1
- package/src/commands/id.js +0 -17
- package/src/commands/index.d.ts.map +0 -1
- package/src/commands/index.js +0 -2
- package/src/commands/kill.d.ts.map +0 -1
- package/src/commands/kill.js +0 -18
- package/src/commands/ln.d.ts.map +0 -1
- package/src/commands/ln.js +0 -66
- package/src/commands/ls.d.ts.map +0 -1
- package/src/commands/ls.js +0 -200
- package/src/commands/lsb-release.d.ts.map +0 -1
- package/src/commands/lsb-release.js +0 -61
- package/src/commands/man.d.ts.map +0 -1
- package/src/commands/man.js +0 -49
- package/src/commands/mkdir.d.ts.map +0 -1
- package/src/commands/mkdir.js +0 -28
- package/src/commands/mv.d.ts.map +0 -1
- package/src/commands/mv.js +0 -42
- package/src/commands/nano.d.ts.map +0 -1
- package/src/commands/nano.js +0 -34
- package/src/commands/neofetch.d.ts.map +0 -1
- package/src/commands/neofetch.js +0 -48
- package/src/commands/node.d.ts.map +0 -1
- package/src/commands/node.js +0 -316
- package/src/commands/npm.d.ts.map +0 -1
- package/src/commands/npm.js +0 -109
- package/src/commands/passwd.d.ts.map +0 -1
- package/src/commands/passwd.js +0 -44
- package/src/commands/ping.d.ts.map +0 -1
- package/src/commands/ping.js +0 -28
- package/src/commands/printf.d.ts.map +0 -1
- package/src/commands/printf.js +0 -144
- package/src/commands/ps.d.ts.map +0 -1
- package/src/commands/ps.js +0 -46
- package/src/commands/pwd.d.ts.map +0 -1
- package/src/commands/pwd.js +0 -7
- package/src/commands/python.d.ts.map +0 -1
- package/src/commands/python.js +0 -2058
- package/src/commands/read.d.ts.map +0 -1
- package/src/commands/read.js +0 -39
- package/src/commands/registry.d.ts.map +0 -1
- package/src/commands/registry.js +0 -234
- package/src/commands/rm.d.ts.map +0 -1
- package/src/commands/rm.js +0 -36
- package/src/commands/runtime.d.ts.map +0 -1
- package/src/commands/runtime.js +0 -285
- package/src/commands/sed.d.ts.map +0 -1
- package/src/commands/sed.js +0 -60
- package/src/commands/seq.d.ts.map +0 -1
- package/src/commands/seq.js +0 -50
- package/src/commands/set.d.ts.map +0 -1
- package/src/commands/set.js +0 -26
- package/src/commands/sh.d.ts.map +0 -1
- package/src/commands/sh.js +0 -431
- package/src/commands/shift.d.ts.map +0 -1
- package/src/commands/shift.js +0 -62
- package/src/commands/sleep.d.ts.map +0 -1
- package/src/commands/sleep.js +0 -18
- package/src/commands/sort.d.ts.map +0 -1
- package/src/commands/sort.js +0 -44
- package/src/commands/source.d.ts.map +0 -1
- package/src/commands/source.js +0 -39
- package/src/commands/stat.d.ts.map +0 -1
- package/src/commands/stat.js +0 -56
- package/src/commands/su.d.ts.map +0 -1
- package/src/commands/su.js +0 -57
- package/src/commands/sudo.d.ts.map +0 -1
- package/src/commands/sudo.js +0 -54
- package/src/commands/tail.d.ts.map +0 -1
- package/src/commands/tail.js +0 -47
- package/src/commands/tar.d.ts.map +0 -1
- package/src/commands/tar.js +0 -102
- package/src/commands/tee.d.ts.map +0 -1
- package/src/commands/tee.js +0 -36
- package/src/commands/test.d.ts.map +0 -1
- package/src/commands/test.js +0 -114
- package/src/commands/touch.d.ts.map +0 -1
- package/src/commands/touch.js +0 -25
- package/src/commands/tr.d.ts.map +0 -1
- package/src/commands/tr.js +0 -61
- package/src/commands/tree.d.ts.map +0 -1
- package/src/commands/tree.js +0 -18
- package/src/commands/true.d.ts.map +0 -1
- package/src/commands/true.js +0 -24
- package/src/commands/type.d.ts.map +0 -1
- package/src/commands/type.js +0 -39
- package/src/commands/uname.d.ts.map +0 -1
- package/src/commands/uname.js +0 -29
- package/src/commands/uniq.d.ts.map +0 -1
- package/src/commands/uniq.js +0 -38
- package/src/commands/unset.d.ts.map +0 -1
- package/src/commands/unset.js +0 -16
- package/src/commands/uptime.d.ts.map +0 -1
- package/src/commands/uptime.js +0 -48
- package/src/commands/wc.d.ts.map +0 -1
- package/src/commands/wc.js +0 -55
- package/src/commands/wget.d.ts.map +0 -1
- package/src/commands/wget.js +0 -126
- package/src/commands/which.d.ts.map +0 -1
- package/src/commands/which.js +0 -32
- package/src/commands/who.d.ts.map +0 -1
- package/src/commands/who.js +0 -22
- package/src/commands/whoami.d.ts.map +0 -1
- package/src/commands/whoami.js +0 -12
- package/src/commands/xargs.d.ts.map +0 -1
- package/src/commands/xargs.js +0 -21
- package/src/index.d.ts.map +0 -1
- package/src/index.js +0 -9
- package/src/modules/linuxRootfs.d.ts.map +0 -1
- package/src/modules/linuxRootfs.js +0 -619
- package/src/modules/neofetch.d.ts.map +0 -1
- package/src/modules/neofetch.js +0 -284
- package/src/modules/shellInteractive.d.ts.map +0 -1
- package/src/modules/shellInteractive.js +0 -26
- package/src/modules/shellRuntime.d.ts.map +0 -1
- package/src/modules/shellRuntime.js +0 -52
- package/src/self-standalone.d.ts.map +0 -1
- package/src/self-standalone.js +0 -418
- package/src/standalone-wo-sftp.d.ts.map +0 -1
- package/src/standalone-wo-sftp.js +0 -30
- package/src/standalone.d.ts.map +0 -1
- package/src/standalone.js +0 -35
- package/src/types/commands.d.ts.map +0 -1
- package/src/types/commands.js +0 -0
- package/src/types/pipeline.d.ts.map +0 -1
- package/src/types/pipeline.js +0 -0
- package/src/types/streams.d.ts.map +0 -1
- package/src/types/streams.js +0 -0
- package/src/types/vfs.d.ts.map +0 -1
- package/src/types/vfs.js +0 -0
- package/src/utils/expand.d.ts.map +0 -1
- package/src/utils/expand.js +0 -476
- package/src/utils/perfLogger.d.ts.map +0 -1
- package/src/utils/perfLogger.js +0 -49
- package/src/utils/tokenize.d.ts.map +0 -1
- package/src/utils/tokenize.js +0 -114
- package/src/utils/vfsDiff.d.ts.map +0 -1
- package/src/utils/vfsDiff.js +0 -177
- package/src/web-api.d.ts.map +0 -1
- package/src/web-api.js +0 -46
- package/src/web-full.d.ts.map +0 -1
- package/src/web-full.js +0 -8
- package/src/web.d.ts.map +0 -1
- package/src/web.js +0 -773
- package/tests/command-helpers.test.d.ts +0 -2
- package/tests/command-helpers.test.d.ts.map +0 -1
- package/tests/command-helpers.test.js +0 -92
- package/tests/commands-admin-net.test.d.ts +0 -2
- package/tests/commands-admin-net.test.d.ts.map +0 -1
- package/tests/commands-admin-net.test.js +0 -353
- package/tests/commands-advanced.test.d.ts +0 -2
- package/tests/commands-advanced.test.d.ts.map +0 -1
- package/tests/commands-advanced.test.js +0 -378
- package/tests/commands-core.test.d.ts +0 -2
- package/tests/commands-core.test.d.ts.map +0 -1
- package/tests/commands-core.test.js +0 -477
- package/tests/commands-missing.test.d.ts +0 -2
- package/tests/commands-missing.test.d.ts.map +0 -1
- package/tests/commands-missing.test.js +0 -470
- package/tests/commands-specific-units.test.d.ts +0 -2
- package/tests/commands-specific-units.test.d.ts.map +0 -1
- package/tests/commands-specific-units.test.js +0 -264
- package/tests/commands-text-sys.test.d.ts +0 -2
- package/tests/commands-text-sys.test.d.ts.map +0 -1
- package/tests/commands-text-sys.test.js +0 -366
- package/tests/expand.test.d.ts +0 -2
- package/tests/expand.test.d.ts.map +0 -1
- package/tests/expand.test.js +0 -138
- package/tests/helpers.test.d.ts +0 -2
- package/tests/helpers.test.d.ts.map +0 -1
- package/tests/helpers.test.js +0 -52
- package/tests/new-features.test.d.ts +0 -2
- package/tests/new-features.test.d.ts.map +0 -1
- package/tests/new-features.test.js +0 -850
- package/tests/parser-executor.test.d.ts +0 -2
- package/tests/parser-executor.test.d.ts.map +0 -1
- package/tests/parser-executor.test.js +0 -25
- package/tests/sftp.test.d.ts +0 -2
- package/tests/sftp.test.d.ts.map +0 -1
- package/tests/sftp.test.js +0 -246
- package/tests/ssh-exec.test.d.ts +0 -2
- package/tests/ssh-exec.test.d.ts.map +0 -1
- package/tests/ssh-exec.test.js +0 -39
- package/tests/test-helper.d.ts +0 -56
- package/tests/test-helper.d.ts.map +0 -1
- package/tests/test-helper.js +0 -71
- package/tests/users.test.d.ts +0 -2
- package/tests/users.test.d.ts.map +0 -1
- package/tests/users.test.js +0 -71
- package/tests/web.test.d.ts +0 -2
- package/tests/web.test.d.ts.map +0 -1
- package/tests/web.test.js +0 -149
- /package/{src → dist}/Honeypot/index.d.ts +0 -0
- /package/{src → dist}/SSHClient/index.d.ts +0 -0
- /package/{src → dist}/SSHMimic/exec.d.ts +0 -0
- /package/{src → dist}/SSHMimic/executor.d.ts +0 -0
- /package/{src → dist}/SSHMimic/hostKey.d.ts +0 -0
- /package/{src → dist}/SSHMimic/index.d.ts +0 -0
- /package/{src → dist}/SSHMimic/loginBanner.d.ts +0 -0
- /package/{src → dist}/SSHMimic/loginFormat.d.ts +0 -0
- /package/{src → dist}/SSHMimic/prompt.d.ts +0 -0
- /package/{src → dist}/SSHMimic/sftp.d.ts +0 -0
- /package/{src → dist}/VirtualFileSystem/binaryPack.d.ts +0 -0
- /package/{src → dist}/VirtualFileSystem/index.d.ts +0 -0
- /package/{src → dist}/VirtualFileSystem/internalTypes.d.ts +0 -0
- /package/{src → dist}/VirtualFileSystem/path.d.ts +0 -0
- /package/{src → dist}/VirtualPackageManager/index.d.ts +0 -0
- /package/{src → dist}/VirtualShell/index.d.ts +0 -0
- /package/{src → dist}/VirtualShell/shell.d.ts +0 -0
- /package/{src → dist}/VirtualShell/shellParser.d.ts +0 -0
- /package/{src → dist}/VirtualUserManager/index.d.ts +0 -0
- /package/{src → dist}/commands/adduser.d.ts +0 -0
- /package/{src → dist}/commands/alias.d.ts +0 -0
- /package/{src → dist}/commands/apt.d.ts +0 -0
- /package/{src → dist}/commands/awk.d.ts +0 -0
- /package/{src → dist}/commands/base64.d.ts +0 -0
- /package/{src → dist}/commands/cat.d.ts +0 -0
- /package/{src → dist}/commands/cd.d.ts +0 -0
- /package/{src → dist}/commands/chmod.d.ts +0 -0
- /package/{src → dist}/commands/clear.d.ts +0 -0
- /package/{src → dist}/commands/command-helpers.d.ts +0 -0
- /package/{src → dist}/commands/cp.d.ts +0 -0
- /package/{src → dist}/commands/curl.d.ts +0 -0
- /package/{src → dist}/commands/cut.d.ts +0 -0
- /package/{src → dist}/commands/date.d.ts +0 -0
- /package/{src → dist}/commands/declare.d.ts +0 -0
- /package/{src → dist}/commands/deluser.d.ts +0 -0
- /package/{src → dist}/commands/df.d.ts +0 -0
- /package/{src → dist}/commands/diff.d.ts +0 -0
- /package/{src → dist}/commands/dpkg.d.ts +0 -0
- /package/{src → dist}/commands/du.d.ts +0 -0
- /package/{src → dist}/commands/echo.d.ts +0 -0
- /package/{src → dist}/commands/env.d.ts +0 -0
- /package/{src → dist}/commands/exit.d.ts +0 -0
- /package/{src → dist}/commands/export.d.ts +0 -0
- /package/{src → dist}/commands/find.d.ts +0 -0
- /package/{src → dist}/commands/free.d.ts +0 -0
- /package/{src → dist}/commands/grep.d.ts +0 -0
- /package/{src → dist}/commands/groups.d.ts +0 -0
- /package/{src → dist}/commands/gzip.d.ts +0 -0
- /package/{src → dist}/commands/head.d.ts +0 -0
- /package/{src → dist}/commands/help.d.ts +0 -0
- /package/{src → dist}/commands/helpers.d.ts +0 -0
- /package/{src → dist}/commands/history.d.ts +0 -0
- /package/{src → dist}/commands/hostname.d.ts +0 -0
- /package/{src → dist}/commands/htop.d.ts +0 -0
- /package/{src → dist}/commands/id.d.ts +0 -0
- /package/{src → dist}/commands/index.d.ts +0 -0
- /package/{src → dist}/commands/kill.d.ts +0 -0
- /package/{src → dist}/commands/ln.d.ts +0 -0
- /package/{src → dist}/commands/ls.d.ts +0 -0
- /package/{src → dist}/commands/lsb-release.d.ts +0 -0
- /package/{src → dist}/commands/man.d.ts +0 -0
- /package/{src → dist}/commands/mkdir.d.ts +0 -0
- /package/{src → dist}/commands/mv.d.ts +0 -0
- /package/{src → dist}/commands/nano.d.ts +0 -0
- /package/{src → dist}/commands/neofetch.d.ts +0 -0
- /package/{src → dist}/commands/node.d.ts +0 -0
- /package/{src → dist}/commands/npm.d.ts +0 -0
- /package/{src → dist}/commands/passwd.d.ts +0 -0
- /package/{src → dist}/commands/ping.d.ts +0 -0
- /package/{src → dist}/commands/printf.d.ts +0 -0
- /package/{src → dist}/commands/ps.d.ts +0 -0
- /package/{src → dist}/commands/pwd.d.ts +0 -0
- /package/{src → dist}/commands/python.d.ts +0 -0
- /package/{src → dist}/commands/read.d.ts +0 -0
- /package/{src → dist}/commands/registry.d.ts +0 -0
- /package/{src → dist}/commands/rm.d.ts +0 -0
- /package/{src → dist}/commands/runtime.d.ts +0 -0
- /package/{src → dist}/commands/sed.d.ts +0 -0
- /package/{src → dist}/commands/seq.d.ts +0 -0
- /package/{src → dist}/commands/set.d.ts +0 -0
- /package/{src → dist}/commands/sh.d.ts +0 -0
- /package/{src → dist}/commands/shift.d.ts +0 -0
- /package/{src → dist}/commands/sleep.d.ts +0 -0
- /package/{src → dist}/commands/sort.d.ts +0 -0
- /package/{src → dist}/commands/source.d.ts +0 -0
- /package/{src → dist}/commands/stat.d.ts +0 -0
- /package/{src → dist}/commands/su.d.ts +0 -0
- /package/{src → dist}/commands/sudo.d.ts +0 -0
- /package/{src → dist}/commands/tail.d.ts +0 -0
- /package/{src → dist}/commands/tar.d.ts +0 -0
- /package/{src → dist}/commands/tee.d.ts +0 -0
- /package/{src → dist}/commands/test.d.ts +0 -0
- /package/{src → dist}/commands/touch.d.ts +0 -0
- /package/{src → dist}/commands/tr.d.ts +0 -0
- /package/{src → dist}/commands/tree.d.ts +0 -0
- /package/{src → dist}/commands/true.d.ts +0 -0
- /package/{src → dist}/commands/type.d.ts +0 -0
- /package/{src → dist}/commands/uname.d.ts +0 -0
- /package/{src → dist}/commands/uniq.d.ts +0 -0
- /package/{src → dist}/commands/unset.d.ts +0 -0
- /package/{src → dist}/commands/uptime.d.ts +0 -0
- /package/{src → dist}/commands/wc.d.ts +0 -0
- /package/{src → dist}/commands/wget.d.ts +0 -0
- /package/{src → dist}/commands/which.d.ts +0 -0
- /package/{src → dist}/commands/who.d.ts +0 -0
- /package/{src → dist}/commands/whoami.d.ts +0 -0
- /package/{src → dist}/commands/xargs.d.ts +0 -0
- /package/{src → dist}/index.d.ts +0 -0
- /package/{src → dist}/modules/linuxRootfs.d.ts +0 -0
- /package/{src → dist}/modules/neofetch.d.ts +0 -0
- /package/{src → dist}/modules/shellInteractive.d.ts +0 -0
- /package/{src → dist}/modules/shellRuntime.d.ts +0 -0
- /package/{src → dist}/self-standalone.d.ts +0 -0
- /package/{src → dist}/standalone-wo-sftp.d.ts +0 -0
- /package/{src → dist}/standalone.d.ts +0 -0
- /package/{src → dist}/types/commands.d.ts +0 -0
- /package/{src → dist}/types/pipeline.d.ts +0 -0
- /package/{src → dist}/types/streams.d.ts +0 -0
- /package/{src → dist}/types/vfs.d.ts +0 -0
- /package/{src → dist}/utils/expand.d.ts +0 -0
- /package/{src → dist}/utils/perfLogger.d.ts +0 -0
- /package/{src → dist}/utils/tokenize.d.ts +0 -0
- /package/{src → dist}/utils/vfsDiff.d.ts +0 -0
- /package/{src → dist}/web-api.d.ts +0 -0
- /package/{src → dist}/web-full.d.ts +0 -0
- /package/{src → dist}/web.d.ts +0 -0
|
@@ -0,0 +1,854 @@
|
|
|
1
|
+
// ─── built-in package registry ───────────────────────────────────────────────
|
|
2
|
+
const PACKAGE_REGISTRY = [
|
|
3
|
+
{
|
|
4
|
+
name: "vim",
|
|
5
|
+
version: "2:9.0.1378-2",
|
|
6
|
+
section: "editors",
|
|
7
|
+
description: "Vi IMproved - enhanced vi editor",
|
|
8
|
+
shortDesc: "Vi IMproved",
|
|
9
|
+
installedSizeKb: 3812,
|
|
10
|
+
files: [
|
|
11
|
+
{
|
|
12
|
+
path: "/usr/bin/vim",
|
|
13
|
+
content: "#!/bin/sh\necho 'vim: use nano for editing in this environment'\n",
|
|
14
|
+
mode: 0o755,
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
path: "/usr/bin/vi",
|
|
18
|
+
content: '#!/bin/sh\nexec vim "$@"\n',
|
|
19
|
+
mode: 0o755,
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
path: "/usr/share/doc/vim/README",
|
|
23
|
+
content: "Vim editor — virtual package.\n",
|
|
24
|
+
},
|
|
25
|
+
],
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
name: "git",
|
|
29
|
+
version: "1:2.39.2-1",
|
|
30
|
+
section: "vcs",
|
|
31
|
+
description: "Fast, scalable, distributed revision control system",
|
|
32
|
+
shortDesc: "fast distributed version control system",
|
|
33
|
+
installedSizeKb: 11240,
|
|
34
|
+
files: [
|
|
35
|
+
{
|
|
36
|
+
path: "/usr/bin/git",
|
|
37
|
+
content: "#!/bin/sh\necho 'git: virtual stub — no host access'\n",
|
|
38
|
+
mode: 0o755,
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
path: "/usr/share/doc/git/README.Debian",
|
|
42
|
+
content: "Git virtual package for Fortune GNU/Linux.\n",
|
|
43
|
+
},
|
|
44
|
+
],
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
name: "python3",
|
|
48
|
+
version: "3.11.2-1+b1",
|
|
49
|
+
section: "python",
|
|
50
|
+
description: "Interactive high-level object-oriented language (version 3)",
|
|
51
|
+
shortDesc: "interactive high-level object-oriented language",
|
|
52
|
+
installedSizeKb: 512,
|
|
53
|
+
depends: ["python3-minimal"],
|
|
54
|
+
files: [
|
|
55
|
+
{
|
|
56
|
+
path: "/usr/bin/python3",
|
|
57
|
+
content: "#!/bin/sh\necho 'Python 3.11.2 (virtual)'\n",
|
|
58
|
+
mode: 0o755,
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
path: "/usr/bin/python3.11",
|
|
62
|
+
content: '#!/bin/sh\nexec python3 "$@"\n',
|
|
63
|
+
mode: 0o755,
|
|
64
|
+
},
|
|
65
|
+
{ path: "/usr/lib/python3.11/.keep", content: "" },
|
|
66
|
+
],
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
name: "python3-minimal",
|
|
70
|
+
version: "3.11.2-1+b1",
|
|
71
|
+
section: "python",
|
|
72
|
+
description: "Minimal subset of the Python language (version 3)",
|
|
73
|
+
shortDesc: "minimal subset of Python language",
|
|
74
|
+
installedSizeKb: 196,
|
|
75
|
+
files: [{ path: "/usr/lib/python3-minimal/.keep", content: "" }],
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
name: "nodejs",
|
|
79
|
+
version: "18.19.0+dfsg-6",
|
|
80
|
+
section: "javascript",
|
|
81
|
+
description: "Evented I/O for V8 javascript - runtime executable",
|
|
82
|
+
shortDesc: "Node.js JavaScript runtime",
|
|
83
|
+
installedSizeKb: 15360,
|
|
84
|
+
files: [
|
|
85
|
+
{
|
|
86
|
+
path: "/usr/bin/node",
|
|
87
|
+
content: "#!/bin/sh\necho 'node v18.19.0 (virtual)'\n",
|
|
88
|
+
mode: 0o755,
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
path: "/usr/bin/nodejs",
|
|
92
|
+
content: '#!/bin/sh\nexec node "$@"\n',
|
|
93
|
+
mode: 0o755,
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
path: "/usr/share/doc/nodejs/README",
|
|
97
|
+
content: "Node.js virtual package.\n",
|
|
98
|
+
},
|
|
99
|
+
],
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
name: "npm",
|
|
103
|
+
version: "9.2.0~ds1-2",
|
|
104
|
+
section: "javascript",
|
|
105
|
+
description: "package manager for Node.js",
|
|
106
|
+
shortDesc: "package manager for Node.js",
|
|
107
|
+
installedSizeKb: 9814,
|
|
108
|
+
depends: ["nodejs"],
|
|
109
|
+
files: [
|
|
110
|
+
{
|
|
111
|
+
path: "/usr/bin/npm",
|
|
112
|
+
content: '#!/bin/sh\nexec builtin npm "$@"\n',
|
|
113
|
+
mode: 0o755,
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
path: "/usr/bin/npx",
|
|
117
|
+
content: '#!/bin/sh\nexec builtin npx "$@"\n',
|
|
118
|
+
mode: 0o755,
|
|
119
|
+
},
|
|
120
|
+
],
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
name: "curl",
|
|
124
|
+
version: "7.88.1-10+deb12u5",
|
|
125
|
+
section: "web",
|
|
126
|
+
description: "command line tool for transferring data with URL syntax",
|
|
127
|
+
shortDesc: "command line tool for transferring data",
|
|
128
|
+
installedSizeKb: 368,
|
|
129
|
+
files: [
|
|
130
|
+
{
|
|
131
|
+
path: "/usr/bin/curl",
|
|
132
|
+
content: '#!/bin/sh\nexec builtin curl "$@"\n',
|
|
133
|
+
mode: 0o755,
|
|
134
|
+
},
|
|
135
|
+
],
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
name: "wget",
|
|
139
|
+
version: "1.21.3-1+b2",
|
|
140
|
+
section: "web",
|
|
141
|
+
description: "Retrieves files from the web",
|
|
142
|
+
shortDesc: "retrieves files from the web",
|
|
143
|
+
installedSizeKb: 952,
|
|
144
|
+
files: [
|
|
145
|
+
{
|
|
146
|
+
path: "/usr/bin/wget",
|
|
147
|
+
content: '#!/bin/sh\nexec builtin wget "$@"\n',
|
|
148
|
+
mode: 0o755,
|
|
149
|
+
},
|
|
150
|
+
],
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
name: "htop",
|
|
154
|
+
version: "3.2.2-2",
|
|
155
|
+
section: "utils",
|
|
156
|
+
description: "interactive processes viewer",
|
|
157
|
+
shortDesc: "interactive process viewer",
|
|
158
|
+
installedSizeKb: 412,
|
|
159
|
+
files: [
|
|
160
|
+
{
|
|
161
|
+
path: "/usr/bin/htop",
|
|
162
|
+
content: "#!/bin/sh\nexec builtin htop\n",
|
|
163
|
+
mode: 0o755,
|
|
164
|
+
},
|
|
165
|
+
],
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
name: "openssh-client",
|
|
169
|
+
version: "1:9.2p1-2+deb12u2",
|
|
170
|
+
section: "net",
|
|
171
|
+
description: "Secure Shell (SSH) client",
|
|
172
|
+
shortDesc: "secure shell (SSH) client",
|
|
173
|
+
installedSizeKb: 4540,
|
|
174
|
+
files: [
|
|
175
|
+
{
|
|
176
|
+
path: "/usr/bin/ssh",
|
|
177
|
+
content: "#!/bin/sh\necho 'ssh: virtual stub'\n",
|
|
178
|
+
mode: 0o755,
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
path: "/usr/bin/ssh-keygen",
|
|
182
|
+
content: "#!/bin/sh\necho 'ssh-keygen: virtual stub'\n",
|
|
183
|
+
mode: 0o755,
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
path: "/etc/ssh/ssh_config",
|
|
187
|
+
content: "Host *\n StrictHostKeyChecking ask\n",
|
|
188
|
+
},
|
|
189
|
+
],
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
name: "openssh-server",
|
|
193
|
+
version: "1:9.2p1-2+deb12u2",
|
|
194
|
+
section: "net",
|
|
195
|
+
description: "Secure Shell server (sshd)",
|
|
196
|
+
shortDesc: "secure shell server",
|
|
197
|
+
installedSizeKb: 1732,
|
|
198
|
+
depends: ["openssh-client"],
|
|
199
|
+
files: [
|
|
200
|
+
{
|
|
201
|
+
path: "/usr/sbin/sshd",
|
|
202
|
+
content: "#!/bin/sh\necho 'sshd: virtual — server already running'\n",
|
|
203
|
+
mode: 0o755,
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
path: "/etc/ssh/sshd_config",
|
|
207
|
+
content: "Port 22\nPermitRootLogin yes\nPasswordAuthentication yes\n",
|
|
208
|
+
},
|
|
209
|
+
],
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
name: "net-tools",
|
|
213
|
+
version: "2.10-0.1",
|
|
214
|
+
section: "net",
|
|
215
|
+
description: "NET-3 networking toolkit (ifconfig, netstat, route)",
|
|
216
|
+
shortDesc: "networking toolkit",
|
|
217
|
+
installedSizeKb: 988,
|
|
218
|
+
files: [
|
|
219
|
+
{
|
|
220
|
+
path: "/usr/bin/ifconfig",
|
|
221
|
+
content: "#!/bin/sh\necho 'eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500'\necho ' inet 10.0.0.2 netmask 255.255.255.0 broadcast 10.0.0.255'\necho ' ether 02:42:0a:00:00:02 txqueuelen 0 (Ethernet)'\n",
|
|
222
|
+
mode: 0o755,
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
path: "/usr/bin/netstat",
|
|
226
|
+
content: "#!/bin/sh\necho 'Active Internet connections (only servers)'\necho 'Proto Recv-Q Send-Q Local Address Foreign Address State'\n",
|
|
227
|
+
mode: 0o755,
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
path: "/usr/bin/route",
|
|
231
|
+
content: "#!/bin/sh\necho 'Kernel IP routing table'\necho 'Destination Gateway Genmask Flags Metric Ref Use Iface'\necho '0.0.0.0 10.0.0.1 0.0.0.0 UG 0 0 0 eth0'\n",
|
|
232
|
+
mode: 0o755,
|
|
233
|
+
},
|
|
234
|
+
],
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
name: "iputils-ping",
|
|
238
|
+
version: "3:20221126-1",
|
|
239
|
+
section: "net",
|
|
240
|
+
description: "Tools to test the reachability of network hosts",
|
|
241
|
+
shortDesc: "test reachability of network hosts",
|
|
242
|
+
installedSizeKb: 164,
|
|
243
|
+
files: [
|
|
244
|
+
{
|
|
245
|
+
path: "/usr/bin/ping",
|
|
246
|
+
content: '#!/bin/sh\nexec builtin ping "$@"\n',
|
|
247
|
+
mode: 0o755,
|
|
248
|
+
},
|
|
249
|
+
],
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
name: "jq",
|
|
253
|
+
version: "1.6-2.1",
|
|
254
|
+
section: "utils",
|
|
255
|
+
description: "Lightweight and flexible command-line JSON processor",
|
|
256
|
+
shortDesc: "command-line JSON processor",
|
|
257
|
+
installedSizeKb: 296,
|
|
258
|
+
files: [
|
|
259
|
+
{
|
|
260
|
+
path: "/usr/bin/jq",
|
|
261
|
+
content: "#!/bin/sh\necho 'jq: virtual stub — pipe JSON here'\n",
|
|
262
|
+
mode: 0o755,
|
|
263
|
+
},
|
|
264
|
+
],
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
name: "build-essential",
|
|
268
|
+
version: "12.9",
|
|
269
|
+
section: "devel",
|
|
270
|
+
description: "Informational list of build-essential packages",
|
|
271
|
+
shortDesc: "build-essential meta-package",
|
|
272
|
+
installedSizeKb: 12,
|
|
273
|
+
depends: ["gcc", "g++", "make"],
|
|
274
|
+
files: [
|
|
275
|
+
{
|
|
276
|
+
path: "/usr/share/doc/build-essential/README",
|
|
277
|
+
content: "Build-essential virtual meta-package.\n",
|
|
278
|
+
},
|
|
279
|
+
],
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
name: "gcc",
|
|
283
|
+
version: "4:12.2.0-3",
|
|
284
|
+
section: "devel",
|
|
285
|
+
description: "GNU C compiler",
|
|
286
|
+
shortDesc: "GNU C compiler",
|
|
287
|
+
installedSizeKb: 24448,
|
|
288
|
+
files: [
|
|
289
|
+
{
|
|
290
|
+
path: "/usr/bin/gcc",
|
|
291
|
+
content: "#!/bin/sh\necho 'gcc (Fortune GNU/Linux) 12.2.0 (virtual)'\n",
|
|
292
|
+
mode: 0o755,
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
path: "/usr/bin/gcc-12",
|
|
296
|
+
content: '#!/bin/sh\nexec gcc "$@"\n',
|
|
297
|
+
mode: 0o755,
|
|
298
|
+
},
|
|
299
|
+
],
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
name: "g++",
|
|
303
|
+
version: "4:12.2.0-3",
|
|
304
|
+
section: "devel",
|
|
305
|
+
description: "GNU C++ compiler",
|
|
306
|
+
shortDesc: "GNU C++ compiler",
|
|
307
|
+
installedSizeKb: 1024,
|
|
308
|
+
depends: ["gcc"],
|
|
309
|
+
files: [
|
|
310
|
+
{
|
|
311
|
+
path: "/usr/bin/g++",
|
|
312
|
+
content: "#!/bin/sh\necho 'g++ (Fortune GNU/Linux) 12.2.0 (virtual)'\n",
|
|
313
|
+
mode: 0o755,
|
|
314
|
+
},
|
|
315
|
+
],
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
name: "make",
|
|
319
|
+
version: "4.3-4.1",
|
|
320
|
+
section: "devel",
|
|
321
|
+
description: "Utility for directing compilation",
|
|
322
|
+
shortDesc: "build utility",
|
|
323
|
+
installedSizeKb: 504,
|
|
324
|
+
files: [
|
|
325
|
+
{
|
|
326
|
+
path: "/usr/bin/make",
|
|
327
|
+
content: "#!/bin/sh\necho 'make: *** No targets specified and no makefile found. Stop.'\nexit 2\n",
|
|
328
|
+
mode: 0o755,
|
|
329
|
+
},
|
|
330
|
+
],
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
name: "less",
|
|
334
|
+
version: "590-2",
|
|
335
|
+
section: "text",
|
|
336
|
+
description: "Pager program similar to more",
|
|
337
|
+
shortDesc: "pager program",
|
|
338
|
+
installedSizeKb: 328,
|
|
339
|
+
files: [
|
|
340
|
+
{ path: "/usr/bin/less", content: '#!/bin/sh\ncat "$@"\n', mode: 0o755 },
|
|
341
|
+
],
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
name: "unzip",
|
|
345
|
+
version: "6.0-28",
|
|
346
|
+
section: "utils",
|
|
347
|
+
description: "De-archiver for .zip files",
|
|
348
|
+
shortDesc: "de-archiver for .zip files",
|
|
349
|
+
installedSizeKb: 464,
|
|
350
|
+
files: [
|
|
351
|
+
{
|
|
352
|
+
path: "/usr/bin/unzip",
|
|
353
|
+
content: "#!/bin/sh\necho 'unzip: virtual stub'\n",
|
|
354
|
+
mode: 0o755,
|
|
355
|
+
},
|
|
356
|
+
],
|
|
357
|
+
},
|
|
358
|
+
{
|
|
359
|
+
name: "rsync",
|
|
360
|
+
version: "3.2.7-1",
|
|
361
|
+
section: "net",
|
|
362
|
+
description: "Fast, versatile, remote (and local) file-copying tool",
|
|
363
|
+
shortDesc: "fast remote file copy program",
|
|
364
|
+
installedSizeKb: 716,
|
|
365
|
+
files: [
|
|
366
|
+
{
|
|
367
|
+
path: "/usr/bin/rsync",
|
|
368
|
+
content: "#!/bin/sh\necho 'rsync: virtual stub'\n",
|
|
369
|
+
mode: 0o755,
|
|
370
|
+
},
|
|
371
|
+
],
|
|
372
|
+
},
|
|
373
|
+
{
|
|
374
|
+
name: "tmux",
|
|
375
|
+
version: "3.3a-3",
|
|
376
|
+
section: "utils",
|
|
377
|
+
description: "Terminal multiplexer",
|
|
378
|
+
shortDesc: "terminal multiplexer",
|
|
379
|
+
installedSizeKb: 812,
|
|
380
|
+
files: [
|
|
381
|
+
{
|
|
382
|
+
path: "/usr/bin/tmux",
|
|
383
|
+
content: "#!/bin/sh\necho 'tmux: terminal multiplexer (virtual stub)'\n",
|
|
384
|
+
mode: 0o755,
|
|
385
|
+
},
|
|
386
|
+
],
|
|
387
|
+
},
|
|
388
|
+
{
|
|
389
|
+
name: "tree",
|
|
390
|
+
version: "2.1.0-1",
|
|
391
|
+
section: "utils",
|
|
392
|
+
description: "Displays an indented directory tree, in color",
|
|
393
|
+
shortDesc: "list files in tree format",
|
|
394
|
+
installedSizeKb: 108,
|
|
395
|
+
files: [
|
|
396
|
+
{
|
|
397
|
+
path: "/usr/bin/tree",
|
|
398
|
+
content: '#!/bin/sh\nexec builtin tree "$@"\n',
|
|
399
|
+
mode: 0o755,
|
|
400
|
+
},
|
|
401
|
+
],
|
|
402
|
+
},
|
|
403
|
+
{
|
|
404
|
+
name: "ca-certificates",
|
|
405
|
+
version: "20230311",
|
|
406
|
+
section: "misc",
|
|
407
|
+
description: "Common CA certificates",
|
|
408
|
+
shortDesc: "common CA certificates",
|
|
409
|
+
installedSizeKb: 388,
|
|
410
|
+
files: [
|
|
411
|
+
{ path: "/etc/ssl/certs/.keep", content: "" },
|
|
412
|
+
{ path: "/etc/ssl/private/.keep", content: "" },
|
|
413
|
+
{ path: "/usr/share/ca-certificates/.keep", content: "" },
|
|
414
|
+
],
|
|
415
|
+
onInstall: (vfs) => {
|
|
416
|
+
if (!vfs.exists("/etc/ssl"))
|
|
417
|
+
vfs.mkdir("/etc/ssl", 0o755);
|
|
418
|
+
if (!vfs.exists("/etc/ssl/certs"))
|
|
419
|
+
vfs.mkdir("/etc/ssl/certs", 0o755);
|
|
420
|
+
},
|
|
421
|
+
},
|
|
422
|
+
{
|
|
423
|
+
name: "locales",
|
|
424
|
+
version: "2.36-9+deb12u3",
|
|
425
|
+
section: "localization",
|
|
426
|
+
description: "GNU C Library: National Language (locale) data",
|
|
427
|
+
shortDesc: "locale data",
|
|
428
|
+
installedSizeKb: 16484,
|
|
429
|
+
files: [
|
|
430
|
+
{ path: "/etc/locale.gen", content: "en_US.UTF-8 UTF-8\n" },
|
|
431
|
+
{
|
|
432
|
+
path: "/etc/default/locale",
|
|
433
|
+
content: "LANG=en_US.UTF-8\nLANGUAGE=en_US:en\n",
|
|
434
|
+
},
|
|
435
|
+
],
|
|
436
|
+
},
|
|
437
|
+
{
|
|
438
|
+
name: "sudo",
|
|
439
|
+
version: "1.9.13p3-1+deb12u1",
|
|
440
|
+
section: "admin",
|
|
441
|
+
description: "Provide limited super user privileges to specific users",
|
|
442
|
+
shortDesc: "super user privilege execution",
|
|
443
|
+
installedSizeKb: 2304,
|
|
444
|
+
files: [
|
|
445
|
+
{
|
|
446
|
+
path: "/usr/bin/sudo",
|
|
447
|
+
content: '#!/bin/sh\nexec builtin sudo "$@"\n',
|
|
448
|
+
mode: 0o755,
|
|
449
|
+
},
|
|
450
|
+
{
|
|
451
|
+
path: "/etc/sudoers",
|
|
452
|
+
content: "root ALL=(ALL:ALL) ALL\n%sudo ALL=(ALL:ALL) ALL\n",
|
|
453
|
+
},
|
|
454
|
+
],
|
|
455
|
+
},
|
|
456
|
+
{
|
|
457
|
+
name: "systemd",
|
|
458
|
+
version: "252.22-1~deb12u1",
|
|
459
|
+
section: "admin",
|
|
460
|
+
description: "System and service manager",
|
|
461
|
+
shortDesc: "system and service manager",
|
|
462
|
+
installedSizeKb: 26624,
|
|
463
|
+
files: [
|
|
464
|
+
{
|
|
465
|
+
path: "/usr/bin/systemctl",
|
|
466
|
+
content: "#!/bin/sh\necho 'systemd is not running in this virtual container.'\nexit 1\n",
|
|
467
|
+
mode: 0o755,
|
|
468
|
+
},
|
|
469
|
+
{
|
|
470
|
+
path: "/usr/bin/journalctl",
|
|
471
|
+
content: "#!/bin/sh\necho 'journalctl: virtual stub'\n",
|
|
472
|
+
mode: 0o755,
|
|
473
|
+
},
|
|
474
|
+
],
|
|
475
|
+
}, {
|
|
476
|
+
name: "gzip",
|
|
477
|
+
version: "1.12-2",
|
|
478
|
+
section: "utils",
|
|
479
|
+
description: "GNU compression utility",
|
|
480
|
+
shortDesc: "compression utility",
|
|
481
|
+
installedSizeKb: 128,
|
|
482
|
+
files: [
|
|
483
|
+
{
|
|
484
|
+
path: "/usr/bin/gzip",
|
|
485
|
+
content: "#!/bin/sh\necho 'gzip: virtual stub'\n",
|
|
486
|
+
mode: 0o755,
|
|
487
|
+
},
|
|
488
|
+
]
|
|
489
|
+
}, {
|
|
490
|
+
name: "neofetch",
|
|
491
|
+
version: "7.1.0-1",
|
|
492
|
+
section: "utils",
|
|
493
|
+
description: "A command-line system information tool written in bash 3.2+",
|
|
494
|
+
shortDesc: "command-line system information tool",
|
|
495
|
+
installedSizeKb: 256,
|
|
496
|
+
files: [
|
|
497
|
+
{
|
|
498
|
+
path: "/usr/bin/neofetch",
|
|
499
|
+
content: "#!/bin/sh\necho 'neofetch: virtual stub'\n",
|
|
500
|
+
mode: 0o755,
|
|
501
|
+
},
|
|
502
|
+
],
|
|
503
|
+
}
|
|
504
|
+
];
|
|
505
|
+
/**
|
|
506
|
+
* Pure-TypeScript APT/dpkg package manager backed by a built-in registry.
|
|
507
|
+
*
|
|
508
|
+
* Accessed via `shell.packageManager` — not constructed directly.
|
|
509
|
+
*
|
|
510
|
+
* `install()` resolves dependencies recursively, writes declared files to the
|
|
511
|
+
* VFS, runs `onInstall` hooks, and persists state to `/var/lib/dpkg/status`.
|
|
512
|
+
* `remove()` reverses the process. All state survives VFS snapshot round-trips.
|
|
513
|
+
*
|
|
514
|
+
* @example
|
|
515
|
+
* ```ts
|
|
516
|
+
* const pm = shell.packageManager;
|
|
517
|
+
* pm.install(["vim", "git"]);
|
|
518
|
+
* console.log(pm.isInstalled("vim")); // true
|
|
519
|
+
* console.log(pm.installedCount()); // 2
|
|
520
|
+
* ```
|
|
521
|
+
*/
|
|
522
|
+
export class VirtualPackageManager {
|
|
523
|
+
vfs;
|
|
524
|
+
users;
|
|
525
|
+
installed = new Map();
|
|
526
|
+
registryPath = "/var/lib/dpkg/status";
|
|
527
|
+
logPath = "/var/log/dpkg.log";
|
|
528
|
+
aptLogPath = "/var/log/apt/history.log";
|
|
529
|
+
/**
|
|
530
|
+
* @param vfs Backing virtual filesystem for file I/O and dpkg status persistence.
|
|
531
|
+
* @param users User manager reference passed to `onInstall` hooks.
|
|
532
|
+
*/
|
|
533
|
+
constructor(vfs, users) {
|
|
534
|
+
this.vfs = vfs;
|
|
535
|
+
this.users = users;
|
|
536
|
+
}
|
|
537
|
+
/**
|
|
538
|
+
* Loads installed package state from `/var/lib/dpkg/status` in the VFS.
|
|
539
|
+
*
|
|
540
|
+
* Called automatically by `VirtualShell` after `bootstrapLinuxRootfs`.
|
|
541
|
+
* Safe to call again to reload state after a snapshot restore.
|
|
542
|
+
*/
|
|
543
|
+
load() {
|
|
544
|
+
if (!this.vfs.exists(this.registryPath))
|
|
545
|
+
return;
|
|
546
|
+
const status = this.vfs.readFile(this.registryPath);
|
|
547
|
+
if (!status.trim())
|
|
548
|
+
return;
|
|
549
|
+
const blocks = status.split(/\n\n+/);
|
|
550
|
+
for (const block of blocks) {
|
|
551
|
+
if (!block.trim())
|
|
552
|
+
continue;
|
|
553
|
+
const fields = this.parseFields(block);
|
|
554
|
+
const name = fields.Package;
|
|
555
|
+
if (!name)
|
|
556
|
+
continue;
|
|
557
|
+
this.installed.set(name, {
|
|
558
|
+
name,
|
|
559
|
+
version: fields.Version ?? "unknown",
|
|
560
|
+
architecture: fields.Architecture ?? "amd64",
|
|
561
|
+
maintainer: fields.Maintainer ?? "Fortune Maintainers",
|
|
562
|
+
description: fields.Description ?? "",
|
|
563
|
+
section: fields.Section ?? "misc",
|
|
564
|
+
installedSizeKb: Number(fields["Installed-Size"] ?? 0),
|
|
565
|
+
installedAt: fields["X-Installed-At"] ?? new Date().toISOString(),
|
|
566
|
+
files: (fields["X-Files"] ?? "").split("|").filter(Boolean),
|
|
567
|
+
});
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
/** Persist installed state to /var/lib/dpkg/status. */
|
|
571
|
+
persist() {
|
|
572
|
+
const blocks = [];
|
|
573
|
+
for (const pkg of this.installed.values()) {
|
|
574
|
+
blocks.push([
|
|
575
|
+
`Package: ${pkg.name}`,
|
|
576
|
+
`Status: install ok installed`,
|
|
577
|
+
`Priority: optional`,
|
|
578
|
+
`Section: ${pkg.section}`,
|
|
579
|
+
`Installed-Size: ${pkg.installedSizeKb}`,
|
|
580
|
+
`Maintainer: ${pkg.maintainer}`,
|
|
581
|
+
`Architecture: ${pkg.architecture}`,
|
|
582
|
+
`Version: ${pkg.version}`,
|
|
583
|
+
`Description: ${pkg.description}`,
|
|
584
|
+
`X-Installed-At: ${pkg.installedAt}`,
|
|
585
|
+
`X-Files: ${pkg.files.join("|")}`,
|
|
586
|
+
].join("\n"));
|
|
587
|
+
}
|
|
588
|
+
this.vfs.writeFile(this.registryPath, `${blocks.join("\n\n")}\n`);
|
|
589
|
+
}
|
|
590
|
+
parseFields(block) {
|
|
591
|
+
const result = {};
|
|
592
|
+
for (const line of block.split("\n")) {
|
|
593
|
+
const idx = line.indexOf(": ");
|
|
594
|
+
if (idx === -1)
|
|
595
|
+
continue;
|
|
596
|
+
result[line.slice(0, idx)] = line.slice(idx + 2);
|
|
597
|
+
}
|
|
598
|
+
return result;
|
|
599
|
+
}
|
|
600
|
+
log(msg) {
|
|
601
|
+
const ts = new Date().toISOString().replace("T", " ").slice(0, 19);
|
|
602
|
+
const line = `${ts} ${msg}\n`;
|
|
603
|
+
const existing = this.vfs.exists(this.logPath)
|
|
604
|
+
? this.vfs.readFile(this.logPath)
|
|
605
|
+
: "";
|
|
606
|
+
this.vfs.writeFile(this.logPath, existing + line);
|
|
607
|
+
}
|
|
608
|
+
aptLog(action, pkgs) {
|
|
609
|
+
const ts = new Date().toISOString();
|
|
610
|
+
const existing = this.vfs.exists(this.aptLogPath)
|
|
611
|
+
? this.vfs.readFile(this.aptLogPath)
|
|
612
|
+
: "";
|
|
613
|
+
const entry = [
|
|
614
|
+
`Start-Date: ${ts}`,
|
|
615
|
+
`Commandline: apt-get ${action} ${pkgs.join(" ")}`,
|
|
616
|
+
`${action === "install" ? "Install" : "Remove"}: ${pkgs.join(", ")}`,
|
|
617
|
+
`End-Date: ${ts}`,
|
|
618
|
+
"",
|
|
619
|
+
].join("\n");
|
|
620
|
+
this.vfs.writeFile(this.aptLogPath, existing + entry);
|
|
621
|
+
}
|
|
622
|
+
/**
|
|
623
|
+
* Looks up a package definition in the built-in registry by name.
|
|
624
|
+
*
|
|
625
|
+
* @param name Package name (case-insensitive).
|
|
626
|
+
* @returns The matching `PackageDefinition`, or `undefined` if not found.
|
|
627
|
+
*/
|
|
628
|
+
findInRegistry(name) {
|
|
629
|
+
return PACKAGE_REGISTRY.find((p) => p.name.toLowerCase() === name.toLowerCase());
|
|
630
|
+
}
|
|
631
|
+
/**
|
|
632
|
+
* Returns all packages in the built-in registry, sorted alphabetically.
|
|
633
|
+
*
|
|
634
|
+
* @returns Array of `PackageDefinition` entries.
|
|
635
|
+
*/
|
|
636
|
+
listAvailable() {
|
|
637
|
+
return [...PACKAGE_REGISTRY].sort((a, b) => a.name.localeCompare(b.name));
|
|
638
|
+
}
|
|
639
|
+
/**
|
|
640
|
+
* Returns all currently installed packages, sorted alphabetically.
|
|
641
|
+
*
|
|
642
|
+
* @returns Array of `InstalledPackage` records.
|
|
643
|
+
*/
|
|
644
|
+
listInstalled() {
|
|
645
|
+
return [...this.installed.values()].sort((a, b) => a.name.localeCompare(b.name));
|
|
646
|
+
}
|
|
647
|
+
/**
|
|
648
|
+
* Returns `true` when the given package is currently installed.
|
|
649
|
+
*
|
|
650
|
+
* @param name Package name (case-insensitive).
|
|
651
|
+
*/
|
|
652
|
+
isInstalled(name) {
|
|
653
|
+
return this.installed.has(name.toLowerCase());
|
|
654
|
+
}
|
|
655
|
+
/**
|
|
656
|
+
* Returns the total number of installed packages.
|
|
657
|
+
*
|
|
658
|
+
* Used by `neofetch` to populate the `Packages:` field.
|
|
659
|
+
*/
|
|
660
|
+
installedCount() {
|
|
661
|
+
return this.installed.size;
|
|
662
|
+
}
|
|
663
|
+
/**
|
|
664
|
+
* Installs one or more packages from the registry.
|
|
665
|
+
*
|
|
666
|
+
* Dependencies listed in `PackageDefinition.depends` are resolved and
|
|
667
|
+
* installed automatically. Already-installed packages are skipped. Files
|
|
668
|
+
* declared in `PackageDefinition.files` are written to the VFS and
|
|
669
|
+
* `onInstall` hooks are called in dependency order.
|
|
670
|
+
*
|
|
671
|
+
* @param names Package names to install.
|
|
672
|
+
* @param opts Installation options.
|
|
673
|
+
* @param opts.quiet Suppress progress output lines when `true`.
|
|
674
|
+
* @returns Terminal-style `output` string and an APT-compatible `exitCode`
|
|
675
|
+
* (`0` on success, `100` when a package is not found).
|
|
676
|
+
*/
|
|
677
|
+
install(names, opts = {}) {
|
|
678
|
+
const lines = [];
|
|
679
|
+
const toInstall = [];
|
|
680
|
+
const notFound = [];
|
|
681
|
+
// Resolve + deduplicate including deps
|
|
682
|
+
const resolve = (name, seen = new Set()) => {
|
|
683
|
+
if (seen.has(name))
|
|
684
|
+
return;
|
|
685
|
+
seen.add(name);
|
|
686
|
+
if (this.isInstalled(name))
|
|
687
|
+
return;
|
|
688
|
+
const def = this.findInRegistry(name);
|
|
689
|
+
if (!def) {
|
|
690
|
+
notFound.push(name);
|
|
691
|
+
return;
|
|
692
|
+
}
|
|
693
|
+
for (const dep of def.depends ?? [])
|
|
694
|
+
resolve(dep, seen);
|
|
695
|
+
if (!toInstall.find((p) => p.name === def.name)) {
|
|
696
|
+
toInstall.push(def);
|
|
697
|
+
}
|
|
698
|
+
};
|
|
699
|
+
for (const n of names)
|
|
700
|
+
resolve(n);
|
|
701
|
+
if (notFound.length > 0) {
|
|
702
|
+
return {
|
|
703
|
+
output: `E: Unable to locate package ${notFound.join(", ")}`,
|
|
704
|
+
exitCode: 100,
|
|
705
|
+
};
|
|
706
|
+
}
|
|
707
|
+
if (toInstall.length === 0) {
|
|
708
|
+
return {
|
|
709
|
+
output: names
|
|
710
|
+
.map((n) => `${n} is already the newest version.`)
|
|
711
|
+
.join("\n"),
|
|
712
|
+
exitCode: 0,
|
|
713
|
+
};
|
|
714
|
+
}
|
|
715
|
+
const totalKb = toInstall.reduce((acc, p) => acc + (p.installedSizeKb ?? 0), 0);
|
|
716
|
+
if (!opts.quiet) {
|
|
717
|
+
lines.push(`Reading package lists... Done`, `Building dependency tree... Done`, `Reading state information... Done`, `The following NEW packages will be installed:`, ` ${toInstall.map((p) => p.name).join(" ")}`, `0 upgraded, ${toInstall.length} newly installed, 0 to remove and 0 not upgraded.`, `Need to get 0 B/${totalKb} kB of archives.`, `After this operation, ${totalKb} kB of additional disk space will be used.`, ``);
|
|
718
|
+
}
|
|
719
|
+
for (const def of toInstall) {
|
|
720
|
+
if (!opts.quiet) {
|
|
721
|
+
lines.push(`Selecting previously unselected package ${def.name}.`);
|
|
722
|
+
lines.push(`(Reading database ... 12345 files and directories currently installed.)`);
|
|
723
|
+
lines.push(`Preparing to unpack .../archives/${def.name}_${def.version}_amd64.deb ...`);
|
|
724
|
+
lines.push(`Unpacking ${def.name} (${def.version}) ...`);
|
|
725
|
+
}
|
|
726
|
+
// Write files
|
|
727
|
+
for (const f of def.files ?? []) {
|
|
728
|
+
const dir = f.path.slice(0, f.path.lastIndexOf("/"));
|
|
729
|
+
if (dir && !this.vfs.exists(dir))
|
|
730
|
+
this.vfs.mkdir(dir, 0o755);
|
|
731
|
+
this.vfs.writeFile(f.path, f.content, { mode: f.mode ?? 0o644 });
|
|
732
|
+
}
|
|
733
|
+
// Run install hook
|
|
734
|
+
def.onInstall?.(this.vfs, this.users);
|
|
735
|
+
if (!opts.quiet) {
|
|
736
|
+
lines.push(`Setting up ${def.name} (${def.version}) ...`);
|
|
737
|
+
}
|
|
738
|
+
const now = new Date().toISOString();
|
|
739
|
+
this.installed.set(def.name, {
|
|
740
|
+
name: def.name,
|
|
741
|
+
version: def.version,
|
|
742
|
+
architecture: def.architecture ?? "amd64",
|
|
743
|
+
maintainer: def.maintainer ?? "Fortune Maintainers <pkg@fortune.local>",
|
|
744
|
+
description: def.description,
|
|
745
|
+
section: def.section ?? "misc",
|
|
746
|
+
installedSizeKb: def.installedSizeKb ?? 0,
|
|
747
|
+
installedAt: now,
|
|
748
|
+
files: (def.files ?? []).map((f) => f.path),
|
|
749
|
+
});
|
|
750
|
+
this.log(`install ${def.name} ${def.version}`);
|
|
751
|
+
}
|
|
752
|
+
this.aptLog("install", toInstall.map((p) => p.name));
|
|
753
|
+
this.persist();
|
|
754
|
+
if (!opts.quiet) {
|
|
755
|
+
lines.push(`Processing triggers for man-db (2.11.2-2) ...`);
|
|
756
|
+
}
|
|
757
|
+
return { output: lines.join("\n"), exitCode: 0 };
|
|
758
|
+
}
|
|
759
|
+
/**
|
|
760
|
+
* Removes one or more installed packages.
|
|
761
|
+
*
|
|
762
|
+
* Package files are deleted from the VFS. Config files (paths under
|
|
763
|
+
* `/etc/` or ending in `.conf`) are preserved unless `opts.purge` is set.
|
|
764
|
+
* The `onRemove` hook is called for each package.
|
|
765
|
+
*
|
|
766
|
+
* @param names Package names to remove.
|
|
767
|
+
* @param opts Removal options.
|
|
768
|
+
* @param opts.purge Also delete configuration files when `true`.
|
|
769
|
+
* @param opts.quiet Suppress progress output lines when `true`.
|
|
770
|
+
* @returns Terminal-style `output` string and exit code (`0` on success).
|
|
771
|
+
*/
|
|
772
|
+
remove(names, opts = {}) {
|
|
773
|
+
const lines = [];
|
|
774
|
+
const toRemove = [];
|
|
775
|
+
for (const name of names) {
|
|
776
|
+
const pkg = this.installed.get(name.toLowerCase());
|
|
777
|
+
if (!pkg) {
|
|
778
|
+
lines.push(`Package '${name}' is not installed, so not removed`);
|
|
779
|
+
}
|
|
780
|
+
else {
|
|
781
|
+
toRemove.push(pkg);
|
|
782
|
+
}
|
|
783
|
+
}
|
|
784
|
+
if (toRemove.length === 0) {
|
|
785
|
+
return { output: lines.join("\n") || "Nothing to remove.", exitCode: 0 };
|
|
786
|
+
}
|
|
787
|
+
if (!opts.quiet) {
|
|
788
|
+
lines.push(`Reading package lists... Done`, `Building dependency tree... Done`, `The following packages will be REMOVED:`, ` ${toRemove.map((p) => p.name).join(" ")}`, `0 upgraded, 0 newly installed, ${toRemove.length} to remove and 0 not upgraded.`);
|
|
789
|
+
}
|
|
790
|
+
for (const pkg of toRemove) {
|
|
791
|
+
if (!opts.quiet)
|
|
792
|
+
lines.push(`Removing ${pkg.name} (${pkg.version}) ...`);
|
|
793
|
+
// Remove files (if purge, include config files)
|
|
794
|
+
for (const filePath of pkg.files) {
|
|
795
|
+
if (!opts.purge &&
|
|
796
|
+
(filePath.startsWith("/etc/") || filePath.endsWith(".conf"))) {
|
|
797
|
+
continue; // keep config unless --purge
|
|
798
|
+
}
|
|
799
|
+
try {
|
|
800
|
+
if (this.vfs.exists(filePath))
|
|
801
|
+
this.vfs.remove(filePath);
|
|
802
|
+
}
|
|
803
|
+
catch { }
|
|
804
|
+
}
|
|
805
|
+
// Run remove hook
|
|
806
|
+
const def = this.findInRegistry(pkg.name);
|
|
807
|
+
def?.onRemove?.(this.vfs);
|
|
808
|
+
this.installed.delete(pkg.name);
|
|
809
|
+
this.log(`remove ${pkg.name} ${pkg.version}`);
|
|
810
|
+
}
|
|
811
|
+
this.aptLog("remove", toRemove.map((p) => p.name));
|
|
812
|
+
this.persist();
|
|
813
|
+
return { output: lines.join("\n"), exitCode: 0 };
|
|
814
|
+
}
|
|
815
|
+
/**
|
|
816
|
+
* Searches the registry for packages whose name or description contains
|
|
817
|
+
* the given term (case-insensitive). Equivalent to `apt-cache search`.
|
|
818
|
+
*
|
|
819
|
+
* @param term Search string.
|
|
820
|
+
* @returns Matching `PackageDefinition` entries sorted alphabetically.
|
|
821
|
+
*/
|
|
822
|
+
search(term) {
|
|
823
|
+
const t = term.toLowerCase();
|
|
824
|
+
return PACKAGE_REGISTRY.filter((p) => p.name.includes(t) ||
|
|
825
|
+
p.description.toLowerCase().includes(t) ||
|
|
826
|
+
(p.shortDesc ?? "").toLowerCase().includes(t)).sort((a, b) => a.name.localeCompare(b.name));
|
|
827
|
+
}
|
|
828
|
+
/**
|
|
829
|
+
* Returns a dpkg-style metadata block for a package, including its
|
|
830
|
+
* install status. Equivalent to `apt-cache show` / `dpkg -s`.
|
|
831
|
+
*
|
|
832
|
+
* @param name Package name.
|
|
833
|
+
* @returns Multi-line metadata string, or `null` if not in the registry.
|
|
834
|
+
*/
|
|
835
|
+
show(name) {
|
|
836
|
+
const def = this.findInRegistry(name);
|
|
837
|
+
if (!def)
|
|
838
|
+
return null;
|
|
839
|
+
const inst = this.installed.get(name);
|
|
840
|
+
return [
|
|
841
|
+
`Package: ${def.name}`,
|
|
842
|
+
`Version: ${def.version}`,
|
|
843
|
+
`Architecture: ${def.architecture ?? "amd64"}`,
|
|
844
|
+
`Maintainer: ${def.maintainer ?? "Fortune Maintainers <pkg@fortune.local>"}`,
|
|
845
|
+
`Installed-Size: ${def.installedSizeKb ?? 0}`,
|
|
846
|
+
`Depends: ${(def.depends ?? []).join(", ") || "(none)"}`,
|
|
847
|
+
`Section: ${def.section ?? "misc"}`,
|
|
848
|
+
`Priority: optional`,
|
|
849
|
+
`Description: ${def.description}`,
|
|
850
|
+
`Status: ${inst ? "install ok installed" : "install ok not-installed"}`,
|
|
851
|
+
].join("\n");
|
|
852
|
+
}
|
|
853
|
+
}
|
|
854
|
+
//# sourceMappingURL=index.js.map
|