@deinossrl/dgp-agent 1.5.18 → 1.5.20

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 +11 -7
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # Changelog - DGP Agent
2
2
 
3
+ ## [1.5.20] - 2026-01-13
4
+
5
+ ### Fixed
6
+ - **Error persistente en Backups**: Corregido bug donde el mensaje de error de un backup fallido persistía incluso después de reintentarlo exitosamente.
7
+ - El agente ahora limpia explícitamente el campo `error_message` al completar un backup.
8
+ - La UI ya no muestra errores antiguos si el estado actual es `completed`.
9
+
10
+ ## [1.5.20] - 2026-01-13
11
+
12
+ ### Added
13
+ - Support for `estimated_total_objects` parameter to show progress percentage in full backups.
14
+
15
+ ## [1.5.19] - 2026-01-13
16
+
17
+ ### Fixed
18
+ - Force `LC_ALL=C` on pg_dump execution to ensure English output and reliable progress parsing on non-English systems.
19
+ - Added fallback detection for Spanish keywords ('extrayendo contenus') just in case.
20
+
3
21
  ## [1.5.18] - 2026-01-13
4
22
 
5
23
  ### Fixed
package/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- #!/usr/bin/env node
1
+ #!/usr/bin/env node
2
2
  /**
3
3
  * DGP Agent - Agente local para Despliegue-GPT
4
4
  * @deinossrl/dgp-agent
@@ -1803,7 +1803,7 @@ async function executePgDump(command) {
1803
1803
  // Usar spawn asíncrono para capturar progreso
1804
1804
  await new Promise((resolve, reject) => {
1805
1805
  const pgDumpProcess = spawn(pgDumpCmd, pgDumpArgs, {
1806
- env: process.env,
1806
+ env: { ...process.env, LC_ALL: 'C' },
1807
1807
  stdio: ['ignore', 'pipe', 'pipe'],
1808
1808
  });
1809
1809
 
@@ -1814,8 +1814,10 @@ async function executePgDump(command) {
1814
1814
  let objectCount = 0;
1815
1815
  let totalEstimated = 0;
1816
1816
 
1817
- // Estimar total de objetos si se especificaron schemas/tables
1818
- if (params.tables && params.tables.length > 0) {
1817
+ // Estimar total de objetos
1818
+ if (params.estimated_total_objects && params.estimated_total_objects > 0) {
1819
+ totalEstimated = params.estimated_total_objects;
1820
+ } else if (params.tables && params.tables.length > 0) {
1819
1821
  totalEstimated = params.tables.length;
1820
1822
  } else if (params.schemas && params.schemas.length > 0) {
1821
1823
  // Aproximado: ~20 objetos por schema (tablas, índices, secuencias, etc.)
@@ -1834,11 +1836,12 @@ async function executePgDump(command) {
1834
1836
 
1835
1837
  // LOGICA LOCAL: Mostrar actividad en consola
1836
1838
  // Si es un mensaje de "loop" (procesando datos), solo mostrar si pasó tiempo
1837
- const isLoopMessage = trimmed.includes('dumping data') || trimmed.includes('processing data') || trimmed.includes('dumping contents');
1839
+ const isLoopMessage = trimmed.includes('dumping data') || trimmed.includes('processing data') || trimmed.includes('dumping contents') || trimmed.includes('extrayendo');
1838
1840
  const now = Date.now();
1839
1841
 
1840
1842
  // LOGICA: Filtrar, calcular y MOSTRAR PROGRESO (Consola y Web)
1841
- if (trimmed.includes('processing') || trimmed.includes('dumping data') || trimmed.includes('dumping contents') || trimmed.includes('creating') || trimmed.includes('setting owner')) {
1843
+
1844
+ if (trimmed.includes('processing') || trimmed.includes('dumping data') || trimmed.includes('dumping contents') || trimmed.includes('extrayendo') || trimmed.includes('creating') || trimmed.includes('setting owner')) {
1842
1845
  objectCount++;
1843
1846
  }
1844
1847
 
@@ -1973,7 +1976,8 @@ async function executePgDump(command) {
1973
1976
  status: 'completed',
1974
1977
  storage_path: storagePath,
1975
1978
  size_bytes: fileSize,
1976
- completed_at: new Date().toISOString()
1979
+ completed_at: new Date().toISOString(),
1980
+ error_message: null
1977
1981
  })
1978
1982
  .eq('id', backupId);
1979
1983
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deinossrl/dgp-agent",
3
- "version": "1.5.18",
3
+ "version": "1.5.20",
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": {