@arcblock/ws 1.18.87 → 1.18.89
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/lib/server/index.js +2 -1
- package/package.json +3 -4
package/lib/server/index.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
const EventEmitter = require('events');
|
|
2
2
|
const cluster = require('cluster');
|
|
3
3
|
|
|
4
|
-
const { nanoid } = require('nanoid');
|
|
5
4
|
const get = require('lodash/get');
|
|
6
5
|
const WebSocket = require('ws');
|
|
7
6
|
const eventHub = cluster.isMaster ? require('@arcblock/event-hub/single') : require('@arcblock/event-hub');
|
|
8
7
|
|
|
9
8
|
const createLogger = require('../logger');
|
|
10
9
|
|
|
10
|
+
const nanoid = (length = 16) => [...Array(length)].map(() => Math.random().toString(36)[2]).join('');
|
|
11
|
+
|
|
11
12
|
const sleep = (timeout) =>
|
|
12
13
|
new Promise((resolve) => {
|
|
13
14
|
setTimeout(resolve, timeout);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcblock/ws",
|
|
3
|
-
"version": "1.18.
|
|
3
|
+
"version": "1.18.89",
|
|
4
4
|
"description": "OCAP Chain websocket server and client",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"websocket"
|
|
@@ -34,16 +34,15 @@
|
|
|
34
34
|
"url": "https://github.com/ArcBlock/asset-chain/issues"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@arcblock/event-hub": "1.18.
|
|
37
|
+
"@arcblock/event-hub": "1.18.89",
|
|
38
38
|
"debug": "^4.3.4",
|
|
39
39
|
"eventemitter3": "^4.0.7",
|
|
40
40
|
"lodash": "^4.17.21",
|
|
41
|
-
"nanoid": "~3.3.4",
|
|
42
41
|
"phoenix": "1.7.2",
|
|
43
42
|
"ws": "^8.9.0"
|
|
44
43
|
},
|
|
45
44
|
"devDependencies": {
|
|
46
45
|
"get-port": "^5.1.1"
|
|
47
46
|
},
|
|
48
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "f05d4ba6d34d6ca021013b6d2079dbb3b0ee2438"
|
|
49
48
|
}
|