@yolean/evidence-universal-sql 0.0.0-stage → 3.0.2
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/CHANGELOG.md +451 -0
- package/LICENSE.md +9 -0
- package/package.json +44 -3
- package/src/build-parquet.d.ts +20 -0
- package/src/build-parquet.js +251 -0
- package/src/build-parquet.spec.js +174 -0
- package/src/cache-duckdb.d.ts +32 -0
- package/src/cache-duckdb.js +183 -0
- package/src/calculateScore.d.ts +25 -0
- package/src/calculateScore.js +147 -0
- package/src/client-duckdb/both.d.ts +6 -0
- package/src/client-duckdb/both.js +104 -0
- package/src/client-duckdb/browser.d.ts +41 -0
- package/src/client-duckdb/browser.js +167 -0
- package/src/client-duckdb/node.d.ts +43 -0
- package/src/client-duckdb/node.js +166 -0
- package/src/index.d.ts +3 -0
- package/src/index.js +3 -0
- package/README.md +0 -3
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,451 @@
|
|
|
1
|
+
# @evidence-dev/universal-sql
|
|
2
|
+
|
|
3
|
+
## 3.0.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- First release under the @yolean npm scope, from the frozen upstream legacy framework at 40.1.8
|
|
8
|
+
|
|
9
|
+
## 3.0.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 937971eaa: Package updates for CVEs. See https://github.com/evidence-dev/evidence/pull/3255
|
|
14
|
+
|
|
15
|
+
## 3.0.0
|
|
16
|
+
|
|
17
|
+
### Major Changes
|
|
18
|
+
|
|
19
|
+
- b28f63f23: Update DuckDB to latest packages:
|
|
20
|
+
- Switch to @duckdb/node-api from duckdb-async
|
|
21
|
+
- Update duckdb-wasm to latest release
|
|
22
|
+
|
|
23
|
+
This release also has small data fixes across several packages:
|
|
24
|
+
- Better handling of NULL values when discovering column types
|
|
25
|
+
- Fix batch processing of parquet files
|
|
26
|
+
- Fix error with temporary parquet files when reloading data in dev environment
|
|
27
|
+
|
|
28
|
+
## 2.2.11
|
|
29
|
+
|
|
30
|
+
### Patch Changes
|
|
31
|
+
|
|
32
|
+
- 6d2782e64: Fixed base path not being applied to data file (parquet) URLs. This resolves an issue where applications deployed with a base path would fail to load data files, resulting in 404 errors.
|
|
33
|
+
|
|
34
|
+
The fix restores the dependency injection pattern for the `addBasePath` function in `setParquetURLs`, ensuring that base paths are correctly applied to all data requests in both monorepo and published package environments.
|
|
35
|
+
|
|
36
|
+
## 2.2.10
|
|
37
|
+
|
|
38
|
+
### Patch Changes
|
|
39
|
+
|
|
40
|
+
- 64486c669: bump vitest
|
|
41
|
+
- fc185c44c: Fix type errors
|
|
42
|
+
|
|
43
|
+
## 2.2.9
|
|
44
|
+
|
|
45
|
+
### Patch Changes
|
|
46
|
+
|
|
47
|
+
- Updated dependencies [17eb07aff]
|
|
48
|
+
- Updated dependencies [bcb0bf5dd]
|
|
49
|
+
- @evidence-dev/sdk@3.0.8
|
|
50
|
+
|
|
51
|
+
## 2.2.8
|
|
52
|
+
|
|
53
|
+
### Patch Changes
|
|
54
|
+
|
|
55
|
+
- Updated dependencies [243229f46]
|
|
56
|
+
- @evidence-dev/sdk@3.0.7
|
|
57
|
+
|
|
58
|
+
## 2.2.7
|
|
59
|
+
|
|
60
|
+
### Patch Changes
|
|
61
|
+
|
|
62
|
+
- Updated dependencies [c7547d83f]
|
|
63
|
+
- @evidence-dev/sdk@3.0.6
|
|
64
|
+
|
|
65
|
+
## 2.2.6
|
|
66
|
+
|
|
67
|
+
### Patch Changes
|
|
68
|
+
|
|
69
|
+
- Updated dependencies [f81376743]
|
|
70
|
+
- @evidence-dev/sdk@3.0.5
|
|
71
|
+
|
|
72
|
+
## 2.2.5
|
|
73
|
+
|
|
74
|
+
### Patch Changes
|
|
75
|
+
|
|
76
|
+
- f416a339d: workaround bug in duckdb-wasm that errors when fully null date column is read as parquet
|
|
77
|
+
- Updated dependencies [309e27b51]
|
|
78
|
+
- Updated dependencies [730321d90]
|
|
79
|
+
- @evidence-dev/sdk@3.0.4
|
|
80
|
+
|
|
81
|
+
## 2.2.4
|
|
82
|
+
|
|
83
|
+
### Patch Changes
|
|
84
|
+
|
|
85
|
+
- Updated dependencies [706963a42]
|
|
86
|
+
- @evidence-dev/sdk@3.0.3
|
|
87
|
+
|
|
88
|
+
## 2.2.3
|
|
89
|
+
|
|
90
|
+
### Patch Changes
|
|
91
|
+
|
|
92
|
+
- Updated dependencies [2efb8df3e]
|
|
93
|
+
- @evidence-dev/sdk@3.0.2
|
|
94
|
+
|
|
95
|
+
## 2.2.2
|
|
96
|
+
|
|
97
|
+
### Patch Changes
|
|
98
|
+
|
|
99
|
+
- Updated dependencies [288f87ec6]
|
|
100
|
+
- @evidence-dev/sdk@3.0.1
|
|
101
|
+
|
|
102
|
+
## 2.2.1
|
|
103
|
+
|
|
104
|
+
### Patch Changes
|
|
105
|
+
|
|
106
|
+
- Updated dependencies [e2c95d172]
|
|
107
|
+
- @evidence-dev/sdk@3.0.0
|
|
108
|
+
|
|
109
|
+
## 2.2.0
|
|
110
|
+
|
|
111
|
+
### Minor Changes
|
|
112
|
+
|
|
113
|
+
- d2ce60038: bump duckdb to 1.29.0, fix bugs emerging from that
|
|
114
|
+
|
|
115
|
+
### Patch Changes
|
|
116
|
+
|
|
117
|
+
- Updated dependencies [d2ce60038]
|
|
118
|
+
- @evidence-dev/sdk@2.0.0
|
|
119
|
+
|
|
120
|
+
## 2.1.11
|
|
121
|
+
|
|
122
|
+
### Patch Changes
|
|
123
|
+
|
|
124
|
+
- Updated dependencies [b5a096723]
|
|
125
|
+
- @evidence-dev/sdk@1.5.1
|
|
126
|
+
|
|
127
|
+
## 2.1.10
|
|
128
|
+
|
|
129
|
+
### Patch Changes
|
|
130
|
+
|
|
131
|
+
- Updated dependencies [b72e4a809]
|
|
132
|
+
- @evidence-dev/sdk@1.5.0
|
|
133
|
+
|
|
134
|
+
## 2.1.9
|
|
135
|
+
|
|
136
|
+
### Patch Changes
|
|
137
|
+
|
|
138
|
+
- Updated dependencies [08923de11]
|
|
139
|
+
- @evidence-dev/sdk@1.4.8
|
|
140
|
+
|
|
141
|
+
## 2.1.8
|
|
142
|
+
|
|
143
|
+
### Patch Changes
|
|
144
|
+
|
|
145
|
+
- Updated dependencies [00516897e]
|
|
146
|
+
- Updated dependencies [1de1eca52]
|
|
147
|
+
- @evidence-dev/sdk@1.4.7
|
|
148
|
+
|
|
149
|
+
## 2.1.7
|
|
150
|
+
|
|
151
|
+
### Patch Changes
|
|
152
|
+
|
|
153
|
+
- Updated dependencies [c82ba1516]
|
|
154
|
+
- @evidence-dev/sdk@1.4.6
|
|
155
|
+
|
|
156
|
+
## 2.1.6
|
|
157
|
+
|
|
158
|
+
### Patch Changes
|
|
159
|
+
|
|
160
|
+
- b2126ac1a: add --profile flag to sdk-handled cli commands, add debugging profiling and logs to build-parquet
|
|
161
|
+
- Updated dependencies [b2126ac1a]
|
|
162
|
+
- @evidence-dev/sdk@1.4.5
|
|
163
|
+
|
|
164
|
+
## 2.1.5
|
|
165
|
+
|
|
166
|
+
### Patch Changes
|
|
167
|
+
|
|
168
|
+
- c0e1799e2: Set 644 permissions when writing parquet files
|
|
169
|
+
|
|
170
|
+
## 2.1.4
|
|
171
|
+
|
|
172
|
+
### Patch Changes
|
|
173
|
+
|
|
174
|
+
- 8c2982505: Update vitest to latest
|
|
175
|
+
|
|
176
|
+
## 2.1.3
|
|
177
|
+
|
|
178
|
+
### Patch Changes
|
|
179
|
+
|
|
180
|
+
- b84ef07ac: Add buildOptions.batchSize to connection.yaml spec
|
|
181
|
+
- 6cdedceb0: Remove db-orchestrator
|
|
182
|
+
|
|
183
|
+
## 2.1.2
|
|
184
|
+
|
|
185
|
+
### Patch Changes
|
|
186
|
+
|
|
187
|
+
- 7620a1af: removes unused duckdb dep
|
|
188
|
+
- a95db3d3: Move types to devDependencies
|
|
189
|
+
|
|
190
|
+
## 2.1.1
|
|
191
|
+
|
|
192
|
+
### Patch Changes
|
|
193
|
+
|
|
194
|
+
- 5e0bbf31: stop blocking advanced usage of json with usql
|
|
195
|
+
|
|
196
|
+
## 2.1.0
|
|
197
|
+
|
|
198
|
+
### Minor Changes
|
|
199
|
+
|
|
200
|
+
- ca3e593b: - Updated major dependencies (Svelte, SvelteKit, Vite) to improve memory usage when building
|
|
201
|
+
|
|
202
|
+
## 2.0.5
|
|
203
|
+
|
|
204
|
+
### Patch Changes
|
|
205
|
+
|
|
206
|
+
- 5a1e46a5: Fix for svelte vite errors
|
|
207
|
+
- 008cf432: Roll back proxy server
|
|
208
|
+
- 69b9ed32: Fix file imports for evidence package
|
|
209
|
+
|
|
210
|
+
## 2.0.4
|
|
211
|
+
|
|
212
|
+
### Patch Changes
|
|
213
|
+
|
|
214
|
+
- 57f71211: bump duckdb-wasm and arrow
|
|
215
|
+
|
|
216
|
+
## 2.0.3
|
|
217
|
+
|
|
218
|
+
### Patch Changes
|
|
219
|
+
|
|
220
|
+
- f4ccf03c: Add missing type
|
|
221
|
+
|
|
222
|
+
## 2.0.2
|
|
223
|
+
|
|
224
|
+
### Patch Changes
|
|
225
|
+
|
|
226
|
+
- e4e7d822: fix fully null boolean column with float64 conversion
|
|
227
|
+
|
|
228
|
+
## 2.0.1
|
|
229
|
+
|
|
230
|
+
### Patch Changes
|
|
231
|
+
|
|
232
|
+
- 913f5919: Handle null / undefined values when columns are omitted from result sets
|
|
233
|
+
|
|
234
|
+
## 2.0.0
|
|
235
|
+
|
|
236
|
+
### Major Changes
|
|
237
|
+
|
|
238
|
+
- cb0fc468: This update includes major changes to the way Evidence interacts with data.
|
|
239
|
+
Instead of running queries against the production database, and including it
|
|
240
|
+
with the project as pre-rendered, static JSON data; those queries are now stored as .parquet files.
|
|
241
|
+
|
|
242
|
+
.parquet enables the use of DuckDB on the client, allowing for much greater levels of interactivity
|
|
243
|
+
on pages, and interoperability between different data sources (e.g. joins across postgres & mysql).
|
|
244
|
+
|
|
245
|
+
### Minor Changes
|
|
246
|
+
|
|
247
|
+
- f62bd26e: prerenders clientside duckdb queries in their initial state to allow for some form of prerendering
|
|
248
|
+
- 52d81ce2: fix parameterized page prerendering
|
|
249
|
+
|
|
250
|
+
### Patch Changes
|
|
251
|
+
|
|
252
|
+
- aa34d0b3: Queries now wait for setParquetUrls, and will time out if they are not processed within 5 seconds
|
|
253
|
+
- 840d1195: allow initialdata to saturate columns
|
|
254
|
+
- b25a95d7: Misc fixes
|
|
255
|
+
- fd74bd3c: Prevent queries with the same name from different connectors from colliding
|
|
256
|
+
- 377abb4a: Rename databases -> datasources
|
|
257
|
+
- 9132146b: fix vite hard refreshes, fix dropdown flickering on ssr, fix null columns
|
|
258
|
+
- 0ba78b67: polish working with sources
|
|
259
|
+
- 2aaef5fb: Convoluted javascript things to fix convoluted javascript things
|
|
260
|
+
- 9603c4e7: Silence DuckDB unless in debug mode
|
|
261
|
+
- cb74406a: fix version mismatch and windows error
|
|
262
|
+
- b5592a3f: Usability Improvements
|
|
263
|
+
- bf4a112a: Update package.json to use new datasource field
|
|
264
|
+
- 69126c94: change internal filename generation
|
|
265
|
+
- 5928e45d: Reduce risk of queries attempting to execute prior to database initialization
|
|
266
|
+
- ca7337ba: fix prerendering for all pages
|
|
267
|
+
- cd57ba69: Add new interface for datasources for fine-grained control of output
|
|
268
|
+
- c4822852: Support for streaming results
|
|
269
|
+
- 52e114cc: move date standardization
|
|
270
|
+
- e173ca9d: Mute parquet url messages unless debug mode
|
|
271
|
+
- 4d5735a2: Fix a few fs related issues
|
|
272
|
+
- 26ad2d2c: When rebuilding and setting parquet urls, the duckdb internal filesystem is now cleaned up to force reloads
|
|
273
|
+
- ca4c3b00: Don't count the database as initialized until parquet urls are set (tables are created)
|
|
274
|
+
- 15248699: fix for hugeints
|
|
275
|
+
- ef2a9106: Sources are now segmented into schemas to prevent source name conflicts
|
|
276
|
+
- 130950d7: add client/build time guardrails
|
|
277
|
+
- d1ab5e62: Bump ddb version
|
|
278
|
+
- 20127231: Bump all versions so version pinning works
|
|
279
|
+
- 9b1ac9b7: make everything use a single connection
|
|
280
|
+
|
|
281
|
+
## 2.0.0-usql.25
|
|
282
|
+
|
|
283
|
+
### Patch Changes
|
|
284
|
+
|
|
285
|
+
- e173ca9d: Mute parquet url messages unless debug mode
|
|
286
|
+
|
|
287
|
+
## 2.0.0-usql.24
|
|
288
|
+
|
|
289
|
+
### Patch Changes
|
|
290
|
+
|
|
291
|
+
- 15248699: fix for hugeints
|
|
292
|
+
|
|
293
|
+
## 2.0.0-usql.23
|
|
294
|
+
|
|
295
|
+
### Patch Changes
|
|
296
|
+
|
|
297
|
+
- 9603c4e7: Silence DuckDB unless in debug mode
|
|
298
|
+
|
|
299
|
+
## 2.0.0-usql.22
|
|
300
|
+
|
|
301
|
+
### Patch Changes
|
|
302
|
+
|
|
303
|
+
- 9132146b: fix vite hard refreshes, fix dropdown flickering on ssr, fix null columns
|
|
304
|
+
|
|
305
|
+
## 2.0.0-usql.21
|
|
306
|
+
|
|
307
|
+
### Patch Changes
|
|
308
|
+
|
|
309
|
+
- 2aaef5fb: Convoluted javascript things to fix convoluted javascript things
|
|
310
|
+
|
|
311
|
+
## 2.0.0-usql.20
|
|
312
|
+
|
|
313
|
+
### Patch Changes
|
|
314
|
+
|
|
315
|
+
- cb74406a: fix version mismatch and windows error
|
|
316
|
+
- d1ab5e62: Bump ddb version
|
|
317
|
+
|
|
318
|
+
## 2.0.0-usql.19
|
|
319
|
+
|
|
320
|
+
### Patch Changes
|
|
321
|
+
|
|
322
|
+
- Update package.json to use new datasource field
|
|
323
|
+
|
|
324
|
+
## 2.0.0-usql.18
|
|
325
|
+
|
|
326
|
+
### Patch Changes
|
|
327
|
+
|
|
328
|
+
- 377abb4a: Rename databases -> datasources
|
|
329
|
+
|
|
330
|
+
## 2.0.0-usql.17
|
|
331
|
+
|
|
332
|
+
### Patch Changes
|
|
333
|
+
|
|
334
|
+
- 840d1195: allow initialdata to saturate columns
|
|
335
|
+
- 26ad2d2c: When rebuilding and setting parquet urls, the duckdb internal filesystem is now cleaned up to force reloads
|
|
336
|
+
|
|
337
|
+
## 2.0.0-usql.16
|
|
338
|
+
|
|
339
|
+
### Patch Changes
|
|
340
|
+
|
|
341
|
+
- 4d5735a2: Fix a few fs related issues
|
|
342
|
+
|
|
343
|
+
## 2.0.0-usql.15
|
|
344
|
+
|
|
345
|
+
### Patch Changes
|
|
346
|
+
|
|
347
|
+
- b25a95d7: Misc fixes
|
|
348
|
+
|
|
349
|
+
## 2.0.0-usql.14
|
|
350
|
+
|
|
351
|
+
### Patch Changes
|
|
352
|
+
|
|
353
|
+
- fd74bd3c: Prevent queries with the same name from different connectors from colliding
|
|
354
|
+
|
|
355
|
+
## 2.0.0-usql.13
|
|
356
|
+
|
|
357
|
+
### Patch Changes
|
|
358
|
+
|
|
359
|
+
- b5592a3f: Usability Improvements
|
|
360
|
+
|
|
361
|
+
## 2.0.0-usql.12
|
|
362
|
+
|
|
363
|
+
### Patch Changes
|
|
364
|
+
|
|
365
|
+
- 0ba78b67: polish working with sources
|
|
366
|
+
- cd57ba69: Add new interface for datasources for fine-grained control of output
|
|
367
|
+
|
|
368
|
+
## 2.0.0-usql.11
|
|
369
|
+
|
|
370
|
+
### Minor Changes
|
|
371
|
+
|
|
372
|
+
- 52d81ce2: fix parameterized page prerendering
|
|
373
|
+
|
|
374
|
+
### Patch Changes
|
|
375
|
+
|
|
376
|
+
- 130950d7: add client/build time guardrails
|
|
377
|
+
|
|
378
|
+
## 2.0.0-usql.10
|
|
379
|
+
|
|
380
|
+
### Patch Changes
|
|
381
|
+
|
|
382
|
+
- Support for streaming results
|
|
383
|
+
|
|
384
|
+
## 2.0.0-usql.9
|
|
385
|
+
|
|
386
|
+
### Patch Changes
|
|
387
|
+
|
|
388
|
+
- 52e114cc: move date standardization
|
|
389
|
+
|
|
390
|
+
## 2.0.0-usql.8
|
|
391
|
+
|
|
392
|
+
### Patch Changes
|
|
393
|
+
|
|
394
|
+
- 20127231: Bump all versions so version pinning works
|
|
395
|
+
|
|
396
|
+
## 2.0.0-usql.7
|
|
397
|
+
|
|
398
|
+
### Patch Changes
|
|
399
|
+
|
|
400
|
+
- 69126c94: change internal filename generation
|
|
401
|
+
|
|
402
|
+
## 2.0.0-usql.6
|
|
403
|
+
|
|
404
|
+
### Patch Changes
|
|
405
|
+
|
|
406
|
+
- Queries now wait for setParquetUrls, and will time out if they are not processed within 5 seconds
|
|
407
|
+
|
|
408
|
+
## 2.0.0-usql.5
|
|
409
|
+
|
|
410
|
+
### Patch Changes
|
|
411
|
+
|
|
412
|
+
- Don't count the database as initialized until parquet urls are set (tables are created)
|
|
413
|
+
|
|
414
|
+
## 2.0.0-usql.4
|
|
415
|
+
|
|
416
|
+
### Patch Changes
|
|
417
|
+
|
|
418
|
+
- Reduce risk of queries attempting to execute prior to database initialization
|
|
419
|
+
|
|
420
|
+
## 2.0.0-usql.3
|
|
421
|
+
|
|
422
|
+
### Patch Changes
|
|
423
|
+
|
|
424
|
+
- ca7337ba: fix prerendering for all pages
|
|
425
|
+
|
|
426
|
+
## 2.0.0-usql.2
|
|
427
|
+
|
|
428
|
+
### Patch Changes
|
|
429
|
+
|
|
430
|
+
- 9b1ac9b7: make everything use a single connection
|
|
431
|
+
|
|
432
|
+
## 2.0.0-usql.1
|
|
433
|
+
|
|
434
|
+
### Minor Changes
|
|
435
|
+
|
|
436
|
+
- f62bd26e: prerenders clientside duckdb queries in their initial state to allow for some form of prerendering
|
|
437
|
+
|
|
438
|
+
### Patch Changes
|
|
439
|
+
|
|
440
|
+
- ef2a9106: Sources are now segmented into schemas to prevent source name conflicts
|
|
441
|
+
|
|
442
|
+
## 2.0.0-usql.0
|
|
443
|
+
|
|
444
|
+
### Major Changes
|
|
445
|
+
|
|
446
|
+
- cb0fc468: This update includes major changes to the way Evidence interacts with data.
|
|
447
|
+
Instead of running queries against the production database, and including it
|
|
448
|
+
with the project as pre-rendered, static JSON data; those queries are now stored as .parquet files.
|
|
449
|
+
|
|
450
|
+
.parquet enables the use of DuckDB on the client, allowing for much greater levels of interactivity
|
|
451
|
+
on pages, and interoperability between different data sources (e.g. joins across postgres & mysql).
|
package/LICENSE.md
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright \(c\) 2023 Evidence
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files \(the "Software"\), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/package.json
CHANGED
|
@@ -1,6 +1,47 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yolean/evidence-universal-sql",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "3.0.2",
|
|
4
|
+
"description": "",
|
|
5
|
+
"keywords": [],
|
|
6
|
+
"author": "",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"main": "./src/index.js",
|
|
9
|
+
"type": "module",
|
|
10
|
+
"dependencies": {
|
|
11
|
+
"@duckdb/duckdb-wasm": "^1.30.0",
|
|
12
|
+
"apache-arrow": "17.0.0",
|
|
13
|
+
"chalk": "^5.2.0",
|
|
14
|
+
"cli-progress": "^3.12.0",
|
|
15
|
+
"lodash.chunk": "^4.2.0",
|
|
16
|
+
"parquet-wasm": "0.5.0",
|
|
17
|
+
"web-worker": "^1.2.0"
|
|
18
|
+
},
|
|
19
|
+
"exports": {
|
|
20
|
+
".": {
|
|
21
|
+
"default": "./src/index.js",
|
|
22
|
+
"types": "./src/index.d.ts"
|
|
23
|
+
},
|
|
24
|
+
"./client-duckdb": {
|
|
25
|
+
"browser": "./src/client-duckdb/browser.js",
|
|
26
|
+
"node": "./src/client-duckdb/node.js",
|
|
27
|
+
"types": "./src/client-duckdb/browser.d.ts"
|
|
28
|
+
},
|
|
29
|
+
"./calculate-score": {
|
|
30
|
+
"default": "./src/calculateScore.js",
|
|
31
|
+
"types": "./src/calculateScore.d.ts"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"@types/lodash.chunk": "^4.2.7",
|
|
36
|
+
"@types/node": "20.11.28",
|
|
37
|
+
"@types/mock-fs": "^4.13.1",
|
|
38
|
+
"mock-fs": "^5.2.0",
|
|
39
|
+
"vitest": "^2.1.9"
|
|
40
|
+
},
|
|
41
|
+
"scripts": {
|
|
42
|
+
"build": "tsc ./src/index.js --d --emitDeclarationOnly --allowJs",
|
|
43
|
+
"check": "tsc ./src/index.js --d --emitDeclarationOnly --allowJs",
|
|
44
|
+
"test": "vitest --run",
|
|
45
|
+
"test:watch": "vitest"
|
|
46
|
+
}
|
|
6
47
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Constructs a Buffer from provided table metadata
|
|
3
|
+
* @param {{name: string, evidenceType: string}[]} columns
|
|
4
|
+
* @param {any[]} data
|
|
5
|
+
* @returns {Promise<Uint8Array>}
|
|
6
|
+
*/
|
|
7
|
+
export function buildParquetFromResultSet(
|
|
8
|
+
columns: { name: string; evidenceType: string }[],
|
|
9
|
+
data: any[]
|
|
10
|
+
): Promise<Uint8Array>;
|
|
11
|
+
|
|
12
|
+
export function buildMultipartParquet<T extends Record<string, any>>(
|
|
13
|
+
columns: { name: string; evidenceType: string }[],
|
|
14
|
+
data: Generator<T[]> | Promise<Generator<T[]>> | T[] | Promise<T[]>,
|
|
15
|
+
tmpDir: string,
|
|
16
|
+
outDir: string,
|
|
17
|
+
outputFilename: string,
|
|
18
|
+
expectedRowCount?: number,
|
|
19
|
+
batchSize?: number
|
|
20
|
+
): Promise<string | false>;
|