@scolladon/tsgit 2.0.1 → 3.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.
Files changed (154) hide show
  1. package/README.md +14 -2
  2. package/dist/cjs/adapters/browser/index.cjs +1 -2
  3. package/dist/cjs/adapters/memory/index.cjs +1 -2
  4. package/dist/cjs/adapters/node/index.cjs +1 -2
  5. package/dist/cjs/chunks/adapter-detect-DW9fsw9d.cjs +1 -0
  6. package/dist/cjs/chunks/browser-http-transport-DGwW5YL7.cjs +1 -0
  7. package/dist/cjs/chunks/context-BcoAzPuU.cjs +0 -1
  8. package/dist/cjs/chunks/error-CfLWDui_.cjs +1 -0
  9. package/dist/cjs/chunks/index-Cy44GVR6.cjs +1 -0
  10. package/dist/cjs/chunks/inflate-CmCtM4-w.cjs +1 -0
  11. package/dist/cjs/chunks/lru-cache-1OU7JhD8.cjs +0 -1
  12. package/dist/cjs/chunks/memory-http-transport-CGriODcQ.cjs +1 -0
  13. package/dist/cjs/chunks/node-ssh-transport-PFu3ijfp.cjs +1 -0
  14. package/dist/cjs/chunks/{progress-CxU62NC1.cjs → progress-D8Dqbftk.cjs} +1 -2
  15. package/dist/cjs/chunks/readable-stream-MTA6D0Zh.cjs +0 -1
  16. package/dist/cjs/chunks/repository-Ci-BBxk0.cjs +1 -0
  17. package/dist/cjs/chunks/write-sparse-checkout-C1dsHCAD.cjs +1 -0
  18. package/dist/cjs/commands/index.cjs +1 -2
  19. package/dist/cjs/index.browser.cjs +1 -2
  20. package/dist/cjs/index.cjs +1 -2
  21. package/dist/cjs/index.default.cjs +1 -2
  22. package/dist/cjs/index.node.cjs +1 -2
  23. package/dist/cjs/operators/index.cjs +0 -1
  24. package/dist/cjs/primitives/index.cjs +1 -2
  25. package/dist/cjs/transport/index.cjs +0 -1
  26. package/dist/esm/adapters/browser/index.js +1 -2
  27. package/dist/esm/adapters/memory/index.js +1 -2
  28. package/dist/esm/adapters/node/index.js +1 -2
  29. package/dist/esm/chunks/adapter-detect-BkCMnjrI.js +1 -0
  30. package/dist/esm/chunks/browser-http-transport-CSxAte5h.js +1 -0
  31. package/dist/esm/chunks/context-CumKOV7K.js +0 -1
  32. package/dist/esm/chunks/error-BotOd-nD.js +1 -0
  33. package/dist/esm/chunks/index-DsvINN8n.js +1 -0
  34. package/dist/esm/chunks/inflate-BCIXqeeE.js +1 -0
  35. package/dist/esm/chunks/lru-cache-Cy7C7Lx2.js +0 -1
  36. package/dist/esm/chunks/memory-http-transport-caqmMGR1.js +1 -0
  37. package/dist/esm/chunks/node-ssh-transport-BgSv2IhT.js +1 -0
  38. package/dist/esm/chunks/{progress-BZobfl7p.js → progress-B_AJnOHx.js} +1 -2
  39. package/dist/esm/chunks/readable-stream-CGuf8k1J.js +0 -1
  40. package/dist/esm/chunks/repository-DyxknzvE.js +1 -0
  41. package/dist/esm/chunks/write-sparse-checkout-BwHbNKNS.js +1 -0
  42. package/dist/esm/commands/index.js +1 -2
  43. package/dist/esm/index.browser.js +1 -2
  44. package/dist/esm/index.default.js +1 -2
  45. package/dist/esm/index.js +1 -2
  46. package/dist/esm/index.node.js +1 -2
  47. package/dist/esm/operators/index.js +0 -1
  48. package/dist/esm/primitives/index.js +1 -2
  49. package/dist/esm/transport/index.js +0 -1
  50. package/dist/types/adapters/browser/index.d.cts +5 -3
  51. package/dist/types/adapters/browser/index.d.ts +5 -3
  52. package/dist/types/adapters/memory/index.d.cts +31 -4
  53. package/dist/types/adapters/memory/index.d.ts +31 -4
  54. package/dist/types/adapters/node/index.d.cts +146 -40
  55. package/dist/types/adapters/node/index.d.ts +146 -40
  56. package/dist/types/chunks/{context-YDw6qicq.d.cts → context-CF1YF2S8.d.cts} +165 -6
  57. package/dist/types/chunks/{context-CCL0_F8R.d.ts → context-sIhhtk2u.d.ts} +165 -6
  58. package/dist/types/chunks/{http-transport--_NdQOiw.d.cts → http-transport-DirKfK2S.d.cts} +1 -1
  59. package/dist/types/chunks/{http-transport--_NdQOiw.d.ts → http-transport-DirKfK2S.d.ts} +1 -1
  60. package/dist/types/chunks/index-B5Dps3fg.d.ts +2468 -0
  61. package/dist/types/chunks/index-B_A8VLaf.d.ts +1221 -0
  62. package/dist/types/chunks/index-Dfh8cvEs.d.cts +2468 -0
  63. package/dist/types/chunks/index-Dqxddhav.d.cts +1221 -0
  64. package/dist/types/chunks/progress-BjAKfkam.d.ts +1217 -0
  65. package/dist/types/chunks/progress-Ldnfb8st.d.cts +1217 -0
  66. package/dist/types/chunks/reflog-entry-Cqh3QrPH.d.ts +697 -0
  67. package/dist/types/chunks/reflog-entry-Dy-O27Dd.d.cts +697 -0
  68. package/dist/types/chunks/{repository-FoS_Laoy.d.ts → repository-D8QBTkEz.d.ts} +58 -20
  69. package/dist/types/chunks/{repository-BeifCqp0.d.cts → repository-D9YrVhcH.d.cts} +58 -20
  70. package/dist/types/commands/index.d.cts +4 -1259
  71. package/dist/types/commands/index.d.ts +4 -1259
  72. package/dist/types/index.browser.d.cts +7 -8
  73. package/dist/types/index.browser.d.ts +7 -8
  74. package/dist/types/index.d.cts +61 -124
  75. package/dist/types/index.d.ts +61 -124
  76. package/dist/types/index.default.d.cts +7 -8
  77. package/dist/types/index.default.d.ts +7 -8
  78. package/dist/types/index.node.d.cts +7 -8
  79. package/dist/types/index.node.d.ts +7 -8
  80. package/dist/types/primitives/index.d.cts +4 -692
  81. package/dist/types/primitives/index.d.ts +4 -692
  82. package/dist/types/transport/index.d.cts +1 -1
  83. package/dist/types/transport/index.d.ts +1 -1
  84. package/package.json +94 -28
  85. package/dist/cjs/adapters/browser/index.cjs.map +0 -1
  86. package/dist/cjs/adapters/memory/index.cjs.map +0 -1
  87. package/dist/cjs/adapters/node/index.cjs.map +0 -1
  88. package/dist/cjs/chunks/adapter-detect-CD_LcgaH.cjs +0 -2
  89. package/dist/cjs/chunks/adapter-detect-CD_LcgaH.cjs.map +0 -1
  90. package/dist/cjs/chunks/browser-http-transport-CiMRqtDS.cjs +0 -2
  91. package/dist/cjs/chunks/browser-http-transport-CiMRqtDS.cjs.map +0 -1
  92. package/dist/cjs/chunks/context-BcoAzPuU.cjs.map +0 -1
  93. package/dist/cjs/chunks/error-CfjFO3x_.cjs +0 -2
  94. package/dist/cjs/chunks/error-CfjFO3x_.cjs.map +0 -1
  95. package/dist/cjs/chunks/index-BWCq_5BJ.cjs +0 -2
  96. package/dist/cjs/chunks/index-BWCq_5BJ.cjs.map +0 -1
  97. package/dist/cjs/chunks/lru-cache-1OU7JhD8.cjs.map +0 -1
  98. package/dist/cjs/chunks/memory-http-transport-BVL6VgB-.cjs +0 -2
  99. package/dist/cjs/chunks/memory-http-transport-BVL6VgB-.cjs.map +0 -1
  100. package/dist/cjs/chunks/node-http-transport-BvfVcf02.cjs +0 -2
  101. package/dist/cjs/chunks/node-http-transport-BvfVcf02.cjs.map +0 -1
  102. package/dist/cjs/chunks/progress-CxU62NC1.cjs.map +0 -1
  103. package/dist/cjs/chunks/readable-stream-MTA6D0Zh.cjs.map +0 -1
  104. package/dist/cjs/chunks/repository-BEg2zNtx.cjs +0 -2
  105. package/dist/cjs/chunks/repository-BEg2zNtx.cjs.map +0 -1
  106. package/dist/cjs/chunks/walk-submodules-D2Sp7JEB.cjs +0 -2
  107. package/dist/cjs/chunks/walk-submodules-D2Sp7JEB.cjs.map +0 -1
  108. package/dist/cjs/commands/index.cjs.map +0 -1
  109. package/dist/cjs/index.browser.cjs.map +0 -1
  110. package/dist/cjs/index.cjs.map +0 -1
  111. package/dist/cjs/index.default.cjs.map +0 -1
  112. package/dist/cjs/index.node.cjs.map +0 -1
  113. package/dist/cjs/operators/index.cjs.map +0 -1
  114. package/dist/cjs/primitives/index.cjs.map +0 -1
  115. package/dist/cjs/transport/index.cjs.map +0 -1
  116. package/dist/esm/adapters/browser/index.js.map +0 -1
  117. package/dist/esm/adapters/memory/index.js.map +0 -1
  118. package/dist/esm/adapters/node/index.js.map +0 -1
  119. package/dist/esm/chunks/adapter-detect-DkZhhUhd.js +0 -2
  120. package/dist/esm/chunks/adapter-detect-DkZhhUhd.js.map +0 -1
  121. package/dist/esm/chunks/browser-http-transport-4rJkHcQu.js +0 -2
  122. package/dist/esm/chunks/browser-http-transport-4rJkHcQu.js.map +0 -1
  123. package/dist/esm/chunks/context-CumKOV7K.js.map +0 -1
  124. package/dist/esm/chunks/error-Dc-SRSJK.js +0 -2
  125. package/dist/esm/chunks/error-Dc-SRSJK.js.map +0 -1
  126. package/dist/esm/chunks/index-jH0UMhh-.js +0 -2
  127. package/dist/esm/chunks/index-jH0UMhh-.js.map +0 -1
  128. package/dist/esm/chunks/lru-cache-Cy7C7Lx2.js.map +0 -1
  129. package/dist/esm/chunks/memory-http-transport-CA1WxWBp.js +0 -2
  130. package/dist/esm/chunks/memory-http-transport-CA1WxWBp.js.map +0 -1
  131. package/dist/esm/chunks/node-http-transport-DPa2lK3T.js +0 -2
  132. package/dist/esm/chunks/node-http-transport-DPa2lK3T.js.map +0 -1
  133. package/dist/esm/chunks/progress-BZobfl7p.js.map +0 -1
  134. package/dist/esm/chunks/readable-stream-CGuf8k1J.js.map +0 -1
  135. package/dist/esm/chunks/repository-DF6ePd1x.js +0 -2
  136. package/dist/esm/chunks/repository-DF6ePd1x.js.map +0 -1
  137. package/dist/esm/chunks/walk-submodules-Dq9oGwP8.js +0 -2
  138. package/dist/esm/chunks/walk-submodules-Dq9oGwP8.js.map +0 -1
  139. package/dist/esm/commands/index.js.map +0 -1
  140. package/dist/esm/index.browser.js.map +0 -1
  141. package/dist/esm/index.default.js.map +0 -1
  142. package/dist/esm/index.js.map +0 -1
  143. package/dist/esm/index.node.js.map +0 -1
  144. package/dist/esm/operators/index.js.map +0 -1
  145. package/dist/esm/primitives/index.js.map +0 -1
  146. package/dist/esm/transport/index.js.map +0 -1
  147. package/dist/types/chunks/index-entry-DtEbVpOG.d.cts +0 -47
  148. package/dist/types/chunks/index-entry-UD4dvtKh.d.ts +0 -47
  149. package/dist/types/chunks/progress-7KKiXXfX.d.ts +0 -405
  150. package/dist/types/chunks/progress-By8yFaUE.d.cts +0 -405
  151. package/dist/types/chunks/reflog-entry-BbNnXCTC.d.cts +0 -368
  152. package/dist/types/chunks/reflog-entry-CSzjnZd4.d.ts +0 -368
  153. package/dist/types/chunks/write-tree-C3oNxOlX.d.cts +0 -196
  154. package/dist/types/chunks/write-tree-DRI-LzSr.d.ts +0 -196
