@gitkraken/core-gitlens 0.5.116 → 0.7.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 (1915) hide show
  1. package/CHANGELOG.md +32 -1
  2. package/README.md +9 -2
  3. package/dist/_virtual/@oxc-project+runtime/helpers/esm/decorate.js +9 -0
  4. package/dist/_virtual/@oxc-project+runtime/helpers/esm/usingCtx.js +57 -0
  5. package/dist/git/cache.d.ts +297 -297
  6. package/dist/git/cache.js +948 -1276
  7. package/dist/git/cache.js.map +1 -1
  8. package/dist/git/context.d.ts +202 -197
  9. package/dist/git/context.js +12 -8
  10. package/dist/git/context.js.map +1 -1
  11. package/dist/git/errors.d.ts +268 -281
  12. package/dist/git/errors.js +928 -706
  13. package/dist/git/errors.js.map +1 -1
  14. package/dist/git/features.d.ts +3 -2
  15. package/dist/git/features.js +34 -55
  16. package/dist/git/features.js.map +1 -1
  17. package/dist/git/gitHealth.d.ts +88 -81
  18. package/dist/git/gitHealth.js +259 -329
  19. package/dist/git/gitHealth.js.map +1 -1
  20. package/dist/git/models/author.d.ts +12 -10
  21. package/dist/git/models/author.js +0 -2
  22. package/dist/git/models/autolink.d.ts +36 -37
  23. package/dist/git/models/autolink.js +0 -2
  24. package/dist/git/models/blame.d.ts +25 -23
  25. package/dist/git/models/blame.js +0 -2
  26. package/dist/git/models/branch.d.ts +74 -72
  27. package/dist/git/models/branch.js +132 -171
  28. package/dist/git/models/branch.js.map +1 -1
  29. package/dist/git/models/commit.d.ts +135 -133
  30. package/dist/git/models/commit.js +381 -484
  31. package/dist/git/models/commit.js.map +1 -1
  32. package/dist/git/models/contributor.d.ts +30 -29
  33. package/dist/git/models/contributor.js +56 -64
  34. package/dist/git/models/contributor.js.map +1 -1
  35. package/dist/git/models/defaultBranch.d.ts +5 -3
  36. package/dist/git/models/defaultBranch.js +0 -2
  37. package/dist/git/models/diff.d.ts +49 -47
  38. package/dist/git/models/diff.js +0 -2
  39. package/dist/git/models/file.d.ts +20 -18
  40. package/dist/git/models/file.js +0 -2
  41. package/dist/git/models/fileChange.d.ts +45 -43
  42. package/dist/git/models/fileChange.js +60 -66
  43. package/dist/git/models/fileChange.js.map +1 -1
  44. package/dist/git/models/fileStatus.d.ts +25 -23
  45. package/dist/git/models/fileStatus.js +30 -26
  46. package/dist/git/models/fileStatus.js.map +1 -1
  47. package/dist/git/models/graph.d.ts +328 -320
  48. package/dist/git/models/graph.js +31 -27
  49. package/dist/git/models/graph.js.map +1 -1
  50. package/dist/git/models/graphSearch.d.ts +37 -35
  51. package/dist/git/models/graphSearch.js +0 -2
  52. package/dist/git/models/graphSession.d.ts +158 -66
  53. package/dist/git/models/graphSession.js +72 -1
  54. package/dist/git/models/graphSession.js.map +1 -1
  55. package/dist/git/models/issue.d.ts +174 -140
  56. package/dist/git/models/issue.js +86 -84
  57. package/dist/git/models/issue.js.map +1 -1
  58. package/dist/git/models/issueOrPullRequest.d.ts +16 -14
  59. package/dist/git/models/issueOrPullRequest.js +0 -2
  60. package/dist/git/models/lineRange.d.ts +6 -4
  61. package/dist/git/models/lineRange.js +0 -2
  62. package/dist/git/models/log.d.ts +18 -16
  63. package/dist/git/models/log.js +0 -2
  64. package/dist/git/models/mergeConflicts.d.ts +17 -15
  65. package/dist/git/models/mergeConflicts.js +0 -2
  66. package/dist/git/models/patch.d.ts +14 -12
  67. package/dist/git/models/patch.js +0 -2
  68. package/dist/git/models/pausedOperationStatus.d.ts +42 -40
  69. package/dist/git/models/pausedOperationStatus.js +0 -2
  70. package/dist/git/models/pullRequest.d.ts +238 -230
  71. package/dist/git/models/pullRequest.js +151 -163
  72. package/dist/git/models/pullRequest.js.map +1 -1
  73. package/dist/git/models/rebase.d.ts +30 -28
  74. package/dist/git/models/rebase.js +0 -2
  75. package/dist/git/models/reference.d.ts +57 -55
  76. package/dist/git/models/reference.js +0 -2
  77. package/dist/git/models/reflog.d.ts +29 -27
  78. package/dist/git/models/reflog.js +63 -82
  79. package/dist/git/models/reflog.js.map +1 -1
  80. package/dist/git/models/remote.d.ts +34 -32
  81. package/dist/git/models/remote.js +74 -95
  82. package/dist/git/models/remote.js.map +1 -1
  83. package/dist/git/models/remoteProvider.d.ts +86 -84
  84. package/dist/git/models/remoteProvider.js +145 -150
  85. package/dist/git/models/remoteProvider.js.map +1 -1
  86. package/dist/git/models/remoteResource.d.ts +58 -56
  87. package/dist/git/models/remoteResource.js +15 -12
  88. package/dist/git/models/remoteResource.js.map +1 -1
  89. package/dist/git/models/repository.d.ts +144 -142
  90. package/dist/git/models/repository.js +358 -406
  91. package/dist/git/models/repository.js.map +1 -1
  92. package/dist/git/models/repositoryChangeEvent.d.ts +8 -6
  93. package/dist/git/models/repositoryChangeEvent.js +26 -24
  94. package/dist/git/models/repositoryChangeEvent.js.map +1 -1
  95. package/dist/git/models/repositoryIdentities.d.ts +50 -46
  96. package/dist/git/models/repositoryIdentities.js +7 -5
  97. package/dist/git/models/repositoryIdentities.js.map +1 -1
  98. package/dist/git/models/repositoryMetadata.d.ts +9 -7
  99. package/dist/git/models/repositoryMetadata.js +0 -2
  100. package/dist/git/models/resourceDescriptor.d.ts +11 -9
  101. package/dist/git/models/resourceDescriptor.js +0 -2
  102. package/dist/git/models/revision.d.ts +2 -0
  103. package/dist/git/models/revision.js +8 -5
  104. package/dist/git/models/revision.js.map +1 -1
  105. package/dist/git/models/search.d.ts +48 -47
  106. package/dist/git/models/search.js +53 -49
  107. package/dist/git/models/search.js.map +1 -1
  108. package/dist/git/models/shortlog.d.ts +5 -3
  109. package/dist/git/models/shortlog.js +0 -2
  110. package/dist/git/models/signature.d.ts +28 -26
  111. package/dist/git/models/signature.js +0 -2
  112. package/dist/git/models/staging.d.ts +18 -16
  113. package/dist/git/models/staging.js +0 -2
  114. package/dist/git/models/stash.d.ts +5 -3
  115. package/dist/git/models/stash.js +0 -2
  116. package/dist/git/models/status.d.ts +51 -49
  117. package/dist/git/models/status.js +172 -205
  118. package/dist/git/models/status.js.map +1 -1
  119. package/dist/git/models/statusFile.d.ts +35 -34
  120. package/dist/git/models/statusFile.js +112 -125
  121. package/dist/git/models/statusFile.js.map +1 -1
  122. package/dist/git/models/tag.d.ts +34 -32
  123. package/dist/git/models/tag.js +64 -77
  124. package/dist/git/models/tag.js.map +1 -1
  125. package/dist/git/models/tree.d.ts +8 -6
  126. package/dist/git/models/tree.js +0 -2
  127. package/dist/git/models/user.d.ts +6 -4
  128. package/dist/git/models/user.js +0 -2
  129. package/dist/git/models/worktree.d.ts +50 -48
  130. package/dist/git/models/worktree.js +102 -133
  131. package/dist/git/models/worktree.js.map +1 -1
  132. package/dist/git/parsers/diffParser.d.ts +7 -5
  133. package/dist/git/parsers/diffParser.js +438 -587
  134. package/dist/git/parsers/diffParser.js.map +1 -1
  135. package/dist/git/parsers/rebaseTodoParser.d.ts +3 -1
  136. package/dist/git/parsers/rebaseTodoParser.js +165 -208
  137. package/dist/git/parsers/rebaseTodoParser.js.map +1 -1
  138. package/dist/git/providers/blame.d.ts +12 -10
  139. package/dist/git/providers/blame.js +0 -2
  140. package/dist/git/providers/branches.d.ts +96 -94
  141. package/dist/git/providers/branches.js +0 -2
  142. package/dist/git/providers/commits.d.ts +105 -104
  143. package/dist/git/providers/commits.js +0 -2
  144. package/dist/git/providers/config.d.ts +80 -78
  145. package/dist/git/providers/config.js +0 -2
  146. package/dist/git/providers/contributors.d.ts +23 -21
  147. package/dist/git/providers/contributors.js +0 -2
  148. package/dist/git/providers/diff.d.ts +68 -66
  149. package/dist/git/providers/diff.js +0 -2
  150. package/dist/git/providers/graph.d.ts +73 -62
  151. package/dist/git/providers/graph.js +0 -2
  152. package/dist/git/providers/maintenance.d.ts +180 -178
  153. package/dist/git/providers/maintenance.js +0 -20
  154. package/dist/git/providers/operations.d.ts +114 -112
  155. package/dist/git/providers/operations.js +0 -2
  156. package/dist/git/providers/patch.d.ts +26 -24
  157. package/dist/git/providers/patch.js +0 -2
  158. package/dist/git/providers/pausedOperations.d.ts +19 -17
  159. package/dist/git/providers/pausedOperations.js +0 -2
  160. package/dist/git/providers/provider.d.ts +52 -50
  161. package/dist/git/providers/provider.js +0 -2
  162. package/dist/git/providers/refs.d.ts +42 -40
  163. package/dist/git/providers/refs.js +0 -2
  164. package/dist/git/providers/remotes.d.ts +24 -22
  165. package/dist/git/providers/remotes.js +0 -2
  166. package/dist/git/providers/revision.d.ts +25 -23
  167. package/dist/git/providers/revision.js +0 -2
  168. package/dist/git/providers/shared/remotes.d.ts +24 -22
  169. package/dist/git/providers/shared/remotes.js +52 -77
  170. package/dist/git/providers/shared/remotes.js.map +1 -1
  171. package/dist/git/providers/staging.d.ts +37 -35
  172. package/dist/git/providers/staging.js +0 -2
  173. package/dist/git/providers/stash.d.ts +38 -36
  174. package/dist/git/providers/stash.js +0 -2
  175. package/dist/git/providers/status.d.ts +32 -30
  176. package/dist/git/providers/status.js +0 -2
  177. package/dist/git/providers/tags.d.ts +20 -18
  178. package/dist/git/providers/tags.js +0 -2
  179. package/dist/git/providers/types.d.ts +19 -17
  180. package/dist/git/providers/types.js +0 -2
  181. package/dist/git/providers/worktrees.d.ts +26 -24
  182. package/dist/git/providers/worktrees.js +0 -2
  183. package/dist/git/remotes/azure-devops.d.ts +49 -38
  184. package/dist/git/remotes/azure-devops.js +254 -224
  185. package/dist/git/remotes/azure-devops.js.map +1 -1
  186. package/dist/git/remotes/bitbucket-server.d.ts +30 -29
  187. package/dist/git/remotes/bitbucket-server.js +141 -142
  188. package/dist/git/remotes/bitbucket-server.js.map +1 -1
  189. package/dist/git/remotes/bitbucket.d.ts +27 -26
  190. package/dist/git/remotes/bitbucket.js +114 -111
  191. package/dist/git/remotes/bitbucket.js.map +1 -1
  192. package/dist/git/remotes/custom.d.ts +26 -25
  193. package/dist/git/remotes/custom.js +130 -130
  194. package/dist/git/remotes/custom.js.map +1 -1
  195. package/dist/git/remotes/gerrit.d.ts +29 -28
  196. package/dist/git/remotes/gerrit.js +140 -143
  197. package/dist/git/remotes/gerrit.js.map +1 -1
  198. package/dist/git/remotes/gitea.d.ts +28 -27
  199. package/dist/git/remotes/gitea.js +141 -145
  200. package/dist/git/remotes/gitea.js.map +1 -1
  201. package/dist/git/remotes/github.d.ts +35 -34
  202. package/dist/git/remotes/github.js +196 -190
  203. package/dist/git/remotes/github.js.map +1 -1
  204. package/dist/git/remotes/gitlab.d.ts +31 -30
  205. package/dist/git/remotes/gitlab.js +245 -227
  206. package/dist/git/remotes/gitlab.js.map +1 -1
  207. package/dist/git/remotes/google-source.d.ts +16 -14
  208. package/dist/git/remotes/google-source.js +33 -31
  209. package/dist/git/remotes/google-source.js.map +1 -1
  210. package/dist/git/remotes/matcher.d.ts +16 -14
  211. package/dist/git/remotes/matcher.js +141 -124
  212. package/dist/git/remotes/matcher.js.map +1 -1
  213. package/dist/git/repositoryService.d.ts +47 -47
  214. package/dist/git/repositoryService.js +47 -44
  215. package/dist/git/repositoryService.js.map +1 -1
  216. package/dist/git/run.types.d.ts +91 -76
  217. package/dist/git/run.types.js +0 -2
  218. package/dist/git/service.d.ts +73 -71
  219. package/dist/git/service.js +286 -302
  220. package/dist/git/service.js.map +1 -1
  221. package/dist/git/utils/autolink.utils.d.ts +4 -2
  222. package/dist/git/utils/autolink.utils.js +103 -139
  223. package/dist/git/utils/autolink.utils.js.map +1 -1
  224. package/dist/git/utils/blame.utils.d.ts +22 -20
  225. package/dist/git/utils/blame.utils.js +196 -230
  226. package/dist/git/utils/blame.utils.js.map +1 -1
  227. package/dist/git/utils/branch.utils.d.ts +7 -9
  228. package/dist/git/utils/branch.utils.js +89 -115
  229. package/dist/git/utils/branch.utils.js.map +1 -1
  230. package/dist/git/utils/commit.utils.d.ts +10 -16
  231. package/dist/git/utils/commit.utils.js +28 -47
  232. package/dist/git/utils/commit.utils.js.map +1 -1
  233. package/dist/git/utils/config.utils.d.ts +2 -0
  234. package/dist/git/utils/config.utils.js +14 -5
  235. package/dist/git/utils/config.utils.js.map +1 -1
  236. package/dist/git/utils/conflictResolution.utils.d.ts +16 -13
  237. package/dist/git/utils/conflictResolution.utils.js +116 -113
  238. package/dist/git/utils/conflictResolution.utils.js.map +1 -1
  239. package/dist/git/utils/contributor.utils.d.ts +10 -8
  240. package/dist/git/utils/contributor.utils.js +47 -69
  241. package/dist/git/utils/contributor.utils.js.map +1 -1
  242. package/dist/git/utils/fetch.utils.d.ts +2 -0
  243. package/dist/git/utils/fetch.utils.js +33 -44
  244. package/dist/git/utils/fetch.utils.js.map +1 -1
  245. package/dist/git/utils/fileStatus.utils.d.ts +22 -21
  246. package/dist/git/utils/fileStatus.utils.js +59 -45
  247. package/dist/git/utils/fileStatus.utils.js.map +1 -1
  248. package/dist/git/utils/graph.utils.d.ts +19 -1
  249. package/dist/git/utils/graph.utils.js +60 -35
  250. package/dist/git/utils/graph.utils.js.map +1 -1
  251. package/dist/git/utils/issue.utils.d.ts +3 -1
  252. package/dist/git/utils/issue.utils.js +154 -149
  253. package/dist/git/utils/issue.utils.js.map +1 -1
  254. package/dist/git/utils/issueOrPullRequest.utils.d.ts +3 -1
  255. package/dist/git/utils/issueOrPullRequest.utils.js +23 -20
  256. package/dist/git/utils/issueOrPullRequest.utils.js.map +1 -1
  257. package/dist/git/utils/mergeConflicts.utils.d.ts +4 -1
  258. package/dist/git/utils/mergeConflicts.utils.js +28 -15
  259. package/dist/git/utils/mergeConflicts.utils.js.map +1 -1
  260. package/dist/git/utils/pausedOperationStatus.utils.d.ts +7 -42
  261. package/dist/git/utils/pausedOperationStatus.utils.js +83 -146
  262. package/dist/git/utils/pausedOperationStatus.utils.js.map +1 -1
  263. package/dist/git/utils/pullRequest.utils.d.ts +7 -5
  264. package/dist/git/utils/pullRequest.utils.js +180 -187
  265. package/dist/git/utils/pullRequest.utils.js.map +1 -1
  266. package/dist/git/utils/reachability.utils.d.ts +6 -6
  267. package/dist/git/utils/reachability.utils.js +120 -147
  268. package/dist/git/utils/reachability.utils.js.map +1 -1
  269. package/dist/git/utils/rebase.utils.d.ts +3 -1
  270. package/dist/git/utils/rebase.utils.js +87 -71
  271. package/dist/git/utils/rebase.utils.js.map +1 -1
  272. package/dist/git/utils/reference.utils.d.ts +33 -32
  273. package/dist/git/utils/reference.utils.js +152 -179
  274. package/dist/git/utils/reference.utils.js.map +1 -1
  275. package/dist/git/utils/remote.utils.d.ts +5 -3
  276. package/dist/git/utils/remote.utils.js +77 -116
  277. package/dist/git/utils/remote.utils.js.map +1 -1
  278. package/dist/git/utils/repository.utils.d.ts +3 -1
  279. package/dist/git/utils/repository.utils.js +12 -11
  280. package/dist/git/utils/repository.utils.js.map +1 -1
  281. package/dist/git/utils/resourceDescriptor.utils.d.ts +3 -1
  282. package/dist/git/utils/resourceDescriptor.utils.js +8 -14
  283. package/dist/git/utils/resourceDescriptor.utils.js.map +1 -1
  284. package/dist/git/utils/revision.utils.d.ts +11 -10
  285. package/dist/git/utils/revision.utils.js +69 -83
  286. package/dist/git/utils/revision.utils.js.map +1 -1
  287. package/dist/git/utils/search.utils.d.ts +5 -3
  288. package/dist/git/utils/search.utils.js +383 -522
  289. package/dist/git/utils/search.utils.js.map +1 -1
  290. package/dist/git/utils/sorting.d.ts +22 -20
  291. package/dist/git/utils/sorting.js +133 -227
  292. package/dist/git/utils/sorting.js.map +1 -1
  293. package/dist/git/utils/sshKey.utils.d.ts +2 -0
  294. package/dist/git/utils/sshKey.utils.js +10 -15
  295. package/dist/git/utils/sshKey.utils.js.map +1 -1
  296. package/dist/git/utils/status.utils.d.ts +20 -15
  297. package/dist/git/utils/status.utils.js +93 -79
  298. package/dist/git/utils/status.utils.js.map +1 -1
  299. package/dist/git/utils/statusFile.utils.d.ts +6 -4
  300. package/dist/git/utils/statusFile.utils.js +71 -72
  301. package/dist/git/utils/statusFile.utils.js.map +1 -1
  302. package/dist/git/utils/tag.utils.d.ts +4 -2
  303. package/dist/git/utils/tag.utils.js +10 -8
  304. package/dist/git/utils/tag.utils.js.map +1 -1
  305. package/dist/git/utils/tooltip.utils.d.ts +5 -2
  306. package/dist/git/utils/tooltip.utils.js +49 -24
  307. package/dist/git/utils/tooltip.utils.js.map +1 -1
  308. package/dist/git/utils/uriAuthority.d.ts +9 -7
  309. package/dist/git/utils/uriAuthority.js +19 -16
  310. package/dist/git/utils/uriAuthority.js.map +1 -1
  311. package/dist/git/utils/user.utils.d.ts +3 -1
  312. package/dist/git/utils/user.utils.js +6 -10
  313. package/dist/git/utils/user.utils.js.map +1 -1
  314. package/dist/git/utils/worktree.utils.d.ts +5 -3
  315. package/dist/git/utils/worktree.utils.js +14 -12
  316. package/dist/git/utils/worktree.utils.js.map +1 -1
  317. package/dist/git/watching/changeEvent.d.ts +38 -36
  318. package/dist/git/watching/changeEvent.js +60 -67
  319. package/dist/git/watching/changeEvent.js.map +1 -1
  320. package/dist/git/watching/classifyChange.d.ts +3 -1
  321. package/dist/git/watching/classifyChange.js +50 -79
  322. package/dist/git/watching/classifyChange.js.map +1 -1
  323. package/dist/git/watching/gitIgnoreFilter.d.ts +43 -41
  324. package/dist/git/watching/gitIgnoreFilter.js +92 -107
  325. package/dist/git/watching/gitIgnoreFilter.js.map +1 -1
  326. package/dist/git/watching/initWatcher.d.ts +22 -20
  327. package/dist/git/watching/initWatcher.js +58 -57
  328. package/dist/git/watching/initWatcher.js.map +1 -1
  329. package/dist/git/watching/provider.d.ts +8 -7
  330. package/dist/git/watching/provider.js +0 -2
  331. package/dist/git/watching/watchGroup.d.ts +29 -28
  332. package/dist/git/watching/watchGroup.js +105 -137
  333. package/dist/git/watching/watchGroup.js.map +1 -1
  334. package/dist/git/watching/watchService.d.ts +70 -68
  335. package/dist/git/watching/watchService.js +275 -339
  336. package/dist/git/watching/watchService.js.map +1 -1
  337. package/dist/git/watching/watchSession.d.ts +112 -111
  338. package/dist/git/watching/watchSession.js +260 -314
  339. package/dist/git/watching/watchSession.js.map +1 -1
  340. package/dist/git/watching/watcherPatterns.d.ts +4 -2
  341. package/dist/git/watching/watcherPatterns.js +21 -24
  342. package/dist/git/watching/watcherPatterns.js.map +1 -1
  343. package/dist/git-cli/cliGitProvider.d.ts +117 -114
  344. package/dist/git-cli/cliGitProvider.js +261 -283
  345. package/dist/git-cli/cliGitProvider.js.map +1 -1
  346. package/dist/git-cli/exec/eventLoopMonitor.d.ts +26 -0
  347. package/dist/git-cli/exec/eventLoopMonitor.js +61 -0
  348. package/dist/git-cli/exec/eventLoopMonitor.js.map +1 -0
  349. package/dist/git-cli/exec/exec.d.ts +3 -4
  350. package/dist/git-cli/exec/exec.errors.d.ts +2 -2
  351. package/dist/git-cli/exec/exec.errors.js +2 -2
  352. package/dist/git-cli/exec/exec.js +3 -3
  353. package/dist/git-cli/exec/exec.types.d.ts +2 -2
  354. package/dist/git-cli/exec/exec.types.js +0 -2
  355. package/dist/git-cli/exec/features.d.ts +2 -3
  356. package/dist/git-cli/exec/features.js +2 -2
  357. package/dist/git-cli/exec/git.d.ts +224 -205
  358. package/dist/git-cli/exec/git.js +834 -1042
  359. package/dist/git-cli/exec/git.js.map +1 -1
  360. package/dist/git-cli/exec/gitQueue.d.ts +51 -48
  361. package/dist/git-cli/exec/gitQueue.js +225 -260
  362. package/dist/git-cli/exec/gitQueue.js.map +1 -1
  363. package/dist/git-cli/exec/locator.d.ts +8 -6
  364. package/dist/git-cli/exec/locator.js +95 -121
  365. package/dist/git-cli/exec/locator.js.map +1 -1
  366. package/dist/git-cli/parsers/blameParser.d.ts +22 -20
  367. package/dist/git-cli/parsers/blameParser.js +238 -332
  368. package/dist/git-cli/parsers/blameParser.js.map +1 -1
  369. package/dist/git-cli/parsers/indexParser.d.ts +3 -1
  370. package/dist/git-cli/parsers/indexParser.js +146 -221
  371. package/dist/git-cli/parsers/indexParser.js.map +1 -1
  372. package/dist/git-cli/parsers/logParser.d.ts +103 -110
  373. package/dist/git-cli/parsers/logParser.js +998 -1199
  374. package/dist/git-cli/parsers/logParser.js.map +1 -1
  375. package/dist/git-cli/parsers/mergeTreeParser.d.ts +5 -3
  376. package/dist/git-cli/parsers/mergeTreeParser.js +28 -72
  377. package/dist/git-cli/parsers/mergeTreeParser.js.map +1 -1
  378. package/dist/git-cli/parsers/refParser.d.ts +5 -4
  379. package/dist/git-cli/parsers/refParser.js +92 -137
  380. package/dist/git-cli/parsers/refParser.js.map +1 -1
  381. package/dist/git-cli/parsers/reflogParser.d.ts +7 -6
  382. package/dist/git-cli/parsers/reflogParser.js +100 -173
  383. package/dist/git-cli/parsers/reflogParser.js.map +1 -1
  384. package/dist/git-cli/parsers/remoteParser.d.ts +4 -2
  385. package/dist/git-cli/parsers/remoteParser.js +74 -126
  386. package/dist/git-cli/parsers/remoteParser.js.map +1 -1
  387. package/dist/git-cli/parsers/shortlogParser.d.ts +4 -2
  388. package/dist/git-cli/parsers/shortlogParser.js +44 -49
  389. package/dist/git-cli/parsers/shortlogParser.js.map +1 -1
  390. package/dist/git-cli/parsers/signatureParser.d.ts +3 -1
  391. package/dist/git-cli/parsers/signatureParser.js +82 -124
  392. package/dist/git-cli/parsers/signatureParser.js.map +1 -1
  393. package/dist/git-cli/parsers/sshSignatureParser.d.ts +5 -3
  394. package/dist/git-cli/parsers/sshSignatureParser.js +55 -64
  395. package/dist/git-cli/parsers/sshSignatureParser.js.map +1 -1
  396. package/dist/git-cli/parsers/statusParser.d.ts +4 -2
  397. package/dist/git-cli/parsers/statusParser.js +148 -205
  398. package/dist/git-cli/parsers/statusParser.js.map +1 -1
  399. package/dist/git-cli/parsers/treeParser.d.ts +3 -1
  400. package/dist/git-cli/parsers/treeParser.js +57 -108
  401. package/dist/git-cli/parsers/treeParser.js.map +1 -1
  402. package/dist/git-cli/parsers/worktreeParser.d.ts +4 -3
  403. package/dist/git-cli/parsers/worktreeParser.js +76 -132
  404. package/dist/git-cli/parsers/worktreeParser.js.map +1 -1
  405. package/dist/git-cli/providers/blame.d.ts +25 -23
  406. package/dist/git-cli/providers/blame.js +404 -413
  407. package/dist/git-cli/providers/blame.js.map +1 -1
  408. package/dist/git-cli/providers/branches.d.ts +117 -116
  409. package/dist/git-cli/providers/branches.js +1132 -1468
  410. package/dist/git-cli/providers/branches.js.map +1 -1
  411. package/dist/git-cli/providers/commitFilesetUtils.d.ts +4 -2
  412. package/dist/git-cli/providers/commitFilesetUtils.js +36 -18
  413. package/dist/git-cli/providers/commitFilesetUtils.js.map +1 -1
  414. package/dist/git-cli/providers/commits.d.ts +58 -56
  415. package/dist/git-cli/providers/commits.js +1084 -1423
  416. package/dist/git-cli/providers/commits.js.map +1 -1
  417. package/dist/git-cli/providers/config.d.ts +129 -127
  418. package/dist/git-cli/providers/config.js +612 -831
  419. package/dist/git-cli/providers/config.js.map +1 -1
  420. package/dist/git-cli/providers/contributors.d.ts +29 -28
  421. package/dist/git-cli/providers/contributors.js +246 -351
  422. package/dist/git-cli/providers/contributors.js.map +1 -1
  423. package/dist/git-cli/providers/diff.d.ts +97 -94
  424. package/dist/git-cli/providers/diff.js +638 -845
  425. package/dist/git-cli/providers/diff.js.map +1 -1
  426. package/dist/git-cli/providers/graph.d.ts +66 -68
  427. package/dist/git-cli/providers/graph.js +1400 -1848
  428. package/dist/git-cli/providers/graph.js.map +1 -1
  429. package/dist/git-cli/providers/maintenance.d.ts +305 -303
  430. package/dist/git-cli/providers/maintenance.js +1526 -2078
  431. package/dist/git-cli/providers/maintenance.js.map +1 -1
  432. package/dist/git-cli/providers/operations.d.ts +96 -94
  433. package/dist/git-cli/providers/operations.js +664 -724
  434. package/dist/git-cli/providers/operations.js.map +1 -1
  435. package/dist/git-cli/providers/patch.d.ts +37 -35
  436. package/dist/git-cli/providers/patch.js +206 -307
  437. package/dist/git-cli/providers/patch.js.map +1 -1
  438. package/dist/git-cli/providers/pausedOperations.d.ts +30 -28
  439. package/dist/git-cli/providers/pausedOperations.js +475 -506
  440. package/dist/git-cli/providers/pausedOperations.js.map +1 -1
  441. package/dist/git-cli/providers/refs.d.ts +50 -48
  442. package/dist/git-cli/providers/refs.js +335 -479
  443. package/dist/git-cli/providers/refs.js.map +1 -1
  444. package/dist/git-cli/providers/remotes.d.ts +23 -21
  445. package/dist/git-cli/providers/remotes.js +71 -92
  446. package/dist/git-cli/providers/remotes.js.map +1 -1
  447. package/dist/git-cli/providers/revision.d.ts +27 -25
  448. package/dist/git-cli/providers/revision.js +288 -304
  449. package/dist/git-cli/providers/revision.js.map +1 -1
  450. package/dist/git-cli/providers/staging.d.ts +31 -29
  451. package/dist/git-cli/providers/staging.js +140 -189
  452. package/dist/git-cli/providers/staging.js.map +1 -1
  453. package/dist/git-cli/providers/stash.d.ts +44 -42
  454. package/dist/git-cli/providers/stash.js +288 -387
  455. package/dist/git-cli/providers/stash.js.map +1 -1
  456. package/dist/git-cli/providers/status.d.ts +61 -59
  457. package/dist/git-cli/providers/status.js +332 -453
  458. package/dist/git-cli/providers/status.js.map +1 -1
  459. package/dist/git-cli/providers/tags.d.ts +31 -29
  460. package/dist/git-cli/providers/tags.js +158 -215
  461. package/dist/git-cli/providers/tags.js.map +1 -1
  462. package/dist/git-cli/providers/worktrees.d.ts +35 -33
  463. package/dist/git-cli/providers/worktrees.js +178 -203
  464. package/dist/git-cli/providers/worktrees.js.map +1 -1
  465. package/dist/git-cli/service.d.ts +28 -26
  466. package/dist/git-cli/service.js +38 -40
  467. package/dist/git-cli/service.js.map +1 -1
  468. package/dist/ipc/discovery.d.ts +19 -17
  469. package/dist/ipc/discovery.js +104 -128
  470. package/dist/ipc/discovery.js.map +1 -1
  471. package/dist/ipc/ipcServer.d.ts +16 -14
  472. package/dist/ipc/ipcServer.js +139 -160
  473. package/dist/ipc/ipcServer.js.map +1 -1
  474. package/dist/plus/agents/agentCapabilities.d.ts +50 -37
  475. package/dist/plus/agents/agentCapabilities.js +138 -173
  476. package/dist/plus/agents/agentCapabilities.js.map +1 -1
  477. package/dist/plus/agents/providers/claudeCodeTranscript.d.ts +153 -151
  478. package/dist/plus/agents/providers/claudeCodeTranscript.js +605 -679
  479. package/dist/plus/agents/providers/claudeCodeTranscript.js.map +1 -1
  480. package/dist/plus/agents/providers/gkAgentProvider.d.ts +237 -240
  481. package/dist/plus/agents/providers/gkAgentProvider.js +2162 -3334
  482. package/dist/plus/agents/providers/gkAgentProvider.js.map +1 -1
  483. package/dist/plus/agents/sanitizePrompt.d.ts +2 -0
  484. package/dist/plus/agents/sanitizePrompt.js +58 -91
  485. package/dist/plus/agents/sanitizePrompt.js.map +1 -1
  486. package/dist/plus/agents/stateMachine.d.ts +7 -5
  487. package/dist/plus/agents/stateMachine.js +135 -163
  488. package/dist/plus/agents/stateMachine.js.map +1 -1
  489. package/dist/plus/agents/types.d.ts +333 -336
  490. package/dist/plus/agents/types.js +48 -48
  491. package/dist/plus/agents/types.js.map +1 -1
  492. package/dist/plus/ai/constants.d.ts +3 -1
  493. package/dist/plus/ai/constants.js +88 -84
  494. package/dist/plus/ai/constants.js.map +1 -1
  495. package/dist/plus/ai/errors.d.ts +22 -18
  496. package/dist/plus/ai/errors.js +158 -138
  497. package/dist/plus/ai/errors.js.map +1 -1
  498. package/dist/plus/ai/models/conversation.d.ts +11 -9
  499. package/dist/plus/ai/models/conversation.js +30 -26
  500. package/dist/plus/ai/models/conversation.js.map +1 -1
  501. package/dist/plus/ai/models/model.d.ts +29 -27
  502. package/dist/plus/ai/models/model.js +663 -471
  503. package/dist/plus/ai/models/model.js.map +1 -1
  504. package/dist/plus/ai/models/promptTemplates.d.ts +56 -55
  505. package/dist/plus/ai/models/promptTemplates.js +0 -2
  506. package/dist/plus/ai/models/provider.d.ts +79 -77
  507. package/dist/plus/ai/models/provider.js +0 -2
  508. package/dist/plus/ai/models/results.d.ts +27 -21
  509. package/dist/plus/ai/models/results.js +0 -2
  510. package/dist/plus/ai/prompts.d.ts +4 -2
  511. package/dist/plus/ai/prompts.js +301 -190
  512. package/dist/plus/ai/prompts.js.map +1 -1
  513. package/dist/plus/ai/providers/anthropicProvider.d.ts +33 -32
  514. package/dist/plus/ai/providers/anthropicProvider.js +484 -381
  515. package/dist/plus/ai/providers/anthropicProvider.js.map +1 -1
  516. package/dist/plus/ai/providers/azureProvider.d.ts +18 -16
  517. package/dist/plus/ai/providers/azureProvider.js +53 -53
  518. package/dist/plus/ai/providers/azureProvider.js.map +1 -1
  519. package/dist/plus/ai/providers/context.d.ts +23 -20
  520. package/dist/plus/ai/providers/context.js +0 -2
  521. package/dist/plus/ai/providers/deepSeekProvider.d.ts +17 -15
  522. package/dist/plus/ai/providers/deepSeekProvider.js +45 -39
  523. package/dist/plus/ai/providers/deepSeekProvider.js.map +1 -1
  524. package/dist/plus/ai/providers/geminiProvider.d.ts +16 -14
  525. package/dist/plus/ai/providers/geminiProvider.js +316 -230
  526. package/dist/plus/ai/providers/geminiProvider.js.map +1 -1
  527. package/dist/plus/ai/providers/gitkrakenProvider.d.ts +22 -20
  528. package/dist/plus/ai/providers/gitkrakenProvider.js +165 -260
  529. package/dist/plus/ai/providers/gitkrakenProvider.js.map +1 -1
  530. package/dist/plus/ai/providers/huggingFaceProvider.d.ts +16 -14
  531. package/dist/plus/ai/providers/huggingFaceProvider.js +45 -46
  532. package/dist/plus/ai/providers/huggingFaceProvider.js.map +1 -1
  533. package/dist/plus/ai/providers/mistralProvider.d.ts +22 -20
  534. package/dist/plus/ai/providers/mistralProvider.js +263 -195
  535. package/dist/plus/ai/providers/mistralProvider.js.map +1 -1
  536. package/dist/plus/ai/providers/ollamaProvider.d.ts +26 -24
  537. package/dist/plus/ai/providers/ollamaProvider.js +156 -189
  538. package/dist/plus/ai/providers/ollamaProvider.js.map +1 -1
  539. package/dist/plus/ai/providers/openAICompatibleProvider.d.ts +18 -16
  540. package/dist/plus/ai/providers/openAICompatibleProvider.js +50 -50
  541. package/dist/plus/ai/providers/openAICompatibleProvider.js.map +1 -1
  542. package/dist/plus/ai/providers/openAICompatibleProviderBase.d.ts +187 -185
  543. package/dist/plus/ai/providers/openAICompatibleProviderBase.js +356 -475
  544. package/dist/plus/ai/providers/openAICompatibleProviderBase.js.map +1 -1
  545. package/dist/plus/ai/providers/openRouterProvider.d.ts +20 -19
  546. package/dist/plus/ai/providers/openRouterProvider.js +60 -65
  547. package/dist/plus/ai/providers/openRouterProvider.js.map +1 -1
  548. package/dist/plus/ai/providers/openaiProvider.d.ts +17 -15
  549. package/dist/plus/ai/providers/openaiProvider.js +35 -34
  550. package/dist/plus/ai/providers/openaiProvider.js.map +1 -1
  551. package/dist/plus/ai/providers/responseFormatCache.d.ts +4 -2
  552. package/dist/plus/ai/providers/responseFormatCache.js +21 -17
  553. package/dist/plus/ai/providers/responseFormatCache.js.map +1 -1
  554. package/dist/plus/ai/providers/xaiProvider.d.ts +16 -14
  555. package/dist/plus/ai/providers/xaiProvider.js +61 -46
  556. package/dist/plus/ai/providers/xaiProvider.js.map +1 -1
  557. package/dist/plus/ai/utils/ai.utils.d.ts +4 -2
  558. package/dist/plus/ai/utils/ai.utils.js +50 -77
  559. package/dist/plus/ai/utils/ai.utils.js.map +1 -1
  560. package/dist/plus/ai/utils/results.utils.d.ts +7 -5
  561. package/dist/plus/ai/utils/results.utils.js +235 -269
  562. package/dist/plus/ai/utils/results.utils.js.map +1 -1
  563. package/dist/plus/ai/utils/truncation.utils.d.ts +3 -2
  564. package/dist/plus/ai/utils/truncation.utils.js +242 -205
  565. package/dist/plus/ai/utils/truncation.utils.js.map +1 -1
  566. package/dist/plus/git-github/api/config.d.ts +58 -56
  567. package/dist/plus/git-github/api/config.js +15 -11
  568. package/dist/plus/git-github/api/config.js.map +1 -1
  569. package/dist/plus/git-github/api/github.d.ts +500 -497
  570. package/dist/plus/git-github/api/github.js +2326 -3121
  571. package/dist/plus/git-github/api/github.js.map +1 -1
  572. package/dist/plus/git-github/api/github.utils.d.ts +5 -3
  573. package/dist/plus/git-github/api/github.utils.js +24 -19
  574. package/dist/plus/git-github/api/github.utils.js.map +1 -1
  575. package/dist/plus/git-github/api/issueSearchQuery.d.ts +5 -3
  576. package/dist/plus/git-github/api/issueSearchQuery.js +204 -221
  577. package/dist/plus/git-github/api/issueSearchQuery.js.map +1 -1
  578. package/dist/plus/git-github/api/pullRequestSearchQuery.d.ts +6 -5
  579. package/dist/plus/git-github/api/pullRequestSearchQuery.js +89 -116
  580. package/dist/plus/git-github/api/pullRequestSearchQuery.js.map +1 -1
  581. package/dist/plus/git-github/api/token.d.ts +10 -8
  582. package/dist/plus/git-github/api/token.js +0 -2
  583. package/dist/plus/git-github/api/tokenUtils.d.ts +4 -2
  584. package/dist/plus/git-github/api/tokenUtils.js +14 -10
  585. package/dist/plus/git-github/api/tokenUtils.js.map +1 -1
  586. package/dist/plus/git-github/api/types.d.ts +94 -92
  587. package/dist/plus/git-github/api/types.js +0 -2
  588. package/dist/plus/git-github/context.d.ts +65 -63
  589. package/dist/plus/git-github/context.js +13 -9
  590. package/dist/plus/git-github/context.js.map +1 -1
  591. package/dist/plus/git-github/models.d.ts +182 -182
  592. package/dist/plus/git-github/models.js +199 -265
  593. package/dist/plus/git-github/models.js.map +1 -1
  594. package/dist/plus/git-github/providers/github/blame.d.ts +32 -31
  595. package/dist/plus/git-github/providers/github/blame.js +137 -150
  596. package/dist/plus/git-github/providers/github/blame.js.map +1 -1
  597. package/dist/plus/git-github/providers/github/branches.d.ts +42 -40
  598. package/dist/plus/git-github/providers/github/branches.js +199 -274
  599. package/dist/plus/git-github/providers/github/branches.js.map +1 -1
  600. package/dist/plus/git-github/providers/github/commits.d.ts +35 -33
  601. package/dist/plus/git-github/providers/github/commits.js +527 -606
  602. package/dist/plus/git-github/providers/github/commits.js.map +1 -1
  603. package/dist/plus/git-github/providers/github/config.d.ts +10 -8
  604. package/dist/plus/git-github/providers/github/config.js +35 -45
  605. package/dist/plus/git-github/providers/github/config.js.map +1 -1
  606. package/dist/plus/git-github/providers/github/contributors.d.ts +25 -24
  607. package/dist/plus/git-github/providers/github/contributors.js +174 -216
  608. package/dist/plus/git-github/providers/github/contributors.js.map +1 -1
  609. package/dist/plus/git-github/providers/github/diff.d.ts +34 -32
  610. package/dist/plus/git-github/providers/github/diff.js +154 -194
  611. package/dist/plus/git-github/providers/github/diff.js.map +1 -1
  612. package/dist/plus/git-github/providers/github/graph.d.ts +33 -31
  613. package/dist/plus/git-github/providers/github/graph.js +400 -452
  614. package/dist/plus/git-github/providers/github/graph.js.map +1 -1
  615. package/dist/plus/git-github/providers/github/refs.d.ts +33 -31
  616. package/dist/plus/git-github/providers/github/refs.js +97 -131
  617. package/dist/plus/git-github/providers/github/refs.js.map +1 -1
  618. package/dist/plus/git-github/providers/github/remotes.d.ts +8 -6
  619. package/dist/plus/git-github/providers/github/remotes.js +30 -35
  620. package/dist/plus/git-github/providers/github/remotes.js.map +1 -1
  621. package/dist/plus/git-github/providers/github/revision.d.ts +13 -11
  622. package/dist/plus/git-github/providers/github/revision.js +106 -129
  623. package/dist/plus/git-github/providers/github/revision.js.map +1 -1
  624. package/dist/plus/git-github/providers/github/status.d.ts +24 -22
  625. package/dist/plus/git-github/providers/github/status.js +49 -47
  626. package/dist/plus/git-github/providers/github/status.js.map +1 -1
  627. package/dist/plus/git-github/providers/github/tags.d.ts +21 -19
  628. package/dist/plus/git-github/providers/github/tags.js +78 -103
  629. package/dist/plus/git-github/providers/github/tags.js.map +1 -1
  630. package/dist/plus/git-github/providers/githubGitProvider.d.ts +67 -64
  631. package/dist/plus/git-github/providers/githubGitProvider.js +131 -128
  632. package/dist/plus/git-github/providers/githubGitProvider.js.map +1 -1
  633. package/dist/plus/git-github/providers/githubProvider.d.ts +46 -44
  634. package/dist/plus/git-github/providers/githubProvider.js +0 -2
  635. package/dist/plus/integrations/authentication/cloudIntegrationService.d.ts +29 -27
  636. package/dist/plus/integrations/authentication/cloudIntegrationService.js +173 -208
  637. package/dist/plus/integrations/authentication/cloudIntegrationService.js.map +1 -1
  638. package/dist/plus/integrations/authentication/configuredIntegrationService.d.ts +126 -107
  639. package/dist/plus/integrations/authentication/configuredIntegrationService.js +399 -497
  640. package/dist/plus/integrations/authentication/configuredIntegrationService.js.map +1 -1
  641. package/dist/plus/integrations/authentication/integrationAuthenticationProvider.d.ts +73 -72
  642. package/dist/plus/integrations/authentication/integrationAuthenticationProvider.js +153 -232
  643. package/dist/plus/integrations/authentication/integrationAuthenticationProvider.js.map +1 -1
  644. package/dist/plus/integrations/authentication/integrationAuthenticationService.d.ts +61 -59
  645. package/dist/plus/integrations/authentication/integrationAuthenticationService.js +100 -124
  646. package/dist/plus/integrations/authentication/integrationAuthenticationService.js.map +1 -1
  647. package/dist/plus/integrations/authentication/manualTokenProvider.d.ts +14 -12
  648. package/dist/plus/integrations/authentication/manualTokenProvider.js +26 -51
  649. package/dist/plus/integrations/authentication/manualTokenProvider.js.map +1 -1
  650. package/dist/plus/integrations/authentication/models.d.ts +102 -85
  651. package/dist/plus/integrations/authentication/models.js +55 -54
  652. package/dist/plus/integrations/authentication/models.js.map +1 -1
  653. package/dist/plus/integrations/authentication/rejectedTokenTracker.d.ts +19 -17
  654. package/dist/plus/integrations/authentication/rejectedTokenTracker.js +53 -51
  655. package/dist/plus/integrations/authentication/rejectedTokenTracker.js.map +1 -1
  656. package/dist/plus/integrations/collectionMetadata.d.ts +12 -10
  657. package/dist/plus/integrations/collectionMetadata.js +204 -254
  658. package/dist/plus/integrations/collectionMetadata.js.map +1 -1
  659. package/dist/plus/integrations/constants.d.ts +60 -34
  660. package/dist/plus/integrations/constants.js +157 -132
  661. package/dist/plus/integrations/constants.js.map +1 -1
  662. package/dist/plus/integrations/context.d.ts +253 -252
  663. package/dist/plus/integrations/context.js +0 -2
  664. package/dist/plus/integrations/errors.d.ts +26 -25
  665. package/dist/plus/integrations/errors.js +116 -140
  666. package/dist/plus/integrations/errors.js.map +1 -1
  667. package/dist/plus/integrations/index.d.ts +36 -40
  668. package/dist/plus/integrations/index.js +46 -57
  669. package/dist/plus/integrations/index.js.map +1 -1
  670. package/dist/plus/integrations/integrationService.d.ts +445 -440
  671. package/dist/plus/integrations/integrationService.js +1054 -1324
  672. package/dist/plus/integrations/integrationService.js.map +1 -1
  673. package/dist/plus/integrations/lite.d.ts +33 -31
  674. package/dist/plus/integrations/lite.js +84 -122
  675. package/dist/plus/integrations/lite.js.map +1 -1
  676. package/dist/plus/integrations/manager.d.ts +592 -580
  677. package/dist/plus/integrations/manager.js +0 -2
  678. package/dist/plus/integrations/models/gitHostIntegration.d.ts +420 -415
  679. package/dist/plus/integrations/models/gitHostIntegration.js +1180 -1293
  680. package/dist/plus/integrations/models/gitHostIntegration.js.map +1 -1
  681. package/dist/plus/integrations/models/integration.d.ts +200 -190
  682. package/dist/plus/integrations/models/integration.js +577 -722
  683. package/dist/plus/integrations/models/integration.js.map +1 -1
  684. package/dist/plus/integrations/models/issueCache.d.ts +15 -13
  685. package/dist/plus/integrations/models/issueCache.js +9 -7
  686. package/dist/plus/integrations/models/issueCache.js.map +1 -1
  687. package/dist/plus/integrations/models/issueReads.d.ts +108 -85
  688. package/dist/plus/integrations/models/issueReads.js +0 -2
  689. package/dist/plus/integrations/models/issuesIntegration.d.ts +72 -71
  690. package/dist/plus/integrations/models/issuesIntegration.js +160 -186
  691. package/dist/plus/integrations/models/issuesIntegration.js.map +1 -1
  692. package/dist/plus/integrations/models/pullRequestReads.d.ts +9 -7
  693. package/dist/plus/integrations/models/pullRequestReads.js +0 -2
  694. package/dist/plus/integrations/providerFilters.d.ts +8 -20
  695. package/dist/plus/integrations/providerFilters.js +11 -7
  696. package/dist/plus/integrations/providerFilters.js.map +1 -1
  697. package/dist/plus/integrations/providers/accounts.d.ts +7 -5
  698. package/dist/plus/integrations/providers/accounts.js +21 -31
  699. package/dist/plus/integrations/providers/accounts.js.map +1 -1
  700. package/dist/plus/integrations/providers/apiClients.d.ts +13 -10
  701. package/dist/plus/integrations/providers/apiClients.js +51 -36
  702. package/dist/plus/integrations/providers/apiClients.js.map +1 -1
  703. package/dist/plus/integrations/providers/apiConfig.d.ts +31 -29
  704. package/dist/plus/integrations/providers/apiConfig.js +18 -16
  705. package/dist/plus/integrations/providers/apiConfig.js.map +1 -1
  706. package/dist/plus/integrations/providers/azure/azure.d.ts +69 -54
  707. package/dist/plus/integrations/providers/azure/azure.js +453 -515
  708. package/dist/plus/integrations/providers/azure/azure.js.map +1 -1
  709. package/dist/plus/integrations/providers/azure/models.d.ts +258 -229
  710. package/dist/plus/integrations/providers/azure/models.js +241 -203
  711. package/dist/plus/integrations/providers/azure/models.js.map +1 -1
  712. package/dist/plus/integrations/providers/azureDevOps.d.ts +132 -130
  713. package/dist/plus/integrations/providers/azureDevOps.js +775 -921
  714. package/dist/plus/integrations/providers/azureDevOps.js.map +1 -1
  715. package/dist/plus/integrations/providers/bitbucket/bitbucket.d.ts +50 -48
  716. package/dist/plus/integrations/providers/bitbucket/bitbucket.js +417 -585
  717. package/dist/plus/integrations/providers/bitbucket/bitbucket.js.map +1 -1
  718. package/dist/plus/integrations/providers/bitbucket/models.d.ts +179 -179
  719. package/dist/plus/integrations/providers/bitbucket/models.js +96 -144
  720. package/dist/plus/integrations/providers/bitbucket/models.js.map +1 -1
  721. package/dist/plus/integrations/providers/bitbucket-server/models.d.ts +111 -109
  722. package/dist/plus/integrations/providers/bitbucket-server/models.js +102 -121
  723. package/dist/plus/integrations/providers/bitbucket-server/models.js.map +1 -1
  724. package/dist/plus/integrations/providers/bitbucket-server.d.ts +79 -79
  725. package/dist/plus/integrations/providers/bitbucket-server.js +205 -241
  726. package/dist/plus/integrations/providers/bitbucket-server.js.map +1 -1
  727. package/dist/plus/integrations/providers/bitbucket.d.ts +80 -79
  728. package/dist/plus/integrations/providers/bitbucket.js +390 -477
  729. package/dist/plus/integrations/providers/bitbucket.js.map +1 -1
  730. package/dist/plus/integrations/providers/github/github.d.ts +5 -3
  731. package/dist/plus/integrations/providers/github/github.js +38 -45
  732. package/dist/plus/integrations/providers/github/github.js.map +1 -1
  733. package/dist/plus/integrations/providers/github/github.utils.d.ts +8 -5
  734. package/dist/plus/integrations/providers/github/github.utils.js +7 -4
  735. package/dist/plus/integrations/providers/github/github.utils.js.map +1 -1
  736. package/dist/plus/integrations/providers/github/models.d.ts +2 -3
  737. package/dist/plus/integrations/providers/github/models.js +2 -2
  738. package/dist/plus/integrations/providers/github.d.ts +174 -172
  739. package/dist/plus/integrations/providers/github.js +431 -523
  740. package/dist/plus/integrations/providers/github.js.map +1 -1
  741. package/dist/plus/integrations/providers/gitlab/gitlab.d.ts +67 -66
  742. package/dist/plus/integrations/providers/gitlab/gitlab.js +546 -757
  743. package/dist/plus/integrations/providers/gitlab/gitlab.js.map +1 -1
  744. package/dist/plus/integrations/providers/gitlab/gitlab.utils.d.ts +7 -5
  745. package/dist/plus/integrations/providers/gitlab/gitlab.utils.js +45 -46
  746. package/dist/plus/integrations/providers/gitlab/gitlab.utils.js.map +1 -1
  747. package/dist/plus/integrations/providers/gitlab/models.d.ts +109 -107
  748. package/dist/plus/integrations/providers/gitlab/models.js +74 -89
  749. package/dist/plus/integrations/providers/gitlab/models.js.map +1 -1
  750. package/dist/plus/integrations/providers/gitlab.d.ts +115 -114
  751. package/dist/plus/integrations/providers/gitlab.js +440 -528
  752. package/dist/plus/integrations/providers/gitlab.js.map +1 -1
  753. package/dist/plus/integrations/providers/issueSorts.d.ts +3 -1
  754. package/dist/plus/integrations/providers/issueSorts.js +66 -62
  755. package/dist/plus/integrations/providers/issueSorts.js.map +1 -1
  756. package/dist/plus/integrations/providers/jira-server.d.ts +90 -0
  757. package/dist/plus/integrations/providers/jira-server.js +322 -0
  758. package/dist/plus/integrations/providers/jira-server.js.map +1 -0
  759. package/dist/plus/integrations/providers/jira.d.ts +41 -39
  760. package/dist/plus/integrations/providers/jira.js +378 -440
  761. package/dist/plus/integrations/providers/jira.js.map +1 -1
  762. package/dist/plus/integrations/providers/jiraIssueByKey.d.ts +3 -1
  763. package/dist/plus/integrations/providers/jiraIssueByKey.js +85 -89
  764. package/dist/plus/integrations/providers/jiraIssueByKey.js.map +1 -1
  765. package/dist/plus/integrations/providers/linear.d.ts +63 -62
  766. package/dist/plus/integrations/providers/linear.js +315 -358
  767. package/dist/plus/integrations/providers/linear.js.map +1 -1
  768. package/dist/plus/integrations/providers/models.d.ts +514 -503
  769. package/dist/plus/integrations/providers/models.js +818 -856
  770. package/dist/plus/integrations/providers/models.js.map +1 -1
  771. package/dist/plus/integrations/providers/providerErrors.d.ts +35 -2
  772. package/dist/plus/integrations/providers/providerErrors.js +120 -81
  773. package/dist/plus/integrations/providers/providerErrors.js.map +1 -1
  774. package/dist/plus/integrations/providers/providersApi.d.ts +299 -271
  775. package/dist/plus/integrations/providers/providersApi.js +1048 -1001
  776. package/dist/plus/integrations/providers/providersApi.js.map +1 -1
  777. package/dist/plus/integrations/providers/pullRequestReviews.d.ts +21 -21
  778. package/dist/plus/integrations/providers/pullRequestReviews.js +64 -90
  779. package/dist/plus/integrations/providers/pullRequestReviews.js.map +1 -1
  780. package/dist/plus/integrations/providers/trello.d.ts +35 -34
  781. package/dist/plus/integrations/providers/trello.js +136 -143
  782. package/dist/plus/integrations/providers/trello.js.map +1 -1
  783. package/dist/plus/integrations/providers/utils/providerPaging.d.ts +4 -2
  784. package/dist/plus/integrations/providers/utils/providerPaging.js +131 -156
  785. package/dist/plus/integrations/providers/utils/providerPaging.js.map +1 -1
  786. package/dist/plus/integrations/providers/utils.d.ts +51 -50
  787. package/dist/plus/integrations/providers/utils.js +185 -296
  788. package/dist/plus/integrations/providers/utils.js.map +1 -1
  789. package/dist/plus/integrations/reads/broaden.d.ts +10 -8
  790. package/dist/plus/integrations/reads/broaden.js +320 -439
  791. package/dist/plus/integrations/reads/broaden.js.map +1 -1
  792. package/dist/plus/integrations/reads/context.d.ts +47 -45
  793. package/dist/plus/integrations/reads/context.js +0 -2
  794. package/dist/plus/integrations/reads/counts.d.ts +74 -72
  795. package/dist/plus/integrations/reads/counts.js +233 -314
  796. package/dist/plus/integrations/reads/counts.js.map +1 -1
  797. package/dist/plus/integrations/reads/cursors.d.ts +26 -24
  798. package/dist/plus/integrations/reads/cursors.js +80 -115
  799. package/dist/plus/integrations/reads/cursors.js.map +1 -1
  800. package/dist/plus/integrations/reads/drains.d.ts +24 -23
  801. package/dist/plus/integrations/reads/drains.js +225 -298
  802. package/dist/plus/integrations/reads/drains.js.map +1 -1
  803. package/dist/plus/integrations/reads/filters.d.ts +84 -80
  804. package/dist/plus/integrations/reads/filters.js +326 -414
  805. package/dist/plus/integrations/reads/filters.js.map +1 -1
  806. package/dist/plus/integrations/reads/hierarchy.d.ts +14 -12
  807. package/dist/plus/integrations/reads/hierarchy.js +248 -332
  808. package/dist/plus/integrations/reads/hierarchy.js.map +1 -1
  809. package/dist/plus/integrations/reads/hierarchy.utils.d.ts +11 -9
  810. package/dist/plus/integrations/reads/hierarchy.utils.js +109 -108
  811. package/dist/plus/integrations/reads/hierarchy.utils.js.map +1 -1
  812. package/dist/plus/integrations/reads/issueBatch.d.ts +28 -26
  813. package/dist/plus/integrations/reads/issueBatch.js +83 -85
  814. package/dist/plus/integrations/reads/issueBatch.js.map +1 -1
  815. package/dist/plus/integrations/reads/issueTracker.d.ts +42 -33
  816. package/dist/plus/integrations/reads/issueTracker.js +265 -386
  817. package/dist/plus/integrations/reads/issueTracker.js.map +1 -1
  818. package/dist/plus/integrations/reads/issues.d.ts +50 -47
  819. package/dist/plus/integrations/reads/issues.js +202 -331
  820. package/dist/plus/integrations/reads/issues.js.map +1 -1
  821. package/dist/plus/integrations/reads/ordering.d.ts +32 -30
  822. package/dist/plus/integrations/reads/ordering.js +47 -43
  823. package/dist/plus/integrations/reads/ordering.js.map +1 -1
  824. package/dist/plus/integrations/reads/paging.d.ts +59 -57
  825. package/dist/plus/integrations/reads/paging.js +244 -261
  826. package/dist/plus/integrations/reads/paging.js.map +1 -1
  827. package/dist/plus/integrations/reads/pullRequests.d.ts +37 -35
  828. package/dist/plus/integrations/reads/pullRequests.js +95 -148
  829. package/dist/plus/integrations/reads/pullRequests.js.map +1 -1
  830. package/dist/plus/integrations/reads/resolveRepository.d.ts +15 -13
  831. package/dist/plus/integrations/reads/resolveRepository.js +147 -229
  832. package/dist/plus/integrations/reads/resolveRepository.js.map +1 -1
  833. package/dist/plus/integrations/reads/searchIssues.d.ts +29 -27
  834. package/dist/plus/integrations/reads/searchIssues.js +104 -153
  835. package/dist/plus/integrations/reads/searchIssues.js.map +1 -1
  836. package/dist/plus/integrations/reads/searchPullRequests.d.ts +20 -18
  837. package/dist/plus/integrations/reads/searchPullRequests.js +91 -113
  838. package/dist/plus/integrations/reads/searchPullRequests.js.map +1 -1
  839. package/dist/plus/integrations/reads/sweeps.d.ts +6 -4
  840. package/dist/plus/integrations/reads/sweeps.js +143 -178
  841. package/dist/plus/integrations/reads/sweeps.js.map +1 -1
  842. package/dist/plus/integrations/reads/trackerIssue.d.ts +24 -16
  843. package/dist/plus/integrations/reads/trackerIssue.js +52 -49
  844. package/dist/plus/integrations/reads/trackerIssue.js.map +1 -1
  845. package/dist/plus/integrations/reads/warnings.d.ts +10 -7
  846. package/dist/plus/integrations/reads/warnings.js +264 -291
  847. package/dist/plus/integrations/reads/warnings.js.map +1 -1
  848. package/dist/plus/integrations/results.d.ts +201 -199
  849. package/dist/plus/integrations/results.js +105 -119
  850. package/dist/plus/integrations/results.js.map +1 -1
  851. package/dist/plus/integrations/telemetry.d.ts +7 -5
  852. package/dist/plus/integrations/telemetry.js +9 -9
  853. package/dist/plus/integrations/telemetry.js.map +1 -1
  854. package/dist/plus/integrations/utils/domain.utils.d.ts +21 -0
  855. package/dist/plus/integrations/utils/domain.utils.js +55 -22
  856. package/dist/plus/integrations/utils/domain.utils.js.map +1 -1
  857. package/dist/plus/integrations/utils/integration.utils.d.ts +30 -6
  858. package/dist/plus/integrations/utils/integration.utils.js +154 -161
  859. package/dist/plus/integrations/utils/integration.utils.js.map +1 -1
  860. package/dist/utils/array.d.ts +9 -7
  861. package/dist/utils/array.js +110 -126
  862. package/dist/utils/array.js.map +1 -1
  863. package/dist/utils/base64.d.ts +2 -2
  864. package/dist/utils/base64.js +2 -2
  865. package/dist/utils/brand.d.ts +4 -3
  866. package/dist/utils/brand.js +0 -2
  867. package/dist/utils/cancellation.d.ts +24 -24
  868. package/dist/utils/cancellation.js +152 -167
  869. package/dist/utils/cancellation.js.map +1 -1
  870. package/dist/utils/charCode.d.ts +31 -37
  871. package/dist/utils/charCode.js +41 -37
  872. package/dist/utils/charCode.js.map +1 -1
  873. package/dist/utils/coalescedRun.d.ts +10 -8
  874. package/dist/utils/coalescedRun.js +39 -41
  875. package/dist/utils/coalescedRun.js.map +1 -1
  876. package/dist/utils/color.d.ts +137 -135
  877. package/dist/utils/color.js +535 -660
  878. package/dist/utils/color.js.map +1 -1
  879. package/dist/utils/counter.d.ts +5 -3
  880. package/dist/utils/counter.js +19 -17
  881. package/dist/utils/counter.js.map +1 -1
  882. package/dist/utils/crypto.d.ts +2 -2
  883. package/dist/utils/crypto.js +2 -2
  884. package/dist/utils/date.d.ts +10 -9
  885. package/dist/utils/date.js +312 -350
  886. package/dist/utils/date.js.map +1 -1
  887. package/dist/utils/debounce.d.ts +45 -43
  888. package/dist/utils/debounce.js +175 -206
  889. package/dist/utils/debounce.js.map +1 -1
  890. package/dist/utils/decorators/debounce.d.ts +3 -1
  891. package/dist/utils/decorators/debounce.js +16 -19
  892. package/dist/utils/decorators/debounce.js.map +1 -1
  893. package/dist/utils/decorators/gate.d.ts +13 -11
  894. package/dist/utils/decorators/gate.js +97 -124
  895. package/dist/utils/decorators/gate.js.map +1 -1
  896. package/dist/utils/decorators/log.d.ts +25 -24
  897. package/dist/utils/decorators/log.js +166 -227
  898. package/dist/utils/decorators/log.js.map +1 -1
  899. package/dist/utils/decorators/memoize.d.ts +10 -8
  900. package/dist/utils/decorators/memoize.js +49 -57
  901. package/dist/utils/decorators/memoize.js.map +1 -1
  902. package/dist/utils/decorators/resolver.d.ts +2 -0
  903. package/dist/utils/decorators/resolver.js +64 -75
  904. package/dist/utils/decorators/resolver.js.map +1 -1
  905. package/dist/utils/decorators/sequentialize.d.ts +15 -14
  906. package/dist/utils/decorators/sequentialize.js +61 -80
  907. package/dist/utils/decorators/sequentialize.js.map +1 -1
  908. package/dist/utils/decorators/serializable.d.ts +2 -0
  909. package/dist/utils/decorators/serializable.js +30 -39
  910. package/dist/utils/decorators/serializable.js.map +1 -1
  911. package/dist/utils/dedupedAsyncCache.d.ts +23 -21
  912. package/dist/utils/dedupedAsyncCache.js +63 -66
  913. package/dist/utils/dedupedAsyncCache.js.map +1 -1
  914. package/dist/utils/diff.d.ts +2 -0
  915. package/dist/utils/diff.js +41 -51
  916. package/dist/utils/diff.js.map +1 -1
  917. package/dist/utils/disposable.d.ts +15 -13
  918. package/dist/utils/disposable.js +71 -80
  919. package/dist/utils/disposable.js.map +1 -1
  920. package/dist/utils/dom.d.ts +45 -0
  921. package/dist/utils/dom.js +106 -0
  922. package/dist/utils/dom.js.map +1 -0
  923. package/dist/utils/encoding.d.ts +2 -0
  924. package/dist/utils/encoding.js +7 -5
  925. package/dist/utils/encoding.js.map +1 -1
  926. package/dist/utils/env/browser/base64.d.ts +2 -0
  927. package/dist/utils/env/browser/base64.js +32 -34
  928. package/dist/utils/env/browser/base64.js.map +1 -1
  929. package/dist/utils/env/browser/crypto.d.ts +2 -0
  930. package/dist/utils/env/browser/crypto.js +17 -13
  931. package/dist/utils/env/browser/crypto.js.map +1 -1
  932. package/dist/utils/env/browser/fs.d.ts +2 -0
  933. package/dist/utils/env/browser/fs.js +6 -2
  934. package/dist/utils/env/browser/fs.js.map +1 -1
  935. package/dist/utils/env/browser/hex.d.ts +2 -0
  936. package/dist/utils/env/browser/hex.js +271 -29
  937. package/dist/utils/env/browser/hex.js.map +1 -1
  938. package/dist/utils/env/browser/hrtime.d.ts +2 -0
  939. package/dist/utils/env/browser/hrtime.js +17 -13
  940. package/dist/utils/env/browser/hrtime.js.map +1 -1
  941. package/dist/utils/env/browser/logScope.d.ts +3 -1
  942. package/dist/utils/env/browser/logScope.js +39 -43
  943. package/dist/utils/env/browser/logScope.js.map +1 -1
  944. package/dist/utils/env/browser/md5.d.ts +2 -0
  945. package/dist/utils/env/browser/md5.js +211 -184
  946. package/dist/utils/env/browser/md5.js.map +1 -1
  947. package/dist/utils/env/browser/platform.d.ts +3 -0
  948. package/dist/utils/env/browser/platform.js +11 -4
  949. package/dist/utils/env/browser/platform.js.map +1 -1
  950. package/dist/utils/env/node/base64.d.ts +2 -0
  951. package/dist/utils/env/node/base64.js +13 -11
  952. package/dist/utils/env/node/base64.js.map +1 -1
  953. package/dist/utils/env/node/crypto.d.ts +2 -0
  954. package/dist/utils/env/node/crypto.js +13 -9
  955. package/dist/utils/env/node/crypto.js.map +1 -1
  956. package/dist/utils/env/node/exec.d.ts +66 -65
  957. package/dist/utils/env/node/exec.js +255 -267
  958. package/dist/utils/env/node/exec.js.map +1 -1
  959. package/dist/utils/env/node/fs.d.ts +2 -0
  960. package/dist/utils/env/node/fs.js +7 -3
  961. package/dist/utils/env/node/fs.js.map +1 -1
  962. package/dist/utils/env/node/hex.d.ts +2 -0
  963. package/dist/utils/env/node/hex.js +10 -6
  964. package/dist/utils/env/node/hex.js.map +1 -1
  965. package/dist/utils/env/node/hrtime.d.ts +2 -2
  966. package/dist/utils/env/node/hrtime.js +2 -2
  967. package/dist/utils/env/node/logScope.d.ts +3 -1
  968. package/dist/utils/env/node/logScope.js +52 -42
  969. package/dist/utils/env/node/logScope.js.map +1 -1
  970. package/dist/utils/env/node/platform.d.ts +3 -0
  971. package/dist/utils/env/node/platform.js +11 -4
  972. package/dist/utils/env/node/platform.js.map +1 -1
  973. package/dist/utils/error.d.ts +8 -6
  974. package/dist/utils/error.js +16 -14
  975. package/dist/utils/error.js.map +1 -1
  976. package/dist/utils/event.d.ts +27 -25
  977. package/dist/utils/event.js +141 -170
  978. package/dist/utils/event.js.map +1 -1
  979. package/dist/utils/formatter.d.ts +15 -14
  980. package/dist/utils/formatter.js +96 -129
  981. package/dist/utils/formatter.js.map +1 -1
  982. package/dist/utils/fs.d.ts +2 -2
  983. package/dist/utils/fs.js +2 -2
  984. package/dist/utils/function.d.ts +5 -6
  985. package/dist/utils/function.js +73 -90
  986. package/dist/utils/function.js.map +1 -1
  987. package/dist/utils/fuzzy.d.ts +18 -16
  988. package/dist/utils/fuzzy.js +121 -127
  989. package/dist/utils/fuzzy.js.map +1 -1
  990. package/dist/utils/gitRefs.d.ts +11 -0
  991. package/dist/utils/gitRefs.js +21 -0
  992. package/dist/utils/gitRefs.js.map +1 -0
  993. package/dist/utils/hash.d.ts +2 -0
  994. package/dist/utils/hash.js +49 -47
  995. package/dist/utils/hash.js.map +1 -1
  996. package/dist/utils/hex.d.ts +2 -2
  997. package/dist/utils/hex.js +2 -2
  998. package/dist/utils/hostingServiceType.d.ts +8 -0
  999. package/dist/utils/hostingServiceType.js +0 -0
  1000. package/dist/utils/hrtime.d.ts +4 -2
  1001. package/dist/utils/hrtime.js +8 -5
  1002. package/dist/utils/hrtime.js.map +1 -1
  1003. package/dist/utils/iterable.d.ts +3 -1
  1004. package/dist/utils/iterable.js +591 -616
  1005. package/dist/utils/iterable.js.map +1 -1
  1006. package/dist/utils/keys/chord.d.ts +27 -25
  1007. package/dist/utils/keys/chord.js +108 -122
  1008. package/dist/utils/keys/chord.js.map +1 -1
  1009. package/dist/utils/keys/keybinding.d.ts +98 -22
  1010. package/dist/utils/keys/keybinding.js +151 -53
  1011. package/dist/utils/keys/keybinding.js.map +1 -1
  1012. package/dist/utils/keys/keymapDispatcher.d.ts +66 -0
  1013. package/dist/utils/keys/keymapDispatcher.js +187 -0
  1014. package/dist/utils/keys/keymapDispatcher.js.map +1 -0
  1015. package/dist/utils/lazy.d.ts +14 -12
  1016. package/dist/utils/lazy.js +35 -36
  1017. package/dist/utils/lazy.js.map +1 -1
  1018. package/dist/utils/loggable.d.ts +3 -1
  1019. package/dist/utils/loggable.js +6 -2
  1020. package/dist/utils/loggable.js.map +1 -1
  1021. package/dist/utils/logger.d.ts +48 -46
  1022. package/dist/utils/logger.js +219 -304
  1023. package/dist/utils/logger.js.map +1 -1
  1024. package/dist/utils/logger.scoped.d.ts +30 -28
  1025. package/dist/utils/logger.scoped.js +133 -147
  1026. package/dist/utils/logger.scoped.js.map +1 -1
  1027. package/dist/utils/lruMap.d.ts +34 -32
  1028. package/dist/utils/lruMap.js +97 -101
  1029. package/dist/utils/lruMap.js.map +1 -1
  1030. package/dist/utils/markdown.d.ts +5 -3
  1031. package/dist/utils/markdown.js +52 -88
  1032. package/dist/utils/markdown.js.map +1 -1
  1033. package/dist/utils/mru.d.ts +13 -11
  1034. package/dist/utils/mru.js +57 -62
  1035. package/dist/utils/mru.js.map +1 -1
  1036. package/dist/utils/object.d.ts +9 -34
  1037. package/dist/utils/object.js +132 -191
  1038. package/dist/utils/object.js.map +1 -1
  1039. package/dist/utils/paging.d.ts +36 -34
  1040. package/dist/utils/paging.js +42 -45
  1041. package/dist/utils/paging.js.map +1 -1
  1042. package/dist/utils/path.d.ts +4 -1
  1043. package/dist/utils/path.js +129 -162
  1044. package/dist/utils/path.js.map +1 -1
  1045. package/dist/utils/pausedOperation.d.ts +42 -0
  1046. package/dist/utils/pausedOperation.js +62 -0
  1047. package/dist/utils/pausedOperation.js.map +1 -0
  1048. package/dist/utils/platform.d.ts +2 -2
  1049. package/dist/utils/platform.js +2 -2
  1050. package/dist/utils/plural.d.ts +21 -0
  1051. package/dist/utils/plural.js +136 -0
  1052. package/dist/utils/plural.js.map +1 -0
  1053. package/dist/utils/promise.d.ts +19 -18
  1054. package/dist/utils/promise.js +323 -360
  1055. package/dist/utils/promise.js.map +1 -1
  1056. package/dist/utils/promiseCache.d.ts +331 -330
  1057. package/dist/utils/promiseCache.js +602 -717
  1058. package/dist/utils/promiseCache.js.map +1 -1
  1059. package/dist/utils/resourceUsage.d.ts +2 -0
  1060. package/dist/utils/resourceUsage.js +0 -2
  1061. package/dist/utils/searchTree.d.ts +51 -49
  1062. package/dist/utils/searchTree.js +306 -396
  1063. package/dist/utils/searchTree.js.map +1 -1
  1064. package/dist/utils/stopwatch.d.ts +33 -32
  1065. package/dist/utils/stopwatch.js +67 -81
  1066. package/dist/utils/stopwatch.js.map +1 -1
  1067. package/dist/utils/string.d.ts +17 -24
  1068. package/dist/utils/string.js +787 -803
  1069. package/dist/utils/string.js.map +1 -1
  1070. package/dist/utils/subscriptionManager.d.ts +15 -14
  1071. package/dist/utils/subscriptionManager.js +36 -33
  1072. package/dist/utils/subscriptionManager.js.map +1 -1
  1073. package/dist/utils/trie.d.ts +64 -62
  1074. package/dist/utils/trie.js +438 -580
  1075. package/dist/utils/trie.js.map +1 -1
  1076. package/dist/utils/types.d.ts +8 -16
  1077. package/dist/utils/types.js +0 -2
  1078. package/dist/utils/uri.d.ts +27 -25
  1079. package/dist/utils/uri.js +42 -42
  1080. package/dist/utils/uri.js.map +1 -1
  1081. package/dist/utils/validation.d.ts +13 -12
  1082. package/dist/utils/validation.js +17 -23
  1083. package/dist/utils/validation.js.map +1 -1
  1084. package/dist/utils/version.d.ts +6 -5
  1085. package/dist/utils/version.js +77 -104
  1086. package/dist/utils/version.js.map +1 -1
  1087. package/docs/integrations.md +101 -24
  1088. package/docs/kepler-read-api-parity.md +15 -12
  1089. package/package.json +18 -8
  1090. package/dist/git/cache.d.ts.map +0 -1
  1091. package/dist/git/context.d.ts.map +0 -1
  1092. package/dist/git/errors.d.ts.map +0 -1
  1093. package/dist/git/features.d.ts.map +0 -1
  1094. package/dist/git/gitHealth.d.ts.map +0 -1
  1095. package/dist/git/models/author.d.ts.map +0 -1
  1096. package/dist/git/models/author.js.map +0 -1
  1097. package/dist/git/models/autolink.d.ts.map +0 -1
  1098. package/dist/git/models/autolink.js.map +0 -1
  1099. package/dist/git/models/blame.d.ts.map +0 -1
  1100. package/dist/git/models/blame.js.map +0 -1
  1101. package/dist/git/models/branch.d.ts.map +0 -1
  1102. package/dist/git/models/commit.d.ts.map +0 -1
  1103. package/dist/git/models/contributor.d.ts.map +0 -1
  1104. package/dist/git/models/defaultBranch.d.ts.map +0 -1
  1105. package/dist/git/models/defaultBranch.js.map +0 -1
  1106. package/dist/git/models/diff.d.ts.map +0 -1
  1107. package/dist/git/models/diff.js.map +0 -1
  1108. package/dist/git/models/file.d.ts.map +0 -1
  1109. package/dist/git/models/file.js.map +0 -1
  1110. package/dist/git/models/fileChange.d.ts.map +0 -1
  1111. package/dist/git/models/fileStatus.d.ts.map +0 -1
  1112. package/dist/git/models/graph.d.ts.map +0 -1
  1113. package/dist/git/models/graphSearch.d.ts.map +0 -1
  1114. package/dist/git/models/graphSearch.js.map +0 -1
  1115. package/dist/git/models/graphSession.d.ts.map +0 -1
  1116. package/dist/git/models/issue.d.ts.map +0 -1
  1117. package/dist/git/models/issueOrPullRequest.d.ts.map +0 -1
  1118. package/dist/git/models/issueOrPullRequest.js.map +0 -1
  1119. package/dist/git/models/lineRange.d.ts.map +0 -1
  1120. package/dist/git/models/lineRange.js.map +0 -1
  1121. package/dist/git/models/log.d.ts.map +0 -1
  1122. package/dist/git/models/log.js.map +0 -1
  1123. package/dist/git/models/mergeConflicts.d.ts.map +0 -1
  1124. package/dist/git/models/mergeConflicts.js.map +0 -1
  1125. package/dist/git/models/patch.d.ts.map +0 -1
  1126. package/dist/git/models/patch.js.map +0 -1
  1127. package/dist/git/models/pausedOperationStatus.d.ts.map +0 -1
  1128. package/dist/git/models/pausedOperationStatus.js.map +0 -1
  1129. package/dist/git/models/pullRequest.d.ts.map +0 -1
  1130. package/dist/git/models/rebase.d.ts.map +0 -1
  1131. package/dist/git/models/rebase.js.map +0 -1
  1132. package/dist/git/models/reference.d.ts.map +0 -1
  1133. package/dist/git/models/reference.js.map +0 -1
  1134. package/dist/git/models/reflog.d.ts.map +0 -1
  1135. package/dist/git/models/remote.d.ts.map +0 -1
  1136. package/dist/git/models/remoteProvider.d.ts.map +0 -1
  1137. package/dist/git/models/remoteResource.d.ts.map +0 -1
  1138. package/dist/git/models/repository.d.ts.map +0 -1
  1139. package/dist/git/models/repositoryChangeEvent.d.ts.map +0 -1
  1140. package/dist/git/models/repositoryIdentities.d.ts.map +0 -1
  1141. package/dist/git/models/repositoryMetadata.d.ts.map +0 -1
  1142. package/dist/git/models/repositoryMetadata.js.map +0 -1
  1143. package/dist/git/models/resourceDescriptor.d.ts.map +0 -1
  1144. package/dist/git/models/resourceDescriptor.js.map +0 -1
  1145. package/dist/git/models/revision.d.ts.map +0 -1
  1146. package/dist/git/models/search.d.ts.map +0 -1
  1147. package/dist/git/models/shortlog.d.ts.map +0 -1
  1148. package/dist/git/models/shortlog.js.map +0 -1
  1149. package/dist/git/models/signature.d.ts.map +0 -1
  1150. package/dist/git/models/signature.js.map +0 -1
  1151. package/dist/git/models/staging.d.ts.map +0 -1
  1152. package/dist/git/models/staging.js.map +0 -1
  1153. package/dist/git/models/stash.d.ts.map +0 -1
  1154. package/dist/git/models/stash.js.map +0 -1
  1155. package/dist/git/models/status.d.ts.map +0 -1
  1156. package/dist/git/models/statusFile.d.ts.map +0 -1
  1157. package/dist/git/models/tag.d.ts.map +0 -1
  1158. package/dist/git/models/tree.d.ts.map +0 -1
  1159. package/dist/git/models/tree.js.map +0 -1
  1160. package/dist/git/models/user.d.ts.map +0 -1
  1161. package/dist/git/models/user.js.map +0 -1
  1162. package/dist/git/models/worktree.d.ts.map +0 -1
  1163. package/dist/git/parsers/diffParser.d.ts.map +0 -1
  1164. package/dist/git/parsers/rebaseTodoParser.d.ts.map +0 -1
  1165. package/dist/git/providers/blame.d.ts.map +0 -1
  1166. package/dist/git/providers/blame.js.map +0 -1
  1167. package/dist/git/providers/branches.d.ts.map +0 -1
  1168. package/dist/git/providers/branches.js.map +0 -1
  1169. package/dist/git/providers/commits.d.ts.map +0 -1
  1170. package/dist/git/providers/commits.js.map +0 -1
  1171. package/dist/git/providers/config.d.ts.map +0 -1
  1172. package/dist/git/providers/config.js.map +0 -1
  1173. package/dist/git/providers/contributors.d.ts.map +0 -1
  1174. package/dist/git/providers/contributors.js.map +0 -1
  1175. package/dist/git/providers/diff.d.ts.map +0 -1
  1176. package/dist/git/providers/diff.js.map +0 -1
  1177. package/dist/git/providers/graph.d.ts.map +0 -1
  1178. package/dist/git/providers/graph.js.map +0 -1
  1179. package/dist/git/providers/maintenance.d.ts.map +0 -1
  1180. package/dist/git/providers/maintenance.js.map +0 -1
  1181. package/dist/git/providers/operations.d.ts.map +0 -1
  1182. package/dist/git/providers/operations.js.map +0 -1
  1183. package/dist/git/providers/patch.d.ts.map +0 -1
  1184. package/dist/git/providers/patch.js.map +0 -1
  1185. package/dist/git/providers/pausedOperations.d.ts.map +0 -1
  1186. package/dist/git/providers/pausedOperations.js.map +0 -1
  1187. package/dist/git/providers/provider.d.ts.map +0 -1
  1188. package/dist/git/providers/provider.js.map +0 -1
  1189. package/dist/git/providers/refs.d.ts.map +0 -1
  1190. package/dist/git/providers/refs.js.map +0 -1
  1191. package/dist/git/providers/remotes.d.ts.map +0 -1
  1192. package/dist/git/providers/remotes.js.map +0 -1
  1193. package/dist/git/providers/revision.d.ts.map +0 -1
  1194. package/dist/git/providers/revision.js.map +0 -1
  1195. package/dist/git/providers/shared/remotes.d.ts.map +0 -1
  1196. package/dist/git/providers/staging.d.ts.map +0 -1
  1197. package/dist/git/providers/staging.js.map +0 -1
  1198. package/dist/git/providers/stash.d.ts.map +0 -1
  1199. package/dist/git/providers/stash.js.map +0 -1
  1200. package/dist/git/providers/status.d.ts.map +0 -1
  1201. package/dist/git/providers/status.js.map +0 -1
  1202. package/dist/git/providers/tags.d.ts.map +0 -1
  1203. package/dist/git/providers/tags.js.map +0 -1
  1204. package/dist/git/providers/types.d.ts.map +0 -1
  1205. package/dist/git/providers/types.js.map +0 -1
  1206. package/dist/git/providers/worktrees.d.ts.map +0 -1
  1207. package/dist/git/providers/worktrees.js.map +0 -1
  1208. package/dist/git/remotes/azure-devops.d.ts.map +0 -1
  1209. package/dist/git/remotes/bitbucket-server.d.ts.map +0 -1
  1210. package/dist/git/remotes/bitbucket.d.ts.map +0 -1
  1211. package/dist/git/remotes/custom.d.ts.map +0 -1
  1212. package/dist/git/remotes/gerrit.d.ts.map +0 -1
  1213. package/dist/git/remotes/gitea.d.ts.map +0 -1
  1214. package/dist/git/remotes/github.d.ts.map +0 -1
  1215. package/dist/git/remotes/gitlab.d.ts.map +0 -1
  1216. package/dist/git/remotes/google-source.d.ts.map +0 -1
  1217. package/dist/git/remotes/matcher.d.ts.map +0 -1
  1218. package/dist/git/repositoryService.d.ts.map +0 -1
  1219. package/dist/git/run.types.d.ts.map +0 -1
  1220. package/dist/git/run.types.js.map +0 -1
  1221. package/dist/git/service.d.ts.map +0 -1
  1222. package/dist/git/utils/autolink.utils.d.ts.map +0 -1
  1223. package/dist/git/utils/blame.utils.d.ts.map +0 -1
  1224. package/dist/git/utils/branch.utils.d.ts.map +0 -1
  1225. package/dist/git/utils/commit.utils.d.ts.map +0 -1
  1226. package/dist/git/utils/config.utils.d.ts.map +0 -1
  1227. package/dist/git/utils/conflictResolution.utils.d.ts.map +0 -1
  1228. package/dist/git/utils/contributor.utils.d.ts.map +0 -1
  1229. package/dist/git/utils/fetch.utils.d.ts.map +0 -1
  1230. package/dist/git/utils/fileStatus.utils.d.ts.map +0 -1
  1231. package/dist/git/utils/graph.utils.d.ts.map +0 -1
  1232. package/dist/git/utils/issue.utils.d.ts.map +0 -1
  1233. package/dist/git/utils/issueOrPullRequest.utils.d.ts.map +0 -1
  1234. package/dist/git/utils/mergeConflicts.utils.d.ts.map +0 -1
  1235. package/dist/git/utils/pausedOperationStatus.utils.d.ts.map +0 -1
  1236. package/dist/git/utils/pullRequest.utils.d.ts.map +0 -1
  1237. package/dist/git/utils/reachability.utils.d.ts.map +0 -1
  1238. package/dist/git/utils/rebase.utils.d.ts.map +0 -1
  1239. package/dist/git/utils/reference.utils.d.ts.map +0 -1
  1240. package/dist/git/utils/remote.utils.d.ts.map +0 -1
  1241. package/dist/git/utils/repository.utils.d.ts.map +0 -1
  1242. package/dist/git/utils/resourceDescriptor.utils.d.ts.map +0 -1
  1243. package/dist/git/utils/revision.utils.d.ts.map +0 -1
  1244. package/dist/git/utils/search.utils.d.ts.map +0 -1
  1245. package/dist/git/utils/sorting.d.ts.map +0 -1
  1246. package/dist/git/utils/sshKey.utils.d.ts.map +0 -1
  1247. package/dist/git/utils/status.utils.d.ts.map +0 -1
  1248. package/dist/git/utils/statusFile.utils.d.ts.map +0 -1
  1249. package/dist/git/utils/tag.utils.d.ts.map +0 -1
  1250. package/dist/git/utils/tooltip.utils.d.ts.map +0 -1
  1251. package/dist/git/utils/uriAuthority.d.ts.map +0 -1
  1252. package/dist/git/utils/user.utils.d.ts.map +0 -1
  1253. package/dist/git/utils/worktree.utils.d.ts.map +0 -1
  1254. package/dist/git/watching/changeEvent.d.ts.map +0 -1
  1255. package/dist/git/watching/classifyChange.d.ts.map +0 -1
  1256. package/dist/git/watching/gitIgnoreFilter.d.ts.map +0 -1
  1257. package/dist/git/watching/initWatcher.d.ts.map +0 -1
  1258. package/dist/git/watching/provider.d.ts.map +0 -1
  1259. package/dist/git/watching/provider.js.map +0 -1
  1260. package/dist/git/watching/watchGroup.d.ts.map +0 -1
  1261. package/dist/git/watching/watchService.d.ts.map +0 -1
  1262. package/dist/git/watching/watchSession.d.ts.map +0 -1
  1263. package/dist/git/watching/watcherPatterns.d.ts.map +0 -1
  1264. package/dist/git-cli/cliGitProvider.d.ts.map +0 -1
  1265. package/dist/git-cli/exec/exec.d.ts.map +0 -1
  1266. package/dist/git-cli/exec/exec.errors.d.ts.map +0 -1
  1267. package/dist/git-cli/exec/exec.errors.js.map +0 -1
  1268. package/dist/git-cli/exec/exec.js.map +0 -1
  1269. package/dist/git-cli/exec/exec.types.d.ts.map +0 -1
  1270. package/dist/git-cli/exec/exec.types.js.map +0 -1
  1271. package/dist/git-cli/exec/features.d.ts.map +0 -1
  1272. package/dist/git-cli/exec/features.js.map +0 -1
  1273. package/dist/git-cli/exec/git.d.ts.map +0 -1
  1274. package/dist/git-cli/exec/gitQueue.d.ts.map +0 -1
  1275. package/dist/git-cli/exec/locator.d.ts.map +0 -1
  1276. package/dist/git-cli/parsers/blameParser.d.ts.map +0 -1
  1277. package/dist/git-cli/parsers/indexParser.d.ts.map +0 -1
  1278. package/dist/git-cli/parsers/logParser.d.ts.map +0 -1
  1279. package/dist/git-cli/parsers/mergeTreeParser.d.ts.map +0 -1
  1280. package/dist/git-cli/parsers/refParser.d.ts.map +0 -1
  1281. package/dist/git-cli/parsers/reflogParser.d.ts.map +0 -1
  1282. package/dist/git-cli/parsers/remoteParser.d.ts.map +0 -1
  1283. package/dist/git-cli/parsers/shortlogParser.d.ts.map +0 -1
  1284. package/dist/git-cli/parsers/signatureParser.d.ts.map +0 -1
  1285. package/dist/git-cli/parsers/sshSignatureParser.d.ts.map +0 -1
  1286. package/dist/git-cli/parsers/statusParser.d.ts.map +0 -1
  1287. package/dist/git-cli/parsers/treeParser.d.ts.map +0 -1
  1288. package/dist/git-cli/parsers/worktreeParser.d.ts.map +0 -1
  1289. package/dist/git-cli/providers/blame.d.ts.map +0 -1
  1290. package/dist/git-cli/providers/branches.d.ts.map +0 -1
  1291. package/dist/git-cli/providers/commitFilesetUtils.d.ts.map +0 -1
  1292. package/dist/git-cli/providers/commits.d.ts.map +0 -1
  1293. package/dist/git-cli/providers/config.d.ts.map +0 -1
  1294. package/dist/git-cli/providers/contributors.d.ts.map +0 -1
  1295. package/dist/git-cli/providers/diff.d.ts.map +0 -1
  1296. package/dist/git-cli/providers/graph.d.ts.map +0 -1
  1297. package/dist/git-cli/providers/maintenance.d.ts.map +0 -1
  1298. package/dist/git-cli/providers/operations.d.ts.map +0 -1
  1299. package/dist/git-cli/providers/patch.d.ts.map +0 -1
  1300. package/dist/git-cli/providers/pausedOperations.d.ts.map +0 -1
  1301. package/dist/git-cli/providers/refs.d.ts.map +0 -1
  1302. package/dist/git-cli/providers/remotes.d.ts.map +0 -1
  1303. package/dist/git-cli/providers/revision.d.ts.map +0 -1
  1304. package/dist/git-cli/providers/staging.d.ts.map +0 -1
  1305. package/dist/git-cli/providers/stash.d.ts.map +0 -1
  1306. package/dist/git-cli/providers/status.d.ts.map +0 -1
  1307. package/dist/git-cli/providers/tags.d.ts.map +0 -1
  1308. package/dist/git-cli/providers/worktrees.d.ts.map +0 -1
  1309. package/dist/git-cli/service.d.ts.map +0 -1
  1310. package/dist/ipc/discovery.d.ts.map +0 -1
  1311. package/dist/ipc/ipcServer.d.ts.map +0 -1
  1312. package/dist/plus/agents/agentCapabilities.d.ts.map +0 -1
  1313. package/dist/plus/agents/providers/claudeCodeTranscript.d.ts.map +0 -1
  1314. package/dist/plus/agents/providers/gkAgentProvider.d.ts.map +0 -1
  1315. package/dist/plus/agents/sanitizePrompt.d.ts.map +0 -1
  1316. package/dist/plus/agents/stateMachine.d.ts.map +0 -1
  1317. package/dist/plus/agents/types.d.ts.map +0 -1
  1318. package/dist/plus/ai/constants.d.ts.map +0 -1
  1319. package/dist/plus/ai/errors.d.ts.map +0 -1
  1320. package/dist/plus/ai/models/conversation.d.ts.map +0 -1
  1321. package/dist/plus/ai/models/model.d.ts.map +0 -1
  1322. package/dist/plus/ai/models/promptTemplates.d.ts.map +0 -1
  1323. package/dist/plus/ai/models/promptTemplates.js.map +0 -1
  1324. package/dist/plus/ai/models/provider.d.ts.map +0 -1
  1325. package/dist/plus/ai/models/provider.js.map +0 -1
  1326. package/dist/plus/ai/models/results.d.ts.map +0 -1
  1327. package/dist/plus/ai/models/results.js.map +0 -1
  1328. package/dist/plus/ai/prompts.d.ts.map +0 -1
  1329. package/dist/plus/ai/providers/anthropicProvider.d.ts.map +0 -1
  1330. package/dist/plus/ai/providers/azureProvider.d.ts.map +0 -1
  1331. package/dist/plus/ai/providers/context.d.ts.map +0 -1
  1332. package/dist/plus/ai/providers/context.js.map +0 -1
  1333. package/dist/plus/ai/providers/deepSeekProvider.d.ts.map +0 -1
  1334. package/dist/plus/ai/providers/geminiProvider.d.ts.map +0 -1
  1335. package/dist/plus/ai/providers/gitkrakenProvider.d.ts.map +0 -1
  1336. package/dist/plus/ai/providers/huggingFaceProvider.d.ts.map +0 -1
  1337. package/dist/plus/ai/providers/mistralProvider.d.ts.map +0 -1
  1338. package/dist/plus/ai/providers/ollamaProvider.d.ts.map +0 -1
  1339. package/dist/plus/ai/providers/openAICompatibleProvider.d.ts.map +0 -1
  1340. package/dist/plus/ai/providers/openAICompatibleProviderBase.d.ts.map +0 -1
  1341. package/dist/plus/ai/providers/openRouterProvider.d.ts.map +0 -1
  1342. package/dist/plus/ai/providers/openaiProvider.d.ts.map +0 -1
  1343. package/dist/plus/ai/providers/responseFormatCache.d.ts.map +0 -1
  1344. package/dist/plus/ai/providers/xaiProvider.d.ts.map +0 -1
  1345. package/dist/plus/ai/utils/ai.utils.d.ts.map +0 -1
  1346. package/dist/plus/ai/utils/results.utils.d.ts.map +0 -1
  1347. package/dist/plus/ai/utils/truncation.utils.d.ts.map +0 -1
  1348. package/dist/plus/git-github/api/config.d.ts.map +0 -1
  1349. package/dist/plus/git-github/api/github.d.ts.map +0 -1
  1350. package/dist/plus/git-github/api/github.utils.d.ts.map +0 -1
  1351. package/dist/plus/git-github/api/issueSearchQuery.d.ts.map +0 -1
  1352. package/dist/plus/git-github/api/pullRequestSearchQuery.d.ts.map +0 -1
  1353. package/dist/plus/git-github/api/token.d.ts.map +0 -1
  1354. package/dist/plus/git-github/api/token.js.map +0 -1
  1355. package/dist/plus/git-github/api/tokenUtils.d.ts.map +0 -1
  1356. package/dist/plus/git-github/api/types.d.ts.map +0 -1
  1357. package/dist/plus/git-github/api/types.js.map +0 -1
  1358. package/dist/plus/git-github/context.d.ts.map +0 -1
  1359. package/dist/plus/git-github/models.d.ts.map +0 -1
  1360. package/dist/plus/git-github/providers/github/blame.d.ts.map +0 -1
  1361. package/dist/plus/git-github/providers/github/branches.d.ts.map +0 -1
  1362. package/dist/plus/git-github/providers/github/commits.d.ts.map +0 -1
  1363. package/dist/plus/git-github/providers/github/config.d.ts.map +0 -1
  1364. package/dist/plus/git-github/providers/github/contributors.d.ts.map +0 -1
  1365. package/dist/plus/git-github/providers/github/diff.d.ts.map +0 -1
  1366. package/dist/plus/git-github/providers/github/graph.d.ts.map +0 -1
  1367. package/dist/plus/git-github/providers/github/refs.d.ts.map +0 -1
  1368. package/dist/plus/git-github/providers/github/remotes.d.ts.map +0 -1
  1369. package/dist/plus/git-github/providers/github/revision.d.ts.map +0 -1
  1370. package/dist/plus/git-github/providers/github/status.d.ts.map +0 -1
  1371. package/dist/plus/git-github/providers/github/tags.d.ts.map +0 -1
  1372. package/dist/plus/git-github/providers/githubGitProvider.d.ts.map +0 -1
  1373. package/dist/plus/git-github/providers/githubProvider.d.ts.map +0 -1
  1374. package/dist/plus/git-github/providers/githubProvider.js.map +0 -1
  1375. package/dist/plus/integrations/authentication/cloudIntegrationService.d.ts.map +0 -1
  1376. package/dist/plus/integrations/authentication/configuredIntegrationService.d.ts.map +0 -1
  1377. package/dist/plus/integrations/authentication/integrationAuthenticationProvider.d.ts.map +0 -1
  1378. package/dist/plus/integrations/authentication/integrationAuthenticationService.d.ts.map +0 -1
  1379. package/dist/plus/integrations/authentication/manualTokenProvider.d.ts.map +0 -1
  1380. package/dist/plus/integrations/authentication/models.d.ts.map +0 -1
  1381. package/dist/plus/integrations/authentication/rejectedTokenTracker.d.ts.map +0 -1
  1382. package/dist/plus/integrations/collectionMetadata.d.ts.map +0 -1
  1383. package/dist/plus/integrations/constants.d.ts.map +0 -1
  1384. package/dist/plus/integrations/context.d.ts.map +0 -1
  1385. package/dist/plus/integrations/context.js.map +0 -1
  1386. package/dist/plus/integrations/errors.d.ts.map +0 -1
  1387. package/dist/plus/integrations/index.d.ts.map +0 -1
  1388. package/dist/plus/integrations/integrationService.d.ts.map +0 -1
  1389. package/dist/plus/integrations/lite.d.ts.map +0 -1
  1390. package/dist/plus/integrations/manager.d.ts.map +0 -1
  1391. package/dist/plus/integrations/manager.js.map +0 -1
  1392. package/dist/plus/integrations/models/gitHostIntegration.d.ts.map +0 -1
  1393. package/dist/plus/integrations/models/integration.d.ts.map +0 -1
  1394. package/dist/plus/integrations/models/issueCache.d.ts.map +0 -1
  1395. package/dist/plus/integrations/models/issueReads.d.ts.map +0 -1
  1396. package/dist/plus/integrations/models/issueReads.js.map +0 -1
  1397. package/dist/plus/integrations/models/issuesIntegration.d.ts.map +0 -1
  1398. package/dist/plus/integrations/models/pullRequestReads.d.ts.map +0 -1
  1399. package/dist/plus/integrations/models/pullRequestReads.js.map +0 -1
  1400. package/dist/plus/integrations/providerFilters.d.ts.map +0 -1
  1401. package/dist/plus/integrations/providers/accounts.d.ts.map +0 -1
  1402. package/dist/plus/integrations/providers/apiClients.d.ts.map +0 -1
  1403. package/dist/plus/integrations/providers/apiConfig.d.ts.map +0 -1
  1404. package/dist/plus/integrations/providers/azure/azure.d.ts.map +0 -1
  1405. package/dist/plus/integrations/providers/azure/models.d.ts.map +0 -1
  1406. package/dist/plus/integrations/providers/azureDevOps.d.ts.map +0 -1
  1407. package/dist/plus/integrations/providers/bitbucket/bitbucket.d.ts.map +0 -1
  1408. package/dist/plus/integrations/providers/bitbucket/models.d.ts.map +0 -1
  1409. package/dist/plus/integrations/providers/bitbucket-server/models.d.ts.map +0 -1
  1410. package/dist/plus/integrations/providers/bitbucket-server.d.ts.map +0 -1
  1411. package/dist/plus/integrations/providers/bitbucket.d.ts.map +0 -1
  1412. package/dist/plus/integrations/providers/github/github.d.ts.map +0 -1
  1413. package/dist/plus/integrations/providers/github/github.utils.d.ts.map +0 -1
  1414. package/dist/plus/integrations/providers/github/models.d.ts.map +0 -1
  1415. package/dist/plus/integrations/providers/github/models.js.map +0 -1
  1416. package/dist/plus/integrations/providers/github.d.ts.map +0 -1
  1417. package/dist/plus/integrations/providers/gitlab/gitlab.d.ts.map +0 -1
  1418. package/dist/plus/integrations/providers/gitlab/gitlab.utils.d.ts.map +0 -1
  1419. package/dist/plus/integrations/providers/gitlab/models.d.ts.map +0 -1
  1420. package/dist/plus/integrations/providers/gitlab.d.ts.map +0 -1
  1421. package/dist/plus/integrations/providers/issueSorts.d.ts.map +0 -1
  1422. package/dist/plus/integrations/providers/jira.d.ts.map +0 -1
  1423. package/dist/plus/integrations/providers/jiraIssueByKey.d.ts.map +0 -1
  1424. package/dist/plus/integrations/providers/linear.d.ts.map +0 -1
  1425. package/dist/plus/integrations/providers/models.d.ts.map +0 -1
  1426. package/dist/plus/integrations/providers/providerErrors.d.ts.map +0 -1
  1427. package/dist/plus/integrations/providers/providersApi.d.ts.map +0 -1
  1428. package/dist/plus/integrations/providers/pullRequestReviews.d.ts.map +0 -1
  1429. package/dist/plus/integrations/providers/trello.d.ts.map +0 -1
  1430. package/dist/plus/integrations/providers/utils/providerPaging.d.ts.map +0 -1
  1431. package/dist/plus/integrations/providers/utils.d.ts.map +0 -1
  1432. package/dist/plus/integrations/reads/broaden.d.ts.map +0 -1
  1433. package/dist/plus/integrations/reads/context.d.ts.map +0 -1
  1434. package/dist/plus/integrations/reads/context.js.map +0 -1
  1435. package/dist/plus/integrations/reads/counts.d.ts.map +0 -1
  1436. package/dist/plus/integrations/reads/cursors.d.ts.map +0 -1
  1437. package/dist/plus/integrations/reads/drains.d.ts.map +0 -1
  1438. package/dist/plus/integrations/reads/filters.d.ts.map +0 -1
  1439. package/dist/plus/integrations/reads/hierarchy.d.ts.map +0 -1
  1440. package/dist/plus/integrations/reads/hierarchy.utils.d.ts.map +0 -1
  1441. package/dist/plus/integrations/reads/issueBatch.d.ts.map +0 -1
  1442. package/dist/plus/integrations/reads/issueTracker.d.ts.map +0 -1
  1443. package/dist/plus/integrations/reads/issues.d.ts.map +0 -1
  1444. package/dist/plus/integrations/reads/ordering.d.ts.map +0 -1
  1445. package/dist/plus/integrations/reads/paging.d.ts.map +0 -1
  1446. package/dist/plus/integrations/reads/pullRequests.d.ts.map +0 -1
  1447. package/dist/plus/integrations/reads/resolveRepository.d.ts.map +0 -1
  1448. package/dist/plus/integrations/reads/searchIssues.d.ts.map +0 -1
  1449. package/dist/plus/integrations/reads/searchPullRequests.d.ts.map +0 -1
  1450. package/dist/plus/integrations/reads/sweeps.d.ts.map +0 -1
  1451. package/dist/plus/integrations/reads/trackerIssue.d.ts.map +0 -1
  1452. package/dist/plus/integrations/reads/warnings.d.ts.map +0 -1
  1453. package/dist/plus/integrations/results.d.ts.map +0 -1
  1454. package/dist/plus/integrations/telemetry.d.ts.map +0 -1
  1455. package/dist/plus/integrations/utils/domain.utils.d.ts.map +0 -1
  1456. package/dist/plus/integrations/utils/integration.utils.d.ts.map +0 -1
  1457. package/dist/utils/array.d.ts.map +0 -1
  1458. package/dist/utils/base64.d.ts.map +0 -1
  1459. package/dist/utils/base64.js.map +0 -1
  1460. package/dist/utils/brand.d.ts.map +0 -1
  1461. package/dist/utils/brand.js.map +0 -1
  1462. package/dist/utils/cancellation.d.ts.map +0 -1
  1463. package/dist/utils/charCode.d.ts.map +0 -1
  1464. package/dist/utils/coalescedRun.d.ts.map +0 -1
  1465. package/dist/utils/color.d.ts.map +0 -1
  1466. package/dist/utils/counter.d.ts.map +0 -1
  1467. package/dist/utils/crypto.d.ts.map +0 -1
  1468. package/dist/utils/crypto.js.map +0 -1
  1469. package/dist/utils/date.d.ts.map +0 -1
  1470. package/dist/utils/debounce.d.ts.map +0 -1
  1471. package/dist/utils/decorators/debounce.d.ts.map +0 -1
  1472. package/dist/utils/decorators/gate.d.ts.map +0 -1
  1473. package/dist/utils/decorators/log.d.ts.map +0 -1
  1474. package/dist/utils/decorators/memoize.d.ts.map +0 -1
  1475. package/dist/utils/decorators/resolver.d.ts.map +0 -1
  1476. package/dist/utils/decorators/sequentialize.d.ts.map +0 -1
  1477. package/dist/utils/decorators/serializable.d.ts.map +0 -1
  1478. package/dist/utils/dedupedAsyncCache.d.ts.map +0 -1
  1479. package/dist/utils/diff.d.ts.map +0 -1
  1480. package/dist/utils/disposable.d.ts.map +0 -1
  1481. package/dist/utils/encoding.d.ts.map +0 -1
  1482. package/dist/utils/env/browser/base64.d.ts.map +0 -1
  1483. package/dist/utils/env/browser/crypto.d.ts.map +0 -1
  1484. package/dist/utils/env/browser/fs.d.ts.map +0 -1
  1485. package/dist/utils/env/browser/hex.d.ts.map +0 -1
  1486. package/dist/utils/env/browser/hrtime.d.ts.map +0 -1
  1487. package/dist/utils/env/browser/logScope.d.ts.map +0 -1
  1488. package/dist/utils/env/browser/md5.d.ts.map +0 -1
  1489. package/dist/utils/env/browser/platform.d.ts.map +0 -1
  1490. package/dist/utils/env/node/base64.d.ts.map +0 -1
  1491. package/dist/utils/env/node/crypto.d.ts.map +0 -1
  1492. package/dist/utils/env/node/exec.d.ts.map +0 -1
  1493. package/dist/utils/env/node/fs.d.ts.map +0 -1
  1494. package/dist/utils/env/node/hex.d.ts.map +0 -1
  1495. package/dist/utils/env/node/hrtime.d.ts.map +0 -1
  1496. package/dist/utils/env/node/hrtime.js.map +0 -1
  1497. package/dist/utils/env/node/logScope.d.ts.map +0 -1
  1498. package/dist/utils/env/node/platform.d.ts.map +0 -1
  1499. package/dist/utils/error.d.ts.map +0 -1
  1500. package/dist/utils/event.d.ts.map +0 -1
  1501. package/dist/utils/formatter.d.ts.map +0 -1
  1502. package/dist/utils/fs.d.ts.map +0 -1
  1503. package/dist/utils/fs.js.map +0 -1
  1504. package/dist/utils/function.d.ts.map +0 -1
  1505. package/dist/utils/fuzzy.d.ts.map +0 -1
  1506. package/dist/utils/hash.d.ts.map +0 -1
  1507. package/dist/utils/hex.d.ts.map +0 -1
  1508. package/dist/utils/hex.js.map +0 -1
  1509. package/dist/utils/hrtime.d.ts.map +0 -1
  1510. package/dist/utils/iterable.d.ts.map +0 -1
  1511. package/dist/utils/keys/chord.d.ts.map +0 -1
  1512. package/dist/utils/keys/keybinding.d.ts.map +0 -1
  1513. package/dist/utils/lazy.d.ts.map +0 -1
  1514. package/dist/utils/loggable.d.ts.map +0 -1
  1515. package/dist/utils/logger.d.ts.map +0 -1
  1516. package/dist/utils/logger.scoped.d.ts.map +0 -1
  1517. package/dist/utils/lruMap.d.ts.map +0 -1
  1518. package/dist/utils/markdown.d.ts.map +0 -1
  1519. package/dist/utils/mru.d.ts.map +0 -1
  1520. package/dist/utils/object.d.ts.map +0 -1
  1521. package/dist/utils/paging.d.ts.map +0 -1
  1522. package/dist/utils/path.d.ts.map +0 -1
  1523. package/dist/utils/platform.d.ts.map +0 -1
  1524. package/dist/utils/platform.js.map +0 -1
  1525. package/dist/utils/promise.d.ts.map +0 -1
  1526. package/dist/utils/promiseCache.d.ts.map +0 -1
  1527. package/dist/utils/resourceUsage.d.ts.map +0 -1
  1528. package/dist/utils/resourceUsage.js.map +0 -1
  1529. package/dist/utils/searchTree.d.ts.map +0 -1
  1530. package/dist/utils/stopwatch.d.ts.map +0 -1
  1531. package/dist/utils/string.d.ts.map +0 -1
  1532. package/dist/utils/subscriptionManager.d.ts.map +0 -1
  1533. package/dist/utils/trie.d.ts.map +0 -1
  1534. package/dist/utils/types.d.ts.map +0 -1
  1535. package/dist/utils/types.js.map +0 -1
  1536. package/dist/utils/uri.d.ts.map +0 -1
  1537. package/dist/utils/validation.d.ts.map +0 -1
  1538. package/dist/utils/version.d.ts.map +0 -1
  1539. package/src/git/cache.ts +0 -1859
  1540. package/src/git/context.ts +0 -301
  1541. package/src/git/errors.ts +0 -1168
  1542. package/src/git/features.ts +0 -98
  1543. package/src/git/gitHealth.ts +0 -522
  1544. package/src/git/models/author.ts +0 -19
  1545. package/src/git/models/autolink.ts +0 -59
  1546. package/src/git/models/blame.ts +0 -46
  1547. package/src/git/models/branch.ts +0 -237
  1548. package/src/git/models/commit.ts +0 -673
  1549. package/src/git/models/contributor.ts +0 -84
  1550. package/src/git/models/defaultBranch.ts +0 -6
  1551. package/src/git/models/diff.ts +0 -74
  1552. package/src/git/models/file.ts +0 -29
  1553. package/src/git/models/fileChange.ts +0 -82
  1554. package/src/git/models/fileStatus.ts +0 -36
  1555. package/src/git/models/graph.ts +0 -444
  1556. package/src/git/models/graphSearch.ts +0 -53
  1557. package/src/git/models/graphSession.ts +0 -102
  1558. package/src/git/models/issue.ts +0 -258
  1559. package/src/git/models/issueOrPullRequest.ts +0 -20
  1560. package/src/git/models/lineRange.ts +0 -7
  1561. package/src/git/models/log.ts +0 -21
  1562. package/src/git/models/mergeConflicts.ts +0 -19
  1563. package/src/git/models/patch.ts +0 -25
  1564. package/src/git/models/pausedOperationStatus.ts +0 -63
  1565. package/src/git/models/pullRequest.ts +0 -353
  1566. package/src/git/models/rebase.ts +0 -60
  1567. package/src/git/models/reference.ts +0 -80
  1568. package/src/git/models/reflog.ts +0 -88
  1569. package/src/git/models/remote.ts +0 -100
  1570. package/src/git/models/remoteProvider.ts +0 -291
  1571. package/src/git/models/remoteResource.ts +0 -87
  1572. package/src/git/models/repository.ts +0 -510
  1573. package/src/git/models/repositoryChangeEvent.ts +0 -30
  1574. package/src/git/models/repositoryIdentities.ts +0 -99
  1575. package/src/git/models/repositoryMetadata.ts +0 -12
  1576. package/src/git/models/resourceDescriptor.ts +0 -28
  1577. package/src/git/models/revision.ts +0 -12
  1578. package/src/git/models/search.ts +0 -138
  1579. package/src/git/models/shortlog.ts +0 -6
  1580. package/src/git/models/signature.ts +0 -45
  1581. package/src/git/models/staging.ts +0 -27
  1582. package/src/git/models/stash.ts +0 -6
  1583. package/src/git/models/status.ts +0 -246
  1584. package/src/git/models/statusFile.ts +0 -131
  1585. package/src/git/models/tag.ts +0 -76
  1586. package/src/git/models/tree.ts +0 -10
  1587. package/src/git/models/user.ts +0 -7
  1588. package/src/git/models/worktree.ts +0 -160
  1589. package/src/git/parsers/diffParser.ts +0 -648
  1590. package/src/git/parsers/rebaseTodoParser.ts +0 -169
  1591. package/src/git/providers/blame.ts +0 -40
  1592. package/src/git/providers/branches.ts +0 -143
  1593. package/src/git/providers/commits.ts +0 -174
  1594. package/src/git/providers/config.ts +0 -167
  1595. package/src/git/providers/contributors.ts +0 -34
  1596. package/src/git/providers/diff.ts +0 -133
  1597. package/src/git/providers/graph.ts +0 -95
  1598. package/src/git/providers/maintenance.ts +0 -224
  1599. package/src/git/providers/operations.ts +0 -164
  1600. package/src/git/providers/patch.ts +0 -31
  1601. package/src/git/providers/pausedOperations.ts +0 -23
  1602. package/src/git/providers/provider.ts +0 -64
  1603. package/src/git/providers/refs.ts +0 -68
  1604. package/src/git/providers/remotes.ts +0 -33
  1605. package/src/git/providers/revision.ts +0 -32
  1606. package/src/git/providers/shared/remotes.ts +0 -95
  1607. package/src/git/providers/staging.ts +0 -36
  1608. package/src/git/providers/stash.ts +0 -51
  1609. package/src/git/providers/status.ts +0 -48
  1610. package/src/git/providers/tags.ts +0 -29
  1611. package/src/git/providers/types.ts +0 -33
  1612. package/src/git/providers/worktrees.ts +0 -37
  1613. package/src/git/remotes/azure-devops.ts +0 -307
  1614. package/src/git/remotes/bitbucket-server.ts +0 -189
  1615. package/src/git/remotes/bitbucket.ts +0 -142
  1616. package/src/git/remotes/custom.ts +0 -162
  1617. package/src/git/remotes/gerrit.ts +0 -186
  1618. package/src/git/remotes/gitea.ts +0 -184
  1619. package/src/git/remotes/github.ts +0 -236
  1620. package/src/git/remotes/gitlab.ts +0 -270
  1621. package/src/git/remotes/google-source.ts +0 -51
  1622. package/src/git/remotes/matcher.ts +0 -215
  1623. package/src/git/repositoryService.ts +0 -180
  1624. package/src/git/run.types.ts +0 -156
  1625. package/src/git/service.ts +0 -369
  1626. package/src/git/utils/autolink.utils.ts +0 -202
  1627. package/src/git/utils/blame.utils.ts +0 -298
  1628. package/src/git/utils/branch.utils.ts +0 -165
  1629. package/src/git/utils/commit.utils.ts +0 -89
  1630. package/src/git/utils/config.utils.ts +0 -8
  1631. package/src/git/utils/conflictResolution.utils.ts +0 -157
  1632. package/src/git/utils/contributor.utils.ts +0 -105
  1633. package/src/git/utils/fetch.utils.ts +0 -48
  1634. package/src/git/utils/fileStatus.utils.ts +0 -62
  1635. package/src/git/utils/graph.utils.ts +0 -46
  1636. package/src/git/utils/issue.utils.ts +0 -177
  1637. package/src/git/utils/issueOrPullRequest.utils.ts +0 -23
  1638. package/src/git/utils/mergeConflicts.utils.ts +0 -21
  1639. package/src/git/utils/pausedOperationStatus.utils.ts +0 -184
  1640. package/src/git/utils/pullRequest.utils.ts +0 -244
  1641. package/src/git/utils/reachability.utils.ts +0 -180
  1642. package/src/git/utils/rebase.utils.ts +0 -128
  1643. package/src/git/utils/reference.utils.ts +0 -267
  1644. package/src/git/utils/remote.utils.ts +0 -146
  1645. package/src/git/utils/repository.utils.ts +0 -18
  1646. package/src/git/utils/resourceDescriptor.utils.ts +0 -26
  1647. package/src/git/utils/revision.utils.ts +0 -149
  1648. package/src/git/utils/search.utils.ts +0 -624
  1649. package/src/git/utils/sorting.ts +0 -329
  1650. package/src/git/utils/sshKey.utils.ts +0 -30
  1651. package/src/git/utils/status.utils.ts +0 -115
  1652. package/src/git/utils/statusFile.utils.ts +0 -182
  1653. package/src/git/utils/tag.utils.ts +0 -17
  1654. package/src/git/utils/tooltip.utils.ts +0 -37
  1655. package/src/git/utils/uriAuthority.ts +0 -34
  1656. package/src/git/utils/user.utils.ts +0 -20
  1657. package/src/git/utils/worktree.utils.ts +0 -21
  1658. package/src/git/watching/changeEvent.ts +0 -95
  1659. package/src/git/watching/classifyChange.ts +0 -104
  1660. package/src/git/watching/gitIgnoreFilter.ts +0 -134
  1661. package/src/git/watching/initWatcher.ts +0 -81
  1662. package/src/git/watching/provider.ts +0 -24
  1663. package/src/git/watching/watchGroup.ts +0 -185
  1664. package/src/git/watching/watchService.ts +0 -430
  1665. package/src/git/watching/watchSession.ts +0 -439
  1666. package/src/git/watching/watcherPatterns.ts +0 -51
  1667. package/src/git-cli/cliGitProvider.ts +0 -461
  1668. package/src/git-cli/exec/exec.errors.ts +0 -1
  1669. package/src/git-cli/exec/exec.ts +0 -11
  1670. package/src/git-cli/exec/exec.types.ts +0 -8
  1671. package/src/git-cli/exec/features.ts +0 -2
  1672. package/src/git-cli/exec/git.ts +0 -1371
  1673. package/src/git-cli/exec/gitQueue.ts +0 -326
  1674. package/src/git-cli/exec/locator.ts +0 -157
  1675. package/src/git-cli/parsers/blameParser.ts +0 -374
  1676. package/src/git-cli/parsers/indexParser.ts +0 -192
  1677. package/src/git-cli/parsers/logParser.ts +0 -1365
  1678. package/src/git-cli/parsers/mergeTreeParser.ts +0 -22
  1679. package/src/git-cli/parsers/refParser.ts +0 -110
  1680. package/src/git-cli/parsers/reflogParser.ts +0 -153
  1681. package/src/git-cli/parsers/remoteParser.ts +0 -95
  1682. package/src/git-cli/parsers/shortlogParser.ts +0 -59
  1683. package/src/git-cli/parsers/signatureParser.ts +0 -162
  1684. package/src/git-cli/parsers/sshSignatureParser.ts +0 -85
  1685. package/src/git-cli/parsers/statusParser.ts +0 -209
  1686. package/src/git-cli/parsers/treeParser.ts +0 -61
  1687. package/src/git-cli/parsers/worktreeParser.ts +0 -111
  1688. package/src/git-cli/providers/blame.ts +0 -598
  1689. package/src/git-cli/providers/branches.ts +0 -1931
  1690. package/src/git-cli/providers/commitFilesetUtils.ts +0 -45
  1691. package/src/git-cli/providers/commits.ts +0 -1856
  1692. package/src/git-cli/providers/config.ts +0 -1025
  1693. package/src/git-cli/providers/contributors.ts +0 -360
  1694. package/src/git-cli/providers/diff.ts +0 -1172
  1695. package/src/git-cli/providers/graph.ts +0 -2237
  1696. package/src/git-cli/providers/maintenance.ts +0 -2599
  1697. package/src/git-cli/providers/operations.ts +0 -1016
  1698. package/src/git-cli/providers/patch.ts +0 -305
  1699. package/src/git-cli/providers/pausedOperations.ts +0 -670
  1700. package/src/git-cli/providers/refs.ts +0 -486
  1701. package/src/git-cli/providers/remotes.ts +0 -115
  1702. package/src/git-cli/providers/revision.ts +0 -383
  1703. package/src/git-cli/providers/staging.ts +0 -210
  1704. package/src/git-cli/providers/stash.ts +0 -577
  1705. package/src/git-cli/providers/status.ts +0 -568
  1706. package/src/git-cli/providers/tags.ts +0 -224
  1707. package/src/git-cli/providers/worktrees.ts +0 -285
  1708. package/src/git-cli/service.ts +0 -82
  1709. package/src/ipc/discovery.ts +0 -186
  1710. package/src/ipc/ipcServer.ts +0 -171
  1711. package/src/plus/agents/agentCapabilities.ts +0 -286
  1712. package/src/plus/agents/providers/claudeCodeTranscript.ts +0 -867
  1713. package/src/plus/agents/providers/gkAgentProvider.ts +0 -4036
  1714. package/src/plus/agents/sanitizePrompt.ts +0 -109
  1715. package/src/plus/agents/stateMachine.ts +0 -197
  1716. package/src/plus/agents/types.ts +0 -500
  1717. package/src/plus/ai/constants.ts +0 -121
  1718. package/src/plus/ai/errors.ts +0 -152
  1719. package/src/plus/ai/models/conversation.ts +0 -35
  1720. package/src/plus/ai/models/model.ts +0 -528
  1721. package/src/plus/ai/models/promptTemplates.ts +0 -171
  1722. package/src/plus/ai/models/provider.ts +0 -125
  1723. package/src/plus/ai/models/results.ts +0 -31
  1724. package/src/plus/ai/prompts.ts +0 -849
  1725. package/src/plus/ai/providers/anthropicProvider.ts +0 -458
  1726. package/src/plus/ai/providers/azureProvider.ts +0 -74
  1727. package/src/plus/ai/providers/context.ts +0 -29
  1728. package/src/plus/ai/providers/deepSeekProvider.ts +0 -46
  1729. package/src/plus/ai/providers/geminiProvider.ts +0 -245
  1730. package/src/plus/ai/providers/gitkrakenProvider.ts +0 -347
  1731. package/src/plus/ai/providers/huggingFaceProvider.ts +0 -64
  1732. package/src/plus/ai/providers/mistralProvider.ts +0 -243
  1733. package/src/plus/ai/providers/ollamaProvider.ts +0 -292
  1734. package/src/plus/ai/providers/openAICompatibleProvider.ts +0 -64
  1735. package/src/plus/ai/providers/openAICompatibleProviderBase.ts +0 -654
  1736. package/src/plus/ai/providers/openRouterProvider.ts +0 -101
  1737. package/src/plus/ai/providers/openaiProvider.ts +0 -47
  1738. package/src/plus/ai/providers/responseFormatCache.ts +0 -39
  1739. package/src/plus/ai/providers/xaiProvider.ts +0 -54
  1740. package/src/plus/ai/utils/ai.utils.ts +0 -95
  1741. package/src/plus/ai/utils/results.utils.ts +0 -407
  1742. package/src/plus/ai/utils/truncation.utils.ts +0 -296
  1743. package/src/plus/git-github/api/config.ts +0 -91
  1744. package/src/plus/git-github/api/github.ts +0 -5462
  1745. package/src/plus/git-github/api/github.utils.ts +0 -36
  1746. package/src/plus/git-github/api/issueSearchQuery.ts +0 -273
  1747. package/src/plus/git-github/api/pullRequestSearchQuery.ts +0 -154
  1748. package/src/plus/git-github/api/token.ts +0 -15
  1749. package/src/plus/git-github/api/tokenUtils.ts +0 -15
  1750. package/src/plus/git-github/api/types.ts +0 -197
  1751. package/src/plus/git-github/context.ts +0 -107
  1752. package/src/plus/git-github/models.ts +0 -623
  1753. package/src/plus/git-github/providers/github/blame.ts +0 -225
  1754. package/src/plus/git-github/providers/github/branches.ts +0 -401
  1755. package/src/plus/git-github/providers/github/commits.ts +0 -929
  1756. package/src/plus/git-github/providers/github/config.ts +0 -47
  1757. package/src/plus/git-github/providers/github/contributors.ts +0 -313
  1758. package/src/plus/git-github/providers/github/diff.ts +0 -281
  1759. package/src/plus/git-github/providers/github/graph.ts +0 -635
  1760. package/src/plus/git-github/providers/github/refs.ts +0 -172
  1761. package/src/plus/git-github/providers/github/remotes.ts +0 -44
  1762. package/src/plus/git-github/providers/github/revision.ts +0 -140
  1763. package/src/plus/git-github/providers/github/status.ts +0 -69
  1764. package/src/plus/git-github/providers/github/tags.ts +0 -148
  1765. package/src/plus/git-github/providers/githubGitProvider.ts +0 -168
  1766. package/src/plus/git-github/providers/githubProvider.ts +0 -65
  1767. package/src/plus/integrations/authentication/cloudIntegrationService.ts +0 -292
  1768. package/src/plus/integrations/authentication/configuredIntegrationService.ts +0 -656
  1769. package/src/plus/integrations/authentication/integrationAuthenticationProvider.ts +0 -385
  1770. package/src/plus/integrations/authentication/integrationAuthenticationService.ts +0 -148
  1771. package/src/plus/integrations/authentication/manualTokenProvider.ts +0 -79
  1772. package/src/plus/integrations/authentication/models.ts +0 -202
  1773. package/src/plus/integrations/authentication/rejectedTokenTracker.ts +0 -56
  1774. package/src/plus/integrations/collectionMetadata.ts +0 -325
  1775. package/src/plus/integrations/constants.ts +0 -190
  1776. package/src/plus/integrations/context.ts +0 -386
  1777. package/src/plus/integrations/errors.ts +0 -188
  1778. package/src/plus/integrations/index.ts +0 -231
  1779. package/src/plus/integrations/integrationService.ts +0 -2003
  1780. package/src/plus/integrations/lite.ts +0 -233
  1781. package/src/plus/integrations/manager.ts +0 -728
  1782. package/src/plus/integrations/models/gitHostIntegration.ts +0 -1862
  1783. package/src/plus/integrations/models/integration.ts +0 -1005
  1784. package/src/plus/integrations/models/issueCache.ts +0 -29
  1785. package/src/plus/integrations/models/issueReads.ts +0 -152
  1786. package/src/plus/integrations/models/issuesIntegration.ts +0 -248
  1787. package/src/plus/integrations/models/pullRequestReads.ts +0 -18
  1788. package/src/plus/integrations/providerFilters.ts +0 -36
  1789. package/src/plus/integrations/providers/accounts.ts +0 -38
  1790. package/src/plus/integrations/providers/apiClients.ts +0 -69
  1791. package/src/plus/integrations/providers/apiConfig.ts +0 -71
  1792. package/src/plus/integrations/providers/azure/azure.ts +0 -822
  1793. package/src/plus/integrations/providers/azure/models.ts +0 -621
  1794. package/src/plus/integrations/providers/azureDevOps.ts +0 -1346
  1795. package/src/plus/integrations/providers/bitbucket/bitbucket.ts +0 -904
  1796. package/src/plus/integrations/providers/bitbucket/models.ts +0 -446
  1797. package/src/plus/integrations/providers/bitbucket-server/models.ts +0 -283
  1798. package/src/plus/integrations/providers/bitbucket-server.ts +0 -445
  1799. package/src/plus/integrations/providers/bitbucket.ts +0 -793
  1800. package/src/plus/integrations/providers/github/github.ts +0 -64
  1801. package/src/plus/integrations/providers/github/github.utils.ts +0 -23
  1802. package/src/plus/integrations/providers/github/models.ts +0 -29
  1803. package/src/plus/integrations/providers/github.ts +0 -940
  1804. package/src/plus/integrations/providers/gitlab/gitlab.ts +0 -1320
  1805. package/src/plus/integrations/providers/gitlab/gitlab.utils.ts +0 -80
  1806. package/src/plus/integrations/providers/gitlab/models.ts +0 -271
  1807. package/src/plus/integrations/providers/gitlab.ts +0 -841
  1808. package/src/plus/integrations/providers/issueSorts.ts +0 -89
  1809. package/src/plus/integrations/providers/jira.ts +0 -596
  1810. package/src/plus/integrations/providers/jiraIssueByKey.ts +0 -155
  1811. package/src/plus/integrations/providers/linear.ts +0 -484
  1812. package/src/plus/integrations/providers/models.ts +0 -1816
  1813. package/src/plus/integrations/providers/providerErrors.ts +0 -115
  1814. package/src/plus/integrations/providers/providersApi.ts +0 -1881
  1815. package/src/plus/integrations/providers/pullRequestReviews.ts +0 -122
  1816. package/src/plus/integrations/providers/trello.ts +0 -208
  1817. package/src/plus/integrations/providers/utils/providerPaging.ts +0 -212
  1818. package/src/plus/integrations/providers/utils.ts +0 -419
  1819. package/src/plus/integrations/reads/broaden.ts +0 -704
  1820. package/src/plus/integrations/reads/context.ts +0 -99
  1821. package/src/plus/integrations/reads/counts.ts +0 -610
  1822. package/src/plus/integrations/reads/cursors.ts +0 -224
  1823. package/src/plus/integrations/reads/drains.ts +0 -420
  1824. package/src/plus/integrations/reads/filters.ts +0 -614
  1825. package/src/plus/integrations/reads/hierarchy.ts +0 -486
  1826. package/src/plus/integrations/reads/hierarchy.utils.ts +0 -155
  1827. package/src/plus/integrations/reads/issueBatch.ts +0 -197
  1828. package/src/plus/integrations/reads/issueTracker.ts +0 -556
  1829. package/src/plus/integrations/reads/issues.ts +0 -600
  1830. package/src/plus/integrations/reads/ordering.ts +0 -124
  1831. package/src/plus/integrations/reads/paging.ts +0 -379
  1832. package/src/plus/integrations/reads/pullRequests.ts +0 -260
  1833. package/src/plus/integrations/reads/resolveRepository.ts +0 -272
  1834. package/src/plus/integrations/reads/searchIssues.ts +0 -274
  1835. package/src/plus/integrations/reads/searchPullRequests.ts +0 -235
  1836. package/src/plus/integrations/reads/sweeps.ts +0 -266
  1837. package/src/plus/integrations/reads/trackerIssue.ts +0 -105
  1838. package/src/plus/integrations/reads/warnings.ts +0 -535
  1839. package/src/plus/integrations/results.ts +0 -443
  1840. package/src/plus/integrations/telemetry.ts +0 -29
  1841. package/src/plus/integrations/utils/domain.utils.ts +0 -26
  1842. package/src/plus/integrations/utils/integration.utils.ts +0 -215
  1843. package/src/utils/array.ts +0 -194
  1844. package/src/utils/base64.ts +0 -1
  1845. package/src/utils/brand.ts +0 -7
  1846. package/src/utils/cancellation.ts +0 -199
  1847. package/src/utils/charCode.ts +0 -38
  1848. package/src/utils/coalescedRun.ts +0 -45
  1849. package/src/utils/color.ts +0 -817
  1850. package/src/utils/counter.ts +0 -21
  1851. package/src/utils/crypto.ts +0 -1
  1852. package/src/utils/date.ts +0 -474
  1853. package/src/utils/debounce.ts +0 -303
  1854. package/src/utils/decorators/debounce.ts +0 -31
  1855. package/src/utils/decorators/gate.ts +0 -167
  1856. package/src/utils/decorators/log.ts +0 -320
  1857. package/src/utils/decorators/memoize.ts +0 -98
  1858. package/src/utils/decorators/resolver.ts +0 -95
  1859. package/src/utils/decorators/sequentialize.ts +0 -118
  1860. package/src/utils/decorators/serializable.ts +0 -43
  1861. package/src/utils/dedupedAsyncCache.ts +0 -74
  1862. package/src/utils/diff.ts +0 -61
  1863. package/src/utils/disposable.ts +0 -156
  1864. package/src/utils/encoding.ts +0 -8
  1865. package/src/utils/env/browser/base64.ts +0 -50
  1866. package/src/utils/env/browser/crypto.ts +0 -21
  1867. package/src/utils/env/browser/fs.ts +0 -3
  1868. package/src/utils/env/browser/hex.ts +0 -41
  1869. package/src/utils/env/browser/hrtime.ts +0 -14
  1870. package/src/utils/env/browser/logScope.ts +0 -57
  1871. package/src/utils/env/browser/md5.ts +0 -217
  1872. package/src/utils/env/browser/platform.ts +0 -10
  1873. package/src/utils/env/node/base64.ts +0 -19
  1874. package/src/utils/env/node/crypto.ts +0 -17
  1875. package/src/utils/env/node/exec.ts +0 -488
  1876. package/src/utils/env/node/fs.ts +0 -5
  1877. package/src/utils/env/node/hex.ts +0 -11
  1878. package/src/utils/env/node/hrtime.ts +0 -1
  1879. package/src/utils/env/node/logScope.ts +0 -63
  1880. package/src/utils/env/node/platform.ts +0 -5
  1881. package/src/utils/error.ts +0 -18
  1882. package/src/utils/event.ts +0 -230
  1883. package/src/utils/formatter.ts +0 -198
  1884. package/src/utils/fs.ts +0 -1
  1885. package/src/utils/function.ts +0 -141
  1886. package/src/utils/fuzzy.ts +0 -185
  1887. package/src/utils/hash.ts +0 -60
  1888. package/src/utils/hex.ts +0 -1
  1889. package/src/utils/hrtime.ts +0 -8
  1890. package/src/utils/iterable.ts +0 -797
  1891. package/src/utils/keys/chord.ts +0 -184
  1892. package/src/utils/keys/keybinding.ts +0 -116
  1893. package/src/utils/lazy.ts +0 -39
  1894. package/src/utils/loggable.ts +0 -7
  1895. package/src/utils/logger.scoped.ts +0 -237
  1896. package/src/utils/logger.ts +0 -403
  1897. package/src/utils/lruMap.ts +0 -112
  1898. package/src/utils/markdown.ts +0 -115
  1899. package/src/utils/mru.ts +0 -68
  1900. package/src/utils/object.ts +0 -278
  1901. package/src/utils/paging.ts +0 -97
  1902. package/src/utils/path.ts +0 -204
  1903. package/src/utils/platform.ts +0 -1
  1904. package/src/utils/promise.ts +0 -657
  1905. package/src/utils/promiseCache.ts +0 -908
  1906. package/src/utils/resourceUsage.ts +0 -5
  1907. package/src/utils/searchTree.ts +0 -444
  1908. package/src/utils/stopwatch.ts +0 -125
  1909. package/src/utils/string.ts +0 -1003
  1910. package/src/utils/subscriptionManager.ts +0 -40
  1911. package/src/utils/trie.ts +0 -740
  1912. package/src/utils/types.ts +0 -31
  1913. package/src/utils/uri.ts +0 -118
  1914. package/src/utils/validation.ts +0 -38
  1915. package/src/utils/version.ts +0 -128
