sandboxedjs 0.1.55 → 0.1.56
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 +5 -2
- package/dist/index.cjs +20 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +20 -1
- package/dist/index.js.map +1 -1
- package/dist/python/python.data +278 -268
- package/dist/python/python.js +1 -1
- package/dist/python/python.wasm +0 -0
- package/dist/python/runtime.json +3 -3
- package/dist/python/wheels/index.json +42 -0
- package/dist/python/wheels/pydantic_core-2.23.2-cp313-cp313-emscripten_5_0_6_wasm32.whl +0 -0
- package/dist/python/wheels/pydantic_core-2.46.5-cp313-cp313-emscripten_5_0_6_wasm32.whl +0 -0
- package/dist/python/wheels/sbx_c_probe-1.0.0-cp313-cp313-emscripten_5_0_6_wasm32.whl +0 -0
- package/dist/python/wheels/sbx_rust_probe-1.0.0-cp313-cp313-emscripten_5_0_6_wasm32.whl +0 -0
- package/dist/python-abi.cjs +6 -0
- package/dist/python-abi.cjs.map +1 -1
- package/dist/python-abi.d.cts +2 -0
- package/dist/python-abi.d.ts +2 -0
- package/dist/python-abi.js +6 -0
- package/dist/python-abi.js.map +1 -1
- package/dist/python-worker.js +80 -5
- package/dist/python-worker.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -17918,7 +17918,15 @@ var bundledManifest = {
|
|
|
17918
17918
|
persistence: "memory"
|
|
17919
17919
|
}
|
|
17920
17920
|
};
|
|
17921
|
-
var
|
|
17921
|
+
var bundledWheelIndex = new URL(
|
|
17922
|
+
import.meta.url.includes("/src/runtime/python/") ? "../../../dist/python/wheels/" : "./python/wheels/",
|
|
17923
|
+
import.meta.url
|
|
17924
|
+
).href;
|
|
17925
|
+
var config = {
|
|
17926
|
+
backend: "sbx-cpython-wasm",
|
|
17927
|
+
manifest: bundledManifest,
|
|
17928
|
+
wheelIndex: bundledWheelIndex
|
|
17929
|
+
};
|
|
17922
17930
|
function setPythonBackend(options) {
|
|
17923
17931
|
if (options.wheelIndex !== void 0) config.wheelIndex = options.wheelIndex;
|
|
17924
17932
|
if (options.manifest !== void 0) config.manifest = validateManifest(options.manifest);
|
|
@@ -20387,6 +20395,17 @@ environments. A package with no usable wheel is an error, never a silent skip.`,
|
|
|
20387
20395
|
}
|
|
20388
20396
|
const cache = /* @__PURE__ */ new Map();
|
|
20389
20397
|
const request = async (url, timeoutMs, read) => {
|
|
20398
|
+
if (url.startsWith("file:")) {
|
|
20399
|
+
try {
|
|
20400
|
+
const [{ readFile }, { fileURLToPath: fileURLToPath2 }] = await Promise.all([
|
|
20401
|
+
nodeBuiltin("fs/promises"),
|
|
20402
|
+
nodeBuiltin("url")
|
|
20403
|
+
]);
|
|
20404
|
+
return await read(new Response(await readFile(fileURLToPath2(url))));
|
|
20405
|
+
} catch (error) {
|
|
20406
|
+
throw new Error(`could not read bundled wheel asset ${url}: ${error.message}`);
|
|
20407
|
+
}
|
|
20408
|
+
}
|
|
20390
20409
|
const controller = new AbortController();
|
|
20391
20410
|
const timer = setTimeout(() => controller.abort(), timeoutMs);
|
|
20392
20411
|
try {
|