@karinjs/plugin-basic 1.3.6 → 1.4.1
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/apps/logger.d.ts +2 -1
- package/dist/apps/logger.js +14 -2
- package/dist/apps/login.js +2 -2
- package/dist/apps/restart.js +2 -2
- package/dist/apps/status.js +2 -2
- package/dist/apps/update.js +2 -2
- package/dist/{chunk-G4VTM35X.js → chunk-3BGTJVY4.js} +1 -1
- package/dist/{chunk-67V3ZTCT.js → chunk-T6AZUG3I.js} +1 -1
- package/dist/index.js +2 -2
- package/dist/web.config.js +2 -2
- package/package.json +1 -1
package/dist/apps/logger.d.ts
CHANGED
|
@@ -2,5 +2,6 @@ import * as node_karin from 'node-karin';
|
|
|
2
2
|
|
|
3
3
|
declare const logViewer: node_karin.Command<keyof node_karin.MessageEventMap>;
|
|
4
4
|
declare const errorLogViewer: node_karin.Command<keyof node_karin.MessageEventMap>;
|
|
5
|
+
declare const updateLogger: node_karin.Command<keyof node_karin.MessageEventMap>;
|
|
5
6
|
|
|
6
|
-
export { errorLogViewer, logViewer };
|
|
7
|
+
export { errorLogViewer, logViewer, updateLogger };
|
package/dist/apps/logger.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
render
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-3BGTJVY4.js";
|
|
4
4
|
|
|
5
5
|
// src/apps/logger.ts
|
|
6
6
|
import fs from "fs";
|
|
@@ -280,7 +280,19 @@ var errorLogViewer = karin.command(/^#错误日志\s*(\d+)?$/, async (e) => {
|
|
|
280
280
|
return false;
|
|
281
281
|
}
|
|
282
282
|
}, { name: "\u9519\u8BEF\u65E5\u5FD7\u67E5\u770B\u5668", perm: "admin" });
|
|
283
|
+
var updateLogger = karin.command(/^#日志等级\s*(trace|debug|info|warn|error|fatal)$/i, async (e) => {
|
|
284
|
+
var _a;
|
|
285
|
+
const match = (_a = e.msg.match(/^#日志等级\s*(trace|debug|info|warn|error|fatal)$/i)) == null ? void 0 : _a[1].toLowerCase();
|
|
286
|
+
if (!match) {
|
|
287
|
+
await e.reply("\u65E0\u6548\u7684\u65E5\u5FD7\u7B49\u7EA7");
|
|
288
|
+
return false;
|
|
289
|
+
}
|
|
290
|
+
logger.level = match;
|
|
291
|
+
await e.reply(`\u5DF2\u5C06\u65E5\u5FD7\u7B49\u7EA7\u66F4\u65B0\u4E3A ${match}`);
|
|
292
|
+
return true;
|
|
293
|
+
}, { name: "\u66F4\u65B0\u65E5\u5FD7\u7B49\u7EA7", perm: "admin" });
|
|
283
294
|
export {
|
|
284
295
|
errorLogViewer,
|
|
285
|
-
logViewer
|
|
296
|
+
logViewer,
|
|
297
|
+
updateLogger
|
|
286
298
|
};
|
package/dist/apps/login.js
CHANGED
package/dist/apps/restart.js
CHANGED
package/dist/apps/status.js
CHANGED
|
@@ -7,8 +7,8 @@ import {
|
|
|
7
7
|
} from "../chunk-ODFXVVIE.js";
|
|
8
8
|
import {
|
|
9
9
|
cfg
|
|
10
|
-
} from "../chunk-
|
|
11
|
-
import "../chunk-
|
|
10
|
+
} from "../chunk-T6AZUG3I.js";
|
|
11
|
+
import "../chunk-3BGTJVY4.js";
|
|
12
12
|
|
|
13
13
|
// src/apps/status.ts
|
|
14
14
|
import { karin } from "node-karin";
|
package/dist/apps/update.js
CHANGED
|
@@ -7,7 +7,7 @@ import { karinPathBase } from "node-karin";
|
|
|
7
7
|
// package.json
|
|
8
8
|
var package_default = {
|
|
9
9
|
name: "@karinjs/plugin-basic",
|
|
10
|
-
version: "1.
|
|
10
|
+
version: "1.4.1",
|
|
11
11
|
description: "Karin\u7684\u57FA\u7840\u63D2\u4EF6,\u63D0\u4F9B\u6700\u57FA\u7840\u7684\u529F\u80FD",
|
|
12
12
|
homepage: "https://github.com/KarinJS/karin-plugin-basic",
|
|
13
13
|
bugs: {
|
package/dist/index.js
CHANGED
|
@@ -9,10 +9,10 @@ import {
|
|
|
9
9
|
} from "./chunk-ODFXVVIE.js";
|
|
10
10
|
import {
|
|
11
11
|
cfg
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-T6AZUG3I.js";
|
|
13
13
|
import {
|
|
14
14
|
plugin
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-3BGTJVY4.js";
|
|
16
16
|
|
|
17
17
|
// src/index.ts
|
|
18
18
|
import { logger, restartDirect } from "node-karin";
|
package/dist/web.config.js
CHANGED