node-karin 1.9.11 → 1.10.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.
Files changed (167) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/dist/index.d.ts +62 -28
  3. package/dist/index.mjs +84 -73
  4. package/dist/module/locale/af.js +1 -0
  5. package/dist/module/locale/ar-dz.js +1 -0
  6. package/dist/module/locale/ar-kw.js +1 -0
  7. package/dist/module/locale/ar-ly.js +1 -0
  8. package/dist/module/locale/ar-ma.js +1 -0
  9. package/dist/module/locale/ar-ps.js +1 -0
  10. package/dist/module/locale/ar-sa.js +1 -0
  11. package/dist/module/locale/ar-tn.js +1 -0
  12. package/dist/module/locale/ar.js +1 -0
  13. package/dist/module/locale/az.js +1 -0
  14. package/dist/module/locale/be.js +1 -0
  15. package/dist/module/locale/bg.js +1 -0
  16. package/dist/module/locale/bm.js +1 -0
  17. package/dist/module/locale/bn-bd.js +1 -0
  18. package/dist/module/locale/bn.js +1 -0
  19. package/dist/module/locale/bo.js +1 -0
  20. package/dist/module/locale/br.js +1 -0
  21. package/dist/module/locale/bs.js +1 -0
  22. package/dist/module/locale/ca.js +1 -0
  23. package/dist/module/locale/cs.js +1 -0
  24. package/dist/module/locale/cv.js +1 -0
  25. package/dist/module/locale/cy.js +1 -0
  26. package/dist/module/locale/da.js +1 -0
  27. package/dist/module/locale/de-at.js +1 -0
  28. package/dist/module/locale/de-ch.js +1 -0
  29. package/dist/module/locale/de.js +1 -0
  30. package/dist/module/locale/dv.js +1 -0
  31. package/dist/module/locale/el.js +1 -0
  32. package/dist/module/locale/en-au.js +1 -0
  33. package/dist/module/locale/en-ca.js +1 -0
  34. package/dist/module/locale/en-gb.js +1 -0
  35. package/dist/module/locale/en-ie.js +1 -0
  36. package/dist/module/locale/en-il.js +1 -0
  37. package/dist/module/locale/en-in.js +1 -0
  38. package/dist/module/locale/en-nz.js +1 -0
  39. package/dist/module/locale/en-sg.js +1 -0
  40. package/dist/module/locale/eo.js +1 -0
  41. package/dist/module/locale/es-do.js +1 -0
  42. package/dist/module/locale/es-mx.js +1 -0
  43. package/dist/module/locale/es-us.js +1 -0
  44. package/dist/module/locale/es.js +1 -0
  45. package/dist/module/locale/et.js +1 -0
  46. package/dist/module/locale/eu.js +1 -0
  47. package/dist/module/locale/fa.js +1 -0
  48. package/dist/module/locale/fi.js +1 -0
  49. package/dist/module/locale/fil.js +1 -0
  50. package/dist/module/locale/fo.js +1 -0
  51. package/dist/module/locale/fr-ca.js +1 -0
  52. package/dist/module/locale/fr-ch.js +1 -0
  53. package/dist/module/locale/fr.js +1 -0
  54. package/dist/module/locale/fy.js +1 -0
  55. package/dist/module/locale/ga.js +1 -0
  56. package/dist/module/locale/gd.js +1 -0
  57. package/dist/module/locale/gl.js +1 -0
  58. package/dist/module/locale/gom-deva.js +1 -0
  59. package/dist/module/locale/gom-latn.js +1 -0
  60. package/dist/module/locale/gu.js +1 -0
  61. package/dist/module/locale/he.js +1 -0
  62. package/dist/module/locale/hi.js +1 -0
  63. package/dist/module/locale/hr.js +1 -0
  64. package/dist/module/locale/hu.js +1 -0
  65. package/dist/module/locale/hy-am.js +1 -0
  66. package/dist/module/locale/id.js +1 -0
  67. package/dist/module/locale/is.js +1 -0
  68. package/dist/module/locale/it-ch.js +1 -0
  69. package/dist/module/locale/it.js +1 -0
  70. package/dist/module/locale/ja.js +1 -0
  71. package/dist/module/locale/jv.js +1 -0
  72. package/dist/module/locale/ka.js +1 -0
  73. package/dist/module/locale/kk.js +1 -0
  74. package/dist/module/locale/km.js +1 -0
  75. package/dist/module/locale/kn.js +1 -0
  76. package/dist/module/locale/ko.js +1 -0
  77. package/dist/module/locale/ku-kmr.js +1 -0
  78. package/dist/module/locale/ku.js +1 -0
  79. package/dist/module/locale/ky.js +1 -0
  80. package/dist/module/locale/lb.js +1 -0
  81. package/dist/module/locale/lo.js +1 -0
  82. package/dist/module/locale/lt.js +1 -0
  83. package/dist/module/locale/lv.js +1 -0
  84. package/dist/module/locale/me.js +1 -0
  85. package/dist/module/locale/mi.js +1 -0
  86. package/dist/module/locale/mk.js +1 -0
  87. package/dist/module/locale/ml.js +1 -0
  88. package/dist/module/locale/mn.js +1 -0
  89. package/dist/module/locale/mr.js +1 -0
  90. package/dist/module/locale/ms-my.js +1 -0
  91. package/dist/module/locale/ms.js +1 -0
  92. package/dist/module/locale/mt.js +1 -0
  93. package/dist/module/locale/my.js +1 -0
  94. package/dist/module/locale/nb.js +1 -0
  95. package/dist/module/locale/ne.js +1 -0
  96. package/dist/module/locale/nl-be.js +1 -0
  97. package/dist/module/locale/nl.js +1 -0
  98. package/dist/module/locale/nn.js +1 -0
  99. package/dist/module/locale/oc-lnc.js +1 -0
  100. package/dist/module/locale/pa-in.js +1 -0
  101. package/dist/module/locale/pl.js +1 -0
  102. package/dist/module/locale/pt-br.js +1 -0
  103. package/dist/module/locale/pt.js +1 -0
  104. package/dist/module/locale/ro.js +1 -0
  105. package/dist/module/locale/ru.js +1 -0
  106. package/dist/module/locale/sd.js +1 -0
  107. package/dist/module/locale/se.js +1 -0
  108. package/dist/module/locale/si.js +1 -0
  109. package/dist/module/locale/sk.js +1 -0
  110. package/dist/module/locale/sl.js +1 -0
  111. package/dist/module/locale/sq.js +1 -0
  112. package/dist/module/locale/sr-cyrl.js +1 -0
  113. package/dist/module/locale/sr.js +1 -0
  114. package/dist/module/locale/ss.js +1 -0
  115. package/dist/module/locale/sv.js +1 -0
  116. package/dist/module/locale/sw.js +1 -0
  117. package/dist/module/locale/ta.js +1 -0
  118. package/dist/module/locale/te.js +1 -0
  119. package/dist/module/locale/tet.js +1 -0
  120. package/dist/module/locale/tg.js +1 -0
  121. package/dist/module/locale/th.js +1 -0
  122. package/dist/module/locale/tk.js +1 -0
  123. package/dist/module/locale/tl-ph.js +1 -0
  124. package/dist/module/locale/tlh.js +1 -0
  125. package/dist/module/locale/tr.js +1 -0
  126. package/dist/module/locale/tzl.js +1 -0
  127. package/dist/module/locale/tzm-latn.js +1 -0
  128. package/dist/module/locale/tzm.js +1 -0
  129. package/dist/module/locale/ug-cn.js +1 -0
  130. package/dist/module/locale/uk.js +1 -0
  131. package/dist/module/locale/ur.js +1 -0
  132. package/dist/module/locale/uz-latn.js +1 -0
  133. package/dist/module/locale/uz.js +1 -0
  134. package/dist/module/locale/vi.js +1 -0
  135. package/dist/module/locale/x-pseudo.js +1 -0
  136. package/dist/module/locale/yo.js +1 -0
  137. package/dist/module/locale/zh-cn.js +1 -0
  138. package/dist/module/locale/zh-hk.js +1 -0
  139. package/dist/module/locale/zh-mo.js +1 -0
  140. package/dist/module/locale/zh-tw.js +1 -0
  141. package/dist/start/index.mjs +239 -86
  142. package/dist/web/assets/js/components-dBPrGnB1.js.br +0 -0
  143. package/dist/web/assets/js/entry-CRs5p7Va.js.br +0 -0
  144. package/dist/web/assets/js/hooks-BuphjDUa.js.br +0 -0
  145. package/dist/web/assets/js/page-404.tsx-DTLlf2wR.js +1 -0
  146. package/dist/web/assets/js/page-dashboard-ChOY3OD_.js.br +0 -0
  147. package/dist/web/assets/js/page-loading.tsx-DTcKjDoU.js.br +0 -0
  148. package/dist/web/assets/js/page-login.tsx-DqEwG-Ef.js.br +0 -0
  149. package/dist/web/assets/js/utils-BYGvjjaT.js +2 -0
  150. package/dist/web/assets/js/vendor-heroui-CFCHvaV_.js.br +0 -0
  151. package/dist/web/assets/js/vendor-others-kn4E9QVl.js.br +0 -0
  152. package/dist/web/assets/js/vendor-react-8wAG8wwS.js.br +0 -0
  153. package/dist/web/assets/js/vendor-visual-CDTDoj6v.js.br +0 -0
  154. package/dist/web/index.html +9 -9
  155. package/package.json +17 -22
  156. package/dist/web/assets/js/components-CPNNGkNi.js.br +0 -0
  157. package/dist/web/assets/js/entry-Baz5TCd6.js.br +0 -0
  158. package/dist/web/assets/js/hooks-DBHKB0Wu.js.br +0 -0
  159. package/dist/web/assets/js/page-404.tsx-CcSvxZy4.js +0 -1
  160. package/dist/web/assets/js/page-dashboard-CPp-Yb1A.js.br +0 -0
  161. package/dist/web/assets/js/page-loading.tsx-CKSM7UEO.js.br +0 -0
  162. package/dist/web/assets/js/page-login.tsx-pCeUyqBb.js.br +0 -0
  163. package/dist/web/assets/js/utils-4g0tXjXS.js +0 -2
  164. package/dist/web/assets/js/vendor-heroui-4BnFpRmu.js.br +0 -0
  165. package/dist/web/assets/js/vendor-others-DBQ8m94B.js.br +0 -0
  166. package/dist/web/assets/js/vendor-react-Nm7PvEim.js.br +0 -0
  167. package/dist/web/assets/js/vendor-visual-CVzPJKGy.js.br +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,30 @@
1
1
  # 更新日志
2
2
 
