@rozenite/tanstack-query-plugin 1.6.0 → 1.7.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/dist/{tanstack-query.html → devtools/tanstack-query.html} +1 -1
- package/dist/{react-native.cjs → react-native/index.cjs} +1 -1
- package/dist/react-native/index.d.ts +7 -0
- package/dist/react-native/index.js +6 -0
- package/dist/rozenite.json +1 -1
- package/package.json +27 -8
- package/dist/react-native.d.ts +0 -1
- package/dist/react-native.js +0 -6
- package/dist/rozenite.config.d.ts +0 -7
- package/dist/src/react-native/agent/__tests__/tanstack-query-agent.test.d.ts +0 -1
- package/dist/src/react-native/agent/tanstack-query-agent.d.ts +0 -1000
- package/dist/src/react-native/agent/useTanStackQueryAgentTools.d.ts +0 -2
- package/dist/src/react-native/devtools-actions.d.ts +0 -103
- package/dist/src/react-native/useHandleDevToolsMessages.d.ts +0 -3
- package/dist/src/react-native/useHandleInitialData.d.ts +0 -3
- package/dist/src/react-native/useSyncTanStackCache.d.ts +0 -3
- package/dist/src/react-native/useTanStackQueryDevTools.d.ts +0 -2
- package/dist/src/shared/dehydrate.d.ts +0 -6
- package/dist/src/shared/hydrate.d.ts +0 -10
- package/dist/src/shared/messaging.d.ts +0 -34
- package/dist/src/shared/types.d.ts +0 -25
- package/dist/src/shared/useSyncOnlineStatus.d.ts +0 -2
- package/dist/src/ui/tanstack-query.d.ts +0 -1
- package/dist/src/ui/useHandleSyncMessages.d.ts +0 -2
- package/dist/src/ui/useSyncDevToolsEvents.d.ts +0 -2
- package/dist/src/ui/useSyncInitialData.d.ts +0 -2
- /package/dist/{assets → devtools/assets}/CXEL7IU7-DJlSmt0p.js +0 -0
- /package/dist/{assets → devtools/assets}/tanstack-query-_leiFatc.js +0 -0
- /package/dist/{useTanStackQueryDevTools.cjs → react-native/chunks/useTanStackQueryDevTools.require.cjs} +0 -0
- /package/dist/{useTanStackQueryDevTools.js → react-native/chunks/useTanStackQueryDevTools.require.js} +0 -0
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import { QueryClient } from '@tanstack/react-query';
|
|
2
|
-
import { DevToolsActionType } from '../shared/types';
|
|
3
|
-
type QueryScopedActionInput = {
|
|
4
|
-
type: Exclude<DevToolsActionType, 'CLEAR_MUTATION_CACHE' | 'CLEAR_QUERY_CACHE'>;
|
|
5
|
-
queryHash: string;
|
|
6
|
-
};
|
|
7
|
-
type CacheScopedActionInput = {
|
|
8
|
-
type: 'CLEAR_MUTATION_CACHE' | 'CLEAR_QUERY_CACHE';
|
|
9
|
-
queryHash?: string;
|
|
10
|
-
};
|
|
11
|
-
export type TanStackQueryDevtoolsActionInput = QueryScopedActionInput | CacheScopedActionInput;
|
|
12
|
-
export declare const applyTanStackQueryDevtoolsAction: (queryClient: QueryClient, input: TanStackQueryDevtoolsActionInput) => Promise<{
|
|
13
|
-
applied: boolean;
|
|
14
|
-
action: "CLEAR_QUERY_CACHE";
|
|
15
|
-
cleared: boolean;
|
|
16
|
-
queryCountBefore: number;
|
|
17
|
-
queryCountAfter: number;
|
|
18
|
-
mutationCountBefore?: undefined;
|
|
19
|
-
mutationCountAfter?: undefined;
|
|
20
|
-
queryHash?: undefined;
|
|
21
|
-
} | {
|
|
22
|
-
applied: boolean;
|
|
23
|
-
action: "CLEAR_MUTATION_CACHE";
|
|
24
|
-
cleared: boolean;
|
|
25
|
-
mutationCountBefore: number;
|
|
26
|
-
mutationCountAfter: number;
|
|
27
|
-
queryCountBefore?: undefined;
|
|
28
|
-
queryCountAfter?: undefined;
|
|
29
|
-
queryHash?: undefined;
|
|
30
|
-
} | {
|
|
31
|
-
applied: boolean;
|
|
32
|
-
action: "TRIGGER_ERROR";
|
|
33
|
-
queryHash: string;
|
|
34
|
-
cleared?: undefined;
|
|
35
|
-
queryCountBefore?: undefined;
|
|
36
|
-
queryCountAfter?: undefined;
|
|
37
|
-
mutationCountBefore?: undefined;
|
|
38
|
-
mutationCountAfter?: undefined;
|
|
39
|
-
} | {
|
|
40
|
-
applied: boolean;
|
|
41
|
-
action: "RESTORE_ERROR";
|
|
42
|
-
queryHash: string;
|
|
43
|
-
cleared?: undefined;
|
|
44
|
-
queryCountBefore?: undefined;
|
|
45
|
-
queryCountAfter?: undefined;
|
|
46
|
-
mutationCountBefore?: undefined;
|
|
47
|
-
mutationCountAfter?: undefined;
|
|
48
|
-
} | {
|
|
49
|
-
applied: boolean;
|
|
50
|
-
action: "TRIGGER_LOADING";
|
|
51
|
-
queryHash: string;
|
|
52
|
-
cleared?: undefined;
|
|
53
|
-
queryCountBefore?: undefined;
|
|
54
|
-
queryCountAfter?: undefined;
|
|
55
|
-
mutationCountBefore?: undefined;
|
|
56
|
-
mutationCountAfter?: undefined;
|
|
57
|
-
} | {
|
|
58
|
-
applied: boolean;
|
|
59
|
-
action: "RESTORE_LOADING";
|
|
60
|
-
queryHash: string;
|
|
61
|
-
cleared?: undefined;
|
|
62
|
-
queryCountBefore?: undefined;
|
|
63
|
-
queryCountAfter?: undefined;
|
|
64
|
-
mutationCountBefore?: undefined;
|
|
65
|
-
mutationCountAfter?: undefined;
|
|
66
|
-
} | {
|
|
67
|
-
applied: boolean;
|
|
68
|
-
action: "RESET";
|
|
69
|
-
queryHash: string;
|
|
70
|
-
cleared?: undefined;
|
|
71
|
-
queryCountBefore?: undefined;
|
|
72
|
-
queryCountAfter?: undefined;
|
|
73
|
-
mutationCountBefore?: undefined;
|
|
74
|
-
mutationCountAfter?: undefined;
|
|
75
|
-
} | {
|
|
76
|
-
applied: boolean;
|
|
77
|
-
action: "REMOVE";
|
|
78
|
-
queryHash: string;
|
|
79
|
-
cleared?: undefined;
|
|
80
|
-
queryCountBefore?: undefined;
|
|
81
|
-
queryCountAfter?: undefined;
|
|
82
|
-
mutationCountBefore?: undefined;
|
|
83
|
-
mutationCountAfter?: undefined;
|
|
84
|
-
} | {
|
|
85
|
-
applied: boolean;
|
|
86
|
-
action: "REFETCH";
|
|
87
|
-
queryHash: string;
|
|
88
|
-
cleared?: undefined;
|
|
89
|
-
queryCountBefore?: undefined;
|
|
90
|
-
queryCountAfter?: undefined;
|
|
91
|
-
mutationCountBefore?: undefined;
|
|
92
|
-
mutationCountAfter?: undefined;
|
|
93
|
-
} | {
|
|
94
|
-
applied: boolean;
|
|
95
|
-
action: "INVALIDATE";
|
|
96
|
-
queryHash: string;
|
|
97
|
-
cleared?: undefined;
|
|
98
|
-
queryCountBefore?: undefined;
|
|
99
|
-
queryCountAfter?: undefined;
|
|
100
|
-
mutationCountBefore?: undefined;
|
|
101
|
-
mutationCountAfter?: undefined;
|
|
102
|
-
}>;
|
|
103
|
-
export {};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { Query, Mutation, QueryClient } from '@tanstack/react-query';
|
|
2
|
-
import { SerializableQuery, SerializableMutation, SerializableObserver, SerializableQueryClient } from './types';
|
|
3
|
-
export declare const dehydrateObservers: (query: Query) => SerializableObserver[];
|
|
4
|
-
export declare const dehydrateQuery: (query: Query) => SerializableQuery;
|
|
5
|
-
export declare const dehydrateMutation: (mutation: Mutation) => SerializableMutation;
|
|
6
|
-
export declare const dehydrateQueryClient: (queryClient: QueryClient) => SerializableQueryClient;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { QueryClient } from '@tanstack/react-query';
|
|
2
|
-
import { SerializableQuery, SerializableMutation, SerializableQueryClient, SerializableObserver, PartialQueryState } from './types';
|
|
3
|
-
export declare const hydrateQueryClient: (client: QueryClient, dehydratedState: SerializableQueryClient) => void;
|
|
4
|
-
export declare const applyQueryEvent: (queryClient: QueryClient, type: "added" | "updated" | "removed" | "observerAdded" | "observerRemoved" | "observerResultsUpdated" | "observerOptionsUpdated", data: SerializableQuery | PartialQueryState, action?: string) => void;
|
|
5
|
-
export declare const applyPartialQueryState: (queryClient: QueryClient, data: PartialQueryState) => void;
|
|
6
|
-
export declare const applyMutationEvent: (queryClient: QueryClient, type: "added" | "updated" | "removed" | "observerAdded" | "observerRemoved" | "observerResultsUpdated" | "observerOptionsUpdated", data: SerializableMutation) => void;
|
|
7
|
-
export declare const applyQueryObserverEvent: (queryClient: QueryClient, data: {
|
|
8
|
-
queryHash: string;
|
|
9
|
-
observers: SerializableObserver[];
|
|
10
|
-
}) => void;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { RozeniteDevToolsClient } from '@rozenite/plugin-bridge';
|
|
2
|
-
import { DevToolsActionType, SerializableQueryClient, SerializableQuery, SerializableMutation, SerializableObserver, PartialQueryState } from './types';
|
|
3
|
-
export type TanStackQueryPluginEventMap = {
|
|
4
|
-
'online-status-changed': {
|
|
5
|
-
online: boolean;
|
|
6
|
-
};
|
|
7
|
-
'devtools-action': {
|
|
8
|
-
type: DevToolsActionType;
|
|
9
|
-
queryHash: string;
|
|
10
|
-
};
|
|
11
|
-
'request-initial-data': unknown;
|
|
12
|
-
'sync-data': {
|
|
13
|
-
data: SerializableQueryClient;
|
|
14
|
-
};
|
|
15
|
-
'sync-query-event': {
|
|
16
|
-
type: 'added' | 'removed';
|
|
17
|
-
data: SerializableQuery;
|
|
18
|
-
} | {
|
|
19
|
-
type: 'updated';
|
|
20
|
-
action?: string;
|
|
21
|
-
data: SerializableQuery | PartialQueryState;
|
|
22
|
-
} | {
|
|
23
|
-
type: 'observerAdded' | 'observerRemoved' | 'observerOptionsUpdated';
|
|
24
|
-
data: {
|
|
25
|
-
queryHash: string;
|
|
26
|
-
observers: SerializableObserver[];
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
'sync-mutation-event': {
|
|
30
|
-
type: 'added' | 'updated' | 'removed' | 'observerAdded' | 'observerRemoved' | 'observerResultsUpdated' | 'observerOptionsUpdated';
|
|
31
|
-
data: SerializableMutation;
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
export type TanStackQueryPluginClient = RozeniteDevToolsClient<TanStackQueryPluginEventMap>;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { QueryKey, MutationState, QueryState, QueryObserverOptions, InfiniteQueryObserverOptions, MutationOptions } from '@tanstack/react-query';
|
|
2
|
-
export type SerializableQuery = {
|
|
3
|
-
queryHash: string;
|
|
4
|
-
state: QueryState;
|
|
5
|
-
queryKey: QueryKey;
|
|
6
|
-
observers: SerializableObserver[];
|
|
7
|
-
};
|
|
8
|
-
export type PartialQueryState = {
|
|
9
|
-
queryHash: string;
|
|
10
|
-
state: Partial<QueryState>;
|
|
11
|
-
};
|
|
12
|
-
export type SerializableMutation = {
|
|
13
|
-
mutationId: number;
|
|
14
|
-
options: MutationOptions;
|
|
15
|
-
state: MutationState;
|
|
16
|
-
};
|
|
17
|
-
export type SerializableObserver = {
|
|
18
|
-
queryHash: string;
|
|
19
|
-
options: QueryObserverOptions | InfiniteQueryObserverOptions;
|
|
20
|
-
};
|
|
21
|
-
export type SerializableQueryClient = {
|
|
22
|
-
queries: SerializableQuery[];
|
|
23
|
-
mutations: SerializableMutation[];
|
|
24
|
-
};
|
|
25
|
-
export type DevToolsActionType = 'REFETCH' | 'INVALIDATE' | 'RESET' | 'REMOVE' | 'TRIGGER_ERROR' | 'RESTORE_ERROR' | 'TRIGGER_LOADING' | 'RESTORE_LOADING' | 'CLEAR_MUTATION_CACHE' | 'CLEAR_QUERY_CACHE';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function TanStackQueryPanel(): import("react/jsx-runtime").JSX.Element;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|