@koishijs/loader
Advanced tools
Comparing version 2.0.5 to 2.0.6
@@ -17,4 +17,3 @@ import { Context } from 'koishi'; | ||
resolvePlugin(name: string): Promise<any>; | ||
getPluginMeta(name: string): Promise<any>; | ||
fullReload(): void; | ||
} |
@@ -15,4 +15,3 @@ import { Context } from 'koishi'; | ||
resolvePlugin(name: string): Promise<any>; | ||
getPluginMeta(name: string): Promise<any>; | ||
fullReload(): void; | ||
} |
@@ -137,6 +137,2 @@ var __create = Object.create; | ||
} | ||
async getPluginMeta(name) { | ||
const filename = this.scope.resolve(name + "/package.json"); | ||
return JSON.parse(await import_fs.promises.readFile(filename, "utf8")); | ||
} | ||
fullReload() { | ||
@@ -143,0 +139,0 @@ logger.info("trigger full reload"); |
@@ -37,3 +37,2 @@ import { Context, Dict } from 'koishi'; | ||
abstract resolvePlugin(name: string): Promise<any>; | ||
abstract getPluginMeta(name: string): Promise<any>; | ||
abstract fullReload(): void; | ||
@@ -40,0 +39,0 @@ interpolate(source: any): any; |
@@ -157,3 +157,3 @@ var __defProp = Object.defineProperty; | ||
continue; | ||
ctx.loader.reloadPlugin(ctx, name, plugins[name]); | ||
ctx.lifecycle.queue(ctx.loader.reloadPlugin(ctx, name, plugins[name])); | ||
} | ||
@@ -160,0 +160,0 @@ } |
{ | ||
"name": "@koishijs/loader", | ||
"description": "Config Loader for Koishi", | ||
"version": "2.0.5", | ||
"version": "2.0.6", | ||
"main": "lib/node.js", | ||
@@ -40,8 +40,8 @@ "typings": "lib/index.d.ts", | ||
"peerDependencies": { | ||
"koishi": "^4.9.0" | ||
"koishi": "^4.9.1" | ||
}, | ||
"devDependencies": { | ||
"@koishijs/registry": "^4.0.1", | ||
"@koishijs/registry": "^4.0.3", | ||
"@types/js-yaml": "^4.0.5", | ||
"koishi": "^4.9.0" | ||
"koishi": "^4.9.1" | ||
}, | ||
@@ -48,0 +48,0 @@ "dependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
72390
853