@orpc/client 0.12.0 → 0.13.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.js +1 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/procedure.d.ts +1 -0
- package/dist/src/router.d.ts +3 -2
- package/package.json +9 -8
package/dist/index.js
CHANGED
package/dist/src/index.d.ts
CHANGED
package/dist/src/procedure.d.ts
CHANGED
@@ -24,3 +24,4 @@ export interface CreateProcedureClientOptions {
|
|
24
24
|
path: string[];
|
25
25
|
}
|
26
26
|
export declare function createProcedureClient<TInputSchema extends Schema, TOutputSchema extends Schema, TFuncOutput extends SchemaOutput<TOutputSchema>>(options: CreateProcedureClientOptions): ProcedureClient<TInputSchema, TOutputSchema, TFuncOutput>;
|
27
|
+
//# sourceMappingURL=procedure.d.ts.map
|
package/dist/src/router.d.ts
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
import type { ContractProcedure, ContractRouter, SchemaOutput } from '@orpc/contract';
|
2
|
-
import type { Procedure, Router } from '@orpc/server';
|
2
|
+
import type { Lazy, Procedure, Router } from '@orpc/server';
|
3
3
|
import type { Promisable } from '@orpc/shared';
|
4
4
|
import { type ProcedureClient } from './procedure';
|
5
5
|
export type RouterClientWithContractRouter<TRouter extends ContractRouter> = {
|
6
6
|
[K in keyof TRouter]: TRouter[K] extends ContractProcedure<infer UInputSchema, infer UOutputSchema> ? ProcedureClient<UInputSchema, UOutputSchema, SchemaOutput<UOutputSchema>> : TRouter[K] extends ContractRouter ? RouterClientWithContractRouter<TRouter[K]> : never;
|
7
7
|
};
|
8
8
|
export type RouterClientWithRouter<TRouter extends Router<any>> = {
|
9
|
-
[K in keyof TRouter]: TRouter[K] extends Procedure<any, any, infer UInputSchema, infer UOutputSchema, infer UFuncOutput> ? ProcedureClient<UInputSchema, UOutputSchema, UFuncOutput> : TRouter[K] extends Router<any> ? RouterClientWithRouter<TRouter[K]> : never;
|
9
|
+
[K in keyof TRouter]: TRouter[K] extends Procedure<any, any, infer UInputSchema, infer UOutputSchema, infer UFuncOutput> | Lazy<Procedure<any, any, infer UInputSchema, infer UOutputSchema, infer UFuncOutput>> ? ProcedureClient<UInputSchema, UOutputSchema, UFuncOutput> : TRouter[K] extends Router<any> ? RouterClientWithRouter<TRouter[K]> : never;
|
10
10
|
};
|
11
11
|
export interface CreateRouterClientOptions {
|
12
12
|
/**
|
@@ -31,3 +31,4 @@ export interface CreateRouterClientOptions {
|
|
31
31
|
path?: string[];
|
32
32
|
}
|
33
33
|
export declare function createRouterClient<TRouter extends Router<any> | ContractRouter>(options: CreateRouterClientOptions): TRouter extends Router<any> ? RouterClientWithRouter<TRouter> : TRouter extends ContractRouter ? RouterClientWithContractRouter<TRouter> : never;
|
34
|
+
//# sourceMappingURL=router.d.ts.map
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@orpc/client",
|
3
3
|
"type": "module",
|
4
|
-
"version": "0.
|
4
|
+
"version": "0.13.0",
|
5
5
|
"license": "MIT",
|
6
6
|
"homepage": "https://orpc.unnoq.com",
|
7
7
|
"repository": {
|
@@ -24,23 +24,24 @@
|
|
24
24
|
}
|
25
25
|
},
|
26
26
|
"files": [
|
27
|
-
"
|
27
|
+
"!**/*.map",
|
28
|
+
"!**/*.tsbuildinfo",
|
28
29
|
"dist"
|
29
30
|
],
|
30
31
|
"peerDependencies": {
|
31
|
-
"@orpc/
|
32
|
-
"@orpc/
|
32
|
+
"@orpc/contract": "0.13.0",
|
33
|
+
"@orpc/server": "0.13.0"
|
33
34
|
},
|
34
35
|
"dependencies": {
|
35
|
-
"@orpc/
|
36
|
-
"@orpc/
|
36
|
+
"@orpc/shared": "0.13.0",
|
37
|
+
"@orpc/transformer": "0.13.0"
|
37
38
|
},
|
38
39
|
"devDependencies": {
|
39
40
|
"zod": "^3.23.8",
|
40
|
-
"@orpc/openapi": "0.
|
41
|
+
"@orpc/openapi": "0.13.0"
|
41
42
|
},
|
42
43
|
"scripts": {
|
43
|
-
"build": "tsup --clean --entry.index=src/index.ts --format=esm --onSuccess='tsc -b --noCheck'",
|
44
|
+
"build": "tsup --clean --sourcemap --entry.index=src/index.ts --format=esm --onSuccess='tsc -b --noCheck'",
|
44
45
|
"build:watch": "pnpm run build --watch",
|
45
46
|
"type:check": "tsc -b"
|
46
47
|
}
|