feat(存储): JSON data store 升级 SQLite(迭代 06,R-008)
- 新增 SqliteStore(node:sqlite 封装):strategy_holdings 持仓生命周期表 + market_quotes_cache 行情缓存表 - DataStore 改造为门面委托 SqliteStore,保留兼容 API,启动检测自动迁移(幂等) - PositionManager 适配单票生命周期(openHolding/addShares/reduceShares/closeHolding),清仓转历史保留 - 新增一次性迁移脚本 scripts/migrate-json-to-sqlite.mjs + pnpm migrate 命令 - 修复 addToStrategy 语义 Bug(新增量 vs 绝对目标量),真实 API CRUD 回归通过 - 移除策略 tab 一键清零按钮及 remove-all-shares 端点(clearStrategyShares 保留供删除策略联动) - 插件 dispose 补充 storage.close() 关闭 SQLite 连接
This commit is contained in:
+2
-1
@@ -47,7 +47,8 @@
|
||||
"scripts": {
|
||||
"build": "rm -rf lib && tsc -p tsconfig.build.json && tsdown && node scripts/wrap-client.mjs",
|
||||
"bundle": "tsdown",
|
||||
"typecheck": "tsc --noEmit"
|
||||
"typecheck": "tsc --noEmit",
|
||||
"migrate": "node scripts/migrate-json-to-sqlite.mjs"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@deepseek-ai/dsh-client-runtime": "0.1.1-rc.2",
|
||||
|
||||
Reference in New Issue
Block a user