@@ -1,1061 +1,853 @@
1
- import { spawn } from 'child_process';
2
- import * as process from 'process';
3
- import { GitWarnings, WorkspaceUntrustedError } from '../../git/errors.js';
4
- import { CancellationError, getAbortSignalId, isCancellationError } from '../../utils/cancellation.js';
5
- import { getScopedCounter } from '../../utils/counter.js';
6
- import { getDurationMilliseconds, hrtime } from '../../utils/hrtime.js';
7
- import { Logger } from '../../utils/logger.js';
8
- import { formatLoggableScopeBlock } from '../../utils/logger.scoped.js';
9
- import { dirname, isAbsolute, joinPaths, normalizePath } from '../../utils/path.js';
10
- import { defer } from '../../utils/promise.js';
11
- import { compare, fromString } from '../../utils/version.js';
12
- import { CancelledRunError, RunError } from './exec.errors.js';
13
- import { fsExists, runSpawn } from './exec.js';
14
- import { gitFeaturesByVersion } from './features.js';
15
- import { getPrimaryGitCommand, GitQueue, inferGitCommandPriority } from './gitQueue.js';
16
- const slowCallWarningThreshold = 2000;
17
- export const maxGitCliLength = 30000;
18
- export const gitConfigsBranch = ['-c', 'color.branch=false'];
19
- export const gitConfigsDiff = ['-c', 'color.diff=false', '-c', 'diff.mnemonicPrefix=false'];
20
- export const gitConfigsLog = ['-c', 'log.showSignature=false'];
21
- export const gitConfigsLogWithFiles = ['-c', 'log.showSignature=false', '-c', 'diff.renameLimit=0'];
22
- export const gitConfigsLogWithSignatures = ['-c', 'log.showSignature=true'];
23
- export const gitConfigsPull = ['-c', 'merge.autoStash=true', '-c', 'rebase.autoStash=true'];
24
- export const gitConfigsStatus = ['-c', 'color.status=false'];
25
- export const GitErrors = {
26
- alreadyCheckedOut: /already checked out/i,
27
- alreadyExists: /already exists/i,
28
- ambiguousArgument: /fatal:\s*ambiguous argument ['"](.+?)['"]: unknown revision or path not in the working tree/i,
29
- badObject: /fatal:\s*bad object (.*?)/i,
30
- badRevision: /bad revision '(.*?)'/i,
31
- branchAlreadyExists: /fatal:\s*A branch named '.+?' already exists/i,
32
- notFullyMerged: /error:\s*The branch '.+?' is not fully merged/i,
33
- cantLockRef: /cannot lock ref|unable to update local ref/i,
34
- changesWouldBeOverwritten: /Your local changes to the following files would be overwritten|Your local changes would be overwritten|overwritten by checkout/i,
35
- cherryPickAborted: /cherry-pick.*aborted/i,
36
- cherryPickInProgress: /cherry-pick is already in progress|You have not concluded your cherry-pick/i,
37
- commitChangesFirst: /Please, commit your changes before you can/i,
38
- conflict: /^CONFLICT \([^)]+\): \b/m,
39
- detachedHead: /You are in 'detached HEAD' state/i,
40
- entryNotUpToDate: /error:\s*Entry ['"].+['"] not uptodate\. Cannot merge\./i,
41
- failedToDeleteDirectoryNotEmpty: /failed to delete '(.*?)': Directory not empty/i,
42
- gpgNotFound: /gpg:?\s*(?:command\s+)?not found|'gpg' is not recognized as|cannot run gpg:/i,
43
- gpgSignFailed: /^error:\s*gpg failed to sign the data/im,
44
- invalidName: /fatal:\s*'.+?' is not a valid branch name/i,
45
- invalidLineCount: /file .+? has only (\d+) lines/i,
46
- invalidObjectName: /invalid object name: (.*)\s/i,
47
- invalidObjectNameList: /could not open object name list: (.*)\s/i,
48
- // Regcomp failure reasons from `-G`/pathspec regex compilation (search); matched without a known
49
- // prefix as a fallback when the reason appears in an unrecognized stderr shape
50
- invalidSearchPattern: /Unmatched \( or \\\(|Unmatched \[|Unmatched \) or \\\)|Invalid content of \\\{\\\}|Invalid preceding regular expression|Invalid regular expression|Trailing backslash|invalid regex/i,
51
- invalidTagName: /invalid tag name/i,
52
- mainWorkingTree: /is a main working tree/i,
53
- mergeAborted: /merge.*aborted/i,
54
- mergeInProgress: /^fatal:\s*You have not concluded your merge/i,
55
- noFastForward: /\(non-fast-forward\)/i,
56
- noMergeBase: /no merge base/i,
57
- noRemoteReference: /unable to delete '.+?': remote ref does not exist/i,
58
- noRemoteRepositorySpecified: /No remote repository specified\./i,
59
- noUpstream: /^fatal:\s*The current branch .* has no upstream branch/i,
60
- notAValidObjectName: /Not a valid object name/i,
61
- notAWorkingTree: /'(.*?)' is not a working tree/i,
62
- noUserNameConfigured: /Please tell me who you are\./i,
63
- nothingToCommit: /nothing(?: added)? to commit|no changes added to commit/i,
64
- noPausedOperation: /no merge (?:in progress|to abort)|no cherry-pick(?: or revert)? in progress|no rebase in progress/i,
65
- permissionDenied: /Permission.*denied/i,
66
- previousOperationEmpty: /The previous (?:cherry-pick|revert) is now empty/i,
67
- problemWithEditor: /there was a problem with the editor/i,
68
- pushRejected: /^error:\s*failed to push some refs to\b/m,
69
- pushRejectedRefDoesNotExists: /error:\s*unable to delete '(.*?)': remote ref does not exist/m,
70
- rebaseAborted: /Nothing to do|rebase.*aborted/i,
71
- rebaseInProgress: /It seems that there is already a rebase-(?:merge|apply) directory/i,
72
- rebaseMissingTodo: /error:\s*could not read file .*\/git-rebase-todo': No such file or directory/,
73
- rebaseMultipleBranches: /cannot rebase onto multiple branches/i,
74
- revertAborted: /revert.*aborted/i,
75
- revertInProgress: /^(error: )?(revert|cherry-pick) is already in progress/i,
76
- refLocked: /fatal:\s*cannot lock ref ['"].+['"]: unable to create file/i,
77
- remoteAhead: /rejected because the remote contains work/i,
78
- remoteConnectionFailed: /Could not read from remote repository/i,
79
- remoteRejected: /rejected because the remote contains work/i,
80
- signingKeyNotAvailable: /secret key not available|no secret key|no signing key/i,
81
- sshNotFound: /ssh-keygen[^\n]*(?:not found|No such file or directory|is not recognized)/i,
82
- stashConflictingStagedAndUnstagedLines: /Cannot remove worktree changes/i,
83
- stashNothingToSave: /No local changes to save/i,
84
- stashSavedWorkingDirAndIndexState: /Saved working directory and index state/i,
85
- tagAlreadyExists: /tag .* already exists/i,
86
- tagConflict: /! \[rejected\].*\(would clobber existing tag\)/m,
87
- tagNotFound: /tag .* not found/i,
88
- uncommittedChanges: /contains modified or untracked files/i,
89
- unmergedChanges: /error:\s*you need to resolve your current index first/i,
90
- unmergedFiles: /is not possible because you have unmerged files|You have unmerged files/i,
91
- unresolvedConflicts: /You must edit all merge conflicts|Resolve all conflicts|^CONFLICT \(|^Automatic merge failed|could not apply .*/im,
92
- unsafeRepository: /(?:^fatal:\s*detected dubious ownership in repository at '([^']+)'|unsafe repository \('([^']+)' is owned by someone else\))[\s\S]*(git config --global --add safe\.directory [^\n•]+)/m,
93
- unstagedChanges: /You have unstaged changes/i,
94
- // Matches both variants: with a lock reason (`..., lock reason: <reason>`) and without (`...;`)
95
- worktreeLocked: /fatal:\s*cannot remove a locked working tree/i,
96
- // Only matches the variant where Git reports a lock reason; the reason is free text, so capture the whole line
97
- worktreeLockedReason: /cannot remove a locked working tree,[ \t]*lock reason:[ \t]*(.*)/i,
1
+ import { getScopedCounter } from "../../utils/counter.js";
2
+ import { CancellationError, getAbortSignalId, isCancellationError } from "../../utils/cancellation.js";
3
+ import { getDurationMilliseconds, hrtime } from "../../utils/hrtime.js";
4
+ import { Logger as _logger } from "../../utils/logger.js";
5
+ import { formatLoggableScopeBlock } from "../../utils/logger.scoped.js";
6
+ import { defer } from "../../utils/promise.js";
7
+ import { dirname, isAbsolute, joinPaths, normalizePath } from "../../utils/path.js";
8
+ import { GitWarnings, WorkspaceUntrustedError } from "../../git/errors.js";
9
+ import { gitFeaturesByVersion } from "../../git/features.js";
10
+ import { CancelledRunError, RunError, fsExists, runSpawn } from "../../utils/env/node/exec.js";
11
+ import { compare, fromString } from "../../utils/version.js";
12
+ import { EventLoopMonitor } from "./eventLoopMonitor.js";
13
+ import { GitQueue, getPrimaryGitCommand, inferGitCommandPriority } from "./gitQueue.js";
14
+ import { spawn } from "child_process";
15
+ import * as process from "process";
16
+ //#region ../git-cli/src/exec/git.ts
17
+ const slowCallWarningThreshold = 2e3;
18
+ /** Below this, a queue-wait annotation isn't worth adding to the log line. */
19
+ const queueWaitAnnotationThreshold = 100;
20
+ /** Below this, a measured event-loop stall isn't worth annotating — see {@link EventLoopMonitor}. */
21
+ const eventLoopDelayAnnotationThreshold = 500;
22
+ const maxGitCliLength = 3e4;
23
+ const gitConfigsBranch = ["-c", "color.branch=false"];
24
+ const gitConfigsDiff = [
25
+ "-c",
26
+ "color.diff=false",
27
+ "-c",
28
+ "diff.mnemonicPrefix=false"
29
+ ];
30
+ const gitConfigsLog = ["-c", "log.showSignature=false"];
31
+ const gitConfigsLogWithFiles = [
32
+ "-c",
33
+ "log.showSignature=false",
34
+ "-c",
35
+ "diff.renameLimit=0"
36
+ ];
37
+ const gitConfigsLogWithSignatures = ["-c", "log.showSignature=true"];
38
+ const gitConfigsPull = [
39
+ "-c",
40
+ "merge.autoStash=true",
41
+ "-c",
42
+ "rebase.autoStash=true"
43
+ ];
44
+ const gitConfigsStatus = ["-c", "color.status=false"];
45
+ const GitErrors = {
46
+ alreadyCheckedOut: /already checked out/i,
47
+ alreadyExists: /already exists/i,
48
+ ambiguousArgument: /fatal:\s*ambiguous argument ['"](.+?)['"]: unknown revision or path not in the working tree/i,
49
+ badObject: /fatal:\s*bad object (.*?)/i,
50
+ badRevision: /bad revision '(.*?)'/i,
51
+ branchAlreadyExists: /fatal:\s*A branch named '.+?' already exists/i,
52
+ notFullyMerged: /error:\s*The branch '.+?' is not fully merged/i,
53
+ cantLockRef: /cannot lock ref|unable to update local ref/i,
54
+ changesWouldBeOverwritten: /Your local changes to the following files would be overwritten|Your local changes would be overwritten|overwritten by checkout/i,
55
+ cherryPickAborted: /cherry-pick.*aborted/i,
56
+ cherryPickInProgress: /cherry-pick is already in progress|You have not concluded your cherry-pick/i,
57
+ commitChangesFirst: /Please, commit your changes before you can/i,
58
+ conflict: /^CONFLICT \([^)]+\): \b/m,
59
+ detachedHead: /You are in 'detached HEAD' state/i,
60
+ entryNotUpToDate: /error:\s*Entry ['"].+['"] not uptodate\. Cannot merge\./i,
61
+ failedToDeleteDirectoryNotEmpty: /failed to delete '(.*?)': Directory not empty/i,
62
+ gpgNotFound: /gpg:?\s*(?:command\s+)?not found|'gpg' is not recognized as|cannot run gpg:/i,
63
+ gpgSignFailed: /^error:\s*gpg failed to sign the data/im,
64
+ invalidName: /fatal:\s*'.+?' is not a valid branch name/i,
65
+ invalidLineCount: /file .+? has only (\d+) lines/i,
66
+ invalidObjectName: /invalid object name: (.*)\s/i,
67
+ invalidObjectNameList: /could not open object name list: (.*)\s/i,
68
+ invalidSearchPattern: /Unmatched \( or \\\(|Unmatched \[|Unmatched \) or \\\)|Invalid content of \\\{\\\}|Invalid preceding regular expression|Invalid regular expression|Trailing backslash|invalid regex/i,
69
+ invalidTagName: /invalid tag name/i,
70
+ mainWorkingTree: /is a main working tree/i,
71
+ mergeAborted: /merge.*aborted/i,
72
+ mergeInProgress: /^fatal:\s*You have not concluded your merge/i,
73
+ noFastForward: /\(non-fast-forward\)/i,
74
+ noMergeBase: /no merge base/i,
75
+ noRemoteReference: /unable to delete '.+?': remote ref does not exist/i,
76
+ noRemoteRepositorySpecified: /No remote repository specified\./i,
77
+ noUpstream: /^fatal:\s*The current branch .* has no upstream branch/i,
78
+ notAValidObjectName: /Not a valid object name/i,
79
+ notAWorkingTree: /'(.*?)' is not a working tree/i,
80
+ noUserNameConfigured: /Please tell me who you are\./i,
81
+ nothingToCommit: /nothing(?: added)? to commit|no changes added to commit/i,
82
+ noPausedOperation: /no merge (?:in progress|to abort)|no cherry-pick(?: or revert)? in progress|no rebase in progress/i,
83
+ permissionDenied: /Permission.*denied/i,
84
+ previousOperationEmpty: /The previous (?:cherry-pick|revert) is now empty/i,
85
+ problemWithEditor: /there was a problem with the editor/i,
86
+ pushRejected: /^error:\s*failed to push some refs to\b/m,
87
+ pushRejectedRefDoesNotExists: /error:\s*unable to delete '(.*?)': remote ref does not exist/m,
88
+ rebaseAborted: /Nothing to do|rebase.*aborted/i,
89
+ rebaseInProgress: /It seems that there is already a rebase-(?:merge|apply) directory/i,
90
+ rebaseMissingTodo: /error:\s*could not read file .*\/git-rebase-todo': No such file or directory/,
91
+ rebaseMultipleBranches: /cannot rebase onto multiple branches/i,
92
+ revertAborted: /revert.*aborted/i,
93
+ revertInProgress: /^(error: )?(revert|cherry-pick) is already in progress/i,
94
+ refLocked: /fatal:\s*cannot lock ref ['"].+['"]: unable to create file/i,
95
+ remoteAhead: /rejected because the remote contains work/i,
96
+ remoteConnectionFailed: /Could not read from remote repository/i,
97
+ remoteRejected: /rejected because the remote contains work/i,
98
+ signingKeyNotAvailable: /secret key not available|no secret key|no signing key/i,
99
+ sshNotFound: /ssh-keygen[^\n]*(?:not found|No such file or directory|is not recognized)/i,
100
+ stashConflictingStagedAndUnstagedLines: /Cannot remove worktree changes/i,
101
+ stashNothingToSave: /No local changes to save/i,
102
+ stashSavedWorkingDirAndIndexState: /Saved working directory and index state/i,
103
+ tagAlreadyExists: /tag .* already exists/i,
104
+ tagConflict: /! \[rejected\].*\(would clobber existing tag\)/m,
105
+ tagNotFound: /tag .* not found/i,
106
+ uncommittedChanges: /contains modified or untracked files/i,
107
+ unmergedChanges: /error:\s*you need to resolve your current index first/i,
108
+ unmergedFiles: /is not possible because you have unmerged files|You have unmerged files/i,
109
+ unresolvedConflicts: /You must edit all merge conflicts|Resolve all conflicts|^CONFLICT \(|^Automatic merge failed|could not apply .*/im,
110
+ unsafeRepository: /(?:^fatal:\s*detected dubious ownership in repository at '([^']+)'|unsafe repository \('([^']+)' is owned by someone else\))[\s\S]*(git config --global --add safe\.directory [^\n•]+)/m,
111
+ unstagedChanges: /You have unstaged changes/i,
112
+ worktreeLocked: /fatal:\s*cannot remove a locked working tree/i,
113
+ worktreeLockedReason: /cannot remove a locked working tree,[ \t]*lock reason:[ \t]*(.*)/i
98
114
  };
99
- // `GitWarnings` moved to `@gitlens/git/errors.js` so the shared run contract can name its keys; re-exported
100
- // here because it's long-established as part of this module's surface.
101
- export { GitWarnings };
102
- export class GitError extends Error {
103
- original;
104
- cmd;
105
- exitCode;
106
- stdout;
107
- stderr;
108
- constructor(original) {
109
- let message;
110
- let stdout;
111
- let stderr;
112
- let cmd;
113
- let exitCode;
114
- if (original instanceof RunError) {
115
- stdout = original.stdout;
116
- stderr = original.stderr;
117
- message = stderr || stdout || original.message;
118
- cmd = original.cmd;
119
- exitCode = original.code;
120
- }
121
- else {
122
- message = original.message;
123
- }
124
- super(message);
125
- this.original = original;
126
- this.stdout = stdout;
127
- this.stderr = stderr;
128
- this.cmd = cmd;
129
- this.exitCode = exitCode;
130
- Error.captureStackTrace?.(this, new.target);
131
- }
132
- }
133
- const errorToReasonMap = new Map([
134
- [
135
- 'branch',
136
- [
137
- [GitErrors.branchAlreadyExists, 'alreadyExists'],
138
- [GitErrors.invalidName, 'invalidName'],
139
- [GitErrors.notFullyMerged, 'notFullyMerged'],
140
- [GitErrors.noRemoteReference, 'noRemoteReference'],
141
- ],
142
- ],
143
- [
144
- 'checkout',
145
- [
146
- [GitErrors.changesWouldBeOverwritten, 'wouldOverwriteChanges'],
147
- [GitErrors.ambiguousArgument, 'pathspecNotFound'],
148
- [GitErrors.notAValidObjectName, 'invalidRef'],
149
- ],
150
- ],
151
- [
152
- 'cherry-pick',
153
- [
154
- [GitErrors.cherryPickAborted, 'aborted'],
155
- [GitErrors.cherryPickInProgress, 'alreadyInProgress'],
156
- [GitErrors.conflict, 'conflicts'],
157
- [GitErrors.previousOperationEmpty, 'emptyCommit'],
158
- [GitErrors.changesWouldBeOverwritten, 'wouldOverwriteChanges'],
159
- ],
160
- ],
161
- [
162
- 'commit',
163
- [
164
- [GitErrors.nothingToCommit, 'nothingToCommit'],
165
- [GitErrors.unmergedFiles, 'conflicts'],
166
- [GitErrors.unresolvedConflicts, 'conflicts'],
167
- [GitErrors.noUserNameConfigured, 'noUserNameConfigured'],
168
- ],
169
- ],
170
- [
171
- 'fetch',
172
- [
173
- [GitErrors.noFastForward, 'noFastForward'],
174
- [GitErrors.noRemoteRepositorySpecified, 'noRemote'],
175
- [GitErrors.remoteConnectionFailed, 'remoteConnectionFailed'],
176
- ],
177
- ],
178
- [
179
- 'merge',
180
- [
181
- [GitErrors.mergeAborted, 'aborted'],
182
- [GitErrors.mergeInProgress, 'alreadyInProgress'],
183
- [GitErrors.unresolvedConflicts, 'conflicts'],
184
- [GitErrors.uncommittedChanges, 'uncommittedChanges'],
185
- [GitErrors.changesWouldBeOverwritten, 'wouldOverwriteChanges'],
186
- ],
187
- ],
188
- ['paused-operation-abort', [[GitErrors.noPausedOperation, 'nothingToAbort']]],
189
- [
190
- 'paused-operation-continue',
191
- [
192
- // Kept FIRST: an editor failure's stderr can also carry broader messages ("could not
193
- // commit staged changes", …) that later patterns would otherwise claim
194
- [GitErrors.problemWithEditor, 'messageEditFailed'],
195
- [GitErrors.previousOperationEmpty, 'emptyCommit'],
196
- [GitErrors.noPausedOperation, 'nothingToContinue'],
197
- [GitErrors.uncommittedChanges, 'uncommittedChanges'],
198
- [GitErrors.unmergedFiles, 'unmergedFiles'],
199
- [GitErrors.unresolvedConflicts, 'conflicts'],
200
- [GitErrors.unstagedChanges, 'unstagedChanges'],
201
- [GitErrors.changesWouldBeOverwritten, 'wouldOverwriteChanges'],
202
- // A single (non-sequencer) revert resolved to a no-op never gets git's "previous revert is now
203
- // empty" message — its `--continue` falls through to the commit, which reports having nothing to
204
- // commit. Mid-paused-op that means the step became empty, so it earns the same choice.
205
- //
206
- // Kept LAST because the pattern is deliberately broad: it also matches "no changes added to
207
- // commit" and "nothing added to commit", which appear alongside the more specific unmerged /
208
- // conflict / unstaged messages. Matching first would shadow those. It isn't narrowed to the
209
- // "working tree clean" variant because an empty step with untracked files present instead reports
210
- // "nothing added to commit but untracked files present".
211
- [GitErrors.nothingToCommit, 'emptyCommit'],
212
- ],
213
- ],
214
- [
215
- 'pull',
216
- [
217
- [GitErrors.conflict, 'conflict'],
218
- [GitErrors.noUserNameConfigured, 'gitIdentity'],
219
- [GitErrors.remoteConnectionFailed, 'remoteConnectionFailed'],
220
- [GitErrors.unstagedChanges, 'unstagedChanges'],
221
- [GitErrors.unmergedFiles, 'unmergedFiles'],
222
- [GitErrors.commitChangesFirst, 'uncommittedChanges'],
223
- [GitErrors.changesWouldBeOverwritten, 'wouldOverwriteChanges'],
224
- [GitErrors.cantLockRef, 'refLocked'],
225
- [GitErrors.rebaseMultipleBranches, 'rebaseMultipleBranches'],
226
- [GitErrors.tagConflict, 'tagConflict'],
227
- ],
228
- ],
229
- [
230
- 'push',
231
- [
232
- [GitErrors.remoteAhead, 'remoteAhead'],
233
- [GitWarnings.tipBehind, 'tipBehind'],
234
- // Kept BEFORE the generic push rejection: a failed `push -d` of a missing ref reports both
235
- // "unable to delete '<ref>': remote ref does not exist" and "failed to push some refs to ...",
236
- // and the specific reason is the actionable one.
237
- [GitErrors.pushRejectedRefDoesNotExists, 'rejectedRefDoesNotExist'],
238
- [GitErrors.pushRejected, 'rejected'],
239
- [GitErrors.permissionDenied, 'permissionDenied'],
240
- [GitErrors.remoteConnectionFailed, 'remoteConnectionFailed'],
241
- [GitErrors.noUpstream, 'noUpstream'],
242
- ],
243
- ],
244
- [
245
- 'rebase',
246
- [
247
- [GitErrors.rebaseAborted, 'aborted'],
248
- [GitErrors.rebaseMissingTodo, 'aborted'],
249
- [GitErrors.rebaseInProgress, 'alreadyInProgress'],
250
- [GitErrors.unresolvedConflicts, 'conflicts'],
251
- [GitErrors.uncommittedChanges, 'uncommittedChanges'],
252
- [GitErrors.changesWouldBeOverwritten, 'wouldOverwriteChanges'],
253
- ],
254
- ],
255
- [
256
- 'reset',
257
- [
258
- [GitErrors.ambiguousArgument, 'ambiguousArgument'],
259
- [GitErrors.detachedHead, 'detachedHead'],
260
- [GitErrors.refLocked, 'refLocked'],
261
- [GitErrors.entryNotUpToDate, 'notUpToDate'],
262
- [GitErrors.permissionDenied, 'permissionDenied'],
263
- [GitErrors.unmergedChanges, 'unmergedChanges'],
264
- [GitErrors.changesWouldBeOverwritten, 'wouldOverwriteChanges'],
265
- ],
266
- ],
267
- [
268
- 'revert',
269
- [
270
- [GitErrors.revertAborted, 'aborted'],
271
- [GitErrors.revertInProgress, 'alreadyInProgress'],
272
- [GitErrors.unresolvedConflicts, 'conflicts'],
273
- [GitErrors.uncommittedChanges, 'uncommittedChanges'],
274
- [GitErrors.changesWouldBeOverwritten, 'wouldOverwriteChanges'],
275
- ],
276
- ],
277
- [
278
- 'show',
279
- [
280
- [GitErrors.badObject, 'invalidObject'],
281
- [GitErrors.badRevision, 'invalidRevision'],
282
- [GitErrors.notAValidObjectName, 'invalidRevision'],
283
- [GitWarnings.notFound, 'notFound'],
284
- [GitWarnings.foundButNotInRevision, 'notInRevision'],
285
- ],
286
- ],
287
- ['stash-apply', [[GitErrors.changesWouldBeOverwritten, 'uncommittedChanges']]],
288
- [
289
- 'stash-push',
290
- [
291
- [GitErrors.stashConflictingStagedAndUnstagedLines, 'conflictingStagedAndUnstagedLines'],
292
- [GitErrors.stashNothingToSave, 'nothingToSave'],
293
- [GitErrors.stashSavedWorkingDirAndIndexState, 'conflictingStagedAndUnstagedLines'],
294
- ],
295
- ],
296
- [
297
- 'tag',
298
- [
299
- [GitErrors.tagAlreadyExists, 'alreadyExists'],
300
- [GitErrors.invalidTagName, 'invalidName'],
301
- [GitErrors.tagNotFound, 'notFound'],
302
- [GitErrors.permissionDenied, 'permissionDenied'],
303
- [GitErrors.remoteRejected, 'remoteRejected'],
304
- [GitErrors.tagConflict, 'tagConflict'],
305
- ],
306
- ],
307
- [
308
- 'worktree-create',
309
- [
310
- [GitErrors.alreadyCheckedOut, 'alreadyCheckedOut'],
311
- [GitErrors.alreadyExists, 'alreadyExists'],
312
- ],
313
- ],
314
- [
315
- 'worktree-delete',
316
- [
317
- // Must come first -- a locked worktree's lock reason is free text that can otherwise match the errors below
318
- [GitErrors.worktreeLocked, 'locked'],
319
- [GitErrors.mainWorkingTree, 'defaultWorkingTree'],
320
- [GitErrors.uncommittedChanges, 'uncommittedChanges'],
321
- [GitErrors.failedToDeleteDirectoryNotEmpty, 'directoryNotEmpty'],
322
- ],
323
- ],
115
+ var GitError = class extends Error {
116
+ original;
117
+ cmd;
118
+ exitCode;
119
+ stdout;
120
+ stderr;
121
+ constructor(original) {
122
+ let message;
123
+ let stdout;
124
+ let stderr;
125
+ let cmd;
126
+ let exitCode;
127
+ if (original instanceof RunError) {
128
+ stdout = original.stdout;
129
+ stderr = original.stderr;
130
+ message = stderr || stdout || original.message;
131
+ cmd = original.cmd;
132
+ exitCode = original.code;
133
+ } else message = original.message;
134
+ super(message);
135
+ this.original = original;
136
+ this.stdout = stdout;
137
+ this.stderr = stderr;
138
+ this.cmd = cmd;
139
+ this.exitCode = exitCode;
140
+ Error.captureStackTrace?.(this, new.target);
141
+ }
142
+ };
143
+ const errorToReasonMap = /* @__PURE__ */ new Map([
144
+ ["branch", [
145
+ [GitErrors.branchAlreadyExists, "alreadyExists"],
146
+ [GitErrors.invalidName, "invalidName"],
147
+ [GitErrors.notFullyMerged, "notFullyMerged"],
148
+ [GitErrors.noRemoteReference, "noRemoteReference"]
149
+ ]],
150
+ ["checkout", [
151
+ [GitErrors.changesWouldBeOverwritten, "wouldOverwriteChanges"],
152
+ [GitErrors.ambiguousArgument, "pathspecNotFound"],
153
+ [GitErrors.notAValidObjectName, "invalidRef"]
154
+ ]],
155
+ ["cherry-pick", [
156
+ [GitErrors.cherryPickAborted, "aborted"],
157
+ [GitErrors.cherryPickInProgress, "alreadyInProgress"],
158
+ [GitErrors.conflict, "conflicts"],
159
+ [GitErrors.previousOperationEmpty, "emptyCommit"],
160
+ [GitErrors.changesWouldBeOverwritten, "wouldOverwriteChanges"]
161
+ ]],
162
+ ["commit", [
163
+ [GitErrors.nothingToCommit, "nothingToCommit"],
164
+ [GitErrors.unmergedFiles, "conflicts"],
165
+ [GitErrors.unresolvedConflicts, "conflicts"],
166
+ [GitErrors.noUserNameConfigured, "noUserNameConfigured"]
167
+ ]],
168
+ ["fetch", [
169
+ [GitErrors.noFastForward, "noFastForward"],
170
+ [GitErrors.noRemoteRepositorySpecified, "noRemote"],
171
+ [GitErrors.remoteConnectionFailed, "remoteConnectionFailed"]
172
+ ]],
173
+ ["merge", [
174
+ [GitErrors.mergeAborted, "aborted"],
175
+ [GitErrors.mergeInProgress, "alreadyInProgress"],
176
+ [GitErrors.unresolvedConflicts, "conflicts"],
177
+ [GitErrors.uncommittedChanges, "uncommittedChanges"],
178
+ [GitErrors.changesWouldBeOverwritten, "wouldOverwriteChanges"]
179
+ ]],
180
+ ["paused-operation-abort", [[GitErrors.noPausedOperation, "nothingToAbort"]]],
181
+ ["paused-operation-continue", [
182
+ [GitErrors.problemWithEditor, "messageEditFailed"],
183
+ [GitErrors.previousOperationEmpty, "emptyCommit"],
184
+ [GitErrors.noPausedOperation, "nothingToContinue"],
185
+ [GitErrors.uncommittedChanges, "uncommittedChanges"],
186
+ [GitErrors.unmergedFiles, "unmergedFiles"],
187
+ [GitErrors.unresolvedConflicts, "conflicts"],
188
+ [GitErrors.unstagedChanges, "unstagedChanges"],
189
+ [GitErrors.changesWouldBeOverwritten, "wouldOverwriteChanges"],
190
+ [GitErrors.nothingToCommit, "emptyCommit"]
191
+ ]],
192
+ ["pull", [
193
+ [GitErrors.conflict, "conflict"],
194
+ [GitErrors.noUserNameConfigured, "gitIdentity"],
195
+ [GitErrors.remoteConnectionFailed, "remoteConnectionFailed"],
196
+ [GitErrors.unstagedChanges, "unstagedChanges"],
197
+ [GitErrors.unmergedFiles, "unmergedFiles"],
198
+ [GitErrors.commitChangesFirst, "uncommittedChanges"],
199
+ [GitErrors.changesWouldBeOverwritten, "wouldOverwriteChanges"],
200
+ [GitErrors.cantLockRef, "refLocked"],
201
+ [GitErrors.rebaseMultipleBranches, "rebaseMultipleBranches"],
202
+ [GitErrors.tagConflict, "tagConflict"]
203
+ ]],
204
+ ["push", [
205
+ [GitErrors.remoteAhead, "remoteAhead"],
206
+ [GitWarnings.tipBehind, "tipBehind"],
207
+ [GitErrors.pushRejectedRefDoesNotExists, "rejectedRefDoesNotExist"],
208
+ [GitErrors.pushRejected, "rejected"],
209
+ [GitErrors.permissionDenied, "permissionDenied"],
210
+ [GitErrors.remoteConnectionFailed, "remoteConnectionFailed"],
211
+ [GitErrors.noUpstream, "noUpstream"]
212
+ ]],
213
+ ["rebase", [
214
+ [GitErrors.rebaseAborted, "aborted"],
215
+ [GitErrors.rebaseMissingTodo, "aborted"],
216
+ [GitErrors.rebaseInProgress, "alreadyInProgress"],
217
+ [GitErrors.unresolvedConflicts, "conflicts"],
218
+ [GitErrors.uncommittedChanges, "uncommittedChanges"],
219
+ [GitErrors.changesWouldBeOverwritten, "wouldOverwriteChanges"]
220
+ ]],
221
+ ["reset", [
222
+ [GitErrors.ambiguousArgument, "ambiguousArgument"],
223
+ [GitErrors.detachedHead, "detachedHead"],
224
+ [GitErrors.refLocked, "refLocked"],
225
+ [GitErrors.entryNotUpToDate, "notUpToDate"],
226
+ [GitErrors.permissionDenied, "permissionDenied"],
227
+ [GitErrors.unmergedChanges, "unmergedChanges"],
228
+ [GitErrors.changesWouldBeOverwritten, "wouldOverwriteChanges"]
229
+ ]],
230
+ ["revert", [
231
+ [GitErrors.revertAborted, "aborted"],
232
+ [GitErrors.revertInProgress, "alreadyInProgress"],
233
+ [GitErrors.unresolvedConflicts, "conflicts"],
234
+ [GitErrors.uncommittedChanges, "uncommittedChanges"],
235
+ [GitErrors.changesWouldBeOverwritten, "wouldOverwriteChanges"]
236
+ ]],
237
+ ["show", [
238
+ [GitErrors.badObject, "invalidObject"],
239
+ [GitErrors.badRevision, "invalidRevision"],
240
+ [GitErrors.notAValidObjectName, "invalidRevision"],
241
+ [GitWarnings.notFound, "notFound"],
242
+ [GitWarnings.foundButNotInRevision, "notInRevision"]
243
+ ]],
244
+ ["stash-apply", [[GitErrors.changesWouldBeOverwritten, "uncommittedChanges"]]],
245
+ ["stash-push", [
246
+ [GitErrors.stashConflictingStagedAndUnstagedLines, "conflictingStagedAndUnstagedLines"],
247
+ [GitErrors.stashNothingToSave, "nothingToSave"],
248
+ [GitErrors.stashSavedWorkingDirAndIndexState, "conflictingStagedAndUnstagedLines"]
249
+ ]],
250
+ ["tag", [
251
+ [GitErrors.tagAlreadyExists, "alreadyExists"],
252
+ [GitErrors.invalidTagName, "invalidName"],
253
+ [GitErrors.tagNotFound, "notFound"],
254
+ [GitErrors.permissionDenied, "permissionDenied"],
255
+ [GitErrors.remoteRejected, "remoteRejected"],
256
+ [GitErrors.tagConflict, "tagConflict"]
257
+ ]],
258
+ ["worktree-create", [[GitErrors.alreadyCheckedOut, "alreadyCheckedOut"], [GitErrors.alreadyExists, "alreadyExists"]]],
259
+ ["worktree-delete", [
260
+ [GitErrors.worktreeLocked, "locked"],
261
+ [GitErrors.mainWorkingTree, "defaultWorkingTree"],
262
+ [GitErrors.uncommittedChanges, "uncommittedChanges"],
263
+ [GitErrors.failedToDeleteDirectoryNotEmpty, "directoryNotEmpty"]
264
+ ]]
324
265
  ]);
325
- export function getGitCommandError(command, ex, creator) {
326
- const msg = ex?.toString() ?? '';
327
- const errorsToReasons = errorToReasonMap.get(command);
328
- if (errorsToReasons != null) {
329
- for (const [error, reason] of errorsToReasons) {
330
- if (error.test(msg) || (ex.stderr && error.test(ex.stderr)) || (ex.stdout && error.test(ex.stdout))) {
331
- return creator(reason);
332
- }
333
- }
334
- }
335
- return creator(undefined);
266
+ function getGitCommandError(command, ex, creator) {
267
+ const msg = ex?.toString() ?? "";
268
+ const errorsToReasons = errorToReasonMap.get(command);
269
+ if (errorsToReasons != null) {
270
+ for (const [error, reason] of errorsToReasons) if (error.test(msg) || ex.stderr && error.test(ex.stderr) || ex.stdout && error.test(ex.stdout)) return creator(reason);
271
+ }
272
+ return creator(void 0);
336
273
  }
337
274
  function extractSigningErrorText(ex) {
338
- if (ex == null)
339
- return '';
340
- if (ex instanceof GitError)
341
- return ex.stderr || ex.stdout || ex.message || '';
342
- if (ex instanceof Error)
343
- return ex.message || '';
344
- if (typeof ex === 'string')
345
- return ex;
346
- if (typeof ex === 'number' || typeof ex === 'boolean' || typeof ex === 'bigint')
347
- return String(ex);
348
- if (typeof ex === 'object' && 'message' in ex && typeof ex.message === 'string')
349
- return ex.message;
350
- return '';
275
+ if (ex == null) return "";
276
+ if (ex instanceof GitError) return ex.stderr || ex.stdout || ex.message || "";
277
+ if (ex instanceof Error) return ex.message || "";
278
+ if (typeof ex === "string") return ex;
279
+ if (typeof ex === "number" || typeof ex === "boolean" || typeof ex === "bigint") return String(ex);
280
+ if (typeof ex === "object" && "message" in ex && typeof ex.message === "string") return ex.message;
281
+ return "";
351
282
  }
352
283
  /**
353
- * Classifies a Git error as a signing-related failure using the {@link GitErrors}
354
- * signing regexes. Returns the matched {@link SigningErrorReason}, or `undefined`
355
- * when the error is not a recognized signing failure.
356
- *
357
- * Precedence is significant: `passphraseFailed` (gpg sign failure) is checked
358
- * before `noKey`, matching the ordering used historically in patch.ts — a
359
- * combined stderr like "error: gpg failed to sign … gpg: No secret key"
360
- * resolves to `passphraseFailed`, the outer cause.
361
- */
362
- export function classifySigningError(ex) {
363
- const text = extractSigningErrorText(ex);
364
- if (!text)
365
- return undefined;
366
- if (GitErrors.gpgSignFailed.test(text))
367
- return 'passphraseFailed';
368
- if (GitErrors.signingKeyNotAvailable.test(text))
369
- return 'noKey';
370
- if (GitErrors.gpgNotFound.test(text))
371
- return 'gpgNotFound';
372
- if (GitErrors.sshNotFound.test(text))
373
- return 'sshNotFound';
374
- return undefined;
284
+ * Classifies a Git error as a signing-related failure using the {@link GitErrors}
285
+ * signing regexes. Returns the matched {@link SigningErrorReason}, or `undefined`
286
+ * when the error is not a recognized signing failure.
287
+ *
288
+ * Precedence is significant: `passphraseFailed` (gpg sign failure) is checked
289
+ * before `noKey`, matching the ordering used historically in patch.ts — a
290
+ * combined stderr like "error: gpg failed to sign … gpg: No secret key"
291
+ * resolves to `passphraseFailed`, the outer cause.
292
+ */
293
+ function classifySigningError(ex) {
294
+ const text = extractSigningErrorText(ex);
295
+ if (!text) return void 0;
296
+ if (GitErrors.gpgSignFailed.test(text)) return "passphraseFailed";
297
+ if (GitErrors.signingKeyNotAvailable.test(text)) return "noKey";
298
+ if (GitErrors.gpgNotFound.test(text)) return "gpgNotFound";
299
+ if (GitErrors.sshNotFound.test(text)) return "sshNotFound";
375
300
  }
376
301
  /**
377
- * Infers the {@link SigningFormat} from stderr hints (e.g., mentions of
378
- * `ssh-keygen` or `gpg.ssh.*` config keys). Returns `undefined` when no hints
379
- * are present so callers can supply their own default (typically `'gpg'`).
380
- *
381
- * Used as a fallback when `config.getSigningConfig` is unavailable or rejects
382
- * on the error path.
383
- */
384
- export function inferSigningFormatFromError(ex) {
385
- const text = extractSigningErrorText(ex);
386
- if (!text)
387
- return undefined;
388
- if (/\bssh-keygen\b|gpg\.ssh\.(?:program|allowedsignersfile)/i.test(text))
389
- return 'ssh';
390
- if (/\bgpg\b/i.test(text))
391
- return 'gpg';
392
- return undefined;
302
+ * Infers the {@link SigningFormat} from stderr hints (e.g., mentions of
303
+ * `ssh-keygen` or `gpg.ssh.*` config keys). Returns `undefined` when no hints
304
+ * are present so callers can supply their own default (typically `'gpg'`).
305
+ *
306
+ * Used as a fallback when `config.getSigningConfig` is unavailable or rejects
307
+ * on the error path.
308
+ */
309
+ function inferSigningFormatFromError(ex) {
310
+ const text = extractSigningErrorText(ex);
311
+ if (!text) return void 0;
312
+ if (/\bssh-keygen\b|gpg\.ssh\.(?:program|allowedsignersfile)/i.test(text)) return "ssh";
313
+ if (/\bgpg\b/i.test(text)) return "gpg";
393
314
  }
394
315
  /**
395
- * Classifies a graph search failure from its stderr into an {@link GitSearchErrorReason}, with the
396
- * offending pattern/ref text (when git reports one) as `detail`. Returns `undefined` when the error
397
- * isn't a `GitError` with stderr, or the stderr doesn't match a recognized shape.
398
- */
399
- export function classifySearchError(ex) {
400
- if (!(ex instanceof GitError) || !ex.stderr)
401
- return undefined;
402
- const stderr = ex.stderr;
403
- // `-G<pattern>`/pathspec regex compile failures report one of two shapes:
404
- // fatal: command line, '<pattern>': <regcomp reason>
405
- // fatal: invalid regex: <regcomp reason>
406
- // The pattern itself may contain "': ", so anchor on the known prefixes and let the greedy `.*`
407
- // resolve to the LAST matching delimiter rather than splitting on the first occurrence.
408
- const patternDetail = /^fatal:\s*command line,\s*'.*':\s*(.+)$/im.exec(stderr)?.[1] ??
409
- /^fatal:\s*invalid regex:\s*(.+)$/im.exec(stderr)?.[1];
410
- if (patternDetail != null)
411
- return { reason: 'invalidPattern', detail: patternDetail.trim() };
412
- if (GitErrors.invalidSearchPattern.test(stderr))
413
- return { reason: 'invalidPattern' };
414
- const ambiguous = GitErrors.ambiguousArgument.exec(stderr);
415
- if (ambiguous != null)
416
- return { reason: 'invalidRef', detail: ambiguous[1] };
417
- const badRevision = GitErrors.badRevision.exec(stderr);
418
- if (badRevision != null)
419
- return { reason: 'invalidRef', detail: badRevision[1] };
420
- if (/unknown revision/i.test(stderr))
421
- return { reason: 'invalidRef' };
422
- return undefined;
316
+ * Classifies a graph search failure from its stderr into an {@link GitSearchErrorReason}, with the
317
+ * offending pattern/ref text (when git reports one) as `detail`. Returns `undefined` when the error
318
+ * isn't a `GitError` with stderr, or the stderr doesn't match a recognized shape.
319
+ */
320
+ function classifySearchError(ex) {
321
+ if (!(ex instanceof GitError) || !ex.stderr) return void 0;
322
+ const stderr = ex.stderr;
323
+ const patternDetail = /^fatal:\s*command line,\s*'.*':\s*(.+)$/im.exec(stderr)?.[1] ?? /^fatal:\s*invalid regex:\s*(.+)$/im.exec(stderr)?.[1];
324
+ if (patternDetail != null) return {
325
+ reason: "invalidPattern",
326
+ detail: patternDetail.trim()
327
+ };
328
+ if (GitErrors.invalidSearchPattern.test(stderr)) return { reason: "invalidPattern" };
329
+ const ambiguous = GitErrors.ambiguousArgument.exec(stderr);
330
+ if (ambiguous != null) return {
331
+ reason: "invalidRef",
332
+ detail: ambiguous[1]
333
+ };
334
+ const badRevision = GitErrors.badRevision.exec(stderr);
335
+ if (badRevision != null) return {
336
+ reason: "invalidRef",
337
+ detail: badRevision[1]
338
+ };
339
+ if (/unknown revision/i.test(stderr)) return { reason: "invalidRef" };
423
340
  }
424
341
  const emptyArray = Object.freeze([]);
425
342
  const emptyObj = Object.freeze({});
426
343
  const trailingNewlineRegex = /[\r|\n]+$/;
427
344
  const uniqueCounterForStdin = getScopedCounter();
428
345
  const uniqueCounterForStream = getScopedCounter();
429
- export class Git {
430
- _locator;
431
- options;
432
- /** Map of running git commands — avoids running duplicate overlapping commands */
433
- pendingCommands = new Map();
434
- /** Queue for throttling background git operations */
435
- _queue;
436
- /** Cached base environment: process.env + static options.env + GCM/LC_ALL vars */
437
- _baseEnv;
438
- /** Cached full environment: base + dynamic getEnvironment() result */
439
- _fullEnv;
440
- /** Last dynamic env reference, used to detect when getEnvironment() returns a new object */
441
- _lastDynamicEnv;
442
- constructor(_locator, options = {}) {
443
- this._locator = _locator;
444
- this.options = options;
445
- this._queue = new GitQueue(options.queue, { onSlowQueue: options.hooks?.onSlowQueue });
446
- }
447
- /**
448
- * Returns the base environment for git commands. Cached to avoid spreading
449
- * process.env (30-100+ keys) on every call. Includes static options.env and
450
- * GCM/LC_ALL vars but NOT dynamic getEnvironment() or per-call env overrides.
451
- */
452
- getBaseEnv() {
453
- return (this._baseEnv ??= {
454
- ...process.env,
455
- ...(this.options.env ?? emptyObj),
456
- GCM_INTERACTIVE: 'NEVER',
457
- GCM_PRESERVE_CREDS: 'TRUE',
458
- LC_ALL: 'C',
459
- });
460
- }
461
- /**
462
- * Returns the full environment (base + dynamic). Cached and invalidated
463
- * when getEnvironment() returns a different object reference.
464
- */
465
- getFullEnv() {
466
- const dynamicEnv = this.options.getEnvironment?.() ?? undefined;
467
- if (this._fullEnv != null && dynamicEnv === this._lastDynamicEnv)
468
- return this._fullEnv;
469
- this._lastDynamicEnv = dynamicEnv;
470
- this._fullEnv = dynamicEnv != null ? { ...this.getBaseEnv(), ...dynamicEnv } : this.getBaseEnv();
471
- return this._fullEnv;
472
- }
473
- /**
474
- * Builds the environment for a git command. Returns the cached full env
475
- * directly when there are no per-call overrides (the common case).
476
- * Only allocates a new object when per-call env overrides are provided.
477
- */
478
- buildEnv(perCallEnv) {
479
- if (perCallEnv == null)
480
- return this.getFullEnv();
481
- return { ...this.getFullEnv(), ...perCallEnv };
482
- }
483
- dispose() {
484
- this._queue.dispose();
485
- }
486
- /** Clear pending commands (e.g. on cache reset) */
487
- clearPendingCommands() {
488
- this.pendingCommands.clear();
489
- }
490
- _gitLocation;
491
- _gitLocationPromise;
492
- async getLocation() {
493
- if (this._gitLocation == null) {
494
- this._gitLocationPromise ??= this._locator();
495
- this._gitLocation = await this._gitLocationPromise;
496
- }
497
- return this._gitLocation;
498
- }
499
- async path() {
500
- return (await this.getLocation()).path;
501
- }
502
- async version() {
503
- return (await this.getLocation()).version;
504
- }
505
- supports(feature) {
506
- const version = gitFeaturesByVersion.get(feature);
507
- if (version == null)
508
- return true;
509
- return this._gitLocation != null
510
- ? compare(fromString(this._gitLocation.version), fromString(version)) !== -1
511
- : this.version().then(v => compare(fromString(v), fromString(version)) !== -1);
512
- }
513
- supported(feature) {
514
- function supportedCore(gitVersion) {
515
- return [...gitFeaturesByVersion]
516
- .filter(([f, v]) => f.startsWith(feature) && compare(fromString(gitVersion), v) !== -1)
517
- .map(([f]) => f);
518
- }
519
- if (this._gitLocation == null) {
520
- return this.version().then(v => supportedCore(v));
521
- }
522
- return supportedCore(this._gitLocation.version);
523
- }
524
- async ensureSupports(feature, prefix, suffix) {
525
- const version = gitFeaturesByVersion.get(feature);
526
- if (version == null)
527
- return;
528
- const gitVersion = await this.version();
529
- if (compare(fromString(gitVersion), fromString(version)) !== -1)
530
- return;
531
- throw new Error(`${prefix} requires a newer version of Git (>= ${version}) than is currently installed (${gitVersion}).${suffix}`);
532
- }
533
- async run(options, ...args) {
534
- if (this.options.isTrusted?.() === false)
535
- throw new WorkspaceUntrustedError();
536
- const runArgs = args.filter(a => a != null);
537
- const gitCommand = `git ${runArgs.join(' ')}`;
538
- // If cache is provided, use it to cache the full result
539
- if (options.caching != null) {
540
- return options.caching.cache.getOrCreate(options.caching.commonPath ?? options.cwd, gitCommand, async (cacheable, signal) => {
541
- // Bind the shared spawn to the aggregate `signal` (fires only when ALL current callers
542
- // abort), not this-caller's `options.cancellation` — otherwise a superseded caller's
543
- // abort would kill the shared command and reject concurrent riders that never cancelled.
544
- const result = await this.runCore({ ...options, caching: undefined, cancellation: signal ?? options.cancellation }, runArgs, gitCommand);
545
- // Never cache a result that isn't a genuine command outcome. Under `errors: 'ignore'` a
546
- // cancelled/aborted run RESOLVES an empty result, which left cached would be served as a
547
- // real empty result for the full TTL (e.g. a valid merge-base read back as "none").
548
- // Invalidate on anything that isn't a clean exit, or whenever the aggregate signal aborted,
549
- // so the entry self-evicts instead of poisoning later callers.
550
- //
551
- // `status !== 'exited'` is what catches the case a bare `exitCode` check cannot. A swallowed
552
- // `GitWarnings` match used to report `exitCode: 0` UNCONDITIONALLY — the old code read it off
553
- // a `result` that is only ever assigned on the non-throwing path, so it was always the `?? 0`
554
- // fallback which meant `exitCode !== 0` could never fire and every swallowed failure was
555
- // cached. A `warned` result now carries git's real code, so it's the status, not the code,
556
- // that has to do the work here. The `exitCode !== 0` half is kept as-is — a non-zero exit is
557
- // a real answer and arguably cacheable, but it isn't cached today and this isn't the change
558
- // to start.
559
- if (result.completion.status !== 'exited' || result.exitCode !== 0 || signal?.aborted) {
560
- cacheable.invalidate();
561
- }
562
- return result;
563
- },
564
- // Forward this caller's cancellation so `getOrCreate` races each caller's own wait — an
565
- // aborting caller rejects only itself, leaving the shared work (and its riders) intact.
566
- { ...options.caching.options, cancellation: options.cancellation });
567
- }
568
- return this.runCore(options, runArgs, gitCommand);
569
- }
570
- async runCore(options, args, gitCommand) {
571
- const start = hrtime();
572
- gitCommand = `[${options.cwd}] ${gitCommand}`;
573
- const { cancellation, configs, correlationKey, errors: errorHandling, encoding, runLocally: _, selfMaintenance, ...opts } = options;
574
- const defaultTimeout = this.options.gitTimeout ?? 60000;
575
- const runOpts = {
576
- ...opts,
577
- timeout: opts.timeout === 0 || defaultTimeout === 0 ? undefined : (opts.timeout ?? defaultTimeout),
578
- encoding: (encoding ?? 'utf8') === 'utf8' ? 'utf8' : 'buffer',
579
- decode: this.options.decode,
580
- env: this.buildEnv(options.env),
581
- quiet: errorHandling === 'ignore',
582
- };
583
- const cacheKey = `${correlationKey !== undefined ? `${correlationKey}:` : ''}${options?.stdin != null ? `${uniqueCounterForStdin.next()}:` : ''}${cancellation != null ? `${getAbortSignalId(cancellation)}:` : ''}${gitCommand}`;
584
- // When the subprocess actually started — `start` includes GitQueue wait, which is congestion rather
585
- // than anything the repository did. Stays undefined for a dedup rider or a command aborted while queued.
586
- let execStart;
587
- let waiting;
588
- let promise = this.pendingCommands.get(cacheKey);
589
- if (promise == null) {
590
- waiting = false;
591
- // Create a deferred promise and store it immediately to prevent duplicate commands
592
- // Note: cancellation tokens are not part of the dedup key — calls with different AbortSignals will not be deduplicated
593
- const deferred = defer();
594
- promise = deferred.promise;
595
- this.pendingCommands.set(cacheKey, promise);
596
- // Fixes https://github.com/gitkraken/vscode-gitlens/issues/73 & https://github.com/gitkraken/vscode-gitlens/issues/161
597
- // See https://stackoverflow.com/questions/4144417/how-to-handle-asian-characters-in-file-names-in-git-on-os-x
598
- args.unshift('-c', 'core.quotepath=false', '-c', 'color.ui=false', ...(configs ?? emptyArray));
599
- if (process.platform === 'win32') {
600
- args.unshift('-c', 'core.longpaths=true');
601
- }
602
- if (cancellation != null) {
603
- runOpts.cancellation = cancellation;
604
- }
605
- // Determine command priority:
606
- // Priority resolution:
607
- // 1. Explicit priority from options (highest precedence)
608
- // 2. Inferred from command type (only downgrades expensive commands to Background)
609
- const priority = options.priority ?? inferGitCommandPriority(args);
610
- // Execute through the queue (interactive/normal run immediately, background is throttled)
611
- const gitPath = await this.path();
612
- void this._queue
613
- .run(priority, () => {
614
- execStart = hrtime();
615
- return runSpawn(gitPath, args, encoding ?? 'utf8', runOpts);
616
- }, cancellation)
617
- .then(deferred.fulfill, (e) => deferred.cancel(e instanceof Error ? e : new Error(String(e))))
618
- .finally(() => {
619
- this.pendingCommands.delete(cacheKey);
620
- })
621
- .catch(() => { });
622
- }
623
- else {
624
- waiting = true;
625
- Logger.trace(`${formatLoggableScopeBlock('GIT')} ${gitCommand} \u00b7 awaiting existing call...`);
626
- }
627
- let exception;
628
- let result;
629
- try {
630
- result = await promise;
631
- // A normal `runSpawn` only resolves on a clean exit — `code !== 0 || signal` rejects — but the
632
- // `exitCodeOnly` overload resolves unconditionally, INCLUDING for a signalled run (no code, partial
633
- // or absent stdout). Coercing that to `0` would report a killed command as a clean success, so
634
- // classify it as the failure it is.
635
- if (result.exitCode == null) {
636
- // SIGTERM is how BOTH a timeout kill and a caller abort terminate, so it has to group with
637
- // cancellations here exactly as it does on the reject path — `failed`/`signal` is for every
638
- // OTHER signal. Only `exitCodeOnly` reaches this: a native spawn `timeout` fires
639
- // `close(null, 'SIGTERM')` with no `error` event, so it resolves instead of rejecting.
640
- // Throwing hands it to the catch below, which owns the timeout-vs-abort heuristic, the ABORTED
641
- // log, and the `onAborted` hook — none of which a branch here would fire.
642
- if (result.signal === 'SIGTERM') {
643
- throw new CancelledRunError(gitCommand, true, undefined, result.signal);
644
- }
645
- return {
646
- stdout: result.stdout,
647
- stderr: result.stderr,
648
- completion: {
649
- status: 'failed',
650
- reason: result.signal != null ? 'signal' : 'unstarted',
651
- error: new Error(`Command terminated without an exit code${result.signal != null ? ` (${result.signal})` : ''}`),
652
- },
653
- };
654
- }
655
- return {
656
- stdout: result.stdout,
657
- stderr: result.stderr,
658
- exitCode: result.exitCode,
659
- completion: { status: 'exited', code: result.exitCode },
660
- };
661
- }
662
- catch (ex) {
663
- let cancellationReason = 'unknown';
664
- if (ex instanceof CancelledRunError) {
665
- const duration = getDurationMilliseconds(start);
666
- const timeout = runOpts.timeout ?? 0;
667
- const reason = timeout > 0 && duration >= timeout - 100
668
- ? 'timeout'
669
- : cancellation?.aborted
670
- ? 'cancellation'
671
- : 'unknown';
672
- // Also surfaced on the result, but DIAGNOSTIC ONLY — a timeout kill and a caller abort are both
673
- // SIGTERM, so this duration heuristic can be wrong near the boundary. Never gate behavior on it.
674
- cancellationReason = reason === 'cancellation' ? 'aborted' : reason;
675
- Logger.warn(`${formatLoggableScopeBlock('GIT')} ${gitCommand} \u00b7 ABORTED after ${duration}ms (${reason})`);
676
- this.options.hooks?.onAborted?.({
677
- operation: gitCommand,
678
- reason: reason,
679
- duration: duration,
680
- timeout: timeout,
681
- });
682
- }
683
- if (errorHandling === 'ignore') {
684
- if (ex instanceof RunError) {
685
- // `code` is `string | number | undefined`: a numeric string is a real exit code, but an errno
686
- // (`'ENOENT'`) means the spawn itself failed, and `undefined` means the process never exited
687
- // normally. Only the numeric case is an exit; the rest previously became `0` or `NaN`.
688
- const code = typeof ex.code === 'number' ? ex.code : ex.code != null ? parseInt(ex.code, 10) : NaN;
689
- const exited = Number.isInteger(code);
690
- return {
691
- stdout: ex.stdout,
692
- stderr: ex.stderr,
693
- ...(exited ? { exitCode: code } : {}),
694
- completion: ex instanceof CancelledRunError
695
- ? { status: 'cancelled', reason: cancellationReason, error: ex }
696
- : exited
697
- ? { status: 'exited', code: code }
698
- : {
699
- status: 'failed',
700
- // A signal means it ran and was killed (partial `stdout` may exist);
701
- // no signal and no numeric code means it never got that far.
702
- reason: ex.signal != null ? 'signal' : 'unstarted',
703
- error: ex,
704
- },
705
- };
706
- }
707
- // No cancellation branch here: `CancelledRunError extends RunError`, so reaching this at all
708
- // proves `ex` is neither.
709
- return {
710
- stdout: '',
711
- stderr: undefined,
712
- completion: {
713
- status: 'failed',
714
- // No `RunError` means no process was ever spawned — a queue rejection or a
715
- // failure before `spawn` returned. (Not an untrusted workspace: `run` refuses
716
- // those up front, so they never reach this catch.)
717
- reason: 'unstarted',
718
- error: ex instanceof Error ? ex : new Error(String(ex)),
719
- },
720
- };
721
- }
722
- if (ex instanceof CancelledRunError) {
723
- exception = new CancellationError(ex);
724
- }
725
- else {
726
- exception = new GitError(ex);
727
- }
728
- if (errorHandling === 'throw')
729
- throw exception;
730
- // Rethrows unless the message matches a `GitWarnings` pattern, in which case it logs and returns the
731
- // key that matched. Capture the error first — `exception` is cleared to keep it out of the `finally`
732
- // log, but the result still needs to carry it.
733
- const swallowed = exception;
734
- const warning = defaultExceptionHandler(exception, options.cwd, start);
735
- exception = undefined;
736
- // The command did NOT produce this empty stdout — a warning was swallowed. Say so, or the caller
737
- // can't tell a genuinely empty answer (`noCommits`) from a read that never happened
738
- // (`notARepository`).
739
- //
740
- // The process DID exit though (a warning is only ever swallowed for a non-zero exit), so report the
741
- // code. `GitError.exitCode` is `number | string | undefined` — same normalization as the
742
- // `errors: 'ignore'` path above, since only the numeric case is a real exit.
743
- const rawCode = swallowed instanceof GitError ? swallowed.exitCode : undefined;
744
- const code = typeof rawCode === 'number' ? rawCode : rawCode != null ? parseInt(rawCode, 10) : NaN;
745
- // No `stderr`: it belongs to the error here. The top-level field is the channel for runs that
746
- // completed WITHOUT one (`exited` carries no error, so a successful command's stderr has nowhere
747
- // else to go) — a swallowed warning always has a `GitError`, and it carries the stderr. Reading
748
- // `result?.stderr` would be dead anyway: `result` is only assigned on the non-throwing path.
749
- return {
750
- stdout: '',
751
- ...(Number.isInteger(code) ? { exitCode: code } : {}),
752
- completion: { status: 'warned', warning: warning, error: swallowed },
753
- };
754
- }
755
- finally {
756
- this.logGitCommandComplete(gitCommand, exception, getDurationMilliseconds(start),
757
- // 0 when the subprocess never started — there is no execution time to attribute. Also 0 for
758
- // GitLens's own maintenance work, which is slow by design and must not read as repo slowness.
759
- execStart == null || selfMaintenance ? 0 : getDurationMilliseconds(execStart), waiting, options.cwd, args);
760
- }
761
- }
762
- async *stream(options, ...args) {
763
- if (this.options.isTrusted?.() === false)
764
- throw new WorkspaceUntrustedError();
765
- const start = hrtime();
766
- const streamId = uniqueCounterForStream.next();
767
- const { configs, stdin, stdinEncoding, cancellation, encoding, ...opts } = options;
768
- const runArgs = args.filter(a => a != null);
769
- const spawnOpts = {
770
- // Unless provided, ignore stdin and leave default streams for stdout and stderr
771
- stdio: [stdin ? 'pipe' : 'ignore', null, null],
772
- ...opts,
773
- signal: cancellation,
774
- env: this.buildEnv(options.env),
775
- };
776
- const gitCommand = `(spawn) [${spawnOpts.cwd}] git ${runArgs.join(' ')}`;
777
- // Fixes https://github.com/gitkraken/vscode-gitlens/issues/73 & https://github.com/gitkraken/vscode-gitlens/issues/161
778
- // See https://stackoverflow.com/questions/4144417/how-to-handle-asian-characters-in-file-names-in-git-on-os-x
779
- runArgs.unshift('-c', 'core.quotepath=false', '-c', 'color.ui=false', ...(configs ?? emptyArray));
780
- if (process.platform === 'win32') {
781
- runArgs.unshift('-c', 'core.longpaths=true');
782
- }
783
- const command = await this.path();
784
- const proc = spawn(command, runArgs, spawnOpts);
785
- if (stdin) {
786
- proc.stdin?.end(stdin, (stdinEncoding ?? 'utf8'));
787
- }
788
- let exception;
789
- const promise = new Promise((resolve, reject) => {
790
- const stderrChunks = [];
791
- if (proc.stderr) {
792
- proc.stderr?.setEncoding('utf8');
793
- proc.stderr.on('data', chunk => stderrChunks.push(chunk));
794
- }
795
- proc.once('error', ex => {
796
- if (ex?.name === 'AbortError')
797
- return;
798
- exception = new GitError(ex);
799
- });
800
- proc.once('close', (code, signal) => {
801
- if (code === 0) {
802
- resolve();
803
- return;
804
- }
805
- if (signal === 'SIGTERM') {
806
- // If the caller aborted, just resolve
807
- if (cancellation?.aborted) {
808
- resolve();
809
- }
810
- else {
811
- reject(new CancelledRunError(proc.spawnargs.join(' '), true, code ?? undefined, signal));
812
- }
813
- return;
814
- }
815
- // If the caller didn't read the complete stream, just resolve
816
- if (signal === 'SIGPIPE' ||
817
- code === 141 /* SIGPIPE */ ||
818
- (code === 128 && stderrChunks.some(c => c.includes('Connection reset by peer')))) {
819
- resolve();
820
- return;
821
- }
822
- const stderr = stderrChunks.join('').trim();
823
- reject(new GitError(new RunError({
824
- message: `Error (${code}): ${stderr || 'Unknown'}`,
825
- cmd: proc.spawnargs.join(' '),
826
- killed: proc.killed,
827
- code: proc.exitCode,
828
- }, '', stderr)));
829
- });
830
- });
831
- let cleanedUp = false;
832
- const cleanup = () => {
833
- if (cleanedUp)
834
- return;
835
- cleanedUp = true;
836
- try {
837
- proc.removeAllListeners();
838
- }
839
- catch { }
840
- // Streaming spawns directly, with no GitQueue wait to exclude. It isn't pure subprocess time
841
- // either the generator applies backpressure, so a slow consumer stalls the pipe and inflates
842
- // this but there's no separate signal to measure here.
843
- const duration = getDurationMilliseconds(start);
844
- this.logGitCommandComplete(gitCommand, exception, duration, duration, false, spawnOpts.cwd, runArgs, streamId);
845
- };
846
- try {
847
- this.logGitCommandStart(gitCommand, streamId);
848
- try {
849
- if (proc.stdout) {
850
- const enc = encoding ?? 'utf8';
851
- if (enc === 'utf8' || enc === 'binary' || enc === 'buffer') {
852
- proc.stdout.setEncoding(enc === 'buffer' ? 'utf8' : enc);
853
- for await (const chunk of proc.stdout) {
854
- yield chunk;
855
- }
856
- }
857
- else {
858
- // Non-UTF-8 encoding: collect raw buffers and decode at the end.
859
- // Streaming decode is unsafe because chunk boundaries can split
860
- // multi-byte sequences in the source encoding.
861
- const decode = this.options.decode;
862
- if (decode == null) {
863
- throw new Error(`Non-UTF-8 encoding '${enc}' requested for stream but no decode function configured`);
864
- }
865
- const buffers = [];
866
- for await (const chunk of proc.stdout) {
867
- buffers.push(Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk));
868
- }
869
- yield await decode(Buffer.concat(buffers), { encoding: enc });
870
- }
871
- }
872
- }
873
- finally {
874
- // This await MUST be in this inner finally block to ensure the child process close event completes
875
- // before we call removeAllListeners() in the outer finally. When consumers break early from the
876
- // async generator (e.g., reading only the first chunk), the git process receives SIGPIPE and triggers
877
- // the close handler asynchronously. Without awaiting here, removeAllListeners() would execute before
878
- // the close handler finishes, causing a race condition and potential resource leaks.
879
- await promise;
880
- }
881
- }
882
- catch (ex) {
883
- exception = ex;
884
- throw ex;
885
- }
886
- finally {
887
- cleanup();
888
- }
889
- // Ensure cleanup happens immediately when the generator is explicitly closed (e.g., via break or return)
890
- // This is called by JavaScript when the generator is abandoned, ensuring logGitCommand is called
891
- // synchronously rather than waiting for garbage collection.
892
- // oxlint-disable-next-line typescript/no-meaningless-void-operator
893
- return void cleanup();
894
- }
895
- async rev_parse__git_dir(cwd) {
896
- const result = await this.run({ cwd: cwd, errors: 'ignore' }, 'rev-parse', '--git-dir', '--git-common-dir');
897
- if (!result.stdout)
898
- return undefined;
899
- // Keep trailing spaces which are part of the directory name
900
- let [dotGitPath, commonDotGitPath] = result.stdout.split('\n').map(r => r.trimStart());
901
- // Make sure to normalize: https://github.com/git-for-windows/git/issues/2478
902
- if (!isAbsolute(dotGitPath)) {
903
- dotGitPath = joinPaths(cwd, dotGitPath);
904
- }
905
- dotGitPath = normalizePath(dotGitPath);
906
- if (commonDotGitPath) {
907
- if (!isAbsolute(commonDotGitPath)) {
908
- commonDotGitPath = joinPaths(cwd, commonDotGitPath);
909
- }
910
- commonDotGitPath = normalizePath(commonDotGitPath);
911
- return { path: dotGitPath, commonPath: commonDotGitPath !== dotGitPath ? commonDotGitPath : undefined };
912
- }
913
- return { path: dotGitPath };
914
- }
915
- async rev_parse__show_toplevel(cwd) {
916
- let result;
917
- if (this.options.isTrusted?.() === false) {
918
- // Check if the folder is a bare clone: if it has a file named HEAD && `rev-parse --show-cdup` is empty
919
- if (await fsExists(joinPaths(cwd, 'HEAD'))) {
920
- try {
921
- result = await this.run({ cwd: cwd, errors: 'throw', configs: ['-C', cwd] }, 'rev-parse', '--show-cdup');
922
- if (!result.stdout.trim()) {
923
- Logger.warn(`Skipping (untrusted workspace); bare clone repository detected in '${cwd}'`);
924
- return emptyArray;
925
- }
926
- }
927
- catch {
928
- // If this throws, we should be good to open the repo (e.g. HEAD doesn't exist)
929
- }
930
- }
931
- }
932
- try {
933
- result = await this.run({ cwd: cwd, errors: 'throw' }, 'rev-parse', '--show-toplevel');
934
- // Make sure to normalize: https://github.com/git-for-windows/git/issues/2478
935
- // Keep trailing spaces which are part of the directory name
936
- return !result.stdout
937
- ? emptyArray
938
- : [true, normalizePath(result.stdout.trimStart().replace(trailingNewlineRegex, ''))];
939
- }
940
- catch (ex) {
941
- if (ex instanceof WorkspaceUntrustedError)
942
- return emptyArray;
943
- if (!(ex instanceof GitError))
944
- throw ex;
945
- const unsafeMatch = GitErrors.unsafeRepository.exec(ex.stderr ?? '');
946
- if (unsafeMatch != null) {
947
- Logger.warn(`Skipping; unsafe repository detected in '${unsafeMatch[1] || unsafeMatch[2]}'; run '${unsafeMatch[3]}' to allow it`);
948
- return [false];
949
- }
950
- const inDotGit = GitWarnings.mustRunInWorkTree.test(ex.stderr ?? '');
951
- // Check if we are in a bare clone
952
- if (inDotGit && this.options.isTrusted?.() !== false) {
953
- result = await this.run({ cwd: cwd, errors: 'ignore' }, 'rev-parse', '--is-bare-repository');
954
- if (result.stdout.trim() === 'true') {
955
- const result = await this.rev_parse__git_dir(cwd);
956
- const repoPath = result?.commonPath ?? result?.path;
957
- if (repoPath?.length)
958
- return [true, repoPath];
959
- }
960
- }
961
- if (inDotGit || ex.original?.code === 'ENOENT') {
962
- // If the `cwd` doesn't exist, walk backward to see if any parent folder exists
963
- let exists = inDotGit ? false : await fsExists(cwd);
964
- if (!exists) {
965
- do {
966
- const parent = dirname(cwd);
967
- if (parent === cwd || parent.length === 0)
968
- return emptyArray;
969
- cwd = parent;
970
- exists = await fsExists(cwd);
971
- } while (!exists);
972
- return this.rev_parse__show_toplevel(cwd);
973
- }
974
- }
975
- return emptyArray;
976
- }
977
- }
978
- logGitCommandStart(command, id) {
979
- Logger.info(`${formatLoggableScopeBlock(`GIT:\u2192${id}`)} ${command} \u00b7 starting...`);
980
- this.options.logger?.info(`${formatLoggableScopeBlock(`\u2192${id}`, '')} ${command} \u2022 starting...`);
981
- }
982
- logGitCommandComplete(command, ex, duration,
983
- /** Subprocess-only duration (excludes GitQueue wait); 0 when it never ran. */
984
- execDuration, waiting, cwd, args, id) {
985
- const slow = duration > slowCallWarningThreshold;
986
- const status = slow && waiting ? ' (slow, waiting)' : waiting ? ' (waiting)' : slow ? ' (slow)' : '';
987
- // The health signal is gated on the SUBPROCESS time, not the total: time spent queued behind other
988
- // git work is congestion, not repository slowness, and counting it would let a busy queue (including
989
- // our own background maintenance holding slots) manufacture the evidence that recommends more
990
- // maintenance. Logging keeps the total — the wait is exactly what you want to see when diagnosing.
991
- //
992
- // A deduplicated rider (`waiting`) shares the executed command's duration, so counting it too
993
- // would double-count a single slow subprocess — fire only for the command that actually ran.
994
- // Guarded: this runs inside the command's `finally`, so a hook throw would otherwise replace
995
- // the command's real result/error for the caller.
996
- if (execDuration > slowCallWarningThreshold && !waiting) {
997
- try {
998
- this.options.hooks?.onSlowCommand?.({
999
- operation: args != null ? getPrimaryGitCommand(args) : undefined,
1000
- cwd: cwd,
1001
- duration: execDuration,
1002
- });
1003
- }
1004
- catch { }
1005
- }
1006
- if (ex != null) {
1007
- Logger.error(undefined, `${formatLoggableScopeBlock(id ? `GIT:\u2190${id}` : 'GIT')} ${command} \u00b7 ${isCancellationError(ex)
1008
- ? 'cancelled'
1009
- : (ex.message || String(ex) || '')
1010
- .trim()
1011
- .replace(/fatal:\s*/g, '')
1012
- .replace(/\r?\n|\r/g, ' \u00b7 ')} [${duration}ms]${status}`);
1013
- }
1014
- else if (slow) {
1015
- Logger.warn(`${formatLoggableScopeBlock(id ? `GIT:\u2190${id}` : 'GIT', `*${duration}ms`)} ${command} [*${duration}ms]${status}`);
1016
- }
1017
- else {
1018
- Logger.info(`${formatLoggableScopeBlock(id ? `GIT:\u2190${id}` : 'GIT', `${duration}ms`)} ${command} [${duration}ms]${status}`);
1019
- }
1020
- const logMessage = `${formatLoggableScopeBlock(`${id ? `\u2190${id}` : ''}${slow ? '*' : ''}`, `${duration}ms`)} ${command}${status}`;
1021
- if (ex != null) {
1022
- this.options.logger?.error(`${logMessage} \u2022 FAILED\n${String(ex)}`);
1023
- }
1024
- else {
1025
- this.options.logger?.info(`${logMessage} \u2022 completed`);
1026
- }
1027
- }
1028
- }
346
+ var Git = class {
347
+ _locator;
348
+ options;
349
+ /** Map of running git commands — avoids running duplicate overlapping commands */
350
+ pendingCommands = /* @__PURE__ */ new Map();
351
+ /** Queue for throttling background git operations */
352
+ _queue;
353
+ /** Detects event-loop stalls while at least one git command is in flight */
354
+ _eventLoopMonitor = new EventLoopMonitor();
355
+ /** Count of git commands currently in flight, across both the exec and streaming paths */
356
+ _activeCommandCount = 0;
357
+ /** Cached base environment: process.env + static options.env + GCM/LC_ALL vars */
358
+ _baseEnv;
359
+ /** Cached full environment: base + dynamic getEnvironment() result */
360
+ _fullEnv;
361
+ /** Last dynamic env reference, used to detect when getEnvironment() returns a new object */
362
+ _lastDynamicEnv;
363
+ constructor(_locator, options = {}) {
364
+ this._locator = _locator;
365
+ this.options = options;
366
+ this._queue = new GitQueue(options.queue, { onSlowQueue: options.hooks?.onSlowQueue });
367
+ }
368
+ /**
369
+ * Returns the base environment for git commands. Cached to avoid spreading
370
+ * process.env (30-100+ keys) on every call. Includes static options.env and
371
+ * GCM/LC_ALL vars but NOT dynamic getEnvironment() or per-call env overrides.
372
+ */
373
+ getBaseEnv() {
374
+ return this._baseEnv ??= {
375
+ ...process.env,
376
+ ...this.options.env ?? emptyObj,
377
+ GCM_INTERACTIVE: "NEVER",
378
+ GCM_PRESERVE_CREDS: "TRUE",
379
+ LC_ALL: "C"
380
+ };
381
+ }
382
+ /**
383
+ * Returns the full environment (base + dynamic). Cached and invalidated
384
+ * when getEnvironment() returns a different object reference.
385
+ */
386
+ getFullEnv() {
387
+ const dynamicEnv = this.options.getEnvironment?.() ?? void 0;
388
+ if (this._fullEnv != null && dynamicEnv === this._lastDynamicEnv) return this._fullEnv;
389
+ this._lastDynamicEnv = dynamicEnv;
390
+ this._fullEnv = dynamicEnv != null ? {
391
+ ...this.getBaseEnv(),
392
+ ...dynamicEnv
393
+ } : this.getBaseEnv();
394
+ return this._fullEnv;
395
+ }
396
+ /**
397
+ * Builds the environment for a git command. Returns the cached full env
398
+ * directly when there are no per-call overrides (the common case).
399
+ * Only allocates a new object when per-call env overrides are provided.
400
+ */
401
+ buildEnv(perCallEnv) {
402
+ if (perCallEnv == null) return this.getFullEnv();
403
+ return {
404
+ ...this.getFullEnv(),
405
+ ...perCallEnv
406
+ };
407
+ }
408
+ dispose() {
409
+ this._queue.dispose();
410
+ this._eventLoopMonitor.dispose();
411
+ }
412
+ /** Clear pending commands (e.g. on cache reset) */
413
+ clearPendingCommands() {
414
+ this.pendingCommands.clear();
415
+ }
416
+ /** Marks one more git command as in flight; starts the event-loop monitor on the first. */
417
+ beginActiveCommand() {
418
+ this._activeCommandCount++;
419
+ if (this._activeCommandCount === 1) this._eventLoopMonitor.start();
420
+ }
421
+ /** Marks a git command as finished; stops the event-loop monitor once none remain. */
422
+ endActiveCommand() {
423
+ this._activeCommandCount--;
424
+ if (this._activeCommandCount === 0) this._eventLoopMonitor.stop();
425
+ }
426
+ /** Formats the shared "event loop blocked" log annotation; undefined below {@link eventLoopDelayAnnotationThreshold}. */
427
+ formatEventLoopDelayAnnotation(sinceEpochMs) {
428
+ const delay = this._eventLoopMonitor.maxDelaySince(sinceEpochMs);
429
+ return delay >= eventLoopDelayAnnotationThreshold ? `event loop blocked ~${delay}ms` : void 0;
430
+ }
431
+ _gitLocation;
432
+ _gitLocationPromise;
433
+ async getLocation() {
434
+ if (this._gitLocation == null) {
435
+ this._gitLocationPromise ??= this._locator();
436
+ this._gitLocation = await this._gitLocationPromise;
437
+ }
438
+ return this._gitLocation;
439
+ }
440
+ async path() {
441
+ return (await this.getLocation()).path;
442
+ }
443
+ async version() {
444
+ return (await this.getLocation()).version;
445
+ }
446
+ supports(feature) {
447
+ const version = gitFeaturesByVersion.get(feature);
448
+ if (version == null) return true;
449
+ return this._gitLocation != null ? compare(fromString(this._gitLocation.version), fromString(version)) !== -1 : this.version().then((v) => compare(fromString(v), fromString(version)) !== -1);
450
+ }
451
+ supported(feature) {
452
+ function supportedCore(gitVersion) {
453
+ return [...gitFeaturesByVersion].filter(([f, v]) => f.startsWith(feature) && compare(fromString(gitVersion), v) !== -1).map(([f]) => f);
454
+ }
455
+ if (this._gitLocation == null) return this.version().then((v) => supportedCore(v));
456
+ return supportedCore(this._gitLocation.version);
457
+ }
458
+ async ensureSupports(feature, prefixOrMessage, suffix) {
459
+ const version = gitFeaturesByVersion.get(feature);
460
+ if (version == null) return;
461
+ const gitVersion = await this.version();
462
+ if (compare(fromString(gitVersion), fromString(version)) !== -1) return;
463
+ const message = typeof prefixOrMessage === "function" ? prefixOrMessage(version, gitVersion) : `${prefixOrMessage} requires a newer version of Git (>= ${version}) than is currently installed (${gitVersion}).${suffix}`;
464
+ throw new Error(message);
465
+ }
466
+ async run(options, ...args) {
467
+ if (this.options.isTrusted?.() === false) throw new WorkspaceUntrustedError();
468
+ const runArgs = args.filter((a) => a != null);
469
+ const gitCommand = `git ${runArgs.join(" ")}`;
470
+ if (options.caching != null) return options.caching.cache.getOrCreate(options.caching.commonPath ?? options.cwd, gitCommand, async (cacheable, signal) => {
471
+ const result = await this.runCore({
472
+ ...options,
473
+ caching: void 0,
474
+ cancellation: signal ?? options.cancellation
475
+ }, runArgs, gitCommand);
476
+ if (result.completion.status !== "exited" || result.exitCode !== 0 || signal?.aborted) cacheable.invalidate();
477
+ return result;
478
+ }, {
479
+ ...options.caching.options,
480
+ cancellation: options.cancellation
481
+ });
482
+ return this.runCore(options, runArgs, gitCommand);
483
+ }
484
+ async runCore(options, args, gitCommand) {
485
+ const start = hrtime();
486
+ const startEpochMs = Date.now();
487
+ gitCommand = `[${options.cwd}] ${gitCommand}`;
488
+ const { cancellation, configs, correlationKey, errors: errorHandling, encoding, runLocally: _, selfMaintenance, slownessCategory, ...opts } = options;
489
+ const defaultTimeout = this.options.gitTimeout ?? 6e4;
490
+ const runOpts = {
491
+ ...opts,
492
+ timeout: opts.timeout === 0 || defaultTimeout === 0 ? void 0 : opts.timeout ?? defaultTimeout,
493
+ encoding: (encoding ?? "utf8") === "utf8" ? "utf8" : "buffer",
494
+ decode: this.options.decode,
495
+ env: this.buildEnv(options.env),
496
+ quiet: errorHandling === "ignore"
497
+ };
498
+ const cacheKey = `${correlationKey !== void 0 ? `${correlationKey}:` : ""}${options?.stdin != null ? `${uniqueCounterForStdin.next()}:` : ""}${cancellation != null ? `${getAbortSignalId(cancellation)}:` : ""}${gitCommand}`;
499
+ let execStart;
500
+ let waiting;
501
+ let promise = this.pendingCommands.get(cacheKey);
502
+ if (promise == null) {
503
+ waiting = false;
504
+ const deferred = defer();
505
+ promise = deferred.promise;
506
+ this.pendingCommands.set(cacheKey, promise);
507
+ args.unshift("-c", "core.quotepath=false", "-c", "color.ui=false", ...configs ?? emptyArray);
508
+ if (process.platform === "win32") args.unshift("-c", "core.longpaths=true");
509
+ if (cancellation != null) runOpts.cancellation = cancellation;
510
+ const priority = options.priority ?? inferGitCommandPriority(args);
511
+ const gitPath = await this.path();
512
+ this._queue.run(priority, () => {
513
+ execStart = hrtime();
514
+ return runSpawn(gitPath, args, encoding ?? "utf8", runOpts);
515
+ }, cancellation).then(deferred.fulfill, (e) => deferred.cancel(e instanceof Error ? e : new Error(String(e)))).finally(() => {
516
+ this.pendingCommands.delete(cacheKey);
517
+ }).catch(() => {});
518
+ } else {
519
+ waiting = true;
520
+ _logger.trace(`${formatLoggableScopeBlock("GIT")} ${gitCommand} \u00b7 awaiting existing call...`);
521
+ }
522
+ this.beginActiveCommand();
523
+ let exception;
524
+ let result;
525
+ try {
526
+ result = await promise;
527
+ if (result.exitCode == null) {
528
+ if (result.signal === "SIGTERM") throw new CancelledRunError(gitCommand, true, void 0, result.signal);
529
+ return {
530
+ stdout: result.stdout,
531
+ stderr: result.stderr,
532
+ completion: {
533
+ status: "failed",
534
+ reason: result.signal != null ? "signal" : "unstarted",
535
+ error: /* @__PURE__ */ new Error(`Command terminated without an exit code${result.signal != null ? ` (${result.signal})` : ""}`)
536
+ }
537
+ };
538
+ }
539
+ return {
540
+ stdout: result.stdout,
541
+ stderr: result.stderr,
542
+ exitCode: result.exitCode,
543
+ completion: {
544
+ status: "exited",
545
+ code: result.exitCode
546
+ }
547
+ };
548
+ } catch (ex) {
549
+ let cancellationReason = "unknown";
550
+ if (ex instanceof CancelledRunError) {
551
+ const duration = getDurationMilliseconds(start);
552
+ const timeout = runOpts.timeout ?? 0;
553
+ const reason = timeout > 0 && duration >= timeout - 100 ? "timeout" : cancellation?.aborted ? "cancellation" : "unknown";
554
+ cancellationReason = reason === "cancellation" ? "aborted" : reason;
555
+ const loopDelayAnnotation = this.formatEventLoopDelayAnnotation(startEpochMs);
556
+ const loopDelayText = loopDelayAnnotation != null ? ` \u00b7 ${loopDelayAnnotation}` : "";
557
+ _logger.warn(`${formatLoggableScopeBlock("GIT")} ${gitCommand} \u00b7 ABORTED after ${duration}ms (${reason})${loopDelayText}`);
558
+ this.options.hooks?.onAborted?.({
559
+ operation: gitCommand,
560
+ reason,
561
+ duration,
562
+ timeout
563
+ });
564
+ }
565
+ if (errorHandling === "ignore") {
566
+ if (ex instanceof RunError) {
567
+ const code = typeof ex.code === "number" ? ex.code : ex.code != null ? parseInt(ex.code, 10) : NaN;
568
+ const exited = Number.isInteger(code);
569
+ return {
570
+ stdout: ex.stdout,
571
+ stderr: ex.stderr,
572
+ ...exited ? { exitCode: code } : {},
573
+ completion: ex instanceof CancelledRunError ? {
574
+ status: "cancelled",
575
+ reason: cancellationReason,
576
+ error: ex
577
+ } : exited ? {
578
+ status: "exited",
579
+ code
580
+ } : {
581
+ status: "failed",
582
+ reason: ex.signal != null ? "signal" : "unstarted",
583
+ error: ex
584
+ }
585
+ };
586
+ }
587
+ return {
588
+ stdout: "",
589
+ stderr: void 0,
590
+ completion: {
591
+ status: "failed",
592
+ reason: "unstarted",
593
+ error: ex instanceof Error ? ex : new Error(String(ex))
594
+ }
595
+ };
596
+ }
597
+ if (ex instanceof CancelledRunError) exception = new CancellationError(ex);
598
+ else exception = new GitError(ex);
599
+ if (errorHandling === "throw") throw exception;
600
+ const swallowed = exception;
601
+ const warning = defaultExceptionHandler(exception, options.cwd, start);
602
+ exception = void 0;
603
+ const rawCode = swallowed instanceof GitError ? swallowed.exitCode : void 0;
604
+ const code = typeof rawCode === "number" ? rawCode : rawCode != null ? parseInt(rawCode, 10) : NaN;
605
+ return {
606
+ stdout: "",
607
+ ...Number.isInteger(code) ? { exitCode: code } : {},
608
+ completion: {
609
+ status: "warned",
610
+ warning,
611
+ error: swallowed
612
+ }
613
+ };
614
+ } finally {
615
+ this.logGitCommandComplete(gitCommand, exception, getDurationMilliseconds(start), execStart == null || selfMaintenance ? 0 : getDurationMilliseconds(execStart), waiting, options.cwd, args, slownessCategory, startEpochMs);
616
+ this.endActiveCommand();
617
+ }
618
+ }
619
+ async *stream(options, ...args) {
620
+ if (this.options.isTrusted?.() === false) throw new WorkspaceUntrustedError();
621
+ const start = hrtime();
622
+ const startEpochMs = Date.now();
623
+ const streamId = uniqueCounterForStream.next();
624
+ const { configs, stdin, stdinEncoding, cancellation, encoding, slownessCategory, ...opts } = options;
625
+ const runArgs = args.filter((a) => a != null);
626
+ const spawnOpts = {
627
+ stdio: [
628
+ stdin ? "pipe" : "ignore",
629
+ null,
630
+ null
631
+ ],
632
+ ...opts,
633
+ signal: cancellation,
634
+ env: this.buildEnv(options.env)
635
+ };
636
+ const gitCommand = `(spawn) [${spawnOpts.cwd}] git ${runArgs.join(" ")}`;
637
+ runArgs.unshift("-c", "core.quotepath=false", "-c", "color.ui=false", ...configs ?? emptyArray);
638
+ if (process.platform === "win32") runArgs.unshift("-c", "core.longpaths=true");
639
+ const command = await this.path();
640
+ const proc = spawn(command, runArgs, spawnOpts);
641
+ if (stdin) proc.stdin?.end(stdin, stdinEncoding ?? "utf8");
642
+ let exception;
643
+ const promise = new Promise((resolve, reject) => {
644
+ const stderrChunks = [];
645
+ if (proc.stderr) {
646
+ proc.stderr?.setEncoding("utf8");
647
+ proc.stderr.on("data", (chunk) => stderrChunks.push(chunk));
648
+ }
649
+ proc.once("error", (ex) => {
650
+ if (ex?.name === "AbortError") return;
651
+ exception = new GitError(ex);
652
+ });
653
+ proc.once("close", (code, signal) => {
654
+ if (code === 0) {
655
+ resolve();
656
+ return;
657
+ }
658
+ if (signal === "SIGTERM") {
659
+ if (cancellation?.aborted) resolve();
660
+ else reject(new CancelledRunError(proc.spawnargs.join(" "), true, code ?? void 0, signal));
661
+ return;
662
+ }
663
+ if (signal === "SIGPIPE" || code === 141 || code === 128 && stderrChunks.some((c) => c.includes("Connection reset by peer"))) {
664
+ resolve();
665
+ return;
666
+ }
667
+ const stderr = stderrChunks.join("").trim();
668
+ reject(new GitError(new RunError({
669
+ message: `Error (${code}): ${stderr || "Unknown"}`,
670
+ cmd: proc.spawnargs.join(" "),
671
+ killed: proc.killed,
672
+ code: proc.exitCode
673
+ }, "", stderr)));
674
+ });
675
+ });
676
+ let cleanedUp = false;
677
+ const cleanup = () => {
678
+ if (cleanedUp) return;
679
+ cleanedUp = true;
680
+ try {
681
+ proc.removeAllListeners();
682
+ } catch {}
683
+ const duration = getDurationMilliseconds(start);
684
+ this.logGitCommandComplete(gitCommand, exception, duration, duration, false, spawnOpts.cwd, runArgs, slownessCategory, startEpochMs, streamId);
685
+ this.endActiveCommand();
686
+ };
687
+ this.beginActiveCommand();
688
+ try {
689
+ this.logGitCommandStart(gitCommand, streamId);
690
+ try {
691
+ if (proc.stdout) {
692
+ const enc = encoding ?? "utf8";
693
+ if (enc === "utf8" || enc === "binary" || enc === "buffer") {
694
+ proc.stdout.setEncoding(enc === "buffer" ? "utf8" : enc);
695
+ for await (const chunk of proc.stdout) yield chunk;
696
+ } else {
697
+ const decode = this.options.decode;
698
+ if (decode == null) throw new Error(`Non-UTF-8 encoding '${enc}' requested for stream but no decode function configured`);
699
+ const buffers = [];
700
+ for await (const chunk of proc.stdout) buffers.push(Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk));
701
+ yield await decode(Buffer.concat(buffers), { encoding: enc });
702
+ }
703
+ }
704
+ } finally {
705
+ await promise;
706
+ }
707
+ } catch (ex) {
708
+ exception = ex;
709
+ throw ex;
710
+ } finally {
711
+ cleanup();
712
+ }
713
+ return void cleanup();
714
+ }
715
+ async rev_parse__git_dir(cwd) {
716
+ const result = await this.run({
717
+ cwd,
718
+ errors: "ignore"
719
+ }, "rev-parse", "--git-dir", "--git-common-dir");
720
+ if (!result.stdout) return void 0;
721
+ let [dotGitPath, commonDotGitPath] = result.stdout.split("\n").map((r) => r.trimStart());
722
+ if (!isAbsolute(dotGitPath)) dotGitPath = joinPaths(cwd, dotGitPath);
723
+ dotGitPath = normalizePath(dotGitPath);
724
+ if (commonDotGitPath) {
725
+ if (!isAbsolute(commonDotGitPath)) commonDotGitPath = joinPaths(cwd, commonDotGitPath);
726
+ commonDotGitPath = normalizePath(commonDotGitPath);
727
+ return {
728
+ path: dotGitPath,
729
+ commonPath: commonDotGitPath !== dotGitPath ? commonDotGitPath : void 0
730
+ };
731
+ }
732
+ return { path: dotGitPath };
733
+ }
734
+ async rev_parse__show_toplevel(cwd) {
735
+ let result;
736
+ if (this.options.isTrusted?.() === false) {
737
+ if (await fsExists(joinPaths(cwd, "HEAD"))) try {
738
+ result = await this.run({
739
+ cwd,
740
+ errors: "throw",
741
+ configs: ["-C", cwd]
742
+ }, "rev-parse", "--show-cdup");
743
+ if (!result.stdout.trim()) {
744
+ _logger.warn(`Skipping (untrusted workspace); bare clone repository detected in '${cwd}'`);
745
+ return emptyArray;
746
+ }
747
+ } catch {}
748
+ }
749
+ try {
750
+ result = await this.run({
751
+ cwd,
752
+ errors: "throw"
753
+ }, "rev-parse", "--show-toplevel");
754
+ return !result.stdout ? emptyArray : [true, normalizePath(result.stdout.trimStart().replace(trailingNewlineRegex, ""))];
755
+ } catch (ex) {
756
+ if (ex instanceof WorkspaceUntrustedError) return emptyArray;
757
+ if (!(ex instanceof GitError)) throw ex;
758
+ const unsafeMatch = GitErrors.unsafeRepository.exec(ex.stderr ?? "");
759
+ if (unsafeMatch != null) {
760
+ _logger.warn(`Skipping; unsafe repository detected in '${unsafeMatch[1] || unsafeMatch[2]}'; run '${unsafeMatch[3]}' to allow it`);
761
+ return [false];
762
+ }
763
+ const inDotGit = GitWarnings.mustRunInWorkTree.test(ex.stderr ?? "");
764
+ if (inDotGit && this.options.isTrusted?.() !== false) {
765
+ result = await this.run({
766
+ cwd,
767
+ errors: "ignore"
768
+ }, "rev-parse", "--is-bare-repository");
769
+ if (result.stdout.trim() === "true") {
770
+ const result = await this.rev_parse__git_dir(cwd);
771
+ const repoPath = result?.commonPath ?? result?.path;
772
+ if (repoPath?.length) return [true, repoPath];
773
+ }
774
+ }
775
+ if (inDotGit || ex.original?.code === "ENOENT") {
776
+ let exists = inDotGit ? false : await fsExists(cwd);
777
+ if (!exists) {
778
+ do {
779
+ const parent = dirname(cwd);
780
+ if (parent === cwd || parent.length === 0) return emptyArray;
781
+ cwd = parent;
782
+ exists = await fsExists(cwd);
783
+ } while (!exists);
784
+ return this.rev_parse__show_toplevel(cwd);
785
+ }
786
+ }
787
+ return emptyArray;
788
+ }
789
+ }
790
+ logGitCommandStart(command, id) {
791
+ _logger.info(`${formatLoggableScopeBlock(`GIT:\u2192${id}`)} ${command} \u00b7 starting...`);
792
+ this.options.logger?.info(`${formatLoggableScopeBlock(`\u2192${id}`, "")} ${command} \u2022 starting...`);
793
+ }
794
+ logGitCommandComplete(command, ex, duration, execDuration, waiting, cwd, args, slownessCategory, startEpochMs, id) {
795
+ const slow = duration > slowCallWarningThreshold;
796
+ const annotations = [];
797
+ if (slow) annotations.push("slow");
798
+ if (waiting) annotations.push("waiting");
799
+ else if (execDuration > 0) {
800
+ const queued = duration - execDuration;
801
+ if (queued >= queueWaitAnnotationThreshold) annotations.push(`queued ${queued}ms`);
802
+ }
803
+ if (slow) {
804
+ const loopDelayAnnotation = this.formatEventLoopDelayAnnotation(startEpochMs);
805
+ if (loopDelayAnnotation != null) annotations.push(loopDelayAnnotation);
806
+ }
807
+ const status = annotations.length > 0 ? ` (${annotations.join(", ")})` : "";
808
+ if (execDuration > 2e3 && !waiting) {
809
+ const execEventLoopDelay = this._eventLoopMonitor.maxDelaySince(startEpochMs + (duration - execDuration));
810
+ try {
811
+ this.options.hooks?.onSlowCommand?.({
812
+ operation: args != null ? getPrimaryGitCommand(args) : void 0,
813
+ cwd,
814
+ duration: execDuration,
815
+ eventLoopDelay: execEventLoopDelay,
816
+ slownessCategory
817
+ });
818
+ } catch {}
819
+ }
820
+ if (ex != null) _logger.error(void 0, `${formatLoggableScopeBlock(id ? `GIT:\u2190${id}` : "GIT")} ${command} \u00b7 ${isCancellationError(ex) ? "cancelled" : (ex.message || String(ex) || "").trim().replace(/fatal:\s*/g, "").replace(/\r?\n|\r/g, " · ")} [${duration}ms]${status}`);
821
+ else if (slow) _logger.warn(`${formatLoggableScopeBlock(id ? `GIT:\u2190${id}` : "GIT", `*${duration}ms`)} ${command} [*${duration}ms]${status}`);
822
+ else _logger.info(`${formatLoggableScopeBlock(id ? `GIT:\u2190${id}` : "GIT", `${duration}ms`)} ${command} [${duration}ms]${status}`);
823
+ const logMessage = `${formatLoggableScopeBlock(`${id ? `\u2190${id}` : ""}${slow ? "*" : ""}`, `${duration}ms`)} ${command}${status}`;
824
+ if (ex != null) this.options.logger?.error(`${logMessage} \u2022 FAILED\n${String(ex)}`);
825
+ else this.options.logger?.info(`${logMessage} \u2022 completed`);
826
+ }
827
+ };
1029
828
  /**
1030
- * Swallows an error whose message matches a known-benign {@link GitWarnings} pattern, returning WHICH one
1031
- * matched so the caller can record it — the distinction matters, since `noCommits` is a real answer while
1032
- * `notARepository` is a failed read. Rethrows anything else.
1033
- */
1034
- export function defaultExceptionHandler(ex, cwd, start) {
1035
- if (isCancellationError(ex))
1036
- throw ex;
1037
- const msg = ex.message || ex.toString();
1038
- if (msg) {
1039
- for (const [key, warning] of Object.entries(GitWarnings)) {
1040
- if (warning.test(msg)) {
1041
- const duration = start !== undefined ? ` [${getDurationMilliseconds(start)}ms]` : '';
1042
- Logger.warn(`[${cwd}] Git ${msg
1043
- .trim()
1044
- .replace(/fatal:\s*/g, '')
1045
- .replace(/\r?\n|\r/g, ' \u00b7 ')}${duration}`);
1046
- return key;
1047
- }
1048
- }
1049
- const match = GitErrors.badRevision.exec(msg);
1050
- if (match != null) {
1051
- const [, ref] = match;
1052
- // Since looking up a ref with ^3 (e.g. looking for untracked files in a stash) can error on some versions of git just ignore it
1053
- // Swallowed, but it matched no `GitWarnings` entry — `undefined` records "unclassified", which
1054
- // callers must treat as "not a real answer" exactly like any warning they don't whitelist.
1055
- if (ref?.endsWith('^3'))
1056
- return undefined;
1057
- }
1058
- }
1059
- throw ex;
829
+ * Swallows an error whose message matches a known-benign {@link GitWarnings} pattern, returning WHICH one
830
+ * matched so the caller can record it — the distinction matters, since `noCommits` is a real answer while
831
+ * `notARepository` is a failed read. Rethrows anything else.
832
+ */
833
+ function defaultExceptionHandler(ex, cwd, start) {
834
+ if (isCancellationError(ex)) throw ex;
835
+ const msg = ex.message || ex.toString();
836
+ if (msg) {
837
+ for (const [key, warning] of Object.entries(GitWarnings)) if (warning.test(msg)) {
838
+ const duration = start !== void 0 ? ` [${getDurationMilliseconds(start)}ms]` : "";
839
+ _logger.warn(`[${cwd}] Git ${msg.trim().replace(/fatal:\s*/g, "").replace(/\r?\n|\r/g, " · ")}${duration}`);
840
+ return key;
841
+ }
842
+ const match = GitErrors.badRevision.exec(msg);
843
+ if (match != null) {
844
+ const [, ref] = match;
845
+ if (ref?.endsWith("^3")) return void 0;
846
+ }
847
+ }
848
+ throw ex;
1060
849
  }
850
+ //#endregion
851
+ export { Git, GitError, GitErrors, GitWarnings, classifySearchError, classifySigningError, defaultExceptionHandler, getGitCommandError, gitConfigsBranch, gitConfigsDiff, gitConfigsLog, gitConfigsLogWithFiles, gitConfigsLogWithSignatures, gitConfigsPull, gitConfigsStatus, inferSigningFormatFromError, maxGitCliLength, slowCallWarningThreshold };
852
+
1061
853
  //# sourceMappingURL=git.js.map