* first pass * test * test * priority * Reduce boilerplate further * Update server/utils/PluginManager.ts Co-authored-by: Apoorv Mishra <apoorvmishra101092@gmail.com> * fix: matchesNode error in destroyed editor transaction * fix: Individual imported files do not display source correctly in 'Insights' * chore: Add sleep before Slack notification * docs * fix: Error logged about missing plugin.json * Remove email template glob --------- Co-authored-by: Apoorv Mishra <apoorvmishra101092@gmail.com>
21 lines
557 B
TypeScript
21 lines
557 B
TypeScript
import { PluginManager, PluginType } from "@server/utils/PluginManager";
|
|
import config from "../plugin.json";
|
|
import hooks from "./api/hooks";
|
|
import router from "./auth/slack";
|
|
import env from "./env";
|
|
import SlackProcessor from "./processors/SlackProcessor";
|
|
|
|
const enabled = !!env.SLACK_CLIENT_ID && !!env.SLACK_CLIENT_SECRET;
|
|
|
|
PluginManager.register(PluginType.AuthProvider, router, {
|
|
...config,
|
|
enabled,
|
|
});
|
|
|
|
PluginManager.register(PluginType.API, hooks, {
|
|
...config,
|
|
enabled,
|
|
});
|
|
|
|
PluginManager.registerProcessor(SlackProcessor, { enabled });
|