mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-23 18:19:12 +01:00
Add experimentation to Microsoft auth (#226107)
* Add experimentation to Microsoft auth So that we can gradually roll out MSAL support. * correct order
This commit is contained in:
committed by
GitHub
parent
b8ad412410
commit
c125b90d41
@@ -0,0 +1,26 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
import * as vscode from 'vscode';
|
||||
import { getExperimentationService, IExperimentationService, IExperimentationTelemetry, TargetPopulation } from 'vscode-tas-client';
|
||||
|
||||
export async function createExperimentationService(
|
||||
context: vscode.ExtensionContext,
|
||||
experimentationTelemetry: IExperimentationTelemetry,
|
||||
isPreRelease: boolean,
|
||||
): Promise<IExperimentationService> {
|
||||
const id = context.extension.id;
|
||||
const version = context.extension.packageJSON['version'];
|
||||
|
||||
const service = getExperimentationService(
|
||||
id,
|
||||
version,
|
||||
isPreRelease ? TargetPopulation.Insiders : TargetPopulation.Public,
|
||||
experimentationTelemetry,
|
||||
context.globalState,
|
||||
) as unknown as IExperimentationService;
|
||||
await service.initializePromise;
|
||||
await service.initialFetch;
|
||||
return service;
|
||||
}
|
||||
Reference in New Issue
Block a user