3d6e9ce175
P2 Task 2 ov 数据层: - compose ov profile:mysql-ov(mysql:8.4,127.0.0.1:3309,库级 utf8mb4_0900_bin)+ redis-ov(6381),cn 侧默认 up 不受影响 (3307/3308 已被其它本机项目占用,端口决策 3309) - @photo/db-ov:9 表 schema(albums_ov/photos_ov 副本、sync_inbox/ sync_state 同步账本(水位行同表标志位)、like_batches/album_stats/ visit_sessions/visit_requests 互动域、outbox_stat_events 回传队列); 迁移 20260918060102_init_ov 走固化校对手决流程,information_schema 复核全部业务表/列 utf8mb4_0900_bin(_prisma_migrations 同 cn 先例 保持 unicode_ci) - generator 独立 output(包内 generated/):pnpm 将两包 @prisma/client 提升为同一 store 实例,默认 .prisma/client 输出会被双 schema 互相 覆盖,ov 客户端独立产出经 src/index.ts 转出口 - ov 入口骨架:main-ov.ts(PORT_OV 默认 8081)+ app-ov.module.ts (仅管线骨架 + /v1/health,feature modules 后续任务装配);logger 装配选项抽取至 shared/logger-options.ts 供 cn/ov 双入口共用(行为 不变,P1 套件守护) - test/reset-ov.ts:ov 库 truncate-if-exists 隔离工具(无 MinIO 清理) - 根脚本:db:generate 双库齐跑,新增 db-ov:migrate/db-ov:generate/dev:ov Co-Authored-By: Claude Code <noreply@anthropic.com>
51 lines
1.5 KiB
JSON
51 lines
1.5 KiB
JSON
{
|
|
"name": "@photo/api-cn",
|
|
"version": "0.1.0",
|
|
"private": true,
|
|
"description": "CN NestJS API service (P1a skeleton: bootstrap, /v1/health, request-id, error envelope)",
|
|
"scripts": {
|
|
"build": "tsc -p tsconfig.build.json",
|
|
"build:watch": "tsc -p tsconfig.build.json --watch",
|
|
"start": "tsc -p tsconfig.build.json && node dist/main-cn.js",
|
|
"start:ov": "tsc -p tsconfig.build.json && node dist/main-ov.js",
|
|
"seed": "tsc -p tsconfig.build.json && node dist/scripts/seed-admin.js",
|
|
"typecheck": "tsc --noEmit",
|
|
"lint": "eslint .",
|
|
"test": "jest",
|
|
"test:e2e": "jest --config jest.e2e.config.ts"
|
|
},
|
|
"dependencies": {
|
|
"@nestjs/common": "^10.4.6",
|
|
"@nestjs/core": "^10.4.6",
|
|
"@nestjs/platform-express": "^10.4.6",
|
|
"@node-rs/argon2": "^2.2.1",
|
|
"@photo/contracts": "workspace:*",
|
|
"@photo/db-cn": "workspace:*",
|
|
"@photo/db-ov": "workspace:*",
|
|
"@photo/storage": "workspace:^",
|
|
"bullmq": "^6.3.6",
|
|
"class-transformer": "^0.5.1",
|
|
"class-validator": "^0.15.1",
|
|
"ioredis": "^6.0.0",
|
|
"nestjs-pino": "^4.6.1",
|
|
"pino": "^10.0.0",
|
|
"pino-http": "^11.0.0",
|
|
"reflect-metadata": "^0.2.2",
|
|
"rxjs": "^7.8.1"
|
|
},
|
|
"devDependencies": {
|
|
"@aws-sdk/client-s3": "^3.700.0",
|
|
"@nestjs/testing": "^10.4.6",
|
|
"@types/jest": "^29.5.13",
|
|
"@types/node": "^22.10.0",
|
|
"@types/supertest": "^6.0.2",
|
|
"dotenv": "^16.4.5",
|
|
"jest": "^29.7.0",
|
|
"sharp": "^0.35.0",
|
|
"supertest": "^7.0.0",
|
|
"ts-jest": "^29.2.5",
|
|
"ts-node": "^10.9.2",
|
|
"typescript": "^5.6.0"
|
|
}
|
|
}
|