@gitkraken/core-gitlens 0.23.0 → 0.25.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 +34 -1
- package/README.md +23 -15
- package/dist/git/errors.d.ts +6 -5
- package/dist/git/errors.js +7 -6
- package/dist/git/errors.js.map +1 -1
- package/dist/git/features.d.ts +1 -1
- package/dist/git/features.js +1 -1
- package/dist/git/features.js.map +1 -1
- package/dist/git/models/remoteProvider.d.ts +4 -1
- package/dist/git/models/remoteProvider.js.map +1 -1
- package/dist/git/providers/provider.d.ts +4 -2
- package/dist/git/utils/branch.utils.d.ts +4 -1
- package/dist/git/utils/branch.utils.js +5 -2
- package/dist/git/utils/branch.utils.js.map +1 -1
- package/dist/git/utils/mergeConflicts.utils.js +2 -2
- package/dist/git/utils/mergeConflicts.utils.js.map +1 -1
- package/dist/git-cli/cliGitProvider.d.ts +14 -3
- package/dist/git-cli/cliGitProvider.js +71 -34
- package/dist/git-cli/cliGitProvider.js.map +1 -1
- package/dist/git-cli/exec/git.d.ts +7 -1
- package/dist/git-cli/exec/git.js +19 -4
- package/dist/git-cli/exec/git.js.map +1 -1
- package/dist/git-cli/providers/branchRemote.js +2 -5
- package/dist/git-cli/providers/branchRemote.js.map +1 -1
- package/dist/git-cli/providers/branches.js +4 -4
- package/dist/git-cli/providers/branches.js.map +1 -1
- package/dist/git-cli/providers/config.js +6 -3
- package/dist/git-cli/providers/config.js.map +1 -1
- package/dist/git-cli/providers/pausedOperations.js +2 -2
- package/dist/git-cli/providers/pausedOperations.js.map +1 -1
- package/dist/git-cli/providers/staging.js +1 -1
- package/dist/ipc/discovery.js +1 -1
- package/dist/plus/agents/providers/claudeCodeTranscript.js +6 -6
- package/dist/plus/agents/providers/claudeCodeTranscript.js.map +1 -1
- package/dist/plus/ai/errors.d.ts +4 -1
- package/dist/plus/ai/errors.js +4 -0
- package/dist/plus/ai/errors.js.map +1 -1
- package/dist/plus/ai/providers/mistralProvider.js +1 -1
- package/dist/plus/ai/providers/mistralProvider.js.map +1 -1
- package/dist/plus/ai/providers/openAICompatibleProviderBase.js +2 -1
- package/dist/plus/ai/providers/openAICompatibleProviderBase.js.map +1 -1
- package/dist/plus/git-github/api/github.js +12 -13
- package/dist/plus/git-github/api/github.js.map +1 -1
- package/dist/plus/git-github/api/token.d.ts +2 -0
- package/dist/plus/integrations/authentication/cloudIntegrationService.d.ts +1 -1
- package/dist/plus/integrations/authentication/cloudIntegrationService.js +6 -1
- package/dist/plus/integrations/authentication/cloudIntegrationService.js.map +1 -1
- package/dist/plus/integrations/authentication/configuredIntegrationService.js +2 -2
- package/dist/plus/integrations/authentication/integrationAuthenticationProvider.js +18 -5
- package/dist/plus/integrations/authentication/integrationAuthenticationProvider.js.map +1 -1
- package/dist/plus/integrations/authentication/integrationAuthenticationService.d.ts +3 -1
- package/dist/plus/integrations/authentication/integrationAuthenticationService.js +4 -0
- package/dist/plus/integrations/authentication/integrationAuthenticationService.js.map +1 -1
- package/dist/plus/integrations/authentication/models.d.ts +2 -0
- package/dist/plus/integrations/authentication/models.js +2 -1
- package/dist/plus/integrations/authentication/models.js.map +1 -1
- package/dist/plus/integrations/authentication/observedAuthenticationProvider.js +1 -1
- package/dist/plus/integrations/authentication/rejectedTokenTracker.d.ts +5 -4
- package/dist/plus/integrations/authentication/rejectedTokenTracker.js +5 -4
- package/dist/plus/integrations/authentication/rejectedTokenTracker.js.map +1 -1
- package/dist/plus/integrations/index.d.ts +2 -2
- package/dist/plus/integrations/index.js +1 -1
- package/dist/plus/integrations/index.js.map +1 -1
- package/dist/plus/integrations/integrationService.d.ts +6 -0
- package/dist/plus/integrations/integrationService.js +3 -3
- package/dist/plus/integrations/integrationService.js.map +1 -1
- package/dist/plus/integrations/lite.js +1 -1
- package/dist/plus/integrations/manager.d.ts +51 -3
- package/dist/plus/integrations/models/gitHostIntegration.d.ts +14 -0
- package/dist/plus/integrations/models/gitHostIntegration.js +50 -41
- package/dist/plus/integrations/models/gitHostIntegration.js.map +1 -1
- package/dist/plus/integrations/models/integration.d.ts +27 -5
- package/dist/plus/integrations/models/integration.js +57 -15
- package/dist/plus/integrations/models/integration.js.map +1 -1
- package/dist/plus/integrations/models/issueReads.d.ts +6 -0
- package/dist/plus/integrations/models/issuesIntegration.js +11 -11
- package/dist/plus/integrations/models/issuesIntegration.js.map +1 -1
- package/dist/plus/integrations/providers/azure/azure.js +2 -2
- package/dist/plus/integrations/providers/azureDevOps.js +1 -1
- package/dist/plus/integrations/providers/azureDevOpsServer.js +1 -1
- package/dist/plus/integrations/providers/bitbucket/bitbucket.js +1 -1
- package/dist/plus/integrations/providers/bitbucket/bitbucket.js.map +1 -1
- package/dist/plus/integrations/providers/bitbucket-server.js +1 -1
- package/dist/plus/integrations/providers/bitbucket.js +1 -1
- package/dist/plus/integrations/providers/github.js +1 -1
- package/dist/plus/integrations/providers/gitlab/gitlab.js +2 -2
- package/dist/plus/integrations/providers/gitlab/gitlab.js.map +1 -1
- package/dist/plus/integrations/providers/gitlab.js +1 -1
- package/dist/plus/integrations/providers/jira-server.js +2 -2
- package/dist/plus/integrations/providers/jira.js +1 -1
- package/dist/plus/integrations/providers/linear.d.ts +4 -4
- package/dist/plus/integrations/providers/linear.js +26 -9
- package/dist/plus/integrations/providers/linear.js.map +1 -1
- package/dist/plus/integrations/providers/models.js +2 -1
- package/dist/plus/integrations/providers/models.js.map +1 -1
- package/dist/plus/integrations/providers/providerErrors.js +9 -0
- package/dist/plus/integrations/providers/providerErrors.js.map +1 -1
- package/dist/plus/integrations/providers/providersApi.d.ts +2 -0
- package/dist/plus/integrations/providers/providersApi.js +1 -1
- package/dist/plus/integrations/providers/providersApi.js.map +1 -1
- package/dist/plus/integrations/providers/trello.js +1 -1
- package/dist/plus/integrations/providers/utils.js +1 -1
- package/dist/plus/integrations/reads/counts.js +1 -1
- package/dist/plus/integrations/reads/cursors.js +1 -1
- package/dist/plus/integrations/reads/drains.d.ts +5 -4
- package/dist/plus/integrations/reads/drains.js +28 -8
- package/dist/plus/integrations/reads/drains.js.map +1 -1
- package/dist/plus/integrations/reads/hierarchy.js +1 -1
- package/dist/plus/integrations/reads/issueBatch.d.ts +1 -1
- package/dist/plus/integrations/reads/issueBatch.js.map +1 -1
- package/dist/plus/integrations/reads/issueTracker.d.ts +4 -1
- package/dist/plus/integrations/reads/issueTracker.js +1 -1
- package/dist/plus/integrations/reads/issueTracker.js.map +1 -1
- package/dist/plus/integrations/reads/issues.d.ts +2 -0
- package/dist/plus/integrations/reads/issues.js +5 -3
- package/dist/plus/integrations/reads/issues.js.map +1 -1
- package/dist/plus/integrations/reads/paging.d.ts +5 -6
- package/dist/plus/integrations/reads/paging.js +5 -6
- package/dist/plus/integrations/reads/paging.js.map +1 -1
- package/dist/plus/integrations/reads/pullRequests.d.ts +4 -0
- package/dist/plus/integrations/reads/pullRequests.js +4 -2
- package/dist/plus/integrations/reads/pullRequests.js.map +1 -1
- package/dist/plus/integrations/reads/resolveRepository.js +1 -1
- package/dist/plus/integrations/reads/sweeps.js +42 -10
- package/dist/plus/integrations/reads/sweeps.js.map +1 -1
- package/dist/plus/integrations/results.d.ts +23 -3
- package/dist/plus/integrations/results.js.map +1 -1
- package/dist/plus/notifications/api.d.ts +20 -0
- package/dist/plus/notifications/api.js +89 -0
- package/dist/plus/notifications/api.js.map +1 -0
- package/dist/plus/notifications/context.d.ts +28 -0
- package/dist/plus/notifications/context.js +0 -0
- package/dist/plus/notifications/errors.d.ts +13 -0
- package/dist/plus/notifications/errors.js +22 -0
- package/dist/plus/notifications/errors.js.map +1 -0
- package/dist/plus/notifications/models.d.ts +94 -0
- package/dist/plus/notifications/models.js +0 -0
- package/dist/plus/notifications/notificationsService.d.ts +115 -0
- package/dist/plus/notifications/notificationsService.js +381 -0
- package/dist/plus/notifications/notificationsService.js.map +1 -0
- package/dist/plus/notifications/parse.d.ts +12 -0
- package/dist/plus/notifications/parse.js +152 -0
- package/dist/plus/notifications/parse.js.map +1 -0
- package/dist/plus/notifications/presentation.d.ts +28 -0
- package/dist/plus/notifications/presentation.js +55 -0
- package/dist/plus/notifications/presentation.js.map +1 -0
- package/dist/utils/env/node/exec.d.ts +10 -1
- package/dist/utils/env/node/exec.js +41 -4
- package/dist/utils/env/node/exec.js.map +1 -1
- package/docs/integrations.md +25 -3
- package/docs/notifications.md +239 -0
- package/package.json +22 -2
|
@@ -307,11 +307,24 @@ export declare abstract class IntegrationBase<ID extends IntegrationIds = Integr
|
|
|
307
307
|
onSessionPublishing(publication: SessionPublication): void;
|
|
308
308
|
protected invalidatePublishedSession(_publication: SessionPublication, _affectsPrimary: boolean): void;
|
|
309
309
|
private static readonly requestExceptionLimit;
|
|
310
|
+
/** The primary connection's strikes (see {@link trackRequestException}). */
|
|
310
311
|
private requestExceptionCount;
|
|
312
|
+
/** The strikes of every other connection, by connection id. */
|
|
313
|
+
private readonly connectionRequestExceptionCounts;
|
|
314
|
+
/**
|
|
315
|
+
* The connection a read's strikes and successes count against: `undefined` for the primary, which a read reaches
|
|
316
|
+
* by omitting `connectionId` or by naming it, else the connection named. The primary is named by its session's id,
|
|
317
|
+
* which is its connection's id, or, before that session is resolved, by the connection configured as primary.
|
|
318
|
+
*/
|
|
319
|
+
private getSecondaryConnectionId;
|
|
311
320
|
private resetRecoveryAccounting;
|
|
312
|
-
resetRequestExceptionCount(syncReqUsecase: SyncReqUsecase | 'all'): void;
|
|
313
321
|
/**
|
|
314
|
-
*
|
|
322
|
+
* Clears the strikes of the connection `connectionId` names (the primary when omitted) after a read of it
|
|
323
|
+
* succeeded, or of every connection for `'all'`.
|
|
324
|
+
*/
|
|
325
|
+
resetRequestExceptionCount(syncReqUsecase: SyncReqUsecase | 'all', connectionId?: string): void;
|
|
326
|
+
/**
|
|
327
|
+
* Resets the primary connection's request exceptions without resetting the amount of syncs
|
|
315
328
|
*/
|
|
316
329
|
smoothifyRequestExceptionCount(): void;
|
|
317
330
|
reset(): Promise<void>;
|
|
@@ -408,9 +421,10 @@ export declare abstract class IntegrationBase<ID extends IntegrationIds = Integr
|
|
|
408
421
|
* Shows one notice, and spends at most one strike, for a batch read whose targets failed with a server error or a
|
|
409
422
|
* timeout. Our own clients leave both to the batch (see `reportRequestFailure`) instead of spending them per
|
|
410
423
|
* target. `strike` is true only when every target failed and the call's own failure spent none: a call that
|
|
411
|
-
* answered some targets showed the host is up, and budgets strikes the same way as the rest of its failures.
|
|
424
|
+
* answered some targets showed the host is up, and budgets strikes the same way as the rest of its failures. The
|
|
425
|
+
* strike is `connectionId`'s, the connection the call read.
|
|
412
426
|
*/
|
|
413
|
-
protected reportDeferredRequestFailures(slots: readonly PromiseSettledResult<unknown>[] | undefined, strike: boolean): void;
|
|
427
|
+
protected reportDeferredRequestFailures(slots: readonly PromiseSettledResult<unknown>[] | undefined, strike: boolean, connectionId: string | undefined): void;
|
|
414
428
|
/**
|
|
415
429
|
* The failure handling of an etag cheap check that failed as a whole. Only a refused credential runs
|
|
416
430
|
* {@link handleProviderException}, for its session expiry, re-authentication and strike. Anything else is only
|
|
@@ -431,7 +445,7 @@ export declare abstract class IntegrationBase<ID extends IntegrationIds = Integr
|
|
|
431
445
|
private confirmCredential;
|
|
432
446
|
/** Names each scoped refusal's cause (see {@link describeRefusal}); only once the credential is proven. */
|
|
433
447
|
private nameRefusalCauses;
|
|
434
|
-
/** Returns whether it spent a strike
|
|
448
|
+
/** Returns whether it spent a strike (see {@link trackRequestException}). */
|
|
435
449
|
protected handleProviderException(syncReqUsecase: SyncReqUsecase, ex: Error, options?: {
|
|
436
450
|
scope?: ScopedLogger | undefined;
|
|
437
451
|
silent?: boolean;
|
|
@@ -447,8 +461,16 @@ export declare abstract class IntegrationBase<ID extends IntegrationIds = Integr
|
|
|
447
461
|
* that instead of reading with an expired token or as a missing connection.
|
|
448
462
|
*/
|
|
449
463
|
protected refreshSessionIfExpired(): Promise<Error | undefined>;
|
|
464
|
+
/**
|
|
465
|
+
* Spends a strike against the connection `connectionId` names (the primary when omitted); a server error or timeout
|
|
466
|
+
* our API clients report names the connection whose token made the request (see `reportRequestFailure`). At
|
|
467
|
+
* `requestExceptionLimit` the primary session is dropped for this session of the host. Another connection has no
|
|
468
|
+
* cached session to drop, since each read resolves its own, so its failures go on surfacing on its reads, and
|
|
469
|
+
* reaching the limit leaves the primary and every other connection as they are.
|
|
470
|
+
*/
|
|
450
471
|
trackRequestException(options?: {
|
|
451
472
|
silent?: boolean;
|
|
473
|
+
connectionId?: string;
|
|
452
474
|
}): void;
|
|
453
475
|
isConnected(): Promise<boolean>;
|
|
454
476
|
private ensureSession;
|
|
@@ -12,11 +12,11 @@ import { isProviderUnreachableError, toError } from "../errors.js";
|
|
|
12
12
|
import "../constants.js";
|
|
13
13
|
import { isAzureProviderId } from "../providers/providerErrors.js";
|
|
14
14
|
import { attributeScopedAuthFailures, hasOnlyScopedAuthFailures, markCredentialRefusals, toCollectionScopeFailure } from "../collectionMetadata.js";
|
|
15
|
-
import { getSessionIdentity } from "../authentication/models.js";
|
|
16
|
-
import { areDomainsOnSameHost } from "../utils/domain.utils.js";
|
|
17
|
-
import { isSelfManagedHostIntegrationId } from "../utils/integration.utils.js";
|
|
18
15
|
import { throwIfAllSettledFailed } from "../providers/utils/providerPaging.js";
|
|
16
|
+
import { areDomainsOnSameHost } from "../utils/domain.utils.js";
|
|
19
17
|
import { providersMetadata } from "../providers/models.js";
|
|
18
|
+
import { isSelfManagedHostIntegrationId } from "../utils/integration.utils.js";
|
|
19
|
+
import { getSessionIdentity } from "../authentication/models.js";
|
|
20
20
|
import { RejectedTokenTracker } from "../authentication/rejectedTokenTracker.js";
|
|
21
21
|
import { getCachedIssue } from "./issueCache.js";
|
|
22
22
|
//#region ../plus/integrations/src/models/integration.ts
|
|
@@ -391,21 +391,46 @@ var IntegrationBase = class IntegrationBase {
|
|
|
391
391
|
this.invalidateDiscoveryCaches();
|
|
392
392
|
}
|
|
393
393
|
static requestExceptionLimit = 5;
|
|
394
|
+
/** The primary connection's strikes (see {@link trackRequestException}). */
|
|
394
395
|
requestExceptionCount = 0;
|
|
396
|
+
/** The strikes of every other connection, by connection id. */
|
|
397
|
+
connectionRequestExceptionCounts = /* @__PURE__ */ new Map();
|
|
398
|
+
/**
|
|
399
|
+
* The connection a read's strikes and successes count against: `undefined` for the primary, which a read reaches
|
|
400
|
+
* by omitting `connectionId` or by naming it, else the connection named. The primary is named by its session's id,
|
|
401
|
+
* which is its connection's id, or, before that session is resolved, by the connection configured as primary.
|
|
402
|
+
*/
|
|
403
|
+
getSecondaryConnectionId(connectionId) {
|
|
404
|
+
if (!connectionId || connectionId === this._session?.id) return void 0;
|
|
405
|
+
if (connectionId === this.authenticationService.getPrimaryConnectionId(this.authProvider.id, this.authProviderDescriptor)) return;
|
|
406
|
+
return connectionId;
|
|
407
|
+
}
|
|
395
408
|
resetRecoveryAccounting() {
|
|
396
409
|
this.requestExceptionCount = 0;
|
|
410
|
+
this.connectionRequestExceptionCounts.clear();
|
|
397
411
|
this._syncRequestsPerFailedUsecase.clear();
|
|
398
412
|
this._rejectedTokens.clear();
|
|
399
413
|
}
|
|
400
|
-
|
|
401
|
-
|
|
414
|
+
/**
|
|
415
|
+
* Clears the strikes of the connection `connectionId` names (the primary when omitted) after a read of it
|
|
416
|
+
* succeeded, or of every connection for `'all'`.
|
|
417
|
+
*/
|
|
418
|
+
resetRequestExceptionCount(syncReqUsecase, connectionId) {
|
|
402
419
|
if (syncReqUsecase === "all") {
|
|
403
420
|
this.resetRecoveryAccounting();
|
|
404
421
|
this.invalidateDiscoveryCaches();
|
|
405
|
-
|
|
422
|
+
return;
|
|
423
|
+
}
|
|
424
|
+
const secondary = this.getSecondaryConnectionId(connectionId);
|
|
425
|
+
if (secondary != null) {
|
|
426
|
+
this.connectionRequestExceptionCounts.delete(secondary);
|
|
427
|
+
return;
|
|
428
|
+
}
|
|
429
|
+
this.requestExceptionCount = 0;
|
|
430
|
+
this._syncRequestsPerFailedUsecase.delete(syncReqUsecase);
|
|
406
431
|
}
|
|
407
432
|
/**
|
|
408
|
-
* Resets request exceptions without resetting the amount of syncs
|
|
433
|
+
* Resets the primary connection's request exceptions without resetting the amount of syncs
|
|
409
434
|
*/
|
|
410
435
|
smoothifyRequestExceptionCount() {
|
|
411
436
|
this.requestExceptionCount = 0;
|
|
@@ -423,6 +448,8 @@ var IntegrationBase = class IntegrationBase {
|
|
|
423
448
|
*/
|
|
424
449
|
switchConnection() {
|
|
425
450
|
this.onStoredTokensReplaced();
|
|
451
|
+
this.requestExceptionCount = 0;
|
|
452
|
+
this.connectionRequestExceptionCounts.clear();
|
|
426
453
|
return this.runSessionTransition(async () => {
|
|
427
454
|
if (this._session === void 0) return;
|
|
428
455
|
const wasConnected = this._session != null;
|
|
@@ -586,9 +613,10 @@ var IntegrationBase = class IntegrationBase {
|
|
|
586
613
|
* Shows one notice, and spends at most one strike, for a batch read whose targets failed with a server error or a
|
|
587
614
|
* timeout. Our own clients leave both to the batch (see `reportRequestFailure`) instead of spending them per
|
|
588
615
|
* target. `strike` is true only when every target failed and the call's own failure spent none: a call that
|
|
589
|
-
* answered some targets showed the host is up, and budgets strikes the same way as the rest of its failures.
|
|
616
|
+
* answered some targets showed the host is up, and budgets strikes the same way as the rest of its failures. The
|
|
617
|
+
* strike is `connectionId`'s, the connection the call read.
|
|
590
618
|
*/
|
|
591
|
-
reportDeferredRequestFailures(slots, strike) {
|
|
619
|
+
reportDeferredRequestFailures(slots, strike, connectionId) {
|
|
592
620
|
let notify;
|
|
593
621
|
for (const slot of slots ?? []) {
|
|
594
622
|
if (slot.status !== "rejected") continue;
|
|
@@ -596,7 +624,7 @@ var IntegrationBase = class IntegrationBase {
|
|
|
596
624
|
if (notify != null) break;
|
|
597
625
|
}
|
|
598
626
|
if (notify == null) return;
|
|
599
|
-
if (strike) this.trackRequestException();
|
|
627
|
+
if (strike) this.trackRequestException({ connectionId });
|
|
600
628
|
notify();
|
|
601
629
|
}
|
|
602
630
|
/**
|
|
@@ -646,7 +674,7 @@ var IntegrationBase = class IntegrationBase {
|
|
|
646
674
|
if (describeRefusal == null) return;
|
|
647
675
|
attributeScopedAuthFailures(metadata, (refusal, scope) => describeRefusal(session, refusal, scope));
|
|
648
676
|
}
|
|
649
|
-
/** Returns whether it spent a strike
|
|
677
|
+
/** Returns whether it spent a strike (see {@link trackRequestException}). */
|
|
650
678
|
handleProviderException(syncReqUsecase, ex, options) {
|
|
651
679
|
if (isCancellationError(ex)) return false;
|
|
652
680
|
if (ex instanceof AuthenticationError) this._validatedCredentials.clear();
|
|
@@ -709,7 +737,21 @@ var IntegrationBase = class IntegrationBase {
|
|
|
709
737
|
this.missingExpirityReported = true;
|
|
710
738
|
}
|
|
711
739
|
}
|
|
740
|
+
/**
|
|
741
|
+
* Spends a strike against the connection `connectionId` names (the primary when omitted); a server error or timeout
|
|
742
|
+
* our API clients report names the connection whose token made the request (see `reportRequestFailure`). At
|
|
743
|
+
* `requestExceptionLimit` the primary session is dropped for this session of the host. Another connection has no
|
|
744
|
+
* cached session to drop, since each read resolves its own, so its failures go on surfacing on its reads, and
|
|
745
|
+
* reaching the limit leaves the primary and every other connection as they are.
|
|
746
|
+
*/
|
|
712
747
|
trackRequestException(options) {
|
|
748
|
+
const secondary = this.getSecondaryConnectionId(options?.connectionId);
|
|
749
|
+
if (secondary != null) {
|
|
750
|
+
const count = (this.connectionRequestExceptionCounts.get(secondary) ?? 0) + 1;
|
|
751
|
+
this.connectionRequestExceptionCounts.set(secondary, count);
|
|
752
|
+
if (count === IntegrationBase.requestExceptionLimit) _logger.warn(`${this.name} connection '${secondary}' has failed ${count} requests since its last success; it is not the primary, so nothing is disconnected`);
|
|
753
|
+
return;
|
|
754
|
+
}
|
|
713
755
|
this.requestExceptionCount++;
|
|
714
756
|
if (this.requestExceptionCount >= IntegrationBase.requestExceptionLimit && this._session !== null) {
|
|
715
757
|
if (!options?.silent) this.ctx.hooks?.ui?.onDisconnectedAfterTooManyFailures?.(this.name);
|
|
@@ -852,7 +894,7 @@ var IntegrationBase = class IntegrationBase {
|
|
|
852
894
|
const start = performance.now();
|
|
853
895
|
try {
|
|
854
896
|
const issues = await this.searchProviderMyIssues(session, resources != null ? Array.isArray(resources) ? resources : [resources] : void 0, cancellation);
|
|
855
|
-
this.resetRequestExceptionCount("searchMyIssues");
|
|
897
|
+
this.resetRequestExceptionCount("searchMyIssues", connectionId);
|
|
856
898
|
return {
|
|
857
899
|
value: issues,
|
|
858
900
|
duration: performance.now() - start
|
|
@@ -891,7 +933,7 @@ var IntegrationBase = class IntegrationBase {
|
|
|
891
933
|
try {
|
|
892
934
|
const result = await this.searchProviderMyIssuesWithTruncation(session, resources != null ? Array.isArray(resources) ? resources : [resources] : void 0, cancellation, options);
|
|
893
935
|
await this.confirmScopedAuthFailures(session, result?.metadata);
|
|
894
|
-
this.resetRequestExceptionCount("searchMyIssues");
|
|
936
|
+
this.resetRequestExceptionCount("searchMyIssues", connectionId);
|
|
895
937
|
return { value: result };
|
|
896
938
|
} catch (ex) {
|
|
897
939
|
this.handleProviderException("searchMyIssues", ex, {
|
|
@@ -939,7 +981,7 @@ var IntegrationBase = class IntegrationBase {
|
|
|
939
981
|
load: async () => {
|
|
940
982
|
try {
|
|
941
983
|
const issue = await getProviderIssue(session);
|
|
942
|
-
this.resetRequestExceptionCount("getIssue");
|
|
984
|
+
this.resetRequestExceptionCount("getIssue", connectionId);
|
|
943
985
|
return issue;
|
|
944
986
|
} catch (ex) {
|
|
945
987
|
if (!isCancellationError(ex)) this.handleProviderException("getIssue", toError(ex), {
|
|
@@ -969,7 +1011,7 @@ var IntegrationBase = class IntegrationBase {
|
|
|
969
1011
|
return await this.ctx.cache.getCurrentAccount(this, (cacheable) => ({ value: (async () => {
|
|
970
1012
|
try {
|
|
971
1013
|
const account = await this.getProviderCurrentAccount?.(session, opts);
|
|
972
|
-
this.resetRequestExceptionCount("getCurrentAccount");
|
|
1014
|
+
this.resetRequestExceptionCount("getCurrentAccount", connectionId);
|
|
973
1015
|
return account;
|
|
974
1016
|
} catch (ex) {
|
|
975
1017
|
if (isCancellationError(ex) && !isProviderUnreachableError(ex)) {
|