sandboxedjs 0.1.66 → 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.66"};
17966
+ version: "0.1.67"};
17966
17967
 
17967
17968
  // src/runtime/python/config.ts
17968
17969
  var bundledManifest = {
@@ -19160,6 +19161,9 @@ var MAX_TRANSFER = 8 * 1024 * 1024;
19160
19161
  var POLLIN = 1;
19161
19162
  var POLLOUT = 4;
19162
19163
  var POLLHUP = 16;
19164
+ var AF_INET = 2;
19165
+ var SOCK_STREAM = 1;
19166
+ var IPPROTO_TCP = 6;
19163
19167
  function createHostAbiServer(proc) {
19164
19168
  const files = new FileService(proc.vfs, proc.cred);
19165
19169
  const started = Date.now();
@@ -19409,7 +19413,8 @@ function createHostAbiServer(proc) {
19409
19413
  const family = r.u32();
19410
19414
  const type = r.u32();
19411
19415
  const protocol = r.i32();
19412
- 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);
19413
19418
  if (!proc.sockets) throw new PosixError(Errno.ENOSYS);
19414
19419
  return { status: proc.table.add(new SocketDescription(new VirtualTcpSocket(proc.sockets))) };
19415
19420
  }