@duckdb/duckdb-wasm 1.12.0 → 1.12.1-dev87.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/duckdb-browser-blocking.cjs +91 -83
- package/dist/duckdb-browser-blocking.cjs.map +1 -1
- package/dist/duckdb-browser-blocking.mjs +9 -9
- package/dist/duckdb-browser-blocking.mjs.map +1 -1
- package/dist/duckdb-browser-next-coi.pthread.worker.js +2 -2
- package/dist/duckdb-browser-next-coi.pthread.worker.js.map +3 -3
- package/dist/duckdb-browser-next-coi.worker.js +8 -8
- package/dist/duckdb-browser-next-coi.worker.js.map +3 -3
- package/dist/duckdb-browser-next.worker.js +8 -8
- package/dist/duckdb-browser-next.worker.js.map +3 -3
- package/dist/duckdb-browser.cjs +191 -183
- package/dist/duckdb-browser.cjs.map +1 -1
- package/dist/duckdb-browser.mjs +6 -6
- package/dist/duckdb-browser.mjs.map +1 -1
- package/dist/duckdb-browser.worker.js +8 -8
- package/dist/duckdb-browser.worker.js.map +3 -3
- package/dist/duckdb-next-coi.wasm +0 -0
- package/dist/duckdb-next.wasm +0 -0
- package/dist/duckdb-node-blocking.cjs +4 -4
- package/dist/duckdb-node-blocking.cjs.map +3 -3
- package/dist/duckdb-node-next.worker.cjs +4 -4
- package/dist/duckdb-node-next.worker.cjs.map +3 -3
- package/dist/duckdb-node.cjs +1 -1
- package/dist/duckdb-node.cjs.map +1 -1
- package/dist/duckdb-node.worker.cjs +3 -3
- package/dist/duckdb-node.worker.cjs.map +3 -3
- package/dist/duckdb.wasm +0 -0
- package/dist/tests-browser.js +467 -268
- package/dist/tests-browser.js.map +3 -3
- package/dist/tests-node.cjs +772 -551
- package/dist/tests-node.cjs.map +3 -3
- package/dist/types/src/bindings/config.d.ts +10 -0
- package/package.json +18 -16
|
@@ -23,28 +23,32 @@ var __spreadValues = (a, b) => {
|
|
|
23
23
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
24
24
|
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
25
25
|
var __commonJS = (cb, mod) => function __require() {
|
|
26
|
-
return mod || (0, cb[
|
|
26
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
27
27
|
};
|
|
28
28
|
var __export = (target, all) => {
|
|
29
|
-
__markAsModule(target);
|
|
30
29
|
for (var name2 in all)
|
|
31
30
|
__defProp(target, name2, { get: all[name2], enumerable: true });
|
|
32
31
|
};
|
|
33
|
-
var __reExport = (target,
|
|
34
|
-
if (
|
|
35
|
-
for (let key of __getOwnPropNames(
|
|
36
|
-
if (!__hasOwnProp.call(target, key) && key !== "default")
|
|
37
|
-
__defProp(target, key, { get: () =>
|
|
32
|
+
var __reExport = (target, module3, copyDefault, desc) => {
|
|
33
|
+
if (module3 && typeof module3 === "object" || typeof module3 === "function") {
|
|
34
|
+
for (let key of __getOwnPropNames(module3))
|
|
35
|
+
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
36
|
+
__defProp(target, key, { get: () => module3[key], enumerable: !(desc = __getOwnPropDesc(module3, key)) || desc.enumerable });
|
|
38
37
|
}
|
|
39
38
|
return target;
|
|
40
39
|
};
|
|
41
|
-
var
|
|
42
|
-
return __reExport(__markAsModule(__defProp(
|
|
40
|
+
var __toESM = (module3, isNodeMode) => {
|
|
41
|
+
return __reExport(__markAsModule(__defProp(module3 != null ? __create(__getProtoOf(module3)) : {}, "default", !isNodeMode && module3 && module3.__esModule ? { get: () => module3.default, enumerable: true } : { value: module3, enumerable: true })), module3);
|
|
43
42
|
};
|
|
43
|
+
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
44
|
+
return (module3, temp) => {
|
|
45
|
+
return cache && cache.get(module3) || (temp = __reExport(__markAsModule({}), module3, 1), cache && cache.set(module3, temp), temp);
|
|
46
|
+
};
|
|
47
|
+
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
44
48
|
|
|
45
49
|
// ../../node_modules/tslib/tslib.js
|
|
46
50
|
var require_tslib = __commonJS({
|
|
47
|
-
"../../node_modules/tslib/tslib.js"(exports2,
|
|
51
|
+
"../../node_modules/tslib/tslib.js"(exports2, module3) {
|
|
48
52
|
var __extends;
|
|
49
53
|
var __assign;
|
|
50
54
|
var __rest;
|
|
@@ -75,8 +79,8 @@ var require_tslib = __commonJS({
|
|
|
75
79
|
define("tslib", ["exports"], function(exports3) {
|
|
76
80
|
factory(createExporter(root, createExporter(exports3)));
|
|
77
81
|
});
|
|
78
|
-
} else if (typeof
|
|
79
|
-
factory(createExporter(root, createExporter(
|
|
82
|
+
} else if (typeof module3 === "object" && typeof module3.exports === "object") {
|
|
83
|
+
factory(createExporter(root, createExporter(module3.exports)));
|
|
80
84
|
} else {
|
|
81
85
|
factory(createExporter(root));
|
|
82
86
|
}
|
|
@@ -4016,7 +4020,7 @@ var require_type = __commonJS({
|
|
|
4016
4020
|
this.typeIds = typeIds = Int32Array.from(typeIds);
|
|
4017
4021
|
this.typeIdToChildIndex = typeIds.reduce((typeIdToChildIndex, typeId, idx) => {
|
|
4018
4022
|
return (typeIdToChildIndex[typeId] = idx) && typeIdToChildIndex || typeIdToChildIndex;
|
|
4019
|
-
}, Object.create(null));
|
|
4023
|
+
}, /* @__PURE__ */ Object.create(null));
|
|
4020
4024
|
}
|
|
4021
4025
|
get typeId() {
|
|
4022
4026
|
return enum_1.Type.Union;
|
|
@@ -4962,7 +4966,7 @@ var require_dictionary = __commonJS({
|
|
|
4962
4966
|
super({ type: new type_1.Dictionary(type.dictionary, type.indices, type.id, type.isOrdered) });
|
|
4963
4967
|
this._nulls = null;
|
|
4964
4968
|
this._dictionaryOffset = 0;
|
|
4965
|
-
this._keysToIndices = Object.create(null);
|
|
4969
|
+
this._keysToIndices = /* @__PURE__ */ Object.create(null);
|
|
4966
4970
|
this.indices = builder_1.Builder.new({ "type": this.type.indices, "nullValues": nulls });
|
|
4967
4971
|
this.dictionary = builder_1.Builder.new({ "type": this.type.dictionary, "nullValues": null });
|
|
4968
4972
|
if (typeof hashFn === "function") {
|
|
@@ -5020,7 +5024,7 @@ var require_dictionary = __commonJS({
|
|
|
5020
5024
|
this.indices.finish();
|
|
5021
5025
|
this.dictionary.finish();
|
|
5022
5026
|
this._dictionaryOffset = 0;
|
|
5023
|
-
this._keysToIndices = Object.create(null);
|
|
5027
|
+
this._keysToIndices = /* @__PURE__ */ Object.create(null);
|
|
5024
5028
|
return super.finish();
|
|
5025
5029
|
}
|
|
5026
5030
|
clear() {
|
|
@@ -5535,7 +5539,7 @@ var require_schema = __commonJS({
|
|
|
5535
5539
|
return `Schema<{ ${this.fields.map((f, i) => `${i}: ${f}`).join(", ")} }>`;
|
|
5536
5540
|
}
|
|
5537
5541
|
select(...columnNames) {
|
|
5538
|
-
const names = columnNames.reduce((xs, x) => (xs[x] = true) && xs, Object.create(null));
|
|
5542
|
+
const names = columnNames.reduce((xs, x) => (xs[x] = true) && xs, /* @__PURE__ */ Object.create(null));
|
|
5539
5543
|
return new Schema2(this.fields.filter((f) => names[f.name]), this.metadata);
|
|
5540
5544
|
}
|
|
5541
5545
|
selectAt(...columnIndices) {
|
|
@@ -14636,7 +14640,8 @@ var require_fs = __commonJS({
|
|
|
14636
14640
|
});
|
|
14637
14641
|
|
|
14638
14642
|
// src/targets/duckdb-browser-blocking.ts
|
|
14639
|
-
|
|
14643
|
+
var duckdb_browser_blocking_exports = {};
|
|
14644
|
+
__export(duckdb_browser_blocking_exports, {
|
|
14640
14645
|
BROWSER_RUNTIME: () => BROWSER_RUNTIME,
|
|
14641
14646
|
ConsoleLogger: () => ConsoleLogger,
|
|
14642
14647
|
DEFAULT_RUNTIME: () => DEFAULT_RUNTIME,
|
|
@@ -14672,15 +14677,15 @@ __export(exports, {
|
|
|
14672
14677
|
});
|
|
14673
14678
|
|
|
14674
14679
|
// ../../node_modules/apache-arrow/Arrow.dom.mjs
|
|
14675
|
-
var import_adapters =
|
|
14676
|
-
var import_builder =
|
|
14677
|
-
var import_reader =
|
|
14678
|
-
var import_writer =
|
|
14679
|
-
var import_iterable =
|
|
14680
|
-
var import_builder2 =
|
|
14681
|
-
var import_reader2 =
|
|
14682
|
-
var import_writer2 =
|
|
14683
|
-
var import_Arrow =
|
|
14680
|
+
var import_adapters = __toESM(require_adapters(), 1);
|
|
14681
|
+
var import_builder = __toESM(require_builder2(), 1);
|
|
14682
|
+
var import_reader = __toESM(require_reader(), 1);
|
|
14683
|
+
var import_writer = __toESM(require_writer(), 1);
|
|
14684
|
+
var import_iterable = __toESM(require_iterable(), 1);
|
|
14685
|
+
var import_builder2 = __toESM(require_builder3(), 1);
|
|
14686
|
+
var import_reader2 = __toESM(require_reader2(), 1);
|
|
14687
|
+
var import_writer2 = __toESM(require_writer2(), 1);
|
|
14688
|
+
var import_Arrow = __toESM(require_Arrow(), 1);
|
|
14684
14689
|
import_adapters.default.toDOMStream = import_iterable.toDOMStream;
|
|
14685
14690
|
import_builder.Builder["throughDOM"] = import_builder2.builderThroughDOMStream;
|
|
14686
14691
|
import_reader.RecordBatchReader["throughDOM"] = import_reader2.recordBatchReaderThroughDOMStream;
|
|
@@ -15063,21 +15068,21 @@ var DuckDBBindingsBase = class {
|
|
|
15063
15068
|
}
|
|
15064
15069
|
open(config) {
|
|
15065
15070
|
const [s, d, n] = callSRet(this.mod, "duckdb_web_open", ["string"], [JSON.stringify(config)]);
|
|
15066
|
-
if (s !==
|
|
15071
|
+
if (s !== 0 /* SUCCESS */) {
|
|
15067
15072
|
throw new Error(readString(this.mod, d, n));
|
|
15068
15073
|
}
|
|
15069
15074
|
dropResponseBuffers(this.mod);
|
|
15070
15075
|
}
|
|
15071
15076
|
reset() {
|
|
15072
15077
|
const [s, d, n] = callSRet(this.mod, "duckdb_web_reset", [], []);
|
|
15073
|
-
if (s !==
|
|
15078
|
+
if (s !== 0 /* SUCCESS */) {
|
|
15074
15079
|
throw new Error(readString(this.mod, d, n));
|
|
15075
15080
|
}
|
|
15076
15081
|
dropResponseBuffers(this.mod);
|
|
15077
15082
|
}
|
|
15078
15083
|
getVersion() {
|
|
15079
15084
|
const [s, d, n] = callSRet(this.mod, "duckdb_web_get_version", [], []);
|
|
15080
|
-
if (s !==
|
|
15085
|
+
if (s !== 0 /* SUCCESS */) {
|
|
15081
15086
|
throw new Error(readString(this.mod, d, n));
|
|
15082
15087
|
}
|
|
15083
15088
|
const version2 = readString(this.mod, d, n);
|
|
@@ -15089,7 +15094,7 @@ var DuckDBBindingsBase = class {
|
|
|
15089
15094
|
}
|
|
15090
15095
|
tokenize(text) {
|
|
15091
15096
|
const [s, d, n] = callSRet(this.mod, "duckdb_web_tokenize", ["string"], [text]);
|
|
15092
|
-
if (s !==
|
|
15097
|
+
if (s !== 0 /* SUCCESS */) {
|
|
15093
15098
|
throw new Error(readString(this.mod, d, n));
|
|
15094
15099
|
}
|
|
15095
15100
|
const res = readString(this.mod, d, n);
|
|
@@ -15105,7 +15110,7 @@ var DuckDBBindingsBase = class {
|
|
|
15105
15110
|
}
|
|
15106
15111
|
runQuery(conn, text) {
|
|
15107
15112
|
const [s, d, n] = callSRet(this.mod, "duckdb_web_query_run", ["number", "string"], [conn, text]);
|
|
15108
|
-
if (s !==
|
|
15113
|
+
if (s !== 0 /* SUCCESS */) {
|
|
15109
15114
|
throw new Error(readString(this.mod, d, n));
|
|
15110
15115
|
}
|
|
15111
15116
|
const res = copyBuffer(this.mod, d, n);
|
|
@@ -15114,7 +15119,7 @@ var DuckDBBindingsBase = class {
|
|
|
15114
15119
|
}
|
|
15115
15120
|
sendQuery(conn, text) {
|
|
15116
15121
|
const [s, d, n] = callSRet(this.mod, "duckdb_web_query_send", ["number", "string"], [conn, text]);
|
|
15117
|
-
if (s !==
|
|
15122
|
+
if (s !== 0 /* SUCCESS */) {
|
|
15118
15123
|
throw new Error(readString(this.mod, d, n));
|
|
15119
15124
|
}
|
|
15120
15125
|
const res = copyBuffer(this.mod, d, n);
|
|
@@ -15123,7 +15128,7 @@ var DuckDBBindingsBase = class {
|
|
|
15123
15128
|
}
|
|
15124
15129
|
fetchQueryResults(conn) {
|
|
15125
15130
|
const [s, d, n] = callSRet(this.mod, "duckdb_web_query_fetch_results", ["number"], [conn]);
|
|
15126
|
-
if (s !==
|
|
15131
|
+
if (s !== 0 /* SUCCESS */) {
|
|
15127
15132
|
throw new Error(readString(this.mod, d, n));
|
|
15128
15133
|
}
|
|
15129
15134
|
const res = copyBuffer(this.mod, d, n);
|
|
@@ -15132,7 +15137,7 @@ var DuckDBBindingsBase = class {
|
|
|
15132
15137
|
}
|
|
15133
15138
|
getTableNames(conn, text) {
|
|
15134
15139
|
const [s, d, n] = callSRet(this.mod, "duckdb_web_get_tablenames", ["number", "string"], [conn, text]);
|
|
15135
|
-
if (s !==
|
|
15140
|
+
if (s !== 0 /* SUCCESS */) {
|
|
15136
15141
|
throw new Error(readString(this.mod, d, n));
|
|
15137
15142
|
}
|
|
15138
15143
|
const res = readString(this.mod, d, n);
|
|
@@ -15141,7 +15146,7 @@ var DuckDBBindingsBase = class {
|
|
|
15141
15146
|
}
|
|
15142
15147
|
createPrepared(conn, text) {
|
|
15143
15148
|
const [s, d, n] = callSRet(this.mod, "duckdb_web_prepared_create", ["number", "string"], [conn, text]);
|
|
15144
|
-
if (s !==
|
|
15149
|
+
if (s !== 0 /* SUCCESS */) {
|
|
15145
15150
|
throw new Error(readString(this.mod, d, n));
|
|
15146
15151
|
}
|
|
15147
15152
|
dropResponseBuffers(this.mod);
|
|
@@ -15149,14 +15154,14 @@ var DuckDBBindingsBase = class {
|
|
|
15149
15154
|
}
|
|
15150
15155
|
closePrepared(conn, statement) {
|
|
15151
15156
|
const [s, d, n] = callSRet(this.mod, "duckdb_web_prepared_close", ["number", "number"], [conn, statement]);
|
|
15152
|
-
if (s !==
|
|
15157
|
+
if (s !== 0 /* SUCCESS */) {
|
|
15153
15158
|
throw new Error(readString(this.mod, d, n));
|
|
15154
15159
|
}
|
|
15155
15160
|
dropResponseBuffers(this.mod);
|
|
15156
15161
|
}
|
|
15157
15162
|
runPrepared(conn, statement, params) {
|
|
15158
15163
|
const [s, d, n] = callSRet(this.mod, "duckdb_web_prepared_run", ["number", "number", "string"], [conn, statement, JSON.stringify(params)]);
|
|
15159
|
-
if (s !==
|
|
15164
|
+
if (s !== 0 /* SUCCESS */) {
|
|
15160
15165
|
throw new Error(readString(this.mod, d, n));
|
|
15161
15166
|
}
|
|
15162
15167
|
const res = copyBuffer(this.mod, d, n);
|
|
@@ -15165,7 +15170,7 @@ var DuckDBBindingsBase = class {
|
|
|
15165
15170
|
}
|
|
15166
15171
|
sendPrepared(conn, statement, params) {
|
|
15167
15172
|
const [s, d, n] = callSRet(this.mod, "duckdb_web_prepared_send", ["number", "number", "string"], [conn, statement, JSON.stringify(params)]);
|
|
15168
|
-
if (s !==
|
|
15173
|
+
if (s !== 0 /* SUCCESS */) {
|
|
15169
15174
|
throw new Error(readString(this.mod, d, n));
|
|
15170
15175
|
}
|
|
15171
15176
|
const res = copyBuffer(this.mod, d, n);
|
|
@@ -15180,7 +15185,7 @@ var DuckDBBindingsBase = class {
|
|
|
15180
15185
|
bufferOfs.set(buffer);
|
|
15181
15186
|
const optJSON = options ? JSON.stringify(options) : "";
|
|
15182
15187
|
const [s, d, n] = callSRet(this.mod, "duckdb_web_insert_arrow_from_ipc_stream", ["number", "number", "number", "string"], [conn, bufferPtr, buffer.length, optJSON]);
|
|
15183
|
-
if (s !==
|
|
15188
|
+
if (s !== 0 /* SUCCESS */) {
|
|
15184
15189
|
throw new Error(readString(this.mod, d, n));
|
|
15185
15190
|
}
|
|
15186
15191
|
}
|
|
@@ -15196,7 +15201,7 @@ var DuckDBBindingsBase = class {
|
|
|
15196
15201
|
delete opt.columnsFlat;
|
|
15197
15202
|
const optJSON = JSON.stringify(opt);
|
|
15198
15203
|
const [s, d, n] = callSRet(this.mod, "duckdb_web_insert_csv_from_path", ["number", "string", "string"], [conn, path, optJSON]);
|
|
15199
|
-
if (s !==
|
|
15204
|
+
if (s !== 0 /* SUCCESS */) {
|
|
15200
15205
|
throw new Error(readString(this.mod, d, n));
|
|
15201
15206
|
}
|
|
15202
15207
|
}
|
|
@@ -15212,13 +15217,13 @@ var DuckDBBindingsBase = class {
|
|
|
15212
15217
|
delete opt.columnsFlat;
|
|
15213
15218
|
const optJSON = JSON.stringify(opt);
|
|
15214
15219
|
const [s, d, n] = callSRet(this.mod, "duckdb_web_insert_json_from_path", ["number", "string", "string"], [conn, path, optJSON]);
|
|
15215
|
-
if (s !==
|
|
15220
|
+
if (s !== 0 /* SUCCESS */) {
|
|
15216
15221
|
throw new Error(readString(this.mod, d, n));
|
|
15217
15222
|
}
|
|
15218
15223
|
}
|
|
15219
15224
|
globFiles(path) {
|
|
15220
15225
|
const [s, d, n] = callSRet(this.mod, "duckdb_web_fs_glob_file_infos", ["string"], [path]);
|
|
15221
|
-
if (s !==
|
|
15226
|
+
if (s !== 0 /* SUCCESS */) {
|
|
15222
15227
|
throw new Error(readString(this.mod, d, n));
|
|
15223
15228
|
}
|
|
15224
15229
|
const infoStr = readString(this.mod, d, n);
|
|
@@ -15234,7 +15239,7 @@ var DuckDBBindingsBase = class {
|
|
|
15234
15239
|
url = name2;
|
|
15235
15240
|
}
|
|
15236
15241
|
const [s, d, n] = callSRet(this.mod, "duckdb_web_fs_register_file_url", ["string", "string"], [name2, url]);
|
|
15237
|
-
if (s !==
|
|
15242
|
+
if (s !== 0 /* SUCCESS */) {
|
|
15238
15243
|
throw new Error(readString(this.mod, d, n));
|
|
15239
15244
|
}
|
|
15240
15245
|
dropResponseBuffers(this.mod);
|
|
@@ -15248,14 +15253,14 @@ var DuckDBBindingsBase = class {
|
|
|
15248
15253
|
const dst = this.mod.HEAPU8.subarray(ptr, ptr + buffer.length);
|
|
15249
15254
|
dst.set(buffer);
|
|
15250
15255
|
const [s, d, n] = callSRet(this.mod, "duckdb_web_fs_register_file_buffer", ["string", "number", "number"], [name2, ptr, buffer.length]);
|
|
15251
|
-
if (s !==
|
|
15256
|
+
if (s !== 0 /* SUCCESS */) {
|
|
15252
15257
|
throw new Error(readString(this.mod, d, n));
|
|
15253
15258
|
}
|
|
15254
15259
|
dropResponseBuffers(this.mod);
|
|
15255
15260
|
}
|
|
15256
15261
|
registerFileHandle(name2, handle) {
|
|
15257
15262
|
const [s, d, n] = callSRet(this.mod, "duckdb_web_fs_register_file_url", ["string", "string"], [name2, name2]);
|
|
15258
|
-
if (s !==
|
|
15263
|
+
if (s !== 0 /* SUCCESS */) {
|
|
15259
15264
|
throw new Error(readString(this.mod, d, n));
|
|
15260
15265
|
}
|
|
15261
15266
|
dropResponseBuffers(this.mod);
|
|
@@ -15281,7 +15286,7 @@ var DuckDBBindingsBase = class {
|
|
|
15281
15286
|
}
|
|
15282
15287
|
dropFiles() {
|
|
15283
15288
|
const [s, d, n] = callSRet(this.mod, "duckdb_web_fs_drop_files", [], []);
|
|
15284
|
-
if (s !==
|
|
15289
|
+
if (s !== 0 /* SUCCESS */) {
|
|
15285
15290
|
throw new Error(readString(this.mod, d, n));
|
|
15286
15291
|
}
|
|
15287
15292
|
dropResponseBuffers(this.mod);
|
|
@@ -15291,14 +15296,14 @@ var DuckDBBindingsBase = class {
|
|
|
15291
15296
|
}
|
|
15292
15297
|
copyFileToPath(name2, path) {
|
|
15293
15298
|
const [s, d, n] = callSRet(this.mod, "duckdb_web_copy_file_to_path", ["string", "string"], [name2, path]);
|
|
15294
|
-
if (s !==
|
|
15299
|
+
if (s !== 0 /* SUCCESS */) {
|
|
15295
15300
|
throw new Error(readString(this.mod, d, n));
|
|
15296
15301
|
}
|
|
15297
15302
|
dropResponseBuffers(this.mod);
|
|
15298
15303
|
}
|
|
15299
15304
|
copyFileToBuffer(name2) {
|
|
15300
15305
|
const [s, d, n] = callSRet(this.mod, "duckdb_web_copy_file_to_buffer", ["string"], [name2]);
|
|
15301
|
-
if (s !==
|
|
15306
|
+
if (s !== 0 /* SUCCESS */) {
|
|
15302
15307
|
throw new Error(readString(this.mod, d, n));
|
|
15303
15308
|
}
|
|
15304
15309
|
const buffer = this.mod.HEAPU8.subarray(d, d + n);
|
|
@@ -15309,13 +15314,13 @@ var DuckDBBindingsBase = class {
|
|
|
15309
15314
|
}
|
|
15310
15315
|
collectFileStatistics(file, enable) {
|
|
15311
15316
|
const [s, d, n] = callSRet(this.mod, "duckdb_web_collect_file_stats", ["string", "boolean"], [file, enable]);
|
|
15312
|
-
if (s !==
|
|
15317
|
+
if (s !== 0 /* SUCCESS */) {
|
|
15313
15318
|
throw new Error(readString(this.mod, d, n));
|
|
15314
15319
|
}
|
|
15315
15320
|
}
|
|
15316
15321
|
exportFileStatistics(file) {
|
|
15317
15322
|
const [s, d, n] = callSRet(this.mod, "duckdb_web_export_file_stats", ["string"], [file]);
|
|
15318
|
-
if (s !==
|
|
15323
|
+
if (s !== 0 /* SUCCESS */) {
|
|
15319
15324
|
throw new Error(readString(this.mod, d, n));
|
|
15320
15325
|
}
|
|
15321
15326
|
return new FileStatistics(this.mod.HEAPU8.subarray(d, d + n));
|
|
@@ -15458,7 +15463,7 @@ var threads = () => (async (e) => {
|
|
|
15458
15463
|
|
|
15459
15464
|
// package.json
|
|
15460
15465
|
var name = "@duckdb/duckdb-wasm";
|
|
15461
|
-
var version = "1.12.0";
|
|
15466
|
+
var version = "1.12.1-dev87.0";
|
|
15462
15467
|
var description = "DuckDB powered by WebAssembly";
|
|
15463
15468
|
var license = "MPL-2.0";
|
|
15464
15469
|
var repository = {
|
|
@@ -15483,36 +15488,36 @@ var keywords = [
|
|
|
15483
15488
|
var dependencies = {
|
|
15484
15489
|
"apache-arrow": "^6.0.1",
|
|
15485
15490
|
"wasm-feature-detect": "^1.2.11",
|
|
15486
|
-
"fast-glob": "^3.2.
|
|
15491
|
+
"fast-glob": "^3.2.10",
|
|
15487
15492
|
"web-worker": "^1.2.0",
|
|
15488
15493
|
"@types/emscripten": "^1.39.6"
|
|
15489
15494
|
};
|
|
15490
15495
|
var devDependencies = {
|
|
15491
|
-
"@types/jasmine": "^3.10.
|
|
15492
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
15493
|
-
"@typescript-eslint/parser": "^5.
|
|
15494
|
-
esbuild: "^0.14.
|
|
15495
|
-
eslint: "^8.
|
|
15496
|
+
"@types/jasmine": "^3.10.3",
|
|
15497
|
+
"@typescript-eslint/eslint-plugin": "^5.9.1",
|
|
15498
|
+
"@typescript-eslint/parser": "^5.9.1",
|
|
15499
|
+
esbuild: "^0.14.11",
|
|
15500
|
+
eslint: "^8.6.0",
|
|
15496
15501
|
"eslint-plugin-jasmine": "^4.1.3",
|
|
15497
|
-
"eslint-plugin-react": "^7.
|
|
15498
|
-
jasmine: "^
|
|
15499
|
-
"jasmine-core": "^
|
|
15502
|
+
"eslint-plugin-react": "^7.28.0",
|
|
15503
|
+
jasmine: "^4.0.2",
|
|
15504
|
+
"jasmine-core": "^4.0.0",
|
|
15500
15505
|
"jasmine-spec-reporter": "^7.0.0",
|
|
15501
|
-
karma: "^6.3.
|
|
15506
|
+
karma: "^6.3.10",
|
|
15502
15507
|
"karma-chrome-launcher": "^3.1.0",
|
|
15503
15508
|
"karma-coverage": "^2.1.0",
|
|
15504
15509
|
"karma-firefox-launcher": "^2.1.2",
|
|
15505
15510
|
"karma-jasmine": "^4.0.1",
|
|
15506
15511
|
"karma-jasmine-html-reporter": "^1.7.0",
|
|
15507
15512
|
"karma-sourcemap-loader": "^0.3.8",
|
|
15508
|
-
"karma-spec-reporter": "^0.0.
|
|
15513
|
+
"karma-spec-reporter": "^0.0.33",
|
|
15509
15514
|
"make-dir": "^3.1.0",
|
|
15510
15515
|
nyc: "^15.1.0",
|
|
15511
15516
|
prettier: "^2.5.1",
|
|
15512
|
-
puppeteer: "^
|
|
15517
|
+
puppeteer: "^13.0.1",
|
|
15513
15518
|
rimraf: "^3.0.2",
|
|
15514
15519
|
typedoc: "^0.22.10",
|
|
15515
|
-
typescript: "^4.5.
|
|
15520
|
+
typescript: "^4.5.4"
|
|
15516
15521
|
};
|
|
15517
15522
|
var optionalDependencies = {
|
|
15518
15523
|
fsevents: "*"
|
|
@@ -15539,8 +15544,8 @@ var files = [
|
|
|
15539
15544
|
"dist",
|
|
15540
15545
|
"!dist/types/test"
|
|
15541
15546
|
];
|
|
15542
|
-
var
|
|
15543
|
-
var
|
|
15547
|
+
var main = "dist/duckdb-browser.cjs";
|
|
15548
|
+
var module2 = "dist/duckdb-browser.mjs";
|
|
15544
15549
|
var types = "dist/duckdb-browser.d.ts";
|
|
15545
15550
|
var jsdelivr = "dist/duckdb-browser.cjs";
|
|
15546
15551
|
var unpkg = "dist/duckdb-browser.mjs";
|
|
@@ -15567,7 +15572,9 @@ var exports = {
|
|
|
15567
15572
|
"./dist/duckdb-browser-next.worker.js": "./dist/duckdb-browser-next.worker.js",
|
|
15568
15573
|
"./dist/duckdb-browser.worker.js": "./dist/duckdb-browser.worker.js",
|
|
15569
15574
|
"./dist/duckdb-node": "./dist/duckdb-node.cjs",
|
|
15575
|
+
"./dist/duckdb-node.cjs": "./dist/duckdb-node.cjs",
|
|
15570
15576
|
"./dist/duckdb-node-blocking": "./dist/duckdb-node-blocking.cjs",
|
|
15577
|
+
"./dist/duckdb-node-blocking.cjs": "./dist/duckdb-node-blocking.cjs",
|
|
15571
15578
|
"./dist/duckdb-node-next.worker.cjs": "./dist/duckdb-node-next.worker.cjs",
|
|
15572
15579
|
"./dist/duckdb-node.worker.cjs": "./dist/duckdb-node.worker.cjs",
|
|
15573
15580
|
"./blocking": {
|
|
@@ -15613,8 +15620,8 @@ var package_default = {
|
|
|
15613
15620
|
optionalDependencies,
|
|
15614
15621
|
scripts,
|
|
15615
15622
|
files,
|
|
15616
|
-
|
|
15617
|
-
|
|
15623
|
+
main,
|
|
15624
|
+
module: module2,
|
|
15618
15625
|
types,
|
|
15619
15626
|
jsdelivr,
|
|
15620
15627
|
unpkg,
|
|
@@ -15712,7 +15719,7 @@ var BROWSER_RUNTIME = {
|
|
|
15712
15719
|
if (cached)
|
|
15713
15720
|
return cached;
|
|
15714
15721
|
const [s, d, n] = callSRet(mod, "duckdb_web_fs_get_file_info_by_id", ["number"], [fileId]);
|
|
15715
|
-
if (s !==
|
|
15722
|
+
if (s !== 0 /* SUCCESS */) {
|
|
15716
15723
|
return null;
|
|
15717
15724
|
}
|
|
15718
15725
|
const infoStr = readString(mod, d, n);
|
|
@@ -15743,7 +15750,7 @@ var BROWSER_RUNTIME = {
|
|
|
15743
15750
|
BROWSER_RUNTIME.fileInfoCache.delete(fileId);
|
|
15744
15751
|
const file = BROWSER_RUNTIME.getFileInfo(mod, fileId);
|
|
15745
15752
|
switch (file == null ? void 0 : file.dataProtocol) {
|
|
15746
|
-
case
|
|
15753
|
+
case 3 /* HTTP */: {
|
|
15747
15754
|
let error = null;
|
|
15748
15755
|
try {
|
|
15749
15756
|
const xhr = new XMLHttpRequest();
|
|
@@ -15782,7 +15789,7 @@ var BROWSER_RUNTIME = {
|
|
|
15782
15789
|
}
|
|
15783
15790
|
return 0;
|
|
15784
15791
|
}
|
|
15785
|
-
case
|
|
15792
|
+
case 1 /* NATIVE */: {
|
|
15786
15793
|
const handle = (_a = BROWSER_RUNTIME._files) == null ? void 0 : _a.get(file.fileName);
|
|
15787
15794
|
if (handle) {
|
|
15788
15795
|
const result2 = mod._malloc(2 * 8);
|
|
@@ -15855,19 +15862,19 @@ var BROWSER_RUNTIME = {
|
|
|
15855
15862
|
const file = BROWSER_RUNTIME.getFileInfo(mod, fileId);
|
|
15856
15863
|
BROWSER_RUNTIME.fileInfoCache.delete(fileId);
|
|
15857
15864
|
switch (file == null ? void 0 : file.dataProtocol) {
|
|
15858
|
-
case
|
|
15865
|
+
case 3 /* HTTP */:
|
|
15859
15866
|
break;
|
|
15860
|
-
case
|
|
15867
|
+
case 1 /* NATIVE */:
|
|
15861
15868
|
return;
|
|
15862
15869
|
}
|
|
15863
15870
|
},
|
|
15864
15871
|
truncateFile: (mod, fileId, newSize) => {
|
|
15865
15872
|
const file = BROWSER_RUNTIME.getFileInfo(mod, fileId);
|
|
15866
15873
|
switch (file == null ? void 0 : file.dataProtocol) {
|
|
15867
|
-
case
|
|
15874
|
+
case 3 /* HTTP */:
|
|
15868
15875
|
failWith(mod, `Cannot truncate a http file`);
|
|
15869
15876
|
return;
|
|
15870
|
-
case
|
|
15877
|
+
case 1 /* NATIVE */:
|
|
15871
15878
|
failWith(mod, `truncateFile not implemented`);
|
|
15872
15879
|
return;
|
|
15873
15880
|
}
|
|
@@ -15878,7 +15885,7 @@ var BROWSER_RUNTIME = {
|
|
|
15878
15885
|
try {
|
|
15879
15886
|
const file = BROWSER_RUNTIME.getFileInfo(mod, fileId);
|
|
15880
15887
|
switch (file == null ? void 0 : file.dataProtocol) {
|
|
15881
|
-
case
|
|
15888
|
+
case 3 /* HTTP */: {
|
|
15882
15889
|
if (!file.dataUrl) {
|
|
15883
15890
|
throw new Error(`Missing data URL for file ${fileId}`);
|
|
15884
15891
|
}
|
|
@@ -15901,7 +15908,7 @@ var BROWSER_RUNTIME = {
|
|
|
15901
15908
|
throw new Error(`Range request for ${file.dataUrl} failed with error: ${e}"`);
|
|
15902
15909
|
}
|
|
15903
15910
|
}
|
|
15904
|
-
case
|
|
15911
|
+
case 1 /* NATIVE */: {
|
|
15905
15912
|
const handle = (_a = BROWSER_RUNTIME._files) == null ? void 0 : _a.get(file.fileName);
|
|
15906
15913
|
if (!handle) {
|
|
15907
15914
|
throw new Error(`No handle available for file: ${file.fileName}`);
|
|
@@ -15921,10 +15928,10 @@ var BROWSER_RUNTIME = {
|
|
|
15921
15928
|
writeFile: (mod, fileId, buf, bytes, location) => {
|
|
15922
15929
|
const file = BROWSER_RUNTIME.getFileInfo(mod, fileId);
|
|
15923
15930
|
switch (file == null ? void 0 : file.dataProtocol) {
|
|
15924
|
-
case
|
|
15931
|
+
case 3 /* HTTP */:
|
|
15925
15932
|
failWith(mod, "Cannot write to HTTP file");
|
|
15926
15933
|
return 0;
|
|
15927
|
-
case
|
|
15934
|
+
case 1 /* NATIVE */:
|
|
15928
15935
|
failWith(mod, "writefile not implemented");
|
|
15929
15936
|
return 0;
|
|
15930
15937
|
}
|
|
@@ -15934,14 +15941,14 @@ var BROWSER_RUNTIME = {
|
|
|
15934
15941
|
var _a;
|
|
15935
15942
|
const file = BROWSER_RUNTIME.getFileInfo(mod, fileId);
|
|
15936
15943
|
switch (file == null ? void 0 : file.dataProtocol) {
|
|
15937
|
-
case
|
|
15944
|
+
case 1 /* NATIVE */: {
|
|
15938
15945
|
const handle = (_a = BROWSER_RUNTIME._files) == null ? void 0 : _a.get(file.fileName);
|
|
15939
15946
|
if (!handle) {
|
|
15940
15947
|
throw Error(`No handle available for file: ${file.fileName}`);
|
|
15941
15948
|
}
|
|
15942
15949
|
return 0;
|
|
15943
15950
|
}
|
|
15944
|
-
case
|
|
15951
|
+
case 3 /* HTTP */:
|
|
15945
15952
|
return new Date().getTime();
|
|
15946
15953
|
}
|
|
15947
15954
|
return 0;
|
|
@@ -16473,7 +16480,7 @@ var DuckDB = function() {
|
|
|
16473
16480
|
}
|
|
16474
16481
|
function createWasm() {
|
|
16475
16482
|
var info = { "a": asmLibraryArg };
|
|
16476
|
-
function receiveInstance(instance,
|
|
16483
|
+
function receiveInstance(instance, module3) {
|
|
16477
16484
|
var exports3 = instance.exports;
|
|
16478
16485
|
Module["asm"] = exports3;
|
|
16479
16486
|
wasmMemory = Module["asm"]["Oe"];
|
|
@@ -21745,7 +21752,7 @@ var DuckDB3 = function() {
|
|
|
21745
21752
|
}
|
|
21746
21753
|
function createWasm() {
|
|
21747
21754
|
var info = { "a": asmLibraryArg };
|
|
21748
|
-
function receiveInstance(instance,
|
|
21755
|
+
function receiveInstance(instance, module3) {
|
|
21749
21756
|
var exports3 = instance.exports;
|
|
21750
21757
|
Module["asm"] = exports3;
|
|
21751
21758
|
wasmMemory = Module["asm"]["fa"];
|
|
@@ -23046,6 +23053,7 @@ async function createDuckDB(bundles, logger, runtime) {
|
|
|
23046
23053
|
}
|
|
23047
23054
|
return new DuckDB2(logger, runtime, bundles.mvp.mainModule);
|
|
23048
23055
|
}
|
|
23056
|
+
module.exports = __toCommonJS(duckdb_browser_blocking_exports);
|
|
23049
23057
|
/*! *****************************************************************************
|
|
23050
23058
|
Copyright (c) Microsoft Corporation.
|
|
23051
23059
|
|