getaimeter 0.7.6 → 0.7.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/tray.ps1 +12 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "getaimeter",
3
- "version": "0.7.6",
3
+ "version": "0.7.7",
4
4
  "description": "Track AI coding costs across Claude, Cursor, Codex, and Gemini. Optimization recommendations that cut costs by 30%.",
5
5
  "bin": {
6
6
  "aimeter": "cli.js"
package/tray.ps1 CHANGED
@@ -122,7 +122,18 @@ $checkUpdateItem.Add_Click({
122
122
  [System.Windows.Forms.MessageBoxIcon]::Information
123
123
  )
124
124
  if ($result -eq [System.Windows.Forms.DialogResult]::Yes) {
125
- Start-Process "cmd.exe" -ArgumentList "/k echo Updating AIMeter... && npm install -g getaimeter@latest && echo. && echo Done! Now restart: aimeter stop ^&^& aimeter start"
125
+ # Update and auto-restart: stop watcher, update npm, restart watcher
126
+ $nodePath = (Get-Command node -ErrorAction SilentlyContinue).Source
127
+ $aimeter = (Get-Command aimeter -ErrorAction SilentlyContinue).Source
128
+ Start-Process "cmd.exe" -ArgumentList "/k echo Updating AIMeter... && npm install -g getaimeter@latest && echo. && echo Restarting watcher... && aimeter stop && timeout /t 2 /nobreak >nul && aimeter start && echo. && echo Updated to latest version! This window can be closed. && echo."
129
+
130
+ # Give the cmd window time to stop us, then exit this tray
131
+ Start-Sleep -Seconds 3
132
+ $tray.Visible = $false
133
+ $tray.Dispose()
134
+ $mutex.ReleaseMutex()
135
+ $mutex.Dispose()
136
+ [System.Windows.Forms.Application]::Exit()
126
137
  }
127
138
  } else {
128
139
  [System.Windows.Forms.MessageBox]::Show(