@deinossrl/dgp-agent 1.4.44 → 1.4.45

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 +7 -0
  2. package/index.mjs +20 -14
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog - DGP Agent
2
2
 
3
+ ## [1.4.45] - 2026-01-12
4
+
5
+ ### Fixed
6
+ - Corregido error de file lock al extraer PostgreSQL binaries en Windows
7
+ - Agregado delay de 1 segundo después de cerrar archivo ZIP para que Windows libere el handle
8
+ - Resuelve el error "El proceso no puede obtener acceso al archivo... está siendo utilizado"
9
+
3
10
  ## [1.4.44] - 2026-01-12
4
11
 
5
12
  ### Added
package/index.mjs CHANGED
@@ -1507,11 +1507,13 @@ async function findOrInstallPgDump() {
1507
1507
  file.close();
1508
1508
  logInfo('Descarga completada. Extrayendo...');
1509
1509
 
1510
- // Extraer solo pg_dump.exe y sus DLLs necesarias
1511
- try {
1512
- // Usar PowerShell para extraer el zip
1513
- const extractCmd = `powershell -command "Expand-Archive -Path '${zipPath}' -DestinationPath '${BIN_DIR}' -Force"`;
1514
- execSync(extractCmd);
1510
+ // Dar tiempo a Windows para liberar el handle del archivo
1511
+ setTimeout(() => {
1512
+ // Extraer solo pg_dump.exe y sus DLLs necesarias
1513
+ try {
1514
+ // Usar PowerShell para extraer el zip
1515
+ const extractCmd = `powershell -command "Expand-Archive -Path '${zipPath}' -DestinationPath '${BIN_DIR}' -Force"`;
1516
+ execSync(extractCmd);
1515
1517
 
1516
1518
  // Los binarios estarán en BIN_DIR/pgsql/bin/
1517
1519
  const extractedPgDump = join(BIN_DIR, 'pgsql', 'bin', 'pg_dump.exe');
@@ -1547,9 +1549,10 @@ async function findOrInstallPgDump() {
1547
1549
  } else {
1548
1550
  reject(new Error('No se pudo extraer pg_dump del archivo'));
1549
1551
  }
1550
- } catch (extractError) {
1551
- reject(new Error(`Error al extraer: ${extractError.message}`));
1552
- }
1552
+ } catch (extractError) {
1553
+ reject(new Error(`Error al extraer: ${extractError.message}`));
1554
+ }
1555
+ }, 1000); // Esperar 1 segundo para que Windows libere el archivo
1553
1556
  });
1554
1557
  }).on('error', reject);
1555
1558
  } else {
@@ -1558,9 +1561,11 @@ async function findOrInstallPgDump() {
1558
1561
  file.close();
1559
1562
  logInfo('Descarga completada. Extrayendo...');
1560
1563
 
1561
- try {
1562
- const extractCmd = `powershell -command "Expand-Archive -Path '${zipPath}' -DestinationPath '${BIN_DIR}' -Force"`;
1563
- execSync(extractCmd);
1564
+ // Dar tiempo a Windows para liberar el handle del archivo
1565
+ setTimeout(() => {
1566
+ try {
1567
+ const extractCmd = `powershell -command "Expand-Archive -Path '${zipPath}' -DestinationPath '${BIN_DIR}' -Force"`;
1568
+ execSync(extractCmd);
1564
1569
 
1565
1570
  const extractedPgDump = join(BIN_DIR, 'pgsql', 'bin', 'pg_dump.exe');
1566
1571
 
@@ -1591,9 +1596,10 @@ async function findOrInstallPgDump() {
1591
1596
  } else {
1592
1597
  reject(new Error('No se pudo extraer pg_dump del archivo'));
1593
1598
  }
1594
- } catch (extractError) {
1595
- reject(new Error(`Error al extraer: ${extractError.message}`));
1596
- }
1599
+ } catch (extractError) {
1600
+ reject(new Error(`Error al extraer: ${extractError.message}`));
1601
+ }
1602
+ }, 1000); // Esperar 1 segundo para que Windows libere el archivo
1597
1603
  });
1598
1604
  }
1599
1605
  }).on('error', (err) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deinossrl/dgp-agent",
3
- "version": "1.4.44",
3
+ "version": "1.4.45",
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": {