2024-10-13 00:35:36 +08:00
|
|
|
import { PluginInstanceInternal } from "@lib/addons/plugins/types";
|
2024-02-28 17:59:47 +08:00
|
|
|
|
2024-07-30 00:18:01 +08:00
|
|
|
interface CorePlugin {
|
|
|
|
|
default: PluginInstanceInternal;
|
|
|
|
|
preenabled: boolean;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Called from @lib/plugins
|
|
|
|
|
export const getCorePlugins = (): Record<string, CorePlugin> => ({
|
2024-10-09 22:15:39 +08:00
|
|
|
"bunny.quickinstall": require("./quickinstall"),
|
|
|
|
|
"bunny.badges": require("./badges")
|
2024-07-30 00:18:01 +08:00
|
|
|
});
|
2024-02-28 17:59:47 +08:00
|
|
|
|
2024-07-30 00:18:01 +08:00
|
|
|
/**
|
|
|
|
|
* @internal
|
|
|
|
|
*/
|
|
|
|
|
export function defineCorePlugin(instance: PluginInstanceInternal): PluginInstanceInternal {
|
|
|
|
|
// @ts-expect-error
|
|
|
|
|
instance[Symbol.for("bunny.core.plugin")] = true;
|
|
|
|
|
return instance;
|
2024-03-06 01:57:59 +08:00
|
|
|
}
|