@gitkraken/core-gitlens 0.23.0 → 0.25.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 +34 -1
- package/README.md +23 -15
- package/dist/git/errors.d.ts +6 -5
- package/dist/git/errors.js +7 -6
- package/dist/git/errors.js.map +1 -1
- package/dist/git/features.d.ts +1 -1
- package/dist/git/features.js +1 -1
- package/dist/git/features.js.map +1 -1
- package/dist/git/models/remoteProvider.d.ts +4 -1
- package/dist/git/models/remoteProvider.js.map +1 -1
- package/dist/git/providers/provider.d.ts +4 -2
- package/dist/git/utils/branch.utils.d.ts +4 -1
- package/dist/git/utils/branch.utils.js +5 -2
- package/dist/git/utils/branch.utils.js.map +1 -1
- package/dist/git/utils/mergeConflicts.utils.js +2 -2
- package/dist/git/utils/mergeConflicts.utils.js.map +1 -1
- package/dist/git-cli/cliGitProvider.d.ts +14 -3
- package/dist/git-cli/cliGitProvider.js +71 -34
- package/dist/git-cli/cliGitProvider.js.map +1 -1
- package/dist/git-cli/exec/git.d.ts +7 -1
- package/dist/git-cli/exec/git.js +19 -4
- package/dist/git-cli/exec/git.js.map +1 -1
- package/dist/git-cli/providers/branchRemote.js +2 -5
- package/dist/git-cli/providers/branchRemote.js.map +1 -1
- package/dist/git-cli/providers/branches.js +4 -4
- package/dist/git-cli/providers/branches.js.map +1 -1
- package/dist/git-cli/providers/config.js +6 -3
- package/dist/git-cli/providers/config.js.map +1 -1
- package/dist/git-cli/providers/pausedOperations.js +2 -2
- package/dist/git-cli/providers/pausedOperations.js.map +1 -1
- package/dist/git-cli/providers/staging.js +1 -1
- package/dist/ipc/discovery.js +1 -1
- package/dist/plus/agents/providers/claudeCodeTranscript.js +6 -6
- package/dist/plus/agents/providers/claudeCodeTranscript.js.map +1 -1
- package/dist/plus/ai/errors.d.ts +4 -1
- package/dist/plus/ai/errors.js +4 -0
- package/dist/plus/ai/errors.js.map +1 -1
- package/dist/plus/ai/providers/mistralProvider.js +1 -1
- package/dist/plus/ai/providers/mistralProvider.js.map +1 -1
- package/dist/plus/ai/providers/openAICompatibleProviderBase.js +2 -1
- package/dist/plus/ai/providers/openAICompatibleProviderBase.js.map +1 -1
- package/dist/plus/git-github/api/github.js +12 -13
- package/dist/plus/git-github/api/github.js.map +1 -1
- package/dist/plus/git-github/api/token.d.ts +2 -0
- package/dist/plus/integrations/authentication/cloudIntegrationService.d.ts +1 -1
- package/dist/plus/integrations/authentication/cloudIntegrationService.js +6 -1
- package/dist/plus/integrations/authentication/cloudIntegrationService.js.map +1 -1
- package/dist/plus/integrations/authentication/configuredIntegrationService.js +2 -2
- package/dist/plus/integrations/authentication/integrationAuthenticationProvider.js +18 -5
- package/dist/plus/integrations/authentication/integrationAuthenticationProvider.js.map +1 -1
- package/dist/plus/integrations/authentication/integrationAuthenticationService.d.ts +3 -1
- package/dist/plus/integrations/authentication/integrationAuthenticationService.js +4 -0
- package/dist/plus/integrations/authentication/integrationAuthenticationService.js.map +1 -1
- package/dist/plus/integrations/authentication/models.d.ts +2 -0
- package/dist/plus/integrations/authentication/models.js +2 -1
- package/dist/plus/integrations/authentication/models.js.map +1 -1
- package/dist/plus/integrations/authentication/observedAuthenticationProvider.js +1 -1
- package/dist/plus/integrations/authentication/rejectedTokenTracker.d.ts +5 -4
- package/dist/plus/integrations/authentication/rejectedTokenTracker.js +5 -4
- package/dist/plus/integrations/authentication/rejectedTokenTracker.js.map +1 -1
- package/dist/plus/integrations/index.d.ts +2 -2
- package/dist/plus/integrations/index.js +1 -1
- package/dist/plus/integrations/index.js.map +1 -1
- package/dist/plus/integrations/integrationService.d.ts +6 -0
- package/dist/plus/integrations/integrationService.js +3 -3
- package/dist/plus/integrations/integrationService.js.map +1 -1
- package/dist/plus/integrations/lite.js +1 -1
- package/dist/plus/integrations/manager.d.ts +51 -3
- package/dist/plus/integrations/models/gitHostIntegration.d.ts +14 -0
- package/dist/plus/integrations/models/gitHostIntegration.js +50 -41
- package/dist/plus/integrations/models/gitHostIntegration.js.map +1 -1
- package/dist/plus/integrations/models/integration.d.ts +27 -5
- package/dist/plus/integrations/models/integration.js +57 -15
- package/dist/plus/integrations/models/integration.js.map +1 -1
- package/dist/plus/integrations/models/issueReads.d.ts +6 -0
- package/dist/plus/integrations/models/issuesIntegration.js +11 -11
- package/dist/plus/integrations/models/issuesIntegration.js.map +1 -1
- package/dist/plus/integrations/providers/azure/azure.js +2 -2
- package/dist/plus/integrations/providers/azureDevOps.js +1 -1
- package/dist/plus/integrations/providers/azureDevOpsServer.js +1 -1
- package/dist/plus/integrations/providers/bitbucket/bitbucket.js +1 -1
- package/dist/plus/integrations/providers/bitbucket/bitbucket.js.map +1 -1
- package/dist/plus/integrations/providers/bitbucket-server.js +1 -1
- package/dist/plus/integrations/providers/bitbucket.js +1 -1
- package/dist/plus/integrations/providers/github.js +1 -1
- package/dist/plus/integrations/providers/gitlab/gitlab.js +2 -2
- package/dist/plus/integrations/providers/gitlab/gitlab.js.map +1 -1
- package/dist/plus/integrations/providers/gitlab.js +1 -1
- package/dist/plus/integrations/providers/jira-server.js +2 -2
- package/dist/plus/integrations/providers/jira.js +1 -1
- package/dist/plus/integrations/providers/linear.d.ts +4 -4
- package/dist/plus/integrations/providers/linear.js +26 -9
- package/dist/plus/integrations/providers/linear.js.map +1 -1
- package/dist/plus/integrations/providers/models.js +2 -1
- package/dist/plus/integrations/providers/models.js.map +1 -1
- package/dist/plus/integrations/providers/providerErrors.js +9 -0
- package/dist/plus/integrations/providers/providerErrors.js.map +1 -1
- package/dist/plus/integrations/providers/providersApi.d.ts +2 -0
- package/dist/plus/integrations/providers/providersApi.js +1 -1
- package/dist/plus/integrations/providers/providersApi.js.map +1 -1
- package/dist/plus/integrations/providers/trello.js +1 -1
- package/dist/plus/integrations/providers/utils.js +1 -1
- package/dist/plus/integrations/reads/counts.js +1 -1
- package/dist/plus/integrations/reads/cursors.js +1 -1
- package/dist/plus/integrations/reads/drains.d.ts +5 -4
- package/dist/plus/integrations/reads/drains.js +28 -8
- package/dist/plus/integrations/reads/drains.js.map +1 -1
- package/dist/plus/integrations/reads/hierarchy.js +1 -1
- package/dist/plus/integrations/reads/issueBatch.d.ts +1 -1
- package/dist/plus/integrations/reads/issueBatch.js.map +1 -1
- package/dist/plus/integrations/reads/issueTracker.d.ts +4 -1
- package/dist/plus/integrations/reads/issueTracker.js +1 -1
- package/dist/plus/integrations/reads/issueTracker.js.map +1 -1
- package/dist/plus/integrations/reads/issues.d.ts +2 -0
- package/dist/plus/integrations/reads/issues.js +5 -3
- package/dist/plus/integrations/reads/issues.js.map +1 -1
- package/dist/plus/integrations/reads/paging.d.ts +5 -6
- package/dist/plus/integrations/reads/paging.js +5 -6
- package/dist/plus/integrations/reads/paging.js.map +1 -1
- package/dist/plus/integrations/reads/pullRequests.d.ts +4 -0
- package/dist/plus/integrations/reads/pullRequests.js +4 -2
- package/dist/plus/integrations/reads/pullRequests.js.map +1 -1
- package/dist/plus/integrations/reads/resolveRepository.js +1 -1
- package/dist/plus/integrations/reads/sweeps.js +42 -10
- package/dist/plus/integrations/reads/sweeps.js.map +1 -1
- package/dist/plus/integrations/results.d.ts +23 -3
- package/dist/plus/integrations/results.js.map +1 -1
- package/dist/plus/notifications/api.d.ts +20 -0
- package/dist/plus/notifications/api.js +89 -0
- package/dist/plus/notifications/api.js.map +1 -0
- package/dist/plus/notifications/context.d.ts +28 -0
- package/dist/plus/notifications/context.js +0 -0
- package/dist/plus/notifications/errors.d.ts +13 -0
- package/dist/plus/notifications/errors.js +22 -0
- package/dist/plus/notifications/errors.js.map +1 -0
- package/dist/plus/notifications/models.d.ts +94 -0
- package/dist/plus/notifications/models.js +0 -0
- package/dist/plus/notifications/notificationsService.d.ts +115 -0
- package/dist/plus/notifications/notificationsService.js +381 -0
- package/dist/plus/notifications/notificationsService.js.map +1 -0
- package/dist/plus/notifications/parse.d.ts +12 -0
- package/dist/plus/notifications/parse.js +152 -0
- package/dist/plus/notifications/parse.js.map +1 -0
- package/dist/plus/notifications/presentation.d.ts +28 -0
- package/dist/plus/notifications/presentation.js +55 -0
- package/dist/plus/notifications/presentation.js.map +1 -0
- package/dist/utils/env/node/exec.d.ts +10 -1
- package/dist/utils/env/node/exec.js +41 -4
- package/dist/utils/env/node/exec.js.map +1 -1
- package/docs/integrations.md +25 -3
- package/docs/notifications.md +239 -0
- package/package.json +22 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"branchRemote.js","names":[],"sources":["../../../../git-cli/src/providers/branchRemote.ts"],"sourcesContent":["import type { GitBranchReference } from '@gitlens/git/models/reference.js';\nimport {\n\tgetBranchNameAndRemote,\n\tgetBranchTrackingWithoutRemote,\n\tsplitRemoteBranchName,\n} from '@gitlens/git/utils/branch.utils.js';\nimport type { CliGitProviderInternal } from '../cliGitProvider.js';\n\n/**\n * Splits a branch reference into its name, remote and upstream branch. A remote's own name can contain\n * a `/`, so the cheap first-`/` split only stands when it leaves no further `/` to be ambiguous.\n *\n * Git reports whether an upstream is a local branch on every version, and a local upstream never has a\n * remote, so it is never split (`release/2.0` is not remote `release`).\n *\n * A reference that carries neither `local` nor `remote` on its upstream (one a host built itself) is looked\n * up fresh in the branch list, since guessing from the name can't tell a local `release/2.0` from remote\n * `release`'s `2.0`.\n *\n * A remote a local branch's reference carries may have been removed since the reference was read, and\n * git would then take the stale name as a path, so it must be one of the repository's remotes. A failed\n * remote read (`getRemotes` answers `[]`) refuses too: a retry beats a push to a path.\n */\nexport async function resolveBranchRemote(\n\tprovider: Pick<CliGitProviderInternal, 'remotes' | 'branches'>,\n\trepoPath: string,\n\tref: GitBranchReference,\n\tcancellation?: AbortSignal,\n): Promise<{ name: string; remote: string | undefined; upstream: string | undefined; local: boolean }> {\n\tif (!ref.remote && ref.upstream != null && !ref.upstream.local && ref.upstream.remote == null) {\n\t\tconst fresh = await provider.branches.getBranch(repoPath, ref.name, undefined, cancellation);\n\t\t// `getBranch` matches by short name, which a remote-tracking ref can share. A missing upstream is one the\n\t\t// caller is about to set, which the branch doesn't track yet\n\t\tif (fresh != null && !fresh.remote && (fresh.upstream != null || !ref.upstream.missing)) {\n\t\t\tref = fresh;\n\t\t}\n\t}\n\n\tlet [name, remote] = getBranchNameAndRemote(ref);\n\tlet upstream = getBranchTrackingWithoutRemote(ref);\n\n\tconst local = !ref.remote && ref.upstream?.local === true;\n\tif (local) return { name: name, remote: undefined, upstream: upstream, local: true };\n\n\tconst needsSplit = !ref.upstream?.remote && (ref.remote ? name : upstream)?.includes('/');\n\tconst needsVerify = !ref.remote && remote != null;\n\tif (!needsSplit && !needsVerify) return { name: name, remote: remote, upstream: upstream, local: local };\n\n\tconst remoteNames = (await provider.remotes.getRemotes(repoPath, undefined, cancellation)).map(r => r.name);\n\n\tif (needsSplit) {\n\t\tif (ref.remote) {\n\t\t\tconst split = splitRemoteBranchName(ref.name, remoteNames);\n\t\t\tif (split != null) {\n\t\t\t\t[remote, name] = split;\n\t\t\t}\n\t\t}\n\n\t\tif (ref.upstream != null) {\n\t\t\tconst split = splitRemoteBranchName(ref.upstream.name, remoteNames);\n\t\t\tif (split != null) {\n\t\t\t\
|
|
1
|
+
{"version":3,"file":"branchRemote.js","names":[],"sources":["../../../../git-cli/src/providers/branchRemote.ts"],"sourcesContent":["import type { GitBranchReference } from '@gitlens/git/models/reference.js';\nimport {\n\tgetBranchNameAndRemote,\n\tgetBranchTrackingWithoutRemote,\n\tsplitRemoteBranchName,\n} from '@gitlens/git/utils/branch.utils.js';\nimport type { CliGitProviderInternal } from '../cliGitProvider.js';\n\n/**\n * Splits a branch reference into its name, remote and upstream branch. A remote's own name can contain\n * a `/`, so the cheap first-`/` split only stands when it leaves no further `/` to be ambiguous.\n *\n * Git reports whether an upstream is a local branch on every version, and a local upstream never has a\n * remote, so it is never split (`release/2.0` is not remote `release`).\n *\n * A reference that carries neither `local` nor `remote` on its upstream (one a host built itself) is looked\n * up fresh in the branch list, since guessing from the name can't tell a local `release/2.0` from remote\n * `release`'s `2.0`.\n *\n * A remote a local branch's reference carries may have been removed since the reference was read, and\n * git would then take the stale name as a path, so it must be one of the repository's remotes. A failed\n * remote read (`getRemotes` answers `[]`) refuses too: a retry beats a push to a path.\n */\nexport async function resolveBranchRemote(\n\tprovider: Pick<CliGitProviderInternal, 'remotes' | 'branches'>,\n\trepoPath: string,\n\tref: GitBranchReference,\n\tcancellation?: AbortSignal,\n): Promise<{ name: string; remote: string | undefined; upstream: string | undefined; local: boolean }> {\n\tif (!ref.remote && ref.upstream != null && !ref.upstream.local && ref.upstream.remote == null) {\n\t\tconst fresh = await provider.branches.getBranch(repoPath, ref.name, undefined, cancellation);\n\t\t// `getBranch` matches by short name, which a remote-tracking ref can share. A missing upstream is one the\n\t\t// caller is about to set, which the branch doesn't track yet\n\t\tif (fresh != null && !fresh.remote && (fresh.upstream != null || !ref.upstream.missing)) {\n\t\t\tref = fresh;\n\t\t}\n\t}\n\n\tlet [name, remote] = getBranchNameAndRemote(ref);\n\tlet upstream = getBranchTrackingWithoutRemote(ref);\n\n\tconst local = !ref.remote && ref.upstream?.local === true;\n\tif (local) return { name: name, remote: undefined, upstream: upstream, local: true };\n\n\tconst needsSplit = !ref.upstream?.remote && (ref.remote ? name : upstream)?.includes('/');\n\tconst needsVerify = !ref.remote && remote != null;\n\tif (!needsSplit && !needsVerify) return { name: name, remote: remote, upstream: upstream, local: local };\n\n\tconst remoteNames = (await provider.remotes.getRemotes(repoPath, undefined, cancellation)).map(r => r.name);\n\n\tif (needsSplit) {\n\t\tif (ref.remote) {\n\t\t\tconst split = splitRemoteBranchName(ref.name, remoteNames);\n\t\t\tif (split != null) {\n\t\t\t\t[remote, name] = split;\n\t\t\t}\n\t\t}\n\n\t\t// A remote-tracking branch has no upstream (see `getBranchTrackingWithoutRemote`)\n\t\tif (!ref.remote && ref.upstream != null) {\n\t\t\tconst split = splitRemoteBranchName(ref.upstream.name, remoteNames);\n\t\t\tif (split != null) {\n\t\t\t\t[remote, upstream] = split;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (!ref.remote && remote != null && !remoteNames.includes(remote)) {\n\t\tremote = undefined;\n\t}\n\n\treturn { name: name, remote: remote, upstream: upstream, local: local };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAuBA,eAAsB,oBACrB,UACA,UACA,KACA,cACsG;CACtG,IAAI,CAAC,IAAI,UAAU,IAAI,YAAY,QAAQ,CAAC,IAAI,SAAS,SAAS,IAAI,SAAS,UAAU,MAAM;EAC9F,MAAM,QAAQ,MAAM,SAAS,SAAS,UAAU,UAAU,IAAI,MAAM,KAAA,GAAW,YAAY;EAG3F,IAAI,SAAS,QAAQ,CAAC,MAAM,WAAW,MAAM,YAAY,QAAQ,CAAC,IAAI,SAAS,UAC9E,MAAM;CAER;CAEA,IAAI,CAAC,MAAM,UAAU,uBAAuB,GAAG;CAC/C,IAAI,WAAW,+BAA+B,GAAG;CAEjD,MAAM,QAAQ,CAAC,IAAI,UAAU,IAAI,UAAU,UAAU;CACrD,IAAI,OAAO,OAAO;EAAQ;EAAM,QAAQ,KAAA;EAAqB;EAAU,OAAO;CAAK;CAEnF,MAAM,aAAa,CAAC,IAAI,UAAU,WAAW,IAAI,SAAS,OAAO,SAAA,EAAW,SAAS,GAAG;CACxF,MAAM,cAAc,CAAC,IAAI,UAAU,UAAU;CAC7C,IAAI,CAAC,cAAc,CAAC,aAAa,OAAO;EAAQ;EAAc;EAAkB;EAAiB;CAAM;CAEvG,MAAM,eAAe,MAAM,SAAS,QAAQ,WAAW,UAAU,KAAA,GAAW,YAAY,EAAA,CAAG,KAAI,MAAK,EAAE,IAAI;CAE1G,IAAI,YAAY;EACf,IAAI,IAAI,QAAQ;GACf,MAAM,QAAQ,sBAAsB,IAAI,MAAM,WAAW;GACzD,IAAI,SAAS,MACZ,CAAC,QAAQ,QAAQ;EAEnB;EAGA,IAAI,CAAC,IAAI,UAAU,IAAI,YAAY,MAAM;GACxC,MAAM,QAAQ,sBAAsB,IAAI,SAAS,MAAM,WAAW;GAClE,IAAI,SAAS,MACZ,CAAC,QAAQ,YAAY;EAEvB;CACD;CAEA,IAAI,CAAC,IAAI,UAAU,UAAU,QAAQ,CAAC,YAAY,SAAS,MAAM,GAChE,SAAS,KAAA;CAGV,OAAO;EAAQ;EAAc;EAAkB;EAAiB;CAAM;AACvE"}
|
|
@@ -863,7 +863,7 @@ var BranchesGitSubProvider = class {
|
|
|
863
863
|
} else if (GitErrors.noMergeBase.test(msg)) {
|
|
864
864
|
scope?.error(ex, `Unable to merge '${branch}' and '${targetBranch}' as they have no common ancestor`);
|
|
865
865
|
return createConflictDetectionError("noMergeBase");
|
|
866
|
-
} else if (ex instanceof GitError) data = ex.stdout;
|
|
866
|
+
} else if (ex instanceof GitError && ex.stdout) data = ex.stdout;
|
|
867
867
|
else {
|
|
868
868
|
scope?.error(ex);
|
|
869
869
|
return createConflictDetectionError("other");
|
|
@@ -890,7 +890,7 @@ var BranchesGitSubProvider = class {
|
|
|
890
890
|
}
|
|
891
891
|
/** Detects conflicts when an autostash is reapplied onto the tree an integration produced */
|
|
892
892
|
async getPotentialStashReapplyConflicts(repoPath, ontoTreeOid, cancellation) {
|
|
893
|
-
if (!await this.git.supports("git:merge-tree:
|
|
893
|
+
if (!await this.git.supports("git:merge-tree:trees")) return createConflictDetectionError("unsupported");
|
|
894
894
|
let stashSha;
|
|
895
895
|
try {
|
|
896
896
|
stashSha = (await this.git.run({
|
|
@@ -967,7 +967,7 @@ var BranchesGitSubProvider = class {
|
|
|
967
967
|
ok: false,
|
|
968
968
|
reason: "noMergeBase"
|
|
969
969
|
};
|
|
970
|
-
} else if (ex instanceof GitError) data = ex.stdout;
|
|
970
|
+
} else if (ex instanceof GitError && ex.stdout) data = ex.stdout;
|
|
971
971
|
else {
|
|
972
972
|
scope?.error(ex, "Failed to execute merge-tree for conflict check");
|
|
973
973
|
return {
|
|
@@ -983,7 +983,7 @@ var BranchesGitSubProvider = class {
|
|
|
983
983
|
}
|
|
984
984
|
async checkForPotentialConflicts(repoPath, commits, targetBranch, cancellation, options) {
|
|
985
985
|
const scope = getScopedLogger();
|
|
986
|
-
if (!await this.git.supports("git:merge-tree:
|
|
986
|
+
if (!await this.git.supports("git:merge-tree:trees")) return createConflictDetectionError("unsupported");
|
|
987
987
|
let currentTreeOid;
|
|
988
988
|
try {
|
|
989
989
|
currentTreeOid = (await this.git.run({
|