@gitkraken/core-gitlens 0.4.0 → 0.4.101
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 +74 -1
- package/README.md +9 -2
- package/dist/git/cache.d.ts +29 -2
- package/dist/git/cache.d.ts.map +1 -1
- package/dist/git/cache.js +67 -7
- package/dist/git/cache.js.map +1 -1
- package/dist/git/context.d.ts.map +1 -1
- package/dist/git/errors.d.ts +31 -1
- package/dist/git/errors.d.ts.map +1 -1
- package/dist/git/errors.js +29 -0
- package/dist/git/errors.js.map +1 -1
- package/dist/git/models/author.d.ts.map +1 -1
- package/dist/git/models/author.js.map +1 -1
- package/dist/git/models/autolink.d.ts.map +1 -1
- package/dist/git/models/autolink.js.map +1 -1
- package/dist/git/models/blame.d.ts.map +1 -1
- package/dist/git/models/blame.js.map +1 -1
- package/dist/git/models/branch.d.ts.map +1 -1
- package/dist/git/models/branch.js.map +1 -1
- package/dist/git/models/commit.d.ts.map +1 -1
- package/dist/git/models/commit.js +1 -1
- package/dist/git/models/commit.js.map +1 -1
- package/dist/git/models/contributor.d.ts.map +1 -1
- package/dist/git/models/contributor.js.map +1 -1
- package/dist/git/models/defaultBranch.d.ts.map +1 -1
- package/dist/git/models/defaultBranch.js.map +1 -1
- package/dist/git/models/diff.d.ts.map +1 -1
- package/dist/git/models/diff.js.map +1 -1
- package/dist/git/models/file.d.ts.map +1 -1
- package/dist/git/models/file.js.map +1 -1
- package/dist/git/models/fileChange.d.ts.map +1 -1
- package/dist/git/models/fileChange.js.map +1 -1
- package/dist/git/models/fileStatus.d.ts +22 -22
- package/dist/git/models/fileStatus.d.ts.map +1 -1
- package/dist/git/models/fileStatus.js.map +1 -1
- package/dist/git/models/graph.d.ts +122 -1
- package/dist/git/models/graph.d.ts.map +1 -1
- package/dist/git/models/graph.js +4 -0
- package/dist/git/models/graph.js.map +1 -1
- package/dist/git/models/graphSearch.d.ts.map +1 -1
- package/dist/git/models/graphSearch.js.map +1 -1
- package/dist/git/models/graphSession.d.ts +177 -0
- package/dist/git/models/graphSession.d.ts.map +1 -0
- package/dist/git/models/graphSession.js +7 -0
- package/dist/git/models/graphSession.js.map +1 -0
- package/dist/git/models/issue.d.ts +12 -2
- package/dist/git/models/issue.d.ts.map +1 -1
- package/dist/git/models/issue.js +3 -1
- package/dist/git/models/issue.js.map +1 -1
- package/dist/git/models/issueOrPullRequest.d.ts.map +1 -1
- package/dist/git/models/issueOrPullRequest.js.map +1 -1
- package/dist/git/models/lineRange.d.ts.map +1 -1
- package/dist/git/models/lineRange.js.map +1 -1
- package/dist/git/models/log.d.ts.map +1 -1
- package/dist/git/models/log.js.map +1 -1
- package/dist/git/models/mergeConflicts.d.ts.map +1 -1
- package/dist/git/models/mergeConflicts.js.map +1 -1
- package/dist/git/models/patch.d.ts.map +1 -1
- package/dist/git/models/patch.js.map +1 -1
- package/dist/git/models/pausedOperationStatus.d.ts.map +1 -1
- package/dist/git/models/pausedOperationStatus.js.map +1 -1
- package/dist/git/models/pullRequest.d.ts +27 -2
- package/dist/git/models/pullRequest.d.ts.map +1 -1
- package/dist/git/models/pullRequest.js +7 -1
- package/dist/git/models/pullRequest.js.map +1 -1
- package/dist/git/models/rebase.d.ts.map +1 -1
- package/dist/git/models/rebase.js.map +1 -1
- package/dist/git/models/reference.d.ts.map +1 -1
- package/dist/git/models/reference.js.map +1 -1
- package/dist/git/models/reflog.d.ts.map +1 -1
- package/dist/git/models/reflog.js.map +1 -1
- package/dist/git/models/remote.d.ts.map +1 -1
- package/dist/git/models/remote.js.map +1 -1
- package/dist/git/models/remoteProvider.d.ts.map +1 -1
- package/dist/git/models/remoteProvider.js.map +1 -1
- package/dist/git/models/remoteResource.d.ts.map +1 -1
- package/dist/git/models/remoteResource.js.map +1 -1
- package/dist/git/models/repository.d.ts +20 -2
- package/dist/git/models/repository.d.ts.map +1 -1
- package/dist/git/models/repository.js +19 -0
- package/dist/git/models/repository.js.map +1 -1
- package/dist/git/models/repositoryChangeEvent.d.ts.map +1 -1
- package/dist/git/models/repositoryChangeEvent.js.map +1 -1
- package/dist/git/models/repositoryIdentities.d.ts.map +1 -1
- package/dist/git/models/repositoryIdentities.js.map +1 -1
- package/dist/git/models/repositoryMetadata.d.ts.map +1 -1
- package/dist/git/models/repositoryMetadata.js.map +1 -1
- package/dist/git/models/resourceDescriptor.d.ts +16 -0
- package/dist/git/models/resourceDescriptor.d.ts.map +1 -1
- package/dist/git/models/resourceDescriptor.js.map +1 -1
- package/dist/git/models/revision.d.ts.map +1 -1
- package/dist/git/models/revision.js.map +1 -1
- package/dist/git/models/search.d.ts.map +1 -1
- package/dist/git/models/search.js.map +1 -1
- package/dist/git/models/shortlog.d.ts.map +1 -1
- package/dist/git/models/shortlog.js.map +1 -1
- package/dist/git/models/signature.d.ts +14 -0
- package/dist/git/models/signature.d.ts.map +1 -1
- package/dist/git/models/signature.js.map +1 -1
- package/dist/git/models/staging.d.ts.map +1 -1
- package/dist/git/models/staging.js.map +1 -1
- package/dist/git/models/stash.d.ts.map +1 -1
- package/dist/git/models/stash.js.map +1 -1
- package/dist/git/models/status.d.ts.map +1 -1
- package/dist/git/models/status.js.map +1 -1
- package/dist/git/models/statusFile.d.ts.map +1 -1
- package/dist/git/models/statusFile.js.map +1 -1
- package/dist/git/models/tag.d.ts +11 -1
- package/dist/git/models/tag.d.ts.map +1 -1
- package/dist/git/models/tag.js +9 -2
- package/dist/git/models/tag.js.map +1 -1
- package/dist/git/models/tree.d.ts.map +1 -1
- package/dist/git/models/tree.js.map +1 -1
- package/dist/git/models/user.d.ts.map +1 -1
- package/dist/git/models/user.js.map +1 -1
- package/dist/git/models/worktree.d.ts.map +1 -1
- package/dist/git/models/worktree.js.map +1 -1
- package/dist/git/parsers/diffParser.d.ts.map +1 -1
- package/dist/git/parsers/diffParser.js +1 -1
- package/dist/git/parsers/diffParser.js.map +1 -1
- package/dist/git/parsers/rebaseTodoParser.d.ts.map +1 -1
- package/dist/git/parsers/rebaseTodoParser.js.map +1 -1
- package/dist/git/providers/blame.d.ts.map +1 -1
- package/dist/git/providers/blame.js.map +1 -1
- package/dist/git/providers/branches.d.ts +8 -1
- package/dist/git/providers/branches.d.ts.map +1 -1
- package/dist/git/providers/branches.js.map +1 -1
- package/dist/git/providers/commits.d.ts +6 -1
- package/dist/git/providers/commits.d.ts.map +1 -1
- package/dist/git/providers/commits.js.map +1 -1
- package/dist/git/providers/config.d.ts +6 -2
- package/dist/git/providers/config.d.ts.map +1 -1
- package/dist/git/providers/config.js.map +1 -1
- package/dist/git/providers/contributors.d.ts.map +1 -1
- package/dist/git/providers/contributors.js.map +1 -1
- package/dist/git/providers/diff.d.ts.map +1 -1
- package/dist/git/providers/diff.js.map +1 -1
- package/dist/git/providers/graph.d.ts +55 -1
- package/dist/git/providers/graph.d.ts.map +1 -1
- package/dist/git/providers/graph.js.map +1 -1
- package/dist/git/providers/operations.d.ts.map +1 -1
- package/dist/git/providers/operations.js.map +1 -1
- package/dist/git/providers/patch.d.ts.map +1 -1
- package/dist/git/providers/patch.js.map +1 -1
- package/dist/git/providers/pausedOperations.d.ts.map +1 -1
- package/dist/git/providers/pausedOperations.js.map +1 -1
- package/dist/git/providers/provider.d.ts.map +1 -1
- package/dist/git/providers/provider.js.map +1 -1
- package/dist/git/providers/refs.d.ts.map +1 -1
- package/dist/git/providers/refs.js.map +1 -1
- package/dist/git/providers/remotes.d.ts.map +1 -1
- package/dist/git/providers/remotes.js.map +1 -1
- package/dist/git/providers/revision.d.ts.map +1 -1
- package/dist/git/providers/revision.js.map +1 -1
- package/dist/git/providers/shared/remotes.d.ts.map +1 -1
- package/dist/git/providers/shared/remotes.js.map +1 -1
- package/dist/git/providers/staging.d.ts.map +1 -1
- package/dist/git/providers/staging.js.map +1 -1
- package/dist/git/providers/stash.d.ts.map +1 -1
- package/dist/git/providers/stash.js.map +1 -1
- package/dist/git/providers/status.d.ts +1 -0
- package/dist/git/providers/status.d.ts.map +1 -1
- package/dist/git/providers/status.js.map +1 -1
- package/dist/git/providers/tags.d.ts.map +1 -1
- package/dist/git/providers/tags.js.map +1 -1
- package/dist/git/providers/types.d.ts.map +1 -1
- package/dist/git/providers/types.js.map +1 -1
- package/dist/git/providers/worktrees.d.ts +3 -1
- package/dist/git/providers/worktrees.d.ts.map +1 -1
- package/dist/git/providers/worktrees.js.map +1 -1
- package/dist/git/remotes/azure-devops.d.ts.map +1 -1
- package/dist/git/remotes/azure-devops.js +27 -31
- package/dist/git/remotes/azure-devops.js.map +1 -1
- package/dist/git/remotes/bitbucket-server.d.ts.map +1 -1
- package/dist/git/remotes/bitbucket-server.js +21 -23
- package/dist/git/remotes/bitbucket-server.js.map +1 -1
- package/dist/git/remotes/bitbucket.d.ts.map +1 -1
- package/dist/git/remotes/bitbucket.js +21 -23
- package/dist/git/remotes/bitbucket.js.map +1 -1
- package/dist/git/remotes/custom.d.ts.map +1 -1
- package/dist/git/remotes/custom.js.map +1 -1
- package/dist/git/remotes/gerrit.d.ts.map +1 -1
- package/dist/git/remotes/gerrit.js +11 -13
- package/dist/git/remotes/gerrit.js.map +1 -1
- package/dist/git/remotes/gitea.d.ts.map +1 -1
- package/dist/git/remotes/gitea.js +12 -14
- package/dist/git/remotes/gitea.js.map +1 -1
- package/dist/git/remotes/github.d.ts.map +1 -1
- package/dist/git/remotes/github.js +54 -56
- package/dist/git/remotes/github.js.map +1 -1
- package/dist/git/remotes/gitlab.d.ts.map +1 -1
- package/dist/git/remotes/gitlab.js +93 -95
- package/dist/git/remotes/gitlab.js.map +1 -1
- package/dist/git/remotes/google-source.d.ts.map +1 -1
- package/dist/git/remotes/google-source.js.map +1 -1
- package/dist/git/remotes/matcher.d.ts.map +1 -1
- package/dist/git/remotes/matcher.js.map +1 -1
- package/dist/git/run.types.d.ts +62 -3
- package/dist/git/run.types.d.ts.map +1 -1
- package/dist/git/service.d.ts.map +1 -1
- package/dist/git/utils/autolink.utils.d.ts.map +1 -1
- package/dist/git/utils/autolink.utils.js.map +1 -1
- package/dist/git/utils/blame.utils.d.ts.map +1 -1
- package/dist/git/utils/blame.utils.js.map +1 -1
- package/dist/git/utils/branch.utils.d.ts.map +1 -1
- package/dist/git/utils/branch.utils.js +12 -1
- package/dist/git/utils/branch.utils.js.map +1 -1
- package/dist/git/utils/commit.utils.d.ts.map +1 -1
- package/dist/git/utils/commit.utils.js.map +1 -1
- package/dist/git/utils/conflictResolution.utils.d.ts.map +1 -1
- package/dist/git/utils/conflictResolution.utils.js.map +1 -1
- package/dist/git/utils/contributor.utils.d.ts +1 -1
- package/dist/git/utils/contributor.utils.d.ts.map +1 -1
- package/dist/git/utils/contributor.utils.js +1 -2
- package/dist/git/utils/contributor.utils.js.map +1 -1
- package/dist/git/utils/fetch.utils.d.ts.map +1 -1
- package/dist/git/utils/fetch.utils.js.map +1 -1
- package/dist/git/utils/fileStatus.utils.d.ts +7 -0
- package/dist/git/utils/fileStatus.utils.d.ts.map +1 -1
- package/dist/git/utils/fileStatus.utils.js +6 -0
- package/dist/git/utils/fileStatus.utils.js.map +1 -1
- package/dist/git/utils/graph.utils.d.ts +20 -0
- package/dist/git/utils/graph.utils.d.ts.map +1 -0
- package/dist/git/utils/graph.utils.js +40 -0
- package/dist/git/utils/graph.utils.js.map +1 -0
- package/dist/git/utils/issue.utils.d.ts.map +1 -1
- package/dist/git/utils/issue.utils.js +1 -0
- package/dist/git/utils/issue.utils.js.map +1 -1
- package/dist/git/utils/issueOrPullRequest.utils.d.ts.map +1 -1
- package/dist/git/utils/issueOrPullRequest.utils.js.map +1 -1
- package/dist/git/utils/mergeConflicts.utils.d.ts.map +1 -1
- package/dist/git/utils/mergeConflicts.utils.js.map +1 -1
- package/dist/git/utils/pausedOperationStatus.utils.d.ts +13 -13
- package/dist/git/utils/pausedOperationStatus.utils.d.ts.map +1 -1
- package/dist/git/utils/pausedOperationStatus.utils.js.map +1 -1
- package/dist/git/utils/pullRequest.utils.d.ts.map +1 -1
- package/dist/git/utils/pullRequest.utils.js +9 -0
- package/dist/git/utils/pullRequest.utils.js.map +1 -1
- package/dist/git/utils/reachability.utils.d.ts +20 -2
- package/dist/git/utils/reachability.utils.d.ts.map +1 -1
- package/dist/git/utils/reachability.utils.js +68 -7
- package/dist/git/utils/reachability.utils.js.map +1 -1
- package/dist/git/utils/rebase.utils.d.ts.map +1 -1
- package/dist/git/utils/rebase.utils.js.map +1 -1
- package/dist/git/utils/reference.utils.d.ts.map +1 -1
- package/dist/git/utils/reference.utils.js.map +1 -1
- package/dist/git/utils/remote.utils.d.ts.map +1 -1
- package/dist/git/utils/remote.utils.js.map +1 -1
- package/dist/git/utils/repository.utils.d.ts.map +1 -1
- package/dist/git/utils/repository.utils.js.map +1 -1
- package/dist/git/utils/resourceDescriptor.utils.d.ts.map +1 -1
- package/dist/git/utils/resourceDescriptor.utils.js.map +1 -1
- package/dist/git/utils/revision.utils.d.ts.map +1 -1
- package/dist/git/utils/revision.utils.js.map +1 -1
- package/dist/git/utils/search.utils.d.ts.map +1 -1
- package/dist/git/utils/search.utils.js.map +1 -1
- package/dist/git/utils/sorting.d.ts.map +1 -1
- package/dist/git/utils/sorting.js.map +1 -1
- package/dist/git/utils/sshKey.utils.d.ts +7 -0
- package/dist/git/utils/sshKey.utils.d.ts.map +1 -0
- package/dist/git/utils/sshKey.utils.js +25 -0
- package/dist/git/utils/sshKey.utils.js.map +1 -0
- package/dist/git/utils/status.utils.d.ts.map +1 -1
- package/dist/git/utils/status.utils.js.map +1 -1
- package/dist/git/utils/statusFile.utils.d.ts.map +1 -1
- package/dist/git/utils/statusFile.utils.js.map +1 -1
- package/dist/git/utils/tag.utils.d.ts.map +1 -1
- package/dist/git/utils/tag.utils.js.map +1 -1
- package/dist/git/utils/tooltip.utils.d.ts.map +1 -1
- package/dist/git/utils/tooltip.utils.js.map +1 -1
- package/dist/git/utils/uriAuthority.d.ts.map +1 -1
- package/dist/git/utils/uriAuthority.js.map +1 -1
- package/dist/git/utils/user.utils.d.ts.map +1 -1
- package/dist/git/utils/user.utils.js.map +1 -1
- package/dist/git/utils/worktree.utils.d.ts.map +1 -1
- package/dist/git/utils/worktree.utils.js.map +1 -1
- package/dist/git/watching/changeEvent.d.ts.map +1 -1
- package/dist/git/watching/changeEvent.js.map +1 -1
- package/dist/git/watching/classifyChange.d.ts.map +1 -1
- package/dist/git/watching/classifyChange.js.map +1 -1
- package/dist/git/watching/gitIgnoreFilter.d.ts.map +1 -1
- package/dist/git/watching/gitIgnoreFilter.js.map +1 -1
- package/dist/git/watching/initWatcher.d.ts.map +1 -1
- package/dist/git/watching/initWatcher.js.map +1 -1
- package/dist/git/watching/provider.d.ts.map +1 -1
- package/dist/git/watching/provider.js.map +1 -1
- package/dist/git/watching/watchGroup.d.ts.map +1 -1
- package/dist/git/watching/watchGroup.js.map +1 -1
- package/dist/git/watching/watchService.d.ts +4 -0
- package/dist/git/watching/watchService.d.ts.map +1 -1
- package/dist/git/watching/watchService.js +15 -1
- package/dist/git/watching/watchService.js.map +1 -1
- package/dist/git/watching/watchSession.d.ts +7 -0
- package/dist/git/watching/watchSession.d.ts.map +1 -1
- package/dist/git/watching/watchSession.js +14 -2
- package/dist/git/watching/watchSession.js.map +1 -1
- package/dist/git/watching/watcherPatterns.d.ts.map +1 -1
- package/dist/git/watching/watcherPatterns.js.map +1 -1
- package/dist/git-cli/cliGitProvider.d.ts.map +1 -1
- package/dist/git-cli/exec/exec.d.ts.map +1 -1
- package/dist/git-cli/exec/exec.errors.d.ts.map +1 -1
- package/dist/git-cli/exec/exec.errors.js.map +1 -1
- package/dist/git-cli/exec/exec.js.map +1 -1
- package/dist/git-cli/exec/exec.types.d.ts.map +1 -1
- package/dist/git-cli/exec/exec.types.js.map +1 -1
- package/dist/git-cli/exec/features.d.ts.map +1 -1
- package/dist/git-cli/exec/features.js.map +1 -1
- package/dist/git-cli/exec/git.d.ts +19 -27
- package/dist/git-cli/exec/git.d.ts.map +1 -1
- package/dist/git-cli/exec/git.js +126 -34
- package/dist/git-cli/exec/git.js.map +1 -1
- package/dist/git-cli/exec/gitQueue.d.ts.map +1 -1
- package/dist/git-cli/exec/gitQueue.js.map +1 -1
- package/dist/git-cli/exec/locator.d.ts.map +1 -1
- package/dist/git-cli/exec/locator.js.map +1 -1
- package/dist/git-cli/parsers/blameParser.d.ts.map +1 -1
- package/dist/git-cli/parsers/blameParser.js.map +1 -1
- package/dist/git-cli/parsers/indexParser.d.ts.map +1 -1
- package/dist/git-cli/parsers/indexParser.js.map +1 -1
- package/dist/git-cli/parsers/logParser.d.ts +9 -1
- package/dist/git-cli/parsers/logParser.d.ts.map +1 -1
- package/dist/git-cli/parsers/logParser.js +141 -60
- package/dist/git-cli/parsers/logParser.js.map +1 -1
- package/dist/git-cli/parsers/mergeTreeParser.d.ts.map +1 -1
- package/dist/git-cli/parsers/mergeTreeParser.js.map +1 -1
- package/dist/git-cli/parsers/refParser.d.ts.map +1 -1
- package/dist/git-cli/parsers/refParser.js.map +1 -1
- package/dist/git-cli/parsers/reflogParser.d.ts.map +1 -1
- package/dist/git-cli/parsers/reflogParser.js.map +1 -1
- package/dist/git-cli/parsers/remoteParser.d.ts.map +1 -1
- package/dist/git-cli/parsers/remoteParser.js.map +1 -1
- package/dist/git-cli/parsers/shortlogParser.d.ts.map +1 -1
- package/dist/git-cli/parsers/shortlogParser.js.map +1 -1
- package/dist/git-cli/parsers/signatureParser.d.ts.map +1 -1
- package/dist/git-cli/parsers/signatureParser.js.map +1 -1
- package/dist/git-cli/parsers/sshSignatureParser.d.ts +21 -0
- package/dist/git-cli/parsers/sshSignatureParser.d.ts.map +1 -0
- package/dist/git-cli/parsers/sshSignatureParser.js +78 -0
- package/dist/git-cli/parsers/sshSignatureParser.js.map +1 -0
- package/dist/git-cli/parsers/statusParser.d.ts.map +1 -1
- package/dist/git-cli/parsers/statusParser.js.map +1 -1
- package/dist/git-cli/parsers/treeParser.d.ts.map +1 -1
- package/dist/git-cli/parsers/treeParser.js.map +1 -1
- package/dist/git-cli/parsers/worktreeParser.d.ts.map +1 -1
- package/dist/git-cli/parsers/worktreeParser.js +5 -7
- package/dist/git-cli/parsers/worktreeParser.js.map +1 -1
- package/dist/git-cli/providers/blame.d.ts.map +1 -1
- package/dist/git-cli/providers/blame.js.map +1 -1
- package/dist/git-cli/providers/branches.d.ts +1 -0
- package/dist/git-cli/providers/branches.d.ts.map +1 -1
- package/dist/git-cli/providers/branches.js +51 -32
- package/dist/git-cli/providers/branches.js.map +1 -1
- package/dist/git-cli/providers/commitFilesetUtils.d.ts.map +1 -1
- package/dist/git-cli/providers/commitFilesetUtils.js.map +1 -1
- package/dist/git-cli/providers/commits.d.ts +12 -1
- package/dist/git-cli/providers/commits.d.ts.map +1 -1
- package/dist/git-cli/providers/commits.js +89 -8
- package/dist/git-cli/providers/commits.js.map +1 -1
- package/dist/git-cli/providers/config.d.ts.map +1 -1
- package/dist/git-cli/providers/config.js.map +1 -1
- package/dist/git-cli/providers/contributors.d.ts.map +1 -1
- package/dist/git-cli/providers/contributors.js.map +1 -1
- package/dist/git-cli/providers/diff.d.ts.map +1 -1
- package/dist/git-cli/providers/diff.js.map +1 -1
- package/dist/git-cli/providers/graph.d.ts +35 -1
- package/dist/git-cli/providers/graph.d.ts.map +1 -1
- package/dist/git-cli/providers/graph.js +1434 -330
- package/dist/git-cli/providers/graph.js.map +1 -1
- package/dist/git-cli/providers/operations.d.ts.map +1 -1
- package/dist/git-cli/providers/operations.js.map +1 -1
- package/dist/git-cli/providers/patch.d.ts.map +1 -1
- package/dist/git-cli/providers/patch.js.map +1 -1
- package/dist/git-cli/providers/pausedOperations.d.ts.map +1 -1
- package/dist/git-cli/providers/pausedOperations.js +3 -3
- package/dist/git-cli/providers/pausedOperations.js.map +1 -1
- package/dist/git-cli/providers/refs.d.ts.map +1 -1
- package/dist/git-cli/providers/refs.js.map +1 -1
- package/dist/git-cli/providers/remotes.d.ts.map +1 -1
- package/dist/git-cli/providers/remotes.js.map +1 -1
- package/dist/git-cli/providers/revision.d.ts +1 -0
- package/dist/git-cli/providers/revision.d.ts.map +1 -1
- package/dist/git-cli/providers/revision.js +33 -0
- package/dist/git-cli/providers/revision.js.map +1 -1
- package/dist/git-cli/providers/staging.d.ts.map +1 -1
- package/dist/git-cli/providers/staging.js.map +1 -1
- package/dist/git-cli/providers/stash.d.ts.map +1 -1
- package/dist/git-cli/providers/stash.js.map +1 -1
- package/dist/git-cli/providers/status.d.ts +28 -0
- package/dist/git-cli/providers/status.d.ts.map +1 -1
- package/dist/git-cli/providers/status.js +240 -154
- package/dist/git-cli/providers/status.js.map +1 -1
- package/dist/git-cli/providers/tags.d.ts.map +1 -1
- package/dist/git-cli/providers/tags.js +2 -1
- package/dist/git-cli/providers/tags.js.map +1 -1
- package/dist/git-cli/providers/worktrees.d.ts +2 -1
- package/dist/git-cli/providers/worktrees.d.ts.map +1 -1
- package/dist/git-cli/providers/worktrees.js +28 -3
- package/dist/git-cli/providers/worktrees.js.map +1 -1
- package/dist/git-cli/service.d.ts.map +1 -1
- package/dist/git-cli/service.js +8 -0
- package/dist/git-cli/service.js.map +1 -1
- package/dist/ipc/ipcServer.d.ts.map +1 -1
- package/dist/ipc/ipcServer.js +1 -1
- package/dist/ipc/ipcServer.js.map +1 -1
- package/dist/plus/agents/providers/claudeCodeProvider.d.ts +6 -1
- package/dist/plus/agents/providers/claudeCodeProvider.d.ts.map +1 -1
- package/dist/plus/agents/providers/claudeCodeProvider.js +19 -0
- package/dist/plus/agents/providers/claudeCodeProvider.js.map +1 -1
- package/dist/plus/agents/providers/claudeCodeTranscript.d.ts +68 -0
- package/dist/plus/agents/providers/claudeCodeTranscript.d.ts.map +1 -1
- package/dist/plus/agents/providers/claudeCodeTranscript.js +262 -8
- package/dist/plus/agents/providers/claudeCodeTranscript.js.map +1 -1
- package/dist/plus/agents/types.d.ts +36 -2
- package/dist/plus/agents/types.d.ts.map +1 -1
- package/dist/plus/ai/constants.d.ts +1 -2
- package/dist/plus/ai/constants.d.ts.map +1 -1
- package/dist/plus/ai/constants.js +1 -8
- package/dist/plus/ai/constants.js.map +1 -1
- package/dist/plus/ai/errors.d.ts.map +1 -1
- package/dist/plus/ai/errors.js.map +1 -1
- package/dist/plus/ai/models/conversation.d.ts.map +1 -1
- package/dist/plus/ai/models/conversation.js.map +1 -1
- package/dist/plus/ai/models/model.d.ts +2 -1
- package/dist/plus/ai/models/model.d.ts.map +1 -1
- package/dist/plus/ai/models/model.js +50 -1
- package/dist/plus/ai/models/model.js.map +1 -1
- package/dist/plus/ai/models/promptTemplates.d.ts +5 -2
- package/dist/plus/ai/models/promptTemplates.d.ts.map +1 -1
- package/dist/plus/ai/models/promptTemplates.js.map +1 -1
- package/dist/plus/ai/models/provider.d.ts.map +1 -1
- package/dist/plus/ai/models/provider.js.map +1 -1
- package/dist/plus/ai/models/results.d.ts.map +1 -1
- package/dist/plus/ai/models/results.js.map +1 -1
- package/dist/plus/ai/prompts.d.ts +1 -1
- package/dist/plus/ai/prompts.d.ts.map +1 -1
- package/dist/plus/ai/prompts.js +15 -47
- package/dist/plus/ai/prompts.js.map +1 -1
- package/dist/plus/ai/providers/anthropicProvider.d.ts +5 -0
- package/dist/plus/ai/providers/anthropicProvider.d.ts.map +1 -1
- package/dist/plus/ai/providers/anthropicProvider.js +40 -3
- package/dist/plus/ai/providers/anthropicProvider.js.map +1 -1
- package/dist/plus/ai/providers/azureProvider.d.ts.map +1 -1
- package/dist/plus/ai/providers/azureProvider.js.map +1 -1
- package/dist/plus/ai/providers/context.d.ts.map +1 -1
- package/dist/plus/ai/providers/context.js.map +1 -1
- package/dist/plus/ai/providers/deepSeekProvider.d.ts.map +1 -1
- package/dist/plus/ai/providers/deepSeekProvider.js +17 -1
- package/dist/plus/ai/providers/deepSeekProvider.js.map +1 -1
- package/dist/plus/ai/providers/geminiProvider.d.ts.map +1 -1
- package/dist/plus/ai/providers/geminiProvider.js +25 -6
- package/dist/plus/ai/providers/geminiProvider.js.map +1 -1
- package/dist/plus/ai/providers/gitkrakenProvider.d.ts.map +1 -1
- package/dist/plus/ai/providers/gitkrakenProvider.js +1 -0
- package/dist/plus/ai/providers/gitkrakenProvider.js.map +1 -1
- package/dist/plus/ai/providers/huggingFaceProvider.d.ts +1 -1
- package/dist/plus/ai/providers/huggingFaceProvider.d.ts.map +1 -1
- package/dist/plus/ai/providers/huggingFaceProvider.js +21 -18
- package/dist/plus/ai/providers/huggingFaceProvider.js.map +1 -1
- package/dist/plus/ai/providers/mistralProvider.d.ts.map +1 -1
- package/dist/plus/ai/providers/mistralProvider.js.map +1 -1
- package/dist/plus/ai/providers/ollamaProvider.d.ts.map +1 -1
- package/dist/plus/ai/providers/ollamaProvider.js.map +1 -1
- package/dist/plus/ai/providers/openAICompatibleProvider.d.ts.map +1 -1
- package/dist/plus/ai/providers/openAICompatibleProvider.js.map +1 -1
- package/dist/plus/ai/providers/openAICompatibleProviderBase.d.ts +10 -1
- package/dist/plus/ai/providers/openAICompatibleProviderBase.d.ts.map +1 -1
- package/dist/plus/ai/providers/openAICompatibleProviderBase.js +9 -1
- package/dist/plus/ai/providers/openAICompatibleProviderBase.js.map +1 -1
- package/dist/plus/ai/providers/openRouterProvider.d.ts.map +1 -1
- package/dist/plus/ai/providers/openRouterProvider.js.map +1 -1
- package/dist/plus/ai/providers/openaiProvider.d.ts.map +1 -1
- package/dist/plus/ai/providers/openaiProvider.js.map +1 -1
- package/dist/plus/ai/providers/xaiProvider.d.ts.map +1 -1
- package/dist/plus/ai/providers/xaiProvider.js +14 -1
- package/dist/plus/ai/providers/xaiProvider.js.map +1 -1
- package/dist/plus/ai/utils/ai.utils.d.ts.map +1 -1
- package/dist/plus/ai/utils/ai.utils.js +0 -2
- package/dist/plus/ai/utils/ai.utils.js.map +1 -1
- package/dist/plus/ai/utils/results.utils.d.ts +3 -0
- package/dist/plus/ai/utils/results.utils.d.ts.map +1 -1
- package/dist/plus/ai/utils/results.utils.js +26 -0
- package/dist/plus/ai/utils/results.utils.js.map +1 -1
- package/dist/plus/ai/utils/truncation.utils.d.ts +1 -1
- package/dist/plus/ai/utils/truncation.utils.d.ts.map +1 -1
- package/dist/plus/ai/utils/truncation.utils.js.map +1 -1
- package/dist/plus/git-github/api/config.d.ts.map +1 -1
- package/dist/plus/git-github/api/config.js.map +1 -1
- package/dist/plus/git-github/api/github.d.ts +66 -3
- package/dist/plus/git-github/api/github.d.ts.map +1 -1
- package/dist/plus/git-github/api/github.js +345 -74
- package/dist/plus/git-github/api/github.js.map +1 -1
- package/dist/plus/git-github/api/github.utils.d.ts.map +1 -1
- package/dist/plus/git-github/api/github.utils.js.map +1 -1
- package/dist/plus/git-github/api/token.d.ts.map +1 -1
- package/dist/plus/git-github/api/token.js.map +1 -1
- package/dist/plus/git-github/api/tokenUtils.d.ts.map +1 -1
- package/dist/plus/git-github/api/tokenUtils.js.map +1 -1
- package/dist/plus/git-github/api/types.d.ts.map +1 -1
- package/dist/plus/git-github/api/types.js.map +1 -1
- package/dist/plus/git-github/context.d.ts.map +1 -1
- package/dist/plus/git-github/models.d.ts +5 -0
- package/dist/plus/git-github/models.d.ts.map +1 -1
- package/dist/plus/git-github/models.js +27 -2
- package/dist/plus/git-github/models.js.map +1 -1
- package/dist/plus/git-github/providers/github/blame.d.ts.map +1 -1
- package/dist/plus/git-github/providers/github/blame.js.map +1 -1
- package/dist/plus/git-github/providers/github/branches.d.ts +2 -1
- package/dist/plus/git-github/providers/github/branches.d.ts.map +1 -1
- package/dist/plus/git-github/providers/github/branches.js +7 -3
- package/dist/plus/git-github/providers/github/branches.js.map +1 -1
- package/dist/plus/git-github/providers/github/commits.d.ts.map +1 -1
- package/dist/plus/git-github/providers/github/commits.js.map +1 -1
- package/dist/plus/git-github/providers/github/config.d.ts.map +1 -1
- package/dist/plus/git-github/providers/github/config.js.map +1 -1
- package/dist/plus/git-github/providers/github/contributors.d.ts.map +1 -1
- package/dist/plus/git-github/providers/github/contributors.js.map +1 -1
- package/dist/plus/git-github/providers/github/diff.d.ts.map +1 -1
- package/dist/plus/git-github/providers/github/diff.js +2 -2
- package/dist/plus/git-github/providers/github/diff.js.map +1 -1
- package/dist/plus/git-github/providers/github/graph.d.ts +12 -1
- package/dist/plus/git-github/providers/github/graph.d.ts.map +1 -1
- package/dist/plus/git-github/providers/github/graph.js +85 -0
- package/dist/plus/git-github/providers/github/graph.js.map +1 -1
- package/dist/plus/git-github/providers/github/refs.d.ts.map +1 -1
- package/dist/plus/git-github/providers/github/refs.js.map +1 -1
- package/dist/plus/git-github/providers/github/remotes.d.ts.map +1 -1
- package/dist/plus/git-github/providers/github/remotes.js.map +1 -1
- package/dist/plus/git-github/providers/github/revision.d.ts.map +1 -1
- package/dist/plus/git-github/providers/github/revision.js.map +1 -1
- package/dist/plus/git-github/providers/github/status.d.ts.map +1 -1
- package/dist/plus/git-github/providers/github/status.js.map +1 -1
- package/dist/plus/git-github/providers/github/tags.d.ts.map +1 -1
- package/dist/plus/git-github/providers/github/tags.js +3 -1
- package/dist/plus/git-github/providers/github/tags.js.map +1 -1
- package/dist/plus/git-github/providers/githubGitProvider.d.ts.map +1 -1
- package/dist/plus/git-github/providers/githubGitProvider.js.map +1 -1
- package/dist/plus/git-github/providers/githubProvider.d.ts.map +1 -1
- package/dist/plus/git-github/providers/githubProvider.js.map +1 -1
- package/dist/plus/integrations/authentication/cloudIntegrationService.d.ts +20 -1
- package/dist/plus/integrations/authentication/cloudIntegrationService.d.ts.map +1 -1
- package/dist/plus/integrations/authentication/cloudIntegrationService.js +134 -10
- package/dist/plus/integrations/authentication/cloudIntegrationService.js.map +1 -1
- package/dist/plus/integrations/authentication/configuredIntegrationService.d.ts +52 -5
- package/dist/plus/integrations/authentication/configuredIntegrationService.d.ts.map +1 -1
- package/dist/plus/integrations/authentication/configuredIntegrationService.js +248 -46
- package/dist/plus/integrations/authentication/configuredIntegrationService.js.map +1 -1
- package/dist/plus/integrations/authentication/integrationAuthenticationProvider.d.ts +24 -4
- package/dist/plus/integrations/authentication/integrationAuthenticationProvider.d.ts.map +1 -1
- package/dist/plus/integrations/authentication/integrationAuthenticationProvider.js +58 -26
- package/dist/plus/integrations/authentication/integrationAuthenticationProvider.js.map +1 -1
- package/dist/plus/integrations/authentication/integrationAuthenticationService.d.ts.map +1 -1
- package/dist/plus/integrations/authentication/integrationAuthenticationService.js +7 -3
- package/dist/plus/integrations/authentication/integrationAuthenticationService.js.map +1 -1
- package/dist/plus/integrations/authentication/manualTokenProvider.d.ts +1 -0
- package/dist/plus/integrations/authentication/manualTokenProvider.d.ts.map +1 -1
- package/dist/plus/integrations/authentication/manualTokenProvider.js +9 -5
- package/dist/plus/integrations/authentication/manualTokenProvider.js.map +1 -1
- package/dist/plus/integrations/authentication/models.d.ts +33 -0
- package/dist/plus/integrations/authentication/models.d.ts.map +1 -1
- package/dist/plus/integrations/authentication/models.js.map +1 -1
- package/dist/plus/integrations/collectionMetadata.d.ts +21 -0
- package/dist/plus/integrations/collectionMetadata.d.ts.map +1 -0
- package/dist/plus/integrations/collectionMetadata.js +121 -0
- package/dist/plus/integrations/collectionMetadata.js.map +1 -0
- package/dist/plus/integrations/constants.d.ts +12 -2
- package/dist/plus/integrations/constants.d.ts.map +1 -1
- package/dist/plus/integrations/constants.js +10 -0
- package/dist/plus/integrations/constants.js.map +1 -1
- package/dist/plus/integrations/context.d.ts +10 -6
- package/dist/plus/integrations/context.d.ts.map +1 -1
- package/dist/plus/integrations/errors.d.ts +65 -0
- package/dist/plus/integrations/errors.d.ts.map +1 -1
- package/dist/plus/integrations/errors.js +135 -0
- package/dist/plus/integrations/errors.js.map +1 -1
- package/dist/plus/integrations/index.d.ts +57 -12
- package/dist/plus/integrations/index.d.ts.map +1 -1
- package/dist/plus/integrations/index.js +39 -37
- package/dist/plus/integrations/index.js.map +1 -1
- package/dist/plus/integrations/integrationService.d.ts +297 -13
- package/dist/plus/integrations/integrationService.d.ts.map +1 -1
- package/dist/plus/integrations/integrationService.js +672 -36
- package/dist/plus/integrations/integrationService.js.map +1 -1
- package/dist/plus/integrations/lite.d.ts +47 -0
- package/dist/plus/integrations/lite.d.ts.map +1 -0
- package/dist/plus/integrations/lite.js +141 -0
- package/dist/plus/integrations/lite.js.map +1 -0
- package/dist/plus/integrations/manager.d.ts +332 -0
- package/dist/plus/integrations/manager.d.ts.map +1 -0
- package/dist/plus/integrations/manager.js +2 -0
- package/dist/plus/integrations/manager.js.map +1 -0
- package/dist/plus/integrations/models/gitHostIntegration.d.ts +262 -10
- package/dist/plus/integrations/models/gitHostIntegration.d.ts.map +1 -1
- package/dist/plus/integrations/models/gitHostIntegration.js +675 -101
- package/dist/plus/integrations/models/gitHostIntegration.js.map +1 -1
- package/dist/plus/integrations/models/integration.d.ts +88 -3
- package/dist/plus/integrations/models/integration.d.ts.map +1 -1
- package/dist/plus/integrations/models/integration.js +192 -21
- package/dist/plus/integrations/models/integration.js.map +1 -1
- package/dist/plus/integrations/models/issuesIntegration.d.ts +70 -7
- package/dist/plus/integrations/models/issuesIntegration.d.ts.map +1 -1
- package/dist/plus/integrations/models/issuesIntegration.js +108 -35
- package/dist/plus/integrations/models/issuesIntegration.js.map +1 -1
- package/dist/plus/integrations/providerFilters.d.ts +12 -0
- package/dist/plus/integrations/providerFilters.d.ts.map +1 -0
- package/dist/plus/integrations/providerFilters.js +14 -0
- package/dist/plus/integrations/providerFilters.js.map +1 -0
- package/dist/plus/integrations/providers/apiClients.d.ts.map +1 -1
- package/dist/plus/integrations/providers/apiClients.js +3 -3
- package/dist/plus/integrations/providers/apiClients.js.map +1 -1
- package/dist/plus/integrations/providers/apiConfig.d.ts +52 -0
- package/dist/plus/integrations/providers/apiConfig.d.ts.map +1 -0
- package/dist/plus/integrations/providers/apiConfig.js +19 -0
- package/dist/plus/integrations/providers/apiConfig.js.map +1 -0
- package/dist/plus/integrations/providers/azure/azure.d.ts +14 -2
- package/dist/plus/integrations/providers/azure/azure.d.ts.map +1 -1
- package/dist/plus/integrations/providers/azure/azure.js +107 -32
- package/dist/plus/integrations/providers/azure/azure.js.map +1 -1
- package/dist/plus/integrations/providers/azure/models.d.ts +16 -0
- package/dist/plus/integrations/providers/azure/models.d.ts.map +1 -1
- package/dist/plus/integrations/providers/azure/models.js +6 -6
- package/dist/plus/integrations/providers/azure/models.js.map +1 -1
- package/dist/plus/integrations/providers/azureDevOps.d.ts +55 -9
- package/dist/plus/integrations/providers/azureDevOps.d.ts.map +1 -1
- package/dist/plus/integrations/providers/azureDevOps.js +572 -79
- package/dist/plus/integrations/providers/azureDevOps.js.map +1 -1
- package/dist/plus/integrations/providers/bitbucket/bitbucket.d.ts +13 -2
- package/dist/plus/integrations/providers/bitbucket/bitbucket.d.ts.map +1 -1
- package/dist/plus/integrations/providers/bitbucket/bitbucket.js +108 -32
- package/dist/plus/integrations/providers/bitbucket/bitbucket.js.map +1 -1
- package/dist/plus/integrations/providers/bitbucket/models.d.ts.map +1 -1
- package/dist/plus/integrations/providers/bitbucket/models.js.map +1 -1
- package/dist/plus/integrations/providers/bitbucket-server/models.d.ts +19 -1
- package/dist/plus/integrations/providers/bitbucket-server/models.d.ts.map +1 -1
- package/dist/plus/integrations/providers/bitbucket-server/models.js +20 -1
- package/dist/plus/integrations/providers/bitbucket-server/models.js.map +1 -1
- package/dist/plus/integrations/providers/bitbucket-server.d.ts +28 -4
- package/dist/plus/integrations/providers/bitbucket-server.d.ts.map +1 -1
- package/dist/plus/integrations/providers/bitbucket-server.js +110 -6
- package/dist/plus/integrations/providers/bitbucket-server.js.map +1 -1
- package/dist/plus/integrations/providers/bitbucket.d.ts +38 -4
- package/dist/plus/integrations/providers/bitbucket.d.ts.map +1 -1
- package/dist/plus/integrations/providers/bitbucket.js +330 -34
- package/dist/plus/integrations/providers/bitbucket.js.map +1 -1
- package/dist/plus/integrations/providers/github/github.d.ts.map +1 -1
- package/dist/plus/integrations/providers/github/github.js +1 -1
- package/dist/plus/integrations/providers/github/github.js.map +1 -1
- package/dist/plus/integrations/providers/github/github.utils.d.ts.map +1 -1
- package/dist/plus/integrations/providers/github/github.utils.js.map +1 -1
- package/dist/plus/integrations/providers/github/models.d.ts.map +1 -1
- package/dist/plus/integrations/providers/github/models.js.map +1 -1
- package/dist/plus/integrations/providers/github.d.ts +49 -6
- package/dist/plus/integrations/providers/github.d.ts.map +1 -1
- package/dist/plus/integrations/providers/github.js +289 -4
- package/dist/plus/integrations/providers/github.js.map +1 -1
- package/dist/plus/integrations/providers/gitlab/gitlab.d.ts +11 -3
- package/dist/plus/integrations/providers/gitlab/gitlab.d.ts.map +1 -1
- package/dist/plus/integrations/providers/gitlab/gitlab.js +121 -47
- package/dist/plus/integrations/providers/gitlab/gitlab.js.map +1 -1
- package/dist/plus/integrations/providers/gitlab/gitlab.utils.d.ts +6 -0
- package/dist/plus/integrations/providers/gitlab/gitlab.utils.d.ts.map +1 -1
- package/dist/plus/integrations/providers/gitlab/gitlab.utils.js +8 -0
- package/dist/plus/integrations/providers/gitlab/gitlab.utils.js.map +1 -1
- package/dist/plus/integrations/providers/gitlab/models.d.ts +10 -0
- package/dist/plus/integrations/providers/gitlab/models.d.ts.map +1 -1
- package/dist/plus/integrations/providers/gitlab/models.js +8 -5
- package/dist/plus/integrations/providers/gitlab/models.js.map +1 -1
- package/dist/plus/integrations/providers/gitlab.d.ts +50 -5
- package/dist/plus/integrations/providers/gitlab.d.ts.map +1 -1
- package/dist/plus/integrations/providers/gitlab.js +274 -8
- package/dist/plus/integrations/providers/gitlab.js.map +1 -1
- package/dist/plus/integrations/providers/jira.d.ts +13 -2
- package/dist/plus/integrations/providers/jira.d.ts.map +1 -1
- package/dist/plus/integrations/providers/jira.js +200 -30
- package/dist/plus/integrations/providers/jira.js.map +1 -1
- package/dist/plus/integrations/providers/linear.d.ts +16 -5
- package/dist/plus/integrations/providers/linear.d.ts.map +1 -1
- package/dist/plus/integrations/providers/linear.js +127 -21
- package/dist/plus/integrations/providers/linear.js.map +1 -1
- package/dist/plus/integrations/providers/models.d.ts +339 -60
- package/dist/plus/integrations/providers/models.d.ts.map +1 -1
- package/dist/plus/integrations/providers/models.js +307 -59
- package/dist/plus/integrations/providers/models.js.map +1 -1
- package/dist/plus/integrations/providers/providersApi.d.ts +144 -11
- package/dist/plus/integrations/providers/providersApi.d.ts.map +1 -1
- package/dist/plus/integrations/providers/providersApi.js +486 -55
- package/dist/plus/integrations/providers/providersApi.js.map +1 -1
- package/dist/plus/integrations/providers/trello.d.ts +47 -0
- package/dist/plus/integrations/providers/trello.d.ts.map +1 -0
- package/dist/plus/integrations/providers/trello.js +141 -0
- package/dist/plus/integrations/providers/trello.js.map +1 -0
- package/dist/plus/integrations/providers/utils/providerPaging.d.ts +29 -0
- package/dist/plus/integrations/providers/utils/providerPaging.d.ts.map +1 -0
- package/dist/plus/integrations/providers/utils/providerPaging.js +154 -0
- package/dist/plus/integrations/providers/utils/providerPaging.js.map +1 -0
- package/dist/plus/integrations/providers/utils.d.ts +21 -0
- package/dist/plus/integrations/providers/utils.d.ts.map +1 -1
- package/dist/plus/integrations/providers/utils.js +57 -6
- package/dist/plus/integrations/providers/utils.js.map +1 -1
- package/dist/plus/integrations/reads/broaden.d.ts +20 -0
- package/dist/plus/integrations/reads/broaden.d.ts.map +1 -0
- package/dist/plus/integrations/reads/broaden.js +326 -0
- package/dist/plus/integrations/reads/broaden.js.map +1 -0
- package/dist/plus/integrations/reads/context.d.ts +74 -0
- package/dist/plus/integrations/reads/context.d.ts.map +1 -0
- package/dist/plus/integrations/reads/context.js +2 -0
- package/dist/plus/integrations/reads/context.js.map +1 -0
- package/dist/plus/integrations/reads/cursors.d.ts +66 -0
- package/dist/plus/integrations/reads/cursors.d.ts.map +1 -0
- package/dist/plus/integrations/reads/cursors.js +133 -0
- package/dist/plus/integrations/reads/cursors.js.map +1 -0
- package/dist/plus/integrations/reads/drains.d.ts +60 -0
- package/dist/plus/integrations/reads/drains.d.ts.map +1 -0
- package/dist/plus/integrations/reads/drains.js +255 -0
- package/dist/plus/integrations/reads/drains.js.map +1 -0
- package/dist/plus/integrations/reads/filters.d.ts +81 -0
- package/dist/plus/integrations/reads/filters.d.ts.map +1 -0
- package/dist/plus/integrations/reads/filters.js +87 -0
- package/dist/plus/integrations/reads/filters.js.map +1 -0
- package/dist/plus/integrations/reads/hierarchy.d.ts +17 -0
- package/dist/plus/integrations/reads/hierarchy.d.ts.map +1 -0
- package/dist/plus/integrations/reads/hierarchy.js +320 -0
- package/dist/plus/integrations/reads/hierarchy.js.map +1 -0
- package/dist/plus/integrations/reads/hierarchy.utils.d.ts +77 -0
- package/dist/plus/integrations/reads/hierarchy.utils.d.ts.map +1 -0
- package/dist/plus/integrations/reads/hierarchy.utils.js +128 -0
- package/dist/plus/integrations/reads/hierarchy.utils.js.map +1 -0
- package/dist/plus/integrations/reads/issueTracker.d.ts +19 -0
- package/dist/plus/integrations/reads/issueTracker.d.ts.map +1 -0
- package/dist/plus/integrations/reads/issueTracker.js +334 -0
- package/dist/plus/integrations/reads/issueTracker.js.map +1 -0
- package/dist/plus/integrations/reads/issues.d.ts +34 -0
- package/dist/plus/integrations/reads/issues.d.ts.map +1 -0
- package/dist/plus/integrations/reads/issues.js +244 -0
- package/dist/plus/integrations/reads/issues.js.map +1 -0
- package/dist/plus/integrations/reads/paging.d.ts +136 -0
- package/dist/plus/integrations/reads/paging.d.ts.map +1 -0
- package/dist/plus/integrations/reads/paging.js +221 -0
- package/dist/plus/integrations/reads/paging.js.map +1 -0
- package/dist/plus/integrations/reads/pullRequests.d.ts +32 -0
- package/dist/plus/integrations/reads/pullRequests.d.ts.map +1 -0
- package/dist/plus/integrations/reads/pullRequests.js +151 -0
- package/dist/plus/integrations/reads/pullRequests.js.map +1 -0
- package/dist/plus/integrations/reads/resolveRepository.d.ts +25 -0
- package/dist/plus/integrations/reads/resolveRepository.d.ts.map +1 -0
- package/dist/plus/integrations/reads/resolveRepository.js +235 -0
- package/dist/plus/integrations/reads/resolveRepository.js.map +1 -0
- package/dist/plus/integrations/reads/sweeps.d.ts +11 -0
- package/dist/plus/integrations/reads/sweeps.d.ts.map +1 -0
- package/dist/plus/integrations/reads/sweeps.js +125 -0
- package/dist/plus/integrations/reads/sweeps.js.map +1 -0
- package/dist/plus/integrations/reads/warnings.d.ts +47 -0
- package/dist/plus/integrations/reads/warnings.d.ts.map +1 -0
- package/dist/plus/integrations/reads/warnings.js +81 -0
- package/dist/plus/integrations/reads/warnings.js.map +1 -0
- package/dist/plus/integrations/results.d.ts +189 -0
- package/dist/plus/integrations/results.d.ts.map +1 -0
- package/dist/plus/integrations/results.js +62 -0
- package/dist/plus/integrations/results.js.map +1 -0
- package/dist/plus/integrations/utils/domain.utils.d.ts +5 -0
- package/dist/plus/integrations/utils/domain.utils.d.ts.map +1 -0
- package/dist/plus/integrations/utils/domain.utils.js +27 -0
- package/dist/plus/integrations/utils/domain.utils.js.map +1 -0
- package/dist/plus/integrations/utils/integration.utils.d.ts +27 -1
- package/dist/plus/integrations/utils/integration.utils.d.ts.map +1 -1
- package/dist/plus/integrations/utils/integration.utils.js +86 -15
- package/dist/plus/integrations/utils/integration.utils.js.map +1 -1
- package/dist/utils/array.d.ts.map +1 -1
- package/dist/utils/array.js.map +1 -1
- package/dist/utils/brand.d.ts.map +1 -1
- package/dist/utils/cancellation.d.ts +13 -0
- package/dist/utils/cancellation.d.ts.map +1 -1
- package/dist/utils/cancellation.js +52 -7
- package/dist/utils/cancellation.js.map +1 -1
- package/dist/utils/charCode.d.ts.map +1 -1
- package/dist/utils/coalescedRun.d.ts +16 -0
- package/dist/utils/coalescedRun.d.ts.map +1 -0
- package/dist/utils/coalescedRun.js +43 -0
- package/dist/utils/coalescedRun.js.map +1 -0
- package/dist/utils/color.d.ts.map +1 -1
- package/dist/utils/color.js +3 -3
- package/dist/utils/color.js.map +1 -1
- package/dist/utils/date.d.ts +24 -0
- package/dist/utils/date.d.ts.map +1 -1
- package/dist/utils/date.js +62 -0
- package/dist/utils/date.js.map +1 -1
- package/dist/utils/debounce.js +1 -1
- package/dist/utils/debounce.js.map +1 -1
- package/dist/utils/decorators/debounce.d.ts.map +1 -1
- package/dist/utils/decorators/debounce.js.map +1 -1
- package/dist/utils/decorators/gate.d.ts.map +1 -1
- package/dist/utils/decorators/gate.js +2 -2
- package/dist/utils/decorators/gate.js.map +1 -1
- package/dist/utils/decorators/log.d.ts.map +1 -1
- package/dist/utils/decorators/log.js +5 -5
- package/dist/utils/decorators/log.js.map +1 -1
- package/dist/utils/decorators/memoize.d.ts.map +1 -1
- package/dist/utils/decorators/memoize.js +2 -2
- package/dist/utils/decorators/memoize.js.map +1 -1
- package/dist/utils/decorators/resolver.d.ts.map +1 -1
- package/dist/utils/decorators/resolver.js.map +1 -1
- package/dist/utils/decorators/sequentialize.d.ts.map +1 -1
- package/dist/utils/decorators/sequentialize.js +2 -2
- package/dist/utils/decorators/sequentialize.js.map +1 -1
- package/dist/utils/decorators/serializable.d.ts.map +1 -1
- package/dist/utils/decorators/serializable.js +1 -1
- package/dist/utils/decorators/serializable.js.map +1 -1
- package/dist/utils/dedupedAsyncCache.d.ts.map +1 -1
- package/dist/utils/env/browser/base64.d.ts.map +1 -1
- package/dist/utils/env/browser/base64.js.map +1 -1
- package/dist/utils/env/browser/crypto.d.ts.map +1 -1
- package/dist/utils/env/browser/crypto.js.map +1 -1
- package/dist/utils/env/browser/fs.d.ts.map +1 -1
- package/dist/utils/env/browser/fs.js.map +1 -1
- package/dist/utils/env/browser/hex.d.ts.map +1 -1
- package/dist/utils/env/browser/hex.js.map +1 -1
- package/dist/utils/env/browser/hrtime.d.ts.map +1 -1
- package/dist/utils/env/browser/hrtime.js.map +1 -1
- package/dist/utils/env/browser/logScope.d.ts.map +1 -1
- package/dist/utils/env/browser/logScope.js.map +1 -1
- package/dist/utils/env/browser/md5.d.ts.map +1 -1
- package/dist/utils/env/browser/md5.js.map +1 -1
- package/dist/utils/env/browser/platform.d.ts.map +1 -1
- package/dist/utils/env/browser/platform.js.map +1 -1
- package/dist/utils/env/node/base64.d.ts.map +1 -1
- package/dist/utils/env/node/base64.js.map +1 -1
- package/dist/utils/env/node/crypto.d.ts.map +1 -1
- package/dist/utils/env/node/crypto.js.map +1 -1
- package/dist/utils/env/node/exec.d.ts +9 -1
- package/dist/utils/env/node/exec.d.ts.map +1 -1
- package/dist/utils/env/node/exec.js +11 -4
- package/dist/utils/env/node/exec.js.map +1 -1
- package/dist/utils/env/node/fs.d.ts.map +1 -1
- package/dist/utils/env/node/fs.js.map +1 -1
- package/dist/utils/env/node/hex.d.ts.map +1 -1
- package/dist/utils/env/node/hex.js.map +1 -1
- package/dist/utils/env/node/hrtime.d.ts.map +1 -1
- package/dist/utils/env/node/hrtime.js.map +1 -1
- package/dist/utils/env/node/logScope.d.ts.map +1 -1
- package/dist/utils/env/node/logScope.js.map +1 -1
- package/dist/utils/env/node/platform.d.ts.map +1 -1
- package/dist/utils/env/node/platform.js.map +1 -1
- package/dist/utils/event.d.ts.map +1 -1
- package/dist/utils/event.js +18 -22
- package/dist/utils/event.js.map +1 -1
- package/dist/utils/formatter.d.ts.map +1 -1
- package/dist/utils/formatter.js.map +1 -1
- package/dist/utils/function.d.ts.map +1 -1
- package/dist/utils/function.js +3 -3
- package/dist/utils/function.js.map +1 -1
- package/dist/utils/hash.js.map +1 -1
- package/dist/utils/iterable.d.ts.map +1 -1
- package/dist/utils/iterable.js +2 -6
- package/dist/utils/iterable.js.map +1 -1
- package/dist/utils/lazy.d.ts.map +1 -1
- package/dist/utils/lazy.js.map +1 -1
- package/dist/utils/logger.d.ts.map +1 -1
- package/dist/utils/logger.js +1 -1
- package/dist/utils/logger.js.map +1 -1
- package/dist/utils/logger.scoped.js +1 -1
- package/dist/utils/logger.scoped.js.map +1 -1
- package/dist/utils/lruMap.d.ts.map +1 -1
- package/dist/utils/lruMap.js.map +1 -1
- package/dist/utils/mru.d.ts.map +1 -1
- package/dist/utils/mru.js.map +1 -1
- package/dist/utils/object.js.map +1 -1
- package/dist/utils/paging.d.ts +29 -0
- package/dist/utils/paging.d.ts.map +1 -1
- package/dist/utils/paging.js +18 -0
- package/dist/utils/paging.js.map +1 -1
- package/dist/utils/path.js.map +1 -1
- package/dist/utils/promise.d.ts +10 -0
- package/dist/utils/promise.d.ts.map +1 -1
- package/dist/utils/promise.js +26 -3
- package/dist/utils/promise.js.map +1 -1
- package/dist/utils/promiseCache.d.ts +12 -2
- package/dist/utils/promiseCache.d.ts.map +1 -1
- package/dist/utils/promiseCache.js +80 -50
- package/dist/utils/promiseCache.js.map +1 -1
- package/dist/utils/searchTree.d.ts.map +1 -1
- package/dist/utils/searchTree.js +4 -1
- package/dist/utils/searchTree.js.map +1 -1
- package/dist/utils/stopwatch.d.ts.map +1 -1
- package/dist/utils/string.js +1 -1
- package/dist/utils/string.js.map +1 -1
- package/dist/utils/subscriptionManager.d.ts.map +1 -1
- package/dist/utils/subscriptionManager.js.map +1 -1
- package/dist/utils/trie.d.ts.map +1 -1
- package/dist/utils/trie.js +1 -0
- package/dist/utils/trie.js.map +1 -1
- package/docs/integrations.md +372 -0
- package/docs/kepler-read-api-parity.md +112 -0
- package/package.json +238 -213
- package/src/git/cache.ts +75 -8
- package/src/git/errors.ts +36 -1
- package/src/git/models/commit.ts +1 -1
- package/src/git/models/graph.ts +147 -0
- package/src/git/models/graphSession.ts +205 -0
- package/src/git/models/issue.ts +12 -1
- package/src/git/models/pullRequest.ts +27 -1
- package/src/git/models/repository.ts +24 -1
- package/src/git/models/resourceDescriptor.ts +17 -0
- package/src/git/models/signature.ts +16 -0
- package/src/git/models/tag.ts +6 -1
- package/src/git/parsers/diffParser.ts +1 -1
- package/src/git/providers/branches.ts +6 -1
- package/src/git/providers/commits.ts +6 -1
- package/src/git/providers/config.ts +5 -1
- package/src/git/providers/graph.ts +69 -2
- package/src/git/providers/status.ts +1 -1
- package/src/git/providers/worktrees.ts +3 -1
- package/src/git/remotes/azure-devops.ts +29 -33
- package/src/git/remotes/bitbucket-server.ts +23 -25
- package/src/git/remotes/bitbucket.ts +23 -25
- package/src/git/remotes/gerrit.ts +12 -14
- package/src/git/remotes/gitea.ts +13 -15
- package/src/git/remotes/github.ts +56 -58
- package/src/git/remotes/gitlab.ts +102 -104
- package/src/git/run.types.ts +54 -4
- package/src/git/utils/branch.utils.ts +12 -1
- package/src/git/utils/contributor.utils.ts +1 -1
- package/src/git/utils/fileStatus.utils.ts +7 -0
- package/src/git/utils/graph.utils.ts +46 -0
- package/src/git/utils/issue.utils.ts +1 -0
- package/src/git/utils/pullRequest.utils.ts +9 -0
- package/src/git/utils/reachability.utils.ts +79 -8
- package/src/git/utils/sshKey.utils.ts +30 -0
- package/src/git/watching/watchService.ts +16 -1
- package/src/git/watching/watchSession.ts +20 -2
- package/src/git-cli/exec/git.ts +144 -42
- package/src/git-cli/parsers/logParser.ts +83 -1
- package/src/git-cli/parsers/sshSignatureParser.ts +85 -0
- package/src/git-cli/parsers/worktreeParser.ts +5 -7
- package/src/git-cli/providers/branches.ts +60 -38
- package/src/git-cli/providers/commits.ts +102 -9
- package/src/git-cli/providers/graph.ts +1771 -393
- package/src/git-cli/providers/pausedOperations.ts +3 -3
- package/src/git-cli/providers/revision.ts +42 -0
- package/src/git-cli/providers/status.ts +333 -178
- package/src/git-cli/providers/tags.ts +2 -0
- package/src/git-cli/providers/worktrees.ts +40 -4
- package/src/git-cli/service.ts +9 -0
- package/src/ipc/ipcServer.ts +1 -1
- package/src/plus/agents/providers/claudeCodeProvider.ts +25 -0
- package/src/plus/agents/providers/claudeCodeTranscript.ts +320 -8
- package/src/plus/agents/types.ts +34 -0
- package/src/plus/ai/constants.ts +1 -9
- package/src/plus/ai/models/model.ts +53 -2
- package/src/plus/ai/models/promptTemplates.ts +9 -2
- package/src/plus/ai/prompts.ts +16 -48
- package/src/plus/ai/providers/anthropicProvider.ts +45 -3
- package/src/plus/ai/providers/deepSeekProvider.ts +17 -1
- package/src/plus/ai/providers/geminiProvider.ts +25 -6
- package/src/plus/ai/providers/gitkrakenProvider.ts +2 -0
- package/src/plus/ai/providers/huggingFaceProvider.ts +28 -21
- package/src/plus/ai/providers/openAICompatibleProviderBase.ts +16 -1
- package/src/plus/ai/providers/xaiProvider.ts +14 -1
- package/src/plus/ai/utils/ai.utils.ts +0 -2
- package/src/plus/ai/utils/results.utils.ts +32 -0
- package/src/plus/ai/utils/truncation.utils.ts +0 -1
- package/src/plus/git-github/api/github.ts +484 -104
- package/src/plus/git-github/models.ts +33 -0
- package/src/plus/git-github/providers/github/branches.ts +6 -3
- package/src/plus/git-github/providers/github/diff.ts +1 -1
- package/src/plus/git-github/providers/github/graph.ts +131 -0
- package/src/plus/git-github/providers/github/tags.ts +2 -0
- package/src/plus/integrations/authentication/cloudIntegrationService.ts +189 -17
- package/src/plus/integrations/authentication/configuredIntegrationService.ts +287 -50
- package/src/plus/integrations/authentication/integrationAuthenticationProvider.ts +105 -31
- package/src/plus/integrations/authentication/integrationAuthenticationService.ts +7 -3
- package/src/plus/integrations/authentication/manualTokenProvider.ts +12 -5
- package/src/plus/integrations/authentication/models.ts +35 -1
- package/src/plus/integrations/collectionMetadata.ts +143 -0
- package/src/plus/integrations/constants.ts +21 -0
- package/src/plus/integrations/context.ts +8 -9
- package/src/plus/integrations/errors.ts +153 -0
- package/src/plus/integrations/index.ts +148 -51
- package/src/plus/integrations/integrationService.ts +940 -49
- package/src/plus/integrations/lite.ts +233 -0
- package/src/plus/integrations/manager.ts +359 -0
- package/src/plus/integrations/models/gitHostIntegration.ts +1005 -134
- package/src/plus/integrations/models/integration.ts +293 -24
- package/src/plus/integrations/models/issuesIntegration.ts +132 -39
- package/src/plus/integrations/providerFilters.ts +12 -0
- package/src/plus/integrations/providers/apiClients.ts +8 -11
- package/src/plus/integrations/providers/apiConfig.ts +71 -0
- package/src/plus/integrations/providers/azure/azure.ts +164 -33
- package/src/plus/integrations/providers/azure/models.ts +19 -6
- package/src/plus/integrations/providers/azureDevOps.ts +766 -101
- package/src/plus/integrations/providers/bitbucket/bitbucket.ts +164 -34
- package/src/plus/integrations/providers/bitbucket-server/models.ts +32 -1
- package/src/plus/integrations/providers/bitbucket-server.ts +173 -8
- package/src/plus/integrations/providers/bitbucket.ts +489 -45
- package/src/plus/integrations/providers/github/github.ts +2 -2
- package/src/plus/integrations/providers/github/github.utils.ts +1 -1
- package/src/plus/integrations/providers/github.ts +390 -6
- package/src/plus/integrations/providers/gitlab/gitlab.ts +170 -60
- package/src/plus/integrations/providers/gitlab/gitlab.utils.ts +9 -0
- package/src/plus/integrations/providers/gitlab/models.ts +19 -5
- package/src/plus/integrations/providers/gitlab.ts +369 -10
- package/src/plus/integrations/providers/jira.ts +247 -42
- package/src/plus/integrations/providers/linear.ts +154 -27
- package/src/plus/integrations/providers/models.ts +583 -75
- package/src/plus/integrations/providers/providersApi.ts +849 -86
- package/src/plus/integrations/providers/trello.ts +205 -0
- package/src/plus/integrations/providers/utils/providerPaging.ts +177 -0
- package/src/plus/integrations/providers/utils.ts +68 -8
- package/src/plus/integrations/reads/broaden.ts +452 -0
- package/src/plus/integrations/reads/context.ts +99 -0
- package/src/plus/integrations/reads/cursors.ts +224 -0
- package/src/plus/integrations/reads/drains.ts +343 -0
- package/src/plus/integrations/reads/filters.ts +124 -0
- package/src/plus/integrations/reads/hierarchy.ts +473 -0
- package/src/plus/integrations/reads/hierarchy.utils.ts +155 -0
- package/src/plus/integrations/reads/issueTracker.ts +468 -0
- package/src/plus/integrations/reads/issues.ts +409 -0
- package/src/plus/integrations/reads/paging.ts +277 -0
- package/src/plus/integrations/reads/pullRequests.ts +260 -0
- package/src/plus/integrations/reads/resolveRepository.ts +272 -0
- package/src/plus/integrations/reads/sweeps.ts +185 -0
- package/src/plus/integrations/reads/warnings.ts +170 -0
- package/src/plus/integrations/results.ts +275 -0
- package/src/plus/integrations/utils/domain.utils.ts +26 -0
- package/src/plus/integrations/utils/integration.utils.ts +93 -16
- package/src/utils/brand.ts +0 -2
- package/src/utils/cancellation.ts +56 -7
- package/src/utils/coalescedRun.ts +45 -0
- package/src/utils/color.ts +3 -3
- package/src/utils/date.ts +72 -0
- package/src/utils/debounce.ts +1 -1
- package/src/utils/decorators/gate.ts +2 -2
- package/src/utils/decorators/log.ts +5 -5
- package/src/utils/decorators/memoize.ts +2 -2
- package/src/utils/decorators/sequentialize.ts +2 -2
- package/src/utils/decorators/serializable.ts +1 -1
- package/src/utils/env/node/exec.ts +20 -5
- package/src/utils/event.ts +19 -25
- package/src/utils/function.ts +3 -3
- package/src/utils/iterable.ts +2 -6
- package/src/utils/logger.scoped.ts +1 -1
- package/src/utils/logger.ts +1 -1
- package/src/utils/paging.ts +46 -0
- package/src/utils/promise.ts +33 -3
- package/src/utils/promiseCache.ts +81 -51
- package/src/utils/searchTree.ts +4 -2
- package/src/utils/string.ts +1 -1
- package/src/utils/trie.ts +1 -0
- package/dist/plus/ai/providers/githubModelsProvider.d.ts +0 -19
- package/dist/plus/ai/providers/githubModelsProvider.d.ts.map +0 -1
- package/dist/plus/ai/providers/githubModelsProvider.js +0 -51
- package/dist/plus/ai/providers/githubModelsProvider.js.map +0 -1
- package/src/plus/ai/providers/githubModelsProvider.ts +0 -92
|
@@ -1,9 +1,27 @@
|
|
|
1
1
|
import { base64 } from '../../../utils/base64.js';
|
|
2
|
-
import {
|
|
2
|
+
import { CancellationError } from '../../../utils/cancellation.js';
|
|
3
3
|
import { toTokenWithInfo } from '../authentication/models.js';
|
|
4
|
+
import { toCollectionScopeFailure } from '../collectionMetadata.js';
|
|
4
5
|
import { GitCloudHostIntegrationId, GitSelfManagedHostIntegrationId } from '../constants.js';
|
|
5
6
|
import { GitHostIntegration } from '../models/gitHostIntegration.js';
|
|
6
|
-
import { fromProviderIssue, fromProviderPullRequest, providersMetadata } from './models.js';
|
|
7
|
+
import { fromProviderIssue, fromProviderPullRequest, getProviderPullRequestIdentity, IssueFilter, providerPullRequestMatchesSearch, providersMetadata, PullRequestFilter, toProviderPullRequestStates, } from './models.js';
|
|
8
|
+
import { collectProviderPagedResult, flatSettledOrThrow, mergeCollectionMetadata } from './utils/providerPaging.js';
|
|
9
|
+
function getAzureRepositoryIdentity(repo) {
|
|
10
|
+
const match = /^([^/]+)\/_git\/([^/]+)$/i.exec(repo.name);
|
|
11
|
+
return {
|
|
12
|
+
resourceName: repo.owner,
|
|
13
|
+
projectName: repo.project ?? match?.[1],
|
|
14
|
+
repositoryName: match?.[2] ?? repo.name,
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Matches an org/project descriptor against a caller-supplied name, mirroring the facade's own
|
|
19
|
+
* key/id/name comparison so `listIssuesPage({ org, project })` narrows on the same identifiers a consumer
|
|
20
|
+
* already got back from `listOrgs`/`listProjects`.
|
|
21
|
+
*/
|
|
22
|
+
function azureResourceMatches(resource, value) {
|
|
23
|
+
return resource.key === value || resource.id === value || resource.name === value;
|
|
24
|
+
}
|
|
7
25
|
export class AzureDevOpsIntegrationBase extends GitHostIntegration {
|
|
8
26
|
getApiOptions(session, doNotConvertToPat = false) {
|
|
9
27
|
const usePat = !doNotConvertToPat;
|
|
@@ -57,7 +75,14 @@ export class AzureDevOpsIntegrationBase extends GitHostIntegration {
|
|
|
57
75
|
return this._organizations.get(accessToken);
|
|
58
76
|
}
|
|
59
77
|
_projects;
|
|
60
|
-
|
|
78
|
+
/**
|
|
79
|
+
* Discovers (and caches) each resource's projects. Only resources whose drain completed cleanly are cached;
|
|
80
|
+
* a rejected or backstop-truncated drain is left uncached (retried next call). When `failures` is supplied,
|
|
81
|
+
* a rejected resource is recorded there as a structured {@link CollectionScopeFailure} so an account-wide
|
|
82
|
+
* caller can surface the incomplete project set (a whole org's PRs/issues silently missing otherwise) as a
|
|
83
|
+
* scope-aware warning + `fetchFailed` rather than an all-pages success over a hole.
|
|
84
|
+
*/
|
|
85
|
+
async getProviderProjectsForResources(session, resources, force = false, failures) {
|
|
61
86
|
this._projects ??= new Map();
|
|
62
87
|
const { accessToken } = session;
|
|
63
88
|
let resourcesWithoutProjects = [];
|
|
@@ -73,30 +98,90 @@ export class AzureDevOpsIntegrationBase extends GitHostIntegration {
|
|
|
73
98
|
}
|
|
74
99
|
}
|
|
75
100
|
}
|
|
101
|
+
const allProjects = [];
|
|
102
|
+
let resultMetadata;
|
|
76
103
|
if (resourcesWithoutProjects.length > 0) {
|
|
77
104
|
const api = await this.getProvidersApi();
|
|
78
105
|
const { tokenWithInfo, options } = this.getApiOptions(session);
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
106
|
+
// The projects API is paginated; a single call would drop every project past the first page (and
|
|
107
|
+
// with it their repos and PRs). Drain all pages per resource, threading the returned cursor.
|
|
108
|
+
// Per-resource (not a shared flatSettled) so a resource whose drain was truncated (hit the paging
|
|
109
|
+
// backstop) or rejected is NOT cached — caching a partial list here would make every later repo/PR/
|
|
110
|
+
// issue read for that org silently inherit an incomplete project set. Leaving it uncached means the
|
|
111
|
+
// next call retries it. The scope is passed so a page-level failure preserves the prefix already
|
|
112
|
+
// fetched and records a structured failure instead of re-throwing.
|
|
113
|
+
const drains = await Promise.allSettled(resourcesWithoutProjects.map(async (resource) => ({
|
|
114
|
+
resource: resource,
|
|
115
|
+
result: await collectProviderPagedResult(cursor => api.getAzureProjectsForResource(tokenWithInfo, resource.name, {
|
|
116
|
+
...options,
|
|
117
|
+
cursor: cursor,
|
|
118
|
+
}), 20, { providerId: this.id, resourceId: resource.id }),
|
|
119
|
+
})));
|
|
120
|
+
// `allSettled` preserves order, so `drains[i]` is `resourcesWithoutProjects[i]`.
|
|
121
|
+
drains.forEach((drain, i) => {
|
|
122
|
+
// A rejected resource drain contributes nothing and is left uncached (retried next call). Record
|
|
123
|
+
// it as a structured failure so an account-wide caller can warn on the org whose projects (and
|
|
124
|
+
// thus PRs/issues) are missing, instead of silently narrowing the read.
|
|
125
|
+
if (drain.status !== 'fulfilled') {
|
|
126
|
+
const resource = resourcesWithoutProjects[i];
|
|
127
|
+
const failure = toCollectionScopeFailure({ providerId: this.id, resourceId: resource.id }, drain.reason);
|
|
128
|
+
failures?.push(failure);
|
|
129
|
+
resultMetadata = mergeCollectionMetadata(resultMetadata, {
|
|
130
|
+
completeness: 'partial',
|
|
131
|
+
failures: [failure],
|
|
132
|
+
});
|
|
133
|
+
return;
|
|
90
134
|
}
|
|
91
|
-
|
|
135
|
+
const { resource, result } = drain.value;
|
|
136
|
+
const projects = result.values
|
|
137
|
+
.filter(p => p.namespace === resource.name)
|
|
138
|
+
.map(p => ({
|
|
139
|
+
id: p.id,
|
|
140
|
+
name: p.name,
|
|
141
|
+
resourceId: resource.id,
|
|
142
|
+
resourceName: resource.name,
|
|
143
|
+
key: p.id,
|
|
144
|
+
}));
|
|
145
|
+
if (result.metadata != null) {
|
|
146
|
+
resultMetadata = mergeCollectionMetadata(resultMetadata, result.metadata);
|
|
147
|
+
}
|
|
148
|
+
const metadataIncomplete = result.metadata != null && result.metadata.completeness !== 'complete';
|
|
149
|
+
if (result.truncated || metadataIncomplete) {
|
|
150
|
+
// A truncated drain is an incomplete project set; include its partial values in the current
|
|
151
|
+
// result but don't cache it as if complete. Add a structured failure for the truncation unless
|
|
152
|
+
// the drain already recorded a page-level failure for this resource.
|
|
153
|
+
if (result.truncated &&
|
|
154
|
+
!result.metadata?.failures?.some(f => f.scope?.resourceId === resource.id && f.kind !== 'unknown')) {
|
|
155
|
+
const failure = toCollectionScopeFailure({ providerId: this.id, resourceId: resource.id }, new Error('Project discovery was truncated before all pages were read'));
|
|
156
|
+
failures?.push(failure);
|
|
157
|
+
resultMetadata = mergeCollectionMetadata(resultMetadata, {
|
|
158
|
+
completeness: 'partial',
|
|
159
|
+
failures: [failure],
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
allProjects.push(...projects);
|
|
163
|
+
return;
|
|
164
|
+
}
|
|
165
|
+
this._projects.set(`${accessToken}:${resource.id}`, projects);
|
|
166
|
+
});
|
|
92
167
|
}
|
|
93
|
-
|
|
168
|
+
const cachedProjects = resources.reduce((projects, resource) => {
|
|
94
169
|
const resourceProjects = this._projects.get(`${accessToken}:${resource.id}`);
|
|
95
170
|
if (resourceProjects != null) {
|
|
96
171
|
projects.push(...resourceProjects);
|
|
97
172
|
}
|
|
98
173
|
return projects;
|
|
99
174
|
}, []);
|
|
175
|
+
allProjects.push(...cachedProjects);
|
|
176
|
+
const projectsByIdentity = new Map();
|
|
177
|
+
for (const project of allProjects) {
|
|
178
|
+
const identity = `${project.resourceId}:${project.id}`;
|
|
179
|
+
if (!projectsByIdentity.has(identity)) {
|
|
180
|
+
projectsByIdentity.set(identity, project);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
const values = [...projectsByIdentity.values()];
|
|
184
|
+
return resultMetadata != null ? { values: values, metadata: resultMetadata } : { values: values };
|
|
100
185
|
}
|
|
101
186
|
async getRepoDescriptorsForProjects(session, projects) {
|
|
102
187
|
const descriptors = new Map();
|
|
@@ -122,6 +207,97 @@ export class AzureDevOpsIntegrationBase extends GitHostIntegration {
|
|
|
122
207
|
}));
|
|
123
208
|
return descriptors;
|
|
124
209
|
}
|
|
210
|
+
async getProviderOrganizationsForUser(session) {
|
|
211
|
+
const orgs = await this.getProviderResourcesForUser(session);
|
|
212
|
+
if (orgs == null)
|
|
213
|
+
return undefined;
|
|
214
|
+
return {
|
|
215
|
+
values: orgs.map(o => ({
|
|
216
|
+
id: o.id,
|
|
217
|
+
providerId: this.id,
|
|
218
|
+
name: o.name,
|
|
219
|
+
url: `${this.apiBaseUrl}/${o.name}`,
|
|
220
|
+
})),
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
async getProviderProjectsForOrg(session, org) {
|
|
224
|
+
// Azure is the one git host with a project tier: repos live under org (resource) → project. Enumerate
|
|
225
|
+
// the user's orgs (optionally scoped to `org`), read their projects, and surface each as an org-shaped
|
|
226
|
+
// entry so the ProviderBackend facade can list them uniformly.
|
|
227
|
+
const orgs = await this.getProviderResourcesForUser(session);
|
|
228
|
+
if (orgs == null)
|
|
229
|
+
return undefined;
|
|
230
|
+
if (orgs.length === 0) {
|
|
231
|
+
return { values: [], paging: { cursor: '{}', more: false } };
|
|
232
|
+
}
|
|
233
|
+
const scopedOrgs = org != null ? orgs.filter(o => o.name === org || o.id === org) : orgs;
|
|
234
|
+
if (scopedOrgs.length === 0)
|
|
235
|
+
return { values: [] };
|
|
236
|
+
const projects = await this.getProviderProjectsForResources(session, scopedOrgs);
|
|
237
|
+
if (projects.values.length === 0 && projects.metadata == null)
|
|
238
|
+
return { values: [] };
|
|
239
|
+
return {
|
|
240
|
+
values: projects.values.map(p => ({
|
|
241
|
+
id: p.id,
|
|
242
|
+
providerId: this.id,
|
|
243
|
+
name: p.name,
|
|
244
|
+
org: p.resourceName,
|
|
245
|
+
url: `${this.apiBaseUrl}/${p.resourceName}/${p.name}`,
|
|
246
|
+
})),
|
|
247
|
+
...(projects.metadata != null ? { metadata: projects.metadata } : {}),
|
|
248
|
+
};
|
|
249
|
+
}
|
|
250
|
+
/**
|
|
251
|
+
* With `options.project`, returns one page of that project's repos (follow `paging.cursor` to page).
|
|
252
|
+
* Without a project it fans out across every project under `org` and returns them all at once — there's
|
|
253
|
+
* no single cursor to page a parallel merge — skipping any project that fails to list rather than
|
|
254
|
+
* failing the whole org. If any successful project drain hits the defensive page backstop, the merged
|
|
255
|
+
* result is marked `truncated` without exposing a synthetic cursor.
|
|
256
|
+
*/
|
|
257
|
+
async getProviderRepositoriesForOrg(session, org, options) {
|
|
258
|
+
const api = await this.getProvidersApi();
|
|
259
|
+
const { tokenWithInfo, options: apiOptions } = this.getApiOptions(session);
|
|
260
|
+
if (options?.project) {
|
|
261
|
+
return api.getReposForAzureProject(tokenWithInfo, org, options.project, {
|
|
262
|
+
...apiOptions,
|
|
263
|
+
cursor: options.cursor,
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
const orgDescriptor = (await this.getProviderResourcesForUser(session))?.find(o => o.name === org);
|
|
267
|
+
if (orgDescriptor == null)
|
|
268
|
+
return undefined;
|
|
269
|
+
const discoveryFailures = [];
|
|
270
|
+
const projects = await this.getProviderProjectsForResources(session, [orgDescriptor], false, discoveryFailures);
|
|
271
|
+
// An empty result is only proven-empty when discovery itself succeeded; a rejected project-discovery
|
|
272
|
+
// leaves the repo set unknowable, so surface the discovery metadata rather than publishing a hole as a
|
|
273
|
+
// complete list.
|
|
274
|
+
if (projects.values.length === 0) {
|
|
275
|
+
return { values: [], metadata: projects.metadata };
|
|
276
|
+
}
|
|
277
|
+
let repoMetadata;
|
|
278
|
+
const results = await Promise.allSettled(projects.values.map(p => collectProviderPagedResult(cursor => api.getReposForAzureProject(tokenWithInfo, org, p.name, { ...apiOptions, cursor: cursor }), 20, { providerId: this.id, resourceId: org, projectId: p.name })));
|
|
279
|
+
const values = [];
|
|
280
|
+
let truncated = false;
|
|
281
|
+
for (const result of results) {
|
|
282
|
+
// With a per-project scope, collectProviderPagedResult catches page-level failures itself and returns
|
|
283
|
+
// them as metadata rather than rejecting. A rejected promise here is an unexpected internal error.
|
|
284
|
+
if (result.status !== 'fulfilled') {
|
|
285
|
+
truncated = true;
|
|
286
|
+
continue;
|
|
287
|
+
}
|
|
288
|
+
values.push(...result.value.values);
|
|
289
|
+
if (result.value.metadata != null) {
|
|
290
|
+
repoMetadata = mergeCollectionMetadata(repoMetadata, result.value.metadata);
|
|
291
|
+
}
|
|
292
|
+
truncated ||= result.value.truncated === true;
|
|
293
|
+
}
|
|
294
|
+
const metadata = mergeCollectionMetadata(repoMetadata, projects.metadata);
|
|
295
|
+
return {
|
|
296
|
+
values: values,
|
|
297
|
+
...(metadata != null ? { metadata: metadata } : {}),
|
|
298
|
+
...(truncated || (metadata != null && metadata.completeness !== 'complete') ? { truncated: true } : {}),
|
|
299
|
+
};
|
|
300
|
+
}
|
|
125
301
|
async mergeProviderPullRequest(session, pr, options) {
|
|
126
302
|
const api = await this.getProvidersApi();
|
|
127
303
|
if (pr.refs == null || pr.project == null)
|
|
@@ -148,8 +324,8 @@ export class AzureDevOpsIntegrationBase extends GitHostIntegration {
|
|
|
148
324
|
async getProviderAccountForEmail(_session, _repo, _email, _options) {
|
|
149
325
|
return Promise.resolve(undefined);
|
|
150
326
|
}
|
|
151
|
-
async getProviderDefaultBranch(
|
|
152
|
-
return
|
|
327
|
+
async getProviderDefaultBranch(session, repo, cancellation) {
|
|
328
|
+
return (await this.authenticationService.apis.azure)?.getDefaultBranch(this, toTokenWithInfo(this.id, session), repo.owner, repo.name, { baseUrl: this.apiBaseUrl }, cancellation);
|
|
153
329
|
}
|
|
154
330
|
async getProviderLinkedIssueOrPullRequest(session, repo, { id }, type) {
|
|
155
331
|
return (await this.authenticationService.apis.azure)?.getIssueOrPullRequest(this, toTokenWithInfo(this.id, session), repo.owner, repo.name, id, {
|
|
@@ -165,9 +341,9 @@ export class AzureDevOpsIntegrationBase extends GitHostIntegration {
|
|
|
165
341
|
if (orgs == null || orgs.length === 0)
|
|
166
342
|
return undefined;
|
|
167
343
|
const projects = await this.getProviderProjectsForResources(session, orgs);
|
|
168
|
-
if (projects
|
|
344
|
+
if (projects.values.length === 0)
|
|
169
345
|
return undefined;
|
|
170
|
-
const matchingProject = projects.find(p => p.resourceName === project.owner && p.name === project.name);
|
|
346
|
+
const matchingProject = projects.values.find(p => p.resourceName === project.owner && p.name === project.name);
|
|
171
347
|
if (matchingProject == null)
|
|
172
348
|
return undefined;
|
|
173
349
|
return (await this.authenticationService.apis.azure)?.getIssue(this, toTokenWithInfo(this.id, session), matchingProject, id, {
|
|
@@ -183,50 +359,63 @@ export class AzureDevOpsIntegrationBase extends GitHostIntegration {
|
|
|
183
359
|
return (await this.authenticationService.apis.azure)?.getPullRequestForCommit(this, toTokenWithInfo(this.id, session), repo.owner, repo.name, rev, this.apiBaseUrl);
|
|
184
360
|
}
|
|
185
361
|
async getRepoInfo(repo) {
|
|
362
|
+
const identity = getAzureRepositoryIdentity(repo);
|
|
363
|
+
if (identity.projectName == null)
|
|
364
|
+
return undefined;
|
|
186
365
|
const api = await this.getProvidersApi();
|
|
187
|
-
|
|
366
|
+
// `connectionId` targets a specific account (multi-account); omitted reads the primary.
|
|
367
|
+
const session = await this.resolveReadSession(repo.connectionId, undefined);
|
|
368
|
+
if (session == null)
|
|
188
369
|
return undefined;
|
|
189
|
-
const { tokenWithInfo, options } = this.getApiOptions(
|
|
190
|
-
return api.getRepo(tokenWithInfo,
|
|
370
|
+
const { tokenWithInfo, options } = this.getApiOptions(session);
|
|
371
|
+
return api.getRepo(tokenWithInfo, identity.resourceName, identity.repositoryName, identity.projectName, options);
|
|
191
372
|
}
|
|
192
|
-
async getProviderRepositoryMetadata(
|
|
193
|
-
return
|
|
373
|
+
async getProviderRepositoryMetadata(session, repo, cancellation) {
|
|
374
|
+
return (await this.authenticationService.apis.azure)?.getRepositoryMetadata(this, toTokenWithInfo(this.id, session), repo.owner, repo.name, { baseUrl: this.apiBaseUrl }, cancellation);
|
|
194
375
|
}
|
|
195
|
-
async searchProviderMyPullRequests(session, repos) {
|
|
376
|
+
async searchProviderMyPullRequests(session, repos, _cancellation, _silent, state, _options) {
|
|
196
377
|
const api = await this.getProvidersApi();
|
|
197
378
|
if (repos != null) {
|
|
198
379
|
// TODO: implement repos version
|
|
199
380
|
return undefined;
|
|
200
381
|
}
|
|
382
|
+
const states = toProviderPullRequestStates(state);
|
|
201
383
|
const user = await this.getProviderCurrentAccount(session);
|
|
202
|
-
|
|
384
|
+
// Azure filters key on the identity GUID (account id), not the display name — see
|
|
385
|
+
// getProviderMyPullRequestsForUser and the repo-scoped path in gitHostIntegration.ts.
|
|
386
|
+
if (user?.id == null)
|
|
203
387
|
return undefined;
|
|
204
388
|
const orgs = await this.getProviderResourcesForUser(session);
|
|
205
389
|
if (orgs == null || orgs.length === 0)
|
|
206
390
|
return undefined;
|
|
207
391
|
const projects = await this.getProviderProjectsForResources(session, orgs);
|
|
208
|
-
if (projects
|
|
392
|
+
if (projects.values.length === 0)
|
|
209
393
|
return undefined;
|
|
210
394
|
const repoDescriptors = [
|
|
211
|
-
...((await this.getRepoDescriptorsForProjects(session, projects)) ?? new Map()).values(),
|
|
395
|
+
...((await this.getRepoDescriptorsForProjects(session, projects.values)) ?? new Map()).values(),
|
|
212
396
|
]
|
|
213
397
|
.filter(r => r != null)
|
|
214
398
|
.flat();
|
|
215
399
|
const { tokenWithInfo, options } = this.getApiOptions(session);
|
|
216
|
-
const projectInputs = projects.map(p => ({ namespace: p.resourceName, project: p.name }));
|
|
400
|
+
const projectInputs = projects.values.map(p => ({ namespace: p.resourceName, project: p.name }));
|
|
401
|
+
// Legacy array-returning path (Launchpad/focus view): unwrap `.values` from the SDK collection result.
|
|
402
|
+
// The metadata (partial/failures) isn't surfaced here because this path's return type has no warning
|
|
403
|
+
// channel; the metadata-aware ProviderBackend surface is getProviderMyPullRequestsForUser above.
|
|
217
404
|
const assignedPrs = (await api.getPullRequestsForAzureProjects(tokenWithInfo, projectInputs, {
|
|
218
405
|
...options,
|
|
219
|
-
assigneeLogins: [user.
|
|
220
|
-
|
|
406
|
+
assigneeLogins: [user.id],
|
|
407
|
+
states: states,
|
|
408
|
+
})).values.map(pr => this.fromAzureProviderPullRequest(pr, repoDescriptors, projects.values));
|
|
221
409
|
const authoredPrs = (await api.getPullRequestsForAzureProjects(tokenWithInfo, projectInputs, {
|
|
222
410
|
...options,
|
|
223
|
-
authorLogin: user.
|
|
224
|
-
|
|
411
|
+
authorLogin: user.id,
|
|
412
|
+
states: states,
|
|
413
|
+
})).values.map(pr => this.fromAzureProviderPullRequest(pr, repoDescriptors, projects.values));
|
|
225
414
|
const prsById = new Map();
|
|
226
|
-
for (const pr of authoredPrs
|
|
415
|
+
for (const pr of authoredPrs) {
|
|
227
416
|
prsById.set(pr.id, pr);
|
|
228
417
|
}
|
|
229
|
-
for (const pr of assignedPrs
|
|
418
|
+
for (const pr of assignedPrs) {
|
|
230
419
|
const existing = prsById.get(pr.id);
|
|
231
420
|
if (existing == null) {
|
|
232
421
|
prsById.set(pr.id, pr);
|
|
@@ -234,54 +423,351 @@ export class AzureDevOpsIntegrationBase extends GitHostIntegration {
|
|
|
234
423
|
}
|
|
235
424
|
return [...prsById.values()];
|
|
236
425
|
}
|
|
237
|
-
async
|
|
426
|
+
async getProviderMyPullRequestsForUser(session, options) {
|
|
238
427
|
const api = await this.getProvidersApi();
|
|
239
428
|
const user = await this.getProviderCurrentAccount(session);
|
|
240
|
-
|
|
429
|
+
// Azure routes authorLogin/assigneeLogins to `searchCriteria.creatorId`/`reviewerId`, which require the
|
|
430
|
+
// identity GUID (account id), not the display name — matching the repo-scoped path in
|
|
431
|
+
// gitHostIntegration.ts. Using `username` here would match nothing and return zero PRs.
|
|
432
|
+
if (user?.id == null)
|
|
241
433
|
return undefined;
|
|
434
|
+
// Azure PRs are org + project scoped: enumerate the user's orgs and their projects, then read authored
|
|
435
|
+
// and assigned PRs across all of them. Return the raw provider shape (not the normalized model) so the
|
|
436
|
+
// ProviderBackend surface stays uniform with the other providers.
|
|
242
437
|
const orgs = await this.getProviderResourcesForUser(session);
|
|
243
438
|
if (orgs == null || orgs.length === 0)
|
|
244
439
|
return undefined;
|
|
245
|
-
|
|
246
|
-
|
|
440
|
+
// Structured per-scope failures from BOTH project discovery (a whole org dropped) and the per-project PR
|
|
441
|
+
// drains, so the facade warns on the failed scope + sets `fetchFailed` instead of silently narrowing.
|
|
442
|
+
const failures = [];
|
|
443
|
+
const projects = await this.getProviderProjectsForResources(session, orgs, false, failures);
|
|
444
|
+
if (projects.values.length === 0) {
|
|
445
|
+
// Project discovery itself was incomplete (e.g. a truncated org); surface the metadata so the facade
|
|
446
|
+
// can warn and set fetchFailed rather than reporting an empty account.
|
|
447
|
+
const incomplete = projects.metadata != null && projects.metadata.completeness !== 'complete';
|
|
448
|
+
return {
|
|
449
|
+
values: [],
|
|
450
|
+
paging: { cursor: '{}', more: false, truncated: incomplete || undefined },
|
|
451
|
+
...(projects.metadata != null ? { metadata: projects.metadata } : {}),
|
|
452
|
+
};
|
|
453
|
+
}
|
|
454
|
+
const { tokenWithInfo, options: apiOptions } = this.getApiOptions(session);
|
|
455
|
+
const states = toProviderPullRequestStates(options?.state);
|
|
456
|
+
const maxPagesPerProject = 20;
|
|
457
|
+
// Drain each project fully (numbered pages) for both the authored and assigned reads. Azure has no
|
|
458
|
+
// single cross-project cursor, so the aggregate is one page; `truncated` is set only if a project hit
|
|
459
|
+
// the backstop with more pages remaining.
|
|
460
|
+
let truncated = projects.metadata != null && projects.metadata.completeness !== 'complete';
|
|
461
|
+
// Drain one project's numbered pages, returning its PRs and any per-page failure. Returns per-project
|
|
462
|
+
// (not mutating shared state) so the fan-out below can be settled independently: one project's read
|
|
463
|
+
// failure must not discard every other project's already-drained PRs.
|
|
464
|
+
const drainProject = async (project, scope, filter) => {
|
|
465
|
+
const collected = [];
|
|
466
|
+
const projectIdentity = `${project.namespace}/${project.project}`;
|
|
467
|
+
let page;
|
|
468
|
+
for (let i = 0; i < maxPagesPerProject; i++) {
|
|
469
|
+
try {
|
|
470
|
+
const result = await api.getPullRequestsForAzureProject(tokenWithInfo, project, {
|
|
471
|
+
...apiOptions,
|
|
472
|
+
...filter,
|
|
473
|
+
states: states,
|
|
474
|
+
page: page,
|
|
475
|
+
});
|
|
476
|
+
if (result == null) {
|
|
477
|
+
if (page == null)
|
|
478
|
+
break;
|
|
479
|
+
truncated = true;
|
|
480
|
+
return {
|
|
481
|
+
prs: collected,
|
|
482
|
+
projectIdentity: projectIdentity,
|
|
483
|
+
failure: toCollectionScopeFailure(scope, new Error('Azure DevOps returned no page after advertising a continuation')),
|
|
484
|
+
};
|
|
485
|
+
}
|
|
486
|
+
collected.push(...result.data);
|
|
487
|
+
if (!result.hasMore)
|
|
488
|
+
break;
|
|
489
|
+
if (result.nextPage == null || result.nextPage === page) {
|
|
490
|
+
truncated = true;
|
|
491
|
+
return {
|
|
492
|
+
prs: collected,
|
|
493
|
+
projectIdentity: projectIdentity,
|
|
494
|
+
failure: toCollectionScopeFailure(scope, new Error('Azure DevOps returned no advancing pull request continuation')),
|
|
495
|
+
};
|
|
496
|
+
}
|
|
497
|
+
page = result.nextPage;
|
|
498
|
+
if (i === maxPagesPerProject - 1) {
|
|
499
|
+
truncated = true;
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
catch (ex) {
|
|
503
|
+
// A page failure after the first page leaves the already-drained prefix intact; record the
|
|
504
|
+
// failure at the project scope instead of re-throwing and discarding the prefix.
|
|
505
|
+
truncated = true;
|
|
506
|
+
return {
|
|
507
|
+
prs: collected,
|
|
508
|
+
projectIdentity: projectIdentity,
|
|
509
|
+
failure: toCollectionScopeFailure(scope, ex),
|
|
510
|
+
};
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
return { prs: collected, projectIdentity: projectIdentity };
|
|
514
|
+
};
|
|
515
|
+
// Settle per-project failures instead of rejecting the whole sweep. `drainProject` already catches its own
|
|
516
|
+
// page-level failures, so the structured failure (attributed to that project) is preserved rather than
|
|
517
|
+
// re-thrown — re-throwing an auth/rate-limit rejection would discard every other project's already-drained
|
|
518
|
+
// PRs. Auth/rate-limit stay actionable through the failure's kind (the facade maps it to an `auth`/`rate-limit`
|
|
519
|
+
// warning + `fetchFailed`), matching the SDK's model. `failures` was declared above so project-discovery
|
|
520
|
+
// failures and per-project drain failures share it.
|
|
521
|
+
const requested = options?.filters?.length ? new Set(options.filters) : undefined;
|
|
522
|
+
const wantAuthored = requested == null || requested.has(PullRequestFilter.Author);
|
|
523
|
+
// Azure has no assignee concept distinct from reviewer. Both neutral relationships map to reviewerId.
|
|
524
|
+
const wantReviewed = requested == null ||
|
|
525
|
+
requested.has(PullRequestFilter.Assignee) ||
|
|
526
|
+
requested.has(PullRequestFilter.ReviewRequested);
|
|
527
|
+
const outcomes = await Promise.all(projects.values.flatMap(p => {
|
|
528
|
+
const project = { namespace: p.resourceName, project: p.name };
|
|
529
|
+
const scope = { providerId: this.id, resourceId: p.resourceId, projectId: p.name };
|
|
530
|
+
const drains = [];
|
|
531
|
+
if (wantAuthored) {
|
|
532
|
+
drains.push(drainProject(project, scope, { authorLogin: user.id }));
|
|
533
|
+
}
|
|
534
|
+
if (wantReviewed) {
|
|
535
|
+
drains.push(drainProject(project, scope, { reviewerId: user.id }));
|
|
536
|
+
}
|
|
537
|
+
return drains;
|
|
538
|
+
}));
|
|
539
|
+
// Azure's `pullRequestId` is not account-global. Prefer repository + PR id, then the org-qualified URL.
|
|
540
|
+
// If neither is available, preserve the row instead of collapsing unrelated repositories by numeric id.
|
|
541
|
+
const prsByIdentity = new Map();
|
|
542
|
+
for (const outcome of outcomes) {
|
|
543
|
+
if (outcome.failure != null) {
|
|
544
|
+
failures.push(outcome.failure);
|
|
545
|
+
}
|
|
546
|
+
for (const pr of outcome.prs) {
|
|
547
|
+
const key = getProviderPullRequestIdentity(pr) ?? `project:${outcome.projectIdentity}:pull-request:${pr.id}`;
|
|
548
|
+
if (!prsByIdentity.has(key)) {
|
|
549
|
+
prsByIdentity.set(key, pr);
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
const metadata = mergeCollectionMetadata(failures.length > 0 ? { completeness: 'partial', failures: failures } : undefined, projects.metadata);
|
|
554
|
+
return {
|
|
555
|
+
values: [...prsByIdentity.values()],
|
|
556
|
+
paging: { cursor: '{}', more: false, truncated: truncated || undefined },
|
|
557
|
+
metadata: metadata,
|
|
558
|
+
};
|
|
559
|
+
}
|
|
560
|
+
async searchProviderPullRequests(session, searchQuery, repos, cancellation, options) {
|
|
561
|
+
if (cancellation?.aborted)
|
|
562
|
+
throw new CancellationError();
|
|
563
|
+
const orgs = await this.getProviderResourcesForUser(session);
|
|
564
|
+
if (cancellation?.aborted)
|
|
565
|
+
throw new CancellationError();
|
|
566
|
+
if (orgs == null || orgs.length === 0)
|
|
247
567
|
return undefined;
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
return
|
|
568
|
+
// `getProviderProjectsForResources` returns a collection result ({ values, metadata }); this search
|
|
569
|
+
// path only needs the resolved projects, so read `.values`.
|
|
570
|
+
const projects = (await this.getProviderProjectsForResources(session, orgs)).values;
|
|
571
|
+
if (cancellation?.aborted)
|
|
572
|
+
throw new CancellationError();
|
|
573
|
+
if (projects.length === 0)
|
|
574
|
+
return undefined;
|
|
575
|
+
const repoDescriptorsByProject = await this.getRepoDescriptorsForProjects(session, projects);
|
|
576
|
+
if (cancellation?.aborted)
|
|
577
|
+
throw new CancellationError();
|
|
578
|
+
const repoDescriptors = [...repoDescriptorsByProject.values()].filter(r => r != null).flat();
|
|
579
|
+
const requestedRepos = repos?.map(getAzureRepositoryIdentity);
|
|
580
|
+
const repoInputs = requestedRepos == null
|
|
581
|
+
? undefined
|
|
582
|
+
: repoDescriptors.filter(r => requestedRepos.some(repo => repo.resourceName === r.resourceName &&
|
|
583
|
+
repo.repositoryName === r.name &&
|
|
584
|
+
(repo.projectName == null || repo.projectName === r.projectName)));
|
|
585
|
+
if (repoInputs?.length === 0)
|
|
586
|
+
return [];
|
|
587
|
+
const api = await this.getProvidersApi();
|
|
588
|
+
const { tokenWithInfo, options: apiOptions } = this.getApiOptions(session);
|
|
589
|
+
const states = toProviderPullRequestStates(options?.include);
|
|
590
|
+
const searchScopes = repoInputs != null
|
|
591
|
+
? repoInputs.flatMap(repo => repo.projectName == null
|
|
592
|
+
? []
|
|
593
|
+
: [
|
|
594
|
+
{
|
|
595
|
+
project: { namespace: repo.resourceName, project: repo.projectName },
|
|
596
|
+
repo: {
|
|
597
|
+
id: repo.id,
|
|
598
|
+
name: repo.name,
|
|
599
|
+
namespace: repo.resourceName,
|
|
600
|
+
project: repo.projectName,
|
|
601
|
+
},
|
|
602
|
+
},
|
|
603
|
+
])
|
|
604
|
+
: projects.map(project => ({
|
|
605
|
+
project: { namespace: project.resourceName, project: project.name },
|
|
606
|
+
}));
|
|
607
|
+
const providerPullRequests = await flatSettledOrThrow(searchScopes.map(async (scope) => {
|
|
608
|
+
const values = [];
|
|
609
|
+
let page;
|
|
610
|
+
for (let i = 0; i < 20; i++) {
|
|
611
|
+
if (cancellation?.aborted)
|
|
612
|
+
throw new CancellationError();
|
|
613
|
+
const result = await api.getPullRequestsForAzureProject(tokenWithInfo, scope.project, {
|
|
614
|
+
...apiOptions,
|
|
615
|
+
page: page,
|
|
616
|
+
repo: scope.repo,
|
|
617
|
+
states: states,
|
|
618
|
+
});
|
|
619
|
+
if (result == null)
|
|
620
|
+
break;
|
|
621
|
+
values.push(...result.data);
|
|
622
|
+
if (!result.hasMore || result.nextPage == null)
|
|
623
|
+
break;
|
|
624
|
+
page = result.nextPage;
|
|
625
|
+
}
|
|
626
|
+
return values;
|
|
255
627
|
}));
|
|
256
|
-
|
|
257
|
-
|
|
628
|
+
if (cancellation?.aborted)
|
|
629
|
+
throw new CancellationError();
|
|
630
|
+
return [...new Map(providerPullRequests.map(pr => [pr.url ?? `${pr.repository.id}:${pr.id}`, pr])).values()]
|
|
631
|
+
.filter(pr => providerPullRequestMatchesSearch(pr, searchQuery))
|
|
632
|
+
.map(pr => this.fromAzureProviderPullRequest(pr, repoDescriptors, projects));
|
|
633
|
+
}
|
|
634
|
+
async searchProviderMyIssues(session, repos) {
|
|
635
|
+
return (await this.searchProviderMyIssuesWithTruncation(session, repos))?.values;
|
|
636
|
+
}
|
|
637
|
+
/**
|
|
638
|
+
* Account-wide "my issues" for Azure = the user's authored + assigned work items across every project of
|
|
639
|
+
* every org. Azure's issue read is numbered-page, so each (project × filter) read is drained to exhaustion
|
|
640
|
+
* (bounded by a defensive per-read backstop). Unlike a silent `flatSettled`, a project read that was
|
|
641
|
+
* truncated by the backstop or rejected outright is recorded as `truncated`, so the facade reports an
|
|
642
|
+
* incomplete read instead of publishing a partial list as complete.
|
|
643
|
+
*
|
|
644
|
+
* `searchOptions.org`/`.project` narrow the fan-out server-side (each drain is already a per-project read,
|
|
645
|
+
* so scoping just selects which projects to drain). Without this there was no way to ask for "work items in
|
|
646
|
+
* project P": a consumer had to filter the account-wide page client-side, which desynchronizes the filtered
|
|
647
|
+
* `items` from the `hasMore`/`currentPage` of the pre-filter read — a project-less page reads as "no issues"
|
|
648
|
+
* while `hasMore` is still true.
|
|
649
|
+
*/
|
|
650
|
+
async searchProviderMyIssuesWithTruncation(session, _resources, _cancellation, searchOptions) {
|
|
651
|
+
const api = await this.getProvidersApi();
|
|
652
|
+
const user = await this.getProviderCurrentAccount(session);
|
|
653
|
+
if (user?.username == null)
|
|
654
|
+
return undefined;
|
|
655
|
+
const allOrgs = await this.getProviderResourcesForUser(session);
|
|
656
|
+
if (allOrgs == null)
|
|
657
|
+
return undefined;
|
|
658
|
+
if (allOrgs.length === 0)
|
|
659
|
+
return { values: [], truncated: false };
|
|
660
|
+
// Scope by org first so project discovery only fans out over the requested account. An org filter that
|
|
661
|
+
// matches nothing is an empty-but-successful read, not an unsupported one: returning `undefined` here
|
|
662
|
+
// would be reported as "account-wide issue search is not supported by this provider".
|
|
663
|
+
const orgs = searchOptions?.org != null ? allOrgs.filter(o => azureResourceMatches(o, searchOptions.org)) : allOrgs;
|
|
664
|
+
if (orgs.length === 0)
|
|
665
|
+
return { values: [], truncated: false };
|
|
666
|
+
// Structured per-scope failures from BOTH project discovery (a whole org dropped) and the per-project
|
|
667
|
+
// issue drains, so the facade warns on the failed scope + sets `fetchFailed` instead of narrowing silently.
|
|
668
|
+
const failures = [];
|
|
669
|
+
const discovered = await this.getProviderProjectsForResources(session, orgs, false, failures);
|
|
670
|
+
const projects = searchOptions?.project != null
|
|
671
|
+
? {
|
|
672
|
+
...discovered,
|
|
673
|
+
values: discovered.values.filter(p => azureResourceMatches(p, searchOptions.project)),
|
|
674
|
+
}
|
|
675
|
+
: discovered;
|
|
676
|
+
if (projects.values.length === 0) {
|
|
677
|
+
// An explicitly-scoped read that found no matching project is an empty SUCCESS: `undefined` here is
|
|
678
|
+
// reported as "account-wide issue search is not supported by this provider", which would send the
|
|
679
|
+
// consumer down a repo-scoped fallback for what is simply an empty scope. Only an incomplete discovery
|
|
680
|
+
// (which may itself have dropped the requested project) is truncated, and its metadata is forwarded so
|
|
681
|
+
// the facade still warns on the failed scope.
|
|
682
|
+
return projects.metadata != null
|
|
683
|
+
? {
|
|
684
|
+
values: [],
|
|
685
|
+
truncated: projects.metadata.completeness !== 'complete',
|
|
686
|
+
metadata: projects.metadata,
|
|
687
|
+
}
|
|
688
|
+
: { values: [], truncated: false };
|
|
689
|
+
}
|
|
690
|
+
const { tokenWithInfo, options } = this.getApiOptions(session);
|
|
691
|
+
// Drain one (project × filter) read fully, threading the provider's paging cursor. The scope is passed so
|
|
692
|
+
// a page-level failure preserves the already-drained prefix and records a structured failure instead of
|
|
693
|
+
// re-throwing.
|
|
694
|
+
const drain = async (p, filter) => {
|
|
695
|
+
const result = await collectProviderPagedResult(cursor => api.getIssuesForAzureProject(tokenWithInfo, p.resourceName, p.name, {
|
|
258
696
|
...options,
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
697
|
+
...filter,
|
|
698
|
+
cursor: cursor,
|
|
699
|
+
}), 20, { providerId: this.id, resourceId: p.resourceId, projectId: p.name });
|
|
700
|
+
return {
|
|
701
|
+
issues: result.values.map(i => fromProviderIssue(i, this, { project: p })),
|
|
702
|
+
// Azure work-item ids are organization-scoped. Include both org and project so the
|
|
703
|
+
// assigned/authored passes dedupe the same item without collapsing another org's item.
|
|
704
|
+
projectKey: `${p.resourceId}:${p.id}`,
|
|
705
|
+
truncated: result.truncated ?? false,
|
|
706
|
+
metadata: result.metadata,
|
|
707
|
+
};
|
|
708
|
+
};
|
|
709
|
+
// `includeAllAssignees` broadens to every issue in each project (any assignee, any author), so a single
|
|
710
|
+
// unfiltered drain per project replaces the assigned+authored pair — an unfiltered assignee drain already
|
|
711
|
+
// subsumes the authored one.
|
|
712
|
+
//
|
|
713
|
+
// `filters` narrows the other way: unfiltered, "my issues" here is assigned ∪ authored, which is wider than
|
|
714
|
+
// `assignee:@me`. Selecting the drains is the only correct place to narrow — dropping authored-only items
|
|
715
|
+
// from the returned page would leave them counted in the per-project paging that produced it.
|
|
716
|
+
const filters = searchOptions?.filters;
|
|
717
|
+
const wantAssigned = !filters?.length || filters.includes(IssueFilter.Assignee);
|
|
718
|
+
const wantAuthored = !filters?.length || filters.includes(IssueFilter.Author);
|
|
719
|
+
const outcomes = await Promise.all(projects.values.flatMap(p => {
|
|
720
|
+
if (searchOptions?.includeAllAssignees)
|
|
721
|
+
return [drain(p, {})];
|
|
722
|
+
const drains = [];
|
|
723
|
+
if (wantAssigned) {
|
|
724
|
+
drains.push(drain(p, { assigneeLogins: [user.username] }));
|
|
725
|
+
}
|
|
726
|
+
if (wantAuthored) {
|
|
727
|
+
drains.push(drain(p, { authorLogin: user.username }));
|
|
728
|
+
}
|
|
729
|
+
return drains;
|
|
262
730
|
}));
|
|
263
|
-
// TODO: Add mentioned issues
|
|
264
731
|
const issuesById = new Map();
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
732
|
+
let truncated = projects.metadata != null && projects.metadata.completeness !== 'complete';
|
|
733
|
+
let drainMetadata;
|
|
734
|
+
for (const outcome of outcomes) {
|
|
735
|
+
if (outcome.truncated) {
|
|
736
|
+
truncated = true;
|
|
737
|
+
}
|
|
738
|
+
if (outcome.metadata != null) {
|
|
739
|
+
drainMetadata = mergeCollectionMetadata(drainMetadata, outcome.metadata);
|
|
740
|
+
}
|
|
741
|
+
for (const issue of outcome.issues) {
|
|
742
|
+
const key = `${outcome.projectKey}:${issue.nodeId ?? issue.id}`;
|
|
743
|
+
if (!issuesById.has(key)) {
|
|
744
|
+
issuesById.set(key, issue);
|
|
745
|
+
}
|
|
272
746
|
}
|
|
273
747
|
}
|
|
274
|
-
|
|
748
|
+
const metadata = mergeCollectionMetadata(failures.length > 0 ? { completeness: 'partial', failures: failures } : undefined, mergeCollectionMetadata(drainMetadata, projects.metadata));
|
|
749
|
+
return { values: [...issuesById.values()], truncated: truncated, metadata: metadata };
|
|
275
750
|
}
|
|
276
751
|
async providerOnConnect() {
|
|
277
752
|
if (this._session == null)
|
|
278
753
|
return;
|
|
754
|
+
const canHydrateStoredProjects = (metadata) => metadata == null || metadata.completeness === 'complete';
|
|
279
755
|
const storedAccount = this.ctx.storage.get(`azure:${this._session.accessToken}:account`);
|
|
280
756
|
const storedOrganizations = this.ctx.storage.get(`azure:${this._session.accessToken}:organizations`);
|
|
281
757
|
const storedProjects = this.ctx.storage.get(`azure:${this._session.accessToken}:projects`);
|
|
282
758
|
let account = storedAccount?.data ? { ...storedAccount.data, provider: this } : undefined;
|
|
283
759
|
let organizations = storedOrganizations?.data?.map((o) => ({ ...o }));
|
|
284
|
-
|
|
760
|
+
const storedProjectsData = storedProjects?.data;
|
|
761
|
+
let projects;
|
|
762
|
+
if (!Array.isArray(storedProjectsData) && Array.isArray(storedProjectsData?.values)) {
|
|
763
|
+
const hydrated = {
|
|
764
|
+
values: storedProjectsData.values.map((p) => ({ ...p })),
|
|
765
|
+
...(storedProjectsData.metadata != null ? { metadata: storedProjectsData.metadata } : {}),
|
|
766
|
+
};
|
|
767
|
+
if (canHydrateStoredProjects(hydrated.metadata)) {
|
|
768
|
+
projects = hydrated;
|
|
769
|
+
}
|
|
770
|
+
}
|
|
285
771
|
if (storedAccount == null) {
|
|
286
772
|
account = await this.getProviderCurrentAccount(this._session);
|
|
287
773
|
if (account != null) {
|
|
@@ -312,23 +798,30 @@ export class AzureDevOpsIntegrationBase extends GitHostIntegration {
|
|
|
312
798
|
}
|
|
313
799
|
this._organizations ??= new Map();
|
|
314
800
|
this._organizations.set(this._session.accessToken, organizations);
|
|
315
|
-
if (
|
|
801
|
+
if (projects == null && organizations?.length) {
|
|
316
802
|
projects = await this.getProviderProjectsForResources(this._session, organizations);
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
803
|
+
if (projects != null && canHydrateStoredProjects(projects.metadata)) {
|
|
804
|
+
await this.ctx.storage.store(`azure:${this._session.accessToken}:projects`, {
|
|
805
|
+
v: 2,
|
|
806
|
+
timestamp: Date.now(),
|
|
807
|
+
data: projects,
|
|
808
|
+
});
|
|
809
|
+
}
|
|
810
|
+
else {
|
|
811
|
+
await this.ctx.storage.delete(`azure:${this._session.accessToken}:projects`);
|
|
812
|
+
}
|
|
322
813
|
}
|
|
323
814
|
this._projects ??= new Map();
|
|
324
|
-
|
|
325
|
-
const
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
projects.
|
|
815
|
+
if (projects != null && canHydrateStoredProjects(projects.metadata)) {
|
|
816
|
+
for (const project of projects.values) {
|
|
817
|
+
const projectKey = `${this._session.accessToken}:${project.resourceId}`;
|
|
818
|
+
const projects = this._projects.get(projectKey);
|
|
819
|
+
if (projects == null) {
|
|
820
|
+
this._projects.set(projectKey, [project]);
|
|
821
|
+
}
|
|
822
|
+
else if (!projects.some(p => p.id === project.id)) {
|
|
823
|
+
projects.push(project);
|
|
824
|
+
}
|
|
332
825
|
}
|
|
333
826
|
}
|
|
334
827
|
}
|
|
@@ -338,9 +831,9 @@ export class AzureDevOpsIntegrationBase extends GitHostIntegration {
|
|
|
338
831
|
this._accounts = undefined;
|
|
339
832
|
}
|
|
340
833
|
fromAzureProviderPullRequest(azurePullRequest, repoDescriptors, projectDescriptors) {
|
|
341
|
-
const baseRepoDescriptor = repoDescriptors.find(r => r.
|
|
834
|
+
const baseRepoDescriptor = repoDescriptors.find(r => r.id === azurePullRequest.repository.id);
|
|
342
835
|
const headRepoDescriptor = azurePullRequest.headRepository != null
|
|
343
|
-
? repoDescriptors.find(r => r.
|
|
836
|
+
? repoDescriptors.find(r => r.id === azurePullRequest.headRepository.id)
|
|
344
837
|
: undefined;
|
|
345
838
|
let project;
|
|
346
839
|
if (baseRepoDescriptor != null) {
|
|
@@ -366,7 +859,7 @@ export class AzureDevOpsIntegrationBase extends GitHostIntegration {
|
|
|
366
859
|
};
|
|
367
860
|
}
|
|
368
861
|
if (baseRepoDescriptor?.projectName != null) {
|
|
369
|
-
project = projectDescriptors.find(p => p.name === baseRepoDescriptor.projectName);
|
|
862
|
+
project = projectDescriptors.find(p => p.resourceName === baseRepoDescriptor.resourceName && p.name === baseRepoDescriptor.projectName);
|
|
370
863
|
}
|
|
371
864
|
return fromProviderPullRequest(azurePullRequest, this, { project: project });
|
|
372
865
|
}
|