tachyon-protocol 1.5.4 → 1.6.4

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 (56) hide show
  1. package/dist/index.d.mts +214 -31
  2. package/dist/index.d.ts +214 -31
  3. package/dist/index.js +5 -7
  4. package/dist/index.mjs +2 -2
  5. package/dist/validators.d.mts +50 -47
  6. package/dist/validators.d.ts +50 -47
  7. package/dist/validators.js +1 -1
  8. package/dist/validators.mjs +19 -6
  9. package/package.json +12 -4
  10. package/dist/autohost/slave/request.json +0 -34
  11. package/dist/autohost/slave/response.json +0 -107
  12. package/dist/autohost/unslave/request.json +0 -20
  13. package/dist/autohost/unslave/response.json +0 -107
  14. package/dist/game/launch/response.json +0 -117
  15. package/dist/lobby/close/request.json +0 -18
  16. package/dist/lobby/close/response.json +0 -105
  17. package/dist/lobby/create/request.json +0 -55
  18. package/dist/lobby/create/response.json +0 -157
  19. package/dist/lobby/join/request.json +0 -39
  20. package/dist/lobby/join/response.json +0 -287
  21. package/dist/lobby/joined/response.json +0 -548
  22. package/dist/lobby/leave/request.json +0 -18
  23. package/dist/lobby/leave/response.json +0 -131
  24. package/dist/lobby/left/response.json +0 -105
  25. package/dist/lobby/list/request.json +0 -18
  26. package/dist/lobby/list/response.json +0 -698
  27. package/dist/lobby/receiveMessage/response.json +0 -127
  28. package/dist/lobby/sendMessage/request.json +0 -36
  29. package/dist/lobby/sendMessage/response.json +0 -157
  30. package/dist/lobby/subscribe/request.json +0 -33
  31. package/dist/lobby/subscribe/response.json +0 -105
  32. package/dist/lobby/unsubscribe/request.json +0 -30
  33. package/dist/lobby/unsubscribe/response.json +0 -131
  34. package/dist/lobby/updated/response.json +0 -603
  35. package/dist/matchmaking/cancel/request.json +0 -18
  36. package/dist/matchmaking/cancel/response.json +0 -131
  37. package/dist/matchmaking/found/response.json +0 -117
  38. package/dist/matchmaking/list/request.json +0 -18
  39. package/dist/matchmaking/list/response.json +0 -158
  40. package/dist/matchmaking/lost/response.json +0 -105
  41. package/dist/matchmaking/queue/request.json +0 -34
  42. package/dist/matchmaking/queue/response.json +0 -157
  43. package/dist/matchmaking/queueUpdate/response.json +0 -117
  44. package/dist/matchmaking/ready/request.json +0 -18
  45. package/dist/matchmaking/ready/response.json +0 -131
  46. package/dist/matchmaking/readyUpdate/response.json +0 -121
  47. package/dist/system/connected/response.json +0 -335
  48. package/dist/system/disconnect/request.json +0 -29
  49. package/dist/system/disconnect/response.json +0 -105
  50. package/dist/system/serverStats/request.json +0 -18
  51. package/dist/system/serverStats/response.json +0 -117
  52. package/dist/user/subscribe/request.json +0 -33
  53. package/dist/user/subscribe/response.json +0 -318
  54. package/dist/user/unsubscribe/request.json +0 -33
  55. package/dist/user/unsubscribe/response.json +0 -131
  56. package/dist/user/updated/response.json +0 -331
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tachyon-protocol",
3
- "version": "1.5.4",
3
+ "version": "1.6.4",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "dev": "nodemon --watch src/** --ext ts --ignore src/meta.ts --exec npm run build",
@@ -10,12 +10,16 @@
10
10
  "format": "prettier --write src/**/*.ts",
11
11
  "test": "jest",
12
12
  "prepublishOnly": "patch-package && npm run build && npm run test",
13
- "postpublish": "git commit -a -m \"updated tachyonVersion const literal\" && git push"
13
+ "postversion": "npm run build"
14
14
  },
15
15
  "main": "dist/index.js",
16
16
  "types": "dist/index.d.ts",
