@deinossrl/dgp-agent 1.4.34 → 1.4.35
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/index.mjs +8 -3
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -227,8 +227,13 @@ function saveSshKeyLocally(sshPrivateKey) {
|
|
|
227
227
|
// Verificar si la key tiene los delimitadores BEGIN/END
|
|
228
228
|
if (!normalizedKey.includes('-----BEGIN')) {
|
|
229
229
|
console.log('[!] SSH Key sin delimitadores, agregándolos automáticamente...');
|
|
230
|
-
// Agregar header y footer OpenSSH
|
|
231
|
-
normalizedKey = `-----BEGIN OPENSSH PRIVATE KEY-----\n${normalizedKey}\n-----END OPENSSH PRIVATE KEY
|
|
230
|
+
// Agregar header y footer OpenSSH (con salto de línea final)
|
|
231
|
+
normalizedKey = `-----BEGIN OPENSSH PRIVATE KEY-----\n${normalizedKey}\n-----END OPENSSH PRIVATE KEY-----\n`;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
// Asegurar que siempre termine con salto de línea
|
|
235
|
+
if (!normalizedKey.endsWith('\n')) {
|
|
236
|
+
normalizedKey += '\n';
|
|
232
237
|
}
|
|
233
238
|
|
|
234
239
|
writeFileSync(keyPath, normalizedKey);
|
|
@@ -341,7 +346,7 @@ function getPlinkPath() {
|
|
|
341
346
|
}
|
|
342
347
|
|
|
343
348
|
// Versión del agente
|
|
344
|
-
const AGENT_VERSION = '1.4.
|
|
349
|
+
const AGENT_VERSION = '1.4.35';
|
|
345
350
|
let AGENT_MODE = 'smart'; // Siempre inteligente
|
|
346
351
|
|
|
347
352
|
// Configuración (prioridad: env vars > archivo config > platform config > defaults)
|