@colyseus/core 0.17.18 → 0.17.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +4 -4
- package/src/router/index.ts +6 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@colyseus/core",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.19",
|
|
4
4
|
"description": "Multiplayer Framework for Node.js.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"input": "./src/index.ts",
|
|
@@ -52,14 +52,14 @@
|
|
|
52
52
|
"debug": "^4.3.4",
|
|
53
53
|
"nanoid": "^3.3.11",
|
|
54
54
|
"@colyseus/shared-types": "^0.17.2",
|
|
55
|
-
"@colyseus/
|
|
56
|
-
"@colyseus/
|
|
55
|
+
"@colyseus/better-call": "^1.2.0",
|
|
56
|
+
"@colyseus/greeting-banner": "^3.0.7"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@colyseus/schema": "^4.0.4",
|
|
60
60
|
"express": "^5.0.0",
|
|
61
|
-
"@colyseus/tools": "^0.17.15",
|
|
62
61
|
"@colyseus/redis-driver": "^0.17.5",
|
|
62
|
+
"@colyseus/tools": "^0.17.15",
|
|
63
63
|
"@colyseus/redis-presence": "^0.17.5"
|
|
64
64
|
},
|
|
65
65
|
"peerDependencies": {
|
package/src/router/index.ts
CHANGED
|
@@ -90,8 +90,13 @@ export function bindRouterToTransport(transport: Transport, router: Router) {
|
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
function expressRootRoute(expressApp: express.Application) {
|
|
93
|
+
//
|
|
93
94
|
// express v5 uses `app.router`, express v4 uses `app._router`
|
|
94
|
-
|
|
95
|
+
// check for `app._router` first, then `app.router`
|
|
96
|
+
//
|
|
97
|
+
// (express v4 will show a warning if `app.router` is used)
|
|
98
|
+
//
|
|
99
|
+
const stack = (expressApp as any)?._router?.stack ?? (expressApp as any)?.router?.stack;
|
|
95
100
|
|
|
96
101
|
if (!stack) {
|
|
97
102
|
throw new Error("Express app is not initialized");
|