feat: 建立 ApiState Temporal native 开发链

This commit is contained in:
root
2026-07-17 03:15:50 +02:00
parent ac695021e9
commit d203b22183
19 changed files with 1099 additions and 172 deletions
+2 -2
View File
@@ -18,7 +18,7 @@ export interface AppContext {
export function createEmbeddedContext(config: AppConfig, target: EmbeddedCliTarget): AppContext {
const store = new LotteryStore(config, resolveDataPath(config, target.databasePath));
const client = new Sub2ApiClient(config, readSub2ApiCredentials(config));
const monitor = new AccountScoreService(config, resolveDataPath(config, ".state/account-scores.json"));
const monitor = new AccountScoreService(config, resolveDataPath(config, target.scoreCachePath));
return {
service: new LotteryService(config, store, client),
store,
@@ -39,7 +39,7 @@ export function createServerContext(config: AppConfig, target: ServerTarget): Ap
}
const store = new LotteryStore(config, resolveDataPath(config, target.databasePath));
const client = new Sub2ApiClient(config, { email, password });
const monitor = new AccountScoreService(config, resolveDataPath(config, "account-scores.json"));
const monitor = new AccountScoreService(config, resolveDataPath(config, target.scoreCachePath));
return {
service: new LotteryService(config, store, client),
store,