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 @@
|
|
|
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,SAAS,sBAAsB;AAC/B,SAAS,UAAU,sBAAsB;AAGlC,IAAe,YAAf,MAAyB;AAAA,EAE9B;AAAA,EAEA,UAAgB;AACd,SAAK,eAAe;AAAA,EACtB;AAAA,EAEU,aAAmB;AAC3B,SAAK,eAAe;AAEpB,QAAI,eAAe,KAAK,MAAM,GAAG;AAC/B,WAAK,aAAa,eAAe,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,WAAW,WAAW,IAAI,KAAK;AAAA,IAC/C;AAAA,EACF;AAAA,EAEU,iBAAiB;AACzB,QAAI,KAAK,YAAY;AACnB,qBAAe,aAAa,KAAK,UAAU;AAC3C,WAAK,aAAa;AAAA,IACpB;AAAA,EACF;AAGF;","names":[]}
|
|
@@ -0,0 +1,161 @@
|
|
|
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/retryer.ts
|
|
21
|
+
var retryer_exports = {};
|
|
22
|
+
__export(retryer_exports, {
|
|
23
|
+
CancelledError: () => CancelledError,
|
|
24
|
+
canFetch: () => canFetch,
|
|
25
|
+
createRetryer: () => createRetryer,
|
|
26
|
+
isCancelledError: () => isCancelledError
|
|
27
|
+
});
|
|
28
|
+
module.exports = __toCommonJS(retryer_exports);
|
|
29
|
+
var import_focusManager = require("./focusManager.cjs");
|
|
30
|
+
var import_onlineManager = require("./onlineManager.cjs");
|
|
31
|
+
var import_thenable = require("./thenable.cjs");
|
|
32
|
+
var import_utils = require("./utils.cjs");
|
|
33
|
+
function defaultRetryDelay(failureCount) {
|
|
34
|
+
return Math.min(1e3 * 2 ** failureCount, 3e4);
|
|
35
|
+
}
|
|
36
|
+
function canFetch(networkMode) {
|
|
37
|
+
return (networkMode ?? "online") === "online" ? import_onlineManager.onlineManager.isOnline() : true;
|
|
38
|
+
}
|
|
39
|
+
var CancelledError = class extends Error {
|
|
40
|
+
constructor(options) {
|
|
41
|
+
super("CancelledError");
|
|
42
|
+
this.revert = options?.revert;
|
|
43
|
+
this.silent = options?.silent;
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
function isCancelledError(value) {
|
|
47
|
+
return value instanceof CancelledError;
|
|
48
|
+
}
|
|
49
|
+
function createRetryer(config) {
|
|
50
|
+
let isRetryCancelled = false;
|
|
51
|
+
let failureCount = 0;
|
|
52
|
+
let continueFn;
|
|
53
|
+
const thenable = (0, import_thenable.pendingThenable)();
|
|
54
|
+
const isResolved = () => thenable.status !== "pending";
|
|
55
|
+
const cancel = (cancelOptions) => {
|
|
56
|
+
if (!isResolved()) {
|
|
57
|
+
const error = new CancelledError(cancelOptions);
|
|
58
|
+
reject(error);
|
|
59
|
+
config.onCancel?.(error);
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
const cancelRetry = () => {
|
|
63
|
+
isRetryCancelled = true;
|
|
64
|
+
};
|
|
65
|
+
const continueRetry = () => {
|
|
66
|
+
isRetryCancelled = false;
|
|
67
|
+
};
|
|
68
|
+
const canContinue = () => import_focusManager.focusManager.isFocused() && (config.networkMode === "always" || import_onlineManager.onlineManager.isOnline()) && config.canRun();
|
|
69
|
+
const canStart = () => canFetch(config.networkMode) && config.canRun();
|
|
70
|
+
const resolve = (value) => {
|
|
71
|
+
if (!isResolved()) {
|
|
72
|
+
continueFn?.();
|
|
73
|
+
thenable.resolve(value);
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
const reject = (value) => {
|
|
77
|
+
if (!isResolved()) {
|
|
78
|
+
continueFn?.();
|
|
79
|
+
thenable.reject(value);
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
const pause = () => {
|
|
83
|
+
return new Promise((continueResolve) => {
|
|
84
|
+
continueFn = (value) => {
|
|
85
|
+
if (isResolved() || canContinue()) {
|
|
86
|
+
continueResolve(value);
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
config.onPause?.();
|
|
90
|
+
}).then(() => {
|
|
91
|
+
continueFn = void 0;
|
|
92
|
+
if (!isResolved()) {
|
|
93
|
+
config.onContinue?.();
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
};
|
|
97
|
+
const run = () => {
|
|
98
|
+
if (isResolved()) {
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
let promiseOrValue;
|
|
102
|
+
const initialPromise = failureCount === 0 ? config.initialPromise : void 0;
|
|
103
|
+
try {
|
|
104
|
+
promiseOrValue = initialPromise ?? config.fn();
|
|
105
|
+
} catch (error) {
|
|
106
|
+
promiseOrValue = Promise.reject(error);
|
|
107
|
+
}
|
|
108
|
+
Promise.resolve(promiseOrValue).then(resolve).catch((error) => {
|
|
109
|
+
if (isResolved()) {
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
const retry = config.retry ?? (import_utils.isServer ? 0 : 3);
|
|
113
|
+
const retryDelay = config.retryDelay ?? defaultRetryDelay;
|
|
114
|
+
const delay = typeof retryDelay === "function" ? retryDelay(failureCount, error) : retryDelay;
|
|
115
|
+
const shouldRetry = retry === true || typeof retry === "number" && failureCount < retry || typeof retry === "function" && retry(failureCount, error);
|
|
116
|
+
if (isRetryCancelled || !shouldRetry) {
|
|
117
|
+
reject(error);
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
failureCount++;
|
|
121
|
+
config.onFail?.(failureCount, error);
|
|
122
|
+
(0, import_utils.sleep)(delay).then(() => {
|
|
123
|
+
return canContinue() ? void 0 : pause();
|
|
124
|
+
}).then(() => {
|
|
125
|
+
if (isRetryCancelled) {
|
|
126
|
+
reject(error);
|
|
127
|
+
} else {
|
|
128
|
+
run();
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
});
|
|
132
|
+
};
|
|
133
|
+
return {
|
|
134
|
+
promise: thenable,
|
|
135
|
+
status: () => thenable.status,
|
|
136
|
+
cancel,
|
|
137
|
+
continue: () => {
|
|
138
|
+
continueFn?.();
|
|
139
|
+
return thenable;
|
|
140
|
+
},
|
|
141
|
+
cancelRetry,
|
|
142
|
+
continueRetry,
|
|
143
|
+
canStart,
|
|
144
|
+
start: () => {
|
|
145
|
+
if (canStart()) {
|
|
146
|
+
run();
|
|
147
|
+
} else {
|
|
148
|
+
pause().then(run);
|
|
149
|
+
}
|
|
150
|
+
return thenable;
|
|
151
|
+
}
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
155
|
+
0 && (module.exports = {
|
|
156
|
+
CancelledError,
|
|
157
|
+
canFetch,
|
|
158
|
+
createRetryer,
|
|
159
|
+
isCancelledError
|
|
160
|
+
});
|
|
161
|
+
//# sourceMappingURL=retryer.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/retryer.ts"],"sourcesContent":["import { focusManager } from './focusManager'\nimport { onlineManager } from './onlineManager'\nimport { pendingThenable } from './thenable'\nimport { isServer, sleep } from './utils'\nimport type { Thenable } from './thenable'\nimport type { CancelOptions, DefaultError, NetworkMode } from './types'\n\n// TYPES\n\ninterface RetryerConfig<TData = unknown, TError = DefaultError> {\n fn: () => TData | Promise<TData>\n initialPromise?: Promise<TData>\n onCancel?: (error: TError) => void\n onFail?: (failureCount: number, error: TError) => void\n onPause?: () => void\n onContinue?: () => void\n retry?: RetryValue<TError>\n retryDelay?: RetryDelayValue<TError>\n networkMode: NetworkMode | undefined\n canRun: () => boolean\n}\n\nexport interface Retryer<TData = unknown> {\n promise: Promise<TData>\n cancel: (cancelOptions?: CancelOptions) => void\n continue: () => Promise<unknown>\n cancelRetry: () => void\n continueRetry: () => void\n canStart: () => boolean\n start: () => Promise<TData>\n status: () => 'pending' | 'resolved' | 'rejected'\n}\n\nexport type RetryValue<TError> = boolean | number | ShouldRetryFunction<TError>\n\ntype ShouldRetryFunction<TError = DefaultError> = (\n failureCount: number,\n error: TError,\n) => boolean\n\nexport type RetryDelayValue<TError> = number | RetryDelayFunction<TError>\n\ntype RetryDelayFunction<TError = DefaultError> = (\n failureCount: number,\n error: TError,\n) => number\n\nfunction defaultRetryDelay(failureCount: number) {\n return Math.min(1000 * 2 ** failureCount, 30000)\n}\n\nexport function canFetch(networkMode: NetworkMode | undefined): boolean {\n return (networkMode ?? 'online') === 'online'\n ? onlineManager.isOnline()\n : true\n}\n\nexport class CancelledError extends Error {\n revert?: boolean\n silent?: boolean\n constructor(options?: CancelOptions) {\n super('CancelledError')\n this.revert = options?.revert\n this.silent = options?.silent\n }\n}\n\n/**\n * @deprecated Use instanceof `CancelledError` instead.\n */\nexport function isCancelledError(value: any): value is CancelledError {\n return value instanceof CancelledError\n}\n\nexport function createRetryer<TData = unknown, TError = DefaultError>(\n config: RetryerConfig<TData, TError>,\n): Retryer<TData> {\n let isRetryCancelled = false\n let failureCount = 0\n let continueFn: ((value?: unknown) => void) | undefined\n\n const thenable = pendingThenable<TData>()\n\n const isResolved = () =>\n (thenable.status as Thenable<TData>['status']) !== 'pending'\n\n const cancel = (cancelOptions?: CancelOptions): void => {\n if (!isResolved()) {\n const error = new CancelledError(cancelOptions) as TError\n reject(error)\n\n config.onCancel?.(error)\n }\n }\n const cancelRetry = () => {\n isRetryCancelled = true\n }\n\n const continueRetry = () => {\n isRetryCancelled = false\n }\n\n const canContinue = () =>\n focusManager.isFocused() &&\n (config.networkMode === 'always' || onlineManager.isOnline()) &&\n config.canRun()\n\n const canStart = () => canFetch(config.networkMode) && config.canRun()\n\n const resolve = (value: any) => {\n if (!isResolved()) {\n continueFn?.()\n thenable.resolve(value)\n }\n }\n\n const reject = (value: any) => {\n if (!isResolved()) {\n continueFn?.()\n thenable.reject(value)\n }\n }\n\n const pause = () => {\n return new Promise((continueResolve) => {\n continueFn = (value) => {\n if (isResolved() || canContinue()) {\n continueResolve(value)\n }\n }\n config.onPause?.()\n }).then(() => {\n continueFn = undefined\n if (!isResolved()) {\n config.onContinue?.()\n }\n })\n }\n\n // Create loop function\n const run = () => {\n // Do nothing if already resolved\n if (isResolved()) {\n return\n }\n\n let promiseOrValue: any\n\n // we can re-use config.initialPromise on the first call of run()\n const initialPromise =\n failureCount === 0 ? config.initialPromise : undefined\n\n // Execute query\n try {\n promiseOrValue = initialPromise ?? config.fn()\n } catch (error) {\n promiseOrValue = Promise.reject(error)\n }\n\n Promise.resolve(promiseOrValue)\n .then(resolve)\n .catch((error) => {\n // Stop if the fetch is already resolved\n if (isResolved()) {\n return\n }\n\n // Do we need to retry the request?\n const retry = config.retry ?? (isServer ? 0 : 3)\n const retryDelay = config.retryDelay ?? defaultRetryDelay\n const delay =\n typeof retryDelay === 'function'\n ? retryDelay(failureCount, error)\n : retryDelay\n const shouldRetry =\n retry === true ||\n (typeof retry === 'number' && failureCount < retry) ||\n (typeof retry === 'function' && retry(failureCount, error))\n\n if (isRetryCancelled || !shouldRetry) {\n // We are done if the query does not need to be retried\n reject(error)\n return\n }\n\n failureCount++\n\n // Notify on fail\n config.onFail?.(failureCount, error)\n\n // Delay\n sleep(delay)\n // Pause if the document is not visible or when the device is offline\n .then(() => {\n return canContinue() ? undefined : pause()\n })\n .then(() => {\n if (isRetryCancelled) {\n reject(error)\n } else {\n run()\n }\n })\n })\n }\n\n return {\n promise: thenable,\n status: () => thenable.status,\n cancel,\n continue: () => {\n continueFn?.()\n return thenable\n },\n cancelRetry,\n continueRetry,\n canStart,\n start: () => {\n // Start loop\n if (canStart()) {\n run()\n } else {\n pause().then(run)\n }\n return thenable\n },\n }\n}\n"],"mappings":"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","names":[]}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
// src/retryer.ts
|
|
2
|
+
import { focusManager } from "./focusManager.js";
|
|
3
|
+
import { onlineManager } from "./onlineManager.js";
|
|
4
|
+
import { pendingThenable } from "./thenable.js";
|
|
5
|
+
import { isServer, sleep } from "./utils.js";
|
|
6
|
+
function defaultRetryDelay(failureCount) {
|
|
7
|
+
return Math.min(1e3 * 2 ** failureCount, 3e4);
|
|
8
|
+
}
|
|
9
|
+
function canFetch(networkMode) {
|
|
10
|
+
return (networkMode ?? "online") === "online" ? onlineManager.isOnline() : true;
|
|
11
|
+
}
|
|
12
|
+
var CancelledError = class extends Error {
|
|
13
|
+
constructor(options) {
|
|
14
|
+
super("CancelledError");
|
|
15
|
+
this.revert = options?.revert;
|
|
16
|
+
this.silent = options?.silent;
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
function isCancelledError(value) {
|
|
20
|
+
return value instanceof CancelledError;
|
|
21
|
+
}
|
|
22
|
+
function createRetryer(config) {
|
|
23
|
+
let isRetryCancelled = false;
|
|
24
|
+
let failureCount = 0;
|
|
25
|
+
let continueFn;
|
|
26
|
+
const thenable = pendingThenable();
|
|
27
|
+
const isResolved = () => thenable.status !== "pending";
|
|
28
|
+
const cancel = (cancelOptions) => {
|
|
29
|
+
if (!isResolved()) {
|
|
30
|
+
const error = new CancelledError(cancelOptions);
|
|
31
|
+
reject(error);
|
|
32
|
+
config.onCancel?.(error);
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
const cancelRetry = () => {
|
|
36
|
+
isRetryCancelled = true;
|
|
37
|
+
};
|
|
38
|
+
const continueRetry = () => {
|
|
39
|
+
isRetryCancelled = false;
|
|
40
|
+
};
|
|
41
|
+
const canContinue = () => focusManager.isFocused() && (config.networkMode === "always" || onlineManager.isOnline()) && config.canRun();
|
|
42
|
+
const canStart = () => canFetch(config.networkMode) && config.canRun();
|
|
43
|
+
const resolve = (value) => {
|
|
44
|
+
if (!isResolved()) {
|
|
45
|
+
continueFn?.();
|
|
46
|
+
thenable.resolve(value);
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
const reject = (value) => {
|
|
50
|
+
if (!isResolved()) {
|
|
51
|
+
continueFn?.();
|
|
52
|
+
thenable.reject(value);
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
const pause = () => {
|
|
56
|
+
return new Promise((continueResolve) => {
|
|
57
|
+
continueFn = (value) => {
|
|
58
|
+
if (isResolved() || canContinue()) {
|
|
59
|
+
continueResolve(value);
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
config.onPause?.();
|
|
63
|
+
}).then(() => {
|
|
64
|
+
continueFn = void 0;
|
|
65
|
+
if (!isResolved()) {
|
|
66
|
+
config.onContinue?.();
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
};
|
|
70
|
+
const run = () => {
|
|
71
|
+
if (isResolved()) {
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
let promiseOrValue;
|
|
75
|
+
const initialPromise = failureCount === 0 ? config.initialPromise : void 0;
|
|
76
|
+
try {
|
|
77
|
+
promiseOrValue = initialPromise ?? config.fn();
|
|
78
|
+
} catch (error) {
|
|
79
|
+
promiseOrValue = Promise.reject(error);
|
|
80
|
+
}
|
|
81
|
+
Promise.resolve(promiseOrValue).then(resolve).catch((error) => {
|
|
82
|
+
if (isResolved()) {
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
const retry = config.retry ?? (isServer ? 0 : 3);
|
|
86
|
+
const retryDelay = config.retryDelay ?? defaultRetryDelay;
|
|
87
|
+
const delay = typeof retryDelay === "function" ? retryDelay(failureCount, error) : retryDelay;
|
|
88
|
+
const shouldRetry = retry === true || typeof retry === "number" && failureCount < retry || typeof retry === "function" && retry(failureCount, error);
|
|
89
|
+
if (isRetryCancelled || !shouldRetry) {
|
|
90
|
+
reject(error);
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
failureCount++;
|
|
94
|
+
config.onFail?.(failureCount, error);
|
|
95
|
+
sleep(delay).then(() => {
|
|
96
|
+
return canContinue() ? void 0 : pause();
|
|
97
|
+
}).then(() => {
|
|
98
|
+
if (isRetryCancelled) {
|
|
99
|
+
reject(error);
|
|
100
|
+
} else {
|
|
101
|
+
run();
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
});
|
|
105
|
+
};
|
|
106
|
+
return {
|
|
107
|
+
promise: thenable,
|
|
108
|
+
status: () => thenable.status,
|
|
109
|
+
cancel,
|
|
110
|
+
continue: () => {
|
|
111
|
+
continueFn?.();
|
|
112
|
+
return thenable;
|
|
113
|
+
},
|
|
114
|
+
cancelRetry,
|
|
115
|
+
continueRetry,
|
|
116
|
+
canStart,
|
|
117
|
+
start: () => {
|
|
118
|
+
if (canStart()) {
|
|
119
|
+
run();
|
|
120
|
+
} else {
|
|
121
|
+
pause().then(run);
|
|
122
|
+
}
|
|
123
|
+
return thenable;
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
export {
|
|
128
|
+
CancelledError,
|
|
129
|
+
canFetch,
|
|
130
|
+
createRetryer,
|
|
131
|
+
isCancelledError
|
|
132
|
+
};
|
|
133
|
+
//# sourceMappingURL=retryer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/retryer.ts"],"sourcesContent":["import { focusManager } from './focusManager'\nimport { onlineManager } from './onlineManager'\nimport { pendingThenable } from './thenable'\nimport { isServer, sleep } from './utils'\nimport type { Thenable } from './thenable'\nimport type { CancelOptions, DefaultError, NetworkMode } from './types'\n\n// TYPES\n\ninterface RetryerConfig<TData = unknown, TError = DefaultError> {\n fn: () => TData | Promise<TData>\n initialPromise?: Promise<TData>\n onCancel?: (error: TError) => void\n onFail?: (failureCount: number, error: TError) => void\n onPause?: () => void\n onContinue?: () => void\n retry?: RetryValue<TError>\n retryDelay?: RetryDelayValue<TError>\n networkMode: NetworkMode | undefined\n canRun: () => boolean\n}\n\nexport interface Retryer<TData = unknown> {\n promise: Promise<TData>\n cancel: (cancelOptions?: CancelOptions) => void\n continue: () => Promise<unknown>\n cancelRetry: () => void\n continueRetry: () => void\n canStart: () => boolean\n start: () => Promise<TData>\n status: () => 'pending' | 'resolved' | 'rejected'\n}\n\nexport type RetryValue<TError> = boolean | number | ShouldRetryFunction<TError>\n\ntype ShouldRetryFunction<TError = DefaultError> = (\n failureCount: number,\n error: TError,\n) => boolean\n\nexport type RetryDelayValue<TError> = number | RetryDelayFunction<TError>\n\ntype RetryDelayFunction<TError = DefaultError> = (\n failureCount: number,\n error: TError,\n) => number\n\nfunction defaultRetryDelay(failureCount: number) {\n return Math.min(1000 * 2 ** failureCount, 30000)\n}\n\nexport function canFetch(networkMode: NetworkMode | undefined): boolean {\n return (networkMode ?? 'online') === 'online'\n ? onlineManager.isOnline()\n : true\n}\n\nexport class CancelledError extends Error {\n revert?: boolean\n silent?: boolean\n constructor(options?: CancelOptions) {\n super('CancelledError')\n this.revert = options?.revert\n this.silent = options?.silent\n }\n}\n\n/**\n * @deprecated Use instanceof `CancelledError` instead.\n */\nexport function isCancelledError(value: any): value is CancelledError {\n return value instanceof CancelledError\n}\n\nexport function createRetryer<TData = unknown, TError = DefaultError>(\n config: RetryerConfig<TData, TError>,\n): Retryer<TData> {\n let isRetryCancelled = false\n let failureCount = 0\n let continueFn: ((value?: unknown) => void) | undefined\n\n const thenable = pendingThenable<TData>()\n\n const isResolved = () =>\n (thenable.status as Thenable<TData>['status']) !== 'pending'\n\n const cancel = (cancelOptions?: CancelOptions): void => {\n if (!isResolved()) {\n const error = new CancelledError(cancelOptions) as TError\n reject(error)\n\n config.onCancel?.(error)\n }\n }\n const cancelRetry = () => {\n isRetryCancelled = true\n }\n\n const continueRetry = () => {\n isRetryCancelled = false\n }\n\n const canContinue = () =>\n focusManager.isFocused() &&\n (config.networkMode === 'always' || onlineManager.isOnline()) &&\n config.canRun()\n\n const canStart = () => canFetch(config.networkMode) && config.canRun()\n\n const resolve = (value: any) => {\n if (!isResolved()) {\n continueFn?.()\n thenable.resolve(value)\n }\n }\n\n const reject = (value: any) => {\n if (!isResolved()) {\n continueFn?.()\n thenable.reject(value)\n }\n }\n\n const pause = () => {\n return new Promise((continueResolve) => {\n continueFn = (value) => {\n if (isResolved() || canContinue()) {\n continueResolve(value)\n }\n }\n config.onPause?.()\n }).then(() => {\n continueFn = undefined\n if (!isResolved()) {\n config.onContinue?.()\n }\n })\n }\n\n // Create loop function\n const run = () => {\n // Do nothing if already resolved\n if (isResolved()) {\n return\n }\n\n let promiseOrValue: any\n\n // we can re-use config.initialPromise on the first call of run()\n const initialPromise =\n failureCount === 0 ? config.initialPromise : undefined\n\n // Execute query\n try {\n promiseOrValue = initialPromise ?? config.fn()\n } catch (error) {\n promiseOrValue = Promise.reject(error)\n }\n\n Promise.resolve(promiseOrValue)\n .then(resolve)\n .catch((error) => {\n // Stop if the fetch is already resolved\n if (isResolved()) {\n return\n }\n\n // Do we need to retry the request?\n const retry = config.retry ?? (isServer ? 0 : 3)\n const retryDelay = config.retryDelay ?? defaultRetryDelay\n const delay =\n typeof retryDelay === 'function'\n ? retryDelay(failureCount, error)\n : retryDelay\n const shouldRetry =\n retry === true ||\n (typeof retry === 'number' && failureCount < retry) ||\n (typeof retry === 'function' && retry(failureCount, error))\n\n if (isRetryCancelled || !shouldRetry) {\n // We are done if the query does not need to be retried\n reject(error)\n return\n }\n\n failureCount++\n\n // Notify on fail\n config.onFail?.(failureCount, error)\n\n // Delay\n sleep(delay)\n // Pause if the document is not visible or when the device is offline\n .then(() => {\n return canContinue() ? undefined : pause()\n })\n .then(() => {\n if (isRetryCancelled) {\n reject(error)\n } else {\n run()\n }\n })\n })\n }\n\n return {\n promise: thenable,\n status: () => thenable.status,\n cancel,\n continue: () => {\n continueFn?.()\n return thenable\n },\n cancelRetry,\n continueRetry,\n canStart,\n start: () => {\n // Start loop\n if (canStart()) {\n run()\n } else {\n pause().then(run)\n }\n return thenable\n },\n }\n}\n"],"mappings":"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","names":[]}
|
|
@@ -0,0 +1,82 @@
|
|
|
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/streamedQuery.ts
|
|
21
|
+
var streamedQuery_exports = {};
|
|
22
|
+
__export(streamedQuery_exports, {
|
|
23
|
+
streamedQuery: () => streamedQuery
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(streamedQuery_exports);
|
|
26
|
+
var import_utils = require("./utils.cjs");
|
|
27
|
+
function streamedQuery({
|
|
28
|
+
streamFn,
|
|
29
|
+
refetchMode = "reset",
|
|
30
|
+
reducer = (items, chunk) => (0, import_utils.addToEnd)(items, chunk),
|
|
31
|
+
initialValue = []
|
|
32
|
+
}) {
|
|
33
|
+
return async (context) => {
|
|
34
|
+
const query = context.client.getQueryCache().find({ queryKey: context.queryKey, exact: true });
|
|
35
|
+
const isRefetch = !!query && query.state.data !== void 0;
|
|
36
|
+
if (isRefetch && refetchMode === "reset") {
|
|
37
|
+
query.setState({
|
|
38
|
+
status: "pending",
|
|
39
|
+
data: void 0,
|
|
40
|
+
error: null,
|
|
41
|
+
fetchStatus: "fetching"
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
let result = initialValue;
|
|
45
|
+
let cancelled = false;
|
|
46
|
+
const streamFnContext = (0, import_utils.addConsumeAwareSignal)(
|
|
47
|
+
{
|
|
48
|
+
client: context.client,
|
|
49
|
+
meta: context.meta,
|
|
50
|
+
queryKey: context.queryKey,
|
|
51
|
+
pageParam: context.pageParam,
|
|
52
|
+
direction: context.direction
|
|
53
|
+
},
|
|
54
|
+
() => context.signal,
|
|
55
|
+
() => cancelled = true
|
|
56
|
+
);
|
|
57
|
+
const stream = await streamFn(streamFnContext);
|
|
58
|
+
const isReplaceRefetch = isRefetch && refetchMode === "replace";
|
|
59
|
+
for await (const chunk of stream) {
|
|
60
|
+
if (cancelled) {
|
|
61
|
+
break;
|
|
62
|
+
}
|
|
63
|
+
if (isReplaceRefetch) {
|
|
64
|
+
result = reducer(result, chunk);
|
|
65
|
+
} else {
|
|
66
|
+
context.client.setQueryData(
|
|
67
|
+
context.queryKey,
|
|
68
|
+
(prev) => reducer(prev === void 0 ? initialValue : prev, chunk)
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
if (isReplaceRefetch && !cancelled) {
|
|
73
|
+
context.client.setQueryData(context.queryKey, result);
|
|
74
|
+
}
|
|
75
|
+
return context.client.getQueryData(context.queryKey) ?? initialValue;
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
79
|
+
0 && (module.exports = {
|
|
80
|
+
streamedQuery
|
|
81
|
+
});
|
|
82
|
+
//# sourceMappingURL=streamedQuery.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/streamedQuery.ts"],"sourcesContent":["import { addConsumeAwareSignal, addToEnd } from './utils'\nimport type {\n OmitKeyof,\n QueryFunction,\n QueryFunctionContext,\n QueryKey,\n} from './types'\n\ntype BaseStreamedQueryParams<TQueryFnData, TQueryKey extends QueryKey> = {\n streamFn: (\n context: QueryFunctionContext<TQueryKey>,\n ) => AsyncIterable<TQueryFnData> | Promise<AsyncIterable<TQueryFnData>>\n refetchMode?: 'append' | 'reset' | 'replace'\n}\n\ntype SimpleStreamedQueryParams<\n TQueryFnData,\n TQueryKey extends QueryKey,\n> = BaseStreamedQueryParams<TQueryFnData, TQueryKey> & {\n reducer?: never\n initialValue?: never\n}\n\ntype ReducibleStreamedQueryParams<\n TQueryFnData,\n TData,\n TQueryKey extends QueryKey,\n> = BaseStreamedQueryParams<TQueryFnData, TQueryKey> & {\n reducer: (acc: TData, chunk: TQueryFnData) => TData\n initialValue: TData\n}\n\ntype StreamedQueryParams<TQueryFnData, TData, TQueryKey extends QueryKey> =\n | SimpleStreamedQueryParams<TQueryFnData, TQueryKey>\n | ReducibleStreamedQueryParams<TQueryFnData, TData, TQueryKey>\n\n/**\n * This is a helper function to create a query function that streams data from an AsyncIterable.\n * Data will be an Array of all the chunks received.\n * The query will be in a 'pending' state until the first chunk of data is received, but will go to 'success' after that.\n * The query will stay in fetchStatus 'fetching' until the stream ends.\n * @param queryFn - The function that returns an AsyncIterable to stream data from.\n * @param refetchMode - Defines how re-fetches are handled.\n * Defaults to `'reset'`, erases all data and puts the query back into `pending` state.\n * Set to `'append'` to append new data to the existing data.\n * Set to `'replace'` to write all data to the cache once the stream ends.\n * @param reducer - A function to reduce the streamed chunks into the final data.\n * Defaults to a function that appends chunks to the end of the array.\n * @param initialValue - Initial value to be used while the first chunk is being fetched, and returned if the stream yields no values.\n */\nexport function streamedQuery<\n TQueryFnData = unknown,\n TData = Array<TQueryFnData>,\n TQueryKey extends QueryKey = QueryKey,\n>({\n streamFn,\n refetchMode = 'reset',\n reducer = (items, chunk) =>\n addToEnd(items as Array<TQueryFnData>, chunk) as TData,\n initialValue = [] as TData,\n}: StreamedQueryParams<TQueryFnData, TData, TQueryKey>): QueryFunction<\n TData,\n TQueryKey\n> {\n return async (context) => {\n const query = context.client\n .getQueryCache()\n .find({ queryKey: context.queryKey, exact: true })\n const isRefetch = !!query && query.state.data !== undefined\n if (isRefetch && refetchMode === 'reset') {\n query.setState({\n status: 'pending',\n data: undefined,\n error: null,\n fetchStatus: 'fetching',\n })\n }\n\n let result = initialValue\n\n let cancelled: boolean = false as boolean\n const streamFnContext = addConsumeAwareSignal<\n OmitKeyof<typeof context, 'signal'>\n >(\n {\n client: context.client,\n meta: context.meta,\n queryKey: context.queryKey,\n pageParam: context.pageParam,\n direction: context.direction,\n },\n () => context.signal,\n () => (cancelled = true),\n )\n\n const stream = await streamFn(streamFnContext)\n\n const isReplaceRefetch = isRefetch && refetchMode === 'replace'\n\n for await (const chunk of stream) {\n if (cancelled) {\n break\n }\n\n if (isReplaceRefetch) {\n // don't append to the cache directly when replace-refetching\n result = reducer(result, chunk)\n } else {\n context.client.setQueryData<TData>(context.queryKey, (prev) =>\n reducer(prev === undefined ? initialValue : prev, chunk),\n )\n }\n }\n\n // finalize result: replace-refetching needs to write to the cache\n if (isReplaceRefetch && !cancelled) {\n context.client.setQueryData<TData>(context.queryKey, result)\n }\n\n return context.client.getQueryData(context.queryKey) ?? initialValue\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAgD;AAkDzC,SAAS,cAId;AAAA,EACA;AAAA,EACA,cAAc;AAAA,EACd,UAAU,CAAC,OAAO,cAChB,uBAAS,OAA8B,KAAK;AAAA,EAC9C,eAAe,CAAC;AAClB,GAGE;AACA,SAAO,OAAO,YAAY;AACxB,UAAM,QAAQ,QAAQ,OACnB,cAAc,EACd,KAAK,EAAE,UAAU,QAAQ,UAAU,OAAO,KAAK,CAAC;AACnD,UAAM,YAAY,CAAC,CAAC,SAAS,MAAM,MAAM,SAAS;AAClD,QAAI,aAAa,gBAAgB,SAAS;AACxC,YAAM,SAAS;AAAA,QACb,QAAQ;AAAA,QACR,MAAM;AAAA,QACN,OAAO;AAAA,QACP,aAAa;AAAA,MACf,CAAC;AAAA,IACH;AAEA,QAAI,SAAS;AAEb,QAAI,YAAqB;AACzB,UAAM,sBAAkB;AAAA,MAGtB;AAAA,QACE,QAAQ,QAAQ;AAAA,QAChB,MAAM,QAAQ;AAAA,QACd,UAAU,QAAQ;AAAA,QAClB,WAAW,QAAQ;AAAA,QACnB,WAAW,QAAQ;AAAA,MACrB;AAAA,MACA,MAAM,QAAQ;AAAA,MACd,MAAO,YAAY;AAAA,IACrB;AAEA,UAAM,SAAS,MAAM,SAAS,eAAe;AAE7C,UAAM,mBAAmB,aAAa,gBAAgB;AAEtD,qBAAiB,SAAS,QAAQ;AAChC,UAAI,WAAW;AACb;AAAA,MACF;AAEA,UAAI,kBAAkB;AAEpB,iBAAS,QAAQ,QAAQ,KAAK;AAAA,MAChC,OAAO;AACL,gBAAQ,OAAO;AAAA,UAAoB,QAAQ;AAAA,UAAU,CAAC,SACpD,QAAQ,SAAS,SAAY,eAAe,MAAM,KAAK;AAAA,QACzD;AAAA,MACF;AAAA,IACF;AAGA,QAAI,oBAAoB,CAAC,WAAW;AAClC,cAAQ,OAAO,aAAoB,QAAQ,UAAU,MAAM;AAAA,IAC7D;AAEA,WAAO,QAAQ,OAAO,aAAa,QAAQ,QAAQ,KAAK;AAAA,EAC1D;AACF;","names":[]}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { I as QueryKey, a1 as QueryFunctionContext, Y as QueryFunction } from './hydration-uphG6M-i.cjs';
|
|
2
|
+
import './removable.cjs';
|
|
3
|
+
import './subscribable.cjs';
|
|
4
|
+
|
|
5
|
+
type BaseStreamedQueryParams<TQueryFnData, TQueryKey extends QueryKey> = {
|
|
6
|
+
streamFn: (context: QueryFunctionContext<TQueryKey>) => AsyncIterable<TQueryFnData> | Promise<AsyncIterable<TQueryFnData>>;
|
|
7
|
+
refetchMode?: 'append' | 'reset' | 'replace';
|
|
8
|
+
};
|
|
9
|
+
type SimpleStreamedQueryParams<TQueryFnData, TQueryKey extends QueryKey> = BaseStreamedQueryParams<TQueryFnData, TQueryKey> & {
|
|
10
|
+
reducer?: never;
|
|
11
|
+
initialValue?: never;
|
|
12
|
+
};
|
|
13
|
+
type ReducibleStreamedQueryParams<TQueryFnData, TData, TQueryKey extends QueryKey> = BaseStreamedQueryParams<TQueryFnData, TQueryKey> & {
|
|
14
|
+
reducer: (acc: TData, chunk: TQueryFnData) => TData;
|
|
15
|
+
initialValue: TData;
|
|
16
|
+
};
|
|
17
|
+
type StreamedQueryParams<TQueryFnData, TData, TQueryKey extends QueryKey> = SimpleStreamedQueryParams<TQueryFnData, TQueryKey> | ReducibleStreamedQueryParams<TQueryFnData, TData, TQueryKey>;
|
|
18
|
+
/**
|
|
19
|
+
* This is a helper function to create a query function that streams data from an AsyncIterable.
|
|
20
|
+
* Data will be an Array of all the chunks received.
|
|
21
|
+
* The query will be in a 'pending' state until the first chunk of data is received, but will go to 'success' after that.
|
|
22
|
+
* The query will stay in fetchStatus 'fetching' until the stream ends.
|
|
23
|
+
* @param queryFn - The function that returns an AsyncIterable to stream data from.
|
|
24
|
+
* @param refetchMode - Defines how re-fetches are handled.
|
|
25
|
+
* Defaults to `'reset'`, erases all data and puts the query back into `pending` state.
|
|
26
|
+
* Set to `'append'` to append new data to the existing data.
|
|
27
|
+
* Set to `'replace'` to write all data to the cache once the stream ends.
|
|
28
|
+
* @param reducer - A function to reduce the streamed chunks into the final data.
|
|
29
|
+
* Defaults to a function that appends chunks to the end of the array.
|
|
30
|
+
* @param initialValue - Initial value to be used while the first chunk is being fetched, and returned if the stream yields no values.
|
|
31
|
+
*/
|
|
32
|
+
declare function streamedQuery<TQueryFnData = unknown, TData = Array<TQueryFnData>, TQueryKey extends QueryKey = QueryKey>({ streamFn, refetchMode, reducer, initialValue, }: StreamedQueryParams<TQueryFnData, TData, TQueryKey>): QueryFunction<TData, TQueryKey>;
|
|
33
|
+
|
|
34
|
+
export { streamedQuery };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { I as QueryKey, a1 as QueryFunctionContext, Y as QueryFunction } from './hydration-BlEVG2Lp.js';
|
|
2
|
+
import './removable.js';
|
|
3
|
+
import './subscribable.js';
|
|
4
|
+
|
|
5
|
+
type BaseStreamedQueryParams<TQueryFnData, TQueryKey extends QueryKey> = {
|
|
6
|
+
streamFn: (context: QueryFunctionContext<TQueryKey>) => AsyncIterable<TQueryFnData> | Promise<AsyncIterable<TQueryFnData>>;
|
|
7
|
+
refetchMode?: 'append' | 'reset' | 'replace';
|
|
8
|
+
};
|
|
9
|
+
type SimpleStreamedQueryParams<TQueryFnData, TQueryKey extends QueryKey> = BaseStreamedQueryParams<TQueryFnData, TQueryKey> & {
|
|
10
|
+
reducer?: never;
|
|
11
|
+
initialValue?: never;
|
|
12
|
+
};
|
|
13
|
+
type ReducibleStreamedQueryParams<TQueryFnData, TData, TQueryKey extends QueryKey> = BaseStreamedQueryParams<TQueryFnData, TQueryKey> & {
|
|
14
|
+
reducer: (acc: TData, chunk: TQueryFnData) => TData;
|
|
15
|
+
initialValue: TData;
|
|
16
|
+
};
|
|
17
|
+
type StreamedQueryParams<TQueryFnData, TData, TQueryKey extends QueryKey> = SimpleStreamedQueryParams<TQueryFnData, TQueryKey> | ReducibleStreamedQueryParams<TQueryFnData, TData, TQueryKey>;
|
|
18
|
+
/**
|
|
19
|
+
* This is a helper function to create a query function that streams data from an AsyncIterable.
|
|
20
|
+
* Data will be an Array of all the chunks received.
|
|
21
|
+
* The query will be in a 'pending' state until the first chunk of data is received, but will go to 'success' after that.
|
|
22
|
+
* The query will stay in fetchStatus 'fetching' until the stream ends.
|
|
23
|
+
* @param queryFn - The function that returns an AsyncIterable to stream data from.
|
|
24
|
+
* @param refetchMode - Defines how re-fetches are handled.
|
|
25
|
+
* Defaults to `'reset'`, erases all data and puts the query back into `pending` state.
|
|
26
|
+
* Set to `'append'` to append new data to the existing data.
|
|
27
|
+
* Set to `'replace'` to write all data to the cache once the stream ends.
|
|
28
|
+
* @param reducer - A function to reduce the streamed chunks into the final data.
|
|
29
|
+
* Defaults to a function that appends chunks to the end of the array.
|
|
30
|
+
* @param initialValue - Initial value to be used while the first chunk is being fetched, and returned if the stream yields no values.
|
|
31
|
+
*/
|
|
32
|
+
declare function streamedQuery<TQueryFnData = unknown, TData = Array<TQueryFnData>, TQueryKey extends QueryKey = QueryKey>({ streamFn, refetchMode, reducer, initialValue, }: StreamedQueryParams<TQueryFnData, TData, TQueryKey>): QueryFunction<TData, TQueryKey>;
|
|
33
|
+
|
|
34
|
+
export { streamedQuery };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
// src/streamedQuery.ts
|
|
2
|
+
import { addConsumeAwareSignal, addToEnd } from "./utils.js";
|
|
3
|
+
function streamedQuery({
|
|
4
|
+
streamFn,
|
|
5
|
+
refetchMode = "reset",
|
|
6
|
+
reducer = (items, chunk) => addToEnd(items, chunk),
|
|
7
|
+
initialValue = []
|
|
8
|
+
}) {
|
|
9
|
+
return async (context) => {
|
|
10
|
+
const query = context.client.getQueryCache().find({ queryKey: context.queryKey, exact: true });
|
|
11
|
+
const isRefetch = !!query && query.state.data !== void 0;
|
|
12
|
+
if (isRefetch && refetchMode === "reset") {
|
|
13
|
+
query.setState({
|
|
14
|
+
status: "pending",
|
|
15
|
+
data: void 0,
|
|
16
|
+
error: null,
|
|
17
|
+
fetchStatus: "fetching"
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
let result = initialValue;
|
|
21
|
+
let cancelled = false;
|
|
22
|
+
const streamFnContext = addConsumeAwareSignal(
|
|
23
|
+
{
|
|
24
|
+
client: context.client,
|
|
25
|
+
meta: context.meta,
|
|
26
|
+
queryKey: context.queryKey,
|
|
27
|
+
pageParam: context.pageParam,
|
|
28
|
+
direction: context.direction
|
|
29
|
+
},
|
|
30
|
+
() => context.signal,
|
|
31
|
+
() => cancelled = true
|
|
32
|
+
);
|
|
33
|
+
const stream = await streamFn(streamFnContext);
|
|
34
|
+
const isReplaceRefetch = isRefetch && refetchMode === "replace";
|
|
35
|
+
for await (const chunk of stream) {
|
|
36
|
+
if (cancelled) {
|
|
37
|
+
break;
|
|
38
|
+
}
|
|
39
|
+
if (isReplaceRefetch) {
|
|
40
|
+
result = reducer(result, chunk);
|
|
41
|
+
} else {
|
|
42
|
+
context.client.setQueryData(
|
|
43
|
+
context.queryKey,
|
|
44
|
+
(prev) => reducer(prev === void 0 ? initialValue : prev, chunk)
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
if (isReplaceRefetch && !cancelled) {
|
|
49
|
+
context.client.setQueryData(context.queryKey, result);
|
|
50
|
+
}
|
|
51
|
+
return context.client.getQueryData(context.queryKey) ?? initialValue;
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
export {
|
|
55
|
+
streamedQuery
|
|
56
|
+
};
|
|
57
|
+
//# sourceMappingURL=streamedQuery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/streamedQuery.ts"],"sourcesContent":["import { addConsumeAwareSignal, addToEnd } from './utils'\nimport type {\n OmitKeyof,\n QueryFunction,\n QueryFunctionContext,\n QueryKey,\n} from './types'\n\ntype BaseStreamedQueryParams<TQueryFnData, TQueryKey extends QueryKey> = {\n streamFn: (\n context: QueryFunctionContext<TQueryKey>,\n ) => AsyncIterable<TQueryFnData> | Promise<AsyncIterable<TQueryFnData>>\n refetchMode?: 'append' | 'reset' | 'replace'\n}\n\ntype SimpleStreamedQueryParams<\n TQueryFnData,\n TQueryKey extends QueryKey,\n> = BaseStreamedQueryParams<TQueryFnData, TQueryKey> & {\n reducer?: never\n initialValue?: never\n}\n\ntype ReducibleStreamedQueryParams<\n TQueryFnData,\n TData,\n TQueryKey extends QueryKey,\n> = BaseStreamedQueryParams<TQueryFnData, TQueryKey> & {\n reducer: (acc: TData, chunk: TQueryFnData) => TData\n initialValue: TData\n}\n\ntype StreamedQueryParams<TQueryFnData, TData, TQueryKey extends QueryKey> =\n | SimpleStreamedQueryParams<TQueryFnData, TQueryKey>\n | ReducibleStreamedQueryParams<TQueryFnData, TData, TQueryKey>\n\n/**\n * This is a helper function to create a query function that streams data from an AsyncIterable.\n * Data will be an Array of all the chunks received.\n * The query will be in a 'pending' state until the first chunk of data is received, but will go to 'success' after that.\n * The query will stay in fetchStatus 'fetching' until the stream ends.\n * @param queryFn - The function that returns an AsyncIterable to stream data from.\n * @param refetchMode - Defines how re-fetches are handled.\n * Defaults to `'reset'`, erases all data and puts the query back into `pending` state.\n * Set to `'append'` to append new data to the existing data.\n * Set to `'replace'` to write all data to the cache once the stream ends.\n * @param reducer - A function to reduce the streamed chunks into the final data.\n * Defaults to a function that appends chunks to the end of the array.\n * @param initialValue - Initial value to be used while the first chunk is being fetched, and returned if the stream yields no values.\n */\nexport function streamedQuery<\n TQueryFnData = unknown,\n TData = Array<TQueryFnData>,\n TQueryKey extends QueryKey = QueryKey,\n>({\n streamFn,\n refetchMode = 'reset',\n reducer = (items, chunk) =>\n addToEnd(items as Array<TQueryFnData>, chunk) as TData,\n initialValue = [] as TData,\n}: StreamedQueryParams<TQueryFnData, TData, TQueryKey>): QueryFunction<\n TData,\n TQueryKey\n> {\n return async (context) => {\n const query = context.client\n .getQueryCache()\n .find({ queryKey: context.queryKey, exact: true })\n const isRefetch = !!query && query.state.data !== undefined\n if (isRefetch && refetchMode === 'reset') {\n query.setState({\n status: 'pending',\n data: undefined,\n error: null,\n fetchStatus: 'fetching',\n })\n }\n\n let result = initialValue\n\n let cancelled: boolean = false as boolean\n const streamFnContext = addConsumeAwareSignal<\n OmitKeyof<typeof context, 'signal'>\n >(\n {\n client: context.client,\n meta: context.meta,\n queryKey: context.queryKey,\n pageParam: context.pageParam,\n direction: context.direction,\n },\n () => context.signal,\n () => (cancelled = true),\n )\n\n const stream = await streamFn(streamFnContext)\n\n const isReplaceRefetch = isRefetch && refetchMode === 'replace'\n\n for await (const chunk of stream) {\n if (cancelled) {\n break\n }\n\n if (isReplaceRefetch) {\n // don't append to the cache directly when replace-refetching\n result = reducer(result, chunk)\n } else {\n context.client.setQueryData<TData>(context.queryKey, (prev) =>\n reducer(prev === undefined ? initialValue : prev, chunk),\n )\n }\n }\n\n // finalize result: replace-refetching needs to write to the cache\n if (isReplaceRefetch && !cancelled) {\n context.client.setQueryData<TData>(context.queryKey, result)\n }\n\n return context.client.getQueryData(context.queryKey) ?? initialValue\n }\n}\n"],"mappings":";AAAA,SAAS,uBAAuB,gBAAgB;AAkDzC,SAAS,cAId;AAAA,EACA;AAAA,EACA,cAAc;AAAA,EACd,UAAU,CAAC,OAAO,UAChB,SAAS,OAA8B,KAAK;AAAA,EAC9C,eAAe,CAAC;AAClB,GAGE;AACA,SAAO,OAAO,YAAY;AACxB,UAAM,QAAQ,QAAQ,OACnB,cAAc,EACd,KAAK,EAAE,UAAU,QAAQ,UAAU,OAAO,KAAK,CAAC;AACnD,UAAM,YAAY,CAAC,CAAC,SAAS,MAAM,MAAM,SAAS;AAClD,QAAI,aAAa,gBAAgB,SAAS;AACxC,YAAM,SAAS;AAAA,QACb,QAAQ;AAAA,QACR,MAAM;AAAA,QACN,OAAO;AAAA,QACP,aAAa;AAAA,MACf,CAAC;AAAA,IACH;AAEA,QAAI,SAAS;AAEb,QAAI,YAAqB;AACzB,UAAM,kBAAkB;AAAA,MAGtB;AAAA,QACE,QAAQ,QAAQ;AAAA,QAChB,MAAM,QAAQ;AAAA,QACd,UAAU,QAAQ;AAAA,QAClB,WAAW,QAAQ;AAAA,QACnB,WAAW,QAAQ;AAAA,MACrB;AAAA,MACA,MAAM,QAAQ;AAAA,MACd,MAAO,YAAY;AAAA,IACrB;AAEA,UAAM,SAAS,MAAM,SAAS,eAAe;AAE7C,UAAM,mBAAmB,aAAa,gBAAgB;AAEtD,qBAAiB,SAAS,QAAQ;AAChC,UAAI,WAAW;AACb;AAAA,MACF;AAEA,UAAI,kBAAkB;AAEpB,iBAAS,QAAQ,QAAQ,KAAK;AAAA,MAChC,OAAO;AACL,gBAAQ,OAAO;AAAA,UAAoB,QAAQ;AAAA,UAAU,CAAC,SACpD,QAAQ,SAAS,SAAY,eAAe,MAAM,KAAK;AAAA,QACzD;AAAA,MACF;AAAA,IACF;AAGA,QAAI,oBAAoB,CAAC,WAAW;AAClC,cAAQ,OAAO,aAAoB,QAAQ,UAAU,MAAM;AAAA,IAC7D;AAEA,WAAO,QAAQ,OAAO,aAAa,QAAQ,QAAQ,KAAK;AAAA,EAC1D;AACF;","names":[]}
|
|
@@ -0,0 +1,51 @@
|
|
|
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/subscribable.ts
|
|
21
|
+
var subscribable_exports = {};
|
|
22
|
+
__export(subscribable_exports, {
|
|
23
|
+
Subscribable: () => Subscribable
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(subscribable_exports);
|
|
26
|
+
var Subscribable = class {
|
|
27
|
+
constructor() {
|
|
28
|
+
this.listeners = /* @__PURE__ */ new Set();
|
|
29
|
+
this.subscribe = this.subscribe.bind(this);
|
|
30
|
+
}
|
|
31
|
+
subscribe(listener) {
|
|
32
|
+
this.listeners.add(listener);
|
|
33
|
+
this.onSubscribe();
|
|
34
|
+
return () => {
|
|
35
|
+
this.listeners.delete(listener);
|
|
36
|
+
this.onUnsubscribe();
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
hasListeners() {
|
|
40
|
+
return this.listeners.size > 0;
|
|
41
|
+
}
|
|
42
|
+
onSubscribe() {
|
|
43
|
+
}
|
|
44
|
+
onUnsubscribe() {
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
48
|
+
0 && (module.exports = {
|
|
49
|
+
Subscribable
|
|
50
|
+
});
|
|
51
|
+
//# sourceMappingURL=subscribable.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/subscribable.ts"],"sourcesContent":["export class Subscribable<TListener extends Function> {\n protected listeners = new Set<TListener>()\n\n constructor() {\n this.subscribe = this.subscribe.bind(this)\n }\n\n subscribe(listener: TListener): () => void {\n this.listeners.add(listener)\n\n this.onSubscribe()\n\n return () => {\n this.listeners.delete(listener)\n this.onUnsubscribe()\n }\n }\n\n hasListeners(): boolean {\n return this.listeners.size > 0\n }\n\n protected onSubscribe(): void {\n // Do nothing\n }\n\n protected onUnsubscribe(): void {\n // Do nothing\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,IAAM,eAAN,MAA+C;AAAA,EAGpD,cAAc;AAFd,SAAU,YAAY,oBAAI,IAAe;AAGvC,SAAK,YAAY,KAAK,UAAU,KAAK,IAAI;AAAA,EAC3C;AAAA,EAEA,UAAU,UAAiC;AACzC,SAAK,UAAU,IAAI,QAAQ;AAE3B,SAAK,YAAY;AAEjB,WAAO,MAAM;AACX,WAAK,UAAU,OAAO,QAAQ;AAC9B,WAAK,cAAc;AAAA,IACrB;AAAA,EACF;AAAA,EAEA,eAAwB;AACtB,WAAO,KAAK,UAAU,OAAO;AAAA,EAC/B;AAAA,EAEU,cAAoB;AAAA,EAE9B;AAAA,EAEU,gBAAsB;AAAA,EAEhC;AACF;","names":[]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
declare class Subscribable<TListener extends Function> {
|
|
2
|
+
protected listeners: Set<TListener>;
|
|
3
|
+
constructor();
|
|
4
|
+
subscribe(listener: TListener): () => void;
|
|
5
|
+
hasListeners(): boolean;
|
|
6
|
+
protected onSubscribe(): void;
|
|
7
|
+
protected onUnsubscribe(): void;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export { Subscribable };
|