@karinjs/plugin-basic 1.0.6 → 1.0.9
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/restart.js
CHANGED
package/dist/apps/status.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
config
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-IN6XLNTH.js";
|
|
4
|
+
import "../chunk-473NAVE6.js";
|
|
5
5
|
|
|
6
6
|
// src/apps/status.ts
|
|
7
7
|
import moment from "node-karin/moment";
|
|
@@ -55,8 +55,7 @@ var uptime = () => {
|
|
|
55
55
|
const day = Math.floor(uptime2 / 86400);
|
|
56
56
|
const hour = Math.floor(uptime2 % 86400 / 3600);
|
|
57
57
|
const minute = Math.floor(uptime2 % 3600 / 60);
|
|
58
|
-
|
|
59
|
-
return `${day}\u5929${hour}\u5C0F\u65F6${minute}\u5206\u949F${seconds}\u79D2`;
|
|
58
|
+
return `${day > 0 ? `${day}\u5929` : ""}${hour}\u5C0F\u65F6${minute}\u5206\u949F`;
|
|
60
59
|
};
|
|
61
60
|
(() => {
|
|
62
61
|
if (!config().status) return;
|
|
@@ -74,6 +73,13 @@ var uptime = () => {
|
|
|
74
73
|
next();
|
|
75
74
|
}
|
|
76
75
|
});
|
|
76
|
+
hooks.eventCall((e, _, next) => {
|
|
77
|
+
try {
|
|
78
|
+
redis.incr(`${EVENT_COUNT}:${createKey(e.contact)}`);
|
|
79
|
+
} finally {
|
|
80
|
+
next();
|
|
81
|
+
}
|
|
82
|
+
});
|
|
77
83
|
})();
|
|
78
84
|
export {
|
|
79
85
|
status
|
|
@@ -4,7 +4,7 @@ import path from "node:path";
|
|
|
4
4
|
// package.json
|
|
5
5
|
var package_default = {
|
|
6
6
|
name: "@karinjs/plugin-basic",
|
|
7
|
-
version: "1.0.
|
|
7
|
+
version: "1.0.9",
|
|
8
8
|
description: "karin plugin for basic functions",
|
|
9
9
|
homepage: "https://github.com/KarinJS/karin-plugin-basic",
|
|
10
10
|
bugs: {
|
|
@@ -29,18 +29,18 @@ var package_default = {
|
|
|
29
29
|
build: "tsc && tsup",
|
|
30
30
|
pub: "npm publish --access public",
|
|
31
31
|
sort: "npx sort-package-json",
|
|
32
|
-
dev: "tsx src/
|
|
32
|
+
dev: "tsx src/app.ts",
|
|
33
33
|
watch: "tsx watch src/index.ts",
|
|
34
34
|
karin: "karin"
|
|
35
35
|
},
|
|
36
36
|
devDependencies: {
|
|
37
|
-
"@types/node": "^20.17.
|
|
38
|
-
eslint: "^9.
|
|
37
|
+
"@types/node": "^20.17.30",
|
|
38
|
+
eslint: "^9.24.0",
|
|
39
39
|
neostandard: "^0.12.1",
|
|
40
|
-
"node-karin": "^1.
|
|
41
|
-
tsup: "^8.
|
|
42
|
-
tsx: "^4.19.
|
|
43
|
-
typescript: "^5.
|
|
40
|
+
"node-karin": "^1.8.12",
|
|
41
|
+
tsup: "^8.4.0",
|
|
42
|
+
tsx: "^4.19.3",
|
|
43
|
+
typescript: "^5.8.3"
|
|
44
44
|
},
|
|
45
45
|
publishConfig: {
|
|
46
46
|
access: "public",
|
package/dist/index.js
CHANGED
package/dist/web.config.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@karinjs/plugin-basic",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.9",
|
|
4
4
|
"description": "karin plugin for basic functions",
|
|
5
5
|
"homepage": "https://github.com/KarinJS/karin-plugin-basic",
|
|
6
6
|
"bugs": {
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"build": "tsc && tsup",
|
|
26
26
|
"pub": "npm publish --access public",
|
|
27
27
|
"sort": "npx sort-package-json",
|
|
28
|
-
"dev": "tsx src/
|
|
28
|
+
"dev": "tsx src/app.ts",
|
|
29
29
|
"watch": "tsx watch src/index.ts",
|
|
30
30
|
"karin": "karin"
|
|
31
31
|
},
|