node-karin 1.1.3 → 1.1.4
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 +7 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# 更新日志
|
|
2
2
|
|
|
3
|
+
## [1.1.4](https://github.com/KarinJS/Karin/compare/core-v1.1.3...core-v1.1.4) (2025-01-16)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### 🐛 Bug Fixes
|
|
7
|
+
|
|
8
|
+
* 热更新`.env`未更新日志等级 ([b8b7c99](https://github.com/KarinJS/Karin/commit/b8b7c995cbd1fcd957e298f704fbafaa21b1a330))
|
|
9
|
+
|
|
3
10
|
## [1.1.3](https://github.com/KarinJS/Karin/compare/core-v1.1.2...core-v1.1.3) (2025-01-16)
|
|
4
11
|
|
|
5
12
|
|
package/dist/index.d.ts
CHANGED
|
@@ -9536,7 +9536,7 @@ declare const getDirectCfg: (userId: string, selfId: string) => {
|
|
|
9536
9536
|
/**
|
|
9537
9537
|
* 监听.env文件变化并自动重新加载
|
|
9538
9538
|
*/
|
|
9539
|
-
declare const watchEnv: () => void
|
|
9539
|
+
declare const watchEnv: () => Promise<void>;
|
|
9540
9540
|
|
|
9541
9541
|
declare const index_admin: typeof admin;
|
|
9542
9542
|
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();
|