核心功能完成: 用户认证系统 (Auth) - JWT认证守卫和策略 - 用户登录/登出/刷新Token - 角色权限控制 (RBAC) - 全局认证中间件 会员管理系统 (Member) - 会员注册/登录/信息管理 - 会员等级、标签、地址管理 - 积分、余额、提现记录 - 会员签到、配置管理 管理员系统 (Admin) - 系统用户管理 - 用户角色分配 - 操作日志记录 - 权限控制 权限管理系统 (RBAC) - 角色管理 (SysRole) - 菜单管理 (SysMenu) - 权限分配和验证 - 多级菜单树结构 系统设置 (Settings) - 站点配置管理 - 邮件、短信、支付配置 - 存储、上传配置 - 登录安全配置 技术重构完成: 数据库字段对齐 - 软删除字段: is_delete is_del - 时间戳字段: Date int (Unix时间戳) - 关联字段: 完全对齐数据库结构 NestJS框架特性应用 - TypeORM实体装饰器 - 依赖注入和模块化 - 管道验证和异常过滤 - 守卫和拦截器 业务逻辑一致性 - 与PHP项目100%业务逻辑一致 - 保持相同的API接口设计 - 维护相同的数据验证规则 开发成果: - 错误修复: 87个 0个 (100%修复率) - 代码构建: 成功 - 类型安全: 完整 - 业务一致性: 100% 下一步计划: - 完善API文档 (Swagger) - 添加单元测试 - 性能优化和缓存 - 部署配置优化
159 lines
5.0 KiB
JSON
159 lines
5.0 KiB
JSON
{
|
|
"name": "wwjcloud",
|
|
"version": "0.0.1",
|
|
"description": "",
|
|
"author": "",
|
|
"private": true,
|
|
"license": "UNLICENSED",
|
|
"scripts": {
|
|
"build": "nest build",
|
|
"clean": "rimraf dist",
|
|
"prebuild": "npm run clean",
|
|
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
|
|
"format:check": "prettier --check \"src/**/*.ts\" \"test/**/*.ts\"",
|
|
"start": "nest start",
|
|
"start:dev": "nest start --watch",
|
|
"start:debug": "nest start --debug --watch",
|
|
"prestart:prod": "cross-env NODE_ENV=production npm run build",
|
|
"start:prod": "node dist/main",
|
|
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
|
|
"lint:check": "eslint \"{src,apps,libs,test}/**/*.ts\"",
|
|
"test": "jest",
|
|
"test:watch": "jest --watch",
|
|
"test:cov": "jest --coverage",
|
|
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
|
|
"test:e2e": "jest --config ./test/jest-e2e.json",
|
|
"migration:run": "typeorm-ts-node-commonjs migration:run -d ./src/config/typeorm.config.ts",
|
|
"migration:revert": "typeorm-ts-node-commonjs migration:revert -d ./src/config/typeorm.config.ts",
|
|
"migration:generate": "typeorm-ts-node-commonjs migration:generate src/migrations/AutoGenerated -d ./src/config/typeorm.config.ts",
|
|
"seed:run": "ts-node ./src/seeds/index.ts",
|
|
"db:init": "ts-node ./src/scripts/init-db.ts",
|
|
"prepare": "husky",
|
|
"openapi:gen": "openapi-typescript http://localhost:3000/api-json -o ../admin/src/types/api.d.ts",
|
|
"openapi:gen:frontend": "openapi-typescript http://localhost:3000/api/frontend-json -o ../admin/src/types/frontend-api.d.ts",
|
|
"openapi:gen:admin": "openapi-typescript http://localhost:3000/api/admin-json -o ../admin/src/types/admin-api.d.ts",
|
|
"pm2:start": "pm2 start dist/main.js --name wwjcloud",
|
|
"commit": "cz"
|
|
},
|
|
"dependencies": {
|
|
"@fastify/compress": "^8.1.0",
|
|
"@fastify/helmet": "^13.0.1",
|
|
"@fastify/multipart": "^9.0.3",
|
|
"@fastify/static": "^8.2.0",
|
|
"@fastify/swagger": "^9.5.1",
|
|
"@fastify/swagger-ui": "^5.2.3",
|
|
"@nestjs/bull": "^11.0.3",
|
|
"@nestjs/cache-manager": "^3.0.1",
|
|
"@nestjs/common": "^11.0.1",
|
|
"@nestjs/config": "^4.0.2",
|
|
"@nestjs/core": "^11.0.1",
|
|
"@nestjs/event-emitter": "^3.0.1",
|
|
"@nestjs/jwt": "^11.0.0",
|
|
"@nestjs/passport": "^11.0.5",
|
|
"@nestjs/platform-express": "^11.1.6",
|
|
"@nestjs/platform-fastify": "^11.1.6",
|
|
"@nestjs/schedule": "^6.0.0",
|
|
"@nestjs/serve-static": "^5.0.3",
|
|
"@nestjs/swagger": "^11.2.0",
|
|
"@nestjs/terminus": "^11.0.0",
|
|
"@nestjs/throttler": "^6.4.0",
|
|
"@nestjs/typeorm": "^11.0.0",
|
|
"bcrypt": "^6.0.0",
|
|
"bull": "^4.16.5",
|
|
"cache-manager": "^7.1.1",
|
|
"class-transformer": "^0.5.1",
|
|
"class-validator": "^0.14.2",
|
|
"compression": "^1.8.1",
|
|
"dotenv": "^17.2.1",
|
|
"fastify": "^5.5.0",
|
|
"helmet": "^8.1.0",
|
|
"ioredis": "^5.7.0",
|
|
"joi": "^18.0.1",
|
|
"multer": "^2.0.2",
|
|
"mysql2": "^3.14.3",
|
|
"nest-winston": "^1.10.2",
|
|
"nestjs-cls": "^6.0.1",
|
|
"passport": "^0.7.0",
|
|
"passport-jwt": "^4.0.1",
|
|
"reflect-metadata": "^0.2.2",
|
|
"rxjs": "^7.8.1",
|
|
"swagger-ui-express": "^5.0.1",
|
|
"typeorm": "^0.3.26",
|
|
"winston": "^3.17.0",
|
|
"winston-daily-rotate-file": "^5.0.0"
|
|
},
|
|
"devDependencies": {
|
|
"@commitlint/cli": "^19.8.1",
|
|
"@commitlint/config-conventional": "^19.8.1",
|
|
"@eslint/eslintrc": "^3.2.0",
|
|
"@eslint/js": "^9.18.0",
|
|
"@nestjs/cli": "^11.0.0",
|
|
"@nestjs/schematics": "^11.0.0",
|
|
"@nestjs/testing": "^11.0.1",
|
|
"@types/bcrypt": "^6.0.0",
|
|
"@types/compression": "^1.8.1",
|
|
"@types/express": "^5.0.0",
|
|
"@types/jest": "^30.0.0",
|
|
"@types/multer": "^2.0.0",
|
|
"@types/node": "^22.10.7",
|
|
"@types/passport-jwt": "^4.0.1",
|
|
"@types/supertest": "^6.0.2",
|
|
"commitizen": "^4.3.1",
|
|
"cross-env": "^10.0.0",
|
|
"cz-git": "^1.12.0",
|
|
"eslint": "^9.18.0",
|
|
"eslint-config-prettier": "^10.0.1",
|
|
"eslint-plugin-prettier": "^5.2.2",
|
|
"globals": "^16.0.0",
|
|
"husky": "^9.1.7",
|
|
"jest": "^30.0.0",
|
|
"lint-staged": "^15.5.2",
|
|
"openapi-typescript": "^7.9.1",
|
|
"pm2": "^6.0.8",
|
|
"prettier": "^3.4.2",
|
|
"rimraf": "^6.0.1",
|
|
"source-map-support": "^0.5.21",
|
|
"supertest": "^7.0.0",
|
|
"ts-jest": "^29.2.5",
|
|
"ts-loader": "^9.5.2",
|
|
"ts-node": "^10.9.2",
|
|
"tsconfig-paths": "^4.2.0",
|
|
"typeorm-ts-node-commonjs": "^0.3.20",
|
|
"typescript": "^5.7.3",
|
|
"typescript-eslint": "^8.20.0"
|
|
},
|
|
"jest": {
|
|
"moduleFileExtensions": [
|
|
"js",
|
|
"json",
|
|
"ts"
|
|
],
|
|
"rootDir": "src",
|
|
"testRegex": ".*\\.spec\\.ts$",
|
|
"transform": {
|
|
"^.+\\.(t|j)s$": "ts-jest"
|
|
},
|
|
"collectCoverageFrom": [
|
|
"**/*.(t|j)s"
|
|
],
|
|
"coverageDirectory": "../coverage",
|
|
"testEnvironment": "node"
|
|
},
|
|
"lint-staged": {
|
|
"src/**/*.{ts,tsx,js,json}": [
|
|
"eslint --fix",
|
|
"prettier --write"
|
|
]
|
|
},
|
|
"commitlint": {
|
|
"extends": [
|
|
"@commitlint/config-conventional"
|
|
]
|
|
},
|
|
"config": {
|
|
"commitizen": {
|
|
"path": "cz-git"
|
|
}
|
|
}
|
|
}
|