@gitkraken/core-gitlens 0.3.1 → 0.4.100
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 +83 -1
- package/README.md +22 -12
- 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 +4 -3
- package/dist/git/context.d.ts.map +1 -1
- package/dist/git/context.js.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 +1 -0
- 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 +5 -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 +32 -0
- package/dist/git/utils/conflictResolution.utils.d.ts.map +1 -1
- package/dist/git/utils/conflictResolution.utils.js +95 -0
- 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 +1 -0
- package/dist/git-cli/providers/operations.d.ts.map +1 -1
- package/dist/git-cli/providers/operations.js +22 -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 +4 -1
- package/dist/git-cli/providers/worktrees.d.ts.map +1 -1
- package/dist/git-cli/providers/worktrees.js +31 -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 +5 -7
- 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 +71 -15
- package/dist/plus/git-github/api/github.d.ts.map +1 -1
- package/dist/plus/git-github/api/github.js +350 -84
- 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 +30 -0
- package/dist/plus/integrations/authentication/cloudIntegrationService.d.ts.map +1 -0
- package/dist/plus/integrations/authentication/cloudIntegrationService.js +214 -0
- package/dist/plus/integrations/authentication/cloudIntegrationService.js.map +1 -0
- package/dist/plus/integrations/authentication/configuredIntegrationService.d.ts +114 -0
- package/dist/plus/integrations/authentication/configuredIntegrationService.d.ts.map +1 -0
- package/dist/plus/integrations/authentication/configuredIntegrationService.js +497 -0
- package/dist/plus/integrations/authentication/configuredIntegrationService.js.map +1 -0
- package/dist/plus/integrations/authentication/integrationAuthenticationProvider.d.ts +112 -0
- package/dist/plus/integrations/authentication/integrationAuthenticationProvider.d.ts.map +1 -0
- package/dist/plus/integrations/authentication/integrationAuthenticationProvider.js +217 -0
- package/dist/plus/integrations/authentication/integrationAuthenticationProvider.js.map +1 -0
- package/dist/plus/integrations/authentication/integrationAuthenticationService.d.ts +62 -0
- package/dist/plus/integrations/authentication/integrationAuthenticationService.d.ts.map +1 -0
- package/dist/plus/integrations/authentication/integrationAuthenticationService.js +126 -0
- package/dist/plus/integrations/authentication/integrationAuthenticationService.js.map +1 -0
- package/dist/plus/integrations/authentication/manualTokenProvider.d.ts +16 -0
- package/dist/plus/integrations/authentication/manualTokenProvider.d.ts.map +1 -0
- package/dist/plus/integrations/authentication/manualTokenProvider.js +53 -0
- package/dist/plus/integrations/authentication/manualTokenProvider.js.map +1 -0
- package/dist/plus/integrations/authentication/models.d.ts +120 -0
- package/dist/plus/integrations/authentication/models.d.ts.map +1 -0
- package/dist/plus/integrations/authentication/models.js +64 -0
- package/dist/plus/integrations/authentication/models.js.map +1 -0
- 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 +57 -0
- package/dist/plus/integrations/constants.d.ts.map +1 -0
- package/dist/plus/integrations/constants.js +138 -0
- package/dist/plus/integrations/constants.js.map +1 -0
- package/dist/plus/integrations/context.d.ts +358 -0
- package/dist/plus/integrations/context.d.ts.map +1 -0
- package/dist/plus/integrations/context.js +2 -0
- package/dist/plus/integrations/context.js.map +1 -0
- package/dist/plus/integrations/errors.d.ts +79 -0
- package/dist/plus/integrations/errors.d.ts.map +1 -0
- package/dist/plus/integrations/errors.js +150 -0
- package/dist/plus/integrations/errors.js.map +1 -0
- package/dist/plus/integrations/index.d.ts +77 -0
- package/dist/plus/integrations/index.d.ts.map +1 -0
- package/dist/plus/integrations/index.js +64 -0
- package/dist/plus/integrations/index.js.map +1 -0
- package/dist/plus/integrations/integrationService.d.ts +379 -0
- package/dist/plus/integrations/integrationService.d.ts.map +1 -0
- package/dist/plus/integrations/integrationService.js +1895 -0
- package/dist/plus/integrations/integrationService.js.map +1 -0
- 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 +341 -0
- package/dist/plus/integrations/models/gitHostIntegration.d.ts.map +1 -0
- package/dist/plus/integrations/models/gitHostIntegration.js +1146 -0
- package/dist/plus/integrations/models/gitHostIntegration.js.map +1 -0
- package/dist/plus/integrations/models/integration.d.ts +212 -0
- package/dist/plus/integrations/models/integration.d.ts.map +1 -0
- package/dist/plus/integrations/models/integration.js +627 -0
- package/dist/plus/integrations/models/integration.js.map +1 -0
- package/dist/plus/integrations/models/issuesIntegration.d.ts +108 -0
- package/dist/plus/integrations/models/issuesIntegration.d.ts.map +1 -0
- package/dist/plus/integrations/models/issuesIntegration.js +216 -0
- package/dist/plus/integrations/models/issuesIntegration.js.map +1 -0
- 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 +25 -0
- package/dist/plus/integrations/providers/apiClients.d.ts.map +1 -0
- package/dist/plus/integrations/providers/apiClients.js +39 -0
- package/dist/plus/integrations/providers/apiClients.js.map +1 -0
- 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 +59 -0
- package/dist/plus/integrations/providers/azure/azure.d.ts.map +1 -0
- package/dist/plus/integrations/providers/azure/azure.js +519 -0
- package/dist/plus/integrations/providers/azure/azure.js.map +1 -0
- package/dist/plus/integrations/providers/azure/models.d.ts +302 -0
- package/dist/plus/integrations/providers/azure/models.d.ts.map +1 -0
- package/dist/plus/integrations/providers/azure/models.js +203 -0
- package/dist/plus/integrations/providers/azure/models.js.map +1 -0
- package/dist/plus/integrations/providers/azureDevOps.d.ts +141 -0
- package/dist/plus/integrations/providers/azureDevOps.d.ts.map +1 -0
- package/dist/plus/integrations/providers/azureDevOps.js +925 -0
- package/dist/plus/integrations/providers/azureDevOps.js.map +1 -0
- package/dist/plus/integrations/providers/bitbucket/bitbucket.d.ts +53 -0
- package/dist/plus/integrations/providers/bitbucket/bitbucket.d.ts.map +1 -0
- package/dist/plus/integrations/providers/bitbucket/bitbucket.js +589 -0
- package/dist/plus/integrations/providers/bitbucket/bitbucket.js.map +1 -0
- package/dist/plus/integrations/providers/bitbucket/models.d.ts +222 -0
- package/dist/plus/integrations/providers/bitbucket/models.d.ts.map +1 -0
- package/dist/plus/integrations/providers/bitbucket/models.js +158 -0
- package/dist/plus/integrations/providers/bitbucket/models.js.map +1 -0
- package/dist/plus/integrations/providers/bitbucket-server/models.d.ts +138 -0
- package/dist/plus/integrations/providers/bitbucket-server/models.d.ts.map +1 -0
- package/dist/plus/integrations/providers/bitbucket-server/models.js +130 -0
- package/dist/plus/integrations/providers/bitbucket-server/models.js.map +1 -0
- package/dist/plus/integrations/providers/bitbucket-server.d.ts +84 -0
- package/dist/plus/integrations/providers/bitbucket-server.d.ts.map +1 -0
- package/dist/plus/integrations/providers/bitbucket-server.js +242 -0
- package/dist/plus/integrations/providers/bitbucket-server.js.map +1 -0
- package/dist/plus/integrations/providers/bitbucket.d.ts +84 -0
- package/dist/plus/integrations/providers/bitbucket.d.ts.map +1 -0
- package/dist/plus/integrations/providers/bitbucket.js +477 -0
- package/dist/plus/integrations/providers/bitbucket.js.map +1 -0
- package/dist/plus/integrations/providers/github/github.d.ts +5 -0
- package/dist/plus/integrations/providers/github/github.d.ts.map +1 -0
- package/dist/plus/integrations/providers/github/github.js +47 -0
- package/dist/plus/integrations/providers/github/github.js.map +1 -0
- package/dist/plus/integrations/providers/github/github.utils.d.ts +11 -0
- package/dist/plus/integrations/providers/github/github.utils.d.ts.map +1 -0
- package/dist/plus/integrations/providers/github/github.utils.js +6 -0
- package/dist/plus/integrations/providers/github/github.utils.js.map +1 -0
- package/dist/plus/integrations/providers/github/models.d.ts +3 -0
- package/dist/plus/integrations/providers/github/models.d.ts.map +1 -0
- package/dist/plus/integrations/providers/github/models.js +2 -0
- package/dist/plus/integrations/providers/github/models.js.map +1 -0
- package/dist/plus/integrations/providers/github.d.ts +116 -0
- package/dist/plus/integrations/providers/github.d.ts.map +1 -0
- package/dist/plus/integrations/providers/github.js +445 -0
- package/dist/plus/integrations/providers/github.js.map +1 -0
- package/dist/plus/integrations/providers/gitlab/gitlab.d.ts +71 -0
- package/dist/plus/integrations/providers/gitlab/gitlab.d.ts.map +1 -0
- package/dist/plus/integrations/providers/gitlab/gitlab.js +902 -0
- package/dist/plus/integrations/providers/gitlab/gitlab.js.map +1 -0
- package/dist/plus/integrations/providers/gitlab/gitlab.utils.d.ts +27 -0
- package/dist/plus/integrations/providers/gitlab/gitlab.utils.d.ts.map +1 -0
- package/dist/plus/integrations/providers/gitlab/gitlab.utils.js +53 -0
- package/dist/plus/integrations/providers/gitlab/gitlab.utils.js.map +1 -0
- package/dist/plus/integrations/providers/gitlab/models.d.ts +138 -0
- package/dist/plus/integrations/providers/gitlab/models.d.ts.map +1 -0
- package/dist/plus/integrations/providers/gitlab/models.js +99 -0
- package/dist/plus/integrations/providers/gitlab/models.js.map +1 -0
- package/dist/plus/integrations/providers/gitlab.d.ts +124 -0
- package/dist/plus/integrations/providers/gitlab.d.ts.map +1 -0
- package/dist/plus/integrations/providers/gitlab.js +519 -0
- package/dist/plus/integrations/providers/gitlab.js.map +1 -0
- package/dist/plus/integrations/providers/jira.d.ts +57 -0
- package/dist/plus/integrations/providers/jira.d.ts.map +1 -0
- package/dist/plus/integrations/providers/jira.js +425 -0
- package/dist/plus/integrations/providers/jira.js.map +1 -0
- package/dist/plus/integrations/providers/linear.d.ts +58 -0
- package/dist/plus/integrations/providers/linear.d.ts.map +1 -0
- package/dist/plus/integrations/providers/linear.js +304 -0
- package/dist/plus/integrations/providers/linear.js.map +1 -0
- package/dist/plus/integrations/providers/models.d.ts +712 -0
- package/dist/plus/integrations/providers/models.d.ts.map +1 -0
- package/dist/plus/integrations/providers/models.js +850 -0
- package/dist/plus/integrations/providers/models.js.map +1 -0
- package/dist/plus/integrations/providers/providersApi.d.ts +262 -0
- package/dist/plus/integrations/providers/providersApi.d.ts.map +1 -0
- package/dist/plus/integrations/providers/providersApi.js +1033 -0
- package/dist/plus/integrations/providers/providersApi.js.map +1 -0
- 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 +75 -0
- package/dist/plus/integrations/providers/utils.d.ts.map +1 -0
- package/dist/plus/integrations/providers/utils.js +313 -0
- package/dist/plus/integrations/providers/utils.js.map +1 -0
- package/dist/plus/integrations/reads/context.d.ts +52 -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 +348 -0
- package/dist/plus/integrations/reads/hierarchy.js.map +1 -0
- package/dist/plus/integrations/reads/hierarchy.utils.d.ts +53 -0
- package/dist/plus/integrations/reads/hierarchy.utils.d.ts.map +1 -0
- package/dist/plus/integrations/reads/hierarchy.utils.js +85 -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 +346 -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/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/telemetry.d.ts +26 -0
- package/dist/plus/integrations/telemetry.d.ts.map +1 -0
- package/dist/plus/integrations/telemetry.js +11 -0
- package/dist/plus/integrations/telemetry.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 +40 -0
- package/dist/plus/integrations/utils/integration.utils.d.ts.map +1 -0
- package/dist/plus/integrations/utils/integration.utils.js +182 -0
- package/dist/plus/integrations/utils/integration.utils.js.map +1 -0
- 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/disposable.d.ts +15 -2
- package/dist/utils/disposable.d.ts.map +1 -1
- package/dist/utils/disposable.js.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 -172
- package/src/git/cache.ts +75 -8
- package/src/git/context.ts +4 -3
- 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/operations.ts +1 -1
- package/src/git/providers/status.ts +1 -1
- package/src/git/providers/worktrees.ts +17 -3
- 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/conflictResolution.utils.ts +126 -0
- 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/operations.ts +22 -2
- 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 +57 -6
- 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 +5 -7
- 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 +497 -129
- 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 +292 -0
- package/src/plus/integrations/authentication/configuredIntegrationService.ts +651 -0
- package/src/plus/integrations/authentication/integrationAuthenticationProvider.ts +363 -0
- package/src/plus/integrations/authentication/integrationAuthenticationService.ts +148 -0
- package/src/plus/integrations/authentication/manualTokenProvider.ts +79 -0
- package/src/plus/integrations/authentication/models.ts +202 -0
- package/src/plus/integrations/collectionMetadata.ts +143 -0
- package/src/plus/integrations/constants.ts +190 -0
- package/src/plus/integrations/context.ts +382 -0
- package/src/plus/integrations/errors.ts +184 -0
- package/src/plus/integrations/index.ts +216 -0
- package/src/plus/integrations/integrationService.ts +2589 -0
- package/src/plus/integrations/lite.ts +233 -0
- package/src/plus/integrations/manager.ts +359 -0
- package/src/plus/integrations/models/gitHostIntegration.ts +1631 -0
- package/src/plus/integrations/models/integration.ts +926 -0
- package/src/plus/integrations/models/issuesIntegration.ts +264 -0
- package/src/plus/integrations/providerFilters.ts +12 -0
- package/src/plus/integrations/providers/apiClients.ts +69 -0
- package/src/plus/integrations/providers/apiConfig.ts +71 -0
- package/src/plus/integrations/providers/azure/azure.ts +822 -0
- package/src/plus/integrations/providers/azure/models.ts +618 -0
- package/src/plus/integrations/providers/azureDevOps.ts +1342 -0
- package/src/plus/integrations/providers/bitbucket/bitbucket.ts +904 -0
- package/src/plus/integrations/providers/bitbucket/models.ts +445 -0
- package/src/plus/integrations/providers/bitbucket-server/models.ts +283 -0
- package/src/plus/integrations/providers/bitbucket-server.ts +447 -0
- package/src/plus/integrations/providers/bitbucket.ts +794 -0
- package/src/plus/integrations/providers/github/github.ts +64 -0
- package/src/plus/integrations/providers/github/github.utils.ts +23 -0
- package/src/plus/integrations/providers/github/models.ts +29 -0
- package/src/plus/integrations/providers/github.ts +750 -0
- package/src/plus/integrations/providers/gitlab/gitlab.ts +1320 -0
- package/src/plus/integrations/providers/gitlab/gitlab.utils.ts +80 -0
- package/src/plus/integrations/providers/gitlab/models.ts +271 -0
- package/src/plus/integrations/providers/gitlab.ts +832 -0
- package/src/plus/integrations/providers/jira.ts +564 -0
- package/src/plus/integrations/providers/linear.ts +402 -0
- package/src/plus/integrations/providers/models.ts +1622 -0
- package/src/plus/integrations/providers/providersApi.ts +1889 -0
- 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 +419 -0
- package/src/plus/integrations/reads/context.ts +75 -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 +493 -0
- package/src/plus/integrations/reads/hierarchy.utils.ts +106 -0
- package/src/plus/integrations/reads/issueTracker.ts +480 -0
- package/src/plus/integrations/reads/issues.ts +407 -0
- package/src/plus/integrations/reads/paging.ts +277 -0
- package/src/plus/integrations/reads/pullRequests.ts +267 -0
- package/src/plus/integrations/reads/warnings.ts +170 -0
- package/src/plus/integrations/results.ts +275 -0
- package/src/plus/integrations/telemetry.ts +29 -0
- package/src/plus/integrations/utils/domain.utils.ts +26 -0
- package/src/plus/integrations/utils/integration.utils.ts +215 -0
- 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/disposable.ts +15 -2
- 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,902 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { PullRequest } from '../../../../git/models/pullRequest.js';
|
|
8
|
+
import { CancellationError } from '../../../../utils/cancellation.js';
|
|
9
|
+
import { trace } from '../../../../utils/decorators/log.js';
|
|
10
|
+
import { Logger } from '../../../../utils/logger.js';
|
|
11
|
+
import { getScopedLogger } from '../../../../utils/logger.scoped.js';
|
|
12
|
+
import { maybeStopWatch } from '../../../../utils/stopwatch.js';
|
|
13
|
+
import { equalsIgnoreCase } from '../../../../utils/string.js';
|
|
14
|
+
import { joinUriPath, parseUri } from '../../../../utils/uri.js';
|
|
15
|
+
import { AuthenticationError, AuthenticationErrorReason, isRateLimitResponse, ProviderFetchError, RequestClientError, RequestNotFoundError, toRateLimitError, } from '../../errors.js';
|
|
16
|
+
import { baseProviderApiConfig } from '../apiConfig.js';
|
|
17
|
+
import { selectGitLabUserForCommit } from './gitlab.utils.js';
|
|
18
|
+
import { fromGitLabMergeRequest, fromGitLabMergeRequestREST, fromGitLabMergeRequestState, toGitLabMergeRequestState, } from './models.js';
|
|
19
|
+
// drop it as soon as we switch to @gitkraken/providers-api
|
|
20
|
+
const gitlabUserIdPrefix = 'gid://gitlab/User/';
|
|
21
|
+
const gitlabMergeRequestIdPrefix = 'gid://gitlab/MergeRequest/';
|
|
22
|
+
function buildGitLabUserId(id) {
|
|
23
|
+
return typeof id === 'string' && id?.startsWith(gitlabUserIdPrefix)
|
|
24
|
+
? id.substring(gitlabUserIdPrefix.length)
|
|
25
|
+
: String(id);
|
|
26
|
+
}
|
|
27
|
+
export class GitLabApi {
|
|
28
|
+
config;
|
|
29
|
+
_disposable;
|
|
30
|
+
_projectIds = new Map();
|
|
31
|
+
constructor(config) {
|
|
32
|
+
this.config = config;
|
|
33
|
+
this._disposable = config.onConfigChanged?.(() => this.resetCaches());
|
|
34
|
+
}
|
|
35
|
+
dispose() {
|
|
36
|
+
this._disposable?.dispose();
|
|
37
|
+
}
|
|
38
|
+
resetCaches() {
|
|
39
|
+
this._projectIds.clear();
|
|
40
|
+
}
|
|
41
|
+
async getAccountForCommit(provider, token, owner, repo, rev, options, cancellation) {
|
|
42
|
+
const scope = getScopedLogger();
|
|
43
|
+
const projectId = await this.getProjectId(provider, token, owner, repo, options?.baseUrl, cancellation);
|
|
44
|
+
if (!projectId)
|
|
45
|
+
return undefined;
|
|
46
|
+
try {
|
|
47
|
+
const commit = await this.request(provider, token, options?.baseUrl, `v4/projects/${projectId}/repository/commits/${rev}?stats=false`, {
|
|
48
|
+
method: 'GET',
|
|
49
|
+
// ...options,
|
|
50
|
+
}, cancellation, scope);
|
|
51
|
+
let users = await this.findUser(provider, token, commit.author_name, options, cancellation);
|
|
52
|
+
let user = selectGitLabUserForCommit(users, commit.author_name, commit.author_email);
|
|
53
|
+
// If the name search was ambiguous (multiple users share the name), try an email-scoped search to
|
|
54
|
+
// disambiguate before giving up — otherwise we'd show a stranger's avatar (see #2205)
|
|
55
|
+
if (user == null && commit.author_email) {
|
|
56
|
+
const exactNameMatches = users.filter(u => equalsIgnoreCase(u.name, commit.author_name)).length;
|
|
57
|
+
if (exactNameMatches > 1) {
|
|
58
|
+
users = await this.findUser(provider, token, commit.author_email, options, cancellation);
|
|
59
|
+
user = selectGitLabUserForCommit(users, commit.author_name, commit.author_email);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
if (user == null)
|
|
63
|
+
return undefined;
|
|
64
|
+
// If the avatarUrl is a relative URL, make it absolute using the webUrl (assuming the webUrl is the root URL with the username tacked on)
|
|
65
|
+
if (user.avatarUrl && !/^([a-zA-Z][\w+.-]+):/.test(user.avatarUrl)) {
|
|
66
|
+
user.avatarUrl = joinUriPath(parseUri(user.webUrl), '..', user.avatarUrl).toString();
|
|
67
|
+
}
|
|
68
|
+
return {
|
|
69
|
+
provider: provider,
|
|
70
|
+
id: String(user.id),
|
|
71
|
+
name: user.name || undefined,
|
|
72
|
+
email: commit.author_email || undefined,
|
|
73
|
+
avatarUrl: user.avatarUrl || undefined,
|
|
74
|
+
username: user.username || undefined,
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
catch (ex) {
|
|
78
|
+
if (ex instanceof RequestNotFoundError)
|
|
79
|
+
return undefined;
|
|
80
|
+
throw this.handleException(ex, provider, scope);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
async getAccountForEmail(provider, token, _owner, _repo, email, options) {
|
|
84
|
+
const scope = getScopedLogger();
|
|
85
|
+
try {
|
|
86
|
+
const [user] = await this.findUser(provider, token, email, options);
|
|
87
|
+
if (user == null)
|
|
88
|
+
return undefined;
|
|
89
|
+
return {
|
|
90
|
+
provider: provider,
|
|
91
|
+
id: String(user.id),
|
|
92
|
+
name: user.name || undefined,
|
|
93
|
+
email: user.publicEmail || undefined,
|
|
94
|
+
avatarUrl: user.avatarUrl || undefined,
|
|
95
|
+
username: user.username || undefined,
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
catch (ex) {
|
|
99
|
+
if (ex instanceof RequestNotFoundError)
|
|
100
|
+
return undefined;
|
|
101
|
+
throw this.handleException(ex, provider, scope);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
async getUserSigningKeys(provider, token, userId, options, cancellation) {
|
|
105
|
+
const scope = getScopedLogger();
|
|
106
|
+
// SSH keys are public, so this works for any user with the current token (covered by the `read_user` scope).
|
|
107
|
+
try {
|
|
108
|
+
const keys = await this.request(provider, token, options?.baseUrl, `v4/users/${userId}/keys`, { method: 'GET' }, cancellation, scope);
|
|
109
|
+
// Exclude auth-only keys — only signing-capable keys belong in an allowed_signers file.
|
|
110
|
+
return keys?.filter(k => k.usage_type === 'signing' || k.usage_type === 'auth_and_signing') ?? [];
|
|
111
|
+
}
|
|
112
|
+
catch (ex) {
|
|
113
|
+
if (ex instanceof RequestNotFoundError)
|
|
114
|
+
return [];
|
|
115
|
+
this.handleException(ex, provider, scope);
|
|
116
|
+
return [];
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
async getDefaultBranch(provider, token, owner, repo, options, cancellation) {
|
|
120
|
+
const scope = getScopedLogger();
|
|
121
|
+
try {
|
|
122
|
+
const query = `query getDefaultBranch(
|
|
123
|
+
$fullPath: ID!
|
|
124
|
+
) {
|
|
125
|
+
project(fullPath: $fullPath) {
|
|
126
|
+
repository {
|
|
127
|
+
rootRef
|
|
128
|
+
}
|
|
129
|
+
}`;
|
|
130
|
+
const rsp = await this.graphql(provider, token, options?.baseUrl, query, {
|
|
131
|
+
fullPath: `${owner}/${repo}`,
|
|
132
|
+
}, cancellation, scope);
|
|
133
|
+
const defaultBranch = rsp?.data?.project?.repository?.rootRef ?? undefined;
|
|
134
|
+
if (defaultBranch == null)
|
|
135
|
+
return undefined;
|
|
136
|
+
return {
|
|
137
|
+
provider: provider,
|
|
138
|
+
name: defaultBranch,
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
catch (ex) {
|
|
142
|
+
if (ex instanceof RequestNotFoundError)
|
|
143
|
+
return undefined;
|
|
144
|
+
throw this.handleException(ex, provider, scope);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
async getIssueOrPullRequest(provider, token, owner, repo, number, options, cancellation) {
|
|
148
|
+
const scope = getScopedLogger();
|
|
149
|
+
try {
|
|
150
|
+
const query = `query getIssueOrMergeRequest(
|
|
151
|
+
$fullPath: ID!
|
|
152
|
+
$iid: String!
|
|
153
|
+
) {
|
|
154
|
+
project(fullPath: $fullPath) {
|
|
155
|
+
mergeRequest(iid: $iid) {
|
|
156
|
+
author {
|
|
157
|
+
id
|
|
158
|
+
name
|
|
159
|
+
avatarUrl
|
|
160
|
+
webUrl
|
|
161
|
+
}
|
|
162
|
+
iid
|
|
163
|
+
title
|
|
164
|
+
description
|
|
165
|
+
state
|
|
166
|
+
createdAt
|
|
167
|
+
updatedAt
|
|
168
|
+
mergedAt
|
|
169
|
+
webUrl
|
|
170
|
+
}
|
|
171
|
+
issue(iid: $iid) {
|
|
172
|
+
author {
|
|
173
|
+
id
|
|
174
|
+
name
|
|
175
|
+
avatarUrl
|
|
176
|
+
webUrl
|
|
177
|
+
}
|
|
178
|
+
iid
|
|
179
|
+
title
|
|
180
|
+
description
|
|
181
|
+
state
|
|
182
|
+
createdAt
|
|
183
|
+
updatedAt
|
|
184
|
+
closedAt
|
|
185
|
+
webUrl
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
}`;
|
|
189
|
+
const rsp = await this.graphql(provider, token, options?.baseUrl, query, {
|
|
190
|
+
fullPath: `${owner}/${repo}`,
|
|
191
|
+
iid: String(number),
|
|
192
|
+
}, cancellation, scope);
|
|
193
|
+
if (rsp?.data?.project?.issue != null) {
|
|
194
|
+
const issue = rsp.data.project.issue;
|
|
195
|
+
return {
|
|
196
|
+
provider: provider,
|
|
197
|
+
type: 'issue',
|
|
198
|
+
id: issue.iid,
|
|
199
|
+
nodeId: undefined,
|
|
200
|
+
createdDate: new Date(issue.createdAt),
|
|
201
|
+
updatedDate: new Date(issue.updatedAt),
|
|
202
|
+
title: issue.title,
|
|
203
|
+
closed: issue.state === 'closed',
|
|
204
|
+
closedDate: issue.closedAt == null ? undefined : new Date(issue.closedAt),
|
|
205
|
+
url: issue.webUrl,
|
|
206
|
+
state: issue.state === 'locked' ? 'closed' : issue.state,
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
if (rsp?.data?.project?.mergeRequest != null) {
|
|
210
|
+
const mergeRequest = rsp.data.project.mergeRequest;
|
|
211
|
+
return {
|
|
212
|
+
provider: provider,
|
|
213
|
+
type: 'pullrequest',
|
|
214
|
+
id: mergeRequest.iid,
|
|
215
|
+
nodeId: undefined,
|
|
216
|
+
createdDate: new Date(mergeRequest.createdAt),
|
|
217
|
+
updatedDate: new Date(mergeRequest.updatedAt),
|
|
218
|
+
title: mergeRequest.title,
|
|
219
|
+
closed: mergeRequest.state === 'closed',
|
|
220
|
+
// TODO@eamodio this isn't right, but GitLab doesn't seem to provide a closedAt on merge requests in GraphQL
|
|
221
|
+
closedDate: mergeRequest.state === 'closed' ? new Date(mergeRequest.updatedAt) : undefined,
|
|
222
|
+
url: mergeRequest.webUrl,
|
|
223
|
+
state: mergeRequest.state === 'locked' ? 'closed' : mergeRequest.state,
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
return undefined;
|
|
227
|
+
}
|
|
228
|
+
catch (ex) {
|
|
229
|
+
if (ex instanceof RequestNotFoundError)
|
|
230
|
+
return undefined;
|
|
231
|
+
throw this.handleException(ex, provider, scope);
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
async getPullRequestForBranch(provider, token, owner, repo, branch, options, cancellation) {
|
|
235
|
+
const scope = getScopedLogger();
|
|
236
|
+
try {
|
|
237
|
+
const fragment = `
|
|
238
|
+
nodes {
|
|
239
|
+
iid
|
|
240
|
+
author {
|
|
241
|
+
id
|
|
242
|
+
name
|
|
243
|
+
avatarUrl
|
|
244
|
+
webUrl
|
|
245
|
+
}
|
|
246
|
+
title
|
|
247
|
+
description
|
|
248
|
+
state
|
|
249
|
+
createdAt
|
|
250
|
+
updatedAt
|
|
251
|
+
mergedAt
|
|
252
|
+
webUrl
|
|
253
|
+
}`;
|
|
254
|
+
const query = `query getMergeRequestForBranch(
|
|
255
|
+
$fullPath: ID!
|
|
256
|
+
$branches: [String!]
|
|
257
|
+
) {
|
|
258
|
+
project(fullPath: $fullPath) {
|
|
259
|
+
${options?.include == null
|
|
260
|
+
? `mergeRequests(sourceBranches: $branches sort: UPDATED_DESC first: 1) {
|
|
261
|
+
${fragment}
|
|
262
|
+
}`
|
|
263
|
+
: ''}
|
|
264
|
+
${options?.include?.includes('opened')
|
|
265
|
+
? `opened: mergeRequests(sourceBranches: $branches state: opened sort: UPDATED_DESC first: 1) {
|
|
266
|
+
${fragment}
|
|
267
|
+
}`
|
|
268
|
+
: ''}
|
|
269
|
+
${options?.include?.includes('merged')
|
|
270
|
+
? `merged: mergeRequests(sourceBranches: $branches state: merged sort: UPDATED_DESC first: 1) {
|
|
271
|
+
${fragment}
|
|
272
|
+
}`
|
|
273
|
+
: ''}
|
|
274
|
+
${options?.include?.includes('closed')
|
|
275
|
+
? `closed: mergeRequests(sourceBranches: $branches state: closed sort: UPDATED_DESC first: 1) {
|
|
276
|
+
${fragment}
|
|
277
|
+
}`
|
|
278
|
+
: ''}
|
|
279
|
+
}
|
|
280
|
+
}`;
|
|
281
|
+
const rsp = await this.graphql(provider, token, options?.baseUrl, query, {
|
|
282
|
+
fullPath: `${owner}/${repo}`,
|
|
283
|
+
branches: [branch],
|
|
284
|
+
state: options?.include,
|
|
285
|
+
}, cancellation, scope);
|
|
286
|
+
let pr;
|
|
287
|
+
if (options?.include == null) {
|
|
288
|
+
pr = rsp?.data?.project?.mergeRequests?.nodes?.[0];
|
|
289
|
+
}
|
|
290
|
+
else {
|
|
291
|
+
for (const state of options.include) {
|
|
292
|
+
let mr;
|
|
293
|
+
if (state === 'opened') {
|
|
294
|
+
mr = rsp?.data?.project?.opened?.nodes?.[0];
|
|
295
|
+
}
|
|
296
|
+
else if (state === 'merged') {
|
|
297
|
+
mr = rsp?.data?.project?.merged?.nodes?.[0];
|
|
298
|
+
}
|
|
299
|
+
else if (state === 'closed') {
|
|
300
|
+
mr = rsp?.data?.project?.closed?.nodes?.[0];
|
|
301
|
+
}
|
|
302
|
+
if (mr != null && (pr == null || new Date(mr.updatedAt) > new Date(pr.updatedAt))) {
|
|
303
|
+
pr = mr;
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
if (pr == null)
|
|
308
|
+
return undefined;
|
|
309
|
+
return new PullRequest(provider, {
|
|
310
|
+
id: buildGitLabUserId(pr.author?.id) ?? '',
|
|
311
|
+
// An absent author stays absent: no `'Unknown'` name a consumer can't tell from a real one, and no
|
|
312
|
+
// `''` url/avatar that passes a presence check and renders as a link to nowhere. Matches
|
|
313
|
+
// `fromProviderAccount`/`toIssueShape`.
|
|
314
|
+
name: pr.author?.name ?? undefined,
|
|
315
|
+
avatarUrl: pr.author?.avatarUrl ?? undefined,
|
|
316
|
+
url: pr.author?.webUrl ?? undefined,
|
|
317
|
+
},
|
|
318
|
+
// oxlint-disable-next-line typescript/no-unnecessary-type-conversion
|
|
319
|
+
String(pr.iid), undefined, pr.title, pr.webUrl, { owner: owner, repo: repo }, fromGitLabMergeRequestState(pr.state), new Date(pr.createdAt), new Date(pr.updatedAt),
|
|
320
|
+
// TODO@eamodio this isn't right, but GitLab doesn't seem to provide a closedAt on merge requests in GraphQL
|
|
321
|
+
pr.state !== 'closed' ? undefined : new Date(pr.updatedAt), pr.mergedAt == null ? undefined : new Date(pr.mergedAt));
|
|
322
|
+
}
|
|
323
|
+
catch (ex) {
|
|
324
|
+
if (ex instanceof RequestNotFoundError)
|
|
325
|
+
return undefined;
|
|
326
|
+
throw this.handleException(ex, provider, scope);
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
async getPullRequestForCommit(provider, token, owner, repo, rev, options, cancellation) {
|
|
330
|
+
const scope = getScopedLogger();
|
|
331
|
+
const projectId = await this.getProjectId(provider, token, owner, repo, options?.baseUrl, cancellation);
|
|
332
|
+
if (!projectId)
|
|
333
|
+
return undefined;
|
|
334
|
+
try {
|
|
335
|
+
const mrs = await this.request(provider, token, options?.baseUrl, `v4/projects/${projectId}/repository/commits/${rev}/merge_requests`, {
|
|
336
|
+
method: 'GET',
|
|
337
|
+
// ...options,
|
|
338
|
+
}, cancellation, scope);
|
|
339
|
+
if (mrs == null || mrs.length === 0)
|
|
340
|
+
return undefined;
|
|
341
|
+
if (mrs.length > 1) {
|
|
342
|
+
mrs.sort((a, b) => (a.state === 'opened' ? -1 : 1) - (b.state === 'opened' ? -1 : 1) ||
|
|
343
|
+
new Date(b.updated_at).getTime() - new Date(a.updated_at).getTime());
|
|
344
|
+
}
|
|
345
|
+
return fromGitLabMergeRequestREST(mrs[0], provider, { owner: owner, repo: repo });
|
|
346
|
+
}
|
|
347
|
+
catch (ex) {
|
|
348
|
+
if (ex instanceof RequestNotFoundError)
|
|
349
|
+
return undefined;
|
|
350
|
+
throw this.handleException(ex, provider, scope);
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
async getPullRequest(provider, token, owner, repo, id, options, cancellation) {
|
|
354
|
+
const scope = getScopedLogger();
|
|
355
|
+
try {
|
|
356
|
+
const query = `query getMergeRequest(
|
|
357
|
+
$fullPath: ID!
|
|
358
|
+
$iid: String!
|
|
359
|
+
) {
|
|
360
|
+
project(fullPath: $fullPath) {
|
|
361
|
+
mergeRequest(iid: $iid) {
|
|
362
|
+
id,
|
|
363
|
+
iid
|
|
364
|
+
state,
|
|
365
|
+
author {
|
|
366
|
+
id
|
|
367
|
+
name
|
|
368
|
+
avatarUrl
|
|
369
|
+
webUrl
|
|
370
|
+
}
|
|
371
|
+
diffRefs {
|
|
372
|
+
baseSha
|
|
373
|
+
headSha
|
|
374
|
+
}
|
|
375
|
+
title
|
|
376
|
+
description
|
|
377
|
+
webUrl
|
|
378
|
+
createdAt
|
|
379
|
+
updatedAt
|
|
380
|
+
mergedAt
|
|
381
|
+
targetBranch
|
|
382
|
+
sourceBranch
|
|
383
|
+
project {
|
|
384
|
+
id
|
|
385
|
+
fullPath
|
|
386
|
+
webUrl
|
|
387
|
+
}
|
|
388
|
+
sourceProject {
|
|
389
|
+
id
|
|
390
|
+
fullPath
|
|
391
|
+
webUrl
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
}`;
|
|
396
|
+
const rsp = await this.graphql(provider, token, options?.baseUrl, query, {
|
|
397
|
+
fullPath: `${owner}/${repo}`,
|
|
398
|
+
iid: String(id),
|
|
399
|
+
}, cancellation, scope);
|
|
400
|
+
if (rsp?.data?.project?.mergeRequest == null)
|
|
401
|
+
return undefined;
|
|
402
|
+
const pr = rsp.data.project.mergeRequest;
|
|
403
|
+
return fromGitLabMergeRequest(pr, provider);
|
|
404
|
+
}
|
|
405
|
+
catch (ex) {
|
|
406
|
+
if (ex instanceof RequestNotFoundError)
|
|
407
|
+
return undefined;
|
|
408
|
+
throw this.handleException(ex, provider, scope);
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
async getRepositoryMetadata(provider, token, owner, repo, options, cancellation) {
|
|
412
|
+
const scope = getScopedLogger();
|
|
413
|
+
const projectId = await this.getProjectId(provider, token, owner, repo, options?.baseUrl, cancellation);
|
|
414
|
+
if (!projectId)
|
|
415
|
+
return undefined;
|
|
416
|
+
try {
|
|
417
|
+
const proj = await this.request(provider, token, options?.baseUrl, `v4/projects/${projectId}`, {
|
|
418
|
+
method: 'GET',
|
|
419
|
+
// ...options,
|
|
420
|
+
}, cancellation, scope);
|
|
421
|
+
if (proj == null)
|
|
422
|
+
return undefined;
|
|
423
|
+
return {
|
|
424
|
+
provider: provider,
|
|
425
|
+
owner: proj.namespace.full_path,
|
|
426
|
+
name: proj.path,
|
|
427
|
+
isFork: proj.forked_from_project != null,
|
|
428
|
+
parent: proj.forked_from_project != null
|
|
429
|
+
? {
|
|
430
|
+
owner: proj.forked_from_project.namespace.full_path,
|
|
431
|
+
name: proj.forked_from_project.path,
|
|
432
|
+
}
|
|
433
|
+
: undefined,
|
|
434
|
+
};
|
|
435
|
+
}
|
|
436
|
+
catch (ex) {
|
|
437
|
+
if (ex instanceof RequestNotFoundError)
|
|
438
|
+
return undefined;
|
|
439
|
+
throw this.handleException(ex, provider, scope);
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
async searchPullRequests(provider, token, options, cancellation) {
|
|
443
|
+
const scope = getScopedLogger();
|
|
444
|
+
const search = options?.search;
|
|
445
|
+
if (!search) {
|
|
446
|
+
return [];
|
|
447
|
+
}
|
|
448
|
+
try {
|
|
449
|
+
const perPageLimit = 20; // with bigger amount we exceed the max GraphQL complexity in the next query
|
|
450
|
+
const include = options?.include?.length ? options.include : undefined;
|
|
451
|
+
// GitLab's search API takes a single `state` value, so push it server-side when exactly one state is
|
|
452
|
+
// requested; that keeps the requested state from being crowded out of the `perPageLimit` slice. For
|
|
453
|
+
// multiple states there's no single-value qualifier, so those are filtered client-side below.
|
|
454
|
+
let searchPath = `v4/search/?scope=merge_requests&search=${encodeURIComponent(search)}&per_page=${perPageLimit}`;
|
|
455
|
+
if (include?.length === 1) {
|
|
456
|
+
searchPath += `&state=${encodeURIComponent(toGitLabMergeRequestState(include[0]))}`;
|
|
457
|
+
}
|
|
458
|
+
let restPRs;
|
|
459
|
+
if (include == null) {
|
|
460
|
+
// Unfiltered search returns the first page as-is (as it did before state filtering existed).
|
|
461
|
+
restPRs = await this.request(provider, token, options?.baseUrl, searchPath, { method: 'GET' }, cancellation, scope);
|
|
462
|
+
}
|
|
463
|
+
else {
|
|
464
|
+
// The search API returns MRs of all states in relevance order, so the requested state(s) may not
|
|
465
|
+
// appear on the first page. Server-side `&state=` narrows the single-state case when honored, but it
|
|
466
|
+
// can't express multiple states, so page through the results and accumulate matches until we fill the
|
|
467
|
+
// detail-query cap (`perPageLimit`) or exhaust the search results. This keeps correctness whether
|
|
468
|
+
// or not `&state=` takes effect. Bounded by `maxSearchPages` like the other paged provider drains in
|
|
469
|
+
// this package so a large, low-match result set can't fan out into an unbounded request loop.
|
|
470
|
+
const maxSearchPages = 20;
|
|
471
|
+
const matches = [];
|
|
472
|
+
for (let page = 1; page <= maxSearchPages; page++) {
|
|
473
|
+
const pagePRs = await this.request(provider, token, options?.baseUrl, `${searchPath}&page=${page}`, { method: 'GET' }, cancellation, scope);
|
|
474
|
+
for (const pr of pagePRs) {
|
|
475
|
+
if (include.includes(fromGitLabMergeRequestState(pr.state))) {
|
|
476
|
+
matches.push(pr);
|
|
477
|
+
if (matches.length >= perPageLimit)
|
|
478
|
+
break;
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
// Stop once we've filled the cap or hit the last (partial or empty) page.
|
|
482
|
+
if (matches.length >= perPageLimit || pagePRs.length < perPageLimit)
|
|
483
|
+
break;
|
|
484
|
+
}
|
|
485
|
+
restPRs = matches;
|
|
486
|
+
}
|
|
487
|
+
if (restPRs.length === 0) {
|
|
488
|
+
return [];
|
|
489
|
+
}
|
|
490
|
+
const queryArgs = restPRs.map((_, i) => `$id_${i}: MergeRequestID!`).join('\n');
|
|
491
|
+
const queryFields = restPRs
|
|
492
|
+
.map((_, i) => `mergeRequest_${i}: mergeRequest(id: $id_${i}) { ...mergeRequestFields }`)
|
|
493
|
+
.join('\n');
|
|
494
|
+
// Set of fields includes only additional fields that are not included in GitLabMergeRequestREST.
|
|
495
|
+
// It's limited as much as possible to reduce complexity of the query.
|
|
496
|
+
const queryMrFields = `fragment mergeRequestFields on MergeRequest {
|
|
497
|
+
diffRefs {
|
|
498
|
+
baseSha
|
|
499
|
+
headSha
|
|
500
|
+
}
|
|
501
|
+
project {
|
|
502
|
+
id
|
|
503
|
+
fullPath
|
|
504
|
+
webUrl
|
|
505
|
+
}
|
|
506
|
+
sourceProject {
|
|
507
|
+
id
|
|
508
|
+
fullPath
|
|
509
|
+
webUrl
|
|
510
|
+
}
|
|
511
|
+
}`;
|
|
512
|
+
const query = `query getMergeRequests (${queryArgs}) {${queryFields}} ${queryMrFields}`;
|
|
513
|
+
const params = restPRs.reduce((ids, gitlabRestPr, i) => {
|
|
514
|
+
ids[`id_${i}`] = `${gitlabMergeRequestIdPrefix}${gitlabRestPr.id}`;
|
|
515
|
+
return ids;
|
|
516
|
+
}, {});
|
|
517
|
+
const rsp = await this.graphql(provider, token, options?.baseUrl, query, params, cancellation, scope);
|
|
518
|
+
if (rsp?.data != null) {
|
|
519
|
+
const resultPRs = restPRs.reduce((accum, restPR, i) => {
|
|
520
|
+
const graphQlPR = rsp.data[`mergeRequest_${i}`];
|
|
521
|
+
if (graphQlPR == null) {
|
|
522
|
+
return accum;
|
|
523
|
+
}
|
|
524
|
+
const fullPr = {
|
|
525
|
+
...graphQlPR,
|
|
526
|
+
iid: String(restPR.iid),
|
|
527
|
+
id: String(restPR.id),
|
|
528
|
+
state: restPR.state,
|
|
529
|
+
// An absent REST author stays absent (`null`, as GitLab's own shape expresses it) rather than a
|
|
530
|
+
// synthesized `'Unknown'` stub: `fromGitLabMergeRequest` collapses `null` to an absent
|
|
531
|
+
// `PullRequestMember.name`, whereas a placeholder here would launder into a real-looking name.
|
|
532
|
+
author: restPR.author != null
|
|
533
|
+
? {
|
|
534
|
+
id: buildGitLabUserId(restPR.author.id) ?? '',
|
|
535
|
+
name: restPR.author.name,
|
|
536
|
+
avatarUrl: restPR.author.avatar_url ?? null,
|
|
537
|
+
webUrl: restPR.author.web_url,
|
|
538
|
+
}
|
|
539
|
+
: null,
|
|
540
|
+
title: restPR.title,
|
|
541
|
+
description: restPR.description,
|
|
542
|
+
webUrl: restPR.web_url,
|
|
543
|
+
createdAt: restPR.created_at,
|
|
544
|
+
updatedAt: restPR.updated_at,
|
|
545
|
+
mergedAt: restPR.merged_at,
|
|
546
|
+
sourceBranch: restPR.source_branch,
|
|
547
|
+
targetBranch: restPR.target_branch,
|
|
548
|
+
};
|
|
549
|
+
accum.push(fromGitLabMergeRequest(fullPr, provider));
|
|
550
|
+
return accum;
|
|
551
|
+
}, []);
|
|
552
|
+
return resultPRs;
|
|
553
|
+
}
|
|
554
|
+
return [];
|
|
555
|
+
}
|
|
556
|
+
catch (ex) {
|
|
557
|
+
if (ex instanceof RequestNotFoundError)
|
|
558
|
+
return [];
|
|
559
|
+
throw this.handleException(ex, provider, scope);
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
async findUser(provider, token, search, options, cancellation) {
|
|
563
|
+
const scope = getScopedLogger();
|
|
564
|
+
try {
|
|
565
|
+
const query = `query findUser(
|
|
566
|
+
$search: String!
|
|
567
|
+
) {
|
|
568
|
+
users(search: $search) {
|
|
569
|
+
nodes {
|
|
570
|
+
id
|
|
571
|
+
name
|
|
572
|
+
username,
|
|
573
|
+
publicEmail,
|
|
574
|
+
state
|
|
575
|
+
avatarUrl
|
|
576
|
+
webUrl
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
}`;
|
|
580
|
+
const rsp = await this.graphql(provider, token, options?.baseUrl, query, {
|
|
581
|
+
search: search,
|
|
582
|
+
}, cancellation, scope);
|
|
583
|
+
const matches = rsp?.data?.users?.nodes;
|
|
584
|
+
if (matches == null || matches.length === 0)
|
|
585
|
+
return [];
|
|
586
|
+
const users = [];
|
|
587
|
+
for (const user of matches) {
|
|
588
|
+
const match = /gid:\/\/gitlab\/User\/([0-9]+)\b/.exec(user.id);
|
|
589
|
+
if (match == null)
|
|
590
|
+
continue;
|
|
591
|
+
users.push({
|
|
592
|
+
id: parseInt(match[1], 10),
|
|
593
|
+
name: user.name,
|
|
594
|
+
username: user.username,
|
|
595
|
+
publicEmail: user.publicEmail || undefined,
|
|
596
|
+
state: user.state,
|
|
597
|
+
avatarUrl: user.avatarUrl,
|
|
598
|
+
webUrl: user.webUrl,
|
|
599
|
+
});
|
|
600
|
+
}
|
|
601
|
+
return users;
|
|
602
|
+
}
|
|
603
|
+
catch (ex) {
|
|
604
|
+
if (ex instanceof RequestNotFoundError)
|
|
605
|
+
return [];
|
|
606
|
+
this.handleException(ex, provider, scope);
|
|
607
|
+
return [];
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
getProjectId(provider, token, group, repo, baseUrl, cancellation) {
|
|
611
|
+
const { accessToken } = token;
|
|
612
|
+
const key = `${accessToken}|${group}/${repo}`;
|
|
613
|
+
let projectId = this._projectIds.get(key);
|
|
614
|
+
if (projectId == null) {
|
|
615
|
+
projectId = this.getProjectIdCore(provider, token, group, repo, baseUrl, cancellation);
|
|
616
|
+
this._projectIds.set(key, projectId);
|
|
617
|
+
}
|
|
618
|
+
return projectId;
|
|
619
|
+
}
|
|
620
|
+
async getProjectIdCore(provider, token, group, repo, baseUrl, cancellation) {
|
|
621
|
+
const scope = getScopedLogger();
|
|
622
|
+
try {
|
|
623
|
+
const query = `query getProjectId(
|
|
624
|
+
$fullPath: ID!
|
|
625
|
+
) {
|
|
626
|
+
project(fullPath: $fullPath) {
|
|
627
|
+
id
|
|
628
|
+
}
|
|
629
|
+
}`;
|
|
630
|
+
const rsp = await this.graphql(provider, token, baseUrl, query, {
|
|
631
|
+
fullPath: `${group}/${repo}`,
|
|
632
|
+
}, cancellation, scope);
|
|
633
|
+
const gid = rsp?.data?.project?.id;
|
|
634
|
+
if (gid == null)
|
|
635
|
+
return undefined;
|
|
636
|
+
const match = /gid:\/\/gitlab\/Project\/([0-9]+)\b/.exec(gid);
|
|
637
|
+
if (match == null)
|
|
638
|
+
return undefined;
|
|
639
|
+
const projectId = match[1];
|
|
640
|
+
scope?.addExitInfo(`projectId=${projectId}`);
|
|
641
|
+
return projectId;
|
|
642
|
+
}
|
|
643
|
+
catch (ex) {
|
|
644
|
+
if (ex instanceof RequestNotFoundError)
|
|
645
|
+
return undefined;
|
|
646
|
+
this.handleException(ex, provider, scope);
|
|
647
|
+
return undefined;
|
|
648
|
+
}
|
|
649
|
+
}
|
|
650
|
+
async graphql(provider, token, baseUrl, query, variables, cancellation, scope) {
|
|
651
|
+
const { accessToken } = token;
|
|
652
|
+
let rsp;
|
|
653
|
+
try {
|
|
654
|
+
const sw = maybeStopWatch(`[GITLAB] POST ${baseUrl}`, { log: { onlyExit: true } });
|
|
655
|
+
try {
|
|
656
|
+
if (cancellation?.aborted)
|
|
657
|
+
throw new CancellationError();
|
|
658
|
+
rsp = await this.config.wrapForForcedInsecureSSL(provider.getIgnoreSSLErrors(), () => this.config.fetch(`${baseUrl ?? 'https://gitlab.com/api'}/graphql`, {
|
|
659
|
+
method: 'POST',
|
|
660
|
+
headers: { Authorization: `Bearer ${accessToken}`, 'Content-Type': 'application/json' },
|
|
661
|
+
signal: cancellation,
|
|
662
|
+
body: JSON.stringify({ query: query, variables: variables }),
|
|
663
|
+
}));
|
|
664
|
+
if (rsp.ok) {
|
|
665
|
+
const data = (await rsp.json());
|
|
666
|
+
if ('errors' in data)
|
|
667
|
+
throw new ProviderFetchError('GitLab', rsp, data.errors);
|
|
668
|
+
return data;
|
|
669
|
+
}
|
|
670
|
+
// Reads the body so the 403 branch below can tell a throttled request from a permission failure.
|
|
671
|
+
throw await ProviderFetchError.fromResponse('GitLab', rsp);
|
|
672
|
+
}
|
|
673
|
+
finally {
|
|
674
|
+
const match = /(^[^({\n]+)/.exec(query);
|
|
675
|
+
const message = ` ${match?.[1].trim() ?? query}`;
|
|
676
|
+
sw?.stop({ message: message });
|
|
677
|
+
}
|
|
678
|
+
}
|
|
679
|
+
catch (ex) {
|
|
680
|
+
if (ex instanceof ProviderFetchError || ex.name === 'AbortError') {
|
|
681
|
+
this.handleRequestError(provider, token, ex, scope);
|
|
682
|
+
}
|
|
683
|
+
else if (Logger.isDebugging) {
|
|
684
|
+
this.config.onError?.(`GitLab request failed: ${ex.message}`);
|
|
685
|
+
}
|
|
686
|
+
throw ex;
|
|
687
|
+
}
|
|
688
|
+
}
|
|
689
|
+
async request(provider, token, baseUrl, route, options, cancellation, scope) {
|
|
690
|
+
const { accessToken } = token;
|
|
691
|
+
const url = `${baseUrl ?? 'https://gitlab.com/api'}/${route}`;
|
|
692
|
+
let rsp;
|
|
693
|
+
try {
|
|
694
|
+
const sw = maybeStopWatch(`[GITLAB] ${options?.method ?? 'GET'} ${url}`, { log: { onlyExit: true } });
|
|
695
|
+
try {
|
|
696
|
+
if (cancellation?.aborted)
|
|
697
|
+
throw new CancellationError();
|
|
698
|
+
rsp = await this.config.wrapForForcedInsecureSSL(provider.getIgnoreSSLErrors(), () => this.config.fetch(url, {
|
|
699
|
+
headers: { Authorization: `Bearer ${accessToken}`, 'Content-Type': 'application/json' },
|
|
700
|
+
signal: cancellation,
|
|
701
|
+
...options,
|
|
702
|
+
}));
|
|
703
|
+
if (rsp.ok) {
|
|
704
|
+
return (await rsp.json());
|
|
705
|
+
}
|
|
706
|
+
// Reads the body so the 403 branch below can tell a throttled request from a permission failure.
|
|
707
|
+
throw await ProviderFetchError.fromResponse('GitLab', rsp);
|
|
708
|
+
}
|
|
709
|
+
finally {
|
|
710
|
+
sw?.stop();
|
|
711
|
+
}
|
|
712
|
+
}
|
|
713
|
+
catch (ex) {
|
|
714
|
+
if (ex instanceof ProviderFetchError || ex.name === 'AbortError') {
|
|
715
|
+
this.handleRequestError(provider, token, ex, scope);
|
|
716
|
+
}
|
|
717
|
+
else if (Logger.isDebugging) {
|
|
718
|
+
this.config.onError?.(`GitLab request failed: ${ex.message}`);
|
|
719
|
+
}
|
|
720
|
+
throw ex;
|
|
721
|
+
}
|
|
722
|
+
}
|
|
723
|
+
handleRequestError(provider, token, ex, scope) {
|
|
724
|
+
if (ex.name === 'AbortError' || !(ex instanceof ProviderFetchError))
|
|
725
|
+
throw new CancellationError(ex);
|
|
726
|
+
const { accessToken, ...tokenInfo } = token;
|
|
727
|
+
switch (ex.status) {
|
|
728
|
+
case 404: // Not found
|
|
729
|
+
case 410: // Gone
|
|
730
|
+
case 422: // Unprocessable Entity
|
|
731
|
+
throw new RequestNotFoundError(ex);
|
|
732
|
+
case 429: // Too Many Requests
|
|
733
|
+
throw toRateLimitError(ex, accessToken);
|
|
734
|
+
case 401: // Unauthorized
|
|
735
|
+
throw new AuthenticationError(tokenInfo, AuthenticationErrorReason.Unauthorized, ex);
|
|
736
|
+
case 403: // Forbidden
|
|
737
|
+
// GitLab returns 403 for both a permission failure and a throttled request, so the message is the
|
|
738
|
+
// discriminant (see `isRateLimitResponse`, shared with Bitbucket/Azure).
|
|
739
|
+
if (isRateLimitResponse(ex))
|
|
740
|
+
throw toRateLimitError(ex, accessToken);
|
|
741
|
+
throw new AuthenticationError(tokenInfo, AuthenticationErrorReason.Forbidden, ex);
|
|
742
|
+
case 500: // Internal Server Error
|
|
743
|
+
scope?.error(ex);
|
|
744
|
+
if (ex.response != null) {
|
|
745
|
+
provider?.trackRequestException();
|
|
746
|
+
this.config.onRequestFailed?.(`${provider?.name ?? 'GitLab'} failed to respond and might be experiencing issues.${provider == null || provider.id === 'gitlab'
|
|
747
|
+
? ' Please visit the [GitLab status page](https://status.gitlab.com) for more information.'
|
|
748
|
+
: ''}`);
|
|
749
|
+
}
|
|
750
|
+
return;
|
|
751
|
+
case 502: // Bad Gateway
|
|
752
|
+
scope?.error(ex);
|
|
753
|
+
// GitHub seems to return this status code for timeouts
|
|
754
|
+
if (ex.message.includes('timeout')) {
|
|
755
|
+
provider?.trackRequestException();
|
|
756
|
+
this.config.onRequestTimedOut?.(provider?.name ?? 'GitLab');
|
|
757
|
+
return;
|
|
758
|
+
}
|
|
759
|
+
break;
|
|
760
|
+
default:
|
|
761
|
+
if (ex.status >= 400 && ex.status < 500)
|
|
762
|
+
throw new RequestClientError(ex);
|
|
763
|
+
break;
|
|
764
|
+
}
|
|
765
|
+
scope?.error(ex);
|
|
766
|
+
if (Logger.isDebugging) {
|
|
767
|
+
this.config.onError?.(`GitLab request failed: ${ex.response?.errors?.[0]?.message ?? ex.message}`);
|
|
768
|
+
}
|
|
769
|
+
}
|
|
770
|
+
handleException(ex, provider, scope) {
|
|
771
|
+
scope?.error(ex);
|
|
772
|
+
// debugger;
|
|
773
|
+
if (ex instanceof AuthenticationError) {
|
|
774
|
+
void this.showAuthenticationErrorMessage(ex, provider);
|
|
775
|
+
}
|
|
776
|
+
return ex;
|
|
777
|
+
}
|
|
778
|
+
async showAuthenticationErrorMessage(ex, provider) {
|
|
779
|
+
if (ex.reason === AuthenticationErrorReason.Unauthorized || ex.reason === AuthenticationErrorReason.Forbidden) {
|
|
780
|
+
const reauthenticate = await this.config.onReauthenticationRequired?.(`${ex.message}. Would you like to try reauthenticating${ex.reason === AuthenticationErrorReason.Forbidden ? ' to provide additional access' : ''}?`);
|
|
781
|
+
if (reauthenticate) {
|
|
782
|
+
await provider.reauthenticate();
|
|
783
|
+
this.resetCaches();
|
|
784
|
+
}
|
|
785
|
+
}
|
|
786
|
+
else {
|
|
787
|
+
this.config.onError?.(ex.message);
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
}
|
|
791
|
+
__decorate([
|
|
792
|
+
trace({
|
|
793
|
+
args: (provider, token, owner, repo, rev) => ({
|
|
794
|
+
provider: provider.name,
|
|
795
|
+
token: `<token:${token.microHash}>`,
|
|
796
|
+
owner: owner,
|
|
797
|
+
repo: repo,
|
|
798
|
+
rev: rev,
|
|
799
|
+
}),
|
|
800
|
+
})
|
|
801
|
+
], GitLabApi.prototype, "getAccountForCommit", null);
|
|
802
|
+
__decorate([
|
|
803
|
+
trace({
|
|
804
|
+
args: (provider, token, _owner, _repo, email) => ({
|
|
805
|
+
provider: provider.name,
|
|
806
|
+
token: `<token:${token.microHash}>`,
|
|
807
|
+
email: email,
|
|
808
|
+
}),
|
|
809
|
+
})
|
|
810
|
+
], GitLabApi.prototype, "getAccountForEmail", null);
|
|
811
|
+
__decorate([
|
|
812
|
+
trace({
|
|
813
|
+
args: (provider, token, userId) => ({
|
|
814
|
+
provider: provider.name,
|
|
815
|
+
token: `<token:${token.microHash}>`,
|
|
816
|
+
userId: userId,
|
|
817
|
+
}),
|
|
818
|
+
})
|
|
819
|
+
], GitLabApi.prototype, "getUserSigningKeys", null);
|
|
820
|
+
__decorate([
|
|
821
|
+
trace({
|
|
822
|
+
args: (provider, token, owner, repo) => ({
|
|
823
|
+
provider: provider.name,
|
|
824
|
+
token: `<token:${token.microHash}>`,
|
|
825
|
+
owner: owner,
|
|
826
|
+
repo: repo,
|
|
827
|
+
}),
|
|
828
|
+
})
|
|
829
|
+
], GitLabApi.prototype, "getDefaultBranch", null);
|
|
830
|
+
__decorate([
|
|
831
|
+
trace({
|
|
832
|
+
args: (provider, token, owner, repo, number) => ({
|
|
833
|
+
provider: provider.name,
|
|
834
|
+
token: `<token:${token.microHash}>`,
|
|
835
|
+
owner: owner,
|
|
836
|
+
repo: repo,
|
|
837
|
+
number: number,
|
|
838
|
+
}),
|
|
839
|
+
})
|
|
840
|
+
], GitLabApi.prototype, "getIssueOrPullRequest", null);
|
|
841
|
+
__decorate([
|
|
842
|
+
trace({
|
|
843
|
+
args: (provider, token, owner, repo, branch) => ({
|
|
844
|
+
provider: provider.name,
|
|
845
|
+
token: `<token:${token.microHash}>`,
|
|
846
|
+
owner: owner,
|
|
847
|
+
repo: repo,
|
|
848
|
+
branch: branch,
|
|
849
|
+
}),
|
|
850
|
+
})
|
|
851
|
+
], GitLabApi.prototype, "getPullRequestForBranch", null);
|
|
852
|
+
__decorate([
|
|
853
|
+
trace({
|
|
854
|
+
args: (provider, token, owner, repo, rev) => ({
|
|
855
|
+
provider: provider.name,
|
|
856
|
+
token: `<token:${token.microHash}>`,
|
|
857
|
+
owner: owner,
|
|
858
|
+
repo: repo,
|
|
859
|
+
rev: rev,
|
|
860
|
+
}),
|
|
861
|
+
})
|
|
862
|
+
], GitLabApi.prototype, "getPullRequestForCommit", null);
|
|
863
|
+
__decorate([
|
|
864
|
+
trace({
|
|
865
|
+
args: (provider, token, owner, repo, id) => ({
|
|
866
|
+
provider: provider.name,
|
|
867
|
+
token: `<token:${token.microHash}>`,
|
|
868
|
+
owner: owner,
|
|
869
|
+
repo: repo,
|
|
870
|
+
id: id,
|
|
871
|
+
}),
|
|
872
|
+
})
|
|
873
|
+
], GitLabApi.prototype, "getPullRequest", null);
|
|
874
|
+
__decorate([
|
|
875
|
+
trace({
|
|
876
|
+
args: (provider, token, owner, repo) => ({
|
|
877
|
+
provider: provider.name,
|
|
878
|
+
token: `<token:${token.microHash}>`,
|
|
879
|
+
owner: owner,
|
|
880
|
+
repo: repo,
|
|
881
|
+
}),
|
|
882
|
+
})
|
|
883
|
+
], GitLabApi.prototype, "getRepositoryMetadata", null);
|
|
884
|
+
__decorate([
|
|
885
|
+
trace({ args: (provider, token) => ({ provider: provider.name, token: `<token:${token.microHash}>` }) })
|
|
886
|
+
], GitLabApi.prototype, "searchPullRequests", null);
|
|
887
|
+
/** Wires a {@link GitLabApi} from the full runtime context, mapping `ctx` down to the narrow config. */
|
|
888
|
+
export function createGitLabApi(ctx) {
|
|
889
|
+
const config = {
|
|
890
|
+
...baseProviderApiConfig(ctx),
|
|
891
|
+
// Self-hosted GitLab keys its API base off `remotes`, so reset on both HTTP proxy and remotes changes.
|
|
892
|
+
onConfigChanged: listener => ctx.config.onDidChange(e => {
|
|
893
|
+
if (e.httpProxy || e.remotes) {
|
|
894
|
+
listener();
|
|
895
|
+
}
|
|
896
|
+
}),
|
|
897
|
+
onReauthenticationRequired: message => ctx.hooks?.onReauthenticationRequired?.(message) ?? Promise.resolve(false),
|
|
898
|
+
onRequestTimedOut: providerName => ctx.hooks?.ui?.onRequestTimedOut?.(providerName),
|
|
899
|
+
};
|
|
900
|
+
return new GitLabApi(config);
|
|
901
|
+
}
|
|
902
|
+
//# sourceMappingURL=gitlab.js.map
|