@trpc/server 11.0.0-next-beta.248 → 11.0.0-next-beta.285
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.
|
@@ -415,11 +415,11 @@
|
|
|
415
415
|
"dependents": [
|
|
416
416
|
"/src/unstable-core-do-not-import/index.ts",
|
|
417
417
|
"/src/unstable-core-do-not-import/rpc/codes.ts",
|
|
418
|
+
"/src/unstable-core-do-not-import/rpc/parseTRPCMessage.ts",
|
|
418
419
|
"/src/unstable-core-do-not-import/error/TRPCError.ts",
|
|
419
420
|
"/src/unstable-core-do-not-import/middleware.ts",
|
|
420
421
|
"/src/unstable-core-do-not-import/router.ts",
|
|
421
422
|
"/src/unstable-core-do-not-import/transformer.ts",
|
|
422
|
-
"/src/unstable-core-do-not-import/rpc/parseTRPCMessage.ts",
|
|
423
423
|
"/src/unstable-core-do-not-import/procedureBuilder.ts"
|
|
424
424
|
],
|
|
425
425
|
"percent": 1.1,
|
|
@@ -610,9 +610,9 @@
|
|
|
610
610
|
"reduction": 100
|
|
611
611
|
},
|
|
612
612
|
{
|
|
613
|
-
"id": "/src/
|
|
613
|
+
"id": "/src/rpc.ts",
|
|
614
614
|
"size": 0,
|
|
615
|
-
"origSize":
|
|
615
|
+
"origSize": 36,
|
|
616
616
|
"renderedExports": [],
|
|
617
617
|
"removedExports": [],
|
|
618
618
|
"dependents": [],
|
|
@@ -620,9 +620,9 @@
|
|
|
620
620
|
"reduction": 100
|
|
621
621
|
},
|
|
622
622
|
{
|
|
623
|
-
"id": "/src/
|
|
623
|
+
"id": "/src/index.ts",
|
|
624
624
|
"size": 0,
|
|
625
|
-
"origSize":
|
|
625
|
+
"origSize": 32,
|
|
626
626
|
"renderedExports": [],
|
|
627
627
|
"removedExports": [],
|
|
628
628
|
"dependents": [],
|
|
@@ -630,9 +630,9 @@
|
|
|
630
630
|
"reduction": 100
|
|
631
631
|
},
|
|
632
632
|
{
|
|
633
|
-
"id": "/src/
|
|
633
|
+
"id": "/src/shared.ts",
|
|
634
634
|
"size": 0,
|
|
635
|
-
"origSize":
|
|
635
|
+
"origSize": 653,
|
|
636
636
|
"renderedExports": [],
|
|
637
637
|
"removedExports": [],
|
|
638
638
|
"dependents": [],
|
|
@@ -672,26 +672,26 @@
|
|
|
672
672
|
"reduction": 100
|
|
673
673
|
},
|
|
674
674
|
{
|
|
675
|
-
"id": "/src/adapters/
|
|
675
|
+
"id": "/src/adapters/fetch/index.ts",
|
|
676
676
|
"size": 0,
|
|
677
|
-
"origSize":
|
|
677
|
+
"origSize": 64,
|
|
678
678
|
"renderedExports": [],
|
|
679
679
|
"removedExports": [],
|
|
680
|
-
"dependents": [
|
|
681
|
-
"/src/adapters/express.ts",
|
|
682
|
-
"/src/adapters/next.ts",
|
|
683
|
-
"/src/adapters/standalone.ts"
|
|
684
|
-
],
|
|
680
|
+
"dependents": [],
|
|
685
681
|
"percent": 0,
|
|
686
682
|
"reduction": 100
|
|
687
683
|
},
|
|
688
684
|
{
|
|
689
|
-
"id": "/src/adapters/
|
|
685
|
+
"id": "/src/adapters/node-http/index.ts",
|
|
690
686
|
"size": 0,
|
|
691
|
-
"origSize":
|
|
687
|
+
"origSize": 67,
|
|
692
688
|
"renderedExports": [],
|
|
693
689
|
"removedExports": [],
|
|
694
|
-
"dependents": [
|
|
690
|
+
"dependents": [
|
|
691
|
+
"/src/adapters/express.ts",
|
|
692
|
+
"/src/adapters/next.ts",
|
|
693
|
+
"/src/adapters/standalone.ts"
|
|
694
|
+
],
|
|
695
695
|
"percent": 0,
|
|
696
696
|
"reduction": 100
|
|
697
697
|
}
|
|
@@ -1,6 +1,27 @@
|
|
|
1
|
-
import type { AnyRootTypes } from './rootConfig';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import type { AnyRootTypes, RootConfig } from './rootConfig';
|
|
2
|
+
/**
|
|
3
|
+
* Result of `initTRPC.create()`
|
|
4
|
+
*/
|
|
5
|
+
type InitLike = {
|
|
6
|
+
_config: RootConfig<AnyRootTypes>;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Result of `initTRPC.create().router()`
|
|
10
|
+
*/
|
|
11
|
+
type RouterLike = {
|
|
12
|
+
_def: InitLike;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Result of `initTRPC.create()._config`
|
|
16
|
+
*/
|
|
17
|
+
type RootConfigLike = {
|
|
18
|
+
$types: AnyRootTypes;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Anything that can be inferred to the root config types
|
|
22
|
+
*/
|
|
23
|
+
export type TRPCInferrable = RouterLike | InitLike | RootConfigLike | AnyRootTypes;
|
|
24
|
+
export type inferRootTypes<TInferrable extends TRPCInferrable> = TInferrable extends AnyRootTypes ? TInferrable : TInferrable extends RootConfigLike ? TInferrable['$types'] : TInferrable extends InitLike ? TInferrable['_config']['$types'] : TInferrable extends RouterLike ? TInferrable['_def']['_config']['$types'] : never;
|
|
5
25
|
export type inferErrorShape<TInferrable extends TRPCInferrable> = inferRootTypes<TInferrable>['errorShape'];
|
|
26
|
+
export {};
|
|
6
27
|
//# sourceMappingURL=TRPCInferrable.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TRPCInferrable.d.ts","sourceRoot":"","sources":["../../src/unstable-core-do-not-import/TRPCInferrable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"TRPCInferrable.d.ts","sourceRoot":"","sources":["../../src/unstable-core-do-not-import/TRPCInferrable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE7D;;GAEG;AACH,KAAK,QAAQ,GAAG;IACd,OAAO,EAAE,UAAU,CAAC,YAAY,CAAC,CAAC;CACnC,CAAC;AAEF;;GAEG;AACH,KAAK,UAAU,GAAG;IAChB,IAAI,EAAE,QAAQ,CAAC;CAChB,CAAC;AAEF;;GAEG;AACH,KAAK,cAAc,GAAG;IACpB,MAAM,EAAE,YAAY,CAAC;CACtB,CAAC;AACF;;GAEG;AACH,MAAM,MAAM,cAAc,GACtB,UAAU,GACV,QAAQ,GACR,cAAc,GACd,YAAY,CAAC;AAEjB,MAAM,MAAM,cAAc,CAAC,WAAW,SAAS,cAAc,IAC3D,WAAW,SAAS,YAAY,GAC5B,WAAW,GACX,WAAW,SAAS,cAAc,GAClC,WAAW,CAAC,QAAQ,CAAC,GACrB,WAAW,SAAS,QAAQ,GAC5B,WAAW,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,GAChC,WAAW,SAAS,UAAU,GAC9B,WAAW,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,GACxC,KAAK,CAAC;AAEZ,MAAM,MAAM,eAAe,CAAC,WAAW,SAAS,cAAc,IAC5D,cAAc,CAAC,WAAW,CAAC,CAAC,YAAY,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trpc/server",
|
|
3
|
-
"version": "11.0.0-next-beta.
|
|
3
|
+
"version": "11.0.0-next-beta.285+e18d84950",
|
|
4
4
|
"description": "The tRPC server library",
|
|
5
5
|
"author": "KATT",
|
|
6
6
|
"license": "MIT",
|
|
@@ -157,5 +157,5 @@
|
|
|
157
157
|
"funding": [
|
|
158
158
|
"https://trpc.io/sponsor"
|
|
159
159
|
],
|
|
160
|
-
"gitHead": "
|
|
160
|
+
"gitHead": "e18d84950b13f4cfce437473dde62e39a27c4879"
|
|
161
161
|
}
|
|
@@ -1,11 +1,42 @@
|
|
|
1
|
-
import type { AnyRootTypes } from './rootConfig';
|
|
2
|
-
|
|
1
|
+
import type { AnyRootTypes, RootConfig } from './rootConfig';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Result of `initTRPC.create()`
|
|
5
|
+
*/
|
|
6
|
+
type InitLike = {
|
|
7
|
+
_config: RootConfig<AnyRootTypes>;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Result of `initTRPC.create().router()`
|
|
12
|
+
*/
|
|
13
|
+
type RouterLike = {
|
|
14
|
+
_def: InitLike;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Result of `initTRPC.create()._config`
|
|
19
|
+
*/
|
|
20
|
+
type RootConfigLike = {
|
|
21
|
+
$types: AnyRootTypes;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Anything that can be inferred to the root config types
|
|
25
|
+
*/
|
|
26
|
+
export type TRPCInferrable =
|
|
27
|
+
| RouterLike
|
|
28
|
+
| InitLike
|
|
29
|
+
| RootConfigLike
|
|
30
|
+
| AnyRootTypes;
|
|
3
31
|
|
|
4
|
-
export type TRPCInferrable = AnyRouter | AnyRootTypes;
|
|
5
32
|
export type inferRootTypes<TInferrable extends TRPCInferrable> =
|
|
6
33
|
TInferrable extends AnyRootTypes
|
|
7
34
|
? TInferrable
|
|
8
|
-
: TInferrable extends
|
|
35
|
+
: TInferrable extends RootConfigLike
|
|
36
|
+
? TInferrable['$types']
|
|
37
|
+
: TInferrable extends InitLike
|
|
38
|
+
? TInferrable['_config']['$types']
|
|
39
|
+
: TInferrable extends RouterLike
|
|
9
40
|
? TInferrable['_def']['_config']['$types']
|
|
10
41
|
: never;
|
|
11
42
|
|