follow sideload progress (#2718)

* follow sideload progress

* small bugfix

* shareReplay with no refcount false

* don't wrap sideload progress in RPCResult

* dont present toast

---------

Co-authored-by: Aiden McClelland <me@drbonez.dev>
This commit is contained in:
Matt Hill
2024-09-03 09:23:47 -06:00
committed by GitHub
parent 66b018a355
commit 9981ee7601
13 changed files with 200 additions and 125 deletions

View File

@@ -43,12 +43,11 @@ export class LiveApiService extends ApiService {
// for sideloading packages
async uploadPackage(guid: string, body: Blob): Promise<string> {
return this.httpRequest({
async uploadPackage(guid: string, body: Blob): Promise<void> {
await this.httpRequest({
method: Method.POST,
body,
url: `/rest/rpc/${guid}`,
responseType: 'text',
})
}
@@ -86,7 +85,7 @@ export class LiveApiService extends ApiService {
openWebsocket$<T>(
guid: string,
config: RR.WebsocketConfig<T>,
config: RR.WebsocketConfig<T> = {},
): Observable<T> {
const { location } = this.document.defaultView!
const protocol = location.protocol === 'http:' ? 'ws' : 'wss'