mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 20:14:49 +00:00
Feature/sideload (#1520)
* base styling and action placeholders for package sideload * apparently didnt add new folder * wip * parse manifest and icon from s9pk to upload * wip handle s9pk upload * adjust types, finalize actions, cleanup * clean up and fix data clearing and response * include rest rpc in proxy conf sample * address feedback to use shorthand falsy coercion * update copy and invalid package file ux * do not wait package upload, instead show install progress * fix proxy for rest rpc rename sideload package page titles
This commit is contained in:
@@ -27,6 +27,9 @@ export abstract class ApiService implements Source<DataModel>, Http<DataModel> {
|
||||
// for getting static files: ex icons, instructions, licenses
|
||||
abstract getStatic(url: string): Promise<string>
|
||||
|
||||
// for sideloading packages
|
||||
abstract uploadPackage(guid: string, body: ArrayBuffer): Promise<string>
|
||||
|
||||
// db
|
||||
|
||||
abstract getRevisions(since: number): Promise<RR.GetRevisionsRes>
|
||||
@@ -260,6 +263,10 @@ export abstract class ApiService implements Source<DataModel>, Http<DataModel> {
|
||||
deleteRecoveredPackage = (params: RR.UninstallPackageReq) =>
|
||||
this.syncResponse(() => this.deleteRecoveredPackageRaw(params))()
|
||||
|
||||
abstract sideloadPackage(
|
||||
params: RR.SideloadPackageReq,
|
||||
): Promise<RR.SideloadPacakgeRes>
|
||||
|
||||
// Helper allowing quick decoration to sync the response patch and return the response contents.
|
||||
// Pass in a tempUpdate function which returns a UpdateTemp corresponding to a temporary
|
||||
// state change you'd like to enact prior to request and expired when request terminates.
|
||||
|
||||
Reference in New Issue
Block a user