@gitkraken/core-gitlens 0.9.4 → 0.9.5

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 (154) hide show
  1. package/CHANGELOG.md +22 -1
  2. package/dist/git/models/issue.d.ts +25 -2
  3. package/dist/git/models/issue.js +3 -1
  4. package/dist/git/models/issue.js.map +1 -1
  5. package/dist/git/models/pullRequest.d.ts +55 -5
  6. package/dist/git/models/pullRequest.js +5 -1
  7. package/dist/git/models/pullRequest.js.map +1 -1
  8. package/dist/git/utils/issue.utils.d.ts +4 -0
  9. package/dist/git/utils/issue.utils.js +4 -0
  10. package/dist/git/utils/issue.utils.js.map +1 -1
  11. package/dist/git/utils/pullRequest.utils.d.ts +4 -0
  12. package/dist/git/utils/pullRequest.utils.js +8 -0
  13. package/dist/git/utils/pullRequest.utils.js.map +1 -1
  14. package/dist/plus/git-github/api/github.d.ts +64 -4
  15. package/dist/plus/git-github/api/github.js +232 -15
  16. package/dist/plus/git-github/api/github.js.map +1 -1
  17. package/dist/plus/git-github/models.d.ts +48 -6
  18. package/dist/plus/git-github/models.js +11 -10
  19. package/dist/plus/git-github/models.js.map +1 -1
  20. package/dist/plus/integrations/fieldPresence.d.ts +75 -0
  21. package/dist/plus/integrations/fieldPresence.js +381 -0
  22. package/dist/plus/integrations/fieldPresence.js.map +1 -0
  23. package/dist/plus/integrations/index.d.ts +6 -4
  24. package/dist/plus/integrations/index.js +2 -1
  25. package/dist/plus/integrations/index.js.map +1 -1
  26. package/dist/plus/integrations/integrationService.d.ts +7 -3
  27. package/dist/plus/integrations/integrationService.js.map +1 -1
  28. package/dist/plus/integrations/manager.d.ts +56 -6
  29. package/dist/plus/integrations/models/gitHostIntegration.d.ts +103 -9
  30. package/dist/plus/integrations/models/gitHostIntegration.js +116 -5
  31. package/dist/plus/integrations/models/gitHostIntegration.js.map +1 -1
  32. package/dist/plus/integrations/models/integration.d.ts +91 -4
  33. package/dist/plus/integrations/models/integration.js +56 -7
  34. package/dist/plus/integrations/models/integration.js.map +1 -1
  35. package/dist/plus/integrations/models/issuesIntegration.d.ts +44 -3
  36. package/dist/plus/integrations/models/issuesIntegration.js +51 -1
  37. package/dist/plus/integrations/models/issuesIntegration.js.map +1 -1
  38. package/dist/plus/integrations/providers/azure/azure.js +3 -3
  39. package/dist/plus/integrations/providers/azure/azure.js.map +1 -1
  40. package/dist/plus/integrations/providers/azure/models.d.ts +36 -4
  41. package/dist/plus/integrations/providers/azure/models.js +118 -8
  42. package/dist/plus/integrations/providers/azure/models.js.map +1 -1
  43. package/dist/plus/integrations/providers/azureDevOps.d.ts +102 -5
  44. package/dist/plus/integrations/providers/azureDevOps.js +264 -45
  45. package/dist/plus/integrations/providers/azureDevOps.js.map +1 -1
  46. package/dist/plus/integrations/providers/azureDevOpsServer.d.ts +30 -6
  47. package/dist/plus/integrations/providers/azureDevOpsServer.js +82 -21
  48. package/dist/plus/integrations/providers/azureDevOpsServer.js.map +1 -1
  49. package/dist/plus/integrations/providers/bitbucket/bitbucket.d.ts +21 -1
  50. package/dist/plus/integrations/providers/bitbucket/bitbucket.js +74 -10
  51. package/dist/plus/integrations/providers/bitbucket/bitbucket.js.map +1 -1
  52. package/dist/plus/integrations/providers/bitbucket/models.d.ts +40 -3
  53. package/dist/plus/integrations/providers/bitbucket/models.js +30 -7
  54. package/dist/plus/integrations/providers/bitbucket/models.js.map +1 -1
  55. package/dist/plus/integrations/providers/bitbucket-server/models.d.ts +2 -6
  56. package/dist/plus/integrations/providers/bitbucket-server/models.js +1 -3
  57. package/dist/plus/integrations/providers/bitbucket-server/models.js.map +1 -1
  58. package/dist/plus/integrations/providers/bitbucket-server/pullRequestSearch.d.ts +3 -1
  59. package/dist/plus/integrations/providers/bitbucket-server/pullRequestSearch.js +4 -1
  60. package/dist/plus/integrations/providers/bitbucket-server/pullRequestSearch.js.map +1 -1
  61. package/dist/plus/integrations/providers/bitbucket-server.d.ts +2 -2
  62. package/dist/plus/integrations/providers/bitbucket-server.js +7 -5
  63. package/dist/plus/integrations/providers/bitbucket-server.js.map +1 -1
  64. package/dist/plus/integrations/providers/bitbucket.d.ts +22 -2
  65. package/dist/plus/integrations/providers/bitbucket.js +29 -6
  66. package/dist/plus/integrations/providers/bitbucket.js.map +1 -1
  67. package/dist/plus/integrations/providers/github.d.ts +40 -3
  68. package/dist/plus/integrations/providers/github.js +133 -11
  69. package/dist/plus/integrations/providers/github.js.map +1 -1
  70. package/dist/plus/integrations/providers/gitlab/gitlab.d.ts +34 -1
  71. package/dist/plus/integrations/providers/gitlab/gitlab.js +118 -4
  72. package/dist/plus/integrations/providers/gitlab/gitlab.js.map +1 -1
  73. package/dist/plus/integrations/providers/gitlab/models.d.ts +70 -5
  74. package/dist/plus/integrations/providers/gitlab/models.js +106 -13
  75. package/dist/plus/integrations/providers/gitlab/models.js.map +1 -1
  76. package/dist/plus/integrations/providers/gitlab.d.ts +31 -2
  77. package/dist/plus/integrations/providers/gitlab.js +48 -8
  78. package/dist/plus/integrations/providers/gitlab.js.map +1 -1
  79. package/dist/plus/integrations/providers/issueSorts.d.ts +1 -0
  80. package/dist/plus/integrations/providers/jira-server.d.ts +1 -0
  81. package/dist/plus/integrations/providers/jira-server.js +9 -6
  82. package/dist/plus/integrations/providers/jira-server.js.map +1 -1
  83. package/dist/plus/integrations/providers/jira.d.ts +20 -1
  84. package/dist/plus/integrations/providers/jira.js +101 -6
  85. package/dist/plus/integrations/providers/jira.js.map +1 -1
  86. package/dist/plus/integrations/providers/jiraIssueByKey.d.ts +79 -0
  87. package/dist/plus/integrations/providers/jiraIssueByKey.js +58 -7
  88. package/dist/plus/integrations/providers/jiraIssueByKey.js.map +1 -1
  89. package/dist/plus/integrations/providers/linear.d.ts +19 -1
  90. package/dist/plus/integrations/providers/linear.js +97 -5
  91. package/dist/plus/integrations/providers/linear.js.map +1 -1
  92. package/dist/plus/integrations/providers/linearIssuesEtag.d.ts +42 -0
  93. package/dist/plus/integrations/providers/linearIssuesEtag.js +94 -0
  94. package/dist/plus/integrations/providers/linearIssuesEtag.js.map +1 -0
  95. package/dist/plus/integrations/providers/models.d.ts +51 -7
  96. package/dist/plus/integrations/providers/models.js +45 -16
  97. package/dist/plus/integrations/providers/models.js.map +1 -1
  98. package/dist/plus/integrations/providers/providerErrors.js +8 -1
  99. package/dist/plus/integrations/providers/providerErrors.js.map +1 -1
  100. package/dist/plus/integrations/providers/providersApi.d.ts +62 -3
  101. package/dist/plus/integrations/providers/providersApi.js +145 -4
  102. package/dist/plus/integrations/providers/providersApi.js.map +1 -1
  103. package/dist/plus/integrations/providers/pullRequestReviews.d.ts +13 -0
  104. package/dist/plus/integrations/providers/pullRequestReviews.js +30 -6
  105. package/dist/plus/integrations/providers/pullRequestReviews.js.map +1 -1
  106. package/dist/plus/integrations/providers/trello.js +10 -7
  107. package/dist/plus/integrations/providers/trello.js.map +1 -1
  108. package/dist/plus/integrations/providers/utils/providerPaging.d.ts +11 -0
  109. package/dist/plus/integrations/providers/utils/providerPaging.js +47 -1
  110. package/dist/plus/integrations/providers/utils/providerPaging.js.map +1 -1
  111. package/dist/plus/integrations/providers/utils.d.ts +1 -1
  112. package/dist/plus/integrations/reads/batchEtags.d.ts +69 -0
  113. package/dist/plus/integrations/reads/batchEtags.js +114 -0
  114. package/dist/plus/integrations/reads/batchEtags.js.map +1 -0
  115. package/dist/plus/integrations/reads/counts.js +2 -2
  116. package/dist/plus/integrations/reads/counts.js.map +1 -1
  117. package/dist/plus/integrations/reads/currentAccount.js +2 -2
  118. package/dist/plus/integrations/reads/currentAccount.js.map +1 -1
  119. package/dist/plus/integrations/reads/drains.d.ts +13 -3
  120. package/dist/plus/integrations/reads/drains.js +29 -5
  121. package/dist/plus/integrations/reads/drains.js.map +1 -1
  122. package/dist/plus/integrations/reads/etag.d.ts +26 -0
  123. package/dist/plus/integrations/reads/etag.js +108 -0
  124. package/dist/plus/integrations/reads/etag.js.map +1 -0
  125. package/dist/plus/integrations/reads/hierarchy.js +3 -3
  126. package/dist/plus/integrations/reads/hierarchy.js.map +1 -1
  127. package/dist/plus/integrations/reads/issueBatch.d.ts +47 -16
  128. package/dist/plus/integrations/reads/issueBatch.js +55 -87
  129. package/dist/plus/integrations/reads/issueBatch.js.map +1 -1
  130. package/dist/plus/integrations/reads/issueTracker.d.ts +1 -1
  131. package/dist/plus/integrations/reads/issueTracker.js +4 -4
  132. package/dist/plus/integrations/reads/issueTracker.js.map +1 -1
  133. package/dist/plus/integrations/reads/issues.d.ts +1 -1
  134. package/dist/plus/integrations/reads/issues.js +4 -4
  135. package/dist/plus/integrations/reads/issues.js.map +1 -1
  136. package/dist/plus/integrations/reads/pullRequestBatch.d.ts +44 -6
  137. package/dist/plus/integrations/reads/pullRequestBatch.js +31 -34
  138. package/dist/plus/integrations/reads/pullRequestBatch.js.map +1 -1
  139. package/dist/plus/integrations/reads/pullRequestBranches.d.ts +5 -2
  140. package/dist/plus/integrations/reads/pullRequestBranches.js +4 -3
  141. package/dist/plus/integrations/reads/pullRequestBranches.js.map +1 -1
  142. package/dist/plus/integrations/reads/pullRequests.js +8 -4
  143. package/dist/plus/integrations/reads/pullRequests.js.map +1 -1
  144. package/dist/plus/integrations/reads/sweeps.js +8 -4
  145. package/dist/plus/integrations/reads/sweeps.js.map +1 -1
  146. package/dist/plus/integrations/reads/warnings.d.ts +23 -8
  147. package/dist/plus/integrations/reads/warnings.js +43 -19
  148. package/dist/plus/integrations/reads/warnings.js.map +1 -1
  149. package/dist/plus/integrations/results.d.ts +12 -4
  150. package/dist/plus/integrations/results.js +2 -0
  151. package/dist/plus/integrations/results.js.map +1 -1
  152. package/docs/integrations.md +385 -23
  153. package/docs/kepler-read-api-parity.md +16 -2
  154. package/package.json +1 -1
