@karinjs/plugin-basic 1.4.1 → 1.4.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/dist/apps/logger.js +1 -1
- 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 +8 -4
- package/dist/{chunk-T6AZUG3I.js → chunk-B4IPB45Y.js} +1 -1
- package/dist/{chunk-3BGTJVY4.js → chunk-Y5SPBTPA.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.js
CHANGED
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-B4IPB45Y.js";
|
|
11
|
+
import "../chunk-Y5SPBTPA.js";
|
|
12
12
|
|
|
13
13
|
// src/apps/status.ts
|
|
14
14
|
import { karin } from "node-karin";
|
package/dist/apps/update.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
cfg,
|
|
3
3
|
sendToFirstAdmin
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-B4IPB45Y.js";
|
|
5
5
|
import {
|
|
6
6
|
render
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-Y5SPBTPA.js";
|
|
8
8
|
|
|
9
9
|
// src/apps/update.ts
|
|
10
10
|
import fs from "fs";
|
|
@@ -102,6 +102,7 @@ var plugins = karin.command(/^#插件列表$/, async (e) => {
|
|
|
102
102
|
}
|
|
103
103
|
}, { name: "\u63D2\u4EF6\u5217\u8868", perm: "admin" });
|
|
104
104
|
var updatePlugin = karin.command(/^#(全部)?(强制)?更新(.*)?$/, async (e) => {
|
|
105
|
+
if (!e.isMaster) return false;
|
|
105
106
|
const [, all, force, name = "node-karin"] = e.msg.match(/^#(全部)?(强制)?更新(.*)?$/);
|
|
106
107
|
const cmd = force ? "git reset --hard && git pull --allow-unrelated-histories" : "git pull";
|
|
107
108
|
if (all) {
|
|
@@ -123,7 +124,10 @@ var updatePlugin = karin.command(/^#(全部)?(强制)?更新(.*)?$/, async (e) =
|
|
|
123
124
|
let res;
|
|
124
125
|
if (name !== "node-karin") {
|
|
125
126
|
const info = getPluginInfo(name.trim());
|
|
126
|
-
if (!info)
|
|
127
|
+
if (!info) {
|
|
128
|
+
await e.reply("\u63D2\u4EF6\u672A\u5B89\u88C5~", { reply: true });
|
|
129
|
+
return false;
|
|
130
|
+
}
|
|
127
131
|
if (info.type === "app") return await e.reply("\u5E94\u7528\u63D2\u4EF6\u4E0D\u652F\u6301\u66F4\u65B0~", { reply: true });
|
|
128
132
|
res = info.type === "git" ? await updateGitPlugin(info.dir, cmd, 120) : await updatePkg(info.name);
|
|
129
133
|
} else {
|
|
@@ -140,7 +144,7 @@ ${msg}`, { at: true });
|
|
|
140
144
|
\u66F4\u65B0\u6210\u529F
|
|
141
145
|
${res.data}`, { at: true });
|
|
142
146
|
}
|
|
143
|
-
});
|
|
147
|
+
}, { name: "\u66F4\u65B0\u63D2\u4EF6", priority: 100 });
|
|
144
148
|
var check = karin.command(/^#检查更新/, async (e) => {
|
|
145
149
|
let name = e.msg.replace(/^#检查更新/, "").trim();
|
|
146
150
|
const index = Number(name);
|
|
@@ -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.4.
|
|
10
|
+
version: "1.4.2",
|
|
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-B4IPB45Y.js";
|
|
13
13
|
import {
|
|
14
14
|
plugin
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-Y5SPBTPA.js";
|
|
16
16
|
|
|
17
17
|
// src/index.ts
|
|
18
18
|
import { logger, restartDirect } from "node-karin";
|
package/dist/web.config.js
CHANGED