Merge from vscode 64980ea1f3f532c82bb6c28d27bba9ef2c5b4463 (#7206)

* Merge from vscode 64980ea1f3f532c82bb6c28d27bba9ef2c5b4463

* fix config changes

* fix strictnull checks
This commit is contained in:
Anthony Dresser
2019-09-15 22:38:26 -07:00
committed by GitHub
parent fa6c52699e
commit ea0f9e6ce9
1226 changed files with 21541 additions and 17633 deletions

View File

@@ -13,7 +13,8 @@ import { Workbench } from 'vs/workbench/browser/workbench';
import { IChannel } from 'vs/base/parts/ipc/common/ipc';
import { REMOTE_FILE_SYSTEM_CHANNEL_NAME, RemoteExtensionsFileSystemProvider } from 'vs/platform/remote/common/remoteAgentFileSystemChannel';
import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService';
import { IProductService, IProductConfiguration } from 'vs/platform/product/common/product';
import { IProductService } from 'vs/platform/product/common/product';
import product from 'vs/platform/product/browser/product';
import { RemoteAgentService } from 'vs/workbench/services/remote/browser/remoteAgentServiceImpl';
import { RemoteAuthorityResolverService } from 'vs/platform/remote/browser/remoteAuthorityResolverService';
import { IRemoteAuthorityResolverService } from 'vs/platform/remote/common/remoteAuthorityResolver';
@@ -121,7 +122,7 @@ class CodeRendererMain extends Disposable {
// Log
const logsPath = URI.file(toLocalISOString(new Date()).replace(/-|:|\.\d+Z$/g, '')).with({ scheme: 'vscode-log' });
const logService = new BufferLogService();
const logService = new BufferLogService(this.configuration.logLevel);
serviceCollection.set(ILogService, logService);
const payload = this.resolveWorkspaceInitializationPayload();
@@ -131,11 +132,17 @@ class CodeRendererMain extends Disposable {
serviceCollection.set(IWorkbenchEnvironmentService, environmentService);
// Product
const productService = this.createProductService();
const productService = {
_serviceBrand: undefined,
...{
...product, // dev or built time config
...{ urlProtocol: '' } // web related overrides from us
}
};
serviceCollection.set(IProductService, productService);
// Remote
const remoteAuthorityResolverService = new RemoteAuthorityResolverService();
const remoteAuthorityResolverService = new RemoteAuthorityResolverService(this.configuration.resourceUriProvider);
serviceCollection.set(IRemoteAuthorityResolverService, remoteAuthorityResolverService);
// Signing
@@ -220,18 +227,6 @@ class CodeRendererMain extends Disposable {
fileService.registerProvider(Schemas.userData, this.configuration.userDataProvider);
}
private createProductService(): IProductService {
const productConfiguration = {
...this.configuration.productConfiguration ? this.configuration.productConfiguration : {
version: '1.38.0-unknown',
nameLong: 'Unknown',
extensionAllowedProposedApi: [],
}, ...{ urlProtocol: '' }
} as IProductConfiguration;
return { _serviceBrand: undefined, ...productConfiguration };
}
private async createStorageService(payload: IWorkspaceInitializationPayload, environmentService: IWorkbenchEnvironmentService, fileService: IFileService, logService: ILogService): Promise<BrowserStorageService> {
const storageService = new BrowserStorageService(environmentService, fileService);