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 +10 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +10 -5
- package/dist/index.js.map +1 -1
- package/dist/python/python.data +167 -180
- package/dist/python/python.js +1 -1
- package/dist/python/python.wasm +0 -0
- package/dist/python/runtime.json +3 -3
- package/dist/python-abi.cjs +9 -4
- package/dist/python-abi.cjs.map +1 -1
- package/dist/python-abi.d.cts +1 -0
- package/dist/python-abi.d.ts +1 -0
- package/dist/python-abi.js +9 -4
- package/dist/python-abi.js.map +1 -1
- package/dist/python-worker.js +23 -2
- package/dist/python-worker.js.map +1 -1
- package/package.json +1 -1
package/dist/python-abi.d.cts
CHANGED
package/dist/python-abi.d.ts
CHANGED
package/dist/python-abi.js
CHANGED
|
@@ -84,6 +84,7 @@ var Errno = {
|
|
|
84
84
|
ELOOP: 40,
|
|
85
85
|
ENODATA: 61,
|
|
86
86
|
ENOTSOCK: 88,
|
|
87
|
+
EPROTONOSUPPORT: 93,
|
|
87
88
|
EAFNOSUPPORT: 97,
|
|
88
89
|
EADDRINUSE: 98,
|
|
89
90
|
EADDRNOTAVAIL: 99,
|
|
@@ -1267,6 +1268,12 @@ var SocketDescription = class _SocketDescription {
|
|
|
1267
1268
|
|
|
1268
1269
|
// src/runtime/python/syscall-server.ts
|
|
1269
1270
|
var MAX_TRANSFER = 8 * 1024 * 1024;
|
|
1271
|
+
var POLLIN = 1;
|
|
1272
|
+
var POLLOUT = 4;
|
|
1273
|
+
var POLLHUP = 16;
|
|
1274
|
+
var AF_INET = 2;
|
|
1275
|
+
var SOCK_STREAM = 1;
|
|
1276
|
+
var IPPROTO_TCP = 6;
|
|
1270
1277
|
function createHostAbiServer(proc) {
|
|
1271
1278
|
const files = new FileService(proc.vfs, proc.cred);
|
|
1272
1279
|
const started = Date.now();
|
|
@@ -1516,7 +1523,8 @@ function createHostAbiServer(proc) {
|
|
|
1516
1523
|
const family = r.u32();
|
|
1517
1524
|
const type = r.u32();
|
|
1518
1525
|
const protocol = r.i32();
|
|
1519
|
-
if (family !==
|
|
1526
|
+
if (family !== AF_INET || (type & 15) !== SOCK_STREAM) throw new PosixError(Errno.EAFNOSUPPORT);
|
|
1527
|
+
if (protocol !== 0 && protocol !== IPPROTO_TCP) throw new PosixError(Errno.EPROTONOSUPPORT);
|
|
1520
1528
|
if (!proc.sockets) throw new PosixError(Errno.ENOSYS);
|
|
1521
1529
|
return { status: proc.table.add(new SocketDescription(new VirtualTcpSocket(proc.sockets))) };
|
|
1522
1530
|
}
|
|
@@ -1629,9 +1637,6 @@ function createHostAbiServer(proc) {
|
|
|
1629
1637
|
if (proc.signal.aborted) throw new PosixError(Errno.EINTR);
|
|
1630
1638
|
}
|
|
1631
1639
|
}
|
|
1632
|
-
const POLLIN = 1;
|
|
1633
|
-
const POLLOUT = 4;
|
|
1634
|
-
const POLLHUP = 16;
|
|
1635
1640
|
async function poll(requests, timeoutMs) {
|
|
1636
1641
|
const deadline = timeoutMs < 0 ? Infinity : Date.now() + timeoutMs;
|
|
1637
1642
|
for (; ; ) {
|