imbytecat
|
695e826dcf
|
refactor(types): 消除非必要 as 逃逸,锁紧 strict 政策
按 Oracle 复核处置全仓 5 处类型断言:
- fields.ts: as const → satisfies Record<GeneratedFieldKey, true>
- compile.ts: as readonly string[] → ReadonlySet<string>.has()
- embed-migrations.ts: JSON.parse as Journal → Zod schema 运行时校验,JSON.parse 显式 unknown
- interceptors.ts: 唯一保留的跨包断言(ORPC→Zod)注释扩写为完整背景
- router.tsx: satisfies 非 cast,保留
biome.json 增配 noExplicitAny / noTsIgnore / noNonNullAssertion,防止后续漂移。
|
2026-04-25 14:23:08 +08:00 |
|
imbytecat
|
e28fe9dc7b
|
perf(compile): 启用 bytecode + minify + inline sourcemap
- Bun 官方 bytecode caching:中型应用 startup ~2x(docs.bun.sh/docs/bundler/bytecode)
- minify:减小 bytecode 体积,二进制仅 +2MB sourcemap
- sourcemap inline:嵌入二进制,保证错误堆栈可读,并在 compile.ts 清理 bundler 残留的 *.js.map
|
2026-04-25 14:05:35 +08:00 |
|
imbytecat
|
19e60d358f
|
feat(cli): 引入 citty CLI,迁移改为显式 ./server migrate
- 顶层新增 bin.ts 作为编译入口,citty 懒加载 src/cli/ 下子命令
- src/cli/serve.ts 通过 _serve-nitro.mjs 桥接启动 Nitro(规避
.output/server/index.mjs 顶层 serve(...) 的副作用导入)
- src/cli/migrate.ts 显式跑 drizzle migrate;env / drizzle 都在 run()
里 await import,避免 citty --help 遍历 subCommands 时触发 env 校验
- compile.ts 入口切到 bin.ts;移除 src/server/plugins/migrate.ts
与 vite.config.ts 中的启动时自动迁移
- compose.yaml 新增一次性 migrate 服务,app depends_on
service_completed_successfully,保证迁移先行再起服
- tsconfig 排除 .output / out;AGENTS.md 补充 CLI 与部署规约
|
2026-04-24 20:32:32 +08:00 |
|
imbytecat
|
cd7b65fda4
|
refactor: flatten monorepo into standalone project
|
2026-04-01 19:43:21 +08:00 |
|