@@ -0,0 +1,381 @@
1
+ import "./constants.js";
2
+ //#region ../plus/integrations/src/fieldPresence.ts
3
+ const pullRequestFieldGroups = [
4
+ "description",
5
+ "reviews",
6
+ "reviewRequests",
7
+ "reviewDecision",
8
+ "assignees",
9
+ "checks",
10
+ "mergeable",
11
+ "diffStats",
12
+ "commitCount",
13
+ "comments",
14
+ "reactions",
15
+ "access",
16
+ "authoredByMe",
17
+ "stack"
18
+ ];
19
+ const issueFieldGroups = [
20
+ "description",
21
+ "assignees",
22
+ "labels",
23
+ "comments",
24
+ "reactions",
25
+ "access"
26
+ ];
27
+ /** Every group in `groups` listed as neither `fetched` nor `unavailable` is `not-requested`. */
28
+ function presenceOf(groups, fetched, unavailable = []) {
29
+ return Object.freeze(Object.fromEntries(groups.map((group) => [group, fetched.includes(group) ? "fetched" : unavailable.includes(group) ? "unavailable" : "not-requested"])));
30
+ }
31
+ function pullRequestPresenceOf(fetched, unavailable) {
32
+ return presenceOf(pullRequestFieldGroups, fetched, unavailable);
33
+ }
34
+ function issuePresenceOf(fetched, unavailable) {
35
+ return presenceOf(issueFieldGroups, fetched, unavailable);
36
+ }
37
+ /** GitLens' own lite fragment (`fromGitHubPullRequestLite`). `stack` is only selected against github.com. */
38
+ const gitHubLite = pullRequestPresenceOf(["description", "stack"]);
39
+ /**
40
+ * GitLens' own full fragment, which selects no reactions. The account-wide and batch reads return its rows as they
41
+ * are, GitHub's own review decision included: none stays none, even while a review is requested.
42
+ * `authoredByMe` needs the current account, which a read may fail to resolve, and the other reads never set it.
43
+ */
44
+ const gitHubFull = pullRequestPresenceOf([
45
+ "description",
46
+ "reviews",
47
+ "reviewRequests",
48
+ "reviewDecision",
49
+ "assignees",
50
+ "checks",
51
+ "mergeable",
52
+ "diffStats",
53
+ "commitCount",
54
+ "comments",
55
+ "access",
56
+ "stack"
57
+ ]);
58
+ const gitHubPullRequests = {
59
+ point: gitHubLite,
60
+ search: gitHubFull,
61
+ "search-summary": gitHubLite,
62
+ "text-search": gitHubFull,
63
+ account: gitHubFull,
64
+ "account-summary": gitHubLite,
65
+ repos: pullRequestPresenceOf([
66
+ "description",
67
+ "assignees",
68
+ "checks",
69
+ "mergeable",
70
+ "diffStats",
71
+ "commitCount",
72
+ "comments",
73
+ "reactions"
74
+ ]),
75
+ "repos-summary": pullRequestPresenceOf([
76
+ "description",
77
+ "assignees",
78
+ "mergeable",
79
+ "diffStats",
80
+ "comments",
81
+ "reactions"
82
+ ]),
83
+ batch: gitHubFull
84
+ };
85
+ /**
86
+ * GitHub Enterprise Server rejects the stack selection, so a read that carries `stack` on github.com can't here.
87
+ * provider-apis also gates check runs on the server version, which this table can't see, so its rollup on the
88
+ * repository-scoped read may come from commit statuses alone.
89
+ */
90
+ const gitHubEnterprisePullRequests = Object.fromEntries(Object.entries(gitHubPullRequests).map(([projection, presence]) => {
91
+ const enterprise = { ...presence };
92
+ if (enterprise.stack === "fetched") enterprise.stack = "unavailable";
93
+ if (projection === "repos") enterprise.checks = "not-requested";
94
+ return [projection, Object.freeze(enterprise)];
95
+ }));
96
+ /** GitLens' own issue fragment, which every native read selects with the body. */
97
+ const gitHubNativeIssue = presenceOf(issueFieldGroups, issueFieldGroups);
98
+ const gitHubIssues = {
99
+ point: gitHubNativeIssue,
100
+ search: gitHubNativeIssue,
101
+ account: gitHubNativeIssue,
102
+ repos: presenceOf(issueFieldGroups, [
103
+ "assignees",
104
+ "labels",
105
+ "comments",
106
+ "reactions"
107
+ ]),
108
+ batch: gitHubNativeIssue
109
+ };
110
+ /**
111
+ * GitLens' own GitLab reads: the point reads, and the free-text search. They select the description but leave it,
112
+ * and everything else beyond the merge request's identity and refs, off the row.
113
+ */
114
+ const gitLabOwn = pullRequestPresenceOf([], ["stack"]);
115
+ /**
116
+ * provider-apis' merge request fragment and normalizer, which every other GitLab read goes through. It turns a null
117
+ * count into 0: GitLab's schema makes `diffStatsSummary`, `commitCount` and `userNotesCount` nullable, so none is
118
+ * promised — except that GitLab.com's comment count resolver answers 0 rather than null, which a self-managed
119
+ * version may not.
120
+ */
121
+ function gitLabProviderApis(comments) {
122
+ return pullRequestPresenceOf([
123
+ "description",
124
+ "reviews",
125
+ "reviewRequests",
126
+ "assignees",
127
+ "checks",
128
+ "mergeable",
129
+ "reactions",
130
+ ...comments ? ["comments"] : []
131
+ ], ["stack"]);
132
+ }
133
+ function gitLabPullRequestsFor(providerApis) {
134
+ return {
135
+ point: gitLabOwn,
136
+ search: providerApis,
137
+ "text-search": gitLabOwn,
138
+ account: providerApis,
139
+ "account-summary": providerApis,
140
+ repos: providerApis,
141
+ "repos-summary": providerApis,
142
+ batch: providerApis
143
+ };
144
+ }
145
+ /**
146
+ * Azure DevOps pull requests have no assignees (both converters fill `assignees` with the reviewers, which `reviews` and
147
+ * `reviewRequests` already hold) and no reactions. Neither converter reads checks or counts.
148
+ */
149
+ const azureUnavailable = [
150
+ "assignees",
151
+ "reactions",
152
+ "stack"
153
+ ];
154
+ /** Every list read: Azure truncates a listed pull request's description (to 400 characters). */
155
+ const azureListed = pullRequestPresenceOf([
156
+ "reviews",
157
+ "reviewRequests",
158
+ "mergeable"
159
+ ], azureUnavailable);
160
+ const azurePullRequests = {
161
+ point: azureListed,
162
+ search: azureListed,
163
+ "text-search": azureListed,
164
+ account: azureListed,
165
+ "account-summary": azureListed,
166
+ repos: azureListed,
167
+ "repos-summary": azureListed,
168
+ batch: pullRequestPresenceOf([
169
+ "description",
170
+ "reviews",
171
+ "reviewRequests",
172
+ "mergeable"
173
+ ], azureUnavailable)
174
+ };
175
+ const azureServerPullRequests = {
176
+ ...azurePullRequests,
177
+ "search-summary": azureListed
178
+ };
179
+ /**
180
+ * Bitbucket pull requests have no assignees or reactions. Neither provider-apis nor GitLens reads their build
181
+ * statuses or mergeability: provider-apis fills a literal Mergeable, and GitLens' own converters leave it unset.
182
+ */
183
+ const bitbucketUnavailable = [
184
+ "assignees",
185
+ "reactions",
186
+ "stack"
187
+ ];
188
+ const bitbucketProviderApis = pullRequestPresenceOf([
189
+ "description",
190
+ "reviews",
191
+ "reviewRequests",
192
+ "comments"
193
+ ], bitbucketUnavailable);
194
+ const bitbucketPullRequests = {
195
+ point: pullRequestPresenceOf(["description"], bitbucketUnavailable),
196
+ search: bitbucketProviderApis,
197
+ "text-search": bitbucketProviderApis,
198
+ account: bitbucketProviderApis,
199
+ "account-summary": bitbucketProviderApis,
200
+ repos: bitbucketProviderApis,
201
+ "repos-summary": bitbucketProviderApis,
202
+ batch: pullRequestPresenceOf([
203
+ "description",
204
+ "reviews",
205
+ "reviewRequests"
206
+ ], bitbucketUnavailable)
207
+ };
208
+ /** provider-apis' and GitLens' own Data Center converters read the same fields. */
209
+ const bitbucketServerAll = pullRequestPresenceOf([
210
+ "description",
211
+ "reviews",
212
+ "reviewRequests",
213
+ "comments"
214
+ ], bitbucketUnavailable);
215
+ const bitbucketServerPullRequests = {
216
+ point: bitbucketServerAll,
217
+ search: bitbucketServerAll,
218
+ "search-summary": bitbucketServerAll,
219
+ "text-search": bitbucketServerAll,
220
+ account: bitbucketServerAll,
221
+ "account-summary": bitbucketServerAll,
222
+ repos: bitbucketServerAll,
223
+ "repos-summary": bitbucketServerAll,
224
+ batch: bitbucketServerAll
225
+ };
226
+ /**
227
+ * provider-apis' GitLab issue reads (GraphQL, and REST for the account-wide one). The repository's access isn't read.
228
+ * The GraphQL comment count is nullable like the merge request's, and passed through, so only GitLab.com's is
229
+ * promised; the REST one is always a number.
230
+ */
231
+ function gitLabIssuesFor(comments) {
232
+ const graphQL = issuePresenceOf([
233
+ "description",
234
+ "assignees",
235
+ "labels",
236
+ "reactions",
237
+ ...comments ? ["comments"] : []
238
+ ]);
239
+ return {
240
+ point: graphQL,
241
+ account: issuePresenceOf([
242
+ "description",
243
+ "assignees",
244
+ "labels",
245
+ "comments",
246
+ "reactions"
247
+ ]),
248
+ repos: graphQL,
249
+ batch: graphQL
250
+ };
251
+ }
252
+ /**
253
+ * Azure DevOps work items have no reactions (provider-apis' converter fills 0; GitLens' leaves it unset) and belong to
254
+ * a project, not a repository.
255
+ */
256
+ const azureWorkItemUnavailable = ["reactions", "access"];
257
+ /** provider-apis' work item converter, and GitLens' copy of it for the batch read. */
258
+ const azureWorkItem = issuePresenceOf([
259
+ "description",
260
+ "assignees",
261
+ "labels",
262
+ "comments"
263
+ ], azureWorkItemUnavailable);
264
+ /** GitLens' own work item converter, which drops the tags. */
265
+ const azureOwnWorkItem = issuePresenceOf([
266
+ "description",
267
+ "assignees",
268
+ "comments"
269
+ ], azureWorkItemUnavailable);
270
+ const azureIssues = {
271
+ point: azureOwnWorkItem,
272
+ account: azureWorkItem,
273
+ repos: azureWorkItem,
274
+ batch: azureWorkItem
275
+ };
276
+ const azureServerIssues = {
277
+ ...azureIssues,
278
+ search: azureOwnWorkItem
279
+ };
280
+ /**
281
+ * Bitbucket Cloud's legacy issues, which only the host's own `getIssue` and `searchMyIssues` read. They have no
282
+ * labels, their votes aren't reactions, and neither a comment count nor the repository's access is read.
283
+ */
284
+ const bitbucketIssue = issuePresenceOf(["description", "assignees"], ["labels", "reactions"]);
285
+ const bitbucketIssues = {
286
+ point: bitbucketIssue,
287
+ account: bitbucketIssue
288
+ };
289
+ /**
290
+ * Tracker issues belong to no repository, and a tracker's votes aren't reactions (and read 0 where voting is off), so
291
+ * neither group can be supplied.
292
+ */
293
+ const trackerUnavailable = ["reactions", "access"];
294
+ /**
295
+ * provider-apis' Jira converter counts the comments embedded in the issue, which Jira may cap, rather than reading
296
+ * their total.
297
+ */
298
+ const jiraProviderApis = issuePresenceOf([
299
+ "description",
300
+ "assignees",
301
+ "labels"
302
+ ], trackerUnavailable);
303
+ const jiraIssues = {
304
+ point: jiraProviderApis,
305
+ account: jiraProviderApis,
306
+ project: jiraProviderApis,
307
+ batch: issuePresenceOf([
308
+ "description",
309
+ "assignees",
310
+ "labels",
311
+ "comments"
312
+ ], trackerUnavailable)
313
+ };
314
+ const jiraServerIssues = {
315
+ ...jiraIssues,
316
+ batch: jiraProviderApis
317
+ };
318
+ /** provider-apis' Linear fragment selects no labels (it fills an empty list), comments or reactions. */
319
+ const linearIssue = issuePresenceOf(["description", "assignees"], ["access"]);
320
+ const linearIssues = {
321
+ point: linearIssue,
322
+ account: linearIssue,
323
+ project: linearIssue,
324
+ batch: linearIssue
325
+ };
326
+ /** A Trello card's description is never read; its members are its assignees. */
327
+ const trelloCard = issuePresenceOf([
328
+ "assignees",
329
+ "labels",
330
+ "comments"
331
+ ], trackerUnavailable);
332
+ const trelloIssues = {
333
+ point: trelloCard,
334
+ project: trelloCard
335
+ };
336
+ const pullRequestPresence = /* @__PURE__ */ new Map([
337
+ ["github", gitHubPullRequests],
338
+ ["cloud-github-enterprise", gitHubEnterprisePullRequests],
339
+ ["gitlab", gitLabPullRequestsFor(gitLabProviderApis(true))],
340
+ ["cloud-gitlab-self-hosted", gitLabPullRequestsFor(gitLabProviderApis(false))],
341
+ ["azureDevOps", azurePullRequests],
342
+ ["azure-devops-server", azureServerPullRequests],
343
+ ["bitbucket", bitbucketPullRequests],
344
+ ["bitbucket-server", bitbucketServerPullRequests]
345
+ ]);
346
+ const issuePresence = /* @__PURE__ */ new Map([
347
+ ["github", gitHubIssues],
348
+ ["cloud-github-enterprise", gitHubIssues],
349
+ ["gitlab", gitLabIssuesFor(true)],
350
+ ["cloud-gitlab-self-hosted", gitLabIssuesFor(false)],
351
+ ["azureDevOps", azureIssues],
352
+ ["azure-devops-server", azureServerIssues],
353
+ ["bitbucket", bitbucketIssues],
354
+ ["jira", jiraIssues],
355
+ ["jira-server", jiraServerIssues],
356
+ ["linear", linearIssues],
357
+ ["trello", trelloIssues]
358
+ ]);
359
+ function lookup(tables, providerId, projection) {
360
+ if (projection == null) return void 0;
361
+ const table = tables.get(providerId);
362
+ return table != null && Object.hasOwn(table, projection) ? table[projection] : void 0;
363
+ }
364
+ /**
365
+ * Which field groups the read that produced `pr` fetched, keyed by its provider and {@link PullRequestShape.projection}.
366
+ * `undefined` when either is unknown or the provider has no table yet — then nothing can be said about any field.
367
+ */
368
+ function getPullRequestFieldPresence(pr) {
369
+ return lookup(pullRequestPresence, pr.provider.id, pr.projection);
370
+ }
371
+ /**
372
+ * Which field groups the read that produced `issue` fetched, keyed by its provider and {@link IssueShape.projection}.
373
+ * `undefined` when either is unknown or the provider has no table yet — then nothing can be said about any field.
374
+ */
375
+ function getIssueFieldPresence(issue) {
376
+ return lookup(issuePresence, issue.provider.id, issue.projection);
377
+ }
378
+ //#endregion
379
+ export { getIssueFieldPresence, getPullRequestFieldPresence };
380
+
381
+ //# sourceMappingURL=fieldPresence.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fieldPresence.js","names":[],"sources":["../../../../plus/integrations/src/fieldPresence.ts"],"sourcesContent":["import type { IssueProjection, IssueShape } from '@gitlens/git/models/issue.js';\nimport type { PullRequestProjection, PullRequestShape } from '@gitlens/git/models/pullRequest.js';\nimport {\n\tGitCloudHostIntegrationId,\n\tGitSelfManagedHostIntegrationId,\n\tIssuesCloudHostIntegrationId,\n\tIssuesSelfManagedHostIntegrationId,\n} from './constants.js';\n\n/**\n * Whether a row's read fetched a field group.\n *\n * - `fetched`: the read asked for it and surfaces it, so an empty value means \"none\".\n * - `not-requested`: this read didn't ask for it, or asked but doesn't surface it faithfully. Ignore the value even\n * when one is present (some reads fill placeholders); another read may supply it.\n * - `unavailable`: this provider or host can't supply it on this read.\n */\nexport type FieldPresence = 'fetched' | 'not-requested' | 'unavailable';\n\n/** A group is `fetched` only when every field in it is. */\nexport type PullRequestFieldGroup =\n\t/** `body`. */\n\t| 'description'\n\t/** `latestReviews`. */\n\t| 'reviews'\n\t/**\n\t * `reviewRequests`: who is requested. Not each request's `isCodeOwner`, which only GitLens' own GitHub reads\n\t * report; every other row leaves it undefined.\n\t */\n\t| 'reviewRequests'\n\t/**\n\t * `reviewDecision`. Only GitHub reports one; elsewhere it is derived from the reviewers' states on the row, which\n\t * ignores the host's own approval rules, so it is never `fetched` there — derive it from `reviews` and\n\t * `reviewRequests` instead.\n\t */\n\t| 'reviewDecision'\n\t/** `assignees`. */\n\t| 'assignees'\n\t/** `statusCheckRollupState`, on the `PullRequest` class. */\n\t| 'checks'\n\t/** `mergeableState`. */\n\t| 'mergeable'\n\t/** `additions`, `deletions` and `filesChanged`. */\n\t| 'diffStats'\n\t/** `commitCount`, on the `PullRequest` class. */\n\t| 'commitCount'\n\t/** `commentsCount`. */\n\t| 'comments'\n\t/** `thumbsUpCount`. */\n\t| 'reactions'\n\t/** `viewerCanUpdate`, on the `PullRequest` class, and `repository.accessLevel`. */\n\t| 'access'\n\t/** `authoredByMe`, and the `viewer` it was matched against. */\n\t| 'authoredByMe'\n\t/** `stack`. */\n\t| 'stack';\n\n/** A group is `fetched` only when every field in it is. */\nexport type IssueFieldGroup =\n\t/** `body`. */\n\t| 'description'\n\t/** `assignees`. */\n\t| 'assignees'\n\t/** `labels`. */\n\t| 'labels'\n\t/** `commentsCount`. */\n\t| 'comments'\n\t/** `thumbsUpCount`. */\n\t| 'reactions'\n\t/** `repository.accessLevel`. */\n\t| 'access';\n\ntype Presence<G extends string> = Readonly<Record<G, FieldPresence>>;\ntype PresenceTable<P extends string, G extends string> = Readonly<Partial<Record<P, Presence<G>>>>;\n\nconst pullRequestFieldGroups: readonly PullRequestFieldGroup[] = [\n\t'description',\n\t'reviews',\n\t'reviewRequests',\n\t'reviewDecision',\n\t'assignees',\n\t'checks',\n\t'mergeable',\n\t'diffStats',\n\t'commitCount',\n\t'comments',\n\t'reactions',\n\t'access',\n\t'authoredByMe',\n\t'stack',\n];\n\nconst issueFieldGroups: readonly IssueFieldGroup[] = [\n\t'description',\n\t'assignees',\n\t'labels',\n\t'comments',\n\t'reactions',\n\t'access',\n];\n\n/** Every group in `groups` listed as neither `fetched` nor `unavailable` is `not-requested`. */\nfunction presenceOf<G extends string>(\n\tgroups: readonly G[],\n\tfetched: readonly G[],\n\tunavailable: readonly G[] = [],\n): Presence<G> {\n\treturn Object.freeze(\n\t\tObject.fromEntries(\n\t\t\tgroups.map(\n\t\t\t\tgroup =>\n\t\t\t\t\t[\n\t\t\t\t\t\tgroup,\n\t\t\t\t\t\tfetched.includes(group)\n\t\t\t\t\t\t\t? 'fetched'\n\t\t\t\t\t\t\t: unavailable.includes(group)\n\t\t\t\t\t\t\t\t? 'unavailable'\n\t\t\t\t\t\t\t\t: 'not-requested',\n\t\t\t\t\t] as const,\n\t\t\t),\n\t\t) as Record<G, FieldPresence>,\n\t);\n}\n\nfunction pullRequestPresenceOf(\n\tfetched: readonly PullRequestFieldGroup[],\n\tunavailable?: readonly PullRequestFieldGroup[],\n): Presence<PullRequestFieldGroup> {\n\treturn presenceOf(pullRequestFieldGroups, fetched, unavailable);\n}\n\nfunction issuePresenceOf(\n\tfetched: readonly IssueFieldGroup[],\n\tunavailable?: readonly IssueFieldGroup[],\n): Presence<IssueFieldGroup> {\n\treturn presenceOf(issueFieldGroups, fetched, unavailable);\n}\n\n/** GitLens' own lite fragment (`fromGitHubPullRequestLite`). `stack` is only selected against github.com. */\nconst gitHubLite = pullRequestPresenceOf(['description', 'stack']);\n\n/**\n * GitLens' own full fragment, which selects no reactions. The account-wide and batch reads return its rows as they\n * are, GitHub's own review decision included: none stays none, even while a review is requested.\n * `authoredByMe` needs the current account, which a read may fail to resolve, and the other reads never set it.\n */\nconst gitHubFull = pullRequestPresenceOf([\n\t'description',\n\t'reviews',\n\t'reviewRequests',\n\t'reviewDecision',\n\t'assignees',\n\t'checks',\n\t'mergeable',\n\t'diffStats',\n\t'commitCount',\n\t'comments',\n\t'access',\n\t'stack',\n]);\n\nconst gitHubPullRequests: PresenceTable<PullRequestProjection, PullRequestFieldGroup> = {\n\tpoint: gitHubLite,\n\tsearch: gitHubFull,\n\t'search-summary': gitHubLite,\n\t'text-search': gitHubFull,\n\taccount: gitHubFull,\n\t// The lite fragment's own rows.\n\t'account-summary': gitHubLite,\n\t// provider-apis' own fragment and normalizer. Its review-state map has no DISMISSED, so a dismissed review is\n\t// dropped (and none carries a `commitOid`); it removes code-owner requests; it derives the review decision from\n\t// that list rather than reading GitHub's; and it doesn't read `repository.accessLevel`.\n\trepos: pullRequestPresenceOf([\n\t\t'description',\n\t\t'assignees',\n\t\t'checks',\n\t\t'mergeable',\n\t\t'diffStats',\n\t\t'commitCount',\n\t\t'comments',\n\t\t'reactions',\n\t]),\n\t// `summary` drops the `commits` subtree that carries both the check rollup and the commit count.\n\t'repos-summary': pullRequestPresenceOf([\n\t\t'description',\n\t\t'assignees',\n\t\t'mergeable',\n\t\t'diffStats',\n\t\t'comments',\n\t\t'reactions',\n\t]),\n\tbatch: gitHubFull,\n};\n\n/**\n * GitHub Enterprise Server rejects the stack selection, so a read that carries `stack` on github.com can't here.\n * provider-apis also gates check runs on the server version, which this table can't see, so its rollup on the\n * repository-scoped read may come from commit statuses alone.\n */\nconst gitHubEnterprisePullRequests: PresenceTable<PullRequestProjection, PullRequestFieldGroup> = Object.fromEntries(\n\tObject.entries(gitHubPullRequests).map(([projection, presence]) => {\n\t\tconst enterprise: Record<PullRequestFieldGroup, FieldPresence> = { ...presence };\n\t\tif (enterprise.stack === 'fetched') {\n\t\t\tenterprise.stack = 'unavailable';\n\t\t}\n\t\tif (projection === 'repos') {\n\t\t\tenterprise.checks = 'not-requested';\n\t\t}\n\t\treturn [projection, Object.freeze(enterprise)];\n\t}),\n);\n\n/** GitLens' own issue fragment, which every native read selects with the body. */\nconst gitHubNativeIssue = presenceOf(issueFieldGroups, issueFieldGroups);\n\nconst gitHubIssues: PresenceTable<IssueProjection, IssueFieldGroup> = {\n\tpoint: gitHubNativeIssue,\n\tsearch: gitHubNativeIssue,\n\taccount: gitHubNativeIssue,\n\t// provider-apis' own fragment selects neither the body nor the repository's `viewerPermission`.\n\trepos: presenceOf(issueFieldGroups, ['assignees', 'labels', 'comments', 'reactions']),\n\tbatch: gitHubNativeIssue,\n};\n\n/*\n * Every other provider. None of them reads the viewer's access (`repository.accessLevel` is absent on every row),\n * resolves `authoredByMe` reliably, or has stacks. provider-apis honors neither `summary` nor\n * `includeReviews` for them, so each `-summary` tag reads like its full one.\n */\n\n/**\n * GitLens' own GitLab reads: the point reads, and the free-text search. They select the description but leave it,\n * and everything else beyond the merge request's identity and refs, off the row.\n */\nconst gitLabOwn = pullRequestPresenceOf([], ['stack']);\n\n/**\n * provider-apis' merge request fragment and normalizer, which every other GitLab read goes through. It turns a null\n * count into 0: GitLab's schema makes `diffStatsSummary`, `commitCount` and `userNotesCount` nullable, so none is\n * promised — except that GitLab.com's comment count resolver answers 0 rather than null, which a self-managed\n * version may not.\n */\nfunction gitLabProviderApis(comments: boolean): Presence<PullRequestFieldGroup> {\n\treturn pullRequestPresenceOf(\n\t\t[\n\t\t\t'description',\n\t\t\t'reviews',\n\t\t\t'reviewRequests',\n\t\t\t'assignees',\n\t\t\t'checks',\n\t\t\t'mergeable',\n\t\t\t'reactions',\n\t\t\t...(comments ? (['comments'] as const) : []),\n\t\t],\n\t\t['stack'],\n\t);\n}\n\nfunction gitLabPullRequestsFor(\n\tproviderApis: Presence<PullRequestFieldGroup>,\n): PresenceTable<PullRequestProjection, PullRequestFieldGroup> {\n\treturn {\n\t\tpoint: gitLabOwn,\n\t\tsearch: providerApis,\n\t\t'text-search': gitLabOwn,\n\t\taccount: providerApis,\n\t\t'account-summary': providerApis,\n\t\trepos: providerApis,\n\t\t'repos-summary': providerApis,\n\t\tbatch: providerApis,\n\t};\n}\n\n/**\n * Azure DevOps pull requests have no assignees (both converters fill `assignees` with the reviewers, which `reviews` and\n * `reviewRequests` already hold) and no reactions. Neither converter reads checks or counts.\n */\nconst azureUnavailable: readonly PullRequestFieldGroup[] = ['assignees', 'reactions', 'stack'];\n/** Every list read: Azure truncates a listed pull request's description (to 400 characters). */\nconst azureListed = pullRequestPresenceOf(['reviews', 'reviewRequests', 'mergeable'], azureUnavailable);\n/** The batch reads fetch each pull request by id, which returns the whole description. */\nconst azureById = pullRequestPresenceOf(['description', 'reviews', 'reviewRequests', 'mergeable'], azureUnavailable);\n\nconst azurePullRequests: PresenceTable<PullRequestProjection, PullRequestFieldGroup> = {\n\t// GitLens' own converter, which leaves the description off the row.\n\tpoint: azureListed,\n\tsearch: azureListed,\n\t'text-search': azureListed,\n\taccount: azureListed,\n\t'account-summary': azureListed,\n\trepos: azureListed,\n\t'repos-summary': azureListed,\n\tbatch: azureById,\n};\n\nconst azureServerPullRequests: PresenceTable<PullRequestProjection, PullRequestFieldGroup> = {\n\t...azurePullRequests,\n\t'search-summary': azureListed,\n};\n\n/**\n * Bitbucket pull requests have no assignees or reactions. Neither provider-apis nor GitLens reads their build\n * statuses or mergeability: provider-apis fills a literal Mergeable, and GitLens' own converters leave it unset.\n */\nconst bitbucketUnavailable: readonly PullRequestFieldGroup[] = ['assignees', 'reactions', 'stack'];\nconst bitbucketProviderApis = pullRequestPresenceOf(\n\t['description', 'reviews', 'reviewRequests', 'comments'],\n\tbitbucketUnavailable,\n);\n\nconst bitbucketPullRequests: PresenceTable<PullRequestProjection, PullRequestFieldGroup> = {\n\t// GitLens' own converter, which drops the comment count. The commit read selects `+values.*`, which isn't\n\t// known to bring the participants the reviews come from, as the other two point reads do.\n\tpoint: pullRequestPresenceOf(['description'], bitbucketUnavailable),\n\tsearch: bitbucketProviderApis,\n\t'text-search': bitbucketProviderApis,\n\taccount: bitbucketProviderApis,\n\t'account-summary': bitbucketProviderApis,\n\trepos: bitbucketProviderApis,\n\t'repos-summary': bitbucketProviderApis,\n\t// GitLens' own converter over reads that do select the participants.\n\tbatch: pullRequestPresenceOf(['description', 'reviews', 'reviewRequests'], bitbucketUnavailable),\n};\n\n/** provider-apis' and GitLens' own Data Center converters read the same fields. */\nconst bitbucketServerAll = pullRequestPresenceOf(\n\t['description', 'reviews', 'reviewRequests', 'comments'],\n\tbitbucketUnavailable,\n);\nconst bitbucketServerPullRequests: PresenceTable<PullRequestProjection, PullRequestFieldGroup> = {\n\tpoint: bitbucketServerAll,\n\tsearch: bitbucketServerAll,\n\t'search-summary': bitbucketServerAll,\n\t'text-search': bitbucketServerAll,\n\taccount: bitbucketServerAll,\n\t'account-summary': bitbucketServerAll,\n\trepos: bitbucketServerAll,\n\t'repos-summary': bitbucketServerAll,\n\tbatch: bitbucketServerAll,\n};\n\n/**\n * provider-apis' GitLab issue reads (GraphQL, and REST for the account-wide one). The repository's access isn't read.\n * The GraphQL comment count is nullable like the merge request's, and passed through, so only GitLab.com's is\n * promised; the REST one is always a number.\n */\nfunction gitLabIssuesFor(comments: boolean): PresenceTable<IssueProjection, IssueFieldGroup> {\n\tconst graphQL = issuePresenceOf([\n\t\t'description',\n\t\t'assignees',\n\t\t'labels',\n\t\t'reactions',\n\t\t...(comments ? (['comments'] as const) : []),\n\t]);\n\treturn {\n\t\tpoint: graphQL,\n\t\taccount: issuePresenceOf(['description', 'assignees', 'labels', 'comments', 'reactions']),\n\t\trepos: graphQL,\n\t\tbatch: graphQL,\n\t};\n}\n\n/**\n * Azure DevOps work items have no reactions (provider-apis' converter fills 0; GitLens' leaves it unset) and belong to\n * a project, not a repository.\n */\nconst azureWorkItemUnavailable: readonly IssueFieldGroup[] = ['reactions', 'access'];\n/** provider-apis' work item converter, and GitLens' copy of it for the batch read. */\nconst azureWorkItem = issuePresenceOf(['description', 'assignees', 'labels', 'comments'], azureWorkItemUnavailable);\n/** GitLens' own work item converter, which drops the tags. */\nconst azureOwnWorkItem = issuePresenceOf(['description', 'assignees', 'comments'], azureWorkItemUnavailable);\n\nconst azureIssues: PresenceTable<IssueProjection, IssueFieldGroup> = {\n\tpoint: azureOwnWorkItem,\n\taccount: azureWorkItem,\n\trepos: azureWorkItem,\n\tbatch: azureWorkItem,\n};\n\nconst azureServerIssues: PresenceTable<IssueProjection, IssueFieldGroup> = {\n\t...azureIssues,\n\tsearch: azureOwnWorkItem,\n};\n\n/**\n * Bitbucket Cloud's legacy issues, which only the host's own `getIssue` and `searchMyIssues` read. They have no\n * labels, their votes aren't reactions, and neither a comment count nor the repository's access is read.\n */\nconst bitbucketIssue = issuePresenceOf(['description', 'assignees'], ['labels', 'reactions']);\nconst bitbucketIssues: PresenceTable<IssueProjection, IssueFieldGroup> = {\n\tpoint: bitbucketIssue,\n\taccount: bitbucketIssue,\n};\n\n/**\n * Tracker issues belong to no repository, and a tracker's votes aren't reactions (and read 0 where voting is off), so\n * neither group can be supplied.\n */\nconst trackerUnavailable: readonly IssueFieldGroup[] = ['reactions', 'access'];\n/**\n * provider-apis' Jira converter counts the comments embedded in the issue, which Jira may cap, rather than reading\n * their total.\n */\nconst jiraProviderApis = issuePresenceOf(['description', 'assignees', 'labels'], trackerUnavailable);\n\nconst jiraIssues: PresenceTable<IssueProjection, IssueFieldGroup> = {\n\tpoint: jiraProviderApis,\n\taccount: jiraProviderApis,\n\tproject: jiraProviderApis,\n\t// GitLens' own by-key read, which reads the comment total.\n\tbatch: issuePresenceOf(['description', 'assignees', 'labels', 'comments'], trackerUnavailable),\n};\n\nconst jiraServerIssues: PresenceTable<IssueProjection, IssueFieldGroup> = {\n\t...jiraIssues,\n\tbatch: jiraProviderApis,\n};\n\n/** provider-apis' Linear fragment selects no labels (it fills an empty list), comments or reactions. */\nconst linearIssue = issuePresenceOf(['description', 'assignees'], ['access']);\nconst linearIssues: PresenceTable<IssueProjection, IssueFieldGroup> = {\n\tpoint: linearIssue,\n\taccount: linearIssue,\n\tproject: linearIssue,\n\tbatch: linearIssue,\n};\n\n/** A Trello card's description is never read; its members are its assignees. */\nconst trelloCard = issuePresenceOf(['assignees', 'labels', 'comments'], trackerUnavailable);\nconst trelloIssues: PresenceTable<IssueProjection, IssueFieldGroup> = {\n\tpoint: trelloCard,\n\tproject: trelloCard,\n};\n\nconst pullRequestPresence = new Map<string, PresenceTable<PullRequestProjection, PullRequestFieldGroup>>([\n\t[GitCloudHostIntegrationId.GitHub, gitHubPullRequests],\n\t[GitSelfManagedHostIntegrationId.CloudGitHubEnterprise, gitHubEnterprisePullRequests],\n\t[GitCloudHostIntegrationId.GitLab, gitLabPullRequestsFor(gitLabProviderApis(true))],\n\t[GitSelfManagedHostIntegrationId.CloudGitLabSelfHosted, gitLabPullRequestsFor(gitLabProviderApis(false))],\n\t[GitCloudHostIntegrationId.AzureDevOps, azurePullRequests],\n\t[GitSelfManagedHostIntegrationId.AzureDevOpsServer, azureServerPullRequests],\n\t[GitCloudHostIntegrationId.Bitbucket, bitbucketPullRequests],\n\t[GitSelfManagedHostIntegrationId.BitbucketServer, bitbucketServerPullRequests],\n]);\n\nconst issuePresence = new Map<string, PresenceTable<IssueProjection, IssueFieldGroup>>([\n\t[GitCloudHostIntegrationId.GitHub, gitHubIssues],\n\t[GitSelfManagedHostIntegrationId.CloudGitHubEnterprise, gitHubIssues],\n\t[GitCloudHostIntegrationId.GitLab, gitLabIssuesFor(true)],\n\t[GitSelfManagedHostIntegrationId.CloudGitLabSelfHosted, gitLabIssuesFor(false)],\n\t[GitCloudHostIntegrationId.AzureDevOps, azureIssues],\n\t[GitSelfManagedHostIntegrationId.AzureDevOpsServer, azureServerIssues],\n\t[GitCloudHostIntegrationId.Bitbucket, bitbucketIssues],\n\t[IssuesCloudHostIntegrationId.Jira, jiraIssues],\n\t[IssuesSelfManagedHostIntegrationId.JiraServer, jiraServerIssues],\n\t[IssuesCloudHostIntegrationId.Linear, linearIssues],\n\t[IssuesCloudHostIntegrationId.Trello, trelloIssues],\n]);\n\nfunction lookup<P extends string, G extends string>(\n\ttables: ReadonlyMap<string, PresenceTable<P, G>>,\n\tproviderId: string,\n\tprojection: P | undefined,\n): Presence<G> | undefined {\n\tif (projection == null) return undefined;\n\n\tconst table = tables.get(providerId);\n\t// `hasOwn` so a projection read off an untrusted row can't resolve to an `Object.prototype` member.\n\treturn table != null && Object.hasOwn(table, projection) ? table[projection] : undefined;\n}\n\n/**\n * Which field groups the read that produced `pr` fetched, keyed by its provider and {@link PullRequestShape.projection}.\n * `undefined` when either is unknown or the provider has no table yet — then nothing can be said about any field.\n */\nexport function getPullRequestFieldPresence(\n\tpr: PullRequestShape,\n): Readonly<Record<PullRequestFieldGroup, FieldPresence>> | undefined {\n\treturn lookup(pullRequestPresence, pr.provider.id, pr.projection);\n}\n\n/**\n * Which field groups the read that produced `issue` fetched, keyed by its provider and {@link IssueShape.projection}.\n * `undefined` when either is unknown or the provider has no table yet — then nothing can be said about any field.\n */\nexport function getIssueFieldPresence(issue: IssueShape): Readonly<Record<IssueFieldGroup, FieldPresence>> | undefined {\n\treturn lookup(issuePresence, issue.provider.id, issue.projection);\n}\n"],"mappings":"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"}
@@ -1,13 +1,14 @@
1
1
  import { CacheController } from "../../utils/promiseCache.js";
