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/python.wasm
CHANGED
|
Binary file
|
package/dist/python/runtime.json
CHANGED
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
"artifacts": {
|
|
19
19
|
"moduleUrl": "./python.js",
|
|
20
20
|
"hashes": {
|
|
21
|
-
"python.js": "sha256-
|
|
22
|
-
"python.wasm": "sha256-
|
|
23
|
-
"python.data": "sha256-
|
|
21
|
+
"python.js": "sha256-ec01d17c48c14a6d442bb06e3351570fe3e0d8bfc857ba2c469e6fe58cbe0860",
|
|
22
|
+
"python.wasm": "sha256-f6d74973d23afb6401481343eee0190d3617a472c5bd36ed204785b13dcb8ce6",
|
|
23
|
+
"python.data": "sha256-69671e9d5e40b71da03fe8e8f9afc97f4563f6f9cadfcad06e8391963b247912",
|
|
24
24
|
"python.worker.js": "sha256-63bb1df52c4e3a95eae7b2d77c98554188fcc5925e72628ea0c34d5c573977a5"
|
|
25
25
|
}
|
|
26
26
|
},
|
package/dist/python-abi.cjs
CHANGED
|
@@ -2951,6 +2951,7 @@ var MemoryStat = class {
|
|
|
2951
2951
|
}
|
|
2952
2952
|
};
|
|
2953
2953
|
var encoder2 = new TextEncoder();
|
|
2954
|
+
var appendCapacity = /* @__PURE__ */ new WeakMap();
|
|
2954
2955
|
var MemoryVolume = class {
|
|
2955
2956
|
entries = /* @__PURE__ */ new Map();
|
|
2956
2957
|
nextIno = 2;
|
|
@@ -2985,10 +2986,23 @@ var MemoryVolume = class {
|
|
|
2985
2986
|
const current = this.entries.get(key);
|
|
2986
2987
|
if (!current) return this.writeFileSync(key, bytes);
|
|
2987
2988
|
if (current.kind !== "file") throw new VolumeError(current.kind === "directory" ? "EISDIR" : "EINVAL", "open", key);
|
|
2988
|
-
const
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
current.data
|
|
2989
|
+
const length = current.data.length;
|
|
2990
|
+
const needed = length + bytes.length;
|
|
2991
|
+
const backing = current.data.buffer;
|
|
2992
|
+
const ownsTail = current.data.byteOffset === 0 && backing instanceof ArrayBuffer && backing.byteLength >= needed && appendCapacity.get(current) === backing;
|
|
2993
|
+
if (ownsTail) {
|
|
2994
|
+
const grown = new Uint8Array(backing, 0, needed);
|
|
2995
|
+
grown.set(bytes, length);
|
|
2996
|
+
current.data = grown;
|
|
2997
|
+
} else {
|
|
2998
|
+
const capacity = Math.max(needed, length * 2, 64 * 1024);
|
|
2999
|
+
const buffer = new ArrayBuffer(capacity);
|
|
3000
|
+
const grown = new Uint8Array(buffer, 0, needed);
|
|
3001
|
+
grown.set(current.data);
|
|
3002
|
+
grown.set(bytes, length);
|
|
3003
|
+
current.data = grown;
|
|
3004
|
+
appendCapacity.set(current, buffer);
|
|
3005
|
+
}
|
|
2992
3006
|
this.touchChanged(current, true);
|
|
2993
3007
|
}
|
|
2994
3008
|
readdirSync(path) {
|