mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-31 04:23:40 +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',
|
verb: 'beginning update for',
|
||||||
title,
|
title,
|
||||||
executeAction: () =>
|
executeAction: () =>
|
||||||
this.embassyApi.installPackage({
|
this.marketplaceService.installPackage({
|
||||||
id,
|
id,
|
||||||
'version-spec': version ? `=${version}` : undefined,
|
'version-spec': version ? `=${version}` : undefined,
|
||||||
'marketplace-url': this.marketplaceService.marketplaceUrl,
|
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -203,10 +202,9 @@ export class WizardBaker {
|
|||||||
verb: 'beginning downgrade for',
|
verb: 'beginning downgrade for',
|
||||||
title,
|
title,
|
||||||
executeAction: () =>
|
executeAction: () =>
|
||||||
this.embassyApi.installPackage({
|
this.marketplaceService.installPackage({
|
||||||
id,
|
id,
|
||||||
'version-spec': version ? `=${version}` : undefined,
|
'version-spec': version ? `=${version}` : undefined,
|
||||||
'marketplace-url': this.marketplaceService.marketplaceUrl,
|
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -34,11 +34,10 @@ export class AppListRecComponent {
|
|||||||
switchMap(({ id, version }) =>
|
switchMap(({ id, version }) =>
|
||||||
// Mapping each installation to API request
|
// Mapping each installation to API request
|
||||||
from(
|
from(
|
||||||
this.api.installPackage({
|
this.marketplaceService.installPackage({
|
||||||
id,
|
id,
|
||||||
'version-spec': `>=${version}`,
|
'version-spec': `>=${version}`,
|
||||||
'version-priority': 'min',
|
'version-priority': 'min',
|
||||||
'marketplace-url': this.marketplaceService.marketplaceUrl,
|
|
||||||
}),
|
}),
|
||||||
).pipe(
|
).pipe(
|
||||||
// Mapping operation to true/false loading indication
|
// Mapping operation to true/false loading indication
|
||||||
|
|||||||
@@ -210,10 +210,9 @@ export class MarketplaceShowPage {
|
|||||||
loader.present()
|
loader.present()
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await this.embassyApi.installPackage({
|
await this.marketplaceService.installPackage({
|
||||||
id,
|
id,
|
||||||
'version-spec': version ? `=${version}` : undefined,
|
'version-spec': version ? `=${version}` : undefined,
|
||||||
'marketplace-url': this.marketplaceService.marketplaceUrl,
|
|
||||||
})
|
})
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.errToast.present(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(
|
async getUpdates(
|
||||||
localPkgs: Record<string, PackageDataEntry>,
|
localPkgs: Record<string, PackageDataEntry>,
|
||||||
): Promise<MarketplacePkg[]> {
|
): Promise<MarketplacePkg[]> {
|
||||||
|
|||||||
Reference in New Issue
Block a user