2
- import { IssueSearchCapabilities, IssueSearchCriteria, IssueSearchRelationship, IssueStateFilter } from "../../git/models/issue.js";
3
- import { PullRequestFilter, PullRequestSearchCapabilities, PullRequestSearchCriteria, PullRequestStateFilter } from "../../git/models/pullRequest.js";
2
+ import { IssueProjection, IssueSearchCapabilities, IssueSearchCriteria, IssueSearchRelationship, IssueStateFilter } from "../../git/models/issue.js";
3
+ import { PullRequestFilter, PullRequestProjection, PullRequestSearchCapabilities, PullRequestSearchCriteria, PullRequestStateFilter } from "../../git/models/pullRequest.js";
4
4
  import { Account } from "../../git/models/author.js";
5
5
  import { AuthenticationSessionLike, CloudIntegrationAuthType, CloudIntegrationConnection, CloudIntegrationType, ConfiguredIntegrationDescriptor, ProviderAuthenticationSession, toCloudIntegrationType, toIntegrationId } from "./authentication/models.js";
6
6
  import { GitCloudHostIntegrationId, GitSelfManagedHostIntegrationId, IntegrationIds, IssuesCloudHostIntegrationId, IssuesSelfManagedHostIntegrationId, SupportedCloudIntegrationIds, isIntegrationId, isSupportedCloudIntegrationId } from "./constants.js";
