mm_cmd 1.1.1 → 1.1.3
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/manager.js
CHANGED
|
@@ -129,14 +129,14 @@ CmdManager.prototype._getCache = function () {
|
|
|
129
129
|
* @returns {void}
|
|
130
130
|
* @private
|
|
131
131
|
*/
|
|
132
|
-
CmdManager.prototype._fullList = function () {
|
|
132
|
+
CmdManager.prototype._fullList = async function () {
|
|
133
133
|
this.list_before = [];
|
|
134
134
|
this.list_main = [];
|
|
135
135
|
this.list_after = [];
|
|
136
136
|
var infos = this.configs;
|
|
137
137
|
for (var i = 0; i < infos.length; i++) {
|
|
138
138
|
var info = infos[i];
|
|
139
|
-
if (info.state
|
|
139
|
+
if (!info.state) {
|
|
140
140
|
continue;
|
|
141
141
|
}
|
|
142
142
|
var mod = this.get(info.name);
|
|
@@ -162,7 +162,7 @@ CmdManager.prototype._fullList = function () {
|
|
|
162
162
|
* @param {string} dir_path 目录路径
|
|
163
163
|
*/
|
|
164
164
|
CmdManager.prototype.updateAfter = async function (dir_path) {
|
|
165
|
-
this._fullList();
|
|
165
|
+
await this._fullList();
|
|
166
166
|
};
|
|
167
167
|
|
|
168
168
|
/**
|
|
@@ -209,7 +209,8 @@ CmdManager.prototype.runSub = async function (msg, db, tense) {
|
|
|
209
209
|
var ret;
|
|
210
210
|
for (var i = 0; i < list.length; i++) {
|
|
211
211
|
var info = list[i];
|
|
212
|
-
|
|
212
|
+
let is_running = await this.isRunning(info.name);
|
|
213
|
+
if (!is_running) {
|
|
213
214
|
continue;
|
|
214
215
|
}
|
|
215
216
|
var mod = this.get(info.name);
|
package/package.json
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
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
|
-
|
|
2
|
+
"name": "mm_cmd",
|
|
3
|
+
"version": "1.1.3",
|
|
4
|
+
"description": "指令框架,用于以聊天的方式操作程序,前端发送字符串,后端判断是否为指令并执行(基于 mm_corejs,内置管理器池,无全局/原型扩展依赖)",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://gitee.com/qiuwenwu91/mm_cmd.git"
|
|
9
|
+
},
|
|
10
|
+
"keywords": [
|
|
11
|
+
"mm_mod",
|
|
12
|
+
"mm_adapter",
|
|
13
|
+
"mm_in_adapter",
|
|
14
|
+
"cmd",
|
|
15
|
+
"command",
|
|
16
|
+
"chat",
|
|
17
|
+
"指令管理器"
|
|
18
|
+
],
|
|
19
|
+
"layer": "infra",
|
|
20
|
+
"group": "in_adapter",
|
|
21
|
+
"author": "邱文武",
|
|
22
|
+
"license": "ISC",
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"mm_corejs": "^1.1.4",
|
|
25
|
+
"mm_mod": "^1.0.1",
|
|
26
|
+
"mm_matchs": "^1.1.10"
|
|
27
|
+
},
|
|
28
|
+
"scripts": {
|
|
29
|
+
"test": "node test.js"
|
|
30
|
+
}
|
|
31
31
|
}
|
|
File without changes
|
|
File without changes
|