sandboxedjs 0.1.86 → 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.cjs CHANGED
@@ -19946,6 +19946,23 @@ var wheels_default = {
19946
19946
  patches: []
19947
19947
  }
19948
19948
  },
19949
+ {
19950
+ name: "markupsafe",
19951
+ version: "3.0.3",
19952
+ filename: "MarkupSafe-3.0.3-cp313-cp313-emscripten_5_0_6_wasm32.whl",
19953
+ sha256: "a04d9e56b36e72ef29c223103bdb5295fda4a9c41845a8b8b3364506c7cd8611",
19954
+ abiId: "sbxabi1-c2637d04695ad927",
19955
+ requires: [],
19956
+ provenance: {
19957
+ sourceTreeDigest: "fe3d71dec53c1e9496db3496c75f066f575d383943e50fe7ea6e0b64b629b457",
19958
+ recipeSha256: "295430d6938f3528da96182e922b9fdf77054ee00d7011b33a2b82e6f6175e9d",
19959
+ buildTools: [
19960
+ "setuptools==84.0.0"
19961
+ ],
19962
+ nativeDependencies: [],
19963
+ patches: []
19964
+ }
19965
+ },
19949
19966
  {
19950
19967
  name: "pyyaml",
19951
19968
  version: "6.0.2",
@@ -19966,6 +19983,100 @@ var wheels_default = {
19966
19983
  patches: []
19967
19984
  }
19968
19985
  },
19986
+ {
19987
+ name: "pyyaml",
19988
+ version: "6.0.3",
19989
+ filename: "PyYAML-6.0.3-cp313-cp313-emscripten_5_0_6_wasm32.whl",
19990
+ sha256: "9513f6e23d60f1ad18641e2a84747c0aeb591258955edeaf990ae7e06b419897",
19991
+ abiId: "sbxabi1-c2637d04695ad927",
19992
+ requires: [],
19993
+ provenance: {
19994
+ sourceTreeDigest: "a7fff5909bd00b47a1eb46316fc24e9c073fce2485566da7a0e90815562fd8ef",
19995
+ recipeSha256: "265ad05f7ebcec70831b4d1abda821f3cf096737729f6e174a2bf97e0fe9bc3f",
19996
+ buildTools: [
19997
+ "setuptools==84.0.0",
19998
+ "Cython==3.1.4"
19999
+ ],
20000
+ nativeDependencies: [
20001
+ "yaml==0.2.5"
20002
+ ],
20003
+ patches: []
20004
+ }
20005
+ },
20006
+ {
20007
+ name: "aiohttp",
20008
+ version: "3.14.3",
20009
+ filename: "aiohttp-3.14.3-cp313-cp313-emscripten_5_0_6_wasm32.whl",
20010
+ sha256: "3e3ed4859fa5dff9b9f2476c845e14a11a1ba38b389e20bcaaa8e47dd62d6948",
20011
+ abiId: "sbxabi1-c2637d04695ad927",
20012
+ requires: [
20013
+ "aiohappyeyeballs>=2.5.0",
20014
+ "aiosignal>=1.4.0",
20015
+ 'async-timeout<6.0,>=4.0; python_version < "3.11"',
20016
+ "attrs>=17.3.0",
20017
+ "frozenlist>=1.1.1",
20018
+ "multidict<7.0,>=4.5",
20019
+ "propcache>=0.2.0",
20020
+ 'typing_extensions>=4.4; python_version < "3.13"',
20021
+ "yarl<2.0,>=1.17.0",
20022
+ 'aiodns>=3.3.0; (sys_platform != "android" and sys_platform != "ios") and extra == "speedups"',
20023
+ 'Brotli>=1.2; (platform_python_implementation == "CPython" and sys_platform != "android" and sys_platform != "ios") and extra == "speedups"',
20024
+ 'brotlicffi>=1.2; platform_python_implementation != "CPython" and extra == "speedups"',
20025
+ 'backports.zstd; (platform_python_implementation == "CPython" and python_version < "3.14" and sys_platform != "android" and sys_platform != "ios") and extra == "speedups"'
20026
+ ],
20027
+ provenance: {
20028
+ sourceTreeDigest: "5662d225129f12941920b950f967589a87bd5f9c16d5592505f6e518692a6e6b",
20029
+ recipeSha256: "53617e75a966dae4e89984d23d35b8db0c8a63784ce6ac292ce201d9b177831b",
20030
+ buildTools: [
20031
+ "setuptools==84.0.0",
20032
+ "pkgconfig==1.6.0"
20033
+ ],
20034
+ nativeDependencies: [],
20035
+ patches: [
20036
+ "0001-llhttp-native-callbacks-under-emscripten.patch"
20037
+ ]
20038
+ }
20039
+ },
20040
+ {
20041
+ name: "cffi",
20042
+ version: "2.1.1",
20043
+ filename: "cffi-2.1.1-cp313-cp313-emscripten_5_0_6_wasm32.whl",
20044
+ sha256: "aa98581fb4637d9d0a677eaad29509e80cb0c6f8e75287d9932e475a904d9fdd",
20045
+ abiId: "sbxabi1-c2637d04695ad927",
20046
+ requires: [
20047
+ 'pycparser; implementation_name != "PyPy"'
20048
+ ],
20049
+ provenance: {
20050
+ sourceTreeDigest: "1dbf3663d2b2c3fffca618f33fa6f6f9d4958c9c0824325f32a3d94e0ef2dd72",
20051
+ recipeSha256: "d6801132e84a3651d70f8a625c57d1a58b995b766cdbabcdf8cd33697b83f8c1",
20052
+ buildTools: [
20053
+ "setuptools==84.0.0"
20054
+ ],
20055
+ nativeDependencies: [
20056
+ "ffi==3.8.0"
20057
+ ],
20058
+ patches: []
20059
+ }
20060
+ },
20061
+ {
20062
+ name: "httptools",
20063
+ version: "0.8.0",
20064
+ filename: "httptools-0.8.0-cp313-cp313-emscripten_5_0_6_wasm32.whl",
20065
+ sha256: "26f817daa30fc65a636eac624ae4aacd5e8818c7a8b4950d557bd45ef33b2ade",
20066
+ abiId: "sbxabi1-c2637d04695ad927",
20067
+ requires: [],
20068
+ provenance: {
20069
+ sourceTreeDigest: "53f1ec592c052003bcd8f3ffab9bba9e4c1aba242f1f746ea8941cef7fc4d6ab",
20070
+ recipeSha256: "2c8459072223406c49cae3e1cfd8031819a94d45bd419ecb3790b73363e40cda",
20071
+ buildTools: [
20072
+ "setuptools==84.0.0"
20073
+ ],
20074
+ nativeDependencies: [],
20075
+ patches: [
20076
+ "0001-llhttp-native-callbacks-under-emscripten.patch"
20077
+ ]
20078
+ }
20079
+ },
19969
20080
  {
19970
20081
  name: "msgpack",
19971
20082
  version: "1.1.0",
@@ -20043,6 +20154,25 @@ var wheels_default = {
20043
20154
  patches: []
20044
20155
  }
20045
20156
  },
