mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-17 09:35:37 -05:00
Merge from vscode a5cf1da01d5db3d2557132be8d30f89c38019f6c (#8525)
* Merge from vscode a5cf1da01d5db3d2557132be8d30f89c38019f6c * remove files we don't want * fix hygiene * update distro * update distro * fix hygiene * fix strict nulls * distro * distro * fix tests * fix tests * add another edit * fix viewlet icon * fix azure dialog * fix some padding * fix more padding issues
This commit is contained in:
@@ -32,6 +32,7 @@
|
||||
'xterm': `${window.location.origin}/static/remote/web/node_modules/xterm/lib/xterm.js`,
|
||||
'xterm-addon-search': `${window.location.origin}/static/remote/web/node_modules/xterm-addon-search/lib/xterm-addon-search.js`,
|
||||
'xterm-addon-web-links': `${window.location.origin}/static/remote/web/node_modules/xterm-addon-web-links/lib/xterm-addon-web-links.js`,
|
||||
'xterm-addon-webgl': `${window.location.origin}/static/remote/web/node_modules/xterm-addon-webgl/lib/xterm-addon-webgl.js`,
|
||||
'semver-umd': `${window.location.origin}/static/remote/web/node_modules/semver-umd/lib/semver-umd.js`,
|
||||
}
|
||||
};
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
'xterm': `${window.location.origin}/static/node_modules/xterm/lib/xterm.js`,
|
||||
'xterm-addon-search': `${window.location.origin}/static/node_modules/xterm-addon-search/lib/xterm-addon-search.js`,
|
||||
'xterm-addon-web-links': `${window.location.origin}/static/node_modules/xterm-addon-web-links/lib/xterm-addon-web-links.js`,
|
||||
'xterm-addon-webgl': `${window.location.origin}/static/node_modules/xterm-addon-webgl/lib/xterm-addon-webgl.js`,
|
||||
'semver-umd': `${window.location.origin}/static/node_modules/semver-umd/lib/semver-umd.js`,
|
||||
}
|
||||
};
|
||||
|
||||
@@ -277,13 +277,22 @@ class WorkspaceProvider implements IWorkspaceProvider {
|
||||
|
||||
(function () {
|
||||
|
||||
// Find config element in DOM
|
||||
// Find config by checking for DOM
|
||||
const configElement = document.getElementById('vscode-workbench-web-configuration');
|
||||
const configElementAttribute = configElement ? configElement.getAttribute('data-settings') : undefined;
|
||||
if (!configElement || !configElementAttribute) {
|
||||
throw new Error('Missing web configuration element');
|
||||
}
|
||||
|
||||
const config: IWorkbenchConstructionOptions & { folderUri?: UriComponents, workspaceUri?: UriComponents } = JSON.parse(configElementAttribute);
|
||||
|
||||
// Revive static extension locations
|
||||
if (Array.isArray(config.staticExtensions)) {
|
||||
config.staticExtensions.forEach(extension => {
|
||||
extension.extensionLocation = URI.revive(extension.extensionLocation);
|
||||
});
|
||||
}
|
||||
|
||||
// Find workspace to open and payload
|
||||
let foundWorkspace = false;
|
||||
let workspace: IWorkspace;
|
||||
@@ -319,27 +328,21 @@ class WorkspaceProvider implements IWorkspaceProvider {
|
||||
});
|
||||
|
||||
// If no workspace is provided through the URL, check for config attribute from server
|
||||
const options: IWorkbenchConstructionOptions & { folderUri?: UriComponents, workspaceUri?: UriComponents } = JSON.parse(configElementAttribute);
|
||||
if (!foundWorkspace) {
|
||||
if (options.folderUri) {
|
||||
workspace = { folderUri: URI.revive(options.folderUri) };
|
||||
} else if (options.workspaceUri) {
|
||||
workspace = { workspaceUri: URI.revive(options.workspaceUri) };
|
||||
if (config.folderUri) {
|
||||
workspace = { folderUri: URI.revive(config.folderUri) };
|
||||
} else if (config.workspaceUri) {
|
||||
workspace = { workspaceUri: URI.revive(config.workspaceUri) };
|
||||
} else {
|
||||
workspace = undefined;
|
||||
}
|
||||
}
|
||||
|
||||
options.workspaceProvider = new WorkspaceProvider(workspace, payload);
|
||||
options.urlCallbackProvider = new PollingURLCallbackProvider();
|
||||
options.credentialsProvider = new LocalStorageCredentialsProvider();
|
||||
|
||||
if (Array.isArray(options.staticExtensions)) {
|
||||
options.staticExtensions.forEach(extension => {
|
||||
extension.extensionLocation = URI.revive(extension.extensionLocation);
|
||||
});
|
||||
}
|
||||
|
||||
// Finally create workbench
|
||||
create(document.body, options);
|
||||
create(document.body, {
|
||||
...config,
|
||||
workspaceProvider: new WorkspaceProvider(workspace, payload),
|
||||
urlCallbackProvider: new PollingURLCallbackProvider(),
|
||||
credentialsProvider: new LocalStorageCredentialsProvider()
|
||||
});
|
||||
})();
|
||||
|
||||
@@ -35,7 +35,7 @@ import BaseHtml from 'vs/code/electron-browser/issue/issueReporterPage';
|
||||
import { LoggerChannelClient, FollowerLogService } from 'vs/platform/log/common/logIpc';
|
||||
import { ILogService, getLogLevel } from 'vs/platform/log/common/log';
|
||||
import { CodiconLabel } from 'vs/base/browser/ui/codiconLabel/codiconLabel';
|
||||
import { normalizeGitHubUrl } from 'vs/code/electron-browser/issue/issueReporterUtil';
|
||||
import { normalizeGitHubUrl } from 'vs/code/common/issue/issueReporterUtil';
|
||||
import { Button } from 'vs/base/browser/ui/button/button';
|
||||
import { SystemInfo, isRemoteDiagnosticError } from 'vs/platform/diagnostics/common/diagnostics';
|
||||
import { SpdLogService } from 'vs/platform/log/node/spdlogService';
|
||||
@@ -345,8 +345,8 @@ export class IssueReporter extends Disposable {
|
||||
|
||||
const showInfoElements = document.getElementsByClassName('showInfo');
|
||||
for (let i = 0; i < showInfoElements.length; i++) {
|
||||
const showInfo = showInfoElements.item(i);
|
||||
showInfo!.addEventListener('click', (e: MouseEvent) => {
|
||||
const showInfo = showInfoElements.item(i)!;
|
||||
(showInfo as HTMLAnchorElement).addEventListener('click', (e: MouseEvent) => {
|
||||
e.preventDefault();
|
||||
const label = (<HTMLDivElement>e.target);
|
||||
if (label) {
|
||||
@@ -432,9 +432,9 @@ export class IssueReporter extends Disposable {
|
||||
sendWorkbenchCommand('workbench.action.reloadWindowWithExtensionsDisabled');
|
||||
});
|
||||
|
||||
this.addEventListener('disableExtensions', 'keydown', (e: KeyboardEvent) => {
|
||||
this.addEventListener('disableExtensions', 'keydown', (e: Event) => {
|
||||
e.stopPropagation();
|
||||
if (e.keyCode === 13 || e.keyCode === 32) {
|
||||
if ((e as KeyboardEvent).keyCode === 13 || (e as KeyboardEvent).keyCode === 32) {
|
||||
sendWorkbenchCommand('workbench.extensions.action.disableAll');
|
||||
sendWorkbenchCommand('workbench.action.reloadWindow');
|
||||
}
|
||||
@@ -1120,16 +1120,6 @@ export class IssueReporter extends Disposable {
|
||||
if (element) {
|
||||
return element;
|
||||
} else {
|
||||
const error = new Error(`${elementId} not found.`);
|
||||
this.logService.error(error);
|
||||
type IssueReporterGetElementErrorClassification = {
|
||||
message: { classification: 'CallstackOrException', purpose: 'PerformanceAndHealth' };
|
||||
};
|
||||
type IssueReporterGetElementErrorEvent = {
|
||||
message: string;
|
||||
};
|
||||
this.telemetryService.publicLog2<IssueReporterGetElementErrorEvent, IssueReporterGetElementErrorClassification>('issueReporterGetElementError', { message: error.message });
|
||||
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
import * as assert from 'assert';
|
||||
import { IssueReporterModel } from 'vs/code/electron-browser/issue/issueReporterModel';
|
||||
import { normalizeGitHubUrl } from 'vs/code/electron-browser/issue/issueReporterUtil';
|
||||
import { normalizeGitHubUrl } from 'vs/code/common/issue/issueReporterUtil';
|
||||
import { IssueType } from 'vs/platform/issue/node/issue';
|
||||
|
||||
suite('IssueReporter', () => {
|
||||
|
||||
@@ -29,8 +29,6 @@ body {
|
||||
padding: 0;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
-webkit-touch-callout: none;
|
||||
-webkit-user-select: none;
|
||||
user-select: none;
|
||||
color: #cccccc;
|
||||
}
|
||||
|
||||
@@ -12,8 +12,6 @@
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
-webkit-touch-callout: none;
|
||||
-webkit-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
@@ -117,4 +115,4 @@
|
||||
|
||||
</script>
|
||||
|
||||
</html>
|
||||
</html>
|
||||
|
||||
@@ -50,8 +50,8 @@ import { IFileService } from 'vs/platform/files/common/files';
|
||||
import { DiskFileSystemProvider } from 'vs/platform/files/electron-browser/diskFileSystemProvider';
|
||||
import { Schemas } from 'vs/base/common/network';
|
||||
import { IProductService } from 'vs/platform/product/common/productService';
|
||||
import { IUserDataSyncService, IUserDataSyncStoreService, ISettingsMergeService, registerConfiguration, IUserDataSyncLogService } from 'vs/platform/userDataSync/common/userDataSync';
|
||||
import { UserDataSyncService, UserDataAutoSync } from 'vs/platform/userDataSync/common/userDataSyncService';
|
||||
import { IUserDataSyncService, IUserDataSyncStoreService, ISettingsMergeService, registerConfiguration, IUserDataSyncLogService, IUserDataSyncUtilService } from 'vs/platform/userDataSync/common/userDataSync';
|
||||
import { UserDataSyncService } from 'vs/platform/userDataSync/common/userDataSyncService';
|
||||
import { UserDataSyncStoreService } from 'vs/platform/userDataSync/common/userDataSyncStoreService';
|
||||
import { UserDataSyncChannel } from 'vs/platform/userDataSync/common/userDataSyncIpc';
|
||||
import { SettingsMergeChannelClient } from 'vs/platform/userDataSync/common/settingsSyncIpc';
|
||||
@@ -59,10 +59,12 @@ import { IElectronService } from 'vs/platform/electron/node/electron';
|
||||
import { LoggerService } from 'vs/platform/log/node/loggerService';
|
||||
import { UserDataSyncLogService } from 'vs/platform/userDataSync/common/userDataSyncLog';
|
||||
import { IAuthTokenService } from 'vs/platform/auth/common/auth';
|
||||
import { AuthTokenService } from 'vs/platform/auth/common/authTokenService';
|
||||
import { AuthTokenService } from 'vs/platform/auth/electron-browser/authTokenService';
|
||||
import { AuthTokenChannel } from 'vs/platform/auth/common/authTokenIpc';
|
||||
import { ICredentialsService } from 'vs/platform/credentials/common/credentials';
|
||||
import { KeytarCredentialsService } from 'vs/platform/credentials/node/credentialsService';
|
||||
import { UserDataSyncUtilServiceClient } from 'vs/platform/userDataSync/common/keybindingsSyncIpc';
|
||||
import { UserDataAutoSync } from 'vs/platform/userDataSync/electron-browser/userDataAutoSync';
|
||||
|
||||
export interface ISharedProcessConfiguration {
|
||||
readonly machineId: string;
|
||||
@@ -186,6 +188,7 @@ async function main(server: Server, initData: ISharedProcessInitData, configurat
|
||||
services.set(IUserDataSyncLogService, new SyncDescriptor(UserDataSyncLogService));
|
||||
const settingsMergeChannel = server.getChannel('settingsMerge', activeWindowRouter);
|
||||
services.set(ISettingsMergeService, new SettingsMergeChannelClient(settingsMergeChannel));
|
||||
services.set(IUserDataSyncUtilService, new UserDataSyncUtilServiceClient(server.getChannel('userDataSyncUtil', activeWindowRouter)));
|
||||
services.set(IUserDataSyncStoreService, new SyncDescriptor(UserDataSyncStoreService));
|
||||
services.set(IUserDataSyncService, new SyncDescriptor(UserDataSyncService));
|
||||
registerConfiguration();
|
||||
|
||||
@@ -33,17 +33,17 @@ bootstrapWindow.load([
|
||||
return require('vs/workbench/electron-browser/desktop.main').main(configuration);
|
||||
});
|
||||
}, {
|
||||
removeDeveloperKeybindingsAfterLoad: true,
|
||||
canModifyDOM: function (windowConfig) {
|
||||
showPartsSplash(windowConfig);
|
||||
},
|
||||
beforeLoaderConfig: function (windowConfig, loaderConfig) {
|
||||
loaderConfig.recordStats = true;
|
||||
},
|
||||
beforeRequire: function () {
|
||||
perf.mark('willLoadWorkbenchMain');
|
||||
}
|
||||
});
|
||||
removeDeveloperKeybindingsAfterLoad: true,
|
||||
canModifyDOM: function (windowConfig) {
|
||||
showPartsSplash(windowConfig);
|
||||
},
|
||||
beforeLoaderConfig: function (windowConfig, loaderConfig) {
|
||||
loaderConfig.recordStats = true;
|
||||
},
|
||||
beforeRequire: function () {
|
||||
perf.mark('willLoadWorkbenchMain');
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* @param {{
|
||||
@@ -84,7 +84,7 @@ function showPartsSplash(configuration) {
|
||||
style.className = 'initialShellColors';
|
||||
document.head.appendChild(style);
|
||||
document.body.className = baseTheme;
|
||||
style.innerHTML = `body { background-color: ${shellBackground}; color: ${shellForeground}; }`;
|
||||
style.innerHTML = `body { background-color: ${shellBackground}; color: ${shellForeground}; margin: 0; padding: 0; }`;
|
||||
|
||||
if (data && data.layoutInfo) {
|
||||
// restore parts if possible (we might not always store layout info)
|
||||
@@ -92,6 +92,18 @@ function showPartsSplash(configuration) {
|
||||
const splash = document.createElement('div');
|
||||
splash.id = id;
|
||||
|
||||
if (layoutInfo.windowBorder) {
|
||||
splash.style.position = 'relative';
|
||||
splash.style.height = 'calc(100vh - 2px)';
|
||||
splash.style.width = 'calc(100vw - 2px)';
|
||||
splash.style.border = '1px solid var(--window-border-color)';
|
||||
splash.style.setProperty('--window-border-color', colorInfo.windowBorder);
|
||||
|
||||
if (layoutInfo.windowBorderRadius) {
|
||||
splash.style.borderRadius = layoutInfo.windowBorderRadius;
|
||||
}
|
||||
}
|
||||
|
||||
// ensure there is enough space
|
||||
layoutInfo.sideBarWidth = Math.min(layoutInfo.sideBarWidth, window.innerWidth - (layoutInfo.activityBarWidth + layoutInfo.editorPartMinWidth));
|
||||
|
||||
|
||||
@@ -79,6 +79,7 @@ import { ISharedProcessMainService, SharedProcessMainService } from 'vs/platform
|
||||
import { assign } from 'vs/base/common/objects';
|
||||
import { IDialogMainService, DialogMainService } from 'vs/platform/dialogs/electron-main/dialogs';
|
||||
import { withNullAsUndefined } from 'vs/base/common/types';
|
||||
import { parseArgs, OPTIONS } from 'vs/platform/environment/node/argv';
|
||||
|
||||
export class CodeApplication extends Disposable {
|
||||
|
||||
@@ -574,14 +575,15 @@ export class CodeApplication extends Disposable {
|
||||
electronIpcServer.registerChannel('logger', loggerChannel);
|
||||
sharedProcessClient.then(client => client.registerChannel('logger', loggerChannel));
|
||||
|
||||
const windowsMainService = this.windowsMainService = accessor.get(IWindowsMainService);
|
||||
|
||||
// ExtensionHost Debug broadcast service
|
||||
electronIpcServer.registerChannel(ExtensionHostDebugBroadcastChannel.ChannelName, new ExtensionHostDebugBroadcastChannel());
|
||||
electronIpcServer.registerChannel(ExtensionHostDebugBroadcastChannel.ChannelName, new ElectronExtensionHostDebugBroadcastChannel(windowsMainService));
|
||||
|
||||
// Signal phase: ready (services set)
|
||||
this.lifecycleMainService.phase = LifecycleMainPhase.Ready;
|
||||
|
||||
// Propagate to clients
|
||||
const windowsMainService = this.windowsMainService = accessor.get(IWindowsMainService);
|
||||
this.dialogMainService = accessor.get(IDialogMainService);
|
||||
|
||||
// Create a URL handler to open file URIs in the active window
|
||||
@@ -637,7 +639,7 @@ export class CodeApplication extends Disposable {
|
||||
// Watch Electron URLs and forward them to the UrlService
|
||||
const args = this.environmentService.args;
|
||||
const urls = args['open-url'] ? args._urls : [];
|
||||
const urlListener = new ElectronURLListener(urls || [], urlService, windowsMainService);
|
||||
const urlListener = new ElectronURLListener(urls || [], urlService, windowsMainService, this.environmentService);
|
||||
this._register(urlListener);
|
||||
|
||||
// Open our first window
|
||||
@@ -723,3 +725,28 @@ export class CodeApplication extends Disposable {
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
class ElectronExtensionHostDebugBroadcastChannel<TContext> extends ExtensionHostDebugBroadcastChannel<TContext> {
|
||||
|
||||
constructor(private windowsMainService: IWindowsMainService) {
|
||||
super();
|
||||
}
|
||||
|
||||
call(ctx: TContext, command: string, arg?: any): Promise<any> {
|
||||
if (command === 'openExtensionDevelopmentHostWindow') {
|
||||
const env = arg[1];
|
||||
const pargs = parseArgs(arg[0], OPTIONS);
|
||||
const extDevPaths = pargs.extensionDevelopmentPath;
|
||||
if (extDevPaths) {
|
||||
this.windowsMainService.openExtensionDevelopmentHostWindow(extDevPaths, {
|
||||
context: OpenContext.API,
|
||||
cli: pargs,
|
||||
userEnv: Object.keys(env).length > 0 ? env : undefined
|
||||
});
|
||||
}
|
||||
return Promise.resolve();
|
||||
} else {
|
||||
return super.call(ctx, command, arg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,8 +8,8 @@ import { app, dialog } from 'electron';
|
||||
import { assign } from 'vs/base/common/objects';
|
||||
import { isWindows, IProcessEnvironment, isMacintosh } from 'vs/base/common/platform';
|
||||
import product from 'vs/platform/product/common/product';
|
||||
import { parseMainProcessArgv } from 'vs/platform/environment/node/argvHelper';
|
||||
import { addArg, createWaitMarkerFile } from 'vs/platform/environment/node/argv';
|
||||
import { parseMainProcessArgv, addArg } from 'vs/platform/environment/node/argvHelper';
|
||||
import { createWaitMarkerFile } from 'vs/platform/environment/node/waitMarkerFile';
|
||||
import { mkdirp } from 'vs/base/node/pfs';
|
||||
import { validatePaths } from 'vs/code/node/paths';
|
||||
import { LifecycleMainService, ILifecycleMainService } from 'vs/platform/lifecycle/electron-main/lifecycleMainService';
|
||||
|
||||
@@ -6,13 +6,14 @@
|
||||
import { assign } from 'vs/base/common/objects';
|
||||
import { memoize } from 'vs/base/common/decorators';
|
||||
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
|
||||
import { BrowserWindow, ipcMain } from 'electron';
|
||||
import { BrowserWindow, ipcMain, WebContents, Event as ElectronEvent } from 'electron';
|
||||
import { ISharedProcess } from 'vs/platform/ipc/electron-main/sharedProcessMainService';
|
||||
import { Barrier } from 'vs/base/common/async';
|
||||
import { ILogService } from 'vs/platform/log/common/log';
|
||||
import { ILifecycleMainService } from 'vs/platform/lifecycle/electron-main/lifecycleMainService';
|
||||
import { IThemeMainService } from 'vs/platform/theme/electron-main/themeMainService';
|
||||
import { toDisposable, DisposableStore } from 'vs/base/common/lifecycle';
|
||||
import { Event } from 'vs/base/common/event';
|
||||
|
||||
export class SharedProcess implements ISharedProcess {
|
||||
|
||||
@@ -53,7 +54,7 @@ export class SharedProcess implements ISharedProcess {
|
||||
this.window.loadURL(url);
|
||||
|
||||
// Prevent the window from dying
|
||||
const onClose = (e: Event) => {
|
||||
const onClose = (e: ElectronEvent) => {
|
||||
this.logService.trace('SharedProcess#close prevented');
|
||||
|
||||
// We never allow to close the shared process unless we get explicitly disposed()
|
||||
@@ -97,7 +98,8 @@ export class SharedProcess implements ISharedProcess {
|
||||
});
|
||||
|
||||
return new Promise<void>(c => {
|
||||
ipcMain.once('handshake:hello', ({ sender }: { sender: any }) => {
|
||||
const onHello = Event.once(Event.fromNodeEventEmitter(ipcMain, 'handshake:hello', ({ sender }: { sender: WebContents }) => sender));
|
||||
disposables.add(onHello(sender => {
|
||||
sender.send('handshake:hey there', {
|
||||
sharedIPCHandle: this.environmentService.sharedIPCHandle,
|
||||
args: this.environmentService.args,
|
||||
@@ -106,7 +108,7 @@ export class SharedProcess implements ISharedProcess {
|
||||
|
||||
disposables.add(toDisposable(() => sender.send('handshake:goodbye')));
|
||||
ipcMain.once('handshake:im ready', () => c(undefined));
|
||||
});
|
||||
}));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@ import { IFileService } from 'vs/platform/files/common/files';
|
||||
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
||||
import { IDialogMainService } from 'vs/platform/dialogs/electron-main/dialogs';
|
||||
import { mnemonicButtonLabel } from 'vs/base/common/labels';
|
||||
import { ThemeIcon } from 'vs/platform/theme/common/themeService';
|
||||
|
||||
const RUN_TEXTMATE_IN_WORKER = false;
|
||||
|
||||
@@ -60,7 +61,7 @@ const enum WindowError {
|
||||
export class CodeWindow extends Disposable implements ICodeWindow {
|
||||
|
||||
private static readonly MIN_WIDTH = 600;
|
||||
private static readonly MIN_HEIGHT = 600;
|
||||
private static readonly MIN_HEIGHT = 270;
|
||||
|
||||
private static readonly MAX_URL_LENGTH = 2 * 1024 * 1024; // https://cs.chromium.org/chromium/src/url/url_constants.cc?l=32
|
||||
|
||||
@@ -438,15 +439,8 @@ export class CodeWindow extends Disposable implements ICodeWindow {
|
||||
|
||||
// Inject headers when requests are incoming
|
||||
const urls = ['https://marketplace.visualstudio.com/*', 'https://*.vsassets.io/*'];
|
||||
this._win.webContents.session.webRequest.onBeforeSendHeaders({ urls }, (details, cb) => {
|
||||
this.marketplaceHeadersPromise.then(headers => {
|
||||
const requestHeaders = objects.assign(details.requestHeaders, headers) as { [key: string]: string | undefined };
|
||||
if (!this.configurationService.getValue('extensions.disableExperimentalAzureSearch')) {
|
||||
requestHeaders['Cookie'] = `${requestHeaders['Cookie'] ? requestHeaders['Cookie'] + ';' : ''}EnableExternalSearchForVSCode=true`;
|
||||
}
|
||||
cb({ cancel: false, requestHeaders });
|
||||
});
|
||||
});
|
||||
this._win.webContents.session.webRequest.onBeforeSendHeaders({ urls }, (details, cb) =>
|
||||
this.marketplaceHeadersPromise.then(headers => cb({ cancel: false, requestHeaders: objects.assign(details.requestHeaders, headers) as { [key: string]: string | undefined } })));
|
||||
}
|
||||
|
||||
private onWindowError(error: WindowError): void {
|
||||
@@ -635,6 +629,7 @@ export class CodeWindow extends Disposable implements ICodeWindow {
|
||||
|
||||
// Set window ID
|
||||
windowConfiguration.windowId = this._win.id;
|
||||
windowConfiguration.sessionId = `window:${this._win.id}`;
|
||||
windowConfiguration.logLevel = this.logService.getLevel();
|
||||
|
||||
// Set zoomlevel
|
||||
@@ -657,7 +652,6 @@ export class CodeWindow extends Disposable implements ICodeWindow {
|
||||
|
||||
// Title style related
|
||||
windowConfiguration.maximized = this._win.isMaximized();
|
||||
windowConfiguration.frameless = this.hasHiddenTitleBarStyle && !isMacintosh;
|
||||
|
||||
// Dump Perf Counters
|
||||
windowConfiguration.perfEntries = perf.exportEntries();
|
||||
@@ -1096,8 +1090,8 @@ export class CodeWindow extends Disposable implements ICodeWindow {
|
||||
private createTouchBarGroupSegments(items: ISerializableCommandAction[] = []): ITouchBarSegment[] {
|
||||
const segments: ITouchBarSegment[] = items.map(item => {
|
||||
let icon: NativeImage | undefined;
|
||||
if (item.iconLocation && item.iconLocation.dark.scheme === 'file') {
|
||||
icon = nativeImage.createFromPath(URI.revive(item.iconLocation.dark).fsPath);
|
||||
if (item.icon && !ThemeIcon.isThemeIcon(item.icon) && item.icon?.dark?.scheme === 'file') {
|
||||
icon = nativeImage.createFromPath(URI.revive(item.icon.dark).fsPath);
|
||||
if (icon.isEmpty()) {
|
||||
icon = undefined;
|
||||
}
|
||||
|
||||
@@ -6,8 +6,9 @@
|
||||
import * as os from 'os';
|
||||
import * as fs from 'fs';
|
||||
import { spawn, ChildProcess, SpawnOptions } from 'child_process';
|
||||
import { buildHelpMessage, buildVersionMessage, addArg, createWaitMarkerFile, OPTIONS } from 'vs/platform/environment/node/argv';
|
||||
import { parseCLIProcessArgv } from 'vs/platform/environment/node/argvHelper';
|
||||
import { buildHelpMessage, buildVersionMessage, OPTIONS } from 'vs/platform/environment/node/argv';
|
||||
import { parseCLIProcessArgv, addArg } from 'vs/platform/environment/node/argvHelper';
|
||||
import { createWaitMarkerFile } from 'vs/platform/environment/node/waitMarkerFile';
|
||||
import { ParsedArgs } from 'vs/platform/environment/common/environment';
|
||||
import product from 'vs/platform/product/common/product';
|
||||
import * as paths from 'vs/base/common/path';
|
||||
@@ -134,8 +135,8 @@ export async function main(argv: string[]): Promise<any> {
|
||||
env['ELECTRON_ENABLE_LOGGING'] = '1';
|
||||
|
||||
processCallbacks.push(async child => {
|
||||
child.stdout.on('data', (data: Buffer) => console.log(data.toString('utf8').trim()));
|
||||
child.stderr.on('data', (data: Buffer) => console.log(data.toString('utf8').trim()));
|
||||
child.stdout!.on('data', (data: Buffer) => console.log(data.toString('utf8').trim()));
|
||||
child.stderr!.on('data', (data: Buffer) => console.log(data.toString('utf8').trim()));
|
||||
|
||||
await new Promise(c => child.once('exit', () => c()));
|
||||
});
|
||||
|
||||
@@ -25,9 +25,6 @@ export function validatePaths(args: ParsedArgs): ParsedArgs {
|
||||
args._ = paths;
|
||||
}
|
||||
|
||||
// Update environment
|
||||
args.diff = args.diff && args._.length === 2;
|
||||
|
||||
return args;
|
||||
}
|
||||
|
||||
|
||||
@@ -28,7 +28,9 @@ suite('Windows Native Helpers', () => {
|
||||
});
|
||||
|
||||
test('vscode-windows-ca-certs', async () => {
|
||||
const windowsCerts = await import('vscode-windows-ca-certs');
|
||||
const windowsCerts = await new Promise<any>((resolve, reject) => {
|
||||
require(['vscode-windows-ca-certs'], resolve, reject);
|
||||
});
|
||||
assert.ok(windowsCerts, 'Unable to load vscode-windows-ca-certs dependency.');
|
||||
});
|
||||
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
import * as assert from 'assert';
|
||||
import { formatOptions, Option, addArg } from 'vs/platform/environment/node/argv';
|
||||
import { formatOptions, Option } from 'vs/platform/environment/node/argv';
|
||||
import { addArg } from 'vs/platform/environment/node/argvHelper';
|
||||
|
||||
suite('formatOptions', () => {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user