@@ -1,9 +1,9 @@
1
- import { abortMerge, add, BranchNamespace, catFile, checkout, CherryPickNamespace, clone, commit, ConfigNamespace, continueMerge, DiffOptions, PatchResult, fetch, fetchMissing, init, log, merge, mv, pull, push, RebaseNamespace, reflog, RemoteNamespace, reset, RevertNamespace, revParse, rm, SparseCheckoutNamespace, StashNamespace, status, submodules, TagNamespace } from '../commands/index.js';
2
- import { F as FileSystem, H as HashService, C as Compressor, R as RepositoryConfig, L as Logger, P as ProgressReporter, a as HookRunner, b as Context } from './context-CCL0_F8R.js';
3
- import { c as catFileBatch, a as createCommit, d as diffTrees, g as getRepoRoot, h as hashBlob, i as isIgnored, m as mergeBase, r as readBlob, b as readIndex, e as readObject, f as readTree, j as recordRefUpdate, k as resolveRef, l as runHook, s as setEntryFlags, n as stageEntry, u as unstageEntry, o as updateRef, w as walkCommits, p as walkSubmodules, q as walkTree, t as walkWorkingTree, v as writeObject, x as writeSymbolicRef, y as writeTree } from './write-tree-DRI-LzSr.js';
4
- import { H as HttpTransport } from './http-transport--_NdQOiw.js';
5
- import { T as TreeDiff } from './reflog-entry-CSzjnZd4.js';
6
- import { S as SnapshotFactory } from './progress-7KKiXXfX.js';
1
+ import { a3 as StatTreeDiff, a8 as TreeDiff } from './reflog-entry-Cqh3QrPH.js';
2
+ import { g as FileSystem, h as HashService, a as Compressor, p as RepositoryConfig, L as Logger, P as ProgressReporter, m as HookRunner, C as CommandRunner, c as Context } from './context-sIhhtk2u.js';
3
+ import { d1 as add, d2 as archive, dh as blame, p as BranchNamespace, x as BundleNamespace, dr as catFile, ds as checkout, P as CherryPickNamespace, dy as clone, dz as commit, a5 as ConfigNamespace, ah as DescribeOptions, b1 as NameRevResult, ai as DescribeResult, aj as DiffOptions, dP as fetch, dQ as fetchMissing, dR as fsck, dS as grep, dU as init, dW as log, aU as MergeNamespace, d_ as mv, d$ as nameRev, b7 as NotesNamespace, e4 as pull, e5 as push, e7 as readFileAt, e6 as rangeDiff, bq as RebaseNamespace, ed as reflog, bB as RemoteNamespace, ek as reset, bQ as RevertNamespace, el as revParse, eq as rm, er as shortlog, c1 as ShowOptions, c2 as ShowResult, ca as SparseCheckoutNamespace, ck as StashNamespace, eF as status, cA as SubmoduleNamespace, cN as TagNamespace, eP as whatchanged, cZ as WorktreeNamespace } from './index-B5Dps3fg.js';
4
+ import { y as bisectMidpoint, J as catFileBatch, Q as createCommit, U as diffTrees, a3 as getRepoRoot, a5 as hashBlob, a8 as isIgnored, af as mergeBase, ah as readBlob, al as readIndex, am as readObject, aq as readTree, av as resolveRef, ay as runHook, aF as streamBlob, aL as updateRef, aN as walkCommits, aO as walkCommitsByDate, aP as walkSubmodules, aQ as walkTree, aR as walkWorkingTree, aT as writeObject, aW as writeTree } from './index-B_A8VLaf.js';
5
+ import { o as SnapshotFactory } from './progress-BjAKfkam.js';
6
+ import { b as HttpTransport } from './http-transport-DirKfK2S.js';
7
7
 
