trucoshi 0.5.10 → 0.5.12
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/README.md +6 -6
- package/dist/server/constants.d.ts +1 -0
- package/dist/server/constants.js +2 -1
- package/dist/types.js +1 -8
- package/package.json +6 -5
package/README.md
CHANGED
|
@@ -16,10 +16,6 @@ Pretende ser un server basado en sockets del juego de Truco Argentino que te per
|
|
|
16
16
|
|
|
17
17
|
Proba la demo actual en [Trucoshi](https://trucoshi.com)
|
|
18
18
|
|
|
19
|
-
# Test
|
|
20
|
-
|
|
21
|
-
Right now there's only a local CLI way of playing as there is no socket server implementation and its just the game logic.
|
|
22
|
-
|
|
23
19
|
# Client
|
|
24
20
|
|
|
25
21
|
[Trucoshi React Client](https://github.com/jfrader/trucoshi-client)
|
|
@@ -32,13 +28,17 @@ Right now there's only a local CLI way of playing as there is no socket server i
|
|
|
32
28
|
|
|
33
29
|
`yarn build`
|
|
34
30
|
|
|
31
|
+
# Test
|
|
32
|
+
|
|
33
|
+
`yarn test`
|
|
34
|
+
|
|
35
35
|
### Play
|
|
36
36
|
|
|
37
|
-
`yarn
|
|
37
|
+
`yarn cli:play`
|
|
38
38
|
|
|
39
39
|
### Autoplay
|
|
40
40
|
|
|
41
|
-
`yarn
|
|
41
|
+
`yarn cli:autoplay`
|
|
42
42
|
|
|
43
43
|
# Todo
|
|
44
44
|
|
package/dist/server/constants.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PLAYER_LOBBY_TIMEOUT = exports.PLAYER_TIMEOUT_GRACE = void 0;
|
|
3
|
+
exports.MATCH_FINISHED_CLEANUP_TIMEOUT = exports.PLAYER_LOBBY_TIMEOUT = exports.PLAYER_TIMEOUT_GRACE = void 0;
|
|
4
4
|
exports.PLAYER_TIMEOUT_GRACE = 500;
|
|
5
5
|
exports.PLAYER_LOBBY_TIMEOUT = 1000 * 10;
|
|
6
|
+
exports.MATCH_FINISHED_CLEANUP_TIMEOUT = 1000 * 60 * 2;
|
package/dist/types.js
CHANGED
|
@@ -99,14 +99,7 @@ class TMap extends Map {
|
|
|
99
99
|
return result;
|
|
100
100
|
}
|
|
101
101
|
findAll(finder) {
|
|
102
|
-
|
|
103
|
-
for (let value of this.values()) {
|
|
104
|
-
const find = finder(value);
|
|
105
|
-
if (find) {
|
|
106
|
-
result.push(value);
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
return result;
|
|
102
|
+
return Array.from(this.values()).filter(finder);
|
|
110
103
|
}
|
|
111
104
|
getOrThrow(key) {
|
|
112
105
|
const result = key && this.get(key);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "trucoshi",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.12",
|
|
4
4
|
"main": "dist/types.js",
|
|
5
5
|
"license": "GPL-3.0",
|
|
6
6
|
"scripts": {
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
"profiler": "yarn build && node --prof ./bin/trucoshi-server",
|
|
9
9
|
"build": "yarn run rimraf ./dist && yarn run tsc --project .",
|
|
10
10
|
"prepublishOnly": "yarn test && yarn build",
|
|
11
|
-
"test": "
|
|
12
|
-
"
|
|
13
|
-
"
|
|
11
|
+
"test": "NODE_DEBUG_LEVEL=error ts-mocha --exit ./test/**/*.ts",
|
|
12
|
+
"cli:autoplay": "yarn run ts-node src/cli/autoplay",
|
|
13
|
+
"cli:play": "yarn run ts-node src/cli/play"
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
16
|
"@types/chai": "^4.3.4",
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@types/pino": "^7.0.5",
|
|
36
|
+
"dotenv": "^16.0.3",
|
|
36
37
|
"pino": "^8.11.0",
|
|
37
38
|
"pino-pretty": "^10.0.0",
|
|
38
39
|
"rimraf": "^4.1.1",
|
|
@@ -41,4 +42,4 @@
|
|
|
41
42
|
"tsc": "^2.0.4",
|
|
42
43
|
"typescript": "^4.9.4"
|
|
43
44
|
}
|
|
44
|
-
}
|
|
45
|
+
}
|