@cfasim-ui/pyodide 0.8.0 → 0.8.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cfasim-ui/pyodide",
3
- "version": "0.8.0",
3
+ "version": "0.8.1",
4
4
  "type": "module",
5
5
  "description": "Pyodide (Python-in-browser) integration for cfasim-ui",
6
6
  "license": "Apache-2.0",
@@ -20,7 +20,7 @@
20
20
  "./vite": "./src/vitePlugin.js"
21
21
  },
22
22
  "dependencies": {
23
- "@cfasim-ui/shared": "0.8.0"
23
+ "@cfasim-ui/shared": "0.8.1"
24
24
  },
25
25
  "peerDependencies": {
26
26
  "vue": "^3.5.0"
package/src/vitePlugin.js CHANGED
@@ -6,6 +6,7 @@ import { resolve } from "node:path";
6
6
  * @typedef {object} CfasimPyodideOptions
7
7
  * @property {string} [model] Path to the Python model directory (default: "model")
8
8
  * @property {string[]} [pypiDeps] PyPI packages to download at build time and serve locally
9
+ * @property {string[]} [localDeps] Local package directories built into wheels (via `uv build`) and served alongside the model wheel. Lets a dependency resolve from a working tree instead of PyPI, e.g. cfasim's own e2e tests during a release window.
9
10
  * @property {string[]} [pyodidePackages] Pyodide built-in packages to preload in the worker (e.g. "scipy", "pandas"). See https://pyodide.org/en/stable/usage/packages-in-pyodide.html. `micropip` and `numpy` are always included.
10
11
  * @property {string} [pipCommand] Command used to invoke pip for downloading `pypiDeps` (default: "uvx pip"). Override with e.g. "pip" or "uv run pip".
11
12
  * @property {string} [pythonVersion] Python version passed to pip's --python-version flag when downloading `pypiDeps` (default: "3.12"). Should match the Python shipped by your Pyodide runtime.
@@ -48,6 +49,12 @@ export function cfasimPyodide(options) {
48
49
  { cwd: root, stdio: "pipe" },
49
50
  );
50
51
  }
52
+ for (const dep of options?.localDeps ?? []) {
53
+ execSync(`uv build ${dep} --wheel --out-dir public`, {
54
+ cwd: root,
55
+ stdio: "pipe",
56
+ });
57
+ }
51
58
  execSync(`uv build ${modelDir} --wheel --out-dir public`, {
52
59
  cwd: root,
53
60
  stdio: "pipe",