3
+ ## [1.10.1](https://github.com/KarinJS/Karin/compare/core-v1.10.0...core-v1.10.1) (2025-06-06)
4
+
5
+
6
+ ### ♻️ Code Refactoring
7
+
8
+ * 重构插件管理 引入npm ([#461](https://github.com/KarinJS/Karin/issues/461)) ([2b3de7e](https://github.com/KarinJS/Karin/commit/2b3de7ee4ff7c18b4cd082dbe72f504200048c2b))
9
+
10
+ ## [1.10.0](https://github.com/KarinJS/Karin/compare/core-v1.9.11...core-v1.10.0) (2025-06-06)
11
+
12
+
13
+ ### ✨ Features
14
+
15
+ * **core:** 添加端口相关工具并优化 PID 获取逻辑 ([#457](https://github.com/KarinJS/Karin/issues/457)) ([dc4cda9](https://github.com/KarinJS/Karin/commit/dc4cda9889d52d4c2a4bd90992ce61c23ddf477d))
16
+
17
+
18
+ ### 🐛 Bug Fixes
19
+
20
+ * close [#460](https://github.com/KarinJS/Karin/issues/460) ([dd2bd1a](https://github.com/KarinJS/Karin/commit/dd2bd1aee7edd91dadf98617055426539b0881b8))
21
+ * 更新 HMR 日志输出,增加空插件列表提示 ([1d14be2](https://github.com/KarinJS/Karin/commit/1d14be295372096295af890bf45b53b8033e19be))
22
+
23
+
24
+ ### ⚡️ Performance
25
+
26
+ * **core:** 优化端口功能,添加结束指定PID或端口程序 ([#459](https://github.com/KarinJS/Karin/issues/459)) ([0d13395](https://github.com/KarinJS/Karin/commit/0d13395d610b36f306cf56231f732a2ff39c5582))
27
+
3
28
  ## [1.9.11](https://github.com/KarinJS/Karin/compare/core-v1.9.10...core-v1.9.11) (2025-06-05)
4
29
 
5
30
 
package/dist/index.d.ts CHANGED
@@ -11239,7 +11239,7 @@ declare const isLocalRequest: (req: Request$1) => Promise<boolean>;
11239
11239
  * 传入端口号,返回对应的pid
11240
11240
  * @param port - 端口号
11241
11241
  */
11242
- declare const getPid: (port: number) => Promise<number>;
11242
+ declare const getPid: (port: number) => Promise<number | null>;
11243
11243
 
11244
11244
  /**
11245
11245
  * 执行 shell 命令
@@ -11305,6 +11305,28 @@ declare const stringifyError: (error?: Error | null) => {
11305
11305
  */
11306
11306
  declare const errorToString: (error?: Error | null) => string;
11307
11307
 
11308
+ /**
11309
+ * 检查端口是否可用
11310
+ * @param port - 端口号
11311
+ * @returns 端口可用返回true,否则返回false
11312
+ */
11313
+ declare const checkPort: (port: number) => Promise<boolean>;
11314
+ /**
11315
+ * 等待端口可用
11316
+ * @param port - 端口号
11317
+ * @param maxAttempts - 最大尝试次数
11318
+ * @param interval - 检查间隔(ms)
11319
+ * @returns 端口是否可用
11320
+ */
11321
+ declare const waitPort: (port: number, maxAttempts?: number, interval?: number) => Promise<boolean>;
11322
+ /**
11323
+ * 结束指定PID或端口的程序
11324
+ * @param identifier - PID号或端口号
11325
+ * @param isPort - 是否为端口号
11326
+ * @returns 是否成功结束程序
11327
+ */
11328
+ declare const killApp: (identifier: number, isPort?: boolean) => Promise<boolean>;
11329
+
11308
11330
  /**
11309
11331
  * @description ffmpeg命令
11310
11332
  * @param cmd 命令
@@ -11489,16 +11511,22 @@ declare const updateAllGitPlugin: (cmd?: string, time?: number) => Promise<strin
11489
11511
  * @param contact - 事件联系人信息 也就是从哪来的这条消息 传e.contact即可
11490
11512
  * @param messageId - 消息id 传e.message_id
11491
11513
  * @param isFront - 是否为前台重启 默认是 不支持的环境会强制为pm2重启
11514
+ * @param reloadDeps - 是否为重新加载依赖 默认是false
11492
11515
  */
11493
- declare const restart: (selfId: string, contact: Contact, messageId: string, isFront?: boolean) => Promise<{
11516
+ declare const restart: (selfId: string, contact: Contact, messageId: string, isFront?: boolean, reloadDeps?: boolean) => Promise<{
11494
11517
  status: "success" | "failed";
11495
11518
  data: string | Error;
11496
11519
  }>;
11497
11520
  /**
11498
11521
  * 直接重启
11499
- * @param isPm2 - 是否为pm2重启 默认false
11522
+ * @param options - 重启选项
11500
11523
  */
11501
- declare const restartDirect: (isPm2?: boolean) => Promise<void>;
11524
+ declare const restartDirect: (options: {
11525
+ /** 是否为pm2重启 */
11526
+ isPm2?: boolean;
11527
+ /** 是否为重新加载依赖 */
11528
+ reloadDeps?: boolean;
11529
+ }) => Promise<void>;
11502
11530
 
11503
11531
  /** fileToUrl Handler键 */
11504
11532
  declare const fileToUrlHandlerKey = "fileToUrl";
@@ -11509,39 +11537,40 @@ declare const fileToUrl: FileToUrlHandler;
11509
11537
 
11510
11538
  /**
11511
11539
  * 一个简单的版本范围检查函数
11512
- * @param range 版本范围
11540
+ * @param satisfies 版本范围
11513
11541
  * @param version 版本
11514
11542
  * @description 检查版本是否在范围内
11515
11543
  * @example
11516
11544
  * ```ts
11517
- * console.log(range('^1.0.0', '1.0.1')) // true
11518
- * console.log(range('^1.0.0', '2.0.0')) // false
11519
- * console.log(range('^1.0.0', '0.0.1')) // false
11520
- * console.log(range('>=1.0.0', '1.0.0')) // true
11521
- * console.log(range('>=1.0.0', '0.0.1')) // false
11522
- * console.log(range('<=1.0.0', '1.0.0')) // true
11523
- * console.log(range('<=1.0.0', '2.0.0')) // false
11524
- * console.log(range('>=1.0.0 <2.0.0', '1.0.0')) // true
11525
- * console.log(range('1.0.0-alpha', '1.0.0-beta')) // false
11526
- * console.log(range('1.0.0-beta', '1.0.0-alpha')) // false
11527
- * console.log(range('^1.0.0-beta', '1.0.0-alpha')) // false
11528
- * console.log(range('>=1.0.0-beta', '1.0.0-alpha')) // false
11529
- * console.log(range('^1.0.0-alpha', '1.0.0-beta')) // true
11530
- * console.log(range('^1.0.0-beta', '1.0.0-beta')) // true
11531
- * console.log(range('^1.0.0-alpha', '1.0.0-alpha')) // true
11545
+ * console.log(satisfies('^1.0.0', '1.0.1')) // true
11546
+ * console.log(satisfies('^1.0.0', '2.0.0')) // false
11547
+ * console.log(satisfies('^1.0.0', '0.0.1')) // false
11548
+ * console.log(satisfies('>=1.0.0', '1.0.0')) // true
11549
+ * console.log(satisfies('>=1.0.0', '0.0.1')) // false
11550
+ * console.log(satisfies('<=1.0.0', '1.0.0')) // true
11551
+ * console.log(satisfies('<=1.0.0', '2.0.0')) // false
11552
+ * console.log(satisfies('>=1.0.0 <2.0.0', '1.0.0')) // true
11553
+ * console.log(satisfies('1.0.0-alpha', '1.0.0-beta')) // false
11554
+ * console.log(satisfies('1.0.0-beta', '1.0.0-alpha')) // false
11555
+ * console.log(satisfies('^1.0.0-beta', '1.0.0-alpha')) // false
11556
+ * console.log(satisfies('>=1.0.0-beta', '1.0.0-alpha')) // false
11557
+ * console.log(satisfies('^1.0.0-alpha', '1.0.0-beta')) // true
11558
+ * console.log(satisfies('^1.0.0-beta', '1.0.0-beta')) // true
11559
+ * console.log(satisfies('^1.0.0-alpha', '1.0.0-alpha')) // true
11532
11560
  *
11533
11561
  * // 通配符示例
11534
- * console.log(range('1.0.x', '1.0.1')) // true
11535
- * console.log(range('1.0.x', '1.1.0')) // false
11536
- * console.log(range('1.x.x', '1.2.3')) // true
11537
- * console.log(range('1.x.0', '1.2.0')) // true
11538
- * console.log(range('1.x.0', '1.2.1')) // false
11562
+ * console.log(satisfies('1.0.x', '1.0.1')) // true
11563
+ * console.log(satisfies('1.0.x', '1.1.0')) // false
11564
+ * console.log(satisfies('1.x.x', '1.2.3')) // true
11565
+ * console.log(satisfies('1.x.0', '1.2.0')) // true
11566
+ * console.log(satisfies('1.x.0', '1.2.1')) // false
11539
11567
  * ```
11540
11568
  */
11541
- declare const satisfies: (range: string, version: string) => boolean;
11569
+ declare const satisfies: (satisfies: string, version: string) => boolean;
11542
11570
 
11543
11571
  declare const index$2_checkGitPluginUpdate: typeof checkGitPluginUpdate;
11544
11572
  declare const index$2_checkPkgUpdate: typeof checkPkgUpdate;
11573
+ declare const index$2_checkPort: typeof checkPort;
11545
11574
  declare const index$2_errorToString: typeof errorToString;
11546
11575
  declare const index$2_exec: typeof exec;
11547
11576
  declare const index$2_ffmpeg: typeof ffmpeg;
@@ -11567,6 +11596,10 @@ declare const index$2_isLoopback: typeof isLoopback;
11567
11596
  declare const index$2_isMac: typeof isMac;
11568
11597
  declare const index$2_isRoot: typeof isRoot;
11569
11598
  declare const index$2_isWin: typeof isWin;
11599
+ declare const index$2_killApp: typeof killApp;
11600
+ declare const index$2_lock: typeof lock;
11601
+ declare const index$2_lockMethod: typeof lockMethod;
11602
+ declare const index$2_lockProp: typeof lockProp;
11570
11603
  declare const index$2_restart: typeof restart;
11571
11604
  declare const index$2_restartDirect: typeof restartDirect;
11572
11605
  declare const index$2_satisfies: typeof satisfies;
@@ -11575,8 +11608,9 @@ declare const index$2_updateAllGitPlugin: typeof updateAllGitPlugin;
11575
11608
  declare const index$2_updateAllPkg: typeof updateAllPkg;
11576
11609
  declare const index$2_updateGitPlugin: typeof updateGitPlugin;
11577
11610
  declare const index$2_updatePkg: typeof updatePkg;
11611
+ declare const index$2_waitPort: typeof waitPort;
11578
11612
  declare namespace index$2 {
11579
- export { index$2_checkGitPluginUpdate as checkGitPluginUpdate, index$2_checkPkgUpdate as checkPkgUpdate, index$2_errorToString as errorToString, index$2_exec as exec, index$2_ffmpeg as ffmpeg, index$2_ffplay as ffplay, index$2_ffprobe as ffprobe, index$2_fileToUrl as fileToUrl, index$2_fileToUrlHandlerKey as fileToUrlHandlerKey, formatTime$1 as formatTime, index$2_getCommit as getCommit, index$2_getHash as getHash, index$2_getPid as getPid, index$2_getPkgVersion as getPkgVersion, index$2_getRemotePkgVersion as getRemotePkgVersion, index$2_getRequestIp as getRequestIp, index$2_getTime as getTime, index$2_importModule as importModule, index$2_isClass as isClass, index$2_isDocker as isDocker, index$2_isIPv4Loop as isIPv4Loop, index$2_isIPv6Loop as isIPv6Loop, index$2_isLinux as isLinux, index$2_isLocalRequest as isLocalRequest, index$2_isLoopback as isLoopback, index$2_isMac as isMac, index$2_isRoot as isRoot, index$2_isWin as isWin, index$2_restart as restart, index$2_restartDirect as restartDirect, index$2_satisfies as satisfies, index$2_stringifyError as stringifyError, index$2_updateAllGitPlugin as updateAllGitPlugin, index$2_updateAllPkg as updateAllPkg, index$2_updateGitPlugin as updateGitPlugin, index$2_updatePkg as updatePkg, uptime$1 as uptime };
11613
+ export { index$2_checkGitPluginUpdate as checkGitPluginUpdate, index$2_checkPkgUpdate as checkPkgUpdate, index$2_checkPort as checkPort, index$2_errorToString as errorToString, index$2_exec as exec, index$2_ffmpeg as ffmpeg, index$2_ffplay as ffplay, index$2_ffprobe as ffprobe, index$2_fileToUrl as fileToUrl, index$2_fileToUrlHandlerKey as fileToUrlHandlerKey, formatTime$1 as formatTime, index$2_getCommit as getCommit, index$2_getHash as getHash, index$2_getPid as getPid, index$2_getPkgVersion as getPkgVersion, index$2_getRemotePkgVersion as getRemotePkgVersion, index$2_getRequestIp as getRequestIp, index$2_getTime as getTime, index$2_importModule as importModule, index$2_isClass as isClass, index$2_isDocker as isDocker, index$2_isIPv4Loop as isIPv4Loop, index$2_isIPv6Loop as isIPv6Loop, index$2_isLinux as isLinux, index$2_isLocalRequest as isLocalRequest, index$2_isLoopback as isLoopback, index$2_isMac as isMac, index$2_isRoot as isRoot, index$2_isWin as isWin, index$2_killApp as killApp, index$2_lock as lock, index$2_lockMethod as lockMethod, index$2_lockProp as lockProp, index$2_restart as restart, index$2_restartDirect as restartDirect, index$2_satisfies as satisfies, index$2_stringifyError as stringifyError, index$2_updateAllGitPlugin as updateAllGitPlugin, index$2_updateAllPkg as updateAllPkg, index$2_updateGitPlugin as updateGitPlugin, index$2_updatePkg as updatePkg, uptime$1 as uptime, index$2_waitPort as waitPort };
11580
11614
  }
11581
11615
 
11582
11616
  /**
@@ -13685,4 +13719,4 @@ type Client = RedisClientType & {
13685
13719
  */
13686
13720
  declare const start: () => Promise<void>;
13687
13721
 
13688
- export { type Accept, type AccordionItemProps, type AccordionKV, type AccordionProProps, type AccordionProResult, type AccordionProps, type AccordionResult, type AccountInfo, type Adapter, AdapterBase, type AdapterCommunication, type AdapterInfo, AdapterOneBot, type AdapterOptions, type AdapterPlatform, type AdapterProtocol, type AdapterStandard, type AdapterType, type Adapters, type AddDependenciesParams, type AddTaskResult, type AfterForwardMessageCallback, type AfterMessageCallback, type AllPluginMethods, type AnonymousSegment, type Apps, type ArrayField, type AtElement, type AtSegment, type Author, BASE_ROUTER, BATCH_UPDATE_PLUGINS_ROUTER, type BaseContact, BaseEvent, type BaseEventOptions, type BaseEventType, type BaseForwardCallback, type BaseMessageCallback, type BasketballElement, Bot, type BoundingBox, type BubbleFaceElement, type Button, type ButtonElement, CHECK_PLUGIN_ROUTER, CLOSE_TERMINAL_ROUTER, CONSOLE_ROUTER, CREATE_TERMINAL_ROUTER, type Cache, type CacheEntry, type CheckboxField, type CheckboxGroupProps, type CheckboxProps, type CheckboxResult, type Children, type CmdFnc, type Command, type CommandClass, type ComponentConfig, type ComponentProps, type ComponentType, type Components, type ComponentsClass, type Config, type Contact, type ContactElement, type ContactSegment, type Count, type CreateGroupFolderResponse, type CreatePty, type CreateTask, type CreateTaskParams, type CreateTaskResult, type CronProps, type CustomMusicElement, type CustomMusicSegment, type CustomNodeElement, type CustomNodeSegments, type DbStreamStatus, type DbStreams, type DefineConfig, type DependenciesManage, type DependenciesManageBase, type Dependency, type DiceElement, type DiceSegment, type DirectContact, DirectMessage, type DirectMessageOptions, type DirectNodeElement, type DirectNodeSegment, type DirectSender, type DividerField, type DividerProps, type DownloadFileErrorResult, type DownloadFileOptions, type DownloadFileResponse, type DownloadFileResult, type DownloadFileSuccessResult, type DownloadFilesOptions, EVENT_COUNT, EXIT_ROUTER, type ElementTypes, type Elements, type Env, type Event, type EventCallCallback, type EventCallHookItem, type EventParent, type EventToSubEvent, type ExecOptions$1 as ExecOptions, type ExecReturn, type ExecType, type ExtendedAxiosRequestConfig, FILE_CHANGE, type FaceElement, type FaceSegment, type FieldType, type FileElement, type FileList, type FileListMap, type FileSegment, type FileToUrlHandler, type FileToUrlResult, type FormField, type ForwardMessageCallback, type ForwardOptions, type ForwardSegment, type FriendContact, type FriendData, FriendDecreaseNotice, type FriendDecreaseOptions, FriendIncreaseNotice, type FriendIncreaseOptions, FriendMessage, type FriendMessageOptions, type FriendNoticeEventMap, type FriendRequestEventMap, type FriendRequestOptions, type FriendSender, GET_BOTS_ROUTER, GET_CONFIG_ROUTER, GET_DEPENDENCIES_LIST_ROUTER, GET_LOADED_COMMAND_PLUGIN_CACHE_LIST_ROUTER, GET_LOCAL_PLUGIN_LIST_ROUTER, GET_LOG_FILE_LIST_ROUTER, GET_LOG_FILE_ROUTER, GET_LOG_ROUTER, GET_NETWORK_STATUS_ROUTER, GET_NPMRC_LIST_ROUTER, GET_NPM_BASE_CONFIG_ROUTER, GET_NPM_CONFIG_ROUTER, GET_ONLINE_PLUGIN_LIST_ROUTER, GET_PLUGIN_APPS_ROUTER, GET_PLUGIN_CONFIG_ROUTER, GET_PLUGIN_FILE_ROUTER, GET_PLUGIN_LIST_PLUGIN_ADMIN_ROUTER, GET_PLUGIN_LIST_ROUTER, GET_PLUGIN_MARKET_LIST_ROUTER, GET_TASK_LIST_ROUTER, GET_TASK_STATUS_ROUTER, GET_TERMINAL_LIST_ROUTER, GET_UPDATABLE_PLUGINS_ROUTER, GET_WEBUI_PLUGIN_LIST_ROUTER, GET_WEBUI_PLUGIN_VERSIONS_ROUTER, type GeneralHookCallback, type GeneralHookItem, type GetAtAllCountResponse, type GetBot, type GetCommitHashOptions, type GetConfigRequest, type GetConfigResponse, type GetGroupFileListResponse, type GetGroupFileSystemInfoResponse, type GetGroupHighlightsResponse, type GetGroupInfo, type GetGroupMemberInfo, type GetGroupMuteListResponse, type GetMsg, type GetPluginLocalOptions, type GetPluginLocalReturn, type GetPluginReturn, type GetPluginType, type GiftElement, type GitLocalBranches, type GitPullOptions, type GitPullResult, type GitRemoteBranches, type GithubConfig, type GoToOptions, GroupAdminChangedNotice, type GroupAdminChangedOptions, GroupApplyRequest, type GroupApplyRequestOptions, GroupCardChangedNotice, type GroupCardChangedOptions, type GroupContact, type GroupData, GroupFileUploadedNotice, type GroupFileUploadedOptions, GroupHlightsChangedNotice, type GroupHlightsChangedOptions, GroupHonorChangedNotice, type GroupHonorChangedOptions, type GroupInfo, GroupInviteRequest, type GroupInviteRequestOptions, GroupLuckKingNotice, type GroupLuckKingOptions, GroupMemberBanNotice, type GroupMemberBanOptions, type GroupMemberData, GroupMemberDecreaseNotice, type GroupMemberDecreaseOptions, GroupMemberIncreaseNotice, type GroupMemberIncreaseOptions, type GroupMemberInfo, GroupMemberTitleUpdatedNotice, type GroupMemberUniqueTitleChangedOptions, GroupMessage, type GroupMessageOptions, GroupMessageReactionNotice, type GroupMessageReactionOptions, GroupNotice, type GroupNoticeEventMap, GroupPokeNotice, type GroupPokeOptions, GroupRecallNotice, type GroupRecallOptions, type GroupRequestEventMap, type GroupSender, GroupSignInNotice, type GroupSignInOptions, type GroupTempContact, GroupTempMessage, type GroupTempMessageOptions, type GroupTempSender, GroupWholeBanNotice, type GroupWholeBanOptions, type Groups, type GroupsObjectValue, type GuildContact, GuildMessage, type GuildMessageOptions, type GuildSender, HTTPStatusCode, type Handler, type HandlerType, type HonorInfoList, type HookCache, type HookCallback, type HookEmitForward, type HookEmitMessage, type HookNext, type HookOptions, type HooksType, INSTALL_PLUGIN_ROUTER, INSTALL_WEBUI_PLUGIN_ROUTER, IS_PLUGIN_CONFIG_EXIST_ROUTER, type Icon, type ImageElement, type ImageSegment, type ImportModuleResult, type InputGroupProps, type InputProps, type InputResult, type JsonElement, type JsonSegment, type JwtVerifyBase, type JwtVerifyError, type JwtVerifyExpired, type JwtVerifyResult, type JwtVerifySuccess, type JwtVerifyUnauthorized, type KarinButton, type KarinPluginAppsType, type KeyboardElement, LOGIN_ROUTER, type LoadPluginResult, type LoadedPluginCacheList, type LocalApiResponse, type LocationElement, type LocationSegment, type Log, LogMethodNames, Logger, LoggerLevel, type LongMsgElement, MANAGE_DEPENDENCIES_ROUTER, type MarkdownElement, type MarkdownTplElement, type MarketFaceElement, type Message$2 as Message, MessageBase, type MessageEventMap, type MessageEventSub, type MessageHookItem, type MessageOptions, type MessageResponse, type MetaEventBase, type MusicElement, type MusicPlatform, type MusicSegment, type NetworkStatus, type NodeElement, type NormalMessageCallback, type Notice, type NoticeAndRequest, NoticeBase, type NoticeEventMap, type NoticeEventSub, type NoticeOptions, type NpmBaseConfigResponse, type NpmrcFileResponse, type NumberField, type OB11AllEvent, OB11ApiAction, type OB11ApiParams, type OB11ApiRequest, OB11Event, type OB11EventBase, type OB11FriendSender, type OB11GroupMessage, type OB11GroupSender, type OB11GroupTempMessage, type OB11Message, OB11MessageSubType, OB11MessageType, type OB11Meta, type OB11NodeSegment, type OB11Notice, type OB11NoticeBaseType, OB11NoticeType, type OB11OtherFriendMessage, type OB11PrivateMessage, type OB11Request, type OB11RequestBaseType, OB11RequestType, type OB11Segment, type OB11SegmentBase, type OB11SegmentType, OB11Sex, type OB11serInfo, type ObjectArrayField, type ObjectField, type OneBot11FriendAdd, type OneBot11FriendOfflineFile, type OneBot11FriendRecall, type OneBot11FriendRequest, type OneBot11GroupAdmin, type OneBot11GroupBan, type OneBot11GroupCard, type OneBot11GroupDecrease, type OneBot11GroupEssence, type OneBot11GroupIncrease, type OneBot11GroupMessageReaction, type OneBot11GroupMessageReactionLagrange, type OneBot11GroupRecall, type OneBot11GroupRequest, type OneBot11GroupUpload, type OneBot11Heartbeat, type OneBot11Honor, type OneBot11Lifecycle, type OneBot11LuckyKing, type OneBot11Poke, type Option, type Options, PING_ROUTER, PLUGIN_ADMIN_ROUTER, type PM2, type Package, type Parser, type PasmsgElement, type Permission, type PingRequestResult, type PkgData, type PkgEnv, type PkgInfo, Plugin$1 as Plugin, type PluginAdminCustomInstall, type PluginAdminCustomInstallApp, type PluginAdminInstall, type PluginAdminListResponse, type PluginAdminMarketInstall, type PluginAdminMarketInstallApp, type PluginAdminParams, type PluginAdminResult, type PluginAdminUninstall, type PluginAdminUpdate, type PluginFile, type PluginFncTypes, type PluginLists, type PluginMarketAuthor, type PluginMarketLocalBase, type PluginMarketLocalOptions, type PluginMarketOptions, type PluginMarketRequest, type PluginMarketResponse, type PluginOptions, type PluginRule, type PluginUpdateInfo, type PnpmDependencies, type PnpmDependency, type Point, type PokeSegment, PrivateApplyRequest, type PrivateApplyRequestOptions, PrivateFileUploadedNotice, type PrivateFileUploadedOptions, PrivatePokeNotice, type PrivatePokeOptions, PrivateRecallNotice, type PrivateRecallOptions, type Privates, type PrivatesObjectValue, type PuppeteerLifeCycleEvent, type QQBotButton, type QQButtonTextType, type QQGroupFileInfo, type QQGroupFolderInfo, type QQGroupHonorInfo, RECV_MSG, REFRESH_ROUTER, RESTART_ROUTER, type RaceResult, type Radio, type RadioField, type RadioGroupProps, type RadioResult, type RawElement, type ReadyMusicElement, ReceiveLikeNotice, type ReceiveLikeOptions, type RecordElement, type RecordSegment, type Redis, type RemoveDependenciesParams, type Render, type RenderResult, Renderer, type Renders$1 as Renders, type Reply, type ReplyElement, type ReplySegment, type Request, RequestBase, type RequestEventMap, type RequestEventSub, type RequestOptions, type RequireFunction, type RequireFunctionSync, type RequireOptions, type Role, type RpsElement, type RpsSegment, SAVE_CONFIG_ROUTER, SAVE_NPMRC_ROUTER, SAVE_PLUGIN_CONFIG_ROUTER, SEND_MSG, SET_LOG_LEVEL_ROUTER, SYSTEM_INFO_ROUTER, SYSTEM_STATUS_KARIN_ROUTER, SYSTEM_STATUS_ROUTER, SYSTEM_STATUS_WS_ROUTER, type SandBoxAccountInfo, type SandboxMsgRecord, type SandboxSendApi, type SandboxSendSendFriendMsg, type SandboxSendSendGroupMsg, type SandboxSendSendMsg, type SaveConfigResponse, type SaveResult, type Scene, type ScreenshotClip, type ScreenshotOptions, type SectionField, type Segment, type SelectField, type SendElement, type SendForwardMessageResponse, type SendMessage, type SendMsgHookItem, type SendMsgResults, type Sender, type SenderBase, type SenderGroup, type Sex, type ShakeSegment, type ShareElement, type ShareSegment, type Snapka, type SnapkaResult, type SrcReply, type StandardResult, type SwitchField, type SwitchProps, type SwitchResult, TASK_DELETE_ROUTER, TASK_LIST_ROUTER, TASK_LOGS_ROUTER, TASK_RUN_ROUTER, type Task, type TaskCallbacks, type TaskEntity, type TaskExecutor, type TaskFilter, type TaskStatus, type TaskType, type TerminalInstance, type TerminalShell, type TestNetworkRequestDetail, type TextElement, type TextField, type TextSegment, type TitleField, UNINSTALL_PLUGIN_ROUTER, UNINSTALL_WEBUI_PLUGIN_ROUTER, UPDATE_CORE_ROUTER, UPDATE_PLUGIN_ROUTER, UPDATE_TASK_STATUS_ROUTER, UPDATE_WEBUI_PLUGIN_VERSION_ROUTER, type UnionMessage, type UnregisterBot, type UpgradeDependenciesParams, type UserInfo, type ValidationRule, type ValueType, type VideoElement, type VideoSegment, WS_CLOSE, WS_CLOSE_ONEBOT, WS_CLOSE_PUPPETEER, WS_CLOSE_SANDBOX, WS_CONNECTION, WS_CONNECTION_ONEBOT, WS_CONNECTION_PUPPETEER, WS_CONNECTION_SANDBOX, WS_CONNECTION_TERMINAL, WS_SNAPKA, type WaitForOptions, Watch, Watcher, type WeatherElement, type XmlElement, type XmlSegment, type YamlComment, YamlEditor, type YamlValue, absPath, accordion, accordionItem, accordionPro, app, applyComments, authMiddleware, base64, buffer, buildGithub, buttonHandle, callRender, changelog, checkGitPluginUpdate, checkPkgUpdate, clearRequire, clearRequireFile, comment, index$1 as common, components, index as config, contact$1 as contact, contactDirect, contactFriend, contactGroup, contactGroupTemp, contactGuild, copyConfig, copyConfigSync, copyFiles, copyFilesSync, createAccessTokenExpiredResponse, createBadRequestResponse, createClient, createDirectMessage, createForbiddenResponse, createFriendDecreaseNotice, createFriendIncreaseNotice, createFriendMessage, createGroupAdminChangedNotice, createGroupApplyRequest, createGroupCardChangedNotice, createGroupFileUploadedNotice, createGroupHlightsChangedNotice, createGroupHonorChangedNotice, createGroupInviteRequest, createGroupLuckKingNotice, createGroupMemberAddNotice, createGroupMemberBanNotice, createGroupMemberDelNotice, createGroupMemberTitleUpdatedNotice, createGroupMessage, createGroupMessageReactionNotice, createGroupPokeNotice, createGroupRecallNotice, createGroupSignInNotice, createGroupTempMessage, createGroupWholeBanNotice, createGuildMessage, createHttp, createINIParser, createMethodNotAllowedResponse, createNotFoundResponse, createPayloadTooLargeResponse, createPluginDir, createPrivateApplyRequest, createPrivateFileUploadedNotice, createPrivatePokeNotice, createPrivateRecallNotice, createRawMessage, createReceiveLikeNotice, createRefreshTokenExpiredResponse, createResponse, createServerErrorResponse, createSuccessResponse, createTaskDatabase, createUnauthorizedResponse, cron, db, debug, karin as default, defineConfig, divider, downFile, downloadFile, errorToString, exec, executeTask, existToMkdir, existToMkdirSync, exists, existsSync, ffmpeg, ffplay, ffprobe, fs as file, fileToUrl, fileToUrlHandlerKey, filesByExt, formatPath, formatTime$1 as formatTime, index$3 as fs, getAllBot, getAllBotID, getAllBotList, getAllFiles, getAllFilesSync, getBot, getBotCount, getCommit, getDefaultBranch, getFastGithub, getFastRegistry, getFiles, getHash, getLocalBranches, getLocalCommitHash, getMimeType, getPackageJson, getPid, getPkgVersion, getPluginInfo, getPlugins, getRelPath, getRemoteBranches, getRemoteCommitHash, getRemotePkgVersion, getRender, getRenderCount, getRenderList, getRequestIp, getTaskCallback, getTaskDatabase, getTime, gitPull, handler$1 as handler, hooks, importModule, ini, initOneBot, initTaskSystem, input, isClass, isDir, isDirSync, isDocker, isFile, isFileSync, isIPv4Loop, isIPv6Loop, isLinux, isLocalRequest, isLoopback, isMac, isPathEqual, isPlugin, isPublic, isRoot, isSubPath, isWin, json$1 as json, karin, karinToQQBot, key, lock, lockMethod, lockProp, log, logger, logs, makeForward, makeMessage, type messageType, mkdir, mkdirSync, parseChangelog, parseGithubUrl, pingRequest, pkgRoot, qqbotToKarin, raceRequest, randomStr, range, read, readFile, readJson, readJsonSync, redis, registerBot, registerRender, removeTaskCallback, render, renderHtml, renderMultiHtml, renderTpl, requireFile, requireFileSync, restart, restartDirect, rmSync, router, satisfies, save, type screenshot, segment, sendMsg$1 as sendMsg, sender, senderDirect, senderFriend, senderGroup, senderGroupTemp, senderGuild, sep, server, setTaskCallback, setTaskDatabase, splitPath, start, stream, stringifyError, switchComponent, index$2 as system, taskAdd, taskExists, taskGet, taskList, taskSystem, taskUpdateLogs, taskUpdateStatus, unregisterBot, unregisterRender, updateAllGitPlugin, updateAllPkg, updateGitPlugin, updatePkg, updateTaskLogs, updateTaskStatus, uptime$1 as uptime, urlToPath, watch, watchAndMerge, write, writeJson, writeJsonSync, yaml };
13722
+ export { type Accept, type AccordionItemProps, type AccordionKV, type AccordionProProps, type AccordionProResult, type AccordionProps, type AccordionResult, type AccountInfo, type Adapter, AdapterBase, type AdapterCommunication, type AdapterInfo, AdapterOneBot, type AdapterOptions, type AdapterPlatform, type AdapterProtocol, type AdapterStandard, type AdapterType, type Adapters, type AddDependenciesParams, type AddTaskResult, type AfterForwardMessageCallback, type AfterMessageCallback, type AllPluginMethods, type AnonymousSegment, type Apps, type ArrayField, type AtElement, type AtSegment, type Author, BASE_ROUTER, BATCH_UPDATE_PLUGINS_ROUTER, type BaseContact, BaseEvent, type BaseEventOptions, type BaseEventType, type BaseForwardCallback, type BaseMessageCallback, type BasketballElement, Bot, type BoundingBox, type BubbleFaceElement, type Button, type ButtonElement, CHECK_PLUGIN_ROUTER, CLOSE_TERMINAL_ROUTER, CONSOLE_ROUTER, CREATE_TERMINAL_ROUTER, type Cache, type CacheEntry, type CheckboxField, type CheckboxGroupProps, type CheckboxProps, type CheckboxResult, type Children, type CmdFnc, type Command, type CommandClass, type ComponentConfig, type ComponentProps, type ComponentType, type Components, type ComponentsClass, type Config, type Contact, type ContactElement, type ContactSegment, type Count, type CreateGroupFolderResponse, type CreatePty, type CreateTask, type CreateTaskParams, type CreateTaskResult, type CronProps, type CustomMusicElement, type CustomMusicSegment, type CustomNodeElement, type CustomNodeSegments, type DbStreamStatus, type DbStreams, type DefineConfig, type DependenciesManage, type DependenciesManageBase, type Dependency, type DiceElement, type DiceSegment, type DirectContact, DirectMessage, type DirectMessageOptions, type DirectNodeElement, type DirectNodeSegment, type DirectSender, type DividerField, type DividerProps, type DownloadFileErrorResult, type DownloadFileOptions, type DownloadFileResponse, type DownloadFileResult, type DownloadFileSuccessResult, type DownloadFilesOptions, EVENT_COUNT, EXIT_ROUTER, type ElementTypes, type Elements, type Env, type Event, type EventCallCallback, type EventCallHookItem, type EventParent, type EventToSubEvent, type ExecOptions$1 as ExecOptions, type ExecReturn, type ExecType, type ExtendedAxiosRequestConfig, FILE_CHANGE, type FaceElement, type FaceSegment, type FieldType, type FileElement, type FileList, type FileListMap, type FileSegment, type FileToUrlHandler, type FileToUrlResult, type FormField, type ForwardMessageCallback, type ForwardOptions, type ForwardSegment, type FriendContact, type FriendData, FriendDecreaseNotice, type FriendDecreaseOptions, FriendIncreaseNotice, type FriendIncreaseOptions, FriendMessage, type FriendMessageOptions, type FriendNoticeEventMap, type FriendRequestEventMap, type FriendRequestOptions, type FriendSender, GET_BOTS_ROUTER, GET_CONFIG_ROUTER, GET_DEPENDENCIES_LIST_ROUTER, GET_LOADED_COMMAND_PLUGIN_CACHE_LIST_ROUTER, GET_LOCAL_PLUGIN_LIST_ROUTER, GET_LOG_FILE_LIST_ROUTER, GET_LOG_FILE_ROUTER, GET_LOG_ROUTER, GET_NETWORK_STATUS_ROUTER, GET_NPMRC_LIST_ROUTER, GET_NPM_BASE_CONFIG_ROUTER, GET_NPM_CONFIG_ROUTER, GET_ONLINE_PLUGIN_LIST_ROUTER, GET_PLUGIN_APPS_ROUTER, GET_PLUGIN_CONFIG_ROUTER, GET_PLUGIN_FILE_ROUTER, GET_PLUGIN_LIST_PLUGIN_ADMIN_ROUTER, GET_PLUGIN_LIST_ROUTER, GET_PLUGIN_MARKET_LIST_ROUTER, GET_TASK_LIST_ROUTER, GET_TASK_STATUS_ROUTER, GET_TERMINAL_LIST_ROUTER, GET_UPDATABLE_PLUGINS_ROUTER, GET_WEBUI_PLUGIN_LIST_ROUTER, GET_WEBUI_PLUGIN_VERSIONS_ROUTER, type GeneralHookCallback, type GeneralHookItem, type GetAtAllCountResponse, type GetBot, type GetCommitHashOptions, type GetConfigRequest, type GetConfigResponse, type GetGroupFileListResponse, type GetGroupFileSystemInfoResponse, type GetGroupHighlightsResponse, type GetGroupInfo, type GetGroupMemberInfo, type GetGroupMuteListResponse, type GetMsg, type GetPluginLocalOptions, type GetPluginLocalReturn, type GetPluginReturn, type GetPluginType, type GiftElement, type GitLocalBranches, type GitPullOptions, type GitPullResult, type GitRemoteBranches, type GithubConfig, type GoToOptions, GroupAdminChangedNotice, type GroupAdminChangedOptions, GroupApplyRequest, type GroupApplyRequestOptions, GroupCardChangedNotice, type GroupCardChangedOptions, type GroupContact, type GroupData, GroupFileUploadedNotice, type GroupFileUploadedOptions, GroupHlightsChangedNotice, type GroupHlightsChangedOptions, GroupHonorChangedNotice, type GroupHonorChangedOptions, type GroupInfo, GroupInviteRequest, type GroupInviteRequestOptions, GroupLuckKingNotice, type GroupLuckKingOptions, GroupMemberBanNotice, type GroupMemberBanOptions, type GroupMemberData, GroupMemberDecreaseNotice, type GroupMemberDecreaseOptions, GroupMemberIncreaseNotice, type GroupMemberIncreaseOptions, type GroupMemberInfo, GroupMemberTitleUpdatedNotice, type GroupMemberUniqueTitleChangedOptions, GroupMessage, type GroupMessageOptions, GroupMessageReactionNotice, type GroupMessageReactionOptions, GroupNotice, type GroupNoticeEventMap, GroupPokeNotice, type GroupPokeOptions, GroupRecallNotice, type GroupRecallOptions, type GroupRequestEventMap, type GroupSender, GroupSignInNotice, type GroupSignInOptions, type GroupTempContact, GroupTempMessage, type GroupTempMessageOptions, type GroupTempSender, GroupWholeBanNotice, type GroupWholeBanOptions, type Groups, type GroupsObjectValue, type GuildContact, GuildMessage, type GuildMessageOptions, type GuildSender, HTTPStatusCode, type Handler, type HandlerType, type HonorInfoList, type HookCache, type HookCallback, type HookEmitForward, type HookEmitMessage, type HookNext, type HookOptions, type HooksType, INSTALL_PLUGIN_ROUTER, INSTALL_WEBUI_PLUGIN_ROUTER, IS_PLUGIN_CONFIG_EXIST_ROUTER, type Icon, type ImageElement, type ImageSegment, type ImportModuleResult, type InputGroupProps, type InputProps, type InputResult, type JsonElement, type JsonSegment, type JwtVerifyBase, type JwtVerifyError, type JwtVerifyExpired, type JwtVerifyResult, type JwtVerifySuccess, type JwtVerifyUnauthorized, type KarinButton, type KarinPluginAppsType, type KeyboardElement, LOGIN_ROUTER, type LoadPluginResult, type LoadedPluginCacheList, type LocalApiResponse, type LocationElement, type LocationSegment, type Log, LogMethodNames, Logger, LoggerLevel, type LongMsgElement, MANAGE_DEPENDENCIES_ROUTER, type MarkdownElement, type MarkdownTplElement, type MarketFaceElement, type Message$2 as Message, MessageBase, type MessageEventMap, type MessageEventSub, type MessageHookItem, type MessageOptions, type MessageResponse, type MetaEventBase, type MusicElement, type MusicPlatform, type MusicSegment, type NetworkStatus, type NodeElement, type NormalMessageCallback, type Notice, type NoticeAndRequest, NoticeBase, type NoticeEventMap, type NoticeEventSub, type NoticeOptions, type NpmBaseConfigResponse, type NpmrcFileResponse, type NumberField, type OB11AllEvent, OB11ApiAction, type OB11ApiParams, type OB11ApiRequest, OB11Event, type OB11EventBase, type OB11FriendSender, type OB11GroupMessage, type OB11GroupSender, type OB11GroupTempMessage, type OB11Message, OB11MessageSubType, OB11MessageType, type OB11Meta, type OB11NodeSegment, type OB11Notice, type OB11NoticeBaseType, OB11NoticeType, type OB11OtherFriendMessage, type OB11PrivateMessage, type OB11Request, type OB11RequestBaseType, OB11RequestType, type OB11Segment, type OB11SegmentBase, type OB11SegmentType, OB11Sex, type OB11serInfo, type ObjectArrayField, type ObjectField, type OneBot11FriendAdd, type OneBot11FriendOfflineFile, type OneBot11FriendRecall, type OneBot11FriendRequest, type OneBot11GroupAdmin, type OneBot11GroupBan, type OneBot11GroupCard, type OneBot11GroupDecrease, type OneBot11GroupEssence, type OneBot11GroupIncrease, type OneBot11GroupMessageReaction, type OneBot11GroupMessageReactionLagrange, type OneBot11GroupRecall, type OneBot11GroupRequest, type OneBot11GroupUpload, type OneBot11Heartbeat, type OneBot11Honor, type OneBot11Lifecycle, type OneBot11LuckyKing, type OneBot11Poke, type Option, type Options, PING_ROUTER, PLUGIN_ADMIN_ROUTER, type PM2, type Package, type Parser, type PasmsgElement, type Permission, type PingRequestResult, type PkgData, type PkgEnv, type PkgInfo, Plugin$1 as Plugin, type PluginAdminCustomInstall, type PluginAdminCustomInstallApp, type PluginAdminInstall, type PluginAdminListResponse, type PluginAdminMarketInstall, type PluginAdminMarketInstallApp, type PluginAdminParams, type PluginAdminResult, type PluginAdminUninstall, type PluginAdminUpdate, type PluginFile, type PluginFncTypes, type PluginLists, type PluginMarketAuthor, type PluginMarketLocalBase, type PluginMarketLocalOptions, type PluginMarketOptions, type PluginMarketRequest, type PluginMarketResponse, type PluginOptions, type PluginRule, type PluginUpdateInfo, type PnpmDependencies, type PnpmDependency, type Point, type PokeSegment, PrivateApplyRequest, type PrivateApplyRequestOptions, PrivateFileUploadedNotice, type PrivateFileUploadedOptions, PrivatePokeNotice, type PrivatePokeOptions, PrivateRecallNotice, type PrivateRecallOptions, type Privates, type PrivatesObjectValue, type PuppeteerLifeCycleEvent, type QQBotButton, type QQButtonTextType, type QQGroupFileInfo, type QQGroupFolderInfo, type QQGroupHonorInfo, RECV_MSG, REFRESH_ROUTER, RESTART_ROUTER, type RaceResult, type Radio, type RadioField, type RadioGroupProps, type RadioResult, type RawElement, type ReadyMusicElement, ReceiveLikeNotice, type ReceiveLikeOptions, type RecordElement, type RecordSegment, type Redis, type RemoveDependenciesParams, type Render, type RenderResult, Renderer, type Renders$1 as Renders, type Reply, type ReplyElement, type ReplySegment, type Request, RequestBase, type RequestEventMap, type RequestEventSub, type RequestOptions, type RequireFunction, type RequireFunctionSync, type RequireOptions, type Role, type RpsElement, type RpsSegment, SAVE_CONFIG_ROUTER, SAVE_NPMRC_ROUTER, SAVE_PLUGIN_CONFIG_ROUTER, SEND_MSG, SET_LOG_LEVEL_ROUTER, SYSTEM_INFO_ROUTER, SYSTEM_STATUS_KARIN_ROUTER, SYSTEM_STATUS_ROUTER, SYSTEM_STATUS_WS_ROUTER, type SandBoxAccountInfo, type SandboxMsgRecord, type SandboxSendApi, type SandboxSendSendFriendMsg, type SandboxSendSendGroupMsg, type SandboxSendSendMsg, type SaveConfigResponse, type SaveResult, type Scene, type ScreenshotClip, type ScreenshotOptions, type SectionField, type Segment, type SelectField, type SendElement, type SendForwardMessageResponse, type SendMessage, type SendMsgHookItem, type SendMsgResults, type Sender, type SenderBase, type SenderGroup, type Sex, type ShakeSegment, type ShareElement, type ShareSegment, type Snapka, type SnapkaResult, type SrcReply, type StandardResult, type SwitchField, type SwitchProps, type SwitchResult, TASK_DELETE_ROUTER, TASK_LIST_ROUTER, TASK_LOGS_ROUTER, TASK_RUN_ROUTER, type Task, type TaskCallbacks, type TaskEntity, type TaskExecutor, type TaskFilter, type TaskStatus, type TaskType, type TerminalInstance, type TerminalShell, type TestNetworkRequestDetail, type TextElement, type TextField, type TextSegment, type TitleField, UNINSTALL_PLUGIN_ROUTER, UNINSTALL_WEBUI_PLUGIN_ROUTER, UPDATE_CORE_ROUTER, UPDATE_PLUGIN_ROUTER, UPDATE_TASK_STATUS_ROUTER, UPDATE_WEBUI_PLUGIN_VERSION_ROUTER, type UnionMessage, type UnregisterBot, type UpgradeDependenciesParams, type UserInfo, type ValidationRule, type ValueType, type VideoElement, type VideoSegment, WS_CLOSE, WS_CLOSE_ONEBOT, WS_CLOSE_PUPPETEER, WS_CLOSE_SANDBOX, WS_CONNECTION, WS_CONNECTION_ONEBOT, WS_CONNECTION_PUPPETEER, WS_CONNECTION_SANDBOX, WS_CONNECTION_TERMINAL, WS_SNAPKA, type WaitForOptions, Watch, Watcher, type WeatherElement, type XmlElement, type XmlSegment, type YamlComment, YamlEditor, type YamlValue, absPath, accordion, accordionItem, accordionPro, app, applyComments, authMiddleware, base64, buffer, buildGithub, buttonHandle, callRender, changelog, checkGitPluginUpdate, checkPkgUpdate, checkPort, clearRequire, clearRequireFile, comment, index$1 as common, components, index as config, contact$1 as contact, contactDirect, contactFriend, contactGroup, contactGroupTemp, contactGuild, copyConfig, copyConfigSync, copyFiles, copyFilesSync, createAccessTokenExpiredResponse, createBadRequestResponse, createClient, createDirectMessage, createForbiddenResponse, createFriendDecreaseNotice, createFriendIncreaseNotice, createFriendMessage, createGroupAdminChangedNotice, createGroupApplyRequest, createGroupCardChangedNotice, createGroupFileUploadedNotice, createGroupHlightsChangedNotice, createGroupHonorChangedNotice, createGroupInviteRequest, createGroupLuckKingNotice, createGroupMemberAddNotice, createGroupMemberBanNotice, createGroupMemberDelNotice, createGroupMemberTitleUpdatedNotice, createGroupMessage, createGroupMessageReactionNotice, createGroupPokeNotice, createGroupRecallNotice, createGroupSignInNotice, createGroupTempMessage, createGroupWholeBanNotice, createGuildMessage, createHttp, createINIParser, createMethodNotAllowedResponse, createNotFoundResponse, createPayloadTooLargeResponse, createPluginDir, createPrivateApplyRequest, createPrivateFileUploadedNotice, createPrivatePokeNotice, createPrivateRecallNotice, createRawMessage, createReceiveLikeNotice, createRefreshTokenExpiredResponse, createResponse, createServerErrorResponse, createSuccessResponse, createTaskDatabase, createUnauthorizedResponse, cron, db, debug, karin as default, defineConfig, divider, downFile, downloadFile, errorToString, exec, executeTask, existToMkdir, existToMkdirSync, exists, existsSync, ffmpeg, ffplay, ffprobe, fs as file, fileToUrl, fileToUrlHandlerKey, filesByExt, formatPath, formatTime$1 as formatTime, index$3 as fs, getAllBot, getAllBotID, getAllBotList, getAllFiles, getAllFilesSync, getBot, getBotCount, getCommit, getDefaultBranch, getFastGithub, getFastRegistry, getFiles, getHash, getLocalBranches, getLocalCommitHash, getMimeType, getPackageJson, getPid, getPkgVersion, getPluginInfo, getPlugins, getRelPath, getRemoteBranches, getRemoteCommitHash, getRemotePkgVersion, getRender, getRenderCount, getRenderList, getRequestIp, getTaskCallback, getTaskDatabase, getTime, gitPull, handler$1 as handler, hooks, importModule, ini, initOneBot, initTaskSystem, input, isClass, isDir, isDirSync, isDocker, isFile, isFileSync, isIPv4Loop, isIPv6Loop, isLinux, isLocalRequest, isLoopback, isMac, isPathEqual, isPlugin, isPublic, isRoot, isSubPath, isWin, json$1 as json, karin, karinToQQBot, key, killApp, lock, lockMethod, lockProp, log, logger, logs, makeForward, makeMessage, type messageType, mkdir, mkdirSync, parseChangelog, parseGithubUrl, pingRequest, pkgRoot, qqbotToKarin, raceRequest, randomStr, range, read, readFile, readJson, readJsonSync, redis, registerBot, registerRender, removeTaskCallback, render, renderHtml, renderMultiHtml, renderTpl, requireFile, requireFileSync, restart, restartDirect, rmSync, router, satisfies, save, type screenshot, segment, sendMsg$1 as sendMsg, sender, senderDirect, senderFriend, senderGroup, senderGroupTemp, senderGuild, sep, server, setTaskCallback, setTaskDatabase, splitPath, start, stream, stringifyError, switchComponent, index$2 as system, taskAdd, taskExists, taskGet, taskList, taskSystem, taskUpdateLogs, taskUpdateStatus, unregisterBot, unregisterRender, updateAllGitPlugin, updateAllPkg, updateGitPlugin, updatePkg, updateTaskLogs, updateTaskStatus, uptime$1 as uptime, urlToPath, waitPort, watch, watchAndMerge, write, writeJson, writeJsonSync, yaml };
package/dist/index.mjs CHANGED
@@ -22,6 +22,7 @@ import os, { homedir } from 'node:os';
22
22
  import chalk2 from 'chalk';
23
23
  import log4js from 'log4js';
24
24
  import { lookup } from 'dns/promises';
25
+ import { createServer as createServer$1 } from 'node:net';
25
26
  import sqlite3 from 'sqlite3';
26
27
  import WebSocket$1, { WebSocket, WebSocketServer } from 'ws';
27
28
  import require$$02 from 'buffer';
@@ -29,7 +30,6 @@ import require$$32 from 'stream';
29
30
  import require$$5 from 'util';
30
31
  import template from 'art-template';
31
32
  import schedule from 'node-schedule';
32
- import { createServer as createServer$1 } from 'node:net';
33
33
  import moment from 'moment';
34
34
  import { createClient } from 'redis';
35
35
  import express2, { Router } from 'express';
@@ -9996,11 +9996,12 @@ var init_pid = __esm({
9996
9996
  getPid = async (port2) => {
9997
9997
  const command2 = isWin2 ? `netstat -ano | findstr :${port2}` : `lsof -i:${port2} | grep LISTEN | awk '{print $2}'`;
9998
9998
  const { stdout } = await exec(command2);
9999
+ if (!stdout) return null;
9999
10000
  if (isWin2) {
10000
10001
  const pid = stdout.toString().split(/\s+/).filter(Boolean).pop();
10001
- return Number(pid);
10002
+ return isNaN(Number(pid)) ? null : Number(pid);
10002
10003
  }
10003
- return Number(stdout);
10004
+ return isNaN(Number(stdout)) ? null : Number(stdout);
10004
10005
  };
10005
10006
  }
10006
10007
  });
@@ -10048,6 +10049,56 @@ var init_class = __esm({
10048
10049
  }
10049
10050
  });
10050
10051
 
10052
+ // src/utils/common/sleep.ts
10053
+ var sleep;
10054
+ var init_sleep = __esm({
10055
+ "src/utils/common/sleep.ts"() {
10056
+ sleep = (ms2) => new Promise((resolve) => setTimeout(resolve, ms2));
10057
+ }
10058
+ });
10059
+ var checkPort, waitPort, killApp;
10060
+ var init_port = __esm({
10061
+ "src/utils/system/port.ts"() {
10062
+ init_sleep();
10063
+ init_exec();
10064
+ init_pid();
10065
+ init_system();
10066
+ checkPort = (port2) => {
10067
+ return new Promise((resolve) => {
10068
+ const server2 = createServer$1();
10069
+ server2.once("error", () => {
10070
+ server2.close();
10071
+ resolve(false);
10072
+ });
10073
+ server2.once("listening", () => {
10074
+ server2.close();
10075
+ resolve(true);
10076
+ });
10077
+ server2.listen(port2, "127.0.0.1");
10078
+ });
10079
+ };
10080
+ waitPort = async (port2, maxAttempts = 30, interval = 1e3) => {
10081
+ for (let attempt = 0; attempt < maxAttempts; attempt++) {
10082
+ const available = await checkPort(port2);
10083
+ if (available) {
10084
+ return true;
10085
+ }
10086
+ logger.debug(`\u7AEF\u53E3 ${port2} \u88AB\u5360\u7528\uFF0C\u7B49\u5F85\u91CA\u653E... (${attempt + 1}/${maxAttempts})`);
10087
+ await sleep(interval);
10088
+ }
10089
+ return false;
10090
+ };
10091
+ killApp = async (identifier, isPort = false) => {
10092
+ const pid = isPort ? await getPid(Number(identifier)) : Number(identifier);
10093
+ if (!pid) return false;
10094
+ const command2 = isWin2 ? `taskkill /F /PID ${pid}` : `kill -9 ${pid}`;
10095
+ const { stderr } = await exec(command2);
10096
+ if (stderr) return false;
10097
+ return true;
10098
+ };
10099
+ }
10100
+ });
10101
+
10051
10102
  // src/utils/system/import.ts
10052
10103
  var importModule;
10053
10104
  var init_import = __esm({
@@ -11204,7 +11255,7 @@ var restart, restartDirect;
11204
11255
  var init_restart = __esm({
11205
11256
  "src/utils/system/restart.ts"() {
11206
11257
  init_exec();
11207
- restart = async (selfId, contact3, messageId, isFront = true) => {
11258
+ restart = async (selfId, contact3, messageId, isFront = true, reloadDeps = false) => {
11208
11259
  const options = {
11209
11260
  selfId,
11210
11261
  contact: contact3,
@@ -11216,11 +11267,7 @@ var init_restart = __esm({
11216
11267
  const db2 = await createDB2();
11217
11268
  await db2.set(key, options);
11218
11269
  if (isFront && process.send) {
11219
- process.send(JSON.stringify({
11220
- type: "restart",
11221
- port: process.env.HTTP_PORT,
11222
- token: process.env.HTTP_AUTH_KEY
11223
- }));
11270
+ process.send(JSON.stringify({ type: "restart", reloadDeps }));
11224
11271
  return { status: "success", data: "\u5DF2\u53D1\u9001\u91CD\u542F\u4FE1\u53F7" };
11225
11272
  }
11226
11273
  if (process.env.PM2_RESTART !== "true") process.exit();
@@ -11233,16 +11280,13 @@ var init_restart = __esm({
11233
11280
  if (error) return { status: "failed", data: error };
11234
11281
  process.exit();
11235
11282
  };
11236
- restartDirect = async (isPm2 = false) => {
11283
+ restartDirect = async (options) => {
11284
+ const { isPm2 = false, reloadDeps = false } = options || {};
11237
11285
  logger.mark("\u6536\u5230\u91CD\u542F\u8BF7\u6C42\uFF0C\u6B63\u5728\u91CD\u542F...");
11238
11286
  if (!isPm2 && process?.send) {
11239
- process.send(JSON.stringify({
11240
- type: "restart",
11241
- port: process.env.HTTP_PORT,
11242
- token: process.env.HTTP_AUTH_KEY
11243
- }));
11244
- logger.mark("\u6B63\u5728\u901A\u77E5\u7236\u8FDB\u7A0B\u91CD\u542F...");
11245
- process.exit(0);
11287
+ process.send(JSON.stringify({ type: "restart", reloadDeps }));
11288
+ logger.debug("\u6B63\u5728\u901A\u77E5\u7236\u8FDB\u7A0B\u91CD\u542F...");
11289
+ return;
11246
11290
  }
11247
11291
  if (process.env.RUNTIME === "pm2") {
11248
11292
  if (process.env.PM2_RESTART !== "true") process.exit();
@@ -11444,8 +11488,8 @@ var init_range = __esm({
11444
11488
  return comparison === 0;
11445
11489
  }
11446
11490
  };
11447
- satisfies = (range3, version2) => {
11448
- const conditions = range3.split(" ");
11491
+ satisfies = (satisfies2, version2) => {
11492
+ const conditions = satisfies2.split(" ");
11449
11493
  return conditions.every((condition) => satisfiesCondition(version2, condition));
11450
11494
  };
11451
11495
  }
@@ -11456,6 +11500,7 @@ var system_exports = {};
11456
11500
  __export(system_exports, {
11457
11501
  checkGitPluginUpdate: () => checkGitPluginUpdate,
11458
11502
  checkPkgUpdate: () => checkPkgUpdate,
11503
+ checkPort: () => checkPort,
11459
11504
  errorToString: () => errorToString,
11460
11505
  exec: () => exec,
11461
11506
  ffmpeg: () => ffmpeg,
@@ -11482,6 +11527,10 @@ __export(system_exports, {
11482
11527
  isMac: () => isMac,
11483
11528
  isRoot: () => isRoot,
11484
11529
  isWin: () => isWin2,
11530
+ killApp: () => killApp,
11531
+ lock: () => lock,
11532
+ lockMethod: () => lockMethod,
11533
+ lockProp: () => lockProp,
11485
11534
  restart: () => restart,
11486
11535
  restartDirect: () => restartDirect,
11487
11536
  satisfies: () => satisfies,
@@ -11490,7 +11539,8 @@ __export(system_exports, {
11490
11539
  updateAllPkg: () => updateAllPkg,
11491
11540
  updateGitPlugin: () => updateGitPlugin,
11492
11541
  updatePkg: () => updatePkg,
11493
- uptime: () => uptime
11542
+ uptime: () => uptime,
11543
+ waitPort: () => waitPort
11494
11544
  });
11495
11545
  var init_system2 = __esm({
11496
11546
  "src/utils/system/index.ts"() {
@@ -11500,8 +11550,10 @@ var init_system2 = __esm({
11500
11550
  init_time();
11501
11551
  init_class();
11502
11552
  init_error();
11553
+ init_port();
11503
11554
  init_ffmpeg();
11504
11555
  init_import();
11556
+ init_lock();
11505
11557
  init_system();
11506
11558
  init_update();
11507
11559
  init_restart();
@@ -16337,14 +16389,6 @@ var init_string = __esm({
16337
16389
  }
16338
16390
  });
16339
16391
 
16340
- // src/utils/common/sleep.ts
16341
- var sleep;
16342
- var init_sleep = __esm({
16343
- "src/utils/common/sleep.ts"() {
16344
- sleep = (ms2) => new Promise((resolve) => setTimeout(resolve, ms2));
16345
- }
16346
- });
16347
-
16348
16392
  // src/utils/common/uptime.ts
16349
16393
  var uptime2;
16350
16394
  var init_uptime = __esm({
@@ -17789,37 +17833,6 @@ var init_file2 = __esm({
17789
17833
  };
17790
17834
  }
17791
17835
  });
17792
- var checkPort, waitPort;
17793
- var init_port = __esm({
17794
- "src/utils/system/port.ts"() {
17795
- init_sleep();
17796
- checkPort = (port2) => {
17797
- return new Promise((resolve) => {
17798
- const server2 = createServer$1();
17799
- server2.once("error", () => {
17800
- server2.close();
17801
- resolve(false);
17802
- });
17803
- server2.once("listening", () => {
17804
- server2.close();
17805
- resolve(true);
17806
- });
17807
- server2.listen(port2, "127.0.0.1");
17808
- });
17809
- };
17810
- waitPort = async (port2, maxAttempts = 30, interval = 1e3) => {
17811
- for (let attempt = 0; attempt < maxAttempts; attempt++) {
17812
- const available = await checkPort(port2);
17813
- if (available) {
17814
- return true;
17815
- }
17816
- logger.debug(`\u7AEF\u53E3 ${port2} \u88AB\u5360\u7528\uFF0C\u7B49\u5F85\u91CA\u653E... (${attempt + 1}/${maxAttempts})`);
17817
- await sleep(interval);
17818
- }
17819
- return false;
17820
- };
17821
- }
17822
- });
17823
17836
 
17824
17837
  // src/server/router/router.ts
17825
17838
  var BASE_ROUTER, LOGIN_ROUTER, REFRESH_ROUTER, GET_CONFIG_ROUTER, SAVE_CONFIG_ROUTER, GET_LOG_ROUTER, SET_LOG_LEVEL_ROUTER, GET_LOG_FILE_LIST_ROUTER, GET_LOG_FILE_ROUTER, EXIT_ROUTER, RESTART_ROUTER, GET_NETWORK_STATUS_ROUTER, UPDATE_CORE_ROUTER, GET_BOTS_ROUTER, CONSOLE_ROUTER, PING_ROUTER, SYSTEM_STATUS_ROUTER, SYSTEM_INFO_ROUTER, SYSTEM_STATUS_WS_ROUTER, SYSTEM_STATUS_KARIN_ROUTER, GET_ONLINE_PLUGIN_LIST_ROUTER, GET_PLUGIN_LIST_ROUTER, GET_PLUGIN_APPS_ROUTER, GET_PLUGIN_FILE_ROUTER, GET_UPDATABLE_PLUGINS_ROUTER, BATCH_UPDATE_PLUGINS_ROUTER, GET_PLUGIN_CONFIG_ROUTER, SAVE_PLUGIN_CONFIG_ROUTER, IS_PLUGIN_CONFIG_EXIST_ROUTER, UPDATE_PLUGIN_ROUTER, INSTALL_PLUGIN_ROUTER, UNINSTALL_PLUGIN_ROUTER, GET_TASK_STATUS_ROUTER, GET_TASK_LIST_ROUTER, UPDATE_TASK_STATUS_ROUTER, GET_LOCAL_PLUGIN_LIST_ROUTER, CREATE_TERMINAL_ROUTER, GET_TERMINAL_LIST_ROUTER, CLOSE_TERMINAL_ROUTER, CHECK_PLUGIN_ROUTER, INSTALL_WEBUI_PLUGIN_ROUTER, GET_WEBUI_PLUGIN_LIST_ROUTER, UNINSTALL_WEBUI_PLUGIN_ROUTER, GET_WEBUI_PLUGIN_VERSIONS_ROUTER, UPDATE_WEBUI_PLUGIN_VERSION_ROUTER, TASK_LIST_ROUTER, TASK_RUN_ROUTER, TASK_LOGS_ROUTER, TASK_DELETE_ROUTER, PLUGIN_ADMIN_ROUTER, GET_PLUGIN_LIST_PLUGIN_ADMIN_ROUTER, GET_DEPENDENCIES_LIST_ROUTER, MANAGE_DEPENDENCIES_ROUTER, GET_NPMRC_LIST_ROUTER, GET_NPM_CONFIG_ROUTER, GET_NPM_BASE_CONFIG_ROUTER, SAVE_NPMRC_ROUTER, GET_LOADED_COMMAND_PLUGIN_CACHE_LIST_ROUTER, GET_PLUGIN_MARKET_LIST_ROUTER;
@@ -20740,9 +20753,13 @@ var init_manage = __esm({
20740
20753
  init_restart();
20741
20754
  init_response();
20742
20755
  restartRouter = async (req, res) => {
20743
- const { isPm2 } = req.body;
20744
- createSuccessResponse(res, null, "\u91CD\u542F\u6307\u4EE4\u53D1\u9001\u6210\u529F");
20745
- restartDirect(isPm2 ?? false);
20756
+ try {
20757
+ const { isPm2 = false, reloadDeps = false } = req.body;
20758
+ restartDirect({ isPm2, reloadDeps });
20759
+ createSuccessResponse(res, null, "\u91CD\u542F\u6307\u4EE4\u53D1\u9001\u6210\u529F");
20760
+ } catch (error) {
20761
+ createServerErrorResponse(res, error.message);
20762
+ }
20746
20763
  };
20747
20764
  exitRouter = async (_req, res) => {
20748
20765
  logger.mark("\u6536\u5230\u9000\u51FA\u8BF7\u6C42\uFF0C\u6B63\u5728\u9000\u51FA...");
@@ -24002,17 +24019,11 @@ var init_input = __esm({
24002
24019
  }
24003
24020
  }
24004
24021
  if (text2 === "rs" || text2 === "restart") {
24005
- process.send(JSON.stringify({
24006
- type: "restart",
24007
- port: process.env.HTTP_PORT,
24008
- token: process.env.HTTP_AUTH_KEY
24009
- }));
24022
+ process.send(JSON.stringify({ type: "restart" }));
24010
24023
  return;
24011
24024
  }
24012
24025
  if (text2 === "stop") {
24013
- process.send(JSON.stringify({
24014
- type: "stop"
24015
- }));
24026
+ process.send(JSON.stringify({ type: "stop" }));
24016
24027
  return;
24017
24028
  }
24018
24029
  if (text2.startsWith("group")) {
@@ -24558,9 +24569,9 @@ var initPluginHmr = async () => {
24558
24569
  return path4.relative(process.cwd(), dir2).replace(/\\/g, "/");
24559
24570
  });
24560
24571
  watchDirs.clear();
24561
- logger.info(`
24572
+ relativePaths.length ? logger.info(`
24562
24573
  [hmr] ${logger.magenta("\u6B63\u5728\u76D1\u542C\u6587\u4EF6\u5939")}:
24563
- ${relativePaths.join("\n")}`);
24574
+ ${relativePaths.join("\n ")}`) : logger.info("[hmr] \u5F53\u524D\u76D1\u542C\u7684\u63D2\u4EF6\u5217\u8868\u4E3A\u7A7A");
24564
24575
  };
24565
24576
  var handleFileChange = async (file2, action) => {
24566
24577
  const ext = path4.extname(file2);
@@ -25817,4 +25828,4 @@ var start2 = async () => {
25817
25828
  (*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
25818
25829
  */
25819
25830
 
25820
- export { AdapterBase, BASE_ROUTER, BATCH_UPDATE_PLUGINS_ROUTER, BaseEvent, Bot, CHECK_PLUGIN_ROUTER, CLOSE_TERMINAL_ROUTER, CONSOLE_ROUTER, CREATE_TERMINAL_ROUTER, DirectMessage, EVENT_COUNT, EXIT_ROUTER, FILE_CHANGE, FriendDecreaseNotice, FriendIncreaseNotice, FriendMessage, GET_BOTS_ROUTER, GET_CONFIG_ROUTER, GET_DEPENDENCIES_LIST_ROUTER, GET_LOADED_COMMAND_PLUGIN_CACHE_LIST_ROUTER, GET_LOCAL_PLUGIN_LIST_ROUTER, GET_LOG_FILE_LIST_ROUTER, GET_LOG_FILE_ROUTER, GET_LOG_ROUTER, GET_NETWORK_STATUS_ROUTER, GET_NPMRC_LIST_ROUTER, GET_NPM_BASE_CONFIG_ROUTER, GET_NPM_CONFIG_ROUTER, GET_ONLINE_PLUGIN_LIST_ROUTER, GET_PLUGIN_APPS_ROUTER, GET_PLUGIN_CONFIG_ROUTER, GET_PLUGIN_FILE_ROUTER, GET_PLUGIN_LIST_PLUGIN_ADMIN_ROUTER, GET_PLUGIN_LIST_ROUTER, GET_PLUGIN_MARKET_LIST_ROUTER, GET_TASK_LIST_ROUTER, GET_TASK_STATUS_ROUTER, GET_TERMINAL_LIST_ROUTER, GET_UPDATABLE_PLUGINS_ROUTER, GET_WEBUI_PLUGIN_LIST_ROUTER, GET_WEBUI_PLUGIN_VERSIONS_ROUTER, GroupAdminChangedNotice, GroupApplyRequest, GroupCardChangedNotice, GroupFileUploadedNotice, GroupHlightsChangedNotice, GroupHonorChangedNotice, GroupInviteRequest, GroupLuckKingNotice, GroupMemberBanNotice, GroupMemberDecreaseNotice, GroupMemberIncreaseNotice, GroupMemberTitleUpdatedNotice, GroupMessage, GroupMessageReactionNotice, GroupNotice, GroupPokeNotice, GroupRecallNotice, GroupSignInNotice, GroupTempMessage, GroupWholeBanNotice, GuildMessage, HTTPStatusCode, INSTALL_PLUGIN_ROUTER, INSTALL_WEBUI_PLUGIN_ROUTER, IS_PLUGIN_CONFIG_EXIST_ROUTER, LOGIN_ROUTER, MANAGE_DEPENDENCIES_ROUTER, MessageBase, NoticeBase, OB11ApiAction, OB11Event, OB11MessageSubType, OB11MessageType, OB11NoticeType, OB11RequestType, OB11Sex, PING_ROUTER, PLUGIN_ADMIN_ROUTER, Plugin, PrivateApplyRequest, PrivateFileUploadedNotice, PrivatePokeNotice, PrivateRecallNotice, RECV_MSG, REFRESH_ROUTER, RESTART_ROUTER, ReceiveLikeNotice, Renderer, RequestBase, SAVE_CONFIG_ROUTER, SAVE_NPMRC_ROUTER, SAVE_PLUGIN_CONFIG_ROUTER, SEND_MSG, SET_LOG_LEVEL_ROUTER, SYSTEM_INFO_ROUTER, SYSTEM_STATUS_KARIN_ROUTER, SYSTEM_STATUS_ROUTER, SYSTEM_STATUS_WS_ROUTER, TASK_DELETE_ROUTER, TASK_LIST_ROUTER, TASK_LOGS_ROUTER, TASK_RUN_ROUTER, UNINSTALL_PLUGIN_ROUTER, UNINSTALL_WEBUI_PLUGIN_ROUTER, UPDATE_CORE_ROUTER, UPDATE_PLUGIN_ROUTER, UPDATE_TASK_STATUS_ROUTER, UPDATE_WEBUI_PLUGIN_VERSION_ROUTER, WS_CLOSE, WS_CLOSE_ONEBOT, WS_CLOSE_PUPPETEER, WS_CLOSE_SANDBOX, WS_CONNECTION, WS_CONNECTION_ONEBOT, WS_CONNECTION_PUPPETEER, WS_CONNECTION_SANDBOX, WS_CONNECTION_TERMINAL, WS_SNAPKA, Watch, Watcher, YamlEditor, absPath, accordion, accordionItem, accordionPro, app3 as app, applyComments, authMiddleware, base64, basePath, buffer, buildGithub, buttonHandle, callRender, changelog_exports as changelog, checkGitPluginUpdate, checkPkgUpdate, clearRequire, clearRequireFile, comment, commentPath, common_exports as common, components, config_exports as config, configPath, consolePath, contact2 as contact, contactDirect, contactFriend, contactGroup, contactGroupTemp, contactGuild, copyConfig, copyConfigSync, copyFiles, copyFilesSync, createAccessTokenExpiredResponse, createBadRequestResponse, createClient2 as createClient, createDirectMessage, createForbiddenResponse, createFriendDecreaseNotice, createFriendIncreaseNotice, createFriendMessage, createGroupAdminChangedNotice, createGroupApplyRequest, createGroupCardChangedNotice, createGroupFileUploadedNotice, createGroupHlightsChangedNotice, createGroupHonorChangedNotice, createGroupInviteRequest, createGroupLuckKingNotice, createGroupMemberAddNotice, createGroupMemberBanNotice, createGroupMemberDelNotice, createGroupMemberTitleUpdatedNotice, createGroupMessage, createGroupMessageReactionNotice, createGroupPokeNotice, createGroupRecallNotice, createGroupSignInNotice, createGroupTempMessage, createGroupWholeBanNotice, createGuildMessage, createHttp, createINIParser, createMethodNotAllowedResponse, createNotFoundResponse, createPayloadTooLargeResponse, createPluginDir, createPrivateApplyRequest, createPrivateFileUploadedNotice, createPrivatePokeNotice, createPrivateRecallNotice, createRawMessage, createReceiveLikeNotice, createRefreshTokenExpiredResponse, createResponse, createServerErrorResponse, createSuccessResponse, createTaskDatabase, createUnauthorizedResponse, cron, dataPath, db, dbPath, debug2 as debug, karin as default, defaultConfigPath, defaultViewPath, defineConfig, divider, downFile, downloadFile, errorToString, exec, executeTask, existToMkdir, existToMkdirSync, exists, existsSync, ffmpeg, ffplay, ffprobe, fs_exports as file, fileToUrl, fileToUrlHandlerKey, filesByExt, formatPath, formatTime, fs_exports2 as fs, getAllBot, getAllBotID, getAllBotList, getAllFiles, getAllFilesSync, getBot, getBotCount, getCommit, getDefaultBranch, getFastGithub, getFastRegistry, getFiles, getHash, getLocalBranches, getLocalCommitHash, getMimeType, getPackageJson, getPid, getPkgVersion, getPluginInfo, getPlugins, getRelPath, getRemoteBranches, getRemoteCommitHash, getRemotePkgVersion, getRender, getRenderCount, getRenderList, getRequestIp, getTaskCallback, getTaskDatabase, getTime, gitPull, handler, hooks, htmlPath, importModule, ini, initOneBot, initTaskSystem, input, isClass, isDir, isDirSync, isDocker, isFile, isFileSync, isIPv4Loop, isIPv6Loop, isLinux, isLocalRequest, isLoopback, isMac, isPackaged, isPathEqual, isPkg, isPlugin, isPublic, isRoot, isSubPath, isWin2 as isWin, json, karin, karinDir, karinMain, karinPathBase, karinPathComment, karinPathConfig, karinPathConsole, karinPathData, karinPathDb, karinPathDefaultConfig, karinPathDefaultView, karinPathHtml, karinPathKv, karinPathLogs, karinPathMain, karinPathPlugins, karinPathPm2Config, karinPathRedisSqlite3, karinPathResource, karinPathRoot, karinPathSandboxData, karinPathSandboxTemp, karinPathTaskDb, karinPathTemp, karinToQQBot, key_exports as key, kvPath, lock, lockMethod, lockProp, log, logger2 as logger, logs, logsPath, makeForward, makeMessage, mkdir, mkdirSync, parseChangelog, parseGithubUrl, pingRequest, pkgRoot, pluginDir, pm2Path, qqbotToKarin, raceRequest, randomStr, range, read, readFile, readJson, readJsonSync, redis2 as redis, redisSqlite3Path, registerBot, registerRender, removeTaskCallback, render, renderHtml, renderMultiHtml, renderTpl, requireFile, requireFileSync, resourcePath, restart, restartDirect, rmSync, router, sandboxDataPath, sandboxTempPath, satisfies, save, segment_exports as segment, sendMsg2 as sendMsg, sender, senderDirect, senderFriend, senderGroup, senderGroupTemp, senderGuild, sep, server, setTaskCallback, setTaskDatabase, splitPath, start2 as start, stream, stringifyError, switchComponent, system_exports as system, taskAdd, taskExists, taskGet, taskList, taskSystem, taskUpdateLogs, taskUpdateStatus, tempPath, unregisterBot, unregisterRender, updateAllGitPlugin, updateAllPkg, updateGitPlugin, updatePkg, updateTaskLogs, updateTaskStatus, uptime, urlToPath, watch, watchAndMerge, write, writeJson, writeJsonSync, yaml3 as yaml };
25831
+ export { AdapterBase, BASE_ROUTER, BATCH_UPDATE_PLUGINS_ROUTER, BaseEvent, Bot, CHECK_PLUGIN_ROUTER, CLOSE_TERMINAL_ROUTER, CONSOLE_ROUTER, CREATE_TERMINAL_ROUTER, DirectMessage, EVENT_COUNT, EXIT_ROUTER, FILE_CHANGE, FriendDecreaseNotice, FriendIncreaseNotice, FriendMessage, GET_BOTS_ROUTER, GET_CONFIG_ROUTER, GET_DEPENDENCIES_LIST_ROUTER, GET_LOADED_COMMAND_PLUGIN_CACHE_LIST_ROUTER, GET_LOCAL_PLUGIN_LIST_ROUTER, GET_LOG_FILE_LIST_ROUTER, GET_LOG_FILE_ROUTER, GET_LOG_ROUTER, GET_NETWORK_STATUS_ROUTER, GET_NPMRC_LIST_ROUTER, GET_NPM_BASE_CONFIG_ROUTER, GET_NPM_CONFIG_ROUTER, GET_ONLINE_PLUGIN_LIST_ROUTER, GET_PLUGIN_APPS_ROUTER, GET_PLUGIN_CONFIG_ROUTER, GET_PLUGIN_FILE_ROUTER, GET_PLUGIN_LIST_PLUGIN_ADMIN_ROUTER, GET_PLUGIN_LIST_ROUTER, GET_PLUGIN_MARKET_LIST_ROUTER, GET_TASK_LIST_ROUTER, GET_TASK_STATUS_ROUTER, GET_TERMINAL_LIST_ROUTER, GET_UPDATABLE_PLUGINS_ROUTER, GET_WEBUI_PLUGIN_LIST_ROUTER, GET_WEBUI_PLUGIN_VERSIONS_ROUTER, GroupAdminChangedNotice, GroupApplyRequest, GroupCardChangedNotice, GroupFileUploadedNotice, GroupHlightsChangedNotice, GroupHonorChangedNotice, GroupInviteRequest, GroupLuckKingNotice, GroupMemberBanNotice, GroupMemberDecreaseNotice, GroupMemberIncreaseNotice, GroupMemberTitleUpdatedNotice, GroupMessage, GroupMessageReactionNotice, GroupNotice, GroupPokeNotice, GroupRecallNotice, GroupSignInNotice, GroupTempMessage, GroupWholeBanNotice, GuildMessage, HTTPStatusCode, INSTALL_PLUGIN_ROUTER, INSTALL_WEBUI_PLUGIN_ROUTER, IS_PLUGIN_CONFIG_EXIST_ROUTER, LOGIN_ROUTER, MANAGE_DEPENDENCIES_ROUTER, MessageBase, NoticeBase, OB11ApiAction, OB11Event, OB11MessageSubType, OB11MessageType, OB11NoticeType, OB11RequestType, OB11Sex, PING_ROUTER, PLUGIN_ADMIN_ROUTER, Plugin, PrivateApplyRequest, PrivateFileUploadedNotice, PrivatePokeNotice, PrivateRecallNotice, RECV_MSG, REFRESH_ROUTER, RESTART_ROUTER, ReceiveLikeNotice, Renderer, RequestBase, SAVE_CONFIG_ROUTER, SAVE_NPMRC_ROUTER, SAVE_PLUGIN_CONFIG_ROUTER, SEND_MSG, SET_LOG_LEVEL_ROUTER, SYSTEM_INFO_ROUTER, SYSTEM_STATUS_KARIN_ROUTER, SYSTEM_STATUS_ROUTER, SYSTEM_STATUS_WS_ROUTER, TASK_DELETE_ROUTER, TASK_LIST_ROUTER, TASK_LOGS_ROUTER, TASK_RUN_ROUTER, UNINSTALL_PLUGIN_ROUTER, UNINSTALL_WEBUI_PLUGIN_ROUTER, UPDATE_CORE_ROUTER, UPDATE_PLUGIN_ROUTER, UPDATE_TASK_STATUS_ROUTER, UPDATE_WEBUI_PLUGIN_VERSION_ROUTER, WS_CLOSE, WS_CLOSE_ONEBOT, WS_CLOSE_PUPPETEER, WS_CLOSE_SANDBOX, WS_CONNECTION, WS_CONNECTION_ONEBOT, WS_CONNECTION_PUPPETEER, WS_CONNECTION_SANDBOX, WS_CONNECTION_TERMINAL, WS_SNAPKA, Watch, Watcher, YamlEditor, absPath, accordion, accordionItem, accordionPro, app3 as app, applyComments, authMiddleware, base64, basePath, buffer, buildGithub, buttonHandle, callRender, changelog_exports as changelog, checkGitPluginUpdate, checkPkgUpdate, checkPort, clearRequire, clearRequireFile, comment, commentPath, common_exports as common, components, config_exports as config, configPath, consolePath, contact2 as contact, contactDirect, contactFriend, contactGroup, contactGroupTemp, contactGuild, copyConfig, copyConfigSync, copyFiles, copyFilesSync, createAccessTokenExpiredResponse, createBadRequestResponse, createClient2 as createClient, createDirectMessage, createForbiddenResponse, createFriendDecreaseNotice, createFriendIncreaseNotice, createFriendMessage, createGroupAdminChangedNotice, createGroupApplyRequest, createGroupCardChangedNotice, createGroupFileUploadedNotice, createGroupHlightsChangedNotice, createGroupHonorChangedNotice, createGroupInviteRequest, createGroupLuckKingNotice, createGroupMemberAddNotice, createGroupMemberBanNotice, createGroupMemberDelNotice, createGroupMemberTitleUpdatedNotice, createGroupMessage, createGroupMessageReactionNotice, createGroupPokeNotice, createGroupRecallNotice, createGroupSignInNotice, createGroupTempMessage, createGroupWholeBanNotice, createGuildMessage, createHttp, createINIParser, createMethodNotAllowedResponse, createNotFoundResponse, createPayloadTooLargeResponse, createPluginDir, createPrivateApplyRequest, createPrivateFileUploadedNotice, createPrivatePokeNotice, createPrivateRecallNotice, createRawMessage, createReceiveLikeNotice, createRefreshTokenExpiredResponse, createResponse, createServerErrorResponse, createSuccessResponse, createTaskDatabase, createUnauthorizedResponse, cron, dataPath, db, dbPath, debug2 as debug, karin as default, defaultConfigPath, defaultViewPath, defineConfig, divider, downFile, downloadFile, errorToString, exec, executeTask, existToMkdir, existToMkdirSync, exists, existsSync, ffmpeg, ffplay, ffprobe, fs_exports as file, fileToUrl, fileToUrlHandlerKey, filesByExt, formatPath, formatTime, fs_exports2 as fs, getAllBot, getAllBotID, getAllBotList, getAllFiles, getAllFilesSync, getBot, getBotCount, getCommit, getDefaultBranch, getFastGithub, getFastRegistry, getFiles, getHash, getLocalBranches, getLocalCommitHash, getMimeType, getPackageJson, getPid, getPkgVersion, getPluginInfo, getPlugins, getRelPath, getRemoteBranches, getRemoteCommitHash, getRemotePkgVersion, getRender, getRenderCount, getRenderList, getRequestIp, getTaskCallback, getTaskDatabase, getTime, gitPull, handler, hooks, htmlPath, importModule, ini, initOneBot, initTaskSystem, input, isClass, isDir, isDirSync, isDocker, isFile, isFileSync, isIPv4Loop, isIPv6Loop, isLinux, isLocalRequest, isLoopback, isMac, isPackaged, isPathEqual, isPkg, isPlugin, isPublic, isRoot, isSubPath, isWin2 as isWin, json, karin, karinDir, karinMain, karinPathBase, karinPathComment, karinPathConfig, karinPathConsole, karinPathData, karinPathDb, karinPathDefaultConfig, karinPathDefaultView, karinPathHtml, karinPathKv, karinPathLogs, karinPathMain, karinPathPlugins, karinPathPm2Config, karinPathRedisSqlite3, karinPathResource, karinPathRoot, karinPathSandboxData, karinPathSandboxTemp, karinPathTaskDb, karinPathTemp, karinToQQBot, key_exports as key, killApp, kvPath, lock, lockMethod, lockProp, log, logger2 as logger, logs, logsPath, makeForward, makeMessage, mkdir, mkdirSync, parseChangelog, parseGithubUrl, pingRequest, pkgRoot, pluginDir, pm2Path, qqbotToKarin, raceRequest, randomStr, range, read, readFile, readJson, readJsonSync, redis2 as redis, redisSqlite3Path, registerBot, registerRender, removeTaskCallback, render, renderHtml, renderMultiHtml, renderTpl, requireFile, requireFileSync, resourcePath, restart, restartDirect, rmSync, router, sandboxDataPath, sandboxTempPath, satisfies, save, segment_exports as segment, sendMsg2 as sendMsg, sender, senderDirect, senderFriend, senderGroup, senderGroupTemp, senderGuild, sep, server, setTaskCallback, setTaskDatabase, splitPath, start2 as start, stream, stringifyError, switchComponent, system_exports as system, taskAdd, taskExists, taskGet, taskList, taskSystem, taskUpdateLogs, taskUpdateStatus, tempPath, unregisterBot, unregisterRender, updateAllGitPlugin, updateAllPkg, updateGitPlugin, updatePkg, updateTaskLogs, updateTaskStatus, uptime, urlToPath, waitPort, watch, watchAndMerge, write, writeJson, writeJsonSync, yaml3 as yaml };
@@ -0,0 +1 @@
1
+ import 'moment/locale/af.js'
@@ -0,0 +1 @@
1
+ import 'moment/locale/ar-dz.js'
@@ -0,0 +1 @@
1
+ import 'moment/locale/ar-kw.js'
@@ -0,0 +1 @@
1
+ import 'moment/locale/ar-ly.js'
@@ -0,0 +1 @@
1
+ import 'moment/locale/ar-ma.js'
@@ -0,0 +1 @@
1
+ import 'moment/locale/ar-ps.js'
@@ -0,0 +1 @@
1
+ import 'moment/locale/ar-sa.js'
@@ -0,0 +1 @@
1
+ import 'moment/locale/ar-tn.js'
@@ -0,0 +1 @@
1
+ import 'moment/locale/ar.js'
@@ -0,0 +1 @@
1
+ import 'moment/locale/az.js'
@@ -0,0 +1 @@
1
+ import 'moment/locale/be.js'
@@ -0,0 +1 @@
1
+ import 'moment/locale/bg.js'
@@ -0,0 +1 @@
1
+ import 'moment/locale/bm.js'
@@ -0,0 +1 @@
1
+ import 'moment/locale/bn-bd.js'
@@ -0,0 +1 @@
1
+ import 'moment/locale/bn.js'
@@ -0,0 +1 @@
1
+ import 'moment/locale/bo.js'
@@ -0,0 +1 @@
1
+ import 'moment/locale/br.js'
@@ -0,0 +1 @@
1
+ import 'moment/locale/bs.js'
@@ -0,0 +1 @@
1
+ import 'moment/locale/ca.js'
@@ -0,0 +1 @@
1
+ import 'moment/locale/cs.js'
@@ -0,0 +1 @@
1
+ import 'moment/locale/cv.js'