@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,407 @@
|
|
|
1
|
+
import type { IssueShape } from '../../../git/models/issue.js';
|
|
2
|
+
import { mergeAssessmentInto } from '../collectionMetadata.js';
|
|
3
|
+
import { GitCloudHostIntegrationId, GitSelfManagedHostIntegrationId, type IntegrationIds } from '../constants.js';
|
|
4
|
+
import { IssueFilter, PagingMode, providersMetadata, type ProviderReposInput } from '../providers/models.js';
|
|
5
|
+
import { mergeCollectionMetadata } from '../providers/utils/providerPaging.js';
|
|
6
|
+
import type { ProviderPagedResult, ProviderWarning } from '../results.js';
|
|
7
|
+
import { appendDedupedWarning } from '../results.js';
|
|
8
|
+
import {
|
|
9
|
+
isGitHostIntegration,
|
|
10
|
+
isIssuesHostIntegrationId,
|
|
11
|
+
warnOnMissingSessionForDomain,
|
|
12
|
+
} from '../utils/integration.utils.js';
|
|
13
|
+
import type { ProviderReadContext } from './context.js';
|
|
14
|
+
import { runCaptured } from './drains.js';
|
|
15
|
+
import { resolveAccountWideIssueFilters } from './filters.js';
|
|
16
|
+
import {
|
|
17
|
+
drainToRequestedPage,
|
|
18
|
+
isPageNumberAdvanceable,
|
|
19
|
+
pageToCursor,
|
|
20
|
+
refusedPage,
|
|
21
|
+
resolveContinuation,
|
|
22
|
+
resolveCurrentPage,
|
|
23
|
+
toProviderPageInfo,
|
|
24
|
+
usableCursor,
|
|
25
|
+
} from './paging.js';
|
|
26
|
+
import {
|
|
27
|
+
gitHostOnlySurfaceWarning,
|
|
28
|
+
issuesUnsupportedWarning,
|
|
29
|
+
otherWarning,
|
|
30
|
+
truncationWarning,
|
|
31
|
+
unsupportedAccountWideIssueFiltersWarning,
|
|
32
|
+
} from './warnings.js';
|
|
33
|
+
|
|
34
|
+
export async function listIssuesPage(
|
|
35
|
+
ctx: ProviderReadContext,
|
|
36
|
+
options: {
|
|
37
|
+
providerId: IntegrationIds;
|
|
38
|
+
repos?: ProviderReposInput;
|
|
39
|
+
/** Narrows the account-wide read to one org/account. Requires a host with a project layer (Azure). */
|
|
40
|
+
org?: string;
|
|
41
|
+
/** Narrows the account-wide read to one project. Requires a host with a project layer (Azure). */
|
|
42
|
+
project?: string;
|
|
43
|
+
/**
|
|
44
|
+
* Narrows to the requested relationship(s). On the account-wide path this replaces the provider's own
|
|
45
|
+
* definition of "my issues" (GitHub/GHE: authored ∪ assigned ∪ mentioned; Azure: assigned ∪ authored;
|
|
46
|
+
* GitLab: assigned-to-me), so `[Assignee]` yields `assignee:@me` everywhere it's expressible. A set the
|
|
47
|
+
* provider can't express server-side is refused whole (warning + `fetchFailed`), never widened — check
|
|
48
|
+
* getSupportedFilters first to avoid that path.
|
|
49
|
+
*/
|
|
50
|
+
filters?: IssueFilter[];
|
|
51
|
+
/** Broadens the read to every assignee. Contradicts `filters`; passing both is refused. */
|
|
52
|
+
includeAllAssignees?: boolean;
|
|
53
|
+
page?: number;
|
|
54
|
+
cursor?: string;
|
|
55
|
+
itemsPerPage?: number;
|
|
56
|
+
forceSync?: boolean;
|
|
57
|
+
connectionId?: string;
|
|
58
|
+
/**
|
|
59
|
+
* Explicit self-managed host domain. Used only when the requested connection has no configured domain;
|
|
60
|
+
* it must come from the trusted authentication configuration, not repository or remote data.
|
|
61
|
+
*/
|
|
62
|
+
domain?: string;
|
|
63
|
+
},
|
|
64
|
+
): Promise<ProviderPagedResult<IssueShape>> {
|
|
65
|
+
const page = Math.max(1, options.page ?? 1);
|
|
66
|
+
if (isIssuesHostIntegrationId(options.providerId)) {
|
|
67
|
+
return refusedPage(
|
|
68
|
+
page,
|
|
69
|
+
[gitHostOnlySurfaceWarning(options.providerId, undefined, options.connectionId, 'repository issue reads')],
|
|
70
|
+
true,
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
const integration = await ctx.getIntegrationForRead(options.providerId, options.connectionId, options.domain);
|
|
75
|
+
if (integration == null) {
|
|
76
|
+
// A supplied connection or domain that no longer resolves is a broken target, not an empty account —
|
|
77
|
+
// surface a no-connection warning + fetchFailed rather than a silent empty page.
|
|
78
|
+
const early = ctx.earlyReturnConnectionWarnings(options.providerId, options.connectionId, options.domain);
|
|
79
|
+
return refusedPage(page, early.warnings, early.fetchFailed);
|
|
80
|
+
}
|
|
81
|
+
if (!isGitHostIntegration(integration)) {
|
|
82
|
+
return refusedPage(
|
|
83
|
+
page,
|
|
84
|
+
[gitHostOnlySurfaceWarning(options.providerId, undefined, options.connectionId, 'repository issue reads')],
|
|
85
|
+
true,
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
await ctx.forceRefreshIfRequested(integration, options.forceSync, options.connectionId);
|
|
90
|
+
|
|
91
|
+
const domain = ctx.domainForRead(integration, options.providerId, options.connectionId, options.domain);
|
|
92
|
+
const warnOnMissingSession = warnOnMissingSessionForDomain(options.providerId, options.domain);
|
|
93
|
+
|
|
94
|
+
// A git host whose issue tracker is deprecated (Bitbucket, superseded by dedicated issue integrations)
|
|
95
|
+
// reports issues as explicitly unsupported rather than serving a partial/legacy source or a silent empty.
|
|
96
|
+
if (!integration.supportsIssues) {
|
|
97
|
+
return refusedPage(page, [issuesUnsupportedWarning(options.providerId, domain, options.connectionId)], true);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
const accountWide = (options.repos?.length ?? 0) === 0;
|
|
101
|
+
|
|
102
|
+
if (accountWide) {
|
|
103
|
+
// The account-wide read is cursor-only, so a refusal can't claim the requested position — it reports
|
|
104
|
+
// page 1, per ProviderPageInfo.currentPage.
|
|
105
|
+
const refused = (warning: ProviderWarning) => refusedPage<IssueShape>(1, [warning], true);
|
|
106
|
+
|
|
107
|
+
// Checked before the provider-specific guards below: a caller passing both has a contradictory request
|
|
108
|
+
// whatever the provider, and saying so is more useful than reporting one half of it as unsupported.
|
|
109
|
+
// `filters` narrows this read to a relationship (`[Assignee]` ⇒ just assigned-to-me); `includeAllAssignees`
|
|
110
|
+
// broadens it to every assignee. Honoring either silently would answer a question the caller didn't ask.
|
|
111
|
+
if (options.filters?.length && options.includeAllAssignees === true) {
|
|
112
|
+
return refused(
|
|
113
|
+
otherWarning(
|
|
114
|
+
options.providerId,
|
|
115
|
+
domain,
|
|
116
|
+
options.connectionId,
|
|
117
|
+
'`filters` and `includeAllAssignees` are contradictory for an account-wide issue read; pass only one.',
|
|
118
|
+
),
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
if (
|
|
123
|
+
options.includeAllAssignees === true &&
|
|
124
|
+
(options.providerId === GitCloudHostIntegrationId.GitHub ||
|
|
125
|
+
options.providerId === GitSelfManagedHostIntegrationId.CloudGitHubEnterprise)
|
|
126
|
+
) {
|
|
127
|
+
return refused(
|
|
128
|
+
otherWarning(
|
|
129
|
+
options.providerId,
|
|
130
|
+
domain,
|
|
131
|
+
options.connectionId,
|
|
132
|
+
'`includeAllAssignees` is not supported for account-wide GitHub issue reads; scope the read to repositories instead.',
|
|
133
|
+
),
|
|
134
|
+
);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
// Only a host with a project layer can narrow server-side. Reject the request rather than serving an
|
|
138
|
+
// unscoped list as if it had been narrowed: the caller would otherwise have to filter client-side,
|
|
139
|
+
// which desynchronizes the filtered `items` from this read's `hasMore`/`currentPage` and shows
|
|
140
|
+
// "no issues" for a page that simply held none of the requested project's.
|
|
141
|
+
if ((options.org != null || options.project != null) && !integration.supportsProjectDiscovery) {
|
|
142
|
+
return refused(
|
|
143
|
+
otherWarning(
|
|
144
|
+
options.providerId,
|
|
145
|
+
domain,
|
|
146
|
+
options.connectionId,
|
|
147
|
+
`Project-scoped issue reads are not supported by '${options.providerId}'; scope the read to repositories instead.`,
|
|
148
|
+
),
|
|
149
|
+
);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
// Narrowing the account-wide read is only honest when the provider can express it server-side: its
|
|
153
|
+
// per-relationship queries produced the page and the cursor together, so dropping items afterward would
|
|
154
|
+
// leave `items` describing a different result set than `hasMore`/`currentPage`.
|
|
155
|
+
const resolvedIssueFilters = resolveAccountWideIssueFilters(options.providerId, options.filters);
|
|
156
|
+
if (resolvedIssueFilters.unsupported) {
|
|
157
|
+
return refused(
|
|
158
|
+
unsupportedAccountWideIssueFiltersWarning(
|
|
159
|
+
options.providerId,
|
|
160
|
+
domain,
|
|
161
|
+
options.connectionId,
|
|
162
|
+
options.filters!,
|
|
163
|
+
),
|
|
164
|
+
);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
// The repo-scoped core rejects empty repos (GitHub/Bitbucket/Azure); read the account-wide,
|
|
168
|
+
// already-user-scoped core instead. GitHub exposes a composite cursor across its authored,
|
|
169
|
+
// assigned, and mentioned searches. Walk it internally when the caller supplies only page N.
|
|
170
|
+
const readAccountWidePage = (cursor: string | undefined) =>
|
|
171
|
+
runCaptured(
|
|
172
|
+
options.providerId,
|
|
173
|
+
domain,
|
|
174
|
+
options.connectionId,
|
|
175
|
+
() =>
|
|
176
|
+
integration.searchMyIssuesWithTruncationResult(undefined, undefined, options.connectionId, {
|
|
177
|
+
includeAllAssignees: options.includeAllAssignees,
|
|
178
|
+
filters: resolvedIssueFilters.filters,
|
|
179
|
+
cursor: cursor,
|
|
180
|
+
org: options.org,
|
|
181
|
+
project: options.project,
|
|
182
|
+
}),
|
|
183
|
+
{ warnOnMissingSession: warnOnMissingSession },
|
|
184
|
+
);
|
|
185
|
+
const first = await readAccountWidePage(options.cursor);
|
|
186
|
+
let value = first.value;
|
|
187
|
+
const warnings = first.warning != null ? [first.warning] : [];
|
|
188
|
+
let allMetadata = value?.metadata;
|
|
189
|
+
let pageFetchFailed = first.warning != null && value == null;
|
|
190
|
+
let currentPage = value?.page ?? 1;
|
|
191
|
+
let currentTruncated = value?.truncated ?? false;
|
|
192
|
+
let requestedPageMissing = false;
|
|
193
|
+
if (options.cursor == null && page > 1 && value != null) {
|
|
194
|
+
// Guard against the empty-cursor sentinel: a provider that claims another page without handing
|
|
195
|
+
// back a usable cursor would otherwise be re-read with `'{}'` and answer with page 1 again.
|
|
196
|
+
for (
|
|
197
|
+
let nextCursor = usableCursor(value.cursor);
|
|
198
|
+
currentPage < page && value.hasMore && nextCursor != null;
|
|
199
|
+
nextCursor = usableCursor(value.cursor)
|
|
200
|
+
) {
|
|
201
|
+
const next = await readAccountWidePage(nextCursor);
|
|
202
|
+
if (next.warning != null) {
|
|
203
|
+
appendDedupedWarning(warnings, next.warning);
|
|
204
|
+
}
|
|
205
|
+
if (next.value == null) {
|
|
206
|
+
pageFetchFailed = pageFetchFailed || next.warning != null;
|
|
207
|
+
value = undefined;
|
|
208
|
+
requestedPageMissing = true;
|
|
209
|
+
break;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
value = next.value;
|
|
213
|
+
allMetadata = mergeCollectionMetadata(allMetadata, value.metadata);
|
|
214
|
+
currentTruncated = currentTruncated || value.truncated;
|
|
215
|
+
currentPage = value.page ?? currentPage + 1;
|
|
216
|
+
// A provider that hands back the same cursor isn't advancing; stop rather than loop forever.
|
|
217
|
+
if (usableCursor(value.cursor) === nextCursor) {
|
|
218
|
+
currentTruncated = true;
|
|
219
|
+
break;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
// A numbered page beyond the provider's terminal cursor is genuinely empty. Never return or
|
|
224
|
+
// relabel the last available page as the requested one.
|
|
225
|
+
if (currentPage < page) {
|
|
226
|
+
requestedPageMissing = true;
|
|
227
|
+
}
|
|
228
|
+
} else if (options.cursor == null && page > 1) {
|
|
229
|
+
requestedPageMissing = true;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
// GitHub, GitLab, and Azure implement an account-wide issue search; a provider that doesn't (Bitbucket
|
|
233
|
+
// exposes no issues at all, and `supportsIssues` already short-circuits it above) returns `undefined`
|
|
234
|
+
// with no error. Surface that as an explicit unsupported warning + fetchFailed rather than a silent
|
|
235
|
+
// empty success — the caller must fall back (e.g. broadenIssues over repos).
|
|
236
|
+
if (value == null && warnings.length === 0) {
|
|
237
|
+
return refused(
|
|
238
|
+
otherWarning(
|
|
239
|
+
options.providerId,
|
|
240
|
+
domain,
|
|
241
|
+
options.connectionId,
|
|
242
|
+
`Account-wide issue search is not supported by '${options.providerId}'; scope the read to repositories instead.`,
|
|
243
|
+
),
|
|
244
|
+
);
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
const items = requestedPageMissing ? [] : (value?.values ?? []);
|
|
248
|
+
// Fold in structured per-scope failures from the account-wide fan-out (e.g. Azure across projects):
|
|
249
|
+
// scope-aware warnings + `fetchFailed` when a scope failed, without discarding the successful items.
|
|
250
|
+
const assessment = mergeAssessmentInto(warnings, options.providerId, domain, options.connectionId, allMetadata);
|
|
251
|
+
// An account-wide search that couldn't confirm completeness (a provider cap with no cursor, or a
|
|
252
|
+
// per-scope backstop/failure) is incomplete and can't be paged; report it as truncated (+ a
|
|
253
|
+
// provider-neutral warning, unless a structured failure already explains it) rather than a complete
|
|
254
|
+
// list. Don't hard-code GitHub's "100 per category" cap here — Azure reaches this via a per-project
|
|
255
|
+
// backstop, and other providers may cap differently.
|
|
256
|
+
// The account-wide read is cursor-only (its composite cursor spans several provider searches, so a
|
|
257
|
+
// page number can't address it): `hasMore` without a real cursor is a dead end, so report it as
|
|
258
|
+
// terminal-but-incomplete rather than inviting the caller to page forever.
|
|
259
|
+
const continuation = resolveContinuation(
|
|
260
|
+
{
|
|
261
|
+
hasMore: requestedPageMissing ? false : (value?.hasMore ?? false),
|
|
262
|
+
cursor: requestedPageMissing ? undefined : usableCursor(value?.cursor),
|
|
263
|
+
truncated: currentTruncated,
|
|
264
|
+
},
|
|
265
|
+
undefined,
|
|
266
|
+
);
|
|
267
|
+
const truncated = continuation.truncated || assessment.truncated;
|
|
268
|
+
if (truncated && warnings.length === 0) {
|
|
269
|
+
warnings.push(
|
|
270
|
+
otherWarning(
|
|
271
|
+
options.providerId,
|
|
272
|
+
domain,
|
|
273
|
+
options.connectionId,
|
|
274
|
+
`Account-wide issue search for '${options.providerId}' was truncated; results may be incomplete.`,
|
|
275
|
+
),
|
|
276
|
+
);
|
|
277
|
+
}
|
|
278
|
+
return {
|
|
279
|
+
items: items,
|
|
280
|
+
warnings: warnings,
|
|
281
|
+
page: {
|
|
282
|
+
// Positional, per ProviderPageInfo.currentPage. `currentPage` already carries what the provider
|
|
283
|
+
// reported or what the internal drain counted; a requested page past the terminal cursor is
|
|
284
|
+
// reported as that empty page N. The account-wide read is cursor-only, so a `page` the caller
|
|
285
|
+
// didn't pair with a cursor is never echoed.
|
|
286
|
+
currentPage: requestedPageMissing
|
|
287
|
+
? page
|
|
288
|
+
: resolveCurrentPage({
|
|
289
|
+
providerPage: currentPage,
|
|
290
|
+
requestedPage: page,
|
|
291
|
+
suppliedCursor: options.cursor,
|
|
292
|
+
pageAdvanceable: false,
|
|
293
|
+
}),
|
|
294
|
+
itemsPerPage: items.length,
|
|
295
|
+
truncated: truncated || undefined,
|
|
296
|
+
},
|
|
297
|
+
hasMore: continuation.hasMore,
|
|
298
|
+
cursor: continuation.cursor,
|
|
299
|
+
fetchFailed: assessment.fetchFailed || pageFetchFailed || undefined,
|
|
300
|
+
};
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
const cursor = options.cursor ?? pageToCursor(page);
|
|
304
|
+
const { value, warning } = await runCaptured(
|
|
305
|
+
options.providerId,
|
|
306
|
+
domain,
|
|
307
|
+
options.connectionId,
|
|
308
|
+
() =>
|
|
309
|
+
// The shapes seam returns normalized IssueShape, and is overridable by a provider whose only issue
|
|
310
|
+
// client already yields shapes (serving this path without a raw ProviderIssue round-trip).
|
|
311
|
+
integration.getMyIssuesForReposAsShapesResult(
|
|
312
|
+
options.repos ?? [],
|
|
313
|
+
// Forward `page`/`pageSize` alongside the cursor so PagingMode.Repo/Project hosts honor the
|
|
314
|
+
// requested page and page size rather than ignoring a synthesized page-number cursor.
|
|
315
|
+
{
|
|
316
|
+
filters: options.filters,
|
|
317
|
+
includeAllAssignees: options.includeAllAssignees,
|
|
318
|
+
cursor: cursor,
|
|
319
|
+
page: options.page,
|
|
320
|
+
pageSize: options.itemsPerPage,
|
|
321
|
+
},
|
|
322
|
+
options.connectionId,
|
|
323
|
+
),
|
|
324
|
+
{ warnOnMissingSession: warnOnMissingSession },
|
|
325
|
+
);
|
|
326
|
+
|
|
327
|
+
let items = value?.values ?? [];
|
|
328
|
+
const warnings = warning != null ? [warning] : [];
|
|
329
|
+
let pageFetchFailed = warning != null && value == null;
|
|
330
|
+
let paged = toProviderPageInfo(options.itemsPerPage ?? items.length, value?.paging);
|
|
331
|
+
let allMetadata = value?.metadata;
|
|
332
|
+
|
|
333
|
+
// Cursor-only repo-scoped hosts (e.g. GitHub) ignore a synthesized page-number cursor, so a page-only
|
|
334
|
+
// request is advanced through the provider's own continuations (see drainToRequestedPage).
|
|
335
|
+
if (
|
|
336
|
+
providersMetadata[options.providerId]?.issuesPagingMode === PagingMode.Repos &&
|
|
337
|
+
options.page != null &&
|
|
338
|
+
options.page > 1 &&
|
|
339
|
+
options.cursor == null &&
|
|
340
|
+
paged.page.currentPage === 1
|
|
341
|
+
) {
|
|
342
|
+
const drained = await drainToRequestedPage(
|
|
343
|
+
{ items: items, paged: paged, metadata: allMetadata, fetchFailed: pageFetchFailed },
|
|
344
|
+
{
|
|
345
|
+
requestedPage: options.page,
|
|
346
|
+
itemsPerPage: options.itemsPerPage,
|
|
347
|
+
warnings: warnings,
|
|
348
|
+
readPage: (cursor: string) =>
|
|
349
|
+
runCaptured(
|
|
350
|
+
options.providerId,
|
|
351
|
+
domain,
|
|
352
|
+
options.connectionId,
|
|
353
|
+
() =>
|
|
354
|
+
integration.getMyIssuesForReposAsShapesResult(
|
|
355
|
+
options.repos ?? [],
|
|
356
|
+
{
|
|
357
|
+
filters: options.filters,
|
|
358
|
+
includeAllAssignees: options.includeAllAssignees,
|
|
359
|
+
cursor: cursor,
|
|
360
|
+
pageSize: options.itemsPerPage,
|
|
361
|
+
},
|
|
362
|
+
options.connectionId,
|
|
363
|
+
),
|
|
364
|
+
{ warnOnMissingSession: warnOnMissingSession },
|
|
365
|
+
),
|
|
366
|
+
},
|
|
367
|
+
);
|
|
368
|
+
items = drained.items;
|
|
369
|
+
paged = drained.paged;
|
|
370
|
+
allMetadata = drained.metadata;
|
|
371
|
+
pageFetchFailed = drained.fetchFailed;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
// Convert the SDK collection metadata into scope-aware warnings + failure/truncation flags, appending
|
|
375
|
+
// them to any captured thrown-error warning without discarding the partial result's items.
|
|
376
|
+
const assessment = mergeAssessmentInto(warnings, options.providerId, domain, options.connectionId, allMetadata);
|
|
377
|
+
// Never advertise `hasMore` without a continuation the caller can act on, and only synthesize a page
|
|
378
|
+
// number for a host that reads it as one (see `isPageNumberAdvanceable`).
|
|
379
|
+
const issuesPageAdvanceable = isPageNumberAdvanceable(providersMetadata[options.providerId]?.issuesPagingMode);
|
|
380
|
+
const continuation = resolveContinuation(paged, issuesPageAdvanceable ? paged.page.currentPage + 1 : undefined);
|
|
381
|
+
// A provider read that couldn't confirm completeness (e.g. Bitbucket's single-page repo issue read
|
|
382
|
+
// that dropped a repo) sets `paging.truncated`; surface it as a terminal `page.truncated` so a partial
|
|
383
|
+
// page isn't published as complete. Metadata incompleteness is an independent source of the same signal.
|
|
384
|
+
const truncated = continuation.truncated || assessment.truncated;
|
|
385
|
+
if (truncated && warnings.length === 0) {
|
|
386
|
+
warnings.push(truncationWarning(options.providerId, domain, options.connectionId, 'Issue'));
|
|
387
|
+
}
|
|
388
|
+
return {
|
|
389
|
+
items: items,
|
|
390
|
+
warnings: warnings,
|
|
391
|
+
page: {
|
|
392
|
+
...paged.page,
|
|
393
|
+
// Positional, per ProviderPageInfo.currentPage: the drain (above) already advanced `paged.page` for
|
|
394
|
+
// a cursor-only host, and a caller-threaded cursor advanced the provider without one.
|
|
395
|
+
currentPage: resolveCurrentPage({
|
|
396
|
+
providerPage: paged.page.currentPage,
|
|
397
|
+
requestedPage: page,
|
|
398
|
+
suppliedCursor: options.cursor,
|
|
399
|
+
pageAdvanceable: issuesPageAdvanceable,
|
|
400
|
+
}),
|
|
401
|
+
truncated: truncated || undefined,
|
|
402
|
+
},
|
|
403
|
+
hasMore: continuation.hasMore,
|
|
404
|
+
cursor: continuation.cursor,
|
|
405
|
+
fetchFailed: assessment.fetchFailed || pageFetchFailed || undefined,
|
|
406
|
+
};
|
|
407
|
+
}
|
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
import type { CollectionMetadata } from '@gitkraken/provider-apis';
|
|
2
|
+
import type { PagedResult } from '../../../utils/paging.js';
|
|
3
|
+
import { PagingMode } from '../providers/models.js';
|
|
4
|
+
import { mergeCollectionMetadata, parsePageCursor, toPageCursor } from '../providers/utils/providerPaging.js';
|
|
5
|
+
import type { ProviderPagedResult, ProviderPageInfo, ProviderWarning } from '../results.js';
|
|
6
|
+
import { appendDedupedWarning } from '../results.js';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* The paging mechanics shared by every paged read on the provider facade: translating the SDK's `paging` into
|
|
10
|
+
* the page-oriented shape consumers get, deciding what position and what continuation a page may honestly
|
|
11
|
+
* claim, and walking a cursor-only read forward to a requested page number.
|
|
12
|
+
*
|
|
13
|
+
* Kept in one module because the value of these rules is that they are the SAME on every read — the contract
|
|
14
|
+
* they implement is documented once on {@link ProviderPageInfo} and on `IntegrationManager`'s paging section.
|
|
15
|
+
* Copies of them drifting apart is exactly the defect this consolidation removed.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Whether a repo-scoped read for this provider ADVANCES on a page number, so the facade may synthesize a
|
|
20
|
+
* page-number cursor, `page.currentPage` may echo the request, and a next-page number is a usable continuation.
|
|
21
|
+
*
|
|
22
|
+
* Only `PagingMode.Repos` (GitHub/GHE) is excluded: its read is cursor-only, so it accepts a page number and
|
|
23
|
+
* ignores it, answering with page 1 — which is why {@link drainToRequestedPage} exists for that mode.
|
|
24
|
+
*
|
|
25
|
+
* Every other provider, including one with no declared mode (Bitbucket Data Center), reads `page` as a 1-based
|
|
26
|
+
* page number. That last part is only true as of `@gitkraken/provider-apis` 0.54.0: before it, Bitbucket Data
|
|
27
|
+
* Center consumed `page` as a raw `start` ITEM OFFSET, so a synthesized page 3 asked for `start=3` — a window
|
|
28
|
+
* overlapping page 1 — and this facade had to withhold the synthesized cursor from it. The SDK now converts
|
|
29
|
+
* (`start = (page - 1) * limit`) and reports `nextPage` as a page number, so the guard is gone and that host
|
|
30
|
+
* can be advanced by number like the rest.
|
|
31
|
+
*/
|
|
32
|
+
export function isPageNumberAdvanceable(mode: PagingMode | undefined): boolean {
|
|
33
|
+
return mode !== PagingMode.Repos;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Encodes a 1-based page number as the opaque cursor the provider paging layer understands, via the same
|
|
38
|
+
* {@link toPageCursor} the providers encode with (its `parsePageCursor` counterpart is what reads these back).
|
|
39
|
+
* Page 1 needs no cursor: it is the read's own starting position.
|
|
40
|
+
*/
|
|
41
|
+
export function pageToCursor(page: number | undefined): string | undefined {
|
|
42
|
+
return page == null || page <= 1 ? undefined : toPageCursor(page);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Filters out the provider paging layer's empty-cursor sentinel. `providersApi` seeds its next-cursor with
|
|
47
|
+
* `'{}'` and leaves it there when the SDK reports another page without an `endCursor`, so `'{}'` means "no
|
|
48
|
+
* usable continuation" and must never be threaded back as one.
|
|
49
|
+
*/
|
|
50
|
+
export function usableCursor(cursor: string | undefined): string | undefined {
|
|
51
|
+
return cursor == null || cursor === '{}' ? undefined : cursor;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* The terminal page a paged read returns when it refuses the request outright — the surface doesn't apply (an
|
|
56
|
+
* issue tracker asked for a repo read), the target couldn't be resolved, a capability is missing, or a filter
|
|
57
|
+
* set isn't expressible server-side. Every one of those is "no page was served": empty `items`, no continuation,
|
|
58
|
+
* and the reason carried in `warnings`.
|
|
59
|
+
*
|
|
60
|
+
* `currentPage` stays a caller-supplied parameter rather than being derived here because the refusals differ on
|
|
61
|
+
* what position they can honestly claim: a read the provider advances by page number reports the requested page,
|
|
62
|
+
* while a cursor-only account-wide read has no addressable position and reports 1 (see
|
|
63
|
+
* {@link ProviderPageInfo.currentPage}).
|
|
64
|
+
*/
|
|
65
|
+
export function refusedPage<T>(
|
|
66
|
+
currentPage: number,
|
|
67
|
+
warnings: ProviderWarning[],
|
|
68
|
+
fetchFailed: boolean,
|
|
69
|
+
): ProviderPagedResult<T> {
|
|
70
|
+
return {
|
|
71
|
+
items: [],
|
|
72
|
+
warnings: warnings,
|
|
73
|
+
page: { currentPage: currentPage, itemsPerPage: 0 },
|
|
74
|
+
hasMore: false,
|
|
75
|
+
fetchFailed: fetchFailed || undefined,
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/** A provider page normalized off the SDK's `paging`, before continuation and position are reconciled. */
|
|
80
|
+
export interface NormalizedPage {
|
|
81
|
+
page: ProviderPageInfo;
|
|
82
|
+
hasMore: boolean;
|
|
83
|
+
cursor?: string;
|
|
84
|
+
truncated: boolean;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Normalizes a `PagedResult.paging` into the page-oriented shape Kepler consumes: `page`, `hasMore`, and an
|
|
89
|
+
* opaque `cursor` retained only for cursor-only hosts (where jumping straight to page N isn't possible, so the
|
|
90
|
+
* caller threads the cursor back instead).
|
|
91
|
+
*/
|
|
92
|
+
export function toProviderPageInfo(
|
|
93
|
+
itemsPerPage: number,
|
|
94
|
+
paging: { more?: boolean; cursor?: string; page?: number; pageSize?: number; truncated?: boolean } | undefined,
|
|
95
|
+
): NormalizedPage {
|
|
96
|
+
let cursor: string | undefined;
|
|
97
|
+
let cursorPage: number | undefined;
|
|
98
|
+
const raw = paging?.cursor;
|
|
99
|
+
if (raw != null && raw !== '{}') {
|
|
100
|
+
try {
|
|
101
|
+
const parsed = JSON.parse(raw) as { type?: string; cursors?: unknown; page?: number };
|
|
102
|
+
// Retain opaque cursor strings for cursor-only hosts, per-repo/project cursor bundles for
|
|
103
|
+
// PagingMode.Repo/Project reads, AND page/offset cursors. The latter matters for reads with no
|
|
104
|
+
// caller-visible page param to increment — e.g. Bitbucket Server's account-wide PR read threads
|
|
105
|
+
// its next `start` offset as a `type:'page'` cursor; dropping it left the caller with
|
|
106
|
+
// `hasMore:true` and nothing to continue with. A page cursor is a valid opaque continuation, so
|
|
107
|
+
// threading it back is always safe even where a page number is also reported.
|
|
108
|
+
if (parsed.type === 'cursor' || parsed.type === 'page' || Array.isArray(parsed.cursors)) {
|
|
109
|
+
cursor = raw;
|
|
110
|
+
// Per-repo/project cursor bundles also carry the current page number so the facade can report the
|
|
111
|
+
// real page when the consumer continues using only the cursor.
|
|
112
|
+
if (Array.isArray(parsed.cursors) && parsed.page != null) {
|
|
113
|
+
cursorPage = parsed.page;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
} catch {}
|
|
117
|
+
}
|
|
118
|
+
// Only echo a page number the provider actually honored. Numbered-page hosts report their own
|
|
119
|
+
// `paging.page`; cursor-only hosts (e.g. GitHub PR search) report none and ignore a synthesized
|
|
120
|
+
// page-number cursor — returning their first page — so echoing the requested `page` would mislabel
|
|
121
|
+
// page 1 as page N. Report page 1 in that case rather than the unapplied request. Per-repo/project
|
|
122
|
+
// bundles may carry the page explicitly in the cursor.
|
|
123
|
+
const currentPage = paging?.page ?? cursorPage ?? 1;
|
|
124
|
+
return {
|
|
125
|
+
page: {
|
|
126
|
+
currentPage: Math.max(1, currentPage),
|
|
127
|
+
itemsPerPage: paging?.pageSize ?? itemsPerPage,
|
|
128
|
+
},
|
|
129
|
+
hasMore: paging?.more ?? false,
|
|
130
|
+
cursor: cursor,
|
|
131
|
+
// A single-page provider read that couldn't confirm completeness carries `paging.truncated`;
|
|
132
|
+
// surface it so callers can flag `page.truncated` instead of publishing a partial read as complete.
|
|
133
|
+
truncated: paging?.truncated ?? false,
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Reconciles a provider's `hasMore` with the continuation it actually handed back. A provider can report
|
|
139
|
+
* `hasNextPage: true` while omitting the `endCursor` (the paging layer surfaces that as the sentinel `'{}'`,
|
|
140
|
+
* which {@link toProviderPageInfo} drops), leaving `hasMore: true` with no cursor — a consumer that pages while
|
|
141
|
+
* `hasMore` would then re-request the same page forever. Prefer the real provider cursor; else synthesize the
|
|
142
|
+
* next page number, but only for a read the provider actually advances by page number (`nextPage` omitted for
|
|
143
|
+
* cursor-only reads, which ignore it and answer with their first page again); else report the read as
|
|
144
|
+
* terminal-but-incomplete (`hasMore: false` + `truncated`).
|
|
145
|
+
*/
|
|
146
|
+
export function resolveContinuation(
|
|
147
|
+
paged: { hasMore: boolean; cursor?: string; truncated: boolean },
|
|
148
|
+
nextPage: number | undefined,
|
|
149
|
+
): { hasMore: boolean; cursor?: string; truncated: boolean } {
|
|
150
|
+
if (!paged.hasMore) return { hasMore: false, cursor: undefined, truncated: paged.truncated };
|
|
151
|
+
if (paged.cursor != null) return { hasMore: true, cursor: paged.cursor, truncated: paged.truncated };
|
|
152
|
+
|
|
153
|
+
const synthesized = nextPage != null ? pageToCursor(nextPage) : undefined;
|
|
154
|
+
if (synthesized != null) return { hasMore: true, cursor: synthesized, truncated: paged.truncated };
|
|
155
|
+
|
|
156
|
+
return { hasMore: false, cursor: undefined, truncated: true };
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* Resolves the position a paged read reports as `page.currentPage`, per the single convention documented on
|
|
161
|
+
* {@link ProviderPageInfo.currentPage}. Every paged read routes through here so the field means the same thing
|
|
162
|
+
* on all of them: positional, never constant-1 for one read and positional for another.
|
|
163
|
+
*
|
|
164
|
+
* `providerPage` is what the provider (or the internal drain) established — 1 means "nothing reported".
|
|
165
|
+
* `pageAdvanceable` is whether the read honors a page number at all: false for a cursor-only read, which
|
|
166
|
+
* answers with its first page when handed a synthesized page-number cursor, so the requested `page` must NOT be
|
|
167
|
+
* echoed there.
|
|
168
|
+
*/
|
|
169
|
+
export function resolveCurrentPage(options: {
|
|
170
|
+
providerPage: number;
|
|
171
|
+
requestedPage: number;
|
|
172
|
+
suppliedCursor: string | undefined;
|
|
173
|
+
pageAdvanceable: boolean;
|
|
174
|
+
}): number {
|
|
175
|
+
if (options.providerPage > 1) return options.providerPage;
|
|
176
|
+
// A caller-threaded cursor DID advance the provider, so the caller's own position is authoritative for a
|
|
177
|
+
// provider that reports none: prefer the page the cursor encodes, else the `page` supplied alongside it.
|
|
178
|
+
if (options.suppliedCursor != null) return parsePageCursor(options.suppliedCursor) ?? options.requestedPage;
|
|
179
|
+
|
|
180
|
+
return options.pageAdvanceable ? options.requestedPage : 1;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/** The mutable state {@link drainToRequestedPage} carries across the pages it walks. */
|
|
184
|
+
export interface DrainState<T> {
|
|
185
|
+
items: T[];
|
|
186
|
+
paged: NormalizedPage;
|
|
187
|
+
metadata: CollectionMetadata | undefined;
|
|
188
|
+
fetchFailed: boolean;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* Advances a cursor-only read to the requested page when the caller supplied only `page`.
|
|
193
|
+
*
|
|
194
|
+
* A cursor-only read accepts a synthesized page-number cursor and ignores it, answering with its first page, so
|
|
195
|
+
* the requested page has to be reached by walking the provider's own opaque continuations. Only the last
|
|
196
|
+
* successfully-read page's items are kept — returning pages 1..N as "page N" would duplicate items for a normal
|
|
197
|
+
* paged consumer — while warnings and metadata are merged across the whole drained prefix.
|
|
198
|
+
*
|
|
199
|
+
* Shared by the repo-scoped and account-wide PR reads and the repo-scoped issue read so the three cannot drift:
|
|
200
|
+
* a requested page past the provider's terminal cursor is an EMPTY page N on all of them, per
|
|
201
|
+
* {@link ProviderPageInfo.currentPage}, never the last available page relabeled.
|
|
202
|
+
*/
|
|
203
|
+
export async function drainToRequestedPage<T>(
|
|
204
|
+
state: DrainState<T>,
|
|
205
|
+
options: {
|
|
206
|
+
requestedPage: number;
|
|
207
|
+
itemsPerPage: number | undefined;
|
|
208
|
+
warnings: ProviderWarning[];
|
|
209
|
+
readPage: (cursor: string) => Promise<{
|
|
210
|
+
value?: (PagedResult<T> & { metadata?: CollectionMetadata }) | undefined;
|
|
211
|
+
warning?: ProviderWarning;
|
|
212
|
+
}>;
|
|
213
|
+
},
|
|
214
|
+
): Promise<DrainState<T>> {
|
|
215
|
+
let { items, metadata, fetchFailed } = state;
|
|
216
|
+
let currentPage = 1;
|
|
217
|
+
let currentCursor = usableCursor(state.paged.hasMore ? state.paged.cursor : undefined);
|
|
218
|
+
let currentHasMore = state.paged.hasMore && currentCursor != null;
|
|
219
|
+
let currentTruncated = state.paged.truncated;
|
|
220
|
+
// A page requested past the terminal cursor is that empty page N. Distinguished from the first read
|
|
221
|
+
// having failed outright, which is already reported as page N with no items by the caller's own state.
|
|
222
|
+
const missRequestedPage = () => {
|
|
223
|
+
items = [];
|
|
224
|
+
currentPage = options.requestedPage;
|
|
225
|
+
currentCursor = undefined;
|
|
226
|
+
currentHasMore = false;
|
|
227
|
+
};
|
|
228
|
+
|
|
229
|
+
if (fetchFailed) {
|
|
230
|
+
missRequestedPage();
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
while (currentPage < options.requestedPage && currentHasMore && currentCursor != null) {
|
|
234
|
+
const { value, warning } = await options.readPage(currentCursor);
|
|
235
|
+
if (warning != null) {
|
|
236
|
+
appendDedupedWarning(options.warnings, warning);
|
|
237
|
+
}
|
|
238
|
+
if (value == null) {
|
|
239
|
+
fetchFailed = true;
|
|
240
|
+
missRequestedPage();
|
|
241
|
+
break;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
items = value.values;
|
|
245
|
+
metadata = mergeCollectionMetadata(metadata, value.metadata);
|
|
246
|
+
const next = toProviderPageInfo(options.itemsPerPage ?? value.values.length, value.paging);
|
|
247
|
+
currentPage++;
|
|
248
|
+
currentTruncated ||= next.truncated;
|
|
249
|
+
const nextCursor = usableCursor(next.cursor);
|
|
250
|
+
// A provider that hands back the same cursor (or none) isn't advancing; stop rather than refetch
|
|
251
|
+
// the same page forever.
|
|
252
|
+
if (nextCursor == null || nextCursor === currentCursor) {
|
|
253
|
+
currentCursor = undefined;
|
|
254
|
+
currentHasMore = false;
|
|
255
|
+
break;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
currentCursor = nextCursor;
|
|
259
|
+
currentHasMore = next.hasMore;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
if (currentPage < options.requestedPage) {
|
|
263
|
+
missRequestedPage();
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
return {
|
|
267
|
+
items: items,
|
|
268
|
+
paged: {
|
|
269
|
+
page: { currentPage: currentPage, itemsPerPage: options.itemsPerPage ?? items.length },
|
|
270
|
+
hasMore: currentHasMore,
|
|
271
|
+
cursor: currentCursor,
|
|
272
|
+
truncated: currentTruncated,
|
|
273
|
+
},
|
|
274
|
+
metadata: metadata,
|
|
275
|
+
fetchFailed: fetchFailed,
|
|
276
|
+
};
|
|
277
|
+
}
|