## Server Testing Utils - Add TestServer, TestClient, MockRoom for unit testing - Export testing utilities from @esengine/server/testing ## Transaction Storage (BREAKING) - Simplify RedisStorage/MongoStorage to factory pattern only - Remove DI client injection option - Add lazy connection and Symbol.asyncDispose support - Add 161 unit tests with full coverage ## Pathfinding Tests - Add 150 unit tests covering all components - BinaryHeap, Heuristics, AStarPathfinder, GridMap, NavMesh, PathSmoother ## Docs - Update storage.md for new factory pattern API
21 lines
624 B
TypeScript
21 lines
624 B
TypeScript
/**
|
|
* @zh Transaction 模块服务令牌
|
|
* @en Transaction module service tokens
|
|
*/
|
|
|
|
import { createServiceToken } from '@esengine/ecs-framework';
|
|
import type { TransactionManager } from './core/TransactionManager.js';
|
|
import type { ITransactionStorage } from './core/types.js';
|
|
|
|
/**
|
|
* @zh 事务管理器令牌
|
|
* @en Transaction manager token
|
|
*/
|
|
export const TransactionManagerToken = createServiceToken<TransactionManager>('transactionManager');
|
|
|
|
/**
|
|
* @zh 事务存储令牌
|
|
* @en Transaction storage token
|
|
*/
|
|
export const TransactionStorageToken = createServiceToken<ITransactionStorage>('transactionStorage');
|