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.js CHANGED
@@ -22542,7 +22542,13 @@ async function loadFactory() {
22542
22542
  const { createRequire } = await nodeBuiltin("module");
22543
22543
  const fs = await nodeBuiltin("fs/promises");
22544
22544
  const path = await nodeBuiltin("path");
22545
- const require2 = createRequire(path.join(process.cwd(), "index.js"));
22545
+ const packageRequire = createRequire(import.meta.url);
22546
+ let require2 = packageRequire;
22547
+ try {
22548
+ require2.resolve("@ffmpeg/core/wasm");
22549
+ } catch {
22550
+ require2 = createRequire(path.join(process.cwd(), "index.js"));
22551
+ }
22546
22552
  const wasmPath = require2.resolve("@ffmpeg/core/wasm");
22547
22553
  const wasm = await fs.readFile(wasmPath);
22548
22554
  const module = await Promise.resolve().then(() => (init_ffmpeg_core(), ffmpeg_core_exports));