Files
claude-pet/package.json
T
JianMiauandClaude Fable 5 35865b9e17 右鍵選單新增「重啟」
根本原因:
使用者要求選單能直接重啟寵物,不必手動結束再開。

影響:
更新或狀態異常時需要到系統匣結束再找 exe 重開。

修法:
選單加「重啟」。安裝版/開發模式用 app.relaunch();portable 版不能這樣:
relaunch 會重跑解壓到 %TEMP% 的那顆 exe,而 portable 外殼在程式結束時會刪掉
整個解壓目錄、舊程序還在跑時重新解壓也會被檔案鎖住,所以改成延遲兩秒後
重新執行原本的 -portable.exe(PORTABLE_EXECUTABLE_FILE)再結束自己。另加
本機專用的 POST /restart 端點供自動化驗證。版號 2.0.13。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-25 15:04:41 +08:00

91 lines
2.3 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
"name": "claude-pet",
"version": "2.0.13",
"description": "Codex Pets 相容的 Claude Code 桌面寵物(spriteVersionNumber 29 個動作列 + 16 方向追視)",
"main": "main.js",
"private": true,
"scripts": {
"start": "electron .",
"hooks:install": "node scripts/install-hooks.js",
"hooks:uninstall": "node scripts/uninstall-hooks.js",
"autostart:install": "node scripts/autostart.js install",
"autostart:uninstall": "node scripts/autostart.js uninstall",
"autostart:status": "node scripts/autostart.js status",
"predist": "npm version patch --no-git-tag-version",
"dist": "electron-builder --win",
"pack": "electron-builder --win --dir",
"release": "node scripts/release.js",
"predist:portable": "npm version patch --no-git-tag-version",
"dist:portable": "electron-builder --win portable"
},
"devDependencies": {
"electron": "^43.4.1",
"electron-builder": "^26.0.12"
},
"author": "JianMiau",
"build": {
"appId": "com.jianmiau.claude-pet",
"productName": "Claude Pet",
"copyright": "JianMiau",
"directories": {
"output": "dist",
"buildResources": "build"
},
"files": [
"main.js",
"preload.js",
"renderer/**/*",
"lib/**/*",
"hook/**/*",
"package.json"
],
"asarUnpack": [
"hook/**/*"
],
"win": {
"target": [
{
"target": "nsis",
"arch": [
"x64"
]
},
{
"target": "portable",
"arch": [
"x64"
]
},
{
"target": "zip",
"arch": [
"x64"
]
}
],
"icon": "build/icon.ico"
},
"nsis": {
"oneClick": false,
"perMachine": false,
"allowToChangeInstallationDirectory": true,
"createDesktopShortcut": true,
"createStartMenuShortcut": true,
"shortcutName": "Claude Pet",
"deleteAppDataOnUninstall": false,
"artifactName": "${productName}-${version}-setup.${ext}"
},
"portable": {
"artifactName": "${productName}-${version}-portable.${ext}",
"unpackDirName": "ClaudePet",
"requestExecutionLevel": "user"
},
"extraFiles": [
{
"from": "pets",
"to": "pets"
}
]
}
}