@quikcommit/cli 12.0.0 → 12.1.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 +8 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -11193,7 +11193,8 @@ async function runBranch(opts) {
|
|
|
11193
11193
|
"No staged changes detected. Stage with `git add`, or provide -m '<description>'."
|
|
11194
11194
|
);
|
|
11195
11195
|
}
|
|
11196
|
-
|
|
11196
|
+
const rawDiff = getStagedDiff(config2.excludes ?? []);
|
|
11197
|
+
payload.diff = preprocessDiff(rawDiff).processedDiff;
|
|
11197
11198
|
payload.changes = getStagedFiles();
|
|
11198
11199
|
}
|
|
11199
11200
|
const apiKey = opts.apiKey ?? getApiKey();
|
|
@@ -11260,6 +11261,7 @@ var init_branch2 = __esm({
|
|
|
11260
11261
|
init_branch_rescue();
|
|
11261
11262
|
init_protected_branch_guard();
|
|
11262
11263
|
init_git();
|
|
11264
|
+
init_smart_diff();
|
|
11263
11265
|
init_branch_name();
|
|
11264
11266
|
init_commit_helpers();
|
|
11265
11267
|
init_ui();
|
|
@@ -11647,12 +11649,13 @@ async function runBranchGuard(args, log) {
|
|
|
11647
11649
|
let stagedDiff = "";
|
|
11648
11650
|
let stagedChanges = "";
|
|
11649
11651
|
if (state.mode === "uncommitted") {
|
|
11650
|
-
|
|
11652
|
+
let rawDiff = getStagedDiff(args.excludes ?? []);
|
|
11651
11653
|
stagedChanges = getStagedFiles();
|
|
11652
|
-
if (!
|
|
11653
|
-
|
|
11654
|
+
if (!rawDiff.trim()) {
|
|
11655
|
+
rawDiff = getWorkingTreeDiff(args.excludes ?? []);
|
|
11654
11656
|
stagedChanges = getAllChangedFiles();
|
|
11655
11657
|
}
|
|
11658
|
+
stagedDiff = preprocessDiff(rawDiff).processedDiff;
|
|
11656
11659
|
}
|
|
11657
11660
|
const recentCommits = state.mode === "rescue" ? getRecentBranchCommits(state.commitsAhead) : void 0;
|
|
11658
11661
|
const branchRules = args.branchRules ?? (config2.branch?.generation?.types && config2.branch.generation.types.length > 0 ? { types: [...config2.branch.generation.types] } : void 0);
|
|
@@ -11779,6 +11782,7 @@ var init_branch_guard = __esm({
|
|
|
11779
11782
|
import_promises2 = __toESM(require("node:readline/promises"));
|
|
11780
11783
|
init_api();
|
|
11781
11784
|
init_git();
|
|
11785
|
+
init_smart_diff();
|
|
11782
11786
|
init_protected_branch_guard();
|
|
11783
11787
|
init_branch_rescue();
|
|
11784
11788
|
init_branch_name();
|