mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 05:49:16 +01:00
refactor(plugin): ♻️ Remove mandatory manifest inside Plugin constructor
This commit is contained in:
parent
d224d7b9b8
commit
c7221ae9d1
5 changed files with 6 additions and 97 deletions
|
|
@ -1,13 +1,7 @@
|
|||
import { Hooks, type Manifest, Plugin, PluginConfigManager } from "@versia/kit";
|
||||
import { Hooks, Plugin, PluginConfigManager } from "@versia/kit";
|
||||
import { z } from "zod";
|
||||
import authorizeRoute from "./routes/authorize";
|
||||
|
||||
const myManifest: Manifest = {
|
||||
name: "@versia/openid",
|
||||
description: "OpenID authentication.",
|
||||
version: "0.1.0",
|
||||
};
|
||||
|
||||
const configManager = new PluginConfigManager(
|
||||
z.object({
|
||||
forced: z.boolean().default(false),
|
||||
|
|
@ -65,7 +59,7 @@ const configManager = new PluginConfigManager(
|
|||
}),
|
||||
);
|
||||
|
||||
const plugin = new Plugin(myManifest, configManager);
|
||||
const plugin = new Plugin(configManager);
|
||||
|
||||
plugin.registerHandler(Hooks.Response, (req) => {
|
||||
console.info("Request received:", req);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue