sandboxedjs 0.1.13 → 0.1.14

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 CHANGED
@@ -22547,7 +22547,13 @@ async function loadFactory() {
22547
22547
  const { createRequire } = await nodeBuiltin("module");
22548
22548
  const fs = await nodeBuiltin("fs/promises");
22549
22549
  const path = await nodeBuiltin("path");
22550
- const require2 = createRequire(path.join(process.cwd(), "index.js"));
22550
+ const packageRequire = createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.cjs', document.baseURI).href)));
22551
+ let require2 = packageRequire;
22552
+ try {
22553
+ require2.resolve("@ffmpeg/core/wasm");
22554
+ } catch {
22555
+ require2 = createRequire(path.join(process.cwd(), "index.js"));
22556
+ }
22551
22557
  const wasmPath = require2.resolve("@ffmpeg/core/wasm");
22552
22558
  const wasm = await fs.readFile(wasmPath);
22553
22559
  const module = await Promise.resolve().then(() => (init_ffmpeg_core(), ffmpeg_core_exports));