mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: add server-loader (#816)
This commit is contained in:
1 parent
3302480348
commit
97720efb65
57 files changed
+1328
-1131
No files matched your search
@@ -10,7 +10,6 @@ import yaml from 'js-yaml';
|
||||
import { Context } from '../context';
|
||||
import { Logger } from '../logger';
|
||||
import { PRIV } from '../model/builtin';
|
||||
import * as bus from '../service/bus';
|
||||
import { unwrapExports } from '../utils';
|
||||
|
||||
const logger = new Logger('common');
|
||||
@@ -55,7 +54,6 @@ const getLoader = (type: LoadTask, filename: string) => async function loader(pe
|
||||
}
|
||||
}
|
||||
}
|
||||
await bus.parallel(`app/load/${type}`);
|
||||
};
|
||||
|
||||
export const handler = getLoader('handler', 'handler');
|
||||
@@ -95,7 +93,6 @@ export async function locale(pending: string[], fail: string[]) {
|
||||
}
|
||||
}
|
||||
}
|
||||
await bus.parallel('app/load/locale');
|
||||
}
|
||||
|
||||
export async function setting(pending: string[], fail: string[], modelSetting: typeof import('../model/setting')) {
|
||||
@@ -137,7 +134,6 @@ export async function setting(pending: string[], fail: string[], modelSetting: t
|
||||
}
|
||||
}
|
||||
}
|
||||
await bus.parallel('app/load/setting');
|
||||
}
|
||||
|
||||
export async function template(pending: string[], fail: string[]) {
|
||||
@@ -161,5 +157,4 @@ export async function template(pending: string[], fail: string[]) {
|
||||
}
|
||||
}
|
||||
}
|
||||
await bus.parallel('app/load/template');
|
||||
}
|
||||
Reference in new issue
Block a user