Merge from vscode c58aaab8a1cc22a7139b761166a0d4f37d41e998 (#7880)

* Merge from vscode c58aaab8a1cc22a7139b761166a0d4f37d41e998

* fix pipelines

* fix strict-null-checks

* add missing files
This commit is contained in:
Anthony Dresser
2019-10-21 22:12:22 -07:00
committed by GitHub
parent 7c9be74970
commit 1e22f47304
913 changed files with 18898 additions and 16536 deletions

View File

@@ -16,22 +16,23 @@ import { ISingleFolderWorkspaceIdentifier, IWorkspaceIdentifier } from 'vs/platf
import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService';
import { IWorkbenchConstructionOptions } from 'vs/workbench/workbench.web.api';
import product from 'vs/platform/product/common/product';
import { serializableToMap } from 'vs/base/common/map';
export class BrowserWindowConfiguration implements IWindowConfiguration {
_: any[];
_!: any[];
machineId: string;
windowId: number;
logLevel: LogLevel;
machineId!: string;
windowId!: number;
logLevel!: LogLevel;
mainPid: number;
mainPid!: number;
appRoot: string;
execPath: string;
appRoot!: string;
execPath!: string;
isInitialStartup?: boolean;
userEnv: IProcessEnvironment;
userEnv!: IProcessEnvironment;
nodeCachedDataDir?: string;
backupPath?: string;
@@ -54,7 +55,7 @@ export class BrowserWindowConfiguration implements IWindowConfiguration {
perfStartTime?: number;
perfAppReady?: number;
perfWindowLoadTime?: number;
perfEntries: ExportData;
perfEntries!: ExportData;
filesToOpenOrCreate?: IPath[];
filesToDiff?: IPath[];
@@ -88,7 +89,7 @@ export class BrowserWorkbenchEnvironmentService implements IWorkbenchEnvironment
this.userDataSyncLogResource = joinPath(options.logsPath, 'userDataSync.log');
this.keybindingsResource = joinPath(this.userRoamingDataHome, 'keybindings.json');
this.keyboardLayoutResource = joinPath(this.userRoamingDataHome, 'keyboardLayout.json');
this.localeResource = joinPath(this.userRoamingDataHome, 'locale.json');
this.argvResource = joinPath(this.userRoamingDataHome, 'argv.json');
this.backupHome = joinPath(this.userRoamingDataHome, BACKUPS);
this.configuration.backupWorkspaceResource = joinPath(this.backupHome, options.workspaceId);
this.configuration.connectionToken = options.connectionToken || getCookieValue('vscode-tkn');
@@ -100,32 +101,53 @@ export class BrowserWorkbenchEnvironmentService implements IWorkbenchEnvironment
this.untitledWorkspacesHome = URI.from({ scheme: Schemas.untitled, path: 'Workspaces' });
if (document && document.location && document.location.search) {
const map = new Map<string, string>();
const query = document.location.search.substring(1);
const vars = query.split('&');
for (let p of vars) {
const pair = p.split('=');
if (pair.length >= 2) {
map.set(pair[0], decodeURIComponent(pair[1]));
// Fill in selected extra environmental properties
if (options.workspaceProvider && Array.isArray(options.workspaceProvider.payload)) {
const environment = serializableToMap(options.workspaceProvider.payload);
for (const [key, value] of environment) {
switch (key) {
case 'extensionDevelopmentPath':
this.extensionDevelopmentLocationURI = [URI.parse(value)];
this.isExtensionDevelopment = true;
break;
case 'debugId':
this.debugExtensionHost.debugId = value;
break;
case 'inspect-brk-extensions':
this.debugExtensionHost.port = parseInt(value);
this.debugExtensionHost.break = false;
break;
}
}
} else {
// TODO@Ben remove me once environment is adopted
if (document && document.location && document.location.search) {
const map = new Map<string, string>();
const query = document.location.search.substring(1);
const vars = query.split('&');
for (let p of vars) {
const pair = p.split('=');
if (pair.length >= 2) {
map.set(pair[0], decodeURIComponent(pair[1]));
}
}
const edp = map.get('edp');
if (edp) {
this.extensionDevelopmentLocationURI = [URI.parse(edp)];
this.isExtensionDevelopment = true;
}
const edp = map.get('extensionDevelopmentPath');
if (edp) {
this.extensionDevelopmentLocationURI = [URI.parse(edp)];
this.isExtensionDevelopment = true;
}
const di = map.get('di');
if (di) {
this.debugExtensionHost.debugId = di;
}
const di = map.get('debugId');
if (di) {
this.debugExtensionHost.debugId = di;
}
const ibe = map.get('ibe');
if (ibe) {
this.debugExtensionHost.port = parseInt(ibe);
this.debugExtensionHost.break = false;
const ibe = map.get('inspect-brk-extensions');
if (ibe) {
this.debugExtensionHost.port = parseInt(ibe);
this.debugExtensionHost.break = false;
}
}
}
}
@@ -133,53 +155,52 @@ export class BrowserWorkbenchEnvironmentService implements IWorkbenchEnvironment
untitledWorkspacesHome: URI;
extensionTestsLocationURI?: URI;
args: any;
execPath: string;
cliPath: string;
execPath!: string;
cliPath!: string;
appRoot: string;
userHome: string;
userDataPath: string;
userHome!: string;
userDataPath!: string;
appNameLong: string;
appQuality?: string;
appSettingsHome: URI;
appSettingsHome!: URI;
userRoamingDataHome: URI;
settingsResource: URI;
keybindingsResource: URI;
keyboardLayoutResource: URI;
localeResource: URI;
argvResource: URI;
settingsSyncPreviewResource: URI;
userDataSyncLogResource: URI;
machineSettingsHome: URI;
machineSettingsResource: URI;
globalStorageHome: string;
workspaceStorageHome: string;
machineSettingsHome!: URI;
machineSettingsResource!: URI;
globalStorageHome!: string;
workspaceStorageHome!: string;
backupHome: URI;
backupWorkspacesPath: string;
workspacesHome: string;
isExtensionDevelopment: boolean;
disableExtensions: boolean | string[];
builtinExtensionsPath: string;
backupWorkspacesPath!: string;
workspacesHome!: string;
isExtensionDevelopment!: boolean;
disableExtensions!: boolean | string[];
builtinExtensionsPath!: string;
extensionsPath?: string;
extensionDevelopmentLocationURI?: URI[];
extensionTestsPath?: string;
debugExtensionHost: IExtensionHostDebugParams;
debugSearch: IDebugParams;
logExtensionHostCommunication: boolean;
isBuilt: boolean;
wait: boolean;
status: boolean;
debugSearch!: IDebugParams;
logExtensionHostCommunication!: boolean;
isBuilt!: boolean;
wait!: boolean;
status!: boolean;
log?: string;
logsPath: string;
verbose: boolean;
skipGettingStarted: boolean;
skipReleaseNotes: boolean;
mainIPCHandle: string;
sharedIPCHandle: string;
verbose!: boolean;
skipReleaseNotes!: boolean;
mainIPCHandle!: string;
sharedIPCHandle!: string;
nodeCachedDataDir?: string;
installSourcePath: string;
disableUpdates: boolean;
disableCrashReporter: boolean;
installSourcePath!: string;
disableUpdates!: boolean;
disableCrashReporter!: boolean;
driverHandle?: string;
driverVerbose: boolean;
driverVerbose!: boolean;
galleryMachineIdResource?: URI;
readonly logFile: URI;