@eleven-am/pondsocket 0.1.143 → 0.1.145
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/endpoint/endpoint.js +1 -2
- package/package.json +3 -4
- package/types.d.ts +1 -1
- package/schema.js +0 -12
package/endpoint/endpoint.js
CHANGED
|
@@ -21,7 +21,6 @@ const joinRequest_1 = require("../lobby/joinRequest");
|
|
|
21
21
|
const joinResponse_1 = require("../lobby/joinResponse");
|
|
22
22
|
const lobby_1 = require("../lobby/lobby");
|
|
23
23
|
const matcher_1 = require("../matcher/matcher");
|
|
24
|
-
const schema_1 = require("../schema");
|
|
25
24
|
class EndpointEngine {
|
|
26
25
|
constructor(parent) {
|
|
27
26
|
_EndpointEngine_instances.add(this);
|
|
@@ -225,7 +224,7 @@ _EndpointEngine_middleware = new WeakMap(), _EndpointEngine_channels = new WeakM
|
|
|
225
224
|
}, _EndpointEngine_readMessage = function _EndpointEngine_readMessage(cache, message) {
|
|
226
225
|
try {
|
|
227
226
|
const data = JSON.parse(message);
|
|
228
|
-
const result =
|
|
227
|
+
const result = pondsocket_common_1.clientMessageSchema.parse(data);
|
|
229
228
|
__classPrivateFieldGet(this, _EndpointEngine_instances, "m", _EndpointEngine_handleMessage).call(this, cache, result);
|
|
230
229
|
}
|
|
231
230
|
catch (e) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eleven-am/pondsocket",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.145",
|
|
4
4
|
"description": "PondSocket is a fast simple socket server",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"socket",
|
|
@@ -34,9 +34,8 @@
|
|
|
34
34
|
"url": "git+https://github.com/Eleven-am/pondSocket.git"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@eleven-am/pondsocket-common": "^0.0.
|
|
38
|
-
"ws": "^8.16.0"
|
|
39
|
-
"zod": "^3.22.4"
|
|
37
|
+
"@eleven-am/pondsocket-common": "^0.0.15",
|
|
38
|
+
"ws": "^8.16.0"
|
|
40
39
|
},
|
|
41
40
|
"devDependencies": {
|
|
42
41
|
"@types/jest": "^29.5.12",
|
package/types.d.ts
CHANGED
package/schema.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.clientMessageSchema = void 0;
|
|
4
|
-
const pondsocket_common_1 = require("@eleven-am/pondsocket-common");
|
|
5
|
-
const zod_1 = require("zod");
|
|
6
|
-
exports.clientMessageSchema = zod_1.z.object({
|
|
7
|
-
event: zod_1.z.string(),
|
|
8
|
-
requestId: zod_1.z.string(),
|
|
9
|
-
channelName: zod_1.z.string(),
|
|
10
|
-
payload: zod_1.z.record(zod_1.z.any()),
|
|
11
|
-
action: zod_1.z.nativeEnum(pondsocket_common_1.ClientActions),
|
|
12
|
-
});
|