mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-31 04:23:40 +00:00
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:
@@ -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'))
|
||||
}
|
||||
|
||||
@@ -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'))
|
||||
}
|
||||
|
||||
@@ -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'))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user