@cursor/sdk 1.0.20 → 1.0.21
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/cjs/88.js +1 -1
- package/dist/cjs/analytics.d.ts +2 -90
- package/dist/cjs/analytics.d.ts.map +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/transport.d.ts +10 -10
- package/dist/cjs/transport.d.ts.map +1 -1
- package/dist/esm/357.js +1 -1
- package/dist/esm/analytics.d.ts +2 -90
- package/dist/esm/analytics.d.ts.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/transport.d.ts +10 -10
- package/dist/esm/transport.d.ts.map +1 -1
- package/package.json +10 -8
package/dist/cjs/transport.d.ts
CHANGED
|
@@ -3,14 +3,15 @@ import type { Interceptor, Transport } from "@connectrpc/connect";
|
|
|
3
3
|
* Runtime-agnostic Connect transport seam.
|
|
4
4
|
*
|
|
5
5
|
* The SDK's RPC layer must not statically import `@connectrpc/connect-node`,
|
|
6
|
-
* because that couples the whole load path to Node and forces
|
|
7
|
-
* resolve a Node-only package at import time. This module is the
|
|
8
|
-
* that decides which Connect transport implementation to use and
|
|
9
|
-
* dynamically:
|
|
6
|
+
* because that couples the whole load path to Node and forces fetch-only
|
|
7
|
+
* runtimes to resolve a Node-only package at import time. This module is the
|
|
8
|
+
* single place that decides which Connect transport implementation to use and
|
|
9
|
+
* loads it dynamically:
|
|
10
10
|
*
|
|
11
|
-
* - **Node** → `@connectrpc/connect-node` (
|
|
12
|
-
* HTTP/1.1 vs HTTP/2 `httpVersion` selection the callers already compute).
|
|
13
|
-
*
|
|
11
|
+
* - **Node / Bun** → `@connectrpc/connect-node` (native HTTP/2 bidi, including
|
|
12
|
+
* the HTTP/1.1 vs HTTP/2 `httpVersion` selection the callers already compute).
|
|
13
|
+
* Bun implements `node:http2`, so it uses the same path as Node.
|
|
14
|
+
* - **Deno / other fetch-only runtimes** → `@connectrpc/connect-web` (fetch).
|
|
14
15
|
* - **Embedder override** → whatever `setConnectTransportFactory` installs.
|
|
15
16
|
*
|
|
16
17
|
* Call sites keep their synchronous shape via {@link createLazyConnectTransport}:
|
|
@@ -20,9 +21,8 @@ import type { Interceptor, Transport } from "@connectrpc/connect";
|
|
|
20
21
|
export interface ConnectTransportSeamOptions {
|
|
21
22
|
baseUrl: string;
|
|
22
23
|
/**
|
|
23
|
-
*
|
|
24
|
-
* transport used on
|
|
25
|
-
* this; it is retained on the seam so the Node path is byte-for-byte unchanged.
|
|
24
|
+
* Consumed by the connect-node transport (Node and Bun). The fetch-based
|
|
25
|
+
* transport used on Deno/browser ignores it.
|
|
26
26
|
*/
|
|
27
27
|
httpVersion: "1.1" | "2";
|
|
28
28
|
interceptors?: Interceptor[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transport.d.ts","sourceRoot":"","sources":["../../src/agent/transport.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAEV,WAAW,EAEX,SAAS,EAEV,MAAM,qBAAqB,CAAC;AAE7B
|
|
1
|
+
{"version":3,"file":"transport.d.ts","sourceRoot":"","sources":["../../src/agent/transport.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAEV,WAAW,EAEX,SAAS,EAEV,MAAM,qBAAqB,CAAC;AAE7B;;;;;;;;;;;;;;;;;;GAkBG;AAEH,MAAM,WAAW,2BAA2B;IAC1C,OAAO,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,WAAW,EAAE,KAAK,GAAG,GAAG,CAAC;IACzB,YAAY,CAAC,EAAE,WAAW,EAAE,CAAC;CAC9B;AAED,MAAM,MAAM,uBAAuB,GAAG,CACpC,OAAO,EAAE,2BAA2B,KACjC,OAAO,CAAC,SAAS,CAAC,CAAC;AAIxB;;;GAGG;AACH,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,uBAAuB,GAAG,SAAS,GAC3C,IAAI,CAEN;AAiCD;;;GAGG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,2BAA2B,GACnC,OAAO,CAAC,SAAS,CAAC,CAEpB;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,2BAA2B,GACnC,SAAS,CAsDX"}
|