Merge from vscode 1b314ab317fbff7d799b21754326b7d849889ceb

This commit is contained in:
ADS Merger
2020-07-15 23:51:18 +00:00
parent aae013d498
commit 9d3f12d0b7
554 changed files with 15159 additions and 8223 deletions

View File

@@ -133,6 +133,12 @@ export class BrowserWorkbenchEnvironmentService implements IWorkbenchEnvironment
@memoize
get snippetsHome(): URI { return joinPath(this.userRoamingDataHome, 'snippets'); }
@memoize
get globalStorageHome(): URI { return URI.joinPath(this.userRoamingDataHome, 'globalStorage'); }
@memoize
get workspaceStorageHome(): URI { return URI.joinPath(this.userRoamingDataHome, 'workspaceStorage'); }
/*
* In Web every workspace can potentially have scoped user-data and/or extensions and if Sync state is shared then it can make
* Sync error prone - say removing extensions from another workspace. Hence scope Sync state per workspace.
@@ -208,10 +214,14 @@ export class BrowserWorkbenchEnvironmentService implements IWorkbenchEnvironment
get disableExtensions() { return this.payload?.get('disableExtensions') === 'true'; }
private get webviewEndpoint(): string {
// TODO@matt: get fallback from product.json
return this.options.webviewEndpoint || 'https://{{uuid}}.vscode-webview-test.com/{{commit}}';
}
@memoize
get webviewExternalEndpoint(): string {
// TODO@matt: get fallback from product.json
return (this.options.webviewEndpoint || 'https://{{uuid}}.vscode-webview-test.com/{{commit}}').replace('{{commit}}', product.commit || '0d728c31ebdf03869d2687d9be0b017667c9ff37');
return (this.webviewEndpoint).replace('{{commit}}', product.commit || '0d728c31ebdf03869d2687d9be0b017667c9ff37');
}
@memoize
@@ -221,7 +231,8 @@ export class BrowserWorkbenchEnvironmentService implements IWorkbenchEnvironment
@memoize
get webviewCspSource(): string {
return this.webviewExternalEndpoint.replace('{{uuid}}', '*');
const uri = URI.parse(this.webviewEndpoint.replace('{{uuid}}', '*'));
return `${uri.scheme}://${uri.authority}`;
}
get disableTelemetry(): boolean { return false; }