@trpc/client 11.0.0-next-alpha.175 → 11.0.0-next-beta.178
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/TRPCUntypedClient.d.ts +3 -3
- package/dist/links/httpLink.d.ts +1 -1
- package/dist/links/httpLink.js +1 -1
- package/dist/links/httpLink.mjs +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 +3 -3
- package/src/internals/TRPCUntypedClient.ts +3 -3
- package/src/links/httpLink.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": 27.
|
|
2
|
+
"bundleSize": 46268,
|
|
3
|
+
"bundleOrigSize": 64199,
|
|
4
|
+
"bundleReduction": 27.93,
|
|
5
5
|
"modules": [
|
|
6
6
|
{
|
|
7
7
|
"id": "/src/links/wsLink.ts",
|
|
8
|
-
"size":
|
|
9
|
-
"origSize":
|
|
8
|
+
"size": 11973,
|
|
9
|
+
"origSize": 13358,
|
|
10
10
|
"renderedExports": [
|
|
11
11
|
"createWSClient",
|
|
12
12
|
"wsLink"
|
|
@@ -18,15 +18,15 @@
|
|
|
18
18
|
},
|
|
19
19
|
{
|
|
20
20
|
"id": "/src/links/loggerLink.ts",
|
|
21
|
-
"size":
|
|
22
|
-
"origSize":
|
|
21
|
+
"size": 5240,
|
|
22
|
+
"origSize": 6464,
|
|
23
23
|
"renderedExports": [
|
|
24
24
|
"loggerLink"
|
|
25
25
|
],
|
|
26
26
|
"removedExports": [],
|
|
27
27
|
"dependents": [],
|
|
28
|
-
"percent": 11.
|
|
29
|
-
"reduction": 18.
|
|
28
|
+
"percent": 11.33,
|
|
29
|
+
"reduction": 18.94
|
|
30
30
|
},
|
|
31
31
|
{
|
|
32
32
|
"id": "/src/internals/dataLoader.ts",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
{
|
|
61
61
|
"id": "/src/internals/TRPCUntypedClient.ts",
|
|
62
62
|
"size": 3250,
|
|
63
|
-
"origSize":
|
|
63
|
+
"origSize": 6188,
|
|
64
64
|
"renderedExports": [
|
|
65
65
|
"TRPCUntypedClient"
|
|
66
66
|
],
|
|
@@ -69,8 +69,8 @@
|
|
|
69
69
|
"/src/createTRPCUntypedClient.ts",
|
|
70
70
|
"/src/createTRPCClient.ts"
|
|
71
71
|
],
|
|
72
|
-
"percent": 7.
|
|
73
|
-
"reduction": 47.
|
|
72
|
+
"percent": 7.02,
|
|
73
|
+
"reduction": 47.48
|
|
74
74
|
},
|
|
75
75
|
{
|
|
76
76
|
"id": "/src/links/internals/httpUtils.ts",
|
|
@@ -112,8 +112,8 @@
|
|
|
112
112
|
},
|
|
113
113
|
{
|
|
114
114
|
"id": "/src/links/httpLink.ts",
|
|
115
|
-
"size":
|
|
116
|
-
"origSize":
|
|
115
|
+
"size": 2178,
|
|
116
|
+
"origSize": 2605,
|
|
117
117
|
"renderedExports": [
|
|
118
118
|
"httpLinkFactory",
|
|
119
119
|
"httpLink"
|
|
@@ -122,8 +122,8 @@
|
|
|
122
122
|
"dependents": [
|
|
123
123
|
"/src/links/httpFormDataLink.ts"
|
|
124
124
|
],
|
|
125
|
-
"percent": 4.
|
|
126
|
-
"reduction": 16.
|
|
125
|
+
"percent": 4.71,
|
|
126
|
+
"reduction": 16.39
|
|
127
127
|
},
|
|
128
128
|
{
|
|
129
129
|
"id": "/src/TRPCClientError.ts",
|
|
@@ -7,7 +7,7 @@ type CreateTRPCClientBaseOptions<TRouter extends AnyRouter> = TRouter['_def']['_
|
|
|
7
7
|
* Data transformer
|
|
8
8
|
*
|
|
9
9
|
* You must use the same transformer on the backend and frontend
|
|
10
|
-
* @link https://trpc.io/docs/data-transformers
|
|
10
|
+
* @link https://trpc.io/docs/v11/data-transformers
|
|
11
11
|
**/
|
|
12
12
|
transformer?: 'You must set a transformer on the backend router';
|
|
13
13
|
} : TRouter['_def']['_config']['transformer'] extends DataTransformerOptions ? {
|
|
@@ -15,7 +15,7 @@ type CreateTRPCClientBaseOptions<TRouter extends AnyRouter> = TRouter['_def']['_
|
|
|
15
15
|
* Data transformer
|
|
16
16
|
*
|
|
17
17
|
* You must use the same transformer on the backend and frontend
|
|
18
|
-
* @link https://trpc.io/docs/data-transformers
|
|
18
|
+
* @link https://trpc.io/docs/v11/data-transformers
|
|
19
19
|
**/
|
|
20
20
|
transformer: TRouter['_def']['_config']['transformer'] extends CombinedDataTransformer ? DataTransformerOptions : TRouter['_def']['_config']['transformer'];
|
|
21
21
|
} : {
|
|
@@ -23,7 +23,7 @@ type CreateTRPCClientBaseOptions<TRouter extends AnyRouter> = TRouter['_def']['_
|
|
|
23
23
|
* Data transformer
|
|
24
24
|
*
|
|
25
25
|
* You must use the same transformer on the backend and frontend
|
|
26
|
-
* @link https://trpc.io/docs/data-transformers
|
|
26
|
+
* @link https://trpc.io/docs/v11/data-transformers
|
|
27
27
|
**/
|
|
28
28
|
transformer?: CombinedDataTransformer;
|
|
29
29
|
};
|
package/dist/links/httpLink.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export declare function httpLinkFactory(factoryOpts: {
|
|
|
14
14
|
requester: Requester;
|
|
15
15
|
}): <TRouter extends AnyRouter>(opts: HTTPLinkOptions) => TRPCLink<TRouter>;
|
|
16
16
|
/**
|
|
17
|
-
* @
|
|
17
|
+
* @link https://trpc.io/docs/v11/client/links/httpLink
|
|
18
18
|
*/
|
|
19
19
|
export declare const httpLink: <TRouter extends AnyRouter>(opts: HTTPLinkOptions) => TRPCLink<TRouter>;
|
|
20
20
|
//# sourceMappingURL=httpLink.d.ts.map
|
package/dist/links/httpLink.js
CHANGED
package/dist/links/httpLink.mjs
CHANGED
|
@@ -41,7 +41,7 @@ export interface LoggerLinkOptions<TRouter extends AnyRouter> {
|
|
|
41
41
|
colorMode?: 'ansi' | 'css';
|
|
42
42
|
}
|
|
43
43
|
/**
|
|
44
|
-
* @
|
|
44
|
+
* @link https://trpc.io/docs/v11/client/links/loggerLink
|
|
45
45
|
*/
|
|
46
46
|
export declare function loggerLink<TRouter extends AnyRouter = AnyRouter>(opts?: LoggerLinkOptions<TRouter>): TRPCLink<TRouter>;
|
|
47
47
|
export {};
|
package/dist/links/loggerLink.js
CHANGED
|
@@ -128,7 +128,7 @@ const defaultLogger = ({ c =console , colorMode ='css' })=>(props)=>{
|
|
|
128
128
|
].concat(args));
|
|
129
129
|
};
|
|
130
130
|
/**
|
|
131
|
-
* @
|
|
131
|
+
* @link https://trpc.io/docs/v11/client/links/loggerLink
|
|
132
132
|
*/ function loggerLink(opts = {}) {
|
|
133
133
|
const { enabled =()=>true } = opts;
|
|
134
134
|
const colorMode = opts.colorMode ?? (typeof window === 'undefined' ? 'ansi' : 'css');
|
|
@@ -124,7 +124,7 @@ const defaultLogger = ({ c =console , colorMode ='css' })=>(props)=>{
|
|
|
124
124
|
].concat(args));
|
|
125
125
|
};
|
|
126
126
|
/**
|
|
127
|
-
* @
|
|
127
|
+
* @link https://trpc.io/docs/v11/client/links/loggerLink
|
|
128
128
|
*/ function loggerLink(opts = {}) {
|
|
129
129
|
const { enabled =()=>true } = opts;
|
|
130
130
|
const colorMode = opts.colorMode ?? (typeof window === 'undefined' ? 'ansi' : 'css');
|
package/dist/links/wsLink.d.ts
CHANGED
|
@@ -67,7 +67,7 @@ export interface WebSocketLinkOptions {
|
|
|
67
67
|
client: TRPCWebSocketClient;
|
|
68
68
|
}
|
|
69
69
|
/**
|
|
70
|
-
* @
|
|
70
|
+
* @link https://trpc.io/docs/v11/client/links/wsLink
|
|
71
71
|
*/
|
|
72
72
|
export declare function wsLink<TRouter extends AnyRouter>(opts: WebSocketLinkOptions): TRPCLink<TRouter>;
|
|
73
73
|
export {};
|
package/dist/links/wsLink.js
CHANGED
|
@@ -287,7 +287,7 @@ class TRPCWebSocketClosedError extends Error {
|
|
|
287
287
|
}
|
|
288
288
|
}
|
|
289
289
|
/**
|
|
290
|
-
* @
|
|
290
|
+
* @link https://trpc.io/docs/v11/client/links/wsLink
|
|
291
291
|
*/ function wsLink(opts) {
|
|
292
292
|
return (runtime)=>{
|
|
293
293
|
const { client } = opts;
|
package/dist/links/wsLink.mjs
CHANGED
|
@@ -283,7 +283,7 @@ class TRPCWebSocketClosedError extends Error {
|
|
|
283
283
|
}
|
|
284
284
|
}
|
|
285
285
|
/**
|
|
286
|
-
* @
|
|
286
|
+
* @link https://trpc.io/docs/v11/client/links/wsLink
|
|
287
287
|
*/ function wsLink(opts) {
|
|
288
288
|
return (runtime)=>{
|
|
289
289
|
const { client } = opts;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trpc/client",
|
|
3
|
-
"version": "11.0.0-next-
|
|
3
|
+
"version": "11.0.0-next-beta.178+f6674ef59",
|
|
4
4
|
"description": "The tRPC client library",
|
|
5
5
|
"author": "KATT",
|
|
6
6
|
"license": "MIT",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"!**/*.test.*"
|
|
71
71
|
],
|
|
72
72
|
"dependencies": {
|
|
73
|
-
"@trpc/core": "11.0.0-next-
|
|
73
|
+
"@trpc/core": "11.0.0-next-beta.178+f6674ef59"
|
|
74
74
|
},
|
|
75
75
|
"devDependencies": {
|
|
76
76
|
"@testing-library/dom": "^9.0.0",
|
|
@@ -90,5 +90,5 @@
|
|
|
90
90
|
"funding": [
|
|
91
91
|
"https://trpc.io/sponsor"
|
|
92
92
|
],
|
|
93
|
-
"gitHead": "
|
|
93
|
+
"gitHead": "f6674ef5901fe558e9f482918fe2b7b2218185cc"
|
|
94
94
|
}
|
|
@@ -25,7 +25,7 @@ type CreateTRPCClientBaseOptions<TRouter extends AnyRouter> =
|
|
|
25
25
|
* Data transformer
|
|
26
26
|
*
|
|
27
27
|
* You must use the same transformer on the backend and frontend
|
|
28
|
-
* @link https://trpc.io/docs/data-transformers
|
|
28
|
+
* @link https://trpc.io/docs/v11/data-transformers
|
|
29
29
|
**/
|
|
30
30
|
transformer?: 'You must set a transformer on the backend router';
|
|
31
31
|
}
|
|
@@ -35,7 +35,7 @@ type CreateTRPCClientBaseOptions<TRouter extends AnyRouter> =
|
|
|
35
35
|
* Data transformer
|
|
36
36
|
*
|
|
37
37
|
* You must use the same transformer on the backend and frontend
|
|
38
|
-
* @link https://trpc.io/docs/data-transformers
|
|
38
|
+
* @link https://trpc.io/docs/v11/data-transformers
|
|
39
39
|
**/
|
|
40
40
|
transformer: TRouter['_def']['_config']['transformer'] extends CombinedDataTransformer
|
|
41
41
|
? DataTransformerOptions
|
|
@@ -46,7 +46,7 @@ type CreateTRPCClientBaseOptions<TRouter extends AnyRouter> =
|
|
|
46
46
|
* Data transformer
|
|
47
47
|
*
|
|
48
48
|
* You must use the same transformer on the backend and frontend
|
|
49
|
-
* @link https://trpc.io/docs/data-transformers
|
|
49
|
+
* @link https://trpc.io/docs/v11/data-transformers
|
|
50
50
|
**/
|
|
51
51
|
transformer?: CombinedDataTransformer;
|
|
52
52
|
};
|
package/src/links/httpLink.ts
CHANGED
|
@@ -86,6 +86,6 @@ export function httpLinkFactory(factoryOpts: { requester: Requester }) {
|
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
/**
|
|
89
|
-
* @
|
|
89
|
+
* @link https://trpc.io/docs/v11/client/links/httpLink
|
|
90
90
|
*/
|
|
91
91
|
export const httpLink = httpLinkFactory({ requester: jsonHttpRequester });
|
package/src/links/loggerLink.ts
CHANGED
|
@@ -196,7 +196,7 @@ const defaultLogger =
|
|
|
196
196
|
};
|
|
197
197
|
|
|
198
198
|
/**
|
|
199
|
-
* @
|
|
199
|
+
* @link https://trpc.io/docs/v11/client/links/loggerLink
|
|
200
200
|
*/
|
|
201
201
|
export function loggerLink<TRouter extends AnyRouter = AnyRouter>(
|
|
202
202
|
opts: LoggerLinkOptions<TRouter> = {},
|
package/src/links/wsLink.ts
CHANGED
|
@@ -443,7 +443,7 @@ class TRPCWebSocketClosedError extends Error {
|
|
|
443
443
|
}
|
|
444
444
|
|
|
445
445
|
/**
|
|
446
|
-
* @
|
|
446
|
+
* @link https://trpc.io/docs/v11/client/links/wsLink
|
|
447
447
|
*/
|
|
448
448
|
export function wsLink<TRouter extends AnyRouter>(
|
|
449
449
|
opts: WebSocketLinkOptions,
|