typescript-virtual-container 1.4.2 → 1.4.4
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/.vscode/settings.json +2 -1
- package/README.md +209 -54
- package/benchmark-results.txt +21 -21
- package/builds/self-standalone.js +196 -189
- package/builds/self-standalone.js.map +4 -4
- package/builds/standalone-wo-sftp.js +167 -160
- package/builds/standalone-wo-sftp.js.map +4 -4
- package/builds/standalone.js +169 -162
- 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 +4 -6
- package/examples/web.min.js +5 -5
- package/package.json +4 -3
- package/src/Honeypot/index.d.ts.map +1 -0
- package/src/SSHClient/index.d.ts.map +1 -0
- package/src/SSHMimic/exec.d.ts.map +1 -0
- package/src/SSHMimic/executor.d.ts.map +1 -0
- package/src/SSHMimic/hostKey.d.ts.map +1 -0
- package/src/SSHMimic/index.d.ts.map +1 -0
- package/src/SSHMimic/loginBanner.d.ts.map +1 -0
- package/src/SSHMimic/loginFormat.d.ts.map +1 -0
- package/src/SSHMimic/prompt.d.ts.map +1 -0
- package/src/SSHMimic/sftp.d.ts.map +1 -0
- package/src/VirtualFileSystem/binaryPack.d.ts.map +1 -0
- package/{dist → src}/VirtualFileSystem/index.d.ts +47 -0
- package/src/VirtualFileSystem/index.d.ts.map +1 -0
- package/{dist → src}/VirtualFileSystem/index.js +159 -0
- package/src/VirtualFileSystem/index.ts +173 -8
- package/src/VirtualFileSystem/internalTypes.d.ts.map +1 -0
- package/src/VirtualFileSystem/path.d.ts.map +1 -0
- package/src/VirtualPackageManager/index.d.ts.map +1 -0
- package/{dist → src}/VirtualShell/index.d.ts +29 -0
- package/src/VirtualShell/index.d.ts.map +1 -0
- package/{dist → src}/VirtualShell/index.js +29 -0
- package/src/VirtualShell/index.ts +36 -0
- package/src/VirtualShell/shell.d.ts.map +1 -0
- package/src/VirtualShell/shellParser.d.ts.map +1 -0
- package/{dist → src}/VirtualShell/shellParser.js +30 -2
- package/src/VirtualShell/shellParser.ts +29 -3
- package/src/VirtualUserManager/index.d.ts.map +1 -0
- package/src/bun.d.ts +1 -0
- package/src/commands/adduser.d.ts.map +1 -0
- package/src/commands/alias.d.ts.map +1 -0
- package/src/commands/apt.d.ts.map +1 -0
- package/src/commands/awk.d.ts.map +1 -0
- package/{dist → src}/commands/awk.js +1 -2
- package/src/commands/awk.ts +1 -2
- package/src/commands/base64.d.ts.map +1 -0
- package/src/commands/cat.d.ts.map +1 -0
- package/src/commands/cd.d.ts.map +1 -0
- package/{dist → src}/commands/cd.js +2 -2
- package/src/commands/cd.ts +2 -2
- package/src/commands/chmod.d.ts.map +1 -0
- package/src/commands/clear.d.ts.map +1 -0
- package/src/commands/command-helpers.d.ts.map +1 -0
- package/src/commands/cp.d.ts.map +1 -0
- package/src/commands/curl.d.ts.map +1 -0
- package/src/commands/cut.d.ts.map +1 -0
- package/src/commands/date.d.ts.map +1 -0
- package/src/commands/declare.d.ts.map +1 -0
- package/src/commands/deluser.d.ts.map +1 -0
- package/src/commands/df.d.ts.map +1 -0
- package/src/commands/diff.d.ts.map +1 -0
- package/src/commands/dpkg.d.ts.map +1 -0
- package/src/commands/du.d.ts.map +1 -0
- package/src/commands/echo.d.ts.map +1 -0
- package/src/commands/env.d.ts.map +1 -0
- package/src/commands/exit.d.ts.map +1 -0
- package/src/commands/export.d.ts.map +1 -0
- package/{dist → src}/commands/export.js +5 -3
- package/src/commands/export.ts +5 -3
- package/src/commands/find.d.ts.map +1 -0
- package/src/commands/free.d.ts.map +1 -0
- package/src/commands/grep.d.ts.map +1 -0
- package/src/commands/groups.d.ts.map +1 -0
- package/src/commands/gzip.d.ts.map +1 -0
- package/src/commands/head.d.ts.map +1 -0
- package/src/commands/help.d.ts.map +1 -0
- package/src/commands/helpers.d.ts.map +1 -0
- package/{dist → src}/commands/helpers.js +3 -0
- package/src/commands/helpers.ts +3 -0
- package/src/commands/history.d.ts.map +1 -0
- package/src/commands/hostname.d.ts.map +1 -0
- package/src/commands/htop.d.ts.map +1 -0
- package/src/commands/id.d.ts.map +1 -0
- package/src/commands/index.d.ts.map +1 -0
- package/src/commands/kill.d.ts.map +1 -0
- package/src/commands/ln.d.ts.map +1 -0
- package/src/commands/ls.d.ts.map +1 -0
- package/src/commands/ls.js +200 -0
- package/src/commands/ls.ts +210 -41
- package/src/commands/lsb-release.d.ts.map +1 -0
- package/src/commands/man.d.ts.map +1 -0
- package/src/commands/mkdir.d.ts.map +1 -0
- package/src/commands/mv.d.ts.map +1 -0
- package/src/commands/nano.d.ts.map +1 -0
- package/src/commands/neofetch.d.ts.map +1 -0
- package/src/commands/node.d.ts.map +1 -0
- package/src/commands/npm.d.ts.map +1 -0
- package/src/commands/passwd.d.ts.map +1 -0
- package/src/commands/ping.d.ts.map +1 -0
- package/src/commands/printf.d.ts.map +1 -0
- package/src/commands/ps.d.ts.map +1 -0
- package/src/commands/pwd.d.ts.map +1 -0
- package/src/commands/python.d.ts.map +1 -0
- package/src/commands/read.d.ts.map +1 -0
- package/src/commands/registry.d.ts.map +1 -0
- package/{dist → src}/commands/registry.js +2 -0
- package/src/commands/registry.ts +2 -0
- package/src/commands/rm.d.ts.map +1 -0
- package/src/commands/runtime.d.ts.map +1 -0
- package/{dist → src}/commands/runtime.js +64 -3
- package/src/commands/runtime.ts +86 -6
- package/src/commands/sed.d.ts.map +1 -0
- package/src/commands/seq.d.ts +4 -0
- package/src/commands/seq.d.ts.map +1 -0
- package/src/commands/seq.js +50 -0
- package/src/commands/seq.ts +43 -0
- package/src/commands/set.d.ts.map +1 -0
- package/src/commands/sh.d.ts +3 -0
- package/src/commands/sh.d.ts.map +1 -0
- package/{dist → src}/commands/sh.js +158 -11
- package/src/commands/sh.ts +148 -20
- package/src/commands/shift.d.ts.map +1 -0
- package/src/commands/sleep.d.ts.map +1 -0
- package/src/commands/sort.d.ts.map +1 -0
- package/src/commands/source.d.ts.map +1 -0
- package/src/commands/stat.d.ts.map +1 -0
- package/src/commands/su.d.ts.map +1 -0
- package/src/commands/sudo.d.ts.map +1 -0
- package/src/commands/tail.d.ts.map +1 -0
- package/src/commands/tar.d.ts.map +1 -0
- package/src/commands/tee.d.ts.map +1 -0
- package/src/commands/test.d.ts.map +1 -0
- package/src/commands/test.ts +4 -2
- package/src/commands/touch.d.ts.map +1 -0
- package/src/commands/tr.d.ts.map +1 -0
- package/src/commands/tree.d.ts.map +1 -0
- package/src/commands/true.d.ts.map +1 -0
- package/src/commands/type.d.ts.map +1 -0
- package/src/commands/uname.d.ts.map +1 -0
- package/src/commands/uniq.d.ts.map +1 -0
- package/src/commands/unset.d.ts.map +1 -0
- package/src/commands/uptime.d.ts.map +1 -0
- package/src/commands/wc.d.ts.map +1 -0
- package/{dist → src}/commands/wc.js +1 -1
- package/src/commands/wc.ts +1 -1
- package/src/commands/wget.d.ts.map +1 -0
- package/src/commands/which.d.ts.map +1 -0
- package/src/commands/who.d.ts.map +1 -0
- package/src/commands/whoami.d.ts.map +1 -0
- package/src/commands/xargs.d.ts.map +1 -0
- package/src/index.d.ts.map +1 -0
- package/src/modules/linuxRootfs.d.ts +59 -0
- package/src/modules/linuxRootfs.d.ts.map +1 -0
- package/src/modules/linuxRootfs.js +619 -0
- package/src/modules/linuxRootfs.ts +420 -231
- package/src/modules/neofetch.d.ts.map +1 -0
- package/src/modules/shellInteractive.d.ts.map +1 -0
- package/src/modules/shellRuntime.d.ts.map +1 -0
- package/{dist → src}/self-standalone.d.ts.map +1 -1
- package/src/standalone-wo-sftp.d.ts.map +1 -0
- package/{dist → src}/standalone.d.ts.map +1 -1
- package/{dist → src}/types/commands.d.ts +1 -1
- package/src/types/commands.d.ts.map +1 -0
- package/src/types/commands.ts +1 -1
- package/{dist → src}/types/pipeline.d.ts +6 -0
- package/src/types/pipeline.d.ts.map +1 -0
- package/src/types/pipeline.ts +6 -0
- package/src/types/streams.d.ts.map +1 -0
- package/{dist → src}/types/vfs.d.ts +15 -0
- package/src/types/vfs.d.ts.map +1 -0
- package/src/types/vfs.ts +17 -0
- package/{dist → src}/utils/expand.d.ts +11 -2
- package/src/utils/expand.d.ts.map +1 -0
- package/src/utils/expand.js +476 -0
- package/src/utils/expand.ts +281 -28
- package/src/utils/perfLogger.d.ts.map +1 -0
- package/src/utils/tokenize.d.ts.map +1 -0
- package/{dist → src}/utils/tokenize.js +40 -0
- package/src/utils/tokenize.ts +20 -0
- package/src/utils/vfsDiff.d.ts.map +1 -0
- package/src/web-api.d.ts.map +1 -0
- package/src/web-full.d.ts.map +1 -0
- package/src/web.d.ts.map +1 -0
- package/tests/command-helpers.test.d.ts +2 -0
- package/tests/command-helpers.test.d.ts.map +1 -0
- package/tests/command-helpers.test.js +92 -0
- package/tests/command-helpers.test.ts +80 -0
- package/tests/commands-admin-net.test.d.ts +2 -0
- package/tests/commands-admin-net.test.d.ts.map +1 -0
- package/tests/commands-admin-net.test.js +353 -0
- package/tests/commands-admin-net.test.ts +441 -0
- package/tests/commands-advanced.test.d.ts +2 -0
- package/tests/commands-advanced.test.d.ts.map +1 -0
- package/tests/commands-advanced.test.js +378 -0
- package/tests/commands-advanced.test.ts +456 -0
- package/tests/commands-core.test.d.ts +2 -0
- package/tests/commands-core.test.d.ts.map +1 -0
- package/tests/commands-core.test.js +477 -0
- package/tests/commands-core.test.ts +562 -0
- package/tests/commands-missing.test.d.ts +2 -0
- package/tests/commands-missing.test.d.ts.map +1 -0
- package/tests/commands-missing.test.js +470 -0
- package/tests/commands-missing.test.ts +570 -0
- package/tests/commands-specific-units.test.d.ts +2 -0
- package/tests/commands-specific-units.test.d.ts.map +1 -0
- package/tests/commands-specific-units.test.js +264 -0
- package/tests/commands-specific-units.test.ts +327 -0
- package/tests/commands-text-sys.test.d.ts +2 -0
- package/tests/commands-text-sys.test.d.ts.map +1 -0
- package/tests/commands-text-sys.test.js +366 -0
- package/tests/commands-text-sys.test.ts +445 -0
- package/tests/expand.test.d.ts +2 -0
- package/tests/expand.test.d.ts.map +1 -0
- package/tests/expand.test.js +138 -0
- package/tests/expand.test.ts +170 -0
- package/tests/helpers.test.d.ts +2 -0
- package/tests/helpers.test.d.ts.map +1 -0
- package/tests/helpers.test.js +52 -0
- package/tests/helpers.test.ts +75 -0
- package/tests/new-features.test.d.ts +2 -0
- package/tests/new-features.test.d.ts.map +1 -0
- package/tests/new-features.test.js +850 -0
- package/tests/parser-executor.test.d.ts +2 -0
- package/tests/parser-executor.test.d.ts.map +1 -0
- package/tests/parser-executor.test.js +25 -0
- package/tests/sftp.test.d.ts +2 -0
- package/tests/sftp.test.d.ts.map +1 -0
- package/tests/sftp.test.js +246 -0
- package/tests/ssh-exec.test.d.ts +2 -0
- package/tests/ssh-exec.test.d.ts.map +1 -0
- package/tests/ssh-exec.test.js +39 -0
- package/tests/test-helper.d.ts +56 -0
- package/tests/test-helper.d.ts.map +1 -0
- package/tests/test-helper.js +71 -0
- package/tests/test-helper.ts +79 -0
- package/tests/users.test.d.ts +2 -0
- package/tests/users.test.d.ts.map +1 -0
- package/tests/users.test.js +71 -0
- package/tests/web.test.d.ts +2 -0
- package/tests/web.test.d.ts.map +1 -0
- package/tests/web.test.js +149 -0
- package/tsconfig.json +2 -4
- package/dist/Honeypot/index.d.ts.map +0 -1
- package/dist/SSHClient/index.d.ts.map +0 -1
- package/dist/SSHMimic/exec.d.ts.map +0 -1
- package/dist/SSHMimic/executor.d.ts.map +0 -1
- package/dist/SSHMimic/hostKey.d.ts.map +0 -1
- package/dist/SSHMimic/index.d.ts.map +0 -1
- package/dist/SSHMimic/loginBanner.d.ts.map +0 -1
- package/dist/SSHMimic/loginFormat.d.ts.map +0 -1
- package/dist/SSHMimic/prompt.d.ts.map +0 -1
- package/dist/SSHMimic/sftp.d.ts.map +0 -1
- package/dist/VirtualFileSystem/binaryPack.d.ts.map +0 -1
- package/dist/VirtualFileSystem/index.d.ts.map +0 -1
- package/dist/VirtualFileSystem/internalTypes.d.ts.map +0 -1
- package/dist/VirtualFileSystem/path.d.ts.map +0 -1
- package/dist/VirtualPackageManager/index.d.ts.map +0 -1
- package/dist/VirtualShell/index.d.ts.map +0 -1
- package/dist/VirtualShell/shell.d.ts.map +0 -1
- package/dist/VirtualShell/shellParser.d.ts.map +0 -1
- package/dist/VirtualUserManager/index.d.ts.map +0 -1
- package/dist/commands/adduser.d.ts.map +0 -1
- package/dist/commands/alias.d.ts.map +0 -1
- package/dist/commands/apt.d.ts.map +0 -1
- package/dist/commands/awk.d.ts.map +0 -1
- package/dist/commands/base64.d.ts.map +0 -1
- package/dist/commands/cat.d.ts.map +0 -1
- package/dist/commands/cd.d.ts.map +0 -1
- package/dist/commands/chmod.d.ts.map +0 -1
- package/dist/commands/clear.d.ts.map +0 -1
- package/dist/commands/command-helpers.d.ts.map +0 -1
- package/dist/commands/cp.d.ts.map +0 -1
- package/dist/commands/curl.d.ts.map +0 -1
- package/dist/commands/cut.d.ts.map +0 -1
- package/dist/commands/date.d.ts.map +0 -1
- package/dist/commands/declare.d.ts.map +0 -1
- package/dist/commands/deluser.d.ts.map +0 -1
- package/dist/commands/df.d.ts.map +0 -1
- package/dist/commands/diff.d.ts.map +0 -1
- package/dist/commands/dpkg.d.ts.map +0 -1
- package/dist/commands/du.d.ts.map +0 -1
- package/dist/commands/echo.d.ts.map +0 -1
- package/dist/commands/env.d.ts.map +0 -1
- package/dist/commands/exit.d.ts.map +0 -1
- package/dist/commands/export.d.ts.map +0 -1
- package/dist/commands/find.d.ts.map +0 -1
- package/dist/commands/free.d.ts.map +0 -1
- package/dist/commands/grep.d.ts.map +0 -1
- package/dist/commands/groups.d.ts.map +0 -1
- package/dist/commands/gzip.d.ts.map +0 -1
- package/dist/commands/head.d.ts.map +0 -1
- package/dist/commands/help.d.ts.map +0 -1
- package/dist/commands/helpers.d.ts.map +0 -1
- package/dist/commands/history.d.ts.map +0 -1
- package/dist/commands/hostname.d.ts.map +0 -1
- package/dist/commands/htop.d.ts.map +0 -1
- package/dist/commands/id.d.ts.map +0 -1
- package/dist/commands/index.d.ts.map +0 -1
- package/dist/commands/kill.d.ts.map +0 -1
- package/dist/commands/ln.d.ts.map +0 -1
- package/dist/commands/ls.d.ts.map +0 -1
- package/dist/commands/ls.js +0 -67
- package/dist/commands/lsb-release.d.ts.map +0 -1
- package/dist/commands/man.d.ts.map +0 -1
- package/dist/commands/mkdir.d.ts.map +0 -1
- package/dist/commands/mv.d.ts.map +0 -1
- package/dist/commands/nano.d.ts.map +0 -1
- package/dist/commands/neofetch.d.ts.map +0 -1
- package/dist/commands/node.d.ts.map +0 -1
- package/dist/commands/npm.d.ts.map +0 -1
- package/dist/commands/passwd.d.ts.map +0 -1
- package/dist/commands/ping.d.ts.map +0 -1
- package/dist/commands/printf.d.ts.map +0 -1
- package/dist/commands/ps.d.ts.map +0 -1
- package/dist/commands/pwd.d.ts.map +0 -1
- package/dist/commands/python.d.ts.map +0 -1
- package/dist/commands/read.d.ts.map +0 -1
- package/dist/commands/registry.d.ts.map +0 -1
- package/dist/commands/rm.d.ts.map +0 -1
- package/dist/commands/runtime.d.ts.map +0 -1
- package/dist/commands/sed.d.ts.map +0 -1
- package/dist/commands/set.d.ts.map +0 -1
- package/dist/commands/sh.d.ts +0 -9
- package/dist/commands/sh.d.ts.map +0 -1
- package/dist/commands/shift.d.ts.map +0 -1
- package/dist/commands/sleep.d.ts.map +0 -1
- package/dist/commands/sort.d.ts.map +0 -1
- package/dist/commands/source.d.ts.map +0 -1
- package/dist/commands/stat.d.ts.map +0 -1
- package/dist/commands/su.d.ts.map +0 -1
- package/dist/commands/sudo.d.ts.map +0 -1
- package/dist/commands/tail.d.ts.map +0 -1
- package/dist/commands/tar.d.ts.map +0 -1
- package/dist/commands/tee.d.ts.map +0 -1
- package/dist/commands/test.d.ts.map +0 -1
- package/dist/commands/touch.d.ts.map +0 -1
- package/dist/commands/tr.d.ts.map +0 -1
- package/dist/commands/tree.d.ts.map +0 -1
- package/dist/commands/true.d.ts.map +0 -1
- package/dist/commands/type.d.ts.map +0 -1
- package/dist/commands/uname.d.ts.map +0 -1
- package/dist/commands/uniq.d.ts.map +0 -1
- package/dist/commands/unset.d.ts.map +0 -1
- package/dist/commands/uptime.d.ts.map +0 -1
- package/dist/commands/wc.d.ts.map +0 -1
- package/dist/commands/wget.d.ts.map +0 -1
- package/dist/commands/which.d.ts.map +0 -1
- package/dist/commands/who.d.ts.map +0 -1
- package/dist/commands/whoami.d.ts.map +0 -1
- package/dist/commands/xargs.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/modules/linuxRootfs.d.ts +0 -41
- package/dist/modules/linuxRootfs.d.ts.map +0 -1
- package/dist/modules/linuxRootfs.js +0 -440
- package/dist/modules/neofetch.d.ts.map +0 -1
- package/dist/modules/shellInteractive.d.ts.map +0 -1
- package/dist/modules/shellRuntime.d.ts.map +0 -1
- package/dist/standalone-wo-sftp.d.ts.map +0 -1
- package/dist/types/commands.d.ts.map +0 -1
- package/dist/types/pipeline.d.ts.map +0 -1
- package/dist/types/streams.d.ts.map +0 -1
- package/dist/types/vfs.d.ts.map +0 -1
- package/dist/utils/expand.d.ts.map +0 -1
- package/dist/utils/expand.js +0 -183
- package/dist/utils/perfLogger.d.ts.map +0 -1
- package/dist/utils/tokenize.d.ts.map +0 -1
- package/dist/utils/vfsDiff.d.ts.map +0 -1
- package/dist/web-api.d.ts.map +0 -1
- package/dist/web-full.d.ts.map +0 -1
- package/dist/web.d.ts.map +0 -1
- package/tests/bun-test-shim.ts +0 -9
- /package/{dist → src}/Honeypot/index.d.ts +0 -0
- /package/{dist → src}/Honeypot/index.js +0 -0
- /package/{dist → src}/SSHClient/index.d.ts +0 -0
- /package/{dist → src}/SSHClient/index.js +0 -0
- /package/{dist → src}/SSHMimic/exec.d.ts +0 -0
- /package/{dist → src}/SSHMimic/exec.js +0 -0
- /package/{dist → src}/SSHMimic/executor.d.ts +0 -0
- /package/{dist → src}/SSHMimic/executor.js +0 -0
- /package/{dist → src}/SSHMimic/hostKey.d.ts +0 -0
- /package/{dist → src}/SSHMimic/hostKey.js +0 -0
- /package/{dist → src}/SSHMimic/index.d.ts +0 -0
- /package/{dist → src}/SSHMimic/index.js +0 -0
- /package/{dist → src}/SSHMimic/loginBanner.d.ts +0 -0
- /package/{dist → src}/SSHMimic/loginBanner.js +0 -0
- /package/{dist → src}/SSHMimic/loginFormat.d.ts +0 -0
- /package/{dist → src}/SSHMimic/loginFormat.js +0 -0
- /package/{dist → src}/SSHMimic/prompt.d.ts +0 -0
- /package/{dist → src}/SSHMimic/prompt.js +0 -0
- /package/{dist → src}/SSHMimic/sftp.d.ts +0 -0
- /package/{dist → src}/SSHMimic/sftp.js +0 -0
- /package/{dist → src}/VirtualFileSystem/binaryPack.d.ts +0 -0
- /package/{dist → src}/VirtualFileSystem/binaryPack.js +0 -0
- /package/{dist → src}/VirtualFileSystem/internalTypes.d.ts +0 -0
- /package/{dist → src}/VirtualFileSystem/internalTypes.js +0 -0
- /package/{dist → src}/VirtualFileSystem/path.d.ts +0 -0
- /package/{dist → src}/VirtualFileSystem/path.js +0 -0
- /package/{dist → src}/VirtualPackageManager/index.d.ts +0 -0
- /package/{dist → src}/VirtualPackageManager/index.js +0 -0
- /package/{dist → src}/VirtualShell/shell.d.ts +0 -0
- /package/{dist → src}/VirtualShell/shell.js +0 -0
- /package/{dist → src}/VirtualShell/shellParser.d.ts +0 -0
- /package/{dist → src}/VirtualUserManager/index.d.ts +0 -0
- /package/{dist → src}/VirtualUserManager/index.js +0 -0
- /package/{dist → src}/commands/adduser.d.ts +0 -0
- /package/{dist → src}/commands/adduser.js +0 -0
- /package/{dist → src}/commands/alias.d.ts +0 -0
- /package/{dist → src}/commands/alias.js +0 -0
- /package/{dist → src}/commands/apt.d.ts +0 -0
- /package/{dist → src}/commands/apt.js +0 -0
- /package/{dist → src}/commands/awk.d.ts +0 -0
- /package/{dist → src}/commands/base64.d.ts +0 -0
- /package/{dist → src}/commands/base64.js +0 -0
- /package/{dist → src}/commands/cat.d.ts +0 -0
- /package/{dist → src}/commands/cat.js +0 -0
- /package/{dist → src}/commands/cd.d.ts +0 -0
- /package/{dist → src}/commands/chmod.d.ts +0 -0
- /package/{dist → src}/commands/chmod.js +0 -0
- /package/{dist → src}/commands/clear.d.ts +0 -0
- /package/{dist → src}/commands/clear.js +0 -0
- /package/{dist → src}/commands/command-helpers.d.ts +0 -0
- /package/{dist → src}/commands/command-helpers.js +0 -0
- /package/{dist → src}/commands/cp.d.ts +0 -0
- /package/{dist → src}/commands/cp.js +0 -0
- /package/{dist → src}/commands/curl.d.ts +0 -0
- /package/{dist → src}/commands/curl.js +0 -0
- /package/{dist → src}/commands/cut.d.ts +0 -0
- /package/{dist → src}/commands/cut.js +0 -0
- /package/{dist → src}/commands/date.d.ts +0 -0
- /package/{dist → src}/commands/date.js +0 -0
- /package/{dist → src}/commands/declare.d.ts +0 -0
- /package/{dist → src}/commands/declare.js +0 -0
- /package/{dist → src}/commands/deluser.d.ts +0 -0
- /package/{dist → src}/commands/deluser.js +0 -0
- /package/{dist → src}/commands/df.d.ts +0 -0
- /package/{dist → src}/commands/df.js +0 -0
- /package/{dist → src}/commands/diff.d.ts +0 -0
- /package/{dist → src}/commands/diff.js +0 -0
- /package/{dist → src}/commands/dpkg.d.ts +0 -0
- /package/{dist → src}/commands/dpkg.js +0 -0
- /package/{dist → src}/commands/du.d.ts +0 -0
- /package/{dist → src}/commands/du.js +0 -0
- /package/{dist → src}/commands/echo.d.ts +0 -0
- /package/{dist → src}/commands/echo.js +0 -0
- /package/{dist → src}/commands/env.d.ts +0 -0
- /package/{dist → src}/commands/env.js +0 -0
- /package/{dist → src}/commands/exit.d.ts +0 -0
- /package/{dist → src}/commands/exit.js +0 -0
- /package/{dist → src}/commands/export.d.ts +0 -0
- /package/{dist → src}/commands/find.d.ts +0 -0
- /package/{dist → src}/commands/find.js +0 -0
- /package/{dist → src}/commands/free.d.ts +0 -0
- /package/{dist → src}/commands/free.js +0 -0
- /package/{dist → src}/commands/grep.d.ts +0 -0
- /package/{dist → src}/commands/grep.js +0 -0
- /package/{dist → src}/commands/groups.d.ts +0 -0
- /package/{dist → src}/commands/groups.js +0 -0
- /package/{dist → src}/commands/gzip.d.ts +0 -0
- /package/{dist → src}/commands/gzip.js +0 -0
- /package/{dist → src}/commands/head.d.ts +0 -0
- /package/{dist → src}/commands/head.js +0 -0
- /package/{dist → src}/commands/help.d.ts +0 -0
- /package/{dist → src}/commands/help.js +0 -0
- /package/{dist → src}/commands/helpers.d.ts +0 -0
- /package/{dist → src}/commands/history.d.ts +0 -0
- /package/{dist → src}/commands/history.js +0 -0
- /package/{dist → src}/commands/hostname.d.ts +0 -0
- /package/{dist → src}/commands/hostname.js +0 -0
- /package/{dist → src}/commands/htop.d.ts +0 -0
- /package/{dist → src}/commands/htop.js +0 -0
- /package/{dist → src}/commands/id.d.ts +0 -0
- /package/{dist → src}/commands/id.js +0 -0
- /package/{dist → src}/commands/index.d.ts +0 -0
- /package/{dist → src}/commands/index.js +0 -0
- /package/{dist → src}/commands/kill.d.ts +0 -0
- /package/{dist → src}/commands/kill.js +0 -0
- /package/{dist → src}/commands/ln.d.ts +0 -0
- /package/{dist → src}/commands/ln.js +0 -0
- /package/{dist → src}/commands/ls.d.ts +0 -0
- /package/{dist → src}/commands/lsb-release.d.ts +0 -0
- /package/{dist → src}/commands/lsb-release.js +0 -0
- /package/{dist → src}/commands/man.d.ts +0 -0
- /package/{dist → src}/commands/man.js +0 -0
- /package/{dist → src}/commands/mkdir.d.ts +0 -0
- /package/{dist → src}/commands/mkdir.js +0 -0
- /package/{dist → src}/commands/mv.d.ts +0 -0
- /package/{dist → src}/commands/mv.js +0 -0
- /package/{dist → src}/commands/nano.d.ts +0 -0
- /package/{dist → src}/commands/nano.js +0 -0
- /package/{dist → src}/commands/neofetch.d.ts +0 -0
- /package/{dist → src}/commands/neofetch.js +0 -0
- /package/{dist → src}/commands/node.d.ts +0 -0
- /package/{dist → src}/commands/node.js +0 -0
- /package/{dist → src}/commands/npm.d.ts +0 -0
- /package/{dist → src}/commands/npm.js +0 -0
- /package/{dist → src}/commands/passwd.d.ts +0 -0
- /package/{dist → src}/commands/passwd.js +0 -0
- /package/{dist → src}/commands/ping.d.ts +0 -0
- /package/{dist → src}/commands/ping.js +0 -0
- /package/{dist → src}/commands/printf.d.ts +0 -0
- /package/{dist → src}/commands/printf.js +0 -0
- /package/{dist → src}/commands/ps.d.ts +0 -0
- /package/{dist → src}/commands/ps.js +0 -0
- /package/{dist → src}/commands/pwd.d.ts +0 -0
- /package/{dist → src}/commands/pwd.js +0 -0
- /package/{dist → src}/commands/python.d.ts +0 -0
- /package/{dist → src}/commands/python.js +0 -0
- /package/{dist → src}/commands/read.d.ts +0 -0
- /package/{dist → src}/commands/read.js +0 -0
- /package/{dist → src}/commands/registry.d.ts +0 -0
- /package/{dist → src}/commands/rm.d.ts +0 -0
- /package/{dist → src}/commands/rm.js +0 -0
- /package/{dist → src}/commands/runtime.d.ts +0 -0
- /package/{dist → src}/commands/sed.d.ts +0 -0
- /package/{dist → src}/commands/sed.js +0 -0
- /package/{dist → src}/commands/set.d.ts +0 -0
- /package/{dist → src}/commands/set.js +0 -0
- /package/{dist → src}/commands/shift.d.ts +0 -0
- /package/{dist → src}/commands/shift.js +0 -0
- /package/{dist → src}/commands/sleep.d.ts +0 -0
- /package/{dist → src}/commands/sleep.js +0 -0
- /package/{dist → src}/commands/sort.d.ts +0 -0
- /package/{dist → src}/commands/sort.js +0 -0
- /package/{dist → src}/commands/source.d.ts +0 -0
- /package/{dist → src}/commands/source.js +0 -0
- /package/{dist → src}/commands/stat.d.ts +0 -0
- /package/{dist → src}/commands/stat.js +0 -0
- /package/{dist → src}/commands/su.d.ts +0 -0
- /package/{dist → src}/commands/su.js +0 -0
- /package/{dist → src}/commands/sudo.d.ts +0 -0
- /package/{dist → src}/commands/sudo.js +0 -0
- /package/{dist → src}/commands/tail.d.ts +0 -0
- /package/{dist → src}/commands/tail.js +0 -0
- /package/{dist → src}/commands/tar.d.ts +0 -0
- /package/{dist → src}/commands/tar.js +0 -0
- /package/{dist → src}/commands/tee.d.ts +0 -0
- /package/{dist → src}/commands/tee.js +0 -0
- /package/{dist → src}/commands/test.d.ts +0 -0
- /package/{dist → src}/commands/test.js +0 -0
- /package/{dist → src}/commands/touch.d.ts +0 -0
- /package/{dist → src}/commands/touch.js +0 -0
- /package/{dist → src}/commands/tr.d.ts +0 -0
- /package/{dist → src}/commands/tr.js +0 -0
- /package/{dist → src}/commands/tree.d.ts +0 -0
- /package/{dist → src}/commands/tree.js +0 -0
- /package/{dist → src}/commands/true.d.ts +0 -0
- /package/{dist → src}/commands/true.js +0 -0
- /package/{dist → src}/commands/type.d.ts +0 -0
- /package/{dist → src}/commands/type.js +0 -0
- /package/{dist → src}/commands/uname.d.ts +0 -0
- /package/{dist → src}/commands/uname.js +0 -0
- /package/{dist → src}/commands/uniq.d.ts +0 -0
- /package/{dist → src}/commands/uniq.js +0 -0
- /package/{dist → src}/commands/unset.d.ts +0 -0
- /package/{dist → src}/commands/unset.js +0 -0
- /package/{dist → src}/commands/uptime.d.ts +0 -0
- /package/{dist → src}/commands/uptime.js +0 -0
- /package/{dist → src}/commands/wc.d.ts +0 -0
- /package/{dist → src}/commands/wget.d.ts +0 -0
- /package/{dist → src}/commands/wget.js +0 -0
- /package/{dist → src}/commands/which.d.ts +0 -0
- /package/{dist → src}/commands/which.js +0 -0
- /package/{dist → src}/commands/who.d.ts +0 -0
- /package/{dist → src}/commands/who.js +0 -0
- /package/{dist → src}/commands/whoami.d.ts +0 -0
- /package/{dist → src}/commands/whoami.js +0 -0
- /package/{dist → src}/commands/xargs.d.ts +0 -0
- /package/{dist → src}/commands/xargs.js +0 -0
- /package/{dist → src}/index.d.ts +0 -0
- /package/{dist → src}/index.js +0 -0
- /package/{dist → src}/modules/neofetch.d.ts +0 -0
- /package/{dist → src}/modules/neofetch.js +0 -0
- /package/{dist → src}/modules/shellInteractive.d.ts +0 -0
- /package/{dist → src}/modules/shellInteractive.js +0 -0
- /package/{dist → src}/modules/shellRuntime.d.ts +0 -0
- /package/{dist → src}/modules/shellRuntime.js +0 -0
- /package/{dist → src}/self-standalone.d.ts +0 -0
- /package/{dist → src}/self-standalone.js +0 -0
- /package/{dist → src}/standalone-wo-sftp.d.ts +0 -0
- /package/{dist → src}/standalone-wo-sftp.js +0 -0
- /package/{dist → src}/standalone.d.ts +0 -0
- /package/{dist → src}/standalone.js +0 -0
- /package/{dist → src}/types/commands.js +0 -0
- /package/{dist → src}/types/pipeline.js +0 -0
- /package/{dist → src}/types/streams.d.ts +0 -0
- /package/{dist → src}/types/streams.js +0 -0
- /package/{dist → src}/types/vfs.js +0 -0
- /package/{dist → src}/utils/perfLogger.d.ts +0 -0
- /package/{dist → src}/utils/perfLogger.js +0 -0
- /package/{dist → src}/utils/tokenize.d.ts +0 -0
- /package/{dist → src}/utils/vfsDiff.d.ts +0 -0
- /package/{dist → src}/utils/vfsDiff.js +0 -0
- /package/{dist → src}/web-api.d.ts +0 -0
- /package/{dist → src}/web-api.js +0 -0
- /package/{dist → src}/web-full.d.ts +0 -0
- /package/{dist → src}/web-full.js +0 -0
- /package/{dist → src}/web.d.ts +0 -0
- /package/{dist → src}/web.js +0 -0
|
@@ -2,15 +2,10 @@ import { EventEmitter } from "node:events";
|
|
|
2
2
|
import * as fsSync from "node:fs";
|
|
3
3
|
import * as path from "node:path";
|
|
4
4
|
import { gunzipSync, gzipSync } from "node:zlib";
|
|
5
|
-
import type {
|
|
6
|
-
InternalDirectoryNode,
|
|
7
|
-
InternalFileNode,
|
|
8
|
-
InternalNode,
|
|
9
|
-
} from "./internalTypes";
|
|
10
|
-
import { decodeVfs, encodeVfs, isBinarySnapshot } from "./binaryPack";
|
|
11
|
-
import { getNode, getParentDirectory, normalizePath } from "./path";
|
|
12
5
|
import type {
|
|
13
6
|
RemoveOptions,
|
|
7
|
+
VfsDirectoryNode,
|
|
8
|
+
VfsFileNode,
|
|
14
9
|
VfsNodeStats,
|
|
15
10
|
VfsSnapshot,
|
|
16
11
|
VfsSnapshotDirectoryNode,
|
|
@@ -18,6 +13,13 @@ import type {
|
|
|
18
13
|
VfsSnapshotNode,
|
|
19
14
|
WriteFileOptions,
|
|
20
15
|
} from "../types/vfs";
|
|
16
|
+
import { decodeVfs, encodeVfs, isBinarySnapshot } from "./binaryPack";
|
|
17
|
+
import type {
|
|
18
|
+
InternalDirectoryNode,
|
|
19
|
+
InternalFileNode,
|
|
20
|
+
InternalNode,
|
|
21
|
+
} from "./internalTypes";
|
|
22
|
+
import { getNode, getParentDirectory, normalizePath } from "./path";
|
|
21
23
|
|
|
22
24
|
// ── Persistence options ───────────────────────────────────────────────────────
|
|
23
25
|
|
|
@@ -75,6 +77,11 @@ class VirtualFileSystem extends EventEmitter {
|
|
|
75
77
|
private root: InternalDirectoryNode;
|
|
76
78
|
private readonly mode: VfsPersistenceMode;
|
|
77
79
|
private readonly snapshotFile: string | null;
|
|
80
|
+
/** Active host-directory mounts: vPath → { hostPath, readOnly } */
|
|
81
|
+
private readonly mounts = new Map<string, { hostPath: string; readOnly: boolean }>();
|
|
82
|
+
/** True when running in a browser environment (no host FS access). */
|
|
83
|
+
private static readonly isBrowser =
|
|
84
|
+
typeof process === "undefined" || typeof (process as NodeJS.Process).versions?.node === "undefined";
|
|
78
85
|
|
|
79
86
|
constructor(options: VfsOptions = {}) {
|
|
80
87
|
super();
|
|
@@ -219,7 +226,97 @@ class VirtualFileSystem extends EventEmitter {
|
|
|
219
226
|
// ── Public filesystem API ─────────────────────────────────────────────────
|
|
220
227
|
|
|
221
228
|
/** Creates a directory (and any missing parents). */
|
|
222
|
-
|
|
229
|
+
|
|
230
|
+
// ── Mount API ─────────────────────────────────────────────────────────────
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* Mount a host directory into the VFS at `vPath`.
|
|
234
|
+
*
|
|
235
|
+
* Files inside `vPath` are read directly from the host filesystem via
|
|
236
|
+
* `node:fs`. All standard VFS operations (`readFile`, `writeFile`,
|
|
237
|
+
* `exists`, `stat`, `list`) are transparently delegated.
|
|
238
|
+
*
|
|
239
|
+
* In browser environments the mount is silently ignored — `vPath` remains
|
|
240
|
+
* an empty in-memory directory.
|
|
241
|
+
*
|
|
242
|
+
* @param vPath Absolute path inside the VM (e.g. `"/app"`).
|
|
243
|
+
* @param hostPath Path on the host filesystem — relative paths are
|
|
244
|
+
* resolved from `process.cwd()`.
|
|
245
|
+
* @param readOnly When `true` (default), write operations inside the
|
|
246
|
+
* mount throw `EROFS: read-only file system`.
|
|
247
|
+
*
|
|
248
|
+
* @example
|
|
249
|
+
* ```ts
|
|
250
|
+
* shell.vfs.mount("/app", "./src", { readOnly: true });
|
|
251
|
+
* // cat /app/index.ts — reads ./src/index.ts from host
|
|
252
|
+
* ```
|
|
253
|
+
*/
|
|
254
|
+
public mount(
|
|
255
|
+
vPath: string,
|
|
256
|
+
hostPath: string,
|
|
257
|
+
{ readOnly = true }: { readOnly?: boolean } = {},
|
|
258
|
+
): void {
|
|
259
|
+
if (VirtualFileSystem.isBrowser) return; // silently degrade in browser
|
|
260
|
+
const normalized = normalizePath(vPath);
|
|
261
|
+
const resolved = path.resolve(hostPath);
|
|
262
|
+
if (!fsSync.existsSync(resolved)) {
|
|
263
|
+
throw new Error(`VirtualFileSystem.mount: host path does not exist: "${resolved}"`);
|
|
264
|
+
}
|
|
265
|
+
if (!fsSync.statSync(resolved).isDirectory()) {
|
|
266
|
+
throw new Error(`VirtualFileSystem.mount: host path is not a directory: "${resolved}"`);
|
|
267
|
+
}
|
|
268
|
+
// Ensure the mount point exists in the VFS tree
|
|
269
|
+
this.mkdir(normalized);
|
|
270
|
+
this.mounts.set(normalized, { hostPath: resolved, readOnly });
|
|
271
|
+
this.emit("mount", { vPath: normalized, hostPath: resolved, readOnly });
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* Unmount a previously mounted host directory.
|
|
276
|
+
* The in-memory VFS directory at `vPath` is preserved but the host
|
|
277
|
+
* delegation is removed.
|
|
278
|
+
*/
|
|
279
|
+
public unmount(vPath: string): void {
|
|
280
|
+
const normalized = normalizePath(vPath);
|
|
281
|
+
if (this.mounts.delete(normalized)) {
|
|
282
|
+
this.emit("unmount", { vPath: normalized });
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
/** List all active mounts. */
|
|
287
|
+
public getMounts(): Array<{ vPath: string; hostPath: string; readOnly: boolean }> {
|
|
288
|
+
return [...this.mounts.entries()].map(([vPath, opts]) => ({
|
|
289
|
+
vPath, ...opts,
|
|
290
|
+
}));
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
/**
|
|
294
|
+
* If `targetPath` is inside a mount, return `{ hostPath, readOnly, relPath }`.
|
|
295
|
+
* `relPath` is the path relative to the mount's host directory.
|
|
296
|
+
* Returns `null` if the path is not under any mount.
|
|
297
|
+
*/
|
|
298
|
+
private resolveMount(targetPath: string): {
|
|
299
|
+
hostPath: string;
|
|
300
|
+
readOnly: boolean;
|
|
301
|
+
relPath: string;
|
|
302
|
+
fullHostPath: string;
|
|
303
|
+
} | null {
|
|
304
|
+
const normalized = normalizePath(targetPath);
|
|
305
|
+
// Iterate mounts from most specific to least specific
|
|
306
|
+
const sorted = [...this.mounts.entries()].sort(
|
|
307
|
+
([a], [b]) => b.length - a.length,
|
|
308
|
+
);
|
|
309
|
+
for (const [vBase, opts] of sorted) {
|
|
310
|
+
if (normalized === vBase || normalized.startsWith(`${vBase}/`)) {
|
|
311
|
+
const relPath = normalized.slice(vBase.length).replace(/^\//, "");
|
|
312
|
+
const fullHostPath = relPath ? path.join(opts.hostPath, relPath) : opts.hostPath;
|
|
313
|
+
return { hostPath: opts.hostPath, readOnly: opts.readOnly, relPath, fullHostPath };
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
return null;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
public mkdir(targetPath: string, mode: number = 0o755): void {
|
|
223
320
|
const normalized = normalizePath(targetPath);
|
|
224
321
|
const existing = (() => {
|
|
225
322
|
try {
|
|
@@ -245,6 +342,15 @@ class VirtualFileSystem extends EventEmitter {
|
|
|
245
342
|
content: string | Buffer,
|
|
246
343
|
options: WriteFileOptions = {},
|
|
247
344
|
): void {
|
|
345
|
+
// Delegate to host FS if inside a mount
|
|
346
|
+
const m = this.resolveMount(targetPath);
|
|
347
|
+
if (m) {
|
|
348
|
+
if (m.readOnly) throw new Error(`EROFS: read-only file system, open '${m.fullHostPath}'`);
|
|
349
|
+
const dir = path.dirname(m.fullHostPath);
|
|
350
|
+
if (!fsSync.existsSync(dir)) fsSync.mkdirSync(dir, { recursive: true });
|
|
351
|
+
fsSync.writeFileSync(m.fullHostPath, Buffer.isBuffer(content) ? content : Buffer.from(content, "utf8"));
|
|
352
|
+
return;
|
|
353
|
+
}
|
|
248
354
|
const normalized = normalizePath(targetPath);
|
|
249
355
|
const { parent, name } = getParentDirectory(
|
|
250
356
|
this.root,
|
|
@@ -288,6 +394,11 @@ class VirtualFileSystem extends EventEmitter {
|
|
|
288
394
|
* Gzip-compressed files are transparently decompressed.
|
|
289
395
|
*/
|
|
290
396
|
public readFile(targetPath: string): string {
|
|
397
|
+
const m = this.resolveMount(targetPath);
|
|
398
|
+
if (m) {
|
|
399
|
+
if (!fsSync.existsSync(m.fullHostPath)) throw new Error(`ENOENT: no such file or directory, open '${m.fullHostPath}'`);
|
|
400
|
+
return fsSync.readFileSync(m.fullHostPath, "utf8");
|
|
401
|
+
}
|
|
291
402
|
const normalized = normalizePath(targetPath);
|
|
292
403
|
const node = getNode(this.root, normalized);
|
|
293
404
|
if (node.type !== "file") {
|
|
@@ -301,6 +412,11 @@ class VirtualFileSystem extends EventEmitter {
|
|
|
301
412
|
|
|
302
413
|
/** Reads file content as a Buffer (decompresses if needed). */
|
|
303
414
|
public readFileRaw(targetPath: string): Buffer {
|
|
415
|
+
const m = this.resolveMount(targetPath);
|
|
416
|
+
if (m) {
|
|
417
|
+
if (!fsSync.existsSync(m.fullHostPath)) throw new Error(`ENOENT: no such file or directory, open '${m.fullHostPath}'`);
|
|
418
|
+
return fsSync.readFileSync(m.fullHostPath);
|
|
419
|
+
}
|
|
304
420
|
const normalized = normalizePath(targetPath);
|
|
305
421
|
const node = getNode(this.root, normalized);
|
|
306
422
|
if (node.type !== "file") {
|
|
@@ -314,6 +430,8 @@ class VirtualFileSystem extends EventEmitter {
|
|
|
314
430
|
|
|
315
431
|
/** Returns true when a file or directory exists at path. */
|
|
316
432
|
public exists(targetPath: string): boolean {
|
|
433
|
+
const m = this.resolveMount(targetPath);
|
|
434
|
+
if (m) return fsSync.existsSync(m.fullHostPath);
|
|
317
435
|
try {
|
|
318
436
|
getNode(this.root, normalizePath(targetPath));
|
|
319
437
|
return true;
|
|
@@ -329,6 +447,34 @@ class VirtualFileSystem extends EventEmitter {
|
|
|
329
447
|
|
|
330
448
|
/** Returns metadata for a file or directory. */
|
|
331
449
|
public stat(targetPath: string): VfsNodeStats {
|
|
450
|
+
const m = this.resolveMount(targetPath);
|
|
451
|
+
if (m) {
|
|
452
|
+
if (!fsSync.existsSync(m.fullHostPath)) throw new Error(`ENOENT: stat '${m.fullHostPath}'`);
|
|
453
|
+
const hst = fsSync.statSync(m.fullHostPath);
|
|
454
|
+
const name = m.relPath.split("/").pop() ?? m.fullHostPath.split("/").pop() ?? "";
|
|
455
|
+
const now = hst.mtime;
|
|
456
|
+
if (hst.isDirectory()) {
|
|
457
|
+
return {
|
|
458
|
+
type: "directory",
|
|
459
|
+
name,
|
|
460
|
+
path: normalizePath(targetPath),
|
|
461
|
+
mode: 0o755,
|
|
462
|
+
createdAt: hst.birthtime,
|
|
463
|
+
updatedAt: now,
|
|
464
|
+
childrenCount: fsSync.readdirSync(m.fullHostPath).length,
|
|
465
|
+
} satisfies VfsDirectoryNode;
|
|
466
|
+
}
|
|
467
|
+
return {
|
|
468
|
+
type: "file",
|
|
469
|
+
name,
|
|
470
|
+
path: normalizePath(targetPath),
|
|
471
|
+
mode: m.readOnly ? 0o444 : 0o644,
|
|
472
|
+
createdAt: hst.birthtime,
|
|
473
|
+
updatedAt: now,
|
|
474
|
+
compressed: false,
|
|
475
|
+
size: hst.size,
|
|
476
|
+
} satisfies VfsFileNode;
|
|
477
|
+
}
|
|
332
478
|
const normalized = normalizePath(targetPath);
|
|
333
479
|
const node = getNode(this.root, normalized);
|
|
334
480
|
const name = normalized === "/" ? "" : path.posix.basename(normalized);
|
|
@@ -359,6 +505,13 @@ class VirtualFileSystem extends EventEmitter {
|
|
|
359
505
|
|
|
360
506
|
/** Lists direct children names of a directory (sorted). */
|
|
361
507
|
public list(dirPath: string = "/"): string[] {
|
|
508
|
+
const m = this.resolveMount(dirPath);
|
|
509
|
+
if (m) {
|
|
510
|
+
if (!fsSync.existsSync(m.fullHostPath)) return [];
|
|
511
|
+
try {
|
|
512
|
+
return fsSync.readdirSync(m.fullHostPath).sort();
|
|
513
|
+
} catch { return []; }
|
|
514
|
+
}
|
|
362
515
|
const normalized = normalizePath(dirPath);
|
|
363
516
|
const node = getNode(this.root, normalized);
|
|
364
517
|
if (node.type !== "directory") {
|
|
@@ -508,6 +661,18 @@ class VirtualFileSystem extends EventEmitter {
|
|
|
508
661
|
|
|
509
662
|
/** Removes a file or directory node. */
|
|
510
663
|
public remove(targetPath: string, options: RemoveOptions = {}): void {
|
|
664
|
+
const m = this.resolveMount(targetPath);
|
|
665
|
+
if (m) {
|
|
666
|
+
if (m.readOnly) throw new Error(`EROFS: read-only file system, unlink '${m.fullHostPath}'`);
|
|
667
|
+
if (!fsSync.existsSync(m.fullHostPath)) throw new Error(`ENOENT: no such file or directory, unlink '${m.fullHostPath}'`);
|
|
668
|
+
const hst = fsSync.statSync(m.fullHostPath);
|
|
669
|
+
if (hst.isDirectory()) {
|
|
670
|
+
fsSync.rmSync(m.fullHostPath, { recursive: options.recursive ?? false });
|
|
671
|
+
} else {
|
|
672
|
+
fsSync.unlinkSync(m.fullHostPath);
|
|
673
|
+
}
|
|
674
|
+
return;
|
|
675
|
+
}
|
|
511
676
|
const normalized = normalizePath(targetPath);
|
|
512
677
|
if (normalized === "/") throw new Error("Cannot remove root directory.");
|
|
513
678
|
const node = getNode(this.root, normalized);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"internalTypes.d.ts","sourceRoot":"","sources":["internalTypes.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG,gBAAgB,GAAG,qBAAqB,CAAC;AAEpE,UAAU,gBAAgB;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;CAChB;AAED,MAAM,WAAW,gBAAiB,SAAQ,gBAAgB;IACzD,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,qBAAsB,SAAQ,gBAAgB;IAC9D,IAAI,EAAE,WAAW,CAAC;IAClB,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;CACpC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"path.d.ts","sourceRoot":"","sources":["path.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE3E,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CASrD;AAED,wBAAgB,SAAS,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,EAAE,CAE1D;AAED,wBAAgB,OAAO,CACtB,IAAI,EAAE,qBAAqB,EAC3B,UAAU,EAAE,MAAM,GAChB,YAAY,CAsBd;AAED,wBAAgB,kBAAkB,CACjC,IAAI,EAAE,qBAAqB,EAC3B,UAAU,EAAE,MAAM,EAClB,eAAe,EAAE,OAAO,EACxB,UAAU,EAAE,CAAC,YAAY,EAAE,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;;;OAIG;IACI,cAAc,IAAI,MAAM;IAI/B;;;;;;;;;;;;;OAaG;IACI,OAAO,CACb,KAAK,EAAE,MAAM,EAAE,EACf,IAAI,GAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAO,GAC5B;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE;IAiHvC;;;;;;;;;;;;OAYG;IACI,MAAM,CACZ,KAAK,EAAE,MAAM,EAAE,EACf,IAAI,GAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAC;QAAC,KAAK,CAAC,EAAE,OAAO,CAAA;KAAO,GAC7C;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE;IA4DvC;;;;;;OAMG;IACI,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,iBAAiB,EAAE;IAUhD;;;;;;OAMG;IACI,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;CAiBxC"}
|
|
@@ -147,6 +147,35 @@ declare class VirtualShell extends EventEmitter {
|
|
|
147
147
|
* reading `/proc` files for up-to-date values.
|
|
148
148
|
*/
|
|
149
149
|
refreshProcFs(): void;
|
|
150
|
+
/**
|
|
151
|
+
* Mount a host directory into the VFS at `vPath`.
|
|
152
|
+
*
|
|
153
|
+
* Delegates file operations inside `vPath` to the host filesystem via
|
|
154
|
+
* `node:fs`. Silently ignored in browser environments.
|
|
155
|
+
*
|
|
156
|
+
* @param vPath Absolute path inside the VM (e.g. `"/app"`).
|
|
157
|
+
* @param hostPath Path on the host — relative paths are resolved from `process.cwd()`.
|
|
158
|
+
* @param options `{ readOnly?: boolean }` — default `true`.
|
|
159
|
+
*
|
|
160
|
+
* @example
|
|
161
|
+
* ```ts
|
|
162
|
+
* const shell = new VirtualShell("dev-vm");
|
|
163
|
+
* await shell.ensureInitialized();
|
|
164
|
+
* shell.mount("/workspace", "./my-project");
|
|
165
|
+
* // shell commands can now read ./my-project files via /workspace
|
|
166
|
+
* ```
|
|
167
|
+
*/
|
|
168
|
+
mount(vPath: string, hostPath: string, options?: {
|
|
169
|
+
readOnly?: boolean;
|
|
170
|
+
}): void;
|
|
171
|
+
/** Remove a previously mounted host directory. */
|
|
172
|
+
unmount(vPath: string): void;
|
|
173
|
+
/** List all active mounts. */
|
|
174
|
+
getMounts(): Array<{
|
|
175
|
+
vPath: string;
|
|
176
|
+
hostPath: string;
|
|
177
|
+
readOnly: boolean;
|
|
178
|
+
}>;
|
|
150
179
|
/**
|
|
151
180
|
* Updates only the session-dependent `/proc` entries (`/proc/<pid>`,
|
|
152
181
|
* `/proc/self`). Cheaper than a full `refreshProcFs()` — call this
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAQ3C,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAGjD,OAAO,iBAAiB,EAAE,EAAE,KAAK,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAC1E,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAG3D;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,eAAe;IAC/B,qEAAqE;IACrE,MAAM,EAAE,MAAM,CAAC;IACf,4DAA4D;IAC5D,EAAE,EAAE,MAAM,CAAC;IACX,6DAA6D;IAC7D,IAAI,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,mBAAmB;IACnC,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/B,WAAW,IAAI,OAAO,C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OAOG;IACI,UAAU,IAAI,IAAI;IAIzB;;;;OAIG;IACI,MAAM,IAAI,iBAAiB,GAAG,IAAI;IAIzC;;;;OAIG;IACI,QAAQ,IAAI,kBAAkB,GAAG,IAAI;IAI5C;;;;OAIG;IACI,WAAW,IAAI,MAAM;IAI5B;;;;;;OAMG;IACI,eAAe,CACrB,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,MAAM,GAAG,MAAM,GACtB,IAAI;CAKP;AAED,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -196,6 +196,35 @@ class VirtualShell extends EventEmitter {
|
|
|
196
196
|
refreshProcFs() {
|
|
197
197
|
refreshProc(this.vfs, this.properties, this.hostname, this.startTime, this.users.listActiveSessions());
|
|
198
198
|
}
|
|
199
|
+
/**
|
|
200
|
+
* Mount a host directory into the VFS at `vPath`.
|
|
201
|
+
*
|
|
202
|
+
* Delegates file operations inside `vPath` to the host filesystem via
|
|
203
|
+
* `node:fs`. Silently ignored in browser environments.
|
|
204
|
+
*
|
|
205
|
+
* @param vPath Absolute path inside the VM (e.g. `"/app"`).
|
|
206
|
+
* @param hostPath Path on the host — relative paths are resolved from `process.cwd()`.
|
|
207
|
+
* @param options `{ readOnly?: boolean }` — default `true`.
|
|
208
|
+
*
|
|
209
|
+
* @example
|
|
210
|
+
* ```ts
|
|
211
|
+
* const shell = new VirtualShell("dev-vm");
|
|
212
|
+
* await shell.ensureInitialized();
|
|
213
|
+
* shell.mount("/workspace", "./my-project");
|
|
214
|
+
* // shell commands can now read ./my-project files via /workspace
|
|
215
|
+
* ```
|
|
216
|
+
*/
|
|
217
|
+
mount(vPath, hostPath, options = {}) {
|
|
218
|
+
this.vfs.mount(vPath, hostPath, options);
|
|
219
|
+
}
|
|
220
|
+
/** Remove a previously mounted host directory. */
|
|
221
|
+
unmount(vPath) {
|
|
222
|
+
this.vfs.unmount(vPath);
|
|
223
|
+
}
|
|
224
|
+
/** List all active mounts. */
|
|
225
|
+
getMounts() {
|
|
226
|
+
return this.vfs.getMounts();
|
|
227
|
+
}
|
|
199
228
|
/**
|
|
200
229
|
* Updates only the session-dependent `/proc` entries (`/proc/<pid>`,
|
|
201
230
|
* `/proc/self`). Cheaper than a full `refreshProcFs()` — call this
|
|
@@ -298,6 +298,42 @@ class VirtualShell extends EventEmitter {
|
|
|
298
298
|
);
|
|
299
299
|
}
|
|
300
300
|
|
|
301
|
+
/**
|
|
302
|
+
* Mount a host directory into the VFS at `vPath`.
|
|
303
|
+
*
|
|
304
|
+
* Delegates file operations inside `vPath` to the host filesystem via
|
|
305
|
+
* `node:fs`. Silently ignored in browser environments.
|
|
306
|
+
*
|
|
307
|
+
* @param vPath Absolute path inside the VM (e.g. `"/app"`).
|
|
308
|
+
* @param hostPath Path on the host — relative paths are resolved from `process.cwd()`.
|
|
309
|
+
* @param options `{ readOnly?: boolean }` — default `true`.
|
|
310
|
+
*
|
|
311
|
+
* @example
|
|
312
|
+
* ```ts
|
|
313
|
+
* const shell = new VirtualShell("dev-vm");
|
|
314
|
+
* await shell.ensureInitialized();
|
|
315
|
+
* shell.mount("/workspace", "./my-project");
|
|
316
|
+
* // shell commands can now read ./my-project files via /workspace
|
|
317
|
+
* ```
|
|
318
|
+
*/
|
|
319
|
+
public mount(
|
|
320
|
+
vPath: string,
|
|
321
|
+
hostPath: string,
|
|
322
|
+
options: { readOnly?: boolean } = {},
|
|
323
|
+
): void {
|
|
324
|
+
this.vfs.mount(vPath, hostPath, options);
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
/** Remove a previously mounted host directory. */
|
|
328
|
+
public unmount(vPath: string): void {
|
|
329
|
+
this.vfs.unmount(vPath);
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
/** List all active mounts. */
|
|
333
|
+
public getMounts(): Array<{ vPath: string; hostPath: string; readOnly: boolean }> {
|
|
334
|
+
return this.vfs.getMounts();
|
|
335
|
+
}
|
|
336
|
+
|
|
301
337
|
/**
|
|
302
338
|
* Updates only the session-dependent `/proc` entries (`/proc/<pid>`,
|
|
303
339
|
* `/proc/self`). Cheaper than a full `refreshProcFs()` — call this
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shell.d.ts","sourceRoot":"","sources":["shell.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,GAAG,CAAC;AAMvD,OAAO,EAGN,KAAK,YAAY,EAEjB,MAAM,yBAAyB,CAAC;AAIjC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAwBpD,wBAAgB,UAAU,CACzB,UAAU,EAAE,eAAe,EAC3B,MAAM,EAAE,WAAW,EACnB,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,GAAG,IAAI,EACxB,aAAa,oBAAY,EACzB,YAAY,EAAE,YAAY,YAAyB,EACnD,KAAK,EAAE,YAAY,GACjB,IAAI,CA0nBN"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shellParser.d.ts","sourceRoot":"","sources":["shellParser.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEX,QAAQ,EAER,MAAM,EAEN,MAAM,mBAAmB,CAAC;AAK3B;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAUpD;AAED,4EAA4E;AAC5E,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,QAAQ,CAS7D;AAID;;;GAGG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAKvE"}
|
|
@@ -202,6 +202,9 @@ function parseCommandWithRedirections(token) {
|
|
|
202
202
|
let outputFile;
|
|
203
203
|
let appendOutput = false;
|
|
204
204
|
let i = 0;
|
|
205
|
+
let stderrFile;
|
|
206
|
+
let stderrAppend = false;
|
|
207
|
+
let stderrToStdout = false;
|
|
205
208
|
while (i < parts.length) {
|
|
206
209
|
const part = parts[i];
|
|
207
210
|
if (part === "<") {
|
|
@@ -227,11 +230,36 @@ function parseCommandWithRedirections(token) {
|
|
|
227
230
|
appendOutput = false;
|
|
228
231
|
i++;
|
|
229
232
|
}
|
|
233
|
+
else if (part === "2>&1") {
|
|
234
|
+
stderrToStdout = true;
|
|
235
|
+
i++;
|
|
236
|
+
}
|
|
237
|
+
else if (part === "2>>") {
|
|
238
|
+
i++;
|
|
239
|
+
if (i >= parts.length)
|
|
240
|
+
throw new Error("Syntax error: expected filename after 2>>");
|
|
241
|
+
stderrFile = parts[i];
|
|
242
|
+
stderrAppend = true;
|
|
243
|
+
i++;
|
|
244
|
+
}
|
|
245
|
+
else if (part === "2>") {
|
|
246
|
+
i++;
|
|
247
|
+
if (i >= parts.length)
|
|
248
|
+
throw new Error("Syntax error: expected filename after 2>");
|
|
249
|
+
stderrFile = parts[i];
|
|
250
|
+
stderrAppend = false;
|
|
251
|
+
i++;
|
|
252
|
+
}
|
|
230
253
|
else {
|
|
231
254
|
cmdParts.push(part);
|
|
232
255
|
i++;
|
|
233
256
|
}
|
|
234
257
|
}
|
|
235
|
-
const
|
|
236
|
-
|
|
258
|
+
const rawName = cmdParts[0] ?? "";
|
|
259
|
+
const name = /^([A-Za-z_][A-Za-z0-9_]*)=(.*)$/.test(rawName) ? rawName : rawName.toLowerCase();
|
|
260
|
+
return {
|
|
261
|
+
name, args: cmdParts.slice(1),
|
|
262
|
+
inputFile, outputFile, appendOutput,
|
|
263
|
+
stderrFile, stderrAppend, stderrToStdout,
|
|
264
|
+
};
|
|
237
265
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type {
|
|
2
|
+
LogicalOp,
|
|
2
3
|
Pipeline,
|
|
3
4
|
PipelineCommand,
|
|
4
5
|
Script,
|
|
5
6
|
Statement,
|
|
6
|
-
LogicalOp,
|
|
7
7
|
} from "../types/pipeline";
|
|
8
8
|
import { tokenizeCommand } from "../utils/tokenize";
|
|
9
9
|
|
|
@@ -225,6 +225,10 @@ function parseCommandWithRedirections(token: string): PipelineCommand {
|
|
|
225
225
|
let appendOutput = false;
|
|
226
226
|
let i = 0;
|
|
227
227
|
|
|
228
|
+
let stderrFile: string | undefined;
|
|
229
|
+
let stderrAppend = false;
|
|
230
|
+
let stderrToStdout = false;
|
|
231
|
+
|
|
228
232
|
while (i < parts.length) {
|
|
229
233
|
const part = parts[i]!;
|
|
230
234
|
if (part === "<") {
|
|
@@ -247,13 +251,35 @@ function parseCommandWithRedirections(token: string): PipelineCommand {
|
|
|
247
251
|
outputFile = parts[i];
|
|
248
252
|
appendOutput = false;
|
|
249
253
|
i++;
|
|
254
|
+
} else if (part === "2>&1") {
|
|
255
|
+
stderrToStdout = true;
|
|
256
|
+
i++;
|
|
257
|
+
} else if (part === "2>>") {
|
|
258
|
+
i++;
|
|
259
|
+
if (i >= parts.length)
|
|
260
|
+
throw new Error("Syntax error: expected filename after 2>>");
|
|
261
|
+
stderrFile = parts[i];
|
|
262
|
+
stderrAppend = true;
|
|
263
|
+
i++;
|
|
264
|
+
} else if (part === "2>") {
|
|
265
|
+
i++;
|
|
266
|
+
if (i >= parts.length)
|
|
267
|
+
throw new Error("Syntax error: expected filename after 2>");
|
|
268
|
+
stderrFile = parts[i];
|
|
269
|
+
stderrAppend = false;
|
|
270
|
+
i++;
|
|
250
271
|
} else {
|
|
251
272
|
cmdParts.push(part);
|
|
252
273
|
i++;
|
|
253
274
|
}
|
|
254
275
|
}
|
|
255
276
|
|
|
256
|
-
const
|
|
257
|
-
|
|
277
|
+
const rawName = cmdParts[0] ?? "";
|
|
278
|
+
const name = /^([A-Za-z_][A-Za-z0-9_]*)=(.*)$/.test(rawName) ? rawName : rawName.toLowerCase();
|
|
279
|
+
return {
|
|
280
|
+
name, args: cmdParts.slice(1),
|
|
281
|
+
inputFile, outputFile, appendOutput,
|
|
282
|
+
stderrFile, stderrAppend, stderrToStd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;;;OAKG;IACI,iBAAiB,CACvB,QAAQ,EAAE,MAAM,GACd,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;CAGxC"}
|
package/src/bun.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/// <reference types="@types/bun" />
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adduser.d.ts","sourceRoot":"","sources":["adduser.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGpE;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,cAAc,EAAE,WAuF5B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alias.d.ts","sourceRoot":"","sources":["alias.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD;;;;GAIG;AACH,eAAO,MAAM,YAAY,EAAE,WAkC1B,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,cAAc,EAAE,WAoB5B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apt.d.ts","sourceRoot":"","sources":["apt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIrD;;;;GAIG;AACH,eAAO,MAAM,UAAU,EAAE,WAyJxB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,eAAe,EAAE,WA+D7B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"awk.d.ts","sourceRoot":"","sources":["awk.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIrD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,UAAU,EAAE,WAsJxB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getFlag } from "./command-helpers";
|
|
2
|
-
import {
|
|
2
|
+
import { assertPathAccess, resolvePath } from "./helpers";
|
|
3
3
|
/**
|
|
4
4
|
* Minimal awk-like pattern scanner.
|
|
5
5
|
*
|
|
@@ -87,7 +87,6 @@ export const awkCommand = {
|
|
|
87
87
|
// Arithmetic NR+1, NF-1
|
|
88
88
|
const arith = expr.replace(/\bNR\b/g, String(nr)).replace(/\bNF\b/g, String(nf));
|
|
89
89
|
if (/^[\d\s+\-*/()]+$/.test(arith)) {
|
|
90
|
-
// biome-ignore lint/security/noGlobalEval: safe arithmetic — input contains only digits and operators after variable substitution
|
|
91
90
|
try {
|
|
92
91
|
return String(Function(`"use strict"; return (${arith});`)());
|
|
93
92
|
}
|
package/src/commands/awk.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ShellModule } from "../types/commands";
|
|
2
2
|
import { getFlag } from "./command-helpers";
|
|
3
|
-
import {
|
|
3
|
+
import { assertPathAccess, resolvePath } from "./helpers";
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Minimal awk-like pattern scanner.
|
|
@@ -92,7 +92,6 @@ export const awkCommand: ShellModule = {
|
|
|
92
92
|
// Arithmetic NR+1, NF-1
|
|
93
93
|
const arith = expr.replace(/\bNR\b/g, String(nr)).replace(/\bNF\b/g, String(nf));
|
|
94
94
|
if (/^[\d\s+\-*/()]+$/.test(arith)) {
|
|
95
|
-
// biome-ignore lint/security/noGlobalEval: safe arithmetic — input contains only digits and operators after variable substitution
|
|
96
95
|
try { return String(Function(`"use strict"; return (${arith});`)()); } catch {} }
|
|
97
96
|
return expr.replace(/"/g, "");
|
|
98
97
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base64.d.ts","sourceRoot":"","sources":["base64.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGrD;;;;GAIG;AACH,eAAO,MAAM,aAAa,EAAE,WAoB3B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cat.d.ts","sourceRoot":"","sources":["cat.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIrD;;;;GAIG;AACH,eAAO,MAAM,UAAU,EAAE,WA0CxB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cd.d.ts","sourceRoot":"","sources":["cd.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGrD;;;;GAIG;AACH,eAAO,MAAM,SAAS,EAAE,WAevB,CAAC"}
|
|
@@ -9,8 +9,8 @@ export const cdCommand = {
|
|
|
9
9
|
description: "Change directory",
|
|
10
10
|
category: "navigation",
|
|
11
11
|
params: ["[path]"],
|
|
12
|
-
run: ({ authUser, shell, cwd, args
|
|
13
|
-
const target = resolvePath(cwd, args[0] ??
|
|
12
|
+
run: ({ authUser, shell, cwd, args }) => {
|
|
13
|
+
const target = resolvePath(cwd, args[0] ?? `~`);
|
|
14
14
|
assertPathAccess(authUser, target, "cd");
|
|
15
15
|
const stats = shell.vfs.stat(target);
|
|
16
16
|
if (stats.type !== "directory") {
|
package/src/commands/cd.ts
CHANGED
|
@@ -11,8 +11,8 @@ export const cdCommand: ShellModule = {
|
|
|
11
11
|
description: "Change directory",
|
|
12
12
|
category: "navigation",
|
|
13
13
|
params: ["[path]"],
|
|
14
|
-
run: ({ authUser, shell, cwd, args
|
|
15
|
-
const target = resolvePath(cwd, args[0] ??
|
|
14
|
+
run: ({ authUser, shell, cwd, args }) => {
|
|
15
|
+
const target = resolvePath(cwd, args[0] ?? `~`);
|
|
16
16
|
assertPathAccess(authUser, target, "cd");
|
|
17
17
|
const stats = shell.vfs.stat(target);
|
|
18
18
|
if (stats.type !== "directory") {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chmod.d.ts","sourceRoot":"","sources":["chmod.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAuCrD;;;;GAIG;AACH,eAAO,MAAM,YAAY,EAAE,WAwC1B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clear.d.ts","sourceRoot":"","sources":["clear.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD;;;;GAIG;AACH,eAAO,MAAM,YAAY,EAAE,WAO1B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command-helpers.d.ts","sourceRoot":"","sources":["command-helpers.ts"],"names":[],"mappings":"AAAA,KAAK,eAAe,GAAG;IACtB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;CAC1B,CAAC;AAwFF;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,OAAO,CAYxE;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,OAAO,CACtB,IAAI,EAAE,MAAM,EAAE,EACd,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,GACtB,MAAM,GAAG,IAAI,GAAG,SAAS,CA0B3B;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,MAAM,CACrB,IAAI,EAAE,MAAM,EAAE,EACd,KAAK,EAAE,MAAM,EACb,OAAO,GAAE,eAAoB,GAC3B,MAAM,GAAG,SAAS,CAGpB;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,SAAS,CACxB,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,GAAE;IAAE,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IAAC,cAAc,CAAC,EAAE,MAAM,EAAE,CAAA;CAAO,GAC3D;IACF,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACnB,eAAe,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,WAAW,EAAE,MAAM,EAAE,CAAC;CACtB,CAiDA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cp.d.ts","sourceRoot":"","sources":["cp.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIrD;;;;GAIG;AACH,eAAO,MAAM,SAAS,EAAE,WAyEvB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"curl.d.ts","sourceRoot":"","sources":["curl.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIrD;;;;GAIG;AACH,eAAO,MAAM,WAAW,EAAE,WAyIzB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cut.d.ts","sourceRoot":"","sources":["cut.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGrD;;;;GAIG;AACH,eAAO,MAAM,UAAU,EAAE,WA2BxB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date.d.ts","sourceRoot":"","sources":["date.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD;;;;GAIG;AACH,eAAO,MAAM,WAAW,EAAE,WAsBzB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"declare.d.ts","sourceRoot":"","sources":["declare.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGrD;;;;GAIG;AACH,eAAO,MAAM,cAAc,EAAE,WAwC5B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deluser.d.ts","sourceRoot":"","sources":["deluser.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGpE;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,cAAc,EAAE,WAkF5B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"df.d.ts","sourceRoot":"","sources":["df.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD;;;;GAIG;AACH,eAAO,MAAM,SAAS,EAAE,WAevB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diff.d.ts","sourceRoot":"","sources":["diff.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGrD;;;;GAIG;AACH,eAAO,MAAM,WAAW,EAAE,WAkCzB,CAAC"}
|