@gitkraken/core-gitlens 0.6.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -1
- package/README.md +9 -2
- package/dist/_virtual/@oxc-project+runtime/helpers/esm/decorate.js +9 -0
- package/dist/_virtual/@oxc-project+runtime/helpers/esm/usingCtx.js +57 -0
- package/dist/git/cache.d.ts +297 -297
- package/dist/git/cache.js +948 -1276
- package/dist/git/cache.js.map +1 -1
- package/dist/git/context.d.ts +202 -197
- package/dist/git/context.js +12 -8
- package/dist/git/context.js.map +1 -1
- package/dist/git/errors.d.ts +268 -281
- package/dist/git/errors.js +928 -706
- package/dist/git/errors.js.map +1 -1
- package/dist/git/features.d.ts +3 -2
- package/dist/git/features.js +34 -55
- package/dist/git/features.js.map +1 -1
- package/dist/git/gitHealth.d.ts +88 -81
- package/dist/git/gitHealth.js +259 -329
- package/dist/git/gitHealth.js.map +1 -1
- package/dist/git/models/author.d.ts +12 -10
- package/dist/git/models/author.js +0 -2
- package/dist/git/models/autolink.d.ts +36 -37
- package/dist/git/models/autolink.js +0 -2
- package/dist/git/models/blame.d.ts +25 -23
- package/dist/git/models/blame.js +0 -2
- package/dist/git/models/branch.d.ts +74 -72
- package/dist/git/models/branch.js +132 -171
- package/dist/git/models/branch.js.map +1 -1
- package/dist/git/models/commit.d.ts +135 -133
- package/dist/git/models/commit.js +381 -484
- package/dist/git/models/commit.js.map +1 -1
- package/dist/git/models/contributor.d.ts +30 -29
- package/dist/git/models/contributor.js +56 -64
- package/dist/git/models/contributor.js.map +1 -1
- package/dist/git/models/defaultBranch.d.ts +5 -3
- package/dist/git/models/defaultBranch.js +0 -2
- package/dist/git/models/diff.d.ts +49 -47
- package/dist/git/models/diff.js +0 -2
- package/dist/git/models/file.d.ts +20 -18
- package/dist/git/models/file.js +0 -2
- package/dist/git/models/fileChange.d.ts +45 -43
- package/dist/git/models/fileChange.js +60 -66
- package/dist/git/models/fileChange.js.map +1 -1
- package/dist/git/models/fileStatus.d.ts +25 -23
- package/dist/git/models/fileStatus.js +30 -26
- package/dist/git/models/fileStatus.js.map +1 -1
- package/dist/git/models/graph.d.ts +328 -320
- package/dist/git/models/graph.js +31 -27
- package/dist/git/models/graph.js.map +1 -1
- package/dist/git/models/graphSearch.d.ts +37 -35
- package/dist/git/models/graphSearch.js +0 -2
- package/dist/git/models/graphSession.d.ts +158 -66
- package/dist/git/models/graphSession.js +72 -1
- package/dist/git/models/graphSession.js.map +1 -1
- package/dist/git/models/issue.d.ts +171 -150
- package/dist/git/models/issue.js +86 -88
- package/dist/git/models/issue.js.map +1 -1
- package/dist/git/models/issueOrPullRequest.d.ts +16 -14
- package/dist/git/models/issueOrPullRequest.js +0 -2
- package/dist/git/models/lineRange.d.ts +6 -4
- package/dist/git/models/lineRange.js +0 -2
- package/dist/git/models/log.d.ts +18 -16
- package/dist/git/models/log.js +0 -2
- package/dist/git/models/mergeConflicts.d.ts +17 -15
- package/dist/git/models/mergeConflicts.js +0 -2
- package/dist/git/models/patch.d.ts +14 -12
- package/dist/git/models/patch.js +0 -2
- package/dist/git/models/pausedOperationStatus.d.ts +42 -40
- package/dist/git/models/pausedOperationStatus.js +0 -2
- package/dist/git/models/pullRequest.d.ts +238 -236
- package/dist/git/models/pullRequest.js +151 -163
- package/dist/git/models/pullRequest.js.map +1 -1
- package/dist/git/models/rebase.d.ts +30 -28
- package/dist/git/models/rebase.js +0 -2
- package/dist/git/models/reference.d.ts +57 -55
- package/dist/git/models/reference.js +0 -2
- package/dist/git/models/reflog.d.ts +29 -27
- package/dist/git/models/reflog.js +63 -82
- package/dist/git/models/reflog.js.map +1 -1
- package/dist/git/models/remote.d.ts +34 -32
- package/dist/git/models/remote.js +74 -95
- package/dist/git/models/remote.js.map +1 -1
- package/dist/git/models/remoteProvider.d.ts +86 -84
- package/dist/git/models/remoteProvider.js +145 -150
- package/dist/git/models/remoteProvider.js.map +1 -1
- package/dist/git/models/remoteResource.d.ts +58 -56
- package/dist/git/models/remoteResource.js +15 -12
- package/dist/git/models/remoteResource.js.map +1 -1
- package/dist/git/models/repository.d.ts +144 -142
- package/dist/git/models/repository.js +358 -406
- package/dist/git/models/repository.js.map +1 -1
- package/dist/git/models/repositoryChangeEvent.d.ts +8 -6
- package/dist/git/models/repositoryChangeEvent.js +26 -24
- package/dist/git/models/repositoryChangeEvent.js.map +1 -1
- package/dist/git/models/repositoryIdentities.d.ts +50 -46
- package/dist/git/models/repositoryIdentities.js +7 -5
- package/dist/git/models/repositoryIdentities.js.map +1 -1
- package/dist/git/models/repositoryMetadata.d.ts +9 -7
- package/dist/git/models/repositoryMetadata.js +0 -2
- package/dist/git/models/resourceDescriptor.d.ts +11 -9
- package/dist/git/models/resourceDescriptor.js +0 -2
- package/dist/git/models/revision.d.ts +2 -0
- package/dist/git/models/revision.js +8 -5
- package/dist/git/models/revision.js.map +1 -1
- package/dist/git/models/search.d.ts +48 -47
- package/dist/git/models/search.js +53 -49
- package/dist/git/models/search.js.map +1 -1
- package/dist/git/models/shortlog.d.ts +5 -3
- package/dist/git/models/shortlog.js +0 -2
- package/dist/git/models/signature.d.ts +28 -26
- package/dist/git/models/signature.js +0 -2
- package/dist/git/models/staging.d.ts +18 -16
- package/dist/git/models/staging.js +0 -2
- package/dist/git/models/stash.d.ts +5 -3
- package/dist/git/models/stash.js +0 -2
- package/dist/git/models/status.d.ts +51 -49
- package/dist/git/models/status.js +172 -205
- package/dist/git/models/status.js.map +1 -1
- package/dist/git/models/statusFile.d.ts +35 -34
- package/dist/git/models/statusFile.js +112 -125
- package/dist/git/models/statusFile.js.map +1 -1
- package/dist/git/models/tag.d.ts +34 -32
- package/dist/git/models/tag.js +64 -77
- package/dist/git/models/tag.js.map +1 -1
- package/dist/git/models/tree.d.ts +8 -6
- package/dist/git/models/tree.js +0 -2
- package/dist/git/models/user.d.ts +6 -4
- package/dist/git/models/user.js +0 -2
- package/dist/git/models/worktree.d.ts +50 -48
- package/dist/git/models/worktree.js +102 -133
- package/dist/git/models/worktree.js.map +1 -1
- package/dist/git/parsers/diffParser.d.ts +7 -5
- package/dist/git/parsers/diffParser.js +438 -587
- package/dist/git/parsers/diffParser.js.map +1 -1
- package/dist/git/parsers/rebaseTodoParser.d.ts +3 -1
- package/dist/git/parsers/rebaseTodoParser.js +165 -208
- package/dist/git/parsers/rebaseTodoParser.js.map +1 -1
- package/dist/git/providers/blame.d.ts +12 -10
- package/dist/git/providers/blame.js +0 -2
- package/dist/git/providers/branches.d.ts +96 -94
- package/dist/git/providers/branches.js +0 -2
- package/dist/git/providers/commits.d.ts +105 -104
- package/dist/git/providers/commits.js +0 -2
- package/dist/git/providers/config.d.ts +80 -78
- package/dist/git/providers/config.js +0 -2
- package/dist/git/providers/contributors.d.ts +23 -21
- package/dist/git/providers/contributors.js +0 -2
- package/dist/git/providers/diff.d.ts +68 -66
- package/dist/git/providers/diff.js +0 -2
- package/dist/git/providers/graph.d.ts +73 -62
- package/dist/git/providers/graph.js +0 -2
- package/dist/git/providers/maintenance.d.ts +180 -178
- package/dist/git/providers/maintenance.js +0 -20
- package/dist/git/providers/operations.d.ts +114 -112
- package/dist/git/providers/operations.js +0 -2
- package/dist/git/providers/patch.d.ts +26 -24
- package/dist/git/providers/patch.js +0 -2
- package/dist/git/providers/pausedOperations.d.ts +19 -17
- package/dist/git/providers/pausedOperations.js +0 -2
- package/dist/git/providers/provider.d.ts +52 -50
- package/dist/git/providers/provider.js +0 -2
- package/dist/git/providers/refs.d.ts +42 -40
- package/dist/git/providers/refs.js +0 -2
- package/dist/git/providers/remotes.d.ts +24 -22
- package/dist/git/providers/remotes.js +0 -2
- package/dist/git/providers/revision.d.ts +25 -23
- package/dist/git/providers/revision.js +0 -2
- package/dist/git/providers/shared/remotes.d.ts +24 -22
- package/dist/git/providers/shared/remotes.js +52 -77
- package/dist/git/providers/shared/remotes.js.map +1 -1
- package/dist/git/providers/staging.d.ts +37 -35
- package/dist/git/providers/staging.js +0 -2
- package/dist/git/providers/stash.d.ts +38 -36
- package/dist/git/providers/stash.js +0 -2
- package/dist/git/providers/status.d.ts +32 -30
- package/dist/git/providers/status.js +0 -2
- package/dist/git/providers/tags.d.ts +20 -18
- package/dist/git/providers/tags.js +0 -2
- package/dist/git/providers/types.d.ts +19 -17
- package/dist/git/providers/types.js +0 -2
- package/dist/git/providers/worktrees.d.ts +26 -24
- package/dist/git/providers/worktrees.js +0 -2
- package/dist/git/remotes/azure-devops.d.ts +46 -45
- package/dist/git/remotes/azure-devops.js +252 -257
- package/dist/git/remotes/azure-devops.js.map +1 -1
- package/dist/git/remotes/bitbucket-server.d.ts +30 -29
- package/dist/git/remotes/bitbucket-server.js +141 -142
- package/dist/git/remotes/bitbucket-server.js.map +1 -1
- package/dist/git/remotes/bitbucket.d.ts +27 -26
- package/dist/git/remotes/bitbucket.js +114 -111
- package/dist/git/remotes/bitbucket.js.map +1 -1
- package/dist/git/remotes/custom.d.ts +26 -25
- package/dist/git/remotes/custom.js +130 -130
- package/dist/git/remotes/custom.js.map +1 -1
- package/dist/git/remotes/gerrit.d.ts +29 -28
- package/dist/git/remotes/gerrit.js +140 -143
- package/dist/git/remotes/gerrit.js.map +1 -1
- package/dist/git/remotes/gitea.d.ts +28 -27
- package/dist/git/remotes/gitea.js +141 -145
- package/dist/git/remotes/gitea.js.map +1 -1
- package/dist/git/remotes/github.d.ts +35 -34
- package/dist/git/remotes/github.js +196 -190
- package/dist/git/remotes/github.js.map +1 -1
- package/dist/git/remotes/gitlab.d.ts +31 -30
- package/dist/git/remotes/gitlab.js +245 -227
- package/dist/git/remotes/gitlab.js.map +1 -1
- package/dist/git/remotes/google-source.d.ts +16 -14
- package/dist/git/remotes/google-source.js +33 -31
- package/dist/git/remotes/google-source.js.map +1 -1
- package/dist/git/remotes/matcher.d.ts +16 -14
- package/dist/git/remotes/matcher.js +141 -124
- package/dist/git/remotes/matcher.js.map +1 -1
- package/dist/git/repositoryService.d.ts +47 -47
- package/dist/git/repositoryService.js +47 -44
- package/dist/git/repositoryService.js.map +1 -1
- package/dist/git/run.types.d.ts +91 -76
- package/dist/git/run.types.js +0 -2
- package/dist/git/service.d.ts +73 -71
- package/dist/git/service.js +286 -302
- package/dist/git/service.js.map +1 -1
- package/dist/git/utils/autolink.utils.d.ts +4 -2
- package/dist/git/utils/autolink.utils.js +103 -139
- package/dist/git/utils/autolink.utils.js.map +1 -1
- package/dist/git/utils/blame.utils.d.ts +22 -20
- package/dist/git/utils/blame.utils.js +196 -230
- package/dist/git/utils/blame.utils.js.map +1 -1
- package/dist/git/utils/branch.utils.d.ts +7 -9
- package/dist/git/utils/branch.utils.js +89 -115
- package/dist/git/utils/branch.utils.js.map +1 -1
- package/dist/git/utils/commit.utils.d.ts +10 -16
- package/dist/git/utils/commit.utils.js +28 -47
- package/dist/git/utils/commit.utils.js.map +1 -1
- package/dist/git/utils/config.utils.d.ts +2 -0
- package/dist/git/utils/config.utils.js +14 -5
- package/dist/git/utils/config.utils.js.map +1 -1
- package/dist/git/utils/conflictResolution.utils.d.ts +16 -13
- package/dist/git/utils/conflictResolution.utils.js +116 -113
- package/dist/git/utils/conflictResolution.utils.js.map +1 -1
- package/dist/git/utils/contributor.utils.d.ts +10 -8
- package/dist/git/utils/contributor.utils.js +47 -69
- package/dist/git/utils/contributor.utils.js.map +1 -1
- package/dist/git/utils/fetch.utils.d.ts +2 -0
- package/dist/git/utils/fetch.utils.js +33 -44
- package/dist/git/utils/fetch.utils.js.map +1 -1
- package/dist/git/utils/fileStatus.utils.d.ts +22 -21
- package/dist/git/utils/fileStatus.utils.js +59 -45
- package/dist/git/utils/fileStatus.utils.js.map +1 -1
- package/dist/git/utils/graph.utils.d.ts +19 -1
- package/dist/git/utils/graph.utils.js +60 -35
- package/dist/git/utils/graph.utils.js.map +1 -1
- package/dist/git/utils/issue.utils.d.ts +3 -1
- package/dist/git/utils/issue.utils.js +154 -158
- package/dist/git/utils/issue.utils.js.map +1 -1
- package/dist/git/utils/issueOrPullRequest.utils.d.ts +3 -1
- package/dist/git/utils/issueOrPullRequest.utils.js +23 -20
- package/dist/git/utils/issueOrPullRequest.utils.js.map +1 -1
- package/dist/git/utils/mergeConflicts.utils.d.ts +4 -1
- package/dist/git/utils/mergeConflicts.utils.js +28 -15
- package/dist/git/utils/mergeConflicts.utils.js.map +1 -1
- package/dist/git/utils/pausedOperationStatus.utils.d.ts +7 -42
- package/dist/git/utils/pausedOperationStatus.utils.js +83 -146
- package/dist/git/utils/pausedOperationStatus.utils.js.map +1 -1
- package/dist/git/utils/pullRequest.utils.d.ts +7 -5
- package/dist/git/utils/pullRequest.utils.js +180 -187
- package/dist/git/utils/pullRequest.utils.js.map +1 -1
- package/dist/git/utils/reachability.utils.d.ts +6 -6
- package/dist/git/utils/reachability.utils.js +120 -147
- package/dist/git/utils/reachability.utils.js.map +1 -1
- package/dist/git/utils/rebase.utils.d.ts +3 -1
- package/dist/git/utils/rebase.utils.js +87 -71
- package/dist/git/utils/rebase.utils.js.map +1 -1
- package/dist/git/utils/reference.utils.d.ts +33 -32
- package/dist/git/utils/reference.utils.js +152 -179
- package/dist/git/utils/reference.utils.js.map +1 -1
- package/dist/git/utils/remote.utils.d.ts +5 -3
- package/dist/git/utils/remote.utils.js +77 -116
- package/dist/git/utils/remote.utils.js.map +1 -1
- package/dist/git/utils/repository.utils.d.ts +3 -1
- package/dist/git/utils/repository.utils.js +12 -11
- package/dist/git/utils/repository.utils.js.map +1 -1
- package/dist/git/utils/resourceDescriptor.utils.d.ts +3 -1
- package/dist/git/utils/resourceDescriptor.utils.js +8 -14
- package/dist/git/utils/resourceDescriptor.utils.js.map +1 -1
- package/dist/git/utils/revision.utils.d.ts +11 -10
- package/dist/git/utils/revision.utils.js +69 -83
- package/dist/git/utils/revision.utils.js.map +1 -1
- package/dist/git/utils/search.utils.d.ts +5 -3
- package/dist/git/utils/search.utils.js +383 -522
- package/dist/git/utils/search.utils.js.map +1 -1
- package/dist/git/utils/sorting.d.ts +22 -20
- package/dist/git/utils/sorting.js +133 -227
- package/dist/git/utils/sorting.js.map +1 -1
- package/dist/git/utils/sshKey.utils.d.ts +2 -0
- package/dist/git/utils/sshKey.utils.js +10 -15
- package/dist/git/utils/sshKey.utils.js.map +1 -1
- package/dist/git/utils/status.utils.d.ts +20 -15
- package/dist/git/utils/status.utils.js +93 -79
- package/dist/git/utils/status.utils.js.map +1 -1
- package/dist/git/utils/statusFile.utils.d.ts +6 -4
- package/dist/git/utils/statusFile.utils.js +71 -72
- package/dist/git/utils/statusFile.utils.js.map +1 -1
- package/dist/git/utils/tag.utils.d.ts +4 -2
- package/dist/git/utils/tag.utils.js +10 -8
- package/dist/git/utils/tag.utils.js.map +1 -1
- package/dist/git/utils/tooltip.utils.d.ts +5 -2
- package/dist/git/utils/tooltip.utils.js +49 -24
- package/dist/git/utils/tooltip.utils.js.map +1 -1
- package/dist/git/utils/uriAuthority.d.ts +9 -7
- package/dist/git/utils/uriAuthority.js +19 -16
- package/dist/git/utils/uriAuthority.js.map +1 -1
- package/dist/git/utils/user.utils.d.ts +3 -1
- package/dist/git/utils/user.utils.js +6 -10
- package/dist/git/utils/user.utils.js.map +1 -1
- package/dist/git/utils/worktree.utils.d.ts +5 -3
- package/dist/git/utils/worktree.utils.js +14 -12
- package/dist/git/utils/worktree.utils.js.map +1 -1
- package/dist/git/watching/changeEvent.d.ts +38 -36
- package/dist/git/watching/changeEvent.js +60 -67
- package/dist/git/watching/changeEvent.js.map +1 -1
- package/dist/git/watching/classifyChange.d.ts +3 -1
- package/dist/git/watching/classifyChange.js +50 -79
- package/dist/git/watching/classifyChange.js.map +1 -1
- package/dist/git/watching/gitIgnoreFilter.d.ts +43 -41
- package/dist/git/watching/gitIgnoreFilter.js +92 -107
- package/dist/git/watching/gitIgnoreFilter.js.map +1 -1
- package/dist/git/watching/initWatcher.d.ts +22 -20
- package/dist/git/watching/initWatcher.js +58 -57
- package/dist/git/watching/initWatcher.js.map +1 -1
- package/dist/git/watching/provider.d.ts +8 -7
- package/dist/git/watching/provider.js +0 -2
- package/dist/git/watching/watchGroup.d.ts +29 -28
- package/dist/git/watching/watchGroup.js +105 -137
- package/dist/git/watching/watchGroup.js.map +1 -1
- package/dist/git/watching/watchService.d.ts +70 -68
- package/dist/git/watching/watchService.js +275 -339
- package/dist/git/watching/watchService.js.map +1 -1
- package/dist/git/watching/watchSession.d.ts +112 -111
- package/dist/git/watching/watchSession.js +260 -314
- package/dist/git/watching/watchSession.js.map +1 -1
- package/dist/git/watching/watcherPatterns.d.ts +4 -2
- package/dist/git/watching/watcherPatterns.js +21 -24
- package/dist/git/watching/watcherPatterns.js.map +1 -1
- package/dist/git-cli/cliGitProvider.d.ts +117 -114
- package/dist/git-cli/cliGitProvider.js +261 -283
- package/dist/git-cli/cliGitProvider.js.map +1 -1
- package/dist/git-cli/exec/eventLoopMonitor.d.ts +26 -0
- package/dist/git-cli/exec/eventLoopMonitor.js +61 -0
- package/dist/git-cli/exec/eventLoopMonitor.js.map +1 -0
- package/dist/git-cli/exec/exec.d.ts +3 -4
- package/dist/git-cli/exec/exec.errors.d.ts +2 -2
- package/dist/git-cli/exec/exec.errors.js +2 -2
- package/dist/git-cli/exec/exec.js +3 -3
- package/dist/git-cli/exec/exec.types.d.ts +2 -2
- package/dist/git-cli/exec/exec.types.js +0 -2
- package/dist/git-cli/exec/features.d.ts +2 -3
- package/dist/git-cli/exec/features.js +2 -2
- package/dist/git-cli/exec/git.d.ts +224 -205
- package/dist/git-cli/exec/git.js +834 -1042
- package/dist/git-cli/exec/git.js.map +1 -1
- package/dist/git-cli/exec/gitQueue.d.ts +51 -48
- package/dist/git-cli/exec/gitQueue.js +225 -260
- package/dist/git-cli/exec/gitQueue.js.map +1 -1
- package/dist/git-cli/exec/locator.d.ts +8 -6
- package/dist/git-cli/exec/locator.js +95 -121
- package/dist/git-cli/exec/locator.js.map +1 -1
- package/dist/git-cli/parsers/blameParser.d.ts +22 -20
- package/dist/git-cli/parsers/blameParser.js +238 -332
- package/dist/git-cli/parsers/blameParser.js.map +1 -1
- package/dist/git-cli/parsers/indexParser.d.ts +3 -1
- package/dist/git-cli/parsers/indexParser.js +146 -221
- package/dist/git-cli/parsers/indexParser.js.map +1 -1
- package/dist/git-cli/parsers/logParser.d.ts +103 -110
- package/dist/git-cli/parsers/logParser.js +998 -1199
- package/dist/git-cli/parsers/logParser.js.map +1 -1
- package/dist/git-cli/parsers/mergeTreeParser.d.ts +5 -3
- package/dist/git-cli/parsers/mergeTreeParser.js +28 -72
- package/dist/git-cli/parsers/mergeTreeParser.js.map +1 -1
- package/dist/git-cli/parsers/refParser.d.ts +5 -4
- package/dist/git-cli/parsers/refParser.js +92 -137
- package/dist/git-cli/parsers/refParser.js.map +1 -1
- package/dist/git-cli/parsers/reflogParser.d.ts +7 -6
- package/dist/git-cli/parsers/reflogParser.js +100 -173
- package/dist/git-cli/parsers/reflogParser.js.map +1 -1
- package/dist/git-cli/parsers/remoteParser.d.ts +4 -2
- package/dist/git-cli/parsers/remoteParser.js +74 -126
- package/dist/git-cli/parsers/remoteParser.js.map +1 -1
- package/dist/git-cli/parsers/shortlogParser.d.ts +4 -2
- package/dist/git-cli/parsers/shortlogParser.js +44 -49
- package/dist/git-cli/parsers/shortlogParser.js.map +1 -1
- package/dist/git-cli/parsers/signatureParser.d.ts +3 -1
- package/dist/git-cli/parsers/signatureParser.js +82 -124
- package/dist/git-cli/parsers/signatureParser.js.map +1 -1
- package/dist/git-cli/parsers/sshSignatureParser.d.ts +5 -3
- package/dist/git-cli/parsers/sshSignatureParser.js +55 -64
- package/dist/git-cli/parsers/sshSignatureParser.js.map +1 -1
- package/dist/git-cli/parsers/statusParser.d.ts +4 -2
- package/dist/git-cli/parsers/statusParser.js +148 -205
- package/dist/git-cli/parsers/statusParser.js.map +1 -1
- package/dist/git-cli/parsers/treeParser.d.ts +3 -1
- package/dist/git-cli/parsers/treeParser.js +57 -108
- package/dist/git-cli/parsers/treeParser.js.map +1 -1
- package/dist/git-cli/parsers/worktreeParser.d.ts +4 -3
- package/dist/git-cli/parsers/worktreeParser.js +76 -132
- package/dist/git-cli/parsers/worktreeParser.js.map +1 -1
- package/dist/git-cli/providers/blame.d.ts +25 -23
- package/dist/git-cli/providers/blame.js +404 -413
- package/dist/git-cli/providers/blame.js.map +1 -1
- package/dist/git-cli/providers/branches.d.ts +117 -116
- package/dist/git-cli/providers/branches.js +1132 -1468
- package/dist/git-cli/providers/branches.js.map +1 -1
- package/dist/git-cli/providers/commitFilesetUtils.d.ts +4 -2
- package/dist/git-cli/providers/commitFilesetUtils.js +36 -18
- package/dist/git-cli/providers/commitFilesetUtils.js.map +1 -1
- package/dist/git-cli/providers/commits.d.ts +58 -56
- package/dist/git-cli/providers/commits.js +1084 -1423
- package/dist/git-cli/providers/commits.js.map +1 -1
- package/dist/git-cli/providers/config.d.ts +129 -127
- package/dist/git-cli/providers/config.js +612 -831
- package/dist/git-cli/providers/config.js.map +1 -1
- package/dist/git-cli/providers/contributors.d.ts +29 -28
- package/dist/git-cli/providers/contributors.js +246 -351
- package/dist/git-cli/providers/contributors.js.map +1 -1
- package/dist/git-cli/providers/diff.d.ts +97 -94
- package/dist/git-cli/providers/diff.js +638 -845
- package/dist/git-cli/providers/diff.js.map +1 -1
- package/dist/git-cli/providers/graph.d.ts +66 -68
- package/dist/git-cli/providers/graph.js +1400 -1848
- package/dist/git-cli/providers/graph.js.map +1 -1
- package/dist/git-cli/providers/maintenance.d.ts +305 -303
- package/dist/git-cli/providers/maintenance.js +1526 -2078
- package/dist/git-cli/providers/maintenance.js.map +1 -1
- package/dist/git-cli/providers/operations.d.ts +96 -94
- package/dist/git-cli/providers/operations.js +664 -724
- package/dist/git-cli/providers/operations.js.map +1 -1
- package/dist/git-cli/providers/patch.d.ts +37 -35
- package/dist/git-cli/providers/patch.js +206 -307
- package/dist/git-cli/providers/patch.js.map +1 -1
- package/dist/git-cli/providers/pausedOperations.d.ts +30 -28
- package/dist/git-cli/providers/pausedOperations.js +475 -506
- package/dist/git-cli/providers/pausedOperations.js.map +1 -1
- package/dist/git-cli/providers/refs.d.ts +50 -48
- package/dist/git-cli/providers/refs.js +335 -479
- package/dist/git-cli/providers/refs.js.map +1 -1
- package/dist/git-cli/providers/remotes.d.ts +23 -21
- package/dist/git-cli/providers/remotes.js +71 -92
- package/dist/git-cli/providers/remotes.js.map +1 -1
- package/dist/git-cli/providers/revision.d.ts +27 -25
- package/dist/git-cli/providers/revision.js +288 -304
- package/dist/git-cli/providers/revision.js.map +1 -1
- package/dist/git-cli/providers/staging.d.ts +31 -29
- package/dist/git-cli/providers/staging.js +140 -189
- package/dist/git-cli/providers/staging.js.map +1 -1
- package/dist/git-cli/providers/stash.d.ts +44 -42
- package/dist/git-cli/providers/stash.js +288 -387
- package/dist/git-cli/providers/stash.js.map +1 -1
- package/dist/git-cli/providers/status.d.ts +61 -59
- package/dist/git-cli/providers/status.js +332 -453
- package/dist/git-cli/providers/status.js.map +1 -1
- package/dist/git-cli/providers/tags.d.ts +31 -29
- package/dist/git-cli/providers/tags.js +158 -215
- package/dist/git-cli/providers/tags.js.map +1 -1
- package/dist/git-cli/providers/worktrees.d.ts +35 -33
- package/dist/git-cli/providers/worktrees.js +178 -203
- package/dist/git-cli/providers/worktrees.js.map +1 -1
- package/dist/git-cli/service.d.ts +28 -26
- package/dist/git-cli/service.js +38 -40
- package/dist/git-cli/service.js.map +1 -1
- package/dist/ipc/discovery.d.ts +19 -17
- package/dist/ipc/discovery.js +104 -128
- package/dist/ipc/discovery.js.map +1 -1
- package/dist/ipc/ipcServer.d.ts +16 -14
- package/dist/ipc/ipcServer.js +139 -160
- package/dist/ipc/ipcServer.js.map +1 -1
- package/dist/plus/agents/agentCapabilities.d.ts +50 -37
- package/dist/plus/agents/agentCapabilities.js +138 -173
- package/dist/plus/agents/agentCapabilities.js.map +1 -1
- package/dist/plus/agents/providers/claudeCodeTranscript.d.ts +153 -151
- package/dist/plus/agents/providers/claudeCodeTranscript.js +605 -679
- package/dist/plus/agents/providers/claudeCodeTranscript.js.map +1 -1
- package/dist/plus/agents/providers/gkAgentProvider.d.ts +237 -240
- package/dist/plus/agents/providers/gkAgentProvider.js +2162 -3334
- package/dist/plus/agents/providers/gkAgentProvider.js.map +1 -1
- package/dist/plus/agents/sanitizePrompt.d.ts +2 -0
- package/dist/plus/agents/sanitizePrompt.js +58 -91
- package/dist/plus/agents/sanitizePrompt.js.map +1 -1
- package/dist/plus/agents/stateMachine.d.ts +7 -5
- package/dist/plus/agents/stateMachine.js +135 -163
- package/dist/plus/agents/stateMachine.js.map +1 -1
- package/dist/plus/agents/types.d.ts +333 -336
- package/dist/plus/agents/types.js +48 -48
- package/dist/plus/agents/types.js.map +1 -1
- package/dist/plus/ai/constants.d.ts +3 -1
- package/dist/plus/ai/constants.js +88 -84
- package/dist/plus/ai/constants.js.map +1 -1
- package/dist/plus/ai/errors.d.ts +22 -18
- package/dist/plus/ai/errors.js +158 -138
- package/dist/plus/ai/errors.js.map +1 -1
- package/dist/plus/ai/models/conversation.d.ts +11 -9
- package/dist/plus/ai/models/conversation.js +30 -26
- package/dist/plus/ai/models/conversation.js.map +1 -1
- package/dist/plus/ai/models/model.d.ts +29 -27
- package/dist/plus/ai/models/model.js +663 -471
- package/dist/plus/ai/models/model.js.map +1 -1
- package/dist/plus/ai/models/promptTemplates.d.ts +56 -55
- package/dist/plus/ai/models/promptTemplates.js +0 -2
- package/dist/plus/ai/models/provider.d.ts +79 -77
- package/dist/plus/ai/models/provider.js +0 -2
- package/dist/plus/ai/models/results.d.ts +27 -21
- package/dist/plus/ai/models/results.js +0 -2
- package/dist/plus/ai/prompts.d.ts +4 -2
- package/dist/plus/ai/prompts.js +301 -190
- package/dist/plus/ai/prompts.js.map +1 -1
- package/dist/plus/ai/providers/anthropicProvider.d.ts +33 -32
- package/dist/plus/ai/providers/anthropicProvider.js +484 -381
- package/dist/plus/ai/providers/anthropicProvider.js.map +1 -1
- package/dist/plus/ai/providers/azureProvider.d.ts +18 -16
- package/dist/plus/ai/providers/azureProvider.js +53 -53
- package/dist/plus/ai/providers/azureProvider.js.map +1 -1
- package/dist/plus/ai/providers/context.d.ts +23 -20
- package/dist/plus/ai/providers/context.js +0 -2
- package/dist/plus/ai/providers/deepSeekProvider.d.ts +17 -15
- package/dist/plus/ai/providers/deepSeekProvider.js +45 -39
- package/dist/plus/ai/providers/deepSeekProvider.js.map +1 -1
- package/dist/plus/ai/providers/geminiProvider.d.ts +16 -14
- package/dist/plus/ai/providers/geminiProvider.js +316 -230
- package/dist/plus/ai/providers/geminiProvider.js.map +1 -1
- package/dist/plus/ai/providers/gitkrakenProvider.d.ts +22 -20
- package/dist/plus/ai/providers/gitkrakenProvider.js +165 -260
- package/dist/plus/ai/providers/gitkrakenProvider.js.map +1 -1
- package/dist/plus/ai/providers/huggingFaceProvider.d.ts +16 -14
- package/dist/plus/ai/providers/huggingFaceProvider.js +45 -46
- package/dist/plus/ai/providers/huggingFaceProvider.js.map +1 -1
- package/dist/plus/ai/providers/mistralProvider.d.ts +22 -20
- package/dist/plus/ai/providers/mistralProvider.js +263 -195
- package/dist/plus/ai/providers/mistralProvider.js.map +1 -1
- package/dist/plus/ai/providers/ollamaProvider.d.ts +26 -24
- package/dist/plus/ai/providers/ollamaProvider.js +156 -189
- package/dist/plus/ai/providers/ollamaProvider.js.map +1 -1
- package/dist/plus/ai/providers/openAICompatibleProvider.d.ts +18 -16
- package/dist/plus/ai/providers/openAICompatibleProvider.js +50 -50
- package/dist/plus/ai/providers/openAICompatibleProvider.js.map +1 -1
- package/dist/plus/ai/providers/openAICompatibleProviderBase.d.ts +187 -185
- package/dist/plus/ai/providers/openAICompatibleProviderBase.js +356 -475
- package/dist/plus/ai/providers/openAICompatibleProviderBase.js.map +1 -1
- package/dist/plus/ai/providers/openRouterProvider.d.ts +20 -19
- package/dist/plus/ai/providers/openRouterProvider.js +60 -65
- package/dist/plus/ai/providers/openRouterProvider.js.map +1 -1
- package/dist/plus/ai/providers/openaiProvider.d.ts +17 -15
- package/dist/plus/ai/providers/openaiProvider.js +35 -34
- package/dist/plus/ai/providers/openaiProvider.js.map +1 -1
- package/dist/plus/ai/providers/responseFormatCache.d.ts +4 -2
- package/dist/plus/ai/providers/responseFormatCache.js +21 -17
- package/dist/plus/ai/providers/responseFormatCache.js.map +1 -1
- package/dist/plus/ai/providers/xaiProvider.d.ts +16 -14
- package/dist/plus/ai/providers/xaiProvider.js +61 -46
- package/dist/plus/ai/providers/xaiProvider.js.map +1 -1
- package/dist/plus/ai/utils/ai.utils.d.ts +4 -2
- package/dist/plus/ai/utils/ai.utils.js +50 -77
- package/dist/plus/ai/utils/ai.utils.js.map +1 -1
- package/dist/plus/ai/utils/results.utils.d.ts +7 -5
- package/dist/plus/ai/utils/results.utils.js +235 -269
- package/dist/plus/ai/utils/results.utils.js.map +1 -1
- package/dist/plus/ai/utils/truncation.utils.d.ts +3 -2
- package/dist/plus/ai/utils/truncation.utils.js +242 -205
- package/dist/plus/ai/utils/truncation.utils.js.map +1 -1
- package/dist/plus/git-github/api/config.d.ts +58 -56
- package/dist/plus/git-github/api/config.js +15 -11
- package/dist/plus/git-github/api/config.js.map +1 -1
- package/dist/plus/git-github/api/github.d.ts +500 -497
- package/dist/plus/git-github/api/github.js +2326 -3121
- package/dist/plus/git-github/api/github.js.map +1 -1
- package/dist/plus/git-github/api/github.utils.d.ts +5 -3
- package/dist/plus/git-github/api/github.utils.js +24 -19
- package/dist/plus/git-github/api/github.utils.js.map +1 -1
- package/dist/plus/git-github/api/issueSearchQuery.d.ts +5 -3
- package/dist/plus/git-github/api/issueSearchQuery.js +204 -221
- package/dist/plus/git-github/api/issueSearchQuery.js.map +1 -1
- package/dist/plus/git-github/api/pullRequestSearchQuery.d.ts +6 -5
- package/dist/plus/git-github/api/pullRequestSearchQuery.js +89 -116
- package/dist/plus/git-github/api/pullRequestSearchQuery.js.map +1 -1
- package/dist/plus/git-github/api/token.d.ts +10 -8
- package/dist/plus/git-github/api/token.js +0 -2
- package/dist/plus/git-github/api/tokenUtils.d.ts +4 -2
- package/dist/plus/git-github/api/tokenUtils.js +14 -10
- package/dist/plus/git-github/api/tokenUtils.js.map +1 -1
- package/dist/plus/git-github/api/types.d.ts +94 -92
- package/dist/plus/git-github/api/types.js +0 -2
- package/dist/plus/git-github/context.d.ts +65 -63
- package/dist/plus/git-github/context.js +13 -9
- package/dist/plus/git-github/context.js.map +1 -1
- package/dist/plus/git-github/models.d.ts +182 -182
- package/dist/plus/git-github/models.js +199 -265
- package/dist/plus/git-github/models.js.map +1 -1
- package/dist/plus/git-github/providers/github/blame.d.ts +32 -31
- package/dist/plus/git-github/providers/github/blame.js +137 -150
- package/dist/plus/git-github/providers/github/blame.js.map +1 -1
- package/dist/plus/git-github/providers/github/branches.d.ts +42 -40
- package/dist/plus/git-github/providers/github/branches.js +199 -274
- package/dist/plus/git-github/providers/github/branches.js.map +1 -1
- package/dist/plus/git-github/providers/github/commits.d.ts +35 -33
- package/dist/plus/git-github/providers/github/commits.js +527 -606
- package/dist/plus/git-github/providers/github/commits.js.map +1 -1
- package/dist/plus/git-github/providers/github/config.d.ts +10 -8
- package/dist/plus/git-github/providers/github/config.js +35 -45
- package/dist/plus/git-github/providers/github/config.js.map +1 -1
- package/dist/plus/git-github/providers/github/contributors.d.ts +25 -24
- package/dist/plus/git-github/providers/github/contributors.js +174 -216
- package/dist/plus/git-github/providers/github/contributors.js.map +1 -1
- package/dist/plus/git-github/providers/github/diff.d.ts +34 -32
- package/dist/plus/git-github/providers/github/diff.js +154 -194
- package/dist/plus/git-github/providers/github/diff.js.map +1 -1
- package/dist/plus/git-github/providers/github/graph.d.ts +33 -31
- package/dist/plus/git-github/providers/github/graph.js +400 -452
- package/dist/plus/git-github/providers/github/graph.js.map +1 -1
- package/dist/plus/git-github/providers/github/refs.d.ts +33 -31
- package/dist/plus/git-github/providers/github/refs.js +97 -131
- package/dist/plus/git-github/providers/github/refs.js.map +1 -1
- package/dist/plus/git-github/providers/github/remotes.d.ts +8 -6
- package/dist/plus/git-github/providers/github/remotes.js +30 -35
- package/dist/plus/git-github/providers/github/remotes.js.map +1 -1
- package/dist/plus/git-github/providers/github/revision.d.ts +13 -11
- package/dist/plus/git-github/providers/github/revision.js +106 -129
- package/dist/plus/git-github/providers/github/revision.js.map +1 -1
- package/dist/plus/git-github/providers/github/status.d.ts +24 -22
- package/dist/plus/git-github/providers/github/status.js +49 -47
- package/dist/plus/git-github/providers/github/status.js.map +1 -1
- package/dist/plus/git-github/providers/github/tags.d.ts +21 -19
- package/dist/plus/git-github/providers/github/tags.js +78 -103
- package/dist/plus/git-github/providers/github/tags.js.map +1 -1
- package/dist/plus/git-github/providers/githubGitProvider.d.ts +67 -64
- package/dist/plus/git-github/providers/githubGitProvider.js +131 -128
- package/dist/plus/git-github/providers/githubGitProvider.js.map +1 -1
- package/dist/plus/git-github/providers/githubProvider.d.ts +46 -44
- package/dist/plus/git-github/providers/githubProvider.js +0 -2
- package/dist/plus/integrations/authentication/cloudIntegrationService.d.ts +29 -27
- package/dist/plus/integrations/authentication/cloudIntegrationService.js +173 -208
- package/dist/plus/integrations/authentication/cloudIntegrationService.js.map +1 -1
- package/dist/plus/integrations/authentication/configuredIntegrationService.d.ts +126 -107
- package/dist/plus/integrations/authentication/configuredIntegrationService.js +399 -497
- package/dist/plus/integrations/authentication/configuredIntegrationService.js.map +1 -1
- package/dist/plus/integrations/authentication/integrationAuthenticationProvider.d.ts +73 -72
- package/dist/plus/integrations/authentication/integrationAuthenticationProvider.js +153 -232
- package/dist/plus/integrations/authentication/integrationAuthenticationProvider.js.map +1 -1
- package/dist/plus/integrations/authentication/integrationAuthenticationService.d.ts +61 -59
- package/dist/plus/integrations/authentication/integrationAuthenticationService.js +100 -124
- package/dist/plus/integrations/authentication/integrationAuthenticationService.js.map +1 -1
- package/dist/plus/integrations/authentication/manualTokenProvider.d.ts +14 -12
- package/dist/plus/integrations/authentication/manualTokenProvider.js +26 -51
- package/dist/plus/integrations/authentication/manualTokenProvider.js.map +1 -1
- package/dist/plus/integrations/authentication/models.d.ts +102 -85
- package/dist/plus/integrations/authentication/models.js +55 -54
- package/dist/plus/integrations/authentication/models.js.map +1 -1
- package/dist/plus/integrations/authentication/rejectedTokenTracker.d.ts +19 -17
- package/dist/plus/integrations/authentication/rejectedTokenTracker.js +53 -51
- package/dist/plus/integrations/authentication/rejectedTokenTracker.js.map +1 -1
- package/dist/plus/integrations/collectionMetadata.d.ts +12 -10
- package/dist/plus/integrations/collectionMetadata.js +204 -254
- package/dist/plus/integrations/collectionMetadata.js.map +1 -1
- package/dist/plus/integrations/constants.d.ts +60 -34
- package/dist/plus/integrations/constants.js +157 -132
- package/dist/plus/integrations/constants.js.map +1 -1
- package/dist/plus/integrations/context.d.ts +253 -252
- package/dist/plus/integrations/context.js +0 -2
- package/dist/plus/integrations/errors.d.ts +26 -25
- package/dist/plus/integrations/errors.js +116 -140
- package/dist/plus/integrations/errors.js.map +1 -1
- package/dist/plus/integrations/index.d.ts +36 -40
- package/dist/plus/integrations/index.js +46 -57
- package/dist/plus/integrations/index.js.map +1 -1
- package/dist/plus/integrations/integrationService.d.ts +445 -440
- package/dist/plus/integrations/integrationService.js +1054 -1324
- package/dist/plus/integrations/integrationService.js.map +1 -1
- package/dist/plus/integrations/lite.d.ts +33 -31
- package/dist/plus/integrations/lite.js +84 -122
- package/dist/plus/integrations/lite.js.map +1 -1
- package/dist/plus/integrations/manager.d.ts +592 -580
- package/dist/plus/integrations/manager.js +0 -2
- package/dist/plus/integrations/models/gitHostIntegration.d.ts +420 -415
- package/dist/plus/integrations/models/gitHostIntegration.js +1180 -1293
- package/dist/plus/integrations/models/gitHostIntegration.js.map +1 -1
- package/dist/plus/integrations/models/integration.d.ts +200 -190
- package/dist/plus/integrations/models/integration.js +577 -722
- package/dist/plus/integrations/models/integration.js.map +1 -1
- package/dist/plus/integrations/models/issueCache.d.ts +15 -13
- package/dist/plus/integrations/models/issueCache.js +9 -7
- package/dist/plus/integrations/models/issueCache.js.map +1 -1
- package/dist/plus/integrations/models/issueReads.d.ts +108 -85
- package/dist/plus/integrations/models/issueReads.js +0 -2
- package/dist/plus/integrations/models/issuesIntegration.d.ts +72 -71
- package/dist/plus/integrations/models/issuesIntegration.js +160 -186
- package/dist/plus/integrations/models/issuesIntegration.js.map +1 -1
- package/dist/plus/integrations/models/pullRequestReads.d.ts +9 -7
- package/dist/plus/integrations/models/pullRequestReads.js +0 -2
- package/dist/plus/integrations/providerFilters.d.ts +8 -20
- package/dist/plus/integrations/providerFilters.js +11 -7
- package/dist/plus/integrations/providerFilters.js.map +1 -1
- package/dist/plus/integrations/providers/accounts.d.ts +7 -5
- package/dist/plus/integrations/providers/accounts.js +21 -31
- package/dist/plus/integrations/providers/accounts.js.map +1 -1
- package/dist/plus/integrations/providers/apiClients.d.ts +13 -10
- package/dist/plus/integrations/providers/apiClients.js +51 -36
- package/dist/plus/integrations/providers/apiClients.js.map +1 -1
- package/dist/plus/integrations/providers/apiConfig.d.ts +31 -29
- package/dist/plus/integrations/providers/apiConfig.js +18 -16
- package/dist/plus/integrations/providers/apiConfig.js.map +1 -1
- package/dist/plus/integrations/providers/azure/azure.d.ts +69 -67
- package/dist/plus/integrations/providers/azure/azure.js +452 -577
- package/dist/plus/integrations/providers/azure/azure.js.map +1 -1
- package/dist/plus/integrations/providers/azure/models.d.ts +228 -226
- package/dist/plus/integrations/providers/azure/models.js +223 -251
- package/dist/plus/integrations/providers/azure/models.js.map +1 -1
- package/dist/plus/integrations/providers/azureDevOps.d.ts +132 -131
- package/dist/plus/integrations/providers/azureDevOps.js +773 -931
- package/dist/plus/integrations/providers/azureDevOps.js.map +1 -1
- package/dist/plus/integrations/providers/bitbucket/bitbucket.d.ts +50 -48
- package/dist/plus/integrations/providers/bitbucket/bitbucket.js +417 -585
- package/dist/plus/integrations/providers/bitbucket/bitbucket.js.map +1 -1
- package/dist/plus/integrations/providers/bitbucket/models.d.ts +179 -179
- package/dist/plus/integrations/providers/bitbucket/models.js +96 -144
- package/dist/plus/integrations/providers/bitbucket/models.js.map +1 -1
- package/dist/plus/integrations/providers/bitbucket-server/models.d.ts +111 -109
- package/dist/plus/integrations/providers/bitbucket-server/models.js +102 -121
- package/dist/plus/integrations/providers/bitbucket-server/models.js.map +1 -1
- package/dist/plus/integrations/providers/bitbucket-server.d.ts +79 -79
- package/dist/plus/integrations/providers/bitbucket-server.js +205 -241
- package/dist/plus/integrations/providers/bitbucket-server.js.map +1 -1
- package/dist/plus/integrations/providers/bitbucket.d.ts +80 -79
- package/dist/plus/integrations/providers/bitbucket.js +390 -477
- package/dist/plus/integrations/providers/bitbucket.js.map +1 -1
- package/dist/plus/integrations/providers/github/github.d.ts +5 -3
- package/dist/plus/integrations/providers/github/github.js +38 -45
- package/dist/plus/integrations/providers/github/github.js.map +1 -1
- package/dist/plus/integrations/providers/github/github.utils.d.ts +8 -5
- package/dist/plus/integrations/providers/github/github.utils.js +7 -4
- package/dist/plus/integrations/providers/github/github.utils.js.map +1 -1
- package/dist/plus/integrations/providers/github/models.d.ts +2 -3
- package/dist/plus/integrations/providers/github/models.js +2 -2
- package/dist/plus/integrations/providers/github.d.ts +174 -172
- package/dist/plus/integrations/providers/github.js +431 -523
- package/dist/plus/integrations/providers/github.js.map +1 -1
- package/dist/plus/integrations/providers/gitlab/gitlab.d.ts +67 -66
- package/dist/plus/integrations/providers/gitlab/gitlab.js +546 -757
- package/dist/plus/integrations/providers/gitlab/gitlab.js.map +1 -1
- package/dist/plus/integrations/providers/gitlab/gitlab.utils.d.ts +7 -5
- package/dist/plus/integrations/providers/gitlab/gitlab.utils.js +45 -46
- package/dist/plus/integrations/providers/gitlab/gitlab.utils.js.map +1 -1
- package/dist/plus/integrations/providers/gitlab/models.d.ts +109 -107
- package/dist/plus/integrations/providers/gitlab/models.js +74 -89
- package/dist/plus/integrations/providers/gitlab/models.js.map +1 -1
- package/dist/plus/integrations/providers/gitlab.d.ts +115 -114
- package/dist/plus/integrations/providers/gitlab.js +440 -528
- package/dist/plus/integrations/providers/gitlab.js.map +1 -1
- package/dist/plus/integrations/providers/issueSorts.d.ts +3 -1
- package/dist/plus/integrations/providers/issueSorts.js +66 -62
- package/dist/plus/integrations/providers/issueSorts.js.map +1 -1
- package/dist/plus/integrations/providers/jira-server.d.ts +90 -0
- package/dist/plus/integrations/providers/jira-server.js +322 -0
- package/dist/plus/integrations/providers/jira-server.js.map +1 -0
- package/dist/plus/integrations/providers/jira.d.ts +41 -39
- package/dist/plus/integrations/providers/jira.js +378 -440
- package/dist/plus/integrations/providers/jira.js.map +1 -1
- package/dist/plus/integrations/providers/jiraIssueByKey.d.ts +3 -1
- package/dist/plus/integrations/providers/jiraIssueByKey.js +85 -89
- package/dist/plus/integrations/providers/jiraIssueByKey.js.map +1 -1
- package/dist/plus/integrations/providers/linear.d.ts +63 -62
- package/dist/plus/integrations/providers/linear.js +315 -358
- package/dist/plus/integrations/providers/linear.js.map +1 -1
- package/dist/plus/integrations/providers/models.d.ts +514 -503
- package/dist/plus/integrations/providers/models.js +816 -865
- package/dist/plus/integrations/providers/models.js.map +1 -1
- package/dist/plus/integrations/providers/providerErrors.d.ts +35 -2
- package/dist/plus/integrations/providers/providerErrors.js +120 -81
- package/dist/plus/integrations/providers/providerErrors.js.map +1 -1
- package/dist/plus/integrations/providers/providersApi.d.ts +299 -271
- package/dist/plus/integrations/providers/providersApi.js +1048 -1001
- package/dist/plus/integrations/providers/providersApi.js.map +1 -1
- package/dist/plus/integrations/providers/pullRequestReviews.d.ts +21 -21
- package/dist/plus/integrations/providers/pullRequestReviews.js +64 -90
- package/dist/plus/integrations/providers/pullRequestReviews.js.map +1 -1
- package/dist/plus/integrations/providers/trello.d.ts +35 -34
- package/dist/plus/integrations/providers/trello.js +136 -143
- package/dist/plus/integrations/providers/trello.js.map +1 -1
- package/dist/plus/integrations/providers/utils/providerPaging.d.ts +4 -2
- package/dist/plus/integrations/providers/utils/providerPaging.js +131 -156
- package/dist/plus/integrations/providers/utils/providerPaging.js.map +1 -1
- package/dist/plus/integrations/providers/utils.d.ts +51 -50
- package/dist/plus/integrations/providers/utils.js +185 -296
- package/dist/plus/integrations/providers/utils.js.map +1 -1
- package/dist/plus/integrations/reads/broaden.d.ts +10 -8
- package/dist/plus/integrations/reads/broaden.js +320 -439
- package/dist/plus/integrations/reads/broaden.js.map +1 -1
- package/dist/plus/integrations/reads/context.d.ts +47 -45
- package/dist/plus/integrations/reads/context.js +0 -2
- package/dist/plus/integrations/reads/counts.d.ts +74 -72
- package/dist/plus/integrations/reads/counts.js +233 -314
- package/dist/plus/integrations/reads/counts.js.map +1 -1
- package/dist/plus/integrations/reads/cursors.d.ts +26 -24
- package/dist/plus/integrations/reads/cursors.js +80 -115
- package/dist/plus/integrations/reads/cursors.js.map +1 -1
- package/dist/plus/integrations/reads/drains.d.ts +24 -23
- package/dist/plus/integrations/reads/drains.js +225 -298
- package/dist/plus/integrations/reads/drains.js.map +1 -1
- package/dist/plus/integrations/reads/filters.d.ts +84 -80
- package/dist/plus/integrations/reads/filters.js +326 -414
- package/dist/plus/integrations/reads/filters.js.map +1 -1
- package/dist/plus/integrations/reads/hierarchy.d.ts +14 -12
- package/dist/plus/integrations/reads/hierarchy.js +248 -332
- package/dist/plus/integrations/reads/hierarchy.js.map +1 -1
- package/dist/plus/integrations/reads/hierarchy.utils.d.ts +11 -9
- package/dist/plus/integrations/reads/hierarchy.utils.js +109 -108
- package/dist/plus/integrations/reads/hierarchy.utils.js.map +1 -1
- package/dist/plus/integrations/reads/issueBatch.d.ts +28 -26
- package/dist/plus/integrations/reads/issueBatch.js +83 -85
- package/dist/plus/integrations/reads/issueBatch.js.map +1 -1
- package/dist/plus/integrations/reads/issueTracker.d.ts +42 -33
- package/dist/plus/integrations/reads/issueTracker.js +265 -386
- package/dist/plus/integrations/reads/issueTracker.js.map +1 -1
- package/dist/plus/integrations/reads/issues.d.ts +50 -47
- package/dist/plus/integrations/reads/issues.js +202 -331
- package/dist/plus/integrations/reads/issues.js.map +1 -1
- package/dist/plus/integrations/reads/ordering.d.ts +32 -30
- package/dist/plus/integrations/reads/ordering.js +47 -43
- package/dist/plus/integrations/reads/ordering.js.map +1 -1
- package/dist/plus/integrations/reads/paging.d.ts +59 -57
- package/dist/plus/integrations/reads/paging.js +244 -261
- package/dist/plus/integrations/reads/paging.js.map +1 -1
- package/dist/plus/integrations/reads/pullRequests.d.ts +37 -35
- package/dist/plus/integrations/reads/pullRequests.js +95 -148
- package/dist/plus/integrations/reads/pullRequests.js.map +1 -1
- package/dist/plus/integrations/reads/resolveRepository.d.ts +15 -13
- package/dist/plus/integrations/reads/resolveRepository.js +147 -231
- package/dist/plus/integrations/reads/resolveRepository.js.map +1 -1
- package/dist/plus/integrations/reads/searchIssues.d.ts +29 -27
- package/dist/plus/integrations/reads/searchIssues.js +104 -153
- package/dist/plus/integrations/reads/searchIssues.js.map +1 -1
- package/dist/plus/integrations/reads/searchPullRequests.d.ts +20 -18
- package/dist/plus/integrations/reads/searchPullRequests.js +91 -113
- package/dist/plus/integrations/reads/searchPullRequests.js.map +1 -1
- package/dist/plus/integrations/reads/sweeps.d.ts +6 -4
- package/dist/plus/integrations/reads/sweeps.js +143 -178
- package/dist/plus/integrations/reads/sweeps.js.map +1 -1
- package/dist/plus/integrations/reads/trackerIssue.d.ts +24 -16
- package/dist/plus/integrations/reads/trackerIssue.js +52 -49
- package/dist/plus/integrations/reads/trackerIssue.js.map +1 -1
- package/dist/plus/integrations/reads/warnings.d.ts +10 -7
- package/dist/plus/integrations/reads/warnings.js +264 -291
- package/dist/plus/integrations/reads/warnings.js.map +1 -1
- package/dist/plus/integrations/results.d.ts +201 -199
- package/dist/plus/integrations/results.js +105 -119
- package/dist/plus/integrations/results.js.map +1 -1
- package/dist/plus/integrations/telemetry.d.ts +7 -5
- package/dist/plus/integrations/telemetry.js +9 -9
- package/dist/plus/integrations/telemetry.js.map +1 -1
- package/dist/plus/integrations/utils/domain.utils.d.ts +21 -0
- package/dist/plus/integrations/utils/domain.utils.js +55 -22
- package/dist/plus/integrations/utils/domain.utils.js.map +1 -1
- package/dist/plus/integrations/utils/integration.utils.d.ts +30 -6
- package/dist/plus/integrations/utils/integration.utils.js +154 -161
- package/dist/plus/integrations/utils/integration.utils.js.map +1 -1
- package/dist/utils/array.d.ts +9 -7
- package/dist/utils/array.js +110 -126
- package/dist/utils/array.js.map +1 -1
- package/dist/utils/base64.d.ts +2 -2
- package/dist/utils/base64.js +2 -2
- package/dist/utils/brand.d.ts +4 -3
- package/dist/utils/brand.js +0 -2
- package/dist/utils/cancellation.d.ts +24 -24
- package/dist/utils/cancellation.js +152 -167
- package/dist/utils/cancellation.js.map +1 -1
- package/dist/utils/charCode.d.ts +31 -37
- package/dist/utils/charCode.js +41 -37
- package/dist/utils/charCode.js.map +1 -1
- package/dist/utils/coalescedRun.d.ts +10 -8
- package/dist/utils/coalescedRun.js +39 -41
- package/dist/utils/coalescedRun.js.map +1 -1
- package/dist/utils/color.d.ts +137 -135
- package/dist/utils/color.js +535 -660
- package/dist/utils/color.js.map +1 -1
- package/dist/utils/counter.d.ts +5 -3
- package/dist/utils/counter.js +19 -17
- package/dist/utils/counter.js.map +1 -1
- package/dist/utils/crypto.d.ts +2 -2
- package/dist/utils/crypto.js +2 -2
- package/dist/utils/date.d.ts +10 -9
- package/dist/utils/date.js +312 -350
- package/dist/utils/date.js.map +1 -1
- package/dist/utils/debounce.d.ts +45 -43
- package/dist/utils/debounce.js +175 -206
- package/dist/utils/debounce.js.map +1 -1
- package/dist/utils/decorators/debounce.d.ts +3 -1
- package/dist/utils/decorators/debounce.js +16 -19
- package/dist/utils/decorators/debounce.js.map +1 -1
- package/dist/utils/decorators/gate.d.ts +13 -11
- package/dist/utils/decorators/gate.js +97 -124
- package/dist/utils/decorators/gate.js.map +1 -1
- package/dist/utils/decorators/log.d.ts +25 -24
- package/dist/utils/decorators/log.js +166 -227
- package/dist/utils/decorators/log.js.map +1 -1
- package/dist/utils/decorators/memoize.d.ts +10 -8
- package/dist/utils/decorators/memoize.js +49 -57
- package/dist/utils/decorators/memoize.js.map +1 -1
- package/dist/utils/decorators/resolver.d.ts +2 -0
- package/dist/utils/decorators/resolver.js +64 -75
- package/dist/utils/decorators/resolver.js.map +1 -1
- package/dist/utils/decorators/sequentialize.d.ts +15 -14
- package/dist/utils/decorators/sequentialize.js +61 -80
- package/dist/utils/decorators/sequentialize.js.map +1 -1
- package/dist/utils/decorators/serializable.d.ts +2 -0
- package/dist/utils/decorators/serializable.js +30 -39
- package/dist/utils/decorators/serializable.js.map +1 -1
- package/dist/utils/dedupedAsyncCache.d.ts +23 -21
- package/dist/utils/dedupedAsyncCache.js +63 -66
- package/dist/utils/dedupedAsyncCache.js.map +1 -1
- package/dist/utils/diff.d.ts +2 -0
- package/dist/utils/diff.js +41 -51
- package/dist/utils/diff.js.map +1 -1
- package/dist/utils/disposable.d.ts +15 -13
- package/dist/utils/disposable.js +71 -80
- package/dist/utils/disposable.js.map +1 -1
- package/dist/utils/dom.d.ts +45 -0
- package/dist/utils/dom.js +106 -0
- package/dist/utils/dom.js.map +1 -0
- package/dist/utils/encoding.d.ts +2 -0
- package/dist/utils/encoding.js +7 -5
- package/dist/utils/encoding.js.map +1 -1
- package/dist/utils/env/browser/base64.d.ts +2 -0
- package/dist/utils/env/browser/base64.js +32 -34
- package/dist/utils/env/browser/base64.js.map +1 -1
- package/dist/utils/env/browser/crypto.d.ts +2 -0
- package/dist/utils/env/browser/crypto.js +17 -13
- package/dist/utils/env/browser/crypto.js.map +1 -1
- package/dist/utils/env/browser/fs.d.ts +2 -0
- package/dist/utils/env/browser/fs.js +6 -2
- package/dist/utils/env/browser/fs.js.map +1 -1
- package/dist/utils/env/browser/hex.d.ts +2 -0
- package/dist/utils/env/browser/hex.js +271 -29
- package/dist/utils/env/browser/hex.js.map +1 -1
- package/dist/utils/env/browser/hrtime.d.ts +2 -0
- package/dist/utils/env/browser/hrtime.js +17 -13
- package/dist/utils/env/browser/hrtime.js.map +1 -1
- package/dist/utils/env/browser/logScope.d.ts +3 -1
- package/dist/utils/env/browser/logScope.js +39 -43
- package/dist/utils/env/browser/logScope.js.map +1 -1
- package/dist/utils/env/browser/md5.d.ts +2 -0
- package/dist/utils/env/browser/md5.js +211 -184
- package/dist/utils/env/browser/md5.js.map +1 -1
- package/dist/utils/env/browser/platform.d.ts +3 -0
- package/dist/utils/env/browser/platform.js +11 -4
- package/dist/utils/env/browser/platform.js.map +1 -1
- package/dist/utils/env/node/base64.d.ts +2 -0
- package/dist/utils/env/node/base64.js +13 -11
- package/dist/utils/env/node/base64.js.map +1 -1
- package/dist/utils/env/node/crypto.d.ts +2 -0
- package/dist/utils/env/node/crypto.js +13 -9
- package/dist/utils/env/node/crypto.js.map +1 -1
- package/dist/utils/env/node/exec.d.ts +66 -65
- package/dist/utils/env/node/exec.js +255 -267
- package/dist/utils/env/node/exec.js.map +1 -1
- package/dist/utils/env/node/fs.d.ts +2 -0
- package/dist/utils/env/node/fs.js +7 -3
- package/dist/utils/env/node/fs.js.map +1 -1
- package/dist/utils/env/node/hex.d.ts +2 -0
- package/dist/utils/env/node/hex.js +10 -6
- package/dist/utils/env/node/hex.js.map +1 -1
- package/dist/utils/env/node/hrtime.d.ts +2 -2
- package/dist/utils/env/node/hrtime.js +2 -2
- package/dist/utils/env/node/logScope.d.ts +3 -1
- package/dist/utils/env/node/logScope.js +52 -42
- package/dist/utils/env/node/logScope.js.map +1 -1
- package/dist/utils/env/node/platform.d.ts +3 -0
- package/dist/utils/env/node/platform.js +11 -4
- package/dist/utils/env/node/platform.js.map +1 -1
- package/dist/utils/error.d.ts +8 -6
- package/dist/utils/error.js +16 -14
- package/dist/utils/error.js.map +1 -1
- package/dist/utils/event.d.ts +27 -25
- package/dist/utils/event.js +141 -170
- package/dist/utils/event.js.map +1 -1
- package/dist/utils/formatter.d.ts +15 -14
- package/dist/utils/formatter.js +96 -129
- package/dist/utils/formatter.js.map +1 -1
- package/dist/utils/fs.d.ts +2 -2
- package/dist/utils/fs.js +2 -2
- package/dist/utils/function.d.ts +5 -6
- package/dist/utils/function.js +73 -90
- package/dist/utils/function.js.map +1 -1
- package/dist/utils/fuzzy.d.ts +18 -16
- package/dist/utils/fuzzy.js +121 -127
- package/dist/utils/fuzzy.js.map +1 -1
- package/dist/utils/gitRefs.d.ts +11 -0
- package/dist/utils/gitRefs.js +21 -0
- package/dist/utils/gitRefs.js.map +1 -0
- package/dist/utils/hash.d.ts +2 -0
- package/dist/utils/hash.js +49 -47
- package/dist/utils/hash.js.map +1 -1
- package/dist/utils/hex.d.ts +2 -2
- package/dist/utils/hex.js +2 -2
- package/dist/utils/hostingServiceType.d.ts +8 -0
- package/dist/utils/hostingServiceType.js +0 -0
- package/dist/utils/hrtime.d.ts +4 -2
- package/dist/utils/hrtime.js +8 -5
- package/dist/utils/hrtime.js.map +1 -1
- package/dist/utils/iterable.d.ts +3 -1
- package/dist/utils/iterable.js +591 -616
- package/dist/utils/iterable.js.map +1 -1
- package/dist/utils/keys/chord.d.ts +27 -25
- package/dist/utils/keys/chord.js +108 -122
- package/dist/utils/keys/chord.js.map +1 -1
- package/dist/utils/keys/keybinding.d.ts +98 -22
- package/dist/utils/keys/keybinding.js +151 -53
- package/dist/utils/keys/keybinding.js.map +1 -1
- package/dist/utils/keys/keymapDispatcher.d.ts +66 -0
- package/dist/utils/keys/keymapDispatcher.js +187 -0
- package/dist/utils/keys/keymapDispatcher.js.map +1 -0
- package/dist/utils/lazy.d.ts +14 -12
- package/dist/utils/lazy.js +35 -36
- package/dist/utils/lazy.js.map +1 -1
- package/dist/utils/loggable.d.ts +3 -1
- package/dist/utils/loggable.js +6 -2
- package/dist/utils/loggable.js.map +1 -1
- package/dist/utils/logger.d.ts +48 -46
- package/dist/utils/logger.js +219 -304
- package/dist/utils/logger.js.map +1 -1
- package/dist/utils/logger.scoped.d.ts +30 -28
- package/dist/utils/logger.scoped.js +133 -147
- package/dist/utils/logger.scoped.js.map +1 -1
- package/dist/utils/lruMap.d.ts +34 -32
- package/dist/utils/lruMap.js +97 -101
- package/dist/utils/lruMap.js.map +1 -1
- package/dist/utils/markdown.d.ts +5 -3
- package/dist/utils/markdown.js +52 -88
- package/dist/utils/markdown.js.map +1 -1
- package/dist/utils/mru.d.ts +13 -11
- package/dist/utils/mru.js +57 -62
- package/dist/utils/mru.js.map +1 -1
- package/dist/utils/object.d.ts +9 -34
- package/dist/utils/object.js +132 -191
- package/dist/utils/object.js.map +1 -1
- package/dist/utils/paging.d.ts +36 -34
- package/dist/utils/paging.js +42 -45
- package/dist/utils/paging.js.map +1 -1
- package/dist/utils/path.d.ts +4 -1
- package/dist/utils/path.js +129 -162
- package/dist/utils/path.js.map +1 -1
- package/dist/utils/pausedOperation.d.ts +42 -0
- package/dist/utils/pausedOperation.js +62 -0
- package/dist/utils/pausedOperation.js.map +1 -0
- package/dist/utils/platform.d.ts +2 -2
- package/dist/utils/platform.js +2 -2
- package/dist/utils/plural.d.ts +21 -0
- package/dist/utils/plural.js +136 -0
- package/dist/utils/plural.js.map +1 -0
- package/dist/utils/promise.d.ts +19 -18
- package/dist/utils/promise.js +323 -360
- package/dist/utils/promise.js.map +1 -1
- package/dist/utils/promiseCache.d.ts +331 -330
- package/dist/utils/promiseCache.js +602 -717
- package/dist/utils/promiseCache.js.map +1 -1
- package/dist/utils/resourceUsage.d.ts +2 -0
- package/dist/utils/resourceUsage.js +0 -2
- package/dist/utils/searchTree.d.ts +51 -49
- package/dist/utils/searchTree.js +306 -396
- package/dist/utils/searchTree.js.map +1 -1
- package/dist/utils/stopwatch.d.ts +33 -32
- package/dist/utils/stopwatch.js +67 -81
- package/dist/utils/stopwatch.js.map +1 -1
- package/dist/utils/string.d.ts +17 -24
- package/dist/utils/string.js +787 -803
- package/dist/utils/string.js.map +1 -1
- package/dist/utils/subscriptionManager.d.ts +15 -14
- package/dist/utils/subscriptionManager.js +36 -33
- package/dist/utils/subscriptionManager.js.map +1 -1
- package/dist/utils/trie.d.ts +64 -62
- package/dist/utils/trie.js +438 -580
- package/dist/utils/trie.js.map +1 -1
- package/dist/utils/types.d.ts +8 -16
- package/dist/utils/types.js +0 -2
- package/dist/utils/uri.d.ts +27 -25
- package/dist/utils/uri.js +42 -42
- package/dist/utils/uri.js.map +1 -1
- package/dist/utils/validation.d.ts +13 -12
- package/dist/utils/validation.js +17 -23
- package/dist/utils/validation.js.map +1 -1
- package/dist/utils/version.d.ts +6 -5
- package/dist/utils/version.js +77 -104
- package/dist/utils/version.js.map +1 -1
- package/docs/integrations.md +70 -26
- package/package.json +18 -8
- package/dist/git/cache.d.ts.map +0 -1
- package/dist/git/context.d.ts.map +0 -1
- package/dist/git/errors.d.ts.map +0 -1
- package/dist/git/features.d.ts.map +0 -1
- package/dist/git/gitHealth.d.ts.map +0 -1
- package/dist/git/models/author.d.ts.map +0 -1
- package/dist/git/models/author.js.map +0 -1
- package/dist/git/models/autolink.d.ts.map +0 -1
- package/dist/git/models/autolink.js.map +0 -1
- package/dist/git/models/blame.d.ts.map +0 -1
- package/dist/git/models/blame.js.map +0 -1
- package/dist/git/models/branch.d.ts.map +0 -1
- package/dist/git/models/commit.d.ts.map +0 -1
- package/dist/git/models/contributor.d.ts.map +0 -1
- package/dist/git/models/defaultBranch.d.ts.map +0 -1
- package/dist/git/models/defaultBranch.js.map +0 -1
- package/dist/git/models/diff.d.ts.map +0 -1
- package/dist/git/models/diff.js.map +0 -1
- package/dist/git/models/file.d.ts.map +0 -1
- package/dist/git/models/file.js.map +0 -1
- package/dist/git/models/fileChange.d.ts.map +0 -1
- package/dist/git/models/fileStatus.d.ts.map +0 -1
- package/dist/git/models/graph.d.ts.map +0 -1
- package/dist/git/models/graphSearch.d.ts.map +0 -1
- package/dist/git/models/graphSearch.js.map +0 -1
- package/dist/git/models/graphSession.d.ts.map +0 -1
- package/dist/git/models/issue.d.ts.map +0 -1
- package/dist/git/models/issueOrPullRequest.d.ts.map +0 -1
- package/dist/git/models/issueOrPullRequest.js.map +0 -1
- package/dist/git/models/lineRange.d.ts.map +0 -1
- package/dist/git/models/lineRange.js.map +0 -1
- package/dist/git/models/log.d.ts.map +0 -1
- package/dist/git/models/log.js.map +0 -1
- package/dist/git/models/mergeConflicts.d.ts.map +0 -1
- package/dist/git/models/mergeConflicts.js.map +0 -1
- package/dist/git/models/patch.d.ts.map +0 -1
- package/dist/git/models/patch.js.map +0 -1
- package/dist/git/models/pausedOperationStatus.d.ts.map +0 -1
- package/dist/git/models/pausedOperationStatus.js.map +0 -1
- package/dist/git/models/pullRequest.d.ts.map +0 -1
- package/dist/git/models/rebase.d.ts.map +0 -1
- package/dist/git/models/rebase.js.map +0 -1
- package/dist/git/models/reference.d.ts.map +0 -1
- package/dist/git/models/reference.js.map +0 -1
- package/dist/git/models/reflog.d.ts.map +0 -1
- package/dist/git/models/remote.d.ts.map +0 -1
- package/dist/git/models/remoteProvider.d.ts.map +0 -1
- package/dist/git/models/remoteResource.d.ts.map +0 -1
- package/dist/git/models/repository.d.ts.map +0 -1
- package/dist/git/models/repositoryChangeEvent.d.ts.map +0 -1
- package/dist/git/models/repositoryIdentities.d.ts.map +0 -1
- package/dist/git/models/repositoryMetadata.d.ts.map +0 -1
- package/dist/git/models/repositoryMetadata.js.map +0 -1
- package/dist/git/models/resourceDescriptor.d.ts.map +0 -1
- package/dist/git/models/resourceDescriptor.js.map +0 -1
- package/dist/git/models/revision.d.ts.map +0 -1
- package/dist/git/models/search.d.ts.map +0 -1
- package/dist/git/models/shortlog.d.ts.map +0 -1
- package/dist/git/models/shortlog.js.map +0 -1
- package/dist/git/models/signature.d.ts.map +0 -1
- package/dist/git/models/signature.js.map +0 -1
- package/dist/git/models/staging.d.ts.map +0 -1
- package/dist/git/models/staging.js.map +0 -1
- package/dist/git/models/stash.d.ts.map +0 -1
- package/dist/git/models/stash.js.map +0 -1
- package/dist/git/models/status.d.ts.map +0 -1
- package/dist/git/models/statusFile.d.ts.map +0 -1
- package/dist/git/models/tag.d.ts.map +0 -1
- package/dist/git/models/tree.d.ts.map +0 -1
- package/dist/git/models/tree.js.map +0 -1
- package/dist/git/models/user.d.ts.map +0 -1
- package/dist/git/models/user.js.map +0 -1
- package/dist/git/models/worktree.d.ts.map +0 -1
- package/dist/git/parsers/diffParser.d.ts.map +0 -1
- package/dist/git/parsers/rebaseTodoParser.d.ts.map +0 -1
- package/dist/git/providers/blame.d.ts.map +0 -1
- package/dist/git/providers/blame.js.map +0 -1
- package/dist/git/providers/branches.d.ts.map +0 -1
- package/dist/git/providers/branches.js.map +0 -1
- package/dist/git/providers/commits.d.ts.map +0 -1
- package/dist/git/providers/commits.js.map +0 -1
- package/dist/git/providers/config.d.ts.map +0 -1
- package/dist/git/providers/config.js.map +0 -1
- package/dist/git/providers/contributors.d.ts.map +0 -1
- package/dist/git/providers/contributors.js.map +0 -1
- package/dist/git/providers/diff.d.ts.map +0 -1
- package/dist/git/providers/diff.js.map +0 -1
- package/dist/git/providers/graph.d.ts.map +0 -1
- package/dist/git/providers/graph.js.map +0 -1
- package/dist/git/providers/maintenance.d.ts.map +0 -1
- package/dist/git/providers/maintenance.js.map +0 -1
- package/dist/git/providers/operations.d.ts.map +0 -1
- package/dist/git/providers/operations.js.map +0 -1
- package/dist/git/providers/patch.d.ts.map +0 -1
- package/dist/git/providers/patch.js.map +0 -1
- package/dist/git/providers/pausedOperations.d.ts.map +0 -1
- package/dist/git/providers/pausedOperations.js.map +0 -1
- package/dist/git/providers/provider.d.ts.map +0 -1
- package/dist/git/providers/provider.js.map +0 -1
- package/dist/git/providers/refs.d.ts.map +0 -1
- package/dist/git/providers/refs.js.map +0 -1
- package/dist/git/providers/remotes.d.ts.map +0 -1
- package/dist/git/providers/remotes.js.map +0 -1
- package/dist/git/providers/revision.d.ts.map +0 -1
- package/dist/git/providers/revision.js.map +0 -1
- package/dist/git/providers/shared/remotes.d.ts.map +0 -1
- package/dist/git/providers/staging.d.ts.map +0 -1
- package/dist/git/providers/staging.js.map +0 -1
- package/dist/git/providers/stash.d.ts.map +0 -1
- package/dist/git/providers/stash.js.map +0 -1
- package/dist/git/providers/status.d.ts.map +0 -1
- package/dist/git/providers/status.js.map +0 -1
- package/dist/git/providers/tags.d.ts.map +0 -1
- package/dist/git/providers/tags.js.map +0 -1
- package/dist/git/providers/types.d.ts.map +0 -1
- package/dist/git/providers/types.js.map +0 -1
- package/dist/git/providers/worktrees.d.ts.map +0 -1
- package/dist/git/providers/worktrees.js.map +0 -1
- package/dist/git/remotes/azure-devops.d.ts.map +0 -1
- package/dist/git/remotes/bitbucket-server.d.ts.map +0 -1
- package/dist/git/remotes/bitbucket.d.ts.map +0 -1
- package/dist/git/remotes/custom.d.ts.map +0 -1
- package/dist/git/remotes/gerrit.d.ts.map +0 -1
- package/dist/git/remotes/gitea.d.ts.map +0 -1
- package/dist/git/remotes/github.d.ts.map +0 -1
- package/dist/git/remotes/gitlab.d.ts.map +0 -1
- package/dist/git/remotes/google-source.d.ts.map +0 -1
- package/dist/git/remotes/matcher.d.ts.map +0 -1
- package/dist/git/repositoryService.d.ts.map +0 -1
- package/dist/git/run.types.d.ts.map +0 -1
- package/dist/git/run.types.js.map +0 -1
- package/dist/git/service.d.ts.map +0 -1
- package/dist/git/utils/autolink.utils.d.ts.map +0 -1
- package/dist/git/utils/blame.utils.d.ts.map +0 -1
- package/dist/git/utils/branch.utils.d.ts.map +0 -1
- package/dist/git/utils/commit.utils.d.ts.map +0 -1
- package/dist/git/utils/config.utils.d.ts.map +0 -1
- package/dist/git/utils/conflictResolution.utils.d.ts.map +0 -1
- package/dist/git/utils/contributor.utils.d.ts.map +0 -1
- package/dist/git/utils/fetch.utils.d.ts.map +0 -1
- package/dist/git/utils/fileStatus.utils.d.ts.map +0 -1
- package/dist/git/utils/graph.utils.d.ts.map +0 -1
- package/dist/git/utils/issue.utils.d.ts.map +0 -1
- package/dist/git/utils/issueOrPullRequest.utils.d.ts.map +0 -1
- package/dist/git/utils/mergeConflicts.utils.d.ts.map +0 -1
- package/dist/git/utils/pausedOperationStatus.utils.d.ts.map +0 -1
- package/dist/git/utils/pullRequest.utils.d.ts.map +0 -1
- package/dist/git/utils/reachability.utils.d.ts.map +0 -1
- package/dist/git/utils/rebase.utils.d.ts.map +0 -1
- package/dist/git/utils/reference.utils.d.ts.map +0 -1
- package/dist/git/utils/remote.utils.d.ts.map +0 -1
- package/dist/git/utils/repository.utils.d.ts.map +0 -1
- package/dist/git/utils/resourceDescriptor.utils.d.ts.map +0 -1
- package/dist/git/utils/revision.utils.d.ts.map +0 -1
- package/dist/git/utils/search.utils.d.ts.map +0 -1
- package/dist/git/utils/sorting.d.ts.map +0 -1
- package/dist/git/utils/sshKey.utils.d.ts.map +0 -1
- package/dist/git/utils/status.utils.d.ts.map +0 -1
- package/dist/git/utils/statusFile.utils.d.ts.map +0 -1
- package/dist/git/utils/tag.utils.d.ts.map +0 -1
- package/dist/git/utils/tooltip.utils.d.ts.map +0 -1
- package/dist/git/utils/uriAuthority.d.ts.map +0 -1
- package/dist/git/utils/user.utils.d.ts.map +0 -1
- package/dist/git/utils/worktree.utils.d.ts.map +0 -1
- package/dist/git/watching/changeEvent.d.ts.map +0 -1
- package/dist/git/watching/classifyChange.d.ts.map +0 -1
- package/dist/git/watching/gitIgnoreFilter.d.ts.map +0 -1
- package/dist/git/watching/initWatcher.d.ts.map +0 -1
- package/dist/git/watching/provider.d.ts.map +0 -1
- package/dist/git/watching/provider.js.map +0 -1
- package/dist/git/watching/watchGroup.d.ts.map +0 -1
- package/dist/git/watching/watchService.d.ts.map +0 -1
- package/dist/git/watching/watchSession.d.ts.map +0 -1
- package/dist/git/watching/watcherPatterns.d.ts.map +0 -1
- package/dist/git-cli/cliGitProvider.d.ts.map +0 -1
- package/dist/git-cli/exec/exec.d.ts.map +0 -1
- package/dist/git-cli/exec/exec.errors.d.ts.map +0 -1
- package/dist/git-cli/exec/exec.errors.js.map +0 -1
- package/dist/git-cli/exec/exec.js.map +0 -1
- package/dist/git-cli/exec/exec.types.d.ts.map +0 -1
- package/dist/git-cli/exec/exec.types.js.map +0 -1
- package/dist/git-cli/exec/features.d.ts.map +0 -1
- package/dist/git-cli/exec/features.js.map +0 -1
- package/dist/git-cli/exec/git.d.ts.map +0 -1
- package/dist/git-cli/exec/gitQueue.d.ts.map +0 -1
- package/dist/git-cli/exec/locator.d.ts.map +0 -1
- package/dist/git-cli/parsers/blameParser.d.ts.map +0 -1
- package/dist/git-cli/parsers/indexParser.d.ts.map +0 -1
- package/dist/git-cli/parsers/logParser.d.ts.map +0 -1
- package/dist/git-cli/parsers/mergeTreeParser.d.ts.map +0 -1
- package/dist/git-cli/parsers/refParser.d.ts.map +0 -1
- package/dist/git-cli/parsers/reflogParser.d.ts.map +0 -1
- package/dist/git-cli/parsers/remoteParser.d.ts.map +0 -1
- package/dist/git-cli/parsers/shortlogParser.d.ts.map +0 -1
- package/dist/git-cli/parsers/signatureParser.d.ts.map +0 -1
- package/dist/git-cli/parsers/sshSignatureParser.d.ts.map +0 -1
- package/dist/git-cli/parsers/statusParser.d.ts.map +0 -1
- package/dist/git-cli/parsers/treeParser.d.ts.map +0 -1
- package/dist/git-cli/parsers/worktreeParser.d.ts.map +0 -1
- package/dist/git-cli/providers/blame.d.ts.map +0 -1
- package/dist/git-cli/providers/branches.d.ts.map +0 -1
- package/dist/git-cli/providers/commitFilesetUtils.d.ts.map +0 -1
- package/dist/git-cli/providers/commits.d.ts.map +0 -1
- package/dist/git-cli/providers/config.d.ts.map +0 -1
- package/dist/git-cli/providers/contributors.d.ts.map +0 -1
- package/dist/git-cli/providers/diff.d.ts.map +0 -1
- package/dist/git-cli/providers/graph.d.ts.map +0 -1
- package/dist/git-cli/providers/maintenance.d.ts.map +0 -1
- package/dist/git-cli/providers/operations.d.ts.map +0 -1
- package/dist/git-cli/providers/patch.d.ts.map +0 -1
- package/dist/git-cli/providers/pausedOperations.d.ts.map +0 -1
- package/dist/git-cli/providers/refs.d.ts.map +0 -1
- package/dist/git-cli/providers/remotes.d.ts.map +0 -1
- package/dist/git-cli/providers/revision.d.ts.map +0 -1
- package/dist/git-cli/providers/staging.d.ts.map +0 -1
- package/dist/git-cli/providers/stash.d.ts.map +0 -1
- package/dist/git-cli/providers/status.d.ts.map +0 -1
- package/dist/git-cli/providers/tags.d.ts.map +0 -1
- package/dist/git-cli/providers/worktrees.d.ts.map +0 -1
- package/dist/git-cli/service.d.ts.map +0 -1
- package/dist/ipc/discovery.d.ts.map +0 -1
- package/dist/ipc/ipcServer.d.ts.map +0 -1
- package/dist/plus/agents/agentCapabilities.d.ts.map +0 -1
- package/dist/plus/agents/providers/claudeCodeTranscript.d.ts.map +0 -1
- package/dist/plus/agents/providers/gkAgentProvider.d.ts.map +0 -1
- package/dist/plus/agents/sanitizePrompt.d.ts.map +0 -1
- package/dist/plus/agents/stateMachine.d.ts.map +0 -1
- package/dist/plus/agents/types.d.ts.map +0 -1
- package/dist/plus/ai/constants.d.ts.map +0 -1
- package/dist/plus/ai/errors.d.ts.map +0 -1
- package/dist/plus/ai/models/conversation.d.ts.map +0 -1
- package/dist/plus/ai/models/model.d.ts.map +0 -1
- package/dist/plus/ai/models/promptTemplates.d.ts.map +0 -1
- package/dist/plus/ai/models/promptTemplates.js.map +0 -1
- package/dist/plus/ai/models/provider.d.ts.map +0 -1
- package/dist/plus/ai/models/provider.js.map +0 -1
- package/dist/plus/ai/models/results.d.ts.map +0 -1
- package/dist/plus/ai/models/results.js.map +0 -1
- package/dist/plus/ai/prompts.d.ts.map +0 -1
- package/dist/plus/ai/providers/anthropicProvider.d.ts.map +0 -1
- package/dist/plus/ai/providers/azureProvider.d.ts.map +0 -1
- package/dist/plus/ai/providers/context.d.ts.map +0 -1
- package/dist/plus/ai/providers/context.js.map +0 -1
- package/dist/plus/ai/providers/deepSeekProvider.d.ts.map +0 -1
- package/dist/plus/ai/providers/geminiProvider.d.ts.map +0 -1
- package/dist/plus/ai/providers/gitkrakenProvider.d.ts.map +0 -1
- package/dist/plus/ai/providers/huggingFaceProvider.d.ts.map +0 -1
- package/dist/plus/ai/providers/mistralProvider.d.ts.map +0 -1
- package/dist/plus/ai/providers/ollamaProvider.d.ts.map +0 -1
- package/dist/plus/ai/providers/openAICompatibleProvider.d.ts.map +0 -1
- package/dist/plus/ai/providers/openAICompatibleProviderBase.d.ts.map +0 -1
- package/dist/plus/ai/providers/openRouterProvider.d.ts.map +0 -1
- package/dist/plus/ai/providers/openaiProvider.d.ts.map +0 -1
- package/dist/plus/ai/providers/responseFormatCache.d.ts.map +0 -1
- package/dist/plus/ai/providers/xaiProvider.d.ts.map +0 -1
- package/dist/plus/ai/utils/ai.utils.d.ts.map +0 -1
- package/dist/plus/ai/utils/results.utils.d.ts.map +0 -1
- package/dist/plus/ai/utils/truncation.utils.d.ts.map +0 -1
- package/dist/plus/git-github/api/config.d.ts.map +0 -1
- package/dist/plus/git-github/api/github.d.ts.map +0 -1
- package/dist/plus/git-github/api/github.utils.d.ts.map +0 -1
- package/dist/plus/git-github/api/issueSearchQuery.d.ts.map +0 -1
- package/dist/plus/git-github/api/pullRequestSearchQuery.d.ts.map +0 -1
- package/dist/plus/git-github/api/token.d.ts.map +0 -1
- package/dist/plus/git-github/api/token.js.map +0 -1
- package/dist/plus/git-github/api/tokenUtils.d.ts.map +0 -1
- package/dist/plus/git-github/api/types.d.ts.map +0 -1
- package/dist/plus/git-github/api/types.js.map +0 -1
- package/dist/plus/git-github/context.d.ts.map +0 -1
- package/dist/plus/git-github/models.d.ts.map +0 -1
- package/dist/plus/git-github/providers/github/blame.d.ts.map +0 -1
- package/dist/plus/git-github/providers/github/branches.d.ts.map +0 -1
- package/dist/plus/git-github/providers/github/commits.d.ts.map +0 -1
- package/dist/plus/git-github/providers/github/config.d.ts.map +0 -1
- package/dist/plus/git-github/providers/github/contributors.d.ts.map +0 -1
- package/dist/plus/git-github/providers/github/diff.d.ts.map +0 -1
- package/dist/plus/git-github/providers/github/graph.d.ts.map +0 -1
- package/dist/plus/git-github/providers/github/refs.d.ts.map +0 -1
- package/dist/plus/git-github/providers/github/remotes.d.ts.map +0 -1
- package/dist/plus/git-github/providers/github/revision.d.ts.map +0 -1
- package/dist/plus/git-github/providers/github/status.d.ts.map +0 -1
- package/dist/plus/git-github/providers/github/tags.d.ts.map +0 -1
- package/dist/plus/git-github/providers/githubGitProvider.d.ts.map +0 -1
- package/dist/plus/git-github/providers/githubProvider.d.ts.map +0 -1
- package/dist/plus/git-github/providers/githubProvider.js.map +0 -1
- package/dist/plus/integrations/authentication/cloudIntegrationService.d.ts.map +0 -1
- package/dist/plus/integrations/authentication/configuredIntegrationService.d.ts.map +0 -1
- package/dist/plus/integrations/authentication/integrationAuthenticationProvider.d.ts.map +0 -1
- package/dist/plus/integrations/authentication/integrationAuthenticationService.d.ts.map +0 -1
- package/dist/plus/integrations/authentication/manualTokenProvider.d.ts.map +0 -1
- package/dist/plus/integrations/authentication/models.d.ts.map +0 -1
- package/dist/plus/integrations/authentication/rejectedTokenTracker.d.ts.map +0 -1
- package/dist/plus/integrations/collectionMetadata.d.ts.map +0 -1
- package/dist/plus/integrations/constants.d.ts.map +0 -1
- package/dist/plus/integrations/context.d.ts.map +0 -1
- package/dist/plus/integrations/context.js.map +0 -1
- package/dist/plus/integrations/errors.d.ts.map +0 -1
- package/dist/plus/integrations/index.d.ts.map +0 -1
- package/dist/plus/integrations/integrationService.d.ts.map +0 -1
- package/dist/plus/integrations/lite.d.ts.map +0 -1
- package/dist/plus/integrations/manager.d.ts.map +0 -1
- package/dist/plus/integrations/manager.js.map +0 -1
- package/dist/plus/integrations/models/gitHostIntegration.d.ts.map +0 -1
- package/dist/plus/integrations/models/integration.d.ts.map +0 -1
- package/dist/plus/integrations/models/issueCache.d.ts.map +0 -1
- package/dist/plus/integrations/models/issueReads.d.ts.map +0 -1
- package/dist/plus/integrations/models/issueReads.js.map +0 -1
- package/dist/plus/integrations/models/issuesIntegration.d.ts.map +0 -1
- package/dist/plus/integrations/models/pullRequestReads.d.ts.map +0 -1
- package/dist/plus/integrations/models/pullRequestReads.js.map +0 -1
- package/dist/plus/integrations/providerFilters.d.ts.map +0 -1
- package/dist/plus/integrations/providers/accounts.d.ts.map +0 -1
- package/dist/plus/integrations/providers/apiClients.d.ts.map +0 -1
- package/dist/plus/integrations/providers/apiConfig.d.ts.map +0 -1
- package/dist/plus/integrations/providers/azure/azure.d.ts.map +0 -1
- package/dist/plus/integrations/providers/azure/models.d.ts.map +0 -1
- package/dist/plus/integrations/providers/azureDevOps.d.ts.map +0 -1
- package/dist/plus/integrations/providers/bitbucket/bitbucket.d.ts.map +0 -1
- package/dist/plus/integrations/providers/bitbucket/models.d.ts.map +0 -1
- package/dist/plus/integrations/providers/bitbucket-server/models.d.ts.map +0 -1
- package/dist/plus/integrations/providers/bitbucket-server.d.ts.map +0 -1
- package/dist/plus/integrations/providers/bitbucket.d.ts.map +0 -1
- package/dist/plus/integrations/providers/github/github.d.ts.map +0 -1
- package/dist/plus/integrations/providers/github/github.utils.d.ts.map +0 -1
- package/dist/plus/integrations/providers/github/models.d.ts.map +0 -1
- package/dist/plus/integrations/providers/github/models.js.map +0 -1
- package/dist/plus/integrations/providers/github.d.ts.map +0 -1
- package/dist/plus/integrations/providers/gitlab/gitlab.d.ts.map +0 -1
- package/dist/plus/integrations/providers/gitlab/gitlab.utils.d.ts.map +0 -1
- package/dist/plus/integrations/providers/gitlab/models.d.ts.map +0 -1
- package/dist/plus/integrations/providers/gitlab.d.ts.map +0 -1
- package/dist/plus/integrations/providers/issueSorts.d.ts.map +0 -1
- package/dist/plus/integrations/providers/jira.d.ts.map +0 -1
- package/dist/plus/integrations/providers/jiraIssueByKey.d.ts.map +0 -1
- package/dist/plus/integrations/providers/linear.d.ts.map +0 -1
- package/dist/plus/integrations/providers/models.d.ts.map +0 -1
- package/dist/plus/integrations/providers/providerErrors.d.ts.map +0 -1
- package/dist/plus/integrations/providers/providersApi.d.ts.map +0 -1
- package/dist/plus/integrations/providers/pullRequestReviews.d.ts.map +0 -1
- package/dist/plus/integrations/providers/trello.d.ts.map +0 -1
- package/dist/plus/integrations/providers/utils/providerPaging.d.ts.map +0 -1
- package/dist/plus/integrations/providers/utils.d.ts.map +0 -1
- package/dist/plus/integrations/reads/broaden.d.ts.map +0 -1
- package/dist/plus/integrations/reads/context.d.ts.map +0 -1
- package/dist/plus/integrations/reads/context.js.map +0 -1
- package/dist/plus/integrations/reads/counts.d.ts.map +0 -1
- package/dist/plus/integrations/reads/cursors.d.ts.map +0 -1
- package/dist/plus/integrations/reads/drains.d.ts.map +0 -1
- package/dist/plus/integrations/reads/filters.d.ts.map +0 -1
- package/dist/plus/integrations/reads/hierarchy.d.ts.map +0 -1
- package/dist/plus/integrations/reads/hierarchy.utils.d.ts.map +0 -1
- package/dist/plus/integrations/reads/issueBatch.d.ts.map +0 -1
- package/dist/plus/integrations/reads/issueTracker.d.ts.map +0 -1
- package/dist/plus/integrations/reads/issues.d.ts.map +0 -1
- package/dist/plus/integrations/reads/ordering.d.ts.map +0 -1
- package/dist/plus/integrations/reads/paging.d.ts.map +0 -1
- package/dist/plus/integrations/reads/pullRequests.d.ts.map +0 -1
- package/dist/plus/integrations/reads/resolveRepository.d.ts.map +0 -1
- package/dist/plus/integrations/reads/searchIssues.d.ts.map +0 -1
- package/dist/plus/integrations/reads/searchPullRequests.d.ts.map +0 -1
- package/dist/plus/integrations/reads/sweeps.d.ts.map +0 -1
- package/dist/plus/integrations/reads/trackerIssue.d.ts.map +0 -1
- package/dist/plus/integrations/reads/warnings.d.ts.map +0 -1
- package/dist/plus/integrations/results.d.ts.map +0 -1
- package/dist/plus/integrations/telemetry.d.ts.map +0 -1
- package/dist/plus/integrations/utils/domain.utils.d.ts.map +0 -1
- package/dist/plus/integrations/utils/integration.utils.d.ts.map +0 -1
- package/dist/utils/array.d.ts.map +0 -1
- package/dist/utils/base64.d.ts.map +0 -1
- package/dist/utils/base64.js.map +0 -1
- package/dist/utils/brand.d.ts.map +0 -1
- package/dist/utils/brand.js.map +0 -1
- package/dist/utils/cancellation.d.ts.map +0 -1
- package/dist/utils/charCode.d.ts.map +0 -1
- package/dist/utils/coalescedRun.d.ts.map +0 -1
- package/dist/utils/color.d.ts.map +0 -1
- package/dist/utils/counter.d.ts.map +0 -1
- package/dist/utils/crypto.d.ts.map +0 -1
- package/dist/utils/crypto.js.map +0 -1
- package/dist/utils/date.d.ts.map +0 -1
- package/dist/utils/debounce.d.ts.map +0 -1
- package/dist/utils/decorators/debounce.d.ts.map +0 -1
- package/dist/utils/decorators/gate.d.ts.map +0 -1
- package/dist/utils/decorators/log.d.ts.map +0 -1
- package/dist/utils/decorators/memoize.d.ts.map +0 -1
- package/dist/utils/decorators/resolver.d.ts.map +0 -1
- package/dist/utils/decorators/sequentialize.d.ts.map +0 -1
- package/dist/utils/decorators/serializable.d.ts.map +0 -1
- package/dist/utils/dedupedAsyncCache.d.ts.map +0 -1
- package/dist/utils/diff.d.ts.map +0 -1
- package/dist/utils/disposable.d.ts.map +0 -1
- package/dist/utils/encoding.d.ts.map +0 -1
- package/dist/utils/env/browser/base64.d.ts.map +0 -1
- package/dist/utils/env/browser/crypto.d.ts.map +0 -1
- package/dist/utils/env/browser/fs.d.ts.map +0 -1
- package/dist/utils/env/browser/hex.d.ts.map +0 -1
- package/dist/utils/env/browser/hrtime.d.ts.map +0 -1
- package/dist/utils/env/browser/logScope.d.ts.map +0 -1
- package/dist/utils/env/browser/md5.d.ts.map +0 -1
- package/dist/utils/env/browser/platform.d.ts.map +0 -1
- package/dist/utils/env/node/base64.d.ts.map +0 -1
- package/dist/utils/env/node/crypto.d.ts.map +0 -1
- package/dist/utils/env/node/exec.d.ts.map +0 -1
- package/dist/utils/env/node/fs.d.ts.map +0 -1
- package/dist/utils/env/node/hex.d.ts.map +0 -1
- package/dist/utils/env/node/hrtime.d.ts.map +0 -1
- package/dist/utils/env/node/hrtime.js.map +0 -1
- package/dist/utils/env/node/logScope.d.ts.map +0 -1
- package/dist/utils/env/node/platform.d.ts.map +0 -1
- package/dist/utils/error.d.ts.map +0 -1
- package/dist/utils/event.d.ts.map +0 -1
- package/dist/utils/formatter.d.ts.map +0 -1
- package/dist/utils/fs.d.ts.map +0 -1
- package/dist/utils/fs.js.map +0 -1
- package/dist/utils/function.d.ts.map +0 -1
- package/dist/utils/fuzzy.d.ts.map +0 -1
- package/dist/utils/hash.d.ts.map +0 -1
- package/dist/utils/hex.d.ts.map +0 -1
- package/dist/utils/hex.js.map +0 -1
- package/dist/utils/hrtime.d.ts.map +0 -1
- package/dist/utils/iterable.d.ts.map +0 -1
- package/dist/utils/keys/chord.d.ts.map +0 -1
- package/dist/utils/keys/keybinding.d.ts.map +0 -1
- package/dist/utils/lazy.d.ts.map +0 -1
- package/dist/utils/loggable.d.ts.map +0 -1
- package/dist/utils/logger.d.ts.map +0 -1
- package/dist/utils/logger.scoped.d.ts.map +0 -1
- package/dist/utils/lruMap.d.ts.map +0 -1
- package/dist/utils/markdown.d.ts.map +0 -1
- package/dist/utils/mru.d.ts.map +0 -1
- package/dist/utils/object.d.ts.map +0 -1
- package/dist/utils/paging.d.ts.map +0 -1
- package/dist/utils/path.d.ts.map +0 -1
- package/dist/utils/platform.d.ts.map +0 -1
- package/dist/utils/platform.js.map +0 -1
- package/dist/utils/promise.d.ts.map +0 -1
- package/dist/utils/promiseCache.d.ts.map +0 -1
- package/dist/utils/resourceUsage.d.ts.map +0 -1
- package/dist/utils/resourceUsage.js.map +0 -1
- package/dist/utils/searchTree.d.ts.map +0 -1
- package/dist/utils/stopwatch.d.ts.map +0 -1
- package/dist/utils/string.d.ts.map +0 -1
- package/dist/utils/subscriptionManager.d.ts.map +0 -1
- package/dist/utils/trie.d.ts.map +0 -1
- package/dist/utils/types.d.ts.map +0 -1
- package/dist/utils/types.js.map +0 -1
- package/dist/utils/uri.d.ts.map +0 -1
- package/dist/utils/validation.d.ts.map +0 -1
- package/dist/utils/version.d.ts.map +0 -1
- package/src/git/cache.ts +0 -1859
- package/src/git/context.ts +0 -301
- package/src/git/errors.ts +0 -1168
- package/src/git/features.ts +0 -98
- package/src/git/gitHealth.ts +0 -522
- package/src/git/models/author.ts +0 -19
- package/src/git/models/autolink.ts +0 -59
- package/src/git/models/blame.ts +0 -46
- package/src/git/models/branch.ts +0 -237
- package/src/git/models/commit.ts +0 -673
- package/src/git/models/contributor.ts +0 -84
- package/src/git/models/defaultBranch.ts +0 -6
- package/src/git/models/diff.ts +0 -74
- package/src/git/models/file.ts +0 -29
- package/src/git/models/fileChange.ts +0 -82
- package/src/git/models/fileStatus.ts +0 -36
- package/src/git/models/graph.ts +0 -444
- package/src/git/models/graphSearch.ts +0 -53
- package/src/git/models/graphSession.ts +0 -102
- package/src/git/models/issue.ts +0 -273
- package/src/git/models/issueOrPullRequest.ts +0 -20
- package/src/git/models/lineRange.ts +0 -7
- package/src/git/models/log.ts +0 -21
- package/src/git/models/mergeConflicts.ts +0 -19
- package/src/git/models/patch.ts +0 -25
- package/src/git/models/pausedOperationStatus.ts +0 -63
- package/src/git/models/pullRequest.ts +0 -357
- package/src/git/models/rebase.ts +0 -60
- package/src/git/models/reference.ts +0 -80
- package/src/git/models/reflog.ts +0 -88
- package/src/git/models/remote.ts +0 -100
- package/src/git/models/remoteProvider.ts +0 -291
- package/src/git/models/remoteResource.ts +0 -87
- package/src/git/models/repository.ts +0 -510
- package/src/git/models/repositoryChangeEvent.ts +0 -30
- package/src/git/models/repositoryIdentities.ts +0 -99
- package/src/git/models/repositoryMetadata.ts +0 -12
- package/src/git/models/resourceDescriptor.ts +0 -28
- package/src/git/models/revision.ts +0 -12
- package/src/git/models/search.ts +0 -138
- package/src/git/models/shortlog.ts +0 -6
- package/src/git/models/signature.ts +0 -45
- package/src/git/models/staging.ts +0 -27
- package/src/git/models/stash.ts +0 -6
- package/src/git/models/status.ts +0 -246
- package/src/git/models/statusFile.ts +0 -131
- package/src/git/models/tag.ts +0 -76
- package/src/git/models/tree.ts +0 -10
- package/src/git/models/user.ts +0 -7
- package/src/git/models/worktree.ts +0 -160
- package/src/git/parsers/diffParser.ts +0 -648
- package/src/git/parsers/rebaseTodoParser.ts +0 -169
- package/src/git/providers/blame.ts +0 -40
- package/src/git/providers/branches.ts +0 -143
- package/src/git/providers/commits.ts +0 -174
- package/src/git/providers/config.ts +0 -167
- package/src/git/providers/contributors.ts +0 -34
- package/src/git/providers/diff.ts +0 -133
- package/src/git/providers/graph.ts +0 -95
- package/src/git/providers/maintenance.ts +0 -224
- package/src/git/providers/operations.ts +0 -164
- package/src/git/providers/patch.ts +0 -31
- package/src/git/providers/pausedOperations.ts +0 -23
- package/src/git/providers/provider.ts +0 -64
- package/src/git/providers/refs.ts +0 -68
- package/src/git/providers/remotes.ts +0 -33
- package/src/git/providers/revision.ts +0 -32
- package/src/git/providers/shared/remotes.ts +0 -95
- package/src/git/providers/staging.ts +0 -36
- package/src/git/providers/stash.ts +0 -51
- package/src/git/providers/status.ts +0 -48
- package/src/git/providers/tags.ts +0 -29
- package/src/git/providers/types.ts +0 -33
- package/src/git/providers/worktrees.ts +0 -37
- package/src/git/remotes/azure-devops.ts +0 -361
- package/src/git/remotes/bitbucket-server.ts +0 -189
- package/src/git/remotes/bitbucket.ts +0 -142
- package/src/git/remotes/custom.ts +0 -162
- package/src/git/remotes/gerrit.ts +0 -186
- package/src/git/remotes/gitea.ts +0 -184
- package/src/git/remotes/github.ts +0 -236
- package/src/git/remotes/gitlab.ts +0 -270
- package/src/git/remotes/google-source.ts +0 -51
- package/src/git/remotes/matcher.ts +0 -215
- package/src/git/repositoryService.ts +0 -180
- package/src/git/run.types.ts +0 -156
- package/src/git/service.ts +0 -369
- package/src/git/utils/autolink.utils.ts +0 -202
- package/src/git/utils/blame.utils.ts +0 -298
- package/src/git/utils/branch.utils.ts +0 -165
- package/src/git/utils/commit.utils.ts +0 -89
- package/src/git/utils/config.utils.ts +0 -8
- package/src/git/utils/conflictResolution.utils.ts +0 -157
- package/src/git/utils/contributor.utils.ts +0 -105
- package/src/git/utils/fetch.utils.ts +0 -48
- package/src/git/utils/fileStatus.utils.ts +0 -62
- package/src/git/utils/graph.utils.ts +0 -46
- package/src/git/utils/issue.utils.ts +0 -187
- package/src/git/utils/issueOrPullRequest.utils.ts +0 -23
- package/src/git/utils/mergeConflicts.utils.ts +0 -21
- package/src/git/utils/pausedOperationStatus.utils.ts +0 -184
- package/src/git/utils/pullRequest.utils.ts +0 -244
- package/src/git/utils/reachability.utils.ts +0 -180
- package/src/git/utils/rebase.utils.ts +0 -128
- package/src/git/utils/reference.utils.ts +0 -267
- package/src/git/utils/remote.utils.ts +0 -146
- package/src/git/utils/repository.utils.ts +0 -18
- package/src/git/utils/resourceDescriptor.utils.ts +0 -26
- package/src/git/utils/revision.utils.ts +0 -149
- package/src/git/utils/search.utils.ts +0 -624
- package/src/git/utils/sorting.ts +0 -329
- package/src/git/utils/sshKey.utils.ts +0 -30
- package/src/git/utils/status.utils.ts +0 -115
- package/src/git/utils/statusFile.utils.ts +0 -182
- package/src/git/utils/tag.utils.ts +0 -17
- package/src/git/utils/tooltip.utils.ts +0 -37
- package/src/git/utils/uriAuthority.ts +0 -34
- package/src/git/utils/user.utils.ts +0 -20
- package/src/git/utils/worktree.utils.ts +0 -21
- package/src/git/watching/changeEvent.ts +0 -95
- package/src/git/watching/classifyChange.ts +0 -104
- package/src/git/watching/gitIgnoreFilter.ts +0 -134
- package/src/git/watching/initWatcher.ts +0 -81
- package/src/git/watching/provider.ts +0 -24
- package/src/git/watching/watchGroup.ts +0 -185
- package/src/git/watching/watchService.ts +0 -430
- package/src/git/watching/watchSession.ts +0 -439
- package/src/git/watching/watcherPatterns.ts +0 -51
- package/src/git-cli/cliGitProvider.ts +0 -461
- package/src/git-cli/exec/exec.errors.ts +0 -1
- package/src/git-cli/exec/exec.ts +0 -11
- package/src/git-cli/exec/exec.types.ts +0 -8
- package/src/git-cli/exec/features.ts +0 -2
- package/src/git-cli/exec/git.ts +0 -1371
- package/src/git-cli/exec/gitQueue.ts +0 -326
- package/src/git-cli/exec/locator.ts +0 -157
- package/src/git-cli/parsers/blameParser.ts +0 -374
- package/src/git-cli/parsers/indexParser.ts +0 -192
- package/src/git-cli/parsers/logParser.ts +0 -1365
- package/src/git-cli/parsers/mergeTreeParser.ts +0 -22
- package/src/git-cli/parsers/refParser.ts +0 -110
- package/src/git-cli/parsers/reflogParser.ts +0 -153
- package/src/git-cli/parsers/remoteParser.ts +0 -95
- package/src/git-cli/parsers/shortlogParser.ts +0 -59
- package/src/git-cli/parsers/signatureParser.ts +0 -162
- package/src/git-cli/parsers/sshSignatureParser.ts +0 -85
- package/src/git-cli/parsers/statusParser.ts +0 -209
- package/src/git-cli/parsers/treeParser.ts +0 -61
- package/src/git-cli/parsers/worktreeParser.ts +0 -111
- package/src/git-cli/providers/blame.ts +0 -598
- package/src/git-cli/providers/branches.ts +0 -1931
- package/src/git-cli/providers/commitFilesetUtils.ts +0 -45
- package/src/git-cli/providers/commits.ts +0 -1856
- package/src/git-cli/providers/config.ts +0 -1025
- package/src/git-cli/providers/contributors.ts +0 -360
- package/src/git-cli/providers/diff.ts +0 -1172
- package/src/git-cli/providers/graph.ts +0 -2237
- package/src/git-cli/providers/maintenance.ts +0 -2599
- package/src/git-cli/providers/operations.ts +0 -1016
- package/src/git-cli/providers/patch.ts +0 -305
- package/src/git-cli/providers/pausedOperations.ts +0 -670
- package/src/git-cli/providers/refs.ts +0 -486
- package/src/git-cli/providers/remotes.ts +0 -115
- package/src/git-cli/providers/revision.ts +0 -383
- package/src/git-cli/providers/staging.ts +0 -210
- package/src/git-cli/providers/stash.ts +0 -577
- package/src/git-cli/providers/status.ts +0 -568
- package/src/git-cli/providers/tags.ts +0 -224
- package/src/git-cli/providers/worktrees.ts +0 -285
- package/src/git-cli/service.ts +0 -82
- package/src/ipc/discovery.ts +0 -186
- package/src/ipc/ipcServer.ts +0 -171
- package/src/plus/agents/agentCapabilities.ts +0 -286
- package/src/plus/agents/providers/claudeCodeTranscript.ts +0 -867
- package/src/plus/agents/providers/gkAgentProvider.ts +0 -4036
- package/src/plus/agents/sanitizePrompt.ts +0 -109
- package/src/plus/agents/stateMachine.ts +0 -197
- package/src/plus/agents/types.ts +0 -500
- package/src/plus/ai/constants.ts +0 -121
- package/src/plus/ai/errors.ts +0 -152
- package/src/plus/ai/models/conversation.ts +0 -35
- package/src/plus/ai/models/model.ts +0 -528
- package/src/plus/ai/models/promptTemplates.ts +0 -171
- package/src/plus/ai/models/provider.ts +0 -125
- package/src/plus/ai/models/results.ts +0 -31
- package/src/plus/ai/prompts.ts +0 -849
- package/src/plus/ai/providers/anthropicProvider.ts +0 -458
- package/src/plus/ai/providers/azureProvider.ts +0 -74
- package/src/plus/ai/providers/context.ts +0 -29
- package/src/plus/ai/providers/deepSeekProvider.ts +0 -46
- package/src/plus/ai/providers/geminiProvider.ts +0 -245
- package/src/plus/ai/providers/gitkrakenProvider.ts +0 -347
- package/src/plus/ai/providers/huggingFaceProvider.ts +0 -64
- package/src/plus/ai/providers/mistralProvider.ts +0 -243
- package/src/plus/ai/providers/ollamaProvider.ts +0 -292
- package/src/plus/ai/providers/openAICompatibleProvider.ts +0 -64
- package/src/plus/ai/providers/openAICompatibleProviderBase.ts +0 -654
- package/src/plus/ai/providers/openRouterProvider.ts +0 -101
- package/src/plus/ai/providers/openaiProvider.ts +0 -47
- package/src/plus/ai/providers/responseFormatCache.ts +0 -39
- package/src/plus/ai/providers/xaiProvider.ts +0 -54
- package/src/plus/ai/utils/ai.utils.ts +0 -95
- package/src/plus/ai/utils/results.utils.ts +0 -407
- package/src/plus/ai/utils/truncation.utils.ts +0 -296
- package/src/plus/git-github/api/config.ts +0 -91
- package/src/plus/git-github/api/github.ts +0 -5462
- package/src/plus/git-github/api/github.utils.ts +0 -36
- package/src/plus/git-github/api/issueSearchQuery.ts +0 -273
- package/src/plus/git-github/api/pullRequestSearchQuery.ts +0 -154
- package/src/plus/git-github/api/token.ts +0 -15
- package/src/plus/git-github/api/tokenUtils.ts +0 -15
- package/src/plus/git-github/api/types.ts +0 -197
- package/src/plus/git-github/context.ts +0 -107
- package/src/plus/git-github/models.ts +0 -623
- package/src/plus/git-github/providers/github/blame.ts +0 -225
- package/src/plus/git-github/providers/github/branches.ts +0 -401
- package/src/plus/git-github/providers/github/commits.ts +0 -929
- package/src/plus/git-github/providers/github/config.ts +0 -47
- package/src/plus/git-github/providers/github/contributors.ts +0 -313
- package/src/plus/git-github/providers/github/diff.ts +0 -281
- package/src/plus/git-github/providers/github/graph.ts +0 -635
- package/src/plus/git-github/providers/github/refs.ts +0 -172
- package/src/plus/git-github/providers/github/remotes.ts +0 -44
- package/src/plus/git-github/providers/github/revision.ts +0 -140
- package/src/plus/git-github/providers/github/status.ts +0 -69
- package/src/plus/git-github/providers/github/tags.ts +0 -148
- package/src/plus/git-github/providers/githubGitProvider.ts +0 -168
- package/src/plus/git-github/providers/githubProvider.ts +0 -65
- package/src/plus/integrations/authentication/cloudIntegrationService.ts +0 -292
- package/src/plus/integrations/authentication/configuredIntegrationService.ts +0 -656
- package/src/plus/integrations/authentication/integrationAuthenticationProvider.ts +0 -385
- package/src/plus/integrations/authentication/integrationAuthenticationService.ts +0 -148
- package/src/plus/integrations/authentication/manualTokenProvider.ts +0 -79
- package/src/plus/integrations/authentication/models.ts +0 -202
- package/src/plus/integrations/authentication/rejectedTokenTracker.ts +0 -56
- package/src/plus/integrations/collectionMetadata.ts +0 -325
- package/src/plus/integrations/constants.ts +0 -190
- package/src/plus/integrations/context.ts +0 -386
- package/src/plus/integrations/errors.ts +0 -188
- package/src/plus/integrations/index.ts +0 -231
- package/src/plus/integrations/integrationService.ts +0 -2003
- package/src/plus/integrations/lite.ts +0 -233
- package/src/plus/integrations/manager.ts +0 -728
- package/src/plus/integrations/models/gitHostIntegration.ts +0 -1862
- package/src/plus/integrations/models/integration.ts +0 -1005
- package/src/plus/integrations/models/issueCache.ts +0 -29
- package/src/plus/integrations/models/issueReads.ts +0 -152
- package/src/plus/integrations/models/issuesIntegration.ts +0 -248
- package/src/plus/integrations/models/pullRequestReads.ts +0 -18
- package/src/plus/integrations/providerFilters.ts +0 -36
- package/src/plus/integrations/providers/accounts.ts +0 -38
- package/src/plus/integrations/providers/apiClients.ts +0 -69
- package/src/plus/integrations/providers/apiConfig.ts +0 -71
- package/src/plus/integrations/providers/azure/azure.ts +0 -953
- package/src/plus/integrations/providers/azure/models.ts +0 -723
- package/src/plus/integrations/providers/azureDevOps.ts +0 -1355
- package/src/plus/integrations/providers/bitbucket/bitbucket.ts +0 -904
- package/src/plus/integrations/providers/bitbucket/models.ts +0 -446
- package/src/plus/integrations/providers/bitbucket-server/models.ts +0 -283
- package/src/plus/integrations/providers/bitbucket-server.ts +0 -445
- package/src/plus/integrations/providers/bitbucket.ts +0 -793
- package/src/plus/integrations/providers/github/github.ts +0 -64
- package/src/plus/integrations/providers/github/github.utils.ts +0 -23
- package/src/plus/integrations/providers/github/models.ts +0 -29
- package/src/plus/integrations/providers/github.ts +0 -940
- package/src/plus/integrations/providers/gitlab/gitlab.ts +0 -1320
- package/src/plus/integrations/providers/gitlab/gitlab.utils.ts +0 -80
- package/src/plus/integrations/providers/gitlab/models.ts +0 -271
- package/src/plus/integrations/providers/gitlab.ts +0 -841
- package/src/plus/integrations/providers/issueSorts.ts +0 -89
- package/src/plus/integrations/providers/jira.ts +0 -596
- package/src/plus/integrations/providers/jiraIssueByKey.ts +0 -155
- package/src/plus/integrations/providers/linear.ts +0 -484
- package/src/plus/integrations/providers/models.ts +0 -1833
- package/src/plus/integrations/providers/providerErrors.ts +0 -115
- package/src/plus/integrations/providers/providersApi.ts +0 -1881
- package/src/plus/integrations/providers/pullRequestReviews.ts +0 -122
- package/src/plus/integrations/providers/trello.ts +0 -208
- package/src/plus/integrations/providers/utils/providerPaging.ts +0 -212
- package/src/plus/integrations/providers/utils.ts +0 -419
- package/src/plus/integrations/reads/broaden.ts +0 -704
- package/src/plus/integrations/reads/context.ts +0 -99
- package/src/plus/integrations/reads/counts.ts +0 -610
- package/src/plus/integrations/reads/cursors.ts +0 -224
- package/src/plus/integrations/reads/drains.ts +0 -420
- package/src/plus/integrations/reads/filters.ts +0 -614
- package/src/plus/integrations/reads/hierarchy.ts +0 -486
- package/src/plus/integrations/reads/hierarchy.utils.ts +0 -155
- package/src/plus/integrations/reads/issueBatch.ts +0 -197
- package/src/plus/integrations/reads/issueTracker.ts +0 -556
- package/src/plus/integrations/reads/issues.ts +0 -600
- package/src/plus/integrations/reads/ordering.ts +0 -124
- package/src/plus/integrations/reads/paging.ts +0 -379
- package/src/plus/integrations/reads/pullRequests.ts +0 -260
- package/src/plus/integrations/reads/resolveRepository.ts +0 -275
- package/src/plus/integrations/reads/searchIssues.ts +0 -274
- package/src/plus/integrations/reads/searchPullRequests.ts +0 -235
- package/src/plus/integrations/reads/sweeps.ts +0 -266
- package/src/plus/integrations/reads/trackerIssue.ts +0 -105
- package/src/plus/integrations/reads/warnings.ts +0 -535
- package/src/plus/integrations/results.ts +0 -443
- package/src/plus/integrations/telemetry.ts +0 -29
- package/src/plus/integrations/utils/domain.utils.ts +0 -26
- package/src/plus/integrations/utils/integration.utils.ts +0 -215
- package/src/utils/array.ts +0 -194
- package/src/utils/base64.ts +0 -1
- package/src/utils/brand.ts +0 -7
- package/src/utils/cancellation.ts +0 -199
- package/src/utils/charCode.ts +0 -38
- package/src/utils/coalescedRun.ts +0 -45
- package/src/utils/color.ts +0 -817
- package/src/utils/counter.ts +0 -21
- package/src/utils/crypto.ts +0 -1
- package/src/utils/date.ts +0 -474
- package/src/utils/debounce.ts +0 -303
- package/src/utils/decorators/debounce.ts +0 -31
- package/src/utils/decorators/gate.ts +0 -167
- package/src/utils/decorators/log.ts +0 -320
- package/src/utils/decorators/memoize.ts +0 -98
- package/src/utils/decorators/resolver.ts +0 -95
- package/src/utils/decorators/sequentialize.ts +0 -118
- package/src/utils/decorators/serializable.ts +0 -43
- package/src/utils/dedupedAsyncCache.ts +0 -74
- package/src/utils/diff.ts +0 -61
- package/src/utils/disposable.ts +0 -156
- package/src/utils/encoding.ts +0 -8
- package/src/utils/env/browser/base64.ts +0 -50
- package/src/utils/env/browser/crypto.ts +0 -21
- package/src/utils/env/browser/fs.ts +0 -3
- package/src/utils/env/browser/hex.ts +0 -41
- package/src/utils/env/browser/hrtime.ts +0 -14
- package/src/utils/env/browser/logScope.ts +0 -57
- package/src/utils/env/browser/md5.ts +0 -217
- package/src/utils/env/browser/platform.ts +0 -10
- package/src/utils/env/node/base64.ts +0 -19
- package/src/utils/env/node/crypto.ts +0 -17
- package/src/utils/env/node/exec.ts +0 -488
- package/src/utils/env/node/fs.ts +0 -5
- package/src/utils/env/node/hex.ts +0 -11
- package/src/utils/env/node/hrtime.ts +0 -1
- package/src/utils/env/node/logScope.ts +0 -63
- package/src/utils/env/node/platform.ts +0 -5
- package/src/utils/error.ts +0 -18
- package/src/utils/event.ts +0 -230
- package/src/utils/formatter.ts +0 -198
- package/src/utils/fs.ts +0 -1
- package/src/utils/function.ts +0 -141
- package/src/utils/fuzzy.ts +0 -185
- package/src/utils/hash.ts +0 -60
- package/src/utils/hex.ts +0 -1
- package/src/utils/hrtime.ts +0 -8
- package/src/utils/iterable.ts +0 -797
- package/src/utils/keys/chord.ts +0 -184
- package/src/utils/keys/keybinding.ts +0 -116
- package/src/utils/lazy.ts +0 -39
- package/src/utils/loggable.ts +0 -7
- package/src/utils/logger.scoped.ts +0 -237
- package/src/utils/logger.ts +0 -403
- package/src/utils/lruMap.ts +0 -112
- package/src/utils/markdown.ts +0 -115
- package/src/utils/mru.ts +0 -68
- package/src/utils/object.ts +0 -278
- package/src/utils/paging.ts +0 -97
- package/src/utils/path.ts +0 -204
- package/src/utils/platform.ts +0 -1
- package/src/utils/promise.ts +0 -657
- package/src/utils/promiseCache.ts +0 -908
- package/src/utils/resourceUsage.ts +0 -5
- package/src/utils/searchTree.ts +0 -444
- package/src/utils/stopwatch.ts +0 -125
- package/src/utils/string.ts +0 -1003
- package/src/utils/subscriptionManager.ts +0 -40
- package/src/utils/trie.ts +0 -740
- package/src/utils/types.ts +0 -31
- package/src/utils/uri.ts +0 -118
- package/src/utils/validation.ts +0 -38
- package/src/utils/version.ts +0 -128
|
@@ -1,1881 +0,0 @@
|
|
|
1
|
-
import ProviderApis from '@gitkraken/provider-apis';
|
|
2
|
-
import type {
|
|
3
|
-
CollectionMetadata,
|
|
4
|
-
GitPullRequestState,
|
|
5
|
-
GraphQLError,
|
|
6
|
-
GraphQLErrors,
|
|
7
|
-
TrelloBoard,
|
|
8
|
-
TrelloList,
|
|
9
|
-
} from '@gitkraken/provider-apis';
|
|
10
|
-
import type { PullRequest, PullRequestMergeMethod } from '../../../git/models/pullRequest.js';
|
|
11
|
-
import { base64 } from '../../../utils/base64.js';
|
|
12
|
-
import type { PagedResult } from '../../../utils/paging.js';
|
|
13
|
-
import type { IntegrationAuthenticationService } from '../authentication/integrationAuthenticationService.js';
|
|
14
|
-
import type { TokenOptInfo, TokenWithInfo } from '../authentication/models.js';
|
|
15
|
-
import { toTokenWithInfo } from '../authentication/models.js';
|
|
16
|
-
import { isIncompleteCollection } from '../collectionMetadata.js';
|
|
17
|
-
import type { IntegrationIds } from '../constants.js';
|
|
18
|
-
import {
|
|
19
|
-
GitCloudHostIntegrationId,
|
|
20
|
-
GitSelfManagedHostIntegrationId,
|
|
21
|
-
IssuesCloudHostIntegrationId,
|
|
22
|
-
} from '../constants.js';
|
|
23
|
-
import { RequestNotFoundError, toError } from '../errors.js';
|
|
24
|
-
import { requestJiraIssueByKey } from './jiraIssueByKey.js';
|
|
25
|
-
import type {
|
|
26
|
-
GetIssueFn,
|
|
27
|
-
GetIssuesForReposFn,
|
|
28
|
-
GetIssuesOptions,
|
|
29
|
-
GetPullRequestsForReposFn,
|
|
30
|
-
GetPullRequestsForUserFn,
|
|
31
|
-
GetPullRequestsForUserOptions,
|
|
32
|
-
GetPullRequestsOptions,
|
|
33
|
-
GetReposOptions,
|
|
34
|
-
IssueFilter,
|
|
35
|
-
IssueSorting,
|
|
36
|
-
PageInfo,
|
|
37
|
-
PagingInput,
|
|
38
|
-
PagingMode,
|
|
39
|
-
ProviderAccount,
|
|
40
|
-
ProviderApiCollectionResult,
|
|
41
|
-
ProviderApiPagedResult,
|
|
42
|
-
ProviderAzureProject,
|
|
43
|
-
ProviderAzureResource,
|
|
44
|
-
ProviderBitbucketResource,
|
|
45
|
-
ProviderGitHubOrganization,
|
|
46
|
-
ProviderGitLabGroup,
|
|
47
|
-
ProviderHierarchyResult,
|
|
48
|
-
ProviderInfo,
|
|
49
|
-
ProviderIssue,
|
|
50
|
-
ProviderJiraProject,
|
|
51
|
-
ProviderJiraResource,
|
|
52
|
-
ProviderLinearOrganization,
|
|
53
|
-
ProviderLinearTeam,
|
|
54
|
-
ProviderPullRequest,
|
|
55
|
-
ProviderRepoInput,
|
|
56
|
-
ProviderReposInput,
|
|
57
|
-
ProviderRepository,
|
|
58
|
-
ProviderRequestFunction,
|
|
59
|
-
ProviderRequestOptions,
|
|
60
|
-
ProviderRequestResponse,
|
|
61
|
-
Providers,
|
|
62
|
-
PullRequestFilter,
|
|
63
|
-
} from './models.js';
|
|
64
|
-
import { isRepoIdsInput, providersMetadata } from './models.js';
|
|
65
|
-
import { getProviderResponseBodyMessage, isProviderIssueNotFoundError, throwProviderError } from './providerErrors.js';
|
|
66
|
-
import {
|
|
67
|
-
collectProviderPagedResult,
|
|
68
|
-
mergeCollectionMetadata,
|
|
69
|
-
parsePageCursor,
|
|
70
|
-
toPageCursor,
|
|
71
|
-
} from './utils/providerPaging.js';
|
|
72
|
-
|
|
73
|
-
// `@gitkraken/provider-apis` is published as CommonJS with its factory on the `default` export.
|
|
74
|
-
// How that surfaces depends on the consuming bundler's CJS->ESM interop: esbuild yields the
|
|
75
|
-
// callable factory directly, while webpack and Node surface the module namespace (with the
|
|
76
|
-
// factory under `.default`). Normalize to the callable factory so every consumer resolves it.
|
|
77
|
-
type ProviderApisFactory = typeof ProviderApis;
|
|
78
|
-
const createProviderApis: ProviderApisFactory =
|
|
79
|
-
(ProviderApis as ProviderApisFactory & { default?: ProviderApisFactory }).default ?? ProviderApis;
|
|
80
|
-
|
|
81
|
-
// Both GitHub and GitLab `getRepo` throw a missing-repo error whose message is exactly
|
|
82
|
-
// `Repository <x> not found`. Anchoring to that shape (rather than a loose `not found` substring) keeps
|
|
83
|
-
// the message fallbacks from misclassifying unrelated GraphQL/transport failures as a confident negative.
|
|
84
|
-
const repoNotFoundMessage = /^Repository .+ not found$/i;
|
|
85
|
-
// Duck-typed rather than `ex instanceof GraphQLErrors`, because importing the class as a value makes this
|
|
86
|
-
// module unloadable from plain Node ESM consumers: `@gitkraken/provider-apis` is CommonJS and declares its
|
|
87
|
-
// exports through getters, which Node's `cjs-module-lexer` cannot see, so the only named exports it can
|
|
88
|
-
// synthesize are `default` and `module.exports`. Bundled hosts (webpack/esbuild) bind the named export
|
|
89
|
-
// fine, but the published package keeps third-party deps external, so the named import survives into
|
|
90
|
-
// consumers and breaks linking there. The SDK's constructor always assigns `graphQLErrors` (defaulting to
|
|
91
|
-
// `[]`) and it is the only SDK error carrying that field, so the shape check is unambiguous.
|
|
92
|
-
function isGraphQLErrors(ex: unknown): ex is GraphQLErrors {
|
|
93
|
-
return ex instanceof Error && Array.isArray((ex as Partial<GraphQLErrors>).graphQLErrors);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
// `handleProviderError` classifies not-found by HTTP status (404/410/422), which only works for the
|
|
97
|
-
// REST `getRepo` clients (Bitbucket, Bitbucket Server, Azure DevOps). GitHub and GitLab `getRepo` are
|
|
98
|
-
// GraphQL: a missing repo comes back as HTTP 200 with a null node, and the SDK throws an unclassified
|
|
99
|
-
// error with no `response.status`, so it would otherwise fall through to the generic error bucket. This
|
|
100
|
-
// detects the SDK's not-found shapes so `getRepo` can rethrow them as `RequestNotFoundError`, keeping the
|
|
101
|
-
// facade's by-type mapping intact.
|
|
102
|
-
function isGraphQLRepoNotFoundError(ex: unknown): boolean {
|
|
103
|
-
// GitHub throws `GraphQLErrors`. The SDK reports the null repository node with the same
|
|
104
|
-
// `Repository <x> not found` message regardless of the underlying cause, so a `FORBIDDEN` or
|
|
105
|
-
// `RATE_LIMITED` GraphQL error would also surface with that message. Trust the structured error type
|
|
106
|
-
// when entries are present (only `NOT_FOUND` is a real not-found), and fall back to the repo-specific
|
|
107
|
-
// message only when there are no entries to disambiguate (a bare null node).
|
|
108
|
-
if (isGraphQLErrors(ex)) {
|
|
109
|
-
const errors = ex.graphQLErrors;
|
|
110
|
-
// Scope NOT_FOUND to the `repository` field: `getRepo`'s query only selects that node today, but
|
|
111
|
-
// were it to grow other selections that can emit NOT_FOUND, an unscoped check would misclassify
|
|
112
|
-
// them. Tolerate a missing `path` so we degrade to the current behavior if the SDK stops populating
|
|
113
|
-
// it, rather than silently regressing to `error`.
|
|
114
|
-
if (errors?.length) {
|
|
115
|
-
return errors.some(
|
|
116
|
-
(e: GraphQLError) => e.type === 'NOT_FOUND' && (e.path == null || e.path.includes('repository')),
|
|
117
|
-
);
|
|
118
|
-
}
|
|
119
|
-
return repoNotFoundMessage.test(ex.message);
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
// GitLab's `getRepo` throws a plain Error; match its not-found message specifically so unrelated
|
|
123
|
-
// bare Errors (network/parse failures) still reach the generic error bucket.
|
|
124
|
-
return ex instanceof Error && repoNotFoundMessage.test(ex.message);
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
const trelloBaseUrl = 'https://api.trello.com';
|
|
128
|
-
|
|
129
|
-
/**
|
|
130
|
-
* Jira computes an issue's available transitions per issue, from the workflow and the reader's permissions, so a
|
|
131
|
-
* list read at a page size of 100 pays for 100 of those in both server work and response payload. Nothing in this
|
|
132
|
-
* package reads `statusTransitions` off a list — only the singular `getIssue` path exposes them, and it always
|
|
133
|
-
* expands them — so every list read opts out. Revisit the day a list row offers a status change straight off it.
|
|
134
|
-
*/
|
|
135
|
-
const jiraListIncludeTransitions = false;
|
|
136
|
-
|
|
137
|
-
type TrelloMemberResponse = {
|
|
138
|
-
id: string;
|
|
139
|
-
username?: string | null;
|
|
140
|
-
fullName?: string | null;
|
|
141
|
-
avatarHash?: string | null;
|
|
142
|
-
avatarUrl?: string | null;
|
|
143
|
-
};
|
|
144
|
-
|
|
145
|
-
type TrelloCardResponse = {
|
|
146
|
-
id: string;
|
|
147
|
-
idShort: number;
|
|
148
|
-
name: string;
|
|
149
|
-
url: string;
|
|
150
|
-
dateLastActivity: string;
|
|
151
|
-
idList?: string | null;
|
|
152
|
-
badges?: {
|
|
153
|
-
comments?: number | null;
|
|
154
|
-
votes?: number | null;
|
|
155
|
-
};
|
|
156
|
-
members?: TrelloMemberResponse[];
|
|
157
|
-
labels?: Array<{ color: string | null; id: string; name: string }>;
|
|
158
|
-
};
|
|
159
|
-
|
|
160
|
-
function getTrelloAuthHeaders(appKey: string, token: string): Record<string, string> {
|
|
161
|
-
return {
|
|
162
|
-
Authorization: `OAuth oauth_consumer_key="${appKey}", oauth_token="${token}"`,
|
|
163
|
-
};
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
function getTrelloMemberAvatarUrl(member: TrelloMemberResponse): string | null {
|
|
167
|
-
if (member.avatarUrl != null) return member.avatarUrl;
|
|
168
|
-
if (member.avatarHash == null) return null;
|
|
169
|
-
|
|
170
|
-
return `https://trello-members.s3.amazonaws.com/${member.id}/${member.avatarHash}/50.png`;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
function fromTrelloCard(
|
|
174
|
-
card: TrelloCardResponse,
|
|
175
|
-
trelloBoardListsById: Record<string, { name: string }>,
|
|
176
|
-
): ProviderIssue {
|
|
177
|
-
const createdDate = new Date(1000 * parseInt(card.id.substring(0, 8), 16));
|
|
178
|
-
const list = card.idList != null ? trelloBoardListsById[card.idList] : undefined;
|
|
179
|
-
|
|
180
|
-
return {
|
|
181
|
-
id: card.id,
|
|
182
|
-
commentCount: card.badges?.comments ?? null,
|
|
183
|
-
number: String(card.idShort),
|
|
184
|
-
title: card.name,
|
|
185
|
-
url: card.url,
|
|
186
|
-
closedDate: null,
|
|
187
|
-
createdDate: new Date(createdDate.toISOString()),
|
|
188
|
-
author: null,
|
|
189
|
-
updatedDate: new Date(card.dateLastActivity),
|
|
190
|
-
assignees: (card.members ?? []).map(member => ({
|
|
191
|
-
id: member.id,
|
|
192
|
-
username: member.username ?? null,
|
|
193
|
-
name: member.fullName ?? null,
|
|
194
|
-
email: null,
|
|
195
|
-
avatarUrl: getTrelloMemberAvatarUrl(member),
|
|
196
|
-
url: null,
|
|
197
|
-
})),
|
|
198
|
-
description: null,
|
|
199
|
-
state: list != null ? { id: card.idList!, name: list.name, color: null } : null,
|
|
200
|
-
type: null,
|
|
201
|
-
repository: null,
|
|
202
|
-
upvoteCount: card.badges?.votes ?? null,
|
|
203
|
-
labels: (card.labels ?? []).map(label => ({
|
|
204
|
-
color: label.color,
|
|
205
|
-
description: null,
|
|
206
|
-
id: label.id,
|
|
207
|
-
name: label.name,
|
|
208
|
-
})),
|
|
209
|
-
};
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
export class ProvidersApi {
|
|
213
|
-
private readonly providers: Providers;
|
|
214
|
-
private readonly request: ProviderRequestFunction;
|
|
215
|
-
|
|
216
|
-
constructor(private readonly authenticationService: IntegrationAuthenticationService) {
|
|
217
|
-
const http = authenticationService.ctx.http;
|
|
218
|
-
const userAgent = http.userAgent;
|
|
219
|
-
const customFetch: ProviderRequestFunction = async <T>({
|
|
220
|
-
url,
|
|
221
|
-
...options
|
|
222
|
-
}: ProviderRequestOptions): Promise<ProviderRequestResponse<T>> => {
|
|
223
|
-
const response = await http.fetch(url, {
|
|
224
|
-
...options,
|
|
225
|
-
headers: {
|
|
226
|
-
'User-Agent': userAgent,
|
|
227
|
-
...options.headers,
|
|
228
|
-
},
|
|
229
|
-
});
|
|
230
|
-
|
|
231
|
-
return parseFetchResponseForApi<T>(response);
|
|
232
|
-
};
|
|
233
|
-
this.request = customFetch;
|
|
234
|
-
const providerApis = createProviderApis({ request: customFetch });
|
|
235
|
-
this.providers = {
|
|
236
|
-
[GitCloudHostIntegrationId.GitHub]: {
|
|
237
|
-
...providersMetadata[GitCloudHostIntegrationId.GitHub],
|
|
238
|
-
provider: providerApis.github,
|
|
239
|
-
getRepoFn: providerApis.github.getRepo.bind(providerApis.github),
|
|
240
|
-
getCurrentUserFn: providerApis.github.getCurrentUser.bind(providerApis.github),
|
|
241
|
-
getPullRequestsForReposFn: providerApis.github.getPullRequestsForRepos.bind(
|
|
242
|
-
providerApis.github,
|
|
243
|
-
) as GetPullRequestsForReposFn,
|
|
244
|
-
getPullRequestsForUserFn: providerApis.github.getPullRequestsAssociatedWithUser.bind(
|
|
245
|
-
providerApis.github,
|
|
246
|
-
) as GetPullRequestsForUserFn,
|
|
247
|
-
getIssuesForReposFn: providerApis.github.getIssuesForRepos.bind(
|
|
248
|
-
providerApis.github,
|
|
249
|
-
) as GetIssuesForReposFn,
|
|
250
|
-
getOrgsForCurrentUserFn: providerApis.github.getOrgsForCurrentUser.bind(providerApis.github),
|
|
251
|
-
getReposForOrgFn: providerApis.github.getReposForOrg.bind(providerApis.github),
|
|
252
|
-
getReposForCurrentUserFn: providerApis.github.getReposForCurrentUser.bind(providerApis.github),
|
|
253
|
-
},
|
|
254
|
-
[GitSelfManagedHostIntegrationId.CloudGitHubEnterprise]: {
|
|
255
|
-
...providersMetadata[GitSelfManagedHostIntegrationId.CloudGitHubEnterprise],
|
|
256
|
-
provider: providerApis.github,
|
|
257
|
-
getRepoFn: providerApis.github.getRepo.bind(providerApis.github),
|
|
258
|
-
getCurrentUserFn: providerApis.github.getCurrentUser.bind(providerApis.github),
|
|
259
|
-
getPullRequestsForReposFn: providerApis.github.getPullRequestsForRepos.bind(
|
|
260
|
-
providerApis.github,
|
|
261
|
-
) as GetPullRequestsForReposFn,
|
|
262
|
-
getPullRequestsForUserFn: providerApis.github.getPullRequestsAssociatedWithUser.bind(
|
|
263
|
-
providerApis.github,
|
|
264
|
-
) as GetPullRequestsForUserFn,
|
|
265
|
-
getIssuesForReposFn: providerApis.github.getIssuesForRepos.bind(
|
|
266
|
-
providerApis.github,
|
|
267
|
-
) as GetIssuesForReposFn,
|
|
268
|
-
getOrgsForCurrentUserFn: providerApis.github.getOrgsForCurrentUser.bind(providerApis.github),
|
|
269
|
-
getReposForOrgFn: providerApis.github.getReposForOrg.bind(providerApis.github),
|
|
270
|
-
getReposForCurrentUserFn: providerApis.github.getReposForCurrentUser.bind(providerApis.github),
|
|
271
|
-
},
|
|
272
|
-
[GitCloudHostIntegrationId.GitLab]: {
|
|
273
|
-
...providersMetadata[GitCloudHostIntegrationId.GitLab],
|
|
274
|
-
provider: providerApis.gitlab,
|
|
275
|
-
getRepoFn: providerApis.gitlab.getRepo.bind(providerApis.gitlab),
|
|
276
|
-
getCurrentUserFn: providerApis.gitlab.getCurrentUser.bind(providerApis.gitlab),
|
|
277
|
-
getPullRequestsForReposFn: providerApis.gitlab.getPullRequestsForRepos.bind(
|
|
278
|
-
providerApis.gitlab,
|
|
279
|
-
) as GetPullRequestsForReposFn,
|
|
280
|
-
getPullRequestsForRepoFn: providerApis.gitlab.getPullRequestsForRepo.bind(providerApis.gitlab),
|
|
281
|
-
getPullRequestsForUserFn: providerApis.gitlab.getPullRequestsAssociatedWithUser.bind(
|
|
282
|
-
providerApis.gitlab,
|
|
283
|
-
) as GetPullRequestsForUserFn,
|
|
284
|
-
getGitLabPullRequestsForUserAssociationFn: providerApis.gitlab.getPullRequestsForUser.bind(
|
|
285
|
-
providerApis.gitlab,
|
|
286
|
-
),
|
|
287
|
-
getIssueFn: providerApis.gitlab.getIssue.bind(providerApis.gitlab) as GetIssueFn,
|
|
288
|
-
getIssuesForReposFn: providerApis.gitlab.getIssuesForRepos.bind(
|
|
289
|
-
providerApis.gitlab,
|
|
290
|
-
) as GetIssuesForReposFn,
|
|
291
|
-
getIssuesForRepoFn: providerApis.gitlab.getIssuesForRepo.bind(providerApis.gitlab),
|
|
292
|
-
getIssuesForCurrentUserFn: providerApis.gitlab.getIssuesForCurrentUser.bind(providerApis.gitlab),
|
|
293
|
-
mergePullRequestFn: providerApis.gitlab.mergePullRequest.bind(providerApis.gitlab),
|
|
294
|
-
getGroupsForCurrentUserFn: providerApis.gitlab.getGroupsForCurrentUser.bind(providerApis.gitlab),
|
|
295
|
-
getReposForCurrentUserFn: providerApis.gitlab.getReposForCurrentUser.bind(providerApis.gitlab),
|
|
296
|
-
},
|
|
297
|
-
[GitSelfManagedHostIntegrationId.CloudGitLabSelfHosted]: {
|
|
298
|
-
...providersMetadata[GitSelfManagedHostIntegrationId.CloudGitLabSelfHosted],
|
|
299
|
-
provider: providerApis.gitlab,
|
|
300
|
-
getRepoFn: providerApis.gitlab.getRepo.bind(providerApis.gitlab),
|
|
301
|
-
getCurrentUserFn: providerApis.gitlab.getCurrentUser.bind(providerApis.gitlab),
|
|
302
|
-
getPullRequestsForReposFn: providerApis.gitlab.getPullRequestsForRepos.bind(
|
|
303
|
-
providerApis.gitlab,
|
|
304
|
-
) as GetPullRequestsForReposFn,
|
|
305
|
-
getPullRequestsForRepoFn: providerApis.gitlab.getPullRequestsForRepo.bind(providerApis.gitlab),
|
|
306
|
-
getPullRequestsForUserFn: providerApis.gitlab.getPullRequestsAssociatedWithUser.bind(
|
|
307
|
-
providerApis.gitlab,
|
|
308
|
-
) as GetPullRequestsForUserFn,
|
|
309
|
-
getGitLabPullRequestsForUserAssociationFn: providerApis.gitlab.getPullRequestsForUser.bind(
|
|
310
|
-
providerApis.gitlab,
|
|
311
|
-
),
|
|
312
|
-
getIssueFn: providerApis.gitlab.getIssue.bind(providerApis.gitlab) as GetIssueFn,
|
|
313
|
-
getIssuesForReposFn: providerApis.gitlab.getIssuesForRepos.bind(
|
|
314
|
-
providerApis.gitlab,
|
|
315
|
-
) as GetIssuesForReposFn,
|
|
316
|
-
getIssuesForRepoFn: providerApis.gitlab.getIssuesForRepo.bind(providerApis.gitlab),
|
|
317
|
-
getIssuesForCurrentUserFn: providerApis.gitlab.getIssuesForCurrentUser.bind(providerApis.gitlab),
|
|
318
|
-
mergePullRequestFn: providerApis.gitlab.mergePullRequest.bind(providerApis.gitlab),
|
|
319
|
-
getGroupsForCurrentUserFn: providerApis.gitlab.getGroupsForCurrentUser.bind(providerApis.gitlab),
|
|
320
|
-
getReposForCurrentUserFn: providerApis.gitlab.getReposForCurrentUser.bind(providerApis.gitlab),
|
|
321
|
-
},
|
|
322
|
-
[GitCloudHostIntegrationId.Bitbucket]: {
|
|
323
|
-
...providersMetadata[GitCloudHostIntegrationId.Bitbucket],
|
|
324
|
-
provider: providerApis.bitbucket,
|
|
325
|
-
getRepoFn: providerApis.bitbucket.getRepo.bind(providerApis.bitbucket),
|
|
326
|
-
getCurrentUserFn: providerApis.bitbucket.getCurrentUser.bind(providerApis.bitbucket),
|
|
327
|
-
getBitbucketResourcesForCurrentUserFn: providerApis.bitbucket.getWorkspacesForCurrentUser.bind(
|
|
328
|
-
providerApis.bitbucket,
|
|
329
|
-
),
|
|
330
|
-
getBitbucketPullRequestsAuthoredByUserForWorkspaceFn:
|
|
331
|
-
providerApis.bitbucket.getPullRequestsForUserAndWorkspace.bind(providerApis.bitbucket),
|
|
332
|
-
getPullRequestsForReposFn: providerApis.bitbucket.getPullRequestsForRepos.bind(
|
|
333
|
-
providerApis.bitbucket,
|
|
334
|
-
) as GetPullRequestsForReposFn,
|
|
335
|
-
getPullRequestsForRepoFn: providerApis.bitbucket.getPullRequestsForRepo.bind(providerApis.bitbucket),
|
|
336
|
-
mergePullRequestFn: providerApis.bitbucket.mergePullRequest.bind(providerApis.bitbucket),
|
|
337
|
-
getReposForWorkspaceFn: providerApis.bitbucket.getReposForWorkspace.bind(providerApis.bitbucket),
|
|
338
|
-
},
|
|
339
|
-
[GitSelfManagedHostIntegrationId.BitbucketServer]: {
|
|
340
|
-
...providersMetadata[GitSelfManagedHostIntegrationId.BitbucketServer],
|
|
341
|
-
provider: providerApis.bitbucketServer,
|
|
342
|
-
getRepoFn: providerApis.bitbucketServer.getRepo.bind(providerApis.bitbucketServer),
|
|
343
|
-
getCurrentUserFn: providerApis.bitbucketServer.getCurrentUser.bind(providerApis.bitbucketServer),
|
|
344
|
-
getBitbucketServerPullRequestsForCurrentUserFn:
|
|
345
|
-
providerApis.bitbucketServer.getPullRequestsForCurrentUser.bind(providerApis.bitbucketServer),
|
|
346
|
-
getPullRequestsForReposFn: providerApis.bitbucketServer.getPullRequestsForRepos.bind(
|
|
347
|
-
providerApis.bitbucketServer,
|
|
348
|
-
) as GetPullRequestsForReposFn,
|
|
349
|
-
getPullRequestsForRepoFn: providerApis.bitbucketServer.getPullRequestsForRepo.bind(
|
|
350
|
-
providerApis.bitbucketServer,
|
|
351
|
-
),
|
|
352
|
-
mergePullRequestFn: providerApis.bitbucketServer.mergePullRequest.bind(providerApis.bitbucketServer),
|
|
353
|
-
},
|
|
354
|
-
[GitCloudHostIntegrationId.AzureDevOps]: {
|
|
355
|
-
...providersMetadata[GitCloudHostIntegrationId.AzureDevOps],
|
|
356
|
-
provider: providerApis.azureDevOps,
|
|
357
|
-
getRepoOfProjectFn: providerApis.azureDevOps.getRepo.bind(providerApis.azureDevOps),
|
|
358
|
-
getCurrentUserFn: providerApis.azureDevOps.getCurrentUser.bind(providerApis.azureDevOps),
|
|
359
|
-
getCurrentUserForInstanceFn: providerApis.azureDevOps.getCurrentUserForInstance.bind(
|
|
360
|
-
providerApis.azureDevOps,
|
|
361
|
-
),
|
|
362
|
-
getAzureResourcesForUserFn: providerApis.azureDevOps.getOrgsForUser.bind(providerApis.azureDevOps),
|
|
363
|
-
getAzureProjectsForResourceFn: providerApis.azureDevOps.getAzureProjects.bind(providerApis.azureDevOps),
|
|
364
|
-
getPullRequestsForReposFn: providerApis.azureDevOps.getPullRequestsForRepos.bind(
|
|
365
|
-
providerApis.azureDevOps,
|
|
366
|
-
) as GetPullRequestsForReposFn,
|
|
367
|
-
getPullRequestsForRepoFn: providerApis.azureDevOps.getPullRequestsForRepo.bind(
|
|
368
|
-
providerApis.azureDevOps,
|
|
369
|
-
),
|
|
370
|
-
getPullRequestsForAzureProjectsFn: providerApis.azureDevOps.getPullRequestsForProjects.bind(
|
|
371
|
-
providerApis.azureDevOps,
|
|
372
|
-
),
|
|
373
|
-
getPullRequestsForAzureProjectFn: providerApis.azureDevOps.getPullRequestsForProject.bind(
|
|
374
|
-
providerApis.azureDevOps,
|
|
375
|
-
),
|
|
376
|
-
getIssuesForAzureProjectFn: providerApis.azureDevOps.getIssuesForAzureProject.bind(
|
|
377
|
-
providerApis.azureDevOps,
|
|
378
|
-
),
|
|
379
|
-
getReposForAzureProjectFn: providerApis.azureDevOps.getReposForAzureProject.bind(
|
|
380
|
-
providerApis.azureDevOps,
|
|
381
|
-
),
|
|
382
|
-
mergePullRequestFn: providerApis.azureDevOps.mergePullRequest.bind(providerApis.azureDevOps),
|
|
383
|
-
},
|
|
384
|
-
[GitSelfManagedHostIntegrationId.AzureDevOpsServer]: {
|
|
385
|
-
...providersMetadata[GitSelfManagedHostIntegrationId.AzureDevOpsServer],
|
|
386
|
-
provider: providerApis.azureDevOps,
|
|
387
|
-
getRepoOfProjectFn: providerApis.azureDevOps.getRepo.bind(providerApis.azureDevOps),
|
|
388
|
-
getCurrentUserFn: providerApis.azureDevOps.getCurrentUser.bind(providerApis.azureDevOps),
|
|
389
|
-
getCurrentUserForInstanceFn: providerApis.azureDevOps.getCurrentUserForInstance.bind(
|
|
390
|
-
providerApis.azureDevOps,
|
|
391
|
-
),
|
|
392
|
-
getAzureResourcesForUserFn: providerApis.azureDevOps.getCollectionsForUser.bind(
|
|
393
|
-
providerApis.azureDevOps,
|
|
394
|
-
),
|
|
395
|
-
getAzureProjectsForResourceFn: providerApis.azureDevOps.getAzureProjects.bind(providerApis.azureDevOps),
|
|
396
|
-
getPullRequestsForReposFn: providerApis.azureDevOps.getPullRequestsForRepos.bind(
|
|
397
|
-
providerApis.azureDevOps,
|
|
398
|
-
) as GetPullRequestsForReposFn,
|
|
399
|
-
getPullRequestsForRepoFn: providerApis.azureDevOps.getPullRequestsForRepo.bind(
|
|
400
|
-
providerApis.azureDevOps,
|
|
401
|
-
),
|
|
402
|
-
getPullRequestsForAzureProjectsFn: providerApis.azureDevOps.getPullRequestsForProjects.bind(
|
|
403
|
-
providerApis.azureDevOps,
|
|
404
|
-
),
|
|
405
|
-
getPullRequestsForAzureProjectFn: providerApis.azureDevOps.getPullRequestsForProject.bind(
|
|
406
|
-
providerApis.azureDevOps,
|
|
407
|
-
),
|
|
408
|
-
getIssuesForAzureProjectFn: providerApis.azureDevOps.getIssuesForAzureProject.bind(
|
|
409
|
-
providerApis.azureDevOps,
|
|
410
|
-
),
|
|
411
|
-
getReposForAzureProjectFn: providerApis.azureDevOps.getReposForAzureProject.bind(
|
|
412
|
-
providerApis.azureDevOps,
|
|
413
|
-
),
|
|
414
|
-
mergePullRequestFn: providerApis.azureDevOps.mergePullRequest.bind(providerApis.azureDevOps),
|
|
415
|
-
},
|
|
416
|
-
[IssuesCloudHostIntegrationId.Jira]: {
|
|
417
|
-
...providersMetadata[IssuesCloudHostIntegrationId.Jira],
|
|
418
|
-
provider: providerApis.jira,
|
|
419
|
-
getCurrentUserForResourceFn: providerApis.jira.getCurrentUserForResource.bind(providerApis.jira),
|
|
420
|
-
getJiraResourcesForCurrentUserFn: providerApis.jira.getJiraResourcesForCurrentUser.bind(
|
|
421
|
-
providerApis.jira,
|
|
422
|
-
),
|
|
423
|
-
getJiraProjectsForResourcesFn: providerApis.jira.getJiraProjectsForResources.bind(providerApis.jira),
|
|
424
|
-
getJiraProjectsForResourceFn: providerApis.jira.getJiraProjectsForResource.bind(providerApis.jira),
|
|
425
|
-
getIssueFn: providerApis.jira.getIssue.bind(providerApis.jira) as GetIssueFn,
|
|
426
|
-
getIssuesForProjectFn: providerApis.jira.getIssuesForProject.bind(providerApis.jira),
|
|
427
|
-
getIssuesForResourceForCurrentUserFn: providerApis.jira.getIssuesForResourceForCurrentUser.bind(
|
|
428
|
-
providerApis.jira,
|
|
429
|
-
),
|
|
430
|
-
},
|
|
431
|
-
[IssuesCloudHostIntegrationId.Linear]: {
|
|
432
|
-
...providersMetadata[IssuesCloudHostIntegrationId.Linear],
|
|
433
|
-
provider: providerApis.linear,
|
|
434
|
-
getIssueFn: providerApis.linear.getIssue.bind(providerApis.linear),
|
|
435
|
-
getIssuesForCurrentUserFn: providerApis.linear.getIssuesForCurrentUser.bind(providerApis.linear),
|
|
436
|
-
getLinearOrganizationFn: providerApis.linear.getLinearOrganization.bind(providerApis.linear),
|
|
437
|
-
getLinearTeamsForCurrentUserFn: providerApis.linear.getTeamsForCurrentUser.bind(providerApis.linear),
|
|
438
|
-
getLinearIssuesFn: providerApis.linear.getIssues.bind(providerApis.linear),
|
|
439
|
-
getLinearCurrentUserFn: providerApis.linear.getCurrentUser.bind(providerApis.linear),
|
|
440
|
-
},
|
|
441
|
-
[IssuesCloudHostIntegrationId.Trello]: {
|
|
442
|
-
...providersMetadata[IssuesCloudHostIntegrationId.Trello],
|
|
443
|
-
provider: providerApis.trello,
|
|
444
|
-
getTrelloCurrentUserFn: providerApis.trello.getCurrentUser.bind(providerApis.trello),
|
|
445
|
-
getTrelloBoardsForCurrentUserFn: providerApis.trello.getBoardsForCurrentUser.bind(providerApis.trello),
|
|
446
|
-
getTrelloListsForBoardFn: providerApis.trello.getListsForTrelloBoard.bind(providerApis.trello),
|
|
447
|
-
getTrelloAccountForIdFn: providerApis.trello.getAccountForId.bind(providerApis.trello),
|
|
448
|
-
getTrelloIssuesForBoardFn: providerApis.trello.getIssuesForBoard.bind(providerApis.trello),
|
|
449
|
-
getTrelloLabelsForBoardFn: providerApis.trello.getLabelsForBoard.bind(providerApis.trello),
|
|
450
|
-
},
|
|
451
|
-
};
|
|
452
|
-
}
|
|
453
|
-
|
|
454
|
-
getScopesForProvider(providerId: IntegrationIds): string[] | undefined {
|
|
455
|
-
return this.providers[providerId]?.scopes;
|
|
456
|
-
}
|
|
457
|
-
|
|
458
|
-
getProviderDomain(providerId: IntegrationIds): string | undefined {
|
|
459
|
-
return this.providers[providerId]?.domain;
|
|
460
|
-
}
|
|
461
|
-
|
|
462
|
-
getProviderPullRequestsPagingMode(providerId: IntegrationIds): PagingMode | undefined {
|
|
463
|
-
return this.providers[providerId]?.pullRequestsPagingMode;
|
|
464
|
-
}
|
|
465
|
-
|
|
466
|
-
getProviderIssuesPagingMode(providerId: IntegrationIds): PagingMode | undefined {
|
|
467
|
-
return this.providers[providerId]?.issuesPagingMode;
|
|
468
|
-
}
|
|
469
|
-
|
|
470
|
-
providerSupportsPullRequestFilters(providerId: IntegrationIds, filters: PullRequestFilter[]): boolean {
|
|
471
|
-
return (
|
|
472
|
-
this.providers[providerId]?.supportedPullRequestFilters != null &&
|
|
473
|
-
filters.every(filter => this.providers[providerId]?.supportedPullRequestFilters?.includes(filter))
|
|
474
|
-
);
|
|
475
|
-
}
|
|
476
|
-
|
|
477
|
-
providerSupportsIssueFilters(providerId: IntegrationIds, filters: IssueFilter[]): boolean {
|
|
478
|
-
return (
|
|
479
|
-
this.providers[providerId]?.supportedIssueFilters != null &&
|
|
480
|
-
filters.every(filter => this.providers[providerId]?.supportedIssueFilters?.includes(filter))
|
|
481
|
-
);
|
|
482
|
-
}
|
|
483
|
-
|
|
484
|
-
/** See {@link isRepoIdsInput}, which owns the rule; kept as a method because callers reach it through the api. */
|
|
485
|
-
isRepoIdsInput(input: unknown): input is (string | number)[] {
|
|
486
|
-
return isRepoIdsInput(input);
|
|
487
|
-
}
|
|
488
|
-
|
|
489
|
-
private async getProviderToken<T extends IntegrationIds>(
|
|
490
|
-
provider: ProviderInfo & { id: T },
|
|
491
|
-
options?: { createSessionIfNeeded?: boolean; connectionId?: string },
|
|
492
|
-
): Promise<TokenWithInfo<T> | undefined> {
|
|
493
|
-
// When a specific connection is requested, resolve that connection's cloud session (mirroring
|
|
494
|
-
// `Integration.resolveReadSession`); otherwise keep the plain descriptor so the primary is resolved.
|
|
495
|
-
// An empty string is not a real target, so it must also fall through to the primary path.
|
|
496
|
-
const providerDescriptor = options?.connectionId
|
|
497
|
-
? { domain: provider.domain, scopes: provider.scopes, connectionId: options.connectionId, cloud: true }
|
|
498
|
-
: { domain: provider.domain, scopes: provider.scopes };
|
|
499
|
-
try {
|
|
500
|
-
const authProvider = await this.authenticationService.get(provider.id);
|
|
501
|
-
const session = await authProvider.getSession(providerDescriptor, {
|
|
502
|
-
createIfNeeded: options?.createSessionIfNeeded,
|
|
503
|
-
});
|
|
504
|
-
if (session == null) {
|
|
505
|
-
return undefined;
|
|
506
|
-
}
|
|
507
|
-
return toTokenWithInfo(provider.id, session);
|
|
508
|
-
} catch {
|
|
509
|
-
return undefined;
|
|
510
|
-
}
|
|
511
|
-
}
|
|
512
|
-
|
|
513
|
-
private getAzurePATForOAuthToken(oauthToken: string) {
|
|
514
|
-
return base64(`PAT:${oauthToken}`);
|
|
515
|
-
}
|
|
516
|
-
|
|
517
|
-
private async ensureProviderToken<T extends IntegrationIds>(
|
|
518
|
-
tokenOptInfo: TokenOptInfo<T>,
|
|
519
|
-
): Promise<{ provider: ProviderInfo; tokenWithInfo: TokenWithInfo<T> }> {
|
|
520
|
-
const providerId = tokenOptInfo.providerId;
|
|
521
|
-
const provider = this.providers[providerId];
|
|
522
|
-
if (provider == null) {
|
|
523
|
-
throw new Error(`Provider with id ${providerId} not registered`);
|
|
524
|
-
}
|
|
525
|
-
|
|
526
|
-
if (providerId !== provider.id) {
|
|
527
|
-
throw new Error(`Provider id mismatch: expected ${providerId} but got ${provider.id}`);
|
|
528
|
-
}
|
|
529
|
-
|
|
530
|
-
const connectionId = 'connectionId' in tokenOptInfo ? tokenOptInfo.connectionId : undefined;
|
|
531
|
-
const tokenWithInfo = tokenOptInfo?.accessToken
|
|
532
|
-
? tokenOptInfo
|
|
533
|
-
: await this.getProviderToken<T>(provider as ProviderInfo & { id: T }, {
|
|
534
|
-
connectionId: connectionId,
|
|
535
|
-
});
|
|
536
|
-
if (tokenWithInfo == null) {
|
|
537
|
-
throw new Error(`Not connected to provider ${providerId}`);
|
|
538
|
-
}
|
|
539
|
-
|
|
540
|
-
return { provider: provider, tokenWithInfo: tokenWithInfo };
|
|
541
|
-
}
|
|
542
|
-
|
|
543
|
-
private async ensureProviderTokenAndFunction<T extends IntegrationIds>(
|
|
544
|
-
tokenOptInfo: TokenOptInfo<T>,
|
|
545
|
-
providerFn: keyof ProviderInfo,
|
|
546
|
-
): Promise<{ provider: ProviderInfo; tokenWithInfo: TokenWithInfo<T> }> {
|
|
547
|
-
const { provider, tokenWithInfo } = await this.ensureProviderToken(tokenOptInfo);
|
|
548
|
-
const providerId = tokenOptInfo.providerId;
|
|
549
|
-
|
|
550
|
-
if (provider[providerFn] == null) {
|
|
551
|
-
throw new Error(`Provider with id ${providerId} does not support function: ${providerFn}`);
|
|
552
|
-
}
|
|
553
|
-
|
|
554
|
-
return { provider: provider, tokenWithInfo: tokenWithInfo };
|
|
555
|
-
}
|
|
556
|
-
|
|
557
|
-
private handleProviderError<T>(tokenWithInfo: TokenWithInfo, error: any): T {
|
|
558
|
-
const providerId = tokenWithInfo.providerId;
|
|
559
|
-
const provider = this.providers[providerId];
|
|
560
|
-
if (provider == null) {
|
|
561
|
-
throw new Error(`Provider with id ${providerId} not registered`);
|
|
562
|
-
}
|
|
563
|
-
|
|
564
|
-
return throwProviderError(tokenWithInfo, error);
|
|
565
|
-
}
|
|
566
|
-
|
|
567
|
-
async getPagedResult<T>(
|
|
568
|
-
args: any,
|
|
569
|
-
providerFn:
|
|
570
|
-
| ((
|
|
571
|
-
input: any,
|
|
572
|
-
options?: { token?: string; isPAT?: boolean; baseUrl?: string },
|
|
573
|
-
) => Promise<{ data: NonNullable<T>[]; pageInfo?: PageInfo; metadata?: CollectionMetadata }>)
|
|
574
|
-
| undefined,
|
|
575
|
-
tokenWithInfo: TokenWithInfo,
|
|
576
|
-
cursor: string = '{}',
|
|
577
|
-
isPAT: boolean = false,
|
|
578
|
-
baseUrl?: string,
|
|
579
|
-
): Promise<ProviderApiPagedResult<T>> {
|
|
580
|
-
let cursorInfo;
|
|
581
|
-
try {
|
|
582
|
-
cursorInfo = JSON.parse(cursor);
|
|
583
|
-
} catch {
|
|
584
|
-
cursorInfo = {};
|
|
585
|
-
}
|
|
586
|
-
const cursorValue = cursorInfo.value;
|
|
587
|
-
const cursorType = cursorInfo.type;
|
|
588
|
-
// An explicit numbered `page` request wins over a page-typed cursor; otherwise follow the cursor. A
|
|
589
|
-
// live cursor-typed cursor still takes precedence so an in-flight continuation is never clobbered.
|
|
590
|
-
const requestedPage: number | undefined = typeof args?.page === 'number' ? args.page : undefined;
|
|
591
|
-
const requestedPageSize: number | undefined = typeof args?.pageSize === 'number' ? args.pageSize : undefined;
|
|
592
|
-
let cursorOrPage = {};
|
|
593
|
-
if (requestedPage != null && cursorType !== 'cursor') {
|
|
594
|
-
cursorOrPage = { page: requestedPage };
|
|
595
|
-
} else if (cursorType === 'page') {
|
|
596
|
-
cursorOrPage = { page: cursorValue };
|
|
597
|
-
} else if (cursorType === 'cursor') {
|
|
598
|
-
cursorOrPage = { cursor: cursorValue };
|
|
599
|
-
}
|
|
600
|
-
|
|
601
|
-
// Strip the caller's paging keys so `getPagedResult` fully controls them; otherwise `args.page` could
|
|
602
|
-
// survive alongside a resolved `cursor` (or the raw serialized wrapper `args.cursor` could leak in when
|
|
603
|
-
// following a page), letting the provider clobber the continuation we intended.
|
|
604
|
-
const { page: _page, pageSize: _pageSize, cursor: _cursor, ...restArgs } = args ?? {};
|
|
605
|
-
const input = {
|
|
606
|
-
...restArgs,
|
|
607
|
-
...cursorOrPage,
|
|
608
|
-
// `pageSize` is honored by numbered providers; GitHub reads `maxPageSize`. Set both so whichever
|
|
609
|
-
// the resolved provider understands takes effect; the other is ignored.
|
|
610
|
-
...(requestedPageSize != null ? { pageSize: requestedPageSize, maxPageSize: requestedPageSize } : {}),
|
|
611
|
-
};
|
|
612
|
-
|
|
613
|
-
try {
|
|
614
|
-
const result = await providerFn?.(input, {
|
|
615
|
-
token: tokenWithInfo.accessToken,
|
|
616
|
-
isPAT: isPAT,
|
|
617
|
-
baseUrl: baseUrl,
|
|
618
|
-
});
|
|
619
|
-
if (result == null) {
|
|
620
|
-
const continuationWasRequested =
|
|
621
|
-
(cursor != null && cursor !== '{}') || (requestedPage != null && requestedPage > 1);
|
|
622
|
-
return continuationWasRequested
|
|
623
|
-
? {
|
|
624
|
-
values: [],
|
|
625
|
-
paging: { cursor: '{}', more: false, truncated: true },
|
|
626
|
-
metadata: { completeness: 'partial' },
|
|
627
|
-
}
|
|
628
|
-
: { values: [] };
|
|
629
|
-
}
|
|
630
|
-
|
|
631
|
-
const pageInfo = result.pageInfo;
|
|
632
|
-
const hasMore = pageInfo?.hasNextPage ?? false;
|
|
633
|
-
|
|
634
|
-
let nextCursor = '{}';
|
|
635
|
-
if (pageInfo?.endCursor != null) {
|
|
636
|
-
nextCursor = JSON.stringify({ value: pageInfo.endCursor, type: 'cursor' });
|
|
637
|
-
} else if (pageInfo?.nextPage != null) {
|
|
638
|
-
nextCursor = JSON.stringify({ value: pageInfo.nextPage, type: 'page' });
|
|
639
|
-
}
|
|
640
|
-
const continuationBroken = hasMore && (nextCursor === '{}' || nextCursor === cursor);
|
|
641
|
-
const normalizedMetadata = mergeCollectionMetadata(
|
|
642
|
-
result.metadata,
|
|
643
|
-
continuationBroken ? { completeness: 'partial' } : undefined,
|
|
644
|
-
);
|
|
645
|
-
|
|
646
|
-
// SDK collection completeness is independent from provider-native pagination: a result can expose a
|
|
647
|
-
// real next page (`more`) and still have a failed sibling scope (`partial`/`unknown`). Surface the
|
|
648
|
-
// latter as `truncated` so consumers treat the page as incomplete. Absent metadata (old providers,
|
|
649
|
-
// test doubles) leaves `truncated` unset for backward compatibility. Shares the incompleteness
|
|
650
|
-
// predicate with the facade assessment so one metadata object can't be truncated there and whole here.
|
|
651
|
-
const truncated = isIncompleteCollection(normalizedMetadata) ? true : undefined;
|
|
652
|
-
|
|
653
|
-
return {
|
|
654
|
-
values: result.data,
|
|
655
|
-
paging: {
|
|
656
|
-
cursor: nextCursor,
|
|
657
|
-
more: hasMore && !continuationBroken,
|
|
658
|
-
truncated: truncated,
|
|
659
|
-
// Numbered-page metadata; left undefined by cursor-based providers (which don't report a
|
|
660
|
-
// currentPage), so we never echo the requested page for a provider that ignored it.
|
|
661
|
-
page: pageInfo?.currentPage ?? undefined,
|
|
662
|
-
pageSize: requestedPageSize,
|
|
663
|
-
nextPage: pageInfo?.nextPage ?? undefined,
|
|
664
|
-
totalPages: pageInfo?.totalPages ?? undefined,
|
|
665
|
-
totalCount: pageInfo?.totalCount ?? undefined,
|
|
666
|
-
},
|
|
667
|
-
metadata: normalizedMetadata,
|
|
668
|
-
};
|
|
669
|
-
} catch (e) {
|
|
670
|
-
return this.handleProviderError<ProviderApiPagedResult<T>>(tokenWithInfo, e);
|
|
671
|
-
}
|
|
672
|
-
}
|
|
673
|
-
|
|
674
|
-
async getRepo(
|
|
675
|
-
tokenOptInfo: TokenOptInfo,
|
|
676
|
-
owner: string,
|
|
677
|
-
name: string,
|
|
678
|
-
project?: string,
|
|
679
|
-
options?: { isPAT?: boolean; baseUrl?: string },
|
|
680
|
-
): Promise<ProviderRepository | undefined> {
|
|
681
|
-
const providerId = tokenOptInfo.providerId;
|
|
682
|
-
const isAzureDevOps =
|
|
683
|
-
providerId === GitCloudHostIntegrationId.AzureDevOps ||
|
|
684
|
-
providerId === GitSelfManagedHostIntegrationId.AzureDevOpsServer;
|
|
685
|
-
if (isAzureDevOps) {
|
|
686
|
-
if (project == null) return undefined;
|
|
687
|
-
|
|
688
|
-
const { provider, tokenWithInfo } = await this.ensureProviderTokenAndFunction(
|
|
689
|
-
tokenOptInfo,
|
|
690
|
-
'getRepoOfProjectFn',
|
|
691
|
-
);
|
|
692
|
-
const token = tokenWithInfo.accessToken;
|
|
693
|
-
|
|
694
|
-
try {
|
|
695
|
-
const result = await provider['getRepoOfProjectFn']?.(
|
|
696
|
-
{ namespace: owner, name: name, project: project },
|
|
697
|
-
{ token: token, isPAT: options?.isPAT, baseUrl: options?.baseUrl },
|
|
698
|
-
);
|
|
699
|
-
return result?.data;
|
|
700
|
-
} catch (e) {
|
|
701
|
-
if (isGraphQLRepoNotFoundError(e)) throw new RequestNotFoundError(toError(e));
|
|
702
|
-
return this.handleProviderError<ProviderRepository>(tokenWithInfo, e);
|
|
703
|
-
}
|
|
704
|
-
} else {
|
|
705
|
-
const { provider, tokenWithInfo } = await this.ensureProviderTokenAndFunction(tokenOptInfo, 'getRepoFn');
|
|
706
|
-
const token = tokenWithInfo.accessToken;
|
|
707
|
-
|
|
708
|
-
try {
|
|
709
|
-
const result = await provider['getRepoFn']?.(
|
|
710
|
-
{ namespace: owner, name: name, project: project },
|
|
711
|
-
{ token: token, isPAT: options?.isPAT, baseUrl: options?.baseUrl },
|
|
712
|
-
);
|
|
713
|
-
return result?.data;
|
|
714
|
-
} catch (e) {
|
|
715
|
-
if (isGraphQLRepoNotFoundError(e)) throw new RequestNotFoundError(toError(e));
|
|
716
|
-
return this.handleProviderError<ProviderRepository>(tokenWithInfo, e);
|
|
717
|
-
}
|
|
718
|
-
}
|
|
719
|
-
}
|
|
720
|
-
|
|
721
|
-
async getCurrentUser(
|
|
722
|
-
tokenOptInfo: TokenOptInfo,
|
|
723
|
-
options?: { isPAT?: boolean; baseUrl?: string },
|
|
724
|
-
): Promise<ProviderAccount | undefined> {
|
|
725
|
-
const { provider, tokenWithInfo } = await this.ensureProviderTokenAndFunction(tokenOptInfo, 'getCurrentUserFn');
|
|
726
|
-
const token = tokenWithInfo.accessToken;
|
|
727
|
-
|
|
728
|
-
try {
|
|
729
|
-
return (
|
|
730
|
-
await provider.getCurrentUserFn?.(
|
|
731
|
-
{},
|
|
732
|
-
{ token: token, isPAT: options?.isPAT, baseUrl: options?.baseUrl },
|
|
733
|
-
)
|
|
734
|
-
)?.data;
|
|
735
|
-
} catch (e) {
|
|
736
|
-
return this.handleProviderError<ProviderAccount>(tokenWithInfo, e);
|
|
737
|
-
}
|
|
738
|
-
}
|
|
739
|
-
|
|
740
|
-
async getCurrentUserForInstance(
|
|
741
|
-
tokenOptInfo: TokenOptInfo,
|
|
742
|
-
namespace: string,
|
|
743
|
-
options?: { isPAT?: boolean; baseUrl?: string },
|
|
744
|
-
): Promise<ProviderAccount | undefined> {
|
|
745
|
-
const { provider, tokenWithInfo } = await this.ensureProviderTokenAndFunction(
|
|
746
|
-
tokenOptInfo,
|
|
747
|
-
'getCurrentUserForInstanceFn',
|
|
748
|
-
);
|
|
749
|
-
const token = tokenWithInfo.accessToken;
|
|
750
|
-
|
|
751
|
-
return (
|
|
752
|
-
await provider.getCurrentUserForInstanceFn?.(
|
|
753
|
-
{ namespace: namespace },
|
|
754
|
-
{ token: token, isPAT: options?.isPAT, baseUrl: options?.baseUrl },
|
|
755
|
-
)
|
|
756
|
-
)?.data;
|
|
757
|
-
}
|
|
758
|
-
|
|
759
|
-
async getCurrentUserForResource(
|
|
760
|
-
tokenOptInfo: TokenWithInfo,
|
|
761
|
-
resourceId: string,
|
|
762
|
-
options?: { isPAT?: boolean; baseUrl?: string },
|
|
763
|
-
): Promise<ProviderAccount | undefined> {
|
|
764
|
-
const { provider, tokenWithInfo } = await this.ensureProviderTokenAndFunction(
|
|
765
|
-
tokenOptInfo,
|
|
766
|
-
'getCurrentUserForResourceFn',
|
|
767
|
-
);
|
|
768
|
-
const token = tokenWithInfo.accessToken;
|
|
769
|
-
|
|
770
|
-
try {
|
|
771
|
-
return (
|
|
772
|
-
await provider.getCurrentUserForResourceFn?.(
|
|
773
|
-
{ resourceId: resourceId },
|
|
774
|
-
{ token: token, isPAT: options?.isPAT, baseUrl: options?.baseUrl },
|
|
775
|
-
)
|
|
776
|
-
)?.data;
|
|
777
|
-
} catch (e) {
|
|
778
|
-
return this.handleProviderError<ProviderAccount>(tokenWithInfo, e);
|
|
779
|
-
}
|
|
780
|
-
}
|
|
781
|
-
|
|
782
|
-
async getJiraResourcesForCurrentUser(
|
|
783
|
-
tokenOptInfo: TokenWithInfo<IssuesCloudHostIntegrationId.Jira>,
|
|
784
|
-
): Promise<ProviderJiraResource[] | undefined> {
|
|
785
|
-
const { provider, tokenWithInfo } = await this.ensureProviderTokenAndFunction(
|
|
786
|
-
tokenOptInfo,
|
|
787
|
-
'getJiraResourcesForCurrentUserFn',
|
|
788
|
-
);
|
|
789
|
-
const token = tokenWithInfo.accessToken;
|
|
790
|
-
|
|
791
|
-
try {
|
|
792
|
-
return (await provider.getJiraResourcesForCurrentUserFn?.({ token: token }))?.data;
|
|
793
|
-
} catch (e) {
|
|
794
|
-
return this.handleProviderError<ProviderJiraResource[] | undefined>(tokenWithInfo, e);
|
|
795
|
-
}
|
|
796
|
-
}
|
|
797
|
-
|
|
798
|
-
async getLinearOrganization(
|
|
799
|
-
tokenOptInfo: TokenWithInfo<IssuesCloudHostIntegrationId.Linear>,
|
|
800
|
-
): Promise<ProviderLinearOrganization | undefined> {
|
|
801
|
-
const { provider, tokenWithInfo } = await this.ensureProviderTokenAndFunction(
|
|
802
|
-
tokenOptInfo,
|
|
803
|
-
'getLinearOrganizationFn',
|
|
804
|
-
);
|
|
805
|
-
const token = tokenWithInfo.accessToken;
|
|
806
|
-
|
|
807
|
-
try {
|
|
808
|
-
const x = await provider.getLinearOrganizationFn?.({ token: token });
|
|
809
|
-
const y = x?.data;
|
|
810
|
-
return y;
|
|
811
|
-
} catch (e) {
|
|
812
|
-
return this.handleProviderError<ProviderLinearOrganization | undefined>(tokenWithInfo, e);
|
|
813
|
-
}
|
|
814
|
-
}
|
|
815
|
-
|
|
816
|
-
async getLinearTeamsForCurrentUser(
|
|
817
|
-
tokenOptInfo: TokenWithInfo<IssuesCloudHostIntegrationId.Linear>,
|
|
818
|
-
): Promise<ProviderLinearTeam[] | undefined> {
|
|
819
|
-
const { provider, tokenWithInfo } = await this.ensureProviderTokenAndFunction(
|
|
820
|
-
tokenOptInfo,
|
|
821
|
-
'getLinearTeamsForCurrentUserFn',
|
|
822
|
-
);
|
|
823
|
-
const token = tokenWithInfo.accessToken;
|
|
824
|
-
|
|
825
|
-
try {
|
|
826
|
-
return (await provider.getLinearTeamsForCurrentUserFn?.({ token: token }))?.data;
|
|
827
|
-
} catch (e) {
|
|
828
|
-
return this.handleProviderError<ProviderLinearTeam[] | undefined>(tokenWithInfo, e);
|
|
829
|
-
}
|
|
830
|
-
}
|
|
831
|
-
|
|
832
|
-
/**
|
|
833
|
-
* Reads issues scoped to Linear teams/projects/labels (Linear's issue-list filter). One page per call —
|
|
834
|
-
* follow `paging.cursor`. Linear's `getIssues` has no author/assignee filter, so per-user scoping is
|
|
835
|
-
* applied client-side by the caller.
|
|
836
|
-
*/
|
|
837
|
-
async getLinearIssues(
|
|
838
|
-
tokenOptInfo: TokenWithInfo<IssuesCloudHostIntegrationId.Linear>,
|
|
839
|
-
input: { teams?: string[]; projects?: string[]; labels?: string[] },
|
|
840
|
-
options?: PagingInput & {
|
|
841
|
-
/** See {@link GetIssuesOptions.sort}. Linear expresses `created`/`updated`, descending only. */
|
|
842
|
-
sort?: IssueSorting;
|
|
843
|
-
},
|
|
844
|
-
): Promise<ProviderApiPagedResult<ProviderIssue>> {
|
|
845
|
-
const { provider, tokenWithInfo } = await this.ensureProviderTokenAndFunction(
|
|
846
|
-
tokenOptInfo,
|
|
847
|
-
'getLinearIssuesFn',
|
|
848
|
-
);
|
|
849
|
-
return this.getPagedResult<ProviderIssue>(
|
|
850
|
-
{ ...input, ...options },
|
|
851
|
-
provider.getLinearIssuesFn,
|
|
852
|
-
tokenWithInfo,
|
|
853
|
-
options?.cursor ?? undefined,
|
|
854
|
-
);
|
|
855
|
-
}
|
|
856
|
-
|
|
857
|
-
/** Resolves Linear's current user (viewer). The viewer query returns only id/name/email/displayName. */
|
|
858
|
-
async getLinearCurrentUser(
|
|
859
|
-
tokenOptInfo: TokenWithInfo<IssuesCloudHostIntegrationId.Linear>,
|
|
860
|
-
): Promise<{ id: string; name?: string | null; email?: string | null; displayName?: string | null } | undefined> {
|
|
861
|
-
const { provider, tokenWithInfo } = await this.ensureProviderTokenAndFunction(
|
|
862
|
-
tokenOptInfo,
|
|
863
|
-
'getLinearCurrentUserFn',
|
|
864
|
-
);
|
|
865
|
-
const token = tokenWithInfo.accessToken;
|
|
866
|
-
|
|
867
|
-
try {
|
|
868
|
-
return (await provider.getLinearCurrentUserFn?.({ token: token }))?.data;
|
|
869
|
-
} catch (e) {
|
|
870
|
-
return this.handleProviderError(tokenWithInfo, e);
|
|
871
|
-
}
|
|
872
|
-
}
|
|
873
|
-
|
|
874
|
-
async getAzureResourcesForUser(
|
|
875
|
-
tokenOptInfo: TokenWithInfo<
|
|
876
|
-
GitCloudHostIntegrationId.AzureDevOps | GitSelfManagedHostIntegrationId.AzureDevOpsServer
|
|
877
|
-
>,
|
|
878
|
-
userId: string,
|
|
879
|
-
options?: { isPAT?: boolean; baseUrl?: string },
|
|
880
|
-
): Promise<ProviderAzureResource[] | undefined> {
|
|
881
|
-
const { provider, tokenWithInfo } = await this.ensureProviderTokenAndFunction(
|
|
882
|
-
tokenOptInfo,
|
|
883
|
-
'getAzureResourcesForUserFn',
|
|
884
|
-
);
|
|
885
|
-
const token = tokenWithInfo.accessToken;
|
|
886
|
-
|
|
887
|
-
try {
|
|
888
|
-
return (
|
|
889
|
-
await provider.getAzureResourcesForUserFn?.(
|
|
890
|
-
{ userId: userId },
|
|
891
|
-
{ token: token, isPAT: options?.isPAT, baseUrl: options?.baseUrl },
|
|
892
|
-
)
|
|
893
|
-
)?.data;
|
|
894
|
-
} catch (e) {
|
|
895
|
-
return this.handleProviderError<ProviderAzureResource[] | undefined>(tokenWithInfo, e);
|
|
896
|
-
}
|
|
897
|
-
}
|
|
898
|
-
|
|
899
|
-
async getBitbucketResourcesForCurrentUser(
|
|
900
|
-
tokenOptInfo: TokenWithInfo<GitCloudHostIntegrationId.Bitbucket>,
|
|
901
|
-
): Promise<ProviderApiPagedResult<ProviderBitbucketResource> | undefined> {
|
|
902
|
-
const { provider, tokenWithInfo } = await this.ensureProviderTokenAndFunction(
|
|
903
|
-
tokenOptInfo,
|
|
904
|
-
'getBitbucketResourcesForCurrentUserFn',
|
|
905
|
-
);
|
|
906
|
-
const token = tokenWithInfo.accessToken;
|
|
907
|
-
|
|
908
|
-
// Drain every workspace page (numbered): the SDK returns 50 per page, and a user in more than one page
|
|
909
|
-
// of workspaces would otherwise silently lose the rest (with them, their orgs/PRs). A scoped drain keeps
|
|
910
|
-
// a successful prefix plus structured failure metadata when a later page fails.
|
|
911
|
-
const result = await collectProviderPagedResult(
|
|
912
|
-
async cursor => {
|
|
913
|
-
try {
|
|
914
|
-
const page = parsePageCursor(cursor);
|
|
915
|
-
const response = await provider.getBitbucketResourcesForCurrentUserFn?.(
|
|
916
|
-
{ page: page },
|
|
917
|
-
{ token: token },
|
|
918
|
-
);
|
|
919
|
-
if (response == null) return undefined;
|
|
920
|
-
|
|
921
|
-
const hasMore = response.pageInfo?.hasNextPage === true;
|
|
922
|
-
const nextPage = response.pageInfo?.nextPage;
|
|
923
|
-
return {
|
|
924
|
-
values: response.data,
|
|
925
|
-
paging: {
|
|
926
|
-
more: hasMore,
|
|
927
|
-
cursor: hasMore && nextPage != null ? toPageCursor(nextPage) : '{}',
|
|
928
|
-
},
|
|
929
|
-
};
|
|
930
|
-
} catch (ex) {
|
|
931
|
-
return this.handleProviderError<ProviderApiPagedResult<ProviderBitbucketResource>>(
|
|
932
|
-
tokenWithInfo,
|
|
933
|
-
ex,
|
|
934
|
-
);
|
|
935
|
-
}
|
|
936
|
-
},
|
|
937
|
-
20,
|
|
938
|
-
{ providerId: tokenWithInfo.providerId },
|
|
939
|
-
);
|
|
940
|
-
return {
|
|
941
|
-
values: result.values,
|
|
942
|
-
paging: { cursor: '{}', more: false, ...(result.truncated ? { truncated: true } : {}) },
|
|
943
|
-
...(result.metadata != null ? { metadata: result.metadata } : {}),
|
|
944
|
-
};
|
|
945
|
-
}
|
|
946
|
-
|
|
947
|
-
async getBitbucketPullRequestsAuthoredByUserForWorkspace(
|
|
948
|
-
tokenOptInfo: TokenWithInfo<GitCloudHostIntegrationId.Bitbucket>,
|
|
949
|
-
userId: string,
|
|
950
|
-
workspaceSlug: string,
|
|
951
|
-
options?: { states?: GitPullRequestState[]; page?: number },
|
|
952
|
-
): Promise<{ data: ProviderPullRequest[]; hasMore: boolean; nextPage: number | null } | undefined> {
|
|
953
|
-
const { provider, tokenWithInfo } = await this.ensureProviderTokenAndFunction(
|
|
954
|
-
tokenOptInfo,
|
|
955
|
-
'getBitbucketPullRequestsAuthoredByUserForWorkspaceFn',
|
|
956
|
-
);
|
|
957
|
-
const token = tokenWithInfo.accessToken;
|
|
958
|
-
|
|
959
|
-
try {
|
|
960
|
-
const result = await provider.getBitbucketPullRequestsAuthoredByUserForWorkspaceFn?.(
|
|
961
|
-
{ userId: userId, workspaceSlug: workspaceSlug, states: options?.states, page: options?.page },
|
|
962
|
-
{ token: token },
|
|
963
|
-
);
|
|
964
|
-
if (result == null) return undefined;
|
|
965
|
-
return { data: result.data, hasMore: result.pageInfo.hasNextPage, nextPage: result.pageInfo.nextPage };
|
|
966
|
-
} catch (e) {
|
|
967
|
-
return this.handleProviderError(tokenWithInfo, e);
|
|
968
|
-
}
|
|
969
|
-
}
|
|
970
|
-
|
|
971
|
-
async getBitbucketServerPullRequestsForCurrentUser(
|
|
972
|
-
tokenOptInfo: TokenWithInfo<GitSelfManagedHostIntegrationId.BitbucketServer>,
|
|
973
|
-
baseUrl: string,
|
|
974
|
-
options?: { states?: GitPullRequestState[]; page?: number },
|
|
975
|
-
): Promise<{ data: ProviderPullRequest[]; hasMore: boolean; nextPage: number | null } | undefined> {
|
|
976
|
-
const { provider, tokenWithInfo } = await this.ensureProviderTokenAndFunction(
|
|
977
|
-
tokenOptInfo,
|
|
978
|
-
'getBitbucketServerPullRequestsForCurrentUserFn',
|
|
979
|
-
);
|
|
980
|
-
const token = tokenWithInfo.accessToken;
|
|
981
|
-
try {
|
|
982
|
-
const result = await provider.getBitbucketServerPullRequestsForCurrentUserFn?.(
|
|
983
|
-
{ states: options?.states, page: options?.page },
|
|
984
|
-
{ token: token, baseUrl: baseUrl },
|
|
985
|
-
);
|
|
986
|
-
if (result == null) return undefined;
|
|
987
|
-
return { data: result.data, hasMore: result.pageInfo.hasNextPage, nextPage: result.pageInfo.nextPage };
|
|
988
|
-
} catch (e) {
|
|
989
|
-
return this.handleProviderError(tokenWithInfo, e);
|
|
990
|
-
}
|
|
991
|
-
}
|
|
992
|
-
|
|
993
|
-
async getJiraProjectsForResources(
|
|
994
|
-
tokenOptInfo: TokenWithInfo<IssuesCloudHostIntegrationId.Jira>,
|
|
995
|
-
resourceIds: string[],
|
|
996
|
-
): Promise<ProviderApiCollectionResult<ProviderJiraProject>> {
|
|
997
|
-
const { provider, tokenWithInfo } = await this.ensureProviderTokenAndFunction(
|
|
998
|
-
tokenOptInfo,
|
|
999
|
-
'getJiraProjectsForResourcesFn',
|
|
1000
|
-
);
|
|
1001
|
-
const token = tokenWithInfo.accessToken;
|
|
1002
|
-
|
|
1003
|
-
try {
|
|
1004
|
-
const result = await provider.getJiraProjectsForResourcesFn?.(
|
|
1005
|
-
{ resourceIds: resourceIds },
|
|
1006
|
-
{ token: token },
|
|
1007
|
-
);
|
|
1008
|
-
// Preserve the SDK's per-resource completeness/failures instead of collapsing to a bare array, so the
|
|
1009
|
-
// Jira integration can cache only proven-successful resources and warn on the failed ones.
|
|
1010
|
-
return { values: result?.data ?? [], metadata: result?.metadata };
|
|
1011
|
-
} catch (e) {
|
|
1012
|
-
return this.handleProviderError<ProviderApiCollectionResult<ProviderJiraProject>>(tokenWithInfo, e);
|
|
1013
|
-
}
|
|
1014
|
-
}
|
|
1015
|
-
|
|
1016
|
-
async getJiraProjectsForResource(
|
|
1017
|
-
tokenOptInfo: TokenWithInfo<IssuesCloudHostIntegrationId.Jira>,
|
|
1018
|
-
resourceId: string,
|
|
1019
|
-
options?: { cursor?: string },
|
|
1020
|
-
): Promise<ProviderApiPagedResult<ProviderJiraProject>> {
|
|
1021
|
-
const { provider, tokenWithInfo } = await this.ensureProviderTokenAndFunction(
|
|
1022
|
-
tokenOptInfo,
|
|
1023
|
-
'getJiraProjectsForResourceFn',
|
|
1024
|
-
);
|
|
1025
|
-
|
|
1026
|
-
return this.getPagedResult(
|
|
1027
|
-
{ resourceId: resourceId },
|
|
1028
|
-
provider.getJiraProjectsForResourceFn,
|
|
1029
|
-
tokenWithInfo,
|
|
1030
|
-
options?.cursor,
|
|
1031
|
-
);
|
|
1032
|
-
}
|
|
1033
|
-
|
|
1034
|
-
async getAzureProjectsForResource(
|
|
1035
|
-
tokenOptInfo: TokenWithInfo<
|
|
1036
|
-
GitCloudHostIntegrationId.AzureDevOps | GitSelfManagedHostIntegrationId.AzureDevOpsServer
|
|
1037
|
-
>,
|
|
1038
|
-
namespace: string,
|
|
1039
|
-
options?: { cursor?: string; isPAT?: boolean; baseUrl?: string },
|
|
1040
|
-
): Promise<PagedResult<ProviderAzureProject>> {
|
|
1041
|
-
const { provider, tokenWithInfo } = await this.ensureProviderTokenAndFunction(
|
|
1042
|
-
tokenOptInfo,
|
|
1043
|
-
'getAzureProjectsForResourceFn',
|
|
1044
|
-
);
|
|
1045
|
-
const token = tokenWithInfo.accessToken;
|
|
1046
|
-
|
|
1047
|
-
// Azure only supports PAT for this call
|
|
1048
|
-
const azureToken = options?.isPAT ? token : this.getAzurePATForOAuthToken(token);
|
|
1049
|
-
|
|
1050
|
-
try {
|
|
1051
|
-
return await this.getPagedResult<ProviderAzureProject>(
|
|
1052
|
-
{ namespace: namespace, ...options },
|
|
1053
|
-
provider.getAzureProjectsForResourceFn,
|
|
1054
|
-
{ ...tokenWithInfo, accessToken: azureToken },
|
|
1055
|
-
options?.cursor,
|
|
1056
|
-
options?.isPAT,
|
|
1057
|
-
options?.baseUrl,
|
|
1058
|
-
);
|
|
1059
|
-
} catch (e) {
|
|
1060
|
-
return this.handleProviderError<PagedResult<ProviderAzureProject>>(tokenWithInfo, e);
|
|
1061
|
-
}
|
|
1062
|
-
}
|
|
1063
|
-
|
|
1064
|
-
async getReposForAzureProject(
|
|
1065
|
-
tokenOptInfo: TokenWithInfo<
|
|
1066
|
-
GitCloudHostIntegrationId.AzureDevOps | GitSelfManagedHostIntegrationId.AzureDevOpsServer
|
|
1067
|
-
>,
|
|
1068
|
-
namespace: string,
|
|
1069
|
-
project: string,
|
|
1070
|
-
options?: GetReposOptions & { isPAT?: boolean; baseUrl?: string },
|
|
1071
|
-
): Promise<PagedResult<ProviderRepository>> {
|
|
1072
|
-
const { provider, tokenWithInfo } = await this.ensureProviderTokenAndFunction(
|
|
1073
|
-
tokenOptInfo,
|
|
1074
|
-
'getReposForAzureProjectFn',
|
|
1075
|
-
);
|
|
1076
|
-
|
|
1077
|
-
return this.getPagedResult<ProviderRepository>(
|
|
1078
|
-
{ namespace: namespace, project: project, ...options },
|
|
1079
|
-
provider.getReposForAzureProjectFn,
|
|
1080
|
-
tokenWithInfo,
|
|
1081
|
-
options?.cursor,
|
|
1082
|
-
options?.isPAT,
|
|
1083
|
-
options?.baseUrl,
|
|
1084
|
-
);
|
|
1085
|
-
}
|
|
1086
|
-
|
|
1087
|
-
async getGitHubOrgsForCurrentUser(
|
|
1088
|
-
tokenOptInfo: TokenWithInfo<
|
|
1089
|
-
GitCloudHostIntegrationId.GitHub | GitSelfManagedHostIntegrationId.CloudGitHubEnterprise
|
|
1090
|
-
>,
|
|
1091
|
-
options?: { isPAT?: boolean; baseUrl?: string },
|
|
1092
|
-
): Promise<ProviderHierarchyResult<ProviderGitHubOrganization>> {
|
|
1093
|
-
const { provider, tokenWithInfo } = await this.ensureProviderTokenAndFunction(
|
|
1094
|
-
tokenOptInfo,
|
|
1095
|
-
'getOrgsForCurrentUserFn',
|
|
1096
|
-
);
|
|
1097
|
-
|
|
1098
|
-
// Drain all pages so a user in many orgs doesn't lose everything past the first page, while
|
|
1099
|
-
// surfacing `truncated` when the defensive backstop stops before the listing is exhausted.
|
|
1100
|
-
const result = await collectProviderPagedResult(
|
|
1101
|
-
cursor =>
|
|
1102
|
-
this.getPagedResult<ProviderGitHubOrganization>(
|
|
1103
|
-
{},
|
|
1104
|
-
provider.getOrgsForCurrentUserFn,
|
|
1105
|
-
tokenWithInfo,
|
|
1106
|
-
cursor,
|
|
1107
|
-
options?.isPAT,
|
|
1108
|
-
options?.baseUrl,
|
|
1109
|
-
),
|
|
1110
|
-
20,
|
|
1111
|
-
{ providerId: tokenWithInfo.providerId },
|
|
1112
|
-
);
|
|
1113
|
-
// This method drains internally and takes no cursor, so a backstop cursor isn't resumable by
|
|
1114
|
-
// callers — keep only the truncation signal rather than exposing a misleading `paging`.
|
|
1115
|
-
return {
|
|
1116
|
-
values: result.values,
|
|
1117
|
-
...(result.truncated ? { truncated: true } : {}),
|
|
1118
|
-
...(result.metadata != null ? { metadata: result.metadata } : {}),
|
|
1119
|
-
};
|
|
1120
|
-
}
|
|
1121
|
-
|
|
1122
|
-
async getReposForOrg(
|
|
1123
|
-
tokenOptInfo: TokenWithInfo<
|
|
1124
|
-
GitCloudHostIntegrationId.GitHub | GitSelfManagedHostIntegrationId.CloudGitHubEnterprise
|
|
1125
|
-
>,
|
|
1126
|
-
orgName: string,
|
|
1127
|
-
options?: GetReposOptions & { isPAT?: boolean; baseUrl?: string },
|
|
1128
|
-
): Promise<PagedResult<ProviderRepository>> {
|
|
1129
|
-
const { provider, tokenWithInfo } = await this.ensureProviderTokenAndFunction(tokenOptInfo, 'getReposForOrgFn');
|
|
1130
|
-
|
|
1131
|
-
return this.getPagedResult<ProviderRepository>(
|
|
1132
|
-
{ orgName: orgName },
|
|
1133
|
-
provider.getReposForOrgFn,
|
|
1134
|
-
tokenWithInfo,
|
|
1135
|
-
options?.cursor,
|
|
1136
|
-
options?.isPAT,
|
|
1137
|
-
options?.baseUrl,
|
|
1138
|
-
);
|
|
1139
|
-
}
|
|
1140
|
-
|
|
1141
|
-
async getReposForBitbucketWorkspace(
|
|
1142
|
-
tokenOptInfo: TokenWithInfo<GitCloudHostIntegrationId.Bitbucket>,
|
|
1143
|
-
workspace: string,
|
|
1144
|
-
options?: GetReposOptions & { isPAT?: boolean; baseUrl?: string },
|
|
1145
|
-
): Promise<PagedResult<ProviderRepository>> {
|
|
1146
|
-
const { provider, tokenWithInfo } = await this.ensureProviderTokenAndFunction(
|
|
1147
|
-
tokenOptInfo,
|
|
1148
|
-
'getReposForWorkspaceFn',
|
|
1149
|
-
);
|
|
1150
|
-
|
|
1151
|
-
return this.getPagedResult<ProviderRepository>(
|
|
1152
|
-
{ workspace: workspace },
|
|
1153
|
-
provider.getReposForWorkspaceFn,
|
|
1154
|
-
tokenWithInfo,
|
|
1155
|
-
options?.cursor,
|
|
1156
|
-
options?.isPAT,
|
|
1157
|
-
options?.baseUrl,
|
|
1158
|
-
);
|
|
1159
|
-
}
|
|
1160
|
-
|
|
1161
|
-
async getReposForCurrentUser(
|
|
1162
|
-
tokenOptInfo: TokenWithInfo<
|
|
1163
|
-
| GitCloudHostIntegrationId.GitHub
|
|
1164
|
-
| GitSelfManagedHostIntegrationId.CloudGitHubEnterprise
|
|
1165
|
-
| GitCloudHostIntegrationId.GitLab
|
|
1166
|
-
| GitSelfManagedHostIntegrationId.CloudGitLabSelfHosted
|
|
1167
|
-
>,
|
|
1168
|
-
options?: GetReposOptions & {
|
|
1169
|
-
/** GitHub `/user/repos` affiliation filter; ignored by GitLab's membership read. */
|
|
1170
|
-
affiliations?: ('owner' | 'collaborator' | 'organization_member')[];
|
|
1171
|
-
isPAT?: boolean;
|
|
1172
|
-
baseUrl?: string;
|
|
1173
|
-
},
|
|
1174
|
-
): Promise<PagedResult<ProviderRepository>> {
|
|
1175
|
-
const { provider, tokenWithInfo } = await this.ensureProviderTokenAndFunction(
|
|
1176
|
-
tokenOptInfo,
|
|
1177
|
-
'getReposForCurrentUserFn',
|
|
1178
|
-
);
|
|
1179
|
-
|
|
1180
|
-
return this.getPagedResult<ProviderRepository>(
|
|
1181
|
-
options?.affiliations != null ? { affiliations: options.affiliations } : {},
|
|
1182
|
-
provider.getReposForCurrentUserFn,
|
|
1183
|
-
tokenWithInfo,
|
|
1184
|
-
options?.cursor,
|
|
1185
|
-
options?.isPAT,
|
|
1186
|
-
options?.baseUrl,
|
|
1187
|
-
);
|
|
1188
|
-
}
|
|
1189
|
-
|
|
1190
|
-
async getGitlabGroupsForCurrentUser(
|
|
1191
|
-
tokenOptInfo: TokenWithInfo<
|
|
1192
|
-
GitCloudHostIntegrationId.GitLab | GitSelfManagedHostIntegrationId.CloudGitLabSelfHosted
|
|
1193
|
-
>,
|
|
1194
|
-
options?: { topLevelOnly?: boolean; isPAT?: boolean; baseUrl?: string },
|
|
1195
|
-
): Promise<ProviderHierarchyResult<ProviderGitLabGroup>> {
|
|
1196
|
-
const { provider, tokenWithInfo } = await this.ensureProviderTokenAndFunction(
|
|
1197
|
-
tokenOptInfo,
|
|
1198
|
-
'getGroupsForCurrentUserFn',
|
|
1199
|
-
);
|
|
1200
|
-
|
|
1201
|
-
// Drain all pages so a user in many groups doesn't lose everything past the first page, while
|
|
1202
|
-
// surfacing `truncated` when the defensive backstop stops before the listing is exhausted.
|
|
1203
|
-
const result = await collectProviderPagedResult(
|
|
1204
|
-
cursor =>
|
|
1205
|
-
this.getPagedResult<ProviderGitLabGroup>(
|
|
1206
|
-
{ topLevelOnly: options?.topLevelOnly },
|
|
1207
|
-
provider.getGroupsForCurrentUserFn,
|
|
1208
|
-
tokenWithInfo,
|
|
1209
|
-
cursor,
|
|
1210
|
-
options?.isPAT,
|
|
1211
|
-
options?.baseUrl,
|
|
1212
|
-
),
|
|
1213
|
-
20,
|
|
1214
|
-
{ providerId: tokenWithInfo.providerId },
|
|
1215
|
-
);
|
|
1216
|
-
// This method drains internally and takes no cursor, so a backstop cursor isn't resumable by
|
|
1217
|
-
// callers — keep only the truncation signal rather than exposing a misleading `paging`.
|
|
1218
|
-
return {
|
|
1219
|
-
values: result.values,
|
|
1220
|
-
...(result.truncated ? { truncated: true } : {}),
|
|
1221
|
-
...(result.metadata != null ? { metadata: result.metadata } : {}),
|
|
1222
|
-
};
|
|
1223
|
-
}
|
|
1224
|
-
|
|
1225
|
-
async getPullRequestsForRepos(
|
|
1226
|
-
tokenOptInfo: TokenOptInfo,
|
|
1227
|
-
reposOrIds: ProviderReposInput,
|
|
1228
|
-
options?: GetPullRequestsOptions & { isPAT?: boolean; baseUrl?: string },
|
|
1229
|
-
): Promise<ProviderApiPagedResult<ProviderPullRequest>> {
|
|
1230
|
-
const { provider, tokenWithInfo } = await this.ensureProviderTokenAndFunction(
|
|
1231
|
-
tokenOptInfo,
|
|
1232
|
-
'getPullRequestsForReposFn',
|
|
1233
|
-
);
|
|
1234
|
-
|
|
1235
|
-
return this.getPagedResult<ProviderPullRequest>(
|
|
1236
|
-
{
|
|
1237
|
-
...(this.isRepoIdsInput(reposOrIds) ? { repoIds: reposOrIds } : { repos: reposOrIds }),
|
|
1238
|
-
...options,
|
|
1239
|
-
},
|
|
1240
|
-
provider.getPullRequestsForReposFn,
|
|
1241
|
-
tokenWithInfo,
|
|
1242
|
-
options?.cursor,
|
|
1243
|
-
options?.isPAT,
|
|
1244
|
-
options?.baseUrl,
|
|
1245
|
-
);
|
|
1246
|
-
}
|
|
1247
|
-
|
|
1248
|
-
async getPullRequestsForRepo(
|
|
1249
|
-
tokenOptInfo: TokenOptInfo,
|
|
1250
|
-
repo: ProviderRepoInput,
|
|
1251
|
-
options?: GetPullRequestsOptions & { isPAT?: boolean; baseUrl?: string },
|
|
1252
|
-
): Promise<ProviderApiPagedResult<ProviderPullRequest>> {
|
|
1253
|
-
const { provider, tokenWithInfo } = await this.ensureProviderTokenAndFunction(
|
|
1254
|
-
tokenOptInfo,
|
|
1255
|
-
'getPullRequestsForRepoFn',
|
|
1256
|
-
);
|
|
1257
|
-
|
|
1258
|
-
return this.getPagedResult<ProviderPullRequest>(
|
|
1259
|
-
{ repo: repo, ...options },
|
|
1260
|
-
provider.getPullRequestsForRepoFn,
|
|
1261
|
-
tokenWithInfo,
|
|
1262
|
-
options?.cursor,
|
|
1263
|
-
options?.isPAT,
|
|
1264
|
-
options?.baseUrl,
|
|
1265
|
-
);
|
|
1266
|
-
}
|
|
1267
|
-
|
|
1268
|
-
async getPullRequestsForUser(
|
|
1269
|
-
tokenWithInfo: TokenWithInfo<GitCloudHostIntegrationId.Bitbucket>,
|
|
1270
|
-
userId: string,
|
|
1271
|
-
options?: { isPAT?: boolean } & GetPullRequestsForUserOptions,
|
|
1272
|
-
): Promise<ProviderApiPagedResult<ProviderPullRequest>>;
|
|
1273
|
-
async getPullRequestsForUser(
|
|
1274
|
-
tokenWithInfo: TokenWithInfo<Exclude<IntegrationIds, GitCloudHostIntegrationId.Bitbucket>>,
|
|
1275
|
-
username: string,
|
|
1276
|
-
options?: { isPAT?: boolean } & GetPullRequestsForUserOptions,
|
|
1277
|
-
): Promise<ProviderApiPagedResult<ProviderPullRequest>>;
|
|
1278
|
-
async getPullRequestsForUser(
|
|
1279
|
-
tokenOptInfo: TokenWithInfo,
|
|
1280
|
-
usernameOrId: string,
|
|
1281
|
-
options?: { isPAT?: boolean } & GetPullRequestsForUserOptions,
|
|
1282
|
-
): Promise<ProviderApiPagedResult<ProviderPullRequest>> {
|
|
1283
|
-
const { provider, tokenWithInfo } = await this.ensureProviderTokenAndFunction(
|
|
1284
|
-
tokenOptInfo,
|
|
1285
|
-
'getPullRequestsForUserFn',
|
|
1286
|
-
);
|
|
1287
|
-
|
|
1288
|
-
return this.getPagedResult<ProviderPullRequest>(
|
|
1289
|
-
{
|
|
1290
|
-
...(tokenWithInfo.providerId === GitCloudHostIntegrationId.Bitbucket
|
|
1291
|
-
? { userId: usernameOrId }
|
|
1292
|
-
: { username: usernameOrId }),
|
|
1293
|
-
...options,
|
|
1294
|
-
},
|
|
1295
|
-
provider.getPullRequestsForUserFn,
|
|
1296
|
-
tokenWithInfo,
|
|
1297
|
-
options?.cursor,
|
|
1298
|
-
options?.isPAT,
|
|
1299
|
-
options?.baseUrl,
|
|
1300
|
-
);
|
|
1301
|
-
}
|
|
1302
|
-
|
|
1303
|
-
async getGitLabPullRequestsForUserAssociation(
|
|
1304
|
-
tokenOptInfo: TokenWithInfo<
|
|
1305
|
-
GitCloudHostIntegrationId.GitLab | GitSelfManagedHostIntegrationId.CloudGitLabSelfHosted
|
|
1306
|
-
>,
|
|
1307
|
-
username: string,
|
|
1308
|
-
association: 'assigned' | 'authored' | 'reviewRequested',
|
|
1309
|
-
options?: {
|
|
1310
|
-
isPAT?: boolean;
|
|
1311
|
-
baseUrl?: string;
|
|
1312
|
-
states?: GitPullRequestState[];
|
|
1313
|
-
cursor?: string;
|
|
1314
|
-
pageSize?: number;
|
|
1315
|
-
},
|
|
1316
|
-
): Promise<ProviderApiPagedResult<ProviderPullRequest>> {
|
|
1317
|
-
const { provider, tokenWithInfo } = await this.ensureProviderTokenAndFunction(
|
|
1318
|
-
tokenOptInfo,
|
|
1319
|
-
'getGitLabPullRequestsForUserAssociationFn',
|
|
1320
|
-
);
|
|
1321
|
-
|
|
1322
|
-
return this.getPagedResult(
|
|
1323
|
-
{
|
|
1324
|
-
username: username,
|
|
1325
|
-
association: association,
|
|
1326
|
-
states: options?.states,
|
|
1327
|
-
pageSize: options?.pageSize,
|
|
1328
|
-
},
|
|
1329
|
-
provider.getGitLabPullRequestsForUserAssociationFn,
|
|
1330
|
-
tokenWithInfo,
|
|
1331
|
-
options?.cursor,
|
|
1332
|
-
options?.isPAT,
|
|
1333
|
-
options?.baseUrl,
|
|
1334
|
-
);
|
|
1335
|
-
}
|
|
1336
|
-
|
|
1337
|
-
async getPullRequestsForAzureProjects(
|
|
1338
|
-
tokenOptInfo: TokenWithInfo<
|
|
1339
|
-
GitCloudHostIntegrationId.AzureDevOps | GitSelfManagedHostIntegrationId.AzureDevOpsServer
|
|
1340
|
-
>,
|
|
1341
|
-
projects: { namespace: string; project: string }[],
|
|
1342
|
-
options?: {
|
|
1343
|
-
authorLogin?: string;
|
|
1344
|
-
assigneeLogins?: string[];
|
|
1345
|
-
reviewerId?: string;
|
|
1346
|
-
states?: GitPullRequestState[];
|
|
1347
|
-
repo?: ProviderRepoInput;
|
|
1348
|
-
isPAT?: boolean;
|
|
1349
|
-
baseUrl?: string;
|
|
1350
|
-
},
|
|
1351
|
-
): Promise<ProviderApiCollectionResult<ProviderPullRequest>> {
|
|
1352
|
-
const { provider, tokenWithInfo } = await this.ensureProviderTokenAndFunction(
|
|
1353
|
-
tokenOptInfo,
|
|
1354
|
-
'getPullRequestsForAzureProjectsFn',
|
|
1355
|
-
);
|
|
1356
|
-
const token = tokenWithInfo.accessToken;
|
|
1357
|
-
|
|
1358
|
-
// Azure only supports PAT for this call
|
|
1359
|
-
const azureToken = options?.isPAT ? token : this.getAzurePATForOAuthToken(token);
|
|
1360
|
-
|
|
1361
|
-
try {
|
|
1362
|
-
const result = await provider.getPullRequestsForAzureProjectsFn?.(
|
|
1363
|
-
{
|
|
1364
|
-
projects: projects,
|
|
1365
|
-
authorLogin: options?.authorLogin,
|
|
1366
|
-
assigneeLogins: options?.assigneeLogins,
|
|
1367
|
-
reviewerId: options?.reviewerId,
|
|
1368
|
-
states: options?.states,
|
|
1369
|
-
repo: options?.repo,
|
|
1370
|
-
},
|
|
1371
|
-
// `azureToken` is always a PAT here (the raw token when `isPAT`, otherwise a PAT derived from
|
|
1372
|
-
// the OAuth token), so it must be sent as a PAT regardless of the incoming `options?.isPAT`.
|
|
1373
|
-
{ token: azureToken, isPAT: true, baseUrl: options?.baseUrl },
|
|
1374
|
-
);
|
|
1375
|
-
// The SDK's multi-project aggregate preserves successful projects and reports failed/incomplete ones
|
|
1376
|
-
// through `metadata` (it has no `pageInfo`); keep it so the account-wide drain can warn on the failed
|
|
1377
|
-
// projects and set `fetchFailed` instead of publishing a partial Azure read as complete.
|
|
1378
|
-
return { values: result?.data ?? [], metadata: result?.metadata };
|
|
1379
|
-
} catch (e) {
|
|
1380
|
-
return this.handleProviderError<ProviderApiCollectionResult<ProviderPullRequest>>(tokenWithInfo, e);
|
|
1381
|
-
}
|
|
1382
|
-
}
|
|
1383
|
-
|
|
1384
|
-
/**
|
|
1385
|
-
* Single Azure project PR read, paginated by number. Unlike {@link getPullRequestsForAzureProjects} (which
|
|
1386
|
-
* aggregates across projects and exposes no paging), this returns one page plus whether more remain, so a
|
|
1387
|
-
* caller can drain a project fully.
|
|
1388
|
-
*/
|
|
1389
|
-
async getPullRequestsForAzureProject(
|
|
1390
|
-
tokenOptInfo: TokenWithInfo<
|
|
1391
|
-
GitCloudHostIntegrationId.AzureDevOps | GitSelfManagedHostIntegrationId.AzureDevOpsServer
|
|
1392
|
-
>,
|
|
1393
|
-
project: { namespace: string; project: string },
|
|
1394
|
-
options?: {
|
|
1395
|
-
authorLogin?: string;
|
|
1396
|
-
assigneeLogins?: string[];
|
|
1397
|
-
reviewerId?: string;
|
|
1398
|
-
states?: GitPullRequestState[];
|
|
1399
|
-
repo?: ProviderRepoInput;
|
|
1400
|
-
page?: number;
|
|
1401
|
-
isPAT?: boolean;
|
|
1402
|
-
baseUrl?: string;
|
|
1403
|
-
},
|
|
1404
|
-
): Promise<{ data: ProviderPullRequest[]; hasMore: boolean; nextPage: number | null } | undefined> {
|
|
1405
|
-
const { provider, tokenWithInfo } = await this.ensureProviderTokenAndFunction(
|
|
1406
|
-
tokenOptInfo,
|
|
1407
|
-
'getPullRequestsForAzureProjectFn',
|
|
1408
|
-
);
|
|
1409
|
-
const token = tokenWithInfo.accessToken;
|
|
1410
|
-
// Azure only supports PAT for this call
|
|
1411
|
-
const azureToken = options?.isPAT ? token : this.getAzurePATForOAuthToken(token);
|
|
1412
|
-
|
|
1413
|
-
try {
|
|
1414
|
-
const result = await provider.getPullRequestsForAzureProjectFn?.(
|
|
1415
|
-
{
|
|
1416
|
-
namespace: project.namespace,
|
|
1417
|
-
project: project.project,
|
|
1418
|
-
authorLogin: options?.authorLogin,
|
|
1419
|
-
assigneeLogins: options?.assigneeLogins,
|
|
1420
|
-
reviewerId: options?.reviewerId,
|
|
1421
|
-
states: options?.states,
|
|
1422
|
-
repo: options?.repo,
|
|
1423
|
-
page: options?.page,
|
|
1424
|
-
},
|
|
1425
|
-
// `azureToken` is always a PAT here (already PAT-formatted when `isPAT`, otherwise derived from
|
|
1426
|
-
// the OAuth token), so it must be sent as a PAT regardless of the incoming `options?.isPAT`.
|
|
1427
|
-
{ token: azureToken, isPAT: true, baseUrl: options?.baseUrl },
|
|
1428
|
-
);
|
|
1429
|
-
if (result == null) return undefined;
|
|
1430
|
-
return { data: result.data, hasMore: result.pageInfo.hasNextPage, nextPage: result.pageInfo.nextPage };
|
|
1431
|
-
} catch (e) {
|
|
1432
|
-
return this.handleProviderError(tokenWithInfo, e);
|
|
1433
|
-
}
|
|
1434
|
-
}
|
|
1435
|
-
|
|
1436
|
-
async mergePullRequest(
|
|
1437
|
-
tokenOptInfo: TokenWithInfo,
|
|
1438
|
-
pr: PullRequest,
|
|
1439
|
-
options?: {
|
|
1440
|
-
mergeMethod?: PullRequestMergeMethod;
|
|
1441
|
-
isPAT?: boolean;
|
|
1442
|
-
baseUrl?: string;
|
|
1443
|
-
},
|
|
1444
|
-
): Promise<boolean> {
|
|
1445
|
-
const { provider, tokenWithInfo } = await this.ensureProviderTokenAndFunction(
|
|
1446
|
-
tokenOptInfo,
|
|
1447
|
-
'mergePullRequestFn',
|
|
1448
|
-
);
|
|
1449
|
-
const token = tokenWithInfo.accessToken;
|
|
1450
|
-
const headRef = pr.refs?.head;
|
|
1451
|
-
if (headRef == null) return false;
|
|
1452
|
-
|
|
1453
|
-
if (provider.id === GitCloudHostIntegrationId.AzureDevOps && pr.project == null) {
|
|
1454
|
-
return false;
|
|
1455
|
-
}
|
|
1456
|
-
|
|
1457
|
-
try {
|
|
1458
|
-
await provider.mergePullRequestFn?.(
|
|
1459
|
-
{
|
|
1460
|
-
pullRequest: {
|
|
1461
|
-
headRef: { oid: headRef.sha },
|
|
1462
|
-
id: pr.id,
|
|
1463
|
-
number: Number.parseInt(pr.id, 10),
|
|
1464
|
-
repository: {
|
|
1465
|
-
id: pr.repository.repo,
|
|
1466
|
-
name: pr.repository.repo,
|
|
1467
|
-
project: pr.project?.name ?? '',
|
|
1468
|
-
owner: {
|
|
1469
|
-
login: pr.repository.owner,
|
|
1470
|
-
},
|
|
1471
|
-
},
|
|
1472
|
-
version: pr.version,
|
|
1473
|
-
},
|
|
1474
|
-
...options,
|
|
1475
|
-
},
|
|
1476
|
-
{ token: token, isPAT: options?.isPAT, baseUrl: options?.baseUrl },
|
|
1477
|
-
);
|
|
1478
|
-
return true;
|
|
1479
|
-
} catch (e) {
|
|
1480
|
-
return this.handleProviderError<boolean>(tokenWithInfo, e);
|
|
1481
|
-
}
|
|
1482
|
-
}
|
|
1483
|
-
|
|
1484
|
-
async getIssuesForRepos(
|
|
1485
|
-
tokenOptInfo: TokenOptInfo,
|
|
1486
|
-
reposOrIds: ProviderReposInput,
|
|
1487
|
-
options?: GetIssuesOptions & { isPAT?: boolean; baseUrl?: string },
|
|
1488
|
-
): Promise<ProviderApiPagedResult<ProviderIssue>> {
|
|
1489
|
-
const { provider, tokenWithInfo } = await this.ensureProviderTokenAndFunction(
|
|
1490
|
-
tokenOptInfo,
|
|
1491
|
-
'getIssuesForReposFn',
|
|
1492
|
-
);
|
|
1493
|
-
|
|
1494
|
-
return this.getPagedResult<ProviderIssue>(
|
|
1495
|
-
{
|
|
1496
|
-
...(this.isRepoIdsInput(reposOrIds) ? { repoIds: reposOrIds } : { repos: reposOrIds }),
|
|
1497
|
-
...options,
|
|
1498
|
-
},
|
|
1499
|
-
provider.getIssuesForReposFn,
|
|
1500
|
-
tokenWithInfo,
|
|
1501
|
-
options?.cursor,
|
|
1502
|
-
options?.isPAT,
|
|
1503
|
-
options?.baseUrl,
|
|
1504
|
-
);
|
|
1505
|
-
}
|
|
1506
|
-
|
|
1507
|
-
async getIssuesForRepo(
|
|
1508
|
-
tokenOptInfo: TokenOptInfo,
|
|
1509
|
-
repo: ProviderRepoInput,
|
|
1510
|
-
options?: GetIssuesOptions & { isPAT?: boolean; baseUrl?: string },
|
|
1511
|
-
): Promise<PagedResult<ProviderIssue>> {
|
|
1512
|
-
const { provider, tokenWithInfo } = await this.ensureProviderTokenAndFunction(
|
|
1513
|
-
tokenOptInfo,
|
|
1514
|
-
'getIssuesForRepoFn',
|
|
1515
|
-
);
|
|
1516
|
-
|
|
1517
|
-
return this.getPagedResult<ProviderIssue>(
|
|
1518
|
-
{ repo: repo, ...options },
|
|
1519
|
-
provider.getIssuesForRepoFn,
|
|
1520
|
-
tokenWithInfo,
|
|
1521
|
-
options?.cursor,
|
|
1522
|
-
options?.isPAT,
|
|
1523
|
-
options?.baseUrl,
|
|
1524
|
-
);
|
|
1525
|
-
}
|
|
1526
|
-
|
|
1527
|
-
async getIssuesForCurrentUser(
|
|
1528
|
-
tokenOptInfo: TokenWithInfo,
|
|
1529
|
-
options?: PagingInput & {
|
|
1530
|
-
// Forwarded to the provider fn (GitLab's account-wide REST read); Linear ignores them.
|
|
1531
|
-
scope?: 'assigned_to_me' | 'all';
|
|
1532
|
-
assigneeUsername?: string;
|
|
1533
|
-
/**
|
|
1534
|
-
* Narrows to issues authored by this user. Honored as of `@gitkraken/provider-apis` 0.54.0
|
|
1535
|
-
* (`author_username`); it composes with `assigneeUsername` as AND, so a caller wanting the UNION of the
|
|
1536
|
-
* two relationships must read each separately (see GitLab's account-wide issue read).
|
|
1537
|
-
*/
|
|
1538
|
-
authorUsername?: string;
|
|
1539
|
-
pageSize?: number;
|
|
1540
|
-
/** See {@link GetIssuesOptions.sort}. Forwarded to the provider fn; ordering is translated in the SDK. */
|
|
1541
|
-
sort?: IssueSorting;
|
|
1542
|
-
isPAT?: boolean;
|
|
1543
|
-
baseUrl?: string;
|
|
1544
|
-
},
|
|
1545
|
-
): Promise<PagedResult<ProviderIssue>> {
|
|
1546
|
-
const { provider, tokenWithInfo } = await this.ensureProviderTokenAndFunction(
|
|
1547
|
-
tokenOptInfo,
|
|
1548
|
-
'getIssuesForCurrentUserFn',
|
|
1549
|
-
);
|
|
1550
|
-
return this.getPagedResult<ProviderIssue>(
|
|
1551
|
-
{
|
|
1552
|
-
scope: options?.scope,
|
|
1553
|
-
assigneeUsername: options?.assigneeUsername,
|
|
1554
|
-
authorUsername: options?.authorUsername,
|
|
1555
|
-
page: options?.page,
|
|
1556
|
-
pageSize: options?.pageSize,
|
|
1557
|
-
sort: options?.sort,
|
|
1558
|
-
},
|
|
1559
|
-
provider.getIssuesForCurrentUserFn,
|
|
1560
|
-
tokenWithInfo,
|
|
1561
|
-
options?.cursor ?? undefined,
|
|
1562
|
-
options?.isPAT,
|
|
1563
|
-
options?.baseUrl,
|
|
1564
|
-
);
|
|
1565
|
-
}
|
|
1566
|
-
|
|
1567
|
-
async getIssuesForAzureProject(
|
|
1568
|
-
tokenOptInfo: TokenOptInfo<
|
|
1569
|
-
GitCloudHostIntegrationId.AzureDevOps | GitSelfManagedHostIntegrationId.AzureDevOpsServer
|
|
1570
|
-
>,
|
|
1571
|
-
namespace: string,
|
|
1572
|
-
project: string,
|
|
1573
|
-
options?: GetIssuesOptions & { isPAT?: boolean; baseUrl?: string },
|
|
1574
|
-
): Promise<PagedResult<ProviderIssue>> {
|
|
1575
|
-
const { provider, tokenWithInfo } = await this.ensureProviderTokenAndFunction(
|
|
1576
|
-
tokenOptInfo,
|
|
1577
|
-
'getIssuesForAzureProjectFn',
|
|
1578
|
-
);
|
|
1579
|
-
|
|
1580
|
-
return this.getPagedResult<ProviderIssue>(
|
|
1581
|
-
{ namespace: namespace, project: project, ...options },
|
|
1582
|
-
provider.getIssuesForAzureProjectFn,
|
|
1583
|
-
tokenWithInfo,
|
|
1584
|
-
options?.cursor,
|
|
1585
|
-
options?.isPAT,
|
|
1586
|
-
options?.baseUrl,
|
|
1587
|
-
);
|
|
1588
|
-
}
|
|
1589
|
-
|
|
1590
|
-
async getIssuesForProject(
|
|
1591
|
-
tokenOptInfo: TokenWithInfo,
|
|
1592
|
-
project: string,
|
|
1593
|
-
resourceId: string,
|
|
1594
|
-
options?: GetIssuesOptions,
|
|
1595
|
-
): Promise<ProviderIssue[] | undefined> {
|
|
1596
|
-
const { provider, tokenWithInfo } = await this.ensureProviderTokenAndFunction(
|
|
1597
|
-
tokenOptInfo,
|
|
1598
|
-
'getIssuesForProjectFn',
|
|
1599
|
-
);
|
|
1600
|
-
const token = tokenWithInfo.accessToken;
|
|
1601
|
-
|
|
1602
|
-
try {
|
|
1603
|
-
const result = await provider.getIssuesForProjectFn?.(
|
|
1604
|
-
{
|
|
1605
|
-
projectKey: project,
|
|
1606
|
-
resourceId: resourceId,
|
|
1607
|
-
...options,
|
|
1608
|
-
includeTransitions: jiraListIncludeTransitions,
|
|
1609
|
-
},
|
|
1610
|
-
{ token: token },
|
|
1611
|
-
);
|
|
1612
|
-
|
|
1613
|
-
return result?.data;
|
|
1614
|
-
} catch (e) {
|
|
1615
|
-
return this.handleProviderError<ProviderIssue[] | undefined>(tokenWithInfo, e);
|
|
1616
|
-
}
|
|
1617
|
-
}
|
|
1618
|
-
|
|
1619
|
-
/**
|
|
1620
|
-
* Single page of {@link getIssuesForProject} that preserves the SDK's `pageInfo` so a caller can drain
|
|
1621
|
-
* every page (the plain {@link getIssuesForProject} discards it, silently capping at the first page).
|
|
1622
|
-
* `nextCursor` is the raw provider cursor (Jira offset / nextPageToken) fed back verbatim as `options.cursor`.
|
|
1623
|
-
*/
|
|
1624
|
-
async getIssuesForProjectPaged(
|
|
1625
|
-
tokenOptInfo: TokenWithInfo,
|
|
1626
|
-
project: string,
|
|
1627
|
-
resourceId: string,
|
|
1628
|
-
options?: GetIssuesOptions,
|
|
1629
|
-
): Promise<{ data: ProviderIssue[]; hasMore: boolean; nextCursor: string | undefined } | undefined> {
|
|
1630
|
-
const { provider, tokenWithInfo } = await this.ensureProviderTokenAndFunction(
|
|
1631
|
-
tokenOptInfo,
|
|
1632
|
-
'getIssuesForProjectFn',
|
|
1633
|
-
);
|
|
1634
|
-
const token = tokenWithInfo.accessToken;
|
|
1635
|
-
|
|
1636
|
-
try {
|
|
1637
|
-
const result = await provider.getIssuesForProjectFn?.(
|
|
1638
|
-
{
|
|
1639
|
-
projectKey: project,
|
|
1640
|
-
resourceId: resourceId,
|
|
1641
|
-
...options,
|
|
1642
|
-
includeTransitions: jiraListIncludeTransitions,
|
|
1643
|
-
},
|
|
1644
|
-
{ token: token },
|
|
1645
|
-
);
|
|
1646
|
-
if (result == null) return undefined;
|
|
1647
|
-
return {
|
|
1648
|
-
data: result.data,
|
|
1649
|
-
hasMore: result.pageInfo?.hasNextPage ?? false,
|
|
1650
|
-
nextCursor: result.pageInfo?.endCursor ?? undefined,
|
|
1651
|
-
};
|
|
1652
|
-
} catch (e) {
|
|
1653
|
-
return this.handleProviderError(tokenWithInfo, e);
|
|
1654
|
-
}
|
|
1655
|
-
}
|
|
1656
|
-
|
|
1657
|
-
async getTrelloCard(
|
|
1658
|
-
tokenOptInfo: TokenWithInfo<IssuesCloudHostIntegrationId.Trello>,
|
|
1659
|
-
appKey: string,
|
|
1660
|
-
cardId: string,
|
|
1661
|
-
options?: { trelloBoardListsById?: Record<string, { name: string }> },
|
|
1662
|
-
): Promise<ProviderIssue | undefined> {
|
|
1663
|
-
const { tokenWithInfo } = await this.ensureProviderToken(tokenOptInfo);
|
|
1664
|
-
|
|
1665
|
-
try {
|
|
1666
|
-
const result = await this.request<TrelloCardResponse>({
|
|
1667
|
-
url: `${trelloBaseUrl}/1/cards/${encodeURIComponent(cardId)}?members=true`,
|
|
1668
|
-
headers: getTrelloAuthHeaders(appKey, tokenWithInfo.accessToken),
|
|
1669
|
-
});
|
|
1670
|
-
|
|
1671
|
-
return fromTrelloCard(result.body, options?.trelloBoardListsById ?? {});
|
|
1672
|
-
} catch (e) {
|
|
1673
|
-
try {
|
|
1674
|
-
return this.handleProviderError<ProviderIssue | undefined>(tokenWithInfo, e);
|
|
1675
|
-
} catch (ex) {
|
|
1676
|
-
if (RequestNotFoundError.is(ex)) return undefined;
|
|
1677
|
-
throw ex;
|
|
1678
|
-
}
|
|
1679
|
-
}
|
|
1680
|
-
}
|
|
1681
|
-
|
|
1682
|
-
// Trello reads. The Trello client is keyed by an `appKey` (the Trello app key from the cloud token exchange)
|
|
1683
|
-
// paired with the OAuth token, so each wrapper threads `appKey` through alongside `tokenWithInfo`.
|
|
1684
|
-
async getTrelloCurrentUser(
|
|
1685
|
-
tokenOptInfo: TokenWithInfo,
|
|
1686
|
-
appKey: string,
|
|
1687
|
-
): Promise<
|
|
1688
|
-
{ id: string; name: string; email: string; username: string; url: string; avatarUrl: string | null } | undefined
|
|
1689
|
-
> {
|
|
1690
|
-
const { provider, tokenWithInfo } = await this.ensureProviderTokenAndFunction(
|
|
1691
|
-
tokenOptInfo,
|
|
1692
|
-
'getTrelloCurrentUserFn',
|
|
1693
|
-
);
|
|
1694
|
-
try {
|
|
1695
|
-
const result = await provider.getTrelloCurrentUserFn?.(
|
|
1696
|
-
{ appKey: appKey },
|
|
1697
|
-
{ token: tokenWithInfo.accessToken },
|
|
1698
|
-
);
|
|
1699
|
-
return result?.data;
|
|
1700
|
-
} catch (e) {
|
|
1701
|
-
return this.handleProviderError(tokenWithInfo, e);
|
|
1702
|
-
}
|
|
1703
|
-
}
|
|
1704
|
-
|
|
1705
|
-
async getTrelloBoardsForCurrentUser(
|
|
1706
|
-
tokenOptInfo: TokenWithInfo,
|
|
1707
|
-
appKey: string,
|
|
1708
|
-
): Promise<TrelloBoard[] | undefined> {
|
|
1709
|
-
const { provider, tokenWithInfo } = await this.ensureProviderTokenAndFunction(
|
|
1710
|
-
tokenOptInfo,
|
|
1711
|
-
'getTrelloBoardsForCurrentUserFn',
|
|
1712
|
-
);
|
|
1713
|
-
try {
|
|
1714
|
-
const result = await provider.getTrelloBoardsForCurrentUserFn?.(
|
|
1715
|
-
{ appKey: appKey },
|
|
1716
|
-
{ token: tokenWithInfo.accessToken },
|
|
1717
|
-
);
|
|
1718
|
-
return result?.data;
|
|
1719
|
-
} catch (e) {
|
|
1720
|
-
return this.handleProviderError(tokenWithInfo, e);
|
|
1721
|
-
}
|
|
1722
|
-
}
|
|
1723
|
-
|
|
1724
|
-
async getTrelloListsForBoard(
|
|
1725
|
-
tokenOptInfo: TokenWithInfo,
|
|
1726
|
-
appKey: string,
|
|
1727
|
-
boardId: string,
|
|
1728
|
-
): Promise<TrelloList[] | undefined> {
|
|
1729
|
-
const { provider, tokenWithInfo } = await this.ensureProviderTokenAndFunction(
|
|
1730
|
-
tokenOptInfo,
|
|
1731
|
-
'getTrelloListsForBoardFn',
|
|
1732
|
-
);
|
|
1733
|
-
try {
|
|
1734
|
-
const result = await provider.getTrelloListsForBoardFn?.(
|
|
1735
|
-
{ appKey: appKey, boardId: boardId },
|
|
1736
|
-
{ token: tokenWithInfo.accessToken },
|
|
1737
|
-
);
|
|
1738
|
-
return result?.data;
|
|
1739
|
-
} catch (e) {
|
|
1740
|
-
return this.handleProviderError(tokenWithInfo, e);
|
|
1741
|
-
}
|
|
1742
|
-
}
|
|
1743
|
-
|
|
1744
|
-
async getTrelloIssuesForBoard(
|
|
1745
|
-
tokenOptInfo: TokenWithInfo,
|
|
1746
|
-
appKey: string,
|
|
1747
|
-
boardId: string,
|
|
1748
|
-
options?: {
|
|
1749
|
-
assigneeLogins?: string[];
|
|
1750
|
-
trelloBoardListsById?: Record<string, { name: string }>;
|
|
1751
|
-
/** See {@link GetIssuesOptions.sort}. Trello expresses only `updated`, in either direction. */
|
|
1752
|
-
sort?: IssueSorting;
|
|
1753
|
-
},
|
|
1754
|
-
): Promise<ProviderApiCollectionResult<ProviderIssue>> {
|
|
1755
|
-
const { provider, tokenWithInfo } = await this.ensureProviderTokenAndFunction(
|
|
1756
|
-
tokenOptInfo,
|
|
1757
|
-
'getTrelloIssuesForBoardFn',
|
|
1758
|
-
);
|
|
1759
|
-
try {
|
|
1760
|
-
const result = await provider.getTrelloIssuesForBoardFn?.(
|
|
1761
|
-
{ appKey: appKey, boardId: boardId, ...options },
|
|
1762
|
-
{ token: tokenWithInfo.accessToken },
|
|
1763
|
-
);
|
|
1764
|
-
// Trello's search caps results and reports the cap through `metadata.completeness` (never a cursor).
|
|
1765
|
-
// Preserve it so the integration can signal a terminal truncation rather than a fake next page.
|
|
1766
|
-
return { values: result?.data ?? [], metadata: result?.metadata };
|
|
1767
|
-
} catch (e) {
|
|
1768
|
-
return this.handleProviderError<ProviderApiCollectionResult<ProviderIssue>>(tokenWithInfo, e);
|
|
1769
|
-
}
|
|
1770
|
-
}
|
|
1771
|
-
|
|
1772
|
-
async getIssuesForResourceForCurrentUser(
|
|
1773
|
-
tokenOptInfo: TokenWithInfo,
|
|
1774
|
-
resourceId: string,
|
|
1775
|
-
options?: {
|
|
1776
|
-
cursor?: string;
|
|
1777
|
-
/**
|
|
1778
|
-
* See {@link GetIssuesOptions.sort}. Forwarded for the same reason as every sibling issue read, even
|
|
1779
|
-
* though nothing reaches this one with a sort today: `IssuesIntegration.searchProviderMyIssues` is the
|
|
1780
|
-
* only caller and takes no options. A wrapper that accepted the SDK's input and silently dropped one
|
|
1781
|
-
* field of it would give whoever adds that option no ordering and no error.
|
|
1782
|
-
*/
|
|
1783
|
-
sort?: IssueSorting;
|
|
1784
|
-
isPAT?: boolean;
|
|
1785
|
-
baseUrl?: string;
|
|
1786
|
-
},
|
|
1787
|
-
): Promise<PagedResult<ProviderIssue>> {
|
|
1788
|
-
const { provider, tokenWithInfo } = await this.ensureProviderTokenAndFunction(
|
|
1789
|
-
tokenOptInfo,
|
|
1790
|
-
'getIssuesForResourceForCurrentUserFn',
|
|
1791
|
-
);
|
|
1792
|
-
|
|
1793
|
-
return this.getPagedResult<ProviderIssue>(
|
|
1794
|
-
{ resourceId: resourceId, sort: options?.sort, includeTransitions: jiraListIncludeTransitions },
|
|
1795
|
-
provider.getIssuesForResourceForCurrentUserFn,
|
|
1796
|
-
tokenWithInfo,
|
|
1797
|
-
options?.cursor,
|
|
1798
|
-
options?.isPAT,
|
|
1799
|
-
options?.baseUrl,
|
|
1800
|
-
);
|
|
1801
|
-
}
|
|
1802
|
-
|
|
1803
|
-
async getJiraIssueByKey(
|
|
1804
|
-
tokenOptInfo: TokenWithInfo<IssuesCloudHostIntegrationId.Jira>,
|
|
1805
|
-
resourceId: string,
|
|
1806
|
-
resourceUrl: string,
|
|
1807
|
-
key: string,
|
|
1808
|
-
): Promise<ProviderIssue | undefined> {
|
|
1809
|
-
const { tokenWithInfo } = await this.ensureProviderToken(tokenOptInfo);
|
|
1810
|
-
|
|
1811
|
-
try {
|
|
1812
|
-
return await requestJiraIssueByKey(this.request, tokenWithInfo.accessToken, resourceId, resourceUrl, key);
|
|
1813
|
-
} catch (e) {
|
|
1814
|
-
const status = (e as { response?: { status?: unknown } }).response?.status;
|
|
1815
|
-
if (status === 404) return undefined;
|
|
1816
|
-
|
|
1817
|
-
return this.handleProviderError<ProviderIssue | undefined>(tokenWithInfo, e);
|
|
1818
|
-
}
|
|
1819
|
-
}
|
|
1820
|
-
|
|
1821
|
-
async getIssue(
|
|
1822
|
-
tokenOptInfo: TokenWithInfo,
|
|
1823
|
-
input: { resourceId: string; number: string } | { namespace: string; name: string; number: string },
|
|
1824
|
-
options?: { isPAT?: boolean; baseUrl?: string },
|
|
1825
|
-
): Promise<ProviderIssue | undefined> {
|
|
1826
|
-
const { provider, tokenWithInfo } = await this.ensureProviderTokenAndFunction(tokenOptInfo, 'getIssueFn');
|
|
1827
|
-
const token = tokenWithInfo.accessToken;
|
|
1828
|
-
|
|
1829
|
-
try {
|
|
1830
|
-
const result = await provider.getIssueFn?.(input, {
|
|
1831
|
-
token: token,
|
|
1832
|
-
isPAT: options?.isPAT,
|
|
1833
|
-
baseUrl: options?.baseUrl,
|
|
1834
|
-
});
|
|
1835
|
-
|
|
1836
|
-
return result?.data;
|
|
1837
|
-
} catch (e) {
|
|
1838
|
-
if (isProviderIssueNotFoundError(tokenWithInfo.providerId, e)) return undefined;
|
|
1839
|
-
|
|
1840
|
-
return this.handleProviderError<ProviderIssue | undefined>(tokenWithInfo, e);
|
|
1841
|
-
}
|
|
1842
|
-
}
|
|
1843
|
-
}
|
|
1844
|
-
|
|
1845
|
-
// This is copied over from the shared provider library because the current version is not respecting the "forceIsFetch: true"
|
|
1846
|
-
// option in the config and our custom fetch function isn't being wrapped by the necessary fetch wrapper. Remove this once the library
|
|
1847
|
-
// properly wraps our custom fetch and use `forceIsFetch: true` in the config.
|
|
1848
|
-
async function parseFetchResponseForApi<T>(response: Response): Promise<ProviderRequestResponse<T>> {
|
|
1849
|
-
const contentType = response.headers.get('content-type') || '';
|
|
1850
|
-
let body;
|
|
1851
|
-
|
|
1852
|
-
// parse the response body
|
|
1853
|
-
if (contentType.startsWith('application/json')) {
|
|
1854
|
-
const text = await response.text();
|
|
1855
|
-
body = text.trim().length > 0 ? JSON.parse(text) : null;
|
|
1856
|
-
} else if (contentType.startsWith('text/') || contentType === '') {
|
|
1857
|
-
body = await response.text();
|
|
1858
|
-
} else if (contentType.startsWith('application/vnd.github.raw+json')) {
|
|
1859
|
-
body = await response.arrayBuffer();
|
|
1860
|
-
} else {
|
|
1861
|
-
throw new Error(`Unsupported content-type: ${contentType}`);
|
|
1862
|
-
}
|
|
1863
|
-
|
|
1864
|
-
const result = {
|
|
1865
|
-
body: body,
|
|
1866
|
-
headers: Object.fromEntries(response.headers.entries()),
|
|
1867
|
-
status: response.status,
|
|
1868
|
-
statusText: response.statusText,
|
|
1869
|
-
};
|
|
1870
|
-
|
|
1871
|
-
// throw an error if the response is not ok
|
|
1872
|
-
if (!response.ok) {
|
|
1873
|
-
const status = `(${response.status})${response.statusText ? ` ${response.statusText}` : ''}.`;
|
|
1874
|
-
const detail = getProviderResponseBodyMessage(body);
|
|
1875
|
-
const error = new Error(detail != null ? `${status} ${detail}` : status);
|
|
1876
|
-
Object.assign(error, { response: result });
|
|
1877
|
-
throw error;
|
|
1878
|
-
}
|
|
1879
|
-
|
|
1880
|
-
return result;
|
|
1881
|
-
}
|