@rozenite/tanstack-query-plugin 1.12.0 → 2.0.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.
@@ -3,7 +3,7 @@ import { onlineManager } from '@tanstack/react-query';
3
3
  import { TanStackQueryPluginClient } from './messaging';
4
4
 
5
5
  export const useSyncOnlineStatus = (
6
- client: TanStackQueryPluginClient | null
6
+ client: TanStackQueryPluginClient | null,
7
7
  ) => {
8
8
  useEffect(() => {
9
9
  if (!client) {
@@ -18,7 +18,7 @@ export const useSyncOnlineStatus = (
18
18
  'online-status-changed',
19
19
  ({ online }) => {
20
20
  onlineManager.setOnline(online);
21
- }
21
+ },
22
22
  );
23
23
 
24
24
  return () => {
@@ -9,7 +9,7 @@ import {
9
9
  } from '../shared/hydrate';
10
10
 
11
11
  export const useHandleSyncMessages = (
12
- client: TanStackQueryPluginClient | null
12
+ client: TanStackQueryPluginClient | null,
13
13
  ) => {
14
14
  const queryClient = useQueryClient();
15
15
 
@@ -42,14 +42,14 @@ export const useHandleSyncMessages = (
42
42
  applyQueryObserverEvent(queryClient, data);
43
43
  return;
44
44
  }
45
- }
45
+ },
46
46
  );
47
47
 
48
48
  const mutationSubscription = client.onMessage(
49
49
  'sync-mutation-event',
50
50
  ({ type, data }) => {
51
51
  applyMutationEvent(queryClient, type, data);
52
- }
52
+ },
53
53
  );
54
54
 
55
55
  // Keep the full sync for initial data requests
@@ -3,7 +3,7 @@ import { useEffect } from 'react';
3
3
  import { TanStackQueryPluginClient } from '../shared/messaging';
4
4
 
5
5
  export const useSyncDevToolsEvents = (
6
- client: TanStackQueryPluginClient | null
6
+ client: TanStackQueryPluginClient | null,
7
7
  ) => {
8
8
  const queryClient = useQueryClient();
9
9
 
@@ -2,7 +2,7 @@ import { useEffect } from 'react';
2
2
  import { TanStackQueryPluginClient } from '../shared/messaging';
3
3
 
4
4
  export const useSyncInitialData = (
5
- client: TanStackQueryPluginClient | null
5
+ client: TanStackQueryPluginClient | null,
6
6
  ) => {
7
7
  useEffect(() => {
8
8
  if (!client) {
package/vite.config.ts CHANGED
@@ -9,7 +9,10 @@ export default defineConfig({
9
9
  test: {
10
10
  passWithNoTests: true,
11
11
  alias: {
12
- '@rozenite/agent-shared': resolve(__dirname, '../agent-shared/src/index.ts'),
12
+ '@rozenite/agent-shared': resolve(
13
+ __dirname,
14
+ '../agent-shared/src/index.ts',
15
+ ),
13
16
  },
14
17
  },
15
18
  base: './',