@hpcc-js/wasm-duckdb 1.17.2 → 1.17.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/dist/index.js +1 -13
- package/dist/index.js.map +3 -3
- package/package.json +3 -3
- package/src/duckdb.ts +10 -3
- package/types/duckdblib.d.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hpcc-js/wasm-duckdb",
|
|
3
|
-
"version": "1.17.
|
|
3
|
+
"version": "1.17.5",
|
|
4
4
|
"description": "hpcc-js - WASM DuckDB",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@hpcc-js/esbuild-plugins": "1.8.
|
|
43
|
+
"@hpcc-js/esbuild-plugins": "1.8.8",
|
|
44
44
|
"@hpcc-js/wasm-util": "1.0.0"
|
|
45
45
|
},
|
|
46
46
|
"keywords": [
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
},
|
|
58
58
|
"homepage": "https://hpcc-systems.github.io/hpcc-js-wasm/",
|
|
59
59
|
"license": "Apache-2.0",
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "3418768849847397c26cc593521d79c125a9a4a1"
|
|
61
61
|
}
|
package/src/duckdb.ts
CHANGED
|
@@ -225,9 +225,17 @@ export class DuckDB {
|
|
|
225
225
|
void _err;
|
|
226
226
|
}
|
|
227
227
|
|
|
228
|
-
const err
|
|
228
|
+
const err = error as { name?: unknown; message?: unknown };
|
|
229
|
+
if (Array.isArray(err?.message)) {
|
|
230
|
+
const [type, message] = err.message;
|
|
231
|
+
return {
|
|
232
|
+
type: typeof type === "string" ? type : "Error",
|
|
233
|
+
message: typeof message === "string" ? message : String(error)
|
|
234
|
+
};
|
|
235
|
+
}
|
|
236
|
+
|
|
229
237
|
return {
|
|
230
|
-
type: err?.name
|
|
238
|
+
type: typeof err?.name === "string" ? err.name : "Error",
|
|
231
239
|
message: typeof err?.message === "string" ? err.message : String(error)
|
|
232
240
|
};
|
|
233
241
|
}
|
|
@@ -364,4 +372,3 @@ export class DuckDB {
|
|
|
364
372
|
this.registerFile(fileName, encoded);
|
|
365
373
|
}
|
|
366
374
|
}
|
|
367
|
-
|
package/types/duckdblib.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ declare namespace RuntimeExports {
|
|
|
16
16
|
function UTF8ToString(ptr: number, maxBytesToRead?: number | undefined, ignoreNul?: boolean | undefined): string;
|
|
17
17
|
function lengthBytesUTF8(str: any): number;
|
|
18
18
|
function stringToUTF8(str: any, outPtr: any, maxBytesToWrite: any): any;
|
|
19
|
-
let HEAPU8:
|
|
19
|
+
let HEAPU8: Uint8Array;
|
|
20
20
|
let FS_createPath: any;
|
|
21
21
|
function FS_createDataFile(parent: any, name: any, fileData: any, canRead: any, canWrite: any, canOwn: any): void;
|
|
22
22
|
function FS_preloadFile(parent: any, name: any, url: any, canRead: any, canWrite: any, dontCreateFile: any, canOwn: any, preFinish: any): Promise<void>;
|