@trpc/client 11.0.0-rc.645 → 11.0.0-rc.648
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/TRPCClientError.js +15 -3
- package/dist/TRPCClientError.mjs +13 -1
- package/dist/bundle-analysis.json +24 -39
- package/dist/internals/TRPCUntypedClient.js +16 -4
- package/dist/internals/TRPCUntypedClient.mjs +13 -1
- package/dist/links/internals/contentTypes.d.ts +1 -1
- package/package.json +4 -4
- package/dist/node_modules/.pnpm/@swc_helpers@0.5.13/node_modules/@swc/helpers/esm/_define_property.js +0 -11
- package/dist/node_modules/.pnpm/@swc_helpers@0.5.13/node_modules/@swc/helpers/esm/_define_property.mjs +0 -9
package/dist/TRPCClientError.js
CHANGED
|
@@ -1,8 +1,20 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var _define_property = require('./node_modules/.pnpm/@swc_helpers@0.5.13/node_modules/@swc/helpers/esm/_define_property.js');
|
|
4
3
|
var unstableCoreDoNotImport = require('@trpc/server/unstable-core-do-not-import');
|
|
5
4
|
|
|
5
|
+
function _define_property(obj, key, value) {
|
|
6
|
+
if (key in obj) {
|
|
7
|
+
Object.defineProperty(obj, key, {
|
|
8
|
+
value: value,
|
|
9
|
+
enumerable: true,
|
|
10
|
+
configurable: true,
|
|
11
|
+
writable: true
|
|
12
|
+
});
|
|
13
|
+
} else {
|
|
14
|
+
obj[key] = value;
|
|
15
|
+
}
|
|
16
|
+
return obj;
|
|
17
|
+
}
|
|
6
18
|
function isTRPCClientError(cause) {
|
|
7
19
|
return cause instanceof TRPCClientError || /**
|
|
8
20
|
* @deprecated
|
|
@@ -53,10 +65,10 @@ class TRPCClientError extends Error {
|
|
|
53
65
|
cause
|
|
54
66
|
}), // eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
55
67
|
// @ts-ignore override doesn't work in all environments due to "This member cannot have an 'override' modifier because it is not declared in the base class 'Error'"
|
|
56
|
-
_define_property
|
|
68
|
+
_define_property(this, "cause", void 0), _define_property(this, "shape", void 0), _define_property(this, "data", void 0), /**
|
|
57
69
|
* Additional meta data about the error
|
|
58
70
|
* In the case of HTTP-errors, we'll have `response` and potentially `responseJSON` here
|
|
59
|
-
*/ _define_property
|
|
71
|
+
*/ _define_property(this, "meta", void 0);
|
|
60
72
|
this.meta = opts?.meta;
|
|
61
73
|
this.cause = cause;
|
|
62
74
|
this.shape = opts?.result?.error;
|
package/dist/TRPCClientError.mjs
CHANGED
|
@@ -1,6 +1,18 @@
|
|
|
1
|
-
import { _ as _define_property } from './node_modules/.pnpm/@swc_helpers@0.5.13/node_modules/@swc/helpers/esm/_define_property.mjs';
|
|
2
1
|
import { isObject } from '@trpc/server/unstable-core-do-not-import';
|
|
3
2
|
|
|
3
|
+
function _define_property(obj, key, value) {
|
|
4
|
+
if (key in obj) {
|
|
5
|
+
Object.defineProperty(obj, key, {
|
|
6
|
+
value: value,
|
|
7
|
+
enumerable: true,
|
|
8
|
+
configurable: true,
|
|
9
|
+
writable: true
|
|
10
|
+
});
|
|
11
|
+
} else {
|
|
12
|
+
obj[key] = value;
|
|
13
|
+
}
|
|
14
|
+
return obj;
|
|
15
|
+
}
|
|
4
16
|
function isTRPCClientError(cause) {
|
|
5
17
|
return cause instanceof TRPCClientError || /**
|
|
6
18
|
* @deprecated
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"bundleSize":
|
|
3
|
-
"bundleOrigSize":
|
|
4
|
-
"bundleReduction":
|
|
2
|
+
"bundleSize": 66027,
|
|
3
|
+
"bundleOrigSize": 83110,
|
|
4
|
+
"bundleReduction": 20.55,
|
|
5
5
|
"modules": [
|
|
6
6
|
{
|
|
7
7
|
"id": "/src/links/wsLink.ts",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
],
|
|
14
14
|
"removedExports": [],
|
|
15
15
|
"dependents": [],
|
|
16
|
-
"percent": 27.
|
|
16
|
+
"percent": 27.29,
|
|
17
17
|
"reduction": 10.3
|
|
18
18
|
},
|
|
19
19
|
{
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
],
|
|
26
26
|
"removedExports": [],
|
|
27
27
|
"dependents": [],
|
|
28
|
-
"percent": 11.
|
|
28
|
+
"percent": 11.8,
|
|
29
29
|
"reduction": 0
|
|
30
30
|
},
|
|
31
31
|
{
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
],
|
|
38
38
|
"removedExports": [],
|
|
39
39
|
"dependents": [],
|
|
40
|
-
"percent": 9.
|
|
40
|
+
"percent": 9.1,
|
|
41
41
|
"reduction": 4.42
|
|
42
42
|
},
|
|
43
43
|
{
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
],
|
|
50
50
|
"removedExports": [],
|
|
51
51
|
"dependents": [],
|
|
52
|
-
"percent": 8.
|
|
52
|
+
"percent": 8.48,
|
|
53
53
|
"reduction": 19.44
|
|
54
54
|
},
|
|
55
55
|
{
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"/src/links/httpBatchLink.ts",
|
|
65
65
|
"/src/links/httpBatchStreamLink.ts"
|
|
66
66
|
],
|
|
67
|
-
"percent": 6.
|
|
67
|
+
"percent": 6.19,
|
|
68
68
|
"reduction": 5.64
|
|
69
69
|
},
|
|
70
70
|
{
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
],
|
|
77
77
|
"removedExports": [],
|
|
78
78
|
"dependents": [],
|
|
79
|
-
"percent":
|
|
79
|
+
"percent": 5.96,
|
|
80
80
|
"reduction": 5.59
|
|
81
81
|
},
|
|
82
82
|
{
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
"/src/links/httpBatchStreamLink.ts",
|
|
100
100
|
"/src/links/httpSubscriptionLink.ts"
|
|
101
101
|
],
|
|
102
|
-
"percent": 5.
|
|
102
|
+
"percent": 5.59,
|
|
103
103
|
"reduction": 37.14
|
|
104
104
|
},
|
|
105
105
|
{
|
|
@@ -111,12 +111,12 @@
|
|
|
111
111
|
],
|
|
112
112
|
"removedExports": [],
|
|
113
113
|
"dependents": [],
|
|
114
|
-
"percent": 4.
|
|
114
|
+
"percent": 4.81,
|
|
115
115
|
"reduction": 14.24
|
|
116
116
|
},
|
|
117
117
|
{
|
|
118
118
|
"id": "/src/internals/TRPCUntypedClient.ts",
|
|
119
|
-
"size":
|
|
119
|
+
"size": 3158,
|
|
120
120
|
"origSize": 4578,
|
|
121
121
|
"renderedExports": [
|
|
122
122
|
"TRPCUntypedClient"
|
|
@@ -126,12 +126,12 @@
|
|
|
126
126
|
"/src/createTRPCUntypedClient.ts",
|
|
127
127
|
"/src/createTRPCClient.ts"
|
|
128
128
|
],
|
|
129
|
-
"percent": 4.
|
|
130
|
-
"reduction":
|
|
129
|
+
"percent": 4.78,
|
|
130
|
+
"reduction": 31.02
|
|
131
131
|
},
|
|
132
132
|
{
|
|
133
133
|
"id": "/src/TRPCClientError.ts",
|
|
134
|
-
"size":
|
|
134
|
+
"size": 2787,
|
|
135
135
|
"origSize": 3564,
|
|
136
136
|
"renderedExports": [
|
|
137
137
|
"TRPCClientError"
|
|
@@ -146,8 +146,8 @@
|
|
|
146
146
|
"/src/links/httpSubscriptionLink.ts",
|
|
147
147
|
"/src/internals/TRPCUntypedClient.ts"
|
|
148
148
|
],
|
|
149
|
-
"percent":
|
|
150
|
-
"reduction":
|
|
149
|
+
"percent": 4.22,
|
|
150
|
+
"reduction": 21.8
|
|
151
151
|
},
|
|
152
152
|
{
|
|
153
153
|
"id": "/src/links/retryLink.ts",
|
|
@@ -158,7 +158,7 @@
|
|
|
158
158
|
],
|
|
159
159
|
"removedExports": [],
|
|
160
160
|
"dependents": [],
|
|
161
|
-
"percent": 3.
|
|
161
|
+
"percent": 3.32,
|
|
162
162
|
"reduction": 18.8
|
|
163
163
|
},
|
|
164
164
|
{
|
|
@@ -175,7 +175,7 @@
|
|
|
175
175
|
"/src/links/httpBatchStreamLink.ts",
|
|
176
176
|
"/src/links/httpSubscriptionLink.ts"
|
|
177
177
|
],
|
|
178
|
-
"percent": 1.
|
|
178
|
+
"percent": 1.8,
|
|
179
179
|
"reduction": 3.88
|
|
180
180
|
},
|
|
181
181
|
{
|
|
@@ -192,7 +192,7 @@
|
|
|
192
192
|
"dependents": [
|
|
193
193
|
"/src/index.ts"
|
|
194
194
|
],
|
|
195
|
-
"percent": 1.
|
|
195
|
+
"percent": 1.79,
|
|
196
196
|
"reduction": 74.6
|
|
197
197
|
},
|
|
198
198
|
{
|
|
@@ -219,7 +219,7 @@
|
|
|
219
219
|
],
|
|
220
220
|
"removedExports": [],
|
|
221
221
|
"dependents": [],
|
|
222
|
-
"percent": 0.
|
|
222
|
+
"percent": 0.92,
|
|
223
223
|
"reduction": 44.95
|
|
224
224
|
},
|
|
225
225
|
{
|
|
@@ -277,7 +277,7 @@
|
|
|
277
277
|
"/src/links/httpSubscriptionLink.ts",
|
|
278
278
|
"/src/links/retryLink.ts"
|
|
279
279
|
],
|
|
280
|
-
"percent": 0.
|
|
280
|
+
"percent": 0.38,
|
|
281
281
|
"reduction": 6.96
|
|
282
282
|
},
|
|
283
283
|
{
|
|
@@ -292,24 +292,9 @@
|
|
|
292
292
|
"/src/links/wsLink.ts",
|
|
293
293
|
"/src/links/httpSubscriptionLink.ts"
|
|
294
294
|
],
|
|
295
|
-
"percent": 0.
|
|
295
|
+
"percent": 0.36,
|
|
296
296
|
"reduction": 76.38
|
|
297
297
|
},
|
|
298
|
-
{
|
|
299
|
-
"id": "/home/runner/work/trpc/trpc/node_modules/.pnpm/@swc+helpers@0.5.13/node_modules/@swc/helpers/esm/_define_property.js",
|
|
300
|
-
"size": 227,
|
|
301
|
-
"origSize": 262,
|
|
302
|
-
"renderedExports": [
|
|
303
|
-
"_"
|
|
304
|
-
],
|
|
305
|
-
"removedExports": [],
|
|
306
|
-
"dependents": [
|
|
307
|
-
"/src/TRPCClientError.ts",
|
|
308
|
-
"/src/internals/TRPCUntypedClient.ts"
|
|
309
|
-
],
|
|
310
|
-
"percent": 0.35,
|
|
311
|
-
"reduction": 13.36
|
|
312
|
-
},
|
|
313
298
|
{
|
|
314
299
|
"id": "/src/createTRPCUntypedClient.ts",
|
|
315
300
|
"size": 100,
|
|
@@ -349,5 +334,5 @@
|
|
|
349
334
|
"reduction": 100
|
|
350
335
|
}
|
|
351
336
|
],
|
|
352
|
-
"moduleCount":
|
|
337
|
+
"moduleCount": 23
|
|
353
338
|
}
|
|
@@ -1,10 +1,22 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var _define_property = require('../node_modules/.pnpm/@swc_helpers@0.5.13/node_modules/@swc/helpers/esm/_define_property.js');
|
|
4
3
|
var observable = require('@trpc/server/observable');
|
|
5
4
|
var createChain = require('../links/internals/createChain.js');
|
|
6
5
|
var TRPCClientError = require('../TRPCClientError.js');
|
|
7
6
|
|
|
7
|
+
function _define_property(obj, key, value) {
|
|
8
|
+
if (key in obj) {
|
|
9
|
+
Object.defineProperty(obj, key, {
|
|
10
|
+
value: value,
|
|
11
|
+
enumerable: true,
|
|
12
|
+
configurable: true,
|
|
13
|
+
writable: true
|
|
14
|
+
});
|
|
15
|
+
} else {
|
|
16
|
+
obj[key] = value;
|
|
17
|
+
}
|
|
18
|
+
return obj;
|
|
19
|
+
}
|
|
8
20
|
class TRPCUntypedClient {
|
|
9
21
|
$request(opts) {
|
|
10
22
|
const chain$ = createChain.createChain({
|
|
@@ -90,9 +102,9 @@ class TRPCUntypedClient {
|
|
|
90
102
|
});
|
|
91
103
|
}
|
|
92
104
|
constructor(opts){
|
|
93
|
-
_define_property
|
|
94
|
-
_define_property
|
|
95
|
-
_define_property
|
|
105
|
+
_define_property(this, "links", void 0);
|
|
106
|
+
_define_property(this, "runtime", void 0);
|
|
107
|
+
_define_property(this, "requestId", void 0);
|
|
96
108
|
this.requestId = 0;
|
|
97
109
|
this.runtime = {};
|
|
98
110
|
// Initialize the links
|
|
@@ -1,8 +1,20 @@
|
|
|
1
|
-
import { _ as _define_property } from '../node_modules/.pnpm/@swc_helpers@0.5.13/node_modules/@swc/helpers/esm/_define_property.mjs';
|
|
2
1
|
import { share, observableToPromise } from '@trpc/server/observable';
|
|
3
2
|
import { createChain } from '../links/internals/createChain.mjs';
|
|
4
3
|
import { TRPCClientError } from '../TRPCClientError.mjs';
|
|
5
4
|
|
|
5
|
+
function _define_property(obj, key, value) {
|
|
6
|
+
if (key in obj) {
|
|
7
|
+
Object.defineProperty(obj, key, {
|
|
8
|
+
value: value,
|
|
9
|
+
enumerable: true,
|
|
10
|
+
configurable: true,
|
|
11
|
+
writable: true
|
|
12
|
+
});
|
|
13
|
+
} else {
|
|
14
|
+
obj[key] = value;
|
|
15
|
+
}
|
|
16
|
+
return obj;
|
|
17
|
+
}
|
|
6
18
|
class TRPCUntypedClient {
|
|
7
19
|
$request(opts) {
|
|
8
20
|
const chain$ = createChain({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare function isOctetType(input: unknown): input is Uint8Array | Blob;
|
|
2
2
|
export declare function isFormData(input: unknown): input is FormData;
|
|
3
|
-
export declare function isNonJsonSerializable(input: unknown): input is
|
|
3
|
+
export declare function isNonJsonSerializable(input: unknown): input is FormData | Uint8Array | Blob;
|
|
4
4
|
//# sourceMappingURL=contentTypes.d.ts.map
|
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.648+77b4d8920",
|
|
4
4
|
"description": "The tRPC client library",
|
|
5
5
|
"author": "KATT",
|
|
6
6
|
"license": "MIT",
|
|
@@ -77,11 +77,11 @@
|
|
|
77
77
|
"!**/__tests__"
|
|
78
78
|
],
|
|
79
79
|
"peerDependencies": {
|
|
80
|
-
"@trpc/server": "11.0.0-rc.
|
|
80
|
+
"@trpc/server": "11.0.0-rc.648+77b4d8920",
|
|
81
81
|
"typescript": ">=5.6.2"
|
|
82
82
|
},
|
|
83
83
|
"devDependencies": {
|
|
84
|
-
"@trpc/server": "11.0.0-rc.
|
|
84
|
+
"@trpc/server": "11.0.0-rc.648+77b4d8920",
|
|
85
85
|
"@types/isomorphic-fetch": "^0.0.39",
|
|
86
86
|
"@types/node": "^22.9.0",
|
|
87
87
|
"eslint": "^9.13.0",
|
|
@@ -99,5 +99,5 @@
|
|
|
99
99
|
"funding": [
|
|
100
100
|
"https://trpc.io/sponsor"
|
|
101
101
|
],
|
|
102
|
-
"gitHead": "
|
|
102
|
+
"gitHead": "77b4d89207f682e23dc8831a4c769214d2649a0f"
|
|
103
103
|
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
function _define_property(obj, key, value) {
|
|
4
|
-
if (key in obj) {
|
|
5
|
-
Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });
|
|
6
|
-
} else obj[key] = value;
|
|
7
|
-
|
|
8
|
-
return obj;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
exports._ = _define_property;
|