@gscdump/engine 0.20.3 → 0.21.1

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.
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Pure-JS drop-in replacement for `hysnappy`.
3
+ *
4
+ * `hysnappy`'s `snappyUncompressor()` eagerly compiles a WASM module
5
+ * (`new WebAssembly.Module(byteArray)`) — and `hyparquet-compressors`
6
+ * instantiates it at module top level (`SNAPPY: snappyUncompressor()`).
7
+ * Cloudflare's `workerd` forbids compiling WebAssembly from a runtime buffer
8
+ * (WASM must be a bundled module import), so any Worker bundle that imports
9
+ * `icebird` (→ `hyparquet-compressors`) fails to start with
10
+ * `CompileError: Wasm code generation disallowed by embedder`.
11
+ *
12
+ * `icebird`'s append path never actually decompresses a snappy data file — it
13
+ * only reads gzipped `metadata.json` and Avro manifests — so the snappy
14
+ * decompressor is instantiated but never invoked. This shim swaps the WASM
15
+ * codec for `hyparquet`'s pure-JS snappy decompressor (a vendored snappyjs),
16
+ * keeping the exact `hysnappy` API surface so `hyparquet-compressors` is
17
+ * unaware of the swap. Wired in via a build-time `hysnappy` alias.
18
+ *
19
+ * See `docs/plans/2026-05-22-icebird-ingest-writer-spike.md` (section e).
20
+ */
21
+ /**
22
+ * Pure-JS stand-in for `hysnappy`'s `snappyUncompressor()`. Returns the
23
+ * decompressor immediately — no WASM compilation, so it is safe to call at
24
+ * module top level inside `workerd`.
25
+ */
26
+ declare function snappyUncompressor(): (input: Uint8Array, outputLength: number) => Uint8Array;
27
+ /** Pure-JS stand-in for `hysnappy`'s `snappyUncompress(input, outputLength)`. */
28
+ declare function snappyUncompress(input: Uint8Array, outputLength: number): Uint8Array;
29
+ export { snappyUncompress, snappyUncompressor };
@@ -0,0 +1,13 @@
1
+ import { snappyUncompress as snappyUncompress$1 } from "hyparquet/src/snappy.js";
2
+ function decode(input, outputLength) {
3
+ const output = new Uint8Array(outputLength);
4
+ snappyUncompress$1(input, output);
5
+ return output;
6
+ }
7
+ function snappyUncompressor() {
8
+ return decode;
9
+ }
10
+ function snappyUncompress(input, outputLength) {
11
+ return decode(input, outputLength);
12
+ }
13
+ export { snappyUncompress, snappyUncompressor };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@gscdump/engine",
3
3
  "type": "module",
4
- "version": "0.20.3",
4
+ "version": "0.21.1",
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",
@@ -51,6 +51,11 @@
51
51
  "import": "./dist/ingest.mjs",
52
52
  "default": "./dist/ingest.mjs"
53
53
  },
54
+ "./sink-node": {
55
+ "types": "./dist/sink-node.d.mts",
56
+ "import": "./dist/sink-node.mjs",
57
+ "default": "./dist/sink-node.mjs"
58
+ },
54
59
  "./sql": {
55
60
  "types": "./dist/sql-bind.d.mts",
56
61
  "import": "./dist/sql-bind.mjs",
@@ -140,6 +145,11 @@
140
145
  "types": "./dist/arrow-utils.d.mts",
141
146
  "import": "./dist/arrow-utils.mjs",
142
147
  "default": "./dist/arrow-utils.mjs"
148
+ },
149
+ "./vendor/hysnappy": {
150
+ "types": "./dist/vendor/hysnappy-purejs.d.mts",
151
+ "import": "./dist/vendor/hysnappy-purejs.mjs",
152
+ "default": "./dist/vendor/hysnappy-purejs.mjs"
143
153
  }
144
154
  },
145
155
  "main": "./dist/index.mjs",
@@ -168,9 +178,10 @@
168
178
  },
169
179
  "dependencies": {
170
180
  "drizzle-orm": "^0.45.2",
181
+ "icebird": "^0.8.5",
171
182
  "proper-lockfile": "^4.1.2",
172
- "gscdump": "0.20.3",
173
- "@gscdump/contracts": "0.20.3"
183
+ "@gscdump/contracts": "0.21.1",
184
+ "gscdump": "0.21.1"
174
185
  },
175
186
  "devDependencies": {
176
187
  "@duckdb/duckdb-wasm": "^1.32.0",