7
7
  import { Source, Sources } from "./telemetry.js";
8
8
  import { ConfiguredIntegrationsChangeEvent } from "./authentication/configuredIntegrationService.js";
9
- import { IssueFilter } from "./providerFilters.js";
10
9
  import { ConnectionStateChangeEvent, ProviderBroadenResult, ProviderOrganization, ProviderPageInfo, ProviderPagedResult, ProviderRepositoryShape, ProviderResult, ProviderSweepResult, ProviderWarning, ProviderWarningCause, ProviderWarningCauseReason, ProviderWarningKind, ProviderWarningOmission, ProviderWarningOmissionKind, ProviderWarningOmissionRecovery, ProviderWarningOmissionScope, ProviderWarningScope, RepositoryIdentity, RepositoryResolution, RepositoryResolutionStatus, ResolveRepositoryResult } from "./results.js";
10
+ import { IssueFilter } from "./providerFilters.js";
11
+ import { IssueEtagInclude, PullRequestEtagInclude } from "./models/integration.js";
11
12
  import { IssueCountResult, IssueCountScope, PullRequestCountResult, PullRequestCountScope } from "./reads/counts.js";
12
13
  import { CurrentAccountResult } from "./reads/currentAccount.js";
13
14
  import { IssueBatchResult, IssueBatchTarget } from "./reads/issueBatch.js";
