@domain.js/main 0.3.6 → 0.3.7

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.
@@ -68,15 +68,15 @@ const makeProfile = (client, type = "user", auth, extra = {}) => {
68
68
  return obj;
69
69
  };
70
70
  function BridgeSocket(io, domain) {
71
- const { method: subscribe } = domain["message.subscribe"];
72
- const { method: unsubscribe } = domain["message.unsubscribe"];
73
- const { method: entrance } = domain["message.entrance"];
71
+ const { method: subscribe } = domain["socket.subscribe"];
72
+ const { method: unsubscribe } = domain["socket.unsubscribe"];
73
+ const { method: entrance } = domain["socket.entrance"];
74
74
  if (!subscribe)
75
- throw Error("要启用 socket 服务,必须要要有 message.subscribe 方法,用来处理 socket 订阅");
75
+ throw Error("要启用 socket 服务,必须要要有 socket.subscribe 方法,用来处理 socket 订阅");
76
76
  if (!unsubscribe)
77
- throw Error("要启用 socket 服务,必须要要有 message.unsubscribe 方法,用来处理 socket 退订");
77
+ throw Error("要启用 socket 服务,必须要要有 socket.unsubscribe 方法,用来处理 socket 退订");
78
78
  if (!entrance)
79
- throw Error("要启用 socket 服务,必须要要有 message.entrance 方法,用来处理 加入某个房间");
79
+ throw Error("要启用 socket 服务,必须要要有 socket.entrance 方法,用来处理 加入某个房间");
80
80
  io.on("connection", (client) => {
81
81
  // 定义toJSON 避免 schema 验证报错
82
82
  Object.assign(client, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@domain.js/main",
3
- "version": "0.3.6",
3
+ "version": "0.3.7",
4
4
  "description": "DDD framework",
5
5
  "main": "dist/index.js",
6
6
  "bin": {