local-mcp 1.112.0 → 1.113.0
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.
- package/download.js +13 -4
- package/package.json +1 -1
package/download.js
CHANGED
|
@@ -192,14 +192,23 @@ async function ensureTray() {
|
|
|
192
192
|
process.stderr.write(`\nDescargando tray v${version}...\n`)
|
|
193
193
|
|
|
194
194
|
fs.mkdirSync(TRAY_DIR, { recursive: true })
|
|
195
|
-
// Limpiar versión anterior si existe
|
|
196
|
-
if (fs.existsSync(trayApp)) {
|
|
197
|
-
try { execFileSync('rm', ['-rf', trayApp], { stdio: 'pipe' }) } catch { /* ignorar */ }
|
|
198
|
-
}
|
|
199
195
|
const tarPath = path.join(TRAY_DIR, `tray-${version}.tar.gz`)
|
|
200
196
|
|
|
197
|
+
// Descargar ANTES de borrar el viejo — si la descarga falla, el tray actual sigue intacto
|
|
201
198
|
await downloadFile(url, tarPath)
|
|
202
199
|
|
|
200
|
+
// Verificar que el archivo descargado no está vacío
|
|
201
|
+
const tarStat = fs.statSync(tarPath)
|
|
202
|
+
if (tarStat.size < 10000) {
|
|
203
|
+
fs.unlinkSync(tarPath)
|
|
204
|
+
throw new Error(`Descarga del tray incompleta (${tarStat.size} bytes)`)
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
// Recién ahora borrar el viejo e instalar el nuevo
|
|
208
|
+
if (fs.existsSync(trayApp)) {
|
|
209
|
+
try { execFileSync('rm', ['-rf', trayApp], { stdio: 'pipe' }) } catch { /* ignorar */ }
|
|
210
|
+
}
|
|
211
|
+
|
|
203
212
|
process.stderr.write(` Instalando tray en /Applications...\n`)
|
|
204
213
|
execFileSync('tar', ['-xzf', tarPath, '-C', '/Applications'], { stdio: 'pipe' })
|
|
205
214
|
fs.unlinkSync(tarPath)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "local-mcp",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.113.0",
|
|
4
4
|
"description": "MCP server for macOS \u2014 connect Claude Desktop, Cursor, Windsurf to Mail, Calendar, Contacts, Teams, OneDrive. Privacy-first: all data stays on your Mac.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|