Files
opsxshell/package.json
T
Logan.Li 514d62644e v2.0.0: 主题系统+SSH私钥解析修复+会话持久化+连接池优化+UI打磨
核心修复:
- ssh-service.ts: 新增 resolvePrivateKey(),将私钥文件路径(~/.ssh/id_rsa)解析为内容后传给 ssh2,
  解决 'Cannot parse privateKey: Unsupported key format' 错误
- useTerminalConnection.ts + sessionHelper.ts: 根据 authType 过滤字段,password/agent 认证不再传 privateKey
- sessionStore.ts: addSession() 现在先调用 sessionCreate() 持久化到 SQLite,解决恢复标签'无可用连接信息'问题
- database-service.ts: updateSession() 补充 private_key_path 字段持久化
- SessionDialog.tsx: 默认 username='root'、privateKey='~/.ssh/id_rsa'

UI/UX:
- 语义化主题系统(app-theme.ts),强制深色模式,全局无边框设计
- macOS 标题栏支持双击最大化(window:toggleMaximize IPC)
- macOS 菜单栏('OpsXShell' 应用菜单 + Settings Cmd+,)
- WelcomeView 4卡片布局,移除 Settings 按钮
- TabBar/TabItem 背景色统一(bg-dark-800/900),消除白色边框线

架构优化:
- SFTP 生命周期修复(useSFTP.ts useRef + autoConnectAttempted guard)
- 连接池竞态修复,支持快速多标签连接
- IPC 接口规范化,安全错误处理
- Vite 代码分割优化

质量: lint零错误 | tsc零错误 | build成功 | 49 tests pass
2026-04-22 11:15:41 +08:00

124 lines
3.5 KiB
JSON

{
"name": "opsxshell-gui",
"version": "2.0.0",
"description": "跨平台 SSH/SFTP 终端工具 · 简洁高效 · 安全可靠 · v2.0 安全增强版",
"main": "dist-electron/main.js",
"author": "OpsXShell Team",
"license": "MIT",
"scripts": {
"dev": "concurrently \"vite\" \"wait-on http://localhost:5173 && electron dist-electron/main.js --inspect=9222\"",
"build": "tsc --noEmit && vite build && npm run build:electron",
"build:electron": "tsc -p electron/tsconfig.json",
"preview": "vite preview",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"lint:fix": "eslint . --ext ts,tsx --fix",
"format": "prettier --write \"**/*.{ts,tsx,css,json,md}\"",
"format:check": "prettier --check \"**/*.{ts,tsx,css,json,md}\"",
"typecheck": "tsc --noEmit && tsc --noEmit -p electron/tsconfig.json",
"test": "vitest run",
"test:watch": "vitest",
"test:coverage": "vitest run --coverage",
"clean": "rimraf dist dist-electron release",
"prepare": "husky install || true",
"dist": "npm run build && electron-builder",
"dist:win": "npm run build && electron-builder --win",
"dist:mac": "npm run build && electron-builder --mac",
"dist:linux": "npm run build && electron-builder --linux"
},
"dependencies": {
"@vitest/coverage-v8": "^4.1.4",
"@xterm/addon-fit": "^0.10.0",
"@xterm/addon-search": "^0.16.0",
"@xterm/xterm": "^5.5.0",
"concurrently": "^9.2.1",
"husky": "^9.1.7",
"lint-staged": "^16.4.0",
"lucide-react": "^0.294.0",
"prettier": "^3.8.3",
"prettier-plugin-tailwindcss": "^0.7.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.21.0",
"rimraf": "^6.1.3",
"socksv5": "^0.0.6",
"sql.js": "^1.11.0",
"ssh2": "^1.15.0",
"uuid": "^9.0.1",
"wait-on": "^9.0.5",
"zmodem-ts": "^1.0.8",
"zustand": "^4.4.7"
},
"devDependencies": {
"@testing-library/jest-dom": "^6.9.1",
"@testing-library/react": "^16.3.2",
"@testing-library/user-event": "^14.6.1",
"@types/react": "^18.2.43",
"@types/react-dom": "^18.2.17",
"@types/sql.js": "^1.4.11",
"@types/ssh2": "^1.11.18",
"@types/uuid": "^9.0.7",
"@typescript-eslint/eslint-plugin": "^6.14.0",
"@typescript-eslint/parser": "^6.14.0",
"@vitejs/plugin-react": "^4.2.1",
"@xterm/addon-webgl": "^0.19.0",
"autoprefixer": "^10.4.16",
"electron": "^28.3.3",
"electron-builder": "^24.9.1",
"eslint": "^8.55.0",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.5",
"jsdom": "^29.0.1",
"postcss": "^8.4.32",
"tailwindcss": "^3.3.6",
"typescript": "^5.2.2",
"vite": "^5.0.8",
"vite-plugin-electron": "^0.28.0",
"vite-plugin-electron-renderer": "^0.14.5",
"vitest": "^4.1.2"
},
"build": {
"appId": "com.opsxshell.app",
"productName": "OpsXShell",
"directories": {
"output": "release"
},
"files": [
"dist",
"dist-electron"
],
"mac": {
"category": "public.app-category.utilities",
"target": [
{
"target": "dmg",
"arch": [
"x64",
"arm64"
]
}
]
},
"win": {
"target": [
{
"target": "nsis",
"arch": [
"x64"
]
}
]
},
"linux": {
"target": [
{
"target": "AppImage",
"arch": [
"x64"
]
}
],
"category": "Utility"
}
}
}