@tanstack/query-core 5.86.0 → 5.87.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/build/legacy/{hydration-BpLOP9Dw.d.ts → hydration-BYonJkjc.d.ts} +1 -1
- package/build/legacy/{hydration-BC7iBQD-.d.cts → hydration-_hO-y142.d.cts} +1 -1
- package/build/legacy/hydration.d.cts +1 -1
- package/build/legacy/hydration.d.ts +1 -1
- package/build/legacy/index.cjs +14 -12
- package/build/legacy/index.cjs.map +1 -1
- package/build/legacy/index.d.cts +5 -4
- package/build/legacy/index.d.ts +5 -4
- package/build/legacy/index.js +26 -23
- package/build/legacy/index.js.map +1 -1
- package/build/legacy/infiniteQueryBehavior.d.cts +1 -1
- package/build/legacy/infiniteQueryBehavior.d.ts +1 -1
- package/build/legacy/infiniteQueryObserver.d.cts +1 -1
- package/build/legacy/infiniteQueryObserver.d.ts +1 -1
- package/build/legacy/mutation.d.cts +1 -1
- package/build/legacy/mutation.d.ts +1 -1
- package/build/legacy/mutationCache.d.cts +1 -1
- package/build/legacy/mutationCache.d.ts +1 -1
- package/build/legacy/mutationObserver.d.cts +1 -1
- package/build/legacy/mutationObserver.d.ts +1 -1
- package/build/legacy/notifyManager.cjs +2 -1
- package/build/legacy/notifyManager.cjs.map +1 -1
- package/build/legacy/notifyManager.js +2 -1
- package/build/legacy/notifyManager.js.map +1 -1
- package/build/legacy/queriesObserver.d.cts +1 -1
- package/build/legacy/queriesObserver.d.ts +1 -1
- package/build/legacy/query.d.cts +1 -1
- package/build/legacy/query.d.ts +1 -1
- package/build/legacy/queryCache.d.cts +1 -1
- package/build/legacy/queryCache.d.ts +1 -1
- package/build/legacy/queryClient.d.cts +1 -1
- package/build/legacy/queryClient.d.ts +1 -1
- package/build/legacy/queryObserver.cjs +5 -4
- package/build/legacy/queryObserver.cjs.map +1 -1
- package/build/legacy/queryObserver.d.cts +1 -1
- package/build/legacy/queryObserver.d.ts +1 -1
- package/build/legacy/queryObserver.js +5 -4
- package/build/legacy/queryObserver.js.map +1 -1
- package/build/legacy/removable.cjs +3 -2
- package/build/legacy/removable.cjs.map +1 -1
- package/build/legacy/removable.js +3 -2
- package/build/legacy/removable.js.map +1 -1
- package/build/legacy/retryer.d.cts +1 -1
- package/build/legacy/retryer.d.ts +1 -1
- package/build/legacy/streamedQuery.d.cts +1 -1
- package/build/legacy/streamedQuery.d.ts +1 -1
- package/build/legacy/timeoutManager.cjs +110 -0
- package/build/legacy/timeoutManager.cjs.map +1 -0
- package/build/legacy/timeoutManager.d.cts +58 -0
- package/build/legacy/timeoutManager.d.ts +58 -0
- package/build/legacy/timeoutManager.js +81 -0
- package/build/legacy/timeoutManager.js.map +1 -0
- package/build/legacy/types.d.cts +1 -1
- package/build/legacy/types.d.ts +1 -1
- package/build/legacy/utils.cjs +2 -1
- package/build/legacy/utils.cjs.map +1 -1
- package/build/legacy/utils.d.cts +1 -1
- package/build/legacy/utils.d.ts +1 -1
- package/build/legacy/utils.js +2 -1
- package/build/legacy/utils.js.map +1 -1
- package/build/modern/{hydration-BpLOP9Dw.d.ts → hydration-BYonJkjc.d.ts} +1 -1
- package/build/modern/{hydration-BC7iBQD-.d.cts → hydration-_hO-y142.d.cts} +1 -1
- package/build/modern/hydration.d.cts +1 -1
- package/build/modern/hydration.d.ts +1 -1
- package/build/modern/index.cjs +14 -12
- package/build/modern/index.cjs.map +1 -1
- package/build/modern/index.d.cts +5 -4
- package/build/modern/index.d.ts +5 -4
- package/build/modern/index.js +26 -23
- package/build/modern/index.js.map +1 -1
- package/build/modern/infiniteQueryBehavior.d.cts +1 -1
- package/build/modern/infiniteQueryBehavior.d.ts +1 -1
- package/build/modern/infiniteQueryObserver.d.cts +1 -1
- package/build/modern/infiniteQueryObserver.d.ts +1 -1
- package/build/modern/mutation.d.cts +1 -1
- package/build/modern/mutation.d.ts +1 -1
- package/build/modern/mutationCache.d.cts +1 -1
- package/build/modern/mutationCache.d.ts +1 -1
- package/build/modern/mutationObserver.d.cts +1 -1
- package/build/modern/mutationObserver.d.ts +1 -1
- package/build/modern/notifyManager.cjs +2 -1
- package/build/modern/notifyManager.cjs.map +1 -1
- package/build/modern/notifyManager.js +2 -1
- package/build/modern/notifyManager.js.map +1 -1
- package/build/modern/queriesObserver.d.cts +1 -1
- package/build/modern/queriesObserver.d.ts +1 -1
- package/build/modern/query.d.cts +1 -1
- package/build/modern/query.d.ts +1 -1
- package/build/modern/queryCache.d.cts +1 -1
- package/build/modern/queryCache.d.ts +1 -1
- package/build/modern/queryClient.d.cts +1 -1
- package/build/modern/queryClient.d.ts +1 -1
- package/build/modern/queryObserver.cjs +5 -4
- package/build/modern/queryObserver.cjs.map +1 -1
- package/build/modern/queryObserver.d.cts +1 -1
- package/build/modern/queryObserver.d.ts +1 -1
- package/build/modern/queryObserver.js +5 -4
- package/build/modern/queryObserver.js.map +1 -1
- package/build/modern/removable.cjs +3 -2
- package/build/modern/removable.cjs.map +1 -1
- package/build/modern/removable.js +3 -2
- package/build/modern/removable.js.map +1 -1
- package/build/modern/retryer.d.cts +1 -1
- package/build/modern/retryer.d.ts +1 -1
- package/build/modern/streamedQuery.d.cts +1 -1
- package/build/modern/streamedQuery.d.ts +1 -1
- package/build/modern/timeoutManager.cjs +98 -0
- package/build/modern/timeoutManager.cjs.map +1 -0
- package/build/modern/timeoutManager.d.cts +58 -0
- package/build/modern/timeoutManager.d.ts +58 -0
- package/build/modern/timeoutManager.js +70 -0
- package/build/modern/timeoutManager.js.map +1 -0
- package/build/modern/types.d.cts +1 -1
- package/build/modern/types.d.ts +1 -1
- package/build/modern/utils.cjs +2 -1
- package/build/modern/utils.cjs.map +1 -1
- package/build/modern/utils.d.cts +1 -1
- package/build/modern/utils.d.ts +1 -1
- package/build/modern/utils.js +2 -1
- package/build/modern/utils.js.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +32 -27
- package/src/notifyManager.ts +3 -1
- package/src/queryObserver.ts +8 -6
- package/src/removable.ts +5 -3
- package/src/timeoutManager.ts +135 -0
- package/src/utils.ts +2 -1
package/build/modern/index.cjs
CHANGED
|
@@ -39,7 +39,7 @@ __export(index_exports, {
|
|
|
39
39
|
focusManager: () => import_focusManager.focusManager,
|
|
40
40
|
hashKey: () => import_utils.hashKey,
|
|
41
41
|
hydrate: () => import_hydration.hydrate,
|
|
42
|
-
isCancelledError: () =>
|
|
42
|
+
isCancelledError: () => import_retryer.isCancelledError,
|
|
43
43
|
isServer: () => import_utils.isServer,
|
|
44
44
|
keepPreviousData: () => import_utils.keepPreviousData,
|
|
45
45
|
matchMutation: () => import_utils.matchMutation,
|
|
@@ -50,27 +50,28 @@ __export(index_exports, {
|
|
|
50
50
|
partialMatchKey: () => import_utils.partialMatchKey,
|
|
51
51
|
replaceEqualDeep: () => import_utils.replaceEqualDeep,
|
|
52
52
|
shouldThrowError: () => import_utils.shouldThrowError,
|
|
53
|
-
skipToken: () => import_utils.skipToken
|
|
53
|
+
skipToken: () => import_utils.skipToken,
|
|
54
|
+
timeoutManager: () => import_timeoutManager.timeoutManager
|
|
54
55
|
});
|
|
55
56
|
module.exports = __toCommonJS(index_exports);
|
|
56
|
-
var
|
|
57
|
-
var
|
|
58
|
-
var import_queryClient = require("./queryClient.cjs");
|
|
59
|
-
var import_queryObserver = require("./queryObserver.cjs");
|
|
60
|
-
var import_queriesObserver = require("./queriesObserver.cjs");
|
|
57
|
+
var import_focusManager = require("./focusManager.cjs");
|
|
58
|
+
var import_hydration = require("./hydration.cjs");
|
|
61
59
|
var import_infiniteQueryObserver = require("./infiniteQueryObserver.cjs");
|
|
62
60
|
var import_mutationCache = require("./mutationCache.cjs");
|
|
63
61
|
var import_mutationObserver = require("./mutationObserver.cjs");
|
|
64
62
|
var import_notifyManager = require("./notifyManager.cjs");
|
|
65
|
-
var import_focusManager = require("./focusManager.cjs");
|
|
66
63
|
var import_onlineManager = require("./onlineManager.cjs");
|
|
64
|
+
var import_queriesObserver = require("./queriesObserver.cjs");
|
|
65
|
+
var import_queryCache = require("./queryCache.cjs");
|
|
66
|
+
var import_queryClient = require("./queryClient.cjs");
|
|
67
|
+
var import_queryObserver = require("./queryObserver.cjs");
|
|
68
|
+
var import_retryer = require("./retryer.cjs");
|
|
69
|
+
var import_timeoutManager = require("./timeoutManager.cjs");
|
|
67
70
|
var import_utils = require("./utils.cjs");
|
|
68
|
-
var import_retryer2 = require("./retryer.cjs");
|
|
69
|
-
var import_hydration = require("./hydration.cjs");
|
|
70
71
|
var import_streamedQuery = require("./streamedQuery.cjs");
|
|
71
|
-
__reExport(index_exports, require("./types.cjs"), module.exports);
|
|
72
|
-
var import_query = require("./query.cjs");
|
|
73
72
|
var import_mutation = require("./mutation.cjs");
|
|
73
|
+
var import_query = require("./query.cjs");
|
|
74
|
+
__reExport(index_exports, require("./types.cjs"), module.exports);
|
|
74
75
|
// Annotate the CommonJS export names for ESM import in node:
|
|
75
76
|
0 && (module.exports = {
|
|
76
77
|
CancelledError,
|
|
@@ -103,6 +104,7 @@ var import_mutation = require("./mutation.cjs");
|
|
|
103
104
|
replaceEqualDeep,
|
|
104
105
|
shouldThrowError,
|
|
105
106
|
skipToken,
|
|
107
|
+
timeoutManager,
|
|
106
108
|
...require("./types.cjs")
|
|
107
109
|
});
|
|
108
110
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["/* istanbul ignore file */\n\nexport {
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["/* istanbul ignore file */\n\nexport { focusManager } from './focusManager'\nexport {\n defaultShouldDehydrateMutation,\n defaultShouldDehydrateQuery,\n dehydrate,\n hydrate,\n} from './hydration'\nexport { InfiniteQueryObserver } from './infiniteQueryObserver'\nexport { MutationCache } from './mutationCache'\nexport type { MutationCacheNotifyEvent } from './mutationCache'\nexport { MutationObserver } from './mutationObserver'\nexport { defaultScheduler, notifyManager } from './notifyManager'\nexport { onlineManager } from './onlineManager'\nexport { QueriesObserver } from './queriesObserver'\nexport { QueryCache } from './queryCache'\nexport type { QueryCacheNotifyEvent } from './queryCache'\nexport { QueryClient } from './queryClient'\nexport { QueryObserver } from './queryObserver'\nexport { CancelledError, isCancelledError } from './retryer'\nexport {\n timeoutManager,\n type ManagedTimerId,\n type TimeoutCallback,\n type TimeoutProvider,\n} from './timeoutManager'\nexport {\n hashKey,\n isServer,\n keepPreviousData,\n matchMutation,\n matchQuery,\n noop,\n partialMatchKey,\n replaceEqualDeep,\n shouldThrowError,\n skipToken,\n} from './utils'\nexport type { MutationFilters, QueryFilters, SkipToken, Updater } from './utils'\n\nexport { streamedQuery as experimental_streamedQuery } from './streamedQuery'\n\n// Types\nexport type {\n DehydratedState,\n DehydrateOptions,\n HydrateOptions,\n} from './hydration'\nexport { Mutation } from './mutation'\nexport type { MutationState } from './mutation'\nexport type { QueriesObserverOptions } from './queriesObserver'\nexport { Query } from './query'\nexport type { QueryState } from './query'\nexport * from './types'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,0BAA6B;AAC7B,uBAKO;AACP,mCAAsC;AACtC,2BAA8B;AAE9B,8BAAiC;AACjC,2BAAgD;AAChD,2BAA8B;AAC9B,6BAAgC;AAChC,wBAA2B;AAE3B,yBAA4B;AAC5B,2BAA8B;AAC9B,qBAAiD;AACjD,4BAKO;AACP,mBAWO;AAGP,2BAA4D;AAQ5D,sBAAyB;AAGzB,mBAAsB;AAEtB,0BAAc,wBAtDd;","names":[]}
|
package/build/modern/index.d.cts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
1
|
+
export { focusManager } from './focusManager.cjs';
|
|
2
|
+
export { T as AnyDataTag, b6 as CancelOptions, C as CancelledError, V as DataTag, G as DefaultError, b5 as DefaultOptions, ak as DefaultedInfiniteQueryObserverOptions, ai as DefaultedQueryObserverOptions, aP as DefinedInfiniteQueryObserverResult, aG as DefinedQueryObserverResult, w as DehydrateOptions, D as DehydratedState, B as DistributiveOmit, $ as Enabled, an as EnsureInfiniteQueryDataOptions, am as EnsureQueryDataOptions, ao as FetchInfiniteQueryOptions, av as FetchNextPageOptions, aw as FetchPreviousPageOptions, al as FetchQueryOptions, ay as FetchStatus, a7 as GetNextPageParamFunction, a6 as GetPreviousPageParamFunction, H as HydrateOptions, W as InferDataFromTag, X as InferErrorFromTag, a8 as InfiniteData, aI as InfiniteQueryObserverBaseResult, aL as InfiniteQueryObserverLoadingErrorResult, aK as InfiniteQueryObserverLoadingResult, aj as InfiniteQueryObserverOptions, aJ as InfiniteQueryObserverPendingResult, aO as InfiniteQueryObserverPlaceholderResult, aM as InfiniteQueryObserverRefetchErrorResult, aQ as InfiniteQueryObserverResult, aN as InfiniteQueryObserverSuccessResult, ae as InfiniteQueryPageParamsOptions, a2 as InitialDataFunction, ad as InitialPageParam, at as InvalidateOptions, ar as InvalidateQueryFilters, aZ as MutateFunction, aY as MutateOptions, x as Mutation, M as MutationCache, c as MutationCacheNotifyEvent, u as MutationFilters, aV as MutationFunction, aR as MutationKey, aU as MutationMeta, e as MutationObserver, a_ as MutationObserverBaseResult, b1 as MutationObserverErrorResult, a$ as MutationObserverIdleResult, b0 as MutationObserverLoadingResult, aX as MutationObserverOptions, b3 as MutationObserverResult, b2 as MutationObserverSuccessResult, aW as MutationOptions, aT as MutationScope, y as MutationState, aS as MutationStatus, aa as NetworkMode, F as NoInfer, N as NonUndefinedGuard, b9 as NotifyEvent, b8 as NotifyEventType, ab as NotifyOnChangeProps, O as OmitKeyof, E as Override, a3 as PlaceholderDataFunction, a4 as QueriesPlaceholderDataFunction, z as Query, Q as QueryCache, f as QueryCacheNotifyEvent, g as QueryClient, b4 as QueryClientConfig, v as QueryFilters, Y as QueryFunction, a1 as QueryFunctionContext, I as QueryKey, a5 as QueryKeyHashFunction, a9 as QueryMeta, i as QueryObserver, az as QueryObserverBaseResult, aC as QueryObserverLoadingErrorResult, aB as QueryObserverLoadingResult, ag as QueryObserverOptions, aA as QueryObserverPendingResult, aF as QueryObserverPlaceholderResult, aD as QueryObserverRefetchErrorResult, aH as QueryObserverResult, aE as QueryObserverSuccessResult, ac as QueryOptions, a0 as QueryPersister, A as QueryState, ax as QueryStatus, aq as RefetchOptions, as as RefetchQueryFilters, R as Register, au as ResetOptions, ap as ResultOptions, b7 as SetDataOptions, S as SkipToken, Z as StaleTime, _ as StaleTimeFunction, af as ThrowOnError, P as UnsetMarker, U as Updater, ah as WithRequired, K as dataTagErrorSymbol, J as dataTagSymbol, d as defaultShouldDehydrateMutation, a as defaultShouldDehydrateQuery, b as dehydrate, k as hashKey, h as hydrate, j as isCancelledError, l as isServer, m as keepPreviousData, n as matchMutation, o as matchQuery, p as noop, q as partialMatchKey, r as replaceEqualDeep, s as shouldThrowError, t as skipToken, L as unsetMarker } from './hydration-_hO-y142.cjs';
|
|
3
3
|
export { InfiniteQueryObserver } from './infiniteQueryObserver.cjs';
|
|
4
4
|
export { defaultScheduler, notifyManager } from './notifyManager.cjs';
|
|
5
|
-
export { focusManager } from './focusManager.cjs';
|
|
6
5
|
export { onlineManager } from './onlineManager.cjs';
|
|
6
|
+
export { QueriesObserver, QueriesObserverOptions } from './queriesObserver.cjs';
|
|
7
|
+
export { ManagedTimerId, TimeoutCallback, TimeoutProvider, timeoutManager } from './timeoutManager.cjs';
|
|
7
8
|
export { streamedQuery as experimental_streamedQuery } from './streamedQuery.cjs';
|
|
8
|
-
import './removable.cjs';
|
|
9
9
|
import './subscribable.cjs';
|
|
10
|
+
import './removable.cjs';
|
package/build/modern/index.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
1
|
+
export { focusManager } from './focusManager.js';
|
|
2
|
+
export { T as AnyDataTag, b6 as CancelOptions, C as CancelledError, V as DataTag, G as DefaultError, b5 as DefaultOptions, ak as DefaultedInfiniteQueryObserverOptions, ai as DefaultedQueryObserverOptions, aP as DefinedInfiniteQueryObserverResult, aG as DefinedQueryObserverResult, w as DehydrateOptions, D as DehydratedState, B as DistributiveOmit, $ as Enabled, an as EnsureInfiniteQueryDataOptions, am as EnsureQueryDataOptions, ao as FetchInfiniteQueryOptions, av as FetchNextPageOptions, aw as FetchPreviousPageOptions, al as FetchQueryOptions, ay as FetchStatus, a7 as GetNextPageParamFunction, a6 as GetPreviousPageParamFunction, H as HydrateOptions, W as InferDataFromTag, X as InferErrorFromTag, a8 as InfiniteData, aI as InfiniteQueryObserverBaseResult, aL as InfiniteQueryObserverLoadingErrorResult, aK as InfiniteQueryObserverLoadingResult, aj as InfiniteQueryObserverOptions, aJ as InfiniteQueryObserverPendingResult, aO as InfiniteQueryObserverPlaceholderResult, aM as InfiniteQueryObserverRefetchErrorResult, aQ as InfiniteQueryObserverResult, aN as InfiniteQueryObserverSuccessResult, ae as InfiniteQueryPageParamsOptions, a2 as InitialDataFunction, ad as InitialPageParam, at as InvalidateOptions, ar as InvalidateQueryFilters, aZ as MutateFunction, aY as MutateOptions, x as Mutation, M as MutationCache, c as MutationCacheNotifyEvent, u as MutationFilters, aV as MutationFunction, aR as MutationKey, aU as MutationMeta, e as MutationObserver, a_ as MutationObserverBaseResult, b1 as MutationObserverErrorResult, a$ as MutationObserverIdleResult, b0 as MutationObserverLoadingResult, aX as MutationObserverOptions, b3 as MutationObserverResult, b2 as MutationObserverSuccessResult, aW as MutationOptions, aT as MutationScope, y as MutationState, aS as MutationStatus, aa as NetworkMode, F as NoInfer, N as NonUndefinedGuard, b9 as NotifyEvent, b8 as NotifyEventType, ab as NotifyOnChangeProps, O as OmitKeyof, E as Override, a3 as PlaceholderDataFunction, a4 as QueriesPlaceholderDataFunction, z as Query, Q as QueryCache, f as QueryCacheNotifyEvent, g as QueryClient, b4 as QueryClientConfig, v as QueryFilters, Y as QueryFunction, a1 as QueryFunctionContext, I as QueryKey, a5 as QueryKeyHashFunction, a9 as QueryMeta, i as QueryObserver, az as QueryObserverBaseResult, aC as QueryObserverLoadingErrorResult, aB as QueryObserverLoadingResult, ag as QueryObserverOptions, aA as QueryObserverPendingResult, aF as QueryObserverPlaceholderResult, aD as QueryObserverRefetchErrorResult, aH as QueryObserverResult, aE as QueryObserverSuccessResult, ac as QueryOptions, a0 as QueryPersister, A as QueryState, ax as QueryStatus, aq as RefetchOptions, as as RefetchQueryFilters, R as Register, au as ResetOptions, ap as ResultOptions, b7 as SetDataOptions, S as SkipToken, Z as StaleTime, _ as StaleTimeFunction, af as ThrowOnError, P as UnsetMarker, U as Updater, ah as WithRequired, K as dataTagErrorSymbol, J as dataTagSymbol, d as defaultShouldDehydrateMutation, a as defaultShouldDehydrateQuery, b as dehydrate, k as hashKey, h as hydrate, j as isCancelledError, l as isServer, m as keepPreviousData, n as matchMutation, o as matchQuery, p as noop, q as partialMatchKey, r as replaceEqualDeep, s as shouldThrowError, t as skipToken, L as unsetMarker } from './hydration-BYonJkjc.js';
|
|
3
3
|
export { InfiniteQueryObserver } from './infiniteQueryObserver.js';
|
|
4
4
|
export { defaultScheduler, notifyManager } from './notifyManager.js';
|
|
5
|
-
export { focusManager } from './focusManager.js';
|
|
6
5
|
export { onlineManager } from './onlineManager.js';
|
|
6
|
+
export { QueriesObserver, QueriesObserverOptions } from './queriesObserver.js';
|
|
7
|
+
export { ManagedTimerId, TimeoutCallback, TimeoutProvider, timeoutManager } from './timeoutManager.js';
|
|
7
8
|
export { streamedQuery as experimental_streamedQuery } from './streamedQuery.js';
|
|
8
|
-
import './removable.js';
|
|
9
9
|
import './subscribable.js';
|
|
10
|
+
import './removable.js';
|
package/build/modern/index.js
CHANGED
|
@@ -1,38 +1,40 @@
|
|
|
1
1
|
// src/index.ts
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
import { focusManager } from "./focusManager.js";
|
|
3
|
+
import {
|
|
4
|
+
defaultShouldDehydrateMutation,
|
|
5
|
+
defaultShouldDehydrateQuery,
|
|
6
|
+
dehydrate,
|
|
7
|
+
hydrate
|
|
8
|
+
} from "./hydration.js";
|
|
7
9
|
import { InfiniteQueryObserver } from "./infiniteQueryObserver.js";
|
|
8
10
|
import { MutationCache } from "./mutationCache.js";
|
|
9
11
|
import { MutationObserver } from "./mutationObserver.js";
|
|
10
|
-
import {
|
|
11
|
-
import { focusManager } from "./focusManager.js";
|
|
12
|
+
import { defaultScheduler, notifyManager } from "./notifyManager.js";
|
|
12
13
|
import { onlineManager } from "./onlineManager.js";
|
|
14
|
+
import { QueriesObserver } from "./queriesObserver.js";
|
|
15
|
+
import { QueryCache } from "./queryCache.js";
|
|
16
|
+
import { QueryClient } from "./queryClient.js";
|
|
17
|
+
import { QueryObserver } from "./queryObserver.js";
|
|
18
|
+
import { CancelledError, isCancelledError } from "./retryer.js";
|
|
19
|
+
import {
|
|
20
|
+
timeoutManager
|
|
21
|
+
} from "./timeoutManager.js";
|
|
13
22
|
import {
|
|
14
23
|
hashKey,
|
|
15
|
-
partialMatchKey,
|
|
16
|
-
replaceEqualDeep,
|
|
17
24
|
isServer,
|
|
18
|
-
matchQuery,
|
|
19
|
-
matchMutation,
|
|
20
25
|
keepPreviousData,
|
|
21
|
-
|
|
26
|
+
matchMutation,
|
|
27
|
+
matchQuery,
|
|
22
28
|
noop,
|
|
23
|
-
|
|
29
|
+
partialMatchKey,
|
|
30
|
+
replaceEqualDeep,
|
|
31
|
+
shouldThrowError,
|
|
32
|
+
skipToken
|
|
24
33
|
} from "./utils.js";
|
|
25
|
-
import { isCancelledError } from "./retryer.js";
|
|
26
|
-
import {
|
|
27
|
-
dehydrate,
|
|
28
|
-
hydrate,
|
|
29
|
-
defaultShouldDehydrateQuery,
|
|
30
|
-
defaultShouldDehydrateMutation
|
|
31
|
-
} from "./hydration.js";
|
|
32
34
|
import { streamedQuery } from "./streamedQuery.js";
|
|
33
|
-
export * from "./types.js";
|
|
34
|
-
import { Query } from "./query.js";
|
|
35
35
|
import { Mutation } from "./mutation.js";
|
|
36
|
+
import { Query } from "./query.js";
|
|
37
|
+
export * from "./types.js";
|
|
36
38
|
export {
|
|
37
39
|
CancelledError,
|
|
38
40
|
InfiniteQueryObserver,
|
|
@@ -63,6 +65,7 @@ export {
|
|
|
63
65
|
partialMatchKey,
|
|
64
66
|
replaceEqualDeep,
|
|
65
67
|
shouldThrowError,
|
|
66
|
-
skipToken
|
|
68
|
+
skipToken,
|
|
69
|
+
timeoutManager
|
|
67
70
|
};
|
|
68
71
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["/* istanbul ignore file */\n\nexport {
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["/* istanbul ignore file */\n\nexport { focusManager } from './focusManager'\nexport {\n defaultShouldDehydrateMutation,\n defaultShouldDehydrateQuery,\n dehydrate,\n hydrate,\n} from './hydration'\nexport { InfiniteQueryObserver } from './infiniteQueryObserver'\nexport { MutationCache } from './mutationCache'\nexport type { MutationCacheNotifyEvent } from './mutationCache'\nexport { MutationObserver } from './mutationObserver'\nexport { defaultScheduler, notifyManager } from './notifyManager'\nexport { onlineManager } from './onlineManager'\nexport { QueriesObserver } from './queriesObserver'\nexport { QueryCache } from './queryCache'\nexport type { QueryCacheNotifyEvent } from './queryCache'\nexport { QueryClient } from './queryClient'\nexport { QueryObserver } from './queryObserver'\nexport { CancelledError, isCancelledError } from './retryer'\nexport {\n timeoutManager,\n type ManagedTimerId,\n type TimeoutCallback,\n type TimeoutProvider,\n} from './timeoutManager'\nexport {\n hashKey,\n isServer,\n keepPreviousData,\n matchMutation,\n matchQuery,\n noop,\n partialMatchKey,\n replaceEqualDeep,\n shouldThrowError,\n skipToken,\n} from './utils'\nexport type { MutationFilters, QueryFilters, SkipToken, Updater } from './utils'\n\nexport { streamedQuery as experimental_streamedQuery } from './streamedQuery'\n\n// Types\nexport type {\n DehydratedState,\n DehydrateOptions,\n HydrateOptions,\n} from './hydration'\nexport { Mutation } from './mutation'\nexport type { MutationState } from './mutation'\nexport type { QueriesObserverOptions } from './queriesObserver'\nexport { Query } from './query'\nexport type { QueryState } from './query'\nexport * from './types'\n"],"mappings":";AAEA,SAAS,oBAAoB;AAC7B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,6BAA6B;AACtC,SAAS,qBAAqB;AAE9B,SAAS,wBAAwB;AACjC,SAAS,kBAAkB,qBAAqB;AAChD,SAAS,qBAAqB;AAC9B,SAAS,uBAAuB;AAChC,SAAS,kBAAkB;AAE3B,SAAS,mBAAmB;AAC5B,SAAS,qBAAqB;AAC9B,SAAS,gBAAgB,wBAAwB;AACjD;AAAA,EACE;AAAA,OAIK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAGP,SAA0B,qBAAkC;AAQ5D,SAAS,gBAAgB;AAGzB,SAAS,aAAa;AAEtB,cAAc;","names":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ba as QueryBehavior, a8 as InfiniteData, ae as InfiniteQueryPageParamsOptions } from './hydration-
|
|
1
|
+
import { ba as QueryBehavior, a8 as InfiniteData, ae as InfiniteQueryPageParamsOptions } from './hydration-_hO-y142.cjs';
|
|
2
2
|
import './removable.cjs';
|
|
3
3
|
import './subscribable.cjs';
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ba as QueryBehavior, a8 as InfiniteData, ae as InfiniteQueryPageParamsOptions } from './hydration-
|
|
1
|
+
import { ba as QueryBehavior, a8 as InfiniteData, ae as InfiniteQueryPageParamsOptions } from './hydration-BYonJkjc.js';
|
|
2
2
|
import './removable.js';
|
|
3
3
|
import './subscribable.js';
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { G as DefaultError, a8 as InfiniteData, I as QueryKey,
|
|
1
|
+
import { G as DefaultError, a8 as InfiniteData, I as QueryKey, i as QueryObserver, aQ as InfiniteQueryObserverResult, g as QueryClient, aj as InfiniteQueryObserverOptions, ak as DefaultedInfiniteQueryObserverOptions, av as FetchNextPageOptions, aw as FetchPreviousPageOptions, z as Query } from './hydration-_hO-y142.cjs';
|
|
2
2
|
import { Subscribable } from './subscribable.cjs';
|
|
3
3
|
import './removable.cjs';
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { G as DefaultError, a8 as InfiniteData, I as QueryKey,
|
|
1
|
+
import { G as DefaultError, a8 as InfiniteData, I as QueryKey, i as QueryObserver, aQ as InfiniteQueryObserverResult, g as QueryClient, aj as InfiniteQueryObserverOptions, ak as DefaultedInfiniteQueryObserverOptions, av as FetchNextPageOptions, aw as FetchPreviousPageOptions, z as Query } from './hydration-BYonJkjc.js';
|
|
2
2
|
import { Subscribable } from './subscribable.js';
|
|
3
3
|
import './removable.js';
|
|
4
4
|
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import './removable.cjs';
|
|
2
|
-
export { bi as Action,
|
|
2
|
+
export { bi as Action, x as Mutation, y as MutationState, bj as getDefaultState } from './hydration-_hO-y142.cjs';
|
|
3
3
|
import './subscribable.cjs';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import './removable.js';
|
|
2
|
-
export { bi as Action,
|
|
2
|
+
export { bi as Action, x as Mutation, y as MutationState, bj as getDefaultState } from './hydration-BYonJkjc.js';
|
|
3
3
|
import './subscribable.js';
|
|
@@ -25,7 +25,8 @@ __export(notifyManager_exports, {
|
|
|
25
25
|
notifyManager: () => notifyManager
|
|
26
26
|
});
|
|
27
27
|
module.exports = __toCommonJS(notifyManager_exports);
|
|
28
|
-
var
|
|
28
|
+
var import_timeoutManager = require("./timeoutManager.cjs");
|
|
29
|
+
var defaultScheduler = import_timeoutManager.systemSetTimeoutZero;
|
|
29
30
|
function createNotifyManager() {
|
|
30
31
|
let queue = [];
|
|
31
32
|
let transactions = 0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/notifyManager.ts"],"sourcesContent":["// TYPES\n\ntype NotifyCallback = () => void\n\ntype NotifyFunction = (callback: () => void) => void\n\ntype BatchNotifyFunction = (callback: () => void) => void\n\ntype BatchCallsCallback<T extends Array<unknown>> = (...args: T) => void\n\ntype ScheduleFunction = (callback: () => void) => void\n\nexport const defaultScheduler: ScheduleFunction =
|
|
1
|
+
{"version":3,"sources":["../../src/notifyManager.ts"],"sourcesContent":["// TYPES\n\nimport { systemSetTimeoutZero } from './timeoutManager'\n\ntype NotifyCallback = () => void\n\ntype NotifyFunction = (callback: () => void) => void\n\ntype BatchNotifyFunction = (callback: () => void) => void\n\ntype BatchCallsCallback<T extends Array<unknown>> = (...args: T) => void\n\ntype ScheduleFunction = (callback: () => void) => void\n\nexport const defaultScheduler: ScheduleFunction = systemSetTimeoutZero\n\nexport function createNotifyManager() {\n let queue: Array<NotifyCallback> = []\n let transactions = 0\n let notifyFn: NotifyFunction = (callback) => {\n callback()\n }\n let batchNotifyFn: BatchNotifyFunction = (callback: () => void) => {\n callback()\n }\n let scheduleFn = defaultScheduler\n\n const schedule = (callback: NotifyCallback): void => {\n if (transactions) {\n queue.push(callback)\n } else {\n scheduleFn(() => {\n notifyFn(callback)\n })\n }\n }\n const flush = (): void => {\n const originalQueue = queue\n queue = []\n if (originalQueue.length) {\n scheduleFn(() => {\n batchNotifyFn(() => {\n originalQueue.forEach((callback) => {\n notifyFn(callback)\n })\n })\n })\n }\n }\n\n return {\n batch: <T>(callback: () => T): T => {\n let result\n transactions++\n try {\n result = callback()\n } finally {\n transactions--\n if (!transactions) {\n flush()\n }\n }\n return result\n },\n /**\n * All calls to the wrapped function will be batched.\n */\n batchCalls: <T extends Array<unknown>>(\n callback: BatchCallsCallback<T>,\n ): BatchCallsCallback<T> => {\n return (...args) => {\n schedule(() => {\n callback(...args)\n })\n }\n },\n schedule,\n /**\n * Use this method to set a custom notify function.\n * This can be used to for example wrap notifications with `React.act` while running tests.\n */\n setNotifyFunction: (fn: NotifyFunction) => {\n notifyFn = fn\n },\n /**\n * Use this method to set a custom function to batch notifications together into a single tick.\n * By default React Query will use the batch function provided by ReactDOM or React Native.\n */\n setBatchNotifyFunction: (fn: BatchNotifyFunction) => {\n batchNotifyFn = fn\n },\n setScheduler: (fn: ScheduleFunction) => {\n scheduleFn = fn\n },\n } as const\n}\n\n// SINGLETON\nexport const notifyManager = createNotifyManager()\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,4BAAqC;AAY9B,IAAM,mBAAqC;AAE3C,SAAS,sBAAsB;AACpC,MAAI,QAA+B,CAAC;AACpC,MAAI,eAAe;AACnB,MAAI,WAA2B,CAAC,aAAa;AAC3C,aAAS;AAAA,EACX;AACA,MAAI,gBAAqC,CAAC,aAAyB;AACjE,aAAS;AAAA,EACX;AACA,MAAI,aAAa;AAEjB,QAAM,WAAW,CAAC,aAAmC;AACnD,QAAI,cAAc;AAChB,YAAM,KAAK,QAAQ;AAAA,IACrB,OAAO;AACL,iBAAW,MAAM;AACf,iBAAS,QAAQ;AAAA,MACnB,CAAC;AAAA,IACH;AAAA,EACF;AACA,QAAM,QAAQ,MAAY;AACxB,UAAM,gBAAgB;AACtB,YAAQ,CAAC;AACT,QAAI,cAAc,QAAQ;AACxB,iBAAW,MAAM;AACf,sBAAc,MAAM;AAClB,wBAAc,QAAQ,CAAC,aAAa;AAClC,qBAAS,QAAQ;AAAA,UACnB,CAAC;AAAA,QACH,CAAC;AAAA,MACH,CAAC;AAAA,IACH;AAAA,EACF;AAEA,SAAO;AAAA,IACL,OAAO,CAAI,aAAyB;AAClC,UAAI;AACJ;AACA,UAAI;AACF,iBAAS,SAAS;AAAA,MACpB,UAAE;AACA;AACA,YAAI,CAAC,cAAc;AACjB,gBAAM;AAAA,QACR;AAAA,MACF;AACA,aAAO;AAAA,IACT;AAAA;AAAA;AAAA;AAAA,IAIA,YAAY,CACV,aAC0B;AAC1B,aAAO,IAAI,SAAS;AAClB,iBAAS,MAAM;AACb,mBAAS,GAAG,IAAI;AAAA,QAClB,CAAC;AAAA,MACH;AAAA,IACF;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA,mBAAmB,CAAC,OAAuB;AACzC,iBAAW;AAAA,IACb;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA,wBAAwB,CAAC,OAA4B;AACnD,sBAAgB;AAAA,IAClB;AAAA,IACA,cAAc,CAAC,OAAyB;AACtC,mBAAa;AAAA,IACf;AAAA,EACF;AACF;AAGO,IAAM,gBAAgB,oBAAoB;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/notifyManager.ts"],"sourcesContent":["// TYPES\n\ntype NotifyCallback = () => void\n\ntype NotifyFunction = (callback: () => void) => void\n\ntype BatchNotifyFunction = (callback: () => void) => void\n\ntype BatchCallsCallback<T extends Array<unknown>> = (...args: T) => void\n\ntype ScheduleFunction = (callback: () => void) => void\n\nexport const defaultScheduler: ScheduleFunction =
|
|
1
|
+
{"version":3,"sources":["../../src/notifyManager.ts"],"sourcesContent":["// TYPES\n\nimport { systemSetTimeoutZero } from './timeoutManager'\n\ntype NotifyCallback = () => void\n\ntype NotifyFunction = (callback: () => void) => void\n\ntype BatchNotifyFunction = (callback: () => void) => void\n\ntype BatchCallsCallback<T extends Array<unknown>> = (...args: T) => void\n\ntype ScheduleFunction = (callback: () => void) => void\n\nexport const defaultScheduler: ScheduleFunction = systemSetTimeoutZero\n\nexport function createNotifyManager() {\n let queue: Array<NotifyCallback> = []\n let transactions = 0\n let notifyFn: NotifyFunction = (callback) => {\n callback()\n }\n let batchNotifyFn: BatchNotifyFunction = (callback: () => void) => {\n callback()\n }\n let scheduleFn = defaultScheduler\n\n const schedule = (callback: NotifyCallback): void => {\n if (transactions) {\n queue.push(callback)\n } else {\n scheduleFn(() => {\n notifyFn(callback)\n })\n }\n }\n const flush = (): void => {\n const originalQueue = queue\n queue = []\n if (originalQueue.length) {\n scheduleFn(() => {\n batchNotifyFn(() => {\n originalQueue.forEach((callback) => {\n notifyFn(callback)\n })\n })\n })\n }\n }\n\n return {\n batch: <T>(callback: () => T): T => {\n let result\n transactions++\n try {\n result = callback()\n } finally {\n transactions--\n if (!transactions) {\n flush()\n }\n }\n return result\n },\n /**\n * All calls to the wrapped function will be batched.\n */\n batchCalls: <T extends Array<unknown>>(\n callback: BatchCallsCallback<T>,\n ): BatchCallsCallback<T> => {\n return (...args) => {\n schedule(() => {\n callback(...args)\n })\n }\n },\n schedule,\n /**\n * Use this method to set a custom notify function.\n * This can be used to for example wrap notifications with `React.act` while running tests.\n */\n setNotifyFunction: (fn: NotifyFunction) => {\n notifyFn = fn\n },\n /**\n * Use this method to set a custom function to batch notifications together into a single tick.\n * By default React Query will use the batch function provided by ReactDOM or React Native.\n */\n setBatchNotifyFunction: (fn: BatchNotifyFunction) => {\n batchNotifyFn = fn\n },\n setScheduler: (fn: ScheduleFunction) => {\n scheduleFn = fn\n },\n } as const\n}\n\n// SINGLETON\nexport const notifyManager = createNotifyManager()\n"],"mappings":";AAEA,SAAS,4BAA4B;AAY9B,IAAM,mBAAqC;AAE3C,SAAS,sBAAsB;AACpC,MAAI,QAA+B,CAAC;AACpC,MAAI,eAAe;AACnB,MAAI,WAA2B,CAAC,aAAa;AAC3C,aAAS;AAAA,EACX;AACA,MAAI,gBAAqC,CAAC,aAAyB;AACjE,aAAS;AAAA,EACX;AACA,MAAI,aAAa;AAEjB,QAAM,WAAW,CAAC,aAAmC;AACnD,QAAI,cAAc;AAChB,YAAM,KAAK,QAAQ;AAAA,IACrB,OAAO;AACL,iBAAW,MAAM;AACf,iBAAS,QAAQ;AAAA,MACnB,CAAC;AAAA,IACH;AAAA,EACF;AACA,QAAM,QAAQ,MAAY;AACxB,UAAM,gBAAgB;AACtB,YAAQ,CAAC;AACT,QAAI,cAAc,QAAQ;AACxB,iBAAW,MAAM;AACf,sBAAc,MAAM;AAClB,wBAAc,QAAQ,CAAC,aAAa;AAClC,qBAAS,QAAQ;AAAA,UACnB,CAAC;AAAA,QACH,CAAC;AAAA,MACH,CAAC;AAAA,IACH;AAAA,EACF;AAEA,SAAO;AAAA,IACL,OAAO,CAAI,aAAyB;AAClC,UAAI;AACJ;AACA,UAAI;AACF,iBAAS,SAAS;AAAA,MACpB,UAAE;AACA;AACA,YAAI,CAAC,cAAc;AACjB,gBAAM;AAAA,QACR;AAAA,MACF;AACA,aAAO;AAAA,IACT;AAAA;AAAA;AAAA;AAAA,IAIA,YAAY,CACV,aAC0B;AAC1B,aAAO,IAAI,SAAS;AAClB,iBAAS,MAAM;AACb,mBAAS,GAAG,IAAI;AAAA,QAClB,CAAC;AAAA,MACH;AAAA,IACF;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA,mBAAmB,CAAC,OAAuB;AACzC,iBAAW;AAAA,IACb;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA,wBAAwB,CAAC,OAA4B;AACnD,sBAAgB;AAAA,IAClB;AAAA,IACA,cAAc,CAAC,OAAyB;AACtC,mBAAa;AAAA,IACf;AAAA,EACF;AACF;AAGO,IAAM,gBAAgB,oBAAoB;","names":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { aH as QueryObserverResult,
|
|
1
|
+
import { aH as QueryObserverResult, g as QueryClient, ag as QueryObserverOptions, z as Query, i as QueryObserver } from './hydration-_hO-y142.cjs';
|
|
2
2
|
import { Subscribable } from './subscribable.cjs';
|
|
3
3
|
import './removable.cjs';
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { aH as QueryObserverResult,
|
|
1
|
+
import { aH as QueryObserverResult, g as QueryClient, ag as QueryObserverOptions, z as Query, i as QueryObserver } from './hydration-BYonJkjc.js';
|
|
2
2
|
import { Subscribable } from './subscribable.js';
|
|
3
3
|
import './removable.js';
|
|
4
4
|
|
package/build/modern/query.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import './removable.cjs';
|
|
2
|
-
export { bf as Action, bb as FetchContext, bc as FetchDirection, bd as FetchMeta, be as FetchOptions,
|
|
2
|
+
export { bf as Action, bb as FetchContext, bc as FetchDirection, bd as FetchMeta, be as FetchOptions, z as Query, ba as QueryBehavior, A as QueryState, bg as SetStateOptions, bh as fetchState } from './hydration-_hO-y142.cjs';
|
|
3
3
|
import './subscribable.cjs';
|
package/build/modern/query.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import './removable.js';
|
|
2
|
-
export { bf as Action, bb as FetchContext, bc as FetchDirection, bd as FetchMeta, be as FetchOptions,
|
|
2
|
+
export { bf as Action, bb as FetchContext, bc as FetchDirection, bd as FetchMeta, be as FetchOptions, z as Query, ba as QueryBehavior, A as QueryState, bg as SetStateOptions, bh as fetchState } from './hydration-BYonJkjc.js';
|
|
3
3
|
import './subscribable.js';
|
|
@@ -29,6 +29,7 @@ var import_query = require("./query.cjs");
|
|
|
29
29
|
var import_subscribable = require("./subscribable.cjs");
|
|
30
30
|
var import_thenable = require("./thenable.cjs");
|
|
31
31
|
var import_utils = require("./utils.cjs");
|
|
32
|
+
var import_timeoutManager = require("./timeoutManager.cjs");
|
|
32
33
|
var QueryObserver = class extends import_subscribable.Subscribable {
|
|
33
34
|
constructor(client, options) {
|
|
34
35
|
super();
|
|
@@ -207,7 +208,7 @@ var QueryObserver = class extends import_subscribable.Subscribable {
|
|
|
207
208
|
}
|
|
208
209
|
const time = (0, import_utils.timeUntilStale)(this.#currentResult.dataUpdatedAt, staleTime);
|
|
209
210
|
const timeout = time + 1;
|
|
210
|
-
this.#staleTimeoutId = setTimeout(() => {
|
|
211
|
+
this.#staleTimeoutId = import_timeoutManager.timeoutManager.setTimeout(() => {
|
|
211
212
|
if (!this.#currentResult.isStale) {
|
|
212
213
|
this.updateResult();
|
|
213
214
|
}
|
|
@@ -222,7 +223,7 @@ var QueryObserver = class extends import_subscribable.Subscribable {
|
|
|
222
223
|
if (import_utils.isServer || (0, import_utils.resolveEnabled)(this.options.enabled, this.#currentQuery) === false || !(0, import_utils.isValidTimeout)(this.#currentRefetchInterval) || this.#currentRefetchInterval === 0) {
|
|
223
224
|
return;
|
|
224
225
|
}
|
|
225
|
-
this.#refetchIntervalId = setInterval(() => {
|
|
226
|
+
this.#refetchIntervalId = import_timeoutManager.timeoutManager.setInterval(() => {
|
|
226
227
|
if (this.options.refetchIntervalInBackground || import_focusManager.focusManager.isFocused()) {
|
|
227
228
|
this.#executeFetch();
|
|
228
229
|
}
|
|
@@ -234,13 +235,13 @@ var QueryObserver = class extends import_subscribable.Subscribable {
|
|
|
234
235
|
}
|
|
235
236
|
#clearStaleTimeout() {
|
|
236
237
|
if (this.#staleTimeoutId) {
|
|
237
|
-
clearTimeout(this.#staleTimeoutId);
|
|
238
|
+
import_timeoutManager.timeoutManager.clearTimeout(this.#staleTimeoutId);
|
|
238
239
|
this.#staleTimeoutId = void 0;
|
|
239
240
|
}
|
|
240
241
|
}
|
|
241
242
|
#clearRefetchInterval() {
|
|
242
243
|
if (this.#refetchIntervalId) {
|
|
243
|
-
clearInterval(this.#refetchIntervalId);
|
|
244
|
+
import_timeoutManager.timeoutManager.clearInterval(this.#refetchIntervalId);
|
|
244
245
|
this.#refetchIntervalId = void 0;
|
|
245
246
|
}
|
|
246
247
|
}
|