- 新增 pino/pino-pretty/pino-roll 依赖,实现结构化日志(console pretty + file JSONL rolling) - 新增 Logger 接口及 PinoLoggerWrapper/ConsoleFallbackLogger/NoopLogger/MemoryLogger 实现 - 新增 src/pino-roll.d.ts 类型声明 - 新增 server.storage.dataDir 配置(默认 ./data,相对路径基于配置文件目录) - 新增 server.logging 配置(level/console/file/rotation,支持变量引用) - 配置文件从可选改为必填,parseRuntimeArgs 无参数时抛错 - bootstrap 创建 logger、确保 dataDir、shutdown flush、失败路径 fallback - startServer 接收 logger 并输出结构化监听日志 - ESLint 新增 no-restricted-syntax 禁止 src/server 直接 console.*(排除 logger.ts) - 更新 config.example.yaml、README.md、DEVELOPMENT.md 同步配置和日志文档 - 完善测试覆盖:logger、config、schema、bootstrap 共 150 个测试通过
69 lines
2.2 KiB
JSON
69 lines
2.2 KiB
JSON
{
|
|
"name": "my-app",
|
|
"version": "0.1.0",
|
|
"type": "module",
|
|
"private": true,
|
|
"scripts": {
|
|
"dev": "bun run scripts/dev.ts",
|
|
"dev:server": "bun --watch src/server/dev.ts",
|
|
"dev:web": "bunx --bun vite --host",
|
|
"build": "bun run scripts/build.ts",
|
|
"lint": "eslint .",
|
|
"format": "prettier . --write",
|
|
"check": "bun run schema:check && bun run typecheck && bun run lint && bun test",
|
|
"schema": "bun run scripts/generate-config-schema.ts",
|
|
"schema:check": "bun run scripts/generate-config-schema.ts -- --check",
|
|
"verify": "bun run check && bun run build",
|
|
"test": "bun test",
|
|
"clean": "bun run scripts/clean.ts",
|
|
"typecheck": "tsc --noEmit",
|
|
"prepare": "husky",
|
|
"version:patch": "bun run scripts/bump-version.ts patch",
|
|
"version:minor": "bun run scripts/bump-version.ts minor",
|
|
"version:major": "bun run scripts/bump-version.ts major",
|
|
"version:set": "bun run scripts/bump-version.ts set"
|
|
},
|
|
"devDependencies": {
|
|
"@commitlint/cli": "^21.0.1",
|
|
"@commitlint/config-conventional": "^21.0.1",
|
|
"@eslint/js": "^10.0.1",
|
|
"@tanstack/react-query-devtools": "^5.100.10",
|
|
"@testing-library/react": "^16.3.2",
|
|
"@types/bun": "^1.3.14",
|
|
"@types/jsdom": "^28.0.3",
|
|
"@types/react": "^19.2.14",
|
|
"@types/react-dom": "^19.2.3",
|
|
"@vitejs/plugin-react": "^6.0.2",
|
|
"eslint": "^10.3.0",
|
|
"eslint-config-prettier": "^10.1.8",
|
|
"eslint-import-resolver-typescript": "^4.4.4",
|
|
"eslint-plugin-import": "^2.32.0",
|
|
"eslint-plugin-perfectionist": "^5.9.0",
|
|
"eslint-plugin-prettier": "^5.5.5",
|
|
"eslint-plugin-react-hooks": "^7.1.1",
|
|
"eslint-plugin-react-refresh": "^0.5.2",
|
|
"husky": "^9.1.7",
|
|
"jsdom": "^29.1.1",
|
|
"lint-staged": "^17.0.4",
|
|
"prettier": "^3.8.3",
|
|
"typescript": "^6.0.3",
|
|
"typescript-eslint": "^8.59.3",
|
|
"vite": "^8.0.13"
|
|
},
|
|
"dependencies": {
|
|
"@sinclair/typebox": "^0.34.49",
|
|
"@tanstack/react-query": "^5.100.10",
|
|
"ajv": "^8.20.0",
|
|
"es-toolkit": "^1.46.1",
|
|
"pino": "^10.3.1",
|
|
"pino-pretty": "^13.1.3",
|
|
"pino-roll": "^4.0.0",
|
|
"react": "^19.2.6",
|
|
"react-dom": "^19.2.6",
|
|
"react-router": "^7.15.1",
|
|
"recharts": "^3.8.1",
|
|
"tdesign-icons-react": "^0.6.4",
|
|
"tdesign-react": "^1.16.9"
|
|
}
|
|
}
|