mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-26 11:38:51 +01:00
Add 'key' to onDidChange of secrets API, #112249
This commit is contained in:
@@ -4,21 +4,21 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { ExtHostSecretStateShape, MainContext, MainThreadSecretStateShape } from 'vs/workbench/api/common/extHost.protocol';
|
||||
import { Emitter, Event } from 'vs/base/common/event';
|
||||
import { Emitter } from 'vs/base/common/event';
|
||||
import { IExtHostRpcService } from 'vs/workbench/api/common/extHostRpcService';
|
||||
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
|
||||
|
||||
export class ExtHostSecretState implements ExtHostSecretStateShape {
|
||||
private _proxy: MainThreadSecretStateShape;
|
||||
private _onDidChangePassword = new Emitter<void>();
|
||||
readonly onDidChangePassword: Event<void> = this._onDidChangePassword.event;
|
||||
private _onDidChangePassword = new Emitter<{ extensionId: string, key: string }>();
|
||||
readonly onDidChangePassword = this._onDidChangePassword.event;
|
||||
|
||||
constructor(mainContext: IExtHostRpcService) {
|
||||
this._proxy = mainContext.getProxy(MainContext.MainThreadSecretState);
|
||||
}
|
||||
|
||||
async $onDidChangePassword(): Promise<void> {
|
||||
this._onDidChangePassword.fire();
|
||||
async $onDidChangePassword(e: { extensionId: string, key: string }): Promise<void> {
|
||||
this._onDidChangePassword.fire(e);
|
||||
}
|
||||
|
||||
get(extensionId: string, key: string): Promise<string | undefined> {
|
||||
|
||||
Reference in New Issue
Block a user