@flowblade/sqlduck 0.6.0 → 0.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/index.cjs +117 -26
- package/dist/index.d.cts +29 -1
- package/dist/index.d.mts +29 -1
- package/dist/index.mjs +117 -27
- package/package.json +32 -24
package/dist/index.cjs
CHANGED
|
@@ -21,35 +21,96 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
21
21
|
let _duckdb_node_api = require("@duckdb/node-api");
|
|
22
22
|
let zod = require("zod");
|
|
23
23
|
zod = __toESM(zod);
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
var DuckExec = class {
|
|
25
|
+
#conn;
|
|
26
|
+
constructor(duckConn) {
|
|
27
|
+
this.#conn = duckConn;
|
|
28
|
+
}
|
|
29
|
+
getRowObjectJS = async (sql) => {
|
|
30
|
+
return (await this.#conn.run(sql)).getRowObjectsJS();
|
|
31
|
+
};
|
|
32
|
+
getRowObjectJson = async (sql) => {
|
|
33
|
+
return (await this.#conn.run(sql)).getRowObjectsJson();
|
|
34
|
+
};
|
|
35
|
+
getOneRowObjectJS = async (sql) => {
|
|
36
|
+
const rows = await this.getRowObjectJS(sql);
|
|
37
|
+
if (rows.length === 0) return null;
|
|
38
|
+
this.#ensureOneRow(rows);
|
|
39
|
+
return rows[0];
|
|
40
|
+
};
|
|
41
|
+
getOneRowObjectJson = async (sql) => {
|
|
42
|
+
const rows = await this.getRowObjectJson(sql);
|
|
43
|
+
if (rows.length === 0) return null;
|
|
44
|
+
this.#ensureOneRow(rows);
|
|
45
|
+
return rows[0];
|
|
46
|
+
};
|
|
47
|
+
#ensureOneRow = (rows) => {
|
|
48
|
+
if (rows.length > 1) throw new Error("Expected one row, but got multiple rows");
|
|
49
|
+
};
|
|
27
50
|
};
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
51
|
+
const duckMemoryTags = [
|
|
52
|
+
"BASE_TABLE",
|
|
53
|
+
"HASH_TABLE",
|
|
54
|
+
"PARQUET_READER",
|
|
55
|
+
"CSV_READER",
|
|
56
|
+
"ORDER_BY",
|
|
57
|
+
"ART_INDEX",
|
|
58
|
+
"COLUMN_DATA",
|
|
59
|
+
"METADATA",
|
|
60
|
+
"OVERFLOW_STRINGS",
|
|
61
|
+
"IN_MEMORY_TABLE",
|
|
62
|
+
"ALLOCATOR",
|
|
63
|
+
"EXTENSION",
|
|
64
|
+
"TRANSACTION",
|
|
65
|
+
"EXTERNAL_FILE_CACHE"
|
|
66
|
+
];
|
|
67
|
+
const orderByParams = {
|
|
68
|
+
memory_usage_bytes_desc: "memory_usage_bytes DESC",
|
|
69
|
+
tag_desc: "tag DESC",
|
|
70
|
+
tag_asc: "tag ASC"
|
|
71
|
+
};
|
|
72
|
+
var DuckMemory = class {
|
|
73
|
+
#conn;
|
|
74
|
+
#exec;
|
|
75
|
+
constructor(duckdbConn) {
|
|
76
|
+
this.#conn = duckdbConn;
|
|
77
|
+
this.#exec = new DuckExec(duckdbConn);
|
|
41
78
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
79
|
+
getAll = async (params) => {
|
|
80
|
+
const { orderBy } = params ?? {};
|
|
81
|
+
const query = this.#applyOrderBy(`SELECT tag, memory_usage_bytes, temporary_storage_bytes
|
|
82
|
+
FROM duckdb_memory() as m`, orderBy);
|
|
83
|
+
return (await this.#conn.run(query)).getRowObjectsJS();
|
|
84
|
+
};
|
|
85
|
+
getByTag = async (tag) => {
|
|
86
|
+
if (!duckMemoryTags.includes(tag)) throw new Error(`Invalid DuckDB memory tag: ${tag}`);
|
|
87
|
+
const query = `SELECT tag, memory_usage_bytes, temporary_storage_bytes
|
|
88
|
+
FROM duckdb_memory() as m
|
|
89
|
+
WHERE tag = '${tag}'`;
|
|
90
|
+
return this.#exec.getOneRowObjectJS(query);
|
|
91
|
+
};
|
|
92
|
+
getSummary = async () => {
|
|
93
|
+
const rows = await this.getAll();
|
|
94
|
+
const summaryInBytes = {
|
|
95
|
+
total: 0n,
|
|
96
|
+
totalTemp: 0n
|
|
97
|
+
};
|
|
98
|
+
for (const row of rows) {
|
|
99
|
+
summaryInBytes.total += row.memory_usage_bytes;
|
|
100
|
+
summaryInBytes.totalTemp += row.temporary_storage_bytes;
|
|
49
101
|
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
102
|
+
return {
|
|
103
|
+
totalMB: Math.round(Number(summaryInBytes.total / 1048576n)),
|
|
104
|
+
totalTempMB: Math.round(Number(summaryInBytes.totalTemp / 1048576n))
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
#applyOrderBy = (query, orderBy) => {
|
|
108
|
+
if (orderBy === void 0) return query;
|
|
109
|
+
const orderByClause = orderByParams[orderBy];
|
|
110
|
+
if (orderByClause === void 0) throw new Error(`Invalid orderBy parameter: ${orderBy}`);
|
|
111
|
+
return `${query} ORDER BY ${orderByClause}`;
|
|
112
|
+
};
|
|
113
|
+
};
|
|
53
114
|
const isOnDataAppendedAsyncCb = (v) => {
|
|
54
115
|
return v.constructor.name === "AsyncFunction";
|
|
55
116
|
};
|
|
@@ -135,6 +196,35 @@ const createTableFromZod = async (params) => {
|
|
|
135
196
|
columnTypes
|
|
136
197
|
};
|
|
137
198
|
};
|
|
199
|
+
const toDuckValue = (value) => {
|
|
200
|
+
if (value instanceof Date) return new _duckdb_node_api.DuckDBTimestampValue(BigInt(value.getTime() * 1e3));
|
|
201
|
+
return value === void 0 ? null : value;
|
|
202
|
+
};
|
|
203
|
+
async function* rowsToColumnsChunks(rows, chunkSize) {
|
|
204
|
+
if (!Number.isSafeInteger(chunkSize) || chunkSize <= 0) throw new Error(`chunkSize must be a positive integer, got ${chunkSize}`);
|
|
205
|
+
const first = await rows.next();
|
|
206
|
+
if (first.done) return;
|
|
207
|
+
const keys = Object.keys(first.value);
|
|
208
|
+
let columns = keys.map(() => []);
|
|
209
|
+
let rowsInChunk = 0;
|
|
210
|
+
keys.forEach((k, i) => columns[i].push(toDuckValue(first.value[k])));
|
|
211
|
+
rowsInChunk++;
|
|
212
|
+
if (rowsInChunk >= chunkSize) {
|
|
213
|
+
yield columns;
|
|
214
|
+
columns = keys.map(() => []);
|
|
215
|
+
rowsInChunk = 0;
|
|
216
|
+
}
|
|
217
|
+
for await (const row of rows) {
|
|
218
|
+
keys.forEach((k, i) => columns[i].push(toDuckValue(row[k])));
|
|
219
|
+
rowsInChunk++;
|
|
220
|
+
if (rowsInChunk >= chunkSize) {
|
|
221
|
+
yield columns;
|
|
222
|
+
columns = keys.map(() => []);
|
|
223
|
+
rowsInChunk = 0;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
if (rowsInChunk > 0) yield columns;
|
|
227
|
+
}
|
|
138
228
|
var SqlDuck = class {
|
|
139
229
|
#duck;
|
|
140
230
|
#logger;
|
|
@@ -223,6 +313,7 @@ const zodCodecs = {
|
|
|
223
313
|
encode: BigInt
|
|
224
314
|
})
|
|
225
315
|
};
|
|
316
|
+
exports.DuckMemory = DuckMemory;
|
|
226
317
|
exports.SqlDuck = SqlDuck;
|
|
227
318
|
exports.Table = Table;
|
|
228
319
|
exports.getTableCreateFromZod = getTableCreateFromZod;
|
package/dist/index.d.cts
CHANGED
|
@@ -21,6 +21,34 @@ type OnDataAppendedSyncCb = (stats: OnDataAppendedStats) => void;
|
|
|
21
21
|
type OnDataAppendedAsyncCb = (stats: OnDataAppendedStats) => Promise<void>;
|
|
22
22
|
type OnDataAppendedCb = OnDataAppendedSyncCb | OnDataAppendedAsyncCb;
|
|
23
23
|
//#endregion
|
|
24
|
+
//#region src/helpers/duck-memory.d.ts
|
|
25
|
+
declare const duckMemoryTags: readonly ["BASE_TABLE", "HASH_TABLE", "PARQUET_READER", "CSV_READER", "ORDER_BY", "ART_INDEX", "COLUMN_DATA", "METADATA", "OVERFLOW_STRINGS", "IN_MEMORY_TABLE", "ALLOCATOR", "EXTENSION", "TRANSACTION", "EXTERNAL_FILE_CACHE"];
|
|
26
|
+
type DuckMemoryTag = (typeof duckMemoryTags)[number];
|
|
27
|
+
type DuckMemoryRow = {
|
|
28
|
+
tag: DuckMemoryTag;
|
|
29
|
+
memory_usage_bytes: bigint;
|
|
30
|
+
temporary_storage_bytes: bigint;
|
|
31
|
+
};
|
|
32
|
+
declare const orderByParams: {
|
|
33
|
+
memory_usage_bytes_desc: string;
|
|
34
|
+
tag_desc: string;
|
|
35
|
+
tag_asc: string;
|
|
36
|
+
};
|
|
37
|
+
type OrderByParams = keyof typeof orderByParams;
|
|
38
|
+
type DuckMemorySummary = {
|
|
39
|
+
totalMB: number;
|
|
40
|
+
totalTempMB: number;
|
|
41
|
+
};
|
|
42
|
+
declare class DuckMemory {
|
|
43
|
+
#private;
|
|
44
|
+
constructor(duckdbConn: DuckDBConnection);
|
|
45
|
+
getAll: (params?: {
|
|
46
|
+
orderBy?: OrderByParams;
|
|
47
|
+
}) => Promise<DuckMemoryRow[]>;
|
|
48
|
+
getByTag: (tag: DuckMemoryTag) => Promise<DuckMemoryRow | null>;
|
|
49
|
+
getSummary: () => Promise<DuckMemorySummary>;
|
|
50
|
+
}
|
|
51
|
+
//#endregion
|
|
24
52
|
//#region src/table/table.d.ts
|
|
25
53
|
/**
|
|
26
54
|
* Fully qualified table information
|
|
@@ -158,4 +186,4 @@ declare const zodCodecs: {
|
|
|
158
186
|
readonly bigintToString: z.ZodCodec<z.ZodBigInt, z.ZodString>;
|
|
159
187
|
};
|
|
160
188
|
//#endregion
|
|
161
|
-
export { type OnDataAppendedCb, type OnDataAppendedStats, SqlDuck, type SqlDuckParams, Table, type ToTableParams, getTableCreateFromZod, zodCodecs };
|
|
189
|
+
export { DuckMemory, DuckMemoryTag, type OnDataAppendedCb, type OnDataAppendedStats, SqlDuck, type SqlDuckParams, Table, type ToTableParams, getTableCreateFromZod, zodCodecs };
|
package/dist/index.d.mts
CHANGED
|
@@ -21,6 +21,34 @@ type OnDataAppendedSyncCb = (stats: OnDataAppendedStats) => void;
|
|
|
21
21
|
type OnDataAppendedAsyncCb = (stats: OnDataAppendedStats) => Promise<void>;
|
|
22
22
|
type OnDataAppendedCb = OnDataAppendedSyncCb | OnDataAppendedAsyncCb;
|
|
23
23
|
//#endregion
|
|
24
|
+
//#region src/helpers/duck-memory.d.ts
|
|
25
|
+
declare const duckMemoryTags: readonly ["BASE_TABLE", "HASH_TABLE", "PARQUET_READER", "CSV_READER", "ORDER_BY", "ART_INDEX", "COLUMN_DATA", "METADATA", "OVERFLOW_STRINGS", "IN_MEMORY_TABLE", "ALLOCATOR", "EXTENSION", "TRANSACTION", "EXTERNAL_FILE_CACHE"];
|
|
26
|
+
type DuckMemoryTag = (typeof duckMemoryTags)[number];
|
|
27
|
+
type DuckMemoryRow = {
|
|
28
|
+
tag: DuckMemoryTag;
|
|
29
|
+
memory_usage_bytes: bigint;
|
|
30
|
+
temporary_storage_bytes: bigint;
|
|
31
|
+
};
|
|
32
|
+
declare const orderByParams: {
|
|
33
|
+
memory_usage_bytes_desc: string;
|
|
34
|
+
tag_desc: string;
|
|
35
|
+
tag_asc: string;
|
|
36
|
+
};
|
|
37
|
+
type OrderByParams = keyof typeof orderByParams;
|
|
38
|
+
type DuckMemorySummary = {
|
|
39
|
+
totalMB: number;
|
|
40
|
+
totalTempMB: number;
|
|
41
|
+
};
|
|
42
|
+
declare class DuckMemory {
|
|
43
|
+
#private;
|
|
44
|
+
constructor(duckdbConn: DuckDBConnection);
|
|
45
|
+
getAll: (params?: {
|
|
46
|
+
orderBy?: OrderByParams;
|
|
47
|
+
}) => Promise<DuckMemoryRow[]>;
|
|
48
|
+
getByTag: (tag: DuckMemoryTag) => Promise<DuckMemoryRow | null>;
|
|
49
|
+
getSummary: () => Promise<DuckMemorySummary>;
|
|
50
|
+
}
|
|
51
|
+
//#endregion
|
|
24
52
|
//#region src/table/table.d.ts
|
|
25
53
|
/**
|
|
26
54
|
* Fully qualified table information
|
|
@@ -158,4 +186,4 @@ declare const zodCodecs: {
|
|
|
158
186
|
readonly bigintToString: z.ZodCodec<z.ZodBigInt, z.ZodString>;
|
|
159
187
|
};
|
|
160
188
|
//#endregion
|
|
161
|
-
export { type OnDataAppendedCb, type OnDataAppendedStats, SqlDuck, type SqlDuckParams, Table, type ToTableParams, getTableCreateFromZod, zodCodecs };
|
|
189
|
+
export { DuckMemory, type DuckMemoryTag, type OnDataAppendedCb, type OnDataAppendedStats, SqlDuck, type SqlDuckParams, Table, type ToTableParams, getTableCreateFromZod, zodCodecs };
|
package/dist/index.mjs
CHANGED
|
@@ -1,34 +1,95 @@
|
|
|
1
1
|
import { BIGINT, DuckDBDataChunk, DuckDBTimestampValue, INTEGER, TIMESTAMP, VARCHAR } from "@duckdb/node-api";
|
|
2
2
|
import * as z from "zod";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
var DuckExec = class {
|
|
4
|
+
#conn;
|
|
5
|
+
constructor(duckConn) {
|
|
6
|
+
this.#conn = duckConn;
|
|
7
|
+
}
|
|
8
|
+
getRowObjectJS = async (sql) => {
|
|
9
|
+
return (await this.#conn.run(sql)).getRowObjectsJS();
|
|
10
|
+
};
|
|
11
|
+
getRowObjectJson = async (sql) => {
|
|
12
|
+
return (await this.#conn.run(sql)).getRowObjectsJson();
|
|
13
|
+
};
|
|
14
|
+
getOneRowObjectJS = async (sql) => {
|
|
15
|
+
const rows = await this.getRowObjectJS(sql);
|
|
16
|
+
if (rows.length === 0) return null;
|
|
17
|
+
this.#ensureOneRow(rows);
|
|
18
|
+
return rows[0];
|
|
19
|
+
};
|
|
20
|
+
getOneRowObjectJson = async (sql) => {
|
|
21
|
+
const rows = await this.getRowObjectJson(sql);
|
|
22
|
+
if (rows.length === 0) return null;
|
|
23
|
+
this.#ensureOneRow(rows);
|
|
24
|
+
return rows[0];
|
|
25
|
+
};
|
|
26
|
+
#ensureOneRow = (rows) => {
|
|
27
|
+
if (rows.length > 1) throw new Error("Expected one row, but got multiple rows");
|
|
28
|
+
};
|
|
6
29
|
};
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
30
|
+
const duckMemoryTags = [
|
|
31
|
+
"BASE_TABLE",
|
|
32
|
+
"HASH_TABLE",
|
|
33
|
+
"PARQUET_READER",
|
|
34
|
+
"CSV_READER",
|
|
35
|
+
"ORDER_BY",
|
|
36
|
+
"ART_INDEX",
|
|
37
|
+
"COLUMN_DATA",
|
|
38
|
+
"METADATA",
|
|
39
|
+
"OVERFLOW_STRINGS",
|
|
40
|
+
"IN_MEMORY_TABLE",
|
|
41
|
+
"ALLOCATOR",
|
|
42
|
+
"EXTENSION",
|
|
43
|
+
"TRANSACTION",
|
|
44
|
+
"EXTERNAL_FILE_CACHE"
|
|
45
|
+
];
|
|
46
|
+
const orderByParams = {
|
|
47
|
+
memory_usage_bytes_desc: "memory_usage_bytes DESC",
|
|
48
|
+
tag_desc: "tag DESC",
|
|
49
|
+
tag_asc: "tag ASC"
|
|
50
|
+
};
|
|
51
|
+
var DuckMemory = class {
|
|
52
|
+
#conn;
|
|
53
|
+
#exec;
|
|
54
|
+
constructor(duckdbConn) {
|
|
55
|
+
this.#conn = duckdbConn;
|
|
56
|
+
this.#exec = new DuckExec(duckdbConn);
|
|
20
57
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
58
|
+
getAll = async (params) => {
|
|
59
|
+
const { orderBy } = params ?? {};
|
|
60
|
+
const query = this.#applyOrderBy(`SELECT tag, memory_usage_bytes, temporary_storage_bytes
|
|
61
|
+
FROM duckdb_memory() as m`, orderBy);
|
|
62
|
+
return (await this.#conn.run(query)).getRowObjectsJS();
|
|
63
|
+
};
|
|
64
|
+
getByTag = async (tag) => {
|
|
65
|
+
if (!duckMemoryTags.includes(tag)) throw new Error(`Invalid DuckDB memory tag: ${tag}`);
|
|
66
|
+
const query = `SELECT tag, memory_usage_bytes, temporary_storage_bytes
|
|
67
|
+
FROM duckdb_memory() as m
|
|
68
|
+
WHERE tag = '${tag}'`;
|
|
69
|
+
return this.#exec.getOneRowObjectJS(query);
|
|
70
|
+
};
|
|
71
|
+
getSummary = async () => {
|
|
72
|
+
const rows = await this.getAll();
|
|
73
|
+
const summaryInBytes = {
|
|
74
|
+
total: 0n,
|
|
75
|
+
totalTemp: 0n
|
|
76
|
+
};
|
|
77
|
+
for (const row of rows) {
|
|
78
|
+
summaryInBytes.total += row.memory_usage_bytes;
|
|
79
|
+
summaryInBytes.totalTemp += row.temporary_storage_bytes;
|
|
28
80
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
81
|
+
return {
|
|
82
|
+
totalMB: Math.round(Number(summaryInBytes.total / 1048576n)),
|
|
83
|
+
totalTempMB: Math.round(Number(summaryInBytes.totalTemp / 1048576n))
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
#applyOrderBy = (query, orderBy) => {
|
|
87
|
+
if (orderBy === void 0) return query;
|
|
88
|
+
const orderByClause = orderByParams[orderBy];
|
|
89
|
+
if (orderByClause === void 0) throw new Error(`Invalid orderBy parameter: ${orderBy}`);
|
|
90
|
+
return `${query} ORDER BY ${orderByClause}`;
|
|
91
|
+
};
|
|
92
|
+
};
|
|
32
93
|
const isOnDataAppendedAsyncCb = (v) => {
|
|
33
94
|
return v.constructor.name === "AsyncFunction";
|
|
34
95
|
};
|
|
@@ -114,6 +175,35 @@ const createTableFromZod = async (params) => {
|
|
|
114
175
|
columnTypes
|
|
115
176
|
};
|
|
116
177
|
};
|
|
178
|
+
const toDuckValue = (value) => {
|
|
179
|
+
if (value instanceof Date) return new DuckDBTimestampValue(BigInt(value.getTime() * 1e3));
|
|
180
|
+
return value === void 0 ? null : value;
|
|
181
|
+
};
|
|
182
|
+
async function* rowsToColumnsChunks(rows, chunkSize) {
|
|
183
|
+
if (!Number.isSafeInteger(chunkSize) || chunkSize <= 0) throw new Error(`chunkSize must be a positive integer, got ${chunkSize}`);
|
|
184
|
+
const first = await rows.next();
|
|
185
|
+
if (first.done) return;
|
|
186
|
+
const keys = Object.keys(first.value);
|
|
187
|
+
let columns = keys.map(() => []);
|
|
188
|
+
let rowsInChunk = 0;
|
|
189
|
+
keys.forEach((k, i) => columns[i].push(toDuckValue(first.value[k])));
|
|
190
|
+
rowsInChunk++;
|
|
191
|
+
if (rowsInChunk >= chunkSize) {
|
|
192
|
+
yield columns;
|
|
193
|
+
columns = keys.map(() => []);
|
|
194
|
+
rowsInChunk = 0;
|
|
195
|
+
}
|
|
196
|
+
for await (const row of rows) {
|
|
197
|
+
keys.forEach((k, i) => columns[i].push(toDuckValue(row[k])));
|
|
198
|
+
rowsInChunk++;
|
|
199
|
+
if (rowsInChunk >= chunkSize) {
|
|
200
|
+
yield columns;
|
|
201
|
+
columns = keys.map(() => []);
|
|
202
|
+
rowsInChunk = 0;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
if (rowsInChunk > 0) yield columns;
|
|
206
|
+
}
|
|
117
207
|
var SqlDuck = class {
|
|
118
208
|
#duck;
|
|
119
209
|
#logger;
|
|
@@ -202,4 +292,4 @@ const zodCodecs = {
|
|
|
202
292
|
encode: BigInt
|
|
203
293
|
})
|
|
204
294
|
};
|
|
205
|
-
export { SqlDuck, Table, getTableCreateFromZod, zodCodecs };
|
|
295
|
+
export { DuckMemory, SqlDuck, Table, getTableCreateFromZod, zodCodecs };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flowblade/sqlduck",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"exports": {
|
|
@@ -33,6 +33,12 @@
|
|
|
33
33
|
"build-release": "yarn build && rimraf ./_release && yarn pack && mkdir ./_release && tar zxvf ./package.tgz --directory ./_release && rm ./package.tgz",
|
|
34
34
|
"docgen": "run-s docgen-typedoc",
|
|
35
35
|
"docgen-typedoc": "rimraf ./docs/api && typedoc --plugin typedoc-plugin-markdown --out ./docs/api",
|
|
36
|
+
"bench": "vitest bench --run",
|
|
37
|
+
"bench-bun": "bun --bun run vitest bench --run",
|
|
38
|
+
"bench-mitata": "node --experimental-strip-types --expose-gc ./bench/stream.mitata.ts ",
|
|
39
|
+
"bench-mitata-bun": "bun --expose-gc ./bench/stream.mitata.ts ",
|
|
40
|
+
"bench-codspeed": "cross-env CODSPEED=1 vitest bench --run",
|
|
41
|
+
"bench-watch": "vitest bench",
|
|
36
42
|
"test": "vitest run",
|
|
37
43
|
"test-unit": "vitest run",
|
|
38
44
|
"test-unit-bun": "bun --bun run vitest run",
|
|
@@ -49,60 +55,62 @@
|
|
|
49
55
|
},
|
|
50
56
|
"dependencies": {
|
|
51
57
|
"@flowblade/core": "^0.2.25",
|
|
52
|
-
"@flowblade/source-duckdb": "^0.
|
|
53
|
-
"@flowblade/sql-tag": "^0.3.
|
|
58
|
+
"@flowblade/source-duckdb": "^0.18.0",
|
|
59
|
+
"@flowblade/sql-tag": "^0.3.1",
|
|
54
60
|
"@standard-schema/spec": "^1.1.0",
|
|
55
61
|
"p-mutex": "^1.0.0",
|
|
56
62
|
"valibot": "^1.2.0",
|
|
57
|
-
"zod": "^4.3.
|
|
63
|
+
"zod": "^4.3.6"
|
|
58
64
|
},
|
|
59
65
|
"peerDependencies": {
|
|
60
|
-
"@duckdb/node-api": "^1.4.
|
|
66
|
+
"@duckdb/node-api": "^1.4.4-r.1"
|
|
61
67
|
},
|
|
62
68
|
"devDependencies": {
|
|
63
|
-
"@belgattitude/eslint-config-bases": "8.
|
|
64
|
-
"@dotenvx/dotenvx": "1.
|
|
65
|
-
"@duckdb/node-api": "1.4.
|
|
69
|
+
"@belgattitude/eslint-config-bases": "8.9.0",
|
|
70
|
+
"@dotenvx/dotenvx": "1.52.0",
|
|
71
|
+
"@duckdb/node-api": "1.4.4-r.1",
|
|
66
72
|
"@faker-js/faker": "10.2.0",
|
|
67
|
-
"@flowblade/source-kysely": "^1.2.
|
|
73
|
+
"@flowblade/source-kysely": "^1.2.2",
|
|
68
74
|
"@httpx/assert": "0.16.7",
|
|
75
|
+
"@mitata/counters": "0.0.8",
|
|
69
76
|
"@size-limit/esbuild": "12.0.0",
|
|
70
77
|
"@size-limit/file": "12.0.0",
|
|
71
78
|
"@testcontainers/mssqlserver": "11.11.0",
|
|
72
79
|
"@total-typescript/ts-reset": "0.6.1",
|
|
73
80
|
"@traversable/zod": "0.0.57",
|
|
74
|
-
"@types/node": "25.0.
|
|
75
|
-
"@typescript-eslint/eslint-plugin": "8.
|
|
76
|
-
"@typescript-eslint/parser": "8.
|
|
77
|
-
"@vitest/coverage-v8": "4.0.
|
|
78
|
-
"@vitest/ui": "4.0.
|
|
81
|
+
"@types/node": "25.0.10",
|
|
82
|
+
"@typescript-eslint/eslint-plugin": "8.54.0",
|
|
83
|
+
"@typescript-eslint/parser": "8.54.0",
|
|
84
|
+
"@vitest/coverage-v8": "4.0.18",
|
|
85
|
+
"@vitest/ui": "4.0.18",
|
|
79
86
|
"ansis": "4.2.0",
|
|
80
87
|
"browserslist-to-esbuild": "2.1.1",
|
|
81
|
-
"core-js": "3.
|
|
88
|
+
"core-js": "3.48.0",
|
|
82
89
|
"cross-env": "10.1.0",
|
|
83
|
-
"es-check": "9.5.
|
|
90
|
+
"es-check": "9.5.4",
|
|
84
91
|
"esbuild": "0.27.2",
|
|
85
92
|
"eslint": "8.57.1",
|
|
86
93
|
"execa": "9.6.1",
|
|
87
94
|
"is-in-ci": "2.0.0",
|
|
88
|
-
"kysely": "0.28.
|
|
95
|
+
"kysely": "0.28.10",
|
|
96
|
+
"mitata": "1.0.34",
|
|
89
97
|
"npm-run-all2": "8.0.4",
|
|
90
|
-
"prettier": "3.
|
|
91
|
-
"publint": "0.3.
|
|
98
|
+
"prettier": "3.8.1",
|
|
99
|
+
"publint": "0.3.17",
|
|
92
100
|
"regexp.escape": "2.0.1",
|
|
93
101
|
"rimraf": "6.1.2",
|
|
94
102
|
"size-limit": "12.0.0",
|
|
95
|
-
"sql-formatter": "15.
|
|
103
|
+
"sql-formatter": "15.7.0",
|
|
96
104
|
"tarn": "3.0.2",
|
|
97
105
|
"tedious": "19.2.0",
|
|
98
106
|
"testcontainers": "11.11.0",
|
|
99
|
-
"tsdown": "0.
|
|
107
|
+
"tsdown": "0.20.1",
|
|
100
108
|
"tsx": "4.21.0",
|
|
101
|
-
"typedoc": "0.28.
|
|
109
|
+
"typedoc": "0.28.16",
|
|
102
110
|
"typedoc-plugin-markdown": "4.9.0",
|
|
103
111
|
"typescript": "5.9.3",
|
|
104
|
-
"vite-tsconfig-paths": "6.0.
|
|
105
|
-
"vitest": "4.0.
|
|
112
|
+
"vite-tsconfig-paths": "6.0.5",
|
|
113
|
+
"vitest": "4.0.18"
|
|
106
114
|
},
|
|
107
115
|
"files": [
|
|
108
116
|
"dist"
|