@deinossrl/dgp-agent 1.4.55 → 1.4.56
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 +7 -0
- package/index.mjs +12 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog - DGP Agent
|
|
2
2
|
|
|
3
|
+
## [1.4.56] - 2026-01-12
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
- Ahora verifica que AMBOS ejecutables (`pg_dump.exe` y `pg_restore.exe`) existan
|
|
7
|
+
- Si falta alguno de los dos, reinstala PostgreSQL automáticamente
|
|
8
|
+
- Garantiza que ambas herramientas estén siempre disponibles
|
|
9
|
+
|
|
3
10
|
## [1.4.55] - 2026-01-12
|
|
4
11
|
|
|
5
12
|
### Fixed
|
package/index.mjs
CHANGED
|
@@ -1429,13 +1429,23 @@ async function executeDeploy(command) {
|
|
|
1429
1429
|
async function findOrInstallPgDump() {
|
|
1430
1430
|
const isWindows = process.platform === 'win32';
|
|
1431
1431
|
const executableName = isWindows ? 'pg_dump.exe' : 'pg_dump';
|
|
1432
|
+
const restoreExecutableName = isWindows ? 'pg_restore.exe' : 'pg_restore';
|
|
1432
1433
|
|
|
1433
|
-
// 1. Verificar si ya
|
|
1434
|
+
// 1. Verificar si ya están AMBOS en nuestro BIN_DIR
|
|
1434
1435
|
const localPgDump = join(BIN_DIR, executableName);
|
|
1435
|
-
|
|
1436
|
+
const localPgRestore = join(BIN_DIR, restoreExecutableName);
|
|
1437
|
+
|
|
1438
|
+
if (existsSync(localPgDump) && existsSync(localPgRestore)) {
|
|
1436
1439
|
return localPgDump;
|
|
1437
1440
|
}
|
|
1438
1441
|
|
|
1442
|
+
// 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...');
|
|
1447
|
+
}
|
|
1448
|
+
|
|
1439
1449
|
// 2. Buscar en PATH
|
|
1440
1450
|
try {
|
|
1441
1451
|
const checkCmd = isWindows ? 'where pg_dump' : 'which pg_dump';
|