@trpc/client 11.0.0-rc.532 → 11.0.0-rc.551
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/bundle-analysis.json +16 -16
- package/dist/internals/transformer.d.ts +2 -2
- package/dist/links/HTTPBatchLinkOptions.d.ts +1 -1
- package/dist/links/httpLink.d.ts +2 -2
- package/dist/links/httpLink.js +1 -1
- package/dist/links/httpLink.mjs +1 -1
- package/dist/links/internals/httpUtils.d.ts +1 -1
- package/dist/links/loggerLink.d.ts +1 -1
- package/dist/links/loggerLink.js +1 -1
- package/dist/links/loggerLink.mjs +1 -1
- package/dist/links/wsLink.d.ts +1 -1
- package/dist/links/wsLink.js +1 -1
- package/dist/links/wsLink.mjs +1 -1
- package/package.json +4 -4
- package/src/internals/transformer.ts +2 -2
- package/src/links/HTTPBatchLinkOptions.ts +1 -1
- package/src/links/httpLink.ts +2 -2
- package/src/links/internals/httpUtils.ts +1 -1
- package/src/links/loggerLink.ts +1 -1
- package/src/links/wsLink.ts +1 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
|
-
"bundleSize":
|
|
3
|
-
"bundleOrigSize":
|
|
4
|
-
"bundleReduction": 24.
|
|
2
|
+
"bundleSize": 54227,
|
|
3
|
+
"bundleOrigSize": 71827,
|
|
4
|
+
"bundleReduction": 24.5,
|
|
5
5
|
"modules": [
|
|
6
6
|
{
|
|
7
7
|
"id": "/src/links/wsLink.ts",
|
|
8
|
-
"size":
|
|
9
|
-
"origSize":
|
|
8
|
+
"size": 15278,
|
|
9
|
+
"origSize": 17001,
|
|
10
10
|
"renderedExports": [
|
|
11
11
|
"createWSClient",
|
|
12
12
|
"wsLink"
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
},
|
|
31
31
|
{
|
|
32
32
|
"id": "/src/links/loggerLink.ts",
|
|
33
|
-
"size":
|
|
34
|
-
"origSize":
|
|
33
|
+
"size": 5456,
|
|
34
|
+
"origSize": 6693,
|
|
35
35
|
"renderedExports": [
|
|
36
36
|
"loggerLink"
|
|
37
37
|
],
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
{
|
|
44
44
|
"id": "/src/links/internals/httpUtils.ts",
|
|
45
45
|
"size": 4465,
|
|
46
|
-
"origSize":
|
|
46
|
+
"origSize": 6645,
|
|
47
47
|
"renderedExports": [
|
|
48
48
|
"resolveHTTPLinkOptions",
|
|
49
49
|
"getInput",
|
|
@@ -56,13 +56,13 @@
|
|
|
56
56
|
],
|
|
57
57
|
"removedExports": [],
|
|
58
58
|
"dependents": [
|
|
59
|
-
"/src/links/httpBatchLink.ts",
|
|
60
59
|
"/src/links/httpLink.ts",
|
|
60
|
+
"/src/links/httpBatchLink.ts",
|
|
61
61
|
"/src/links/httpBatchStreamLink.ts",
|
|
62
62
|
"/src/links/httpSubscriptionLink.ts"
|
|
63
63
|
],
|
|
64
64
|
"percent": 8.23,
|
|
65
|
-
"reduction": 32.
|
|
65
|
+
"reduction": 32.81
|
|
66
66
|
},
|
|
67
67
|
{
|
|
68
68
|
"id": "/src/internals/dataLoader.ts",
|
|
@@ -105,15 +105,15 @@
|
|
|
105
105
|
},
|
|
106
106
|
{
|
|
107
107
|
"id": "/src/links/httpLink.ts",
|
|
108
|
-
"size":
|
|
109
|
-
"origSize":
|
|
108
|
+
"size": 3183,
|
|
109
|
+
"origSize": 3707,
|
|
110
110
|
"renderedExports": [
|
|
111
111
|
"httpLink"
|
|
112
112
|
],
|
|
113
113
|
"removedExports": [],
|
|
114
114
|
"dependents": [],
|
|
115
115
|
"percent": 5.87,
|
|
116
|
-
"reduction": 14.
|
|
116
|
+
"reduction": 14.14
|
|
117
117
|
},
|
|
118
118
|
{
|
|
119
119
|
"id": "/src/internals/TRPCUntypedClient.ts",
|
|
@@ -140,8 +140,8 @@
|
|
|
140
140
|
"removedExports": [],
|
|
141
141
|
"dependents": [
|
|
142
142
|
"/src/index.ts",
|
|
143
|
-
"/src/links/httpBatchLink.ts",
|
|
144
143
|
"/src/links/httpLink.ts",
|
|
144
|
+
"/src/links/httpBatchLink.ts",
|
|
145
145
|
"/src/links/wsLink.ts",
|
|
146
146
|
"/src/links/httpBatchStreamLink.ts",
|
|
147
147
|
"/src/links/httpSubscriptionLink.ts",
|
|
@@ -197,7 +197,7 @@
|
|
|
197
197
|
{
|
|
198
198
|
"id": "/src/internals/transformer.ts",
|
|
199
199
|
"size": 565,
|
|
200
|
-
"origSize":
|
|
200
|
+
"origSize": 1697,
|
|
201
201
|
"renderedExports": [
|
|
202
202
|
"getTransformer"
|
|
203
203
|
],
|
|
@@ -206,7 +206,7 @@
|
|
|
206
206
|
"/src/unstable-internals.ts"
|
|
207
207
|
],
|
|
208
208
|
"percent": 1.04,
|
|
209
|
-
"reduction": 66.
|
|
209
|
+
"reduction": 66.71
|
|
210
210
|
},
|
|
211
211
|
{
|
|
212
212
|
"id": "/src/getFetch.ts",
|
|
@@ -10,7 +10,7 @@ type TransformerOptionYes = {
|
|
|
10
10
|
* Data transformer
|
|
11
11
|
*
|
|
12
12
|
* You must use the same transformer on the backend and frontend
|
|
13
|
-
* @
|
|
13
|
+
* @see https://trpc.io/docs/v11/data-transformers
|
|
14
14
|
**/
|
|
15
15
|
transformer: DataTransformerOptions;
|
|
16
16
|
};
|
|
@@ -19,7 +19,7 @@ type TransformerOptionNo = {
|
|
|
19
19
|
* Data transformer
|
|
20
20
|
*
|
|
21
21
|
* You must use the same transformer on the backend and frontend
|
|
22
|
-
* @
|
|
22
|
+
* @see https://trpc.io/docs/v11/data-transformers
|
|
23
23
|
**/
|
|
24
24
|
transformer?: TypeError<'You must define a transformer on your your `initTRPC`-object first'>;
|
|
25
25
|
};
|
|
@@ -6,7 +6,7 @@ export type HTTPBatchLinkOptions<TRoot extends AnyClientTypes> = HTTPLinkBaseOpt
|
|
|
6
6
|
maxURLLength?: number;
|
|
7
7
|
/**
|
|
8
8
|
* Headers to be set on outgoing requests or a callback that of said headers
|
|
9
|
-
* @
|
|
9
|
+
* @see http://trpc.io/docs/client/headers
|
|
10
10
|
*/
|
|
11
11
|
headers?: HTTPHeaders | ((opts: {
|
|
12
12
|
opList: NonEmptyArray<Operation>;
|
package/dist/links/httpLink.d.ts
CHANGED
|
@@ -4,14 +4,14 @@ import { type HTTPHeaders, type Operation, type TRPCLink } from './types';
|
|
|
4
4
|
export type HTTPLinkOptions<TRoot extends AnyClientTypes> = HTTPLinkBaseOptions<TRoot> & {
|
|
5
5
|
/**
|
|
6
6
|
* Headers to be set on outgoing requests or a callback that of said headers
|
|
7
|
-
* @
|
|
7
|
+
* @see http://trpc.io/docs/client/headers
|
|
8
8
|
*/
|
|
9
9
|
headers?: HTTPHeaders | ((opts: {
|
|
10
10
|
op: Operation;
|
|
11
11
|
}) => HTTPHeaders | Promise<HTTPHeaders>);
|
|
12
12
|
};
|
|
13
13
|
/**
|
|
14
|
-
* @
|
|
14
|
+
* @see https://trpc.io/docs/client/links/httpLink
|
|
15
15
|
*/
|
|
16
16
|
export declare function httpLink<TRouter extends AnyRouter = AnyRouter>(opts: HTTPLinkOptions<TRouter['_def']['_config']['$types']>): TRPCLink<TRouter>;
|
|
17
17
|
//# sourceMappingURL=httpLink.d.ts.map
|
package/dist/links/httpLink.js
CHANGED
|
@@ -34,7 +34,7 @@ const universalRequester = (opts)=>{
|
|
|
34
34
|
return httpUtils.jsonHttpRequester(opts);
|
|
35
35
|
};
|
|
36
36
|
/**
|
|
37
|
-
* @
|
|
37
|
+
* @see https://trpc.io/docs/client/links/httpLink
|
|
38
38
|
*/ function httpLink(opts) {
|
|
39
39
|
const resolvedOpts = httpUtils.resolveHTTPLinkOptions(opts);
|
|
40
40
|
return ()=>{
|
package/dist/links/httpLink.mjs
CHANGED
|
@@ -32,7 +32,7 @@ const universalRequester = (opts)=>{
|
|
|
32
32
|
return jsonHttpRequester(opts);
|
|
33
33
|
};
|
|
34
34
|
/**
|
|
35
|
-
* @
|
|
35
|
+
* @see https://trpc.io/docs/client/links/httpLink
|
|
36
36
|
*/ function httpLink(opts) {
|
|
37
37
|
const resolvedOpts = resolveHTTPLinkOptions(opts);
|
|
38
38
|
return ()=>{
|
|
@@ -14,7 +14,7 @@ export type HTTPLinkBaseOptions<TRoot extends Pick<AnyClientTypes, 'transformer'
|
|
|
14
14
|
/**
|
|
15
15
|
* Send all requests `as POST`s requests regardless of the procedure type
|
|
16
16
|
* The HTTP handler must separately allow overriding the method. See:
|
|
17
|
-
* @
|
|
17
|
+
* @see https://trpc.io/docs/rpc
|
|
18
18
|
*/
|
|
19
19
|
methodOverride?: 'POST';
|
|
20
20
|
} & TransformerOptions<TRoot>;
|
|
@@ -45,7 +45,7 @@ export interface LoggerLinkOptions<TRouter extends AnyRouter> {
|
|
|
45
45
|
withContext?: boolean;
|
|
46
46
|
}
|
|
47
47
|
/**
|
|
48
|
-
* @
|
|
48
|
+
* @see https://trpc.io/docs/v11/client/links/loggerLink
|
|
49
49
|
*/
|
|
50
50
|
export declare function loggerLink<TRouter extends AnyRouter = AnyRouter>(opts?: LoggerLinkOptions<TRouter>): TRPCLink<TRouter>;
|
|
51
51
|
export {};
|
package/dist/links/loggerLink.js
CHANGED
|
@@ -123,7 +123,7 @@ const defaultLogger = ({ c =console , colorMode ='css' , withContext })=>(props
|
|
|
123
123
|
].concat(args));
|
|
124
124
|
};
|
|
125
125
|
/**
|
|
126
|
-
* @
|
|
126
|
+
* @see https://trpc.io/docs/v11/client/links/loggerLink
|
|
127
127
|
*/ function loggerLink(opts = {}) {
|
|
128
128
|
const { enabled =()=>true } = opts;
|
|
129
129
|
const colorMode = opts.colorMode ?? (typeof window === 'undefined' ? 'ansi' : 'css');
|
|
@@ -121,7 +121,7 @@ const defaultLogger = ({ c =console , colorMode ='css' , withContext })=>(props
|
|
|
121
121
|
].concat(args));
|
|
122
122
|
};
|
|
123
123
|
/**
|
|
124
|
-
* @
|
|
124
|
+
* @see https://trpc.io/docs/v11/client/links/loggerLink
|
|
125
125
|
*/ function loggerLink(opts = {}) {
|
|
126
126
|
const { enabled =()=>true } = opts;
|
|
127
127
|
const colorMode = opts.colorMode ?? (typeof window === 'undefined' ? 'ansi' : 'css');
|
package/dist/links/wsLink.d.ts
CHANGED
|
@@ -95,7 +95,7 @@ export type WebSocketLinkOptions<TRouter extends AnyRouter> = {
|
|
|
95
95
|
client: TRPCWebSocketClient;
|
|
96
96
|
} & TransformerOptions<inferClientTypes<TRouter>>;
|
|
97
97
|
/**
|
|
98
|
-
* @
|
|
98
|
+
* @see https://trpc.io/docs/v11/client/links/wsLink
|
|
99
99
|
*/
|
|
100
100
|
export declare function wsLink<TRouter extends AnyRouter>(opts: WebSocketLinkOptions<TRouter>): TRPCLink<TRouter>;
|
|
101
101
|
export {};
|
package/dist/links/wsLink.js
CHANGED
|
@@ -367,7 +367,7 @@ class TRPCWebSocketClosedError extends Error {
|
|
|
367
367
|
}
|
|
368
368
|
}
|
|
369
369
|
/**
|
|
370
|
-
* @
|
|
370
|
+
* @see https://trpc.io/docs/v11/client/links/wsLink
|
|
371
371
|
*/ function wsLink(opts) {
|
|
372
372
|
const transformer$1 = transformer.getTransformer(opts.transformer);
|
|
373
373
|
return ()=>{
|
package/dist/links/wsLink.mjs
CHANGED
|
@@ -365,7 +365,7 @@ class TRPCWebSocketClosedError extends Error {
|
|
|
365
365
|
}
|
|
366
366
|
}
|
|
367
367
|
/**
|
|
368
|
-
* @
|
|
368
|
+
* @see https://trpc.io/docs/v11/client/links/wsLink
|
|
369
369
|
*/ function wsLink(opts) {
|
|
370
370
|
const transformer = getTransformer(opts.transformer);
|
|
371
371
|
return ()=>{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trpc/client",
|
|
3
|
-
"version": "11.0.0-rc.
|
|
3
|
+
"version": "11.0.0-rc.551+33a3515c1",
|
|
4
4
|
"description": "The tRPC client library",
|
|
5
5
|
"author": "KATT",
|
|
6
6
|
"license": "MIT",
|
|
@@ -76,10 +76,10 @@
|
|
|
76
76
|
"!**/*.test.*"
|
|
77
77
|
],
|
|
78
78
|
"peerDependencies": {
|
|
79
|
-
"@trpc/server": "11.0.0-rc.
|
|
79
|
+
"@trpc/server": "11.0.0-rc.551+33a3515c1"
|
|
80
80
|
},
|
|
81
81
|
"devDependencies": {
|
|
82
|
-
"@trpc/server": "11.0.0-rc.
|
|
82
|
+
"@trpc/server": "11.0.0-rc.551+33a3515c1",
|
|
83
83
|
"@types/isomorphic-fetch": "^0.0.39",
|
|
84
84
|
"@types/node": "^20.10.0",
|
|
85
85
|
"eslint": "^8.57.0",
|
|
@@ -96,5 +96,5 @@
|
|
|
96
96
|
"funding": [
|
|
97
97
|
"https://trpc.io/sponsor"
|
|
98
98
|
],
|
|
99
|
-
"gitHead": "
|
|
99
|
+
"gitHead": "33a3515c12fbf14105362278d42d32f92ef22740"
|
|
100
100
|
}
|
|
@@ -17,7 +17,7 @@ type TransformerOptionYes = {
|
|
|
17
17
|
* Data transformer
|
|
18
18
|
*
|
|
19
19
|
* You must use the same transformer on the backend and frontend
|
|
20
|
-
* @
|
|
20
|
+
* @see https://trpc.io/docs/v11/data-transformers
|
|
21
21
|
**/
|
|
22
22
|
transformer: DataTransformerOptions;
|
|
23
23
|
};
|
|
@@ -26,7 +26,7 @@ type TransformerOptionNo = {
|
|
|
26
26
|
* Data transformer
|
|
27
27
|
*
|
|
28
28
|
* You must use the same transformer on the backend and frontend
|
|
29
|
-
* @
|
|
29
|
+
* @see https://trpc.io/docs/v11/data-transformers
|
|
30
30
|
**/
|
|
31
31
|
transformer?: TypeError<'You must define a transformer on your your `initTRPC`-object first'>;
|
|
32
32
|
};
|
|
@@ -8,7 +8,7 @@ export type HTTPBatchLinkOptions<TRoot extends AnyClientTypes> =
|
|
|
8
8
|
maxURLLength?: number;
|
|
9
9
|
/**
|
|
10
10
|
* Headers to be set on outgoing requests or a callback that of said headers
|
|
11
|
-
* @
|
|
11
|
+
* @see http://trpc.io/docs/client/headers
|
|
12
12
|
*/
|
|
13
13
|
headers?:
|
|
14
14
|
| HTTPHeaders
|
package/src/links/httpLink.ts
CHANGED
|
@@ -29,7 +29,7 @@ export type HTTPLinkOptions<TRoot extends AnyClientTypes> =
|
|
|
29
29
|
HTTPLinkBaseOptions<TRoot> & {
|
|
30
30
|
/**
|
|
31
31
|
* Headers to be set on outgoing requests or a callback that of said headers
|
|
32
|
-
* @
|
|
32
|
+
* @see http://trpc.io/docs/client/headers
|
|
33
33
|
*/
|
|
34
34
|
headers?:
|
|
35
35
|
| HTTPHeaders
|
|
@@ -70,7 +70,7 @@ const universalRequester: Requester = (opts) => {
|
|
|
70
70
|
};
|
|
71
71
|
|
|
72
72
|
/**
|
|
73
|
-
* @
|
|
73
|
+
* @see https://trpc.io/docs/client/links/httpLink
|
|
74
74
|
*/
|
|
75
75
|
export function httpLink<TRouter extends AnyRouter = AnyRouter>(
|
|
76
76
|
opts: HTTPLinkOptions<TRouter['_def']['_config']['$types']>,
|
|
@@ -30,7 +30,7 @@ export type HTTPLinkBaseOptions<
|
|
|
30
30
|
/**
|
|
31
31
|
* Send all requests `as POST`s requests regardless of the procedure type
|
|
32
32
|
* The HTTP handler must separately allow overriding the method. See:
|
|
33
|
-
* @
|
|
33
|
+
* @see https://trpc.io/docs/rpc
|
|
34
34
|
*/
|
|
35
35
|
methodOverride?: 'POST';
|
|
36
36
|
} & TransformerOptions<TRoot>;
|
package/src/links/loggerLink.ts
CHANGED
|
@@ -201,7 +201,7 @@ const defaultLogger =
|
|
|
201
201
|
};
|
|
202
202
|
|
|
203
203
|
/**
|
|
204
|
-
* @
|
|
204
|
+
* @see https://trpc.io/docs/v11/client/links/loggerLink
|
|
205
205
|
*/
|
|
206
206
|
export function loggerLink<TRouter extends AnyRouter = AnyRouter>(
|
|
207
207
|
opts: LoggerLinkOptions<TRouter> = {},
|
package/src/links/wsLink.ts
CHANGED
|
@@ -572,7 +572,7 @@ class TRPCWebSocketClosedError extends Error {
|
|
|
572
572
|
}
|
|
573
573
|
|
|
574
574
|
/**
|
|
575
|
-
* @
|
|
575
|
+
* @see https://trpc.io/docs/v11/client/links/wsLink
|
|
576
576
|
*/
|
|
577
577
|
export function wsLink<TRouter extends AnyRouter>(
|
|
578
578
|
opts: WebSocketLinkOptions<TRouter>,
|