@kud/ai-conventional-commit-cli 0.12.9 → 0.12.10

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/dist/index.js +12 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -54,6 +54,10 @@ var parseDiffFromRaw = (raw) => {
54
54
  }
55
55
  if (line.startsWith("diff --git")) continue;
56
56
  if (line.startsWith("index ")) continue;
57
+ if (/^deleted file mode /.test(line)) {
58
+ if (currentFile) currentFile.deleted = true;
59
+ continue;
60
+ }
57
61
  if (line.startsWith("--- ")) continue;
58
62
  if (line.startsWith("+++ ")) continue;
59
63
  if (line.startsWith("@@")) {
@@ -241,7 +245,10 @@ async function runGenerate(config) {
241
245
  const delPortion = barLen - addPortion;
242
246
  const bar = chalk.green("+".repeat(addPortion)) + chalk.red("-".repeat(delPortion));
243
247
  const counts = chalk.green("+" + add) + " " + chalk.red("-" + del);
244
- const name = f.file.length > maxName ? f.file.slice(0, maxName - 1) + "\u2026" : f.file;
248
+ let name = f.file.length > maxName ? f.file.slice(0, maxName - 1) + "\u2026" : f.file;
249
+ if (f.deleted) {
250
+ name += " " + chalk.red("[deleted]");
251
+ }
245
252
  borderLine(name.padEnd(maxName) + " | " + counts.padEnd(12) + " " + bar);
246
253
  });
247
254
  borderLine(
@@ -420,7 +427,10 @@ async function runSplit(config, desired) {
420
427
  const delPortion = barLen - addPortion;
421
428
  const bar = chalk2.green("+".repeat(addPortion)) + chalk2.red("-".repeat(delPortion));
422
429
  const counts = chalk2.green("+" + add) + " " + chalk2.red("-" + del);
423
- const name = f.file.length > maxName ? f.file.slice(0, maxName - 1) + "\u2026" : f.file;
430
+ let name = f.file.length > maxName ? f.file.slice(0, maxName - 1) + "\u2026" : f.file;
431
+ if (f.deleted) {
432
+ name += " " + chalk2.red("[deleted]");
433
+ }
424
434
  borderLine(name.padEnd(maxName) + " | " + counts.padEnd(12) + " " + bar);
425
435
  });
426
436
  borderLine(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kud/ai-conventional-commit-cli",
3
- "version": "0.12.9",
3
+ "version": "0.12.10",
4
4
  "type": "module",
5
5
  "description": "Opinionated, style-aware AI assistant for crafting and splitting git commits (opencode-based, provider-agnostic).",
6
6
  "bin": {