sandboxedjs 0.1.85 → 0.1.89

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.js CHANGED
@@ -19929,6 +19929,23 @@ var wheels_default = {
19929
19929
  patches: []
19930
19930
  }
19931
19931
  },
19932
+ {
19933
+ name: "markupsafe",
19934
+ version: "3.0.3",
19935
+ filename: "MarkupSafe-3.0.3-cp313-cp313-emscripten_5_0_6_wasm32.whl",
19936
+ sha256: "a04d9e56b36e72ef29c223103bdb5295fda4a9c41845a8b8b3364506c7cd8611",
19937
+ abiId: "sbxabi1-c2637d04695ad927",
19938
+ requires: [],
19939
+ provenance: {
19940
+ sourceTreeDigest: "fe3d71dec53c1e9496db3496c75f066f575d383943e50fe7ea6e0b64b629b457",
19941
+ recipeSha256: "295430d6938f3528da96182e922b9fdf77054ee00d7011b33a2b82e6f6175e9d",
19942
+ buildTools: [
19943
+ "setuptools==84.0.0"
19944
+ ],
19945
+ nativeDependencies: [],
19946
+ patches: []
19947
+ }
19948
+ },
19932
19949
  {
19933
19950
  name: "pyyaml",
19934
19951
  version: "6.0.2",
@@ -19949,6 +19966,100 @@ var wheels_default = {
19949
19966
  patches: []
19950
19967
  }
19951
19968
  },
