(ctx: Context)
| 47 | export const service = getLoader('service', 'service'); |
| 48 | |
| 49 | export async function builtinModel(ctx: Context) { |
| 50 | const modelDir = path.resolve(__dirname, '..', 'model'); |
| 51 | const models = await fs.readdir(modelDir); |
| 52 | for (const t of models.filter((i) => i.endsWith('.ts'))) { |
| 53 | const q = path.resolve(modelDir, t); |
| 54 | const module = require(q); |
| 55 | if ('apply' in module) ctx.loader.reloadPlugin(q, ''); |
| 56 | const exports = unwrapExports(module); |
| 57 | if (isClass(exports) && !(Symbol.for('hydro.initialize') in exports)) ctx.loader.reloadPlugin(q, ''); |
| 58 | } |
| 59 | } |
| 60 | |
| 61 | export async function locale(pending: Record<string, string>, fail: string[]) { |
| 62 | for (const i of Object.values(pending)) { |
no test coverage detected