Skip to content

Commit

Permalink
cleanup sync with next/minor
Browse files Browse the repository at this point in the history
  • Loading branch information
elvece committed Jun 26, 2024
1 parent fcd1584 commit 865aae3
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 45 deletions.
2 changes: 1 addition & 1 deletion patch-db
13 changes: 6 additions & 7 deletions web/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

48 changes: 16 additions & 32 deletions web/projects/ui/src/app/services/api/api.fixures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,38 +35,22 @@ export module Mock {
shuttingDown: false,
}

export const RegistryOsUpdate: RR.GetRegistryOsUpdateRes = {
'0.3.5.2': {
headline: 'Our second biggest release ever.',
releaseNotes: 'Some **Markdown** release _notes_ for 0.3.5.2',
authorized: [],
img: {},
iso: {},
sourceVersion: '>=0.3.4 <=0.3.5.2',
squashfs: {
x86_64: {
url: 'https://github.com/Start9Labs/start-os/releases/download/v0.3.5.2/startos-0.3.5.2-unknown_x86_64.squashfs',
commitment: mockBlake3Commitment,
signatures: {},
},
// TODO: other arches
},
},
'0.3.6': {
headline: 'Our biggest release ever.',
releaseNotes: 'Some **Markdown** release _notes_ for 0.3.6',
authorized: [],
img: {},
iso: {},
sourceVersion: '>=0.3.5 <=0.3.6',
squashfs: {
x86_64: {
url: 'https://github.com/Start9Labs/start-os/releases/download/v0.3.6/startos-0.3.6-unknown_x86_64.squashfs',
commitment: mockBlake3Commitment,
signatures: {},
},
// TODO: other arches
},
export const RegistryOsUpdate: RR.CheckOSUpdateRes = {
version: '0.3.5.2',
headline: 'Our biggest release ever.',
releaseNotes: {
'0.3.5.2': 'Some **Markdown** release _notes_ for 0.3.5.2',
'0.3.5.1': 'Some **Markdown** release _notes_ for 0.3.5.1',
'0.3.4.4': 'Some **Markdown** release _notes_ for 0.3.4.4',
'0.3.4.3': 'Some **Markdown** release _notes_ for 0.3.4.3',
'0.3.4.2': 'Some **Markdown** release _notes_ for 0.3.4.2',
'0.3.4.1': 'Some **Markdown** release _notes_ for 0.3.4.1',
'0.3.4': 'Some **Markdown** release _notes_ for 0.3.4',
'0.3.3': 'Some **Markdown** release _notes_ for 0.3.3',
'0.3.2.1': 'Some **Markdown** release _notes_ for 0.3.2.1',
'0.3.2': 'Some **Markdown** release _notes_ for 0.3.2',
'0.3.1': 'Some **Markdown** release _notes_ for 0.3.1',
'0.3.0': 'Some **Markdown** release _notes_ from a prior version',
},
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ export abstract class ApiService {
): Promise<T>

abstract checkOSUpdate(qp: RR.CheckOSUpdateReq): Promise<RR.CheckOSUpdateRes>
abstract getOsUpdate(): Promise<RR.GetRegistryOsUpdateRes>

abstract getRegistryInfo(registryUrl: string): Promise<RR.GetRegistryInfoRes>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,11 +249,13 @@ export class LiveApiService extends ApiService {
})
}

async getOsUpdate(): Promise<RR.GetRegistryOsUpdateRes> {
const { version } = await getServerInfo(this.patch)
async checkOSUpdate(qp: RR.CheckOSUpdateReq): Promise<RR.CheckOSUpdateRes> {
// const { version } = await getServerInfo(this.patch)
const params: T.GetOsVersionParams = {
source: version,
source: null, // TODO is this needed?
target: null,
serverId: qp.serverId,
arch: null, // TODO @lucy backend should get this automatically
}

return this.registryRequest(this.config.marketplace.start9, {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,6 @@ export class MockApiService extends ApiService {
}

async checkOSUpdate(qp: RR.CheckOSUpdateReq): Promise<RR.CheckOSUpdateRes> {
// async getOsUpdate(): Promise<RR.GetRegistryOsUpdateRes> {
await pauseFor(2000)
return Mock.RegistryOsUpdate
}
Expand Down

0 comments on commit 865aae3

Please sign in to comment.