@trpc/client 10.0.0-proxy-beta.11 → 10.0.0-proxy-beta.13
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.js +1 -1
- package/dist/index.mjs +2 -2
- package/package.json +4 -4
- package/src/createTRPCClientProxy.ts +2 -2
package/dist/index.js
CHANGED
|
@@ -229,7 +229,7 @@ const clientCallTypeMap = {
|
|
|
229
229
|
* @deprecated use `createTRPCProxyClient` instead
|
|
230
230
|
* @internal
|
|
231
231
|
*/ function createTRPCClientProxy(client) {
|
|
232
|
-
const proxy = shared.
|
|
232
|
+
const proxy = shared.createRecursiveProxy(({ path , args })=>{
|
|
233
233
|
const pathCopy = [
|
|
234
234
|
...path
|
|
235
235
|
];
|
package/dist/index.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import { c as createChain } from './splitLink-ad44a55d.mjs';
|
|
|
5
5
|
export { s as splitLink } from './splitLink-ad44a55d.mjs';
|
|
6
6
|
import { httpBatchLink } from './links/httpBatchLink.mjs';
|
|
7
7
|
export { httpBatchLink } from './links/httpBatchLink.mjs';
|
|
8
|
-
import {
|
|
8
|
+
import { createRecursiveProxy } from '@trpc/server/shared';
|
|
9
9
|
export { g as getFetch } from './httpUtils-d1885508.mjs';
|
|
10
10
|
export { httpLink } from './links/httpLink.mjs';
|
|
11
11
|
export { loggerLink } from './links/loggerLink.mjs';
|
|
@@ -228,7 +228,7 @@ const clientCallTypeMap = {
|
|
|
228
228
|
* @deprecated use `createTRPCProxyClient` instead
|
|
229
229
|
* @internal
|
|
230
230
|
*/ function createTRPCClientProxy(client) {
|
|
231
|
-
const proxy =
|
|
231
|
+
const proxy = createRecursiveProxy(({ path , args })=>{
|
|
232
232
|
const pathCopy = [
|
|
233
233
|
...path
|
|
234
234
|
];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trpc/client",
|
|
3
|
-
"version": "10.0.0-proxy-beta.
|
|
3
|
+
"version": "10.0.0-proxy-beta.13",
|
|
4
4
|
"description": "tRPC Client lib",
|
|
5
5
|
"author": "KATT",
|
|
6
6
|
"license": "MIT",
|
|
@@ -63,15 +63,15 @@
|
|
|
63
63
|
"ts-watch": "tsc --project tsconfig.watch.json"
|
|
64
64
|
},
|
|
65
65
|
"peerDependencies": {
|
|
66
|
-
"@trpc/server": "10.0.0-proxy-beta.
|
|
66
|
+
"@trpc/server": "10.0.0-proxy-beta.13"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
69
|
"@testing-library/dom": "^8.18.1",
|
|
70
|
-
"@trpc/server": "10.0.0-proxy-beta.
|
|
70
|
+
"@trpc/server": "10.0.0-proxy-beta.13",
|
|
71
71
|
"@types/node": "^18.7.20"
|
|
72
72
|
},
|
|
73
73
|
"publishConfig": {
|
|
74
74
|
"access": "public"
|
|
75
75
|
},
|
|
76
|
-
"gitHead": "
|
|
76
|
+
"gitHead": "017ac71d5b0cc37d6c1fa22d03377a99a17b6dde"
|
|
77
77
|
}
|
|
@@ -16,7 +16,7 @@ import type {
|
|
|
16
16
|
Unsubscribable,
|
|
17
17
|
inferObservableValue,
|
|
18
18
|
} from '@trpc/server/observable';
|
|
19
|
-
import {
|
|
19
|
+
import { createRecursiveProxy } from '@trpc/server/shared';
|
|
20
20
|
import { TRPCClientError } from './TRPCClientError';
|
|
21
21
|
import { CreateTRPCClientOptions } from './createTRPCClient';
|
|
22
22
|
import {
|
|
@@ -98,7 +98,7 @@ const clientCallTypeMap: Record<
|
|
|
98
98
|
export function createTRPCClientProxy<TRouter extends AnyRouter>(
|
|
99
99
|
client: Client<TRouter>,
|
|
100
100
|
) {
|
|
101
|
-
const proxy =
|
|
101
|
+
const proxy = createRecursiveProxy(({ path, args }) => {
|
|
102
102
|
const pathCopy = [...path];
|
|
103
103
|
const clientCallType = pathCopy.pop()! as keyof DecorateProcedure<any, any>;
|
|
104
104
|
|