@@ -3,17 +3,14 @@ import { authentication, EventEmitter, window } from 'vscode';
3
3
import { wrapForForcedInsecureSSL } from '@env/fetch' ;
4
4
import type { IntegrationId } from '../../../constants.integrations' ;
5
5
import { HostingIntegrationId , IssueIntegrationId , SelfHostedIntegrationId } from '../../../constants.integrations' ;
6
- import type {
7
- IntegrationAuthenticationKeys ,
8
- StoredConfiguredProviderAuthenticationDescriptor ,
9
- } from '../../../constants.storage' ;
6
+ import type { IntegrationAuthenticationKeys , StoredConfiguredIntegrationDescriptor } from '../../../constants.storage' ;
10
7
import type { Sources } from '../../../constants.telemetry' ;
11
8
import type { Container } from '../../../container' ;
12
9
import { gate } from '../../../system/decorators/gate' ;
13
10
import { debug , log } from '../../../system/decorators/log' ;
14
11
import type { DeferredEventExecutor } from '../../../system/event' ;
15
12
import { isSelfHostedIntegrationId , supportedIntegrationIds } from '../providers/models' ;
16
- import type { ConfiguredProviderAuthenticationDescriptor , ProviderAuthenticationSession } from './models' ;
13
+ import type { ConfiguredIntegrationDescriptor , ProviderAuthenticationSession } from './models' ;
17
14
import { isSupportedCloudIntegrationId } from './models' ;
18
15
19
16
const maxSmallIntegerV8 = 2 ** 30 - 1 ; // Max number that can be stored in V8's smis (small integers)
@@ -506,7 +503,7 @@ class BuiltInAuthenticationProvider extends LocalIntegrationAuthenticationProvid
506
503
507
504
export class IntegrationAuthenticationService implements Disposable {
508
505
private readonly providers = new Map < IntegrationId , IntegrationAuthenticationProvider > ( ) ;
509
- private _configured ?: Map < IntegrationId , ConfiguredProviderAuthenticationDescriptor [ ] > ;
506
+ private _configured ?: Map < IntegrationId , ConfiguredIntegrationDescriptor [ ] > ;
510
507
511
508
constructor ( private readonly container : Container ) { }
512
509
@@ -515,7 +512,7 @@ export class IntegrationAuthenticationService implements Disposable {
515
512
this . providers . clear ( ) ;
516
513
}
517
514
518
- get configured ( ) : Map < IntegrationId , ConfiguredProviderAuthenticationDescriptor [ ] > {
515
+ get configured ( ) : Map < IntegrationId , ConfiguredIntegrationDescriptor [ ] > {
519
516
if ( this . _configured == null ) {
520
517
this . _configured = new Map ( ) ;
521
518
const storedConfigured = this . container . storage . get ( 'integrations:configured' ) ;
@@ -534,7 +531,7 @@ export class IntegrationAuthenticationService implements Disposable {
534
531
535
532
private async storeConfigured ( ) {
536
533
// We need to convert the map to a record to store
537
- const configured : Record < string , StoredConfiguredProviderAuthenticationDescriptor [ ] > = { } ;
534
+ const configured : Record < string , StoredConfiguredIntegrationDescriptor [ ] > = { } ;
538
535
for ( const [ id , descriptors ] of this . configured ) {
539
536
configured [ id ] = descriptors . map ( d => ( {
540
537
...d ,
@@ -549,7 +546,7 @@ export class IntegrationAuthenticationService implements Disposable {
549
546
await this . container . storage . store ( 'integrations:configured' , configured ) ;
550
547
}
551
548
552
- async addConfigured ( descriptor : ConfiguredProviderAuthenticationDescriptor ) {
549
+ async addConfigured ( descriptor : ConfiguredIntegrationDescriptor ) {
553
550
const descriptors = this . configured . get ( descriptor . integrationId ) ?? [ ] ;
554
551
// Only add if one does not exist
555
552
if ( descriptors . some ( d => d . domain === descriptor . domain && d . integrationId === descriptor . integrationId ) ) {
@@ -560,7 +557,7 @@ export class IntegrationAuthenticationService implements Disposable {
560
557
await this . storeConfigured ( ) ;
561
558
}
562
559
563
- async removeConfigured ( descriptor : Pick < ConfiguredProviderAuthenticationDescriptor , 'integrationId' | 'domain' > ) {
560
+ async removeConfigured ( descriptor : Pick < ConfiguredIntegrationDescriptor , 'integrationId' | 'domain' > ) {
564
561
const descriptors = this . configured . get ( descriptor . integrationId ) ;
565
562
if ( descriptors == null ) return ;
566
563
const index = descriptors . findIndex (
0 commit comments