Commit c3c02a2
authored
fix(vector): forward offline spatial-extension path to the Add Vector panel (#446)
* fix(vector): forward offline spatial-extension path to the Add Vector panel
The Add Vector panel's maplibre-gl-vector control runs its own DuckDB-WASM
engine, which installs the spatial extension from a remote repository. In
sandboxed or firewalled environments that install hangs, leaving the panel
stuck on "Loading DuckDB-WASM..." (#445).
Forward VITE_DUCKDB_SPATIAL_EXTENSION_PATH (the same variable GeoLibre's own
DuckDB loader honours) to the control via its new spatialExtensionPath option,
so it loads a local extension instead of the remote INSTALL. The helper reads
the runtime env through @geolibre/core so the plugin package does not depend on
the desktop app.
Requires maplibre-gl-vector with the spatialExtensionPath option
(opengeos/maplibre-gl-vector#17).
* chore(deps): bump maplibre-gl-vector to ^0.4.0
0.4.0 publishes the spatialExtensionPath option this branch consumes
(opengeos/maplibre-gl-vector#17), so the dependency range must include it.
Bumps both workspaces (apps/geolibre-desktop, packages/plugins) and the
lockfile to the published 0.4.0.
* Address Claude review feedback
- Centralize getSpatialExtensionPath in @geolibre/core (runtime-env.ts) and
export it, replacing the line-for-line duplicate that lived in the plugin.
Both consumers (desktop duckdb loader via the spatial-extension-config
re-export, and the maplibre-vector plugin) now share one implementation, so
the VITE_DUCKDB_SPATIAL_EXTENSION_PATH logic cannot silently diverge.
- Drop the now-redundant tests/vector-spatial-extension-path.test.ts; the same
logic is covered by tests/spatial-extension-config.test.ts.
* Address Claude review feedback
- Simplify getSpatialExtensionPath: single trim via optional chaining
(`value?.trim() || undefined`) instead of trimming twice.1 parent 0f21498 commit c3c02a2
7 files changed
Lines changed: 39 additions & 18 deletions
File tree
- apps/geolibre-desktop
- src/lib
- packages
- core/src
- plugins
- src/plugins
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
| 77 | + | |
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
| 74 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
301 | 301 | | |
302 | 302 | | |
303 | 303 | | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
304 | 307 | | |
305 | 308 | | |
306 | 309 | | |
| |||
0 commit comments