diffprism 0.49.0 → 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/README.md +60 -20
- package/dist/bin.js +457 -358
- package/dist/{chunk-QGWYCEJN.js → chunk-3GMPE2ZR.js} +13 -0
- package/dist/{chunk-7UQM4WBZ.js → chunk-CJ6LV2XV.js} +2 -2
- package/dist/{chunk-EPUCA2N5.js → chunk-CU2BAL6Q.js} +704 -287
- package/dist/{chunk-24B33UN6.js → chunk-EPU4F7WT.js} +6 -56
- package/dist/{demo-VPKUCZT3.js → demo-X5LWQDVU.js} +3 -3
- package/dist/mcp-server.js +432 -963
- package/dist/{src-KF5HRJPX.js → src-DNNNQ2RD.js} +2 -2
- package/dist/{src-AMCPIYDZ.js → src-OZQ32NDN.js} +3 -1
- package/package.json +1 -1
- package/ui-dist/assets/index-BulxhOr3.css +1 -0
- package/ui-dist/assets/index-Zw97bHGn.js +345 -0
- package/ui-dist/index.html +2 -2
- package/ui-dist/assets/index-DpPy4Hg4.css +0 -1
- package/ui-dist/assets/index-Dt04Ez08.js +0 -335
|
@@ -198,6 +198,18 @@ function getUntrackedDiffs(cwd) {
|
|
|
198
198
|
}
|
|
199
199
|
return result;
|
|
200
200
|
}
|
|
201
|
+
function getRepoRoot(options) {
|
|
202
|
+
const cwd = options?.cwd ?? process.cwd();
|
|
203
|
+
try {
|
|
204
|
+
return execSync("git rev-parse --show-toplevel", {
|
|
205
|
+
cwd,
|
|
206
|
+
encoding: "utf-8",
|
|
207
|
+
stdio: ["pipe", "pipe", "pipe"]
|
|
208
|
+
}).trim();
|
|
209
|
+
} catch {
|
|
210
|
+
return null;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
201
213
|
|
|
202
214
|
// packages/git/src/parser.ts
|
|
203
215
|
import path2 from "path";
|
|
@@ -443,6 +455,7 @@ export {
|
|
|
443
455
|
listBranches,
|
|
444
456
|
listCommits,
|
|
445
457
|
detectWorktree,
|
|
458
|
+
getRepoRoot,
|
|
446
459
|
parseDiff,
|
|
447
460
|
getDiff
|
|
448
461
|
};
|