@deinossrl/dgp-agent 1.5.19 → 1.5.21
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 +17 -0
- package/index.mjs +8 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# Changelog - DGP Agent
|
|
2
2
|
|
|
3
|
+
## [1.5.21] - 2026-01-13
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
- Force `LC_ALL=C` on pg_restore to ensure progress bar works for restores on non-English systems.
|
|
7
|
+
|
|
8
|
+
## [1.5.20] - 2026-01-13
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- **Error persistente en Backups**: Corregido bug donde el mensaje de error de un backup fallido persistía incluso después de reintentarlo exitosamente.
|
|
12
|
+
- El agente ahora limpia explícitamente el campo `error_message` al completar un backup.
|
|
13
|
+
- La UI ya no muestra errores antiguos si el estado actual es `completed`.
|
|
14
|
+
|
|
15
|
+
## [1.5.20] - 2026-01-13
|
|
16
|
+
|
|
17
|
+
### Added
|
|
18
|
+
- Support for `estimated_total_objects` parameter to show progress percentage in full backups.
|
|
19
|
+
|
|
3
20
|
## [1.5.19] - 2026-01-13
|
|
4
21
|
|
|
5
22
|
### Fixed
|
package/index.mjs
CHANGED
|
@@ -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
|
|
1818
|
-
if (params.
|
|
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.)
|
|
@@ -1974,7 +1976,8 @@ async function executePgDump(command) {
|
|
|
1974
1976
|
status: 'completed',
|
|
1975
1977
|
storage_path: storagePath,
|
|
1976
1978
|
size_bytes: fileSize,
|
|
1977
|
-
completed_at: new Date().toISOString()
|
|
1979
|
+
completed_at: new Date().toISOString(),
|
|
1980
|
+
error_message: null
|
|
1978
1981
|
})
|
|
1979
1982
|
.eq('id', backupId);
|
|
1980
1983
|
|
|
@@ -2351,7 +2354,7 @@ async function executePgRestore(command) {
|
|
|
2351
2354
|
|
|
2352
2355
|
const result = await new Promise((resolve, reject) => {
|
|
2353
2356
|
const child = spawn(pgRestorePath, pgRestoreArgs, {
|
|
2354
|
-
env: process.env,
|
|
2357
|
+
env: { ...process.env, LC_ALL: 'C' },
|
|
2355
2358
|
stdio: ['ignore', 'pipe', 'pipe'],
|
|
2356
2359
|
});
|
|
2357
2360
|
|
|
@@ -2379,7 +2382,7 @@ async function executePgRestore(command) {
|
|
|
2379
2382
|
const now = Date.now();
|
|
2380
2383
|
|
|
2381
2384
|
// LOGICA: Filtrar, calcular y MOSTRAR PROGRESO (Consola y Web)
|
|
2382
|
-
if (trimmed.includes('processing') || trimmed.includes('creating') || trimmed.includes('restoring')) {
|
|
2385
|
+
if (trimmed.includes('processing') || trimmed.includes('creating') || trimmed.includes('restoring') || trimmed.includes('creando') || trimmed.includes('procesando')) {
|
|
2383
2386
|
processedObjects++;
|
|
2384
2387
|
|
|
2385
2388
|
// Si es un item procesado, mostrar progreso en consola
|