fix: 修复文件层级重构后的架构问题
- 恢复 IPC 类型声明 (src/electron-api.d.ts),修复 31 个 TS2339 错误 - 修复构建断裂:vite.config.ts 改回 electron.vite.config.ts - 修复 2 个 verbatimModuleSyntax type-import 报错 - 修正 .gitignore 构建产物路径 (electron-dist/ -> dist-electron/ + release/) - 清理 55+ 处过时路径注释 - 更新 AGENTS.md 架构文档与 IPC 通道表 - 修正 docs/ROADMAP.md 过时引用
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
// src/main/credential.ts
|
||||
import { safeStorage } from 'electron'
|
||||
|
||||
export function encrypt(text: string): string {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
// src/main/ipc-handlers.ts
|
||||
// IPC 通道处理器
|
||||
import { ipcMain, BrowserWindow, nativeTheme, dialog } from 'electron'
|
||||
import store, { ConnectionConfig } from './store'
|
||||
import store, { type ConnectionConfig } from './store'
|
||||
import { encrypt, decrypt } from './credential'
|
||||
import * as redis from './redis'
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// src/main/index.ts
|
||||
import { app, BrowserWindow, nativeTheme, nativeImage } from 'electron'
|
||||
import { join } from 'path'
|
||||
import { restoreAndTrack } from './win-state'
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// src/preload/index.ts
|
||||
import { contextBridge, ipcRenderer } from 'electron'
|
||||
|
||||
const electronAPI = {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// electron/main/redis/commandLogger.ts
|
||||
// 命令日志记录器
|
||||
|
||||
export interface CommandEntry {
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
// electron/main/redis/connection.ts
|
||||
// Redis 连接管理(支持 SSH 隧道)
|
||||
import Redis, { RedisOptions } from 'ioredis'
|
||||
import Redis, { type RedisOptions } from 'ioredis'
|
||||
import { Client as SSHClient } from 'ssh2'
|
||||
import { createServer, type AddressInfo } from 'net'
|
||||
import { readFileSync } from 'fs'
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// electron/main/redis/format.ts
|
||||
// 值格式转换(解压/编码/自定义)
|
||||
import { gunzipSync, inflateSync, brotliDecompressSync } from 'zlib'
|
||||
import { execFile } from 'child_process'
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// src/main/redis/hash.ts
|
||||
// Hash 操作
|
||||
import { getClient } from './connection'
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// src/main/redis/index.ts
|
||||
// Redis 服务统一导出
|
||||
export * from './connection'
|
||||
export * from './keys'
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// src/main/redis/keys.ts
|
||||
// Key 操作
|
||||
import { getClient } from './connection'
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// src/main/redis/list.ts
|
||||
// List 操作
|
||||
import { getClient } from './connection'
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// electron/main/redis/pubsub.ts
|
||||
// 发布订阅 + MONITOR 流式接口
|
||||
import Redis from 'ioredis'
|
||||
import { getClient } from './connection'
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// src/main/redis/server.ts
|
||||
// 服务器操作
|
||||
import { getClient } from './connection'
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// src/main/redis/set.ts
|
||||
// Set 操作
|
||||
import { getClient } from './connection'
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// src/main/redis/stream.ts
|
||||
// Stream 操作
|
||||
import { getClient } from './connection'
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// src/main/redis/string.ts
|
||||
// String + ReJson 操作
|
||||
import { getClient } from './connection'
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// src/main/redis/zset.ts
|
||||
// Sorted Set 操作
|
||||
import { getClient } from './connection'
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// src/main/store.ts
|
||||
import Store from 'electron-store'
|
||||
|
||||
interface ConnectionConfig {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// src/main/win-state.ts
|
||||
import { app, screen, BrowserWindow } from 'electron'
|
||||
import { join } from 'path'
|
||||
import { readFileSync, writeFile } from 'fs'
|
||||
|
||||
Reference in New Issue
Block a user