@gitkraken/core-gitlens 0.13.0 → 0.15.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.
Files changed (127) hide show
  1. package/CHANGELOG.md +43 -2
  2. package/dist/git/features.d.ts +1 -1
  3. package/dist/git/features.js +1 -0
  4. package/dist/git/features.js.map +1 -1
  5. package/dist/git/models/branch.d.ts +5 -0
  6. package/dist/git/models/branch.js +1 -1
  7. package/dist/git/models/branch.js.map +1 -1
  8. package/dist/git/models/reference.d.ts +3 -0
  9. package/dist/git/models/status.js +1 -1
  10. package/dist/git/parsers/diffParser.js +1 -1
  11. package/dist/git/providers/operations.d.ts +3 -2
  12. package/dist/git/providers/provider.d.ts +15 -4
  13. package/dist/git/providers/revision.d.ts +17 -3
  14. package/dist/git/run.types.d.ts +12 -0
  15. package/dist/git/utils/branch.utils.d.ts +4 -1
  16. package/dist/git/utils/branch.utils.js +20 -5
  17. package/dist/git/utils/branch.utils.js.map +1 -1
  18. package/dist/git/utils/reference.utils.d.ts +1 -0
  19. package/dist/git/utils/reference.utils.js.map +1 -1
  20. package/dist/git-cli/cliGitProvider.d.ts +8 -2
  21. package/dist/git-cli/cliGitProvider.js +75 -13
  22. package/dist/git-cli/cliGitProvider.js.map +1 -1
  23. package/dist/git-cli/exec/git.d.ts +5 -0
  24. package/dist/git-cli/exec/git.js +28 -5
  25. package/dist/git-cli/exec/git.js.map +1 -1
  26. package/dist/git-cli/exec/indexLock.d.ts +3 -2
  27. package/dist/git-cli/exec/indexLock.js +16 -6
  28. package/dist/git-cli/exec/indexLock.js.map +1 -1
  29. package/dist/git-cli/parsers/blameParser.js +2 -2
  30. package/dist/git-cli/parsers/refParser.js +4 -2
  31. package/dist/git-cli/parsers/refParser.js.map +1 -1
  32. package/dist/git-cli/parsers/statusParser.d.ts +6 -0
  33. package/dist/git-cli/parsers/statusParser.js +33 -3
  34. package/dist/git-cli/parsers/statusParser.js.map +1 -1
  35. package/dist/git-cli/providers/branchRemote.d.ts +14 -0
  36. package/dist/git-cli/providers/branchRemote.js +36 -0
  37. package/dist/git-cli/providers/branchRemote.js.map +1 -0
  38. package/dist/git-cli/providers/branches.js +6 -3
  39. package/dist/git-cli/providers/branches.js.map +1 -1
  40. package/dist/git-cli/providers/commits.js +2 -2
  41. package/dist/git-cli/providers/config.js +2 -2
  42. package/dist/git-cli/providers/contributors.js +1 -1
  43. package/dist/git-cli/providers/graph.js +9 -6
  44. package/dist/git-cli/providers/graph.js.map +1 -1
  45. package/dist/git-cli/providers/operations.js +20 -16
  46. package/dist/git-cli/providers/operations.js.map +1 -1
  47. package/dist/git-cli/providers/pausedOperations.js +2 -2
  48. package/dist/git-cli/providers/pausedOperations.js.map +1 -1
  49. package/dist/git-cli/providers/revision.d.ts +6 -2
  50. package/dist/git-cli/providers/revision.js +38 -12
  51. package/dist/git-cli/providers/revision.js.map +1 -1
  52. package/dist/git-cli/providers/staging.js +1 -1
  53. package/dist/git-cli/providers/status.js +2 -2
  54. package/dist/ipc/discovery.js +1 -1
  55. package/dist/plus/agents/providers/claudeCodeTranscript.js +6 -6
  56. package/dist/plus/agents/providers/claudeCodeTranscript.js.map +1 -1
  57. package/dist/plus/ai/providers/openAICompatibleProviderBase.js +1 -1
  58. package/dist/plus/git-github/providers/github/revision.d.ts +6 -2
  59. package/dist/plus/git-github/providers/github/revision.js +15 -10
  60. package/dist/plus/git-github/providers/github/revision.js.map +1 -1
  61. package/dist/plus/git-github/providers/github/status.js +1 -1
  62. package/dist/plus/integrations/collectionMetadata.d.ts +7 -0
  63. package/dist/plus/integrations/collectionMetadata.js +10 -1
  64. package/dist/plus/integrations/collectionMetadata.js.map +1 -1
  65. package/dist/plus/integrations/errors.d.ts +5 -0
  66. package/dist/plus/integrations/errors.js +10 -1
  67. package/dist/plus/integrations/errors.js.map +1 -1
  68. package/dist/plus/integrations/index.d.ts +2 -2
  69. package/dist/plus/integrations/index.js.map +1 -1
  70. package/dist/plus/integrations/models/gitHostIntegration.d.ts +6 -2
  71. package/dist/plus/integrations/models/gitHostIntegration.js +37 -7
  72. package/dist/plus/integrations/models/gitHostIntegration.js.map +1 -1
  73. package/dist/plus/integrations/models/issueReads.d.ts +1 -1
  74. package/dist/plus/integrations/models/issuesIntegration.d.ts +33 -3
  75. package/dist/plus/integrations/models/issuesIntegration.js +76 -5
  76. package/dist/plus/integrations/models/issuesIntegration.js.map +1 -1
  77. package/dist/plus/integrations/providers/azure/azure.js +1 -1
  78. package/dist/plus/integrations/providers/azure/workItemStateCategories.d.ts +5 -0
  79. package/dist/plus/integrations/providers/azure/workItemStateCategories.js +5 -0
  80. package/dist/plus/integrations/providers/azure/workItemStateCategories.js.map +1 -1
  81. package/dist/plus/integrations/providers/azureDevOpsServer.d.ts +9 -1
  82. package/dist/plus/integrations/providers/azureDevOpsServer.js +17 -9
  83. package/dist/plus/integrations/providers/azureDevOpsServer.js.map +1 -1
  84. package/dist/plus/integrations/providers/bitbucket-server.js +3 -2
  85. package/dist/plus/integrations/providers/bitbucket-server.js.map +1 -1
  86. package/dist/plus/integrations/providers/jira-server.d.ts +3 -0
  87. package/dist/plus/integrations/providers/jira-server.js +15 -7
  88. package/dist/plus/integrations/providers/jira-server.js.map +1 -1
  89. package/dist/plus/integrations/providers/jira.d.ts +8 -0
  90. package/dist/plus/integrations/providers/jira.js +88 -58
  91. package/dist/plus/integrations/providers/jira.js.map +1 -1
  92. package/dist/plus/integrations/providers/linear.d.ts +4 -0
  93. package/dist/plus/integrations/providers/linear.js +23 -2
  94. package/dist/plus/integrations/providers/linear.js.map +1 -1
  95. package/dist/plus/integrations/providers/providerErrors.d.ts +24 -0
  96. package/dist/plus/integrations/providers/providerErrors.js +41 -4
  97. package/dist/plus/integrations/providers/providerErrors.js.map +1 -1
  98. package/dist/plus/integrations/providers/providersApi.d.ts +1 -1
  99. package/dist/plus/integrations/providers/providersApi.js +15 -4
  100. package/dist/plus/integrations/providers/providersApi.js.map +1 -1
  101. package/dist/plus/integrations/providers/trello.d.ts +1 -0
  102. package/dist/plus/integrations/providers/trello.js +3 -0
  103. package/dist/plus/integrations/providers/trello.js.map +1 -1
  104. package/dist/plus/integrations/reads/cursors.js +23 -5
  105. package/dist/plus/integrations/reads/cursors.js.map +1 -1
  106. package/dist/plus/integrations/reads/drains.d.ts +16 -0
  107. package/dist/plus/integrations/reads/drains.js +19 -1
  108. package/dist/plus/integrations/reads/drains.js.map +1 -1
  109. package/dist/plus/integrations/reads/hierarchy.js +5 -3
  110. package/dist/plus/integrations/reads/hierarchy.js.map +1 -1
  111. package/dist/plus/integrations/reads/hierarchy.utils.d.ts +3 -2
  112. package/dist/plus/integrations/reads/hierarchy.utils.js +4 -7
  113. package/dist/plus/integrations/reads/hierarchy.utils.js.map +1 -1
  114. package/dist/plus/integrations/reads/issueTracker.js +71 -7
  115. package/dist/plus/integrations/reads/issueTracker.js.map +1 -1
  116. package/dist/plus/integrations/reads/selectionConfirmation.d.ts +69 -0
  117. package/dist/plus/integrations/reads/selectionConfirmation.js +79 -0
  118. package/dist/plus/integrations/reads/selectionConfirmation.js.map +1 -0
  119. package/dist/plus/integrations/reads/warnings.d.ts +9 -3
  120. package/dist/plus/integrations/reads/warnings.js +19 -3
  121. package/dist/plus/integrations/reads/warnings.js.map +1 -1
  122. package/dist/plus/integrations/results.d.ts +30 -3
  123. package/dist/plus/integrations/results.js +2 -1
  124. package/dist/plus/integrations/results.js.map +1 -1
  125. package/dist/utils/env/node/exec.js +2 -2
  126. package/docs/integrations.md +59 -6
  127. package/package.json +1 -1
