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