add version-priority to installs

This commit is contained in:
Aiden McClelland
2022-02-14 20:06:59 -07:00
committed by Aiden McClelland
parent 64e38393df
commit 6789ff5a8c
3 changed files with 77 additions and 38 deletions

View File

@@ -32,7 +32,7 @@ export class AppListRecComponent {
readonly installing$ = this.install$.pipe(
switchMap(({ id, version }) =>
// Mapping each installation to API request
from(this.api.installPackage({ id, 'version-spec': `=${version}` })).pipe(
from(this.api.installPackage({ id, 'version-spec': `>=${version}`, 'version-priority': 'min' })).pipe(
// Mapping operation to true/false loading indication
loading(this.errToast),
),

View File

@@ -179,6 +179,7 @@ export module RR {
export type InstallPackageReq = WithExpire<{
id: string
'version-spec'?: string
'version-priority'?: 'min' | 'max'
}> // package.install
export type InstallPackageRes = WithRevision<null>