typescript-virtual-container 1.4.4 → 1.4.5
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/builds/self-standalone.js +321 -272
- package/builds/self-standalone.js.map +4 -4
- package/builds/standalone-wo-sftp.js +261 -212
- package/builds/standalone-wo-sftp.js.map +4 -4
- package/builds/standalone.js +265 -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 +419 -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 +36 -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/docs/.nojekyll +1 -0
- package/docs/docs/assets/hierarchy.js +1 -0
- package/docs/docs/assets/highlight.css +162 -0
- package/docs/docs/assets/icons.js +18 -0
- package/docs/docs/assets/icons.svg +1 -0
- package/docs/docs/assets/main.js +60 -0
- package/docs/docs/assets/navigation.js +1 -0
- package/docs/docs/assets/search.js +1 -0
- package/docs/docs/assets/style.css +1633 -0
- package/docs/docs/hierarchy.html +1 -0
- package/docs/docs/index.html +1842 -0
- package/docs/docs/media/LICENSE +21 -0
- package/docs/docs/modules.html +1 -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 +4 -2
- package/tsconfig.json +7 -2
- package/typedoc.json +8 -0
- 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
package/src/commands/ls.js
DELETED
|
@@ -1,200 +0,0 @@
|
|
|
1
|
-
import { getArg, ifFlag } from "./command-helpers";
|
|
2
|
-
import { assertPathAccess, resolvePath } from "./helpers";
|
|
3
|
-
// ─── ANSI color codes (matches GNU ls --color=auto / LS_COLORS defaults) ────
|
|
4
|
-
const RESET = "\x1b[0m";
|
|
5
|
-
// Entry-type colors
|
|
6
|
-
const C_DIR = "\x1b[1;34m"; // bold blue — directory
|
|
7
|
-
const C_LINK = "\x1b[1;36m"; // bold cyan — symlink
|
|
8
|
-
const C_EXEC = "\x1b[1;32m"; // bold green — executable file
|
|
9
|
-
const C_NORMAL = ""; // no color — regular file
|
|
10
|
-
// Special-mode backgrounds (GNU ls corner cases)
|
|
11
|
-
const C_STICKY_WX = "\x1b[30;42m"; // black on green — dir sticky + world-writable (/tmp)
|
|
12
|
-
const C_STICKY = "\x1b[37;44m"; // white on blue — dir sticky, NOT world-writable
|
|
13
|
-
const C_OTHER_WX = "\x1b[34;42m"; // blue on green — dir world-writable, not sticky
|
|
14
|
-
// ─── helpers ────────────────────────────────────────────────────────────────
|
|
15
|
-
function colorize(name, color) {
|
|
16
|
-
return color ? `${color}${name}${RESET}` : name;
|
|
17
|
-
}
|
|
18
|
-
function entryColor(mode, type, isLink) {
|
|
19
|
-
if (isLink)
|
|
20
|
-
return C_LINK;
|
|
21
|
-
if (type === "directory") {
|
|
22
|
-
const sticky = !!(mode & 0o1000);
|
|
23
|
-
const worldW = !!(mode & 0o002);
|
|
24
|
-
if (sticky && worldW)
|
|
25
|
-
return C_STICKY_WX;
|
|
26
|
-
if (sticky)
|
|
27
|
-
return C_STICKY;
|
|
28
|
-
if (worldW)
|
|
29
|
-
return C_OTHER_WX;
|
|
30
|
-
return C_DIR;
|
|
31
|
-
}
|
|
32
|
-
if (mode & 0o111)
|
|
33
|
-
return C_EXEC;
|
|
34
|
-
return C_NORMAL;
|
|
35
|
-
}
|
|
36
|
-
// ─── permissions string ──────────────────────────────────────────────────────
|
|
37
|
-
function formatPermissions(mode, type, isLink) {
|
|
38
|
-
let ft;
|
|
39
|
-
if (isLink)
|
|
40
|
-
ft = "l";
|
|
41
|
-
else if (type === "directory")
|
|
42
|
-
ft = "d";
|
|
43
|
-
else
|
|
44
|
-
ft = "-";
|
|
45
|
-
const r = (bit) => (mode & bit ? "r" : "-");
|
|
46
|
-
const w = (bit) => (mode & bit ? "w" : "-");
|
|
47
|
-
const xOwner = (() => {
|
|
48
|
-
const exec = !!(mode & 0o100);
|
|
49
|
-
if (mode & 0o4000)
|
|
50
|
-
return exec ? "s" : "S";
|
|
51
|
-
return exec ? "x" : "-";
|
|
52
|
-
})();
|
|
53
|
-
const xGroup = (() => {
|
|
54
|
-
const exec = !!(mode & 0o010);
|
|
55
|
-
if (mode & 0o2000)
|
|
56
|
-
return exec ? "s" : "S";
|
|
57
|
-
return exec ? "x" : "-";
|
|
58
|
-
})();
|
|
59
|
-
const xOther = (() => {
|
|
60
|
-
const exec = !!(mode & 0o001);
|
|
61
|
-
if (type === "directory" && (mode & 0o1000))
|
|
62
|
-
return exec ? "t" : "T";
|
|
63
|
-
return exec ? "x" : "-";
|
|
64
|
-
})();
|
|
65
|
-
return `${ft}${r(0o400)}${w(0o200)}${xOwner}${r(0o040)}${w(0o020)}${xGroup}${r(0o004)}${w(0o002)}${xOther}`;
|
|
66
|
-
}
|
|
67
|
-
// ─── date formatting (GNU ls + French locale) ────────────────────────────────
|
|
68
|
-
const MONTHS_EN = [
|
|
69
|
-
"Jan", "Feb", "Mar", "Apr", "May", "Jun",
|
|
70
|
-
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec",
|
|
71
|
-
];
|
|
72
|
-
function formatDate(date) {
|
|
73
|
-
const now = new Date();
|
|
74
|
-
const sixMo = 6 * 30 * 24 * 3600 * 1000;
|
|
75
|
-
const recent = Math.abs(now.getTime() - date.getTime()) < sixMo;
|
|
76
|
-
const day = String(date.getDate()).padStart(2, " ");
|
|
77
|
-
const month = MONTHS_EN[date.getMonth()] ?? "";
|
|
78
|
-
if (recent) {
|
|
79
|
-
const hh = String(date.getHours()).padStart(2, "0");
|
|
80
|
-
const mm = String(date.getMinutes()).padStart(2, "0");
|
|
81
|
-
return `${day} ${month.padEnd(3)} ${hh}:${mm}`;
|
|
82
|
-
}
|
|
83
|
-
return `${day} ${month.padEnd(3)} ${date.getFullYear()}`;
|
|
84
|
-
}
|
|
85
|
-
// ─── symlink target ──────────────────────────────────────────────────────────
|
|
86
|
-
function readlinkTarget(vfs, path) {
|
|
87
|
-
try {
|
|
88
|
-
return vfs.readFile(path);
|
|
89
|
-
}
|
|
90
|
-
catch {
|
|
91
|
-
return "?";
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
// ─── short listing ───────────────────────────────────────────────────────────
|
|
95
|
-
function shortListing(vfs, dir, items) {
|
|
96
|
-
const base = dir === "/" ? "" : dir;
|
|
97
|
-
return items.map((name) => {
|
|
98
|
-
const childPath = `${base}/${name}`;
|
|
99
|
-
const isLink = vfs.isSymlink(childPath);
|
|
100
|
-
let stat;
|
|
101
|
-
try {
|
|
102
|
-
stat = vfs.stat(childPath);
|
|
103
|
-
}
|
|
104
|
-
catch {
|
|
105
|
-
return name;
|
|
106
|
-
}
|
|
107
|
-
const color = entryColor(stat.mode, stat.type, isLink);
|
|
108
|
-
return colorize(name, color);
|
|
109
|
-
}).join(" ");
|
|
110
|
-
}
|
|
111
|
-
function longListing(vfs, dir, items) {
|
|
112
|
-
const base = dir === "/" ? "" : dir;
|
|
113
|
-
const rows = items.map((name) => {
|
|
114
|
-
const childPath = `${base}/${name}`;
|
|
115
|
-
const isLink = vfs.isSymlink(childPath);
|
|
116
|
-
let stat;
|
|
117
|
-
try {
|
|
118
|
-
stat = vfs.stat(childPath);
|
|
119
|
-
}
|
|
120
|
-
catch {
|
|
121
|
-
return {
|
|
122
|
-
perms: "----------", nlink: "1", size: "0",
|
|
123
|
-
date: formatDate(new Date()), label: name,
|
|
124
|
-
};
|
|
125
|
-
}
|
|
126
|
-
const mode = isLink ? 0o120777 : stat.mode;
|
|
127
|
-
const perms = formatPermissions(mode, stat.type, isLink);
|
|
128
|
-
// nlink: dirs = children + 2 (. and ..), files/links = 1
|
|
129
|
-
const nlink = stat.type === "directory"
|
|
130
|
-
? String((stat.childrenCount ?? 0) + 2)
|
|
131
|
-
: "1";
|
|
132
|
-
// size: links → target path length, files → bytes, dirs → children×4096
|
|
133
|
-
const rawSize = isLink
|
|
134
|
-
? readlinkTarget(vfs, childPath).length
|
|
135
|
-
: stat.type === "file"
|
|
136
|
-
? (stat.size ?? 0)
|
|
137
|
-
: (stat.childrenCount ?? 0) * 4096;
|
|
138
|
-
const size = String(rawSize);
|
|
139
|
-
const date = formatDate(stat.updatedAt);
|
|
140
|
-
const color = entryColor(mode, stat.type, isLink);
|
|
141
|
-
const label = isLink
|
|
142
|
-
? `${colorize(name, color)} -> ${readlinkTarget(vfs, childPath)}`
|
|
143
|
-
: colorize(name, color);
|
|
144
|
-
return { perms, nlink, size, date, label };
|
|
145
|
-
});
|
|
146
|
-
const wNlink = Math.max(...rows.map((r) => r.nlink.length));
|
|
147
|
-
const wSize = Math.max(...rows.map((r) => r.size.length));
|
|
148
|
-
const owner = "root";
|
|
149
|
-
const group = "root";
|
|
150
|
-
const total = items.length * 8;
|
|
151
|
-
const lines = rows.map((r) => `${r.perms} ${r.nlink.padStart(wNlink)} ${owner} ${group} ${r.size.padStart(wSize)} ${r.date} ${r.label}`);
|
|
152
|
-
return `total ${total}\n${lines.join("\n")}`;
|
|
153
|
-
}
|
|
154
|
-
// ─── command ─────────────────────────────────────────────────────────────────
|
|
155
|
-
export const lsCommand = {
|
|
156
|
-
name: "ls",
|
|
157
|
-
description: "List directory contents",
|
|
158
|
-
category: "navigation",
|
|
159
|
-
params: ["[-la] [path]"],
|
|
160
|
-
run: ({ authUser, shell, cwd, args }) => {
|
|
161
|
-
const longFormat = ifFlag(args, ["-l", "--long", "-la", "-al"]);
|
|
162
|
-
const showHidden = ifFlag(args, ["-a", "--all", "-la", "-al"]);
|
|
163
|
-
const targetArg = getArg(args, 0, {
|
|
164
|
-
flags: ["-l", "--long", "-a", "--all", "-la", "-al"],
|
|
165
|
-
});
|
|
166
|
-
const target = resolvePath(cwd, targetArg ?? cwd);
|
|
167
|
-
assertPathAccess(authUser, target, "ls");
|
|
168
|
-
// Single file or symlink
|
|
169
|
-
if (shell.vfs.exists(target)) {
|
|
170
|
-
const st = shell.vfs.stat(target);
|
|
171
|
-
const isLink = shell.vfs.isSymlink(target);
|
|
172
|
-
if (st.type === "file" || isLink) {
|
|
173
|
-
const name = target.split("/").pop() ?? target;
|
|
174
|
-
const color = entryColor(isLink ? 0o120777 : st.mode, st.type, isLink);
|
|
175
|
-
if (longFormat) {
|
|
176
|
-
const mode = isLink ? 0o120777 : st.mode;
|
|
177
|
-
const size = isLink
|
|
178
|
-
? readlinkTarget(shell.vfs, target).length
|
|
179
|
-
: st.size ?? 0;
|
|
180
|
-
const perms = formatPermissions(mode, st.type, isLink);
|
|
181
|
-
const label = isLink
|
|
182
|
-
? `${colorize(name, color)} -> ${readlinkTarget(shell.vfs, target)}`
|
|
183
|
-
: colorize(name, color);
|
|
184
|
-
return {
|
|
185
|
-
stdout: `${perms} 1 root root ${size} ${formatDate(st.updatedAt)} ${label}\n`,
|
|
186
|
-
exitCode: 0,
|
|
187
|
-
};
|
|
188
|
-
}
|
|
189
|
-
return { stdout: `${colorize(name, color)}\n`, exitCode: 0 };
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
const items = shell.vfs
|
|
193
|
-
.list(target)
|
|
194
|
-
.filter((name) => showHidden || !name.startsWith("."));
|
|
195
|
-
const rendered = longFormat
|
|
196
|
-
? longListing(shell.vfs, target, items)
|
|
197
|
-
: shortListing(shell.vfs, target, items);
|
|
198
|
-
return { stdout: `${rendered}\n`, exitCode: 0 };
|
|
199
|
-
},
|
|
200
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lsb-release.d.ts","sourceRoot":"","sources":["lsb-release.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGrD;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,EAAE,WAsD/B,CAAC"}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { ifFlag } from "./command-helpers";
|
|
2
|
-
/**
|
|
3
|
-
* Print Linux distribution information.
|
|
4
|
-
* @category system
|
|
5
|
-
* @params ["[-a] [-i] [-d] [-r] [-c]"]
|
|
6
|
-
*/
|
|
7
|
-
export const lsbReleaseCommand = {
|
|
8
|
-
name: "lsb_release",
|
|
9
|
-
description: "Print distribution-specific information",
|
|
10
|
-
category: "system",
|
|
11
|
-
params: ["[-a] [-i] [-d] [-r] [-c]"],
|
|
12
|
-
run: ({ args, shell }) => {
|
|
13
|
-
let osName = shell.properties?.os ?? "Fortune GNU/Linux x64";
|
|
14
|
-
let codename = "aurora";
|
|
15
|
-
let version = "1.0";
|
|
16
|
-
try {
|
|
17
|
-
const content = shell.vfs.readFile("/etc/os-release");
|
|
18
|
-
for (const line of content.split("\n")) {
|
|
19
|
-
if (line.startsWith("PRETTY_NAME="))
|
|
20
|
-
osName = line
|
|
21
|
-
.slice("PRETTY_NAME=".length)
|
|
22
|
-
.replace(/^"|"$/g, "")
|
|
23
|
-
.trim();
|
|
24
|
-
if (line.startsWith("VERSION_CODENAME="))
|
|
25
|
-
codename = line.slice("VERSION_CODENAME=".length).trim();
|
|
26
|
-
if (line.startsWith("VERSION_ID="))
|
|
27
|
-
version = line
|
|
28
|
-
.slice("VERSION_ID=".length)
|
|
29
|
-
.replace(/^"|"$/g, "")
|
|
30
|
-
.trim();
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
catch { }
|
|
34
|
-
const all = ifFlag(args, ["-a", "--all"]);
|
|
35
|
-
const showId = ifFlag(args, ["-i", "--id"]);
|
|
36
|
-
const showDesc = ifFlag(args, ["-d", "--description"]);
|
|
37
|
-
const showRelease = ifFlag(args, ["-r", "--release"]);
|
|
38
|
-
const showCodename = ifFlag(args, ["-c", "--codename"]);
|
|
39
|
-
if (all || args.length === 0) {
|
|
40
|
-
return {
|
|
41
|
-
stdout: [
|
|
42
|
-
`Distributor ID:\tFortune`,
|
|
43
|
-
`Description:\t${osName}`,
|
|
44
|
-
`Release:\t${version}`,
|
|
45
|
-
`Codename:\t${codename}`,
|
|
46
|
-
].join("\n"),
|
|
47
|
-
exitCode: 0,
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
const lines = [];
|
|
51
|
-
if (showId)
|
|
52
|
-
lines.push(`Distributor ID:\tFortune`);
|
|
53
|
-
if (showDesc)
|
|
54
|
-
lines.push(`Description:\t${osName}`);
|
|
55
|
-
if (showRelease)
|
|
56
|
-
lines.push(`Release:\t${version}`);
|
|
57
|
-
if (showCodename)
|
|
58
|
-
lines.push(`Codename:\t${codename}`);
|
|
59
|
-
return { stdout: lines.join("\n"), exitCode: 0 };
|
|
60
|
-
},
|
|
61
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"man.d.ts","sourceRoot":"","sources":["man.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAwCrD,eAAO,MAAM,UAAU,EAAE,WAoBxB,CAAC"}
|
package/src/commands/man.js
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
const MANUAL_ALIASES = {
|
|
2
|
-
gunzip: "gzip",
|
|
3
|
-
};
|
|
4
|
-
const manualCache = new Map();
|
|
5
|
-
const manualsBaseUrl = new URL("./manuals/", import.meta.url);
|
|
6
|
-
async function dynamicImport(specifier) {
|
|
7
|
-
const importer = new Function("moduleName", "return import(moduleName)");
|
|
8
|
-
return importer(specifier);
|
|
9
|
-
}
|
|
10
|
-
async function loadBundledManual(commandName) {
|
|
11
|
-
const normalized = commandName.toLowerCase();
|
|
12
|
-
const lookupName = MANUAL_ALIASES[normalized] ?? normalized;
|
|
13
|
-
const cacheKey = `builtin:${lookupName}`;
|
|
14
|
-
if (manualCache.has(cacheKey)) {
|
|
15
|
-
return manualCache.get(cacheKey) ?? null;
|
|
16
|
-
}
|
|
17
|
-
try {
|
|
18
|
-
const fsModule = (await dynamicImport("node:fs/promises"));
|
|
19
|
-
const manualUrl = new URL(`${lookupName}.txt`, manualsBaseUrl);
|
|
20
|
-
const content = await fsModule.readFile(manualUrl, "utf8");
|
|
21
|
-
const page = content.replace(/\n$/, "");
|
|
22
|
-
manualCache.set(cacheKey, page);
|
|
23
|
-
return page;
|
|
24
|
-
}
|
|
25
|
-
catch {
|
|
26
|
-
manualCache.set(cacheKey, null);
|
|
27
|
-
return null;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
export const manCommand = {
|
|
31
|
-
name: "man",
|
|
32
|
-
description: "Interface to the system reference manuals",
|
|
33
|
-
category: "shell",
|
|
34
|
-
params: ["<command>"],
|
|
35
|
-
run: async ({ args, shell }) => {
|
|
36
|
-
const name = args[0];
|
|
37
|
-
if (!name)
|
|
38
|
-
return { stderr: "What manual page do you want?", exitCode: 1 };
|
|
39
|
-
// VFS-installed man pages take priority
|
|
40
|
-
const manPath = `/usr/share/man/man1/${name}.1`;
|
|
41
|
-
if (shell.vfs.exists(manPath)) {
|
|
42
|
-
return { stdout: shell.vfs.readFile(manPath), exitCode: 0 };
|
|
43
|
-
}
|
|
44
|
-
const page = await loadBundledManual(name);
|
|
45
|
-
if (page)
|
|
46
|
-
return { stdout: page, exitCode: 0 };
|
|
47
|
-
return { stderr: `No manual entry for ${name}`, exitCode: 16 };
|
|
48
|
-
},
|
|
49
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mkdir.d.ts","sourceRoot":"","sources":["mkdir.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIrD;;;;GAIG;AACH,eAAO,MAAM,YAAY,EAAE,WAqB1B,CAAC"}
|
package/src/commands/mkdir.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { getArg } from "./command-helpers";
|
|
2
|
-
import { assertPathAccess, resolvePath } from "./helpers";
|
|
3
|
-
/**
|
|
4
|
-
* Create one or more directories.
|
|
5
|
-
* @category files
|
|
6
|
-
* @params ["<dir>"]
|
|
7
|
-
*/
|
|
8
|
-
export const mkdirCommand = {
|
|
9
|
-
name: "mkdir",
|
|
10
|
-
description: "Make directories",
|
|
11
|
-
category: "files",
|
|
12
|
-
params: ["<dir>"],
|
|
13
|
-
run: ({ authUser, shell, cwd, args }) => {
|
|
14
|
-
if (args.length === 0) {
|
|
15
|
-
return { stderr: "mkdir: missing operand", exitCode: 1 };
|
|
16
|
-
}
|
|
17
|
-
for (let index = 0; index < args.length; index++) {
|
|
18
|
-
const dir = getArg(args, index);
|
|
19
|
-
if (!dir) {
|
|
20
|
-
return { stderr: "mkdir: missing operand", exitCode: 1 };
|
|
21
|
-
}
|
|
22
|
-
const target = resolvePath(cwd, dir);
|
|
23
|
-
assertPathAccess(authUser, target, "mkdir");
|
|
24
|
-
shell.vfs.mkdir(target);
|
|
25
|
-
}
|
|
26
|
-
return { exitCode: 0 };
|
|
27
|
-
},
|
|
28
|
-
};
|
package/src/commands/mv.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mv.d.ts","sourceRoot":"","sources":["mv.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGrD;;;;GAIG;AACH,eAAO,MAAM,SAAS,EAAE,WAyCvB,CAAC"}
|
package/src/commands/mv.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { assertPathAccess, resolvePath } from "./helpers";
|
|
2
|
-
/**
|
|
3
|
-
* Move or rename files and directories.
|
|
4
|
-
* @category files
|
|
5
|
-
* @params ["<source> <dest>"]
|
|
6
|
-
*/
|
|
7
|
-
export const mvCommand = {
|
|
8
|
-
name: "mv",
|
|
9
|
-
description: "Move or rename files",
|
|
10
|
-
category: "files",
|
|
11
|
-
params: ["<source> <dest>"],
|
|
12
|
-
run: ({ authUser, shell, cwd, args }) => {
|
|
13
|
-
const positionals = args.filter((a) => !a.startsWith("-"));
|
|
14
|
-
const [srcArg, destArg] = positionals;
|
|
15
|
-
if (!srcArg || !destArg) {
|
|
16
|
-
return { stderr: "mv: missing operand", exitCode: 1 };
|
|
17
|
-
}
|
|
18
|
-
const srcPath = resolvePath(cwd, srcArg);
|
|
19
|
-
const destPath = resolvePath(cwd, destArg);
|
|
20
|
-
try {
|
|
21
|
-
assertPathAccess(authUser, srcPath, "mv");
|
|
22
|
-
assertPathAccess(authUser, destPath, "mv");
|
|
23
|
-
if (!shell.vfs.exists(srcPath)) {
|
|
24
|
-
return {
|
|
25
|
-
stderr: `mv: ${srcArg}: No such file or directory`,
|
|
26
|
-
exitCode: 1,
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
// If dest is a directory, move into it
|
|
30
|
-
const finalDest = shell.vfs.exists(destPath) &&
|
|
31
|
-
shell.vfs.stat(destPath).type === "directory"
|
|
32
|
-
? `${destPath}/${srcArg.split("/").pop()}`
|
|
33
|
-
: destPath;
|
|
34
|
-
shell.vfs.move(srcPath, finalDest);
|
|
35
|
-
return { exitCode: 0 };
|
|
36
|
-
}
|
|
37
|
-
catch (err) {
|
|
38
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
39
|
-
return { stderr: `mv: ${msg}`, exitCode: 1 };
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nano.d.ts","sourceRoot":"","sources":["nano.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGrD;;;;GAIG;AACH,eAAO,MAAM,WAAW,EAAE,WA4BzB,CAAC"}
|
package/src/commands/nano.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import * as path from "node:path";
|
|
2
|
-
import { assertPathAccess, resolvePath } from "./helpers";
|
|
3
|
-
/**
|
|
4
|
-
* Simple text editor for editing files.
|
|
5
|
-
* @category files
|
|
6
|
-
* @params ["<file>"]
|
|
7
|
-
*/
|
|
8
|
-
export const nanoCommand = {
|
|
9
|
-
name: "nano",
|
|
10
|
-
description: "Text editor",
|
|
11
|
-
category: "files",
|
|
12
|
-
params: ["<file>"],
|
|
13
|
-
run: ({ authUser, shell, cwd, args }) => {
|
|
14
|
-
const fileArg = args[0];
|
|
15
|
-
if (!fileArg) {
|
|
16
|
-
return { stderr: "nano: missing file operand", exitCode: 1 };
|
|
17
|
-
}
|
|
18
|
-
const targetPath = resolvePath(cwd, fileArg);
|
|
19
|
-
assertPathAccess(authUser, targetPath, "nano");
|
|
20
|
-
const initialContent = shell.vfs.exists(targetPath)
|
|
21
|
-
? shell.vfs.readFile(targetPath)
|
|
22
|
-
: "";
|
|
23
|
-
const safeName = path.posix.basename(targetPath) || "buffer";
|
|
24
|
-
const tempPath = `/tmp/sshmimic-nano-${Date.now()}-${safeName}.tmp`;
|
|
25
|
-
return {
|
|
26
|
-
openEditor: {
|
|
27
|
-
targetPath,
|
|
28
|
-
tempPath,
|
|
29
|
-
initialContent,
|
|
30
|
-
},
|
|
31
|
-
exitCode: 0,
|
|
32
|
-
};
|
|
33
|
-
},
|
|
34
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"neofetch.d.ts","sourceRoot":"","sources":["neofetch.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGrD;;;;GAIG;AACH,eAAO,MAAM,eAAe,EAAE,WA2C7B,CAAC"}
|
package/src/commands/neofetch.js
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { buildNeofetchOutput } from "../modules/neofetch";
|
|
2
|
-
import { ifFlag } from "./command-helpers";
|
|
3
|
-
/**
|
|
4
|
-
* Display system information in a decorative format.
|
|
5
|
-
* @category system
|
|
6
|
-
* @params ["[--off]"]
|
|
7
|
-
*/
|
|
8
|
-
export const neofetchCommand = {
|
|
9
|
-
name: "neofetch",
|
|
10
|
-
description: "System info display",
|
|
11
|
-
category: "system",
|
|
12
|
-
params: ["[--off]"],
|
|
13
|
-
run: ({ args, authUser, hostname, shell, env }) => {
|
|
14
|
-
if (!shell.packageManager.isInstalled("neofetch")) {
|
|
15
|
-
return {
|
|
16
|
-
stderr: "bash: neofetch: command not found\nHint: install it with: apt install neofetch\n",
|
|
17
|
-
exitCode: 127,
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
if (ifFlag(args, "--help")) {
|
|
21
|
-
return {
|
|
22
|
-
stdout: "Usage: neofetch [--off]",
|
|
23
|
-
exitCode: 0,
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
if (ifFlag(args, "--off")) {
|
|
27
|
-
return {
|
|
28
|
-
stdout: `${authUser}@${hostname}`,
|
|
29
|
-
exitCode: 0,
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
return {
|
|
33
|
-
stdout: buildNeofetchOutput({
|
|
34
|
-
user: authUser,
|
|
35
|
-
host: hostname,
|
|
36
|
-
shell: env.vars.SHELL,
|
|
37
|
-
shellProps: shell.properties,
|
|
38
|
-
terminal: env.vars.TERM,
|
|
39
|
-
uptimeSeconds: Math.floor((Date.now() - shell.startTime) / 1000),
|
|
40
|
-
packages: (() => {
|
|
41
|
-
const count = shell.packageManager?.installedCount() ?? 0;
|
|
42
|
-
return `${count} (dpkg)`;
|
|
43
|
-
})(),
|
|
44
|
-
}),
|
|
45
|
-
exitCode: 0,
|
|
46
|
-
};
|
|
47
|
-
},
|
|
48
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["node.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAmPrD;;;;;GAKG;AACH,eAAO,MAAM,WAAW,EAAE,WAkFzB,CAAC"}
|