mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 20:14:49 +00:00
mplace service install refactor
This commit is contained in:
committed by
Drew Ansbacher
parent
e3b002f2dd
commit
0e82825da1
@@ -77,10 +77,9 @@ export class WizardBaker {
|
||||
verb: 'beginning update for',
|
||||
title,
|
||||
executeAction: () =>
|
||||
this.embassyApi.installPackage({
|
||||
this.marketplaceService.installPackage({
|
||||
id,
|
||||
'version-spec': version ? `=${version}` : undefined,
|
||||
'marketplace-url': this.marketplaceService.marketplaceUrl,
|
||||
}),
|
||||
},
|
||||
},
|
||||
@@ -203,10 +202,9 @@ export class WizardBaker {
|
||||
verb: 'beginning downgrade for',
|
||||
title,
|
||||
executeAction: () =>
|
||||
this.embassyApi.installPackage({
|
||||
this.marketplaceService.installPackage({
|
||||
id,
|
||||
'version-spec': version ? `=${version}` : undefined,
|
||||
'marketplace-url': this.marketplaceService.marketplaceUrl,
|
||||
}),
|
||||
},
|
||||
},
|
||||
|
||||
@@ -34,11 +34,10 @@ export class AppListRecComponent {
|
||||
switchMap(({ id, version }) =>
|
||||
// Mapping each installation to API request
|
||||
from(
|
||||
this.api.installPackage({
|
||||
this.marketplaceService.installPackage({
|
||||
id,
|
||||
'version-spec': `>=${version}`,
|
||||
'version-priority': 'min',
|
||||
'marketplace-url': this.marketplaceService.marketplaceUrl,
|
||||
}),
|
||||
).pipe(
|
||||
// Mapping operation to true/false loading indication
|
||||
|
||||
@@ -210,10 +210,9 @@ export class MarketplaceShowPage {
|
||||
loader.present()
|
||||
|
||||
try {
|
||||
await this.embassyApi.installPackage({
|
||||
await this.marketplaceService.installPackage({
|
||||
id,
|
||||
'version-spec': version ? `=${version}` : undefined,
|
||||
'marketplace-url': this.marketplaceService.marketplaceUrl,
|
||||
})
|
||||
} catch (e) {
|
||||
this.errToast.present(e)
|
||||
|
||||
@@ -67,6 +67,11 @@ export class MarketplaceService {
|
||||
}
|
||||
}
|
||||
|
||||
async installPackage(req: Omit<RR.InstallPackageReq, 'marketplace-url'>) {
|
||||
req['marketplace-url'] = this.marketplaceUrl
|
||||
return this.api.installPackage(req as RR.InstallPackageReq)
|
||||
}
|
||||
|
||||
async getUpdates(
|
||||
localPkgs: Record<string, PackageDataEntry>,
|
||||
): Promise<MarketplacePkg[]> {
|
||||
|
||||
Reference in New Issue
Block a user