17
17
  "exports": {
18
18
  ".": {
19
+ "default": {
20
+ "default": "./dist/index.mjs",
21
+ "types": "./dist/index.d.mts"
22
+ },
19
23
  "import": {
20
24
  "default": "./dist/index.mjs",
21
25
  "types": "./dist/index.d.mts"
@@ -26,6 +30,10 @@
26
30
  }
27
31
  },
28
32
  "./validators": {
33
+ "default": {
34
+ "default": "./dist/validators.mjs",
35
+ "types": "./dist/validators.d.mts"
36
+ },
29
37
  "import": {
30
38
  "default": "./dist/validators.mjs",
31
39
  "types": "./dist/validators.d.mts"
@@ -58,11 +66,11 @@
58
66
  "@sinclair/typebox": "^0.32.9",
59
67
  "@swc/core": "^1.3.65",
60
68
  "@swc/helpers": "^0.5.1",
69
+ "@swc/jest": "^0.2.36",
61
70
  "@swc/wasm": "^1.3.65",
62
71
  "@types/jest": "^29.5.0",
63
72
  "@typescript-eslint/eslint-plugin": "^6.18.1",
64
73
  "@typescript-eslint/parser": "^6.0.0",
65
- "ajv-formats": "^3.0.1",
66
74
  "eslint": "^8.43.0",
67
75
  "eslint-plugin-simple-import-sort": "^10.0.0",
68
76
  "eslint-plugin-unused-imports": "^3.0.0",
@@ -75,7 +83,7 @@
75
83
  "ts-node": "^10.9.1",
76
84
  "tsconfig-paths": "^4.2.0",
77
85
  "tsup": "^7.2.0",
78
- "typescript": "^5.1.6"
86
+ "typescript": "^5.4.5"
79
87
  },
80
88
  "overrides": {
81
89
  "@sinclair/typebox": "$@sinclair/typebox",
@@ -1,34 +0,0 @@
1
- {
2
- "$id": "autohost/slave/request",
3
- "roles": [
4
- "autohost"
5
- ],
6
- "type": "object",
7
- "properties": {
8
- "messageId": {
9
- "type": "string"
10
- },
11
- "commandId": {
12
- "const": "autohost/slave/request",
13
- "type": "string"
14
- },
15
- "data": {
16
- "type": "object",
17
- "properties": {
18
- "maxBattles": {
19
- "minimum": 1,
20
- "default": 4,
21
- "type": "integer"
22
- }
23
- },
24
- "required": [
25
- "maxBattles"
26
- ]
27
- }
28
- },
29
- "required": [
30
- "messageId",
31
- "commandId",
32
- "data"
33
- ]
34
- }
@@ -1,107 +0,0 @@
1
- {
2
- "$id": "autohost/slave/response",
3
- "roles": [
4
- "autohost"
5
- ],
6
- "anyOf": [
7
- {
8
- "type": "object",
9
- "properties": {
10
- "messageId": {
11
- "type": "string"
12
- },
13
- "commandId": {
14
- "const": "autohost/slave/response",
15
- "type": "string"
16
- },
17
- "status": {
18
- "const": "success",
19
- "type": "string"
20
- }
21
- },
22
- "required": [
23
- "messageId",
24
- "commandId",
25
- "status"
26
- ]
27
- },
28
- {
29
- "type": "object",
30
- "properties": {
31
- "messageId": {
32
- "type": "string"
33
- },
34
- "commandId": {
35
- "const": "autohost/slave/response",
36
- "type": "string"
37
- },
38
- "status": {
39
- "const": "failed",
40
- "type": "string"
41
- },
42
- "reason": {
43
- "const": "internal_error",
44
- "type": "string"
45
- }
46
- },
47
- "required": [
48
- "messageId",
49
- "commandId",
50
- "status",
51
- "reason"
52
- ]
53
- },
54
- {
55
- "type": "object",
56
- "properties": {
57
- "messageId": {
58
- "type": "string"
59
- },
60
- "commandId": {
61
- "const": "autohost/slave/response",
62
- "type": "string"
63
- },
64
- "status": {
65
- "const": "failed",
66
- "type": "string"
67
- },
68
- "reason": {
69
- "const": "unauthorized",
70
- "type": "string"
71
- }
72
- },
73
- "required": [
74
- "messageId",
75
- "commandId",
76
- "status",
77
- "reason"
78
- ]
79
- },
80
- {
81
- "type": "object",
82
- "properties": {
83
- "messageId": {
84
- "type": "string"
85
- },
86
- "commandId": {
87
- "const": "autohost/slave/response",
88
- "type": "string"
89
- },
90
- "status": {
91
- "const": "failed",
92
- "type": "string"
93
- },
94
- "reason": {
95
- "const": "invalid_command",
96
- "type": "string"
97
- }
98
- },
99
- "required": [
100
- "messageId",
101
- "commandId",
102
- "status",
103
- "reason"
104
- ]
105
- }
106
- ]
107
- }
@@ -1,20 +0,0 @@
1
- {
2
- "$id": "autohost/unslave/request",
3
- "roles": [
4
- "autohost"
5
- ],
6
- "type": "object",
7
- "properties": {
8
- "messageId": {
9
- "type": "string"
10
- },
11
- "commandId": {
12
- "const": "autohost/unslave/request",
13
- "type": "string"
14
- }
15
- },
16
- "required": [
17
- "messageId",
18
- "commandId"
19
- ]
20
- }
@@ -1,107 +0,0 @@
1
- {
2
- "$id": "autohost/unslave/response",
3
- "roles": [
4
- "autohost"
5
- ],
6
- "anyOf": [
7
- {
8
- "type": "object",
9
- "properties": {
10
- "messageId": {
11
- "type": "string"
12
- },
13
- "commandId": {
14
- "const": "autohost/unslave/response",
15
- "type": "string"
16
- },
17
- "status": {
18
- "const": "success",
19
- "type": "string"
20
- }
21
- },
22
- "required": [
23
- "messageId",
24
- "commandId",
25
- "status"
26
- ]
27
- },
28
- {
29
- "type": "object",
30
- "properties": {
31
- "messageId": {
32
- "type": "string"
33
- },
34
- "commandId": {
35
- "const": "autohost/unslave/response",
36
- "type": "string"
37
- },
38
- "status": {
39
- "const": "failed",
40
- "type": "string"
41
- },
42
- "reason": {
43
- "const": "internal_error",
44
- "type": "string"
45
- }
46
- },
47
- "required": [
48
- "messageId",
49
- "commandId",
50
- "status",
51
- "reason"
52
- ]
53
- },
54
- {
55
- "type": "object",
56
- "properties": {
57
- "messageId": {
58
- "type": "string"
59
- },
60
- "commandId": {
61
- "const": "autohost/unslave/response",
62
- "type": "string"
63
- },
64
- "status": {
65
- "const": "failed",
66
- "type": "string"
67
- },
68
- "reason": {
69
- "const": "unauthorized",
70
- "type": "string"
71
- }
72
- },
73
- "required": [
74
- "messageId",
75
- "commandId",
76
- "status",
77
- "reason"
78
- ]
79
- },
80
- {
81
- "type": "object",
82
- "properties": {
83
- "messageId": {
84
- "type": "string"
85
- },
86
- "commandId": {
87
- "const": "autohost/unslave/response",
88
- "type": "string"
89
- },
90
- "status": {
91
- "const": "failed",
92
- "type": "string"
93
- },
94
- "reason": {
95
- "const": "invalid_command",
96
- "type": "string"
97
- }
98
- },
99
- "required": [
100
- "messageId",
101
- "commandId",
102
- "status",
103
- "reason"
104
- ]
105
- }
106
- ]
107
- }
@@ -1,117 +0,0 @@
1
- {
2
- "$id": "game/launch/response",
3
- "roles": [],
4
- "anyOf": [
5
- {
6
- "type": "object",
7
- "properties": {
8
- "messageId": {
9
- "type": "string"
10
- },
11
- "commandId": {
12
- "const": "game/launch/response",
13
- "type": "string"
14
- },
15
- "status": {
16
- "const": "success",
17
- "type": "string"
18
- },
19
- "data": {
20
- "type": "object",
21
- "properties": {
22
- "script": {
23
- "type": "string"
24
- }
25
- },
26
- "required": [
27
- "script"
28
- ]
29
- }
30
- },
31
- "required": [
32
- "messageId",
33
- "commandId",
34
- "status",
35
- "data"
36
- ]
37
- },
38
- {
39
- "type": "object",
40
- "properties": {
41
- "messageId": {
42
- "type": "string"
43
- },
44
- "commandId": {
45
- "const": "game/launch/response",
46
- "type": "string"
47
- },
48
- "status": {
49
- "const": "failed",
50
- "type": "string"
51
- },
52
- "reason": {
53
- "const": "internal_error",
54
- "type": "string"
55
- }
56
- },
57
- "required": [
58
- "messageId",
59
- "commandId",
60
- "status",
61
- "reason"
62
- ]
63
- },
64
- {
65
- "type": "object",
66
- "properties": {
67
- "messageId": {
68
- "type": "string"
69
- },
70
- "commandId": {
71
- "const": "game/launch/response",
72
- "type": "string"
73
- },
74
- "status": {
75
- "const": "failed",
76
- "type": "string"
77
- },
78
- "reason": {
79
- "const": "unauthorized",
80
- "type": "string"
81
- }
82
- },
83
- "required": [
84
- "messageId",
85
- "commandId",
86
- "status",
87
- "reason"
88
- ]
89
- },
90
- {
91
- "type": "object",
92
- "properties": {
93
- "messageId": {
94
- "type": "string"
95
- },
96
- "commandId": {
97
- "const": "game/launch/response",
98
- "type": "string"
99
- },
100
- "status": {
101
- "const": "failed",
102
- "type": "string"
103
- },
104
- "reason": {
105
- "const": "invalid_command",
106
- "type": "string"
107
- }
108
- },
109
- "required": [
110
- "messageId",
111
- "commandId",
112
- "status",
113
- "reason"
114
- ]
115
- }
116
- ]
117
- }
@@ -1,18 +0,0 @@
1
- {
2
- "$id": "lobby/close/request",
3
- "roles": [],
4
- "type": "object",
5
- "properties": {
6
- "messageId": {
7
- "type": "string"
8
- },
9
- "commandId": {
10
- "const": "lobby/close/request",
11
- "type": "string"
12
- }
13
- },
14
- "required": [
15
- "messageId",
16
- "commandId"
17
- ]
18
- }
@@ -1,105 +0,0 @@
1
- {
2
- "$id": "lobby/close/response",
3
- "roles": [],
4
- "anyOf": [
5
- {
6
- "type": "object",
7
- "properties": {
8
- "messageId": {
9
- "type": "string"
10
- },
11
- "commandId": {
12
- "const": "lobby/close/response",
13
- "type": "string"
14
- },
15
- "status": {
16
- "const": "success",
17
- "type": "string"
18
- }
19
- },
20
- "required": [
21
- "messageId",
22
- "commandId",
23
- "status"
24
- ]
25
- },
26
- {
27
- "type": "object",
28
- "properties": {
29
- "messageId": {
30
- "type": "string"
31
- },
32
- "commandId": {
33
- "const": "lobby/close/response",
34
- "type": "string"
35
- },
36
- "status": {
37
- "const": "failed",
38
- "type": "string"
39
- },
40
- "reason": {
41
- "const": "internal_error",
42
- "type": "string"
43
- }
44
- },
45
- "required": [
46
- "messageId",
47
- "commandId",
48
- "status",
49
- "reason"
50
- ]
51
- },
52
- {
53
- "type": "object",
54
- "properties": {
55
- "messageId": {
56
- "type": "string"
57
- },
58
- "commandId": {
59
- "const": "lobby/close/response",
60
- "type": "string"
61
- },
62
- "status": {
63
- "const": "failed",
64
- "type": "string"
65
- },
66
- "reason": {
67
- "const": "unauthorized",
68
- "type": "string"
69
- }
70
- },
71
- "required": [
72
- "messageId",
73
- "commandId",
74
- "status",
75
- "reason"
76
- ]
77
- },
78
- {
79
- "type": "object",
80
- "properties": {
81
- "messageId": {
82
- "type": "string"
83
- },
84
- "commandId": {
85
- "const": "lobby/close/response",
86
- "type": "string"
87
- },
88
- "status": {
89
- "const": "failed",
90
- "type": "string"
91
- },
92
- "reason": {
93
- "const": "invalid_command",
94
- "type": "string"
95
- }
96
- },
97
- "required": [
98
- "messageId",
99
- "commandId",
100
- "status",
101
- "reason"
102
- ]
103
- }
104
- ]
105
- }
@@ -1,55 +0,0 @@
1
- {
2
- "$id": "lobby/create/request",
3
- "roles": [],
4
- "type": "object",
5
- "properties": {
6
- "messageId": {
7
- "type": "string"
8
- },
9
- "commandId": {
10
- "const": "lobby/create/request",
11
- "type": "string"
12
- },
13
- "data": {
14
- "examples": [
15
- {
16
- "title": "8v8 | All Welcome",
17
- "private": false,
18
- "region": "EU",
19
- "maxPlayers": 16
20
- }
21
- ],
22
- "type": "object",
23
- "properties": {
24
- "title": {
25
- "minLength": 2,
26
- "maxLength": 30,
27
- "type": "string"
28
- },
29
- "private": {
30
- "default": true,
31
- "type": "boolean"
32
- },
33
- "region": {
34
- "type": "string"
35
- },
36
- "maxPlayers": {
37
- "minimum": 0,
38
- "default": 16,
39
- "type": "integer"
40
- }
41
- },
42
- "required": [
43
- "title",
44
- "private",
45
- "region",
46
- "maxPlayers"
47
- ]
48
- }
49
- },
50
- "required": [
51
- "messageId",
52
- "commandId",
53
- "data"
54
- ]
55
- }