- web/electron/main.cjs: BrowserWindow 加载 dist/index.html(prod)或 vite dev server 托盘(进托盘/退出/单击恢复),关闭按钮隐藏到托盘而非退出(用户要求) - web/electron/preload.cjs: contextBridge 暴露 gatewayUrl/versions/platform - web/package.json: 加 main 指向 main.cjs、dev:electron / build:win / build:linux 脚本、 electron 44.2.0 + electron-builder 26.15.3 依赖、build 配置(NSIS/AppImage/deb) - .gitignore: /release/ 验证(headless + xvfb): - Electron 加载 Gateway WebUI 成功(title=AgentMail, body 渲染) - Tray API 可用,BrowserWindow 正常 - prod 模式真实 main.cjs 无报错
75 lines
2.1 KiB
JSON
75 lines
2.1 KiB
JSON
{
|
|
"name": "agentmail-web",
|
|
"version": "0.1.0",
|
|
"private": true,
|
|
"type": "module",
|
|
"main": "electron/main.cjs",
|
|
"scripts": {
|
|
"dev": "vite",
|
|
"dev:electron": "ELECTRON_START_URL=http://localhost:5173 electron electron/main.cjs",
|
|
"build": "vite build",
|
|
"build:win": "vite build && electron-builder --win",
|
|
"build:linux": "vite build && electron-builder --linux",
|
|
"preview": "vite preview",
|
|
"typecheck": "tsc --noEmit",
|
|
"test": "node test/markdown-xss.test.mjs && node test/narrow-layout.test.mjs && node test/theme.test.mjs && vitest run",
|
|
"test:narrow": "node test/manual/narrow-verify.mjs",
|
|
"test:wide": "node test/manual/wide-regression.mjs",
|
|
"test:components": "vitest run",
|
|
"test:watch": "vitest"
|
|
},
|
|
"dependencies": {
|
|
"lunar-javascript": "1.7.7",
|
|
"react": "^18.3.1",
|
|
"react-dom": "^18.3.1",
|
|
"react-markdown": "^9.0.1",
|
|
"remark-gfm": "^4.0.0",
|
|
"zustand": "^4.5.4"
|
|
},
|
|
"devDependencies": {
|
|
"@testing-library/dom": "10.4.1",
|
|
"@testing-library/jest-dom": "6.9.1",
|
|
"@testing-library/react": "16.3.0",
|
|
"@testing-library/user-event": "14.6.1",
|
|
"@types/react": "^18.3.3",
|
|
"@types/react-dom": "^18.3.0",
|
|
"@vitejs/plugin-react": "^4.3.1",
|
|
"autoprefixer": "^10.4.19",
|
|
"electron": "^44.2.0",
|
|
"electron-builder": "^26.15.3",
|
|
"jsdom": "26.1.0",
|
|
"postcss": "^8.4.39",
|
|
"tailwindcss": "^3.4.6",
|
|
"typescript": "^5.5.3",
|
|
"vite": "^5.3.4",
|
|
"vitest": "3.2.4"
|
|
},
|
|
"build": {
|
|
"appId": "xyz.jianfgit.agentmail",
|
|
"productName": "AgentMail",
|
|
"files": [
|
|
"dist/**/*",
|
|
"electron/**/*"
|
|
],
|
|
"directories": {
|
|
"buildResources": "src/icons",
|
|
"output": "release"
|
|
},
|
|
"win": {
|
|
"target": [
|
|
{ "target": "nsis", "arch": ["x64"] }
|
|
]
|
|
},
|
|
"linux": {
|
|
"target": [
|
|
{ "target": "AppImage", "arch": ["x64"] },
|
|
{ "target": "deb", "arch": ["x64"] }
|
|
],
|
|
"category": "Network"
|
|
},
|
|
"nsis": {
|
|
"oneClick": false,
|
|
"allowToChangeInstallationDirectory": true
|
|
}
|
|
}
|
|
} |