@deinossrl/dgp-agent 1.4.45 → 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.
Files changed (3) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/index.mjs +15 -3
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
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
+
14
+ ## [1.4.46] - 2026-01-12
15
+
16
+ ### Fixed
17
+ - Corregido error con rutas que contienen espacios al ejecutar pg_dump
18
+ - Entrecomillado de ruta de pg_dump.exe y archivo de salida
19
+ - Resuelve error "C:\Users\Eduardo no se reconoce como un comando"
20
+
3
21
  ## [1.4.45] - 2026-01-12
4
22
 
5
23
  ### Fixed
package/index.mjs CHANGED
@@ -1741,12 +1741,24 @@ async function executePgDump(command) {
1741
1741
  // Archivo de salida
1742
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
- await shellAsync(fullCommand);
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)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deinossrl/dgp-agent",
3
- "version": "1.4.45",
3
+ "version": "1.4.47",
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": {