- Markdown 解析器:内联正则 → marked 库(完整 GFM 支持) - HTML 净化器:内联 DOM 遍历 → DOMPurify(业界标准) - crypto.ts:删除 sha256js/xorBytes 死代码回退路径 - 消除 5 个文件中 escapeHtml/formatSize 重复定义 - 版本号升级至 5.1.5
77 lines
2.1 KiB
JSON
77 lines
2.1 KiB
JSON
{
|
|
"name": "metona-ollama-desktop",
|
|
"version": "5.1.5",
|
|
"description": "Metona Ollama - TypeScript + Electron 桌面 AI 聊天客户端",
|
|
"main": "dist/main/main.js",
|
|
"author": "thzxx",
|
|
"license": "MIT",
|
|
"scripts": {
|
|
"dev:renderer": "vite build --watch",
|
|
"dev:main": "tsc -p tsconfig.main.json --watch",
|
|
"build:renderer": "vite build",
|
|
"build:main": "tsc -p tsconfig.main.json",
|
|
"build": "npm run build:renderer && npm run build:main",
|
|
"start": "npm run build && electron . --no-sandbox",
|
|
"pack": "npm run build && electron-builder --dir",
|
|
"dist": "npm run build && electron-builder --win",
|
|
"dist:nsis": "npm run build && electron-builder --win nsis"
|
|
},
|
|
"build": {
|
|
"appId": "com.metona.ollama-desktop",
|
|
"productName": "Metona Ollama",
|
|
"directories": {
|
|
"output": "release"
|
|
},
|
|
"npmRebuild": false,
|
|
"files": [
|
|
"dist/**/*",
|
|
"assets/**/*",
|
|
"!node_modules/**/*",
|
|
"node_modules/sql.js/**/*",
|
|
"node_modules/marked/**/*",
|
|
"node_modules/dompurify/**/*"
|
|
],
|
|
"extraResources": [
|
|
{
|
|
"from": "node_modules/sql.js/dist/sql-wasm.wasm",
|
|
"to": "sql-wasm.wasm"
|
|
}
|
|
],
|
|
"win": {
|
|
"target": [
|
|
{
|
|
"target": "nsis",
|
|
"arch": [
|
|
"x64"
|
|
]
|
|
}
|
|
],
|
|
"icon": "assets/icons/llama.ico",
|
|
"requestedExecutionLevel": "asInvoker"
|
|
},
|
|
"nsis": {
|
|
"oneClick": false,
|
|
"allowToChangeInstallationDirectory": true,
|
|
"createDesktopShortcut": true,
|
|
"createStartMenuShortcut": true,
|
|
"shortcutName": "Metona Ollama",
|
|
"installerIcon": "assets/icons/llama.ico",
|
|
"uninstallerIcon": "assets/icons/llama.ico",
|
|
"installerHeaderIcon": "assets/icons/llama.ico"
|
|
}
|
|
},
|
|
"devDependencies": {
|
|
"@types/dompurify": "^3.0.5",
|
|
"@types/node": "^20.17.0",
|
|
"electron": "^33.4.11",
|
|
"electron-builder": "^25.1.8",
|
|
"typescript": "^5.7.0",
|
|
"vite": "^5.4.0"
|
|
},
|
|
"dependencies": {
|
|
"dompurify": "^3.4.0",
|
|
"marked": "^18.0.2",
|
|
"sql.js": "^1.11.0"
|
|
}
|
|
}
|