@motherduck/wasm-client 0.8.1 → 1.5.2-r.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/README.md +2 -25
- package/index.js +1 -1
- package/index_with_arrow.js +8 -8
- package/package.json +1 -1
- package/types/@motherduck/wasm-extension/index.d.ts +0 -1
- package/types/DuckDBInstance.d.ts +7 -1
- package/types/MDConnection.d.ts +8 -8
- package/types/MDConnectionParams.d.ts +5 -1
- package/types/MaterializedQueryTask.d.ts +4 -4
- package/types/QueryTypes.d.ts +3 -3
- package/types/StreamingQueryTask.d.ts +4 -4
- package/types/buildDuckDBBundleURLs.d.ts +9 -0
- package/types/createDuckDbConnection.d.ts +2 -2
- package/types/duckdbAccessModeFromString.d.ts +2 -0
- package/types/environment.d.ts +6 -0
- package/types/getAsyncDuckDb.d.ts +2 -2
- package/types/index.d.ts +12 -10
- package/types/instantiateDB.d.ts +2 -2
- package/types/readLocalFS.d.ts +2 -2
- package/types/registerFiles.d.ts +1 -1
- package/types/fetchDuckDBBundlesFromDuckDBAssets.d.ts +0 -2
- package/types/getVersionSuffix.d.ts +0 -1
- package/types/isDuckDBBundles.d.ts +0 -2
- package/types/prefixDuckDBBundles.d.ts +0 -2
package/README.md
CHANGED
|
@@ -10,43 +10,20 @@ The MotherDuck Wasm Client library enables using MotherDuck through DuckDB Wasm
|
|
|
10
10
|
|
|
11
11
|
Example projects and live demos can be found [here](https://github.com/motherduckdb/wasm-client).
|
|
12
12
|
|
|
13
|
-
## Status
|
|
14
|
-
|
|
15
|
-
Please note that the MotherDuck Wasm Client library is in an early stage of active development. Its structure and API may change considerably.
|
|
16
|
-
|
|
17
|
-
Our current intention is to align more closely with the DuckDB Wasm API in the future, to make using MotherDuck with DuckDB Wasm as easy as possible.
|
|
18
|
-
|
|
19
13
|
## DuckDB Version Support
|
|
20
14
|
|
|
21
|
-
-
|
|
15
|
+
- Each version of the MotherDuck Wasm Client library uses a specific version of DuckDB, as indicated by the package version.
|
|
22
16
|
|
|
23
17
|
## Installation
|
|
24
18
|
|
|
25
19
|
`npm install @motherduck/wasm-client`
|
|
26
20
|
|
|
27
|
-
## Requirements
|
|
28
|
-
|
|
29
|
-
To faciliate efficient communication across worker threads, the MotherDuck Wasm Client library currently uses advanced browser features, including [SharedArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer).
|
|
30
|
-
|
|
31
|
-
Due to [security requirements](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer#security_requirements) of modern browsers, these features require applications to be [cross-origin isolated](https://developer.mozilla.org/en-US/docs/Web/API/crossOriginIsolated).
|
|
32
|
-
|
|
33
|
-
To use the MotherDuck Wasm Client library, your application must be in cross-origin isolation mode, which is enabled when it is served with the following headers:
|
|
34
|
-
|
|
35
|
-
```
|
|
36
|
-
Cross-Origin-Opener-Policy: same-origin
|
|
37
|
-
Cross-Origin-Embedder-Policy: require-corp
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
You can check whether your application is in this mode by examining the [crossOriginIsolated](https://developer.mozilla.org/en-US/docs/Web/API/crossOriginIsolated) property in the browser console.
|
|
41
|
-
|
|
42
|
-
Note that applications in this mode are restricted in [some](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cross-Origin-Opener-Policy#same-origin) [ways](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cross-Origin-Embedder-Policy#require-corp). In particular, resources from different origins can only be loaded if they are served with a [Cross-Origin-Resource-Policy (CORS)](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cross-Origin-Resource-Policy) header with the value `cross-origin`.
|
|
43
|
-
|
|
44
21
|
## Dependencies
|
|
45
22
|
|
|
46
23
|
The MotherDuck Wasm Client library depends on `apache-arrow` as a peer dependency.
|
|
47
24
|
If you use `npm` version 7 or later to install `@motherduck/wasm-client`, then `apache-arrow` will automatically be installed, if it is not already.
|
|
48
25
|
|
|
49
|
-
If you already have `apache-arrow` installed, then `@motherduck/wasm-client` will use it, as long as it is a compatible version (`^
|
|
26
|
+
If you already have `apache-arrow` installed, then `@motherduck/wasm-client` will use it, as long as it is a compatible version (`^17.0.0` at the time of this writing).
|
|
50
27
|
|
|
51
28
|
Optionally, you can use a variant of `@motherduck/wasm-client` that bundles `apache-arrow` instead of relying on it as a peer dependency.
|
|
52
29
|
Don't use this option if you are using `apache-arrow` elsewhere in your application, because different copies of this library don't work together.
|