19969
+ {
19970
+ name: "pyyaml",
19971
+ version: "6.0.3",
19972
+ filename: "PyYAML-6.0.3-cp313-cp313-emscripten_5_0_6_wasm32.whl",
19973
+ sha256: "9513f6e23d60f1ad18641e2a84747c0aeb591258955edeaf990ae7e06b419897",
19974
+ abiId: "sbxabi1-c2637d04695ad927",
19975
+ requires: [],
19976
+ provenance: {
19977
+ sourceTreeDigest: "a7fff5909bd00b47a1eb46316fc24e9c073fce2485566da7a0e90815562fd8ef",
19978
+ recipeSha256: "265ad05f7ebcec70831b4d1abda821f3cf096737729f6e174a2bf97e0fe9bc3f",
19979
+ buildTools: [
19980
+ "setuptools==84.0.0",
19981
+ "Cython==3.1.4"
19982
+ ],
19983
+ nativeDependencies: [
19984
+ "yaml==0.2.5"
19985
+ ],
19986
+ patches: []
19987
+ }
19988
+ },
19989
+ {
19990
+ name: "aiohttp",
19991
+ version: "3.14.3",
19992
+ filename: "aiohttp-3.14.3-cp313-cp313-emscripten_5_0_6_wasm32.whl",
19993
+ sha256: "3e3ed4859fa5dff9b9f2476c845e14a11a1ba38b389e20bcaaa8e47dd62d6948",
19994
+ abiId: "sbxabi1-c2637d04695ad927",
19995
+ requires: [
19996
+ "aiohappyeyeballs>=2.5.0",
19997
+ "aiosignal>=1.4.0",
19998
+ 'async-timeout<6.0,>=4.0; python_version < "3.11"',
19999
+ "attrs>=17.3.0",
20000
+ "frozenlist>=1.1.1",
20001
+ "multidict<7.0,>=4.5",
20002
+ "propcache>=0.2.0",
20003
+ 'typing_extensions>=4.4; python_version < "3.13"',
20004
+ "yarl<2.0,>=1.17.0",
20005
+ 'aiodns>=3.3.0; (sys_platform != "android" and sys_platform != "ios") and extra == "speedups"',
20006
+ 'Brotli>=1.2; (platform_python_implementation == "CPython" and sys_platform != "android" and sys_platform != "ios") and extra == "speedups"',
20007
+ 'brotlicffi>=1.2; platform_python_implementation != "CPython" and extra == "speedups"',
20008
+ 'backports.zstd; (platform_python_implementation == "CPython" and python_version < "3.14" and sys_platform != "android" and sys_platform != "ios") and extra == "speedups"'
20009
+ ],
20010
+ provenance: {
20011
+ sourceTreeDigest: "5662d225129f12941920b950f967589a87bd5f9c16d5592505f6e518692a6e6b",
20012
+ recipeSha256: "53617e75a966dae4e89984d23d35b8db0c8a63784ce6ac292ce201d9b177831b",
20013
+ buildTools: [
20014
+ "setuptools==84.0.0",
20015
+ "pkgconfig==1.6.0"
20016
+ ],
20017
+ nativeDependencies: [],
20018
+ patches: [
20019
+ "0001-llhttp-native-callbacks-under-emscripten.patch"
20020
+ ]
20021
+ }
20022
+ },
20023
+ {
20024
+ name: "cffi",
20025
+ version: "2.1.1",
20026
+ filename: "cffi-2.1.1-cp313-cp313-emscripten_5_0_6_wasm32.whl",
20027
+ sha256: "aa98581fb4637d9d0a677eaad29509e80cb0c6f8e75287d9932e475a904d9fdd",
20028
+ abiId: "sbxabi1-c2637d04695ad927",
20029
+ requires: [
20030
+ 'pycparser; implementation_name != "PyPy"'
20031
+ ],
20032
+ provenance: {
20033
+ sourceTreeDigest: "1dbf3663d2b2c3fffca618f33fa6f6f9d4958c9c0824325f32a3d94e0ef2dd72",
20034
+ recipeSha256: "d6801132e84a3651d70f8a625c57d1a58b995b766cdbabcdf8cd33697b83f8c1",
20035
+ buildTools: [
20036
+ "setuptools==84.0.0"
20037
+ ],
20038
+ nativeDependencies: [
20039
+ "ffi==3.8.0"
20040
+ ],
20041
+ patches: []
20042
+ }
20043
+ },
20044
+ {
20045
+ name: "httptools",
20046
+ version: "0.8.0",
20047
+ filename: "httptools-0.8.0-cp313-cp313-emscripten_5_0_6_wasm32.whl",
20048
+ sha256: "26f817daa30fc65a636eac624ae4aacd5e8818c7a8b4950d557bd45ef33b2ade",
20049
+ abiId: "sbxabi1-c2637d04695ad927",
20050
+ requires: [],
20051
+ provenance: {
20052
+ sourceTreeDigest: "53f1ec592c052003bcd8f3ffab9bba9e4c1aba242f1f746ea8941cef7fc4d6ab",
20053
+ recipeSha256: "2c8459072223406c49cae3e1cfd8031819a94d45bd419ecb3790b73363e40cda",
20054
+ buildTools: [
20055
+ "setuptools==84.0.0"
20056
+ ],
20057
+ nativeDependencies: [],
20058
+ patches: [
20059
+ "0001-llhttp-native-callbacks-under-emscripten.patch"
20060
+ ]
20061
+ }
20062
+ },
19952
20063
  {
19953
20064
  name: "msgpack",
19954
20065
  version: "1.1.0",
@@ -20026,6 +20137,25 @@ var wheels_default = {
20026
20137
  patches: []
20027
20138
  }
20028
20139
  },
20140
+ {
20141
+ name: "pydantic-core",
20142
+ version: "2.49.0",
20143
+ filename: "pydantic_core-2.49.0-cp313-cp313-emscripten_5_0_6_wasm32.whl",
20144
+ sha256: "878f086eb5736ba8b908dfb76671d8130c3a9f22dc1612da09a72c0757191b38",
20145
+ abiId: "sbxabi1-c2637d04695ad927",
20146
+ requires: [
20147
+ "typing-extensions>=4.16.0"
20148
+ ],
20149
+ provenance: {
20150
+ sourceTreeDigest: "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
20151
+ recipeSha256: "bbf84cfbcadefd08044cc05e28390e4e5a5803251833bd668bcb7e3925a42639",
20152
+ buildTools: [
20153
+ "setuptools==84.0.0"
20154
+ ],
20155
+ nativeDependencies: [],
20156
+ patches: []
20157
+ }
20158
+ },
20029
20159
  {
20030
20160
  name: "sbx-c-probe",
20031
20161
  version: "1.0.0",
@@ -20219,13 +20349,54 @@ var wheels_default = {
20219
20349
  "0001-static-library-only.patch"
20220
20350
  ]
20221
20351
  }
