chore: remove unused shared types
This commit is contained in:
@@ -37,8 +37,7 @@ export default defineConfig({
|
|||||||
},
|
},
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
'@renderer': resolve(__dirname, 'src'),
|
'@renderer': resolve(__dirname, 'src')
|
||||||
'@shared': resolve(__dirname, 'electron/shared')
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
plugins: [vue()],
|
plugins: [vue()],
|
||||||
|
|||||||
@@ -1,95 +0,0 @@
|
|||||||
// src/shared/types.ts
|
|
||||||
// 共享类型定义
|
|
||||||
|
|
||||||
// 连接配置
|
|
||||||
export interface ConnectionConfig {
|
|
||||||
id: string
|
|
||||||
name: string
|
|
||||||
host: string
|
|
||||||
port: number
|
|
||||||
auth: string
|
|
||||||
username: string
|
|
||||||
tls: boolean
|
|
||||||
tlsCaPath: string
|
|
||||||
tlsCertPath: string
|
|
||||||
tlsKeyPath: string
|
|
||||||
sshEnabled: boolean
|
|
||||||
sshHost: string
|
|
||||||
sshPort: number
|
|
||||||
sshUsername: string
|
|
||||||
sshPassword: string
|
|
||||||
sshPrivateKeyPath: string
|
|
||||||
cluster: boolean
|
|
||||||
sentinelMasterName: string
|
|
||||||
separator: string
|
|
||||||
order: number
|
|
||||||
createdAt: number
|
|
||||||
color?: string
|
|
||||||
}
|
|
||||||
|
|
||||||
// 连接选项(用于 Redis 连接)
|
|
||||||
export interface ConnectionOptions {
|
|
||||||
host: string
|
|
||||||
port: number
|
|
||||||
password?: string
|
|
||||||
username?: string
|
|
||||||
tls?: boolean
|
|
||||||
}
|
|
||||||
|
|
||||||
// IPC 响应
|
|
||||||
export interface IpcResponse<T = void> {
|
|
||||||
success: boolean
|
|
||||||
data?: T
|
|
||||||
error?: string
|
|
||||||
}
|
|
||||||
|
|
||||||
// Key 类型
|
|
||||||
export type RedisKeyType = 'string' | 'hash' | 'list' | 'set' | 'zset' | 'stream' | 'none'
|
|
||||||
|
|
||||||
// Key 项
|
|
||||||
export interface KeyItem {
|
|
||||||
name: string
|
|
||||||
type: RedisKeyType | string
|
|
||||||
ttl: number
|
|
||||||
level: number
|
|
||||||
children?: KeyItem[]
|
|
||||||
isLeaf: boolean
|
|
||||||
}
|
|
||||||
|
|
||||||
// Scan 结果
|
|
||||||
export interface ScanResult {
|
|
||||||
cursor: string
|
|
||||||
keys: string[]
|
|
||||||
}
|
|
||||||
|
|
||||||
// Hash 字段
|
|
||||||
export interface HashField {
|
|
||||||
field: string
|
|
||||||
value: string
|
|
||||||
}
|
|
||||||
|
|
||||||
// Stream Entry
|
|
||||||
export interface StreamEntry {
|
|
||||||
id: string
|
|
||||||
fields: Record<string, string>
|
|
||||||
}
|
|
||||||
|
|
||||||
// Zset Item
|
|
||||||
export interface ZsetItem {
|
|
||||||
member: string
|
|
||||||
score: number
|
|
||||||
}
|
|
||||||
|
|
||||||
// 慢日志条目
|
|
||||||
export interface SlowLogEntry {
|
|
||||||
id: number
|
|
||||||
timestamp: number
|
|
||||||
duration: number
|
|
||||||
command: string
|
|
||||||
}
|
|
||||||
|
|
||||||
// INFO 段
|
|
||||||
export interface InfoSection {
|
|
||||||
title: string
|
|
||||||
items: { key: string; value: string }[]
|
|
||||||
}
|
|
||||||
+1
-2
@@ -11,8 +11,7 @@
|
|||||||
"composite": true,
|
"composite": true,
|
||||||
"baseUrl": ".",
|
"baseUrl": ".",
|
||||||
"paths": {
|
"paths": {
|
||||||
"@renderer/*": ["src/*"],
|
"@renderer/*": ["src/*"]
|
||||||
"@shared/*": ["electron/shared/*"]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"include": ["src/**/*", "electron/preload/index.d.ts"]
|
"include": ["src/**/*", "electron/preload/index.d.ts"]
|
||||||
|
|||||||
Reference in New Issue
Block a user