Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions packages/kit/src/client/docks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ export interface DockPanelStorage {

export type DockClientType = 'embedded' | 'standalone'

export interface DevToolsClientContext {
export interface DevToolsRpcContext {
/**
* The RPC client to interact with the server
*/
readonly rpc: DevToolsRpcClient
}

export interface DocksContext extends DevToolsClientContext {
export interface DocksContext extends DevToolsRpcContext {
/**
* Type of the client environment
*
Expand Down Expand Up @@ -57,7 +57,9 @@ export interface WhenClauseContext {
readonly context: WhenContext
}

export type DevToolsClientRpcHost = RpcFunctionsCollector<DevToolsRpcClientFunctions, DevToolsClientContext>
export type DevToolsClientRpcHost = RpcFunctionsCollector<DevToolsRpcClientFunctions, DevToolsRpcContext>

export type DevToolsClientContext = DocksContext

export interface DocksPanelContext {
store: DockPanelStorage
Expand Down
6 changes: 3 additions & 3 deletions packages/kit/src/client/rpc.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { WebSocketRpcClientOptions } from '@vitejs/devtools-rpc/presets/ws/client'
import type { BirpcOptions, BirpcReturn } from 'birpc'
import type { ConnectionMeta, DevToolsRpcClientFunctions, DevToolsRpcServerFunctions, EventEmitter, RpcSharedStateHost } from '../types'
import type { DevToolsClientContext, DevToolsClientRpcHost, RpcClientEvents } from './docks'
import type { DevToolsClientRpcHost, DevToolsRpcContext, RpcClientEvents } from './docks'
import { RpcFunctionsCollectorBase } from '@vitejs/devtools-rpc'
import {
DEVTOOLS_CONNECTION_META_FILENAME,
Expand Down Expand Up @@ -188,11 +188,11 @@ export async function getDevToolsRpcClient(
}
}

const context: DevToolsClientContext = {
const context: DevToolsRpcContext = {
rpc: undefined!,
}
const authToken = getConnectionAuthTokenFromWindows(options.authToken)
const clientRpc: DevToolsClientRpcHost = new RpcFunctionsCollectorBase<DevToolsRpcClientFunctions, DevToolsClientContext>(context)
const clientRpc: DevToolsClientRpcHost = new RpcFunctionsCollectorBase<DevToolsRpcClientFunctions, DevToolsRpcContext>(context)

async function fetchJsonFromBases(path: string): Promise<any> {
const candidates = [
Expand Down
Loading