20352
+ },
20353
+ {
20354
+ name: "xxhash",
20355
+ version: "4.0.1",
20356
+ filename: "xxhash-4.0.1-cp313-cp313-emscripten_5_0_6_wasm32.whl",
20357
+ sha256: "6d6938deb4def23dc3d815651af484d4e75a35a354d13f406b410192913a062a",
20358
+ abiId: "sbxabi1-c2637d04695ad927",
20359
+ requires: [],
20360
+ provenance: {
20361
+ sourceTreeDigest: "86f8d1362cff2b5e28767e0a8d3839fa99bbcd93cc21bd879e682084ceabc452",
20362
+ recipeSha256: "a2d5a096ffb2d40042c73cd8c14f8ff215a11c6f039e4e88163d219e714203d3",
20363
+ buildTools: [
20364
+ "setuptools==84.0.0"
20365
+ ],
20366
+ nativeDependencies: [],
20367
+ patches: [
20368
+ "0001-meth-noargs-signatures.patch"
20369
+ ]
20370
+ }
20371
+ },
20372
+ {
20373
+ name: "zstandard",
20374
+ version: "0.25.0",
20375
+ filename: "zstandard-0.25.0-cp313-cp313-emscripten_5_0_6_wasm32.whl",
20376
+ sha256: "43bff80a5ba349739c45f3dd53843c00a2b6c5b7e2a6f5542cf48c408dcce3ca",
20377
+ abiId: "sbxabi1-c2637d04695ad927",
20378
+ requires: [
20379
+ 'cffi~=1.17; (platform_python_implementation != "PyPy" and python_version < "3.14") and extra == "cffi"',
20380
+ 'cffi>=2.0.0b; (platform_python_implementation != "PyPy" and python_version >= "3.14") and extra == "cffi"'
20381
+ ],
20382
+ provenance: {
20383
+ sourceTreeDigest: "ae85638fab917b3b5e674bf4b6e4752ff69e8e82f3dff57d5ce3ee5881b21146",
20384
+ recipeSha256: "6aea2ccb942fcee96f0420f670814a6fd37b7ca1ff854cfa240eb67b3d17ae1f",
20385
+ buildTools: [
20386
+ "setuptools==84.0.0",
20387
+ "cffi==2.1.1",
20388
+ "packaging==26.3"
20389
+ ],
20390
+ nativeDependencies: [],
20391
+ patches: []
20392
+ }
20222
20393
  }
20223
20394
  ]
20224
20395
  };
20225
20396
 
20226
20397
  // package.json
20227
20398
  var package_default = {
20228
- version: "0.1.85"};
20399
+ version: "0.1.89"};
20229
20400
 
20230
20401
  // src/python/config.ts
20231
20402
  function runtimeModuleUrl() {
@@ -22576,21 +22747,70 @@ def settrace(callback):
22576
22747
  def gettrace():
22577
22748
  return None
22578
22749
  `;
22579
- var BUILTINS3 = {
22580
- greenlet: {
22581
- version: GREENLET_VERSION,
22750
+ var UVLOOP_VERSION = "0.22.1";
22751
+ var UVLOOP_SOURCE = `"""SandboxedJs stand-in for uvloop: asyncio's event loop under uvloop's API.
22752
+
22753
+ libuv cannot run in this WebAssembly Python runtime, so the loop returned here
22754
+ is the standard asyncio loop. Programs behave identically, without libuv's
22755
+ speed-up.
22756
+ """
22757
+
22758
+ import asyncio as __asyncio
22759
+
22760
+ __version__ = ${JSON.stringify(UVLOOP_VERSION)}
22761
+ __all__ = ("new_event_loop", "install", "EventLoopPolicy", "run", "Loop")
22762
+
22763
+
22764
+ class Loop(__asyncio.SelectorEventLoop):
22765
+ pass
22766
+
22767
+
22768
+ def new_event_loop():
22769
+ return Loop()
22770
+
22771
+
22772
+ class EventLoopPolicy(__asyncio.DefaultEventLoopPolicy):
22773
+ def _loop_factory(self):
22774
+ return new_event_loop()
22775
+
22776
+
22777
+ def install():
22778
+ __asyncio.set_event_loop_policy(EventLoopPolicy())
22779
+
22780
+
22781
+ def run(main, *, loop_factory=new_event_loop, debug=None, **run_kwargs):
22782
+ with __asyncio.Runner(loop_factory=loop_factory, debug=debug) as runner:
22783
+ return runner.run(main)
22784
+ `;
22785
+ function builtinDistribution(name, version, summary, files) {
22786
+ return {
22787
+ version,
22582
22788
  files: {
22583
- "greenlet/__init__.py": GREENLET_SOURCE,
22584
- [`greenlet-${GREENLET_VERSION}.dist-info/METADATA`]: `Metadata-Version: 2.1
22585
- Name: greenlet
22586
- Version: ${GREENLET_VERSION}
22587
- Summary: SandboxedJs stand-in: importable, cannot switch stacks
22789
+ ...files,
22790
+ [`${name}-${version}.dist-info/METADATA`]: `Metadata-Version: 2.1
22791
+ Name: ${name}
22792
+ Version: ${version}
22793
+ Summary: ${summary}
22588
22794
  `,
22589
- [`greenlet-${GREENLET_VERSION}.dist-info/WHEEL`]: "Wheel-Version: 1.0\nGenerator: sandboxedjs\nRoot-Is-Purelib: true\nTag: py3-none-any\n",
22590
- [`greenlet-${GREENLET_VERSION}.dist-info/INSTALLER`]: "sandboxedjs\n",
22591
- [`greenlet-${GREENLET_VERSION}.dist-info/RECORD`]: ""
22795
+ [`${name}-${version}.dist-info/WHEEL`]: "Wheel-Version: 1.0\nGenerator: sandboxedjs\nRoot-Is-Purelib: true\nTag: py3-none-any\n",
22796
+ [`${name}-${version}.dist-info/INSTALLER`]: "sandboxedjs\n",
22797
+ [`${name}-${version}.dist-info/RECORD`]: ""
22592
22798
  }
22593
- }
22799
+ };
22800
+ }
22801
+ var BUILTINS3 = {
22802
+ greenlet: builtinDistribution(
22803
+ "greenlet",
22804
+ GREENLET_VERSION,
22805
+ "SandboxedJs stand-in: importable, cannot switch stacks",
22806
+ { "greenlet/__init__.py": GREENLET_SOURCE }
22807
+ ),
22808
+ uvloop: builtinDistribution(
22809
+ "uvloop",
22810
+ UVLOOP_VERSION,
22811
+ "SandboxedJs stand-in: asyncio's event loop under uvloop's API",
22812
+ { "uvloop/__init__.py": UVLOOP_SOURCE }
22813
+ )
22594
22814
  };
