@gitkraken/core-gitlens 0.5.116 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +32 -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 +174 -140
- package/dist/git/models/issue.js +86 -84
- 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 -230
- 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 +49 -38
- package/dist/git/remotes/azure-devops.js +254 -224
- 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 -149
- 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 -54
- package/dist/plus/integrations/providers/azure/azure.js +453 -515
- package/dist/plus/integrations/providers/azure/azure.js.map +1 -1
- package/dist/plus/integrations/providers/azure/models.d.ts +258 -229
- package/dist/plus/integrations/providers/azure/models.js +241 -203
- package/dist/plus/integrations/providers/azure/models.js.map +1 -1
- package/dist/plus/integrations/providers/azureDevOps.d.ts +132 -130
- package/dist/plus/integrations/providers/azureDevOps.js +775 -921
- 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 +818 -856
- 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 -229
- 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 +101 -24
- package/docs/kepler-read-api-parity.md +15 -12
- 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 -258
- 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 -353
- 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 -307
- 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 -177
- 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 -822
- package/src/plus/integrations/providers/azure/models.ts +0 -621
- package/src/plus/integrations/providers/azureDevOps.ts +0 -1346
- 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 -1816
- 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 -272
- 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
|
@@ -1,1862 +0,0 @@
|
|
|
1
|
-
import type { CollectionMetadata, CollectionScopeFailure, GitHubPullRequestFieldMap } from '@gitkraken/provider-apis';
|
|
2
|
-
import type { Account, UnidentifiedAuthor } from '../../../git/models/author.js';
|
|
3
|
-
import type { DefaultBranch } from '../../../git/models/defaultBranch.js';
|
|
4
|
-
import type { IssueSearchCriteria, IssueShape } from '../../../git/models/issue.js';
|
|
5
|
-
import type { IssueOrPullRequestState as PullRequestState } from '../../../git/models/issueOrPullRequest.js';
|
|
6
|
-
import type {
|
|
7
|
-
PullRequest,
|
|
8
|
-
PullRequestMergeMethod,
|
|
9
|
-
PullRequestSearchCriteria,
|
|
10
|
-
PullRequestStackInfo,
|
|
11
|
-
PullRequestStateFilter,
|
|
12
|
-
} from '../../../git/models/pullRequest.js';
|
|
13
|
-
import type { RepositoryMetadata } from '../../../git/models/repositoryMetadata.js';
|
|
14
|
-
import type { ResourceDescriptor } from '../../../git/models/resourceDescriptor.js';
|
|
15
|
-
import type { PullRequestUrlIdentity } from '../../../git/utils/pullRequest.utils.js';
|
|
16
|
-
import { ensureArray } from '../../../utils/array.js';
|
|
17
|
-
import { isCancellationError } from '../../../utils/cancellation.js';
|
|
18
|
-
import { gate } from '../../../utils/decorators/gate.js';
|
|
19
|
-
import { trace } from '../../../utils/decorators/log.js';
|
|
20
|
-
import { first } from '../../../utils/iterable.js';
|
|
21
|
-
import { Logger } from '../../../utils/logger.js';
|
|
22
|
-
import { getScopedLogger } from '../../../utils/logger.scoped.js';
|
|
23
|
-
import type { PagedResult } from '../../../utils/paging.js';
|
|
24
|
-
import type { ProviderAuthenticationSession } from '../authentication/models.js';
|
|
25
|
-
import { toTokenWithInfo } from '../authentication/models.js';
|
|
26
|
-
import {
|
|
27
|
-
throwIfCallerContractError,
|
|
28
|
-
toCollectionFailureError,
|
|
29
|
-
toCollectionScopeFailure,
|
|
30
|
-
} from '../collectionMetadata.js';
|
|
31
|
-
import type { IntegrationIds } from '../constants.js';
|
|
32
|
-
import { GitCloudHostIntegrationId, GitSelfManagedHostIntegrationId } from '../constants.js';
|
|
33
|
-
import { toError } from '../errors.js';
|
|
34
|
-
import type {
|
|
35
|
-
GetIssuesOptions,
|
|
36
|
-
GetPullRequestsOptions,
|
|
37
|
-
PagedProjectInput,
|
|
38
|
-
PagedRepoInput,
|
|
39
|
-
ProviderAccount,
|
|
40
|
-
ProviderApiPagedResult,
|
|
41
|
-
ProviderHierarchyResult,
|
|
42
|
-
ProviderIssue,
|
|
43
|
-
ProviderOrganization,
|
|
44
|
-
ProviderPullRequest,
|
|
45
|
-
ProviderRepoInput,
|
|
46
|
-
ProviderReposInput,
|
|
47
|
-
ProviderRepository,
|
|
48
|
-
} from '../providers/models.js';
|
|
49
|
-
import {
|
|
50
|
-
IssueFilter,
|
|
51
|
-
PagingMode,
|
|
52
|
-
PullRequestFilter,
|
|
53
|
-
toIssueShape,
|
|
54
|
-
toProviderIssueStates,
|
|
55
|
-
toProviderPullRequestStates,
|
|
56
|
-
} from '../providers/models.js';
|
|
57
|
-
import type { ProvidersApi } from '../providers/providersApi.js';
|
|
58
|
-
import { mergeCollectionMetadata, throwIfAllSettledFailed } from '../providers/utils/providerPaging.js';
|
|
59
|
-
import type {
|
|
60
|
-
IntegrationResult,
|
|
61
|
-
IntegrationType,
|
|
62
|
-
ProviderIssueSearchPage,
|
|
63
|
-
ProviderPullRequestSearchPage,
|
|
64
|
-
} from './integration.js';
|
|
65
|
-
import { IntegrationBase } from './integration.js';
|
|
66
|
-
import type { MyIssuesForReposOptions } from './issueReads.js';
|
|
67
|
-
|
|
68
|
-
function isAzureDevOpsProvider(
|
|
69
|
-
providerId: IntegrationIds,
|
|
70
|
-
): providerId is GitCloudHostIntegrationId.AzureDevOps | GitSelfManagedHostIntegrationId.AzureDevOpsServer {
|
|
71
|
-
return (
|
|
72
|
-
providerId === GitCloudHostIntegrationId.AzureDevOps ||
|
|
73
|
-
providerId === GitSelfManagedHostIntegrationId.AzureDevOpsServer
|
|
74
|
-
);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
function normalizeSelfManagedBaseUrl(domain: string | undefined, protocol: string | undefined): string | undefined {
|
|
78
|
-
const value = domain?.trim();
|
|
79
|
-
if (!value) return undefined;
|
|
80
|
-
|
|
81
|
-
if (/^[a-z][a-z\d+\-.]*:\/\//i.test(value)) {
|
|
82
|
-
try {
|
|
83
|
-
const url = new URL(value);
|
|
84
|
-
return `${url.protocol}//${url.host}${url.pathname.replace(/\/+$/, '')}`;
|
|
85
|
-
} catch {
|
|
86
|
-
return undefined;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
const scheme = protocol ?? 'https:';
|
|
91
|
-
try {
|
|
92
|
-
const url = new URL(`${scheme}//${value}`);
|
|
93
|
-
return `${url.protocol}//${url.host}${url.pathname.replace(/\/+$/, '')}`;
|
|
94
|
-
} catch {
|
|
95
|
-
return undefined;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
function getSelfManagedApiBaseUrl(
|
|
100
|
-
providerId: IntegrationIds,
|
|
101
|
-
domain: string | undefined,
|
|
102
|
-
protocol: string | undefined,
|
|
103
|
-
): string | undefined {
|
|
104
|
-
const baseUrl = normalizeSelfManagedBaseUrl(domain, protocol);
|
|
105
|
-
if (baseUrl == null) return undefined;
|
|
106
|
-
|
|
107
|
-
switch (providerId) {
|
|
108
|
-
case GitSelfManagedHostIntegrationId.CloudGitHubEnterprise:
|
|
109
|
-
return `${baseUrl.replace(/\/api(?:\/v\d+)?$/, '')}/api/v3`;
|
|
110
|
-
case GitSelfManagedHostIntegrationId.CloudGitLabSelfHosted:
|
|
111
|
-
return baseUrl.replace(/\/api(?:\/v\d+)?$/, '');
|
|
112
|
-
case GitSelfManagedHostIntegrationId.BitbucketServer:
|
|
113
|
-
return `${baseUrl.replace(/\/rest\/api\/1\.0$/, '')}/rest/api/1.0`;
|
|
114
|
-
case GitSelfManagedHostIntegrationId.AzureDevOpsServer:
|
|
115
|
-
return baseUrl;
|
|
116
|
-
default:
|
|
117
|
-
return undefined;
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
/** Read options for {@link GitHostIntegration.searchMyPullRequests} and the provider hook behind it. */
|
|
122
|
-
export type SearchMyPullRequestsOptions = {
|
|
123
|
-
/** Suppresses the user-facing notification when the read fails. */
|
|
124
|
-
silent?: boolean;
|
|
125
|
-
/**
|
|
126
|
-
* PR states to include (open/closed/merged/all). Providers that cannot express it in a single query
|
|
127
|
-
* filter the normalized results; omitted preserves the historical open-only behavior.
|
|
128
|
-
*/
|
|
129
|
-
state?: PullRequestStateFilter;
|
|
130
|
-
includeReviewRequested?: boolean;
|
|
131
|
-
};
|
|
132
|
-
|
|
133
|
-
/** Read options for {@link GitHostIntegration.searchPullRequests} and the provider hook behind it. */
|
|
134
|
-
export type SearchPullRequestsOptions = {
|
|
135
|
-
/** PR states to include; omitted preserves the provider's default. */
|
|
136
|
-
include?: PullRequestState[];
|
|
137
|
-
};
|
|
138
|
-
|
|
139
|
-
type MyPullRequestsForReposOptions = {
|
|
140
|
-
filters?: PullRequestFilter[];
|
|
141
|
-
cursor?: string;
|
|
142
|
-
customUrl?: string;
|
|
143
|
-
page?: number;
|
|
144
|
-
pageSize?: number;
|
|
145
|
-
/** PR states to include; when omitted the provider returns its default (open only). */
|
|
146
|
-
state?: PullRequestStateFilter | PullRequestStateFilter[];
|
|
147
|
-
/** Requests the lightweight row shape without per-row build status or commit count. */
|
|
148
|
-
summary?: boolean;
|
|
149
|
-
};
|
|
150
|
-
|
|
151
|
-
/**
|
|
152
|
-
* Rejects a read the provider can't serve as asked: logs the reason and returns it as the `{ error }` half of an
|
|
153
|
-
* {@link IntegrationResult}, timed from `start`.
|
|
154
|
-
*
|
|
155
|
-
* A single builder because these refusals are a contract, not incidental returns — the read cores below reject on
|
|
156
|
-
* unsupported input, an inexpressible filter set, or an unresolvable filter account, and each one must reach the
|
|
157
|
-
* caller as an error it can surface as a warning rather than as an empty success. Writing the message once also
|
|
158
|
-
* keeps the logged text and the thrown text from drifting apart, which is exactly what happened while each site
|
|
159
|
-
* spelled its message out twice.
|
|
160
|
-
*/
|
|
161
|
-
function unsupportedRead<T>(message: string, start: number, logContext?: string): IntegrationResult<T> {
|
|
162
|
-
Logger.warn(message, logContext);
|
|
163
|
-
return { error: new Error(message), duration: performance.now() - start };
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
/**
|
|
167
|
-
* Both fields gate the same GitHub `commits` subtree, so either truthy key retains the build-status rollup.
|
|
168
|
-
* An absent map retains the full row; a summary read explicitly drops both optional fields.
|
|
169
|
-
*/
|
|
170
|
-
const summaryPullRequestFields: Required<GitHubPullRequestFieldMap> = {
|
|
171
|
-
headCommit: false,
|
|
172
|
-
commitCount: false,
|
|
173
|
-
};
|
|
174
|
-
|
|
175
|
-
export abstract class GitHostIntegration<
|
|
176
|
-
ID extends IntegrationIds = IntegrationIds,
|
|
177
|
-
T extends ResourceDescriptor = ResourceDescriptor,
|
|
178
|
-
> extends IntegrationBase<ID> {
|
|
179
|
-
readonly type: IntegrationType = 'git';
|
|
180
|
-
|
|
181
|
-
@gate()
|
|
182
|
-
@trace()
|
|
183
|
-
async getAccountForEmail(repo: T, email: string, options?: { avatarSize?: number }): Promise<Account | undefined> {
|
|
184
|
-
const scope = getScopedLogger();
|
|
185
|
-
|
|
186
|
-
const connected = this.maybeConnected ?? (await this.isConnected());
|
|
187
|
-
if (!connected) return undefined;
|
|
188
|
-
|
|
189
|
-
await this.refreshSessionIfExpired(scope);
|
|
190
|
-
|
|
191
|
-
try {
|
|
192
|
-
const author = await this.getProviderAccountForEmail(this._session!, repo, email, options);
|
|
193
|
-
this.resetRequestExceptionCount('getAccountForEmail');
|
|
194
|
-
return author;
|
|
195
|
-
} catch (ex) {
|
|
196
|
-
this.handleProviderException('getAccountForEmail', ex, { scope: scope });
|
|
197
|
-
return undefined;
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
protected abstract getProviderAccountForEmail(
|
|
202
|
-
session: ProviderAuthenticationSession,
|
|
203
|
-
repo: T,
|
|
204
|
-
email: string,
|
|
205
|
-
options?: { avatarSize?: number },
|
|
206
|
-
): Promise<Account | undefined>;
|
|
207
|
-
|
|
208
|
-
/**
|
|
209
|
-
* Returns the SSH signing keys (full OpenSSH-format `<type> <key> [comment]` strings) registered by the accounts
|
|
210
|
-
* matching the given emails on this integration, for building an `allowed_signers` file. Keyed by lowercased email;
|
|
211
|
-
* emails with no match (and unsupported integrations) are absent. Batching the lookups is left to the integration.
|
|
212
|
-
*/
|
|
213
|
-
@gate()
|
|
214
|
-
@trace()
|
|
215
|
-
async getSshSigningKeysForEmails(repo: T, emails: string[]): Promise<Map<string, string[]>> {
|
|
216
|
-
const scope = getScopedLogger();
|
|
217
|
-
|
|
218
|
-
const connected = this.maybeConnected ?? (await this.isConnected());
|
|
219
|
-
if (!connected) return new Map();
|
|
220
|
-
|
|
221
|
-
await this.refreshSessionIfExpired(scope);
|
|
222
|
-
|
|
223
|
-
try {
|
|
224
|
-
const keys = await this.getProviderSshSigningKeysForEmails(this._session!, repo, emails);
|
|
225
|
-
this.resetRequestExceptionCount('getSshSigningKeysForEmails');
|
|
226
|
-
return keys;
|
|
227
|
-
} catch (ex) {
|
|
228
|
-
this.handleProviderException('getSshSigningKeysForEmails', ex, { scope: scope });
|
|
229
|
-
return new Map();
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
/** Override in integrations that expose users' SSH signing keys. Defaults to none. */
|
|
234
|
-
protected getProviderSshSigningKeysForEmails(
|
|
235
|
-
_session: ProviderAuthenticationSession,
|
|
236
|
-
_repo: T,
|
|
237
|
-
_emails: string[],
|
|
238
|
-
): Promise<Map<string, string[]>> {
|
|
239
|
-
return Promise.resolve(new Map<string, string[]>());
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
@gate()
|
|
243
|
-
@trace()
|
|
244
|
-
async getAccountForCommit(
|
|
245
|
-
repo: T,
|
|
246
|
-
rev: string,
|
|
247
|
-
options?: { avatarSize?: number },
|
|
248
|
-
): Promise<Account | UnidentifiedAuthor | undefined> {
|
|
249
|
-
const scope = getScopedLogger();
|
|
250
|
-
|
|
251
|
-
const connected = this.maybeConnected ?? (await this.isConnected());
|
|
252
|
-
if (!connected) return undefined;
|
|
253
|
-
|
|
254
|
-
await this.refreshSessionIfExpired(scope);
|
|
255
|
-
|
|
256
|
-
try {
|
|
257
|
-
const author = await this.getProviderAccountForCommit(this._session!, repo, rev, options);
|
|
258
|
-
this.resetRequestExceptionCount('getAccountForCommit');
|
|
259
|
-
return author;
|
|
260
|
-
} catch (ex) {
|
|
261
|
-
this.handleProviderException('getAccountForCommit', ex, { scope: scope });
|
|
262
|
-
return undefined;
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
protected abstract getProviderAccountForCommit(
|
|
267
|
-
session: ProviderAuthenticationSession,
|
|
268
|
-
repo: T,
|
|
269
|
-
rev: string,
|
|
270
|
-
options?: { avatarSize?: number },
|
|
271
|
-
): Promise<Account | UnidentifiedAuthor | undefined>;
|
|
272
|
-
|
|
273
|
-
@trace()
|
|
274
|
-
async getDefaultBranch(
|
|
275
|
-
repo: T,
|
|
276
|
-
options?: { cancellation?: AbortSignal; expiryOverride?: boolean | number },
|
|
277
|
-
): Promise<DefaultBranch | undefined> {
|
|
278
|
-
const scope = getScopedLogger();
|
|
279
|
-
|
|
280
|
-
const connected = this.maybeConnected ?? (await this.isConnected());
|
|
281
|
-
if (!connected) return undefined;
|
|
282
|
-
|
|
283
|
-
await this.refreshSessionIfExpired(scope);
|
|
284
|
-
|
|
285
|
-
const defaultBranch = this.ctx.cache.getRepositoryDefaultBranch(
|
|
286
|
-
repo,
|
|
287
|
-
this,
|
|
288
|
-
() => ({
|
|
289
|
-
value: (async () => {
|
|
290
|
-
try {
|
|
291
|
-
const result = await this.getProviderDefaultBranch(this._session!, repo, options?.cancellation);
|
|
292
|
-
this.resetRequestExceptionCount('getDefaultBranch');
|
|
293
|
-
return result;
|
|
294
|
-
} catch (ex) {
|
|
295
|
-
this.handleProviderException('getDefaultBranch', ex, { scope: scope });
|
|
296
|
-
return undefined;
|
|
297
|
-
}
|
|
298
|
-
})(),
|
|
299
|
-
}),
|
|
300
|
-
{ expiryOverride: options?.expiryOverride },
|
|
301
|
-
);
|
|
302
|
-
return defaultBranch;
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
getRepoInfo?(repo: {
|
|
306
|
-
owner: string;
|
|
307
|
-
name: string;
|
|
308
|
-
project?: string;
|
|
309
|
-
connectionId?: string;
|
|
310
|
-
}): Promise<ProviderRepository | undefined>;
|
|
311
|
-
|
|
312
|
-
/** Stack membership for every stacked pull request in the repository, keyed by pull request number.
|
|
313
|
-
* Only hosts with a stacks concept implement this (currently GitHub). */
|
|
314
|
-
getStacksByPullRequestNumber?(
|
|
315
|
-
owner: string,
|
|
316
|
-
repo: string,
|
|
317
|
-
cancellation?: AbortSignal,
|
|
318
|
-
): Promise<Map<number, PullRequestStackInfo> | undefined>;
|
|
319
|
-
|
|
320
|
-
protected abstract getProviderDefaultBranch(
|
|
321
|
-
{ accessToken }: ProviderAuthenticationSession,
|
|
322
|
-
repo: T,
|
|
323
|
-
cancellation?: AbortSignal,
|
|
324
|
-
): Promise<DefaultBranch | undefined>;
|
|
325
|
-
|
|
326
|
-
@trace()
|
|
327
|
-
async getRepositoryMetadata(
|
|
328
|
-
repo: T,
|
|
329
|
-
options?: { cancellation?: AbortSignal; expiryOverride?: boolean | number },
|
|
330
|
-
): Promise<RepositoryMetadata | undefined> {
|
|
331
|
-
const scope = getScopedLogger();
|
|
332
|
-
|
|
333
|
-
const connected = this.maybeConnected ?? (await this.isConnected());
|
|
334
|
-
if (!connected) return undefined;
|
|
335
|
-
|
|
336
|
-
await this.refreshSessionIfExpired(scope);
|
|
337
|
-
|
|
338
|
-
const metadata = this.ctx.cache.getRepositoryMetadata(
|
|
339
|
-
repo,
|
|
340
|
-
this,
|
|
341
|
-
() => ({
|
|
342
|
-
value: (async () => {
|
|
343
|
-
try {
|
|
344
|
-
const result = await this.getProviderRepositoryMetadata(
|
|
345
|
-
this._session!,
|
|
346
|
-
repo,
|
|
347
|
-
options?.cancellation,
|
|
348
|
-
);
|
|
349
|
-
this.resetRequestExceptionCount('getRepositoryMetadata');
|
|
350
|
-
return result;
|
|
351
|
-
} catch (ex) {
|
|
352
|
-
this.handleProviderException('getRepositoryMetadata', ex, { scope: scope });
|
|
353
|
-
return undefined;
|
|
354
|
-
}
|
|
355
|
-
})(),
|
|
356
|
-
}),
|
|
357
|
-
{ expiryOverride: options?.expiryOverride },
|
|
358
|
-
);
|
|
359
|
-
return metadata;
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
protected abstract getProviderRepositoryMetadata(
|
|
363
|
-
session: ProviderAuthenticationSession,
|
|
364
|
-
repo: T,
|
|
365
|
-
cancellation?: AbortSignal,
|
|
366
|
-
): Promise<RepositoryMetadata | undefined>;
|
|
367
|
-
|
|
368
|
-
/**
|
|
369
|
-
* Whether this git host implements generic org discovery. False for providers that register no
|
|
370
|
-
* {@link getProviderOrganizationsForUser} hook (e.g. Bitbucket Data Center) — the facade uses this to
|
|
371
|
-
* report `unsupported` instead of a silent empty list, which is indistinguishable from "has no orgs".
|
|
372
|
-
*/
|
|
373
|
-
get supportsOrganizationDiscovery(): boolean {
|
|
374
|
-
return this.getProviderOrganizationsForUser != null;
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
/** Whether this git host implements generic repository discovery ({@link getProviderRepositoriesForOrg}). */
|
|
378
|
-
get supportsRepositoryDiscovery(): boolean {
|
|
379
|
-
return this.getProviderRepositoriesForOrg != null;
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
/**
|
|
383
|
-
* Whether this git host has a project tier between org and repo ({@link getProviderProjectsForOrg}). Only
|
|
384
|
-
* Azure DevOps does; the facade uses this to skip the read entirely rather than call a core that returns
|
|
385
|
-
* `undefined` for a session-less reason and be misread as a broken connection.
|
|
386
|
-
*/
|
|
387
|
-
get supportsProjectDiscovery(): boolean {
|
|
388
|
-
return this.getProviderProjectsForOrg != null;
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
/**
|
|
392
|
-
* Whether this git host implements the account-wide user-affiliated repository read
|
|
393
|
-
* ({@link getProviderRepositoriesForUser}) — the org-less `gk provider repos <provider>` equivalent.
|
|
394
|
-
*/
|
|
395
|
-
get supportsUserRepositoryDiscovery(): boolean {
|
|
396
|
-
return this.getProviderRepositoriesForUser != null;
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
/**
|
|
400
|
-
* Whether this git host exposes issues on the ProviderBackend surface. Most git hosts do; a host with no
|
|
401
|
-
* usable issue tracker overrides this to false — Bitbucket Cloud (deprecated in favor of dedicated issue
|
|
402
|
-
* integrations like Jira) and Bitbucket Data Center (never had one) — so the facade reports issues as
|
|
403
|
-
* unsupported instead of serving a partial/deprecated source or failing inside a provider client that
|
|
404
|
-
* registers no issue function at all.
|
|
405
|
-
*
|
|
406
|
-
* Keep this in sync with {@link ProviderMetadata.supportedIssueFilters}: a provider that declares no issue
|
|
407
|
-
* filters and no issue read is answering the same capability question twice, and the two must agree.
|
|
408
|
-
*/
|
|
409
|
-
get supportsIssues(): boolean {
|
|
410
|
-
return true;
|
|
411
|
-
}
|
|
412
|
-
|
|
413
|
-
/**
|
|
414
|
-
* Lists the organizations (orgs/workspaces/groups) the current user belongs to on this host.
|
|
415
|
-
* `truncated === true` means the defensive page-drain backstop stopped before the upstream listing was
|
|
416
|
-
* exhausted.
|
|
417
|
-
*
|
|
418
|
-
* Resolves the session for `connectionId` (or the primary connection when omitted, honoring multi-account
|
|
419
|
-
* reads) and recovers a thrown error into `{ error }` so callers can surface it as a warning instead of
|
|
420
|
-
* swallowing it to `undefined`.
|
|
421
|
-
*/
|
|
422
|
-
@trace()
|
|
423
|
-
async getOrganizationsForUserResult(
|
|
424
|
-
connectionId?: string,
|
|
425
|
-
): Promise<IntegrationResult<ProviderHierarchyResult<ProviderOrganization> | undefined>> {
|
|
426
|
-
const scope = getScopedLogger();
|
|
427
|
-
// `connectionId` targets a specific account (multi-account); omitted reads the primary.
|
|
428
|
-
const session = await this.resolveReadSession(connectionId, scope);
|
|
429
|
-
if (session == null) return undefined;
|
|
430
|
-
|
|
431
|
-
const start = performance.now();
|
|
432
|
-
try {
|
|
433
|
-
const result = await this.getProviderOrganizationsForUser?.(session);
|
|
434
|
-
this.resetRequestExceptionCount('getOrganizationsForUser');
|
|
435
|
-
return { value: result, duration: performance.now() - start };
|
|
436
|
-
} catch (ex) {
|
|
437
|
-
this.handleProviderException('getOrganizationsForUser', ex, {
|
|
438
|
-
scope: scope,
|
|
439
|
-
connectionId: connectionId,
|
|
440
|
-
});
|
|
441
|
-
return { error: toError(ex), duration: performance.now() - start };
|
|
442
|
-
}
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
protected getProviderOrganizationsForUser?(
|
|
446
|
-
session: ProviderAuthenticationSession,
|
|
447
|
-
): Promise<ProviderHierarchyResult<ProviderOrganization> | undefined>;
|
|
448
|
-
|
|
449
|
-
/**
|
|
450
|
-
* Result-returning list of the projects a git host exposes beneath its orgs, unified into the
|
|
451
|
-
* {@link ProviderOrganization} shape. Only Azure DevOps has a project tier between org and repo; other
|
|
452
|
-
* git hosts have none and leave {@link getProviderProjectsForOrg} undefined, so this returns `undefined`
|
|
453
|
-
* for them (the ProviderBackend facade then treats them as having no projects). With `org`, scopes to
|
|
454
|
-
* that org's projects; without, returns projects across every org the user can see.
|
|
455
|
-
*/
|
|
456
|
-
@trace()
|
|
457
|
-
async getProjectsForOrgResult(
|
|
458
|
-
org?: string,
|
|
459
|
-
connectionId?: string,
|
|
460
|
-
): Promise<IntegrationResult<ProviderHierarchyResult<ProviderOrganization> | undefined>> {
|
|
461
|
-
const scope = getScopedLogger();
|
|
462
|
-
// `connectionId` targets a specific account (multi-account); omitted reads the primary.
|
|
463
|
-
const session = await this.resolveReadSession(connectionId, scope);
|
|
464
|
-
if (session == null) return undefined;
|
|
465
|
-
|
|
466
|
-
if (this.getProviderProjectsForOrg == null) {
|
|
467
|
-
return undefined;
|
|
468
|
-
}
|
|
469
|
-
|
|
470
|
-
const start = performance.now();
|
|
471
|
-
try {
|
|
472
|
-
const result = await this.getProviderProjectsForOrg(session, org);
|
|
473
|
-
this.resetRequestExceptionCount('getProjectsForOrg');
|
|
474
|
-
return { value: result, duration: performance.now() - start };
|
|
475
|
-
} catch (ex) {
|
|
476
|
-
this.handleProviderException('getProjectsForOrg', ex, { scope: scope, connectionId: connectionId });
|
|
477
|
-
return { error: toError(ex), duration: performance.now() - start };
|
|
478
|
-
}
|
|
479
|
-
}
|
|
480
|
-
|
|
481
|
-
protected getProviderProjectsForOrg?(
|
|
482
|
-
session: ProviderAuthenticationSession,
|
|
483
|
-
org?: string,
|
|
484
|
-
): Promise<ProviderHierarchyResult<ProviderOrganization> | undefined>;
|
|
485
|
-
|
|
486
|
-
/**
|
|
487
|
-
* Lists repositories under the given organization (org/workspace/group) one page at a time — follow
|
|
488
|
-
* `paging.cursor` to page, or drain with the integrations provider paging helper.
|
|
489
|
-
* `options.project` is only meaningful for Azure DevOps, whose repos are scoped by `org` + `project`;
|
|
490
|
-
* every other host ignores it. (Azure without a project can't page its cross-project merge, so it
|
|
491
|
-
* returns all matches in a single page.) `truncated === true` means the defensive page-drain
|
|
492
|
-
* backstop stopped before the upstream listing was exhausted.
|
|
493
|
-
*
|
|
494
|
-
* Resolves the session for `connectionId` (or the primary connection when omitted) and recovers a thrown
|
|
495
|
-
* error into `{ error }`, so a caller surfaces it as a warning instead of a silent `undefined`.
|
|
496
|
-
*/
|
|
497
|
-
@trace()
|
|
498
|
-
async getRepositoriesForOrgResult(
|
|
499
|
-
org: string,
|
|
500
|
-
options?: { project?: string; cursor?: string; connectionId?: string },
|
|
501
|
-
): Promise<IntegrationResult<ProviderHierarchyResult<ProviderRepository> | undefined>> {
|
|
502
|
-
const scope = getScopedLogger();
|
|
503
|
-
// `connectionId` targets a specific account (multi-account); omitted reads the primary.
|
|
504
|
-
const session = await this.resolveReadSession(options?.connectionId, scope);
|
|
505
|
-
if (session == null) return undefined;
|
|
506
|
-
|
|
507
|
-
const start = performance.now();
|
|
508
|
-
try {
|
|
509
|
-
const result = await this.getProviderRepositoriesForOrg?.(session, org, options);
|
|
510
|
-
this.resetRequestExceptionCount('getRepositoriesForOrg');
|
|
511
|
-
return { value: result, duration: performance.now() - start };
|
|
512
|
-
} catch (ex) {
|
|
513
|
-
this.handleProviderException('getRepositoriesForOrg', ex, {
|
|
514
|
-
scope: scope,
|
|
515
|
-
connectionId: options?.connectionId,
|
|
516
|
-
});
|
|
517
|
-
return { error: toError(ex), duration: performance.now() - start };
|
|
518
|
-
}
|
|
519
|
-
}
|
|
520
|
-
|
|
521
|
-
protected getProviderRepositoriesForOrg?(
|
|
522
|
-
session: ProviderAuthenticationSession,
|
|
523
|
-
org: string,
|
|
524
|
-
options?: { project?: string; cursor?: string },
|
|
525
|
-
): Promise<ProviderHierarchyResult<ProviderRepository> | undefined>;
|
|
526
|
-
|
|
527
|
-
/**
|
|
528
|
-
* Result-returning account-wide, user-affiliated repository read (the org-less
|
|
529
|
-
* `gk provider repos <provider>` equivalent): repositories the user owns, collaborates on, or can
|
|
530
|
-
* access through org membership — NOT every repo of every org. Optional: providers without a native
|
|
531
|
-
* user-affiliated listing (Bitbucket workspaces, Azure orgs, which require an org/workspace scope)
|
|
532
|
-
* leave the hook undefined and the facade reports the read as unsupported so callers fan out per org.
|
|
533
|
-
*/
|
|
534
|
-
@trace()
|
|
535
|
-
async getRepositoriesForUserResult(options?: {
|
|
536
|
-
cursor?: string;
|
|
537
|
-
connectionId?: string;
|
|
538
|
-
}): Promise<IntegrationResult<ProviderHierarchyResult<ProviderRepository> | undefined>> {
|
|
539
|
-
const scope = getScopedLogger();
|
|
540
|
-
// `connectionId` targets a specific account (multi-account); omitted reads the primary.
|
|
541
|
-
const session = await this.resolveReadSession(options?.connectionId, scope);
|
|
542
|
-
if (session == null) return undefined;
|
|
543
|
-
|
|
544
|
-
if (this.getProviderRepositoriesForUser == null) {
|
|
545
|
-
return undefined;
|
|
546
|
-
}
|
|
547
|
-
|
|
548
|
-
const start = performance.now();
|
|
549
|
-
try {
|
|
550
|
-
const result = await this.getProviderRepositoriesForUser(session, options);
|
|
551
|
-
this.resetRequestExceptionCount('getRepositoriesForUser');
|
|
552
|
-
return { value: result, duration: performance.now() - start };
|
|
553
|
-
} catch (ex) {
|
|
554
|
-
this.handleProviderException('getRepositoriesForUser', ex, {
|
|
555
|
-
scope: scope,
|
|
556
|
-
connectionId: options?.connectionId,
|
|
557
|
-
});
|
|
558
|
-
return { error: toError(ex), duration: performance.now() - start };
|
|
559
|
-
}
|
|
560
|
-
}
|
|
561
|
-
|
|
562
|
-
protected getProviderRepositoriesForUser?(
|
|
563
|
-
session: ProviderAuthenticationSession,
|
|
564
|
-
options?: { cursor?: string },
|
|
565
|
-
): Promise<ProviderHierarchyResult<ProviderRepository> | undefined>;
|
|
566
|
-
|
|
567
|
-
async mergePullRequest(
|
|
568
|
-
pr: PullRequest,
|
|
569
|
-
options?: { mergeMethod?: PullRequestMergeMethod },
|
|
570
|
-
cancellation?: AbortSignal,
|
|
571
|
-
): Promise<boolean> {
|
|
572
|
-
const scope = getScopedLogger();
|
|
573
|
-
|
|
574
|
-
const connected = this.maybeConnected ?? (await this.isConnected());
|
|
575
|
-
if (!connected) return false;
|
|
576
|
-
|
|
577
|
-
await this.refreshSessionIfExpired(scope);
|
|
578
|
-
|
|
579
|
-
try {
|
|
580
|
-
const result = await this.mergeProviderPullRequest(this._session!, pr, options, cancellation);
|
|
581
|
-
this.resetRequestExceptionCount('mergePullRequest');
|
|
582
|
-
return result;
|
|
583
|
-
} catch (ex) {
|
|
584
|
-
if (isCancellationError(ex)) return false;
|
|
585
|
-
|
|
586
|
-
this.handleProviderException('mergePullRequest', ex, { scope: scope });
|
|
587
|
-
return false;
|
|
588
|
-
} finally {
|
|
589
|
-
// A merge attempt just changed the state of more than this pull request on the server (a
|
|
590
|
-
// stacked merge lands every layer below and retargets every layer above) whether it succeeded
|
|
591
|
-
// or failed partway through — so cached pull requests can't be trusted either way. Without
|
|
592
|
-
// this, ref pills and branch enrichment keep serving the pre-merge object until its expiry.
|
|
593
|
-
this.ctx.cache.deletePullRequests();
|
|
594
|
-
}
|
|
595
|
-
}
|
|
596
|
-
|
|
597
|
-
protected abstract mergeProviderPullRequest(
|
|
598
|
-
session: ProviderAuthenticationSession,
|
|
599
|
-
pr: PullRequest,
|
|
600
|
-
options?: { mergeMethod?: PullRequestMergeMethod },
|
|
601
|
-
cancellation?: AbortSignal,
|
|
602
|
-
): Promise<boolean>;
|
|
603
|
-
|
|
604
|
-
@trace()
|
|
605
|
-
async getPullRequestForBranch(
|
|
606
|
-
repo: T,
|
|
607
|
-
branch: string,
|
|
608
|
-
options?: { avatarSize?: number; expiryOverride?: boolean | number; include?: PullRequestState[] },
|
|
609
|
-
): Promise<PullRequest | undefined> {
|
|
610
|
-
const scope = getScopedLogger();
|
|
611
|
-
|
|
612
|
-
const connected = this.maybeConnected ?? (await this.isConnected());
|
|
613
|
-
if (!connected) return undefined;
|
|
614
|
-
|
|
615
|
-
await this.refreshSessionIfExpired(scope);
|
|
616
|
-
|
|
617
|
-
const { expiryOverride, ...opts } = options ?? {};
|
|
618
|
-
|
|
619
|
-
const pr = this.ctx.cache.getPullRequestForBranch(
|
|
620
|
-
branch,
|
|
621
|
-
repo,
|
|
622
|
-
this,
|
|
623
|
-
() => ({
|
|
624
|
-
value: (async () => {
|
|
625
|
-
try {
|
|
626
|
-
const result = await this.getProviderPullRequestForBranch(this._session!, repo, branch, opts);
|
|
627
|
-
this.resetRequestExceptionCount('getPullRequestForBranch');
|
|
628
|
-
return result;
|
|
629
|
-
} catch (ex) {
|
|
630
|
-
this.handleProviderException('getPullRequestForBranch', ex, { scope: scope });
|
|
631
|
-
return undefined;
|
|
632
|
-
}
|
|
633
|
-
})(),
|
|
634
|
-
}),
|
|
635
|
-
{ expiryOverride: expiryOverride },
|
|
636
|
-
);
|
|
637
|
-
return pr;
|
|
638
|
-
}
|
|
639
|
-
|
|
640
|
-
protected abstract getProviderPullRequestForBranch(
|
|
641
|
-
session: ProviderAuthenticationSession,
|
|
642
|
-
repo: T,
|
|
643
|
-
branch: string,
|
|
644
|
-
options?: { avatarSize?: number; include?: PullRequestState[] },
|
|
645
|
-
): Promise<PullRequest | undefined>;
|
|
646
|
-
|
|
647
|
-
@trace()
|
|
648
|
-
async getPullRequestForCommit(
|
|
649
|
-
repo: T,
|
|
650
|
-
rev: string,
|
|
651
|
-
options?: { expiryOverride?: boolean | number },
|
|
652
|
-
): Promise<PullRequest | undefined> {
|
|
653
|
-
const scope = getScopedLogger();
|
|
654
|
-
|
|
655
|
-
const connected = this.maybeConnected ?? (await this.isConnected());
|
|
656
|
-
if (!connected) return undefined;
|
|
657
|
-
|
|
658
|
-
await this.refreshSessionIfExpired(scope);
|
|
659
|
-
|
|
660
|
-
const pr = this.ctx.cache.getPullRequestForSha(
|
|
661
|
-
rev,
|
|
662
|
-
repo,
|
|
663
|
-
this,
|
|
664
|
-
() => ({
|
|
665
|
-
value: (async () => {
|
|
666
|
-
try {
|
|
667
|
-
const result = await this.getProviderPullRequestForCommit(this._session!, repo, rev);
|
|
668
|
-
this.resetRequestExceptionCount('getPullRequestForCommit');
|
|
669
|
-
return result;
|
|
670
|
-
} catch (ex) {
|
|
671
|
-
this.handleProviderException('getPullRequestForCommit', ex, { scope: scope });
|
|
672
|
-
return undefined;
|
|
673
|
-
}
|
|
674
|
-
})(),
|
|
675
|
-
}),
|
|
676
|
-
options,
|
|
677
|
-
);
|
|
678
|
-
return pr;
|
|
679
|
-
}
|
|
680
|
-
|
|
681
|
-
protected abstract getProviderPullRequestForCommit(
|
|
682
|
-
session: ProviderAuthenticationSession,
|
|
683
|
-
repo: T,
|
|
684
|
-
rev: string,
|
|
685
|
-
): Promise<PullRequest | undefined>;
|
|
686
|
-
|
|
687
|
-
/**
|
|
688
|
-
* Memoized identity lookups backing filter resolution. Keyed by the session's token fingerprint plus the
|
|
689
|
-
* scope of the lookup (base URL, and the Azure organization for the per-instance variant), so a different
|
|
690
|
-
* account, host, or org never reuses an entry and a rotated token simply misses.
|
|
691
|
-
*
|
|
692
|
-
* Not cleared when the token changes: one integration instance serves every connection of its provider
|
|
693
|
-
* (multi-account), so clearing on a fingerprint change would make two accounts reading in alternation
|
|
694
|
-
* evict each other and defeat the memo. Entries are bounded by tokens x hosts x orgs seen — a handful for
|
|
695
|
-
* the life of the integration.
|
|
696
|
-
*/
|
|
697
|
-
private readonly _filterAccounts = new Map<string, Promise<ProviderAccount | undefined>>();
|
|
698
|
-
|
|
699
|
-
/**
|
|
700
|
-
* Resolves the account a repo-scoped read turns `IssueFilter`/`PullRequestFilter` into a provider
|
|
701
|
-
* login/id with, memoized per token+scope.
|
|
702
|
-
*
|
|
703
|
-
* Every FILTERED read needs this, and `ProvidersApi.getCurrentUser` is a bare round trip — unlike
|
|
704
|
-
* {@link IntegrationBase.getCurrentAccount}, which the host caches. So a consumer that fans ONE page out
|
|
705
|
-
* into several filtered reads paid one identity request PER read, all resolving the same account: a
|
|
706
|
-
* per-user-facet fan-out (author + assignee + review-requested) doubled its request count, and paid it
|
|
707
|
-
* again on every page turn.
|
|
708
|
-
*
|
|
709
|
-
* The promise is memoized rather than the value, so concurrent facets share one in-flight request instead
|
|
710
|
-
* of racing. A rejection is evicted so the next read retries rather than caching a failure — matching how
|
|
711
|
-
* `getCurrentAccount` invalidates on error.
|
|
712
|
-
*/
|
|
713
|
-
private getFilterAccount(
|
|
714
|
-
api: ProvidersApi,
|
|
715
|
-
session: ProviderAuthenticationSession,
|
|
716
|
-
customUrl: string | undefined,
|
|
717
|
-
organization?: string,
|
|
718
|
-
): Promise<ProviderAccount | undefined> {
|
|
719
|
-
const key = `${this.getSessionFingerprint(session)}:${customUrl ?? ''}:${organization ?? ''}`;
|
|
720
|
-
|
|
721
|
-
let pending = this._filterAccounts.get(key);
|
|
722
|
-
if (pending == null) {
|
|
723
|
-
const tokenWithInfo = toTokenWithInfo(this.authProvider.id, session);
|
|
724
|
-
pending = (
|
|
725
|
-
organization != null
|
|
726
|
-
? api.getCurrentUserForInstance(tokenWithInfo, organization, { baseUrl: customUrl })
|
|
727
|
-
: api.getCurrentUser(tokenWithInfo, { baseUrl: customUrl })
|
|
728
|
-
).catch((ex: unknown) => {
|
|
729
|
-
this._filterAccounts.delete(key);
|
|
730
|
-
throw ex;
|
|
731
|
-
});
|
|
732
|
-
this._filterAccounts.set(key, pending);
|
|
733
|
-
}
|
|
734
|
-
|
|
735
|
-
return pending;
|
|
736
|
-
}
|
|
737
|
-
|
|
738
|
-
async getMyIssuesForRepos(
|
|
739
|
-
reposOrRepoIds: ProviderReposInput,
|
|
740
|
-
options?: MyIssuesForReposOptions,
|
|
741
|
-
connectionId?: string,
|
|
742
|
-
): Promise<PagedResult<ProviderIssue> | undefined> {
|
|
743
|
-
return (await this.getMyIssuesForReposResult(reposOrRepoIds, options, connectionId))?.value;
|
|
744
|
-
}
|
|
745
|
-
|
|
746
|
-
/**
|
|
747
|
-
* Result-returning core of {@link getMyIssuesForRepos}. Resolves the session for `connectionId`
|
|
748
|
-
* (or the primary connection when omitted, so multi-account reads use the right token) and recovers
|
|
749
|
-
* thrown errors and validation failures into `{ error }` so callers can surface them as warnings
|
|
750
|
-
* rather than swallowing them to `undefined`.
|
|
751
|
-
*/
|
|
752
|
-
async getMyIssuesForReposResult(
|
|
753
|
-
reposOrRepoIds: ProviderReposInput,
|
|
754
|
-
options?: MyIssuesForReposOptions,
|
|
755
|
-
connectionId?: string,
|
|
756
|
-
): Promise<IntegrationResult<(PagedResult<ProviderIssue> & { metadata?: CollectionMetadata }) | undefined>> {
|
|
757
|
-
const scope = getScopedLogger();
|
|
758
|
-
const providerId = this.authProvider.id;
|
|
759
|
-
const states = toProviderIssueStates(options?.state);
|
|
760
|
-
// `connectionId` targets a specific account (multi-account); omitted reads the primary. The session
|
|
761
|
-
// is resolved here for connectivity/bail; the connection's token is applied per API call below.
|
|
762
|
-
const session = await this.resolveReadSession(connectionId, scope);
|
|
763
|
-
if (session == null) return undefined;
|
|
764
|
-
|
|
765
|
-
const start = performance.now();
|
|
766
|
-
const customUrl =
|
|
767
|
-
options?.customUrl ?? getSelfManagedApiBaseUrl(providerId, session.domain || this.domain, session.protocol);
|
|
768
|
-
|
|
769
|
-
let api: ProvidersApi;
|
|
770
|
-
try {
|
|
771
|
-
api = await this.getProvidersApi();
|
|
772
|
-
} catch (ex) {
|
|
773
|
-
this.handleProviderException('getIssuesForRepos', ex, { scope: scope, connectionId: connectionId });
|
|
774
|
-
return { error: toError(ex), duration: performance.now() - start };
|
|
775
|
-
}
|
|
776
|
-
const repoIdsInput = api.isRepoIdsInput(reposOrRepoIds);
|
|
777
|
-
if (
|
|
778
|
-
providerId !== GitCloudHostIntegrationId.GitLab &&
|
|
779
|
-
(repoIdsInput ||
|
|
780
|
-
(isAzureDevOpsProvider(providerId) &&
|
|
781
|
-
!reposOrRepoIds.every(repo => repo.project != null && repo.namespace != null)))
|
|
782
|
-
) {
|
|
783
|
-
return unsupportedRead(`Unsupported input for provider ${providerId}`, start, 'getIssuesForRepos');
|
|
784
|
-
}
|
|
785
|
-
|
|
786
|
-
let getIssuesOptions: GetIssuesOptions | undefined;
|
|
787
|
-
if (isAzureDevOpsProvider(providerId)) {
|
|
788
|
-
const organizations = new Set<string>();
|
|
789
|
-
const projects = new Set<string>();
|
|
790
|
-
for (const repo of reposOrRepoIds as ProviderRepoInput[]) {
|
|
791
|
-
organizations.add(repo.namespace);
|
|
792
|
-
projects.add(repo.project!);
|
|
793
|
-
}
|
|
794
|
-
|
|
795
|
-
if (organizations.size > 1) {
|
|
796
|
-
return unsupportedRead(
|
|
797
|
-
`Multiple organizations not supported for provider ${providerId}`,
|
|
798
|
-
start,
|
|
799
|
-
'getIssuesForRepos',
|
|
800
|
-
);
|
|
801
|
-
} else if (organizations.size === 0) {
|
|
802
|
-
return unsupportedRead(`No organizations found for provider ${providerId}`, start, 'getIssuesForRepos');
|
|
803
|
-
}
|
|
804
|
-
|
|
805
|
-
const organization: string = first(organizations.values())!;
|
|
806
|
-
|
|
807
|
-
if (options?.filters != null) {
|
|
808
|
-
if (!api.providerSupportsIssueFilters(providerId, options.filters)) {
|
|
809
|
-
return unsupportedRead(
|
|
810
|
-
`Unsupported filters for provider ${providerId}`,
|
|
811
|
-
start,
|
|
812
|
-
'getIssuesForRepos',
|
|
813
|
-
);
|
|
814
|
-
}
|
|
815
|
-
|
|
816
|
-
let userAccount: ProviderAccount | undefined;
|
|
817
|
-
try {
|
|
818
|
-
userAccount = await this.getFilterAccount(api, session, customUrl, organization);
|
|
819
|
-
} catch (ex) {
|
|
820
|
-
this.handleProviderException('getIssuesForRepos', ex, {
|
|
821
|
-
scope: scope,
|
|
822
|
-
connectionId: connectionId,
|
|
823
|
-
});
|
|
824
|
-
return { error: toError(ex), duration: performance.now() - start };
|
|
825
|
-
}
|
|
826
|
-
|
|
827
|
-
if (userAccount == null) {
|
|
828
|
-
return unsupportedRead(`Unable to get current user for ${providerId}`, start, 'getIssuesForRepos');
|
|
829
|
-
}
|
|
830
|
-
|
|
831
|
-
const userFilterProperty = userAccount.name;
|
|
832
|
-
|
|
833
|
-
if (userFilterProperty == null) {
|
|
834
|
-
return unsupportedRead(
|
|
835
|
-
`Unable to get user property for filter for ${providerId}`,
|
|
836
|
-
start,
|
|
837
|
-
'getIssuesForRepos',
|
|
838
|
-
);
|
|
839
|
-
}
|
|
840
|
-
|
|
841
|
-
getIssuesOptions = {
|
|
842
|
-
authorLogin: options.filters.includes(IssueFilter.Author) ? userFilterProperty : undefined,
|
|
843
|
-
assigneeLogins:
|
|
844
|
-
!options.includeAllAssignees && options.filters.includes(IssueFilter.Assignee)
|
|
845
|
-
? [userFilterProperty]
|
|
846
|
-
: undefined,
|
|
847
|
-
mentionLogin: options.filters.includes(IssueFilter.Mention) ? userFilterProperty : undefined,
|
|
848
|
-
};
|
|
849
|
-
}
|
|
850
|
-
|
|
851
|
-
const cursorInfo = this.parseCursorInfo<PagedProjectInput>(options?.cursor);
|
|
852
|
-
const cursors: PagedProjectInput[] = cursorInfo.cursors ?? [];
|
|
853
|
-
let projectInputs: PagedProjectInput[] = Array.from(projects.values(), project => ({
|
|
854
|
-
namespace: organization,
|
|
855
|
-
project: project,
|
|
856
|
-
cursor: undefined,
|
|
857
|
-
}));
|
|
858
|
-
if (cursors.length > 0) {
|
|
859
|
-
projectInputs = cursors;
|
|
860
|
-
}
|
|
861
|
-
|
|
862
|
-
try {
|
|
863
|
-
const cursor: { cursors: PagedProjectInput[]; page?: number } = { cursors: [] };
|
|
864
|
-
let hasMore = false;
|
|
865
|
-
let truncated = false;
|
|
866
|
-
let metadata: CollectionMetadata | undefined;
|
|
867
|
-
const data: ProviderIssue[] = [];
|
|
868
|
-
// `allSettled`, not `Promise.all`: one project's read rejecting must not discard every sibling
|
|
869
|
-
// project's already-fetched issues and cursors. A rejected project is recorded as a structured
|
|
870
|
-
// failure so the facade can warn and set `fetchFailed` instead of reporting a partial project set
|
|
871
|
-
// as complete.
|
|
872
|
-
const settled = await Promise.allSettled(
|
|
873
|
-
projectInputs.map(async projectInput => {
|
|
874
|
-
const results = await api.getIssuesForAzureProject(
|
|
875
|
-
toTokenWithInfo(providerId, session),
|
|
876
|
-
projectInput.namespace,
|
|
877
|
-
projectInput.project,
|
|
878
|
-
{
|
|
879
|
-
...getIssuesOptions,
|
|
880
|
-
cursor: projectInput.cursor,
|
|
881
|
-
baseUrl: customUrl,
|
|
882
|
-
// Continuation is driven by the per-project cursor; only apply an explicit page on the
|
|
883
|
-
// first request so it can't clobber a continuation cursor on later pages.
|
|
884
|
-
page: projectInput.cursor == null ? options?.page : undefined,
|
|
885
|
-
pageSize: options?.pageSize,
|
|
886
|
-
states: states,
|
|
887
|
-
sort: options?.sort,
|
|
888
|
-
},
|
|
889
|
-
);
|
|
890
|
-
return { projectInput: projectInput, results: results };
|
|
891
|
-
}),
|
|
892
|
-
);
|
|
893
|
-
throwIfAllSettledFailed(settled);
|
|
894
|
-
|
|
895
|
-
for (let i = 0; i < settled.length; i++) {
|
|
896
|
-
const outcome = settled[i];
|
|
897
|
-
const projectInput = projectInputs[i];
|
|
898
|
-
if (outcome.status !== 'fulfilled') {
|
|
899
|
-
// Errors that really are per-scope (auth, rate limit, a missing project) degrade below; one
|
|
900
|
-
// that is a fact about the call is re-thrown instead — see `throwIfCallerContractError`.
|
|
901
|
-
throwIfCallerContractError(outcome.reason);
|
|
902
|
-
|
|
903
|
-
truncated = true;
|
|
904
|
-
const failure = toCollectionScopeFailure(
|
|
905
|
-
{
|
|
906
|
-
providerId: providerId,
|
|
907
|
-
resourceId: projectInput.namespace,
|
|
908
|
-
projectId: projectInput.project,
|
|
909
|
-
},
|
|
910
|
-
outcome.reason,
|
|
911
|
-
);
|
|
912
|
-
metadata = mergeCollectionMetadata(metadata, {
|
|
913
|
-
completeness: 'partial',
|
|
914
|
-
failures: [failure],
|
|
915
|
-
});
|
|
916
|
-
continue;
|
|
917
|
-
}
|
|
918
|
-
|
|
919
|
-
const { projectInput: _projectInput, results } = outcome.value;
|
|
920
|
-
data.push(...results.values);
|
|
921
|
-
if (results.paging?.more) {
|
|
922
|
-
hasMore = true;
|
|
923
|
-
cursor.cursors.push({
|
|
924
|
-
namespace: projectInput.namespace,
|
|
925
|
-
project: projectInput.project,
|
|
926
|
-
cursor: results.paging.cursor,
|
|
927
|
-
});
|
|
928
|
-
}
|
|
929
|
-
}
|
|
930
|
-
|
|
931
|
-
// Keep the requested page number in the composite cursor so the facade can report the real
|
|
932
|
-
// currentPage when the consumer continues using only the cursor.
|
|
933
|
-
if (options?.page != null) {
|
|
934
|
-
cursor.page = options.page;
|
|
935
|
-
}
|
|
936
|
-
|
|
937
|
-
this.resetRequestExceptionCount('getIssuesForRepos');
|
|
938
|
-
return {
|
|
939
|
-
value: {
|
|
940
|
-
values: data,
|
|
941
|
-
paging: {
|
|
942
|
-
more: hasMore,
|
|
943
|
-
cursor: JSON.stringify(cursor),
|
|
944
|
-
truncated: truncated || undefined,
|
|
945
|
-
// Echo the requested numbered page so the facade reports the real currentPage for
|
|
946
|
-
// numbered-page hosts (GitLab/Bitbucket/Azure), not a synthesized 1. Cursor-only hosts
|
|
947
|
-
// leave `page` undefined via their own reads.
|
|
948
|
-
page: options?.page,
|
|
949
|
-
},
|
|
950
|
-
metadata: metadata,
|
|
951
|
-
},
|
|
952
|
-
duration: performance.now() - start,
|
|
953
|
-
};
|
|
954
|
-
} catch (ex) {
|
|
955
|
-
this.handleProviderException('getIssuesForRepos', ex, {
|
|
956
|
-
scope: scope,
|
|
957
|
-
connectionId: connectionId,
|
|
958
|
-
});
|
|
959
|
-
return { error: toError(ex), duration: performance.now() - start };
|
|
960
|
-
}
|
|
961
|
-
}
|
|
962
|
-
if (options?.filters != null) {
|
|
963
|
-
// Validate the requested filters against what this provider actually supports — same guard the Azure
|
|
964
|
-
// branch above applies. Without it an unsupported filter (e.g. GitLab has no Mention endpoint) would
|
|
965
|
-
// resolve to no filter property being set and silently degrade to an unfiltered, project-wide read.
|
|
966
|
-
if (!api.providerSupportsIssueFilters(providerId, options.filters)) {
|
|
967
|
-
return unsupportedRead(`Unsupported filters for provider ${providerId}`, start, 'getIssuesForRepos');
|
|
968
|
-
}
|
|
969
|
-
|
|
970
|
-
let userAccount: ProviderAccount | undefined;
|
|
971
|
-
try {
|
|
972
|
-
userAccount = await this.getFilterAccount(api, session, customUrl);
|
|
973
|
-
} catch (ex) {
|
|
974
|
-
this.handleProviderException('getIssuesForRepos', ex, {
|
|
975
|
-
scope: scope,
|
|
976
|
-
connectionId: connectionId,
|
|
977
|
-
});
|
|
978
|
-
return { error: toError(ex), duration: performance.now() - start };
|
|
979
|
-
}
|
|
980
|
-
|
|
981
|
-
if (userAccount == null) {
|
|
982
|
-
return unsupportedRead(`Unable to get current user for ${providerId}`, start, 'getIssuesForRepos');
|
|
983
|
-
}
|
|
984
|
-
|
|
985
|
-
const userFilterProperty = userAccount.username;
|
|
986
|
-
if (userFilterProperty == null) {
|
|
987
|
-
return unsupportedRead(
|
|
988
|
-
`Unable to get user property for filter for ${providerId}`,
|
|
989
|
-
start,
|
|
990
|
-
'getIssuesForRepos',
|
|
991
|
-
);
|
|
992
|
-
}
|
|
993
|
-
|
|
994
|
-
getIssuesOptions = {
|
|
995
|
-
authorLogin: options.filters.includes(IssueFilter.Author) ? userFilterProperty : undefined,
|
|
996
|
-
assigneeLogins:
|
|
997
|
-
!options.includeAllAssignees && options.filters.includes(IssueFilter.Assignee)
|
|
998
|
-
? [userFilterProperty]
|
|
999
|
-
: undefined,
|
|
1000
|
-
mentionLogin: options.filters.includes(IssueFilter.Mention) ? userFilterProperty : undefined,
|
|
1001
|
-
};
|
|
1002
|
-
}
|
|
1003
|
-
|
|
1004
|
-
if (api.getProviderIssuesPagingMode(providerId) === PagingMode.Repo && !repoIdsInput) {
|
|
1005
|
-
const cursorInfo = this.parseCursorInfo<PagedRepoInput>(options?.cursor);
|
|
1006
|
-
const cursors: PagedRepoInput[] = cursorInfo.cursors ?? [];
|
|
1007
|
-
let repoInputs: PagedRepoInput[] = reposOrRepoIds.map(repo => ({ repo: repo, cursor: undefined }));
|
|
1008
|
-
if (cursors.length > 0) {
|
|
1009
|
-
repoInputs = cursors;
|
|
1010
|
-
}
|
|
1011
|
-
|
|
1012
|
-
try {
|
|
1013
|
-
const cursor: { cursors: PagedRepoInput[]; page?: number } = { cursors: [] };
|
|
1014
|
-
let hasMore = false;
|
|
1015
|
-
let truncated = false;
|
|
1016
|
-
let metadata: CollectionMetadata | undefined;
|
|
1017
|
-
const data: ProviderIssue[] = [];
|
|
1018
|
-
// `allSettled`, not `Promise.all`: one repo's read rejecting must not discard every sibling repo's
|
|
1019
|
-
// already-fetched issues and cursors. A rejected repo is recorded as a structured failure so the
|
|
1020
|
-
// facade can warn and set `fetchFailed` instead of reporting a partial repo set as complete.
|
|
1021
|
-
const settled = await Promise.allSettled(
|
|
1022
|
-
repoInputs.map(async repoInput => {
|
|
1023
|
-
const results = await api.getIssuesForRepo(
|
|
1024
|
-
toTokenWithInfo(providerId, session),
|
|
1025
|
-
repoInput.repo,
|
|
1026
|
-
{
|
|
1027
|
-
...getIssuesOptions,
|
|
1028
|
-
cursor: repoInput.cursor,
|
|
1029
|
-
baseUrl: customUrl,
|
|
1030
|
-
// Continuation is driven by the per-repo cursor; only apply an explicit page on the
|
|
1031
|
-
// first request so it can't clobber a continuation cursor on later pages.
|
|
1032
|
-
page: repoInput.cursor == null ? options?.page : undefined,
|
|
1033
|
-
pageSize: options?.pageSize,
|
|
1034
|
-
states: states,
|
|
1035
|
-
sort: options?.sort,
|
|
1036
|
-
},
|
|
1037
|
-
);
|
|
1038
|
-
return { repoInput: repoInput, results: results };
|
|
1039
|
-
}),
|
|
1040
|
-
);
|
|
1041
|
-
throwIfAllSettledFailed(settled);
|
|
1042
|
-
|
|
1043
|
-
for (let i = 0; i < settled.length; i++) {
|
|
1044
|
-
const outcome = settled[i];
|
|
1045
|
-
const repoInput = repoInputs[i];
|
|
1046
|
-
if (outcome.status !== 'fulfilled') {
|
|
1047
|
-
// See the project fan-out above. Reachable in practice even though the facade validates the
|
|
1048
|
-
// key first — a self-managed GitLab can reject an `IssueSort` member the SDK declares, which
|
|
1049
|
-
// is only discoverable from the response.
|
|
1050
|
-
throwIfCallerContractError(outcome.reason);
|
|
1051
|
-
|
|
1052
|
-
truncated = true;
|
|
1053
|
-
const failure = toCollectionScopeFailure(
|
|
1054
|
-
{
|
|
1055
|
-
providerId: providerId,
|
|
1056
|
-
repositoryId: `${repoInput.repo.namespace}/${repoInput.repo.name}`,
|
|
1057
|
-
},
|
|
1058
|
-
outcome.reason,
|
|
1059
|
-
);
|
|
1060
|
-
metadata = mergeCollectionMetadata(metadata, {
|
|
1061
|
-
completeness: 'partial',
|
|
1062
|
-
failures: [failure],
|
|
1063
|
-
});
|
|
1064
|
-
continue;
|
|
1065
|
-
}
|
|
1066
|
-
|
|
1067
|
-
const { repoInput: _repoInput, results } = outcome.value;
|
|
1068
|
-
data.push(...results.values);
|
|
1069
|
-
if (results.paging?.more) {
|
|
1070
|
-
hasMore = true;
|
|
1071
|
-
cursor.cursors.push({ repo: repoInput.repo, cursor: results.paging.cursor });
|
|
1072
|
-
}
|
|
1073
|
-
}
|
|
1074
|
-
|
|
1075
|
-
if (options?.page != null) {
|
|
1076
|
-
cursor.page = options.page;
|
|
1077
|
-
}
|
|
1078
|
-
|
|
1079
|
-
this.resetRequestExceptionCount('getIssuesForRepos');
|
|
1080
|
-
return {
|
|
1081
|
-
value: {
|
|
1082
|
-
values: data,
|
|
1083
|
-
paging: {
|
|
1084
|
-
more: hasMore,
|
|
1085
|
-
cursor: JSON.stringify(cursor),
|
|
1086
|
-
truncated: truncated || undefined,
|
|
1087
|
-
// Echo the requested numbered page so the facade reports the real currentPage for
|
|
1088
|
-
// numbered-page hosts (GitLab/Bitbucket/Azure), not a synthesized 1. Cursor-only hosts
|
|
1089
|
-
// leave `page` undefined via their own reads.
|
|
1090
|
-
page: options?.page,
|
|
1091
|
-
},
|
|
1092
|
-
metadata: metadata,
|
|
1093
|
-
},
|
|
1094
|
-
duration: performance.now() - start,
|
|
1095
|
-
};
|
|
1096
|
-
} catch (ex) {
|
|
1097
|
-
this.handleProviderException('getIssuesForRepos', ex, {
|
|
1098
|
-
scope: scope,
|
|
1099
|
-
connectionId: connectionId,
|
|
1100
|
-
});
|
|
1101
|
-
return { error: toError(ex), duration: performance.now() - start };
|
|
1102
|
-
}
|
|
1103
|
-
}
|
|
1104
|
-
|
|
1105
|
-
try {
|
|
1106
|
-
const tokenWithInfo = toTokenWithInfo(providerId, session);
|
|
1107
|
-
const result = await api.getIssuesForRepos(tokenWithInfo, reposOrRepoIds, {
|
|
1108
|
-
...getIssuesOptions,
|
|
1109
|
-
cursor: options?.cursor,
|
|
1110
|
-
baseUrl: customUrl,
|
|
1111
|
-
page: options?.page,
|
|
1112
|
-
pageSize: options?.pageSize,
|
|
1113
|
-
states: states,
|
|
1114
|
-
sort: options?.sort,
|
|
1115
|
-
});
|
|
1116
|
-
const failures = result.metadata?.failures;
|
|
1117
|
-
if (
|
|
1118
|
-
repoIdsInput &&
|
|
1119
|
-
reposOrRepoIds.length > 0 &&
|
|
1120
|
-
result.values.length === 0 &&
|
|
1121
|
-
failures?.length === reposOrRepoIds.length
|
|
1122
|
-
) {
|
|
1123
|
-
const ex = toCollectionFailureError(failures[0], tokenWithInfo);
|
|
1124
|
-
this.handleProviderException('getIssuesForRepos', ex, {
|
|
1125
|
-
scope: scope,
|
|
1126
|
-
connectionId: connectionId,
|
|
1127
|
-
});
|
|
1128
|
-
return { error: ex, duration: performance.now() - start };
|
|
1129
|
-
}
|
|
1130
|
-
|
|
1131
|
-
this.resetRequestExceptionCount('getIssuesForRepos');
|
|
1132
|
-
return { value: result, duration: performance.now() - start };
|
|
1133
|
-
} catch (ex) {
|
|
1134
|
-
this.handleProviderException('getIssuesForRepos', ex, {
|
|
1135
|
-
scope: scope,
|
|
1136
|
-
connectionId: connectionId,
|
|
1137
|
-
});
|
|
1138
|
-
return { error: toError(ex), duration: performance.now() - start };
|
|
1139
|
-
}
|
|
1140
|
-
}
|
|
1141
|
-
|
|
1142
|
-
/**
|
|
1143
|
-
* Repo-scoped "my issues" read returning the normalized {@link IssueShape} the ProviderBackend facade
|
|
1144
|
-
* consumes (`listIssuesPage({ repos })`, `broadenIssues`). Maps {@link getMyIssuesForReposResult} — the raw
|
|
1145
|
-
* provider-apis path — to IssueShape.
|
|
1146
|
-
*
|
|
1147
|
-
* It's the seam rather than an inline map so a provider whose only issue client already yields normalized
|
|
1148
|
-
* shapes, and isn't wired into the raw path, can override it and serve these reads without a
|
|
1149
|
-
* `ProviderIssue` round-trip. No provider does today: the one candidate (Bitbucket Cloud's legacy
|
|
1150
|
-
* `getUsersIssuesForRepo`) reports `supportsIssues: false`, so the facade never reaches this for it.
|
|
1151
|
-
*/
|
|
1152
|
-
async getMyIssuesForReposAsShapesResult(
|
|
1153
|
-
reposOrRepoIds: ProviderReposInput,
|
|
1154
|
-
options?: MyIssuesForReposOptions,
|
|
1155
|
-
connectionId?: string,
|
|
1156
|
-
): Promise<IntegrationResult<(PagedResult<IssueShape> & { metadata?: CollectionMetadata }) | undefined>> {
|
|
1157
|
-
const result = await this.getMyIssuesForReposResult(reposOrRepoIds, options, connectionId);
|
|
1158
|
-
if (result == null) return undefined;
|
|
1159
|
-
if (result.error != null) return { error: result.error, duration: result.duration };
|
|
1160
|
-
if (result.value == null) return { value: undefined, duration: result.duration };
|
|
1161
|
-
|
|
1162
|
-
const values = result.value.values
|
|
1163
|
-
.map(issue => toIssueShape(issue, this))
|
|
1164
|
-
.filter((issue): issue is IssueShape => issue != null);
|
|
1165
|
-
return { value: { ...result.value, values: values }, duration: result.duration };
|
|
1166
|
-
}
|
|
1167
|
-
|
|
1168
|
-
async getMyPullRequestsForRepos(
|
|
1169
|
-
reposOrRepoIds: ProviderReposInput,
|
|
1170
|
-
options?: MyPullRequestsForReposOptions,
|
|
1171
|
-
connectionId?: string,
|
|
1172
|
-
): Promise<ProviderApiPagedResult<ProviderPullRequest> | undefined> {
|
|
1173
|
-
return (await this.getMyPullRequestsForReposResult(reposOrRepoIds, options, connectionId))?.value;
|
|
1174
|
-
}
|
|
1175
|
-
|
|
1176
|
-
/**
|
|
1177
|
-
* Result-returning core of {@link getMyPullRequestsForRepos}. Resolves the session for `connectionId`
|
|
1178
|
-
* (or the primary connection when omitted, so multi-account reads use the right token) and recovers
|
|
1179
|
-
* thrown errors and validation failures into `{ error }` so callers can surface them as warnings
|
|
1180
|
-
* rather than swallowing them to `undefined`.
|
|
1181
|
-
*/
|
|
1182
|
-
async getMyPullRequestsForReposResult(
|
|
1183
|
-
reposOrRepoIds: ProviderReposInput,
|
|
1184
|
-
options?: MyPullRequestsForReposOptions,
|
|
1185
|
-
connectionId?: string,
|
|
1186
|
-
): Promise<IntegrationResult<ProviderApiPagedResult<ProviderPullRequest> | undefined>> {
|
|
1187
|
-
const scope = getScopedLogger();
|
|
1188
|
-
const providerId = this.authProvider.id;
|
|
1189
|
-
const states = toProviderPullRequestStates(options?.state);
|
|
1190
|
-
// `connectionId` targets a specific account (multi-account); omitted reads the primary. The session
|
|
1191
|
-
// is resolved here for connectivity/bail; the connection's token is applied per API call below.
|
|
1192
|
-
const session = await this.resolveReadSession(connectionId, scope);
|
|
1193
|
-
if (session == null) return undefined;
|
|
1194
|
-
|
|
1195
|
-
const start = performance.now();
|
|
1196
|
-
const customUrl =
|
|
1197
|
-
options?.customUrl ?? getSelfManagedApiBaseUrl(providerId, session.domain || this.domain, session.protocol);
|
|
1198
|
-
|
|
1199
|
-
let api: ProvidersApi;
|
|
1200
|
-
try {
|
|
1201
|
-
api = await this.getProvidersApi();
|
|
1202
|
-
} catch (ex) {
|
|
1203
|
-
this.handleProviderException('getPullRequestsForRepos', ex, {
|
|
1204
|
-
scope: scope,
|
|
1205
|
-
connectionId: connectionId,
|
|
1206
|
-
});
|
|
1207
|
-
return { error: toError(ex), duration: performance.now() - start };
|
|
1208
|
-
}
|
|
1209
|
-
if (
|
|
1210
|
-
providerId !== GitCloudHostIntegrationId.GitLab &&
|
|
1211
|
-
(api.isRepoIdsInput(reposOrRepoIds) ||
|
|
1212
|
-
(isAzureDevOpsProvider(providerId) &&
|
|
1213
|
-
!reposOrRepoIds.every(repo => repo.project != null && repo.namespace != null)))
|
|
1214
|
-
) {
|
|
1215
|
-
return unsupportedRead(`Unsupported input for provider ${providerId}`, start);
|
|
1216
|
-
}
|
|
1217
|
-
|
|
1218
|
-
let getPullRequestsOptions: GetPullRequestsOptions | undefined;
|
|
1219
|
-
if (options?.filters != null) {
|
|
1220
|
-
if (!api.providerSupportsPullRequestFilters(providerId, options.filters)) {
|
|
1221
|
-
return unsupportedRead(
|
|
1222
|
-
`Unsupported filters for provider ${providerId}`,
|
|
1223
|
-
start,
|
|
1224
|
-
'getPullRequestsForRepos',
|
|
1225
|
-
);
|
|
1226
|
-
}
|
|
1227
|
-
|
|
1228
|
-
let userAccount: ProviderAccount | undefined;
|
|
1229
|
-
if (isAzureDevOpsProvider(providerId)) {
|
|
1230
|
-
const organizations = new Set<string>();
|
|
1231
|
-
for (const repo of reposOrRepoIds as ProviderRepoInput[]) {
|
|
1232
|
-
organizations.add(repo.namespace);
|
|
1233
|
-
}
|
|
1234
|
-
|
|
1235
|
-
if (organizations.size > 1) {
|
|
1236
|
-
Logger.warn(
|
|
1237
|
-
`Multiple organizations not supported for provider ${providerId}`,
|
|
1238
|
-
'getPullRequestsForRepos',
|
|
1239
|
-
);
|
|
1240
|
-
return {
|
|
1241
|
-
error: new Error(`Multiple organizations not supported for provider ${providerId}`),
|
|
1242
|
-
duration: performance.now() - start,
|
|
1243
|
-
};
|
|
1244
|
-
} else if (organizations.size === 0) {
|
|
1245
|
-
return unsupportedRead(
|
|
1246
|
-
`No organizations found for provider ${providerId}`,
|
|
1247
|
-
start,
|
|
1248
|
-
'getPullRequestsForRepos',
|
|
1249
|
-
);
|
|
1250
|
-
}
|
|
1251
|
-
|
|
1252
|
-
const organization: string = first(organizations.values())!;
|
|
1253
|
-
try {
|
|
1254
|
-
userAccount = await this.getFilterAccount(api, session, customUrl, organization);
|
|
1255
|
-
} catch (ex) {
|
|
1256
|
-
this.handleProviderException('getPullRequestsForRepos', ex, {
|
|
1257
|
-
scope: scope,
|
|
1258
|
-
connectionId: connectionId,
|
|
1259
|
-
});
|
|
1260
|
-
return { error: toError(ex), duration: performance.now() - start };
|
|
1261
|
-
}
|
|
1262
|
-
} else {
|
|
1263
|
-
try {
|
|
1264
|
-
userAccount = await this.getFilterAccount(api, session, customUrl);
|
|
1265
|
-
} catch (ex) {
|
|
1266
|
-
this.handleProviderException('getPullRequestsForRepos', ex, {
|
|
1267
|
-
scope: scope,
|
|
1268
|
-
connectionId: connectionId,
|
|
1269
|
-
});
|
|
1270
|
-
return { error: toError(ex), duration: performance.now() - start };
|
|
1271
|
-
}
|
|
1272
|
-
}
|
|
1273
|
-
|
|
1274
|
-
if (userAccount == null) {
|
|
1275
|
-
return unsupportedRead(
|
|
1276
|
-
`Unable to get current user for ${providerId}`,
|
|
1277
|
-
start,
|
|
1278
|
-
'getPullRequestsForRepos',
|
|
1279
|
-
);
|
|
1280
|
-
}
|
|
1281
|
-
|
|
1282
|
-
let userFilterProperty: string | null;
|
|
1283
|
-
switch (providerId) {
|
|
1284
|
-
case GitCloudHostIntegrationId.Bitbucket:
|
|
1285
|
-
case GitCloudHostIntegrationId.AzureDevOps:
|
|
1286
|
-
case GitSelfManagedHostIntegrationId.AzureDevOpsServer:
|
|
1287
|
-
userFilterProperty = userAccount.id;
|
|
1288
|
-
break;
|
|
1289
|
-
default:
|
|
1290
|
-
userFilterProperty = userAccount.username;
|
|
1291
|
-
break;
|
|
1292
|
-
}
|
|
1293
|
-
|
|
1294
|
-
if (userFilterProperty == null) {
|
|
1295
|
-
return unsupportedRead(
|
|
1296
|
-
`Unable to get user property for filter for ${providerId}`,
|
|
1297
|
-
start,
|
|
1298
|
-
'getPullRequestsForRepos',
|
|
1299
|
-
);
|
|
1300
|
-
}
|
|
1301
|
-
|
|
1302
|
-
// Route the "review requested from me" filter to the field each provider actually reads:
|
|
1303
|
-
// GitHub/GitLab expect a login (reviewRequestedLogin), Bitbucket/Azure an account id (reviewerId),
|
|
1304
|
-
// and Bitbucket Server a login (reviewerLogin). `userFilterProperty` is already the account id for
|
|
1305
|
-
// Bitbucket/Azure and the username for the rest.
|
|
1306
|
-
let reviewRequestedLogin: string | undefined;
|
|
1307
|
-
let reviewerId: string | undefined;
|
|
1308
|
-
let reviewerLogin: string | undefined;
|
|
1309
|
-
if (options.filters.includes(PullRequestFilter.ReviewRequested)) {
|
|
1310
|
-
switch (providerId) {
|
|
1311
|
-
case GitCloudHostIntegrationId.Bitbucket:
|
|
1312
|
-
case GitCloudHostIntegrationId.AzureDevOps:
|
|
1313
|
-
case GitSelfManagedHostIntegrationId.AzureDevOpsServer:
|
|
1314
|
-
reviewerId = userFilterProperty;
|
|
1315
|
-
break;
|
|
1316
|
-
case GitSelfManagedHostIntegrationId.BitbucketServer:
|
|
1317
|
-
reviewerLogin = userFilterProperty;
|
|
1318
|
-
break;
|
|
1319
|
-
default:
|
|
1320
|
-
reviewRequestedLogin = userFilterProperty;
|
|
1321
|
-
break;
|
|
1322
|
-
}
|
|
1323
|
-
}
|
|
1324
|
-
|
|
1325
|
-
getPullRequestsOptions = {
|
|
1326
|
-
authorLogin: options.filters.includes(PullRequestFilter.Author) ? userFilterProperty : undefined,
|
|
1327
|
-
assigneeLogins: options.filters.includes(PullRequestFilter.Assignee) ? [userFilterProperty] : undefined,
|
|
1328
|
-
reviewRequestedLogin: reviewRequestedLogin,
|
|
1329
|
-
reviewerId: reviewerId,
|
|
1330
|
-
reviewerLogin: reviewerLogin,
|
|
1331
|
-
mentionLogin: options.filters.includes(PullRequestFilter.Mention) ? userFilterProperty : undefined,
|
|
1332
|
-
};
|
|
1333
|
-
}
|
|
1334
|
-
|
|
1335
|
-
if (
|
|
1336
|
-
api.getProviderPullRequestsPagingMode(providerId) === PagingMode.Repo &&
|
|
1337
|
-
!api.isRepoIdsInput(reposOrRepoIds)
|
|
1338
|
-
) {
|
|
1339
|
-
const cursorInfo = this.parseCursorInfo<PagedRepoInput>(options?.cursor);
|
|
1340
|
-
const cursors: PagedRepoInput[] = cursorInfo.cursors ?? [];
|
|
1341
|
-
let repoInputs: PagedRepoInput[] = reposOrRepoIds.map(repo => ({ repo: repo, cursor: undefined }));
|
|
1342
|
-
if (cursors.length > 0) {
|
|
1343
|
-
repoInputs = cursors;
|
|
1344
|
-
}
|
|
1345
|
-
|
|
1346
|
-
try {
|
|
1347
|
-
const cursor: { cursors: PagedRepoInput[]; page?: number } = { cursors: [] };
|
|
1348
|
-
let hasMore = false;
|
|
1349
|
-
let truncated = false;
|
|
1350
|
-
let metadata: CollectionMetadata | undefined;
|
|
1351
|
-
const failures: CollectionScopeFailure[] = [];
|
|
1352
|
-
const data: ProviderPullRequest[] = [];
|
|
1353
|
-
// `allSettled`, not `Promise.all`: one repo's read rejecting must not discard every sibling repo's
|
|
1354
|
-
// already-fetched PRs and cursors. A rejected repo becomes a structured `CollectionScopeFailure`
|
|
1355
|
-
// (attributed to that repo) so the facade warns on it + sets `fetchFailed`, while the survivors and
|
|
1356
|
-
// their continuation cursors are still returned.
|
|
1357
|
-
const settled = await Promise.allSettled(
|
|
1358
|
-
repoInputs.map(async repoInput => {
|
|
1359
|
-
const results = await api.getPullRequestsForRepo(
|
|
1360
|
-
toTokenWithInfo(providerId, session),
|
|
1361
|
-
repoInput.repo,
|
|
1362
|
-
{
|
|
1363
|
-
...getPullRequestsOptions,
|
|
1364
|
-
cursor: repoInput.cursor,
|
|
1365
|
-
baseUrl: customUrl,
|
|
1366
|
-
// Continuation is driven by the per-repo cursor; only apply an explicit page on the
|
|
1367
|
-
// first request so it can't clobber a continuation cursor on later pages.
|
|
1368
|
-
page: repoInput.cursor == null ? options?.page : undefined,
|
|
1369
|
-
pageSize: options?.pageSize,
|
|
1370
|
-
states: states,
|
|
1371
|
-
// Azure DevOps only populates clone URLs on request (extra call); no-op elsewhere.
|
|
1372
|
-
includeRemoteInfo: isAzureDevOpsProvider(providerId) ? true : undefined,
|
|
1373
|
-
},
|
|
1374
|
-
);
|
|
1375
|
-
return { repoInput: repoInput, results: results };
|
|
1376
|
-
}),
|
|
1377
|
-
);
|
|
1378
|
-
throwIfAllSettledFailed(settled);
|
|
1379
|
-
|
|
1380
|
-
// `allSettled` preserves order, so `settled[i]` is `repoInputs[i]`.
|
|
1381
|
-
settled.forEach((outcome, i) => {
|
|
1382
|
-
if (outcome.status !== 'fulfilled') {
|
|
1383
|
-
const failedRepo = repoInputs[i].repo;
|
|
1384
|
-
failures.push(
|
|
1385
|
-
toCollectionScopeFailure(
|
|
1386
|
-
{ providerId: providerId, repositoryId: `${failedRepo.namespace}/${failedRepo.name}` },
|
|
1387
|
-
outcome.reason,
|
|
1388
|
-
),
|
|
1389
|
-
);
|
|
1390
|
-
return;
|
|
1391
|
-
}
|
|
1392
|
-
|
|
1393
|
-
const { repoInput, results } = outcome.value;
|
|
1394
|
-
data.push(...results.values);
|
|
1395
|
-
// Fan-out across repos: preserve each repo's SDK completeness/failures and its terminal
|
|
1396
|
-
// truncation so a single failed/incomplete repo isn't lost when merged with its siblings.
|
|
1397
|
-
metadata = mergeCollectionMetadata(metadata, results.metadata);
|
|
1398
|
-
if (results.paging?.truncated) {
|
|
1399
|
-
truncated = true;
|
|
1400
|
-
}
|
|
1401
|
-
if (results.paging?.more) {
|
|
1402
|
-
hasMore = true;
|
|
1403
|
-
cursor.cursors.push({ repo: repoInput.repo, cursor: results.paging.cursor });
|
|
1404
|
-
}
|
|
1405
|
-
});
|
|
1406
|
-
|
|
1407
|
-
// Merge the GitLens-side per-repo rejections into the SDK metadata so both flow through the same
|
|
1408
|
-
// warning/fetchFailed assessment downstream.
|
|
1409
|
-
if (failures.length > 0) {
|
|
1410
|
-
metadata = mergeCollectionMetadata(metadata, { completeness: 'partial', failures: failures });
|
|
1411
|
-
}
|
|
1412
|
-
|
|
1413
|
-
// Keep the requested page number in the composite cursor so the facade can report the real
|
|
1414
|
-
// currentPage when the consumer continues using only the cursor.
|
|
1415
|
-
if (options?.page != null) {
|
|
1416
|
-
cursor.page = options.page;
|
|
1417
|
-
}
|
|
1418
|
-
|
|
1419
|
-
this.resetRequestExceptionCount('getPullRequestsForRepos');
|
|
1420
|
-
return {
|
|
1421
|
-
value: {
|
|
1422
|
-
values: data,
|
|
1423
|
-
paging: {
|
|
1424
|
-
more: hasMore,
|
|
1425
|
-
cursor: JSON.stringify(cursor),
|
|
1426
|
-
truncated: truncated || undefined,
|
|
1427
|
-
// Echo the requested numbered page so the facade reports the real currentPage for
|
|
1428
|
-
// numbered-page hosts (GitLab/Bitbucket/Azure), not a synthesized 1. Cursor-only hosts
|
|
1429
|
-
// leave `page` undefined via their own reads.
|
|
1430
|
-
page: options?.page,
|
|
1431
|
-
},
|
|
1432
|
-
metadata: metadata,
|
|
1433
|
-
},
|
|
1434
|
-
duration: performance.now() - start,
|
|
1435
|
-
};
|
|
1436
|
-
} catch (ex) {
|
|
1437
|
-
this.handleProviderException('getPullRequestsForRepos', ex, {
|
|
1438
|
-
scope: scope,
|
|
1439
|
-
connectionId: connectionId,
|
|
1440
|
-
});
|
|
1441
|
-
return { error: toError(ex), duration: performance.now() - start };
|
|
1442
|
-
}
|
|
1443
|
-
}
|
|
1444
|
-
|
|
1445
|
-
try {
|
|
1446
|
-
const result = await api.getPullRequestsForRepos(toTokenWithInfo(providerId, session), reposOrRepoIds, {
|
|
1447
|
-
...getPullRequestsOptions,
|
|
1448
|
-
cursor: options?.cursor,
|
|
1449
|
-
baseUrl: customUrl,
|
|
1450
|
-
page: options?.page,
|
|
1451
|
-
pageSize: options?.pageSize,
|
|
1452
|
-
states: states,
|
|
1453
|
-
// Azure DevOps only populates clone URLs on request (extra call); no-op elsewhere.
|
|
1454
|
-
includeRemoteInfo: isAzureDevOpsProvider(providerId) ? true : undefined,
|
|
1455
|
-
fields: options?.summary ? summaryPullRequestFields : undefined,
|
|
1456
|
-
});
|
|
1457
|
-
this.resetRequestExceptionCount('getPullRequestsForRepos');
|
|
1458
|
-
return { value: result, duration: performance.now() - start };
|
|
1459
|
-
} catch (ex) {
|
|
1460
|
-
this.handleProviderException('getPullRequestsForRepos', ex, {
|
|
1461
|
-
scope: scope,
|
|
1462
|
-
connectionId: connectionId,
|
|
1463
|
-
});
|
|
1464
|
-
return { error: toError(ex), duration: performance.now() - start };
|
|
1465
|
-
}
|
|
1466
|
-
}
|
|
1467
|
-
|
|
1468
|
-
/** Account-wide (or repo-scoped) search for the current user's pull requests. */
|
|
1469
|
-
@trace()
|
|
1470
|
-
async searchMyPullRequests(
|
|
1471
|
-
repos?: T | T[],
|
|
1472
|
-
cancellation?: AbortSignal,
|
|
1473
|
-
options?: SearchMyPullRequestsOptions & { connectionId?: string },
|
|
1474
|
-
): Promise<IntegrationResult<PullRequest[] | undefined>> {
|
|
1475
|
-
const scope = getScopedLogger();
|
|
1476
|
-
const { connectionId, ...searchOptions } = options ?? {};
|
|
1477
|
-
// `connectionId` targets a specific account (multi-account); omitted reads the primary.
|
|
1478
|
-
const session = await this.resolveReadSession(connectionId, scope);
|
|
1479
|
-
if (session == null) return undefined;
|
|
1480
|
-
|
|
1481
|
-
const start = performance.now();
|
|
1482
|
-
try {
|
|
1483
|
-
const prs = await this.searchProviderMyPullRequests(
|
|
1484
|
-
session,
|
|
1485
|
-
ensureArray(repos),
|
|
1486
|
-
cancellation,
|
|
1487
|
-
searchOptions,
|
|
1488
|
-
);
|
|
1489
|
-
this.resetRequestExceptionCount('searchMyPullRequests');
|
|
1490
|
-
return { value: prs, duration: performance.now() - start };
|
|
1491
|
-
} catch (ex) {
|
|
1492
|
-
this.handleProviderException('searchMyPullRequests', ex, {
|
|
1493
|
-
scope: scope,
|
|
1494
|
-
silent: true,
|
|
1495
|
-
connectionId: connectionId,
|
|
1496
|
-
});
|
|
1497
|
-
return {
|
|
1498
|
-
error: toError(ex),
|
|
1499
|
-
duration: performance.now() - start,
|
|
1500
|
-
};
|
|
1501
|
-
}
|
|
1502
|
-
}
|
|
1503
|
-
|
|
1504
|
-
/**
|
|
1505
|
-
* Account-wide, user-scoped counterpart of {@link getMyPullRequestsForReposResult} that returns the raw
|
|
1506
|
-
* `ProviderPullRequest` shape (not the normalized model). Unlike the repo-scoped core, this needs no
|
|
1507
|
-
* `repos` — it reads the current user's pull requests across the account, so the ProviderBackend sweep
|
|
1508
|
-
* can drive its Kanban "done" column even when no repositories are supplied (where the repo-scoped core
|
|
1509
|
-
* rejects an empty `repos` input). Recovers thrown errors into `{ error }` so callers surface warnings.
|
|
1510
|
-
*/
|
|
1511
|
-
async getMyPullRequestsForUserResult(
|
|
1512
|
-
options?: {
|
|
1513
|
-
state?: PullRequestStateFilter[];
|
|
1514
|
-
cursor?: string;
|
|
1515
|
-
includeReviewRequested?: boolean;
|
|
1516
|
-
/** Exact OR union of account-wide relationships to include. */
|
|
1517
|
-
filters?: PullRequestFilter[];
|
|
1518
|
-
/** Request only the stable list fields, omitting optional provider enrichments. */
|
|
1519
|
-
summary?: boolean;
|
|
1520
|
-
},
|
|
1521
|
-
connectionId?: string,
|
|
1522
|
-
): Promise<IntegrationResult<ProviderApiPagedResult<ProviderPullRequest> | undefined>> {
|
|
1523
|
-
const scope = getScopedLogger();
|
|
1524
|
-
// `connectionId` targets a specific account (multi-account); omitted reads the primary.
|
|
1525
|
-
const session = await this.resolveReadSession(connectionId, scope);
|
|
1526
|
-
if (session == null) return undefined;
|
|
1527
|
-
|
|
1528
|
-
if (this.getProviderMyPullRequestsForUser == null) {
|
|
1529
|
-
return undefined;
|
|
1530
|
-
}
|
|
1531
|
-
|
|
1532
|
-
const start = performance.now();
|
|
1533
|
-
try {
|
|
1534
|
-
const result = await this.getProviderMyPullRequestsForUser(session, options);
|
|
1535
|
-
this.resetRequestExceptionCount('getMyPullRequestsForUser');
|
|
1536
|
-
return { value: result, duration: performance.now() - start };
|
|
1537
|
-
} catch (ex) {
|
|
1538
|
-
this.handleProviderException('getMyPullRequestsForUser', ex, {
|
|
1539
|
-
scope: scope,
|
|
1540
|
-
connectionId: connectionId,
|
|
1541
|
-
});
|
|
1542
|
-
return { error: toError(ex), duration: performance.now() - start };
|
|
1543
|
-
}
|
|
1544
|
-
}
|
|
1545
|
-
|
|
1546
|
-
/**
|
|
1547
|
-
* Reads the current user's pull requests across the whole account using each provider's native "my PRs"
|
|
1548
|
-
* query, returning the raw provider shape. Without `filters`, the exact user scopes depend on provider-native
|
|
1549
|
-
* behavior and options like `includeReviewRequested`. With `filters`, each member is an exact account-wide OR
|
|
1550
|
-
* relationship validated by the facade before this provider hook is called. Optional: providers that can't
|
|
1551
|
-
* express an account-wide user query leave it undefined and the surface falls back to repo-scoped.
|
|
1552
|
-
*
|
|
1553
|
-
* These native user queries are cursor-based, so `cursor` (not a page number) drives continuation; there
|
|
1554
|
-
* is no jump-to-page-N and no per-call page size on this path.
|
|
1555
|
-
*
|
|
1556
|
-
* `includeReviewRequested` opts into the review-requested slice for providers whose account-wide read
|
|
1557
|
-
* only returns authored PRs natively and must fan out per-repo to add reviewer PRs (Bitbucket). It's off
|
|
1558
|
-
* by default so a sweep pays gkcli-parity cost (authored only) unless the caller deliberately opts in;
|
|
1559
|
-
* providers whose native query already covers review-requested PRs ignore it.
|
|
1560
|
-
*/
|
|
1561
|
-
protected getProviderMyPullRequestsForUser?(
|
|
1562
|
-
session: ProviderAuthenticationSession,
|
|
1563
|
-
options?: {
|
|
1564
|
-
state?: PullRequestStateFilter[];
|
|
1565
|
-
cursor?: string;
|
|
1566
|
-
includeReviewRequested?: boolean;
|
|
1567
|
-
filters?: PullRequestFilter[];
|
|
1568
|
-
summary?: boolean;
|
|
1569
|
-
},
|
|
1570
|
-
): Promise<ProviderApiPagedResult<ProviderPullRequest> | undefined>;
|
|
1571
|
-
|
|
1572
|
-
/**
|
|
1573
|
-
* Parses a Repo/Project paging cursor into its `cursors` bundle. Guards against valid JSON whose
|
|
1574
|
-
* `cursors` is a truthy non-array (e.g. `{ "cursors": "..." }`), which would otherwise bypass the
|
|
1575
|
-
* `?? []` fallback at call sites and flow into `.map()` downstream, throwing instead of degrading to
|
|
1576
|
-
* the first page.
|
|
1577
|
-
*/
|
|
1578
|
-
private parseCursorInfo<T>(cursor?: string): { cursors?: T[] } {
|
|
1579
|
-
try {
|
|
1580
|
-
const parsed = JSON.parse(cursor ?? '{}') as { cursors?: T[] };
|
|
1581
|
-
return Array.isArray(parsed?.cursors) ? parsed : {};
|
|
1582
|
-
} catch {
|
|
1583
|
-
return {};
|
|
1584
|
-
}
|
|
1585
|
-
}
|
|
1586
|
-
|
|
1587
|
-
protected abstract searchProviderMyPullRequests(
|
|
1588
|
-
session: ProviderAuthenticationSession,
|
|
1589
|
-
repos?: T[],
|
|
1590
|
-
cancellation?: AbortSignal,
|
|
1591
|
-
options?: SearchMyPullRequestsOptions,
|
|
1592
|
-
): Promise<PullRequest[] | undefined>;
|
|
1593
|
-
|
|
1594
|
-
/**
|
|
1595
|
-
* Result-returning wrapper for the filtered pull-request search. Errors become the soft
|
|
1596
|
-
* `{ error }` branch so the public facade can preserve an empty account and a failed request as distinct
|
|
1597
|
-
* outcomes.
|
|
1598
|
-
*/
|
|
1599
|
-
async searchPullRequestsPageResult(
|
|
1600
|
-
options: {
|
|
1601
|
-
repos?: ProviderRepoInput[];
|
|
1602
|
-
org?: string;
|
|
1603
|
-
criteria?: PullRequestSearchCriteria;
|
|
1604
|
-
cursor?: string;
|
|
1605
|
-
pageSize?: number;
|
|
1606
|
-
/** See {@link IntegrationManager.searchPullRequestsPage}. */
|
|
1607
|
-
summary?: boolean;
|
|
1608
|
-
},
|
|
1609
|
-
cancellation?: AbortSignal,
|
|
1610
|
-
connectionId?: string,
|
|
1611
|
-
): Promise<IntegrationResult<ProviderPullRequestSearchPage | undefined>> {
|
|
1612
|
-
const scope = getScopedLogger();
|
|
1613
|
-
const session = await this.resolveReadSession(connectionId, scope);
|
|
1614
|
-
if (session == null) return undefined;
|
|
1615
|
-
|
|
1616
|
-
const start = performance.now();
|
|
1617
|
-
try {
|
|
1618
|
-
const result = await this.searchProviderPullRequestsPage?.(session, options, cancellation);
|
|
1619
|
-
this.resetRequestExceptionCount('searchPullRequestsPage');
|
|
1620
|
-
return { value: result, duration: performance.now() - start };
|
|
1621
|
-
} catch (ex) {
|
|
1622
|
-
this.handleProviderException('searchPullRequestsPage', ex, { scope: scope, connectionId: connectionId });
|
|
1623
|
-
return { error: toError(ex), duration: performance.now() - start };
|
|
1624
|
-
}
|
|
1625
|
-
}
|
|
1626
|
-
|
|
1627
|
-
/** Must agree with `ProviderMetadata.supportedPullRequestSearch`. */
|
|
1628
|
-
protected searchProviderPullRequestsPage?(
|
|
1629
|
-
session: ProviderAuthenticationSession,
|
|
1630
|
-
options: {
|
|
1631
|
-
repos?: ProviderRepoInput[];
|
|
1632
|
-
org?: string;
|
|
1633
|
-
criteria?: PullRequestSearchCriteria;
|
|
1634
|
-
cursor?: string;
|
|
1635
|
-
pageSize?: number;
|
|
1636
|
-
/** See the caller's option of the same name on {@link searchPullRequestsPage}. */
|
|
1637
|
-
summary?: boolean;
|
|
1638
|
-
},
|
|
1639
|
-
cancellation?: AbortSignal,
|
|
1640
|
-
): Promise<ProviderPullRequestSearchPage | undefined>;
|
|
1641
|
-
|
|
1642
|
-
/** Free-text search across pull requests, optionally narrowed to `repos`. */
|
|
1643
|
-
@trace()
|
|
1644
|
-
async searchPullRequests(
|
|
1645
|
-
searchQuery: string,
|
|
1646
|
-
repos?: T | T[],
|
|
1647
|
-
cancellation?: AbortSignal,
|
|
1648
|
-
options?: SearchPullRequestsOptions & { connectionId?: string },
|
|
1649
|
-
): Promise<PullRequest[] | undefined> {
|
|
1650
|
-
const scope = getScopedLogger();
|
|
1651
|
-
const { connectionId, ...searchOptions } = options ?? {};
|
|
1652
|
-
// `connectionId` targets a specific account (multi-account); omitted reads the primary.
|
|
1653
|
-
const session = await this.resolveReadSession(connectionId, scope);
|
|
1654
|
-
if (session == null) return undefined;
|
|
1655
|
-
|
|
1656
|
-
try {
|
|
1657
|
-
const prs = await this.searchProviderPullRequests?.(
|
|
1658
|
-
session,
|
|
1659
|
-
searchQuery,
|
|
1660
|
-
ensureArray(repos),
|
|
1661
|
-
cancellation,
|
|
1662
|
-
searchOptions,
|
|
1663
|
-
);
|
|
1664
|
-
this.resetRequestExceptionCount('searchPullRequests');
|
|
1665
|
-
return prs;
|
|
1666
|
-
} catch (ex) {
|
|
1667
|
-
this.handleProviderException('searchPullRequests', ex, { scope: scope, connectionId: connectionId });
|
|
1668
|
-
return undefined;
|
|
1669
|
-
}
|
|
1670
|
-
}
|
|
1671
|
-
|
|
1672
|
-
protected searchProviderPullRequests?(
|
|
1673
|
-
session: ProviderAuthenticationSession,
|
|
1674
|
-
searchQuery: string,
|
|
1675
|
-
repos?: T[],
|
|
1676
|
-
cancellation?: AbortSignal,
|
|
1677
|
-
options?: SearchPullRequestsOptions,
|
|
1678
|
-
): Promise<PullRequest[] | undefined>;
|
|
1679
|
-
|
|
1680
|
-
/**
|
|
1681
|
-
* Result-returning wrapper for the FILTERED issue search — issues matching structured criteria over a
|
|
1682
|
-
* repository/org scope, with no forced relationship to the current user. Recovers thrown errors into
|
|
1683
|
-
* `{ error }` so the facade surfaces a warning instead of a silent empty page.
|
|
1684
|
-
*
|
|
1685
|
-
* Distinct from every other issue read on this class: {@link searchMyIssuesWithTruncationResult} is bound to
|
|
1686
|
-
* the current user by construction, and {@link getMyIssuesForReposAsShapesResult} goes through the SDK's
|
|
1687
|
-
* repo-scoped read (whose over-limit recovery walk can cost up to 128 requests). This one is one request per
|
|
1688
|
-
* page and carries no relationship it wasn't asked for.
|
|
1689
|
-
*/
|
|
1690
|
-
async searchIssuesPageResult(
|
|
1691
|
-
options: {
|
|
1692
|
-
/**
|
|
1693
|
-
* Repositories to search, as namespace/name descriptors. NOT repository ids: a search query names
|
|
1694
|
-
* repositories by path, so an id-based input can't be expressed and the facade rejects it before here.
|
|
1695
|
-
*/
|
|
1696
|
-
repos?: ProviderRepoInput[];
|
|
1697
|
-
org?: string;
|
|
1698
|
-
criteria?: IssueSearchCriteria;
|
|
1699
|
-
cursor?: string;
|
|
1700
|
-
pageSize?: number;
|
|
1701
|
-
},
|
|
1702
|
-
cancellation?: AbortSignal,
|
|
1703
|
-
connectionId?: string,
|
|
1704
|
-
): Promise<IntegrationResult<ProviderIssueSearchPage | undefined>> {
|
|
1705
|
-
const scope = getScopedLogger();
|
|
1706
|
-
// `connectionId` targets a specific account (multi-account); omitted reads the primary.
|
|
1707
|
-
const session = await this.resolveReadSession(connectionId, scope);
|
|
1708
|
-
if (session == null) return undefined;
|
|
1709
|
-
|
|
1710
|
-
const start = performance.now();
|
|
1711
|
-
try {
|
|
1712
|
-
const result = await this.searchProviderIssuesPage?.(session, options, cancellation);
|
|
1713
|
-
this.resetRequestExceptionCount('searchIssuesPage');
|
|
1714
|
-
return { value: result, duration: performance.now() - start };
|
|
1715
|
-
} catch (ex) {
|
|
1716
|
-
this.handleProviderException('searchIssuesPage', ex, { scope: scope, connectionId: connectionId });
|
|
1717
|
-
return { error: toError(ex), duration: performance.now() - start };
|
|
1718
|
-
}
|
|
1719
|
-
}
|
|
1720
|
-
|
|
1721
|
-
/**
|
|
1722
|
-
* OPTIONAL, like {@link searchProviderPullRequests}: a provider that can't express the criteria server-side
|
|
1723
|
-
* doesn't implement it, and the facade refuses the read (warning + `fetchFailed`) rather than serving a list
|
|
1724
|
-
* that was never narrowed. Whether a provider implements this must agree with what
|
|
1725
|
-
* `ProviderMetadata.supportedIssueSearch` declares.
|
|
1726
|
-
*/
|
|
1727
|
-
protected searchProviderIssuesPage?(
|
|
1728
|
-
session: ProviderAuthenticationSession,
|
|
1729
|
-
options: {
|
|
1730
|
-
repos?: ProviderRepoInput[];
|
|
1731
|
-
org?: string;
|
|
1732
|
-
criteria?: IssueSearchCriteria;
|
|
1733
|
-
cursor?: string;
|
|
1734
|
-
pageSize?: number;
|
|
1735
|
-
},
|
|
1736
|
-
cancellation?: AbortSignal,
|
|
1737
|
-
): Promise<ProviderIssueSearchPage | undefined>;
|
|
1738
|
-
|
|
1739
|
-
/**
|
|
1740
|
-
* Result-returning wrapper for the count-only probe: how many issues MATCH each scope, transferring no issues
|
|
1741
|
-
* at all. Recovers thrown errors into `{ error }` like the reads around it.
|
|
1742
|
-
*
|
|
1743
|
-
* Counts come back POSITIONALLY — one per input scope, in order — because a caller's key must never reach the
|
|
1744
|
-
* provider query. `undefined` in a slot means the provider didn't report a count for it, never zero matches.
|
|
1745
|
-
*/
|
|
1746
|
-
async countIssuesResult(
|
|
1747
|
-
scopes: readonly { repos?: ProviderRepoInput[]; org?: string; criteria?: IssueSearchCriteria }[],
|
|
1748
|
-
cancellation?: AbortSignal,
|
|
1749
|
-
connectionId?: string,
|
|
1750
|
-
): Promise<IntegrationResult<(number | undefined)[] | undefined>> {
|
|
1751
|
-
const scope = getScopedLogger();
|
|
1752
|
-
// `connectionId` targets a specific account (multi-account); omitted reads the primary.
|
|
1753
|
-
const session = await this.resolveReadSession(connectionId, scope);
|
|
1754
|
-
if (session == null) return undefined;
|
|
1755
|
-
|
|
1756
|
-
const start = performance.now();
|
|
1757
|
-
try {
|
|
1758
|
-
const counts = await this.countProviderIssues?.(session, scopes, cancellation);
|
|
1759
|
-
this.resetRequestExceptionCount('countIssues');
|
|
1760
|
-
return { value: counts, duration: performance.now() - start };
|
|
1761
|
-
} catch (ex) {
|
|
1762
|
-
this.handleProviderException('countIssues', ex, { scope: scope, connectionId: connectionId });
|
|
1763
|
-
return { error: toError(ex), duration: performance.now() - start };
|
|
1764
|
-
}
|
|
1765
|
-
}
|
|
1766
|
-
|
|
1767
|
-
/**
|
|
1768
|
-
* OPTIONAL: only a provider that can answer "how many match" WITHOUT fetching the matches implements this.
|
|
1769
|
-
* GitHub's search reports `issueCount` on a zero-node selection; GitLab's REST exposes a total on some
|
|
1770
|
-
* endpoints but not for a search-shaped query, and Azure has no equivalent. A provider that can't answer
|
|
1771
|
-
* doesn't implement it and the facade refuses the probe, so a consumer hides its count rather than being shown
|
|
1772
|
-
* a fabricated one.
|
|
1773
|
-
*/
|
|
1774
|
-
protected countProviderIssues?(
|
|
1775
|
-
session: ProviderAuthenticationSession,
|
|
1776
|
-
scopes: readonly { repos?: ProviderRepoInput[]; org?: string; criteria?: IssueSearchCriteria }[],
|
|
1777
|
-
cancellation?: AbortSignal,
|
|
1778
|
-
): Promise<(number | undefined)[] | undefined>;
|
|
1779
|
-
|
|
1780
|
-
/**
|
|
1781
|
-
* Result-returning wrapper for the BATCH issue read: resolves several `(owner, repo, number)` coordinates in
|
|
1782
|
-
* one request. Recovers thrown errors into `{ error }` like the reads around it.
|
|
1783
|
-
*
|
|
1784
|
-
* Distinct from every search on this class, and deliberately so. A search answers "what matches"; this answers
|
|
1785
|
-
* "does this exact issue exist", which is the question a caller correlating a branch name to an issue is
|
|
1786
|
-
* actually asking. It has no result ceiling, no ordering and no cursor, and — the property that matters most —
|
|
1787
|
-
* an absent slot is a PROVEN ABSENCE rather than "not found within a page budget", so a caller can cache a
|
|
1788
|
-
* miss instead of re-walking for it forever.
|
|
1789
|
-
*
|
|
1790
|
-
* Results come back POSITIONALLY — one per input coordinate, in order — for the same reason
|
|
1791
|
-
* {@link countIssuesResult} does: a caller's key must never reach the provider query. `undefined` in a slot
|
|
1792
|
-
* means the issue does not exist or is not visible to this token, never that the read failed.
|
|
1793
|
-
*/
|
|
1794
|
-
async getIssuesBatchResult(
|
|
1795
|
-
coordinates: readonly { owner: string; repo: string; number: number }[],
|
|
1796
|
-
cancellation?: AbortSignal,
|
|
1797
|
-
connectionId?: string,
|
|
1798
|
-
): Promise<IntegrationResult<(IssueShape | undefined)[] | undefined>> {
|
|
1799
|
-
const scope = getScopedLogger();
|
|
1800
|
-
// `connectionId` targets a specific account (multi-account); omitted reads the primary.
|
|
1801
|
-
const session = await this.resolveReadSession(connectionId, scope);
|
|
1802
|
-
if (session == null) return undefined;
|
|
1803
|
-
|
|
1804
|
-
const start = performance.now();
|
|
1805
|
-
try {
|
|
1806
|
-
const issues = await this.getProviderIssuesBatch?.(session, coordinates, cancellation);
|
|
1807
|
-
this.resetRequestExceptionCount('getIssuesBatch');
|
|
1808
|
-
return { value: issues, duration: performance.now() - start };
|
|
1809
|
-
} catch (ex) {
|
|
1810
|
-
this.handleProviderException('getIssuesBatch', ex, { scope: scope, connectionId: connectionId });
|
|
1811
|
-
return { error: toError(ex), duration: performance.now() - start };
|
|
1812
|
-
}
|
|
1813
|
-
}
|
|
1814
|
-
|
|
1815
|
-
/**
|
|
1816
|
-
* OPTIONAL: only a provider that can resolve SEVERAL issues by coordinate in one request implements this.
|
|
1817
|
-
* GitHub aliases its point read into one document; the SDK exposes only a singular `getIssue` for every other
|
|
1818
|
-
* provider, and there is no plural variant to build on. A provider that can't answer doesn't implement it and
|
|
1819
|
-
* the facade refuses the read, so a caller keeps its own per-issue path rather than being handed a batch that
|
|
1820
|
-
* silently degraded into N requests.
|
|
1821
|
-
*/
|
|
1822
|
-
protected getProviderIssuesBatch?(
|
|
1823
|
-
session: ProviderAuthenticationSession,
|
|
1824
|
-
coordinates: readonly { owner: string; repo: string; number: number }[],
|
|
1825
|
-
cancellation?: AbortSignal,
|
|
1826
|
-
): Promise<(IssueShape | undefined)[] | undefined>;
|
|
1827
|
-
|
|
1828
|
-
/** The PR twin of {@link countIssuesResult}: counts each scope's pull requests, transferring none. */
|
|
1829
|
-
async countPullRequestsResult(
|
|
1830
|
-
scopes: readonly { repos?: ProviderRepoInput[]; org?: string; criteria?: PullRequestSearchCriteria }[],
|
|
1831
|
-
cancellation?: AbortSignal,
|
|
1832
|
-
connectionId?: string,
|
|
1833
|
-
): Promise<IntegrationResult<(number | undefined)[] | undefined>> {
|
|
1834
|
-
const scope = getScopedLogger();
|
|
1835
|
-
// `connectionId` targets a specific account (multi-account); omitted reads the primary.
|
|
1836
|
-
const session = await this.resolveReadSession(connectionId, scope);
|
|
1837
|
-
if (session == null) return undefined;
|
|
1838
|
-
|
|
1839
|
-
const start = performance.now();
|
|
1840
|
-
try {
|
|
1841
|
-
const counts = await this.countProviderPullRequests?.(session, scopes, cancellation);
|
|
1842
|
-
this.resetRequestExceptionCount('countPullRequests');
|
|
1843
|
-
return { value: counts, duration: performance.now() - start };
|
|
1844
|
-
} catch (ex) {
|
|
1845
|
-
this.handleProviderException('countPullRequests', ex, { scope: scope, connectionId: connectionId });
|
|
1846
|
-
return { error: toError(ex), duration: performance.now() - start };
|
|
1847
|
-
}
|
|
1848
|
-
}
|
|
1849
|
-
|
|
1850
|
-
/** OPTIONAL, like {@link countProviderIssues}: only a provider that can count without fetching implements it. */
|
|
1851
|
-
protected countProviderPullRequests?(
|
|
1852
|
-
session: ProviderAuthenticationSession,
|
|
1853
|
-
scopes: readonly { repos?: ProviderRepoInput[]; org?: string; criteria?: PullRequestSearchCriteria }[],
|
|
1854
|
-
cancellation?: AbortSignal,
|
|
1855
|
-
): Promise<(number | undefined)[] | undefined>;
|
|
1856
|
-
|
|
1857
|
-
getPullRequestIdentityFromMaybeUrl(search: string): PullRequestUrlIdentity | undefined {
|
|
1858
|
-
return this.getProviderPullRequestIdentityFromMaybeUrl?.(search);
|
|
1859
|
-
}
|
|
1860
|
-
|
|
1861
|
-
protected getProviderPullRequestIdentityFromMaybeUrl?(search: string): PullRequestUrlIdentity | undefined;
|
|
1862
|
-
}
|