Add service handler registration and DI support

Introduces dependency injection via Inversify and reflect-metadata, adds a service handler registry for packet handling, and updates core initialization to auto-register and bind service handlers. Also updates Vite configs and auto-include logic to support protocol service files.
This commit is contained in:
手瓜一十雪 committed 2025-11-14 22:20:33 +08:00
1 parent a2a73ce2dd
commit f04ffa5dc6
8 files changed
+62 -13

No files matched your search

+4 -1
View File
@@ -12,6 +12,9 @@ export function autoIncludeTSPlugin(options) {
async buildStart() {
tsFilesMap = {};
for (const { entry, dir } of entries) {
if (!tsFilesMap[entry]) {
tsFilesMap[entry] = [];
}
const fullDir = path.resolve(dir);
const allTsFiles = await findTSFiles(fullDir);
@@ -29,7 +32,7 @@ export function autoIncludeTSPlugin(options) {
}
});
tsFilesMap[entry] = validFiles;
tsFilesMap[entry].push(...validFiles);
}
},