@@ -750,7 +750,7 @@ prove from structured errors:
750
750
  | ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
751
751
  | `auth` | Token rejected (401/403 that isn't a throttle). | Prompt to reconnect that connection. A scoped one is narrower: see `scope` below. |
752
752
  | `rate-limit` | Throttled (429, or a 403 whose body says so). | Back off and retry; keep the last snapshot. |
753
- | `not-found` | 404/410/422 on the requested scope. | Drop that scope; don't reconnect. |
753
+ | `not-found` | 404/410/422 on the requested scope, or an issue-tracker `org`/`project` selector that matches nothing (with `selector`, see below). | Drop that scope; don't reconnect. |
754
754
  | `no-connection` | The requested `connectionId`/`domain` doesn't resolve. | Re-resolve the target or re-authenticate. |
755
755
  | `unsupported` | The provider can't serve this capability: a surface, filter, sort, state, search criterion or option combination it can't express. | Hide or disable the feature for that provider; don't retry or reconnect. |
756
756
  | `unreadable-items` | Items the provider returned that couldn't be read were left out (a Jira issue `@gitkraken/provider-apis` can't parse); the rest of its `scope` was read. `unreadableItems` names them. | Show the read as incomplete; retrying returns the same gap. A cut read always adds a warning of another kind. |
