update marketplace url to reflect build version (#2914)

* update marketplace url to reflect build version

* adjust marketplace config

* use helper function to compare urls

* rework some registry stuff

* #2900, #2899, and other registry changes

* alpha.1

* trailing /

* add startosRegistry

* fix migration

---------

Co-authored-by: Matt Hill <mattnine@protonmail.com>
Co-authored-by: Aiden McClelland <me@drbonez.dev>
Co-authored-by: Aiden McClelland <3732071+dr-bonez@users.noreply.github.com>
This commit is contained in:
Lucy
2025-04-29 16:12:21 -04:00
committed by GitHub
parent 2adf34fbaf
commit 5c473eb9cc
63 changed files with 733 additions and 470 deletions

View File

@@ -169,6 +169,7 @@ export class MockApiService extends ApiService {
pathArr: Array<string | number>,
value: T,
): Promise<RR.SetDBValueRes> {
console.warn(pathArr, value)
const pointer = pathFromArray(pathArr)
const params: RR.SetDBValueReq<T> = { pointer, value }
await pauseFor(2000)
@@ -367,7 +368,7 @@ export class MockApiService extends ApiService {
}
}
async updateServer(url?: string): Promise<RR.UpdateServerRes> {
async updateServer(params?: RR.UpdateServerReq): Promise<RR.UpdateServerRes> {
await pauseFor(2000)
const initialProgress = {
size: null,
@@ -475,41 +476,37 @@ export class MockApiService extends ApiService {
// marketplace URLs
async registryRequest(
registryUrl: string,
options: RPCOptions,
): Promise<any> {
await pauseFor(2000)
return Error('do not call directly')
}
async checkOSUpdate(
qp: RR.CheckOSUpdateReq,
): Promise<RR.GetRegistryOsUpdateRes> {
params: RR.CheckOsUpdateReq,
): Promise<RR.CheckOsUpdateRes> {
await pauseFor(2000)
return Mock.RegistryOSUpdate
}
async getRegistryInfo(registryUrl: string): Promise<T.RegistryInfo> {
async getRegistryInfo(
params: RR.GetRegistryInfoReq,
): Promise<RR.GetRegistryInfoRes> {
await pauseFor(2000)
return Mock.RegistryInfo
}
async getRegistryPackage(
url: string,
id: string,
versionRange: string,
): Promise<GetPackageRes> {
params: RR.GetRegistryPackageReq,
): Promise<RR.GetRegistryPackageRes> {
await pauseFor(2000)
if (!versionRange || versionRange === '=*') {
const { targetVersion, id } = params
if (!targetVersion || targetVersion === '=*') {
return Mock.RegistryPackages[id]!
} else {
return Mock.OtherPackageVersions[id]![versionRange]!
return Mock.OtherPackageVersions[id]![targetVersion]!
}
}
async getRegistryPackages(registryUrl: string): Promise<GetPackagesRes> {
async getRegistryPackages(
params: RR.GetRegistryPackagesReq,
): Promise<RR.GetRegistryPackagesRes> {
await pauseFor(2000)
return Mock.RegistryPackages
}