20157
+ {
20158
+ name: "pydantic-core",
20159
+ version: "2.49.0",
20160
+ filename: "pydantic_core-2.49.0-cp313-cp313-emscripten_5_0_6_wasm32.whl",
20161
+ sha256: "878f086eb5736ba8b908dfb76671d8130c3a9f22dc1612da09a72c0757191b38",
20162
+ abiId: "sbxabi1-c2637d04695ad927",
20163
+ requires: [
20164
+ "typing-extensions>=4.16.0"
20165
+ ],
20166
+ provenance: {
20167
+ sourceTreeDigest: "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
20168
+ recipeSha256: "bbf84cfbcadefd08044cc05e28390e4e5a5803251833bd668bcb7e3925a42639",
20169
+ buildTools: [
20170
+ "setuptools==84.0.0"
20171
+ ],
20172
+ nativeDependencies: [],
20173
+ patches: []
20174
+ }
20175
+ },
20046
20176
  {
20047
20177
  name: "sbx-c-probe",
20048
20178
  version: "1.0.0",
@@ -20236,13 +20366,54 @@ var wheels_default = {
20236
20366
  "0001-static-library-only.patch"
20237
20367
  ]
20238
20368
  }
20369
+ },
20370
+ {
20371
+ name: "xxhash",
20372
+ version: "4.0.1",
20373
+ filename: "xxhash-4.0.1-cp313-cp313-emscripten_5_0_6_wasm32.whl",
20374
+ sha256: "6d6938deb4def23dc3d815651af484d4e75a35a354d13f406b410192913a062a",
20375
+ abiId: "sbxabi1-c2637d04695ad927",
20376
+ requires: [],
20377
+ provenance: {
20378
+ sourceTreeDigest: "86f8d1362cff2b5e28767e0a8d3839fa99bbcd93cc21bd879e682084ceabc452",
20379
+ recipeSha256: "a2d5a096ffb2d40042c73cd8c14f8ff215a11c6f039e4e88163d219e714203d3",
20380
+ buildTools: [
20381
+ "setuptools==84.0.0"
20382
+ ],
20383
+ nativeDependencies: [],
20384
+ patches: [
20385
+ "0001-meth-noargs-signatures.patch"
20386
+ ]
20387
+ }
20388
+ },
20389
+ {
20390
+ name: "zstandard",
20391
+ version: "0.25.0",
20392
+ filename: "zstandard-0.25.0-cp313-cp313-emscripten_5_0_6_wasm32.whl",
20393
+ sha256: "43bff80a5ba349739c45f3dd53843c00a2b6c5b7e2a6f5542cf48c408dcce3ca",
20394
+ abiId: "sbxabi1-c2637d04695ad927",
20395
+ requires: [
20396
+ 'cffi~=1.17; (platform_python_implementation != "PyPy" and python_version < "3.14") and extra == "cffi"',
20397
+ 'cffi>=2.0.0b; (platform_python_implementation != "PyPy" and python_version >= "3.14") and extra == "cffi"'
20398
+ ],
20399
+ provenance: {
20400
+ sourceTreeDigest: "ae85638fab917b3b5e674bf4b6e4752ff69e8e82f3dff57d5ce3ee5881b21146",
20401
+ recipeSha256: "6aea2ccb942fcee96f0420f670814a6fd37b7ca1ff854cfa240eb67b3d17ae1f",
20402
+ buildTools: [
20403
+ "setuptools==84.0.0",
20404
+ "cffi==2.1.1",
20405
+ "packaging==26.3"
20406
+ ],
20407
+ nativeDependencies: [],
20408
+ patches: []
20409
+ }
20239
20410
  }