8
8
  /**
9
9
  * Helper that strips the leading `Context` parameter from a function type so
@@ -41,6 +41,17 @@ interface OpenRepositoryOptions {
41
41
  * holds. Pass `false` when operating on a repository you do not trust.
42
42
  */
43
43
  readonly hooks?: HookRunner | false;
44
+ /**
45
+ * Custom merge-driver command runner. Omit to inherit the runtime default
46
+ * (Node wires one; the browser does not). Pass `false` to disable external
47
+ * merge drivers — a configured `[merge "<driver>"].driver` then falls back to
48
+ * the built-in merge.
49
+ *
50
+ * WARNING: a wired runner executes the `driver` shell command from
51
+ * `.git/config`, inheriting the calling process's environment. Pass `false`
52
+ * when operating on a repository whose config you do not trust.
53
+ */
54
+ readonly command?: CommandRunner | false;
44
55
  /**
45
56
  * Opt OUT of adapter validator wrapping for `fs` and `transport`. NEVER set
46
57
  * with adapters whose code you do not control; a raw transport receives
@@ -54,10 +65,13 @@ interface OpenRepositoryOptions {
54
65
  * users never see Context except through `repo.ctx`.
55
66
  */
56
67
  interface Repository {
57
- readonly abortMerge: BindCtx<typeof abortMerge>;
58
68
  readonly add: BindCtx<typeof add>;
69
+ readonly archive: BindCtx<typeof archive>;
70
+ readonly blame: BindCtx<typeof blame>;
59
71
  /** Nested `repo.branch.{list,create,delete,rename}` namespace. */
60
72
  readonly branch: BranchNamespace;
73
+ /** Nested `repo.bundle.{create,verify,listHeads}` namespace. */
74
+ readonly bundle: BundleNamespace;
61
75
  readonly catFile: BindCtx<typeof catFile>;
62
76
  readonly checkout: BindCtx<typeof checkout>;
63
77
  /** Nested `repo.cherryPick.{run,continue,skip,abort}` namespace. */
@@ -66,23 +80,34 @@ interface Repository {
66
80
  readonly commit: BindCtx<typeof commit>;
67
81
  /** Nested `repo.config.{get,set,unset,unsetAll,getAll,getRegexp,list,renameSection,removeSection}` (ADR-181). */
68
82
  readonly config: ConfigNamespace;
69
- readonly continueMerge: BindCtx<typeof continueMerge>;
83
+ readonly describe: {
84
+ (rev: string | undefined, opts: DescribeOptions & {
85
+ contains: true;
86
+ }): Promise<NameRevResult>;
87
+ (rev?: string, opts?: DescribeOptions): Promise<DescribeResult>;
88
+ };
70
89
  readonly diff: {
71
- (opts?: DiffOptions & {
72
- format?: 'tree';
73
- }): Promise<TreeDiff>;
74
90
  (opts: DiffOptions & {
75
- format: 'patch';
76
- }): Promise<PatchResult>;
91
+ withStat: true;
92
+ }): Promise<StatTreeDiff>;
93
+ (opts?: DiffOptions): Promise<TreeDiff>;
77
94
  };
