sandboxedjs 0.1.65 → 0.1.67

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
@@ -17855,6 +17855,7 @@ var Errno = {
17855
17855
  ELOOP: 40,
17856
17856
  ENODATA: 61,
17857
17857
  ENOTSOCK: 88,
17858
+ EPROTONOSUPPORT: 93,
17858
17859
  EAFNOSUPPORT: 97,
17859
17860
  EADDRINUSE: 98,
17860
17861
  EADDRNOTAVAIL: 99,
@@ -17962,7 +17963,7 @@ var wheels_default = {
17962
17963
 
17963
17964
  // package.json
17964
17965
  var package_default = {
17965
- version: "0.1.65"};
17966
+ version: "0.1.67"};
17966
17967
 
17967
17968
  // src/runtime/python/config.ts
17968
17969
  var bundledManifest = {
@@ -19157,6 +19158,12 @@ var VirtualTcpNetwork = class {
19157
19158
 
19158
19159
  // src/runtime/python/syscall-server.ts
19159
19160
  var MAX_TRANSFER = 8 * 1024 * 1024;
19161
+ var POLLIN = 1;
19162
+ var POLLOUT = 4;
19163
+ var POLLHUP = 16;
19164
+ var AF_INET = 2;
19165
+ var SOCK_STREAM = 1;
19166
+ var IPPROTO_TCP = 6;
19160
19167
  function createHostAbiServer(proc) {
19161
19168
  const files = new FileService(proc.vfs, proc.cred);
19162
19169
  const started = Date.now();
@@ -19406,7 +19413,8 @@ function createHostAbiServer(proc) {
19406
19413
  const family = r.u32();
19407
19414
  const type = r.u32();
19408
19415
  const protocol = r.i32();
19409
- if (family !== 2 || (type & 15) !== 1 || protocol !== 0) throw new PosixError(Errno.EAFNOSUPPORT);
19416
+ if (family !== AF_INET || (type & 15) !== SOCK_STREAM) throw new PosixError(Errno.EAFNOSUPPORT);
19417
+ if (protocol !== 0 && protocol !== IPPROTO_TCP) throw new PosixError(Errno.EPROTONOSUPPORT);
19410
19418
  if (!proc.sockets) throw new PosixError(Errno.ENOSYS);
19411
19419
  return { status: proc.table.add(new SocketDescription(new VirtualTcpSocket(proc.sockets))) };
19412
19420
  }
@@ -19519,9 +19527,6 @@ function createHostAbiServer(proc) {
19519
19527
  if (proc.signal.aborted) throw new PosixError(Errno.EINTR);
19520
19528
  }
19521
19529
  }
19522
- const POLLIN = 1;
19523
- const POLLOUT = 4;
19524
- const POLLHUP = 16;
19525
19530
  async function poll(requests, timeoutMs) {
19526
19531
  const deadline = timeoutMs < 0 ? Infinity : Date.now() + timeoutMs;
19527
19532
  for (; ; ) {