@kud/ai-conventional-commit-cli 0.8.1 → 0.8.2
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 +9 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -79,7 +79,14 @@ var parseDiffFromRaw = (raw) => {
|
|
|
79
79
|
};
|
|
80
80
|
var parseDiff = async () => {
|
|
81
81
|
const raw = await getStagedDiffRaw();
|
|
82
|
-
|
|
82
|
+
const parsed = parseDiffFromRaw(raw);
|
|
83
|
+
if (parsed.length === 0) {
|
|
84
|
+
const status = await git.status();
|
|
85
|
+
if (status.staged.length) {
|
|
86
|
+
return status.staged.map((f) => ({ file: f, hunks: [], additions: 0, deletions: 0 }));
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
return parsed;
|
|
83
90
|
};
|
|
84
91
|
var getRecentCommitMessages = async (limit) => {
|
|
85
92
|
const log = await git.log({ maxCount: limit });
|
|
@@ -1115,7 +1122,7 @@ async function runRefine(config, options) {
|
|
|
1115
1122
|
// package.json
|
|
1116
1123
|
var package_default = {
|
|
1117
1124
|
name: "@kud/ai-conventional-commit-cli",
|
|
1118
|
-
version: "0.8.
|
|
1125
|
+
version: "0.8.2",
|
|
1119
1126
|
type: "module",
|
|
1120
1127
|
description: "Opinionated, style-aware AI assistant for crafting and splitting git commits (opencode-based, provider-agnostic).",
|
|
1121
1128
|
bin: {
|
package/package.json
CHANGED