mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
add support for config migration
This commit is contained in:
14 files changed
+206
-151
No files matched your search
@@ -119,7 +119,7 @@ export async function load(ctx: Context) {
|
||||
resolve(c);
|
||||
});
|
||||
});
|
||||
await ctx.loader.reloadPlugin(require.resolve('../service/storage'), 'file', 'hydrooj/service/storage');
|
||||
await ctx.loader.reloadPlugin(require.resolve('../service/storage'), 'file');
|
||||
require('../lib/index');
|
||||
await Promise.all([
|
||||
lib(pending, fail, ctx),
|
||||
@@ -138,7 +138,7 @@ export async function load(ctx: Context) {
|
||||
await addon(pending, fail, ctx);
|
||||
const scriptDir = path.resolve(__dirname, '..', 'script');
|
||||
for (const h of await fs.readdir(scriptDir)) {
|
||||
ctx.loader.reloadPlugin(path.resolve(scriptDir, h), '', `hydrooj/script/${h.split('.')[0]}`);
|
||||
ctx.loader.reloadPlugin(path.resolve(scriptDir, h), '');
|
||||
}
|
||||
await script(pending, fail, ctx);
|
||||
await cli();
|
||||
|
||||
Reference in new issue
Block a user