Files
lingxi/package.json
T
Stev_Wang 68b5ca20f4
ci / 质量门禁 (push) Canceled after 0s
ci(ci): 支持本地 CI 并调整开发库凭据
背景:Gitea 暂未部署 Actions runner,远程 CI 会停留在 queued;本地开发库按约定改用 lingxi / postgres / postgres。

改动:
- 新增 pnpm ci:local,按 CI 工作流顺序执行 compose、格式、Lint、类型、单测、构建、迁移种子、集成、OpenAPI 与 e2e;
- 新增 scripts/e2e.mjs 管理 vite preview 生命周期,e2e 改为单 worker 避免退出挂起;
- openapi:export 生成后自动 Prettier,保持工作区干净;
- compose、.env.example、CI services 数据库凭据统一为 postgres/postgres,库名 lingxi;
- README、AGENTS、A0 报告同步本地 CI 与数据库说明。

影响面:仅本地开发与 CI 执行方式,无业务代码/接口/数据模型变更;本地库已重建为 lingxi/postgres。
回滚方式:git revert 本提交;数据库需按回滚后的 compose 凭据重新初始化。
验证:pnpm ci:local 全绿(158s),format:check、lint、typecheck、openapi:diff 通过。
2026-11-02 18:14:08 +08:00

70 lines
2.4 KiB
JSON

{
"name": "lingxi",
"version": "0.1.0",
"private": true,
"description": "灵犀 · 信息流广告素材一站式生产平台",
"packageManager": "pnpm@10.34.9",
"engines": {
"node": "24.15.0",
"pnpm": ">=10.0.0 <11.0.0"
},
"scripts": {
"preinstall": "node scripts/only-allow-pnpm.mjs",
"prepare": "husky",
"dev": "turbo run dev --parallel",
"build": "turbo run build",
"lint": "eslint . --max-warnings=0",
"lint:fix": "eslint . --fix",
"format": "prettier --write .",
"format:check": "prettier --check .",
"typecheck": "turbo run typecheck && tsc -p tsconfig.json --noEmit",
"test": "turbo run test",
"test:int": "turbo run test:int",
"test:e2e": "turbo run build && node scripts/e2e.mjs",
"ci:local": "node scripts/ci-local.mjs",
"compose:up": "docker compose -f infra/docker-compose.dev.yaml up -d --wait",
"compose:down": "docker compose -f infra/docker-compose.dev.yaml down",
"db:generate": "prisma generate",
"db:migrate": "prisma migrate dev",
"db:reset": "prisma migrate reset --force",
"db:seed": "tsx prisma/seed.ts",
"openapi:export": "tsx --tsconfig apps/api/tsconfig.json apps/api/src/scripts/export-openapi.ts && openapi-typescript openapi/lingxi.openapi.json -o apps/web/src/api/generated/openapi.d.ts && prettier --write apps/web/src/api/generated/openapi.d.ts",
"openapi:diff": "node scripts/openapi-diff.mjs",
"postinstall": "prisma generate"
},
"devDependencies": {
"@commitlint/cli": "20.5.3",
"@commitlint/config-conventional": "20.5.3",
"@eslint/js": "9.39.5",
"@playwright/test": "1.59.1",
"@prisma/client": "6.19.3",
"@types/node": "24.19.2",
"@types/react": "19.3.0",
"@types/react-dom": "19.3.0",
"@vitest/coverage-v8": "3.2.7",
"dotenv": "18.0.9",
"eslint": "9.39.5",
"eslint-import-resolver-typescript": "4.4.5",
"eslint-plugin-import-x": "4.17.1",
"eslint-plugin-jsx-a11y": "6.10.2",
"eslint-plugin-react-hooks": "7.1.1",
"eslint-plugin-react-refresh": "0.5.7",
"eslint-plugin-simple-import-sort": "14.0.0",
"globals": "17.14.0",
"husky": "9.1.7",
"lint-staged": "16.4.0",
"openapi-typescript": "7.13.0",
"prettier": "3.9.10",
"prisma": "6.19.3",
"tsup": "8.5.1",
"tsx": "4.23.15",
"turbo": "2.11.10",
"typescript": "5.9.3",
"typescript-eslint": "8.72.1",
"vitest": "3.2.7"
},
"prisma": {
"seed": "tsx prisma/seed.ts"
}
}