@deinossrl/dgp-agent 1.4.50 → 1.4.52
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 +18 -0
- package/index.mjs +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.52] - 2026-01-12
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
- Cambiado default Supabase key de anon a service_role
|
|
7
|
+
- Resuelve error "new row violates row-level security policy" al subir backups
|
|
8
|
+
- Backups ahora se suben correctamente a Supabase Storage
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
- El agente usa service_role key por defecto para operaciones privilegiadas
|
|
12
|
+
- Permite bypass de RLS policies en Storage y Database
|
|
13
|
+
|
|
14
|
+
## [1.4.51] - 2026-01-12
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
- Aumentado delay de 1s a 3s para liberar file handle del ZIP en Windows
|
|
18
|
+
- Resuelve error "El proceso no puede obtener acceso al archivo" al extraer
|
|
19
|
+
- Instalación más robusta en Windows con rutas con espacios
|
|
20
|
+
|
|
3
21
|
## [1.4.50] - 2026-01-12
|
|
4
22
|
|
|
5
23
|
### Added
|
package/index.mjs
CHANGED
|
@@ -366,7 +366,7 @@ let AGENT_MODE = 'smart'; // Siempre inteligente
|
|
|
366
366
|
const CONFIG = {
|
|
367
367
|
apiUrl: process.env.DGP_API_URL || fileConfig.apiUrl || 'https://asivayhbrqennwiwttds.supabase.co/functions/v1/dgp-agent-status',
|
|
368
368
|
commandsUrl: process.env.DGP_COMMANDS_URL || fileConfig.commandsUrl || 'https://asivayhbrqennwiwttds.supabase.co/rest/v1/agent_commands',
|
|
369
|
-
supabaseKey: process.env.DGP_SUPABASE_KEY || fileConfig.supabaseKey || 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.
|
|
369
|
+
supabaseKey: process.env.DGP_SUPABASE_KEY || fileConfig.supabaseKey || 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImFzaXZheWhicnFlbm53aXd0dGRzIiwicm9sZSI6InNlcnZpY2Vfcm9sZSIsImlhdCI6MTcyMjU1Mzc3MCwiZXhwIjoyMDM4MTI5NzcwfQ.r7RM4wXOQN4b7QMeHEw5U0y_l3dPZc8b0a7vp7_PBpQ',
|
|
370
370
|
interval: parseInt(process.env.DGP_INTERVAL || fileConfig.interval || '30', 10),
|
|
371
371
|
commandPollInterval: parseInt(process.env.DGP_COMMAND_POLL_INTERVAL || fileConfig.commandPollInterval || '10', 10),
|
|
372
372
|
machineId: process.env.DGP_MACHINE_ID || fileConfig.machineId || `${hostname()}-${process.env.USERNAME || process.env.USER || 'dev'}`,
|
|
@@ -1507,7 +1507,7 @@ async function findOrInstallPgDump() {
|
|
|
1507
1507
|
file.close();
|
|
1508
1508
|
logInfo('Descarga completada. Extrayendo...');
|
|
1509
1509
|
|
|
1510
|
-
// Dar tiempo a Windows para liberar el handle del archivo
|
|
1510
|
+
// Dar tiempo a Windows para liberar el handle del archivo (aumentado a 3 segundos)
|
|
1511
1511
|
setTimeout(() => {
|
|
1512
1512
|
// Extraer solo pg_dump.exe y sus DLLs necesarias
|
|
1513
1513
|
try {
|
|
@@ -1545,7 +1545,7 @@ async function findOrInstallPgDump() {
|
|
|
1545
1545
|
} catch (extractError) {
|
|
1546
1546
|
reject(new Error(`Error al extraer: ${extractError.message}`));
|
|
1547
1547
|
}
|
|
1548
|
-
},
|
|
1548
|
+
}, 3000); // Esperar 3 segundos para que Windows libere el archivo
|
|
1549
1549
|
});
|
|
1550
1550
|
}).on('error', reject);
|
|
1551
1551
|
} else {
|