@@ -17,6 +18,7 @@ import { ClosedPullRequestSweepOptions, IntegrationManager, ListOrgsOptions, Lis
17
18
  import { IntegrationAuthenticationProvider, IntegrationAuthenticationProviderDescriptor, IntegrationAuthenticationSessionDescriptor } from "./authentication/integrationAuthenticationProvider.js";
18
19
  import { AccountProvider, AuthenticationSessionsChangeEvent, ConfigChangeEvent, ConfigProvider, HttpProvider, IntegrationServiceHooks, IntegrationStorageProvider, IntegrationsRemoteConfig, RepositoriesProvider } from "./context.js";
19
20
  import { ManualTokenAuthProviderOptions, createManualTokenAuthProvider } from "./authentication/manualTokenProvider.js";
21
+ import { FieldPresence, IssueFieldGroup, PullRequestFieldGroup, getIssueFieldPresence, getPullRequestFieldPresence } from "./fieldPresence.js";
20
22
  import { areDomainsOnSameHost, hostFromDomain } from "./utils/domain.utils.js";
21
23
  //#region ../plus/integrations/src/index.d.ts
22
24
  /** A cached provider value, which may still be resolving. */
@@ -76,5 +78,5 @@ export interface IntegrationManagerContext {
76
78
  */
77
79
  export declare function createIntegrationManager(ctx: IntegrationManagerContext): IntegrationManager;
78
80
  //#endregion
79
- export { type Account, type AccountProvider, type AuthenticationSessionLike, type AuthenticationSessionsChangeEvent, type ClosedPullRequestSweepOptions, type CloudIntegrationAuthType, type CloudIntegrationConnection, type CloudIntegrationType, type ConfigChangeEvent, type ConfigProvider, type ConfiguredIntegrationDescriptor, type ConfiguredIntegrationsChangeEvent, type ConnectionStateChangeEvent, type CurrentAccountResult, GitCloudHostIntegrationId, GitSelfManagedHostIntegrationId, type HttpProvider, type IntegrationAuthenticationProvider, type IntegrationAuthenticationProviderDescriptor, type IntegrationAuthenticationSessionDescriptor, type IntegrationIds, type IntegrationManager, type IntegrationServiceHooks, type IntegrationStorageProvider, type IntegrationsRemoteConfig, type IssueBatchResult, type IssueBatchTarget, type IssueCountResult, type IssueCountScope, IssueFilter, type IssueSearchCapabilities, type IssueSearchCriteria, type IssueSearchRelationship, type IssueStateFilter, IssuesCloudHostIntegrationId, IssuesSelfManagedHostIntegrationId, type ListOrgsOptions, type ListProjectsOptions, type ManualTokenAuthProviderOptions, type ProviderAuthenticationSession, type ProviderBroadenOrg, type ProviderBroadenResult, type ProviderOrganization, type ProviderPageInfo, type ProviderPagedResult, type ProviderRepositoriesInput, type ProviderRepositoryInput, type ProviderRepositoryShape, type ProviderResult, type ProviderSweepResult, type ProviderSweepTarget, type ProviderSweepTargetEvent, type ProviderWarning, type ProviderWarningCause, type ProviderWarningCauseReason, type ProviderWarningKind, type ProviderWarningOmission, type ProviderWarningOmissionKind, type ProviderWarningOmissionRecovery, type ProviderWarningOmissionScope, type ProviderWarningScope, type PullRequestBatchResult, type PullRequestBatchTarget, type PullRequestBranchResult, type PullRequestBranchTarget, type PullRequestCountResult, type PullRequestCountScope, PullRequestFilter, type PullRequestSearchCapabilities, type PullRequestSearchCriteria, type PullRequestStateFilter, type PullRequestSweepOptions, type RepositoriesProvider, type RepositoryIdentity, type RepositoryResolution, type RepositoryResolutionStatus, type ResolveRepositoryResult, type Source, type Sources, type SupportedCloudIntegrationIds, areDomainsOnSameHost, createManualTokenAuthProvider, hostFromDomain, isIntegrationId, isSupportedCloudIntegrationId, toCloudIntegrationType, toIntegrationId };
81
+ export { type Account, type AccountProvider, type AuthenticationSessionLike, type AuthenticationSessionsChangeEvent, type ClosedPullRequestSweepOptions, type CloudIntegrationAuthType, type CloudIntegrationConnection, type CloudIntegrationType, type ConfigChangeEvent, type ConfigProvider, type ConfiguredIntegrationDescriptor, type ConfiguredIntegrationsChangeEvent, type ConnectionStateChangeEvent, type CurrentAccountResult, type FieldPresence, GitCloudHostIntegrationId, GitSelfManagedHostIntegrationId, type HttpProvider, type IntegrationAuthenticationProvider, type IntegrationAuthenticationProviderDescriptor, type IntegrationAuthenticationSessionDescriptor, type IntegrationIds, type IntegrationManager, type IntegrationServiceHooks, type IntegrationStorageProvider, type IntegrationsRemoteConfig, type IssueBatchResult, type IssueBatchTarget, type IssueCountResult, type IssueCountScope, type IssueEtagInclude, type IssueFieldGroup, IssueFilter, type IssueProjection, type IssueSearchCapabilities, type IssueSearchCriteria, type IssueSearchRelationship, type IssueStateFilter, IssuesCloudHostIntegrationId, IssuesSelfManagedHostIntegrationId, type ListOrgsOptions, type ListProjectsOptions, type ManualTokenAuthProviderOptions, type ProviderAuthenticationSession, type ProviderBroadenOrg, type ProviderBroadenResult, type ProviderOrganization, type ProviderPageInfo, type ProviderPagedResult, type ProviderRepositoriesInput, type ProviderRepositoryInput, type ProviderRepositoryShape, type ProviderResult, type ProviderSweepResult, type ProviderSweepTarget, type ProviderSweepTargetEvent, type ProviderWarning, type ProviderWarningCause, type ProviderWarningCauseReason, type ProviderWarningKind, type ProviderWarningOmission, type ProviderWarningOmissionKind, type ProviderWarningOmissionRecovery, type ProviderWarningOmissionScope, type ProviderWarningScope, type PullRequestBatchResult, type PullRequestBatchTarget, type PullRequestBranchResult, type PullRequestBranchTarget, type PullRequestCountResult, type PullRequestCountScope, type PullRequestEtagInclude, type PullRequestFieldGroup, PullRequestFilter, type PullRequestProjection, type PullRequestSearchCapabilities, type PullRequestSearchCriteria, type PullRequestStateFilter, type PullRequestSweepOptions, type RepositoriesProvider, type RepositoryIdentity, type RepositoryResolution, type RepositoryResolutionStatus, type ResolveRepositoryResult, type Source, type Sources, type SupportedCloudIntegrationIds, areDomainsOnSameHost, createManualTokenAuthProvider, getIssueFieldPresence, getPullRequestFieldPresence, hostFromDomain, isIntegrationId, isSupportedCloudIntegrationId, toCloudIntegrationType, toIntegrationId };
80
82
  //# sourceMappingURL=index.d.ts.map
@@ -1,6 +1,7 @@
1
1
  import { CacheController } from "../../utils/promiseCache.js";
2
2
  import { PullRequestFilter } from "../../git/models/pullRequest.js";
3
3
  import { GitCloudHostIntegrationId, GitSelfManagedHostIntegrationId, IssuesCloudHostIntegrationId, IssuesSelfManagedHostIntegrationId, isIntegrationId, isSupportedCloudIntegrationId } from "./constants.js";
4
+ import { getIssueFieldPresence, getPullRequestFieldPresence } from "./fieldPresence.js";
4
5
  import { toCloudIntegrationType, toIntegrationId } from "./authentication/models.js";
5
6
  import { IssueFilter } from "./providerFilters.js";
6
7
  import { areDomainsOnSameHost, hostFromDomain } from "./utils/domain.utils.js";
@@ -50,6 +51,6 @@ function createIntegrationManager(ctx) {
50
51
  });
51
52
  }
