@orpc/trpc 2.0.0-beta.33 → 2.0.0-beta.34
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 +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +0 -1
- package/package.json +5 -5
package/dist/index.d.mts
CHANGED
|
@@ -5,7 +5,7 @@ import { AnyMetaPlugin } from '@orpc/contract';
|
|
|
5
5
|
|
|
6
6
|
type ToORPCOutput<T> = T extends AsyncIterable<infer TData, infer TReturn, infer TNext> ? AsyncIteratorClass<TData, TReturn, TNext> : T;
|
|
7
7
|
type ToORPCRouterResult<TContext extends ORPC.Context, TRecord extends Record<string, any>> = {
|
|
8
|
-
[K in keyof TRecord]: TRecord[K] extends AnyProcedure ? ORPC.Procedure<TContext, object, ORPC.Schema<TRecord[K]['_def']['$types']['input'], unknown>, ORPC.Schema<unknown, ToORPCOutput<TRecord[K]['_def']['$types']['output']>>, object
|
|
8
|
+
[K in keyof TRecord]: TRecord[K] extends AnyProcedure ? ORPC.Procedure<TContext, object, ORPC.Schema<TRecord[K]['_def']['$types']['input'], unknown>, ORPC.Schema<unknown, ToORPCOutput<TRecord[K]['_def']['$types']['output']>>, object> : TRecord[K] extends Record<string, any> ? ToORPCRouterResult<TContext, TRecord[K]> : never;
|
|
9
9
|
};
|
|
10
10
|
/**
|
|
11
11
|
* Converts a tRPC router into an oRPC router that works with any oRPC feature.
|
package/dist/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { AnyMetaPlugin } from '@orpc/contract';
|
|
|
5
5
|
|
|
6
6
|
type ToORPCOutput<T> = T extends AsyncIterable<infer TData, infer TReturn, infer TNext> ? AsyncIteratorClass<TData, TReturn, TNext> : T;
|
|
7
7
|
type ToORPCRouterResult<TContext extends ORPC.Context, TRecord extends Record<string, any>> = {
|
|
8
|
-
[K in keyof TRecord]: TRecord[K] extends AnyProcedure ? ORPC.Procedure<TContext, object, ORPC.Schema<TRecord[K]['_def']['$types']['input'], unknown>, ORPC.Schema<unknown, ToORPCOutput<TRecord[K]['_def']['$types']['output']>>, object
|
|
8
|
+
[K in keyof TRecord]: TRecord[K] extends AnyProcedure ? ORPC.Procedure<TContext, object, ORPC.Schema<TRecord[K]['_def']['$types']['input'], unknown>, ORPC.Schema<unknown, ToORPCOutput<TRecord[K]['_def']['$types']['output']>>, object> : TRecord[K] extends Record<string, any> ? ToORPCRouterResult<TContext, TRecord[K]> : never;
|
|
9
9
|
};
|
|
10
10
|
/**
|
|
11
11
|
* Converts a tRPC router into an oRPC router that works with any oRPC feature.
|
package/dist/index.mjs
CHANGED
|
@@ -42,7 +42,6 @@ function toORPCProcedure(procedure) {
|
|
|
42
42
|
// tRPC procedure calling already validates the input/output
|
|
43
43
|
disableInputValidation: true,
|
|
44
44
|
disableOutputValidation: true,
|
|
45
|
-
opaqueReturnedErrors: true,
|
|
46
45
|
handler: async ({ context, signal, path, input, lastEventId }) => {
|
|
47
46
|
try {
|
|
48
47
|
const trpcInput = lastEventId !== void 0 && (input === void 0 || isObject(input)) ? { ...input, lastEventId } : input;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orpc/trpc",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.0.0-beta.
|
|
4
|
+
"version": "2.0.0-beta.34",
|
|
5
5
|
"description": "tRPC interop for oRPC: reuse existing tRPC routers with oRPC clients and OpenAPI",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"funding": [
|
|
@@ -40,12 +40,12 @@
|
|
|
40
40
|
"@trpc/server": ">=11.4.2"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@orpc/contract": "2.0.0-beta.
|
|
44
|
-
"@orpc/server": "2.0.0-beta.
|
|
45
|
-
"@orpc/shared": "2.0.0-beta.
|
|
43
|
+
"@orpc/contract": "2.0.0-beta.34",
|
|
44
|
+
"@orpc/server": "2.0.0-beta.34",
|
|
45
|
+
"@orpc/shared": "2.0.0-beta.34"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@orpc/openapi": "2.0.0-beta.
|
|
48
|
+
"@orpc/openapi": "2.0.0-beta.34",
|
|
49
49
|
"@trpc/server": "^11.12.0",
|
|
50
50
|
"zod": "^4.5.4"
|
|
51
51
|
},
|