Move settings sync auth into built in extension

This commit is contained in:
Rachel Macfarlane
2020-01-14 14:50:37 -08:00
parent b13740b4f3
commit 60beab2535
39 changed files with 1729 additions and 576 deletions

View File

@@ -69,6 +69,7 @@ import { IExtHostRpcService } from 'vs/workbench/api/common/extHostRpcService';
import { IExtHostInitDataService } from 'vs/workbench/api/common/extHostInitDataService';
import { ExtHostTheming } from 'vs/workbench/api/common/extHostTheming';
import { IExtHostTunnelService } from 'vs/workbench/api/common/extHostTunnelService';
import { ExtHostAuthentication } from 'vs/workbench/api/common/extHostAuthentication';
export interface IExtensionApiFactory {
(extension: IExtensionDescription, registry: ExtensionDescriptionRegistry, configProvider: ExtHostConfigProvider): typeof vscode;
@@ -128,6 +129,7 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
const extHostProgress = rpcProtocol.set(ExtHostContext.ExtHostProgress, new ExtHostProgress(rpcProtocol.getProxy(MainContext.MainThreadProgress)));
const extHostLabelService = rpcProtocol.set(ExtHostContext.ExtHostLabelService, new ExtHostLabelService(rpcProtocol));
const extHostTheming = rpcProtocol.set(ExtHostContext.ExtHostTheming, new ExtHostTheming(rpcProtocol));
const extHostAuthentication = rpcProtocol.set(ExtHostContext.ExtHostAuthentication, new ExtHostAuthentication(rpcProtocol));
// Check that no named customers are missing
const expected: ProxyIdentifier<any>[] = values(ExtHostContext);
@@ -175,6 +177,11 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
};
})();
const authentication: typeof vscode.authentication = {
registerAuthenticationProvider(provider: vscode.AuthenticationProvider): vscode.Disposable {
return extHostAuthentication.registerAuthenticationProvider(provider);
}
};
// namespace: commands
const commands: typeof vscode.commands = {
@@ -830,6 +837,7 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
return <typeof vscode>{
version: initData.version,
// namespaces
authentication,
commands,
debug,
env,