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.js CHANGED
@@ -24354,7 +24354,12 @@ function isNodeRuntime() {
24354
24354
  return typeof process !== "undefined" && process.versions != null && process.versions.node != null;
24355
24355
  }
24356
24356
  async function bootBrowserPod(opts) {
24357
- const { Nodepod } = await import('@scelar/nodepod');
24357
+ const { Nodepod, createBrowserHost, getRuntimeHost, setRuntimeHost } = await import('@scelar/nodepod');
24358
+ try {
24359
+ getRuntimeHost();
24360
+ } catch {
24361
+ setRuntimeHost(createBrowserHost());
24362
+ }
24358
24363
  return Nodepod.boot({
24359
24364
  env: opts.env ?? {},
24360
24365
  workdir: opts.cwd ?? "/",