split launcher source and build by component

This commit is contained in:
2026-07-02 14:47:58 +09:00
parent fedf9481f8
commit d226230b25
3 changed files with 237 additions and 67 deletions
+25 -1
View File
@@ -40,6 +40,18 @@ export type LauncherSource = {
repository?: string | null;
branch?: string | null;
commitSha?: string | null;
client?: {
repository?: string | null;
branch?: string | null;
commitSha?: string | null;
};
backend?: {
repository?: string | null;
branch?: string | null;
commitSha?: string | null;
image?: string | null;
dockerfile?: string | null;
};
};
export type LauncherAppLink = {
@@ -115,7 +127,14 @@ export function getLauncherSource() {
return apiRequest<{ source: LauncherSource }>('/launcher/source');
}
export function updateLauncherSource(input: { repository: string; branch?: string; commitSha?: string }) {
export function updateLauncherSource(input: {
target?: 'launcher-client' | 'launcher-backend';
repository: string;
branch?: string;
commitSha?: string;
image?: string;
dockerfile?: string;
}) {
return apiRequest<{ source: LauncherSource }>('/launcher/source', {
method: 'PATCH',
body: JSON.stringify(input)
@@ -127,6 +146,11 @@ export function listPlatformRepos(limit = 50) {
.then((result) => result.repos);
}
export function listStudioRepos(limit = 50) {
return apiRequest<{ owner: string | null; repos: GiteaRepo[] }>(`/gitea/repos?owner=studio&limit=${limit}`)
.then((result) => result.repos);
}
export function listLauncherBuildJobs() {
return apiRequest<LauncherBuildJob[]>('/launcher/builds');
}