mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-16 04:27:21 +00:00
optimized performance
This commit is contained in:
@@ -96,6 +96,7 @@ export class App<C extends Connection = Connection, Options extends AppOptions =
|
||||
|
||||
private trigger_first_boot = false;
|
||||
private _building: boolean = false;
|
||||
private _systemController: SystemController | null = null;
|
||||
|
||||
constructor(
|
||||
public connection: C,
|
||||
@@ -172,8 +173,8 @@ export class App<C extends Connection = Connection, Options extends AppOptions =
|
||||
|
||||
// load system controller
|
||||
guard.registerPermissions(Object.values(SystemPermissions));
|
||||
const systemController = new SystemController(this);
|
||||
systemController.register(this);
|
||||
this._systemController = new SystemController(this);
|
||||
this._systemController.register(this);
|
||||
|
||||
// emit built event
|
||||
$console.log("App built");
|
||||
@@ -205,6 +206,10 @@ export class App<C extends Connection = Connection, Options extends AppOptions =
|
||||
return this.modules.ctx().em;
|
||||
}
|
||||
|
||||
get mcp() {
|
||||
return this._systemController?._mcpServer;
|
||||
}
|
||||
|
||||
get fetch(): Hono["fetch"] {
|
||||
return this.server.fetch as any;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user