Archived
1
0

Update to VS Code 1.52.1

This commit is contained in:
Asher
2021-02-09 16:08:37 +00:00
1351 changed files with 56560 additions and 38990 deletions

View File

@ -33,7 +33,14 @@
self.require = {
baseUrl: `${window.location.origin}/static/out`,
recordStats: true,
createTrustedScriptURL: value => value,
trustedTypesPolicy: window.trustedTypes?.createPolicy('amdLoader', {
createScriptURL(value) {
if(value.startsWith(window.location.origin)) {
return value;
}
throw new Error(`Invalid script url: ${value}`)
}
}),
paths: {
'vscode-textmate': `${window.location.origin}/static/remote/web/node_modules/vscode-textmate/release/main`,
'vscode-oniguruma': `${window.location.origin}/static/remote/web/node_modules/vscode-oniguruma/release/main`,

View File

@ -32,7 +32,14 @@
self.require = {
baseUrl: `${window.location.origin}/static/out`,
recordStats: true,
createTrustedScriptURL: value => value,
trustedTypesPolicy: window.trustedTypes?.createPolicy('amdLoader', {
createScriptURL(value) {
if(value.startsWith(window.location.origin)) {
return value;
}
throw new Error(`Invalid script url: ${value}`)
}
}),
paths: {
'vscode-textmate': `${window.location.origin}/static/node_modules/vscode-textmate/release/main`,
'vscode-oniguruma': `${window.location.origin}/static/node_modules/vscode-oniguruma/release/main`,

View File

@ -17,7 +17,11 @@ import { isStandalone } from 'vs/base/browser/browser';
import { localize } from 'vs/nls';
import { Schemas } from 'vs/base/common/network';
import product from 'vs/platform/product/common/product';
<<<<<<< HEAD
import { encodePath } from 'vs/server/node/util';
=======
import { parseLogLevel } from 'vs/platform/log/common/log';
>>>>>>> e4a830e9b7ca039c7c70697786d29f5b6679d775
function doCreateUri(path: string, queryValues: Map<string, string>): URI {
let query: string | undefined = undefined;
@ -438,7 +442,50 @@ class WindowIndicator implements IWindowIndicator {
// Find workspace to open and payload
let foundWorkspace = false;
let workspace: IWorkspace;
<<<<<<< HEAD
let payload = config.workspaceProvider?.payload || Object.create(null);
=======
let payload = Object.create(null);
let logLevel: string | undefined = undefined;
const query = new URL(document.location.href).searchParams;
query.forEach((value, key) => {
switch (key) {
// Folder
case WorkspaceProvider.QUERY_PARAM_FOLDER:
workspace = { folderUri: URI.parse(value) };
foundWorkspace = true;
break;
// Workspace
case WorkspaceProvider.QUERY_PARAM_WORKSPACE:
workspace = { workspaceUri: URI.parse(value) };
foundWorkspace = true;
break;
// Empty
case WorkspaceProvider.QUERY_PARAM_EMPTY_WINDOW:
workspace = undefined;
foundWorkspace = true;
break;
// Payload
case WorkspaceProvider.QUERY_PARAM_PAYLOAD:
try {
payload = JSON.parse(value);
} catch (error) {
console.error(error); // possible invalid JSON
}
break;
// Log level
case 'logLevel':
logLevel = value;
break;
}
});
>>>>>>> e4a830e9b7ca039c7c70697786d29f5b6679d775
// If no workspace is provided through the URL, check for config attribute from server
if (!foundWorkspace) {
@ -496,6 +543,7 @@ class WindowIndicator implements IWindowIndicator {
// Finally create workbench
create(document.body, {
...config,
logLevel: logLevel ? parseLogLevel(logLevel) : undefined,
settingsSyncOptions,
windowIndicator,
productQualityChangeHandler,