node-karin 1.1.3 → 1.1.5
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/CHANGELOG.md +14 -0
- package/dist/index.d.ts +1 -3
- package/dist/index.js +5 -3
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# 更新日志
|
|
2
2
|
|
|
3
|
+
## [1.1.5](https://github.com/KarinJS/Karin/compare/core-v1.1.4...core-v1.1.5) (2025-01-17)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### 🐛 Bug Fixes
|
|
7
|
+
|
|
8
|
+
* 好友事件启用 ([7109f61](https://github.com/KarinJS/Karin/commit/7109f61cefe16bddc3f791b4e6bb13092d7d6757))
|
|
9
|
+
|
|
10
|
+
## [1.1.4](https://github.com/KarinJS/Karin/compare/core-v1.1.3...core-v1.1.4) (2025-01-16)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### 🐛 Bug Fixes
|
|
14
|
+
|
|
15
|
+
* 热更新`.env`未更新日志等级 ([b8b7c99](https://github.com/KarinJS/Karin/commit/b8b7c995cbd1fcd957e298f704fbafaa21b1a330))
|
|
16
|
+
|
|
3
17
|
## [1.1.3](https://github.com/KarinJS/Karin/compare/core-v1.1.2...core-v1.1.3) (2025-01-16)
|
|
4
18
|
|
|
5
19
|
|
package/dist/index.d.ts
CHANGED
|
@@ -8957,8 +8957,6 @@ interface Config {
|
|
|
8957
8957
|
admin: string[];
|
|
8958
8958
|
/** 用户管理 */
|
|
8959
8959
|
user: {
|
|
8960
|
-
/** 是否启用用户事件 */
|
|
8961
|
-
enable: boolean;
|
|
8962
8960
|
/** 用户白名单 */
|
|
8963
8961
|
enable_list: string[];
|
|
8964
8962
|
/** 用户黑名单 */
|
|
@@ -9536,7 +9534,7 @@ declare const getDirectCfg: (userId: string, selfId: string) => {
|
|
|
9536
9534
|
/**
|
|
9537
9535
|
* 监听.env文件变化并自动重新加载
|
|
9538
9536
|
*/
|
|
9539
|
-
declare const watchEnv: () => void
|
|
9537
|
+
declare const watchEnv: () => Promise<void>;
|
|
9540
9538
|
|
|
9541
9539
|
declare const index_admin: typeof admin;
|
|
9542
9540
|
declare const index_authKey: typeof authKey;
|
package/dist/index.js
CHANGED
|
@@ -1781,14 +1781,16 @@ var init_env2 = __esm({
|
|
|
1781
1781
|
"src/utils/config/env.ts"() {
|
|
1782
1782
|
"use strict";
|
|
1783
1783
|
init_esm_shims();
|
|
1784
|
-
watchEnv = () => {
|
|
1784
|
+
watchEnv = async () => {
|
|
1785
1785
|
const targetPath = path6.join(process.cwd(), ".env");
|
|
1786
1786
|
const watcher = chokidar2.watch(targetPath, { persistent: true, ignoreInitial: true });
|
|
1787
1787
|
const runtime = process.env.RUNTIME;
|
|
1788
|
-
watcher.on("change", () => {
|
|
1788
|
+
watcher.on("change", async () => {
|
|
1789
1789
|
logger.info("[\u914D\u7F6E\u6587\u4EF6\u53D8\u52A8] .env");
|
|
1790
1790
|
dotenv.config({ path: targetPath, override: true });
|
|
1791
1791
|
process.env.RUNTIME = runtime;
|
|
1792
|
+
const { updateLevel: updateLevel2 } = await init_config().then(() => config_exports);
|
|
1793
|
+
updateLevel2(process.env.LOG_LEVEL);
|
|
1792
1794
|
});
|
|
1793
1795
|
};
|
|
1794
1796
|
watchEnv();
|
|
@@ -5854,7 +5856,7 @@ var init_handler2 = __esm({
|
|
|
5854
5856
|
privateFilterEvent = (ctx3, config2, friend, cd) => {
|
|
5855
5857
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
5856
5858
|
if (ctx3.isFriend) {
|
|
5857
|
-
if (!((_a = config2 == null ? void 0 : config2.
|
|
5859
|
+
if (!((_a = config2 == null ? void 0 : config2.friend) == null ? void 0 : _a.enable)) {
|
|
5858
5860
|
log(ctx3.userId, `\u5F53\u524D\u597D\u53CB\u4E8B\u4EF6\u672A\u542F\u7528: ${ctx3.eventId}`);
|
|
5859
5861
|
return false;
|
|
5860
5862
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-karin",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.5",
|
|
4
4
|
"description": "Lightweight, efficient, concise, and stable robot framework.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"node",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"pr": "node cli/pr.js all",
|
|
62
62
|
"pub": "npm publish --access public",
|
|
63
63
|
"pub-beta": "npm publish --access public --tag beta",
|
|
64
|
-
"sort": "
|
|
64
|
+
"sort": "sort-package-json && sort-json tsconfig.json"
|
|
65
65
|
},
|
|
66
66
|
"dependencies": {
|
|
67
67
|
"@types/express": "^5.0.0",
|