core: cordis alpha.7

This commit is contained in:
undefined committed 2025-03-21 07:46:36 +08:00
1 parent b6f1a9c627
commit 033e88fdce
14 files changed
+40 -34

No files matched your search

+5 -1
View File
@@ -59,7 +59,11 @@ export async function apply(ctx: Context) {
await builtinModel(ctx);
await model(pending, fail, ctx);
await setting(pending, fail, require('../model/setting'));
ctx = await new Promise((resolve) => {
ctx.inject(['worker', 'setting'], (c) => {
resolve(c);
});
});
const handlerDir = path.resolve(__dirname, '..', 'handler');
const handlers = await fs.readdir(handlerDir);
for (const h of handlers.filter((i) => i.endsWith('.ts'))) {