typescript-virtual-container 1.5.2 → 1.5.3
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 +17 -17
- package/builds/{fortune-nyx-v1.5.1-directbash-k6.1.0.mjs → fortune-nyx-v1.5.3-directbash-k6.1.0.mjs} +374 -378
- package/builds/{fortune-nyx-v1.5.1-ssh-nosftp.js → fortune-nyx-v1.5.3-ssh-nosftp.js} +138 -142
- package/builds/{fortune-nyx-v1.5.1-ssh.cjs → fortune-nyx-v1.5.3-ssh.cjs} +139 -143
- package/builds/{fortune-nyx-v1.5.1-web.min.js → fortune-nyx-v1.5.3-web.min.js} +134 -120
- package/dist/VirtualPackageManager/index.js +0 -10
- package/dist/commands/runtime.js +139 -106
- package/docs/app.js +145 -149
- package/examples/app.js +145 -149
- package/examples/demo.html +1 -1
- package/package.json +1 -1
- package/src/VirtualPackageManager/index.ts +0 -10
- package/src/commands/runtime.ts +44 -1
package/README.md
CHANGED
|
@@ -56,8 +56,8 @@
|
|
|
56
56
|
| Mode | Entry point | Use case |
|
|
57
57
|
|------|-------------|----------|
|
|
58
58
|
| **SSH/SFTP server** | `VirtualSshServer` / `VirtualSftpServer` | Honeypots, remote testing, training environments |
|
|
59
|
-
| **Web shell** | `builds/fortune-nyx-v1.5.
|
|
60
|
-
| **Standalone CLI** | `builds/fortune-nyx-v1.5.
|
|
59
|
+
| **Web shell** | `builds/fortune-nyx-v1.5.3-web.min.js` (ESM) | Embedded terminals, interactive tutorials, browser demos |
|
|
60
|
+
| **Standalone CLI** | `builds/fortune-nyx-v1.5.3-directbash-k6.1.0.mjs` (single file) | Local shell, one-liner demos, no install required |
|
|
61
61
|
<!-- /BUILD:mode-table -->
|
|
62
62
|
|
|
63
63
|
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.
|
|
@@ -78,17 +78,17 @@ npm install typescript-virtual-container
|
|
|
78
78
|
<!-- BUILD:curl-start -->
|
|
79
79
|
#### Interactivea local shell — persists VFS in .vfs/ in the current directory
|
|
80
80
|
```bash
|
|
81
|
-
curl -s https://raw.githubusercontent.com/itsrealfortune/typescript-virtual-container/refs/heads/main/builds/fortune-nyx-v1.5.
|
|
81
|
+
curl -s https://raw.githubusercontent.com/itsrealfortune/typescript-virtual-container/refs/heads/main/builds/fortune-nyx-v1.5.3-directbash-k6.1.0.mjs -o fortune-nyx-v1.5.3-directbash-k6.1.0.mjs && node fortune-nyx-v1.5.3-directbash-k6.1.0.mjs
|
|
82
82
|
```
|
|
83
83
|
|
|
84
84
|
#### SSH server (connect with any SSH client on port 2222)
|
|
85
85
|
```bash
|
|
86
|
-
curl -s https://raw.githubusercontent.com/itsrealfortune/typescript-virtual-container/refs/heads/main/builds/fortune-nyx-v1.5.
|
|
86
|
+
curl -s https://raw.githubusercontent.com/itsrealfortune/typescript-virtual-container/refs/heads/main/builds/fortune-nyx-v1.5.3-ssh.cjs -o fortune-nyx-v1.5.3-ssh.cjs && node fortune-nyx-v1.5.3-ssh.cjs
|
|
87
87
|
```
|
|
88
88
|
|
|
89
89
|
#### SSH server without SFTP (lighter build)
|
|
90
90
|
```bash
|
|
91
|
-
curl -s https://raw.githubusercontent.com/itsrealfortune/typescript-virtual-container/refs/heads/main/builds/fortune-nyx-v1.5.
|
|
91
|
+
curl -s https://raw.githubusercontent.com/itsrealfortune/typescript-virtual-container/refs/heads/main/builds/fortune-nyx-v1.5.3-ssh-nosftp.js -o fortune-nyx-v1.5.3-ssh-nosftp.js && node fortune-nyx-v1.5.3-ssh-nosftp.js
|
|
92
92
|
```
|
|
93
93
|
<!-- /BUILD:curl-start -->
|
|
94
94
|
|
|
@@ -96,13 +96,13 @@ curl -s https://raw.githubusercontent.com/itsrealfortune/typescript-virtual-cont
|
|
|
96
96
|
> 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.
|
|
97
97
|
|
|
98
98
|
<!-- BUILD:selfStandalone-options -->
|
|
99
|
-
**`fortune-nyx-v1.5.
|
|
99
|
+
**`fortune-nyx-v1.5.3-directbash-k6.1.0.mjs` options:**
|
|
100
100
|
|
|
101
101
|
```bash
|
|
102
|
-
node fortune-nyx-v1.5.
|
|
103
|
-
node fortune-nyx-v1.5.
|
|
104
|
-
node fortune-nyx-v1.5.
|
|
105
|
-
SSH_MIMIC_HOSTNAME=my-box node fortune-nyx-v1.5.
|
|
102
|
+
node fortune-nyx-v1.5.3-directbash-k6.1.0.mjs # boot as root
|
|
103
|
+
node fortune-nyx-v1.5.3-directbash-k6.1.0.mjs --user alice # boot as alice (prompts for password if set)
|
|
104
|
+
node fortune-nyx-v1.5.3-directbash-k6.1.0.mjs --user=alice # same, inline form
|
|
105
|
+
SSH_MIMIC_HOSTNAME=my-box node fortune-nyx-v1.5.3-directbash-k6.1.0.mjs # custom hostname
|
|
106
106
|
```
|
|
107
107
|
<!-- /BUILD:selfStandalone-options -->
|
|
108
108
|
|
|
@@ -129,7 +129,7 @@ Two browser bundles are available:
|
|
|
129
129
|
<!-- BUILD:web-table -->
|
|
130
130
|
| Bundle | Format | Entry point | Use case |
|
|
131
131
|
|--------|--------|-------------|----------|
|
|
132
|
-
| `builds/fortune-nyx-v1.5.
|
|
132
|
+
| `builds/fortune-nyx-v1.5.3-web.min.js` | ESM | `createWebShell()` | Embedded terminals, modern bundlers |
|
|
133
133
|
<!-- /BUILD:web-table -->
|
|
134
134
|
|
|
135
135
|
Both bundles persist the VFS in **IndexedDB** — state survives page reloads.
|
|
@@ -141,11 +141,11 @@ bun run build-all # rebuild everything
|
|
|
141
141
|
```
|
|
142
142
|
|
|
143
143
|
<!-- BUILD:web-options -->
|
|
144
|
-
**`fortune-nyx-v1.5.
|
|
144
|
+
**`fortune-nyx-v1.5.3-web.min.js`** — lightweight shell with IndexedDB VFS:
|
|
145
145
|
|
|
146
146
|
```html
|
|
147
147
|
<script type="module">
|
|
148
|
-
import { createWebShell } from "./builds/fortune-nyx-v1.5.
|
|
148
|
+
import { createWebShell } from "./builds/fortune-nyx-v1.5.3-web.min.js";
|
|
149
149
|
|
|
150
150
|
const shell = createWebShell("web-vm", {
|
|
151
151
|
vfs: { databaseName: "virtual-env-js", storeName: "vfs" },
|
|
@@ -157,11 +157,11 @@ bun run build-all # rebuild everything
|
|
|
157
157
|
</script>
|
|
158
158
|
```
|
|
159
159
|
|
|
160
|
-
**`fortune-nyx-v1.5.
|
|
160
|
+
**`fortune-nyx-v1.5.3-web.min.js`** — mirrors the `VirtualShell` programmatic API:
|
|
161
161
|
|
|
162
162
|
```html
|
|
163
163
|
<script type="module">
|
|
164
|
-
import { createVirtualShellShim } from "./builds/fortune-nyx-v1.5.
|
|
164
|
+
import { createVirtualShellShim } from "./builds/fortune-nyx-v1.5.3-web.min.js";
|
|
165
165
|
|
|
166
166
|
const shell = createVirtualShellShim("web-vm");
|
|
167
167
|
await shell.ensureInitialized();
|
|
@@ -1653,8 +1653,8 @@ Open:
|
|
|
1653
1653
|
- [x] Snapshot diff tooling — `diffSnapshots`, `formatDiff`, `assertDiff`
|
|
1654
1654
|
- [x] `node`/`python3`/`npm`/`npx` — package-gated virtual REPL stubs
|
|
1655
1655
|
<!-- BUILD:changelog -->
|
|
1656
|
-
- [x] Web shell bundles (`fortune-nyx-v1.5.
|
|
1657
|
-
- [x] Self-standalone CLI (`fortune-nyx-v1.5.
|
|
1656
|
+
- [x] Web shell bundles (`fortune-nyx-v1.5.3-web.min.js`) — fully browser-native with IndexedDB VFS
|
|
1657
|
+
- [x] Self-standalone CLI (`fortune-nyx-v1.5.3-directbash-k6.1.0.mjs`) — single-file interactive shell, per-user history, tab completion
|
|
1658
1658
|
<!-- /BUILD:changelog -->
|
|
1659
1659
|
- [x] 120+ `man` pages — all built-in commands documented via `man <cmd>`
|
|
1660
1660
|
- [x] Shared `tokenize.ts` — unified tokenizer for shell parser and runtime (eliminates duplication)
|