* feat(server): 添加可插拔认证系统 | add pluggable authentication system - 新增 JWT 认证提供者 (createJwtAuthProvider) - 新增 Session 认证提供者 (createSessionAuthProvider) - 新增服务器认证 mixin (withAuth) - 新增房间认证 mixin (withRoomAuth) - 新增认证装饰器 (@requireAuth, @requireRole) - 新增测试工具 (MockAuthProvider) - 新增中英文文档 - 导出路径: @esengine/server/auth, @esengine/server/auth/testing * fix(server): 使用加密安全的随机数生成 session ID | use crypto-secure random for session ID
74 lines
1.6 KiB
JSON
74 lines
1.6 KiB
JSON
{
|
|
"name": "@esengine/server",
|
|
"version": "1.1.4",
|
|
"description": "Game server framework for ESEngine with file-based routing",
|
|
"type": "module",
|
|
"main": "./dist/index.js",
|
|
"module": "./dist/index.js",
|
|
"types": "./dist/index.d.ts",
|
|
"exports": {
|
|
".": {
|
|
"import": "./dist/index.js",
|
|
"types": "./dist/index.d.ts"
|
|
},
|
|
"./auth": {
|
|
"import": "./dist/auth/index.js",
|
|
"types": "./dist/auth/index.d.ts"
|
|
},
|
|
"./auth/testing": {
|
|
"import": "./dist/auth/testing/index.js",
|
|
"types": "./dist/auth/testing/index.d.ts"
|
|
},
|
|
"./testing": {
|
|
"import": "./dist/testing/index.js",
|
|
"types": "./dist/testing/index.d.ts"
|
|
}
|
|
},
|
|
"files": [
|
|
"dist",
|
|
"module.json"
|
|
],
|
|
"scripts": {
|
|
"build": "tsup",
|
|
"build:watch": "tsup --watch",
|
|
"dev": "tsup --watch",
|
|
"type-check": "tsc --noEmit",
|
|
"clean": "rimraf dist",
|
|
"test": "vitest run",
|
|
"test:watch": "vitest"
|
|
},
|
|
"dependencies": {
|
|
"@esengine/rpc": "workspace:*"
|
|
},
|
|
"peerDependencies": {
|
|
"ws": ">=8.0.0",
|
|
"jsonwebtoken": ">=9.0.0"
|
|
},
|
|
"peerDependenciesMeta": {
|
|
"jsonwebtoken": {
|
|
"optional": true
|
|
}
|
|
},
|
|
"devDependencies": {
|
|
"@types/jsonwebtoken": "^9.0.0",
|
|
"@types/node": "^20.0.0",
|
|
"@types/ws": "^8.5.13",
|
|
"jsonwebtoken": "^9.0.0",
|
|
"rimraf": "^5.0.0",
|
|
"tsup": "^8.0.0",
|
|
"typescript": "^5.7.0",
|
|
"vitest": "^2.0.0",
|
|
"ws": "^8.18.0"
|
|
},
|
|
"publishConfig": {
|
|
"access": "public"
|
|
},
|
|
"keywords": [
|
|
"esengine",
|
|
"game-server",
|
|
"rpc",
|
|
"websocket",
|
|
"ecs"
|
|
]
|
|
}
|