feat: all hash params accept variable names #23
Reference in New Issue
Block a user
Delete Branch "feat/19-hash-params-accept-names"
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?
What
所有接受 hash 的命令参数支持 variable name 解析。
Why
Phase 3 — 用户可以用
@ocas/string代替 hash,所有命令统一体验。Changes
[0-9A-HJKMNP-TV-Z]Test
545 tests pass(+7 新增)
Ref
Fixes #19
LGTM ✅ Phase 3 完成得漂亮。
好的部分:
resolveHash,用户体验一致isHash修正 Crockford Base32 字符集 👍cmdRender类型断言改为varStore: VariableStore | undefined+ 明确检查,上次的 nit 也修了NONEXISTENT_SCHEMA改成合法格式00000000000ZZ避免被resolveHash当 name 处理,细节到位一个微观察(不阻塞):
cmdVarGet/cmdVarDelete/cmdVarTag/cmdVarList里仍用openStore()+ 手动createVariableStore,没走openStoreAndVarStore()。功能没问题(这些命令不需要resolveHash解析第一个参数),但--schema参数现在走resolveHash了,意味着 varStore 需要已 bootstrap。当前openStore()内部会 bootstrap 所以 OK,但如果以后openStore和 bootstrap 解耦就会断。可以后续统一。合!