@gitkraken/core-gitlens 0.5.115 → 0.5.116
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 +13 -1
- package/dist/plus/git-github/api/github.d.ts +3 -2
- package/dist/plus/git-github/api/github.d.ts.map +1 -1
- package/dist/plus/git-github/api/github.js.map +1 -1
- package/dist/plus/integrations/manager.d.ts +43 -6
- package/dist/plus/integrations/manager.d.ts.map +1 -1
- package/dist/plus/integrations/reads/broaden.d.ts.map +1 -1
- package/dist/plus/integrations/reads/broaden.js +26 -14
- package/dist/plus/integrations/reads/broaden.js.map +1 -1
- package/dist/plus/integrations/reads/counts.d.ts.map +1 -1
- package/dist/plus/integrations/reads/counts.js +39 -15
- package/dist/plus/integrations/reads/counts.js.map +1 -1
- package/dist/plus/integrations/reads/filters.d.ts +33 -11
- package/dist/plus/integrations/reads/filters.d.ts.map +1 -1
- package/dist/plus/integrations/reads/filters.js +114 -25
- package/dist/plus/integrations/reads/filters.js.map +1 -1
- package/dist/plus/integrations/reads/searchIssues.d.ts +1 -5
- package/dist/plus/integrations/reads/searchIssues.d.ts.map +1 -1
- package/dist/plus/integrations/reads/searchIssues.js +12 -6
- package/dist/plus/integrations/reads/searchIssues.js.map +1 -1
- package/dist/plus/integrations/reads/searchPullRequests.d.ts +1 -0
- package/dist/plus/integrations/reads/searchPullRequests.d.ts.map +1 -1
- package/dist/plus/integrations/reads/searchPullRequests.js +8 -3
- package/dist/plus/integrations/reads/searchPullRequests.js.map +1 -1
- package/dist/plus/integrations/reads/warnings.d.ts +16 -0
- package/dist/plus/integrations/reads/warnings.d.ts.map +1 -1
- package/dist/plus/integrations/reads/warnings.js +18 -0
- package/dist/plus/integrations/reads/warnings.js.map +1 -1
- package/docs/integrations.md +26 -2
- package/package.json +1 -1
- package/src/plus/git-github/api/github.ts +3 -2
- package/src/plus/integrations/manager.ts +43 -6
- package/src/plus/integrations/reads/broaden.ts +35 -16
- package/src/plus/integrations/reads/counts.ts +62 -15
- package/src/plus/integrations/reads/filters.ts +131 -29
- package/src/plus/integrations/reads/searchIssues.ts +23 -13
- package/src/plus/integrations/reads/searchPullRequests.ts +16 -2
- package/src/plus/integrations/reads/warnings.ts +19 -0
|
@@ -261,6 +261,25 @@ export function unsupportedFiltersWarning(
|
|
|
261
261
|
);
|
|
262
262
|
}
|
|
263
263
|
|
|
264
|
+
/**
|
|
265
|
+
* The one sentence every `unusable-scope` refusal uses — the five surfaces that validate a search scope (both
|
|
266
|
+
* searches, both count probes, and issue broadening) differ only in the noun and in whether they name a count
|
|
267
|
+
* key, so the reason a scope is unusable is written once. `prefix` is what the count probes put in front of it
|
|
268
|
+
* to name their key.
|
|
269
|
+
*
|
|
270
|
+
* NAMES the offending values, because which failure mode applied is not deducible from the value: a quote makes
|
|
271
|
+
* `git"kraken` a request for the real and different org `gitkraken`, a space makes `my org` a search of `my`
|
|
272
|
+
* filtered by the text `org`, and a value of only quotes or whitespace leaves no scope at all. The caller is the
|
|
273
|
+
* only layer that knows which scope it meant.
|
|
274
|
+
*
|
|
275
|
+
* Says how to fix it rather than what was stripped: a consumer cannot mirror this rule (unlike free-text
|
|
276
|
+
* sanitizing, whose rules are published for exactly that), so "pass the scope as the provider names it" is the
|
|
277
|
+
* actionable half.
|
|
278
|
+
*/
|
|
279
|
+
export function unusableSearchScopeMessage(noun: string, scopes: readonly string[], prefix?: string): string {
|
|
280
|
+
return `${prefix != null ? `${prefix}: ` : ''}The requested ${noun} (${scopes.map(s => JSON.stringify(s)).join(', ')}) cannot be used as given: a scope name cannot contain quotes, or an inner space or control character, which a query would drop or read as a second qualifier — searching a different scope, or none. Pass the scope exactly as the provider names it.`;
|
|
281
|
+
}
|
|
282
|
+
|
|
264
283
|
/** Warning for a filtered pull-request search the provider cannot run as requested. */
|
|
265
284
|
export function unsupportedPullRequestSearchCriteriaWarning(
|
|
266
285
|
id: IntegrationIds,
|