@cocreate/socket-server 1.13.12 → 1.13.14
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 +14 -0
- package/package.json +4 -3
- package/src/index.js +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [1.13.14](https://github.com/CoCreate-app/CoCreate-socket-server/compare/v1.13.13...v1.13.14) (2023-06-14)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* Update dependencies versions for [@cocreate](https://github.com/cocreate) libraries ([2259499](https://github.com/CoCreate-app/CoCreate-socket-server/commit/2259499bf333055e578aec68fd3aed68fba8ab1c))
|
|
7
|
+
|
|
8
|
+
## [1.13.13](https://github.com/CoCreate-app/CoCreate-socket-server/compare/v1.13.12...v1.13.13) (2023-06-13)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* config usages ([21dd9ab](https://github.com/CoCreate-app/CoCreate-socket-server/commit/21dd9abb3fc53e484b67c83249916fa33af74762))
|
|
14
|
+
|
|
1
15
|
## [1.13.12](https://github.com/CoCreate-app/CoCreate-socket-server/compare/v1.13.11...v1.13.12) (2023-06-11)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cocreate/socket-server",
|
|
3
|
-
"version": "1.13.
|
|
3
|
+
"version": "1.13.14",
|
|
4
4
|
"description": "CoCreate-socket-server",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cocreate-socket",
|
|
@@ -40,8 +40,9 @@
|
|
|
40
40
|
},
|
|
41
41
|
"homepage": "https://cocreate.app/docs/CoCreate-socket-server",
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@cocreate/cli": "^1.
|
|
44
|
-
"@cocreate/
|
|
43
|
+
"@cocreate/cli": "^1.34.0",
|
|
44
|
+
"@cocreate/config": "^1.0.1",
|
|
45
|
+
"@cocreate/uuid": "^1.4.27",
|
|
45
46
|
"ws": "7.5.9"
|
|
46
47
|
}
|
|
47
48
|
}
|
package/src/index.js
CHANGED
|
@@ -2,14 +2,14 @@ const WebSocket = require('ws');
|
|
|
2
2
|
const url = require("url");
|
|
3
3
|
const EventEmitter = require("events").EventEmitter;
|
|
4
4
|
const uid = require('@cocreate/uuid')
|
|
5
|
-
const
|
|
5
|
+
const config = require('@cocreate/config')
|
|
6
6
|
|
|
7
7
|
class SocketServer extends EventEmitter {
|
|
8
8
|
constructor(server, prefix) {
|
|
9
9
|
super();
|
|
10
10
|
this.clients = new Map();
|
|
11
11
|
this.prefix = prefix || "crud";
|
|
12
|
-
config({
|
|
12
|
+
config({ organization_id: { prompt: 'Enter your organization_id: ' } })
|
|
13
13
|
|
|
14
14
|
this.wss = new WebSocket.Server({ noServer: true });
|
|
15
15
|
this.wss.on('headers', (headers, request) => {
|