20240
20411
  ]
20241
20412
  };
20242
20413
 
20243
20414
  // package.json
20244
20415
  var package_default = {
20245
- version: "0.1.86"};
20416
+ version: "0.1.89"};
20246
20417
 
20247
20418
  // src/python/config.ts
20248
20419
  function runtimeModuleUrl() {
@@ -22593,21 +22764,70 @@ def settrace(callback):
22593
22764
  def gettrace():
22594
22765
  return None
22595
22766
  `;
22596
- var BUILTINS3 = {
22597
- greenlet: {
22598
- version: GREENLET_VERSION,
22767
+ var UVLOOP_VERSION = "0.22.1";
22768
+ var UVLOOP_SOURCE = `"""SandboxedJs stand-in for uvloop: asyncio's event loop under uvloop's API.
22769
+
22770
+ libuv cannot run in this WebAssembly Python runtime, so the loop returned here
22771
+ is the standard asyncio loop. Programs behave identically, without libuv's
22772
+ speed-up.
22773
+ """
22774
+
22775
+ import asyncio as __asyncio
22776
+
22777
+ __version__ = ${JSON.stringify(UVLOOP_VERSION)}
22778
+ __all__ = ("new_event_loop", "install", "EventLoopPolicy", "run", "Loop")
22779
+
22780
+
22781
+ class Loop(__asyncio.SelectorEventLoop):
22782
+ pass
22783
+
22784
+
22785
+ def new_event_loop():
22786
+ return Loop()
22787
+
22788
+
22789
+ class EventLoopPolicy(__asyncio.DefaultEventLoopPolicy):
22790
+ def _loop_factory(self):
22791
+ return new_event_loop()
22792
+
22793
+
22794
+ def install():
22795
+ __asyncio.set_event_loop_policy(EventLoopPolicy())
22796
+
22797
+
22798
+ def run(main, *, loop_factory=new_event_loop, debug=None, **run_kwargs):
22799
+ with __asyncio.Runner(loop_factory=loop_factory, debug=debug) as runner:
22800
+ return runner.run(main)
22801
+ `;
22802
+ function builtinDistribution(name, version, summary, files) {
22803
+ return {
22804
+ version,
22599
22805
  files: {
22600
- "greenlet/__init__.py": GREENLET_SOURCE,
22601
- [`greenlet-${GREENLET_VERSION}.dist-info/METADATA`]: `Metadata-Version: 2.1
22602
- Name: greenlet
22603
- Version: ${GREENLET_VERSION}
22604
- Summary: SandboxedJs stand-in: importable, cannot switch stacks
22806
+ ...files,
22807
+ [`${name}-${version}.dist-info/METADATA`]: `Metadata-Version: 2.1
22808
+ Name: ${name}
22809
+ Version: ${version}
22810
+ Summary: ${summary}
22605
22811
  `,
22606
- [`greenlet-${GREENLET_VERSION}.dist-info/WHEEL`]: "Wheel-Version: 1.0\nGenerator: sandboxedjs\nRoot-Is-Purelib: true\nTag: py3-none-any\n",
22607
- [`greenlet-${GREENLET_VERSION}.dist-info/INSTALLER`]: "sandboxedjs\n",
22608
- [`greenlet-${GREENLET_VERSION}.dist-info/RECORD`]: ""
22812
+ [`${name}-${version}.dist-info/WHEEL`]: "Wheel-Version: 1.0\nGenerator: sandboxedjs\nRoot-Is-Purelib: true\nTag: py3-none-any\n",
22813
+ [`${name}-${version}.dist-info/INSTALLER`]: "sandboxedjs\n",
22814
+ [`${name}-${version}.dist-info/RECORD`]: ""
22609
22815
  }