52
53
  //#endregion
53
- export { GitCloudHostIntegrationId, GitSelfManagedHostIntegrationId, IssueFilter, IssuesCloudHostIntegrationId, IssuesSelfManagedHostIntegrationId, PullRequestFilter, areDomainsOnSameHost, createIntegrationManager, createManualTokenAuthProvider, hostFromDomain, isIntegrationId, isSupportedCloudIntegrationId, toCloudIntegrationType, toIntegrationId };
54
+ export { GitCloudHostIntegrationId, GitSelfManagedHostIntegrationId, IssueFilter, IssuesCloudHostIntegrationId, IssuesSelfManagedHostIntegrationId, PullRequestFilter, areDomainsOnSameHost, createIntegrationManager, createManualTokenAuthProvider, getIssueFieldPresence, getPullRequestFieldPresence, hostFromDomain, isIntegrationId, isSupportedCloudIntegrationId, toCloudIntegrationType, toIntegrationId };
54
55
 
55
56
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../../plus/integrations/src/index.ts"],"sourcesContent":["// Public facade for `@gitlens/integrations`.\n//\n// External consumers should import from this entry point only, not from the\n// package's internal subpaths, with one exception: the lightweight, token-scoped\n// read API is a supported public subpath (`./lite.js`). It's kept out of this\n// facade on purpose so importing the session-managed manager doesn't eagerly pull\n// in every provider API client. The internal classes (IntegrationService,\n// IntegrationAuthenticationService, etc.) are not part of the public API and\n// may be refactored without semver bumps.\n\nimport type { Account } from '@gitlens/git/models/author.js';\nimport { CacheController } from '@gitlens/utils/promiseCache.js';\nimport type { IntegrationIds } from './constants.js';\nimport type {\n\tAccountProvider,\n\tConfigProvider,\n\tHttpProvider,\n\tIntegrationCacheProvider,\n\tIntegrationServiceHooks,\n\tIntegrationStorageProvider,\n\tRepositoriesProvider,\n} from './context.js';\nimport { createIntegrationService } from './integrationService.js';\nimport type { IntegrationManager } from './manager.js';\n\n/** A cached provider value, which may still be resolving. */\nexport type IntegrationManagerCacheResult<T> = Promise<T | undefined> | T | undefined;\n\n/** Produces an account value on a cache miss. */\nexport type IntegrationManagerCacheLoader<T> = (cacheable: CacheController) => {\n\tvalue: IntegrationManagerCacheResult<T>;\n\texpiresAt?: number;\n};\n\n/** Stable integration identity supplied to the consumer-owned account cache. */\nexport interface IntegrationAccountCacheDescriptor {\n\treadonly id: IntegrationIds;\n\treadonly domain?: string;\n}\n\n/** Cache controls attached to a provider account lookup. */\nexport interface IntegrationManagerCacheOptions {\n\treadonly connectionId?: string;\n\treadonly etag?: string;\n\treadonly expiryOverride?: boolean | number;\n\treadonly expireOnError?: boolean;\n}\n\n/**\n * Optional consumer-owned cache for values reused by the public manager facade.\n *\n * The manager only needs cross-call caching for provider identity lookups. Other caches used by the GitLens\n * extension host are implementation details and deliberately stay out of this contract.\n */\nexport interface IntegrationManagerCacheProvider {\n\tgetCurrentAccount(\n\t\tintegration: IntegrationAccountCacheDescriptor,\n\t\tcacheable: IntegrationManagerCacheLoader<Account>,\n\t\toptions?: IntegrationManagerCacheOptions,\n\t): IntegrationManagerCacheResult<Account>;\n}\n\nfunction loadUncached<T>(loader: IntegrationManagerCacheLoader<T>): IntegrationManagerCacheResult<T> {\n\treturn loader(new CacheController()).value;\n}\n\nconst uncachedIntegrationCacheProvider: IntegrationCacheProvider = {\n\tgetRepositoryMetadata: (_repo, _integration, loader) => loadUncached(loader),\n\tgetRepositoryDefaultBranch: (_repo, _integration, loader) => loadUncached(loader),\n\tgetPullRequestForSha: (_sha, _repo, _integration, loader) => loadUncached(loader),\n\tgetPullRequestForBranch: (_branch, _repo, _integration, loader) => loadUncached(loader),\n\tgetPullRequest: (_id, _resource, _integration, loader) => loadUncached(loader),\n\tgetIssueOrPullRequest: (_id, _type, _resource, _integration, loader) => loadUncached(loader),\n\tgetIssue: (_id, _resource, _integration, loader) => loadUncached(loader),\n\tgetCurrentAccount: (_integration, loader) => loadUncached(loader),\n\t// Nothing is cached, so there is nothing to evict.\n\tdeletePullRequests: () => {},\n};\n\nfunction toIntegrationCacheProvider(cache: IntegrationManagerCacheProvider | undefined): IntegrationCacheProvider {\n\tif (cache == null) return uncachedIntegrationCacheProvider;\n\n\treturn {\n\t\t...uncachedIntegrationCacheProvider,\n\t\tgetCurrentAccount: (integration, loader, options) =>\n\t\t\tcache.getCurrentAccount({ id: integration.id, domain: integration.domain }, loader, options),\n\t};\n}\n\n/**\n * Consumer-facing runtime for {@link createIntegrationManager}.\n *\n * External consumers may omit `cache`; reads then execute their loaders directly without cross-call caching.\n * The extension host's broader integration context remains private to the implementation.\n */\nexport interface IntegrationManagerContext {\n\treadonly storage: IntegrationStorageProvider;\n\treadonly account: AccountProvider;\n\treadonly config: ConfigProvider;\n\treadonly http: HttpProvider;\n\treadonly cache?: IntegrationManagerCacheProvider;\n\treadonly repositories: RepositoriesProvider;\n\treadonly hooks?: IntegrationServiceHooks;\n}\n\nexport type {\n\tClosedPullRequestSweepOptions,\n\tIntegrationManager,\n\tListOrgsOptions,\n\tListProjectsOptions,\n\t// Every option shape a caller has to BUILD is exported, not just the ones the manager returns:\n\t// `manager.js` is not a public subpath, so a type omitted here can't be named by a consumer at all\n\t// (`broadenIssues`' `orgs` needed `ProviderBroadenOrg` and had to be re-declared downstream).\n\tProviderBroadenOrg,\n\tProviderRepositoriesInput,\n\tProviderRepositoryInput,\n\tProviderSweepTarget,\n\tProviderSweepTargetEvent,\n\tPullRequestSweepOptions,\n} from './manager.js';\n\n/**\n * Construct an `@gitlens/integrations` manager bound to the supplied runtime.\n *\n * The runtime is the **single** cross-boundary contract — anything the\n * package needs (HTTP, storage, cache, auth, subscription, telemetry, UI,\n * configuration, environment) flows through it. The package never imports\n * `vscode`, `Container`, or any consumer-internal types.\n *\n * The returned manager owns its internal services; dispose it (or its\n * containing scope) to release every cached integration plus the runtime's\n * own VS Code subscriptions.\n */\nexport function createIntegrationManager(ctx: IntegrationManagerContext): IntegrationManager {\n\treturn createIntegrationService({\n\t\t...ctx,\n\t\tcache: toIntegrationCacheProvider(ctx.cache),\n\t});\n}\n\n// Re-exports for the public API surface.\nexport type {\n\tAccountProvider,\n\tAuthenticationSessionsChangeEvent,\n\tConfigChangeEvent,\n\tConfigProvider,\n\tRepositoriesProvider,\n\tHttpProvider,\n\tIntegrationsRemoteConfig,\n\tIntegrationServiceHooks,\n\tIntegrationStorageProvider,\n} from './context.js';\nexport type { Source, Sources } from './telemetry.js';\nexport type { IntegrationIds, SupportedCloudIntegrationIds } from './constants.js';\nexport type { ConfiguredIntegrationsChangeEvent } from './authentication/configuredIntegrationService.js';\n\n// Authentication contract — what `IntegrationServiceHooks.createAuthenticationProvider`\n// implementers return. Consumers can plug in any auth strategy (manual token,\n// OAuth, host-managed) by returning an object implementing this interface from\n// the hook.\nexport type {\n\tIntegrationAuthenticationProvider,\n\tIntegrationAuthenticationProviderDescriptor,\n\tIntegrationAuthenticationSessionDescriptor,\n} from './authentication/integrationAuthenticationProvider.js';\nexport type {\n\tAuthenticationSessionLike,\n\tCloudIntegrationAuthType,\n\tCloudIntegrationConnection,\n\tCloudIntegrationType,\n\tConfiguredIntegrationDescriptor,\n\tProviderAuthenticationSession,\n} from './authentication/models.js';\n// Provider-id mapping helpers for consumers bridging their own provider ids to `IntegrationIds`\n// (e.g. mapping multi-account connections from `getConfigured` back to a provider) and vice versa.\nexport { toCloudIntegrationType, toIntegrationId } from './authentication/models.js';\n// Domain normalization is part of connection selection and repository resolution; consumers should use the\n// same implementation rather than importing an internal utility subpath or maintaining a divergent copy.\nexport { areDomainsOnSameHost, hostFromDomain } from './utils/domain.utils.js';\n\n// Convenience: wrap a static access token (env var, CLI flag, secret manager)\n// as an `IntegrationAuthenticationProvider`. For OAuth/refresh flows, implement\n// the interface directly — this helper is for non-interactive consumers only.\nexport {\n\tcreateManualTokenAuthProvider,\n\ttype ManualTokenAuthProviderOptions,\n} from './authentication/manualTokenProvider.js';\n\nexport {\n\tGitCloudHostIntegrationId,\n\tGitSelfManagedHostIntegrationId,\n\tIssuesCloudHostIntegrationId,\n\tIssuesSelfManagedHostIntegrationId,\n\tisIntegrationId,\n\tisSupportedCloudIntegrationId,\n} from './constants.js';\n\n// Neutral pagination + warning result types the Kepler ProviderBackend adapter maps to its own DTOs.\n// These carry no `@gitkraken/provider-apis` types, so consumers depend only on `@gitkraken/core-gitlens`.\nexport type {\n\tConnectionStateChangeEvent,\n\tProviderBroadenResult,\n\tProviderPagedResult,\n\tProviderPageInfo,\n\tProviderResult,\n\tProviderSweepResult,\n\tProviderWarning,\n\tProviderWarningCause,\n\tProviderWarningCauseReason,\n\tProviderWarningKind,\n\tProviderWarningOmission,\n\tProviderWarningOmissionKind,\n\tProviderWarningOmissionRecovery,\n\tProviderWarningOmissionScope,\n\tProviderWarningScope,\n\tProviderOrganization,\n\tProviderRepositoryShape,\n\tRepositoryIdentity,\n\tRepositoryResolution,\n\tRepositoryResolutionStatus,\n\tResolveRepositoryResult,\n} from './results.js';\n// Runtime enums — re-exported as values (not `export type`) so consumers can read their members.\nexport { IssueFilter, PullRequestFilter } from './providerFilters.js';\n// The filtered issue search's criteria model and the capability table that says which of it a provider honors.\n// String unions and plain interfaces, so a consumer builds criteria without importing an internal subpath.\nexport type { IssueSearchCapabilities, IssueSearchCriteria, IssueSearchRelationship } from './providerFilters.js';\n// Account-wide pull-request search criteria and the per-provider capability table.\nexport type { PullRequestSearchCapabilities, PullRequestSearchCriteria } from './providerFilters.js';\n// The count-only issue and pull-request probes' input and result shapes.\nexport type {\n\tIssueCountResult,\n\tIssueCountScope,\n\tPullRequestCountResult,\n\tPullRequestCountScope,\n} from './reads/counts.js';\nexport type { IssueBatchResult, IssueBatchTarget } from './reads/issueBatch.js';\nexport type { PullRequestBatchResult, PullRequestBatchTarget } from './reads/pullRequestBatch.js';\nexport type { PullRequestBranchResult, PullRequestBranchTarget } from './reads/pullRequestBranches.js';\n// The current-account read's result, and the account shape every identity-bearing read already returns.\nexport type { CurrentAccountResult } from './reads/currentAccount.js';\nexport type { Account } from '@gitlens/git/models/author.js';\n// Cross-provider PR/issue state filters (string unions in the git models).\nexport type { PullRequestStateFilter } from '@gitlens/git/models/pullRequest.js';\nexport type { IssueStateFilter } from '@gitlens/git/models/issue.js';\n"],"mappings":";;;;;;;;;AA8DA,SAAS,aAAgB,QAA4E;CACpG,OAAO,OAAO,IAAI,gBAAgB,CAAC,CAAC,CAAC;AACtC;AAEA,MAAM,mCAA6D;CAClE,wBAAwB,OAAO,cAAc,WAAW,aAAa,MAAM;CAC3E,6BAA6B,OAAO,cAAc,WAAW,aAAa,MAAM;CAChF,uBAAuB,MAAM,OAAO,cAAc,WAAW,aAAa,MAAM;CAChF,0BAA0B,SAAS,OAAO,cAAc,WAAW,aAAa,MAAM;CACtF,iBAAiB,KAAK,WAAW,cAAc,WAAW,aAAa,MAAM;CAC7E,wBAAwB,KAAK,OAAO,WAAW,cAAc,WAAW,aAAa,MAAM;CAC3F,WAAW,KAAK,WAAW,cAAc,WAAW,aAAa,MAAM;CACvE,oBAAoB,cAAc,WAAW,aAAa,MAAM;CAEhE,0BAA0B,CAAC;AAC5B;AAEA,SAAS,2BAA2B,OAA8E;CACjH,IAAI,SAAS,MAAM,OAAO;CAE1B,OAAO;EACN,GAAG;EACH,oBAAoB,aAAa,QAAQ,YACxC,MAAM,kBAAkB;GAAE,IAAI,YAAY;GAAI,QAAQ,YAAY;EAAO,GAAG,QAAQ,OAAO;CAC7F;AACD;;;;;;;;;;;;;AA8CA,SAAgB,yBAAyB,KAAoD;CAC5F,OAAO,yBAAyB;EAC/B,GAAG;EACH,OAAO,2BAA2B,IAAI,KAAK;CAC5C,CAAC;AACF"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../plus/integrations/src/index.ts"],"sourcesContent":["// Public facade for `@gitlens/integrations`.\n//\n// External consumers should import from this entry point only, not from the\n// package's internal subpaths, with one exception: the lightweight, token-scoped\n// read API is a supported public subpath (`./lite.js`). It's kept out of this\n// facade on purpose so importing the session-managed manager doesn't eagerly pull\n// in every provider API client. The internal classes (IntegrationService,\n// IntegrationAuthenticationService, etc.) are not part of the public API and\n// may be refactored without semver bumps.\n\nimport type { Account } from '@gitlens/git/models/author.js';\nimport { CacheController } from '@gitlens/utils/promiseCache.js';\nimport type { IntegrationIds } from './constants.js';\nimport type {\n\tAccountProvider,\n\tConfigProvider,\n\tHttpProvider,\n\tIntegrationCacheProvider,\n\tIntegrationServiceHooks,\n\tIntegrationStorageProvider,\n\tRepositoriesProvider,\n} from './context.js';\nimport { createIntegrationService } from './integrationService.js';\nimport type { IntegrationManager } from './manager.js';\n\n/** A cached provider value, which may still be resolving. */\nexport type IntegrationManagerCacheResult<T> = Promise<T | undefined> | T | undefined;\n\n/** Produces an account value on a cache miss. */\nexport type IntegrationManagerCacheLoader<T> = (cacheable: CacheController) => {\n\tvalue: IntegrationManagerCacheResult<T>;\n\texpiresAt?: number;\n};\n\n/** Stable integration identity supplied to the consumer-owned account cache. */\nexport interface IntegrationAccountCacheDescriptor {\n\treadonly id: IntegrationIds;\n\treadonly domain?: string;\n}\n\n/** Cache controls attached to a provider account lookup. */\nexport interface IntegrationManagerCacheOptions {\n\treadonly connectionId?: string;\n\treadonly etag?: string;\n\treadonly expiryOverride?: boolean | number;\n\treadonly expireOnError?: boolean;\n}\n\n/**\n * Optional consumer-owned cache for values reused by the public manager facade.\n *\n * The manager only needs cross-call caching for provider identity lookups. Other caches used by the GitLens\n * extension host are implementation details and deliberately stay out of this contract.\n */\nexport interface IntegrationManagerCacheProvider {\n\tgetCurrentAccount(\n\t\tintegration: IntegrationAccountCacheDescriptor,\n\t\tcacheable: IntegrationManagerCacheLoader<Account>,\n\t\toptions?: IntegrationManagerCacheOptions,\n\t): IntegrationManagerCacheResult<Account>;\n}\n\nfunction loadUncached<T>(loader: IntegrationManagerCacheLoader<T>): IntegrationManagerCacheResult<T> {\n\treturn loader(new CacheController()).value;\n}\n\nconst uncachedIntegrationCacheProvider: IntegrationCacheProvider = {\n\tgetRepositoryMetadata: (_repo, _integration, loader) => loadUncached(loader),\n\tgetRepositoryDefaultBranch: (_repo, _integration, loader) => loadUncached(loader),\n\tgetPullRequestForSha: (_sha, _repo, _integration, loader) => loadUncached(loader),\n\tgetPullRequestForBranch: (_branch, _repo, _integration, loader) => loadUncached(loader),\n\tgetPullRequest: (_id, _resource, _integration, loader) => loadUncached(loader),\n\tgetIssueOrPullRequest: (_id, _type, _resource, _integration, loader) => loadUncached(loader),\n\tgetIssue: (_id, _resource, _integration, loader) => loadUncached(loader),\n\tgetCurrentAccount: (_integration, loader) => loadUncached(loader),\n\t// Nothing is cached, so there is nothing to evict.\n\tdeletePullRequests: () => {},\n};\n\nfunction toIntegrationCacheProvider(cache: IntegrationManagerCacheProvider | undefined): IntegrationCacheProvider {\n\tif (cache == null) return uncachedIntegrationCacheProvider;\n\n\treturn {\n\t\t...uncachedIntegrationCacheProvider,\n\t\tgetCurrentAccount: (integration, loader, options) =>\n\t\t\tcache.getCurrentAccount({ id: integration.id, domain: integration.domain }, loader, options),\n\t};\n}\n\n/**\n * Consumer-facing runtime for {@link createIntegrationManager}.\n *\n * External consumers may omit `cache`; reads then execute their loaders directly without cross-call caching.\n * The extension host's broader integration context remains private to the implementation.\n */\nexport interface IntegrationManagerContext {\n\treadonly storage: IntegrationStorageProvider;\n\treadonly account: AccountProvider;\n\treadonly config: ConfigProvider;\n\treadonly http: HttpProvider;\n\treadonly cache?: IntegrationManagerCacheProvider;\n\treadonly repositories: RepositoriesProvider;\n\treadonly hooks?: IntegrationServiceHooks;\n}\n\nexport type {\n\tClosedPullRequestSweepOptions,\n\tIntegrationManager,\n\tListOrgsOptions,\n\tListProjectsOptions,\n\t// Every option shape a caller has to BUILD is exported, not just the ones the manager returns:\n\t// `manager.js` is not a public subpath, so a type omitted here can't be named by a consumer at all\n\t// (`broadenIssues`' `orgs` needed `ProviderBroadenOrg` and had to be re-declared downstream).\n\tProviderBroadenOrg,\n\tProviderRepositoriesInput,\n\tProviderRepositoryInput,\n\tProviderSweepTarget,\n\tProviderSweepTargetEvent,\n\tPullRequestSweepOptions,\n} from './manager.js';\n\n/**\n * Construct an `@gitlens/integrations` manager bound to the supplied runtime.\n *\n * The runtime is the **single** cross-boundary contract — anything the\n * package needs (HTTP, storage, cache, auth, subscription, telemetry, UI,\n * configuration, environment) flows through it. The package never imports\n * `vscode`, `Container`, or any consumer-internal types.\n *\n * The returned manager owns its internal services; dispose it (or its\n * containing scope) to release every cached integration plus the runtime's\n * own VS Code subscriptions.\n */\nexport function createIntegrationManager(ctx: IntegrationManagerContext): IntegrationManager {\n\treturn createIntegrationService({\n\t\t...ctx,\n\t\tcache: toIntegrationCacheProvider(ctx.cache),\n\t});\n}\n\n// Re-exports for the public API surface.\nexport type {\n\tAccountProvider,\n\tAuthenticationSessionsChangeEvent,\n\tConfigChangeEvent,\n\tConfigProvider,\n\tRepositoriesProvider,\n\tHttpProvider,\n\tIntegrationsRemoteConfig,\n\tIntegrationServiceHooks,\n\tIntegrationStorageProvider,\n} from './context.js';\nexport type { Source, Sources } from './telemetry.js';\nexport type { IntegrationIds, SupportedCloudIntegrationIds } from './constants.js';\nexport type { ConfiguredIntegrationsChangeEvent } from './authentication/configuredIntegrationService.js';\n\n// Authentication contract — what `IntegrationServiceHooks.createAuthenticationProvider`\n// implementers return. Consumers can plug in any auth strategy (manual token,\n// OAuth, host-managed) by returning an object implementing this interface from\n// the hook.\nexport type {\n\tIntegrationAuthenticationProvider,\n\tIntegrationAuthenticationProviderDescriptor,\n\tIntegrationAuthenticationSessionDescriptor,\n} from './authentication/integrationAuthenticationProvider.js';\nexport type {\n\tAuthenticationSessionLike,\n\tCloudIntegrationAuthType,\n\tCloudIntegrationConnection,\n\tCloudIntegrationType,\n\tConfiguredIntegrationDescriptor,\n\tProviderAuthenticationSession,\n} from './authentication/models.js';\n// Provider-id mapping helpers for consumers bridging their own provider ids to `IntegrationIds`\n// (e.g. mapping multi-account connections from `getConfigured` back to a provider) and vice versa.\nexport { toCloudIntegrationType, toIntegrationId } from './authentication/models.js';\n// Domain normalization is part of connection selection and repository resolution; consumers should use the\n// same implementation rather than importing an internal utility subpath or maintaining a divergent copy.\nexport { areDomainsOnSameHost, hostFromDomain } from './utils/domain.utils.js';\n\n// Convenience: wrap a static access token (env var, CLI flag, secret manager)\n// as an `IntegrationAuthenticationProvider`. For OAuth/refresh flows, implement\n// the interface directly — this helper is for non-interactive consumers only.\nexport {\n\tcreateManualTokenAuthProvider,\n\ttype ManualTokenAuthProviderOptions,\n} from './authentication/manualTokenProvider.js';\n\nexport {\n\tGitCloudHostIntegrationId,\n\tGitSelfManagedHostIntegrationId,\n\tIssuesCloudHostIntegrationId,\n\tIssuesSelfManagedHostIntegrationId,\n\tisIntegrationId,\n\tisSupportedCloudIntegrationId,\n} from './constants.js';\n\n// Neutral pagination + warning result types the Kepler ProviderBackend adapter maps to its own DTOs.\n// These carry no `@gitkraken/provider-apis` types, so consumers depend only on `@gitkraken/core-gitlens`.\nexport type {\n\tConnectionStateChangeEvent,\n\tProviderBroadenResult,\n\tProviderPagedResult,\n\tProviderPageInfo,\n\tProviderResult,\n\tProviderSweepResult,\n\tProviderWarning,\n\tProviderWarningCause,\n\tProviderWarningCauseReason,\n\tProviderWarningKind,\n\tProviderWarningOmission,\n\tProviderWarningOmissionKind,\n\tProviderWarningOmissionRecovery,\n\tProviderWarningOmissionScope,\n\tProviderWarningScope,\n\tProviderOrganization,\n\tProviderRepositoryShape,\n\tRepositoryIdentity,\n\tRepositoryResolution,\n\tRepositoryResolutionStatus,\n\tResolveRepositoryResult,\n} from './results.js';\n// Runtime enums — re-exported as values (not `export type`) so consumers can read their members.\nexport { IssueFilter, PullRequestFilter } from './providerFilters.js';\n// The filtered issue search's criteria model and the capability table that says which of it a provider honors.\n// String unions and plain interfaces, so a consumer builds criteria without importing an internal subpath.\nexport type { IssueSearchCapabilities, IssueSearchCriteria, IssueSearchRelationship } from './providerFilters.js';\n// Account-wide pull-request search criteria and the per-provider capability table.\nexport type { PullRequestSearchCapabilities, PullRequestSearchCriteria } from './providerFilters.js';\n// The count-only issue and pull-request probes' input and result shapes.\nexport type {\n\tIssueCountResult,\n\tIssueCountScope,\n\tPullRequestCountResult,\n\tPullRequestCountScope,\n} from './reads/counts.js';\nexport type { IssueBatchResult, IssueBatchTarget } from './reads/issueBatch.js';\nexport type { PullRequestBatchResult, PullRequestBatchTarget } from './reads/pullRequestBatch.js';\nexport type { IssueEtagInclude, PullRequestEtagInclude } from './models/integration.js';\nexport type { PullRequestBranchResult, PullRequestBranchTarget } from './reads/pullRequestBranches.js';\n// The current-account read's result, and the account shape every identity-bearing read already returns.\nexport type { CurrentAccountResult } from './reads/currentAccount.js';\nexport type { Account } from '@gitlens/git/models/author.js';\n// Cross-provider PR/issue state filters (string unions in the git models).\nexport type { PullRequestStateFilter } from '@gitlens/git/models/pullRequest.js';\nexport type { IssueStateFilter } from '@gitlens/git/models/issue.js';\n// Which read produced a row, and which of its fields that read fetched.\nexport type { PullRequestProjection } from '@gitlens/git/models/pullRequest.js';\nexport type { IssueProjection } from '@gitlens/git/models/issue.js';\nexport type { FieldPresence, IssueFieldGroup, PullRequestFieldGroup } from './fieldPresence.js';\nexport { getIssueFieldPresence, getPullRequestFieldPresence } from './fieldPresence.js';\n"],"mappings":";;;;;;;;;;AA8DA,SAAS,aAAgB,QAA4E;CACpG,OAAO,OAAO,IAAI,gBAAgB,CAAC,CAAC,CAAC;AACtC;AAEA,MAAM,mCAA6D;CAClE,wBAAwB,OAAO,cAAc,WAAW,aAAa,MAAM;CAC3E,6BAA6B,OAAO,cAAc,WAAW,aAAa,MAAM;CAChF,uBAAuB,MAAM,OAAO,cAAc,WAAW,aAAa,MAAM;CAChF,0BAA0B,SAAS,OAAO,cAAc,WAAW,aAAa,MAAM;CACtF,iBAAiB,KAAK,WAAW,cAAc,WAAW,aAAa,MAAM;CAC7E,wBAAwB,KAAK,OAAO,WAAW,cAAc,WAAW,aAAa,MAAM;CAC3F,WAAW,KAAK,WAAW,cAAc,WAAW,aAAa,MAAM;CACvE,oBAAoB,cAAc,WAAW,aAAa,MAAM;CAEhE,0BAA0B,CAAC;AAC5B;AAEA,SAAS,2BAA2B,OAA8E;CACjH,IAAI,SAAS,MAAM,OAAO;CAE1B,OAAO;EACN,GAAG;EACH,oBAAoB,aAAa,QAAQ,YACxC,MAAM,kBAAkB;GAAE,IAAI,YAAY;GAAI,QAAQ,YAAY;EAAO,GAAG,QAAQ,OAAO;CAC7F;AACD;;;;;;;;;;;;;AA8CA,SAAgB,yBAAyB,KAAoD;CAC5F,OAAO,yBAAyB;EAC/B,GAAG;EACH,OAAO,2BAA2B,IAAI,KAAK;CAC5C,CAAC;AACF"}
@@ -10,12 +10,12 @@ import { ConfiguredIntegrationDescriptor } from "./authentication/models.js";
10
10
  import { CloudGitSelfManagedHostIntegrationIds, GitCloudHostIntegrationId, GitSelfManagedHostIntegrationId, IntegrationIds, IssuesCloudHostIntegrationId, SupportedCloudIntegrationIds } from "./constants.js";
