@kud/ai-conventional-commit-cli 0.12.9 → 0.12.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/dist/index.js +16 -4
  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,8 +245,12 @@ 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;
245
- borderLine(name.padEnd(maxName) + " | " + counts.padEnd(12) + " " + bar);
248
+ let name = f.file.length > maxName ? f.file.slice(0, maxName - 1) + "\u2026" : f.file;
249
+ let line = name.padEnd(maxName) + " | " + counts.padEnd(12) + " " + bar;
250
+ if (f.deleted) {
251
+ line += " " + chalk.red("[deleted]");
252
+ }
253
+ borderLine(line);
246
254
  });
247
255
  borderLine(
248
256
  chalk.dim(
@@ -420,8 +428,12 @@ async function runSplit(config, desired) {
420
428
  const delPortion = barLen - addPortion;
421
429
  const bar = chalk2.green("+".repeat(addPortion)) + chalk2.red("-".repeat(delPortion));
422
430
  const counts = chalk2.green("+" + add) + " " + chalk2.red("-" + del);
423
- const name = f.file.length > maxName ? f.file.slice(0, maxName - 1) + "\u2026" : f.file;
424
- borderLine(name.padEnd(maxName) + " | " + counts.padEnd(12) + " " + bar);
431
+ let name = f.file.length > maxName ? f.file.slice(0, maxName - 1) + "\u2026" : f.file;
432
+ let line = name.padEnd(maxName) + " | " + counts.padEnd(12) + " " + bar;
433
+ if (f.deleted) {
434
+ line += " " + chalk2.red("[deleted]");
435
+ }
436
+ borderLine(line);
425
437
  });
426
438
  borderLine(
427
439
  chalk2.dim(
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.11",
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": {