zugzbot-sdd 1.5.35 → 1.5.37
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.
|
@@ -174,15 +174,7 @@ export default tool({
|
|
|
174
174
|
catch (e) {
|
|
175
175
|
report.push(`⚠️ Sincronización automática de habilidades fallida o no disponible: ${e.message || e}`);
|
|
176
176
|
}
|
|
177
|
-
// 4.
|
|
178
|
-
const tempCommitMsgPath = path.join(projectRoot, ".openspec", `commit_msg_${args.changeName}.txt`);
|
|
179
|
-
try {
|
|
180
|
-
fs.writeFileSync(tempCommitMsgPath, args.commitMessage + "\n", "utf-8");
|
|
181
|
-
report.push(`✓ Archivo commit_message.txt generado en location temporal`);
|
|
182
|
-
}
|
|
183
|
-
catch (e) {
|
|
184
|
-
report.push(`⚠️ Error escribiendo commit_message.txt: ${e.message}`);
|
|
185
|
-
}
|
|
177
|
+
// 4. No temporary file is needed on disk, we feed it directly to git commit stdin in step 7.
|
|
186
178
|
// 5. Resetear el lockfile a idle (ANTES del commit para incluirlo en el cierre)
|
|
187
179
|
if (fs.existsSync(lockfilePath)) {
|
|
188
180
|
try {
|
|
@@ -277,20 +269,13 @@ Este reporte detalla la telemetría de tokens y coste financiero en USD acumulad
|
|
|
277
269
|
if (fs.existsSync(path.join(projectRoot, ".git"))) {
|
|
278
270
|
try {
|
|
279
271
|
execSync("git add .", { cwd: projectRoot, stdio: "ignore" });
|
|
280
|
-
execSync(
|
|
272
|
+
execSync("git commit -F -", { cwd: projectRoot, input: args.commitMessage + "\n", stdio: ["pipe", "ignore", "ignore"] });
|
|
281
273
|
report.push(`✓ Commit de Git ejecutado usando el mensaje semántico (incluye archivos archivados)`);
|
|
282
274
|
}
|
|
283
275
|
catch (e) {
|
|
284
276
|
report.push(`⚠️ Git Commit falló o no había cambios pendientes de código: ${e.message}`);
|
|
285
277
|
}
|
|
286
278
|
}
|
|
287
|
-
// 8. Limpiar archivo temporal de commit message
|
|
288
|
-
try {
|
|
289
|
-
if (fs.existsSync(tempCommitMsgPath)) {
|
|
290
|
-
fs.unlinkSync(tempCommitMsgPath);
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
catch (e) { }
|
|
294
279
|
report.push("━━━ finalizado con éxito absoluto ━━━");
|
|
295
280
|
return report.join("\n");
|
|
296
281
|
}
|
package/package.json
CHANGED
|
@@ -172,14 +172,7 @@ export default tool({
|
|
|
172
172
|
report.push(`⚠️ Sincronización automática de habilidades fallida o no disponible: ${e.message || e}`)
|
|
173
173
|
}
|
|
174
174
|
|
|
175
|
-
// 4.
|
|
176
|
-
const tempCommitMsgPath = path.join(projectRoot, ".openspec", `commit_msg_${args.changeName}.txt`)
|
|
177
|
-
try {
|
|
178
|
-
fs.writeFileSync(tempCommitMsgPath, args.commitMessage + "\n", "utf-8")
|
|
179
|
-
report.push(`✓ Archivo commit_message.txt generado en location temporal`)
|
|
180
|
-
} catch (e: any) {
|
|
181
|
-
report.push(`⚠️ Error escribiendo commit_message.txt: ${e.message}`)
|
|
182
|
-
}
|
|
175
|
+
// 4. No temporary file is needed on disk, we feed it directly to git commit stdin in step 7.
|
|
183
176
|
|
|
184
177
|
// 5. Resetear el lockfile a idle (ANTES del commit para incluirlo en el cierre)
|
|
185
178
|
if (fs.existsSync(lockfilePath)) {
|
|
@@ -277,20 +270,13 @@ Este reporte detalla la telemetría de tokens y coste financiero en USD acumulad
|
|
|
277
270
|
if (fs.existsSync(path.join(projectRoot, ".git"))) {
|
|
278
271
|
try {
|
|
279
272
|
execSync("git add .", { cwd: projectRoot, stdio: "ignore" })
|
|
280
|
-
execSync(
|
|
273
|
+
execSync("git commit -F -", { cwd: projectRoot, input: args.commitMessage + "\n", stdio: ["pipe", "ignore", "ignore"] })
|
|
281
274
|
report.push(`✓ Commit de Git ejecutado usando el mensaje semántico (incluye archivos archivados)`)
|
|
282
275
|
} catch (e: any) {
|
|
283
276
|
report.push(`⚠️ Git Commit falló o no había cambios pendientes de código: ${e.message}`)
|
|
284
277
|
}
|
|
285
278
|
}
|
|
286
279
|
|
|
287
|
-
// 8. Limpiar archivo temporal de commit message
|
|
288
|
-
try {
|
|
289
|
-
if (fs.existsSync(tempCommitMsgPath)) {
|
|
290
|
-
fs.unlinkSync(tempCommitMsgPath)
|
|
291
|
-
}
|
|
292
|
-
} catch (e: any) {}
|
|
293
|
-
|
|
294
280
|
report.push("━━━ finalizado con éxito absoluto ━━━")
|
|
295
281
|
return report.join("\n")
|
|
296
282
|
}
|