@orpc/tanstack-query 1.14.14 → 1.15.0
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.mjs +8 -3
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { stringifyJSON, isAsyncIteratorObject, toArray, get } from '@orpc/shared';
|
|
1
|
+
import { stringifyJSON, isAsyncIteratorObject, toArray, isTypescriptObject, get } from '@orpc/shared';
|
|
2
2
|
import { skipToken } from '@tanstack/query-core';
|
|
3
|
+
import { RECURSIVE_CLIENT_UNWRAP_KEYS } from '@orpc/client';
|
|
3
4
|
|
|
4
5
|
function generateOperationKey(path, state = {}) {
|
|
5
6
|
return [path, {
|
|
@@ -267,7 +268,8 @@ function createRouterUtils(client, options = {}) {
|
|
|
267
268
|
}, {
|
|
268
269
|
get(target, prop) {
|
|
269
270
|
const value = Reflect.get(target, prop);
|
|
270
|
-
|
|
271
|
+
const nextClient = isTypescriptObject(client) ? Reflect.get(client, prop) : void 0;
|
|
272
|
+
if (typeof prop !== "string" || RECURSIVE_CLIENT_UNWRAP_KEYS.has(prop) || !isTypescriptObject(nextClient)) {
|
|
271
273
|
return value;
|
|
272
274
|
}
|
|
273
275
|
const nextUtils = createRouterUtils(client[prop], {
|
|
@@ -279,7 +281,10 @@ function createRouterUtils(client, options = {}) {
|
|
|
279
281
|
return nextUtils;
|
|
280
282
|
}
|
|
281
283
|
return new Proxy(value, {
|
|
282
|
-
get(
|
|
284
|
+
get(target2, prop2) {
|
|
285
|
+
if (typeof prop2 !== "string" || RECURSIVE_CLIENT_UNWRAP_KEYS.has(prop2)) {
|
|
286
|
+
return Reflect.get(target2, prop2);
|
|
287
|
+
}
|
|
283
288
|
return Reflect.get(nextUtils, prop2);
|
|
284
289
|
}
|
|
285
290
|
});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orpc/tanstack-query",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.15.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://orpc.dev",
|
|
7
7
|
"repository": {
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
],
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"@tanstack/query-core": ">=5.80.2",
|
|
29
|
-
"@orpc/client": "1.
|
|
29
|
+
"@orpc/client": "1.15.0"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@orpc/shared": "1.
|
|
32
|
+
"@orpc/shared": "1.15.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@angular/core": "^21.2.4",
|