mioki 0.8.2 → 0.9.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/dist/cli.cjs +1 -1
- package/dist/cli.mjs +1 -1
- package/dist/index.cjs +9 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +9 -9
- package/dist/index.mjs.map +1 -1
- package/dist/{package-CRcx0VP6.cjs → package-BMRAnl4f.cjs} +2 -2
- package/dist/package-BMRAnl4f.cjs.map +1 -0
- package/dist/package-CDtL5_dK.mjs +6 -0
- package/dist/package-CDtL5_dK.mjs.map +1 -0
- package/package.json +2 -2
- package/dist/package-CRcx0VP6.cjs.map +0 -1
- package/dist/package-DpnA9qw3.mjs +0 -6
- package/dist/package-DpnA9qw3.mjs.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __export } from "./chunk-DYZpOiH0.mjs";
|
|
2
|
-
import { t as version } from "./package-
|
|
2
|
+
import { t as version } from "./package-CDtL5_dK.mjs";
|
|
3
3
|
import fs, { default as fs$1 } from "node:fs";
|
|
4
4
|
import util from "node:util";
|
|
5
5
|
import path, { default as path$1 } from "node:path";
|
|
@@ -1188,8 +1188,12 @@ const services = USER_SERVICE;
|
|
|
1188
1188
|
* 建议需要调用 `addService` 的插件设置 `priority` 为 `10`
|
|
1189
1189
|
*/
|
|
1190
1190
|
function addService(name, service, cover = true) {
|
|
1191
|
+
logger.debug(`添加 mioki 服务: ${name} (覆盖: ${cover ? "是" : "否"})`);
|
|
1191
1192
|
if (cover || !USER_SERVICE[name]) USER_SERVICE[name] = service;
|
|
1192
|
-
return () =>
|
|
1193
|
+
return () => {
|
|
1194
|
+
logger.debug(`移除 mioki 服务: ${name}`);
|
|
1195
|
+
USER_SERVICE[name] = void 0;
|
|
1196
|
+
};
|
|
1193
1197
|
}
|
|
1194
1198
|
|
|
1195
1199
|
//#endregion
|
|
@@ -1244,13 +1248,9 @@ async function enablePlugin(bot, plugin, type = "external") {
|
|
|
1244
1248
|
services,
|
|
1245
1249
|
clears: userClears,
|
|
1246
1250
|
addService: (name$1, service, cover) => {
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
addService(name$1, service, cover);
|
|
1251
|
-
};
|
|
1252
|
-
clears.add(removeService);
|
|
1253
|
-
return removeService;
|
|
1251
|
+
const remove = addService(name$1, service, cover);
|
|
1252
|
+
clears.add(remove);
|
|
1253
|
+
return remove;
|
|
1254
1254
|
},
|
|
1255
1255
|
handle: (eventName, handler) => {
|
|
1256
1256
|
logger$1.debug(`Registering event handler for event: ${String(eventName)}`);
|