node-karin 0.0.3 → 0.1.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 (109) hide show
  1. package/LICENSE +674 -674
  2. package/README.md +57 -57
  3. package/config/defSet/App.yaml +37 -37
  4. package/config/defSet/config.yaml +43 -43
  5. package/config/defSet/group.yaml +18 -18
  6. package/config/defSet/pm2.yaml +21 -21
  7. package/config/defSet/server.yaml +42 -42
  8. package/config/view/App.yaml +74 -74
  9. package/config/view/config.yaml +100 -100
  10. package/config/view/group.yaml +62 -62
  11. package/config/view/pm2.yaml +41 -41
  12. package/config/view/redis.yaml +25 -25
  13. package/config/view/server.yaml +93 -93
  14. package/lib/adapter/onebot/onebot11.d.ts +430 -430
  15. package/lib/adapter/onebot/onebot11.js +1265 -1302
  16. package/lib/core/dir.d.ts +1 -0
  17. package/lib/core/dir.js +4 -0
  18. package/lib/core/init.js +4 -4
  19. package/lib/core/karin.d.ts +72 -72
  20. package/lib/core/karin.js +51 -51
  21. package/lib/core/listener.d.ts +121 -121
  22. package/lib/core/listener.js +178 -178
  23. package/lib/core/plugin.app.d.ts +15 -15
  24. package/lib/core/plugin.app.js +18 -18
  25. package/lib/core/plugin.d.ts +182 -182
  26. package/lib/core/plugin.js +132 -132
  27. package/lib/core/plugin.loader.d.ts +149 -149
  28. package/lib/core/plugin.loader.js +451 -451
  29. package/lib/core/server.d.ts +26 -26
  30. package/lib/core/server.js +209 -209
  31. package/lib/db/level.d.ts +20 -20
  32. package/lib/db/level.js +36 -36
  33. package/lib/db/redis.d.ts +41 -41
  34. package/lib/db/redis.js +131 -131
  35. package/lib/db/redis_level.d.ts +113 -113
  36. package/lib/db/redis_level.js +274 -274
  37. package/lib/event/event.d.ts +138 -138
  38. package/lib/event/event.handler.d.ts +29 -29
  39. package/lib/event/event.handler.js +138 -138
  40. package/lib/event/event.js +120 -120
  41. package/lib/event/message.d.ts +102 -102
  42. package/lib/event/message.handler.d.ts +25 -25
  43. package/lib/event/message.handler.js +237 -237
  44. package/lib/event/message.js +69 -69
  45. package/lib/event/notice.d.ts +49 -49
  46. package/lib/event/notice.js +14 -14
  47. package/lib/event/request.d.ts +49 -49
  48. package/lib/event/request.js +14 -14
  49. package/lib/event/review.handler.d.ts +54 -54
  50. package/lib/event/review.handler.js +374 -374
  51. package/lib/index.d.ts +24 -23
  52. package/lib/index.js +40 -40
  53. package/lib/renderer/app.d.ts +53 -53
  54. package/lib/renderer/app.js +88 -88
  55. package/lib/renderer/base.d.ts +30 -30
  56. package/lib/renderer/base.js +68 -68
  57. package/lib/renderer/client.d.ts +30 -30
  58. package/lib/renderer/client.js +155 -155
  59. package/lib/renderer/http.d.ts +19 -19
  60. package/lib/renderer/http.js +50 -50
  61. package/lib/renderer/server.d.ts +42 -42
  62. package/lib/renderer/server.js +110 -110
  63. package/lib/renderer/wormhole.d.ts +1 -1
  64. package/lib/renderer/wormhole.js +154 -154
  65. package/lib/tools/init.d.ts +2 -0
  66. package/lib/tools/init.js +31 -0
  67. package/lib/types/adapter.d.ts +575 -575
  68. package/lib/types/adapter.js +1 -1
  69. package/lib/types/config.d.ts +327 -327
  70. package/lib/types/config.js +1 -1
  71. package/lib/types/element.d.ts +576 -576
  72. package/lib/types/element.js +1 -1
  73. package/lib/types/index.d.ts +8 -8
  74. package/lib/types/index.js +8 -8
  75. package/lib/types/logger.d.ts +109 -109
  76. package/lib/types/logger.js +1 -1
  77. package/lib/types/onebots11.d.ts +1371 -1371
  78. package/lib/types/onebots11.js +1 -1
  79. package/lib/types/plugin.d.ts +282 -282
  80. package/lib/types/plugin.js +1 -1
  81. package/lib/types/render.d.ts +111 -111
  82. package/lib/types/render.js +1 -1
  83. package/lib/types/reply.d.ts +40 -40
  84. package/lib/types/reply.js +1 -1
  85. package/lib/types/types.d.ts +898 -898
  86. package/lib/types/types.js +1 -1
  87. package/lib/utils/YamlEditor.d.ts +62 -62
  88. package/lib/utils/YamlEditor.js +197 -197
  89. package/lib/utils/button.d.ts +49 -49
  90. package/lib/utils/button.js +75 -75
  91. package/lib/utils/common.d.ts +123 -123
  92. package/lib/utils/common.js +396 -396
  93. package/lib/utils/config.d.ts +72 -72
  94. package/lib/utils/config.js +259 -254
  95. package/lib/utils/exec.d.ts +22 -22
  96. package/lib/utils/exec.js +36 -36
  97. package/lib/utils/ffmpeg.d.ts +12 -12
  98. package/lib/utils/ffmpeg.js +25 -25
  99. package/lib/utils/handler.d.ts +76 -76
  100. package/lib/utils/handler.js +98 -98
  101. package/lib/utils/logger.d.ts +3 -3
  102. package/lib/utils/logger.js +104 -104
  103. package/lib/utils/segment.d.ts +276 -276
  104. package/lib/utils/segment.js +420 -420
  105. package/lib/utils/update.d.ts +69 -69
  106. package/lib/utils/update.js +145 -145
  107. package/lib/utils/updateVersion.d.ts +33 -33
  108. package/lib/utils/updateVersion.js +140 -140
  109. package/package.json +95 -91
