sandboxedjs 0.1.25 → 0.1.26
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 +14 -0
- package/dist/index.cjs +1572 -447
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +44 -2
- package/dist/index.d.ts +44 -2
- package/dist/index.js +1568 -440
- package/dist/index.js.map +1 -1
- package/package.json +1 -5
package/README.md
CHANGED
|
@@ -597,6 +597,16 @@ await box.exec("ls -la /"); // shell + coreutils
|
|
|
597
597
|
await box.exec("node app/index.js");
|
|
598
598
|
```
|
|
599
599
|
|
|
600
|
+
**Verified in a browser.** Booted under Vite 8, a container starts in the page and the shell,
|
|
601
|
+
coreutils, virtual filesystem and Node runtime all work:
|
|
602
|
+
|
|
603
|
+
```
|
|
604
|
+
$ uname -a Linux sandbox 5.10.0 (sandboxedjs@sandbox) … x86_64 GNU/Linux
|
|
605
|
+
$ ls -la / the full FHS tree
|
|
606
|
+
$ node -p process.version v22.12.0
|
|
607
|
+
$ cat /etc/os-release SandboxedJS 1.0 (sandbox)
|
|
608
|
+
```
|
|
609
|
+
|
|
600
610
|
**Not done — three things stand between this and a browser IDE.**
|
|
601
611
|
|
|
602
612
|
- *A service worker.* A preview iframe needs a real URL, and giving it one means a worker on your
|
|
@@ -613,6 +623,10 @@ await box.exec("node app/index.js");
|
|
|
613
623
|
nothing to borrow, so anything routed through esbuild fails until esbuild-wasm runs *inside*
|
|
614
624
|
the sandbox.
|
|
615
625
|
|
|
626
|
+
Vite prints two warnings about `util` being externalized. They come from `readable-stream`, which
|
|
627
|
+
declares `"util": false` for browsers and falls back on its own; nothing in this package imports
|
|
628
|
+
it.
|
|
629
|
+
|
|
616
630
|
Everything else is already browser-shaped. Nothing in the runtime imports a `node:` builtin except
|
|
617
631
|
through an explicitly Node-only path that returns `null` elsewhere, compression and hashing pick
|
|
618
632
|
their implementation at call time, and the module engine, volume, HTTP stack and npm installer are
|