mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 20:14:49 +00:00
update readme, fix startup sequence, integrate live backend
This commit is contained in:
committed by
Aiden McClelland
parent
12c44565ff
commit
7013364ae8
@@ -1,4 +1,4 @@
|
||||
import { Dump, Operation, Revision } from 'patch-db-client'
|
||||
import { Dump, Revision } from 'patch-db-client'
|
||||
import { PackagePropertiesVersioned } from 'src/app/util/properties.util'
|
||||
import { ConfigSpec } from 'src/app/pkg-config/config-types'
|
||||
import { DataModel, DependencyError, Manifest, URL } from 'src/app/models/patch-db/data-model'
|
||||
@@ -113,13 +113,13 @@ export module RR {
|
||||
export type InstallPackageRes = WithRevision<null>
|
||||
|
||||
export type DryUpdatePackageReq = { id: string, version: string } // package.update.dry
|
||||
export type DryUpdatePackageRes = BreakageRes
|
||||
export type DryUpdatePackageRes = Breakages
|
||||
|
||||
export type GetPackageConfigReq = { id: string } // package.config.get
|
||||
export type GetPackageConfigRes = { spec: ConfigSpec, config: object }
|
||||
|
||||
export type DrySetPackageConfigReq = { id: string, config: object } // package.config.set.dry
|
||||
export type DrySetPackageConfigRes = BreakageRes
|
||||
export type DrySetPackageConfigRes = Breakages
|
||||
|
||||
export type SetPackageConfigReq = WithExpire<DrySetPackageConfigReq> // package.config.set
|
||||
export type SetPackageConfigRes = WithRevision<null>
|
||||
@@ -134,13 +134,13 @@ export module RR {
|
||||
export type StartPackageRes = WithRevision<null>
|
||||
|
||||
export type DryStopPackageReq = StopPackageReq // package.stop.dry
|
||||
export type DryStopPackageRes = BreakageRes
|
||||
export type DryStopPackageRes = Breakages
|
||||
|
||||
export type StopPackageReq = WithExpire<{ id: string }> // package.stop
|
||||
export type StopPackageRes = WithRevision<null>
|
||||
|
||||
export type DryRemovePackageReq = RemovePackageReq // package.remove.dry
|
||||
export type DryRemovePackageRes = BreakageRes
|
||||
export type DryRemovePackageRes = Breakages
|
||||
|
||||
export type RemovePackageReq = WithExpire<{ id: string }> // package.remove
|
||||
export type RemovePackageRes = WithRevision<null>
|
||||
@@ -198,11 +198,6 @@ export interface AvailableShow {
|
||||
}
|
||||
}
|
||||
|
||||
export interface BreakageRes {
|
||||
patch: Operation[],
|
||||
breakages: Breakages
|
||||
}
|
||||
|
||||
export interface Breakages {
|
||||
[id: string]: TaggedDependencyError
|
||||
}
|
||||
|
||||
@@ -178,11 +178,11 @@ export abstract class ApiService implements Source<DataModel>, Http<DataModel> {
|
||||
// state change you'd like to enact prior to request and expired when request terminates.
|
||||
private syncResponse<T, F extends (...args: any[]) => Promise<{ response: T, revision?: Revision }>> (f: F, temp?: Operation): (...args: Parameters<F>) => Promise<T> {
|
||||
return (...a) => {
|
||||
let expireId = undefined
|
||||
if (temp) {
|
||||
expireId = uuid.v4()
|
||||
this.sync.next({ patch: [temp], expiredBy: expireId })
|
||||
}
|
||||
// let expireId = undefined
|
||||
// if (temp) {
|
||||
// expireId = uuid.v4()
|
||||
// this.sync.next({ patch: [temp], expiredBy: expireId })
|
||||
// }
|
||||
|
||||
return f(a).then(({ response, revision }) => {
|
||||
if (revision) this.sync.next(revision)
|
||||
|
||||
@@ -331,10 +331,7 @@ export class MockApiService extends ApiService {
|
||||
|
||||
async dryUpdatePackage (params: RR.DryUpdatePackageReq): Promise<RR.DryUpdatePackageRes> {
|
||||
await pauseFor(2000)
|
||||
return {
|
||||
patch: [],
|
||||
breakages: { },
|
||||
}
|
||||
return { }
|
||||
}
|
||||
|
||||
async getPackageConfig (params: RR.GetPackageConfigReq): Promise<RR.GetPackageConfigRes> {
|
||||
@@ -344,10 +341,7 @@ export class MockApiService extends ApiService {
|
||||
|
||||
async drySetPackageConfig (params: RR.DrySetPackageConfigReq): Promise<RR.DrySetPackageConfigRes> {
|
||||
await pauseFor(2000)
|
||||
return {
|
||||
patch: [],
|
||||
breakages: { },
|
||||
}
|
||||
return { }
|
||||
}
|
||||
|
||||
async setPackageConfigRaw (params: RR.SetPackageConfigReq): Promise<RR.SetPackageConfigRes> {
|
||||
@@ -421,10 +415,7 @@ export class MockApiService extends ApiService {
|
||||
|
||||
async dryStopPackage (params: RR.DryStopPackageReq): Promise<RR.DryStopPackageRes> {
|
||||
await pauseFor(2000)
|
||||
return {
|
||||
patch: [],
|
||||
breakages: { },
|
||||
}
|
||||
return { }
|
||||
}
|
||||
|
||||
async stopPackageRaw (params: RR.StopPackageReq): Promise<RR.StopPackageRes> {
|
||||
@@ -447,10 +438,7 @@ export class MockApiService extends ApiService {
|
||||
|
||||
async dryRemovePackage (params: RR.DryRemovePackageReq): Promise<RR.DryRemovePackageRes> {
|
||||
await pauseFor(2000)
|
||||
return {
|
||||
patch: [],
|
||||
breakages: { },
|
||||
}
|
||||
return { }
|
||||
}
|
||||
|
||||
async removePackageRaw (params: RR.RemovePackageReq): Promise<RR.RemovePackageRes> {
|
||||
|
||||
@@ -8,8 +8,6 @@ type UiConfig = {
|
||||
poll: {
|
||||
cooldown: number /* in ms */
|
||||
}
|
||||
// Wait this long (ms) before asking BE for a dump when out of order messages are received
|
||||
timeoutForMissingRevision: number
|
||||
}
|
||||
api: {
|
||||
url: string
|
||||
|
||||
Reference in New Issue
Block a user