mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
bug fixes
This commit is contained in:
6 files changed
+19
-19
No files matched your search
@@ -10,7 +10,7 @@ import { load as loadOptions } from '../options';
|
||||
import { MongoService } from '../service/db';
|
||||
import { ConfigService } from '../settings';
|
||||
import {
|
||||
addon, builtinModel, lib, model, script, service, setting,
|
||||
addon, builtinModel, model, service, setting,
|
||||
} from './common';
|
||||
|
||||
const argv = cac().parse();
|
||||
@@ -122,7 +122,6 @@ export async function load(ctx: Context) {
|
||||
await ctx.loader.reloadPlugin(require.resolve('../service/storage'), 'file');
|
||||
require('../lib/index');
|
||||
await Promise.all([
|
||||
lib(pending, fail, ctx),
|
||||
service(pending, fail, ctx),
|
||||
]);
|
||||
ctx.plugin(require('../service/worker'));
|
||||
@@ -140,6 +139,5 @@ export async function load(ctx: Context) {
|
||||
for (const h of await fs.readdir(scriptDir)) {
|
||||
ctx.loader.reloadPlugin(path.resolve(scriptDir, h), '');
|
||||
}
|
||||
await script(pending, fail, ctx);
|
||||
await cli();
|
||||
}
|
||||
@@ -10,7 +10,7 @@ import { load } from '../options';
|
||||
import { MongoService } from '../service/db';
|
||||
import { ConfigService } from '../settings';
|
||||
import {
|
||||
addon, builtinModel, locale, model, service,
|
||||
addon, builtinModel, locale, model, service, setting,
|
||||
} from './common';
|
||||
|
||||
const argv = cac().parse();
|
||||
@@ -58,6 +58,7 @@ export async function apply(ctx: Context) {
|
||||
await service(pending, fail, ctx);
|
||||
await builtinModel(ctx);
|
||||
await model(pending, fail, ctx);
|
||||
await setting(pending, fail, require('../model/setting'));
|
||||
|
||||
const handlerDir = path.resolve(__dirname, '..', 'handler');
|
||||
const handlers = await fs.readdir(handlerDir);
|
||||
|
||||
@@ -676,7 +676,6 @@ class ScoreboardService extends Service {
|
||||
views: Record<string, ScoreboardView<any>> = {};
|
||||
constructor(ctx: Context) {
|
||||
super(ctx, 'scoreboard');
|
||||
ctx.set('scoreboard', this);
|
||||
}
|
||||
|
||||
addView<T extends { [key: string]: keyof BuiltinInput | AnyFunction | Type<any> }>(
|
||||
|
||||
Reference in new issue
Block a user