sandboxedjs 0.1.20 → 0.1.21
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/dist/index.cjs +6 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -24359,7 +24359,12 @@ function isNodeRuntime() {
|
|
|
24359
24359
|
return typeof process !== "undefined" && process.versions != null && process.versions.node != null;
|
|
24360
24360
|
}
|
|
24361
24361
|
async function bootBrowserPod(opts) {
|
|
24362
|
-
const { Nodepod } = await import('@scelar/nodepod');
|
|
24362
|
+
const { Nodepod, createBrowserHost, getRuntimeHost, setRuntimeHost } = await import('@scelar/nodepod');
|
|
24363
|
+
try {
|
|
24364
|
+
getRuntimeHost();
|
|
24365
|
+
} catch {
|
|
24366
|
+
setRuntimeHost(createBrowserHost());
|
|
24367
|
+
}
|
|
24363
24368
|
return Nodepod.boot({
|
|
24364
24369
|
env: opts.env ?? {},
|
|
24365
24370
|
workdir: opts.cwd ?? "/",
|