r-agency-mesh 1.167.0 → 1.169.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "r-agency-mesh",
3
- "version": "1.167.0",
3
+ "version": "1.169.0",
4
4
  "scripts": {
5
5
  "build-dev": "npm run compile && npm run gen",
6
6
  "build-prod": "npm run compile && npm run gen-prod",
@@ -3530,6 +3530,12 @@ interface IMeshCoreCANBusEvents {
3530
3530
  socket: WebSocket;
3531
3531
  request: http.IncomingMessage;
3532
3532
  };
3533
+ client_added: {
3534
+ token: IWsClientToken;
3535
+ client: IWsClient;
3536
+ socket: WebSocket;
3537
+ request: http.IncomingMessage;
3538
+ };
3533
3539
  client_disconnected: {
3534
3540
  client: IWsClient;
3535
3541
  };
package/release/index.js CHANGED
@@ -24823,6 +24823,13 @@ var init_websocket_server = __esm({
24823
24823
  }
24824
24824
  this.initializeClient(client, socket);
24825
24825
  this.container.service("ws-client-manager").add(client);
24826
+ this.printer.success(`client: ${client.deviceId()} connected`);
24827
+ await this.canBus.channel("websocket").event("client_added", {
24828
+ token,
24829
+ client,
24830
+ socket,
24831
+ request
24832
+ }).dispatch();
24826
24833
  } catch (e) {
24827
24834
  const error = e;
24828
24835
  this.printer.error(`ws client connection error: ${error.message}`);
@@ -26690,7 +26697,6 @@ var init_ws_client_manager = __esm({
26690
26697
  });
26691
26698
  this.clients.set(client.deviceId(), client);
26692
26699
  client.emit("mesh::websocket:connected");
26693
- this.printer.success(`client: ${client.deviceId()} connected`);
26694
26700
  }
26695
26701
  /**
26696
26702
  * Checks if a given `deviceId` exists in the clients map.