@gitkraken/core-gitlens 0.16.1 → 0.16.3
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 +16 -1
- package/dist/git/watching/classifyChange.js +5 -2
- package/dist/git/watching/classifyChange.js.map +1 -1
- package/dist/git/watching/watchGroup.js +2 -1
- package/dist/git/watching/watchGroup.js.map +1 -1
- package/dist/git-cli/providers/branches.d.ts +33 -9
- package/dist/git-cli/providers/branches.js +124 -41
- package/dist/git-cli/providers/branches.js.map +1 -1
- package/dist/plus/integrations/integrationService.d.ts +1 -0
- package/dist/plus/integrations/integrationService.js +18 -5
- package/dist/plus/integrations/integrationService.js.map +1 -1
- package/dist/plus/integrations/providers/apiClients.d.ts +2 -0
- package/dist/plus/integrations/providers/apiClients.js +12 -3
- package/dist/plus/integrations/providers/apiClients.js.map +1 -1
- package/dist/plus/integrations/providers/azure/azure.d.ts +13 -11
- package/dist/plus/integrations/providers/azure/azure.js +128 -47
- package/dist/plus/integrations/providers/azure/azure.js.map +1 -1
- package/dist/plus/integrations/providers/azure/models.d.ts +4 -10
- package/dist/plus/integrations/providers/azure/models.js +25 -9
- package/dist/plus/integrations/providers/azure/models.js.map +1 -1
- package/dist/plus/integrations/providers/azure/workItemDescriptions.d.ts +10 -0
- package/dist/plus/integrations/providers/azure/workItemDescriptions.js +48 -0
- package/dist/plus/integrations/providers/azure/workItemDescriptions.js.map +1 -0
- package/dist/plus/integrations/providers/azure/workItemStateCategories.d.ts +20 -19
- package/dist/plus/integrations/providers/azure/workItemStateCategories.js +65 -40
- package/dist/plus/integrations/providers/azure/workItemStateCategories.js.map +1 -1
- package/dist/plus/integrations/providers/issueSorts.d.ts +0 -1
- package/dist/plus/integrations/providers/providerApiClient.d.ts +9 -0
- package/dist/plus/integrations/providers/providerApiClient.js +66 -0
- package/dist/plus/integrations/providers/providerApiClient.js.map +1 -0
- package/dist/plus/integrations/providers/providersApi.d.ts +10 -9
- package/dist/plus/integrations/providers/providersApi.js +163 -145
- package/dist/plus/integrations/providers/providersApi.js.map +1 -1
- package/dist/plus/integrations/reads/drains.d.ts +0 -1
- package/docs/integrations.md +30 -13
- package/package.json +2 -2
|
@@ -46,6 +46,7 @@ export declare class IntegrationService implements Disposable, RepositoryResolut
|
|
|
46
46
|
private readonly _onDidChangeIntegrationConnection;
|
|
47
47
|
private readonly _apiDisposables;
|
|
48
48
|
private _apis;
|
|
49
|
+
private _disposed;
|
|
49
50
|
/** The package-built, memoized per-provider API clients (was injected via the now-removed `ctx.apis`). */
|
|
50
51
|
get apis(): ApiClients;
|
|
51
52
|
/** The shared `GitHubApi` instance — also consumed by the host's GitHub git provider (one instance). */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { filterMap, flatten } from "../../utils/iterable.js";
|
|
2
|
-
import { raceWithTimeout } from "../../utils/cancellation.js";
|
|
2
|
+
import { CancellationError, raceWithTimeout } from "../../utils/cancellation.js";
|
|
3
3
|
import { getScopedLogger } from "../../utils/logger.scoped.js";
|
|
4
4
|
import { mapSettledBounded } from "../../utils/promise.js";
|
|
5
5
|
import { debug, trace } from "../../utils/decorators/log.js";
|
|
@@ -53,6 +53,7 @@ var IntegrationService = class {
|
|
|
53
53
|
_onDidChangeIntegrationConnection = new Emitter();
|
|
54
54
|
_apiDisposables = [];
|
|
55
55
|
_apis;
|
|
56
|
+
_disposed = false;
|
|
56
57
|
/** The package-built, memoized per-provider API clients (was injected via the now-removed `ctx.apis`). */
|
|
57
58
|
get apis() {
|
|
58
59
|
return this._apis ??= createApiClients(this.ctx, this._apiDisposables);
|
|
@@ -70,6 +71,8 @@ var IntegrationService = class {
|
|
|
70
71
|
}), ctx.account.onDidChangeSessions(this.onAuthenticationSessionsChanged, this), ctx.account.onDidCheckIn(this.onUserCheckedIn, this), ctx.account.onDidChange(this.onSubscriptionChanged, this), this._onDidChangeIntegrationConnection.event(this.onIntegrationConnectionChanged, this));
|
|
71
72
|
}
|
|
72
73
|
dispose() {
|
|
74
|
+
if (this._disposed) return;
|
|
75
|
+
this._disposed = true;
|
|
73
76
|
this._integrations.forEach((i) => i.dispose());
|
|
74
77
|
this._integrations.clear();
|
|
75
78
|
this._disposable?.dispose();
|
|
@@ -799,14 +802,24 @@ var IntegrationService = class {
|
|
|
799
802
|
}
|
|
800
803
|
_providersApi;
|
|
801
804
|
async getProvidersApi() {
|
|
805
|
+
if (this._disposed) throw new CancellationError();
|
|
802
806
|
if (this._providersApi == null) {
|
|
803
807
|
const authenticationService = this.authenticationService;
|
|
804
|
-
|
|
805
|
-
|
|
808
|
+
const apis = authenticationService.apis;
|
|
809
|
+
const load = async () => {
|
|
810
|
+
const { ProvidersApi } = await import(
|
|
806
811
|
/* webpackChunkName: "integrations" */
|
|
807
812
|
"./providers/providersApi.js"
|
|
808
|
-
)
|
|
809
|
-
|
|
813
|
+
);
|
|
814
|
+
if (this._disposed) throw new CancellationError();
|
|
815
|
+
const api = new ProvidersApi(authenticationService, apis.azureWorkItemStates, apis.azureWorkItemDescriptions);
|
|
816
|
+
if (this._disposed) {
|
|
817
|
+
api.dispose();
|
|
818
|
+
throw new CancellationError();
|
|
819
|
+
}
|
|
820
|
+
this._apiDisposables.push(api);
|
|
821
|
+
return api;
|
|
822
|
+
};
|
|
810
823
|
const loading = this._providersApi = load();
|
|
811
824
|
loading.catch(() => {
|
|
812
825
|
if (this._providersApi === loading) this._providersApi = void 0;
|