@orpc/solid-query 1.14.15 → 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 -2
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { RECURSIVE_CLIENT_UNWRAP_KEYS } from '@orpc/client';
|
|
2
|
+
import { isTypescriptObject } from '@orpc/shared';
|
|
1
3
|
import { generateOperationKey } from '@orpc/tanstack-query';
|
|
2
4
|
export { generateOperationKey as buildKey } from '@orpc/tanstack-query';
|
|
3
5
|
import { skipToken } from '@tanstack/solid-query';
|
|
@@ -62,7 +64,8 @@ function createRouterUtils(client, options = {}) {
|
|
|
62
64
|
}, {
|
|
63
65
|
get(target, prop) {
|
|
64
66
|
const value = Reflect.get(target, prop);
|
|
65
|
-
|
|
67
|
+
const nextClient = isTypescriptObject(client) ? Reflect.get(client, prop) : void 0;
|
|
68
|
+
if (typeof prop !== "string" || RECURSIVE_CLIENT_UNWRAP_KEYS.has(prop) || !isTypescriptObject(nextClient)) {
|
|
66
69
|
return value;
|
|
67
70
|
}
|
|
68
71
|
const nextUtils = createRouterUtils(client[prop], { ...options, path: [...path, prop] });
|
|
@@ -70,7 +73,10 @@ function createRouterUtils(client, options = {}) {
|
|
|
70
73
|
return nextUtils;
|
|
71
74
|
}
|
|
72
75
|
return new Proxy(value, {
|
|
73
|
-
get(
|
|
76
|
+
get(target2, prop2) {
|
|
77
|
+
if (typeof prop2 !== "string" || RECURSIVE_CLIENT_UNWRAP_KEYS.has(prop2)) {
|
|
78
|
+
return Reflect.get(target2, prop2);
|
|
79
|
+
}
|
|
74
80
|
return Reflect.get(nextUtils, prop2);
|
|
75
81
|
}
|
|
76
82
|
});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orpc/solid-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": {
|
|
@@ -29,11 +29,11 @@
|
|
|
29
29
|
"peerDependencies": {
|
|
30
30
|
"@tanstack/solid-query": ">=5.80.2",
|
|
31
31
|
"solid-js": ">=1.9.0",
|
|
32
|
-
"@orpc/client": "1.
|
|
32
|
+
"@orpc/client": "1.15.0"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@orpc/shared": "1.
|
|
36
|
-
"@orpc/tanstack-query": "1.
|
|
35
|
+
"@orpc/shared": "1.15.0",
|
|
36
|
+
"@orpc/tanstack-query": "1.15.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@tanstack/solid-query": "^5.90.26",
|