@observablehq/notebook-kit 1.7.11 → 1.8.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/dist/package.json +1 -1
- package/dist/src/javascript/imports/npm.js +2 -2
- package/dist/src/runtime/index.d.ts +1 -0
- package/dist/src/runtime/stdlib/duckdb.js +8 -5
- package/dist/src/runtime/stdlib/files/buffer.d.ts +1 -0
- package/dist/src/runtime/stdlib/files/buffer.js +8 -0
- package/dist/src/runtime/stdlib/files/index.d.ts +3 -0
- package/dist/src/runtime/stdlib/files/index.js +3 -0
- package/dist/src/runtime/stdlib/files/text.d.ts +1 -0
- package/dist/src/runtime/stdlib/files/text.js +8 -0
- package/dist/src/runtime/stdlib/files/url.d.ts +1 -0
- package/dist/src/runtime/stdlib/files/url.js +8 -0
- package/dist/src/runtime/stdlib/index.d.ts +2 -0
- package/dist/src/runtime/stdlib/index.js +2 -0
- package/dist/src/runtime/stdlib/recommendedLibraries.js +1 -1
- package/package.json +1 -1
package/dist/package.json
CHANGED
|
@@ -24,9 +24,9 @@ export function resolveNpmImport(specifier) {
|
|
|
24
24
|
function getDefaultRange(name) {
|
|
25
25
|
switch (name) {
|
|
26
26
|
case "@duckdb/duckdb-wasm":
|
|
27
|
-
return "@1.
|
|
27
|
+
return "@1.32.0"; // https://github.com/duckdb/duckdb-wasm/issues/1994
|
|
28
28
|
case "apache-arrow":
|
|
29
|
-
return "@17.0.0"; // to match @duckdb/duckdb-wasm 1.
|
|
29
|
+
return "@17.0.0"; // to match @duckdb/duckdb-wasm 1.32.0
|
|
30
30
|
default:
|
|
31
31
|
return "";
|
|
32
32
|
}
|
|
@@ -112,6 +112,7 @@ export declare class NotebookRuntime {
|
|
|
112
112
|
};
|
|
113
113
|
Mutable: () => typeof import("./stdlib/mutable.js").Mutable;
|
|
114
114
|
Promises: () => typeof import("./stdlib/promises/index.js");
|
|
115
|
+
Files: () => typeof import("./stdlib/files/index.js");
|
|
115
116
|
DOM: () => typeof import("./stdlib/dom/index.js");
|
|
116
117
|
require: () => {
|
|
117
118
|
(...specifiers: unknown[]): Promise<unknown>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as duckdb from "https://cdn.jsdelivr.net/npm/@duckdb/duckdb-wasm@1.
|
|
1
|
+
import * as duckdb from "https://cdn.jsdelivr.net/npm/@duckdb/duckdb-wasm@1.32.0/+esm";
|
|
2
2
|
// Adapted from https://observablehq.com/@cmudig/duckdb-client
|
|
3
3
|
// Copyright 2021 CMU Data Interaction Group
|
|
4
4
|
//
|
|
@@ -29,12 +29,12 @@ import * as duckdb from "https://cdn.jsdelivr.net/npm/@duckdb/duckdb-wasm@1.29.0
|
|
|
29
29
|
// POSSIBILITY OF SUCH DAMAGE.
|
|
30
30
|
const bundles = {
|
|
31
31
|
mvp: {
|
|
32
|
-
mainModule: "https://cdn.jsdelivr.net/npm/@duckdb/duckdb-wasm@1.
|
|
33
|
-
mainWorker: "https://cdn.jsdelivr.net/npm/@duckdb/duckdb-wasm@1.
|
|
32
|
+
mainModule: "https://cdn.jsdelivr.net/npm/@duckdb/duckdb-wasm@1.32.0/dist/duckdb-mvp.wasm",
|
|
33
|
+
mainWorker: "https://cdn.jsdelivr.net/npm/@duckdb/duckdb-wasm@1.32.0/dist/duckdb-browser-mvp.worker.js" // prettier-ignore
|
|
34
34
|
},
|
|
35
35
|
eh: {
|
|
36
|
-
mainModule: "https://cdn.jsdelivr.net/npm/@duckdb/duckdb-wasm@1.
|
|
37
|
-
mainWorker: "https://cdn.jsdelivr.net/npm/@duckdb/duckdb-wasm@1.
|
|
36
|
+
mainModule: "https://cdn.jsdelivr.net/npm/@duckdb/duckdb-wasm@1.32.0/dist/duckdb-eh.wasm",
|
|
37
|
+
mainWorker: "https://cdn.jsdelivr.net/npm/@duckdb/duckdb-wasm@1.32.0/dist/duckdb-browser-eh.worker.js" // prettier-ignore
|
|
38
38
|
}
|
|
39
39
|
};
|
|
40
40
|
const bundle = duckdb.selectBundle(bundles);
|
|
@@ -163,6 +163,9 @@ export class DuckDBClient {
|
|
|
163
163
|
if (config.query?.castBigIntToDouble === undefined) {
|
|
164
164
|
config = { ...config, query: { ...config.query, castBigIntToDouble: true } };
|
|
165
165
|
}
|
|
166
|
+
if (config.filesystem?.forceFullHTTPReads === undefined) {
|
|
167
|
+
config = { ...config, filesystem: { ...config.filesystem, forceFullHTTPReads: true } };
|
|
168
|
+
}
|
|
166
169
|
await db.open(config);
|
|
167
170
|
// await registerExtensions(db, config.extensions);
|
|
168
171
|
await Promise.all(Object.entries(sources).map(([name, source]) => insertSource(db, name, source)));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function buffer(file: Blob): Promise<ArrayBuffer>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function text(file: Blob): Promise<string>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function url(file: Blob): Promise<string>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { DatabaseClient } from "./databaseClient.js";
|
|
2
2
|
import * as DOM from "./dom/index.js";
|
|
3
|
+
import * as Files from "./files/index.js";
|
|
3
4
|
import { FileAttachment } from "./fileAttachment.js";
|
|
4
5
|
import * as Generators from "./generators/index.js";
|
|
5
6
|
import { Interpreter } from "./interpreter.js";
|
|
@@ -101,6 +102,7 @@ export declare const library: {
|
|
|
101
102
|
};
|
|
102
103
|
Mutable: () => typeof Mutable;
|
|
103
104
|
Promises: () => typeof Promises;
|
|
105
|
+
Files: () => typeof Files;
|
|
104
106
|
DOM: () => typeof DOM;
|
|
105
107
|
require: () => {
|
|
106
108
|
(...specifiers: unknown[]): Promise<unknown>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { DatabaseClient } from "./databaseClient.js";
|
|
2
2
|
import * as DOM from "./dom/index.js";
|
|
3
|
+
import * as Files from "./files/index.js";
|
|
3
4
|
import { FileAttachment } from "./fileAttachment.js";
|
|
4
5
|
import * as Generators from "./generators/index.js";
|
|
5
6
|
import { Interpreter } from "./interpreter.js";
|
|
@@ -20,6 +21,7 @@ export const library = {
|
|
|
20
21
|
Interpreter: () => Interpreter,
|
|
21
22
|
Mutable: () => Mutable,
|
|
22
23
|
Promises: () => Promises, // deprecated!
|
|
24
|
+
Files: () => Files, // deprecated!
|
|
23
25
|
DOM: () => DOM, // deprecated!
|
|
24
26
|
require: () => require, // deprecated!
|
|
25
27
|
__ojs_observer: () => () => new Observer(),
|
|
@@ -3,7 +3,7 @@ export const aq = () => import("https://cdn.jsdelivr.net/npm/arquero/+esm");
|
|
|
3
3
|
export const Arrow = () => import("https://cdn.jsdelivr.net/npm/apache-arrow@17.0.0/+esm");
|
|
4
4
|
export const d3 = () => import("https://cdn.jsdelivr.net/npm/d3/+esm");
|
|
5
5
|
export const dot = () => import("./dot.js").then((_) => _.dot);
|
|
6
|
-
export const duckdb = () => import("https://cdn.jsdelivr.net/npm/@duckdb/duckdb-wasm@1.
|
|
6
|
+
export const duckdb = () => import("https://cdn.jsdelivr.net/npm/@duckdb/duckdb-wasm@1.32.0/+esm");
|
|
7
7
|
export const DuckDBClient = () => import("./duckdb.js").then((_) => _.DuckDBClient);
|
|
8
8
|
export const echarts = () => import("https://cdn.jsdelivr.net/npm/echarts/+esm");
|
|
9
9
|
export const htl = () => import("https://cdn.jsdelivr.net/npm/htl/+esm");
|