@gscdump/engine 0.23.2 → 0.23.4

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.
Files changed (2) hide show
  1. package/dist/index.mjs +12 -6
  2. package/package.json +3 -3
package/dist/index.mjs CHANGED
@@ -305,14 +305,20 @@ function toIcebergDate(value) {
305
305
  if (value instanceof Date) return Math.floor(value.getTime() / DAY_MILLIS);
306
306
  return value;
307
307
  }
308
+ function coerceJsonSafe(value) {
309
+ if (typeof value === "bigint") return Number(value);
310
+ return value;
311
+ }
308
312
  function toRecords(slice, rows) {
309
313
  const siteId = slice.ctx.siteId ?? "";
310
- return rows.map((row) => ({
311
- ...row,
312
- date: toIcebergDate(row.date),
313
- site_id: siteId,
314
- search_type: slice.searchType
315
- }));
314
+ return rows.map((row) => {
315
+ const out = {};
316
+ for (const k in row) out[k] = coerceJsonSafe(row[k]);
317
+ out.date = toIcebergDate(out.date);
318
+ out.site_id = siteId;
319
+ out.search_type = slice.searchType;
320
+ return out;
321
+ });
316
322
  }
317
323
  function createIcebergAppendSink(options) {
318
324
  let connection;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@gscdump/engine",
3
3
  "type": "module",
4
- "version": "0.23.2",
4
+ "version": "0.23.4",
5
5
  "description": "Append-only Parquet/DuckDB storage engine + planner + adapters for the gscdump pipeline. Node + edge runtimes; opt-in heavy peers.",
6
6
  "author": {
7
7
  "name": "Harlan Wilton",
@@ -180,8 +180,8 @@
180
180
  "drizzle-orm": "^0.45.2",
181
181
  "icebird": "^0.8.6",
182
182
  "proper-lockfile": "^4.1.2",
183
- "@gscdump/contracts": "0.23.2",
184
- "gscdump": "0.23.2"
183
+ "@gscdump/contracts": "0.23.4",
184
+ "gscdump": "0.23.4"
185
185
  },
186
186
  "devDependencies": {
187
187
  "@duckdb/duckdb-wasm": "^1.32.0",