@deinossrl/dgp-agent 1.4.10 → 1.4.11

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 +14 -3
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -203,7 +203,7 @@ async function fetchPlatformConfig() {
203
203
  let platformConfig = null;
204
204
 
205
205
  // Versión y modo del agente
206
- const AGENT_VERSION = '1.4.10';
206
+ const AGENT_VERSION = '1.4.11';
207
207
  let AGENT_MODE = 'status'; // 'status' | 'deploy' | 'ai'
208
208
 
209
209
  // Configuración (prioridad: env vars > archivo config > platform config > defaults)
@@ -1045,9 +1045,20 @@ async function executeGitCommitPush(command) {
1045
1045
  await shellAsync('git add .');
1046
1046
  }
1047
1047
 
1048
- // git commit
1048
+ // git commit - escapar mensaje según el SO
1049
+ const isWindows = process.platform === 'win32';
1050
+ let commitCmd;
1051
+ if (isWindows) {
1052
+ // En Windows cmd /c, escapar comillas con \"
1053
+ const safeMessage = message.replace(/"/g, '\\"');
1054
+ commitCmd = `git commit -m "${safeMessage}"`;
1055
+ } else {
1056
+ // En Unix, usar comillas simples es más seguro
1057
+ const safeMessage = message.replace(/'/g, "'\\''");
1058
+ commitCmd = `git commit -m '${safeMessage}'`;
1059
+ }
1049
1060
  logCommand(`git commit -m "${message}"`);
1050
- const commitResult = await shellAsync(`git commit -m "${message}"`);
1061
+ const commitResult = await shellAsync(commitCmd);
1051
1062
  logSuccess('Commit created');
1052
1063
 
1053
1064
  // git push
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deinossrl/dgp-agent",
3
- "version": "1.4.10",
3
+ "version": "1.4.11",
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": {