@deinossrl/dgp-agent 1.4.46 → 1.4.47
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 +11 -0
- package/index.mjs +17 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Changelog - DGP Agent
|
|
2
2
|
|
|
3
|
+
## [1.4.47] - 2026-01-12
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
- Usa spawnSync directamente para ejecutar pg_dump (evita escapado de comillas)
|
|
7
|
+
- Elimina problemas con rutas que contienen espacios en Windows
|
|
8
|
+
- Solución definitiva para "comando no reconocido" con usernames que tienen espacios
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
- Reemplazado shellAsync por spawnSync con argumentos separados
|
|
12
|
+
- Mejor manejo de errores y output de pg_dump
|
|
13
|
+
|
|
3
14
|
## [1.4.46] - 2026-01-12
|
|
4
15
|
|
|
5
16
|
### Fixed
|
package/index.mjs
CHANGED
|
@@ -1738,15 +1738,27 @@ async function executePgDump(command) {
|
|
|
1738
1738
|
});
|
|
1739
1739
|
}
|
|
1740
1740
|
|
|
1741
|
-
// Archivo de salida
|
|
1742
|
-
pgDumpArgs.push(`--file
|
|
1741
|
+
// Archivo de salida
|
|
1742
|
+
pgDumpArgs.push(`--file=${localFilePath}`);
|
|
1743
1743
|
|
|
1744
|
-
// Ejecutar pg_dump (
|
|
1745
|
-
const fullCommand = `"${pgDumpCmd}" ${pgDumpArgs.join(' ')}`;
|
|
1744
|
+
// Ejecutar pg_dump usando spawnSync directamente (evita problemas con espacios en rutas)
|
|
1746
1745
|
logCommand(`Ejecutando: pg_dump [conexión oculta]`);
|
|
1747
1746
|
await addCommandLog('command', 'Ejecutando pg_dump...');
|
|
1748
1747
|
|
|
1749
|
-
|
|
1748
|
+
const result = spawnSync(pgDumpCmd, pgDumpArgs, {
|
|
1749
|
+
env: process.env,
|
|
1750
|
+
encoding: 'utf-8',
|
|
1751
|
+
stdio: 'pipe',
|
|
1752
|
+
});
|
|
1753
|
+
|
|
1754
|
+
if (result.error) {
|
|
1755
|
+
throw new Error(`Error ejecutando pg_dump: ${result.error.message}`);
|
|
1756
|
+
}
|
|
1757
|
+
|
|
1758
|
+
if (result.status !== 0) {
|
|
1759
|
+
const errorMsg = result.stderr || result.stdout || 'Unknown error';
|
|
1760
|
+
throw new Error(`pg_dump failed with code ${result.status}: ${errorMsg}`);
|
|
1761
|
+
}
|
|
1750
1762
|
|
|
1751
1763
|
// Verificar que el archivo se creó
|
|
1752
1764
|
if (!existsSync(localFilePath)) {
|