typescript-virtual-container 1.6.1 → 1.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -21
- package/dist/.tsbuildinfo +1 -1
- package/dist/VirtualShell/index.d.ts +3 -0
- package/dist/VirtualShell/index.js +2 -0
- package/dist/commands/dpkg.js +1 -1
- package/dist/commands/expr.js +1 -1
- package/dist/commands/last.js +1 -1
- package/dist/commands/manuals-bundle.js +1 -1
- package/dist/commands/miscutils.js +3 -3
- package/dist/commands/mousepad.d.ts +2 -0
- package/dist/commands/mousepad.js +21 -0
- package/dist/commands/netcat.js +1 -1
- package/dist/commands/procUtils.js +1 -1
- package/dist/commands/registry.js +7 -0
- package/dist/commands/startxfce4.d.ts +2 -0
- package/dist/commands/startxfce4.js +13 -0
- package/dist/commands/sysinfo.js +3 -3
- package/dist/commands/textutils.js +2 -2
- package/dist/commands/top.js +1 -1
- package/dist/commands/uname.js +1 -1
- package/dist/commands/xfceDesktop.d.ts +2 -0
- package/dist/commands/xfceDesktop.js +13 -0
- package/dist/modules/VirtualNetworkManager.js +1 -0
- package/dist/modules/desktopManager.d.ts +104 -0
- package/dist/modules/desktopManager.js +927 -0
- package/dist/modules/linuxRootfs.js +125 -19
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
| Mode | Entry point | Use case |
|
|
28
28
|
|------|-------------|----------|
|
|
29
29
|
| **SSH/SFTP server** | `VirtualSshServer` / `VirtualSftpServer` | Honeypots, remote testing, training environments |
|
|
30
|
-
| **Web shell** | `builds/fortune-nyx-v1.6.
|
|
31
|
-
| **Standalone CLI** | `builds/fortune-nyx-v1.6.
|
|
30
|
+
| **Web shell** | `builds/fortune-nyx-v1.6.2-web.min.js` (ESM) | Embedded terminals, interactive tutorials, browser demos |
|
|
31
|
+
| **Standalone CLI** | `builds/fortune-nyx-v1.6.2-directbash-k6.1.0.mjs` (single file) | Local shell, one-liner demos, no install required |
|
|
32
32
|
<!-- /BUILD:mode-table -->
|
|
33
33
|
|
|
34
34
|
All three modes share the same core: a pure in-memory VFS, a real shell interpreter, a virtual package manager, and a typed programmatic API.
|
|
@@ -49,22 +49,22 @@ npm install typescript-virtual-container
|
|
|
49
49
|
<!-- BUILD:curl-start -->
|
|
50
50
|
#### Interactive local shell — persists VFS in .vfs/ in the current directory
|
|
51
51
|
```bash
|
|
52
|
-
curl -s https://raw.githubusercontent.com/itsrealfortune/typescript-virtual-container/refs/heads/main/builds/fortune-nyx-v1.6.
|
|
52
|
+
curl -s https://raw.githubusercontent.com/itsrealfortune/typescript-virtual-container/refs/heads/main/builds/fortune-nyx-v1.6.2-directbash-k6.1.0.mjs -o fortune-nyx-v1.6.2-directbash-k6.1.0.mjs && node fortune-nyx-v1.6.2-directbash-k6.1.0.mjs
|
|
53
53
|
```
|
|
54
54
|
|
|
55
55
|
#### SSH server with built-in SFTP subsystem (scp / sftp on port 2222)
|
|
56
56
|
```bash
|
|
57
|
-
curl -s https://raw.githubusercontent.com/itsrealfortune/typescript-virtual-container/refs/heads/main/builds/fortune-nyx-v1.6.
|
|
57
|
+
curl -s https://raw.githubusercontent.com/itsrealfortune/typescript-virtual-container/refs/heads/main/builds/fortune-nyx-v1.6.2-ssh.cjs -o fortune-nyx-v1.6.2-ssh.cjs && node fortune-nyx-v1.6.2-ssh.cjs
|
|
58
58
|
```
|
|
59
59
|
|
|
60
60
|
#### Custom SSH port
|
|
61
61
|
```bash
|
|
62
|
-
node fortune-nyx-v1.6.
|
|
62
|
+
node fortune-nyx-v1.6.2-ssh.cjs --ssh-port=2022
|
|
63
63
|
```
|
|
64
64
|
|
|
65
65
|
#### SSH disabled (handler only, no server started)
|
|
66
66
|
```bash
|
|
67
|
-
node fortune-nyx-v1.6.
|
|
67
|
+
node fortune-nyx-v1.6.2-ssh.cjs --no-ssh
|
|
68
68
|
```
|
|
69
69
|
<!-- /BUILD:curl-start -->
|
|
70
70
|
|
|
@@ -72,16 +72,16 @@ node fortune-nyx-v1.6.1-ssh.cjs --no-ssh
|
|
|
72
72
|
> The standalone builds are intended for quick demos and testing. For production use, it's recommended to install the package and import the relevant classes directly in your codebase for better performance, stability, and security.
|
|
73
73
|
|
|
74
74
|
<!-- BUILD:selfStandalone-options -->
|
|
75
|
-
**`fortune-nyx-v1.6.
|
|
75
|
+
**`fortune-nyx-v1.6.2-directbash-k6.1.0.mjs` options:**
|
|
76
76
|
|
|
77
77
|
```bash
|
|
78
|
-
node fortune-nyx-v1.6.
|
|
79
|
-
node fortune-nyx-v1.6.
|
|
80
|
-
node fortune-nyx-v1.6.
|
|
81
|
-
node fortune-nyx-v1.6.
|
|
82
|
-
node fortune-nyx-v1.6.
|
|
83
|
-
node fortune-nyx-v1.6.
|
|
84
|
-
node fortune-nyx-v1.6.
|
|
78
|
+
node fortune-nyx-v1.6.2-directbash-k6.1.0.mjs # boot as root
|
|
79
|
+
node fortune-nyx-v1.6.2-directbash-k6.1.0.mjs --user alice # boot as alice (prompts for password if set)
|
|
80
|
+
node fortune-nyx-v1.6.2-directbash-k6.1.0.mjs --user=alice # same, inline form
|
|
81
|
+
node fortune-nyx-v1.6.2-directbash-k6.1.0.mjs --hostname=my-box # custom hostname
|
|
82
|
+
node fortune-nyx-v1.6.2-directbash-k6.1.0.mjs --snapshot=/data/.vfs # custom VFS snapshot path
|
|
83
|
+
node fortune-nyx-v1.6.2-directbash-k6.1.0.mjs --help # show all options
|
|
84
|
+
node fortune-nyx-v1.6.2-directbash-k6.1.0.mjs --version # print version
|
|
85
85
|
```
|
|
86
86
|
<!-- /BUILD:selfStandalone-options -->
|
|
87
87
|
|
|
@@ -108,7 +108,7 @@ Two browser bundles are available:
|
|
|
108
108
|
<!-- BUILD:web-table -->
|
|
109
109
|
| Bundle | Format | Entry point | Use case |
|
|
110
110
|
|--------|--------|-------------|----------|
|
|
111
|
-
| `builds/fortune-nyx-v1.6.
|
|
111
|
+
| `builds/fortune-nyx-v1.6.2-web.min.js` | ESM | `createWebShell()` | Embedded terminals, modern bundlers |
|
|
112
112
|
<!-- /BUILD:web-table -->
|
|
113
113
|
|
|
114
114
|
Both bundles persist the VFS in **IndexedDB** — state survives page reloads.
|
|
@@ -120,11 +120,11 @@ bun run build-all # rebuild everything
|
|
|
120
120
|
```
|
|
121
121
|
|
|
122
122
|
<!-- BUILD:web-options -->
|
|
123
|
-
**`fortune-nyx-v1.6.
|
|
123
|
+
**`fortune-nyx-v1.6.2-web.min.js`** — lightweight shell with IndexedDB VFS:
|
|
124
124
|
|
|
125
125
|
```html
|
|
126
126
|
<script type="module">
|
|
127
|
-
import { createWebShell } from "./builds/fortune-nyx-v1.6.
|
|
127
|
+
import { createWebShell } from "./builds/fortune-nyx-v1.6.2-web.min.js";
|
|
128
128
|
|
|
129
129
|
const shell = createWebShell("web-vm", {
|
|
130
130
|
vfs: { databaseName: "virtual-env-js", storeName: "vfs" },
|
|
@@ -136,11 +136,11 @@ bun run build-all # rebuild everything
|
|
|
136
136
|
</script>
|
|
137
137
|
```
|
|
138
138
|
|
|
139
|
-
**`fortune-nyx-v1.6.
|
|
139
|
+
**`fortune-nyx-v1.6.2-web.min.js`** — mirrors the `VirtualShell` programmatic API:
|
|
140
140
|
|
|
141
141
|
```html
|
|
142
142
|
<script type="module">
|
|
143
|
-
import { createVirtualShellShim } from "./builds/fortune-nyx-v1.6.
|
|
143
|
+
import { createVirtualShellShim } from "./builds/fortune-nyx-v1.6.2-web.min.js";
|
|
144
144
|
|
|
145
145
|
const shell = createVirtualShellShim("web-vm");
|
|
146
146
|
await shell.ensureInitialized();
|
|
@@ -1033,8 +1033,8 @@ Open:
|
|
|
1033
1033
|
- [x] Snapshot diff tooling — `diffSnapshots`, `formatDiff`, `assertDiff`
|
|
1034
1034
|
- [x] `node`/`python3`/`npm`/`npx` — package-gated virtual REPL stubs
|
|
1035
1035
|
<!-- BUILD:changelog -->
|
|
1036
|
-
- [x] Web shell bundles (`fortune-nyx-v1.6.
|
|
1037
|
-
- [x] Self-standalone CLI (`fortune-nyx-v1.6.
|
|
1036
|
+
- [x] Web shell bundles (`fortune-nyx-v1.6.2-web.min.js`) — fully browser-native with IndexedDB VFS
|
|
1037
|
+
- [x] Self-standalone CLI (`fortune-nyx-v1.6.2-directbash-k6.1.0.mjs`) — single-file interactive shell, per-user history, tab completion
|
|
1038
1038
|
<!-- /BUILD:changelog -->
|
|
1039
1039
|
- [x] 127+ `man` pages — all built-in commands documented via `man <cmd>`
|
|
1040
1040
|
- [x] Background job support — trailing `&` fires commands async; `:(){ :|:& };:` fork-bomb safely blocked by `MAX_CALL_DEPTH` guard; shell function names now accept any non-whitespace identifier (POSIX-compliant)
|