@gitkraken/core-gitlens 0.14.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.
- package/CHANGELOG.md +21 -1
- package/dist/plus/integrations/collectionMetadata.d.ts +7 -0
- package/dist/plus/integrations/collectionMetadata.js +10 -1
- package/dist/plus/integrations/collectionMetadata.js.map +1 -1
- package/dist/plus/integrations/errors.d.ts +5 -0
- package/dist/plus/integrations/errors.js +10 -1
- package/dist/plus/integrations/errors.js.map +1 -1
- package/dist/plus/integrations/index.d.ts +2 -2
- package/dist/plus/integrations/index.js.map +1 -1
- package/dist/plus/integrations/models/gitHostIntegration.d.ts +6 -2
- package/dist/plus/integrations/models/gitHostIntegration.js +37 -7
- package/dist/plus/integrations/models/gitHostIntegration.js.map +1 -1
- package/dist/plus/integrations/models/issueReads.d.ts +1 -1
- package/dist/plus/integrations/models/issuesIntegration.d.ts +33 -3
- package/dist/plus/integrations/models/issuesIntegration.js +76 -5
- package/dist/plus/integrations/models/issuesIntegration.js.map +1 -1
- package/dist/plus/integrations/providers/azureDevOpsServer.d.ts +9 -1
- package/dist/plus/integrations/providers/azureDevOpsServer.js +17 -9
- package/dist/plus/integrations/providers/azureDevOpsServer.js.map +1 -1
- package/dist/plus/integrations/providers/bitbucket-server.js +3 -2
- package/dist/plus/integrations/providers/bitbucket-server.js.map +1 -1
- package/dist/plus/integrations/providers/jira-server.d.ts +3 -0
- package/dist/plus/integrations/providers/jira-server.js +15 -7
- package/dist/plus/integrations/providers/jira-server.js.map +1 -1
- package/dist/plus/integrations/providers/jira.d.ts +8 -0
- package/dist/plus/integrations/providers/jira.js +88 -58
- package/dist/plus/integrations/providers/jira.js.map +1 -1
- package/dist/plus/integrations/providers/linear.d.ts +4 -0
- package/dist/plus/integrations/providers/linear.js +23 -2
- package/dist/plus/integrations/providers/linear.js.map +1 -1
- package/dist/plus/integrations/providers/providerErrors.d.ts +24 -0
- package/dist/plus/integrations/providers/providerErrors.js +41 -4
- package/dist/plus/integrations/providers/providerErrors.js.map +1 -1
- package/dist/plus/integrations/providers/providersApi.d.ts +1 -1
- package/dist/plus/integrations/providers/providersApi.js +15 -4
- package/dist/plus/integrations/providers/providersApi.js.map +1 -1
- package/dist/plus/integrations/providers/trello.d.ts +1 -0
- package/dist/plus/integrations/providers/trello.js +3 -0
- package/dist/plus/integrations/providers/trello.js.map +1 -1
- package/dist/plus/integrations/reads/cursors.js +23 -5
- package/dist/plus/integrations/reads/cursors.js.map +1 -1
- package/dist/plus/integrations/reads/drains.d.ts +16 -0
- package/dist/plus/integrations/reads/drains.js +19 -1
- package/dist/plus/integrations/reads/drains.js.map +1 -1
- package/dist/plus/integrations/reads/hierarchy.js +5 -3
- package/dist/plus/integrations/reads/hierarchy.js.map +1 -1
- package/dist/plus/integrations/reads/hierarchy.utils.d.ts +3 -2
- package/dist/plus/integrations/reads/hierarchy.utils.js +4 -7
- package/dist/plus/integrations/reads/hierarchy.utils.js.map +1 -1
- package/dist/plus/integrations/reads/issueTracker.js +71 -7
- package/dist/plus/integrations/reads/issueTracker.js.map +1 -1
- package/dist/plus/integrations/reads/selectionConfirmation.d.ts +69 -0
- package/dist/plus/integrations/reads/selectionConfirmation.js +79 -0
- package/dist/plus/integrations/reads/selectionConfirmation.js.map +1 -0
- package/dist/plus/integrations/reads/warnings.d.ts +9 -3
- package/dist/plus/integrations/reads/warnings.js +19 -3
- package/dist/plus/integrations/reads/warnings.js.map +1 -1
- package/dist/plus/integrations/results.d.ts +30 -3
- package/dist/plus/integrations/results.js +2 -1
- package/dist/plus/integrations/results.js.map +1 -1
- package/docs/integrations.md +59 -6
- package/package.json +1 -1
package/docs/integrations.md
CHANGED
|
@@ -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.
|
|
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
|
|
828
|
-
`listProjects`)
|
|
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
|
|
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.
|
|
4
|
+
"version": "0.15.0",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "GitKraken",
|