mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-31 04:23:40 +00:00
Feature/new registry (#2612)
* wip * overhaul boot process * wip: new registry * wip * wip * wip * wip * wip * wip * os registry complete * ui fixes * fixes * fixes * more fixes * fix merkle archive
This commit is contained in:
@@ -1633,7 +1633,7 @@ export module Mock {
|
||||
currentDependencies: {},
|
||||
hosts: {},
|
||||
storeExposedDependents: [],
|
||||
marketplaceUrl: 'https://registry.start9.com/',
|
||||
registry: 'https://registry.start9.com/',
|
||||
developerKey: 'developer-key',
|
||||
}
|
||||
|
||||
@@ -1773,7 +1773,7 @@ export module Mock {
|
||||
},
|
||||
hosts: {},
|
||||
storeExposedDependents: [],
|
||||
marketplaceUrl: 'https://registry.start9.com/',
|
||||
registry: 'https://registry.start9.com/',
|
||||
developerKey: 'developer-key',
|
||||
}
|
||||
|
||||
@@ -2024,7 +2024,7 @@ export module Mock {
|
||||
},
|
||||
hosts: {},
|
||||
storeExposedDependents: [],
|
||||
marketplaceUrl: 'https://registry.start9.com/',
|
||||
registry: 'https://registry.start9.com/',
|
||||
developerKey: 'developer-key',
|
||||
}
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ export module RR {
|
||||
export type GetServerMetricsReq = {} // server.metrics
|
||||
export type GetServerMetricsRes = Metrics
|
||||
|
||||
export type UpdateServerReq = { marketplaceUrl: string } // server.update
|
||||
export type UpdateServerReq = { registry: string } // server.update
|
||||
export type UpdateServerRes = 'updating' | 'no-updates'
|
||||
|
||||
export type RestartServerReq = {} // server.restart
|
||||
@@ -192,7 +192,7 @@ export module RR {
|
||||
id: string
|
||||
versionSpec?: string
|
||||
versionPriority?: 'min' | 'max'
|
||||
marketplaceUrl: string
|
||||
registry: string
|
||||
} // package.install
|
||||
export type InstallPackageRes = null
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ export class LiveApiService extends ApiService {
|
||||
private readonly patch: PatchDB<DataModel>,
|
||||
) {
|
||||
super()
|
||||
; (window as any).rpcClient = this
|
||||
;(window as any).rpcClient = this
|
||||
}
|
||||
|
||||
// for getting static files: ex icons, instructions, licenses
|
||||
@@ -158,7 +158,7 @@ export class LiveApiService extends ApiService {
|
||||
|
||||
async updateServer(url?: string): Promise<RR.UpdateServerRes> {
|
||||
const params = {
|
||||
marketplaceUrl: url || this.config.marketplace.start9,
|
||||
registry: url || this.config.marketplace.start9,
|
||||
}
|
||||
return this.rpcRequest({ method: 'server.update', params })
|
||||
}
|
||||
|
||||
@@ -1017,7 +1017,11 @@ export class MockApiService extends ApiService {
|
||||
const progress = JSON.parse(JSON.stringify(PROGRESS))
|
||||
|
||||
for (let [i, phase] of progress.phases.entries()) {
|
||||
if (typeof phase.progress !== 'object' || !phase.progress.total) {
|
||||
if (
|
||||
!phase.progress ||
|
||||
typeof phase.progress !== 'object' ||
|
||||
!phase.progress.total
|
||||
) {
|
||||
await pauseFor(2000)
|
||||
|
||||
const patches: Operation<any>[] = [
|
||||
@@ -1029,7 +1033,11 @@ export class MockApiService extends ApiService {
|
||||
]
|
||||
|
||||
// overall
|
||||
if (typeof progress.overall === 'object' && progress.overall.total) {
|
||||
if (
|
||||
progress.overall &&
|
||||
typeof progress.overall === 'object' &&
|
||||
progress.overall.total
|
||||
) {
|
||||
const step = progress.overall.total / progress.phases.length
|
||||
|
||||
progress.overall.done += step
|
||||
@@ -1059,7 +1067,11 @@ export class MockApiService extends ApiService {
|
||||
]
|
||||
|
||||
// overall
|
||||
if (typeof progress.overall === 'object' && progress.overall.total) {
|
||||
if (
|
||||
progress.overall &&
|
||||
typeof progress.overall === 'object' &&
|
||||
progress.overall.total
|
||||
) {
|
||||
const step = progress.overall.total / progress.phases.length / 4
|
||||
|
||||
progress.overall.done += step
|
||||
|
||||
@@ -348,7 +348,7 @@ export const mockPatchData: DataModel = {
|
||||
currentDependencies: {},
|
||||
hosts: {},
|
||||
storeExposedDependents: [],
|
||||
marketplaceUrl: 'https://registry.start9.com/',
|
||||
registry: 'https://registry.start9.com/',
|
||||
developerKey: 'developer-key',
|
||||
},
|
||||
lnd: {
|
||||
@@ -600,7 +600,7 @@ export const mockPatchData: DataModel = {
|
||||
},
|
||||
hosts: {},
|
||||
storeExposedDependents: [],
|
||||
marketplaceUrl: 'https://registry.start9.com/',
|
||||
registry: 'https://registry.start9.com/',
|
||||
developerKey: 'developer-key',
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user