Notifications for a few merge-related scenarios
This commit is contained in:
parent
78ce34b9d3
commit
a49a6f2057
40 changed files with 2764 additions and 553 deletions
|
@ -23,6 +23,10 @@ export type ConversationOpenInfoType = Readonly<{
|
|||
delta: number;
|
||||
}>;
|
||||
|
||||
export type StorageServiceInfoType = Readonly<{
|
||||
manifestVersion: number;
|
||||
}>;
|
||||
|
||||
export type AppOptionsType = Readonly<{
|
||||
main: string;
|
||||
args: ReadonlyArray<string>;
|
||||
|
@ -66,6 +70,21 @@ export class App {
|
|||
return this.waitForEvent('challenge');
|
||||
}
|
||||
|
||||
public async waitForStorageService(): Promise<StorageServiceInfoType> {
|
||||
return this.waitForEvent('storageServiceComplete');
|
||||
}
|
||||
|
||||
public async waitForManifestVersion(version: number): Promise<void> {
|
||||
// eslint-disable-next-line no-constant-condition
|
||||
while (true) {
|
||||
// eslint-disable-next-line no-await-in-loop
|
||||
const { manifestVersion } = await this.waitForStorageService();
|
||||
if (manifestVersion >= version) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public async solveChallenge(response: ChallengeResponseType): Promise<void> {
|
||||
const window = await this.getWindow();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue