byterover-cli 3.10.0 → 3.10.2
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/agent/infra/agent/service-initializer.js +8 -2
- package/dist/agent/infra/llm/agent-llm-service.d.ts +9 -9
- package/dist/agent/infra/llm/agent-llm-service.js +28 -18
- package/dist/agent/infra/llm/generators/ai-sdk-content-generator.d.ts +10 -1
- package/dist/agent/infra/llm/generators/ai-sdk-content-generator.js +21 -4
- package/dist/agent/infra/llm/generators/ai-sdk-message-converter.d.ts +4 -0
- package/dist/agent/infra/llm/generators/ai-sdk-message-converter.js +8 -1
- package/dist/agent/infra/map/abstract-generator.d.ts +29 -0
- package/dist/agent/infra/map/abstract-generator.js +161 -0
- package/dist/agent/infra/map/abstract-queue.d.ts +7 -0
- package/dist/agent/infra/map/abstract-queue.js +100 -26
- package/dist/agent/infra/system-prompt/contributors/file-contributor.js +6 -2
- package/dist/agent/infra/tools/implementations/curate-tool-task-context.d.ts +2 -0
- package/dist/agent/infra/tools/implementations/curate-tool-task-context.js +28 -0
- package/dist/agent/infra/tools/implementations/curate-tool.js +57 -16
- package/dist/agent/infra/tools/tool-manager.d.ts +10 -1
- package/dist/agent/infra/tools/tool-manager.js +10 -1
- package/dist/oclif/commands/review.d.ts +16 -0
- package/dist/oclif/commands/review.js +96 -0
- package/dist/server/core/domain/entities/brv-config.d.ts +6 -0
- package/dist/server/core/domain/entities/brv-config.js +27 -0
- package/dist/server/core/domain/entities/provider-registry.js +0 -1
- package/dist/server/core/domain/transport/schemas.d.ts +8 -0
- package/dist/server/core/domain/transport/schemas.js +6 -0
- package/dist/server/core/domain/transport/task-info.d.ts +7 -0
- package/dist/server/core/interfaces/i-provider-config-store.d.ts +5 -1
- package/dist/server/infra/context-tree/propagate-summaries.d.ts +18 -0
- package/dist/server/infra/context-tree/propagate-summaries.js +52 -0
- package/dist/server/infra/daemon/agent-process.js +78 -8
- package/dist/server/infra/daemon/brv-server.js +23 -0
- package/dist/server/infra/daemon/post-work-registry.d.ts +45 -0
- package/dist/server/infra/daemon/post-work-registry.js +82 -0
- package/dist/server/infra/dream/dream-lock-service.d.ts +3 -4
- package/dist/server/infra/dream/dream-lock-service.js +3 -4
- package/dist/server/infra/dream/dream-state-schema.d.ts +35 -0
- package/dist/server/infra/dream/dream-state-schema.js +15 -0
- package/dist/server/infra/dream/dream-state-service.d.ts +22 -0
- package/dist/server/infra/dream/dream-state-service.js +62 -3
- package/dist/server/infra/dream/dream-trigger.js +6 -2
- package/dist/server/infra/executor/curate-executor.d.ts +33 -0
- package/dist/server/infra/executor/curate-executor.js +116 -36
- package/dist/server/infra/executor/dream-executor.d.ts +29 -0
- package/dist/server/infra/executor/dream-executor.js +70 -16
- package/dist/server/infra/executor/folder-pack-executor.d.ts +10 -0
- package/dist/server/infra/executor/folder-pack-executor.js +22 -24
- package/dist/server/infra/git/git-error-messages.d.ts +10 -0
- package/dist/server/infra/git/git-error-messages.js +12 -0
- package/dist/server/infra/git/isomorphic-git-service.js +24 -76
- package/dist/server/infra/git/status-row-classifier.d.ts +32 -0
- package/dist/server/infra/git/status-row-classifier.js +78 -0
- package/dist/server/infra/process/curate-log-handler.d.ts +3 -0
- package/dist/server/infra/process/curate-log-handler.js +6 -2
- package/dist/server/infra/process/feature-handlers.js +1 -0
- package/dist/server/infra/process/task-router.d.ts +29 -0
- package/dist/server/infra/process/task-router.js +43 -1
- package/dist/server/infra/process/transport-handlers.d.ts +4 -2
- package/dist/server/infra/process/transport-handlers.js +1 -0
- package/dist/server/infra/storage/file-provider-config-store.d.ts +4 -1
- package/dist/server/infra/storage/file-provider-config-store.js +5 -2
- package/dist/server/infra/transport/handlers/provider-handler.d.ts +9 -0
- package/dist/server/infra/transport/handlers/provider-handler.js +63 -2
- package/dist/server/infra/transport/handlers/review-handler.d.ts +5 -0
- package/dist/server/infra/transport/handlers/review-handler.js +22 -0
- package/dist/shared/transport/events/index.d.ts +2 -0
- package/dist/shared/transport/events/review-events.d.ts +11 -0
- package/dist/shared/transport/events/review-events.js +2 -0
- package/dist/shared/transport/types/dto.d.ts +2 -0
- package/dist/tui/features/auth/api/get-auth-state.js +6 -3
- package/dist/tui/features/auth/components/auth-initializer.js +4 -2
- package/dist/tui/features/provider/components/provider-flow.js +30 -5
- package/node_modules/@tanstack/query-core/LICENSE +21 -0
- package/node_modules/@tanstack/query-core/build/legacy/chunk-PXG64RU4.js +25 -0
- package/node_modules/@tanstack/query-core/build/legacy/chunk-PXG64RU4.js.map +1 -0
- package/node_modules/@tanstack/query-core/build/legacy/focusManager.cjs +108 -0
- package/node_modules/@tanstack/query-core/build/legacy/focusManager.cjs.map +1 -0
- package/node_modules/@tanstack/query-core/build/legacy/focusManager.d.cts +17 -0
- package/node_modules/@tanstack/query-core/build/legacy/focusManager.d.ts +17 -0
- package/node_modules/@tanstack/query-core/build/legacy/focusManager.js +81 -0
- package/node_modules/@tanstack/query-core/build/legacy/focusManager.js.map +1 -0
- package/node_modules/@tanstack/query-core/build/legacy/hydration-BlEVG2Lp.d.ts +1384 -0
- package/node_modules/@tanstack/query-core/build/legacy/hydration-uphG6M-i.d.cts +1384 -0
- package/node_modules/@tanstack/query-core/build/legacy/hydration.cjs +178 -0
- package/node_modules/@tanstack/query-core/build/legacy/hydration.cjs.map +1 -0
- package/node_modules/@tanstack/query-core/build/legacy/hydration.d.cts +3 -0
- package/node_modules/@tanstack/query-core/build/legacy/hydration.d.ts +3 -0
- package/node_modules/@tanstack/query-core/build/legacy/hydration.js +152 -0
- package/node_modules/@tanstack/query-core/build/legacy/hydration.js.map +1 -0
- package/node_modules/@tanstack/query-core/build/legacy/index.cjs +110 -0
- package/node_modules/@tanstack/query-core/build/legacy/index.cjs.map +1 -0
- package/node_modules/@tanstack/query-core/build/legacy/index.d.cts +10 -0
- package/node_modules/@tanstack/query-core/build/legacy/index.d.ts +10 -0
- package/node_modules/@tanstack/query-core/build/legacy/index.js +73 -0
- package/node_modules/@tanstack/query-core/build/legacy/index.js.map +1 -0
- package/node_modules/@tanstack/query-core/build/legacy/infiniteQueryBehavior.cjs +146 -0
- package/node_modules/@tanstack/query-core/build/legacy/infiniteQueryBehavior.cjs.map +1 -0
- package/node_modules/@tanstack/query-core/build/legacy/infiniteQueryBehavior.d.cts +15 -0
- package/node_modules/@tanstack/query-core/build/legacy/infiniteQueryBehavior.d.ts +15 -0
- package/node_modules/@tanstack/query-core/build/legacy/infiniteQueryBehavior.js +126 -0
- package/node_modules/@tanstack/query-core/build/legacy/infiniteQueryBehavior.js.map +1 -0
- package/node_modules/@tanstack/query-core/build/legacy/infiniteQueryObserver.cjs +93 -0
- package/node_modules/@tanstack/query-core/build/legacy/infiniteQueryObserver.cjs.map +1 -0
- package/node_modules/@tanstack/query-core/build/legacy/infiniteQueryObserver.d.cts +20 -0
- package/node_modules/@tanstack/query-core/build/legacy/infiniteQueryObserver.d.ts +20 -0
- package/node_modules/@tanstack/query-core/build/legacy/infiniteQueryObserver.js +74 -0
- package/node_modules/@tanstack/query-core/build/legacy/infiniteQueryObserver.js.map +1 -0
- package/node_modules/@tanstack/query-core/build/legacy/mutation.cjs +333 -0
- package/node_modules/@tanstack/query-core/build/legacy/mutation.cjs.map +1 -0
- package/node_modules/@tanstack/query-core/build/legacy/mutation.d.cts +3 -0
- package/node_modules/@tanstack/query-core/build/legacy/mutation.d.ts +3 -0
- package/node_modules/@tanstack/query-core/build/legacy/mutation.js +306 -0
- package/node_modules/@tanstack/query-core/build/legacy/mutation.js.map +1 -0
- package/node_modules/@tanstack/query-core/build/legacy/mutationCache.cjs +170 -0
- package/node_modules/@tanstack/query-core/build/legacy/mutationCache.cjs.map +1 -0
- package/node_modules/@tanstack/query-core/build/legacy/mutationCache.d.cts +3 -0
- package/node_modules/@tanstack/query-core/build/legacy/mutationCache.d.ts +3 -0
- package/node_modules/@tanstack/query-core/build/legacy/mutationCache.js +137 -0
- package/node_modules/@tanstack/query-core/build/legacy/mutationCache.js.map +1 -0
- package/node_modules/@tanstack/query-core/build/legacy/mutationObserver.cjs +190 -0
- package/node_modules/@tanstack/query-core/build/legacy/mutationObserver.cjs.map +1 -0
- package/node_modules/@tanstack/query-core/build/legacy/mutationObserver.d.cts +3 -0
- package/node_modules/@tanstack/query-core/build/legacy/mutationObserver.d.ts +3 -0
- package/node_modules/@tanstack/query-core/build/legacy/mutationObserver.js +164 -0
- package/node_modules/@tanstack/query-core/build/legacy/mutationObserver.js.map +1 -0
- package/node_modules/@tanstack/query-core/build/legacy/notifyManager.cjs +113 -0
- package/node_modules/@tanstack/query-core/build/legacy/notifyManager.cjs.map +1 -0
- package/node_modules/@tanstack/query-core/build/legacy/notifyManager.d.cts +46 -0
- package/node_modules/@tanstack/query-core/build/legacy/notifyManager.d.ts +46 -0
- package/node_modules/@tanstack/query-core/build/legacy/notifyManager.js +88 -0
- package/node_modules/@tanstack/query-core/build/legacy/notifyManager.js.map +1 -0
- package/node_modules/@tanstack/query-core/build/legacy/onlineManager.cjs +97 -0
- package/node_modules/@tanstack/query-core/build/legacy/onlineManager.cjs.map +1 -0
- package/node_modules/@tanstack/query-core/build/legacy/onlineManager.d.cts +16 -0
- package/node_modules/@tanstack/query-core/build/legacy/onlineManager.d.ts +16 -0
- package/node_modules/@tanstack/query-core/build/legacy/onlineManager.js +70 -0
- package/node_modules/@tanstack/query-core/build/legacy/onlineManager.js.map +1 -0
- package/node_modules/@tanstack/query-core/build/legacy/queriesObserver.cjs +260 -0
- package/node_modules/@tanstack/query-core/build/legacy/queriesObserver.cjs.map +1 -0
- package/node_modules/@tanstack/query-core/build/legacy/queriesObserver.d.cts +27 -0
- package/node_modules/@tanstack/query-core/build/legacy/queriesObserver.d.ts +27 -0
- package/node_modules/@tanstack/query-core/build/legacy/queriesObserver.js +234 -0
- package/node_modules/@tanstack/query-core/build/legacy/queriesObserver.js.map +1 -0
- package/node_modules/@tanstack/query-core/build/legacy/query.cjs +478 -0
- package/node_modules/@tanstack/query-core/build/legacy/query.cjs.map +1 -0
- package/node_modules/@tanstack/query-core/build/legacy/query.d.cts +3 -0
- package/node_modules/@tanstack/query-core/build/legacy/query.d.ts +3 -0
- package/node_modules/@tanstack/query-core/build/legacy/query.js +459 -0
- package/node_modules/@tanstack/query-core/build/legacy/query.js.map +1 -0
- package/node_modules/@tanstack/query-core/build/legacy/queryCache.cjs +131 -0
- package/node_modules/@tanstack/query-core/build/legacy/queryCache.cjs.map +1 -0
- package/node_modules/@tanstack/query-core/build/legacy/queryCache.d.cts +3 -0
- package/node_modules/@tanstack/query-core/build/legacy/queryCache.d.ts +3 -0
- package/node_modules/@tanstack/query-core/build/legacy/queryCache.js +105 -0
- package/node_modules/@tanstack/query-core/build/legacy/queryCache.js.map +1 -0
- package/node_modules/@tanstack/query-core/build/legacy/queryClient.cjs +349 -0
- package/node_modules/@tanstack/query-core/build/legacy/queryClient.cjs.map +1 -0
- package/node_modules/@tanstack/query-core/build/legacy/queryClient.d.cts +3 -0
- package/node_modules/@tanstack/query-core/build/legacy/queryClient.d.ts +3 -0
- package/node_modules/@tanstack/query-core/build/legacy/queryClient.js +324 -0
- package/node_modules/@tanstack/query-core/build/legacy/queryClient.js.map +1 -0
- package/node_modules/@tanstack/query-core/build/legacy/queryObserver.cjs +515 -0
- package/node_modules/@tanstack/query-core/build/legacy/queryObserver.cjs.map +1 -0
- package/node_modules/@tanstack/query-core/build/legacy/queryObserver.d.cts +3 -0
- package/node_modules/@tanstack/query-core/build/legacy/queryObserver.d.ts +3 -0
- package/node_modules/@tanstack/query-core/build/legacy/queryObserver.js +498 -0
- package/node_modules/@tanstack/query-core/build/legacy/queryObserver.js.map +1 -0
- package/node_modules/@tanstack/query-core/build/legacy/removable.cjs +69 -0
- package/node_modules/@tanstack/query-core/build/legacy/removable.cjs.map +1 -0
- package/node_modules/@tanstack/query-core/build/legacy/removable.d.cts +11 -0
- package/node_modules/@tanstack/query-core/build/legacy/removable.d.ts +11 -0
- package/node_modules/@tanstack/query-core/build/legacy/removable.js +43 -0
- package/node_modules/@tanstack/query-core/build/legacy/removable.js.map +1 -0
- package/node_modules/@tanstack/query-core/build/legacy/retryer.cjs +165 -0
- package/node_modules/@tanstack/query-core/build/legacy/retryer.cjs.map +1 -0
- package/node_modules/@tanstack/query-core/build/legacy/retryer.d.cts +3 -0
- package/node_modules/@tanstack/query-core/build/legacy/retryer.d.ts +3 -0
- package/node_modules/@tanstack/query-core/build/legacy/retryer.js +139 -0
- package/node_modules/@tanstack/query-core/build/legacy/retryer.js.map +1 -0
- package/node_modules/@tanstack/query-core/build/legacy/streamedQuery.cjs +82 -0
- package/node_modules/@tanstack/query-core/build/legacy/streamedQuery.cjs.map +1 -0
- package/node_modules/@tanstack/query-core/build/legacy/streamedQuery.d.cts +34 -0
- package/node_modules/@tanstack/query-core/build/legacy/streamedQuery.d.ts +34 -0
- package/node_modules/@tanstack/query-core/build/legacy/streamedQuery.js +59 -0
- package/node_modules/@tanstack/query-core/build/legacy/streamedQuery.js.map +1 -0
- package/node_modules/@tanstack/query-core/build/legacy/subscribable.cjs +51 -0
- package/node_modules/@tanstack/query-core/build/legacy/subscribable.cjs.map +1 -0
- package/node_modules/@tanstack/query-core/build/legacy/subscribable.d.cts +10 -0
- package/node_modules/@tanstack/query-core/build/legacy/subscribable.d.ts +10 -0
- package/node_modules/@tanstack/query-core/build/legacy/subscribable.js +28 -0
- package/node_modules/@tanstack/query-core/build/legacy/subscribable.js.map +1 -0
- package/node_modules/@tanstack/query-core/build/legacy/thenable.cjs +76 -0
- package/node_modules/@tanstack/query-core/build/legacy/thenable.cjs.map +1 -0
- package/node_modules/@tanstack/query-core/build/legacy/thenable.d.cts +47 -0
- package/node_modules/@tanstack/query-core/build/legacy/thenable.d.ts +47 -0
- package/node_modules/@tanstack/query-core/build/legacy/thenable.js +52 -0
- package/node_modules/@tanstack/query-core/build/legacy/thenable.js.map +1 -0
- package/node_modules/@tanstack/query-core/build/legacy/timeoutManager.cjs +110 -0
- package/node_modules/@tanstack/query-core/build/legacy/timeoutManager.cjs.map +1 -0
- package/node_modules/@tanstack/query-core/build/legacy/timeoutManager.d.cts +58 -0
- package/node_modules/@tanstack/query-core/build/legacy/timeoutManager.d.ts +58 -0
- package/node_modules/@tanstack/query-core/build/legacy/timeoutManager.js +81 -0
- package/node_modules/@tanstack/query-core/build/legacy/timeoutManager.js.map +1 -0
- package/node_modules/@tanstack/query-core/build/legacy/types.cjs +37 -0
- package/node_modules/@tanstack/query-core/build/legacy/types.cjs.map +1 -0
- package/node_modules/@tanstack/query-core/build/legacy/types.d.cts +3 -0
- package/node_modules/@tanstack/query-core/build/legacy/types.d.ts +3 -0
- package/node_modules/@tanstack/query-core/build/legacy/types.js +12 -0
- package/node_modules/@tanstack/query-core/build/legacy/types.js.map +1 -0
- package/node_modules/@tanstack/query-core/build/legacy/utils.cjs +330 -0
- package/node_modules/@tanstack/query-core/build/legacy/utils.cjs.map +1 -0
- package/node_modules/@tanstack/query-core/build/legacy/utils.d.cts +3 -0
- package/node_modules/@tanstack/query-core/build/legacy/utils.d.ts +3 -0
- package/node_modules/@tanstack/query-core/build/legacy/utils.js +283 -0
- package/node_modules/@tanstack/query-core/build/legacy/utils.js.map +1 -0
- package/node_modules/@tanstack/query-core/build/modern/focusManager.cjs +94 -0
- package/node_modules/@tanstack/query-core/build/modern/focusManager.cjs.map +1 -0
- package/node_modules/@tanstack/query-core/build/modern/focusManager.d.cts +17 -0
- package/node_modules/@tanstack/query-core/build/modern/focusManager.d.ts +17 -0
- package/node_modules/@tanstack/query-core/build/modern/focusManager.js +68 -0
- package/node_modules/@tanstack/query-core/build/modern/focusManager.js.map +1 -0
- package/node_modules/@tanstack/query-core/build/modern/hydration-BlEVG2Lp.d.ts +1384 -0
- package/node_modules/@tanstack/query-core/build/modern/hydration-uphG6M-i.d.cts +1384 -0
- package/node_modules/@tanstack/query-core/build/modern/hydration.cjs +173 -0
- package/node_modules/@tanstack/query-core/build/modern/hydration.cjs.map +1 -0
- package/node_modules/@tanstack/query-core/build/modern/hydration.d.cts +3 -0
- package/node_modules/@tanstack/query-core/build/modern/hydration.d.ts +3 -0
- package/node_modules/@tanstack/query-core/build/modern/hydration.js +145 -0
- package/node_modules/@tanstack/query-core/build/modern/hydration.js.map +1 -0
- package/node_modules/@tanstack/query-core/build/modern/index.cjs +110 -0
- package/node_modules/@tanstack/query-core/build/modern/index.cjs.map +1 -0
- package/node_modules/@tanstack/query-core/build/modern/index.d.cts +10 -0
- package/node_modules/@tanstack/query-core/build/modern/index.d.ts +10 -0
- package/node_modules/@tanstack/query-core/build/modern/index.js +71 -0
- package/node_modules/@tanstack/query-core/build/modern/index.js.map +1 -0
- package/node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.cjs +142 -0
- package/node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.cjs.map +1 -0
- package/node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.d.cts +15 -0
- package/node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.d.ts +15 -0
- package/node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.js +120 -0
- package/node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.js.map +1 -0
- package/node_modules/@tanstack/query-core/build/modern/infiniteQueryObserver.cjs +92 -0
- package/node_modules/@tanstack/query-core/build/modern/infiniteQueryObserver.cjs.map +1 -0
- package/node_modules/@tanstack/query-core/build/modern/infiniteQueryObserver.d.cts +20 -0
- package/node_modules/@tanstack/query-core/build/modern/infiniteQueryObserver.d.ts +20 -0
- package/node_modules/@tanstack/query-core/build/modern/infiniteQueryObserver.js +71 -0
- package/node_modules/@tanstack/query-core/build/modern/infiniteQueryObserver.js.map +1 -0
- package/node_modules/@tanstack/query-core/build/modern/mutation.cjs +307 -0
- package/node_modules/@tanstack/query-core/build/modern/mutation.cjs.map +1 -0
- package/node_modules/@tanstack/query-core/build/modern/mutation.d.cts +3 -0
- package/node_modules/@tanstack/query-core/build/modern/mutation.d.ts +3 -0
- package/node_modules/@tanstack/query-core/build/modern/mutation.js +281 -0
- package/node_modules/@tanstack/query-core/build/modern/mutation.js.map +1 -0
- package/node_modules/@tanstack/query-core/build/modern/mutationCache.cjs +149 -0
- package/node_modules/@tanstack/query-core/build/modern/mutationCache.cjs.map +1 -0
- package/node_modules/@tanstack/query-core/build/modern/mutationCache.d.cts +3 -0
- package/node_modules/@tanstack/query-core/build/modern/mutationCache.d.ts +3 -0
- package/node_modules/@tanstack/query-core/build/modern/mutationCache.js +124 -0
- package/node_modules/@tanstack/query-core/build/modern/mutationCache.js.map +1 -0
- package/node_modules/@tanstack/query-core/build/modern/mutationObserver.cjs +165 -0
- package/node_modules/@tanstack/query-core/build/modern/mutationObserver.cjs.map +1 -0
- package/node_modules/@tanstack/query-core/build/modern/mutationObserver.d.cts +3 -0
- package/node_modules/@tanstack/query-core/build/modern/mutationObserver.d.ts +3 -0
- package/node_modules/@tanstack/query-core/build/modern/mutationObserver.js +140 -0
- package/node_modules/@tanstack/query-core/build/modern/mutationObserver.js.map +1 -0
- package/node_modules/@tanstack/query-core/build/modern/notifyManager.cjs +113 -0
- package/node_modules/@tanstack/query-core/build/modern/notifyManager.cjs.map +1 -0
- package/node_modules/@tanstack/query-core/build/modern/notifyManager.d.cts +46 -0
- package/node_modules/@tanstack/query-core/build/modern/notifyManager.d.ts +46 -0
- package/node_modules/@tanstack/query-core/build/modern/notifyManager.js +86 -0
- package/node_modules/@tanstack/query-core/build/modern/notifyManager.js.map +1 -0
- package/node_modules/@tanstack/query-core/build/modern/onlineManager.cjs +84 -0
- package/node_modules/@tanstack/query-core/build/modern/onlineManager.cjs.map +1 -0
- package/node_modules/@tanstack/query-core/build/modern/onlineManager.d.cts +16 -0
- package/node_modules/@tanstack/query-core/build/modern/onlineManager.d.ts +16 -0
- package/node_modules/@tanstack/query-core/build/modern/onlineManager.js +58 -0
- package/node_modules/@tanstack/query-core/build/modern/onlineManager.js.map +1 -0
- package/node_modules/@tanstack/query-core/build/modern/queriesObserver.cjs +237 -0
- package/node_modules/@tanstack/query-core/build/modern/queriesObserver.cjs.map +1 -0
- package/node_modules/@tanstack/query-core/build/modern/queriesObserver.d.cts +27 -0
- package/node_modules/@tanstack/query-core/build/modern/queriesObserver.d.ts +27 -0
- package/node_modules/@tanstack/query-core/build/modern/queriesObserver.js +212 -0
- package/node_modules/@tanstack/query-core/build/modern/queriesObserver.js.map +1 -0
- package/node_modules/@tanstack/query-core/build/modern/query.cjs +452 -0
- package/node_modules/@tanstack/query-core/build/modern/query.cjs.map +1 -0
- package/node_modules/@tanstack/query-core/build/modern/query.d.cts +3 -0
- package/node_modules/@tanstack/query-core/build/modern/query.d.ts +3 -0
- package/node_modules/@tanstack/query-core/build/modern/query.js +434 -0
- package/node_modules/@tanstack/query-core/build/modern/query.js.map +1 -0
- package/node_modules/@tanstack/query-core/build/modern/queryCache.cjs +122 -0
- package/node_modules/@tanstack/query-core/build/modern/queryCache.cjs.map +1 -0
- package/node_modules/@tanstack/query-core/build/modern/queryCache.d.cts +3 -0
- package/node_modules/@tanstack/query-core/build/modern/queryCache.d.ts +3 -0
- package/node_modules/@tanstack/query-core/build/modern/queryCache.js +97 -0
- package/node_modules/@tanstack/query-core/build/modern/queryCache.js.map +1 -0
- package/node_modules/@tanstack/query-core/build/modern/queryClient.cjs +322 -0
- package/node_modules/@tanstack/query-core/build/modern/queryClient.cjs.map +1 -0
- package/node_modules/@tanstack/query-core/build/modern/queryClient.d.cts +3 -0
- package/node_modules/@tanstack/query-core/build/modern/queryClient.d.ts +3 -0
- package/node_modules/@tanstack/query-core/build/modern/queryClient.js +305 -0
- package/node_modules/@tanstack/query-core/build/modern/queryClient.js.map +1 -0
- package/node_modules/@tanstack/query-core/build/modern/queryObserver.cjs +488 -0
- package/node_modules/@tanstack/query-core/build/modern/queryObserver.cjs.map +1 -0
- package/node_modules/@tanstack/query-core/build/modern/queryObserver.d.cts +3 -0
- package/node_modules/@tanstack/query-core/build/modern/queryObserver.d.ts +3 -0
- package/node_modules/@tanstack/query-core/build/modern/queryObserver.js +472 -0
- package/node_modules/@tanstack/query-core/build/modern/queryObserver.js.map +1 -0
- package/node_modules/@tanstack/query-core/build/modern/removable.cjs +58 -0
- package/node_modules/@tanstack/query-core/build/modern/removable.cjs.map +1 -0
- package/node_modules/@tanstack/query-core/build/modern/removable.d.cts +11 -0
- package/node_modules/@tanstack/query-core/build/modern/removable.d.ts +11 -0
- package/node_modules/@tanstack/query-core/build/modern/removable.js +33 -0
- package/node_modules/@tanstack/query-core/build/modern/removable.js.map +1 -0
- package/node_modules/@tanstack/query-core/build/modern/retryer.cjs +161 -0
- package/node_modules/@tanstack/query-core/build/modern/retryer.cjs.map +1 -0
- package/node_modules/@tanstack/query-core/build/modern/retryer.d.cts +3 -0
- package/node_modules/@tanstack/query-core/build/modern/retryer.d.ts +3 -0
- package/node_modules/@tanstack/query-core/build/modern/retryer.js +133 -0
- package/node_modules/@tanstack/query-core/build/modern/retryer.js.map +1 -0
- package/node_modules/@tanstack/query-core/build/modern/streamedQuery.cjs +82 -0
- package/node_modules/@tanstack/query-core/build/modern/streamedQuery.cjs.map +1 -0
- package/node_modules/@tanstack/query-core/build/modern/streamedQuery.d.cts +34 -0
- package/node_modules/@tanstack/query-core/build/modern/streamedQuery.d.ts +34 -0
- package/node_modules/@tanstack/query-core/build/modern/streamedQuery.js +57 -0
- package/node_modules/@tanstack/query-core/build/modern/streamedQuery.js.map +1 -0
- package/node_modules/@tanstack/query-core/build/modern/subscribable.cjs +51 -0
- package/node_modules/@tanstack/query-core/build/modern/subscribable.cjs.map +1 -0
- package/node_modules/@tanstack/query-core/build/modern/subscribable.d.cts +10 -0
- package/node_modules/@tanstack/query-core/build/modern/subscribable.d.ts +10 -0
- package/node_modules/@tanstack/query-core/build/modern/subscribable.js +26 -0
- package/node_modules/@tanstack/query-core/build/modern/subscribable.js.map +1 -0
- package/node_modules/@tanstack/query-core/build/modern/thenable.cjs +75 -0
- package/node_modules/@tanstack/query-core/build/modern/thenable.cjs.map +1 -0
- package/node_modules/@tanstack/query-core/build/modern/thenable.d.cts +47 -0
- package/node_modules/@tanstack/query-core/build/modern/thenable.d.ts +47 -0
- package/node_modules/@tanstack/query-core/build/modern/thenable.js +49 -0
- package/node_modules/@tanstack/query-core/build/modern/thenable.js.map +1 -0
- package/node_modules/@tanstack/query-core/build/modern/timeoutManager.cjs +98 -0
- package/node_modules/@tanstack/query-core/build/modern/timeoutManager.cjs.map +1 -0
- package/node_modules/@tanstack/query-core/build/modern/timeoutManager.d.cts +58 -0
- package/node_modules/@tanstack/query-core/build/modern/timeoutManager.d.ts +58 -0
- package/node_modules/@tanstack/query-core/build/modern/timeoutManager.js +70 -0
- package/node_modules/@tanstack/query-core/build/modern/timeoutManager.js.map +1 -0
- package/node_modules/@tanstack/query-core/build/modern/types.cjs +37 -0
- package/node_modules/@tanstack/query-core/build/modern/types.cjs.map +1 -0
- package/node_modules/@tanstack/query-core/build/modern/types.d.cts +3 -0
- package/node_modules/@tanstack/query-core/build/modern/types.d.ts +3 -0
- package/node_modules/@tanstack/query-core/build/modern/types.js +10 -0
- package/node_modules/@tanstack/query-core/build/modern/types.js.map +1 -0
- package/node_modules/@tanstack/query-core/build/modern/utils.cjs +330 -0
- package/node_modules/@tanstack/query-core/build/modern/utils.cjs.map +1 -0
- package/node_modules/@tanstack/query-core/build/modern/utils.d.cts +3 -0
- package/node_modules/@tanstack/query-core/build/modern/utils.d.ts +3 -0
- package/node_modules/@tanstack/query-core/build/modern/utils.js +281 -0
- package/node_modules/@tanstack/query-core/build/modern/utils.js.map +1 -0
- package/node_modules/@tanstack/query-core/package.json +65 -0
- package/node_modules/@tanstack/query-core/src/focusManager.ts +86 -0
- package/node_modules/@tanstack/query-core/src/hydration.ts +285 -0
- package/node_modules/@tanstack/query-core/src/index.ts +55 -0
- package/node_modules/@tanstack/query-core/src/infiniteQueryBehavior.ts +176 -0
- package/node_modules/@tanstack/query-core/src/infiniteQueryObserver.ts +190 -0
- package/node_modules/@tanstack/query-core/src/mutation.ts +419 -0
- package/node_modules/@tanstack/query-core/src/mutationCache.ts +244 -0
- package/node_modules/@tanstack/query-core/src/mutationObserver.ts +227 -0
- package/node_modules/@tanstack/query-core/src/notifyManager.ts +99 -0
- package/node_modules/@tanstack/query-core/src/onlineManager.ts +71 -0
- package/node_modules/@tanstack/query-core/src/queriesObserver.ts +315 -0
- package/node_modules/@tanstack/query-core/src/query.ts +756 -0
- package/node_modules/@tanstack/query-core/src/queryCache.ts +223 -0
- package/node_modules/@tanstack/query-core/src/queryClient.ts +648 -0
- package/node_modules/@tanstack/query-core/src/queryObserver.ts +828 -0
- package/node_modules/@tanstack/query-core/src/removable.ts +39 -0
- package/node_modules/@tanstack/query-core/src/retryer.ts +228 -0
- package/node_modules/@tanstack/query-core/src/streamedQuery.ts +122 -0
- package/node_modules/@tanstack/query-core/src/subscribable.ts +30 -0
- package/node_modules/@tanstack/query-core/src/thenable.ts +111 -0
- package/node_modules/@tanstack/query-core/src/timeoutManager.ts +135 -0
- package/node_modules/@tanstack/query-core/src/types.ts +1391 -0
- package/node_modules/@tanstack/query-core/src/utils.ts +499 -0
- package/node_modules/@tanstack/react-query/LICENSE +21 -0
- package/node_modules/@tanstack/react-query/README.md +48 -0
- package/node_modules/@tanstack/react-query/build/codemods/src/utils/index.cjs +208 -0
- package/node_modules/@tanstack/react-query/build/codemods/src/utils/transformers/query-cache-transformer.cjs +124 -0
- package/node_modules/@tanstack/react-query/build/codemods/src/utils/transformers/query-client-transformer.cjs +53 -0
- package/node_modules/@tanstack/react-query/build/codemods/src/utils/transformers/use-query-like-transformer.cjs +38 -0
- package/node_modules/@tanstack/react-query/build/codemods/src/v4/key-transformation.cjs +181 -0
- package/node_modules/@tanstack/react-query/build/codemods/src/v4/replace-import-specifier.cjs +25 -0
- package/node_modules/@tanstack/react-query/build/codemods/src/v4/utils/replacers/key-replacer.cjs +164 -0
- package/node_modules/@tanstack/react-query/build/codemods/src/v5/is-loading/is-loading.cjs +244 -0
- package/node_modules/@tanstack/react-query/build/codemods/src/v5/keep-previous-data/README.md +32 -0
- package/node_modules/@tanstack/react-query/build/codemods/src/v5/keep-previous-data/keep-previous-data.cjs +271 -0
- package/node_modules/@tanstack/react-query/build/codemods/src/v5/keep-previous-data/utils/already-has-placeholder-data-property.cjs +26 -0
- package/node_modules/@tanstack/react-query/build/codemods/src/v5/remove-overloads/remove-overloads.cjs +58 -0
- package/node_modules/@tanstack/react-query/build/codemods/src/v5/remove-overloads/transformers/filter-aware-usage-transformer.cjs +271 -0
- package/node_modules/@tanstack/react-query/build/codemods/src/v5/remove-overloads/transformers/query-fn-aware-usage-transformer.cjs +185 -0
- package/node_modules/@tanstack/react-query/build/codemods/src/v5/remove-overloads/utils/index.cjs +123 -0
- package/node_modules/@tanstack/react-query/build/codemods/src/v5/remove-overloads/utils/unknown-usage-error.cjs +27 -0
- package/node_modules/@tanstack/react-query/build/codemods/src/v5/rename-hydrate/rename-hydrate.cjs +55 -0
- package/node_modules/@tanstack/react-query/build/codemods/src/v5/rename-properties/rename-properties.cjs +41 -0
- package/node_modules/@tanstack/react-query/build/legacy/HydrationBoundary.cjs +91 -0
- package/node_modules/@tanstack/react-query/build/legacy/HydrationBoundary.cjs.map +1 -0
- package/node_modules/@tanstack/react-query/build/legacy/HydrationBoundary.d.cts +14 -0
- package/node_modules/@tanstack/react-query/build/legacy/HydrationBoundary.d.ts +14 -0
- package/node_modules/@tanstack/react-query/build/legacy/HydrationBoundary.js +57 -0
- package/node_modules/@tanstack/react-query/build/legacy/HydrationBoundary.js.map +1 -0
- package/node_modules/@tanstack/react-query/build/legacy/IsRestoringProvider.cjs +47 -0
- package/node_modules/@tanstack/react-query/build/legacy/IsRestoringProvider.cjs.map +1 -0
- package/node_modules/@tanstack/react-query/build/legacy/IsRestoringProvider.d.cts +6 -0
- package/node_modules/@tanstack/react-query/build/legacy/IsRestoringProvider.d.ts +6 -0
- package/node_modules/@tanstack/react-query/build/legacy/IsRestoringProvider.js +12 -0
- package/node_modules/@tanstack/react-query/build/legacy/IsRestoringProvider.js.map +1 -0
- package/node_modules/@tanstack/react-query/build/legacy/QueryClientProvider.cjs +72 -0
- package/node_modules/@tanstack/react-query/build/legacy/QueryClientProvider.cjs.map +1 -0
- package/node_modules/@tanstack/react-query/build/legacy/QueryClientProvider.d.cts +12 -0
- package/node_modules/@tanstack/react-query/build/legacy/QueryClientProvider.d.ts +12 -0
- package/node_modules/@tanstack/react-query/build/legacy/QueryClientProvider.js +36 -0
- package/node_modules/@tanstack/react-query/build/legacy/QueryClientProvider.js.map +1 -0
- package/node_modules/@tanstack/react-query/build/legacy/QueryErrorResetBoundary.cjs +67 -0
- package/node_modules/@tanstack/react-query/build/legacy/QueryErrorResetBoundary.cjs.map +1 -0
- package/node_modules/@tanstack/react-query/build/legacy/QueryErrorResetBoundary.d.cts +19 -0
- package/node_modules/@tanstack/react-query/build/legacy/QueryErrorResetBoundary.d.ts +19 -0
- package/node_modules/@tanstack/react-query/build/legacy/QueryErrorResetBoundary.js +32 -0
- package/node_modules/@tanstack/react-query/build/legacy/QueryErrorResetBoundary.js.map +1 -0
- package/node_modules/@tanstack/react-query/build/legacy/errorBoundaryUtils.cjs +69 -0
- package/node_modules/@tanstack/react-query/build/legacy/errorBoundaryUtils.cjs.map +1 -0
- package/node_modules/@tanstack/react-query/build/legacy/errorBoundaryUtils.d.cts +16 -0
- package/node_modules/@tanstack/react-query/build/legacy/errorBoundaryUtils.d.ts +16 -0
- package/node_modules/@tanstack/react-query/build/legacy/errorBoundaryUtils.js +33 -0
- package/node_modules/@tanstack/react-query/build/legacy/errorBoundaryUtils.js.map +1 -0
- package/node_modules/@tanstack/react-query/build/legacy/index.cjs +97 -0
- package/node_modules/@tanstack/react-query/build/legacy/index.cjs.map +1 -0
- package/node_modules/@tanstack/react-query/build/legacy/index.d.cts +22 -0
- package/node_modules/@tanstack/react-query/build/legacy/index.d.ts +22 -0
- package/node_modules/@tanstack/react-query/build/legacy/index.js +54 -0
- package/node_modules/@tanstack/react-query/build/legacy/index.js.map +1 -0
- package/node_modules/@tanstack/react-query/build/legacy/infiniteQueryOptions.cjs +33 -0
- package/node_modules/@tanstack/react-query/build/legacy/infiniteQueryOptions.cjs.map +1 -0
- package/node_modules/@tanstack/react-query/build/legacy/infiniteQueryOptions.d.cts +23 -0
- package/node_modules/@tanstack/react-query/build/legacy/infiniteQueryOptions.d.ts +23 -0
- package/node_modules/@tanstack/react-query/build/legacy/infiniteQueryOptions.js +8 -0
- package/node_modules/@tanstack/react-query/build/legacy/infiniteQueryOptions.js.map +1 -0
- package/node_modules/@tanstack/react-query/build/legacy/mutationOptions.cjs +33 -0
- package/node_modules/@tanstack/react-query/build/legacy/mutationOptions.cjs.map +1 -0
- package/node_modules/@tanstack/react-query/build/legacy/mutationOptions.d.cts +7 -0
- package/node_modules/@tanstack/react-query/build/legacy/mutationOptions.d.ts +7 -0
- package/node_modules/@tanstack/react-query/build/legacy/mutationOptions.js +8 -0
- package/node_modules/@tanstack/react-query/build/legacy/mutationOptions.js.map +1 -0
- package/node_modules/@tanstack/react-query/build/legacy/queryOptions.cjs +33 -0
- package/node_modules/@tanstack/react-query/build/legacy/queryOptions.cjs.map +1 -0
- package/node_modules/@tanstack/react-query/build/legacy/queryOptions.d.cts +24 -0
- package/node_modules/@tanstack/react-query/build/legacy/queryOptions.d.ts +24 -0
- package/node_modules/@tanstack/react-query/build/legacy/queryOptions.js +8 -0
- package/node_modules/@tanstack/react-query/build/legacy/queryOptions.js.map +1 -0
- package/node_modules/@tanstack/react-query/build/legacy/suspense.cjs +58 -0
- package/node_modules/@tanstack/react-query/build/legacy/suspense.cjs.map +1 -0
- package/node_modules/@tanstack/react-query/build/legacy/suspense.d.cts +12 -0
- package/node_modules/@tanstack/react-query/build/legacy/suspense.d.ts +12 -0
- package/node_modules/@tanstack/react-query/build/legacy/suspense.js +29 -0
- package/node_modules/@tanstack/react-query/build/legacy/suspense.js.map +1 -0
- package/node_modules/@tanstack/react-query/build/legacy/types.cjs +19 -0
- package/node_modules/@tanstack/react-query/build/legacy/types.cjs.map +1 -0
- package/node_modules/@tanstack/react-query/build/legacy/types.d.cts +52 -0
- package/node_modules/@tanstack/react-query/build/legacy/types.d.ts +52 -0
- package/node_modules/@tanstack/react-query/build/legacy/types.js +1 -0
- package/node_modules/@tanstack/react-query/build/legacy/types.js.map +1 -0
- package/node_modules/@tanstack/react-query/build/legacy/useBaseQuery.cjs +133 -0
- package/node_modules/@tanstack/react-query/build/legacy/useBaseQuery.cjs.map +1 -0
- package/node_modules/@tanstack/react-query/build/legacy/useBaseQuery.d.cts +6 -0
- package/node_modules/@tanstack/react-query/build/legacy/useBaseQuery.d.ts +6 -0
- package/node_modules/@tanstack/react-query/build/legacy/useBaseQuery.js +108 -0
- package/node_modules/@tanstack/react-query/build/legacy/useBaseQuery.js.map +1 -0
- package/node_modules/@tanstack/react-query/build/legacy/useInfiniteQuery.cjs +40 -0
- package/node_modules/@tanstack/react-query/build/legacy/useInfiniteQuery.cjs.map +1 -0
- package/node_modules/@tanstack/react-query/build/legacy/useInfiniteQuery.d.cts +9 -0
- package/node_modules/@tanstack/react-query/build/legacy/useInfiniteQuery.d.ts +9 -0
- package/node_modules/@tanstack/react-query/build/legacy/useInfiniteQuery.js +16 -0
- package/node_modules/@tanstack/react-query/build/legacy/useInfiniteQuery.js.map +1 -0
- package/node_modules/@tanstack/react-query/build/legacy/useIsFetching.cjs +56 -0
- package/node_modules/@tanstack/react-query/build/legacy/useIsFetching.cjs.map +1 -0
- package/node_modules/@tanstack/react-query/build/legacy/useIsFetching.d.cts +5 -0
- package/node_modules/@tanstack/react-query/build/legacy/useIsFetching.d.ts +5 -0
- package/node_modules/@tanstack/react-query/build/legacy/useIsFetching.js +22 -0
- package/node_modules/@tanstack/react-query/build/legacy/useIsFetching.js.map +1 -0
- package/node_modules/@tanstack/react-query/build/legacy/useMutation.cjs +74 -0
- package/node_modules/@tanstack/react-query/build/legacy/useMutation.cjs.map +1 -0
- package/node_modules/@tanstack/react-query/build/legacy/useMutation.d.cts +6 -0
- package/node_modules/@tanstack/react-query/build/legacy/useMutation.d.ts +6 -0
- package/node_modules/@tanstack/react-query/build/legacy/useMutation.js +45 -0
- package/node_modules/@tanstack/react-query/build/legacy/useMutation.js.map +1 -0
- package/node_modules/@tanstack/react-query/build/legacy/useMutationState.cjs +86 -0
- package/node_modules/@tanstack/react-query/build/legacy/useMutationState.cjs.map +1 -0
- package/node_modules/@tanstack/react-query/build/legacy/useMutationState.d.cts +10 -0
- package/node_modules/@tanstack/react-query/build/legacy/useMutationState.d.ts +10 -0
- package/node_modules/@tanstack/react-query/build/legacy/useMutationState.js +51 -0
- package/node_modules/@tanstack/react-query/build/legacy/useMutationState.js.map +1 -0
- package/node_modules/@tanstack/react-query/build/legacy/usePrefetchInfiniteQuery.cjs +37 -0
- package/node_modules/@tanstack/react-query/build/legacy/usePrefetchInfiniteQuery.cjs.map +1 -0
- package/node_modules/@tanstack/react-query/build/legacy/usePrefetchInfiniteQuery.d.cts +5 -0
- package/node_modules/@tanstack/react-query/build/legacy/usePrefetchInfiniteQuery.d.ts +5 -0
- package/node_modules/@tanstack/react-query/build/legacy/usePrefetchInfiniteQuery.js +12 -0
- package/node_modules/@tanstack/react-query/build/legacy/usePrefetchInfiniteQuery.js.map +1 -0
- package/node_modules/@tanstack/react-query/build/legacy/usePrefetchQuery.cjs +37 -0
- package/node_modules/@tanstack/react-query/build/legacy/usePrefetchQuery.cjs.map +1 -0
- package/node_modules/@tanstack/react-query/build/legacy/usePrefetchQuery.d.cts +6 -0
- package/node_modules/@tanstack/react-query/build/legacy/usePrefetchQuery.d.ts +6 -0
- package/node_modules/@tanstack/react-query/build/legacy/usePrefetchQuery.js +12 -0
- package/node_modules/@tanstack/react-query/build/legacy/usePrefetchQuery.js.map +1 -0
- package/node_modules/@tanstack/react-query/build/legacy/useQueries.cjs +132 -0
- package/node_modules/@tanstack/react-query/build/legacy/useQueries.cjs.map +1 -0
- package/node_modules/@tanstack/react-query/build/legacy/useQueries.d.cts +76 -0
- package/node_modules/@tanstack/react-query/build/legacy/useQueries.d.ts +76 -0
- package/node_modules/@tanstack/react-query/build/legacy/useQueries.js +112 -0
- package/node_modules/@tanstack/react-query/build/legacy/useQueries.js.map +1 -0
- package/node_modules/@tanstack/react-query/build/legacy/useQuery.cjs +36 -0
- package/node_modules/@tanstack/react-query/build/legacy/useQuery.cjs.map +1 -0
- package/node_modules/@tanstack/react-query/build/legacy/useQuery.d.cts +9 -0
- package/node_modules/@tanstack/react-query/build/legacy/useQuery.d.ts +9 -0
- package/node_modules/@tanstack/react-query/build/legacy/useQuery.js +12 -0
- package/node_modules/@tanstack/react-query/build/legacy/useQuery.js.map +1 -0
- package/node_modules/@tanstack/react-query/build/legacy/useSuspenseInfiniteQuery.cjs +51 -0
- package/node_modules/@tanstack/react-query/build/legacy/useSuspenseInfiniteQuery.cjs.map +1 -0
- package/node_modules/@tanstack/react-query/build/legacy/useSuspenseInfiniteQuery.d.cts +6 -0
- package/node_modules/@tanstack/react-query/build/legacy/useSuspenseInfiniteQuery.d.ts +6 -0
- package/node_modules/@tanstack/react-query/build/legacy/useSuspenseInfiniteQuery.js +27 -0
- package/node_modules/@tanstack/react-query/build/legacy/useSuspenseInfiniteQuery.js.map +1 -0
- package/node_modules/@tanstack/react-query/build/legacy/useSuspenseQueries.cjs +56 -0
- package/node_modules/@tanstack/react-query/build/legacy/useSuspenseQueries.cjs.map +1 -0
- package/node_modules/@tanstack/react-query/build/legacy/useSuspenseQueries.d.cts +79 -0
- package/node_modules/@tanstack/react-query/build/legacy/useSuspenseQueries.d.ts +79 -0
- package/node_modules/@tanstack/react-query/build/legacy/useSuspenseQueries.js +32 -0
- package/node_modules/@tanstack/react-query/build/legacy/useSuspenseQueries.js.map +1 -0
- package/node_modules/@tanstack/react-query/build/legacy/useSuspenseQuery.cjs +52 -0
- package/node_modules/@tanstack/react-query/build/legacy/useSuspenseQuery.cjs.map +1 -0
- package/node_modules/@tanstack/react-query/build/legacy/useSuspenseQuery.d.cts +6 -0
- package/node_modules/@tanstack/react-query/build/legacy/useSuspenseQuery.d.ts +6 -0
- package/node_modules/@tanstack/react-query/build/legacy/useSuspenseQuery.js +28 -0
- package/node_modules/@tanstack/react-query/build/legacy/useSuspenseQuery.js.map +1 -0
- package/node_modules/@tanstack/react-query/build/modern/HydrationBoundary.cjs +91 -0
- package/node_modules/@tanstack/react-query/build/modern/HydrationBoundary.cjs.map +1 -0
- package/node_modules/@tanstack/react-query/build/modern/HydrationBoundary.d.cts +14 -0
- package/node_modules/@tanstack/react-query/build/modern/HydrationBoundary.d.ts +14 -0
- package/node_modules/@tanstack/react-query/build/modern/HydrationBoundary.js +57 -0
- package/node_modules/@tanstack/react-query/build/modern/HydrationBoundary.js.map +1 -0
- package/node_modules/@tanstack/react-query/build/modern/IsRestoringProvider.cjs +47 -0
- package/node_modules/@tanstack/react-query/build/modern/IsRestoringProvider.cjs.map +1 -0
- package/node_modules/@tanstack/react-query/build/modern/IsRestoringProvider.d.cts +6 -0
- package/node_modules/@tanstack/react-query/build/modern/IsRestoringProvider.d.ts +6 -0
- package/node_modules/@tanstack/react-query/build/modern/IsRestoringProvider.js +12 -0
- package/node_modules/@tanstack/react-query/build/modern/IsRestoringProvider.js.map +1 -0
- package/node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs +72 -0
- package/node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs.map +1 -0
- package/node_modules/@tanstack/react-query/build/modern/QueryClientProvider.d.cts +12 -0
- package/node_modules/@tanstack/react-query/build/modern/QueryClientProvider.d.ts +12 -0
- package/node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js +36 -0
- package/node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js.map +1 -0
- package/node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.cjs +67 -0
- package/node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.cjs.map +1 -0
- package/node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.d.cts +19 -0
- package/node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.d.ts +19 -0
- package/node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.js +32 -0
- package/node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.js.map +1 -0
- package/node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.cjs +69 -0
- package/node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.cjs.map +1 -0
- package/node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.d.cts +16 -0
- package/node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.d.ts +16 -0
- package/node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.js +33 -0
- package/node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.js.map +1 -0
- package/node_modules/@tanstack/react-query/build/modern/index.cjs +97 -0
- package/node_modules/@tanstack/react-query/build/modern/index.cjs.map +1 -0
- package/node_modules/@tanstack/react-query/build/modern/index.d.cts +22 -0
- package/node_modules/@tanstack/react-query/build/modern/index.d.ts +22 -0
- package/node_modules/@tanstack/react-query/build/modern/index.js +54 -0
- package/node_modules/@tanstack/react-query/build/modern/index.js.map +1 -0
- package/node_modules/@tanstack/react-query/build/modern/infiniteQueryOptions.cjs +33 -0
- package/node_modules/@tanstack/react-query/build/modern/infiniteQueryOptions.cjs.map +1 -0
- package/node_modules/@tanstack/react-query/build/modern/infiniteQueryOptions.d.cts +23 -0
- package/node_modules/@tanstack/react-query/build/modern/infiniteQueryOptions.d.ts +23 -0
- package/node_modules/@tanstack/react-query/build/modern/infiniteQueryOptions.js +8 -0
- package/node_modules/@tanstack/react-query/build/modern/infiniteQueryOptions.js.map +1 -0
- package/node_modules/@tanstack/react-query/build/modern/mutationOptions.cjs +33 -0
- package/node_modules/@tanstack/react-query/build/modern/mutationOptions.cjs.map +1 -0
- package/node_modules/@tanstack/react-query/build/modern/mutationOptions.d.cts +7 -0
- package/node_modules/@tanstack/react-query/build/modern/mutationOptions.d.ts +7 -0
- package/node_modules/@tanstack/react-query/build/modern/mutationOptions.js +8 -0
- package/node_modules/@tanstack/react-query/build/modern/mutationOptions.js.map +1 -0
- package/node_modules/@tanstack/react-query/build/modern/queryOptions.cjs +33 -0
- package/node_modules/@tanstack/react-query/build/modern/queryOptions.cjs.map +1 -0
- package/node_modules/@tanstack/react-query/build/modern/queryOptions.d.cts +24 -0
- package/node_modules/@tanstack/react-query/build/modern/queryOptions.d.ts +24 -0
- package/node_modules/@tanstack/react-query/build/modern/queryOptions.js +8 -0
- package/node_modules/@tanstack/react-query/build/modern/queryOptions.js.map +1 -0
- package/node_modules/@tanstack/react-query/build/modern/suspense.cjs +58 -0
- package/node_modules/@tanstack/react-query/build/modern/suspense.cjs.map +1 -0
- package/node_modules/@tanstack/react-query/build/modern/suspense.d.cts +12 -0
- package/node_modules/@tanstack/react-query/build/modern/suspense.d.ts +12 -0
- package/node_modules/@tanstack/react-query/build/modern/suspense.js +29 -0
- package/node_modules/@tanstack/react-query/build/modern/suspense.js.map +1 -0
- package/node_modules/@tanstack/react-query/build/modern/types.cjs +19 -0
- package/node_modules/@tanstack/react-query/build/modern/types.cjs.map +1 -0
- package/node_modules/@tanstack/react-query/build/modern/types.d.cts +52 -0
- package/node_modules/@tanstack/react-query/build/modern/types.d.ts +52 -0
- package/node_modules/@tanstack/react-query/build/modern/types.js +1 -0
- package/node_modules/@tanstack/react-query/build/modern/types.js.map +1 -0
- package/node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs +130 -0
- package/node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs.map +1 -0
- package/node_modules/@tanstack/react-query/build/modern/useBaseQuery.d.cts +6 -0
- package/node_modules/@tanstack/react-query/build/modern/useBaseQuery.d.ts +6 -0
- package/node_modules/@tanstack/react-query/build/modern/useBaseQuery.js +105 -0
- package/node_modules/@tanstack/react-query/build/modern/useBaseQuery.js.map +1 -0
- package/node_modules/@tanstack/react-query/build/modern/useInfiniteQuery.cjs +40 -0
- package/node_modules/@tanstack/react-query/build/modern/useInfiniteQuery.cjs.map +1 -0
- package/node_modules/@tanstack/react-query/build/modern/useInfiniteQuery.d.cts +9 -0
- package/node_modules/@tanstack/react-query/build/modern/useInfiniteQuery.d.ts +9 -0
- package/node_modules/@tanstack/react-query/build/modern/useInfiniteQuery.js +16 -0
- package/node_modules/@tanstack/react-query/build/modern/useInfiniteQuery.js.map +1 -0
- package/node_modules/@tanstack/react-query/build/modern/useIsFetching.cjs +56 -0
- package/node_modules/@tanstack/react-query/build/modern/useIsFetching.cjs.map +1 -0
- package/node_modules/@tanstack/react-query/build/modern/useIsFetching.d.cts +5 -0
- package/node_modules/@tanstack/react-query/build/modern/useIsFetching.d.ts +5 -0
- package/node_modules/@tanstack/react-query/build/modern/useIsFetching.js +22 -0
- package/node_modules/@tanstack/react-query/build/modern/useIsFetching.js.map +1 -0
- package/node_modules/@tanstack/react-query/build/modern/useMutation.cjs +74 -0
- package/node_modules/@tanstack/react-query/build/modern/useMutation.cjs.map +1 -0
- package/node_modules/@tanstack/react-query/build/modern/useMutation.d.cts +6 -0
- package/node_modules/@tanstack/react-query/build/modern/useMutation.d.ts +6 -0
- package/node_modules/@tanstack/react-query/build/modern/useMutation.js +45 -0
- package/node_modules/@tanstack/react-query/build/modern/useMutation.js.map +1 -0
- package/node_modules/@tanstack/react-query/build/modern/useMutationState.cjs +86 -0
- package/node_modules/@tanstack/react-query/build/modern/useMutationState.cjs.map +1 -0
- package/node_modules/@tanstack/react-query/build/modern/useMutationState.d.cts +10 -0
- package/node_modules/@tanstack/react-query/build/modern/useMutationState.d.ts +10 -0
- package/node_modules/@tanstack/react-query/build/modern/useMutationState.js +51 -0
- package/node_modules/@tanstack/react-query/build/modern/useMutationState.js.map +1 -0
- package/node_modules/@tanstack/react-query/build/modern/usePrefetchInfiniteQuery.cjs +37 -0
- package/node_modules/@tanstack/react-query/build/modern/usePrefetchInfiniteQuery.cjs.map +1 -0
- package/node_modules/@tanstack/react-query/build/modern/usePrefetchInfiniteQuery.d.cts +5 -0
- package/node_modules/@tanstack/react-query/build/modern/usePrefetchInfiniteQuery.d.ts +5 -0
- package/node_modules/@tanstack/react-query/build/modern/usePrefetchInfiniteQuery.js +12 -0
- package/node_modules/@tanstack/react-query/build/modern/usePrefetchInfiniteQuery.js.map +1 -0
- package/node_modules/@tanstack/react-query/build/modern/usePrefetchQuery.cjs +37 -0
- package/node_modules/@tanstack/react-query/build/modern/usePrefetchQuery.cjs.map +1 -0
- package/node_modules/@tanstack/react-query/build/modern/usePrefetchQuery.d.cts +6 -0
- package/node_modules/@tanstack/react-query/build/modern/usePrefetchQuery.d.ts +6 -0
- package/node_modules/@tanstack/react-query/build/modern/usePrefetchQuery.js +12 -0
- package/node_modules/@tanstack/react-query/build/modern/usePrefetchQuery.js.map +1 -0
- package/node_modules/@tanstack/react-query/build/modern/useQueries.cjs +132 -0
- package/node_modules/@tanstack/react-query/build/modern/useQueries.cjs.map +1 -0
- package/node_modules/@tanstack/react-query/build/modern/useQueries.d.cts +76 -0
- package/node_modules/@tanstack/react-query/build/modern/useQueries.d.ts +76 -0
- package/node_modules/@tanstack/react-query/build/modern/useQueries.js +112 -0
- package/node_modules/@tanstack/react-query/build/modern/useQueries.js.map +1 -0
- package/node_modules/@tanstack/react-query/build/modern/useQuery.cjs +36 -0
- package/node_modules/@tanstack/react-query/build/modern/useQuery.cjs.map +1 -0
- package/node_modules/@tanstack/react-query/build/modern/useQuery.d.cts +9 -0
- package/node_modules/@tanstack/react-query/build/modern/useQuery.d.ts +9 -0
- package/node_modules/@tanstack/react-query/build/modern/useQuery.js +12 -0
- package/node_modules/@tanstack/react-query/build/modern/useQuery.js.map +1 -0
- package/node_modules/@tanstack/react-query/build/modern/useSuspenseInfiniteQuery.cjs +51 -0
- package/node_modules/@tanstack/react-query/build/modern/useSuspenseInfiniteQuery.cjs.map +1 -0
- package/node_modules/@tanstack/react-query/build/modern/useSuspenseInfiniteQuery.d.cts +6 -0
- package/node_modules/@tanstack/react-query/build/modern/useSuspenseInfiniteQuery.d.ts +6 -0
- package/node_modules/@tanstack/react-query/build/modern/useSuspenseInfiniteQuery.js +27 -0
- package/node_modules/@tanstack/react-query/build/modern/useSuspenseInfiniteQuery.js.map +1 -0
- package/node_modules/@tanstack/react-query/build/modern/useSuspenseQueries.cjs +56 -0
- package/node_modules/@tanstack/react-query/build/modern/useSuspenseQueries.cjs.map +1 -0
- package/node_modules/@tanstack/react-query/build/modern/useSuspenseQueries.d.cts +79 -0
- package/node_modules/@tanstack/react-query/build/modern/useSuspenseQueries.d.ts +79 -0
- package/node_modules/@tanstack/react-query/build/modern/useSuspenseQueries.js +32 -0
- package/node_modules/@tanstack/react-query/build/modern/useSuspenseQueries.js.map +1 -0
- package/node_modules/@tanstack/react-query/build/modern/useSuspenseQuery.cjs +52 -0
- package/node_modules/@tanstack/react-query/build/modern/useSuspenseQuery.cjs.map +1 -0
- package/node_modules/@tanstack/react-query/build/modern/useSuspenseQuery.d.cts +6 -0
- package/node_modules/@tanstack/react-query/build/modern/useSuspenseQuery.d.ts +6 -0
- package/node_modules/@tanstack/react-query/build/modern/useSuspenseQuery.js +28 -0
- package/node_modules/@tanstack/react-query/build/modern/useSuspenseQuery.js.map +1 -0
- package/node_modules/@tanstack/react-query/build/query-codemods/eslint.config.js +18 -0
- package/node_modules/@tanstack/react-query/build/query-codemods/package.json +38 -0
- package/node_modules/@tanstack/react-query/build/query-codemods/root.eslint.config.js +64 -0
- package/node_modules/@tanstack/react-query/build/query-codemods/tsconfig.json +8 -0
- package/node_modules/@tanstack/react-query/build/query-codemods/vite.config.ts +30 -0
- package/node_modules/@tanstack/react-query/package.json +87 -0
- package/node_modules/@tanstack/react-query/src/HydrationBoundary.tsx +111 -0
- package/node_modules/@tanstack/react-query/src/IsRestoringProvider.ts +7 -0
- package/node_modules/@tanstack/react-query/src/QueryClientProvider.tsx +45 -0
- package/node_modules/@tanstack/react-query/src/QueryErrorResetBoundary.tsx +56 -0
- package/node_modules/@tanstack/react-query/src/errorBoundaryUtils.ts +82 -0
- package/node_modules/@tanstack/react-query/src/index.ts +56 -0
- package/node_modules/@tanstack/react-query/src/infiniteQueryOptions.ts +149 -0
- package/node_modules/@tanstack/react-query/src/mutationOptions.ts +41 -0
- package/node_modules/@tanstack/react-query/src/queryOptions.ts +87 -0
- package/node_modules/@tanstack/react-query/src/suspense.ts +80 -0
- package/node_modules/@tanstack/react-query/src/types.ts +242 -0
- package/node_modules/@tanstack/react-query/src/useBaseQuery.ts +170 -0
- package/node_modules/@tanstack/react-query/src/useInfiniteQuery.ts +81 -0
- package/node_modules/@tanstack/react-query/src/useIsFetching.ts +24 -0
- package/node_modules/@tanstack/react-query/src/useMutation.ts +69 -0
- package/node_modules/@tanstack/react-query/src/useMutationState.ts +75 -0
- package/node_modules/@tanstack/react-query/src/usePrefetchInfiniteQuery.tsx +30 -0
- package/node_modules/@tanstack/react-query/src/usePrefetchQuery.tsx +19 -0
- package/node_modules/@tanstack/react-query/src/useQueries.ts +333 -0
- package/node_modules/@tanstack/react-query/src/useQuery.ts +52 -0
- package/node_modules/@tanstack/react-query/src/useSuspenseInfiniteQuery.ts +50 -0
- package/node_modules/@tanstack/react-query/src/useSuspenseQueries.ts +211 -0
- package/node_modules/@tanstack/react-query/src/useSuspenseQuery.ts +34 -0
- package/node_modules/react-router/CHANGELOG.md +2366 -0
- package/node_modules/react-router/LICENSE.md +23 -0
- package/node_modules/react-router/README.md +7 -0
- package/node_modules/react-router/dist/development/browser-BEPxnEBW.d.mts +313 -0
- package/node_modules/react-router/dist/development/browser-CJ9_du-U.d.ts +313 -0
- package/node_modules/react-router/dist/development/chunk-4LKRSAEJ.mjs +2508 -0
- package/node_modules/react-router/dist/development/chunk-7PAHGFS4.js +188 -0
- package/node_modules/react-router/dist/development/chunk-HMDR2CVH.js +1334 -0
- package/node_modules/react-router/dist/development/chunk-JZWAC4HX.mjs +11009 -0
- package/node_modules/react-router/dist/development/chunk-WICQJKU6.js +9736 -0
- package/node_modules/react-router/dist/development/dom-export.d.mts +171 -0
- package/node_modules/react-router/dist/development/dom-export.d.ts +172 -0
- package/node_modules/react-router/dist/development/dom-export.js +987 -0
- package/node_modules/react-router/dist/development/dom-export.mjs +979 -0
- package/node_modules/react-router/dist/development/index-react-server-client-1TI9M9o1.d.ts +2534 -0
- package/node_modules/react-router/dist/development/index-react-server-client-MKTlCGL3.d.mts +2534 -0
- package/node_modules/react-router/dist/development/index-react-server-client.d.mts +3 -0
- package/node_modules/react-router/dist/development/index-react-server-client.d.ts +3 -0
- package/node_modules/react-router/dist/development/index-react-server-client.js +61 -0
- package/node_modules/react-router/dist/development/index-react-server-client.mjs +59 -0
- package/node_modules/react-router/dist/development/index-react-server.d.mts +2553 -0
- package/node_modules/react-router/dist/development/index-react-server.d.ts +2553 -0
- package/node_modules/react-router/dist/development/index-react-server.js +3708 -0
- package/node_modules/react-router/dist/development/index-react-server.mjs +3597 -0
- package/node_modules/react-router/dist/development/index.d.mts +1387 -0
- package/node_modules/react-router/dist/development/index.d.ts +1387 -0
- package/node_modules/react-router/dist/development/index.js +2551 -0
- package/node_modules/react-router/dist/development/index.mjs +275 -0
- package/node_modules/react-router/dist/development/instrumentation-DvHY1sgY.d.ts +3332 -0
- package/node_modules/react-router/dist/development/lib/types/internal.d.mts +184 -0
- package/node_modules/react-router/dist/development/lib/types/internal.d.ts +184 -0
- package/node_modules/react-router/dist/development/lib/types/internal.js +10 -0
- package/node_modules/react-router/dist/development/lib/types/internal.mjs +10 -0
- package/node_modules/react-router/dist/development/register-Bm80E9qL.d.ts +30 -0
- package/node_modules/react-router/dist/development/register-CS_tiXsm.d.mts +30 -0
- package/node_modules/react-router/dist/development/router-5iOvts3c.d.mts +3332 -0
- package/node_modules/react-router/dist/production/browser-BEPxnEBW.d.mts +313 -0
- package/node_modules/react-router/dist/production/browser-CJ9_du-U.d.ts +313 -0
- package/node_modules/react-router/dist/production/chunk-GSFLVUYQ.mjs +2508 -0
- package/node_modules/react-router/dist/production/chunk-N2HZAAIG.js +1334 -0
- package/node_modules/react-router/dist/production/chunk-NGWWS4QJ.js +188 -0
- package/node_modules/react-router/dist/production/chunk-QSNCZFX5.js +9736 -0
- package/node_modules/react-router/dist/production/chunk-Y3R63HEB.mjs +11009 -0
- package/node_modules/react-router/dist/production/dom-export.d.mts +171 -0
- package/node_modules/react-router/dist/production/dom-export.d.ts +172 -0
- package/node_modules/react-router/dist/production/dom-export.js +987 -0
- package/node_modules/react-router/dist/production/dom-export.mjs +979 -0
- package/node_modules/react-router/dist/production/index-react-server-client-1TI9M9o1.d.ts +2534 -0
- package/node_modules/react-router/dist/production/index-react-server-client-MKTlCGL3.d.mts +2534 -0
- package/node_modules/react-router/dist/production/index-react-server-client.d.mts +3 -0
- package/node_modules/react-router/dist/production/index-react-server-client.d.ts +3 -0
- package/node_modules/react-router/dist/production/index-react-server-client.js +61 -0
- package/node_modules/react-router/dist/production/index-react-server-client.mjs +59 -0
- package/node_modules/react-router/dist/production/index-react-server.d.mts +2553 -0
- package/node_modules/react-router/dist/production/index-react-server.d.ts +2553 -0
- package/node_modules/react-router/dist/production/index-react-server.js +3708 -0
- package/node_modules/react-router/dist/production/index-react-server.mjs +3597 -0
- package/node_modules/react-router/dist/production/index.d.mts +1387 -0
- package/node_modules/react-router/dist/production/index.d.ts +1387 -0
- package/node_modules/react-router/dist/production/index.js +2551 -0
- package/node_modules/react-router/dist/production/index.mjs +275 -0
- package/node_modules/react-router/dist/production/instrumentation-DvHY1sgY.d.ts +3332 -0
- package/node_modules/react-router/dist/production/lib/types/internal.d.mts +184 -0
- package/node_modules/react-router/dist/production/lib/types/internal.d.ts +184 -0
- package/node_modules/react-router/dist/production/lib/types/internal.js +10 -0
- package/node_modules/react-router/dist/production/lib/types/internal.mjs +10 -0
- package/node_modules/react-router/dist/production/register-Bm80E9qL.d.ts +30 -0
- package/node_modules/react-router/dist/production/register-CS_tiXsm.d.mts +30 -0
- package/node_modules/react-router/dist/production/router-5iOvts3c.d.mts +3332 -0
- package/node_modules/react-router/node_modules/cookie/LICENSE +24 -0
- package/node_modules/react-router/node_modules/cookie/README.md +295 -0
- package/node_modules/react-router/node_modules/cookie/dist/index.d.ts +148 -0
- package/node_modules/react-router/node_modules/cookie/dist/index.js +350 -0
- package/node_modules/react-router/node_modules/cookie/dist/index.js.map +1 -0
- package/node_modules/react-router/node_modules/cookie/package.json +47 -0
- package/node_modules/react-router/package.json +163 -0
- package/node_modules/react-router-dom/LICENSE.md +23 -0
- package/node_modules/react-router-dom/README.md +6 -0
- package/node_modules/react-router-dom/dist/index.d.mts +2 -0
- package/node_modules/react-router-dom/dist/index.d.ts +2 -0
- package/node_modules/react-router-dom/dist/index.js +45 -0
- package/node_modules/react-router-dom/dist/index.mjs +18 -0
- package/node_modules/react-router-dom/package.json +83 -0
- package/node_modules/set-cookie-parser/LICENSE +21 -0
- package/node_modules/set-cookie-parser/README.md +202 -0
- package/node_modules/set-cookie-parser/lib/set-cookie.js +242 -0
- package/node_modules/set-cookie-parser/package.json +45 -0
- package/node_modules/zustand/LICENSE +21 -0
- package/node_modules/zustand/README.md +512 -0
- package/node_modules/zustand/esm/index.d.mts +2 -0
- package/node_modules/zustand/esm/index.mjs +2 -0
- package/node_modules/zustand/esm/middleware/combine.d.mts +4 -0
- package/node_modules/zustand/esm/middleware/devtools.d.mts +58 -0
- package/node_modules/zustand/esm/middleware/immer.d.mts +29 -0
- package/node_modules/zustand/esm/middleware/immer.mjs +12 -0
- package/node_modules/zustand/esm/middleware/persist.d.mts +99 -0
- package/node_modules/zustand/esm/middleware/redux.d.mts +21 -0
- package/node_modules/zustand/esm/middleware/ssrSafe.d.mts +2 -0
- package/node_modules/zustand/esm/middleware/subscribeWithSelector.d.mts +25 -0
- package/node_modules/zustand/esm/middleware.d.mts +6 -0
- package/node_modules/zustand/esm/middleware.mjs +487 -0
- package/node_modules/zustand/esm/react/shallow.d.mts +1 -0
- package/node_modules/zustand/esm/react/shallow.mjs +12 -0
- package/node_modules/zustand/esm/react.d.mts +14 -0
- package/node_modules/zustand/esm/react.mjs +22 -0
- package/node_modules/zustand/esm/shallow.d.mts +2 -0
- package/node_modules/zustand/esm/shallow.mjs +2 -0
- package/node_modules/zustand/esm/traditional.d.mts +14 -0
- package/node_modules/zustand/esm/traditional.mjs +26 -0
- package/node_modules/zustand/esm/vanilla/shallow.d.mts +1 -0
- package/node_modules/zustand/esm/vanilla/shallow.mjs +55 -0
- package/node_modules/zustand/esm/vanilla.d.mts +31 -0
- package/node_modules/zustand/esm/vanilla.mjs +24 -0
- package/node_modules/zustand/index.d.ts +2 -0
- package/node_modules/zustand/index.js +19 -0
- package/node_modules/zustand/middleware/combine.d.ts +4 -0
- package/node_modules/zustand/middleware/devtools.d.ts +58 -0
- package/node_modules/zustand/middleware/immer.d.ts +29 -0
- package/node_modules/zustand/middleware/immer.js +14 -0
- package/node_modules/zustand/middleware/persist.d.ts +99 -0
- package/node_modules/zustand/middleware/redux.d.ts +21 -0
- package/node_modules/zustand/middleware/ssrSafe.d.ts +2 -0
- package/node_modules/zustand/middleware/subscribeWithSelector.d.ts +25 -0
- package/node_modules/zustand/middleware.d.ts +6 -0
- package/node_modules/zustand/middleware.js +495 -0
- package/node_modules/zustand/package.json +108 -0
- package/node_modules/zustand/react/shallow.d.ts +1 -0
- package/node_modules/zustand/react/shallow.js +14 -0
- package/node_modules/zustand/react.d.ts +14 -0
- package/node_modules/zustand/react.js +25 -0
- package/node_modules/zustand/shallow.d.ts +2 -0
- package/node_modules/zustand/shallow.js +15 -0
- package/node_modules/zustand/traditional.d.ts +14 -0
- package/node_modules/zustand/traditional.js +29 -0
- package/node_modules/zustand/ts_version_4.5_and_above_is_required.d.ts +0 -0
- package/node_modules/zustand/vanilla/shallow.d.ts +1 -0
- package/node_modules/zustand/vanilla/shallow.js +57 -0
- package/node_modules/zustand/vanilla.d.ts +31 -0
- package/node_modules/zustand/vanilla.js +26 -0
- package/oclif.manifest.json +516 -454
- package/package.json +5 -2
|
@@ -0,0 +1,472 @@
|
|
|
1
|
+
// src/queryObserver.ts
|
|
2
|
+
import { focusManager } from "./focusManager.js";
|
|
3
|
+
import { notifyManager } from "./notifyManager.js";
|
|
4
|
+
import { fetchState } from "./query.js";
|
|
5
|
+
import { Subscribable } from "./subscribable.js";
|
|
6
|
+
import { pendingThenable } from "./thenable.js";
|
|
7
|
+
import {
|
|
8
|
+
isServer,
|
|
9
|
+
isValidTimeout,
|
|
10
|
+
noop,
|
|
11
|
+
replaceData,
|
|
12
|
+
resolveEnabled,
|
|
13
|
+
resolveStaleTime,
|
|
14
|
+
shallowEqualObjects,
|
|
15
|
+
timeUntilStale
|
|
16
|
+
} from "./utils.js";
|
|
17
|
+
import { timeoutManager } from "./timeoutManager.js";
|
|
18
|
+
var QueryObserver = class extends Subscribable {
|
|
19
|
+
constructor(client, options) {
|
|
20
|
+
super();
|
|
21
|
+
this.options = options;
|
|
22
|
+
this.#client = client;
|
|
23
|
+
this.#selectError = null;
|
|
24
|
+
this.#currentThenable = pendingThenable();
|
|
25
|
+
this.bindMethods();
|
|
26
|
+
this.setOptions(options);
|
|
27
|
+
}
|
|
28
|
+
#client;
|
|
29
|
+
#currentQuery = void 0;
|
|
30
|
+
#currentQueryInitialState = void 0;
|
|
31
|
+
#currentResult = void 0;
|
|
32
|
+
#currentResultState;
|
|
33
|
+
#currentResultOptions;
|
|
34
|
+
#currentThenable;
|
|
35
|
+
#selectError;
|
|
36
|
+
#selectFn;
|
|
37
|
+
#selectResult;
|
|
38
|
+
// This property keeps track of the last query with defined data.
|
|
39
|
+
// It will be used to pass the previous data and query to the placeholder function between renders.
|
|
40
|
+
#lastQueryWithDefinedData;
|
|
41
|
+
#staleTimeoutId;
|
|
42
|
+
#refetchIntervalId;
|
|
43
|
+
#currentRefetchInterval;
|
|
44
|
+
#trackedProps = /* @__PURE__ */ new Set();
|
|
45
|
+
bindMethods() {
|
|
46
|
+
this.refetch = this.refetch.bind(this);
|
|
47
|
+
}
|
|
48
|
+
onSubscribe() {
|
|
49
|
+
if (this.listeners.size === 1) {
|
|
50
|
+
this.#currentQuery.addObserver(this);
|
|
51
|
+
if (shouldFetchOnMount(this.#currentQuery, this.options)) {
|
|
52
|
+
this.#executeFetch();
|
|
53
|
+
} else {
|
|
54
|
+
this.updateResult();
|
|
55
|
+
}
|
|
56
|
+
this.#updateTimers();
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
onUnsubscribe() {
|
|
60
|
+
if (!this.hasListeners()) {
|
|
61
|
+
this.destroy();
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
shouldFetchOnReconnect() {
|
|
65
|
+
return shouldFetchOn(
|
|
66
|
+
this.#currentQuery,
|
|
67
|
+
this.options,
|
|
68
|
+
this.options.refetchOnReconnect
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
shouldFetchOnWindowFocus() {
|
|
72
|
+
return shouldFetchOn(
|
|
73
|
+
this.#currentQuery,
|
|
74
|
+
this.options,
|
|
75
|
+
this.options.refetchOnWindowFocus
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
destroy() {
|
|
79
|
+
this.listeners = /* @__PURE__ */ new Set();
|
|
80
|
+
this.#clearStaleTimeout();
|
|
81
|
+
this.#clearRefetchInterval();
|
|
82
|
+
this.#currentQuery.removeObserver(this);
|
|
83
|
+
}
|
|
84
|
+
setOptions(options) {
|
|
85
|
+
const prevOptions = this.options;
|
|
86
|
+
const prevQuery = this.#currentQuery;
|
|
87
|
+
this.options = this.#client.defaultQueryOptions(options);
|
|
88
|
+
if (this.options.enabled !== void 0 && typeof this.options.enabled !== "boolean" && typeof this.options.enabled !== "function" && typeof resolveEnabled(this.options.enabled, this.#currentQuery) !== "boolean") {
|
|
89
|
+
throw new Error(
|
|
90
|
+
"Expected enabled to be a boolean or a callback that returns a boolean"
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
this.#updateQuery();
|
|
94
|
+
this.#currentQuery.setOptions(this.options);
|
|
95
|
+
if (prevOptions._defaulted && !shallowEqualObjects(this.options, prevOptions)) {
|
|
96
|
+
this.#client.getQueryCache().notify({
|
|
97
|
+
type: "observerOptionsUpdated",
|
|
98
|
+
query: this.#currentQuery,
|
|
99
|
+
observer: this
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
const mounted = this.hasListeners();
|
|
103
|
+
if (mounted && shouldFetchOptionally(
|
|
104
|
+
this.#currentQuery,
|
|
105
|
+
prevQuery,
|
|
106
|
+
this.options,
|
|
107
|
+
prevOptions
|
|
108
|
+
)) {
|
|
109
|
+
this.#executeFetch();
|
|
110
|
+
}
|
|
111
|
+
this.updateResult();
|
|
112
|
+
if (mounted && (this.#currentQuery !== prevQuery || resolveEnabled(this.options.enabled, this.#currentQuery) !== resolveEnabled(prevOptions.enabled, this.#currentQuery) || resolveStaleTime(this.options.staleTime, this.#currentQuery) !== resolveStaleTime(prevOptions.staleTime, this.#currentQuery))) {
|
|
113
|
+
this.#updateStaleTimeout();
|
|
114
|
+
}
|
|
115
|
+
const nextRefetchInterval = this.#computeRefetchInterval();
|
|
116
|
+
if (mounted && (this.#currentQuery !== prevQuery || resolveEnabled(this.options.enabled, this.#currentQuery) !== resolveEnabled(prevOptions.enabled, this.#currentQuery) || nextRefetchInterval !== this.#currentRefetchInterval)) {
|
|
117
|
+
this.#updateRefetchInterval(nextRefetchInterval);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
getOptimisticResult(options) {
|
|
121
|
+
const query = this.#client.getQueryCache().build(this.#client, options);
|
|
122
|
+
const result = this.createResult(query, options);
|
|
123
|
+
if (shouldAssignObserverCurrentProperties(this, result)) {
|
|
124
|
+
this.#currentResult = result;
|
|
125
|
+
this.#currentResultOptions = this.options;
|
|
126
|
+
this.#currentResultState = this.#currentQuery.state;
|
|
127
|
+
}
|
|
128
|
+
return result;
|
|
129
|
+
}
|
|
130
|
+
getCurrentResult() {
|
|
131
|
+
return this.#currentResult;
|
|
132
|
+
}
|
|
133
|
+
trackResult(result, onPropTracked) {
|
|
134
|
+
return new Proxy(result, {
|
|
135
|
+
get: (target, key) => {
|
|
136
|
+
this.trackProp(key);
|
|
137
|
+
onPropTracked?.(key);
|
|
138
|
+
if (key === "promise") {
|
|
139
|
+
this.trackProp("data");
|
|
140
|
+
if (!this.options.experimental_prefetchInRender && this.#currentThenable.status === "pending") {
|
|
141
|
+
this.#currentThenable.reject(
|
|
142
|
+
new Error(
|
|
143
|
+
"experimental_prefetchInRender feature flag is not enabled"
|
|
144
|
+
)
|
|
145
|
+
);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
return Reflect.get(target, key);
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
trackProp(key) {
|
|
153
|
+
this.#trackedProps.add(key);
|
|
154
|
+
}
|
|
155
|
+
getCurrentQuery() {
|
|
156
|
+
return this.#currentQuery;
|
|
157
|
+
}
|
|
158
|
+
refetch({ ...options } = {}) {
|
|
159
|
+
return this.fetch({
|
|
160
|
+
...options
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
fetchOptimistic(options) {
|
|
164
|
+
const defaultedOptions = this.#client.defaultQueryOptions(options);
|
|
165
|
+
const query = this.#client.getQueryCache().build(this.#client, defaultedOptions);
|
|
166
|
+
return query.fetch().then(() => this.createResult(query, defaultedOptions));
|
|
167
|
+
}
|
|
168
|
+
fetch(fetchOptions) {
|
|
169
|
+
return this.#executeFetch({
|
|
170
|
+
...fetchOptions,
|
|
171
|
+
cancelRefetch: fetchOptions.cancelRefetch ?? true
|
|
172
|
+
}).then(() => {
|
|
173
|
+
this.updateResult();
|
|
174
|
+
return this.#currentResult;
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
#executeFetch(fetchOptions) {
|
|
178
|
+
this.#updateQuery();
|
|
179
|
+
let promise = this.#currentQuery.fetch(
|
|
180
|
+
this.options,
|
|
181
|
+
fetchOptions
|
|
182
|
+
);
|
|
183
|
+
if (!fetchOptions?.throwOnError) {
|
|
184
|
+
promise = promise.catch(noop);
|
|
185
|
+
}
|
|
186
|
+
return promise;
|
|
187
|
+
}
|
|
188
|
+
#updateStaleTimeout() {
|
|
189
|
+
this.#clearStaleTimeout();
|
|
190
|
+
const staleTime = resolveStaleTime(
|
|
191
|
+
this.options.staleTime,
|
|
192
|
+
this.#currentQuery
|
|
193
|
+
);
|
|
194
|
+
if (isServer || this.#currentResult.isStale || !isValidTimeout(staleTime)) {
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
197
|
+
const time = timeUntilStale(this.#currentResult.dataUpdatedAt, staleTime);
|
|
198
|
+
const timeout = time + 1;
|
|
199
|
+
this.#staleTimeoutId = timeoutManager.setTimeout(() => {
|
|
200
|
+
if (!this.#currentResult.isStale) {
|
|
201
|
+
this.updateResult();
|
|
202
|
+
}
|
|
203
|
+
}, timeout);
|
|
204
|
+
}
|
|
205
|
+
#computeRefetchInterval() {
|
|
206
|
+
return (typeof this.options.refetchInterval === "function" ? this.options.refetchInterval(this.#currentQuery) : this.options.refetchInterval) ?? false;
|
|
207
|
+
}
|
|
208
|
+
#updateRefetchInterval(nextInterval) {
|
|
209
|
+
this.#clearRefetchInterval();
|
|
210
|
+
this.#currentRefetchInterval = nextInterval;
|
|
211
|
+
if (isServer || resolveEnabled(this.options.enabled, this.#currentQuery) === false || !isValidTimeout(this.#currentRefetchInterval) || this.#currentRefetchInterval === 0) {
|
|
212
|
+
return;
|
|
213
|
+
}
|
|
214
|
+
this.#refetchIntervalId = timeoutManager.setInterval(() => {
|
|
215
|
+
if (this.options.refetchIntervalInBackground || focusManager.isFocused()) {
|
|
216
|
+
this.#executeFetch();
|
|
217
|
+
}
|
|
218
|
+
}, this.#currentRefetchInterval);
|
|
219
|
+
}
|
|
220
|
+
#updateTimers() {
|
|
221
|
+
this.#updateStaleTimeout();
|
|
222
|
+
this.#updateRefetchInterval(this.#computeRefetchInterval());
|
|
223
|
+
}
|
|
224
|
+
#clearStaleTimeout() {
|
|
225
|
+
if (this.#staleTimeoutId) {
|
|
226
|
+
timeoutManager.clearTimeout(this.#staleTimeoutId);
|
|
227
|
+
this.#staleTimeoutId = void 0;
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
#clearRefetchInterval() {
|
|
231
|
+
if (this.#refetchIntervalId) {
|
|
232
|
+
timeoutManager.clearInterval(this.#refetchIntervalId);
|
|
233
|
+
this.#refetchIntervalId = void 0;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
createResult(query, options) {
|
|
237
|
+
const prevQuery = this.#currentQuery;
|
|
238
|
+
const prevOptions = this.options;
|
|
239
|
+
const prevResult = this.#currentResult;
|
|
240
|
+
const prevResultState = this.#currentResultState;
|
|
241
|
+
const prevResultOptions = this.#currentResultOptions;
|
|
242
|
+
const queryChange = query !== prevQuery;
|
|
243
|
+
const queryInitialState = queryChange ? query.state : this.#currentQueryInitialState;
|
|
244
|
+
const { state } = query;
|
|
245
|
+
let newState = { ...state };
|
|
246
|
+
let isPlaceholderData = false;
|
|
247
|
+
let data;
|
|
248
|
+
if (options._optimisticResults) {
|
|
249
|
+
const mounted = this.hasListeners();
|
|
250
|
+
const fetchOnMount = !mounted && shouldFetchOnMount(query, options);
|
|
251
|
+
const fetchOptionally = mounted && shouldFetchOptionally(query, prevQuery, options, prevOptions);
|
|
252
|
+
if (fetchOnMount || fetchOptionally) {
|
|
253
|
+
newState = {
|
|
254
|
+
...newState,
|
|
255
|
+
...fetchState(state.data, query.options)
|
|
256
|
+
};
|
|
257
|
+
}
|
|
258
|
+
if (options._optimisticResults === "isRestoring") {
|
|
259
|
+
newState.fetchStatus = "idle";
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
let { error, errorUpdatedAt, status } = newState;
|
|
263
|
+
data = newState.data;
|
|
264
|
+
let skipSelect = false;
|
|
265
|
+
if (options.placeholderData !== void 0 && data === void 0 && status === "pending") {
|
|
266
|
+
let placeholderData;
|
|
267
|
+
if (prevResult?.isPlaceholderData && options.placeholderData === prevResultOptions?.placeholderData) {
|
|
268
|
+
placeholderData = prevResult.data;
|
|
269
|
+
skipSelect = true;
|
|
270
|
+
} else {
|
|
271
|
+
placeholderData = typeof options.placeholderData === "function" ? options.placeholderData(
|
|
272
|
+
this.#lastQueryWithDefinedData?.state.data,
|
|
273
|
+
this.#lastQueryWithDefinedData
|
|
274
|
+
) : options.placeholderData;
|
|
275
|
+
}
|
|
276
|
+
if (placeholderData !== void 0) {
|
|
277
|
+
status = "success";
|
|
278
|
+
data = replaceData(
|
|
279
|
+
prevResult?.data,
|
|
280
|
+
placeholderData,
|
|
281
|
+
options
|
|
282
|
+
);
|
|
283
|
+
isPlaceholderData = true;
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
if (options.select && data !== void 0 && !skipSelect) {
|
|
287
|
+
if (prevResult && data === prevResultState?.data && options.select === this.#selectFn) {
|
|
288
|
+
data = this.#selectResult;
|
|
289
|
+
} else {
|
|
290
|
+
try {
|
|
291
|
+
this.#selectFn = options.select;
|
|
292
|
+
data = options.select(data);
|
|
293
|
+
data = replaceData(prevResult?.data, data, options);
|
|
294
|
+
this.#selectResult = data;
|
|
295
|
+
this.#selectError = null;
|
|
296
|
+
} catch (selectError) {
|
|
297
|
+
this.#selectError = selectError;
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
if (this.#selectError) {
|
|
302
|
+
error = this.#selectError;
|
|
303
|
+
data = this.#selectResult;
|
|
304
|
+
errorUpdatedAt = Date.now();
|
|
305
|
+
status = "error";
|
|
306
|
+
}
|
|
307
|
+
const isFetching = newState.fetchStatus === "fetching";
|
|
308
|
+
const isPending = status === "pending";
|
|
309
|
+
const isError = status === "error";
|
|
310
|
+
const isLoading = isPending && isFetching;
|
|
311
|
+
const hasData = data !== void 0;
|
|
312
|
+
const result = {
|
|
313
|
+
status,
|
|
314
|
+
fetchStatus: newState.fetchStatus,
|
|
315
|
+
isPending,
|
|
316
|
+
isSuccess: status === "success",
|
|
317
|
+
isError,
|
|
318
|
+
isInitialLoading: isLoading,
|
|
319
|
+
isLoading,
|
|
320
|
+
data,
|
|
321
|
+
dataUpdatedAt: newState.dataUpdatedAt,
|
|
322
|
+
error,
|
|
323
|
+
errorUpdatedAt,
|
|
324
|
+
failureCount: newState.fetchFailureCount,
|
|
325
|
+
failureReason: newState.fetchFailureReason,
|
|
326
|
+
errorUpdateCount: newState.errorUpdateCount,
|
|
327
|
+
isFetched: newState.dataUpdateCount > 0 || newState.errorUpdateCount > 0,
|
|
328
|
+
isFetchedAfterMount: newState.dataUpdateCount > queryInitialState.dataUpdateCount || newState.errorUpdateCount > queryInitialState.errorUpdateCount,
|
|
329
|
+
isFetching,
|
|
330
|
+
isRefetching: isFetching && !isPending,
|
|
331
|
+
isLoadingError: isError && !hasData,
|
|
332
|
+
isPaused: newState.fetchStatus === "paused",
|
|
333
|
+
isPlaceholderData,
|
|
334
|
+
isRefetchError: isError && hasData,
|
|
335
|
+
isStale: isStale(query, options),
|
|
336
|
+
refetch: this.refetch,
|
|
337
|
+
promise: this.#currentThenable,
|
|
338
|
+
isEnabled: resolveEnabled(options.enabled, query) !== false
|
|
339
|
+
};
|
|
340
|
+
const nextResult = result;
|
|
341
|
+
if (this.options.experimental_prefetchInRender) {
|
|
342
|
+
const hasResultData = nextResult.data !== void 0;
|
|
343
|
+
const isErrorWithoutData = nextResult.status === "error" && !hasResultData;
|
|
344
|
+
const finalizeThenableIfPossible = (thenable) => {
|
|
345
|
+
if (isErrorWithoutData) {
|
|
346
|
+
thenable.reject(nextResult.error);
|
|
347
|
+
} else if (hasResultData) {
|
|
348
|
+
thenable.resolve(nextResult.data);
|
|
349
|
+
}
|
|
350
|
+
};
|
|
351
|
+
const recreateThenable = () => {
|
|
352
|
+
const pending = this.#currentThenable = nextResult.promise = pendingThenable();
|
|
353
|
+
finalizeThenableIfPossible(pending);
|
|
354
|
+
};
|
|
355
|
+
const prevThenable = this.#currentThenable;
|
|
356
|
+
switch (prevThenable.status) {
|
|
357
|
+
case "pending":
|
|
358
|
+
if (query.queryHash === prevQuery.queryHash) {
|
|
359
|
+
finalizeThenableIfPossible(prevThenable);
|
|
360
|
+
}
|
|
361
|
+
break;
|
|
362
|
+
case "fulfilled":
|
|
363
|
+
if (isErrorWithoutData || nextResult.data !== prevThenable.value) {
|
|
364
|
+
recreateThenable();
|
|
365
|
+
}
|
|
366
|
+
break;
|
|
367
|
+
case "rejected":
|
|
368
|
+
if (!isErrorWithoutData || nextResult.error !== prevThenable.reason) {
|
|
369
|
+
recreateThenable();
|
|
370
|
+
}
|
|
371
|
+
break;
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
return nextResult;
|
|
375
|
+
}
|
|
376
|
+
updateResult() {
|
|
377
|
+
const prevResult = this.#currentResult;
|
|
378
|
+
const nextResult = this.createResult(this.#currentQuery, this.options);
|
|
379
|
+
this.#currentResultState = this.#currentQuery.state;
|
|
380
|
+
this.#currentResultOptions = this.options;
|
|
381
|
+
if (this.#currentResultState.data !== void 0) {
|
|
382
|
+
this.#lastQueryWithDefinedData = this.#currentQuery;
|
|
383
|
+
}
|
|
384
|
+
if (shallowEqualObjects(nextResult, prevResult)) {
|
|
385
|
+
return;
|
|
386
|
+
}
|
|
387
|
+
this.#currentResult = nextResult;
|
|
388
|
+
const shouldNotifyListeners = () => {
|
|
389
|
+
if (!prevResult) {
|
|
390
|
+
return true;
|
|
391
|
+
}
|
|
392
|
+
const { notifyOnChangeProps } = this.options;
|
|
393
|
+
const notifyOnChangePropsValue = typeof notifyOnChangeProps === "function" ? notifyOnChangeProps() : notifyOnChangeProps;
|
|
394
|
+
if (notifyOnChangePropsValue === "all" || !notifyOnChangePropsValue && !this.#trackedProps.size) {
|
|
395
|
+
return true;
|
|
396
|
+
}
|
|
397
|
+
const includedProps = new Set(
|
|
398
|
+
notifyOnChangePropsValue ?? this.#trackedProps
|
|
399
|
+
);
|
|
400
|
+
if (this.options.throwOnError) {
|
|
401
|
+
includedProps.add("error");
|
|
402
|
+
}
|
|
403
|
+
return Object.keys(this.#currentResult).some((key) => {
|
|
404
|
+
const typedKey = key;
|
|
405
|
+
const changed = this.#currentResult[typedKey] !== prevResult[typedKey];
|
|
406
|
+
return changed && includedProps.has(typedKey);
|
|
407
|
+
});
|
|
408
|
+
};
|
|
409
|
+
this.#notify({ listeners: shouldNotifyListeners() });
|
|
410
|
+
}
|
|
411
|
+
#updateQuery() {
|
|
412
|
+
const query = this.#client.getQueryCache().build(this.#client, this.options);
|
|
413
|
+
if (query === this.#currentQuery) {
|
|
414
|
+
return;
|
|
415
|
+
}
|
|
416
|
+
const prevQuery = this.#currentQuery;
|
|
417
|
+
this.#currentQuery = query;
|
|
418
|
+
this.#currentQueryInitialState = query.state;
|
|
419
|
+
if (this.hasListeners()) {
|
|
420
|
+
prevQuery?.removeObserver(this);
|
|
421
|
+
query.addObserver(this);
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
onQueryUpdate() {
|
|
425
|
+
this.updateResult();
|
|
426
|
+
if (this.hasListeners()) {
|
|
427
|
+
this.#updateTimers();
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
#notify(notifyOptions) {
|
|
431
|
+
notifyManager.batch(() => {
|
|
432
|
+
if (notifyOptions.listeners) {
|
|
433
|
+
this.listeners.forEach((listener) => {
|
|
434
|
+
listener(this.#currentResult);
|
|
435
|
+
});
|
|
436
|
+
}
|
|
437
|
+
this.#client.getQueryCache().notify({
|
|
438
|
+
query: this.#currentQuery,
|
|
439
|
+
type: "observerResultsUpdated"
|
|
440
|
+
});
|
|
441
|
+
});
|
|
442
|
+
}
|
|
443
|
+
};
|
|
444
|
+
function shouldLoadOnMount(query, options) {
|
|
445
|
+
return resolveEnabled(options.enabled, query) !== false && query.state.data === void 0 && !(query.state.status === "error" && options.retryOnMount === false);
|
|
446
|
+
}
|
|
447
|
+
function shouldFetchOnMount(query, options) {
|
|
448
|
+
return shouldLoadOnMount(query, options) || query.state.data !== void 0 && shouldFetchOn(query, options, options.refetchOnMount);
|
|
449
|
+
}
|
|
450
|
+
function shouldFetchOn(query, options, field) {
|
|
451
|
+
if (resolveEnabled(options.enabled, query) !== false && resolveStaleTime(options.staleTime, query) !== "static") {
|
|
452
|
+
const value = typeof field === "function" ? field(query) : field;
|
|
453
|
+
return value === "always" || value !== false && isStale(query, options);
|
|
454
|
+
}
|
|
455
|
+
return false;
|
|
456
|
+
}
|
|
457
|
+
function shouldFetchOptionally(query, prevQuery, options, prevOptions) {
|
|
458
|
+
return (query !== prevQuery || resolveEnabled(prevOptions.enabled, query) === false) && (!options.suspense || query.state.status !== "error") && isStale(query, options);
|
|
459
|
+
}
|
|
460
|
+
function isStale(query, options) {
|
|
461
|
+
return resolveEnabled(options.enabled, query) !== false && query.isStaleByTime(resolveStaleTime(options.staleTime, query));
|
|
462
|
+
}
|
|
463
|
+
function shouldAssignObserverCurrentProperties(observer, optimisticResult) {
|
|
464
|
+
if (!shallowEqualObjects(observer.getCurrentResult(), optimisticResult)) {
|
|
465
|
+
return true;
|
|
466
|
+
}
|
|
467
|
+
return false;
|
|
468
|
+
}
|
|
469
|
+
export {
|
|
470
|
+
QueryObserver
|
|
471
|
+
};
|
|
472
|
+
//# sourceMappingURL=queryObserver.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/queryObserver.ts"],"sourcesContent":["import { focusManager } from './focusManager'\nimport { notifyManager } from './notifyManager'\nimport { fetchState } from './query'\nimport { Subscribable } from './subscribable'\nimport { pendingThenable } from './thenable'\nimport {\n isServer,\n isValidTimeout,\n noop,\n replaceData,\n resolveEnabled,\n resolveStaleTime,\n shallowEqualObjects,\n timeUntilStale,\n} from './utils'\nimport { timeoutManager } from './timeoutManager'\nimport type { ManagedTimerId } from './timeoutManager'\nimport type { FetchOptions, Query, QueryState } from './query'\nimport type { QueryClient } from './queryClient'\nimport type { PendingThenable, Thenable } from './thenable'\nimport type {\n DefaultError,\n DefaultedQueryObserverOptions,\n PlaceholderDataFunction,\n QueryKey,\n QueryObserverBaseResult,\n QueryObserverOptions,\n QueryObserverResult,\n RefetchOptions,\n} from './types'\n\ntype QueryObserverListener<TData, TError> = (\n result: QueryObserverResult<TData, TError>,\n) => void\n\ninterface ObserverFetchOptions extends FetchOptions {\n throwOnError?: boolean\n}\n\nexport class QueryObserver<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n> extends Subscribable<QueryObserverListener<TData, TError>> {\n #client: QueryClient\n #currentQuery: Query<TQueryFnData, TError, TQueryData, TQueryKey> = undefined!\n #currentQueryInitialState: QueryState<TQueryData, TError> = undefined!\n #currentResult: QueryObserverResult<TData, TError> = undefined!\n #currentResultState?: QueryState<TQueryData, TError>\n #currentResultOptions?: QueryObserverOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey\n >\n #currentThenable: Thenable<TData>\n #selectError: TError | null\n #selectFn?: (data: TQueryData) => TData\n #selectResult?: TData\n // This property keeps track of the last query with defined data.\n // It will be used to pass the previous data and query to the placeholder function between renders.\n #lastQueryWithDefinedData?: Query<TQueryFnData, TError, TQueryData, TQueryKey>\n #staleTimeoutId?: ManagedTimerId\n #refetchIntervalId?: ManagedTimerId\n #currentRefetchInterval?: number | false\n #trackedProps = new Set<keyof QueryObserverResult>()\n\n constructor(\n client: QueryClient,\n public options: QueryObserverOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey\n >,\n ) {\n super()\n\n this.#client = client\n this.#selectError = null\n this.#currentThenable = pendingThenable()\n\n this.bindMethods()\n this.setOptions(options)\n }\n\n protected bindMethods(): void {\n this.refetch = this.refetch.bind(this)\n }\n\n protected onSubscribe(): void {\n if (this.listeners.size === 1) {\n this.#currentQuery.addObserver(this)\n\n if (shouldFetchOnMount(this.#currentQuery, this.options)) {\n this.#executeFetch()\n } else {\n this.updateResult()\n }\n\n this.#updateTimers()\n }\n }\n\n protected onUnsubscribe(): void {\n if (!this.hasListeners()) {\n this.destroy()\n }\n }\n\n shouldFetchOnReconnect(): boolean {\n return shouldFetchOn(\n this.#currentQuery,\n this.options,\n this.options.refetchOnReconnect,\n )\n }\n\n shouldFetchOnWindowFocus(): boolean {\n return shouldFetchOn(\n this.#currentQuery,\n this.options,\n this.options.refetchOnWindowFocus,\n )\n }\n\n destroy(): void {\n this.listeners = new Set()\n this.#clearStaleTimeout()\n this.#clearRefetchInterval()\n this.#currentQuery.removeObserver(this)\n }\n\n setOptions(\n options: QueryObserverOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey\n >,\n ): void {\n const prevOptions = this.options\n const prevQuery = this.#currentQuery\n\n this.options = this.#client.defaultQueryOptions(options)\n\n if (\n this.options.enabled !== undefined &&\n typeof this.options.enabled !== 'boolean' &&\n typeof this.options.enabled !== 'function' &&\n typeof resolveEnabled(this.options.enabled, this.#currentQuery) !==\n 'boolean'\n ) {\n throw new Error(\n 'Expected enabled to be a boolean or a callback that returns a boolean',\n )\n }\n\n this.#updateQuery()\n this.#currentQuery.setOptions(this.options)\n\n if (\n prevOptions._defaulted &&\n !shallowEqualObjects(this.options, prevOptions)\n ) {\n this.#client.getQueryCache().notify({\n type: 'observerOptionsUpdated',\n query: this.#currentQuery,\n observer: this,\n })\n }\n\n const mounted = this.hasListeners()\n\n // Fetch if there are subscribers\n if (\n mounted &&\n shouldFetchOptionally(\n this.#currentQuery,\n prevQuery,\n this.options,\n prevOptions,\n )\n ) {\n this.#executeFetch()\n }\n\n // Update result\n this.updateResult()\n\n // Update stale interval if needed\n if (\n mounted &&\n (this.#currentQuery !== prevQuery ||\n resolveEnabled(this.options.enabled, this.#currentQuery) !==\n resolveEnabled(prevOptions.enabled, this.#currentQuery) ||\n resolveStaleTime(this.options.staleTime, this.#currentQuery) !==\n resolveStaleTime(prevOptions.staleTime, this.#currentQuery))\n ) {\n this.#updateStaleTimeout()\n }\n\n const nextRefetchInterval = this.#computeRefetchInterval()\n\n // Update refetch interval if needed\n if (\n mounted &&\n (this.#currentQuery !== prevQuery ||\n resolveEnabled(this.options.enabled, this.#currentQuery) !==\n resolveEnabled(prevOptions.enabled, this.#currentQuery) ||\n nextRefetchInterval !== this.#currentRefetchInterval)\n ) {\n this.#updateRefetchInterval(nextRefetchInterval)\n }\n }\n\n getOptimisticResult(\n options: DefaultedQueryObserverOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey\n >,\n ): QueryObserverResult<TData, TError> {\n const query = this.#client.getQueryCache().build(this.#client, options)\n\n const result = this.createResult(query, options)\n\n if (shouldAssignObserverCurrentProperties(this, result)) {\n // this assigns the optimistic result to the current Observer\n // because if the query function changes, useQuery will be performing\n // an effect where it would fetch again.\n // When the fetch finishes, we perform a deep data cloning in order\n // to reuse objects references. This deep data clone is performed against\n // the `observer.currentResult.data` property\n // When QueryKey changes, we refresh the query and get new `optimistic`\n // result, while we leave the `observer.currentResult`, so when new data\n // arrives, it finds the old `observer.currentResult` which is related\n // to the old QueryKey. Which means that currentResult and selectData are\n // out of sync already.\n // To solve this, we move the cursor of the currentResult every time\n // an observer reads an optimistic value.\n\n // When keeping the previous data, the result doesn't change until new\n // data arrives.\n this.#currentResult = result\n this.#currentResultOptions = this.options\n this.#currentResultState = this.#currentQuery.state\n }\n return result\n }\n\n getCurrentResult(): QueryObserverResult<TData, TError> {\n return this.#currentResult\n }\n\n trackResult(\n result: QueryObserverResult<TData, TError>,\n onPropTracked?: (key: keyof QueryObserverResult) => void,\n ): QueryObserverResult<TData, TError> {\n return new Proxy(result, {\n get: (target, key) => {\n this.trackProp(key as keyof QueryObserverResult)\n onPropTracked?.(key as keyof QueryObserverResult)\n if (key === 'promise') {\n this.trackProp('data')\n if (\n !this.options.experimental_prefetchInRender &&\n this.#currentThenable.status === 'pending'\n ) {\n this.#currentThenable.reject(\n new Error(\n 'experimental_prefetchInRender feature flag is not enabled',\n ),\n )\n }\n }\n return Reflect.get(target, key)\n },\n })\n }\n\n trackProp(key: keyof QueryObserverResult) {\n this.#trackedProps.add(key)\n }\n\n getCurrentQuery(): Query<TQueryFnData, TError, TQueryData, TQueryKey> {\n return this.#currentQuery\n }\n\n refetch({ ...options }: RefetchOptions = {}): Promise<\n QueryObserverResult<TData, TError>\n > {\n return this.fetch({\n ...options,\n })\n }\n\n fetchOptimistic(\n options: QueryObserverOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey\n >,\n ): Promise<QueryObserverResult<TData, TError>> {\n const defaultedOptions = this.#client.defaultQueryOptions(options)\n\n const query = this.#client\n .getQueryCache()\n .build(this.#client, defaultedOptions)\n\n return query.fetch().then(() => this.createResult(query, defaultedOptions))\n }\n\n protected fetch(\n fetchOptions: ObserverFetchOptions,\n ): Promise<QueryObserverResult<TData, TError>> {\n return this.#executeFetch({\n ...fetchOptions,\n cancelRefetch: fetchOptions.cancelRefetch ?? true,\n }).then(() => {\n this.updateResult()\n return this.#currentResult\n })\n }\n\n #executeFetch(\n fetchOptions?: Omit<ObserverFetchOptions, 'initialPromise'>,\n ): Promise<TQueryData | undefined> {\n // Make sure we reference the latest query as the current one might have been removed\n this.#updateQuery()\n\n // Fetch\n let promise: Promise<TQueryData | undefined> = this.#currentQuery.fetch(\n this.options,\n fetchOptions,\n )\n\n if (!fetchOptions?.throwOnError) {\n promise = promise.catch(noop)\n }\n\n return promise\n }\n\n #updateStaleTimeout(): void {\n this.#clearStaleTimeout()\n const staleTime = resolveStaleTime(\n this.options.staleTime,\n this.#currentQuery,\n )\n\n if (isServer || this.#currentResult.isStale || !isValidTimeout(staleTime)) {\n return\n }\n\n const time = timeUntilStale(this.#currentResult.dataUpdatedAt, staleTime)\n\n // The timeout is sometimes triggered 1 ms before the stale time expiration.\n // To mitigate this issue we always add 1 ms to the timeout.\n const timeout = time + 1\n\n this.#staleTimeoutId = timeoutManager.setTimeout(() => {\n if (!this.#currentResult.isStale) {\n this.updateResult()\n }\n }, timeout)\n }\n\n #computeRefetchInterval() {\n return (\n (typeof this.options.refetchInterval === 'function'\n ? this.options.refetchInterval(this.#currentQuery)\n : this.options.refetchInterval) ?? false\n )\n }\n\n #updateRefetchInterval(nextInterval: number | false): void {\n this.#clearRefetchInterval()\n\n this.#currentRefetchInterval = nextInterval\n\n if (\n isServer ||\n resolveEnabled(this.options.enabled, this.#currentQuery) === false ||\n !isValidTimeout(this.#currentRefetchInterval) ||\n this.#currentRefetchInterval === 0\n ) {\n return\n }\n\n this.#refetchIntervalId = timeoutManager.setInterval(() => {\n if (\n this.options.refetchIntervalInBackground ||\n focusManager.isFocused()\n ) {\n this.#executeFetch()\n }\n }, this.#currentRefetchInterval)\n }\n\n #updateTimers(): void {\n this.#updateStaleTimeout()\n this.#updateRefetchInterval(this.#computeRefetchInterval())\n }\n\n #clearStaleTimeout(): void {\n if (this.#staleTimeoutId) {\n timeoutManager.clearTimeout(this.#staleTimeoutId)\n this.#staleTimeoutId = undefined\n }\n }\n\n #clearRefetchInterval(): void {\n if (this.#refetchIntervalId) {\n timeoutManager.clearInterval(this.#refetchIntervalId)\n this.#refetchIntervalId = undefined\n }\n }\n\n protected createResult(\n query: Query<TQueryFnData, TError, TQueryData, TQueryKey>,\n options: QueryObserverOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey\n >,\n ): QueryObserverResult<TData, TError> {\n const prevQuery = this.#currentQuery\n const prevOptions = this.options\n const prevResult = this.#currentResult as\n | QueryObserverResult<TData, TError>\n | undefined\n const prevResultState = this.#currentResultState\n const prevResultOptions = this.#currentResultOptions\n const queryChange = query !== prevQuery\n const queryInitialState = queryChange\n ? query.state\n : this.#currentQueryInitialState\n\n const { state } = query\n let newState = { ...state }\n let isPlaceholderData = false\n let data: TData | undefined\n\n // Optimistically set result in fetching state if needed\n if (options._optimisticResults) {\n const mounted = this.hasListeners()\n\n const fetchOnMount = !mounted && shouldFetchOnMount(query, options)\n\n const fetchOptionally =\n mounted && shouldFetchOptionally(query, prevQuery, options, prevOptions)\n\n if (fetchOnMount || fetchOptionally) {\n newState = {\n ...newState,\n ...fetchState(state.data, query.options),\n }\n }\n if (options._optimisticResults === 'isRestoring') {\n newState.fetchStatus = 'idle'\n }\n }\n\n let { error, errorUpdatedAt, status } = newState\n\n // Per default, use query data\n data = newState.data as unknown as TData\n let skipSelect = false\n\n // use placeholderData if needed\n if (\n options.placeholderData !== undefined &&\n data === undefined &&\n status === 'pending'\n ) {\n let placeholderData\n\n // Memoize placeholder data\n if (\n prevResult?.isPlaceholderData &&\n options.placeholderData === prevResultOptions?.placeholderData\n ) {\n placeholderData = prevResult.data\n // we have to skip select when reading this memoization\n // because prevResult.data is already \"selected\"\n skipSelect = true\n } else {\n // compute placeholderData\n placeholderData =\n typeof options.placeholderData === 'function'\n ? (\n options.placeholderData as unknown as PlaceholderDataFunction<TQueryData>\n )(\n this.#lastQueryWithDefinedData?.state.data,\n this.#lastQueryWithDefinedData as any,\n )\n : options.placeholderData\n }\n\n if (placeholderData !== undefined) {\n status = 'success'\n data = replaceData(\n prevResult?.data,\n placeholderData as unknown,\n options,\n ) as TData\n isPlaceholderData = true\n }\n }\n\n // Select data if needed\n // this also runs placeholderData through the select function\n if (options.select && data !== undefined && !skipSelect) {\n // Memoize select result\n if (\n prevResult &&\n data === prevResultState?.data &&\n options.select === this.#selectFn\n ) {\n data = this.#selectResult\n } else {\n try {\n this.#selectFn = options.select\n data = options.select(data as any)\n data = replaceData(prevResult?.data, data, options)\n this.#selectResult = data\n this.#selectError = null\n } catch (selectError) {\n this.#selectError = selectError as TError\n }\n }\n }\n\n if (this.#selectError) {\n error = this.#selectError\n data = this.#selectResult\n errorUpdatedAt = Date.now()\n status = 'error'\n }\n\n const isFetching = newState.fetchStatus === 'fetching'\n const isPending = status === 'pending'\n const isError = status === 'error'\n\n const isLoading = isPending && isFetching\n const hasData = data !== undefined\n\n const result: QueryObserverBaseResult<TData, TError> = {\n status,\n fetchStatus: newState.fetchStatus,\n isPending,\n isSuccess: status === 'success',\n isError,\n isInitialLoading: isLoading,\n isLoading,\n data,\n dataUpdatedAt: newState.dataUpdatedAt,\n error,\n errorUpdatedAt,\n failureCount: newState.fetchFailureCount,\n failureReason: newState.fetchFailureReason,\n errorUpdateCount: newState.errorUpdateCount,\n isFetched: newState.dataUpdateCount > 0 || newState.errorUpdateCount > 0,\n isFetchedAfterMount:\n newState.dataUpdateCount > queryInitialState.dataUpdateCount ||\n newState.errorUpdateCount > queryInitialState.errorUpdateCount,\n isFetching,\n isRefetching: isFetching && !isPending,\n isLoadingError: isError && !hasData,\n isPaused: newState.fetchStatus === 'paused',\n isPlaceholderData,\n isRefetchError: isError && hasData,\n isStale: isStale(query, options),\n refetch: this.refetch,\n promise: this.#currentThenable,\n isEnabled: resolveEnabled(options.enabled, query) !== false,\n }\n\n const nextResult = result as QueryObserverResult<TData, TError>\n\n if (this.options.experimental_prefetchInRender) {\n const hasResultData = nextResult.data !== undefined\n const isErrorWithoutData = nextResult.status === 'error' && !hasResultData\n const finalizeThenableIfPossible = (thenable: PendingThenable<TData>) => {\n if (isErrorWithoutData) {\n thenable.reject(nextResult.error)\n } else if (hasResultData) {\n thenable.resolve(nextResult.data as TData)\n }\n }\n\n /**\n * Create a new thenable and result promise when the results have changed\n */\n const recreateThenable = () => {\n const pending =\n (this.#currentThenable =\n nextResult.promise =\n pendingThenable())\n\n finalizeThenableIfPossible(pending)\n }\n\n const prevThenable = this.#currentThenable\n switch (prevThenable.status) {\n case 'pending':\n // Finalize the previous thenable if it was pending\n // and we are still observing the same query\n if (query.queryHash === prevQuery.queryHash) {\n finalizeThenableIfPossible(prevThenable)\n }\n break\n case 'fulfilled':\n if (isErrorWithoutData || nextResult.data !== prevThenable.value) {\n recreateThenable()\n }\n break\n case 'rejected':\n if (!isErrorWithoutData || nextResult.error !== prevThenable.reason) {\n recreateThenable()\n }\n break\n }\n }\n\n return nextResult\n }\n\n updateResult(): void {\n const prevResult = this.#currentResult as\n | QueryObserverResult<TData, TError>\n | undefined\n\n const nextResult = this.createResult(this.#currentQuery, this.options)\n\n this.#currentResultState = this.#currentQuery.state\n this.#currentResultOptions = this.options\n\n if (this.#currentResultState.data !== undefined) {\n this.#lastQueryWithDefinedData = this.#currentQuery\n }\n\n // Only notify and update result if something has changed\n if (shallowEqualObjects(nextResult, prevResult)) {\n return\n }\n\n this.#currentResult = nextResult\n\n const shouldNotifyListeners = (): boolean => {\n if (!prevResult) {\n return true\n }\n\n const { notifyOnChangeProps } = this.options\n const notifyOnChangePropsValue =\n typeof notifyOnChangeProps === 'function'\n ? notifyOnChangeProps()\n : notifyOnChangeProps\n\n if (\n notifyOnChangePropsValue === 'all' ||\n (!notifyOnChangePropsValue && !this.#trackedProps.size)\n ) {\n return true\n }\n\n const includedProps = new Set(\n notifyOnChangePropsValue ?? this.#trackedProps,\n )\n\n if (this.options.throwOnError) {\n includedProps.add('error')\n }\n\n return Object.keys(this.#currentResult).some((key) => {\n const typedKey = key as keyof QueryObserverResult\n const changed = this.#currentResult[typedKey] !== prevResult[typedKey]\n\n return changed && includedProps.has(typedKey)\n })\n }\n\n this.#notify({ listeners: shouldNotifyListeners() })\n }\n\n #updateQuery(): void {\n const query = this.#client.getQueryCache().build(this.#client, this.options)\n\n if (query === this.#currentQuery) {\n return\n }\n\n const prevQuery = this.#currentQuery as\n | Query<TQueryFnData, TError, TQueryData, TQueryKey>\n | undefined\n this.#currentQuery = query\n this.#currentQueryInitialState = query.state\n\n if (this.hasListeners()) {\n prevQuery?.removeObserver(this)\n query.addObserver(this)\n }\n }\n\n onQueryUpdate(): void {\n this.updateResult()\n\n if (this.hasListeners()) {\n this.#updateTimers()\n }\n }\n\n #notify(notifyOptions: { listeners: boolean }): void {\n notifyManager.batch(() => {\n // First, trigger the listeners\n if (notifyOptions.listeners) {\n this.listeners.forEach((listener) => {\n listener(this.#currentResult)\n })\n }\n\n // Then the cache listeners\n this.#client.getQueryCache().notify({\n query: this.#currentQuery,\n type: 'observerResultsUpdated',\n })\n })\n }\n}\n\nfunction shouldLoadOnMount(\n query: Query<any, any, any, any>,\n options: QueryObserverOptions<any, any, any, any>,\n): boolean {\n return (\n resolveEnabled(options.enabled, query) !== false &&\n query.state.data === undefined &&\n !(query.state.status === 'error' && options.retryOnMount === false)\n )\n}\n\nfunction shouldFetchOnMount(\n query: Query<any, any, any, any>,\n options: QueryObserverOptions<any, any, any, any, any>,\n): boolean {\n return (\n shouldLoadOnMount(query, options) ||\n (query.state.data !== undefined &&\n shouldFetchOn(query, options, options.refetchOnMount))\n )\n}\n\nfunction shouldFetchOn(\n query: Query<any, any, any, any>,\n options: QueryObserverOptions<any, any, any, any, any>,\n field: (typeof options)['refetchOnMount'] &\n (typeof options)['refetchOnWindowFocus'] &\n (typeof options)['refetchOnReconnect'],\n) {\n if (\n resolveEnabled(options.enabled, query) !== false &&\n resolveStaleTime(options.staleTime, query) !== 'static'\n ) {\n const value = typeof field === 'function' ? field(query) : field\n\n return value === 'always' || (value !== false && isStale(query, options))\n }\n return false\n}\n\nfunction shouldFetchOptionally(\n query: Query<any, any, any, any>,\n prevQuery: Query<any, any, any, any>,\n options: QueryObserverOptions<any, any, any, any, any>,\n prevOptions: QueryObserverOptions<any, any, any, any, any>,\n): boolean {\n return (\n (query !== prevQuery ||\n resolveEnabled(prevOptions.enabled, query) === false) &&\n (!options.suspense || query.state.status !== 'error') &&\n isStale(query, options)\n )\n}\n\nfunction isStale(\n query: Query<any, any, any, any>,\n options: QueryObserverOptions<any, any, any, any, any>,\n): boolean {\n return (\n resolveEnabled(options.enabled, query) !== false &&\n query.isStaleByTime(resolveStaleTime(options.staleTime, query))\n )\n}\n\n// this function would decide if we will update the observer's 'current'\n// properties after an optimistic reading via getOptimisticResult\nfunction shouldAssignObserverCurrentProperties<\n TQueryFnData = unknown,\n TError = unknown,\n TData = TQueryFnData,\n TQueryData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n>(\n observer: QueryObserver<TQueryFnData, TError, TData, TQueryData, TQueryKey>,\n optimisticResult: QueryObserverResult<TData, TError>,\n) {\n // if the newly created result isn't what the observer is holding as current,\n // then we'll need to update the properties as well\n if (!shallowEqualObjects(observer.getCurrentResult(), optimisticResult)) {\n return true\n }\n\n // basically, just keep previous properties if nothing changed\n return false\n}\n"],"mappings":";AAAA,SAAS,oBAAoB;AAC7B,SAAS,qBAAqB;AAC9B,SAAS,kBAAkB;AAC3B,SAAS,oBAAoB;AAC7B,SAAS,uBAAuB;AAChC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,sBAAsB;AAwBxB,IAAM,gBAAN,cAMG,aAAmD;AAAA,EAyB3D,YACE,QACO,SAOP;AACA,UAAM;AARC;AAUP,SAAK,UAAU;AACf,SAAK,eAAe;AACpB,SAAK,mBAAmB,gBAAgB;AAExC,SAAK,YAAY;AACjB,SAAK,WAAW,OAAO;AAAA,EACzB;AAAA,EA1CA;AAAA,EACA,gBAAoE;AAAA,EACpE,4BAA4D;AAAA,EAC5D,iBAAqD;AAAA,EACrD;AAAA,EACA;AAAA,EAOA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA;AAAA,EAGA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,gBAAgB,oBAAI,IAA+B;AAAA,EAsBzC,cAAoB;AAC5B,SAAK,UAAU,KAAK,QAAQ,KAAK,IAAI;AAAA,EACvC;AAAA,EAEU,cAAoB;AAC5B,QAAI,KAAK,UAAU,SAAS,GAAG;AAC7B,WAAK,cAAc,YAAY,IAAI;AAEnC,UAAI,mBAAmB,KAAK,eAAe,KAAK,OAAO,GAAG;AACxD,aAAK,cAAc;AAAA,MACrB,OAAO;AACL,aAAK,aAAa;AAAA,MACpB;AAEA,WAAK,cAAc;AAAA,IACrB;AAAA,EACF;AAAA,EAEU,gBAAsB;AAC9B,QAAI,CAAC,KAAK,aAAa,GAAG;AACxB,WAAK,QAAQ;AAAA,IACf;AAAA,EACF;AAAA,EAEA,yBAAkC;AAChC,WAAO;AAAA,MACL,KAAK;AAAA,MACL,KAAK;AAAA,MACL,KAAK,QAAQ;AAAA,IACf;AAAA,EAC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,QAAQ,OAAO,OAAO;AAAA,EACzE;AACA,SAAO;AACT;AAEA,SAAS,sBACP,OACA,WACA,SACA,aACS;AACT,UACG,UAAU,aACT,eAAe,YAAY,SAAS,KAAK,MAAM,WAChD,CAAC,QAAQ,YAAY,MAAM,MAAM,WAAW,YAC7C,QAAQ,OAAO,OAAO;AAE1B;AAEA,SAAS,QACP,OACA,SACS;AACT,SACE,eAAe,QAAQ,SAAS,KAAK,MAAM,SAC3C,MAAM,cAAc,iBAAiB,QAAQ,WAAW,KAAK,CAAC;AAElE;AAIA,SAAS,sCAOP,UACA,kBACA;AAGA,MAAI,CAAC,oBAAoB,SAAS,iBAAiB,GAAG,gBAAgB,GAAG;AACvE,WAAO;AAAA,EACT;AAGA,SAAO;AACT;","names":[]}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/removable.ts
|
|
21
|
+
var removable_exports = {};
|
|
22
|
+
__export(removable_exports, {
|
|
23
|
+
Removable: () => Removable
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(removable_exports);
|
|
26
|
+
var import_timeoutManager = require("./timeoutManager.cjs");
|
|
27
|
+
var import_utils = require("./utils.cjs");
|
|
28
|
+
var Removable = class {
|
|
29
|
+
#gcTimeout;
|
|
30
|
+
destroy() {
|
|
31
|
+
this.clearGcTimeout();
|
|
32
|
+
}
|
|
33
|
+
scheduleGc() {
|
|
34
|
+
this.clearGcTimeout();
|
|
35
|
+
if ((0, import_utils.isValidTimeout)(this.gcTime)) {
|
|
36
|
+
this.#gcTimeout = import_timeoutManager.timeoutManager.setTimeout(() => {
|
|
37
|
+
this.optionalRemove();
|
|
38
|
+
}, this.gcTime);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
updateGcTime(newGcTime) {
|
|
42
|
+
this.gcTime = Math.max(
|
|
43
|
+
this.gcTime || 0,
|
|
44
|
+
newGcTime ?? (import_utils.isServer ? Infinity : 5 * 60 * 1e3)
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
clearGcTimeout() {
|
|
48
|
+
if (this.#gcTimeout) {
|
|
49
|
+
import_timeoutManager.timeoutManager.clearTimeout(this.#gcTimeout);
|
|
50
|
+
this.#gcTimeout = void 0;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
55
|
+
0 && (module.exports = {
|
|
56
|
+
Removable
|
|
57
|
+
});
|
|
58
|
+
//# sourceMappingURL=removable.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/removable.ts"],"sourcesContent":["import { timeoutManager } from './timeoutManager'\nimport { isServer, isValidTimeout } from './utils'\nimport type { ManagedTimerId } from './timeoutManager'\n\nexport abstract class Removable {\n gcTime!: number\n #gcTimeout?: ManagedTimerId\n\n destroy(): void {\n this.clearGcTimeout()\n }\n\n protected scheduleGc(): void {\n this.clearGcTimeout()\n\n if (isValidTimeout(this.gcTime)) {\n this.#gcTimeout = timeoutManager.setTimeout(() => {\n this.optionalRemove()\n }, this.gcTime)\n }\n }\n\n protected updateGcTime(newGcTime: number | undefined): void {\n // Default to 5 minutes (Infinity for server-side) if no gcTime is set\n this.gcTime = Math.max(\n this.gcTime || 0,\n newGcTime ?? (isServer ? Infinity : 5 * 60 * 1000),\n )\n }\n\n protected clearGcTimeout() {\n if (this.#gcTimeout) {\n timeoutManager.clearTimeout(this.#gcTimeout)\n this.#gcTimeout = undefined\n }\n }\n\n protected abstract optionalRemove(): void\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BAA+B;AAC/B,mBAAyC;AAGlC,IAAe,YAAf,MAAyB;AAAA,EAE9B;AAAA,EAEA,UAAgB;AACd,SAAK,eAAe;AAAA,EACtB;AAAA,EAEU,aAAmB;AAC3B,SAAK,eAAe;AAEpB,YAAI,6BAAe,KAAK,MAAM,GAAG;AAC/B,WAAK,aAAa,qCAAe,WAAW,MAAM;AAChD,aAAK,eAAe;AAAA,MACtB,GAAG,KAAK,MAAM;AAAA,IAChB;AAAA,EACF;AAAA,EAEU,aAAa,WAAqC;AAE1D,SAAK,SAAS,KAAK;AAAA,MACjB,KAAK,UAAU;AAAA,MACf,cAAc,wBAAW,WAAW,IAAI,KAAK;AAAA,IAC/C;AAAA,EACF;AAAA,EAEU,iBAAiB;AACzB,QAAI,KAAK,YAAY;AACnB,2CAAe,aAAa,KAAK,UAAU;AAC3C,WAAK,aAAa;AAAA,IACpB;AAAA,EACF;AAGF;","names":[]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare abstract class Removable {
|
|
2
|
+
#private;
|
|
3
|
+
gcTime: number;
|
|
4
|
+
destroy(): void;
|
|
5
|
+
protected scheduleGc(): void;
|
|
6
|
+
protected updateGcTime(newGcTime: number | undefined): void;
|
|
7
|
+
protected clearGcTimeout(): void;
|
|
8
|
+
protected abstract optionalRemove(): void;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export { Removable };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare abstract class Removable {
|
|
2
|
+
#private;
|
|
3
|
+
gcTime: number;
|
|
4
|
+
destroy(): void;
|
|
5
|
+
protected scheduleGc(): void;
|
|
6
|
+
protected updateGcTime(newGcTime: number | undefined): void;
|
|
7
|
+
protected clearGcTimeout(): void;
|
|
8
|
+
protected abstract optionalRemove(): void;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export { Removable };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// src/removable.ts
|
|
2
|
+
import { timeoutManager } from "./timeoutManager.js";
|
|
3
|
+
import { isServer, isValidTimeout } from "./utils.js";
|
|
4
|
+
var Removable = class {
|
|
5
|
+
#gcTimeout;
|
|
6
|
+
destroy() {
|
|
7
|
+
this.clearGcTimeout();
|
|
8
|
+
}
|
|
9
|
+
scheduleGc() {
|
|
10
|
+
this.clearGcTimeout();
|
|
11
|
+
if (isValidTimeout(this.gcTime)) {
|
|
12
|
+
this.#gcTimeout = timeoutManager.setTimeout(() => {
|
|
13
|
+
this.optionalRemove();
|
|
14
|
+
}, this.gcTime);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
updateGcTime(newGcTime) {
|
|
18
|
+
this.gcTime = Math.max(
|
|
19
|
+
this.gcTime || 0,
|
|
20
|
+
newGcTime ?? (isServer ? Infinity : 5 * 60 * 1e3)
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
clearGcTimeout() {
|
|
24
|
+
if (this.#gcTimeout) {
|
|
25
|
+
timeoutManager.clearTimeout(this.#gcTimeout);
|
|
26
|
+
this.#gcTimeout = void 0;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
export {
|
|
31
|
+
Removable
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=removable.js.map
|