diffprism 0.48.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.
@@ -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
  };
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  ensureServer,
3
3
  submitReviewToServer
4
- } from "./chunk-EPUCA2N5.js";
4
+ } from "./chunk-CU2BAL6Q.js";
5
5
  import {
6
6
  parseDiff
7
- } from "./chunk-QGWYCEJN.js";
7
+ } from "./chunk-3GMPE2ZR.js";
8
8
  import {
9
9
  analyze
10
10
  } from "./chunk-DHCVZGHE.js";