[Bug] Change method scope for internal StateMigrationService methods (#619)

A couple of helper methods were recently added to the StateMigrationService, but they were set to private and can't be used in children.
Some clients, like the Directory Connector, extend the StateMigrationService and need access to these methods.
This commit is contained in:
Addison Beck 2022-01-20 10:30:01 -05:00 committed by GitHub
parent 54c6a4b3c3
commit 7300db703c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 5 deletions

View File

@ -409,26 +409,26 @@ export class StateMigrationService {
}
}
private get options(): StorageOptions {
protected get options(): StorageOptions {
return { htmlStorageLocation: HtmlStorageLocation.Local };
}
private get<T>(key: string): Promise<T> {
protected get<T>(key: string): Promise<T> {
return this.storageService.get<T>(key, this.options);
}
private set(key: string, value: any): Promise<any> {
protected set(key: string, value: any): Promise<any> {
if (value == null) {
return this.storageService.remove(key, this.options);
}
return this.storageService.save(key, value, this.options);
}
private async getGlobals(): Promise<GlobalState> {
protected async getGlobals(): Promise<GlobalState> {
return await this.get<GlobalState>(keys.global);
}
private async getCurrentStateVersion(): Promise<StateVersion> {
protected async getCurrentStateVersion(): Promise<StateVersion> {
return (await this.getGlobals())?.stateVersion;
}
}