sandboxedjs 0.1.78 → 0.1.80

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.
@@ -30311,6 +30311,10 @@ function createCoreModules(options) {
30311
30311
  arch: "x64",
30312
30312
  version: "v22.12.0",
30313
30313
  versions: { ...import_browser.default.versions, node: "22.12.0" },
30314
+ binding: (name) => {
30315
+ if (name === "constants") return { fs: { ...fs.constants } };
30316
+ throw new Error(`No such module: ${name}`);
30317
+ },
30314
30318
  pid: 100,
30315
30319
  ppid: 1,
30316
30320
  title: "node",
@@ -30617,7 +30621,7 @@ function createFsModule(volume, cwd, stdinPath, defer = queueMicrotask) {
30617
30621
  if (stdinPath) fds.set(0, { path: stdinPath, position: 0, flags: "r" });
30618
30622
  const abs = (value) => {
30619
30623
  if (typeof value === "number") return requiredFd(fds, value).path;
30620
- if (value instanceof URL) value = value.pathname;
30624
+ if (value instanceof URL) value = decodeURIComponent(value.pathname);
30621
30625
  if (Buffer2.isBuffer(value) || value instanceof Uint8Array) value = new TextDecoder().decode(value);
30622
30626
  if (typeof value !== "string") throw new TypeError("path must be a string, Buffer, or URL");
30623
30627
  return value.startsWith("/") ? clean(value) : resolve(cwd(), value);
@@ -30675,6 +30679,9 @@ function createFsModule(volume, cwd, stdinPath, defer = queueMicrotask) {
30675
30679
  O_EXCL: 128,
30676
30680
  O_TRUNC: 512,
30677
30681
  O_APPEND: 1024,
30682
+ O_NOCTTY: 256,
30683
+ O_SYNC: 1052672,
30684
+ O_NOFOLLOW: 131072,
30678
30685
  COPYFILE_EXCL: 1
30679
30686
  },
30680
30687
  Dirent,