@gscdump/engine 0.6.1 → 0.6.3
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/_chunks/compiler.mjs +288 -0
- package/dist/_chunks/duckdb.d.mts +26 -0
- package/dist/_chunks/engine.mjs +578 -0
- package/dist/_chunks/pg-adapter.mjs +676 -0
- package/dist/_chunks/planner.d.mts +15 -0
- package/dist/_chunks/schema.d.mts +1258 -0
- package/dist/_chunks/schema.mjs +139 -0
- package/dist/_chunks/storage.d.mts +476 -0
- package/dist/_chunks/storage.mjs +39 -0
- package/dist/_chunks/types.d.mts +53 -0
- package/dist/adapters/duckdb-node.d.mts +1 -13
- package/dist/adapters/duckdb-node.mjs +1 -7
- package/dist/adapters/filesystem.d.mts +1 -193
- package/dist/adapters/filesystem.mjs +2 -9
- package/dist/adapters/http.d.mts +1 -193
- package/dist/adapters/http.mjs +1 -5
- package/dist/adapters/hyparquet.d.mts +6 -83
- package/dist/adapters/hyparquet.mjs +1 -105
- package/dist/adapters/inspection-sqlite-browser.d.mts +1 -7
- package/dist/adapters/inspection-sqlite-node.d.mts +1 -7
- package/dist/adapters/inspection-sqlite-node.mjs +1 -1
- package/dist/adapters/node-harness.d.mts +3 -306
- package/dist/adapters/node-harness.mjs +4 -1866
- package/dist/adapters/r2-manifest.d.mts +4 -149
- package/dist/adapters/r2-manifest.mjs +1 -8
- package/dist/adapters/r2.d.mts +1 -47
- package/dist/contracts.d.mts +1 -435
- package/dist/entities.d.mts +1 -47
- package/dist/index.d.mts +8 -1844
- package/dist/index.mjs +8 -1962
- package/dist/ingest.d.mts +1 -1
- package/dist/planner.d.mts +3 -16
- package/dist/planner.mjs +1 -320
- package/dist/resolver/index.d.mts +3 -51
- package/dist/resolver/index.mjs +2 -780
- package/dist/rollups.d.mts +6 -51
- package/dist/rollups.mjs +2 -209
- package/dist/schema.d.mts +2 -1258
- package/dist/schema.mjs +1 -138
- package/package.json +2 -2
package/dist/entities.d.mts
CHANGED
|
@@ -1,51 +1,5 @@
|
|
|
1
|
+
import { a as DataSource } from "./_chunks/storage.mjs";
|
|
1
2
|
import { TenantCtx } from "gscdump/contracts";
|
|
2
|
-
interface DataSource {
|
|
3
|
-
read: (key: string, range?: {
|
|
4
|
-
offset: number;
|
|
5
|
-
length: number;
|
|
6
|
-
}, signal?: AbortSignal) => Promise<Uint8Array>;
|
|
7
|
-
write: (key: string, bytes: Uint8Array) => Promise<void>;
|
|
8
|
-
delete: (keys: string[]) => Promise<void>;
|
|
9
|
-
/**
|
|
10
|
-
* One-shot listing under a prefix. Implementations may cap the number of
|
|
11
|
-
* returned keys (typically 10k) — callers iterating full tenant space
|
|
12
|
-
* should prefer `streamList` when available or narrow the prefix.
|
|
13
|
-
*/
|
|
14
|
-
list: (prefix: string) => Promise<string[]>;
|
|
15
|
-
/**
|
|
16
|
-
* Per-key URI probe. Returns a URI string DuckDB's `httpfs` (or an
|
|
17
|
-
* equivalent engine that fetches its own I/O) can read directly, or
|
|
18
|
-
* `undefined` if the key isn't URI-resolvable on this backend and the
|
|
19
|
-
* caller must fall back to `read(key)` for the bytes.
|
|
20
|
-
*
|
|
21
|
-
* Contracts:
|
|
22
|
-
* - When defined, the returned URI MUST yield byte-identical content to
|
|
23
|
-
* `read(key)`. Callers rely on this for correctness.
|
|
24
|
-
* - Backends with a native URI for every key (filesystem: absolute path,
|
|
25
|
-
* R2 via `httpfs`: signed URL) may always return a string.
|
|
26
|
-
* - Backends without a native URI shape (in-memory) omit the method or
|
|
27
|
-
* return `undefined` per call.
|
|
28
|
-
* - Mixed-per-query is allowed: some keys in one query may return a URI,
|
|
29
|
-
* others may not; the executor branches per key.
|
|
30
|
-
*/
|
|
31
|
-
uri?: (key: string) => string | undefined;
|
|
32
|
-
/**
|
|
33
|
-
* Optional — probe the byte size of a key without reading it. Used by
|
|
34
|
-
* the engine to fill in `WriteResult.bytes` when a codec reports 0 or
|
|
35
|
-
* unknown but the file is non-trivial.
|
|
36
|
-
*/
|
|
37
|
-
head?: (key: string) => Promise<{
|
|
38
|
-
bytes: number;
|
|
39
|
-
} | undefined>;
|
|
40
|
-
/**
|
|
41
|
-
* Optional streaming variant of `list`. Implementations that page
|
|
42
|
-
* backing-store results (R2, S3) should implement this and yield keys
|
|
43
|
-
* lazily. `list` may return up to an adapter-defined cap (typically
|
|
44
|
-
* 10k keys); callers iterating full tenant space must prefer
|
|
45
|
-
* `streamList` when available, or chunk by narrower prefixes.
|
|
46
|
-
*/
|
|
47
|
-
streamList?: (prefix: string) => AsyncIterable<string>;
|
|
48
|
-
}
|
|
49
3
|
/**
|
|
50
4
|
* GSC URL inspection result fields we persist. Mirrors the
|
|
51
5
|
* `searchconsole_v1.Schema$UrlInspectionResult` shape but as plain JSON
|