xxscreeps-mod-client 0.3.0 → 0.3.2

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.
Files changed (2) hide show
  1. package/backend.js +5 -1
  2. package/package.json +2 -2
package/backend.js CHANGED
@@ -61,7 +61,11 @@ const rootRedirect = readBool('SCREEPS_MOD_CLIENT_ROOT_REDIRECT', mountPath !==
61
61
  // Paths that should never be handled by the client mod, even when mounted at '/'.
62
62
  // Can be overridden via SCREEPS_MOD_CLIENT_EXCLUDE (comma-separated prefixes).
63
63
  // Note: /assets/ is reserved by the game server; the client bundle uses /_client/ instead.
64
- const DEFAULT_EXCLUDES = ['/api/', '/socket', '/backend/', '/auth/', '/assets/', '/map/']
64
+ // Do NOT exclude /map/ it's a client-side SPA route (/map/<shard>). xxscreeps has no
65
+ // HTTP route there (map-stats is under /api/, map render assets under /assets/, the map
66
+ // renderer is a websocket), and the await-next()-then-404-fallback below already leaves
67
+ // any real server route untouched.
68
+ const DEFAULT_EXCLUDES = ['/api/', '/socket', '/backend/', '/auth/', '/assets/']
65
69
  const excludePrefixes = process.env.SCREEPS_MOD_CLIENT_EXCLUDE
66
70
  ? process.env.SCREEPS_MOD_CLIENT_EXCLUDE.split(',').map(s => s.trim()).filter(Boolean)
67
71
  : DEFAULT_EXCLUDES
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xxscreeps-mod-client",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "description": "xxscreeps mod that serves the screeps-client and connects it to the same server.",
5
5
  "type": "module",
6
6
  "xxscreeps": true,
@@ -23,7 +23,7 @@
23
23
  "node": ">=20"
24
24
  },
25
25
  "dependencies": {
26
- "screeps-client": "^0.14.0"
26
+ "screeps-client": "^0.14.1"
27
27
  },
28
28
  "peerDependencies": {
29
29
  "xxscreeps": "*"