chore: 优化部分逻辑

Signed-off-by: MiaoWoo <admin@yumc.pw>
This commit is contained in:
2021-08-03 17:30:53 +08:00
parent 586b6acbbc
commit 8a2b0d7c2e
6 changed files with 66 additions and 18 deletions

View File

@ -16,15 +16,28 @@ export namespace server {
* Runtime Server Instance
*/
export const ServerInstance = Symbol("ServerInstance")
export interface NativePlugin {
name: string
version: string
authors?: string | string[]
enable: boolean
depends?: string[]
softDepends?: string[]
/**
* 插件本体
*/
origin: any
[key: string]: any
}
@injectable()
export abstract class NativePluginManager {
list(): any[] {
list(): NativePlugin[] {
throw new Error("Method not implemented.")
}
has(name: string): boolean {
return true
}
get(name: string): any {
get(name: string): NativePlugin {
throw new Error("Method not implemented.")
}
load(name: string): boolean {