@@ -824,11 +824,57 @@ one extra check a minute, and a revocation can take up to a minute to surface as
824
824
  `scope.resourceId` is the resource as the read addressed it: its id on most reads, its name on the few that
825
825
  address it by name (Azure DevOps' repo-scoped reads, Bitbucket's workspace reads). Match it against both
826
826
  `ProviderOrganization.id` and `name`, and against a project's `orgId` where it has one. A Jira project read's
827
- `scope.projectId` is the project as the read addressed it: the key on Jira Cloud (a project's `name` in
828
- `listProjects`), the numeric id on Jira Data Center.
827
+ `scope.projectId` is the project key, on Jira Cloud and Jira Data Center alike (a project's `name` in
828
+ `listProjects`); Data Center still reads the project by its numeric id.
829
829
 
830
830
  Warnings also dedup on `scope` and `cause`, so failures of two scopes stay two warnings.
831
831
 
832
+ ### `selector` — a selection that no longer exists
833
+
834
+ `listIssueTrackerIssuesPage` reports an `org` or `project` that matches nothing the connection discovered as one
835
+ `kind: 'not-found'` warning carrying `selector: { kind: 'org' | 'project', value }` (`ProviderWarningSelector`),
836
+ `value` being the selector exactly as passed. The page is empty, not `fetchFailed`, with `hasMore: false` and no
837
+ cursor: the site or project was removed, renamed, or this connection can no longer see it, and a retry finds the
838
+ same. A project miss under a given `org` is `kind: 'project'`, since the org matched. It carries no `scope`.
839
+
840
+ It is reported only when discovery was complete. When listing the resources or their projects failed or was
841
+ truncated, a missing selection cannot be told apart from one the read did not reach, so the read reports that
842
+ failure as before, with no `selector` warning. A `not-found` without `selector` is a request that failed with a
843
+ 404, 410 or 422; test `selector != null` to tell them apart. Discovery can be served from the connection's
844
+ discovery cache (see `scope` above), which predates a site or project created since, so a selection that matches
845
+ nothing is checked once more against this connection's lists as the provider holds them now before the read reports
846
+ it. That check reads the lists directly, sharing nothing with the cache: it joins no discovery read in flight and
847
+ stores nothing. The miss is reported only from it, never from cached lists, `forceSync: true` included, since a read
848
+ right after the caches are dropped can still join one started before. When it still matches nothing, the read
849
+ reports the miss. When it matches, the cache was stale: the connection's discovery caches are dropped, as `forceSync`
850
+ drops them, and the read is made once more over fresh lists, so the site or project created since reads as usual.
851
+ That read checks a miss the same way and is not made again: still finding the cache stale, it reports a failure with
852
+ a retry cursor. So a read makes at most two such checks and one more read. No verdict is kept: a read that keeps
853
+ selecting what is gone checks again each time, so that a selection recreated since is read on the next one. A check that cannot list the selection
854
+ completely reports a failure with a retry cursor rather than the miss. It also confirms the connection's credential with an account
855
+ lookup on a resource those lists name, made past any lookup in flight, before it reports the miss, since a rejected Jira
856
+ Data Center token can read as an account with no projects; when that lookup fails, the read reports the failure,
857
+ with a retry cursor, instead. An account whose discovery lists no resource at all has none to look the account up
858
+ on, and reports the miss on the lists alone.
859
+
860
+ A cached list can also still name a selected project deleted since. Jira refuses a search scoped to it ("The value
861
+ '…' does not exist for the field 'project'"); the project reads as empty, as any refused project does, and the
862
+ refusal drops that site's cached project list, so the next read lists it again and reports the miss when the project
863
+ is gone, or reads it under the new id it was recreated with. A paged read whose later windows are taken over the
864
+ shorter list can end before a match left on another site, which the next read then reaches. Jira Data Center lists a
865
+ project to an administrator who cannot browse it and refuses their search the same way, so such a project keeps
866
+ reading as empty, with no warning. Any other refusal of the project read
867
+ (401, 403, 5xx, a timeout) stays a failure with no `selector`. So does Jira Data Center's refusal when it names no
868
+ authenticated user: only a refusal whose `X-AUSERNAME` names a user other than `anonymous` proves the project gone.
869
+
870
+ Jira Data Center serves a token it rejects as the anonymous user rather than refusing it: its project list answers
871
+ `200 []` and a project search the same refusal a deleted project gets. Any response to a request sent with a
872
+ credential that names `anonymous` in `X-AUSERNAME`, in any casing, is therefore read as the credential's rejection on
873
+ every Jira Data Center read: an `auth` warning on a `fetchFailed` result (an issue page also keeps its cursor), never
874
+ an account with no projects, so a rejected token never reports a `selector`. A 401 already is that rejection, and
875
+ keeps its own error and body; a 429 or a 5xx keeps its own error too, since neither proves anything about the
876
+ credential.
877
+
832
878
  ### `cause` — why a sound credential was refused
833
879
 
834
880
  A scoped `auth` warning can also say **why** the scope refused, so a consumer recommends the fix instead of a
@@ -1337,7 +1383,8 @@ Markdown by this package.
1337
1383
  does: collection `{vdir}` and project `{collection}`, with the connection addressed at `{vdir}` (or at
1338
1384
  `{vdir}/{collection}`). The repository name is required for it, since it names the project. A scope that names its
1339
1385
  collection and project is read as given. So is one whose collections can't be read, and a batch or branch read that
1340
- then finds nothing for it fails that target rather than report it absent.
1386
+ then finds nothing for it fails that target rather than report it absent. A pull request or issue list that finds
1387
+ nothing for it keeps the other scopes' items but reports that scope in a warning and marks the page incomplete.
1341
1388
 
1342
1389
  Azure DevOps Server also has the filtered searches and their counts, with the collection applied exactly once
1343
1390
  whichever way the address is written. Scope names are encoded as URL segments (collections, projects,
@@ -1392,10 +1439,16 @@ Markdown by this package.
1392
1439
  Thread the returned cursor verbatim: it can combine the next untouched project window with discovery/project
1393
1440
  retries, preserve a caller's aggregate-all mode, and suppress projects already emitted before discovery
1394
1441
  recovered. `hasMore` reports only untouched forward progress. A cursor can therefore remain with
1395
- `hasMore: false`; reusing it is an explicit manual retry of failed work, not a normal paging loop.
1442
+ `hasMore: false`; reusing it is an explicit manual retry of failed work, not a normal paging loop. It tracks
1443
+ projects by resource and id, so a project whose key is renamed between pages is neither read again nor dropped.
1444
+ A resource discovery (Jira Cloud sites, the Linear organization, Trello boards) that answers with no data and no
1445
+ error is incomplete, not an empty account: the page is `page.truncated` with a retry cursor and a "completeness
1446
+ could not be confirmed" warning, and `listOrgs` / `listProjects` report the provider `fetchFailed`. A discovery
1447
+ answering `[]` means no resources, and an unconnected tracker reads as empty.
1396
1448
  `org` and `project` select by identifier. Linear and Trello match any of a resource's or project's id, name or
1397
1449
  key. Jira (Cloud and Data Center) matches only the canonical key, so a selection whose site or project was removed
1398
- selects nothing instead of resolving to another one that carries the old value as a name or id: `org` is the site's
1450
+ selects nothing instead of resolving to another one that carries the old value as a name or id. A selector that
1451
+ matches nothing returns an empty page with a `selector` warning (see `selector` above). For Jira, `org` is the site's
1399
1452
  id (`listOrgs`' `id`, or `listProjects`' `orgId`), never its label, and `project` is the project key, which is
1400
1453
  `listProjects`' `name` for Jira. `listProjects({ org })` itself still matches any identifier, since it only lists
1401
1454
  what a caller can then select.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@gitkraken/core-gitlens",
3
3
  "description": "GitLens core — shared Git / AI / GitHub primitives for internal GitKraken consumption",
4
- "version": "0.13.0",
4
+ "version": "0.15.0",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "author": {
7
7
  "name": "GitKraken",