feat: migrate to Angular 14 and RxJS 7 (#1681)

* feat: migrate to Angular 14 and RxJS 7

* chore: update ng-qrcode

* chore: update patch-db

* chore: remove unnecessary generics
This commit is contained in:
Alex Inkin
2022-07-28 06:31:46 +03:00
committed by GitHub
parent 9514b97ca0
commit a5c97d4c24
24 changed files with 4791 additions and 4434 deletions

View File

@@ -1,9 +1,10 @@
import { first } from 'rxjs/operators'
import { PatchDbService } from 'src/app/services/patch-db/patch-db.service'
import { UIMarketplaceData } from 'src/app/services/patch-db/data-model'
import { firstValueFrom } from 'rxjs'
export function getMarketplace(
patch: PatchDbService,
): Promise<UIMarketplaceData> {
return patch.watch$('ui', 'marketplace').pipe(first()).toPromise()
return firstValueFrom(patch.watch$('ui', 'marketplace'))
}

View File

@@ -1,16 +1,17 @@
import { first } from 'rxjs/operators'
import { PatchDbService } from 'src/app/services/patch-db/patch-db.service'
import { PackageDataEntry } from 'src/app/services/patch-db/data-model'
import { firstValueFrom } from 'rxjs'
export function getPackage(
patch: PatchDbService,
id: string,
): Promise<PackageDataEntry> {
return patch.watch$('package-data', id).pipe(first()).toPromise()
return firstValueFrom(patch.watch$('package-data', id))
}
export function getAllPackages(
patch: PatchDbService,
): Promise<Record<string, PackageDataEntry>> {
return patch.watch$('package-data').pipe(first()).toPromise()
return firstValueFrom(patch.watch$('package-data'))
}

View File

@@ -1,7 +1,8 @@
import { first } from 'rxjs/operators'
import { PatchDbService } from 'src/app/services/patch-db/patch-db.service'
import { ServerInfo } from 'src/app/services/patch-db/data-model'
import { firstValueFrom } from 'rxjs'
export function getServerInfo(patch: PatchDbService): Promise<ServerInfo> {
return patch.watch$('server-info').pipe(first()).toPromise()
return firstValueFrom(patch.watch$('server-info'))
}