Discover Pi Web plugins from Pi packages

This commit is contained in:
Federico Jaramillo Martinez
2026-05-10 15:20:08 +02:00
parent 125dedf300
commit 95f68568ab
4 changed files with 294 additions and 28 deletions
+2 -1
View File
@@ -18,6 +18,7 @@ import { PiWebPluginService } from "./piWebPluginService.js";
export interface AppDependencies {
projects?: ProjectService;
workspaces?: WorkspaceService;
piWebPlugins?: Pick<PiWebPluginService, "manifest" | "readAsset">;
clientDist?: string | false;
logger?: FastifyServerOptions["logger"];
}
@@ -28,7 +29,7 @@ export async function buildApp(deps: AppDependencies = {}): Promise<FastifyInsta
const projects = deps.projects ?? new ProjectService(new ProjectStore());
const workspaces = deps.workspaces ?? new WorkspaceService();
const piWebPlugins = new PiWebPluginService();
const piWebPlugins = deps.piWebPlugins ?? new PiWebPluginService();
app.get("/pi-web-plugins/manifest.json", async () => piWebPlugins.manifest());