#69 Phase 1a: 自动 bootstrap — openStore() 每次自动 mkdir + bootstrap #73
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Parent: #69 (Phase 1 of #67)
Scope(仅此一件事)
将
openStore()改为每次调用自动mkdirSync(storePath, { recursive: true })+await bootstrap(store)。具体改动
openStore()改为 async,内部调用bootstrap()shouldCreate参数 — 不再区分读写,统一行为validateStoreExists()— bootstrap 会自动创建目录openStore()的地方加awaitinit和bootstrap命令(它们的功能被 openStore 吸收了)不做的事
关键约束
bootstrap()是幂等的,重复调用无副作用createMemoryStore()不经过openStore(),这些不受影响--store /tmp/xxx的,现在会自动初始化,不再需要先 initVerification
bun test全部通过(测试数量不变或仅删减 init/bootstrap 相关的)bun run build通过bun run check通过ucas init和ucas bootstrap报 unknown command