core&ui: remove Hydro.service.bus, Hydro.ui.template

This commit is contained in:
undefined committed 2025-03-09 16:05:02 +08:00
1 parent a459b9a1fd
commit 1a7b08e56e
8 files changed
+193 -178

No files matched your search

-1
View File
@@ -115,5 +115,4 @@ export function apply(ctx: Context) {
export default app;
global.Hydro.service.bus = app as any;
global.bus = app;
-6
View File
@@ -238,12 +238,6 @@ export async function apply(ctx: Context) {
h.translate = h.translate.bind(h);
h.url = h.url.bind(h);
h.ctx = h.ctx.extend({ domain: h.domain });
h.renderHTML = ((orig) => function (name: string, args: Record<string, any>) {
const s = name.split('.');
let templateName = `${s[0]}.${args.domainId}.${s[1]}`;
if (!global.Hydro.ui.template[templateName]) templateName = name;
return orig(templateName, args);
})(h.renderHTML).bind(h);
});
on('handler/create/http', async (h) => {
if (!argv.options.benchmark && !h.notUsage) await h.limitRate('global', 5, 100);