78
95
  readonly fetch: BindCtx<typeof fetch>;
79
96
  readonly fetchMissing: BindCtx<typeof fetchMissing>;
97
+ readonly fsck: BindCtx<typeof fsck>;
98
+ readonly grep: BindCtx<typeof grep>;
80
99
  readonly init: BindCtx<typeof init>;
81
100
  readonly log: BindCtx<typeof log>;
82
- readonly merge: BindCtx<typeof merge>;
101
+ /** Nested `repo.merge.{run,continue,abort}` namespace. */
102
+ readonly merge: MergeNamespace;
83
103
  readonly mv: BindCtx<typeof mv>;
104
+ readonly nameRev: BindCtx<typeof nameRev>;
105
+ /** Nested `repo.notes.{add,read,list,remove}` namespace. */
106
+ readonly notes: NotesNamespace;
84
107
  readonly pull: BindCtx<typeof pull>;
85
108
  readonly push: BindCtx<typeof push>;
109
+ readonly readFileAt: BindCtx<typeof readFileAt>;
110
+ readonly rangeDiff: BindCtx<typeof rangeDiff>;
86
111
  /** Nested `repo.rebase.{run,continue,skip,abort}` namespace. */
87
112
  readonly rebase: RebaseNamespace;
88
113
  readonly reflog: BindCtx<typeof reflog>;
