From 037481f195879f8e6c321e9c7446c060e6e4f469 Mon Sep 17 00:00:00 2001 From: Philipp Kunz Date: Sat, 10 Feb 2024 04:54:00 +0100 Subject: [PATCH] fix(core): update --- ts/00_commitinfo_data.ts | 2 +- ts/npmextra.classes.appdata.ts | 5 +++++ ts/npmextra.classes.keyvaluestore.ts | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ts/00_commitinfo_data.ts b/ts/00_commitinfo_data.ts index 3ce84f4..9aa731c 100644 --- a/ts/00_commitinfo_data.ts +++ b/ts/00_commitinfo_data.ts @@ -3,6 +3,6 @@ */ export const commitinfo = { name: '@push.rocks/npmextra', - version: '4.0.13', + version: '4.0.14', description: 'do more with npm' } diff --git a/ts/npmextra.classes.appdata.ts b/ts/npmextra.classes.appdata.ts index 2f2b5da..668314b 100644 --- a/ts/npmextra.classes.appdata.ts +++ b/ts/npmextra.classes.appdata.ts @@ -99,4 +99,9 @@ export class AppData { console.log('All mandatory keys are present in the appdata'); } } + + public async waitForKeysPresent(keysArg: string[]) { + await this.readyDeferred.promise; + await this.kvStore.waitForKeysPresent(keysArg); + } } diff --git a/ts/npmextra.classes.keyvaluestore.ts b/ts/npmextra.classes.keyvaluestore.ts index 6ec38c2..c9107ca 100644 --- a/ts/npmextra.classes.keyvaluestore.ts +++ b/ts/npmextra.classes.keyvaluestore.ts @@ -167,7 +167,7 @@ export class KeyValueStore { return Array.from(this.mandatoryKeys).filter(key => !(key in this.dataObject)); } - public async waitForKeysPresent(keysArg: []): Promise { + public async waitForKeysPresent(keysArg: string[]): Promise { const missingKeys = keysArg.filter(keyArg => !this.dataObject[keyArg]); if (missingKeys.length === 0) { return;