22610
- }
22816
+ };
22817
+ }
22818
+ var BUILTINS3 = {
22819
+ greenlet: builtinDistribution(
22820
+ "greenlet",
22821
+ GREENLET_VERSION,
22822
+ "SandboxedJs stand-in: importable, cannot switch stacks",
22823
+ { "greenlet/__init__.py": GREENLET_SOURCE }
22824
+ ),
22825
+ uvloop: builtinDistribution(
22826
+ "uvloop",
22827
+ UVLOOP_VERSION,
22828
+ "SandboxedJs stand-in: asyncio's event loop under uvloop's API",
22829
+ { "uvloop/__init__.py": UVLOOP_SOURCE }
22830
+ )
22611
22831
  };
22612
22832
  function builtinCandidates(name) {
22613
22833
  const builtin = BUILTINS3[name];
@@ -22792,7 +23012,9 @@ async function resolve2(options) {
22792
23012
  }
22793
23013
  const previous = state.constraints.get(name) ?? [];
22794
23014
  const constraints = new Map(state.constraints);
22795
- constraints.set(name, [...previous, { spec: requirement.specifiers, origin }]);
23015
+ if (origin !== "<root>" || requirement.specifiers.length === 0) {
23016
+ constraints.set(name, [...previous, { spec: requirement.specifiers, origin }]);
23017
+ }
22796
23018
  const next = { chosen: state.chosen, constraints };
22797
23019
  const already = next.chosen.get(name);
22798
23020
  if (already) {
@@ -22814,14 +23036,15 @@ async function resolve2(options) {
22814
23036
  const clauses = (next.constraints.get(name) ?? []).flatMap((entry) => entry.spec);
22815
23037
  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]);
22816
23038
  if (viable.length === 0) {
22817
- const nothingUsable = all.length === 0;
23039
+ const wanted = [...unusable.get(name)?.versions ?? []].filter((version) => clauses.every((s) => compareVersions(version, s.version, s.op)));
23040
+ const nothingUsable = all.length === 0 || wanted.length > 0;
22818
23041
  const error2 = new ResolutionError(
22819
- 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`,
23042
+ 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`,
22820
23043
  explain(name, next.constraints, null, all),
22821
23044
  nothingUsable ? {
22822
23045
  reason: "no-compatible-distribution",
22823
23046
  package: name,
22824
- unusableVersions: [...unusable.get(name)?.versions ?? []].sort(),
23047
+ unusableVersions: wanted.length > 0 ? wanted.sort() : [...unusable.get(name)?.versions ?? []].sort(),
22825
23048
  wheelTag: WHEEL_TAG,
22826
23049
  abiId: EXTENSION_ABI.abiId,
22827
23050
  sourceAvailable: unusable.get(name)?.sourceAvailable ?? false
@@ -22876,7 +23099,13 @@ async function resolve2(options) {
22876
23099
  nogoods.set(signature, error);
22877
23100
  throw error;
22878
23101
  };
22879
- const solved = await search(roots, { chosen: /* @__PURE__ */ new Map(), constraints: /* @__PURE__ */ new Map() });
23102
+ const seeded = /* @__PURE__ */ new Map();
23103
+ for (const root of roots) {
23104
+ const { name, specifiers, marker } = root.requirement;
23105
+ if (specifiers.length === 0 || !markerApplies(marker, environment, root.extras)) continue;
23106
+ seeded.set(name, [...seeded.get(name) ?? [], { spec: specifiers, origin: root.origin }]);
23107
+ }
23108
+ const solved = await search(roots, { chosen: /* @__PURE__ */ new Map(), constraints: seeded });
22880
23109
  const distributions = [...solved.chosen.values()].sort((a, b) => a.name < b.name ? -1 : a.name > b.name ? 1 : 0);
22881
23110
  const reported = new Map(skipped.map((s) => [`${s.name}\0${s.marker}`, s]));
22882
23111
  return { distributions, skipped: [...reported.values()] };
@@ -22948,6 +23177,9 @@ async function fetchCandidates(client, name, allowSourceBuilds, prebuilt, reject
22948
23177
  }
22949
23178
  return candidates;
22950
23179
  }
23180
+ function newest(versions) {
23181
+ return versions.reduce((a, b) => compareVersions(b, a, ">") ? b : a);
23182
+ }
22951
23183
  function isPreRelease(version) {
22952
23184
  return /(a|b|rc|dev)\d*$/i.test(version.replace(/^\d+(\.\d+)*/, ""));
22953
23185
  }