zhin.js 1.0.20 → 1.0.21

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 CHANGED
@@ -1,5 +1,14 @@
1
1
  # zhin.js
2
2
 
3
+ ## 1.0.21
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [3960e70]
8
+ - @zhin.js/core@1.0.21
9
+ - @zhin.js/logger@0.1.5
10
+ - @zhin.js/schema@1.0.5
11
+
3
12
  ## 1.0.20
4
13
 
5
14
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zhin.js",
3
- "version": "1.0.20",
3
+ "version": "1.0.21",
4
4
  "description": "开箱即用的机器人框架 - 包含进程适配器、HTTP服务、Web控制台和SQLite数据库",
5
5
  "type": "module",
6
6
  "main": "./lib/index.js",
@@ -35,9 +35,9 @@
35
35
  "dependencies": {
36
36
  "yaml": "^2.3.4",
37
37
  "dotenv": "^16.3.1",
38
- "@zhin.js/core": "1.0.20",
39
- "@zhin.js/logger": "0.1.4",
40
- "@zhin.js/schema": "1.0.4"
38
+ "@zhin.js/core": "1.0.21",
39
+ "@zhin.js/logger": "0.1.5",
40
+ "@zhin.js/schema": "1.0.5"
41
41
  },
42
42
  "devDependencies": {
43
43
  "typescript": "^5.3.0",
@@ -0,0 +1,65 @@
1
+ import { describe, it, expect } from 'vitest'
2
+
3
+ describe('Zhin Package Exports', () => {
4
+ it('should export core modules', async () => {
5
+ const zhin = await import('../src/index')
6
+
7
+ // 验证核心导出存在
8
+ expect(zhin).toBeDefined()
9
+ expect(typeof zhin).toBe('object')
10
+ })
11
+
12
+ it('should export Plugin', async () => {
13
+ const { Plugin } = await import('../src/index')
14
+ expect(Plugin).toBeDefined()
15
+ expect(typeof Plugin).toBe('function')
16
+ })
17
+
18
+ it('should export Adapter', async () => {
19
+ const { Adapter } = await import('../src/index')
20
+ expect(Adapter).toBeDefined()
21
+ expect(typeof Adapter).toBe('function')
22
+ })
23
+
24
+ it('should export Message', async () => {
25
+ const { Message } = await import('../src/index')
26
+ expect(Message).toBeDefined()
27
+ })
28
+
29
+ it('should export logger', async () => {
30
+ const { logger } = await import('../src/index')
31
+ expect(logger).toBeDefined()
32
+ expect(typeof logger).toBe('object')
33
+ })
34
+
35
+ it('should export Cron', async () => {
36
+ const { Cron } = await import('../src/index')
37
+ expect(Cron).toBeDefined()
38
+ expect(typeof Cron).toBe('function')
39
+ })
40
+
41
+ it('should export component utilities', async () => {
42
+ const { defineComponent, renderComponents } = await import('../src/index')
43
+ expect(defineComponent).toBeDefined()
44
+ expect(renderComponents).toBeDefined()
45
+ })
46
+
47
+ it('should export JSX runtime', async () => {
48
+ const zhin = await import('../src/index')
49
+ // JSX runtime 可能通过其他方式导出
50
+ expect(zhin).toBeDefined()
51
+ })
52
+
53
+ it('should export utility functions', async () => {
54
+ const { segment, Time, compose } = await import('../src/index')
55
+ expect(segment).toBeDefined()
56
+ expect(Time).toBeDefined()
57
+ expect(compose).toBeDefined()
58
+ })
59
+
60
+ it('should export error classes', async () => {
61
+ const { ZhinError } = await import('../src/index')
62
+ expect(ZhinError).toBeDefined()
63
+ expect(typeof ZhinError).toBe('function')
64
+ })
65
+ })