11
11
  import { Source } from "./telemetry.js";
12
12
  import { ConfiguredIntegrationService, ConfiguredIntegrationsChangeEvent } from "./authentication/configuredIntegrationService.js";
13
- import { IssueFilter } from "./providerFilters.js";
14
13
  import { ConnectionStateChangeEvent, ProviderBroadenResult, ProviderOrganization, ProviderPagedResult, ProviderRepositoryShape, ProviderResult, ProviderSweepResult, ProviderWarning, ResolveRepositoryResult } from "./results.js";
14
+ import { IssueFilter } from "./providerFilters.js";
15
+ import { ProviderReposInput } from "./providers/models.js";
15
16
  import { GitHostIntegration, SearchMyPullRequestsOptions } from "./models/gitHostIntegration.js";
16
17
  import { IssuesIntegration } from "./models/issuesIntegration.js";
17
- import { Integration, IntegrationBase, IntegrationById, IntegrationResult } from "./models/integration.js";
18
- import { ProviderReposInput } from "./providers/models.js";
18
+ import { Integration, IntegrationBase, IntegrationById, IntegrationResult, IssueEtagInclude, PullRequestEtagInclude } from "./models/integration.js";
19
19
  import { RepositoryResolutionContext } from "./reads/context.js";
20
20
  import { IssueCountResult, IssueCountScope, PullRequestCountResult, PullRequestCountScope } from "./reads/counts.js";
21
21
  import { CurrentAccountResult } from "./reads/currentAccount.js";
@@ -327,6 +327,8 @@ export declare class IntegrationService implements Disposable, RepositoryResolut
327
327
  * {@link IntegrationManager.getIssuesBatch}.
328
328
  */
329
329
  domain?: string;
330
+ /** Widens every etag to the listed inputs; see {@link IntegrationManager.getIssuesBatch}. */
331
+ etagIncludes?: readonly IssueEtagInclude[];
330
332
  }): Promise<ProviderResult<IssueBatchResult>>;
331
333
  getPullRequestsBatch(options: {
332
334
  providerId: IntegrationIds;
@@ -337,6 +339,8 @@ export declare class IntegrationService implements Disposable, RepositoryResolut
337
339
  * it must come from the trusted authentication configuration, not repository or remote data.
338
340
  */
339
341
  domain?: string;
342
+ /** Widens every etag to the listed inputs; see {@link IntegrationManager.getPullRequestsBatch}. */
343
+ etagIncludes?: readonly PullRequestEtagInclude[];
340
344
  }): Promise<ProviderResult<PullRequestBatchResult>>;
341
345
  getPullRequestsForBranches(options: {
342
346
  providerId: IntegrationIds;