@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.
@@ -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 = schema_1.clientMessageSchema.parse(data);
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.143",
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.11",
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
@@ -271,7 +271,7 @@ export declare class ConnectionResponse {
271
271
  /**
272
272
  * @desc Accepts the connection request to the endpoint.
273
273
  */
274
- accept(): void;
274
+ accept(): ConnectionResponse;
275
275
 
276
276
  /**
277
277
  * @desc Rejects the request with the given error message
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
- });