@motherduck/wasm-client 0.6.3 → 0.6.5
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 +1 -3
- package/index.js +1 -1
- package/index_with_arrow.js +9 -9
- package/package.json +2 -2
- package/types/DuckDBInstance.d.ts +1 -1
- package/types/MDConnection.d.ts +2 -7
- package/types/MDConnectionParams.d.ts +4 -3
- package/types/MaterializedQueryTask.d.ts +2 -2
- package/types/QueryTypes.d.ts +5 -1
- package/types/StreamingQueryTask.d.ts +2 -2
- package/types/createDuckDbConnection.d.ts +1 -1
- package/types/duckdb-wasm/bindings/bindings_base.d.ts +122 -0
- package/types/duckdb-wasm/bindings/bindings_browser_base.d.ts +19 -0
- package/types/duckdb-wasm/bindings/bindings_browser_coi.d.ts +12 -0
- package/types/duckdb-wasm/bindings/bindings_browser_eh.d.ts +12 -0
- package/types/duckdb-wasm/bindings/bindings_browser_mvp.d.ts +11 -0
- package/types/duckdb-wasm/bindings/bindings_interface.d.ts +41 -0
- package/types/duckdb-wasm/bindings/bindings_node_base.d.ts +23 -0
- package/types/duckdb-wasm/bindings/bindings_node_eh.d.ts +12 -0
- package/types/duckdb-wasm/bindings/bindings_node_mvp.d.ts +12 -0
- package/types/duckdb-wasm/bindings/config.d.ts +66 -0
- package/types/duckdb-wasm/bindings/connection.d.ts +74 -0
- package/types/duckdb-wasm/bindings/duckdb_module.d.ts +12 -0
- package/types/duckdb-wasm/bindings/file_stats.d.ts +36 -0
- package/types/duckdb-wasm/bindings/index.d.ts +11 -0
- package/types/duckdb-wasm/bindings/insert_options.d.ts +38 -0
- package/types/duckdb-wasm/bindings/progress.d.ts +9 -0
- package/types/duckdb-wasm/bindings/runtime.d.ts +83 -0
- package/types/duckdb-wasm/bindings/runtime_browser.d.ts +9 -0
- package/types/duckdb-wasm/bindings/runtime_node.d.ts +8 -0
- package/types/duckdb-wasm/bindings/tokens.d.ts +12 -0
- package/types/duckdb-wasm/bindings/udf_function.d.ts +14 -0
- package/types/duckdb-wasm/bindings/udf_runtime.d.ts +3 -0
- package/types/duckdb-wasm/bindings/web_file.d.ts +12 -0
- package/types/duckdb-wasm/index.d.ts +7 -0
- package/types/duckdb-wasm/index_docs.d.ts +1 -0
- package/types/duckdb-wasm/json_typedef.d.ts +17 -0
- package/types/duckdb-wasm/log.d.ts +54 -0
- package/types/duckdb-wasm/parallel/async_bindings.d.ts +122 -0
- package/types/duckdb-wasm/parallel/async_bindings_interface.d.ts +25 -0
- package/types/duckdb-wasm/parallel/async_connection.d.ts +75 -0
- package/types/duckdb-wasm/parallel/index.d.ts +5 -0
- package/types/duckdb-wasm/parallel/worker_dispatcher.d.ts +22 -0
- package/types/duckdb-wasm/parallel/worker_request.d.ts +99 -0
- package/types/duckdb-wasm/platform.d.ts +39 -0
- package/types/duckdb-wasm/status.d.ts +3 -0
- package/types/duckdb-wasm/targets/duckdb-browser-blocking.d.ts +12 -0
- package/types/duckdb-wasm/targets/duckdb-browser-coi.pthread.worker.d.ts +1 -0
- package/types/duckdb-wasm/targets/duckdb-browser-coi.worker.d.ts +2 -0
- package/types/duckdb-wasm/targets/duckdb-browser-eh.worker.d.ts +2 -0
- package/types/duckdb-wasm/targets/duckdb-browser-mvp.worker.d.ts +2 -0
- package/types/duckdb-wasm/targets/duckdb-node-blocking.d.ts +13 -0
- package/types/duckdb-wasm/targets/duckdb-node-eh.worker.d.ts +2 -0
- package/types/duckdb-wasm/targets/duckdb-node-mvp.worker.d.ts +2 -0
- package/types/duckdb-wasm/targets/duckdb.d.ts +9 -0
- package/types/duckdb-wasm/utils/binary_dump.d.ts +1 -0
- package/types/duckdb-wasm/utils/index.d.ts +2 -0
- package/types/duckdb-wasm/utils/s3_helper.d.ts +27 -0
- package/types/duckdb-wasm/version.d.ts +5 -0
- package/types/duckdb-wasm/worker.d.ts +1 -0
- package/types/fetchDuckDBBundlesFromDuckDBAssets.d.ts +2 -0
- package/types/getAsyncDuckDb.d.ts +2 -1
- package/types/index.d.ts +0 -1
- package/types/instantiateDB.d.ts +2 -1
- package/types/isDuckDBBundles.d.ts +2 -0
- package/types/motherduck/duckdb-arrow/AsyncDuckDBRecordBatchIterator.d.ts +1 -1
- package/types/motherduck/duckdb-arrow/DuckDBRecordBatch.d.ts +3 -3
- package/types/motherduck/duckdb-arrow/duckDBTypeFromArrowType.d.ts +2 -2
- package/types/motherduck/duckdb-arrow/duckDBValueFromArrowData.d.ts +3 -3
- package/types/motherduck/duckdb-data/DuckDBData.d.ts +2 -2
- package/types/motherduck/duckdb-data/DuckDBDataReader.d.ts +2 -2
- package/types/motherduck/duckdb-data/DuckDBRow.d.ts +1 -1
- package/types/motherduck/duckdb-data/MemoryDuckDBData.d.ts +2 -2
- package/types/motherduck/duckdb-types/DuckDBType.d.ts +7 -1
- package/types/motherduck/duckdb-types/DuckDBTypes.d.ts +3 -1
- package/types/motherduck/duckdb-types/duckDBTypeToString.d.ts +2 -0
- package/types/motherduck/duckdb-types/index.d.ts +1 -0
- package/types/motherduck/duckdb-values/DuckDBArray.d.ts +1 -0
- package/types/motherduck/duckdb-values/DuckDBBlob.d.ts +1 -0
- package/types/motherduck/duckdb-values/DuckDBDate.d.ts +1 -0
- package/types/motherduck/duckdb-values/DuckDBDecimal.d.ts +1 -0
- package/types/motherduck/duckdb-values/DuckDBInterval.d.ts +1 -0
- package/types/motherduck/duckdb-values/DuckDBList.d.ts +1 -0
- package/types/motherduck/duckdb-values/DuckDBMap.d.ts +1 -0
- package/types/motherduck/duckdb-values/DuckDBStruct.d.ts +1 -0
- package/types/motherduck/duckdb-values/DuckDBTime.d.ts +1 -0
- package/types/motherduck/duckdb-values/DuckDBTimestampMicroseconds.d.ts +1 -0
- package/types/motherduck/duckdb-values/DuckDBTimestampMilliseconds.d.ts +1 -0
- package/types/motherduck/duckdb-values/DuckDBTimestampNanoseconds.d.ts +1 -0
- package/types/motherduck/duckdb-values/DuckDBTimestampSeconds.d.ts +1 -0
- package/types/motherduck/duckdb-values/DuckDBUUID.d.ts +7 -0
- package/types/motherduck/duckdb-values/DuckDBValue.d.ts +1 -0
- package/types/motherduck/duckdb-values/SpecialDuckDBValue.d.ts +1 -0
- package/types/motherduck/duckdb-values/conversion/hexFromBlob.d.ts +1 -0
- package/types/motherduck/duckdb-values/index.d.ts +1 -0
- package/types/motherduck/wasm-extension/LoadMotherDuckWasmExtensionOptions.d.ts +5 -1
- package/types/motherduck/wasm-extension/fetchMotherDuckWasmExtensionVersion.d.ts +1 -0
- package/types/motherduck/wasm-extension/index.d.ts +1 -0
- package/types/motherduck/wasm-extension/untilWorkerReady.d.ts +1 -1
- package/types/prefixDuckDBBundles.d.ts +2 -0
- package/types/readLocalFS.d.ts +2 -2
- package/index.js.map +0 -7
- package/types/LogSink.d.ts +0 -6
- package/types/TaskSequencer.d.ts +0 -55
- package/types/extractWrappedErrorMessage.d.ts +0 -17
- package/types/fetchDuckDBAssets.d.ts +0 -17
- package/types/fetchVersion.d.ts +0 -1
- package/types/genConnectionId.d.ts +0 -1
- package/types/getDuckDBBundlesFromDuckDBAssets.d.ts +0 -2
- package/types/getErrorMessage.d.ts +0 -1
- package/types/recursivelyPrefix.d.ts +0 -1
- package/types/transformQueryError.d.ts +0 -2
package/types/LogSink.d.ts
DELETED
package/types/TaskSequencer.d.ts
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import 'core-js/actual/promise/with-resolvers';
|
|
2
|
-
import { LogSink } from './LogSink';
|
|
3
|
-
/**
|
|
4
|
-
* Represents a task that can be sequenced by TaskSequencer.
|
|
5
|
-
*
|
|
6
|
-
* Implemented by users of TaskSequencer.
|
|
7
|
-
*/
|
|
8
|
-
export interface Task<T> {
|
|
9
|
-
/**
|
|
10
|
-
* Run the task and return a promise for the results.
|
|
11
|
-
*/
|
|
12
|
-
run: () => Promise<T>;
|
|
13
|
-
/**
|
|
14
|
-
* Attempt to cancel a running task, and return a boolean promise indicating whether the attempt was successful.
|
|
15
|
-
*/
|
|
16
|
-
cancel: () => Promise<boolean>;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Sequences user-defined Tasks, ensuring only one is running at a given time.
|
|
20
|
-
* Supports cancellation.
|
|
21
|
-
*/
|
|
22
|
-
export declare class TaskSequencer<T> {
|
|
23
|
-
private nextTaskId;
|
|
24
|
-
private queuedTaskIds;
|
|
25
|
-
private queuedTasksById;
|
|
26
|
-
private processingQueue;
|
|
27
|
-
private logSink?;
|
|
28
|
-
constructor(logSink?: LogSink);
|
|
29
|
-
incompleteTaskCount(): number;
|
|
30
|
-
/**
|
|
31
|
-
* Append a task to the queue, and return its unique id.
|
|
32
|
-
*
|
|
33
|
-
* The id can be used to get the result (using `taskResult`) or cancel (using `cancelTask`).
|
|
34
|
-
*/
|
|
35
|
-
enqueueTask(task: Task<T>): string;
|
|
36
|
-
/**
|
|
37
|
-
* Attempt to cancel a previously enqueued task.
|
|
38
|
-
* Returns a boolean promise indicating whether the attempt succeeded.
|
|
39
|
-
*
|
|
40
|
-
* In addition to the `taskId` to cancel, takes an optional `errorMessage` to supply to the rejected task promise, if a pending task is cancelled.
|
|
41
|
-
* If a running task is cancelled, then the task implementation controls the error message in the rejected task promise.
|
|
42
|
-
*/
|
|
43
|
-
cancelTask(taskId: string, errorMessage?: string): Promise<boolean>;
|
|
44
|
-
/**
|
|
45
|
-
* Returns a promise for the result of previously-enqueue task.
|
|
46
|
-
*/
|
|
47
|
-
taskResult(taskId: string): Promise<T>;
|
|
48
|
-
private logDebug;
|
|
49
|
-
private logWarn;
|
|
50
|
-
private createTaskId;
|
|
51
|
-
private addQueuedTask;
|
|
52
|
-
private scheduleProcessQueueIfNeeded;
|
|
53
|
-
private processQueue;
|
|
54
|
-
private processFirstQueuedTask;
|
|
55
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Given an error message string containing a wrapped, JSON-stringified error object
|
|
3
|
-
* after some prefix, attempt to extract and return the message from that inner object.
|
|
4
|
-
*
|
|
5
|
-
* Useful for getting display strings from error messages received through the DuckDB WASM client,
|
|
6
|
-
* which are often wrapped in this way and contain one or more prefixes. The inner message
|
|
7
|
-
* is typically more useful to the end user.
|
|
8
|
-
*
|
|
9
|
-
* Any sequence of characters not containing an opening '{' is treated as a prefix.
|
|
10
|
-
* In practice, the prefix will typically contain one or more error types each
|
|
11
|
-
* followed by " Error: ", such as "Invalid Error: ", but a wider set of prefixes
|
|
12
|
-
* is accepted to protect against future change.
|
|
13
|
-
*
|
|
14
|
-
* If the input does not match the expected pattern, or the JSON parsing fails,
|
|
15
|
-
* the input string is returned unchanged.
|
|
16
|
-
*/
|
|
17
|
-
export declare function extractWrappedErrorMessage(message: string): string;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export declare function fetchDuckDBAssets(duckDBAssetsURLPrefix: string, version?: string): Promise<{
|
|
2
|
-
coi?: {
|
|
3
|
-
mainModule: string;
|
|
4
|
-
mainWorker: string;
|
|
5
|
-
pthreadWorker: string;
|
|
6
|
-
};
|
|
7
|
-
mvp?: {
|
|
8
|
-
mainModule: string;
|
|
9
|
-
mainWorker: string;
|
|
10
|
-
pthreadWorker: undefined;
|
|
11
|
-
};
|
|
12
|
-
eh?: {
|
|
13
|
-
mainModule: string;
|
|
14
|
-
mainWorker: string;
|
|
15
|
-
pthreadWorker: undefined;
|
|
16
|
-
};
|
|
17
|
-
}>;
|
package/types/fetchVersion.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function fetchVersion(duckDBAssetsURLPrefix: string): Promise<string | undefined>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function genConnectionId(): string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function getErrorMessage(maybeError: unknown): string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function recursivelyPrefix(prefix: string, json: any): any;
|