sandboxedjs 0.1.73 → 0.1.75
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/README.md +40 -2
- package/dist/agent.d.cts +2 -2
- package/dist/agent.d.ts +2 -2
- package/dist/{container-BxEoVOmX.d.cts → container-NoLUp_fd.d.cts} +98 -5
- package/dist/{container-B5X6stfx.d.ts → container-X8yZRFvW.d.ts} +98 -5
- package/dist/{contracts-CVgctitO.d.cts → contracts-C2_dTgk3.d.cts} +30 -1
- package/dist/{contracts-CVgctitO.d.ts → contracts-C2_dTgk3.d.ts} +30 -1
- package/dist/index.cjs +5264 -2852
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +175 -9
- package/dist/index.d.ts +175 -9
- package/dist/index.js +5252 -2854
- package/dist/index.js.map +1 -1
- package/dist/{memory-volume-CWuWScIs.d.ts → memory-volume-CG56p660.d.ts} +1 -1
- package/dist/{memory-volume-DlMSAh-K.d.cts → memory-volume-DqEWFo7t.d.cts} +1 -1
- package/dist/python-abi.cjs +13 -0
- package/dist/python-abi.cjs.map +1 -1
- package/dist/python-abi.d.cts +3 -3
- package/dist/python-abi.d.ts +3 -3
- package/dist/python-abi.js +13 -0
- package/dist/python-abi.js.map +1 -1
- package/dist/rolldown-wasi-worker.js +5 -1
- package/dist/rolldown-wasi-worker.js.map +1 -1
- package/dist/worker-entry.js +861 -55
- package/dist/worker-entry.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { R as RuntimeVolume, d as VolumeStat, e as VolumeStats } from './contracts-
|
|
1
|
+
import { R as RuntimeVolume, d as VolumeStat, e as VolumeStats } from './contracts-C2_dTgk3.js';
|
|
2
2
|
|
|
3
3
|
type NodeKind = "file" | "directory" | "symlink";
|
|
4
4
|
interface MemoryVolumeSnapshotEntry {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { R as RuntimeVolume, d as VolumeStat, e as VolumeStats } from './contracts-
|
|
1
|
+
import { R as RuntimeVolume, d as VolumeStat, e as VolumeStats } from './contracts-C2_dTgk3.cjs';
|
|
2
2
|
|
|
3
3
|
type NodeKind = "file" | "directory" | "symlink";
|
|
4
4
|
interface MemoryVolumeSnapshotEntry {
|
package/dist/python-abi.cjs
CHANGED
|
@@ -1139,6 +1139,12 @@ var VirtualTcpSocket = class _VirtualTcpSocket {
|
|
|
1139
1139
|
}
|
|
1140
1140
|
connect(port, address = "127.0.0.1") {
|
|
1141
1141
|
if (this.listenerValue || this.connectionValue) throw new PosixError(Errno.EISCONN);
|
|
1142
|
+
if (!isLoopback(address)) {
|
|
1143
|
+
throw new PosixError(
|
|
1144
|
+
Errno.ENETUNREACH,
|
|
1145
|
+
`cannot reach ${address}:${port}: outbound network access is not available through raw sockets in this container; only loopback is routed`
|
|
1146
|
+
);
|
|
1147
|
+
}
|
|
1142
1148
|
this.connectionValue = this.network.connect(port, this.boundPort, this.boundAddress);
|
|
1143
1149
|
this.boundPort = this.connectionValue.local.port;
|
|
1144
1150
|
this.boundAddress = this.connectionValue.local.address;
|
|
@@ -1275,6 +1281,11 @@ var SocketDescription = class _SocketDescription {
|
|
|
1275
1281
|
return peer;
|
|
1276
1282
|
}
|
|
1277
1283
|
};
|
|
1284
|
+
function isLoopback(address) {
|
|
1285
|
+
if (address === "" || address === "localhost" || address === "0.0.0.0") return true;
|
|
1286
|
+
if (address === "::1" || address === "::" || address === "[::1]") return true;
|
|
1287
|
+
return /^127\./.test(address);
|
|
1288
|
+
}
|
|
1278
1289
|
|
|
1279
1290
|
// src/python/syscall-server.ts
|
|
1280
1291
|
var MAX_TRANSFER = 8 * 1024 * 1024;
|
|
@@ -1983,6 +1994,7 @@ var ERRNO = {
|
|
|
1983
1994
|
ECONNRESET: 104,
|
|
1984
1995
|
ENOTCONN: 107,
|
|
1985
1996
|
ETIMEDOUT: 110,
|
|
1997
|
+
ENETUNREACH: 101,
|
|
1986
1998
|
ECONNREFUSED: 111,
|
|
1987
1999
|
EHOSTUNREACH: 113,
|
|
1988
2000
|
ENOTSUP: 95
|
|
@@ -2036,6 +2048,7 @@ var STRERROR = {
|
|
|
2036
2048
|
ECONNRESET: "Connection reset by peer",
|
|
2037
2049
|
ENOTCONN: "Transport endpoint is not connected",
|
|
2038
2050
|
ETIMEDOUT: "Connection timed out",
|
|
2051
|
+
ENETUNREACH: "Network is unreachable",
|
|
2039
2052
|
ECONNREFUSED: "Connection refused",
|
|
2040
2053
|
EHOSTUNREACH: "No route to host",
|
|
2041
2054
|
ENOTSUP: "Operation not supported"
|