@@ -1 +1 @@
1
- export {}
1
+ export {}
@@ -1,8 +1,8 @@
1
- export * from './adapter.js';
2
- export * from './config.js';
3
- export * from './logger.js';
4
- export * from './onebots11.js';
5
- export * from './plugin.js';
6
- export * from './render.js';
7
- export * from './reply.js';
8
- export * from './types.js';
1
+ export * from './adapter.js';
2
+ export * from './config.js';
3
+ export * from './logger.js';
4
+ export * from './onebots11.js';
5
+ export * from './plugin.js';
6
+ export * from './render.js';
7
+ export * from './reply.js';
8
+ export * from './types.js';
@@ -1,8 +1,8 @@
1
- export * from './adapter.js'
2
- export * from './config.js'
3
- export * from './logger.js'
4
- export * from './onebots11.js'
5
- export * from './plugin.js'
6
- export * from './render.js'
7
- export * from './reply.js'
8
- export * from './types.js'
1
+ export * from './adapter.js'
2
+ export * from './config.js'
3
+ export * from './logger.js'
4
+ export * from './onebots11.js'
5
+ export * from './plugin.js'
6
+ export * from './render.js'
7
+ export * from './reply.js'
8
+ export * from './types.js'
@@ -1,109 +1,109 @@
1
- import chalk from 'chalk';
2
- export interface Logger {
3
- /**
4
- * 颜色模块
5
- */
6
- chalk: typeof chalk;
7
- /**
8
- * 构建红色文本
9
- */
10
- red: (text: string) => string;
11
- /**
12
- * 构建绿色文本
13
- */
14
- green: (text: string) => string;
15
- /**
16
- * 构建黄色文本
17
- */
18
- yellow: (text: string) => string;
19
- /**
20
- * 构建蓝色文本
21
- */
22
- blue: (text: string) => string;
23
- /**
24
- * 构建品红色文本
25
- */
26
- magenta: (text: string) => string;
27
- /**
28
- * 构建青色文本
29
- */
30
- cyan: (text: string) => string;
31
- /**
32
- * 构建白色文本
33
- */
34
- white: (text: string) => string;
35
- /**
36
- * 构建灰色文本
37
- */
38
- gray: (text: string) => string;
39
- /**
40
- * 构建紫色文本
41
- */
42
- violet: (text: string) => string;
43
- /**
44
- * 构建函数文本
45
- */
46
- fnc: (text: string) => string;
47
- /**
48
- * 日志模块
49
- * @param level 等级
50
- * @param id 机器人ID
51
- * @param args 参数
52
- */
53
- bot: (level: 'trace' | 'debug' | 'mark' | 'info' | 'mark' | 'warn' | 'error' | 'fatal', id: string, ...args: string[]) => void;
54
- }
55
- declare module 'log4js' {
56
- interface Logger {
57
- /**
58
- * 颜色模块
59
- */
60
- chalk: typeof chalk;
61
- /**
62
- * 构建红色文本
63
- */
64
- red: (text: string) => string;
65
- /**
66
- * 构建绿色文本
67
- */
68
- green: (text: string) => string;
69
- /**
70
- * 构建黄色文本
71
- */
72
- yellow: (text: string) => string;
73
- /**
74
- * 构建蓝色文本
75
- */
76
- blue: (text: string) => string;
77
- /**
78
- * 构建品红色文本
79
- */
80
- magenta: (text: string) => string;
81
- /**
82
- * 构建青色文本
83
- */
84
- cyan: (text: string) => string;
85
- /**
86
- * 构建白色文本
87
- */
88
- white: (text: string) => string;
89
- /**
90
- * 构建灰色文本
91
- */
92
- gray: (text: string) => string;
93
- /**
94
- * 构建紫色文本
95
- */
96
- violet: (text: string) => string;
97
- /**
98
- * 构建函数文本
99
- */
100
- fnc: (text: string) => string;
101
- /**
102
- * 日志模块
103
- * @param level 等级
104
- * @param id 机器人ID
105
- * @param args 参数
106
- */
107
- bot: (level: 'trace' | 'debug' | 'mark' | 'info' | 'mark' | 'warn' | 'error' | 'fatal', id: string, ...args: string[]) => void;
108
- }
109
- }
1
+ import chalk from 'chalk';
2
+ export interface Logger {
3
+ /**
4
+ * 颜色模块
5
+ */
6
+ chalk: typeof chalk;
7
+ /**
8
+ * 构建红色文本
9
+ */
10
+ red: (text: string) => string;
11
+ /**
12
+ * 构建绿色文本
13
+ */
14
+ green: (text: string) => string;
15
+ /**
16
+ * 构建黄色文本
17
+ */
18
+ yellow: (text: string) => string;
19
+ /**
20
+ * 构建蓝色文本
21
+ */
22
+ blue: (text: string) => string;
23
+ /**
24
+ * 构建品红色文本
25
+ */
26
+ magenta: (text: string) => string;
27
+ /**
28
+ * 构建青色文本
29
+ */
30
+ cyan: (text: string) => string;
31
+ /**
32
+ * 构建白色文本
33
+ */
34
+ white: (text: string) => string;
35
+ /**
36
+ * 构建灰色文本
37
+ */
38
+ gray: (text: string) => string;
39
+ /**
40
+ * 构建紫色文本
41
+ */
42
+ violet: (text: string) => string;
43
+ /**
44
+ * 构建函数文本
45
+ */
46
+ fnc: (text: string) => string;
47
+ /**
48
+ * 日志模块
49
+ * @param level 等级
50
+ * @param id 机器人ID
51
+ * @param args 参数
52
+ */
53
+ bot: (level: 'trace' | 'debug' | 'mark' | 'info' | 'mark' | 'warn' | 'error' | 'fatal', id: string, ...args: string[]) => void;
54
+ }
55
+ declare module 'log4js' {
56
+ interface Logger {
57
+ /**
58
+ * 颜色模块
59
+ */
60
+ chalk: typeof chalk;
61
+ /**
62
+ * 构建红色文本
63
+ */
64
+ red: (text: string) => string;
65
+ /**
66
+ * 构建绿色文本
67
+ */
68
+ green: (text: string) => string;
69
+ /**
70
+ * 构建黄色文本
71
+ */
72
+ yellow: (text: string) => string;
73
+ /**
74
+ * 构建蓝色文本
75
+ */
76
+ blue: (text: string) => string;
77
+ /**
78
+ * 构建品红色文本
79
+ */
80
+ magenta: (text: string) => string;
81
+ /**
82
+ * 构建青色文本
83
+ */
84
+ cyan: (text: string) => string;
85
+ /**
86
+ * 构建白色文本
87
+ */
88
+ white: (text: string) => string;
89
+ /**
90
+ * 构建灰色文本
91
+ */
92
+ gray: (text: string) => string;
93
+ /**
94
+ * 构建紫色文本
95
+ */
96
+ violet: (text: string) => string;
97
+ /**
98
+ * 构建函数文本
99
+ */
100
+ fnc: (text: string) => string;
101
+ /**
102
+ * 日志模块
103
+ * @param level 等级
104
+ * @param id 机器人ID
105
+ * @param args 参数
106
+ */
107
+ bot: (level: 'trace' | 'debug' | 'mark' | 'info' | 'mark' | 'warn' | 'error' | 'fatal', id: string, ...args: string[]) => void;
108
+ }
109
+ }
@@ -1 +1 @@
1
- export {}
1
+ export {}