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.
package/dist/index.js CHANGED
@@ -20220,7 +20220,7 @@ var wheels_default = {
20220
20220
 
20221
20221
  // package.json
20222
20222
  var package_default = {
20223
- version: "0.1.78"};
20223
+ version: "0.1.80"};
20224
20224
 
20225
20225
  // src/python/config.ts
20226
20226
  function runtimeModuleUrl() {
@@ -29168,6 +29168,10 @@ function createCoreModules(options) {
29168
29168
  arch: "x64",
29169
29169
  version: "v22.12.0",
29170
29170
  versions: { ...processShim.versions, node: "22.12.0" },
29171
+ binding: (name) => {
29172
+ if (name === "constants") return { fs: { ...fs.constants } };
29173
+ throw new Error(`No such module: ${name}`);
29174
+ },
29171
29175
  pid: 100,
29172
29176
  ppid: 1,
29173
29177
  title: "node",
@@ -29474,7 +29478,7 @@ function createFsModule(volume, cwd, stdinPath, defer = queueMicrotask) {
29474
29478
  if (stdinPath) fds.set(0, { path: stdinPath, position: 0, flags: "r" });
29475
29479
  const abs = (value) => {
29476
29480
  if (typeof value === "number") return requiredFd(fds, value).path;
29477
- if (value instanceof URL) value = value.pathname;
29481
+ if (value instanceof URL) value = decodeURIComponent(value.pathname);
29478
29482
  if (Buffer2.isBuffer(value) || value instanceof Uint8Array) value = new TextDecoder().decode(value);
29479
29483
  if (typeof value !== "string") throw new TypeError("path must be a string, Buffer, or URL");
29480
29484
  return value.startsWith("/") ? clean(value) : resolve(cwd(), value);
@@ -29532,6 +29536,9 @@ function createFsModule(volume, cwd, stdinPath, defer = queueMicrotask) {
29532
29536
  O_EXCL: 128,
29533
29537
  O_TRUNC: 512,
29534
29538
  O_APPEND: 1024,
29539
+ O_NOCTTY: 256,
29540
+ O_SYNC: 1052672,
29541
+ O_NOFOLLOW: 131072,
29535
29542
  COPYFILE_EXCL: 1
29536
29543
  },
29537
29544
  Dirent,