sandboxedjs 0.1.83 → 0.1.85
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/agent.d.cts +2 -2
- package/dist/agent.d.ts +2 -2
- package/dist/{container-DtVUncWL.d.ts → container-BGmhPbSD.d.cts} +10 -1
- package/dist/{container-B14Q03ng.d.cts → container-DCwYX_Cx.d.ts} +10 -1
- package/dist/{contracts-DNkSvBCM.d.cts → contracts-BkWBTH8E.d.cts} +22 -3
- package/dist/{contracts-DNkSvBCM.d.ts → contracts-BkWBTH8E.d.ts} +22 -3
- package/dist/index.cjs +2386 -397
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +19 -9
- package/dist/index.d.ts +19 -9
- package/dist/index.js +2386 -397
- package/dist/index.js.map +1 -1
- package/dist/{memory-volume-n-LY8Vdv.d.cts → memory-volume-DCm-DiXH.d.cts} +1 -1
- package/dist/{memory-volume-D4FLjyEU.d.ts → memory-volume-DJA-vFYW.d.ts} +1 -1
- package/dist/python/python.data +140 -145
- 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 +18 -4
- 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 +18 -4
- package/dist/python-abi.js.map +1 -1
- package/dist/worker-entry.js +1407 -212
- package/dist/worker-entry.js.map +1 -1
- package/package.json +1 -1
package/dist/python-abi.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { V as Vfs, C as Cred, a as VirtualTcpNetwork } from './contracts-
|
|
2
|
-
export { m as ROOT_CRED, v as makeCred } from './contracts-
|
|
3
|
-
export { M as MemoryVolume } from './memory-volume-
|
|
1
|
+
import { V as Vfs, C as Cred, a as VirtualTcpNetwork } from './contracts-BkWBTH8E.cjs';
|
|
2
|
+
export { m as ROOT_CRED, v as makeCred } from './contracts-BkWBTH8E.cjs';
|
|
3
|
+
export { M as MemoryVolume } from './memory-volume-DCm-DiXH.cjs';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Open-file descriptions: the thing a descriptor points *at*.
|
package/dist/python-abi.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { V as Vfs, C as Cred, a as VirtualTcpNetwork } from './contracts-
|
|
2
|
-
export { m as ROOT_CRED, v as makeCred } from './contracts-
|
|
3
|
-
export { M as MemoryVolume } from './memory-volume-
|
|
1
|
+
import { V as Vfs, C as Cred, a as VirtualTcpNetwork } from './contracts-BkWBTH8E.js';
|
|
2
|
+
export { m as ROOT_CRED, v as makeCred } from './contracts-BkWBTH8E.js';
|
|
3
|
+
export { M as MemoryVolume } from './memory-volume-DJA-vFYW.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Open-file descriptions: the thing a descriptor points *at*.
|
package/dist/python-abi.js
CHANGED
|
@@ -2949,6 +2949,7 @@ var MemoryStat = class {
|
|
|
2949
2949
|
}
|
|
2950
2950
|
};
|
|
2951
2951
|
var encoder2 = new TextEncoder();
|
|
2952
|
+
var appendCapacity = /* @__PURE__ */ new WeakMap();
|
|
2952
2953
|
var MemoryVolume = class {
|
|
2953
2954
|
entries = /* @__PURE__ */ new Map();
|
|
2954
2955
|
nextIno = 2;
|
|
@@ -2983,10 +2984,23 @@ var MemoryVolume = class {
|
|
|
2983
2984
|
const current = this.entries.get(key);
|
|
2984
2985
|
if (!current) return this.writeFileSync(key, bytes);
|
|
2985
2986
|
if (current.kind !== "file") throw new VolumeError(current.kind === "directory" ? "EISDIR" : "EINVAL", "open", key);
|
|
2986
|
-
const
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
current.data
|
|
2987
|
+
const length = current.data.length;
|
|
2988
|
+
const needed = length + bytes.length;
|
|
2989
|
+
const backing = current.data.buffer;
|
|
2990
|
+
const ownsTail = current.data.byteOffset === 0 && backing instanceof ArrayBuffer && backing.byteLength >= needed && appendCapacity.get(current) === backing;
|
|
2991
|
+
if (ownsTail) {
|
|
2992
|
+
const grown = new Uint8Array(backing, 0, needed);
|
|
2993
|
+
grown.set(bytes, length);
|
|
2994
|
+
current.data = grown;
|
|
2995
|
+
} else {
|
|
2996
|
+
const capacity = Math.max(needed, length * 2, 64 * 1024);
|
|
2997
|
+
const buffer = new ArrayBuffer(capacity);
|
|
2998
|
+
const grown = new Uint8Array(buffer, 0, needed);
|
|
2999
|
+
grown.set(current.data);
|
|
3000
|
+
grown.set(bytes, length);
|
|
3001
|
+
current.data = grown;
|
|
3002
|
+
appendCapacity.set(current, buffer);
|
|
3003
|
+
}
|
|
2990
3004
|
this.touchChanged(current, true);
|
|
2991
3005
|
}
|
|
2992
3006
|
readdirSync(path) {
|