@domain.js/main 0.5.0 → 0.5.2

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.
@@ -13,6 +13,7 @@ export declare type Client = Socket<DefaultEventsMap, DefaultEventsMap, DefaultE
13
13
  operator?: any;
14
14
  /** 退出房间回调函数 */
15
15
  quit?: Function;
16
+ entranceOpts?: any[];
16
17
  };
17
18
  declare const makeProfile: (client: Client, type: string | undefined, auth: string | Signature, extra?: Profile["extra"]) => Profile;
18
19
  export declare function BridgeSocket(io: Server, domain: Domain): void;
@@ -109,10 +109,12 @@ function BridgeSocket(io, domain) {
109
109
  console.error(e);
110
110
  }
111
111
  });
112
- client.on("entrance", async (roomId) => {
112
+ client.on("entrance", async (roomId, ...opts) => {
113
113
  try {
114
114
  if (!client.profile || !client.inited)
115
115
  return;
116
+ if (opts.length)
117
+ Object.assign(client, { entranceOpts: opts });
116
118
  const ret = await entrance({ ...client.profile, roomId }, client);
117
119
  client.profile.roomId = roomId;
118
120
  client.roomId = roomId;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@domain.js/main",
3
- "version": "0.5.0",
3
+ "version": "0.5.2",
4
4
  "description": "DDD framework",
5
5
  "main": "dist/index.js",
6
6
  "bin": {