"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/vs/platform/native/electron-main/nativeHostMainService.ts" between
vscode-1.50.0.tar.gz and vscode-1.50.1.tar.gz

About: Visual Studio Code is a source code editor (available for Windows, macOS and Linux). It comes with built-in support for JavaScript, TypeScript and Node.js and has extensions for other languages (such as C++, C#, Java, Python, PHP, Go). Source code.

nativeHostMainService.ts  (vscode-1.50.0):nativeHostMainService.ts  (vscode-1.50.1)
skipping to change at line 85 skipping to change at line 85
readonly onWindowFocus = Event.any( readonly onWindowFocus = Event.any(
Event.map(Event.filter(Event.map(this.windowsMainService.onWindow sCountChanged, () => this.windowsMainService.getLastActiveWindow()), window => ! !window), window => window!.id), Event.map(Event.filter(Event.map(this.windowsMainService.onWindow sCountChanged, () => this.windowsMainService.getLastActiveWindow()), window => ! !window), window => window!.id),
Event.filter(Event.fromNodeEventEmitter(app, 'browser-window-focu s', (event, window: BrowserWindow) => window.id), windowId => !!this.windowsMain Service.getWindowById(windowId)) Event.filter(Event.fromNodeEventEmitter(app, 'browser-window-focu s', (event, window: BrowserWindow) => window.id), windowId => !!this.windowsMain Service.getWindowById(windowId))
); );
readonly onOSResume = Event.fromNodeEventEmitter(powerMonitor, 'resume'); readonly onOSResume = Event.fromNodeEventEmitter(powerMonitor, 'resume');
private readonly _onColorSchemeChange = new Emitter<IColorScheme>(); private readonly _onColorSchemeChange = new Emitter<IColorScheme>();
readonly onColorSchemeChange = this._onColorSchemeChange.event; readonly onColorSchemeChange = this._onColorSchemeChange.event;
private readonly _onDidChangePassword = new Emitter<void>();
readonly onDidChangePassword = this._onDidChangePassword.event;
//#endregion //#endregion
//#region Window //#region Window
async getWindows(): Promise<IOpenedWindow[]> { async getWindows(): Promise<IOpenedWindow[]> {
const windows = this.windowsMainService.getWindows(); const windows = this.windowsMainService.getWindows();
return windows.map(window => ({ return windows.map(window => ({
id: window.id, id: window.id,
workspace: window.openedWorkspace, workspace: window.openedWorkspace,
skipping to change at line 632 skipping to change at line 635
//#region Credentials //#region Credentials
async getPassword(windowId: number | undefined, service: string, account: string): Promise<string | null> { async getPassword(windowId: number | undefined, service: string, account: string): Promise<string | null> {
const keytar = await import('keytar'); const keytar = await import('keytar');
return keytar.getPassword(service, account); return keytar.getPassword(service, account);
} }
async setPassword(windowId: number | undefined, service: string, account: string, password: string): Promise<void> { async setPassword(windowId: number | undefined, service: string, account: string, password: string): Promise<void> {
const keytar = await import('keytar'); const keytar = await import('keytar');
await keytar.setPassword(service, account, password);
return keytar.setPassword(service, account, password); this._onDidChangePassword.fire();
} }
async deletePassword(windowId: number | undefined, service: string, accou nt: string): Promise<boolean> { async deletePassword(windowId: number | undefined, service: string, accou nt: string): Promise<boolean> {
const keytar = await import('keytar'); const keytar = await import('keytar');
const didDelete = await keytar.deletePassword(service, account);
if (didDelete) {
return keytar.deletePassword(service, account); this._onDidChangePassword.fire();
}
return didDelete;
} }
async findPassword(windowId: number | undefined, service: string): Promis e<string | null> { async findPassword(windowId: number | undefined, service: string): Promis e<string | null> {
const keytar = await import('keytar'); const keytar = await import('keytar');
return keytar.findPassword(service); return keytar.findPassword(service);
} }
async findCredentials(windowId: number | undefined, service: string): Pro mise<Array<{ account: string, password: string }>> { async findCredentials(windowId: number | undefined, service: string): Pro mise<Array<{ account: string, password: string }>> {
const keytar = await import('keytar'); const keytar = await import('keytar');
 End of changes. 4 change blocks. 
3 lines changed or deleted 10 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)