@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.
Files changed (2) hide show
  1. package/index.mjs +8 -3
  2. 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.34';
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)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deinossrl/dgp-agent",
3
- "version": "1.4.34",
3
+ "version": "1.4.35",
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": {