mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Merge from vscode 1b314ab317fbff7d799b21754326b7d849889ceb
This commit is contained in:
@@ -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; }
|
||||
|
||||
Reference in New Issue
Block a user