默认开放8080端口供外网访问
use pnpm
数据库在同一容器组的另一个容器中,需要运行 psql -h 127.0.0.1 -U postgres 来访问
vitest中,只有console.debug会显示,其他的都屏蔽了
vitest中,用import 来配合 vi.mocked,而不是require
e2e测试平常只运行 pnpm test:e2e:chromium 就行
e2e测试失败时先查看页面结构 test-results/**/error-context.md
前端是 hono/client hc rpc 的,不是直接fetch
bmad-core dir is in .bmad-core
必须用中文回答
git提交: 当遇到git锁文件冲突时,使用单条命令:rm -f /mnt/code/184-172-template-6/.git/index.lock && git add <文件> && git commit -m "提交信息"
测试调试: 使用 pnpm test --testNamePattern "测试名称" 来运行特定测试查看详细信息 (mini使用Jest,其他包使用Vitest)
-t 或 --testNamePattern--testNamePattern,mini是Jestpnpm test --testNamePattern "测试名称"表单调试: 表单提交失败时,在表单form onsubmit=form.handleSubmit的第二个参数中加console.debug来看表单验证错误,例如:form.handleSubmit(handleSubmit, (errors) => console.debug('表单验证错误:', errors))
类型检查 可以用 pnpm typecheck 加 grep来过滤要检查的 指定文件
文档查找: 查找文档时在当前项目目录的 docs 目录下使用 ls 或 find 命令来查找,例如:
ls /mnt/code/186-175-template-6/docs/ 查看 docs 目录下的文件find /mnt/code/186-175-template-6/docs -name "*.md" 查找所有 markdown 文件find /mnt/code/186-175-template-6/docs -type f -name "*.md" | head -20 查看前 20 个 markdown 文件