@orpc/trpc 1.7.0 → 1.7.2
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/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.mjs +4 -4
- package/package.json +4 -4
package/dist/index.d.mts
CHANGED
@@ -3,7 +3,8 @@ import { AnyProcedure, AnyRouter, inferRouterContext } from '@trpc/server';
|
|
3
3
|
import { inferRouterMeta } from '@trpc/server/unstable-core-do-not-import';
|
4
4
|
import * as ORPC from '@orpc/server';
|
5
5
|
|
6
|
-
interface experimental_ORPCMeta
|
6
|
+
interface experimental_ORPCMeta {
|
7
|
+
route?: ORPC.Route;
|
7
8
|
}
|
8
9
|
type experimental_ToORPCOutput<T> = T extends AsyncIterable<infer TData, infer TReturn, infer TNext> ? AsyncIteratorClass<TData, TReturn, TNext> : T;
|
9
10
|
type experimental_ToORPCRouterResult<TContext extends ORPC.Context, TMeta extends ORPC.Meta, TRecord extends Record<string, any>> = {
|
package/dist/index.d.ts
CHANGED
@@ -3,7 +3,8 @@ import { AnyProcedure, AnyRouter, inferRouterContext } from '@trpc/server';
|
|
3
3
|
import { inferRouterMeta } from '@trpc/server/unstable-core-do-not-import';
|
4
4
|
import * as ORPC from '@orpc/server';
|
5
5
|
|
6
|
-
interface experimental_ORPCMeta
|
6
|
+
interface experimental_ORPCMeta {
|
7
|
+
route?: ORPC.Route;
|
7
8
|
}
|
8
9
|
type experimental_ToORPCOutput<T> = T extends AsyncIterable<infer TData, infer TReturn, infer TNext> ? AsyncIteratorClass<TData, TReturn, TNext> : T;
|
9
10
|
type experimental_ToORPCRouterResult<TContext extends ORPC.Context, TMeta extends ORPC.Meta, TRecord extends Record<string, any>> = {
|
package/dist/index.mjs
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { mapEventIterator } from '@orpc/client';
|
2
2
|
import * as ORPC from '@orpc/server';
|
3
|
-
import { isObject, isTypescriptObject } from '@orpc/shared';
|
3
|
+
import { get, isObject, isTypescriptObject } from '@orpc/shared';
|
4
4
|
import { isTrackedEnvelope, TRPCError } from '@trpc/server';
|
5
5
|
import { isAsyncIterable, getHTTPStatusCodeFromError } from '@trpc/server/unstable-core-do-not-import';
|
6
6
|
|
@@ -15,10 +15,10 @@ function lazyToORPCRouter(lazies) {
|
|
15
15
|
const orpcRouter = {};
|
16
16
|
for (const key in lazies) {
|
17
17
|
const item = lazies[key];
|
18
|
-
orpcRouter[key] = ORPC.lazy(async () => {
|
18
|
+
orpcRouter[key] = ORPC.createAccessibleLazyRouter(ORPC.lazy(async () => {
|
19
19
|
const router = await item.ref();
|
20
20
|
return { default: experimental_toORPCRouter(router) };
|
21
|
-
});
|
21
|
+
}));
|
22
22
|
}
|
23
23
|
return orpcRouter;
|
24
24
|
}
|
@@ -40,7 +40,7 @@ function toORPCProcedure(procedure) {
|
|
40
40
|
meta: procedure._def.meta ?? {},
|
41
41
|
inputValidationIndex: 0,
|
42
42
|
outputValidationIndex: 0,
|
43
|
-
route: procedure._def.meta ?? {},
|
43
|
+
route: get(procedure._def.meta, ["route"]) ?? {},
|
44
44
|
middlewares: [],
|
45
45
|
inputSchema: toDisabledStandardSchema(procedure._def.inputs.at(-1)),
|
46
46
|
outputSchema: toDisabledStandardSchema(procedure._def.output),
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@orpc/trpc",
|
3
3
|
"type": "module",
|
4
|
-
"version": "1.7.
|
4
|
+
"version": "1.7.2",
|
5
5
|
"license": "MIT",
|
6
6
|
"homepage": "https://orpc.unnoq.com",
|
7
7
|
"repository": {
|
@@ -28,9 +28,9 @@
|
|
28
28
|
"@trpc/server": ">=11.4.2"
|
29
29
|
},
|
30
30
|
"dependencies": {
|
31
|
-
"@orpc/client": "1.7.
|
32
|
-
"@orpc/
|
33
|
-
"@orpc/
|
31
|
+
"@orpc/client": "1.7.2",
|
32
|
+
"@orpc/server": "1.7.2",
|
33
|
+
"@orpc/shared": "1.7.2"
|
34
34
|
},
|
35
35
|
"devDependencies": {
|
36
36
|
"@trpc/server": "^11.4.3",
|