@query-farm/vgi 0.34.0 → 0.35.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/client/client.d.ts +1 -1
- package/dist/client/errors.d.ts +2 -1
- package/dist/client-entry.js +2 -2
- package/dist/client-entry.js.map +4 -4
- package/dist/index.js +2 -2
- package/dist/index.js.map +4 -4
- package/package.json +3 -3
- package/src/client/client.ts +5 -1
- package/src/client/errors.ts +10 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@query-farm/vgi",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.35.0",
|
|
4
4
|
"description": "TypeScript framework for extending DuckDB with user-defined functions via the Vector Gateway Interface (VGI) over Arrow IPC.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"author": "Query Farm LLC (https://query.farm)",
|
|
@@ -91,12 +91,12 @@
|
|
|
91
91
|
},
|
|
92
92
|
"peerDependencies": {
|
|
93
93
|
"@query-farm/apache-arrow": "^21.1.1",
|
|
94
|
-
"@query-farm/vgi-rpc": ">=0.25.
|
|
94
|
+
"@query-farm/vgi-rpc": ">=0.25.4 <0.26.0"
|
|
95
95
|
},
|
|
96
96
|
"devDependencies": {
|
|
97
97
|
"@duckdb/node-api": "^1.5.5-r.4",
|
|
98
98
|
"@query-farm/apache-arrow": "^21.1.1",
|
|
99
|
-
"@query-farm/vgi-rpc": "^0.25.
|
|
99
|
+
"@query-farm/vgi-rpc": "^0.25.4",
|
|
100
100
|
"@types/bun": "latest",
|
|
101
101
|
"typescript": "^7.0.2"
|
|
102
102
|
},
|
package/src/client/client.ts
CHANGED
|
@@ -3,7 +3,11 @@
|
|
|
3
3
|
// Works with any RpcClient (subprocess or HTTP transport).
|
|
4
4
|
|
|
5
5
|
import { type VgiSchema, schema as schema_, type VgiField, field, type VgiBatch, type VgiDataType, utf8, binary, list } from "../arrow/index.js";
|
|
6
|
-
import
|
|
6
|
+
// `import type`, not `import { type … }`: the latter keeps the statement and
|
|
7
|
+
// emits `import {} from "@query-farm/vgi-rpc"`, a side-effect import of the
|
|
8
|
+
// package root — which re-exports the whole framework, server included, into
|
|
9
|
+
// every browser bundle. See the note in ./errors.
|
|
10
|
+
import type { RpcClient, StreamSession } from "@query-farm/vgi-rpc";
|
|
7
11
|
import {
|
|
8
12
|
serializeBindRequest,
|
|
9
13
|
deserializeBindResponse,
|
package/src/client/errors.ts
CHANGED
|
@@ -2,7 +2,16 @@
|
|
|
2
2
|
// VgiClient error class + RpcClient wrapper that translates RpcError into
|
|
3
3
|
// VgiClientError, preserving the worker's remote traceback.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// RpcError comes from the `/connect` subpath, not the package root, and the
|
|
6
|
+
// distinction is worth ~160 kB in every browser bundle. The root re-exports the
|
|
7
|
+
// whole framework — protocol, dispatch, access log, the server — and a bundler
|
|
8
|
+
// cannot drop it, so importing one error class from there shipped `RpcServer`
|
|
9
|
+
// to browsers to satisfy an `instanceof`. `RpcClient` is a pure `import type`
|
|
10
|
+
// for the same reason: `import { type X }` leaves the statement behind, and a
|
|
11
|
+
// bare `import {} from "@query-farm/vgi-rpc"` is a side-effect import of that
|
|
12
|
+
// same graph.
|
|
13
|
+
import { RpcError } from "@query-farm/vgi-rpc/connect";
|
|
14
|
+
import type { RpcClient } from "@query-farm/vgi-rpc";
|
|
6
15
|
|
|
7
16
|
/** Error thrown by VgiClient when an RPC call fails or returns unexpected data. */
|
|
8
17
|
export class VgiClientError extends Error {
|