File tree 2 files changed +1
-30
lines changed
2 files changed +1
-30
lines changed Original file line number Diff line number Diff line change 1
1
import type { NuxtDevtoolsClient , NuxtDevtoolsIframeClient } from '@nuxt/devtools-kit/types'
2
2
import type { $Fetch } from 'nitropack'
3
- import type { ClientFunctions , ServerFunctions } from '../../src/devtools'
4
3
import { onDevtoolsClientConnected } from '@nuxt/devtools-kit/iframe-client'
5
4
import { ref , watchEffect } from 'vue'
6
- import { globalRefreshTime , path , query , refreshSources } from '~/util/logic'
5
+ import { path , query , refreshSources } from '~/util/logic'
7
6
8
7
export const appFetch = ref < $Fetch > ( )
9
8
@@ -28,17 +27,4 @@ onDevtoolsClientConnected(async (client) => {
28
27
} )
29
28
devtools . value = client . devtools
30
29
devtoolsClient . value = client
31
- client . devtools . extendClientRpc < ServerFunctions , ClientFunctions > ( 'nuxt-robots' , {
32
- refreshRouteData ( path ) {
33
- // if path matches
34
- if ( devtoolsClient . value ?. host . nuxt . vueApp . config ?. globalProperties ?. $route . matched [ 0 ] . components ?. default . __file . includes ( path ) )
35
- refreshSources ( )
36
- } ,
37
- refresh ( ) {
38
- refreshSources ( )
39
- } ,
40
- refreshGlobalData ( ) {
41
- globalRefreshTime . value = Date . now ( )
42
- } ,
43
- } )
44
30
} )
Original file line number Diff line number Diff line change @@ -2,17 +2,8 @@ import type { Resolver } from '@nuxt/kit'
2
2
import type { Nuxt } from 'nuxt/schema'
3
3
import type { ModuleOptions } from './module'
4
4
import { existsSync } from 'node:fs'
5
- import { extendServerRpc , onDevToolsInitialized } from '@nuxt/devtools-kit'
6
5
import { useNuxt } from '@nuxt/kit'
7
6
8
- export interface ServerFunctions { }
9
-
10
- export interface ClientFunctions {
11
- refresh : ( ) => void
12
- refreshRouteData : ( path : string ) => void
13
- refreshGlobalData : ( ) => void
14
- }
15
-
16
7
const DEVTOOLS_UI_ROUTE = '/__nuxt-robots'
17
8
const DEVTOOLS_UI_LOCAL_PORT = 3030
18
9
@@ -44,12 +35,6 @@ export function setupDevToolsUI(options: ModuleOptions, resolve: Resolver['resol
44
35
} )
45
36
}
46
37
47
- // wait for DevTools to be initialized
48
- onDevToolsInitialized ( async ( ) => {
49
- /* const rpc = */
50
- extendServerRpc < ClientFunctions , ServerFunctions > ( 'nuxt-robots' , { } )
51
- } )
52
-
53
38
nuxt . hook ( 'devtools:customTabs' , ( tabs ) => {
54
39
tabs . push ( {
55
40
// unique identifier
You can’t perform that action at this time.
0 commit comments