@spoosh/react 0.2.3 → 0.3.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.js +3 -3
- package/dist/index.mjs +3 -3
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -177,7 +177,7 @@ function createUseRead(options) {
|
|
|
177
177
|
return executeWithTracking(true);
|
|
178
178
|
}, [executeWithTracking]);
|
|
179
179
|
const entry = stateManager.getCache(queryKey);
|
|
180
|
-
const pluginResultData = entry?.
|
|
180
|
+
const pluginResultData = entry?.meta ? Object.fromEntries(entry.meta) : {};
|
|
181
181
|
const opts = capturedCall.options;
|
|
182
182
|
const inputInner = {};
|
|
183
183
|
if (opts?.query !== void 0) {
|
|
@@ -303,7 +303,7 @@ function createUseWrite(options) {
|
|
|
303
303
|
[selectedEndpoint.path]
|
|
304
304
|
);
|
|
305
305
|
const entry = stateManager.getCache(queryKey);
|
|
306
|
-
const pluginResultData = entry?.
|
|
306
|
+
const pluginResultData = entry?.meta ? Object.fromEntries(entry.meta) : {};
|
|
307
307
|
const opts = lastTriggerOptions;
|
|
308
308
|
const inputInner = {};
|
|
309
309
|
if (opts?.query !== void 0) {
|
|
@@ -495,7 +495,7 @@ function createUseInfiniteRead(options) {
|
|
|
495
495
|
controller.update(prevContext);
|
|
496
496
|
}, [JSON.stringify(pluginOpts)]);
|
|
497
497
|
const entry = stateManager.getCache(queryKey);
|
|
498
|
-
const pluginResultData = entry?.
|
|
498
|
+
const pluginResultData = entry?.meta ? Object.fromEntries(entry.meta) : {};
|
|
499
499
|
const result = {
|
|
500
500
|
meta: pluginResultData,
|
|
501
501
|
data: state.data,
|
package/dist/index.mjs
CHANGED
|
@@ -161,7 +161,7 @@ function createUseRead(options) {
|
|
|
161
161
|
return executeWithTracking(true);
|
|
162
162
|
}, [executeWithTracking]);
|
|
163
163
|
const entry = stateManager.getCache(queryKey);
|
|
164
|
-
const pluginResultData = entry?.
|
|
164
|
+
const pluginResultData = entry?.meta ? Object.fromEntries(entry.meta) : {};
|
|
165
165
|
const opts = capturedCall.options;
|
|
166
166
|
const inputInner = {};
|
|
167
167
|
if (opts?.query !== void 0) {
|
|
@@ -298,7 +298,7 @@ function createUseWrite(options) {
|
|
|
298
298
|
[selectedEndpoint.path]
|
|
299
299
|
);
|
|
300
300
|
const entry = stateManager.getCache(queryKey);
|
|
301
|
-
const pluginResultData = entry?.
|
|
301
|
+
const pluginResultData = entry?.meta ? Object.fromEntries(entry.meta) : {};
|
|
302
302
|
const opts = lastTriggerOptions;
|
|
303
303
|
const inputInner = {};
|
|
304
304
|
if (opts?.query !== void 0) {
|
|
@@ -501,7 +501,7 @@ function createUseInfiniteRead(options) {
|
|
|
501
501
|
controller.update(prevContext);
|
|
502
502
|
}, [JSON.stringify(pluginOpts)]);
|
|
503
503
|
const entry = stateManager.getCache(queryKey);
|
|
504
|
-
const pluginResultData = entry?.
|
|
504
|
+
const pluginResultData = entry?.meta ? Object.fromEntries(entry.meta) : {};
|
|
505
505
|
const result = {
|
|
506
506
|
meta: pluginResultData,
|
|
507
507
|
data: state.data,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spoosh/react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "React hooks for Spoosh API client",
|
|
6
6
|
"keywords": [
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"react": "^18 || ^19"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@spoosh/core": "0.
|
|
41
|
+
"@spoosh/core": "0.5.0"
|
|
42
42
|
},
|
|
43
43
|
"scripts": {
|
|
44
44
|
"dev": "tsup --watch",
|