@duckdb/react-duckdb 1.28.1-dev80.0 → 1.28.1-dev82.0

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": "@duckdb/react-duckdb",
3
- "version": "1.28.1-dev80.0",
3
+ "version": "1.28.1-dev82.0",
4
4
  "description": "React components for DuckDB-Wasm",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -25,8 +25,12 @@ export const DuckDBPlatform: React.FC<PlatformProps> = (props: PlatformProps) =>
25
25
  if (inFlight.current) return await inFlight.current;
26
26
  inFlight.current = (async () => {
27
27
  try {
28
+ const params = new URLSearchParams(window.location.search);
29
+ const bundleName = params.get('bundle') as keyof duckdb.DuckDBBundles | null;
28
30
  setBundle(b => b.updateRunning());
29
- const next = await duckdb.selectBundle(props.bundles);
31
+
32
+ const bundle = bundleName !== null ? props.bundles[bundleName] : null;
33
+ const next = (bundle || (await duckdb.selectBundle(props.bundles))) as duckdb.DuckDBBundle;
30
34
  inFlight.current = null;
31
35
  setBundle(b => b.completeWith(next));
32
36
  return next;