fix(plugins): keep the API client and the panel test within their size entries, drop an unused import

This commit is contained in:
Maurice
2026-10-26 00:57:56 +01:00
parent 447ae54b93
commit 64ed2175a5
4 changed files with 10 additions and 29 deletions
+2 -9
View File
@@ -65,7 +65,6 @@ import {
type PluginInstanceConfigUpdated,
type PluginActionDescriptor,
type PluginActionResult,
type PluginActivateRequest,
type PluginInstallRequest,
RoadtripDayTrack,
RoadtripVia,
@@ -575,15 +574,9 @@ export const adminApi = {
plugins: () => apiClient.get('/admin/plugins').then(r => r.data),
pluginBrowse: (refresh?: boolean) => apiClient.get('/admin/plugins/registry', { params: refresh ? { refresh: 1 } : undefined }).then(r => r.data),
pluginDetail: (id: string) => apiClient.get(`/admin/plugins/registry/${encodeURIComponent(id)}`).then(r => r.data),
pluginInstall: (id: string, opts?: Pick<PluginInstallRequest, 'version' | 'constraint' | 'withDependencies' | 'acceptTrekRange'>) =>
pluginInstall: (id: string, opts?: Omit<PluginInstallRequest, 'id'>) =>
apiClient.post('/admin/plugins/install', { id, ...opts } satisfies PluginInstallRequest).then(r => r.data),
pluginActivate: (id: string, consent?: boolean, acceptTrekRange?: boolean) =>
apiClient
.post(`/admin/plugins/${id}/activate`, {
...(consent ? { consent: true } : {}),
...(acceptTrekRange ? { acceptTrekRange: true } : {}),
} satisfies PluginActivateRequest)
.then(r => r.data),
pluginActivate: (id: string, consent?: boolean, accept?: boolean) => apiClient.post(`/admin/plugins/${id}/activate`, { consent: consent || undefined, acceptTrekRange: accept || undefined }).then(r => r.data),
pluginDeactivate: (id: string) => apiClient.post(`/admin/plugins/${id}/deactivate`).then(r => r.data),
// `version` pins the exact version to install (the rollback path); omitted, the server
// resolves the newest TREK-compatible version itself.