mm_websocket_server 2.0.1 → 2.0.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.
- package/lib/websocket.js +1 -0
- package/package.json +47 -47
package/lib/websocket.js
CHANGED
|
@@ -136,6 +136,7 @@ class WebSocketServer extends Mod {
|
|
|
136
136
|
* @throws {Error} action 不受支持时
|
|
137
137
|
*/
|
|
138
138
|
async main(params, ctx, options) {
|
|
139
|
+
this._assertRunning();
|
|
139
140
|
const action = params.action;
|
|
140
141
|
if (action === 'send') return this._actionSend(params);
|
|
141
142
|
if (action === 'broadcast') return this._actionBroadcast(params);
|
package/package.json
CHANGED
|
@@ -1,49 +1,49 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
2
|
+
"name": "mm_websocket_server",
|
|
3
|
+
"version": "2.0.2",
|
|
4
|
+
"description": "最薄的 WebSocket 服务器入站适配器:消息直达 mm_event 事件管理器,不做路由与插件。",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"超级美眉",
|
|
7
|
+
"入站适配器",
|
|
8
|
+
"mm_mod",
|
|
9
|
+
"mm_adapter",
|
|
10
|
+
"mm_in_adapter",
|
|
11
|
+
"mm_receiver",
|
|
12
|
+
"websocket",
|
|
13
|
+
"ws",
|
|
14
|
+
"server"
|
|
15
|
+
],
|
|
16
|
+
"layer": "adapter",
|
|
17
|
+
"group": "in_adapter",
|
|
18
|
+
"license": "ISC",
|
|
19
|
+
"author": "qww",
|
|
20
|
+
"type": "commonjs",
|
|
21
|
+
"main": "index.js",
|
|
22
|
+
"files": [
|
|
23
|
+
"index.js",
|
|
24
|
+
"lib",
|
|
25
|
+
"example"
|
|
26
|
+
],
|
|
27
|
+
"engines": {
|
|
28
|
+
"node": ">=22.5.0"
|
|
29
|
+
},
|
|
30
|
+
"repository": {
|
|
31
|
+
"type": "git",
|
|
32
|
+
"url": "git+https://gitee.com/qiuwenwu91/mm_websocket_server.git"
|
|
33
|
+
},
|
|
34
|
+
"homepage": "https://gitee.com/qiuwenwu91/mm_websocket_server",
|
|
35
|
+
"bugs": {
|
|
36
|
+
"url": "https://gitee.com/qiuwenwu91/mm_websocket_server/issues"
|
|
37
|
+
},
|
|
38
|
+
"scripts": {
|
|
39
|
+
"start": "node example/demo.js",
|
|
40
|
+
"demo": "node example/demo.js",
|
|
41
|
+
"test": "node --test \"test/*.test.js\""
|
|
42
|
+
},
|
|
43
|
+
"dependencies": {
|
|
44
|
+
"mm_corejs": "^1.1.4",
|
|
45
|
+
"mm_event": "^2.2.2",
|
|
46
|
+
"mm_mod": "^1.0.1",
|
|
47
|
+
"ws": "^8.22.0"
|
|
48
|
+
}
|
|
49
49
|
}
|