@kud/ai-conventional-commit-cli 0.13.2 → 1.0.0
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.
- package/dist/index.js +31 -35
- package/package.json +16 -16
package/dist/index.js
CHANGED
|
@@ -246,19 +246,21 @@ async function runGenerate(config) {
|
|
|
246
246
|
const del = f.deletions || 0;
|
|
247
247
|
totalAdd += add;
|
|
248
248
|
totalDel += del;
|
|
249
|
-
const delta = add + del;
|
|
250
|
-
const counts = chalk.green("+" + add) + " " + chalk.red("-" + del);
|
|
251
249
|
const name = f.file.length > maxName ? f.file.slice(0, maxName - 1) + "\u2026" : f.file;
|
|
252
|
-
let line = name.padEnd(maxName) + " | "
|
|
253
|
-
if (delta > 0) {
|
|
254
|
-
const barLen = Math.max(1, Math.round(delta / maxDelta * BAR_WIDTH));
|
|
255
|
-
const addPortion = Math.min(barLen, Math.round(barLen * (add / (delta || 1))));
|
|
256
|
-
const delPortion = barLen - addPortion;
|
|
257
|
-
const bar = chalk.green("+".repeat(addPortion)) + chalk.red("-".repeat(delPortion));
|
|
258
|
-
line += " " + bar;
|
|
259
|
-
}
|
|
250
|
+
let line = name.padEnd(maxName) + " | ";
|
|
260
251
|
if (f.deleted) {
|
|
261
|
-
line +=
|
|
252
|
+
line += chalk.red("[deleted]");
|
|
253
|
+
} else {
|
|
254
|
+
const delta = add + del;
|
|
255
|
+
const counts = chalk.green("+" + add) + " " + chalk.red("-" + del);
|
|
256
|
+
line += counts.padEnd(12);
|
|
257
|
+
if (delta > 0) {
|
|
258
|
+
const barLen = Math.max(1, Math.round(delta / maxDelta * BAR_WIDTH));
|
|
259
|
+
const addPortion = Math.min(barLen, Math.round(barLen * (add / (delta || 1))));
|
|
260
|
+
const delPortion = barLen - addPortion;
|
|
261
|
+
const bar = chalk.green("+".repeat(addPortion)) + chalk.red("-".repeat(delPortion));
|
|
262
|
+
line += " " + bar;
|
|
263
|
+
}
|
|
262
264
|
}
|
|
263
265
|
borderLine(line);
|
|
264
266
|
});
|
|
@@ -340,14 +342,10 @@ function saveSession(data) {
|
|
|
340
342
|
async function selectYesNo() {
|
|
341
343
|
const { choice } = await inquirer.prompt([
|
|
342
344
|
{
|
|
343
|
-
type: "
|
|
345
|
+
type: "confirm",
|
|
344
346
|
name: "choice",
|
|
345
347
|
message: "Use the commit?",
|
|
346
|
-
|
|
347
|
-
{ name: "Yes", value: true },
|
|
348
|
-
{ name: "No", value: false }
|
|
349
|
-
],
|
|
350
|
-
default: 0
|
|
348
|
+
default: true
|
|
351
349
|
}
|
|
352
350
|
]);
|
|
353
351
|
return choice;
|
|
@@ -432,19 +430,21 @@ async function runSplit(config, desired) {
|
|
|
432
430
|
const del = f.deletions || 0;
|
|
433
431
|
totalAdd += add;
|
|
434
432
|
totalDel += del;
|
|
435
|
-
const
|
|
436
|
-
|
|
437
|
-
let name = f.file.length > maxName ? f.file.slice(0, maxName - 1) + "\u2026" : f.file;
|
|
438
|
-
let line = name.padEnd(maxName) + " | " + counts.padEnd(12);
|
|
439
|
-
if (delta > 0) {
|
|
440
|
-
const barLen = Math.max(1, Math.round(delta / maxDelta * BAR_WIDTH));
|
|
441
|
-
const addPortion = Math.min(barLen, Math.round(barLen * (add / (delta || 1))));
|
|
442
|
-
const delPortion = barLen - addPortion;
|
|
443
|
-
const bar = chalk2.green("+".repeat(addPortion)) + chalk2.red("-".repeat(delPortion));
|
|
444
|
-
line += " " + bar;
|
|
445
|
-
}
|
|
433
|
+
const name = f.file.length > maxName ? f.file.slice(0, maxName - 1) + "\u2026" : f.file;
|
|
434
|
+
let line = name.padEnd(maxName) + " | ";
|
|
446
435
|
if (f.deleted) {
|
|
447
|
-
line +=
|
|
436
|
+
line += chalk2.red("[deleted]");
|
|
437
|
+
} else {
|
|
438
|
+
const delta = add + del;
|
|
439
|
+
const counts = chalk2.green("+" + add) + " " + chalk2.red("-" + del);
|
|
440
|
+
line += counts.padEnd(12);
|
|
441
|
+
if (delta > 0) {
|
|
442
|
+
const barLen = Math.max(1, Math.round(delta / maxDelta * BAR_WIDTH));
|
|
443
|
+
const addPortion = Math.min(barLen, Math.round(barLen * (add / (delta || 1))));
|
|
444
|
+
const delPortion = barLen - addPortion;
|
|
445
|
+
const bar = chalk2.green("+".repeat(addPortion)) + chalk2.red("-".repeat(delPortion));
|
|
446
|
+
line += " " + bar;
|
|
447
|
+
}
|
|
448
448
|
}
|
|
449
449
|
borderLine(line);
|
|
450
450
|
});
|
|
@@ -508,14 +508,10 @@ async function runSplit(config, desired) {
|
|
|
508
508
|
borderLine();
|
|
509
509
|
const { ok } = await inquirer2.prompt([
|
|
510
510
|
{
|
|
511
|
-
type: "
|
|
511
|
+
type: "confirm",
|
|
512
512
|
name: "ok",
|
|
513
513
|
message: "Use the commits?",
|
|
514
|
-
|
|
515
|
-
{ name: "Yes", value: true },
|
|
516
|
-
{ name: "No", value: false }
|
|
517
|
-
],
|
|
518
|
-
default: 0
|
|
514
|
+
default: true
|
|
519
515
|
}
|
|
520
516
|
]);
|
|
521
517
|
if (!ok) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kud/ai-conventional-commit-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
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": {
|
|
@@ -22,33 +22,33 @@
|
|
|
22
22
|
"commit": "cz"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@commitlint/config-conventional": "^
|
|
25
|
+
"@commitlint/config-conventional": "^20.0.0",
|
|
26
26
|
"chalk": "^5.6.2",
|
|
27
27
|
"clipanion": "^3.2.1",
|
|
28
28
|
"cosmiconfig": "^9.0.0",
|
|
29
29
|
"execa": "^9.6.0",
|
|
30
30
|
"fast-glob": "^3.3.3",
|
|
31
|
-
"inquirer": "^
|
|
32
|
-
"keyv": "^5.5.
|
|
33
|
-
"lru-cache": "^11.2.
|
|
34
|
-
"ora": "^
|
|
31
|
+
"inquirer": "^13.0.1",
|
|
32
|
+
"keyv": "^5.5.4",
|
|
33
|
+
"lru-cache": "^11.2.2",
|
|
34
|
+
"ora": "^9.0.0",
|
|
35
35
|
"pathe": "^2.0.3",
|
|
36
|
-
"simple-git": "^3.
|
|
36
|
+
"simple-git": "^3.30.0",
|
|
37
37
|
"strip-ansi": "^7.1.2",
|
|
38
|
-
"zod": "^4.1.
|
|
38
|
+
"zod": "^4.1.12"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@types/inquirer": "^9.0.9",
|
|
42
|
-
"@types/node": "^24.
|
|
43
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
44
|
-
"@typescript-eslint/parser": "^8.
|
|
42
|
+
"@types/node": "^24.10.1",
|
|
43
|
+
"@typescript-eslint/eslint-plugin": "^8.47.0",
|
|
44
|
+
"@typescript-eslint/parser": "^8.47.0",
|
|
45
45
|
"cz-conventional-changelog": "^3.3.0",
|
|
46
|
-
"eslint": "^9.
|
|
46
|
+
"eslint": "^9.39.1",
|
|
47
47
|
"prettier": "^3.6.2",
|
|
48
|
-
"tsup": "^8.5.
|
|
49
|
-
"tsx": "^4.20.
|
|
50
|
-
"typescript": "^5.9.
|
|
51
|
-
"vitest": "^
|
|
48
|
+
"tsup": "^8.5.1",
|
|
49
|
+
"tsx": "^4.20.6",
|
|
50
|
+
"typescript": "^5.9.3",
|
|
51
|
+
"vitest": "^4.0.10"
|
|
52
52
|
},
|
|
53
53
|
"config": {
|
|
54
54
|
"commitizen": {
|