@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
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { PullRequestShape, PullRequestStateFilter } from '../../../git/models/pullRequest.js';
|
|
2
|
+
import type { IntegrationIds } from '../constants.js';
|
|
3
|
+
import type { ProviderReposInput, PullRequestFilter } from '../providers/models.js';
|
|
4
|
+
import type { ProviderPagedResult } from '../results.js';
|
|
5
|
+
import type { ProviderReadContext } from './context.js';
|
|
6
|
+
export declare function listPullRequestsPage(ctx: ProviderReadContext, options: {
|
|
7
|
+
providerId: IntegrationIds;
|
|
8
|
+
repos?: ProviderReposInput;
|
|
9
|
+
states?: PullRequestStateFilter[];
|
|
10
|
+
/**
|
|
11
|
+
* PR relationship filters (e.g. `[Author, Assignee, ReviewRequested]`). On repo-scoped reads members
|
|
12
|
+
* combine as provider query constraints (normally an intersection); on account-wide reads they form an
|
|
13
|
+
* exact OR union. The whole set is validated against the selected path's capability.
|
|
14
|
+
*/
|
|
15
|
+
filters?: PullRequestFilter[];
|
|
16
|
+
/**
|
|
17
|
+
* Account-wide only: include review-requested PRs when the provider's native "my PRs" query omits them.
|
|
18
|
+
* This extends the provider-native result; it is not a narrowing filter.
|
|
19
|
+
*/
|
|
20
|
+
includeReviewRequested?: boolean;
|
|
21
|
+
page?: number;
|
|
22
|
+
cursor?: string;
|
|
23
|
+
itemsPerPage?: number;
|
|
24
|
+
forceSync?: boolean;
|
|
25
|
+
connectionId?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Explicit self-managed host domain when no configured connection supplies one. The value must come
|
|
28
|
+
* from the trusted authentication configuration, not repository or remote data.
|
|
29
|
+
*/
|
|
30
|
+
domain?: string;
|
|
31
|
+
}): Promise<ProviderPagedResult<PullRequestShape>>;
|
|
32
|
+
//# sourceMappingURL=pullRequests.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pullRequests.d.ts","sourceRoot":"","sources":["../../../../src/plus/integrations/reads/pullRequests.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAEnG,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,KAAK,EAAuB,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAEzG,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAMzD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAmBxD,wBAAsB,oBAAoB,CACzC,GAAG,EAAE,mBAAmB,EACxB,OAAO,EAAE;IACR,UAAU,EAAE,cAAc,CAAC;IAC3B,KAAK,CAAC,EAAE,kBAAkB,CAAC;IAC3B,MAAM,CAAC,EAAE,sBAAsB,EAAE,CAAC;IAClC;;;;OAIG;IACH,OAAO,CAAC,EAAE,iBAAiB,EAAE,CAAC;IAC9B;;;OAGG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CAChB,GACC,OAAO,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,CAAC,CAyMhD"}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { mergeAssessmentInto } from '../collectionMetadata.js';
|
|
2
|
+
import { fromProviderPullRequest, PagingMode, providersMetadata } from '../providers/models.js';
|
|
3
|
+
import { isGitHostIntegration, isIssuesHostIntegrationId, warnOnMissingSessionForDomain, } from '../utils/integration.utils.js';
|
|
4
|
+
import { getCurrentAccountId, runCaptured } from './drains.js';
|
|
5
|
+
import { resolveAccountWidePullRequestFilters, resolvePullRequestFilters } from './filters.js';
|
|
6
|
+
import { drainToRequestedPage, isPageNumberAdvanceable, pageToCursor, refusedPage, resolveContinuation, resolveCurrentPage, toProviderPageInfo, } from './paging.js';
|
|
7
|
+
import { gitHostOnlySurfaceWarning, truncationWarning, unsupportedAccountWidePullRequestFiltersWarning, unsupportedFiltersWarning, } from './warnings.js';
|
|
8
|
+
export async function listPullRequestsPage(ctx, options) {
|
|
9
|
+
const page = Math.max(1, options.page ?? 1);
|
|
10
|
+
if (isIssuesHostIntegrationId(options.providerId)) {
|
|
11
|
+
return refusedPage(page, [gitHostOnlySurfaceWarning(options.providerId, undefined, options.connectionId, 'pull request reads')], true);
|
|
12
|
+
}
|
|
13
|
+
const integration = await ctx.getIntegrationForRead(options.providerId, options.connectionId, options.domain);
|
|
14
|
+
if (integration == null) {
|
|
15
|
+
// A supplied connection or domain that no longer resolves is a broken target, not an empty account —
|
|
16
|
+
// surface a no-connection warning + fetchFailed rather than a silent empty page.
|
|
17
|
+
const early = ctx.earlyReturnConnectionWarnings(options.providerId, options.connectionId, options.domain);
|
|
18
|
+
return refusedPage(page, early.warnings, early.fetchFailed);
|
|
19
|
+
}
|
|
20
|
+
if (!isGitHostIntegration(integration)) {
|
|
21
|
+
return refusedPage(page, [gitHostOnlySurfaceWarning(options.providerId, undefined, options.connectionId, 'pull request reads')], true);
|
|
22
|
+
}
|
|
23
|
+
await ctx.forceRefreshIfRequested(integration, options.forceSync, options.connectionId);
|
|
24
|
+
const domain = ctx.domainForRead(integration, options.providerId, options.connectionId, options.domain);
|
|
25
|
+
// With no repos this is an account-wide "my PRs" read; the repo-scoped core rejects an empty `repos`
|
|
26
|
+
// input, so route to the account-wide, inherently user-scoped core instead (see drainPullRequests).
|
|
27
|
+
// That provider-defined path takes no `pageSize`. A page-only request is handled by walking any opaque
|
|
28
|
+
// continuations it supplies below. Do NOT synthesize a page-number cursor for it: cursor-based queries
|
|
29
|
+
// (e.g. GitHub `involves:`) ignore a page number and would return their first page.
|
|
30
|
+
const accountWide = (options.repos?.length ?? 0) === 0;
|
|
31
|
+
const cursor = accountWide ? options.cursor : (options.cursor ?? pageToCursor(page));
|
|
32
|
+
const resolvedFilters = accountWide
|
|
33
|
+
? resolveAccountWidePullRequestFilters(options.providerId, options.filters)
|
|
34
|
+
: resolvePullRequestFilters(options.providerId, options.filters);
|
|
35
|
+
if (resolvedFilters.unsupported) {
|
|
36
|
+
return refusedPage(page, [
|
|
37
|
+
accountWide
|
|
38
|
+
? unsupportedAccountWidePullRequestFiltersWarning(options.providerId, domain, options.connectionId, options.filters ?? [])
|
|
39
|
+
: unsupportedFiltersWarning(options.providerId, domain, options.connectionId),
|
|
40
|
+
], true);
|
|
41
|
+
}
|
|
42
|
+
const includeReviewRequested = accountWide ? (options.includeReviewRequested ?? false) : false;
|
|
43
|
+
const { value, warning } = await runCaptured(options.providerId, domain, options.connectionId, () => accountWide
|
|
44
|
+
? integration.getMyPullRequestsForUserResult({
|
|
45
|
+
state: options.states,
|
|
46
|
+
cursor: cursor,
|
|
47
|
+
includeReviewRequested: includeReviewRequested,
|
|
48
|
+
filters: resolvedFilters.filters,
|
|
49
|
+
summary: true,
|
|
50
|
+
}, options.connectionId)
|
|
51
|
+
: integration.getMyPullRequestsForReposResult(options.repos ?? [],
|
|
52
|
+
// Forward `page`/`pageSize` alongside the cursor so PagingMode.Repo hosts (GitLab, Bitbucket,
|
|
53
|
+
// Azure), whose per-repo cursor path ignores a synthesized page-number cursor, still honor the
|
|
54
|
+
// requested page and page size instead of always returning page 1. `filters` scopes the read to
|
|
55
|
+
// the current user (the core resolves the account for these), so it returns the user's PRs.
|
|
56
|
+
{
|
|
57
|
+
state: options.states,
|
|
58
|
+
filters: resolvedFilters.filters,
|
|
59
|
+
cursor: cursor,
|
|
60
|
+
page: options.page,
|
|
61
|
+
pageSize: options.itemsPerPage,
|
|
62
|
+
}, options.connectionId), {
|
|
63
|
+
warnOnMissingSession: warnOnMissingSessionForDomain(options.providerId, options.domain),
|
|
64
|
+
});
|
|
65
|
+
let items = value?.values ?? [];
|
|
66
|
+
// Cursor-only account-wide reads start at page 1; a page-only request is advanced through opaque
|
|
67
|
+
// continuations below. Repo-scoped reads report the requested page unless the provider reports its own.
|
|
68
|
+
let paged = toProviderPageInfo(items.length, value?.paging);
|
|
69
|
+
let allMetadata = value?.metadata;
|
|
70
|
+
// Convert the SDK collection metadata into scope-aware warnings + failure/truncation flags, appending
|
|
71
|
+
// them to any captured thrown-error warning without discarding the partial result's items.
|
|
72
|
+
const warnings = warning != null ? [warning] : [];
|
|
73
|
+
let pageFetchFailed = warning != null && value == null;
|
|
74
|
+
// Cursor-only reads ignore a synthesized page-number cursor, so a page-only request is advanced through
|
|
75
|
+
// the provider's own continuations (see drainToRequestedPage).
|
|
76
|
+
if ((accountWide || providersMetadata[options.providerId]?.pullRequestsPagingMode === PagingMode.Repos) &&
|
|
77
|
+
options.page != null &&
|
|
78
|
+
options.page > 1 &&
|
|
79
|
+
options.cursor == null &&
|
|
80
|
+
paged.page.currentPage === 1) {
|
|
81
|
+
const drained = await drainToRequestedPage({ items: items, paged: paged, metadata: allMetadata, fetchFailed: pageFetchFailed }, {
|
|
82
|
+
requestedPage: options.page,
|
|
83
|
+
itemsPerPage: options.itemsPerPage,
|
|
84
|
+
warnings: warnings,
|
|
85
|
+
readPage: (cursor) => runCaptured(options.providerId, domain, options.connectionId, () => accountWide
|
|
86
|
+
? integration.getMyPullRequestsForUserResult({
|
|
87
|
+
state: options.states,
|
|
88
|
+
cursor: cursor,
|
|
89
|
+
includeReviewRequested: includeReviewRequested,
|
|
90
|
+
filters: resolvedFilters.filters,
|
|
91
|
+
summary: true,
|
|
92
|
+
}, options.connectionId)
|
|
93
|
+
: integration.getMyPullRequestsForReposResult(options.repos ?? [], {
|
|
94
|
+
state: options.states,
|
|
95
|
+
filters: resolvedFilters.filters,
|
|
96
|
+
cursor: cursor,
|
|
97
|
+
pageSize: options.itemsPerPage,
|
|
98
|
+
}, options.connectionId), {
|
|
99
|
+
warnOnMissingSession: warnOnMissingSessionForDomain(options.providerId, options.domain),
|
|
100
|
+
}),
|
|
101
|
+
});
|
|
102
|
+
items = drained.items;
|
|
103
|
+
paged = drained.paged;
|
|
104
|
+
allMetadata = drained.metadata;
|
|
105
|
+
pageFetchFailed = drained.fetchFailed;
|
|
106
|
+
}
|
|
107
|
+
const assessment = mergeAssessmentInto(warnings, options.providerId, domain, options.connectionId, allMetadata);
|
|
108
|
+
// Never advertise `hasMore` without a continuation the caller can act on. The account-wide read has no
|
|
109
|
+
// page to synthesize, and neither does a host that doesn't honor a page number — see
|
|
110
|
+
// {@link IntegrationService.isPageNumberAdvanceable} for which do and why absence of a declared mode
|
|
111
|
+
// does NOT count as one.
|
|
112
|
+
const pageAdvanceable = !accountWide && isPageNumberAdvanceable(providersMetadata[options.providerId]?.pullRequestsPagingMode);
|
|
113
|
+
const continuation = resolveContinuation(paged, pageAdvanceable ? paged.page.currentPage + 1 : undefined);
|
|
114
|
+
// A single-page provider read that couldn't confirm completeness sets `paging.truncated`; surface it
|
|
115
|
+
// as a terminal `page.truncated` (not `hasMore`, which has no cursor to advance) so the caller knows
|
|
116
|
+
// the page may be incomplete. Metadata incompleteness is an independent source of the same signal.
|
|
117
|
+
const truncated = continuation.truncated || assessment.truncated;
|
|
118
|
+
if (truncated && warnings.length === 0) {
|
|
119
|
+
warnings.push(truncationWarning(options.providerId, domain, options.connectionId, 'Pull request'));
|
|
120
|
+
}
|
|
121
|
+
const currentAccountId = items.some(pr => pr.author != null)
|
|
122
|
+
? await getCurrentAccountId(integration, options.connectionId)
|
|
123
|
+
: undefined;
|
|
124
|
+
return {
|
|
125
|
+
// Normalize the raw provider-apis PRs to the GitLens-owned shape at the surface boundary.
|
|
126
|
+
items: items.map(pr => fromProviderPullRequest(pr, integration, { currentAccountId: currentAccountId })),
|
|
127
|
+
warnings: warnings,
|
|
128
|
+
// The account-wide read can't take a page size, so don't echo the requested `itemsPerPage` as if it
|
|
129
|
+
// had been applied — report what came back.
|
|
130
|
+
page: {
|
|
131
|
+
...paged.page,
|
|
132
|
+
// Positional, per ProviderPageInfo.currentPage: the drain (above) already advanced `paged.page`,
|
|
133
|
+
// and a caller-threaded cursor advanced the provider, so neither leaves a cursor-only read stuck
|
|
134
|
+
// reporting page 1.
|
|
135
|
+
currentPage: resolveCurrentPage({
|
|
136
|
+
providerPage: paged.page.currentPage,
|
|
137
|
+
requestedPage: page,
|
|
138
|
+
suppliedCursor: options.cursor,
|
|
139
|
+
pageAdvanceable: pageAdvanceable,
|
|
140
|
+
}),
|
|
141
|
+
itemsPerPage: accountWide ? items.length : paged.page.itemsPerPage,
|
|
142
|
+
truncated: truncated || undefined,
|
|
143
|
+
},
|
|
144
|
+
hasMore: continuation.hasMore,
|
|
145
|
+
cursor: continuation.cursor,
|
|
146
|
+
// A metadata failure means items are incomplete even when the read didn't throw; a thrown error with
|
|
147
|
+
// no recovered value is the pre-existing failure case.
|
|
148
|
+
fetchFailed: assessment.fetchFailed || pageFetchFailed || undefined,
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
//# sourceMappingURL=pullRequests.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pullRequests.js","sourceRoot":"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B,MAAM,EAAE,YAAY,CAAC,MAAM;QAC3B,qGAAqG;QACrG,uDAAuD;QACvD,WAAW,EAAE,UAAU,CAAC,WAAW,IAAI,eAAe,IAAI,SAAS;KACnE,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { IntegrationIds } from '../constants.js';
|
|
2
|
+
import type { ResolveRepositoryResult } from '../results.js';
|
|
3
|
+
import type { RepositoryResolutionContext } from './context.js';
|
|
4
|
+
/**
|
|
5
|
+
* Resolution of a remote URL to a provider repository identity — the facade's equivalent of `gk repo resolve`.
|
|
6
|
+
*
|
|
7
|
+
* Unlike every other read here, this one's input is REPOSITORY data, so most of the code below is about not
|
|
8
|
+
* letting that data choose the credentials: an explicit cloud `providerId` must agree with the remote's canonical
|
|
9
|
+
* host, and a self-managed host resolves only against a domain the user already authenticated. The
|
|
10
|
+
* `host-mismatch` returns are those guards, not edge cases — resolving `owner/repo` against the wrong account
|
|
11
|
+
* would hand back a confidently wrong identity and seed the domain-keyed instance cache from remote data.
|
|
12
|
+
*/
|
|
13
|
+
export declare function resolveRepository(ctx: RepositoryResolutionContext, options: {
|
|
14
|
+
providerId?: IntegrationIds;
|
|
15
|
+
remoteUrl: string;
|
|
16
|
+
host?: string;
|
|
17
|
+
connectionId?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Explicit self-managed host domain used to select the integration instance. Used only when the requested
|
|
20
|
+
* connection has no configured domain; it must come from the trusted authentication configuration, not
|
|
21
|
+
* repository or remote data.
|
|
22
|
+
*/
|
|
23
|
+
domain?: string;
|
|
24
|
+
}): Promise<ResolveRepositoryResult>;
|
|
25
|
+
//# sourceMappingURL=resolveRepository.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveRepository.d.ts","sourceRoot":"","sources":["../../../../src/plus/integrations/reads/resolveRepository.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAKtD,OAAO,KAAK,EAA4C,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAUvG,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,cAAc,CAAC;AAGhE;;;;;;;;GAQG;AACH,wBAAsB,iBAAiB,CACtC,GAAG,EAAE,2BAA2B,EAChC,OAAO,EAAE;IACR,UAAU,CAAC,EAAE,cAAc,CAAC;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CAChB,GACC,OAAO,CAAC,uBAAuB,CAAC,CA8KlC"}
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
import { createRemoteProviderMatcher } from '../../../git/remotes/matcher.js';
|
|
2
|
+
import { parseGitRemoteUrl } from '../../../git/utils/remote.utils.js';
|
|
3
|
+
import { GitCloudHostIntegrationId, GitSelfManagedHostIntegrationId } from '../constants.js';
|
|
4
|
+
import { AuthenticationError, RequestNotFoundError } from '../errors.js';
|
|
5
|
+
import { isIssuesIntegration } from '../models/issuesIntegration.js';
|
|
6
|
+
import { isAzureCloudDomain, isBitbucketCloudDomain, isGitHubDotCom, isGitLabDotCom } from '../providers/models.js';
|
|
7
|
+
import { toProviderWarning } from '../results.js';
|
|
8
|
+
import { hostFromDomain } from '../utils/domain.utils.js';
|
|
9
|
+
import { getIntegrationIdForRemote, isGitCloudHostIntegrationId, isGitSelfManagedHostIntegrationId, remoteProviderTypeForConfig, remoteProviderTypeForIntegration, } from '../utils/integration.utils.js';
|
|
10
|
+
import { noConnectionWarning } from './warnings.js';
|
|
11
|
+
/**
|
|
12
|
+
* Resolution of a remote URL to a provider repository identity — the facade's equivalent of `gk repo resolve`.
|
|
13
|
+
*
|
|
14
|
+
* Unlike every other read here, this one's input is REPOSITORY data, so most of the code below is about not
|
|
15
|
+
* letting that data choose the credentials: an explicit cloud `providerId` must agree with the remote's canonical
|
|
16
|
+
* host, and a self-managed host resolves only against a domain the user already authenticated. The
|
|
17
|
+
* `host-mismatch` returns are those guards, not edge cases — resolving `owner/repo` against the wrong account
|
|
18
|
+
* would hand back a confidently wrong identity and seed the domain-keyed instance cache from remote data.
|
|
19
|
+
*/
|
|
20
|
+
export async function resolveRepository(ctx, options) {
|
|
21
|
+
const result = (status) => ({
|
|
22
|
+
resolution: { status: status },
|
|
23
|
+
});
|
|
24
|
+
const [scheme, parsedDomain, path] = parseGitRemoteUrl(options.remoteUrl);
|
|
25
|
+
const parsedHost = hostFromDomain(parsedDomain);
|
|
26
|
+
const explicitHost = hostFromDomain(options.host);
|
|
27
|
+
if (parsedHost != null && explicitHost != null && parsedHost !== explicitHost) {
|
|
28
|
+
return result('host-mismatch');
|
|
29
|
+
}
|
|
30
|
+
const matcherDomain = parsedDomain || options.host || '';
|
|
31
|
+
// An explicit cloud provider must agree with the remote's canonical cloud host. Without this guard the
|
|
32
|
+
// synthetic matcher below can reinterpret, for example, a gitlab.com URL as GitHub and then resolve a
|
|
33
|
+
// homonymous owner/repo through the wrong account. Match once without caller configs/synthetic entries;
|
|
34
|
+
// Azure's matcher also normalizes ssh.dev.azure.com and vs-ssh.visualstudio.com to their web host.
|
|
35
|
+
if (options.providerId != null && isGitCloudHostIntegrationId(options.providerId)) {
|
|
36
|
+
const nativeProvider = createRemoteProviderMatcher([])(options.remoteUrl, matcherDomain, path, scheme);
|
|
37
|
+
const nativeId = nativeProvider != null ? getIntegrationIdForRemote(nativeProvider) : undefined;
|
|
38
|
+
const nativeDomain = nativeProvider?.domain ?? matcherDomain;
|
|
39
|
+
const canonicalHost = options.providerId === GitCloudHostIntegrationId.GitHub
|
|
40
|
+
? isGitHubDotCom(nativeDomain)
|
|
41
|
+
: options.providerId === GitCloudHostIntegrationId.GitLab
|
|
42
|
+
? isGitLabDotCom(nativeDomain)
|
|
43
|
+
: options.providerId === GitCloudHostIntegrationId.Bitbucket
|
|
44
|
+
? isBitbucketCloudDomain(nativeDomain)
|
|
45
|
+
: isAzureCloudDomain(nativeDomain);
|
|
46
|
+
if (nativeId !== options.providerId || !canonicalHost)
|
|
47
|
+
return result('host-mismatch');
|
|
48
|
+
}
|
|
49
|
+
const provider = createRemoteProviderMatcher(buildMatcherConfigs(ctx, options, parsedDomain))(options.remoteUrl, matcherDomain, path, scheme);
|
|
50
|
+
if (provider == null)
|
|
51
|
+
return result('invalid-remote-url');
|
|
52
|
+
let id = options.providerId ?? getIntegrationIdForRemote(provider);
|
|
53
|
+
// Custom Azure DevOps Server domains matched via getRemoteConfigs return undefined from
|
|
54
|
+
// getIntegrationIdForRemote because the provider is marked custom; map them to the server id so the
|
|
55
|
+
// project-scoped lookup uses that host's configured connection and API base URL.
|
|
56
|
+
if (id == null && provider.id === 'azure-devops' && provider.custom) {
|
|
57
|
+
id = GitSelfManagedHostIntegrationId.AzureDevOpsServer;
|
|
58
|
+
}
|
|
59
|
+
if (id == null)
|
|
60
|
+
return result('unsupported-provider');
|
|
61
|
+
const owner = provider.owner;
|
|
62
|
+
const name = provider.repoName;
|
|
63
|
+
if (owner == null || name == null)
|
|
64
|
+
return result('invalid-remote-url');
|
|
65
|
+
// On a self-managed host, resolve only against a TRUSTED host: the pinned connection's configured
|
|
66
|
+
// domain, the explicit `domain`, or — when neither was supplied — a configured host matching the
|
|
67
|
+
// remote's. That last case keeps `remoteUrl` (repository-supplied) out of the trusted path: it selects
|
|
68
|
+
// among hosts the user already authenticated and can never introduce a new one. Resolving `owner/repo`
|
|
69
|
+
// against some other host's account would, if that host has the same owner/repo, return a confidently
|
|
70
|
+
// wrong identity — and would seed the domain-keyed integration cache (never evicted before dispose) with
|
|
71
|
+
// an entry derived from repository data.
|
|
72
|
+
const urlHost = hostFromDomain(provider.domain);
|
|
73
|
+
// Normalize BOTH sides before comparing: a stored connection domain is usually a full URL
|
|
74
|
+
// (`https://git.example.com`) while `urlHost` is already a bare host, so a raw compare would fail on
|
|
75
|
+
// scheme/trailing-slash alone and wrongly reject a correctly-configured connection.
|
|
76
|
+
let trustedHost = options.connectionId != null || options.domain != null
|
|
77
|
+
? hostFromDomain(ctx.resolveDomainForRead(id, options.connectionId, options.domain))
|
|
78
|
+
: undefined;
|
|
79
|
+
if (isGitSelfManagedHostIntegrationId(id)) {
|
|
80
|
+
const configuredHosts = ctx.getConfigured(id).map(c => hostFromDomain(c.domain));
|
|
81
|
+
if (trustedHost == null && urlHost != null) {
|
|
82
|
+
trustedHost = configuredHosts.find(host => host === urlHost);
|
|
83
|
+
}
|
|
84
|
+
// A configured host that doesn't match the remote's is a genuine mismatch. With nothing configured
|
|
85
|
+
// there is no host to mismatch against — it's simply not connected, so fall through to the
|
|
86
|
+
// `unauthorized` path below (still WITHOUT resolving by the URL domain, so repo data can't seed the
|
|
87
|
+
// cache).
|
|
88
|
+
if (trustedHost == null && configuredHosts.length !== 0)
|
|
89
|
+
return result('host-mismatch');
|
|
90
|
+
if (trustedHost != null && urlHost != null && trustedHost !== urlHost)
|
|
91
|
+
return result('host-mismatch');
|
|
92
|
+
}
|
|
93
|
+
let integration;
|
|
94
|
+
try {
|
|
95
|
+
// Resolve the instance through the trusted target (as `getIntegrationForRead` does):
|
|
96
|
+
// `resolveReadSession` looks the session up against the instance's domain-scoped descriptor, so
|
|
97
|
+
// selecting the instance by the URL domain could miss the session and degrade to `no-connection`.
|
|
98
|
+
integration = isGitSelfManagedHostIntegrationId(id)
|
|
99
|
+
? trustedHost != null
|
|
100
|
+
? await ctx.getIntegrationForRead(id, options.connectionId, trustedHost)
|
|
101
|
+
: undefined
|
|
102
|
+
: await ctx.getIntegrationForDomain(id, provider.domain);
|
|
103
|
+
}
|
|
104
|
+
catch {
|
|
105
|
+
integration = undefined;
|
|
106
|
+
}
|
|
107
|
+
if (integration == null) {
|
|
108
|
+
// Attach a warning, as the thrown-AuthenticationError branch below does: a consumer driving auth
|
|
109
|
+
// recovery off `warning.kind` would otherwise get nothing for an unresolvable target.
|
|
110
|
+
return {
|
|
111
|
+
resolution: {
|
|
112
|
+
status: 'unauthorized',
|
|
113
|
+
warning: noConnectionWarning(id, provider.domain, options.connectionId),
|
|
114
|
+
},
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
// Issue trackers have no `getRepo` client; a git host without `getRepoFn` leaves `getRepoInfo`
|
|
118
|
+
// undefined. Either way this provider can't resolve repositories.
|
|
119
|
+
if (isIssuesIntegration(integration) || integration.getRepoInfo == null) {
|
|
120
|
+
return result('unsupported-provider');
|
|
121
|
+
}
|
|
122
|
+
// Azure repos are org + project scoped; the remote provider exposes project as `providerDesc.repoDomain`.
|
|
123
|
+
const project = provider.id === 'azure-devops' ? provider.providerDesc?.repoDomain : undefined;
|
|
124
|
+
const domain = provider.domain;
|
|
125
|
+
// Azure's lookup is project-scoped and returns `undefined` without one, which the connection-gap branch
|
|
126
|
+
// below would misreport as `unauthorized` (driving a pointless reconnect). A remote URL that carries no
|
|
127
|
+
// project simply can't address an Azure repo.
|
|
128
|
+
if (provider.id === 'azure-devops' && project == null)
|
|
129
|
+
return result('invalid-remote-url');
|
|
130
|
+
try {
|
|
131
|
+
const repo = await integration.getRepoInfo({
|
|
132
|
+
owner: owner,
|
|
133
|
+
name: name,
|
|
134
|
+
project: project,
|
|
135
|
+
connectionId: options.connectionId,
|
|
136
|
+
});
|
|
137
|
+
if (repo == null) {
|
|
138
|
+
// `getRepoInfo` returns undefined only when no session could be resolved (not connected, or the
|
|
139
|
+
// requested connection is gone) — a real 404 throws below. So this is a connection gap. Attach a
|
|
140
|
+
// warning so a consumer driving auth recovery off `warning.kind` sees the same signal it gets from
|
|
141
|
+
// the thrown-AuthenticationError branch below; without it, the most common unauthorized case is
|
|
142
|
+
// silent.
|
|
143
|
+
return {
|
|
144
|
+
resolution: {
|
|
145
|
+
status: 'unauthorized',
|
|
146
|
+
warning: noConnectionWarning(id, domain, options.connectionId),
|
|
147
|
+
},
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
// Prefer the provider's canonical namespace/name (GitHub's REST/GraphQL lookup follows the 301
|
|
151
|
+
// rename redirect, so a stale old name resolves to the new canonical identity), falling back to the
|
|
152
|
+
// parsed remote when the response omits them. `renamed` is a case-insensitive compare of input vs
|
|
153
|
+
// canonical, mirroring gkcli's `EqualFold`, so hosts that merely echo the input casing (e.g.
|
|
154
|
+
// Bitbucket Server/Azure) don't get spuriously flagged.
|
|
155
|
+
const canonicalOwner = repo.namespace || owner;
|
|
156
|
+
const canonicalName = repo.name || name;
|
|
157
|
+
const renamed = canonicalOwner.toLowerCase() !== owner.toLowerCase() || canonicalName.toLowerCase() !== name.toLowerCase();
|
|
158
|
+
const identity = {
|
|
159
|
+
providerId: id,
|
|
160
|
+
domain: domain,
|
|
161
|
+
owner: canonicalOwner,
|
|
162
|
+
name: canonicalName,
|
|
163
|
+
project: project,
|
|
164
|
+
remoteUrl: options.remoteUrl,
|
|
165
|
+
renamed: renamed,
|
|
166
|
+
};
|
|
167
|
+
return { resolution: { status: 'resolved', identity: identity } };
|
|
168
|
+
}
|
|
169
|
+
catch (ex) {
|
|
170
|
+
// Order matters: 404 throws RequestNotFoundError (not `undefined`), so check not-found before auth
|
|
171
|
+
// and before the generic 5xx/unknown bucket — never classify a 401/403 as not-found.
|
|
172
|
+
let resolution;
|
|
173
|
+
if (ex instanceof RequestNotFoundError) {
|
|
174
|
+
resolution = { status: 'not-found' };
|
|
175
|
+
}
|
|
176
|
+
else if (ex instanceof AuthenticationError) {
|
|
177
|
+
resolution = { status: 'unauthorized', warning: toProviderWarning(id, domain, options.connectionId, ex) };
|
|
178
|
+
}
|
|
179
|
+
else {
|
|
180
|
+
resolution = { status: 'undetermined', warning: toProviderWarning(id, domain, options.connectionId, ex) };
|
|
181
|
+
}
|
|
182
|
+
return { resolution: resolution };
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* The remote-matcher configs for this resolution: the user's own host remote configs (self-managed/custom
|
|
187
|
+
* domains), plus a synthetic exact-domain entry for an explicit `providerId` + host so a custom domain still maps
|
|
188
|
+
* to the right provider for path parsing.
|
|
189
|
+
*/
|
|
190
|
+
function buildMatcherConfigs(ctx, options, parsedDomain) {
|
|
191
|
+
const configs = [];
|
|
192
|
+
for (const cfg of ctx.getRemoteConfigs()) {
|
|
193
|
+
const type = remoteProviderTypeForConfig(cfg.type);
|
|
194
|
+
if (type == null)
|
|
195
|
+
continue;
|
|
196
|
+
// Forward both domain- and regex-based custom remotes (carrying any protocol override), so a
|
|
197
|
+
// regex-configured host resolves instead of falling through to `unsupported`.
|
|
198
|
+
if (cfg.domain) {
|
|
199
|
+
configs.push({ type: type, domain: cfg.domain, protocol: cfg.protocol });
|
|
200
|
+
}
|
|
201
|
+
else if (cfg.regex) {
|
|
202
|
+
configs.push({ type: type, regex: cfg.regex, protocol: cfg.protocol });
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
if (options.providerId == null)
|
|
206
|
+
return configs;
|
|
207
|
+
const type = remoteProviderTypeForIntegration(options.providerId);
|
|
208
|
+
const domain = parsedDomain || options.host;
|
|
209
|
+
if (type == null || !domain)
|
|
210
|
+
return configs;
|
|
211
|
+
// The synthetic exact-domain entry is unshifted to the front, so it wins the match over the user's own
|
|
212
|
+
// config for the same host. Carry that config's protocol override across (matched by domain or regex,
|
|
213
|
+
// mirroring `ignoreSSLErrors`) so a self-managed host configured for a custom protocol — e.g. plain
|
|
214
|
+
// `http` — isn't silently downgraded to the provider default here.
|
|
215
|
+
const lowerDomain = domain.toLowerCase();
|
|
216
|
+
const protocol = configs.find(c => {
|
|
217
|
+
if (c.type !== type)
|
|
218
|
+
return false;
|
|
219
|
+
if (c.domain != null)
|
|
220
|
+
return c.domain.toLowerCase() === lowerDomain;
|
|
221
|
+
// Truthy (not just non-null): an empty regex would compile to a match-everything pattern.
|
|
222
|
+
if (c.regex) {
|
|
223
|
+
try {
|
|
224
|
+
return new RegExp(c.regex, 'i').test(lowerDomain);
|
|
225
|
+
}
|
|
226
|
+
catch {
|
|
227
|
+
return false;
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
return false;
|
|
231
|
+
})?.protocol;
|
|
232
|
+
configs.unshift({ type: type, domain: domain, protocol: protocol });
|
|
233
|
+
return configs;
|
|
234
|
+
}
|
|
235
|
+
//# sourceMappingURL=resolveRepository.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveRepository.js","sourceRoot":"","sources":["../../../../src/plus/integrations/reads/resolveRepository.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,2BAA2B,EAAE,MAAM,iCAAiC,CAAC;AAC9E,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AAEvE,OAAO,EAAE,yBAAyB,EAAE,+BAA+B,EAAE,MAAM,iBAAiB,CAAC;AAC7F,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAEpH,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EACN,yBAAyB,EACzB,2BAA2B,EAC3B,iCAAiC,EACjC,2BAA2B,EAC3B,gCAAgC,GAChC,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAEpD;;;;;;;;GAQG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACtC,GAAgC,EAChC,OAWC;IAED,MAAM,MAAM,GAAG,CAAC,MAAsC,EAA2B,EAAE,CAAC,CAAC;QACpF,UAAU,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE;KAC9B,CAAC,CAAC;IAEH,MAAM,CAAC,MAAM,EAAE,YAAY,EAAE,IAAI,CAAC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,CAAC,WAAW,EAAE,CAAC;IACzC,MAAM,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE;QACjC,IAAI,CAAC,CAAC,IAAI,KAAK,IAAI;YAAE,OAAO,KAAK,CAAC;QAClC,IAAI,CAAC,CAAC,MAAM,IAAI,IAAI;YAAE,OAAO,CAAC,CAAC,MAAM,CAAC,WAAW,EAAE,KAAK,WAAW,CAAC;QAEpE,0FAA0F;QAC1F,IAAI,CAAC,CAAC,KAAK,EAAE,CAAC;YACb,IAAI,CAAC;gBACJ,OAAO,IAAI,MAAM,CAAC,CAAC,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YACnD,CAAC;YAAC,MAAM,CAAC;gBACR,OAAO,KAAK,CAAC;YACd,CAAC;QACF,CAAC;QAED,OAAO,KAAK,CAAC;IACd,CAAC,CAAC,EAAE,QAAQ,CAAC;IACb,OAAO,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,CAAC;IACpE,OAAO,OAAO,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { PullRequestShape } from '../../../git/models/pullRequest.js';
|
|
2
|
+
import type { ClosedPullRequestSweepOptions, PullRequestSweepOptions } from '../manager.js';
|
|
3
|
+
import type { ProviderSweepResult } from '../results.js';
|
|
4
|
+
import type { ProviderReadContext } from './context.js';
|
|
5
|
+
export declare function sweepPullRequests(ctx: ProviderReadContext, options?: PullRequestSweepOptions): Promise<ProviderSweepResult<PullRequestShape>>;
|
|
6
|
+
/**
|
|
7
|
+
* Closed/merged counterpart of {@link sweepPullRequests}, feeding Kepler's Kanban "done" column. Applies
|
|
8
|
+
* the native cross-provider state filter (`Closed` + `Merged`) so it works beyond GitHub.
|
|
9
|
+
*/
|
|
10
|
+
export declare function sweepClosedPullRequests(ctx: ProviderReadContext, options?: ClosedPullRequestSweepOptions): Promise<ProviderSweepResult<PullRequestShape>>;
|
|
11
|
+
//# sourceMappingURL=sweeps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sweeps.d.ts","sourceRoot":"","sources":["../../../../src/plus/integrations/reads/sweeps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAI3E,OAAO,KAAK,EAAE,6BAA6B,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAE5F,OAAO,KAAK,EAAE,mBAAmB,EAAmB,MAAM,eAAe,CAAC;AAG1E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AA8BxD,wBAAsB,iBAAiB,CACtC,GAAG,EAAE,mBAAmB,EACxB,OAAO,CAAC,EAAE,uBAAuB,GAC/B,OAAO,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,CAAC,CAmIhD;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CACtC,GAAG,EAAE,mBAAmB,EACxB,OAAO,CAAC,EAAE,6BAA6B,GACrC,OAAO,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,CAAC,CAEhD"}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { mapBounded } from '../../../utils/promise.js';
|
|
2
|
+
import { providerFanOutConcurrency } from '../constants.js';
|
|
3
|
+
import { fromProviderPullRequest } from '../providers/models.js';
|
|
4
|
+
import { appendDedupedWarning } from '../results.js';
|
|
5
|
+
import { isGitHostIntegration, isIssuesHostIntegrationId } from '../utils/integration.utils.js';
|
|
6
|
+
import { drainPullRequests, getCurrentAccountId, resolvePullRequestSweepTargets } from './drains.js';
|
|
7
|
+
import { resolveAccountWidePullRequestFilters, resolvePullRequestFilters } from './filters.js';
|
|
8
|
+
import { gitHostOnlySurfaceWarning, noConnectionWarning, unsupportedAccountWidePullRequestFiltersWarning, unsupportedFiltersWarning, } from './warnings.js';
|
|
9
|
+
export async function sweepPullRequests(ctx, options) {
|
|
10
|
+
const { targets, attributeUnavailableProviders } = resolvePullRequestSweepTargets(options);
|
|
11
|
+
const maxPages = options?.maxPages ?? 100;
|
|
12
|
+
const repos = options?.repos ?? [];
|
|
13
|
+
const results = await mapBounded(targets, providerFanOutConcurrency, async (target) => {
|
|
14
|
+
const { providerId: id, connectionId, domain: requestedDomain } = target;
|
|
15
|
+
/** A target that never reached a drain: the provider itself failed, so its slice is empty and attributed. */
|
|
16
|
+
const rejectedTarget = (warnings) => ({
|
|
17
|
+
items: [],
|
|
18
|
+
warnings: warnings,
|
|
19
|
+
fetchFailed: true,
|
|
20
|
+
truncated: false,
|
|
21
|
+
providerId: id,
|
|
22
|
+
failedProvider: true,
|
|
23
|
+
});
|
|
24
|
+
if (isIssuesHostIntegrationId(id)) {
|
|
25
|
+
return rejectedTarget([
|
|
26
|
+
gitHostOnlySurfaceWarning(id, requestedDomain, connectionId, 'pull request sweeps'),
|
|
27
|
+
]);
|
|
28
|
+
}
|
|
29
|
+
const integration = await ctx.getIntegrationForRead(id, connectionId, requestedDomain);
|
|
30
|
+
if (integration == null) {
|
|
31
|
+
// A requested connection that can't be resolved is a broken connection — surface it as a
|
|
32
|
+
// warning + fetchFailed rather than dropping the provider's slice silently.
|
|
33
|
+
const early = ctx.earlyReturnConnectionWarnings(id, connectionId, requestedDomain);
|
|
34
|
+
if (early.warnings.length === 0 && !attributeUnavailableProviders)
|
|
35
|
+
return undefined;
|
|
36
|
+
return rejectedTarget(early.warnings.length !== 0 ? early.warnings : [noConnectionWarning(id, requestedDomain, connectionId)]);
|
|
37
|
+
}
|
|
38
|
+
if (!isGitHostIntegration(integration)) {
|
|
39
|
+
return rejectedTarget([
|
|
40
|
+
gitHostOnlySurfaceWarning(id, requestedDomain, connectionId, 'pull request sweeps'),
|
|
41
|
+
]);
|
|
42
|
+
}
|
|
43
|
+
await ctx.forceRefreshIfRequested(integration, options?.forceSync, connectionId);
|
|
44
|
+
const domain = ctx.domainForRead(integration, id, connectionId, requestedDomain);
|
|
45
|
+
const accountWide = repos.length === 0;
|
|
46
|
+
const requestedFilters = target.filters ?? options?.filters;
|
|
47
|
+
const resolved = accountWide
|
|
48
|
+
? resolveAccountWidePullRequestFilters(id, requestedFilters)
|
|
49
|
+
: resolvePullRequestFilters(id, requestedFilters);
|
|
50
|
+
if (resolved.unsupported) {
|
|
51
|
+
return rejectedTarget([
|
|
52
|
+
accountWide
|
|
53
|
+
? unsupportedAccountWidePullRequestFiltersWarning(id, domain, connectionId, requestedFilters ?? [])
|
|
54
|
+
: unsupportedFiltersWarning(id, domain, connectionId),
|
|
55
|
+
]);
|
|
56
|
+
}
|
|
57
|
+
const drain = await drainPullRequests(integration, id, domain, repos, options?.states, resolved.filters, accountWide ? (options?.includeReviewRequested ?? false) : false, connectionId, maxPages, attributeUnavailableProviders);
|
|
58
|
+
const currentAccountId = drain.items.some(pr => pr.author != null)
|
|
59
|
+
? await getCurrentAccountId(integration, connectionId)
|
|
60
|
+
: undefined;
|
|
61
|
+
// Normalize the raw provider-apis PRs to the GitLens-owned shape here, where the per-provider
|
|
62
|
+
// `integration` (the mapper's provider reference) is in scope; the aggregation below only sees drains.
|
|
63
|
+
return {
|
|
64
|
+
...drain,
|
|
65
|
+
items: drain.items.map(pr => fromProviderPullRequest(pr, integration, { currentAccountId: currentAccountId })),
|
|
66
|
+
providerId: id,
|
|
67
|
+
};
|
|
68
|
+
});
|
|
69
|
+
const items = [];
|
|
70
|
+
const warnings = [];
|
|
71
|
+
const failedProviderIds = new Set();
|
|
72
|
+
const incompleteProviderIds = new Set();
|
|
73
|
+
let fetchFailed = false;
|
|
74
|
+
let truncated = false;
|
|
75
|
+
for (const drain of results) {
|
|
76
|
+
if (drain == null) {
|
|
77
|
+
continue;
|
|
78
|
+
}
|
|
79
|
+
items.push(...drain.items);
|
|
80
|
+
for (const w of drain.warnings) {
|
|
81
|
+
appendDedupedWarning(warnings, w);
|
|
82
|
+
}
|
|
83
|
+
if (drain.fetchFailed) {
|
|
84
|
+
fetchFailed = true;
|
|
85
|
+
}
|
|
86
|
+
if (drain.failedProvider) {
|
|
87
|
+
failedProviderIds.add(drain.providerId);
|
|
88
|
+
}
|
|
89
|
+
else if (drain.fetchFailed || drain.truncated) {
|
|
90
|
+
incompleteProviderIds.add(drain.providerId);
|
|
91
|
+
}
|
|
92
|
+
if (drain.truncated) {
|
|
93
|
+
truncated = true;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
return {
|
|
97
|
+
items: items,
|
|
98
|
+
warnings: warnings,
|
|
99
|
+
// `allPages` asserts completeness — it must be false when any provider truncated (a single-page
|
|
100
|
+
// account-wide read that couldn't confirm it drained everything) OR a drain aborted on a read
|
|
101
|
+
// failure (its slice is incomplete). Either way the sweep did not read every page.
|
|
102
|
+
page: {
|
|
103
|
+
currentPage: 1,
|
|
104
|
+
itemsPerPage: items.length,
|
|
105
|
+
allPages: !truncated && !fetchFailed,
|
|
106
|
+
truncated: truncated || undefined,
|
|
107
|
+
},
|
|
108
|
+
// A sweep drains every page itself and exposes no cursor to resume — so `hasMore` must be false even
|
|
109
|
+
// when the read was incomplete. Terminal incompleteness is expressed through `page.truncated` +
|
|
110
|
+
// `allPages: false` + warnings; setting `hasMore: true` here would make a consumer that drains while
|
|
111
|
+
// `hasMore` re-run the identical sweep forever with no cursor to advance.
|
|
112
|
+
hasMore: false,
|
|
113
|
+
fetchFailed: fetchFailed || undefined,
|
|
114
|
+
failedProviderIds: [...failedProviderIds],
|
|
115
|
+
incompleteProviderIds: [...incompleteProviderIds],
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Closed/merged counterpart of {@link sweepPullRequests}, feeding Kepler's Kanban "done" column. Applies
|
|
120
|
+
* the native cross-provider state filter (`Closed` + `Merged`) so it works beyond GitHub.
|
|
121
|
+
*/
|
|
122
|
+
export function sweepClosedPullRequests(ctx, options) {
|
|
123
|
+
return sweepPullRequests(ctx, { ...options, states: ['closed', 'merged'] });
|
|
124
|
+
}
|
|
125
|
+
//# sourceMappingURL=sweeps.js.map
|