@@ -93,15 +118,31 @@ interface Repository {
93
118
  readonly revert: RevertNamespace;
94
119
  readonly revParse: BindCtx<typeof revParse>;
95
120
  readonly rm: BindCtx<typeof rm>;
121
+ readonly shortlog: BindCtx<typeof shortlog>;
122
+ readonly show: {
123
+ (rev: ReadonlyArray<string>, opts: ShowOptions & {
124
+ withStat: true;
125
+ }): Promise<ReadonlyArray<ShowResult<StatTreeDiff>>>;
126
+ (rev: string | undefined, opts: ShowOptions & {
127
+ withStat: true;
128
+ }): Promise<ShowResult<StatTreeDiff>>;
129
+ (rev: ReadonlyArray<string>, opts?: ShowOptions): Promise<ReadonlyArray<ShowResult>>;
130
+ (rev?: string, opts?: ShowOptions): Promise<ShowResult>;
131
+ };
96
132
  /** Nested `repo.sparseCheckout.{list,set,add,reapply,disable}` namespace. */
97
133
  readonly sparseCheckout: SparseCheckoutNamespace;
98
134
  /** Nested `repo.stash.{push,list,apply,pop,drop}` namespace. */
99
135
  readonly stash: StashNamespace;
100
136
  readonly status: BindCtx<typeof status>;
101
- readonly submodules: BindCtx<typeof submodules>;
137
+ /** Nested `repo.submodule.{list,add,init,update,sync,deinit}` namespace. */
138
+ readonly submodule: SubmoduleNamespace;
102
139
  /** Nested `repo.tag.{list,create,delete}` namespace. */
103
140
  readonly tag: TagNamespace;
141
+ readonly whatchanged: BindCtx<typeof whatchanged>;
142
+ /** Nested `repo.worktree.{list,add,move,remove}` namespace. */
143
+ readonly worktree: WorktreeNamespace;
104
144
  readonly primitives: {
145
+ readonly bisectMidpoint: BindCtx<typeof bisectMidpoint>;
105
146
  readonly catFileBatch: BindCtx<typeof catFileBatch>;
106
147
  readonly createCommit: BindCtx<typeof createCommit>;
107
148
  readonly diffTrees: BindCtx<typeof diffTrees>;
@@ -113,19 +154,16 @@ interface Repository {
113
154
  readonly readIndex: BindCtx<typeof readIndex>;
114
155
  readonly readObject: BindCtx<typeof readObject>;
115
156
  readonly readTree: BindCtx<typeof readTree>;
116
- readonly recordRefUpdate: BindCtx<typeof recordRefUpdate>;
117
157
  readonly resolveRef: BindCtx<typeof resolveRef>;
118
158
  readonly runHook: BindCtx<typeof runHook>;
119
- readonly setEntryFlags: BindCtx<typeof setEntryFlags>;
120
- readonly stageEntry: BindCtx<typeof stageEntry>;
121
- readonly unstageEntry: BindCtx<typeof unstageEntry>;
159
+ readonly streamBlob: BindCtx<typeof streamBlob>;
122
160
  readonly updateRef: BindCtx<typeof updateRef>;
123
161
  readonly walkCommits: BindCtx<typeof walkCommits>;
162
+ readonly walkCommitsByDate: BindCtx<typeof walkCommitsByDate>;
124
163
  readonly walkSubmodules: BindCtx<typeof walkSubmodules>;
125
164
  readonly walkTree: BindCtx<typeof walkTree>;
126
165
  readonly walkWorkingTree: BindCtx<typeof walkWorkingTree>;
127
166
  readonly writeObject: BindCtx<typeof writeObject>;
128
- readonly writeSymbolicRef: BindCtx<typeof writeSymbolicRef>;
129
167
  readonly writeTree: BindCtx<typeof writeTree>;
130
168
  };
131
169
  /**
@@ -1,9 +1,9 @@
1
- import { abortMerge, add, BranchNamespace, catFile, checkout, CherryPickNamespace, clone, commit, ConfigNamespace, continueMerge, DiffOptions, PatchResult, fetch, fetchMissing, init, log, merge, mv, pull, push, RebaseNamespace, reflog, RemoteNamespace, reset, RevertNamespace, revParse, rm, SparseCheckoutNamespace, StashNamespace, status, submodules, TagNamespace } from '../commands/index.cjs';
2
- import { F as FileSystem, H as HashService, C as Compressor, R as RepositoryConfig, L as Logger, P as ProgressReporter, a as HookRunner, b as Context } from './context-YDw6qicq.cjs';
3
- import { c as catFileBatch, a as createCommit, d as diffTrees, g as getRepoRoot, h as hashBlob, i as isIgnored, m as mergeBase, r as readBlob, b as readIndex, e as readObject, f as readTree, j as recordRefUpdate, k as resolveRef, l as runHook, s as setEntryFlags, n as stageEntry, u as unstageEntry, o as updateRef, w as walkCommits, p as walkSubmodules, q as walkTree, t as walkWorkingTree, v as writeObject, x as writeSymbolicRef, y as writeTree } from './write-tree-C3oNxOlX.cjs';
4
- import { H as HttpTransport } from './http-transport--_NdQOiw.cjs';
5
- import { T as TreeDiff } from './reflog-entry-BbNnXCTC.cjs';
6
- import { S as SnapshotFactory } from './progress-By8yFaUE.cjs';
1
+ import { a3 as StatTreeDiff, a8 as TreeDiff } from './reflog-entry-Dy-O27Dd.cjs';
2
+ import { g as FileSystem, h as HashService, a as Compressor, p as RepositoryConfig, L as Logger, P as ProgressReporter, m as HookRunner, C as CommandRunner, c as Context } from './context-CF1YF2S8.cjs';
3
+ import { d1 as add, d2 as archive, dh as blame, p as BranchNamespace, x as BundleNamespace, dr as catFile, ds as checkout, P as CherryPickNamespace, dy as clone, dz as commit, a5 as ConfigNamespace, ah as DescribeOptions, b1 as NameRevResult, ai as DescribeResult, aj as DiffOptions, dP as fetch, dQ as fetchMissing, dR as fsck, dS as grep, dU as init, dW as log, aU as MergeNamespace, d_ as mv, d$ as nameRev, b7 as NotesNamespace, e4 as pull, e5 as push, e7 as readFileAt, e6 as rangeDiff, bq as RebaseNamespace, ed as reflog, bB as RemoteNamespace, ek as reset, bQ as RevertNamespace, el as revParse, eq as rm, er as shortlog, c1 as ShowOptions, c2 as ShowResult, ca as SparseCheckoutNamespace, ck as StashNamespace, eF as status, cA as SubmoduleNamespace, cN as TagNamespace, eP as whatchanged, cZ as WorktreeNamespace } from './index-Dfh8cvEs.cjs';
4
+ import { y as bisectMidpoint, J as catFileBatch, Q as createCommit, U as diffTrees, a3 as getRepoRoot, a5 as hashBlob, a8 as isIgnored, af as mergeBase, ah as readBlob, al as readIndex, am as readObject, aq as readTree, av as resolveRef, ay as runHook, aF as streamBlob, aL as updateRef, aN as walkCommits, aO as walkCommitsByDate, aP as walkSubmodules, aQ as walkTree, aR as walkWorkingTree, aT as writeObject, aW as writeTree } from './index-Dqxddhav.cjs';
5
+ import { o as SnapshotFactory } from './progress-Ldnfb8st.cjs';
6
+ import { b as HttpTransport } from './http-transport-DirKfK2S.cjs';
7
7
 
8
8
  /**
9
9
  * Helper that strips the leading `Context` parameter from a function type so
@@ -41,6 +41,17 @@ interface OpenRepositoryOptions {
41
41
  * holds. Pass `false` when operating on a repository you do not trust.
42
42
  */
43
43
  readonly hooks?: HookRunner | false;
44
+ /**
45
+ * Custom merge-driver command runner. Omit to inherit the runtime default
46
+ * (Node wires one; the browser does not). Pass `false` to disable external
47
+ * merge drivers — a configured `[merge "<driver>"].driver` then falls back to
48
+ * the built-in merge.
49
+ *
50
+ * WARNING: a wired runner executes the `driver` shell command from
51
+ * `.git/config`, inheriting the calling process's environment. Pass `false`
52
+ * when operating on a repository whose config you do not trust.
53
+ */
54
+ readonly command?: CommandRunner | false;
44
55
  /**
45
56
  * Opt OUT of adapter validator wrapping for `fs` and `transport`. NEVER set
46
57
  * with adapters whose code you do not control; a raw transport receives
@@ -54,10 +65,13 @@ interface OpenRepositoryOptions {
54
65
  * users never see Context except through `repo.ctx`.
55
66
  */
56
67
  interface Repository {
57
- readonly abortMerge: BindCtx<typeof abortMerge>;
58
68
  readonly add: BindCtx<typeof add>;
69
+ readonly archive: BindCtx<typeof archive>;
70
+ readonly blame: BindCtx<typeof blame>;
59
71
  /** Nested `repo.branch.{list,create,delete,rename}` namespace. */
60
72
  readonly branch: BranchNamespace;
73
+ /** Nested `repo.bundle.{create,verify,listHeads}` namespace. */
74
+ readonly bundle: BundleNamespace;
61
75
  readonly catFile: BindCtx<typeof catFile>;
62
76
  readonly checkout: BindCtx<typeof checkout>;
63
77
  /** Nested `repo.cherryPick.{run,continue,skip,abort}` namespace. */
@@ -66,23 +80,34 @@ interface Repository {
66
80
  readonly commit: BindCtx<typeof commit>;
67
81
  /** Nested `repo.config.{get,set,unset,unsetAll,getAll,getRegexp,list,renameSection,removeSection}` (ADR-181). */
68
82
  readonly config: ConfigNamespace;
69
- readonly continueMerge: BindCtx<typeof continueMerge>;
83
+ readonly describe: {
84
+ (rev: string | undefined, opts: DescribeOptions & {
85
+ contains: true;
86
+ }): Promise<NameRevResult>;
87
+ (rev?: string, opts?: DescribeOptions): Promise<DescribeResult>;
88
+ };
70
89
  readonly diff: {
71
- (opts?: DiffOptions & {
72
- format?: 'tree';
73
- }): Promise<TreeDiff>;
74
90
  (opts: DiffOptions & {
75
- format: 'patch';
76
- }): Promise<PatchResult>;
91
+ withStat: true;
92
+ }): Promise<StatTreeDiff>;
93
+ (opts?: DiffOptions): Promise<TreeDiff>;
77
94
  };
78
95
  readonly fetch: BindCtx<typeof fetch>;
79
96
  readonly fetchMissing: BindCtx<typeof fetchMissing>;
97
+ readonly fsck: BindCtx<typeof fsck>;
98
+ readonly grep: BindCtx<typeof grep>;
80
99
  readonly init: BindCtx<typeof init>;
81
100
  readonly log: BindCtx<typeof log>;
82
- readonly merge: BindCtx<typeof merge>;
101
+ /** Nested `repo.merge.{run,continue,abort}` namespace. */
102
+ readonly merge: MergeNamespace;
83
103
  readonly mv: BindCtx<typeof mv>;
104
+ readonly nameRev: BindCtx<typeof nameRev>;
105
+ /** Nested `repo.notes.{add,read,list,remove}` namespace. */
106
+ readonly notes: NotesNamespace;
84
107
  readonly pull: BindCtx<typeof pull>;
85
108
  readonly push: BindCtx<typeof push>;
109
+ readonly readFileAt: BindCtx<typeof readFileAt>;
110
+ readonly rangeDiff: BindCtx<typeof rangeDiff>;
86
111
  /** Nested `repo.rebase.{run,continue,skip,abort}` namespace. */
87
112
  readonly rebase: RebaseNamespace;
88
113
  readonly reflog: BindCtx<typeof reflog>;
@@ -93,15 +118,31 @@ interface Repository {
93
118
  readonly revert: RevertNamespace;
94
119
  readonly revParse: BindCtx<typeof revParse>;
95
120
  readonly rm: BindCtx<typeof rm>;
121
+ readonly shortlog: BindCtx<typeof shortlog>;
122
+ readonly show: {
123
+ (rev: ReadonlyArray<string>, opts: ShowOptions & {
124
+ withStat: true;
125
+ }): Promise<ReadonlyArray<ShowResult<StatTreeDiff>>>;
126
+ (rev: string | undefined, opts: ShowOptions & {
127
+ withStat: true;
128
+ }): Promise<ShowResult<StatTreeDiff>>;
129
+ (rev: ReadonlyArray<string>, opts?: ShowOptions): Promise<ReadonlyArray<ShowResult>>;
130
+ (rev?: string, opts?: ShowOptions): Promise<ShowResult>;
131
+ };
96
132
  /** Nested `repo.sparseCheckout.{list,set,add,reapply,disable}` namespace. */
97
133
  readonly sparseCheckout: SparseCheckoutNamespace;
98
134
  /** Nested `repo.stash.{push,list,apply,pop,drop}` namespace. */
99
135
  readonly stash: StashNamespace;
100
136
  readonly status: BindCtx<typeof status>;
101
- readonly submodules: BindCtx<typeof submodules>;
137
+ /** Nested `repo.submodule.{list,add,init,update,sync,deinit}` namespace. */
138
+ readonly submodule: SubmoduleNamespace;
102
139
  /** Nested `repo.tag.{list,create,delete}` namespace. */
103
140
  readonly tag: TagNamespace;
141
+ readonly whatchanged: BindCtx<typeof whatchanged>;
142
+ /** Nested `repo.worktree.{list,add,move,remove}` namespace. */
143
+ readonly worktree: WorktreeNamespace;
104
144
  readonly primitives: {
145
+ readonly bisectMidpoint: BindCtx<typeof bisectMidpoint>;
105
146
  readonly catFileBatch: BindCtx<typeof catFileBatch>;
106
147
  readonly createCommit: BindCtx<typeof createCommit>;
107
148
  readonly diffTrees: BindCtx<typeof diffTrees>;
@@ -113,19 +154,16 @@ interface Repository {
113
154
  readonly readIndex: BindCtx<typeof readIndex>;
114
155
  readonly readObject: BindCtx<typeof readObject>;
115
156
  readonly readTree: BindCtx<typeof readTree>;
116
- readonly recordRefUpdate: BindCtx<typeof recordRefUpdate>;
117
157
  readonly resolveRef: BindCtx<typeof resolveRef>;
118
158
  readonly runHook: BindCtx<typeof runHook>;
119
- readonly setEntryFlags: BindCtx<typeof setEntryFlags>;
120
- readonly stageEntry: BindCtx<typeof stageEntry>;
121
- readonly unstageEntry: BindCtx<typeof unstageEntry>;
159
+ readonly streamBlob: BindCtx<typeof streamBlob>;
122
160
  readonly updateRef: BindCtx<typeof updateRef>;
123
161
  readonly walkCommits: BindCtx<typeof walkCommits>;
162
+ readonly walkCommitsByDate: BindCtx<typeof walkCommitsByDate>;
124
163
  readonly walkSubmodules: BindCtx<typeof walkSubmodules>;
125
164
  readonly walkTree: BindCtx<typeof walkTree>;
126
165
  readonly walkWorkingTree: BindCtx<typeof walkWorkingTree>;
127
166
  readonly writeObject: BindCtx<typeof writeObject>;
128
- readonly writeSymbolicRef: BindCtx<typeof writeSymbolicRef>;
129
167
  readonly writeTree: BindCtx<typeof writeTree>;
130
168
  };
131
169
  /**