@cocreate/socket-server 1.26.0 → 1.27.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/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ # [1.27.0](https://github.com/CoCreate-app/CoCreate-socket-server/compare/v1.26.0...v1.27.0) (2024-01-08)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * applied host to define environment/branch ([fad44e5](https://github.com/CoCreate-app/CoCreate-socket-server/commit/fad44e52babae6dd142c22e88214956e2d3dfd97))
7
+
8
+
9
+ ### Features
10
+
11
+ * bumped CoCreate dependencies to their latest versions ([b043307](https://github.com/CoCreate-app/CoCreate-socket-server/commit/b043307cb515a75a6fafd261ddb6295ceaba0ba9))
12
+
1
13
  # [1.26.0](https://github.com/CoCreate-app/CoCreate-socket-server/compare/v1.25.0...v1.26.0) (2024-01-03)
2
14
 
3
15
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocreate/socket-server",
3
- "version": "1.26.0",
3
+ "version": "1.27.0",
4
4
  "description": "CoCreate-socket-server",
5
5
  "keywords": [
6
6
  "cocreate-socket",
@@ -40,9 +40,9 @@
40
40
  },
41
41
  "homepage": "https://cocreate.app/docs/CoCreate-socket-server",
42
42
  "dependencies": {
43
- "@cocreate/config": "^1.8.0",
44
- "@cocreate/uuid": "^1.9.0",
45
- "@cocreate/utils": "^1.29.0",
43
+ "@cocreate/config": "^1.10.0",
44
+ "@cocreate/uuid": "^1.10.0",
45
+ "@cocreate/utils": "^1.30.0",
46
46
  "ws": "7.5.9"
47
47
  }
48
48
  }
package/src/index.js CHANGED
@@ -152,6 +152,7 @@ class SocketServer extends EventEmitter {
152
152
 
153
153
  this.emit('object.update', {
154
154
  method: 'object.update',
155
+ host: socket.host,
155
156
  array: 'organizations',
156
157
  object: {
157
158
  _id: organization_id, ['$addToSet.activeHost']: socket.socketUrl // needs socketId
@@ -244,6 +245,7 @@ class SocketServer extends EventEmitter {
244
245
  this.organizations.delete(socket.organization_id);
245
246
  this.emit('object.update', {
246
247
  method: 'object.update',
248
+ host: socket.host,
247
249
  array: 'organizations',
248
250
  object: {
249
251
  _id: organization_id, ['$pull.activeHost']: socket.socketUrl
@@ -358,6 +360,7 @@ class SocketServer extends EventEmitter {
358
360
  }
359
361
 
360
362
  data.socket = socket
363
+ data.host = socket.host
361
364
 
362
365
  const authorized = await this.authorize.check(data, socket.user_id)
363
366
  let errors = {}