refactor: split anki-connect and stats-server resolvers into modules (#169)

This commit is contained in:
2026-07-17 23:05:59 -07:00
committed by GitHub
parent 44959ed282
commit deae61b211
34 changed files with 3239 additions and 2398 deletions
+12 -2
View File
@@ -23,7 +23,17 @@ test('stats data uses the shared HTTP contract while native dialogs retain IPC',
assert.doesNotMatch(ipcHandlers, /statsGet[A-Z]/);
const apiClient = read('stats/src/lib/api-client.ts');
const statsServer = read('src/core/services/stats-server.ts');
const statsServerRoutes = [
'analytics-routes.ts',
'integration-routes.ts',
'library-routes.ts',
'mining-routes.ts',
].map((filename) => ({
filename,
source: read(`src/core/services/stats-server/${filename}`),
}));
assert.match(apiClient, /StatsHttpClient/);
assert.match(statsServer, /statsJson/);
for (const { filename, source } of statsServerRoutes) {
assert.match(source, /statsJson/, `${filename} must use the shared HTTP contract`);
}
});