- Shrimp.ts (875 行) 按类拆分到 Shrimp/(7 文件: Shrimp, ShrimpModule, ShrimpTableModule, ShrimpPower, ShrimpCrud, UserRoleModule, OperationLogModule) - forMongo/: MongoShrimpCrud + MongoShrimp(原 ShrimpServer 的 mongo 装配部分,无 express) - forExpress/: buildShrimpRouter + jwtAuth + types - main/: index(0 依赖核心) + expmon(express+mongo 整合,导出 ShrimpServer) + types(纯协议) - 入口子路径 server → expmon(express+mongo 整合方案命名更准确) - 删除冗余的 index.ts / core.ts(合并为 main/index.ts)
58 lines
1.6 KiB
JSON
58 lines
1.6 KiB
JSON
{
|
|
"name": "shrimp-server",
|
|
"version": "0.5.0",
|
|
"private": true,
|
|
"description": "Shrimp 框架后端 — 声明式字段驱动的 Node.js 管理后台框架(Express + Mongoose + JWT)",
|
|
"main": "src/main/index.ts",
|
|
"types": "src/main/index.ts",
|
|
"exports": {
|
|
".": {
|
|
"types": "./src/main/index.ts",
|
|
"default": "./src/main/index.ts"
|
|
},
|
|
"./expmon": {
|
|
"types": "./src/main/expmon.ts",
|
|
"default": "./src/main/expmon.ts"
|
|
},
|
|
"./types": {
|
|
"types": "./src/main/types.ts",
|
|
"default": "./src/main/types.ts"
|
|
},
|
|
"./package.json": "./package.json"
|
|
},
|
|
"files": [
|
|
"src",
|
|
"README.md"
|
|
],
|
|
"scripts": {
|
|
"test": "vitest run",
|
|
"test:watch": "vitest",
|
|
"typecheck": "tsc --noEmit"
|
|
},
|
|
"peerDependencies": {
|
|
"express": "^4 || ^5",
|
|
"mongoose": "^6 || ^7 || ^8",
|
|
"jsonwebtoken": "^8 || ^9",
|
|
"bcrypt": "^5 || ^6"
|
|
},
|
|
"peerDependenciesMeta": {
|
|
"express": { "optional": true },
|
|
"mongoose": { "optional": true },
|
|
"jsonwebtoken": { "optional": true },
|
|
"bcrypt": { "optional": true }
|
|
},
|
|
"devDependencies": {
|
|
"@types/express": "^4.17.21",
|
|
"@types/jsonwebtoken": "^9.0.0",
|
|
"@types/bcrypt": "^5.0.0",
|
|
"@types/node": "^20.0.0",
|
|
"bcrypt": "^5.1.1",
|
|
"express": "^4.19.0",
|
|
"jsonwebtoken": "^9.0.2",
|
|
"mongoose": "^8.0.0",
|
|
"tsx": "^4.7.0",
|
|
"typescript": "^5.3.0",
|
|
"vitest": "^1.4.0"
|
|
}
|
|
}
|