@query-farm/vgi-rpc 0.7.4 → 0.7.5

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,2 @@
1
+ export * from "./index.core.js";
2
+ //# sourceMappingURL=index.workerd.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.workerd.d.ts","sourceRoot":"","sources":["../src/index.workerd.ts"],"names":[],"mappings":"AASA,cAAc,iBAAiB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@query-farm/vgi-rpc",
3
- "version": "0.7.4",
3
+ "version": "0.7.5",
4
4
  "license": "Apache-2.0",
5
5
  "homepage": "https://vgi-rpc-typescript.query.farm",
6
6
  "repository": {
@@ -13,9 +13,9 @@
13
13
  "types": "dist/index.d.ts",
14
14
  "exports": {
15
15
  ".": {
16
- "workerd": "./src/index.ts",
17
- "worker": "./src/index.ts",
18
- "browser": "./src/index.ts",
16
+ "workerd": "./src/index.workerd.ts",
17
+ "worker": "./src/index.workerd.ts",
18
+ "browser": "./src/index.workerd.ts",
19
19
  "bun": "./src/index.ts",
20
20
  "types": "./dist/index.d.ts",
21
21
  "import": "./dist/index.js"
@@ -0,0 +1,113 @@
1
+ // © Copyright 2025-2026, Query.Farm LLC - https://query.farm
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
4
+ // Runtime-agnostic exports shared by every entry point. This module MUST NOT
5
+ // (transitively) import node-only APIs (node:net/fs/child_process), so it can
6
+ // be bundled for Cloudflare Workers / browsers via `./index.workerd.ts`. The
7
+ // AF_UNIX launcher (node-only) is added on top of this in `./index.ts` for the
8
+ // node/bun barrel; CF builds get this core without it.
9
+
10
+ export { AccessLogHook, type AccessLogSink, FdSink } from "./access-log.js";
11
+ export { AuthContext } from "./auth.js";
12
+ export * from "./client/index.js";
13
+ export {
14
+ DESCRIBE_METHOD_NAME,
15
+ DESCRIBE_VERSION,
16
+ DESCRIBE_VERSION_KEY,
17
+ ERROR_KIND_KEY,
18
+ LOG_EXTRA_KEY,
19
+ LOG_LEVEL_KEY,
20
+ LOG_MESSAGE_KEY,
21
+ PROTOCOL_NAME_KEY,
22
+ REQUEST_ID_KEY,
23
+ REQUEST_VERSION,
24
+ REQUEST_VERSION_KEY,
25
+ RPC_ERROR_HEADER,
26
+ RPC_METHOD_KEY,
27
+ SERVER_ID_KEY,
28
+ STATE_KEY,
29
+ } from "./constants.js";
30
+ export {
31
+ ERROR_KIND_METHOD_NOT_IMPLEMENTED,
32
+ ERROR_KIND_SERVER_DRAINING,
33
+ ERROR_KIND_SESSION_LOST,
34
+ MethodNotImplementedError,
35
+ RpcError,
36
+ ServerDrainingError,
37
+ SessionLostError,
38
+ VersionError,
39
+ } from "./errors.js";
40
+ export {
41
+ type ExternalLocationConfig,
42
+ type ExternalStorage,
43
+ httpsOnlyValidator,
44
+ isExternalLocationBatch,
45
+ makeExternalLocationBatch,
46
+ maybeExternalizeBatch,
47
+ resolveExternalLocation,
48
+ } from "./external.js";
49
+ export {
50
+ ARROW_CONTENT_TYPE,
51
+ type AuthenticateFn,
52
+ type BearerValidateFn,
53
+ bearerAuthenticate,
54
+ bearerAuthenticateStatic,
55
+ type CertValidateFn,
56
+ chainAuthenticate,
57
+ createHttpHandler,
58
+ type HttpHandlerOptions,
59
+ type JwtAuthenticateOptions,
60
+ jsonStateSerializer,
61
+ jwtAuthenticate,
62
+ mtlsAuthenticate,
63
+ mtlsAuthenticateFingerprint,
64
+ mtlsAuthenticateSubject,
65
+ mtlsAuthenticateXfcc,
66
+ type OAuthResourceMetadata,
67
+ oauthResourceMetadataToJson,
68
+ parseXfcc,
69
+ type StateSerializer,
70
+ type UnpackedToken,
71
+ unpackStateToken,
72
+ type XfccElement,
73
+ type XfccValidateFn,
74
+ } from "./http/index.js";
75
+ export { Protocol } from "./protocol.js";
76
+ export {
77
+ bool,
78
+ bytes,
79
+ float,
80
+ float32,
81
+ inferParamTypes,
82
+ int,
83
+ int8,
84
+ int16,
85
+ int32,
86
+ type SchemaLike,
87
+ str,
88
+ toSchema,
89
+ uint8,
90
+ uint16,
91
+ uint32,
92
+ uint64,
93
+ } from "./schema.js";
94
+ export { VgiRpcServer } from "./server.js";
95
+ export {
96
+ type CallContext,
97
+ type CallStatistics,
98
+ type DispatchHook,
99
+ type DispatchInfo,
100
+ type ExchangeFn,
101
+ type ExchangeInit,
102
+ type HeaderInit,
103
+ type HookToken,
104
+ type LogContext,
105
+ type MethodDefinition,
106
+ MethodType,
107
+ OutputCollector,
108
+ type ProducerFn,
109
+ type ProducerInit,
110
+ type ServeStartHook,
111
+ TransportKind,
112
+ type UnaryHandler,
113
+ } from "./types.js";
package/src/index.ts CHANGED
@@ -1,71 +1,11 @@
1
1
  // © Copyright 2025-2026, Query.Farm LLC - https://query.farm
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
- export { AccessLogHook, type AccessLogSink, FdSink } from "./access-log.js";
5
- export { AuthContext } from "./auth.js";
6
- export * from "./client/index.js";
7
- export {
8
- DESCRIBE_METHOD_NAME,
9
- DESCRIBE_VERSION,
10
- DESCRIBE_VERSION_KEY,
11
- ERROR_KIND_KEY,
12
- LOG_EXTRA_KEY,
13
- LOG_LEVEL_KEY,
14
- LOG_MESSAGE_KEY,
15
- PROTOCOL_NAME_KEY,
16
- REQUEST_ID_KEY,
17
- REQUEST_VERSION,
18
- REQUEST_VERSION_KEY,
19
- RPC_ERROR_HEADER,
20
- RPC_METHOD_KEY,
21
- SERVER_ID_KEY,
22
- STATE_KEY,
23
- } from "./constants.js";
24
- export {
25
- ERROR_KIND_METHOD_NOT_IMPLEMENTED,
26
- ERROR_KIND_SERVER_DRAINING,
27
- ERROR_KIND_SESSION_LOST,
28
- MethodNotImplementedError,
29
- RpcError,
30
- ServerDrainingError,
31
- SessionLostError,
32
- VersionError,
33
- } from "./errors.js";
34
- export {
35
- type ExternalLocationConfig,
36
- type ExternalStorage,
37
- httpsOnlyValidator,
38
- isExternalLocationBatch,
39
- makeExternalLocationBatch,
40
- maybeExternalizeBatch,
41
- resolveExternalLocation,
42
- } from "./external.js";
43
- export {
44
- ARROW_CONTENT_TYPE,
45
- type AuthenticateFn,
46
- type BearerValidateFn,
47
- bearerAuthenticate,
48
- bearerAuthenticateStatic,
49
- type CertValidateFn,
50
- chainAuthenticate,
51
- createHttpHandler,
52
- type HttpHandlerOptions,
53
- type JwtAuthenticateOptions,
54
- jsonStateSerializer,
55
- jwtAuthenticate,
56
- mtlsAuthenticate,
57
- mtlsAuthenticateFingerprint,
58
- mtlsAuthenticateSubject,
59
- mtlsAuthenticateXfcc,
60
- type OAuthResourceMetadata,
61
- oauthResourceMetadataToJson,
62
- parseXfcc,
63
- type StateSerializer,
64
- type UnpackedToken,
65
- unpackStateToken,
66
- type XfccElement,
67
- type XfccValidateFn,
68
- } from "./http/index.js";
4
+ // Full node/bun barrel: the runtime-agnostic core plus the node-only AF_UNIX
5
+ // launcher. Cloudflare Worker / browser builds resolve `./index.workerd.ts`
6
+ // (the `workerd`/`worker`/`browser` export conditions) instead, which omits
7
+ // the launcher so node:net/fs/child_process never enter the bundle.
8
+ export * from "./index.core.js";
69
9
  export {
70
10
  acquireLock,
71
11
  computeHash as launcherComputeHash,
@@ -85,42 +25,3 @@ export {
85
25
  statusRows,
86
26
  tryAcquireLock,
87
27
  } from "./launcher/index.js";
88
- export { Protocol } from "./protocol.js";
89
- export {
90
- bool,
91
- bytes,
92
- float,
93
- float32,
94
- inferParamTypes,
95
- int,
96
- int8,
97
- int16,
98
- int32,
99
- type SchemaLike,
100
- str,
101
- toSchema,
102
- uint8,
103
- uint16,
104
- uint32,
105
- uint64,
106
- } from "./schema.js";
107
- export { VgiRpcServer } from "./server.js";
108
- export {
109
- type CallContext,
110
- type CallStatistics,
111
- type DispatchHook,
112
- type DispatchInfo,
113
- type ExchangeFn,
114
- type ExchangeInit,
115
- type HeaderInit,
116
- type HookToken,
117
- type LogContext,
118
- type MethodDefinition,
119
- MethodType,
120
- OutputCollector,
121
- type ProducerFn,
122
- type ProducerInit,
123
- type ServeStartHook,
124
- TransportKind,
125
- type UnaryHandler,
126
- } from "./types.js";
@@ -0,0 +1,10 @@
1
+ // © Copyright 2025-2026, Query.Farm LLC - https://query.farm
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
4
+ // Cloudflare Worker / browser entry. Re-exports only the runtime-agnostic core
5
+ // — the node-only AF_UNIX launcher (node:net `createServer`, node:fs, node:
6
+ // child_process) is deliberately excluded so it never enters a workerd/browser
7
+ // bundle. A Worker cannot listen on sockets, so the launcher has no use there.
8
+ // Resolved via the `workerd`/`worker`/`browser` export conditions in
9
+ // package.json.
10
+ export * from "./index.core.js";