(app: any, queryClient: QueryClient)
| 15 | const pluginName = 'Vue Query' |
| 16 | |
| 17 | export function setupDevtools(app: any, queryClient: QueryClient) { |
| 18 | setupDevtoolsPlugin( |
| 19 | { |
| 20 | id: pluginId, |
| 21 | label: pluginName, |
| 22 | packageName: 'vue-query', |
| 23 | homepage: 'https://tanstack.com/query/latest', |
| 24 | logo: 'https://raw.githubusercontent.com/TanStack/query/main/packages/vue-query/media/vue-query.svg', |
| 25 | app, |
| 26 | settings: { |
| 27 | baseSort: { |
| 28 | type: 'choice', |
| 29 | component: 'button-group', |
| 30 | label: 'Sort Cache Entries', |
| 31 | options: [ |
| 32 | { |
| 33 | label: 'ASC', |
| 34 | value: 1, |
| 35 | }, |
| 36 | { |
| 37 | label: 'DESC', |
| 38 | value: -1, |
| 39 | }, |
| 40 | ], |
| 41 | defaultValue: 1, |
| 42 | }, |
| 43 | sortFn: { |
| 44 | type: 'choice', |
| 45 | label: 'Sort Function', |
| 46 | options: Object.keys(sortFns).map((key) => ({ |
| 47 | label: key, |
| 48 | value: key, |
| 49 | })), |
| 50 | defaultValue: Object.keys(sortFns)[0]!, |
| 51 | }, |
| 52 | onlineMode: { |
| 53 | type: 'choice', |
| 54 | component: 'button-group', |
| 55 | label: 'Online mode', |
| 56 | options: [ |
| 57 | { |
| 58 | label: 'Online', |
| 59 | value: 1, |
| 60 | }, |
| 61 | { |
| 62 | label: 'Offline', |
| 63 | value: 0, |
| 64 | }, |
| 65 | ], |
| 66 | defaultValue: 1, |
| 67 | }, |
| 68 | }, |
| 69 | }, |
| 70 | (api) => { |
| 71 | const initialSettings = api.getSettings() |
| 72 | onlineManager.setOnline(Boolean(initialSettings.onlineMode.valueOf())) |
| 73 | |
| 74 | const queryCache = queryClient.getQueryCache() |
no test coverage detected
searching dependent graphs…