@deinossrl/dgp-agent 1.5.1 → 1.5.2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog - DGP Agent
2
2
 
3
+ ## [1.5.2] - 2026-01-12
4
+
5
+ ### Fixed
6
+ - Ahora verifica que los 3 ejecutables existan (pg_dump, pg_restore, psql)
7
+ - Si falta psql.exe, reinstala PostgreSQL automáticamente
8
+ - Resuelve "psql no disponible" en upgrades desde versiones anteriores
9
+
3
10
  ## [1.5.1] - 2026-01-12
4
11
 
5
12
  ### Changed
package/index.mjs CHANGED
@@ -1430,20 +1430,26 @@ async function findOrInstallPgDump() {
1430
1430
  const isWindows = process.platform === 'win32';
1431
1431
  const executableName = isWindows ? 'pg_dump.exe' : 'pg_dump';
1432
1432
  const restoreExecutableName = isWindows ? 'pg_restore.exe' : 'pg_restore';
1433
+ const psqlExecutableName = isWindows ? 'psql.exe' : 'psql';
1433
1434
 
1434
- // 1. Verificar si ya están AMBOS en nuestro BIN_DIR
1435
+ // 1. Verificar si ya están LOS 3 ejecutables en nuestro BIN_DIR
1435
1436
  const localPgDump = join(BIN_DIR, executableName);
1436
1437
  const localPgRestore = join(BIN_DIR, restoreExecutableName);
1438
+ const localPsql = join(BIN_DIR, psqlExecutableName);
1437
1439
 
1438
- if (existsSync(localPgDump) && existsSync(localPgRestore)) {
1440
+ if (existsSync(localPgDump) && existsSync(localPgRestore) && existsSync(localPsql)) {
1439
1441
  return localPgDump;
1440
1442
  }
1441
1443
 
1442
1444
  // Si falta alguno, avisar y continuar con la instalación
1443
- if (existsSync(localPgDump) && !existsSync(localPgRestore)) {
1444
- logInfo('pg_dump existe pero falta pg_restore, reinstalando...');
1445
- } else if (!existsSync(localPgDump) && existsSync(localPgRestore)) {
1446
- logInfo('pg_restore existe pero falta pg_dump, reinstalando...');
1445
+ if (!existsSync(localPgDump)) {
1446
+ logInfo('pg_dump no encontrado, instalando PostgreSQL...');
1447
+ }
1448
+ if (!existsSync(localPgRestore)) {
1449
+ logInfo('pg_restore no encontrado, instalando PostgreSQL...');
1450
+ }
1451
+ if (!existsSync(localPsql)) {
1452
+ logInfo('psql no encontrado, instalando PostgreSQL...');
1447
1453
  }
1448
1454
 
1449
1455
  // 2. Buscar en PATH
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deinossrl/dgp-agent",
3
- "version": "1.5.1",
3
+ "version": "1.5.2",
4
4
  "description": "Agente local para Despliegue-GPT - Reporta el estado del repositorio Git a la plataforma TenMinute IA",
5
5
  "main": "index.mjs",
6
6
  "bin": {