浅念
|
dc4557cccf
|
feat(adapter-wp): 包骨架与限额契约
Plan 2 Task 1:@sf/adapter-wp 包骨架(照 contracts 先例:build extends +
rootDir "." + exclude test)+ WxrLimits 十字段限额契约与 DEFAULT_WXR_LIMITS
值域冻结(设计基线 §7.2)+ 跨包接线。
跨包接线(一份 paths 三方消费):
- 根 tsconfig compilerOptions.paths 把 @sf/contracts、@sf/adapter-wp 映射到
各自 src/index.ts;adapter tsconfig extends 根 tsconfig 使包级 tsc 读同一
份 paths(extends 相对路径按声明处解析,映射始终落在仓库根)
- 根 vitest.config.ts resolve.alias 指向同一映射(vitest 不读 tsconfig paths)
- adapter 加 @sf/contracts workspace:* 依赖;三方均直连 src,不经 dist
(已实测:移走 contracts dist 后 vitest 与包级 tsc 仍全绿)
- 根 devDependencies 加 @types/node@^22(对齐 apps/api 钉 22):alias 的
fileURLToPath 辅助需 node 类型,此前根程序靠 apps/api 传递 @types 才有
node 全局,属偶合
限额类型锁(照 contracts 单源派生先例):DEFAULT_WXR_LIMITS as const
satisfies WxrLimits + _LIMIT_KEYS 键集与 keyof WxrLimits 双向咬合断言;
timeBudgetMs 以可注入时钟(构造函数 now())测试于 Task 3、实测覆盖于 Task 8。
验证:pnpm test 78 绿(75+3);pnpm --filter @sf/adapter-wp exec tsc
-p tsconfig.json --noEmit exit 0(--listFiles 证实 contracts 经 src 解析);
根 typecheck 链与 pnpm lint 绿;build 产物形状核验后清理。
Co-Authored-By: Claude Code <noreply@anthropic.com>
|
2026-10-21 08:05:08 +08:00 |
|
浅念
|
494beadf94
|
chore: 终审 Minor 清理——@types/node 钉 22、contracts 构建排除测试、helpers 盲区注记、计划收口注记
Co-Authored-By: Claude Code <noreply@anthropic.com>
|
2026-10-20 21:08:34 +08:00 |
|
浅念
|
3c32becba6
|
chore: 收尾清账——type:module/gitattributes/engines/lint/CI/根typecheck覆盖
Co-Authored-By: Claude Code <noreply@anthropic.com>
|
2026-10-20 20:56:26 +08:00 |
|
浅念
|
514f37301e
|
feat(api): NestJS standalone 骨架 + Drizzle/postgres.js 接入
Co-Authored-By: Claude Code <noreply@anthropic.com>
|
2026-10-20 18:56:50 +08:00 |
|
浅念
|
857389e68b
|
feat(contracts): UniversalRow 契约 v1 冻结 + 守卫 + 测试
Co-Authored-By: Claude Code <noreply@anthropic.com>
|
2026-10-20 18:15:47 +08:00 |
|
浅念
|
30c78800e0
|
chore(workspace): pnpm monorepo 骨架 + vitest 冒烟
Co-Authored-By: Claude Code <noreply@anthropic.com>
|
2026-10-20 17:36:33 +08:00 |
|