22595
22815
  function builtinCandidates(name) {
22596
22816
  const builtin = BUILTINS3[name];
@@ -22775,7 +22995,9 @@ async function resolve2(options) {
22775
22995
  }
22776
22996
  const previous = state.constraints.get(name) ?? [];
22777
22997
  const constraints = new Map(state.constraints);
22778
- constraints.set(name, [...previous, { spec: requirement.specifiers, origin }]);
22998
+ if (origin !== "<root>" || requirement.specifiers.length === 0) {
22999
+ constraints.set(name, [...previous, { spec: requirement.specifiers, origin }]);
23000
+ }
22779
23001
  const next = { chosen: state.chosen, constraints };
22780
23002
  const already = next.chosen.get(name);
22781
23003
  if (already) {
@@ -22797,14 +23019,15 @@ async function resolve2(options) {
22797
23019
  const clauses = (next.constraints.get(name) ?? []).flatMap((entry) => entry.spec);
22798
23020
  const viable = all.filter((candidate) => clauses.every((s) => compareVersions(candidate.version, s.version, s.op))).sort((a, b) => compareVersions(a.version, b.version, ">") ? -1 : compareVersions(b.version, a.version, ">") ? 1 : KIND_RANK[a.kind] - KIND_RANK[b.kind]);
22799
23021
  if (viable.length === 0) {
22800
- const nothingUsable = all.length === 0;
23022
+ const wanted = [...unusable.get(name)?.versions ?? []].filter((version) => clauses.every((s) => compareVersions(version, s.version, s.op)));
23023
+ const nothingUsable = all.length === 0 || wanted.length > 0;
22801
23024
  const error2 = new ResolutionError(
22802
- nothingUsable ? `no distribution of ${name} is usable by this runtime (it needs a pure-Python wheel or one tagged ${WHEEL_TAG})` : `no version of ${name} satisfies every requirement`,
23025
+ nothingUsable ? `no distribution of ${name}${all.length > 0 ? ` ${newest(wanted)}` : ""} is usable by this runtime (it needs a pure-Python wheel or one tagged ${WHEEL_TAG})` : `no version of ${name} satisfies every requirement`,
22803
23026
  explain(name, next.constraints, null, all),
22804
23027
  nothingUsable ? {
22805
23028
  reason: "no-compatible-distribution",
22806
23029
  package: name,
22807
- unusableVersions: [...unusable.get(name)?.versions ?? []].sort(),
23030
+ unusableVersions: wanted.length > 0 ? wanted.sort() : [...unusable.get(name)?.versions ?? []].sort(),
22808
23031
  wheelTag: WHEEL_TAG,
22809
23032
  abiId: EXTENSION_ABI.abiId,
22810
23033
  sourceAvailable: unusable.get(name)?.sourceAvailable ?? false
@@ -22859,7 +23082,13 @@ async function resolve2(options) {
22859
23082
  nogoods.set(signature, error);
22860
23083
  throw error;
22861
23084
  };
22862
- const solved = await search(roots, { chosen: /* @__PURE__ */ new Map(), constraints: /* @__PURE__ */ new Map() });
23085
+ const seeded = /* @__PURE__ */ new Map();
23086
+ for (const root of roots) {
23087
+ const { name, specifiers, marker } = root.requirement;
23088
+ if (specifiers.length === 0 || !markerApplies(marker, environment, root.extras)) continue;
23089
+ seeded.set(name, [...seeded.get(name) ?? [], { spec: specifiers, origin: root.origin }]);
23090
+ }
23091
+ const solved = await search(roots, { chosen: /* @__PURE__ */ new Map(), constraints: seeded });
22863
23092
  const distributions = [...solved.chosen.values()].sort((a, b) => a.name < b.name ? -1 : a.name > b.name ? 1 : 0);
22864
23093
  const reported = new Map(skipped.map((s) => [`${s.name}\0${s.marker}`, s]));
22865
23094
  return { distributions, skipped: [...reported.values()] };
@@ -22931,6 +23160,9 @@ async function fetchCandidates(client, name, allowSourceBuilds, prebuilt, reject
22931
23160
  }
22932
23161
  return candidates;
22933
23162
  }
23163
+ function newest(versions) {
23164
+ return versions.reduce((a, b) => compareVersions(b, a, ">") ? b : a);
23165
+ }
22934
23166
  function isPreRelease(version) {
22935
23167
  return /(a|b|rc|dev)\d*$/i.test(version.replace(/^\d+(\.\d+)*/, ""));
22936
23168
  }